pax_global_header00006660000000000000000000000064132460445040014514gustar00rootroot0000000000000052 comment=41b59df14d793d2119a94e1260cb81c48b00e0d9 GtkD-3.7.5/000077500000000000000000000000001324604450400123615ustar00rootroot00000000000000GtkD-3.7.5/.gitignore000066400000000000000000000000501324604450400143440ustar00rootroot00000000000000*~ *.o *.a *.so .hg .hgignore .svn .dub GtkD-3.7.5/.gitmodules000066400000000000000000000001271324604450400145360ustar00rootroot00000000000000[submodule "wrap"] path = wrap url = https://github.com/gtkd-developers/gir-to-d.git GtkD-3.7.5/AUTHORS000066400000000000000000000002341324604450400134300ustar00rootroot00000000000000GTKD AUTHORS (alphabetical by last name) Frank Benoit Jake Day Jonas Kivi Alan Knowles Antonio Monteiro Sebastián E. Peyrott John Reimer Mike Wey hauptmechGtkD-3.7.5/Build.d000077500000000000000000000055721324604450400136010ustar00rootroot00000000000000module Build; import core.stdc.stdlib: exit; import std.algorithm; import std.array; import std.conv; import std.file; import std.getopt; import std.path; import std.process; import std.range; import std.stdio; import std.string; string dcflags; string ldflags; int main(string[] args) { version(Posix) { writeln("This build script is currently Windows only."); return(1); } getopt(args, "dcflags", &dcflags, "ldflags", &ldflags); args.popFront(); foreach ( arg; args ) { if ( !["gtkd", "gtkdgl", "sv", "gstreamer", "vte", "peas", "all"].canFind(arg) ) { writefln("Unknown option: %s", arg); return 1; } } if ( args.length == 0 ) args = ["gtkd", "sv"]; if ( args.canFind("all") ) args = ["gtkd", "sv", "gstreamer", "peas"]; foreach ( arg; args ) { switch ( arg ) { case "gtkd": build("generated\\gtkd", "gtkd"); break; case "gtkdgl": build("generated\\gtkdgl", "gtkdgl"); break; case "sv": build("generated\\sourceview", "gtkdsv"); break; case "gstreamer": build("generated\\gstreamer", "gstreamerd"); break; case "peas": build("generated\\peas", "peasd"); break; default: assert(false); break; } } return(0); } void build(string dir, string lib) { version(Win64) { std.file.write("build.rf", format("-m64 -c -lib %s %s -Igenerated/gtkd -of%s.lib %s", dcflags, ldflags, lib, dFiles(dir))); auto pid = spawnProcess(["dmd", "@build.rf"]); if ( wait(pid) != 0 ) exit(1); } else { if (lib == "gtkd") { string[] subDirs = ["atk", "cairo", "gdk", "gdkpixbuf", "gio", "glib", "gobject", "gthread", "gtkc", "gtkd", "pango", "rsvg"]; foreach(directory; subDirs) buildObj(dFiles("generated\\gtkd\\"~ directory), directory); string[] files = dFiles("generated\\gtkd\\gtk").split(); files.chunks((files.length / 4) + 1).enumerate(1).each!((index, value){buildObj(value.join(' '), "gtk"~to!string(index));}); string objects; foreach(directory; subDirs) objects ~= directory ~".obj "; objects ~= "gtk1.obj gtk2.obj gtk3.obj gtk4.obj"; executeShell(format("dmd -lib %s -of%s.lib %s", ldflags, lib, objects)); foreach(string obj; objects.split()) std.file.remove(obj); } else { buildObj(dFiles(dir), lib); executeShell(format("dmd -lib %s -of%s.lib %s.obj", ldflags, lib, lib)); std.file.remove(lib ~".obj"); } } std.file.remove("build.rf"); } void buildObj(string files, string objName) { std.file.write("build.rf", format("-c %s -Igenerated/gtkd -of%s.obj %s", dcflags, objName, files)); auto pid = spawnProcess(["dmd", "@build.rf"]); if ( wait(pid) != 0 ) exit(1); } string dFiles(string sourceDir) { string files; auto entries = dirEntries(sourceDir, SpanMode.breadth); foreach ( DirEntry entry; entries ) { if ( entry.isDir == false && entry.name.extension == ".d" ) { files ~= entry.name ~ " "; } } return files; } GtkD-3.7.5/CHANGELOG000066400000000000000000000130101324604450400135660ustar00rootroot00000000000000GtkD ChangeLog ============== Release: 3.7.4 -------------- -Check for null when returning an object in gtkd.Implement. -Handle out parameters correctly in gtkd.Implement. Release: 3.7.4 -------------- -Fix building with dmd 2.079. Release: 3.7.3 -------------- -Use the Slice allocator to allocate structs. #221 Release: 3.7.2 -------------- -Don't use the phobos version of Scoped, to avoid issues when the struct is moved. -Fix the Windows build script for dmd 2.077. Release: 3.7.1 -------------- -Revert the opCast changes for the 3.7 release. -Use hasMember instead of hasStaticMember. Release: 3.7.0 -------------- -Add GstMpegts bindings. -Add GstBase and GstApp bindings. #215 -Add an opCast for ObjectG. -Add properties for simple structs with fields marked as writable. -Templatize ListStore.setValue, TreeStore.setValue andthe gobject.Value constructor to allow for more types. -Also generate constants. #213 -Add gobject.Signals.Signals.connect(). #207. -Update some of the demos to the Gtk3 way of doing things. #204, #205 and #206 -Remove GtkGlExt demos. Release: 3.6.6 -------------- -Fix a memory leak with signals. #211 Release: 3.6.5 -------------- -Fix the Windows build script. -Fix the 64bit Windows workaround. Release: 3.6.4 -------------- -Don't add deprecation warnings in a bugfix release. Release: 3.6.3 -------------- -Fix the destroyNotify error when destroying an object with unref. -Retrieve the library names from the gir files instead of gtkd.paths. Release: 3.6.2 -------------- -Fix dub.json. -Call free in the destructors of classes not derived from ObjectG. Release: 3.6.1 -------------- -Fix the GNUMakefile. #196 Release: 3.6.0 -------------- -Update the libraries to the latest versions. -Add librsvg. #193 -Allow for not using the runtime linker when generating the binding. -Add mixin templates to generate the boilerplate needed to implement Gtk interfaces or overrideing Gtk functions. Release: 3.5.1 -------------- -Set the correct path for the pkgconfig files. #181 Release: 3.5.0 -------------- -Add dub configurations for the demos. #177 -Fix gio.Socket.receive. #178 -Allow removing signal handlers and register each handler seperatly with GTK #170 -Use the correct Homebrew path #172 Release: 3.4.1 -------------- -Properly remove toggle references when an object is destroyed. #169 Release: 3.4.0 -------------- -Update to GTK 3.22 -Properly finalize GTK objects. #165 -Reset the ID for glib.Timeout. #154 -Add libPeas Binding. #152 -Load libraries in the Global namespace to avoid Sourceview errors. -Check the "GTK_BASEPATH" and "HOMEBREW_ROOT" environment variables on OSX. -Print a more informative error message when we fail to load a library. Release: 3.3.0 -------------- -Update to GTK 3.20. Release: 3.2.3 -------------- -Fix some memory errors, #146 -Add a scoped version of addOnCommandline. #142 Release: 3.2.2 -------------- -Add ddox generation script by Gerald Nunn. -Allocate GTK structs with g_malloc0. -GIO Action and Popover demo by Gerald Nunn. #140 -Don't create new objects in ListG and ListSG toArray. Release: 3.2.1 -------------- -Fix ListG.toArray, and the unittest. #129 -Returning a TreeIter from a custom TreeModel should be optional. #130 -New CoreGL demo by: Sebastien Alaiwan. #132 -New Multithreading demo by: Gerald Nunn. #134 -Fix the vte path. #135 Release: 3.2.0 -------------- -Update to GTK 3.18. Release: 3.1.5 -------------- -The Wrapper now shows file and linenumber on errors in the GIR files. -Fix iterating ListG and ListSG. #123 -Fix building GtkDGL. Release: 3.1.4 -------------- -Fix issues with dmd 2.068. -Throw GExceptions before ConstructionExceptions. #118 -Add addMany and removeMany to gstreamer.Bin. #116 Release: 3.1.3 -------------- -Don't document length parameters that arn't there. -Don't treat guchar* as string. #115 -Set the TreeModel after retrieving the TreeIter. Fix #113 Release: 3.1.2 -------------- -Fix Builder.addFromFile. Release: 3.1.1 -------------- -Remove conflicting GStreamer Files Release: 3.1.0 -------------- -Wraps the GTK+ 3.16 API. -Add TreeModelFilter and TreeModelSort constructors, Fix #110 Release: 3.0.0 -------------- -New Generator based on the gir files. for changes because of it see the wiki: https://github.com/gtkd-developers/GtkD/wiki/GtkD-2-vs-GtkD-3 -Wraps the GTK+ 3.14 API. -Deprecated the addOnDraw function that doesn't use scoped. -Improve memory management for classes derived from gobject.ObjectG. -Don't use absolute paths for the GTK libraries on OSX, Issue #97. Release: 2.4.2 -------------- -Fix issue #102, stop allocating in the ObjectG destructor. Release: 2.4.1 -------------- -Fix memory leak with gdk.Pixbuf. -On Windows search for an copy of GTK+ in <exe path>\gtk. Release: 2.4.0 -------------- - Calling unsupported functions now throws an Error. - Add a Scoped overload for addOnDraw. Since the GC can keep a lot of Contexts alive before a collection cycle starts, some memory and GDI/X11 handles arn't released when no longer needed. The Scoped overload destroys the Context at the end of the call releasing there resources. - Avoid DLL issues on Windows. GtkD now searches for the correct copy of Gtk+. - Add a toArray function to glib.ListG and glib.ListSG. - Add VTE binding, provided by Deadalnix. - Remove D1 support. There are a few reasons to do this: 1. All three compilers have discontinued there D1 version. 2. GtkD with D1 + Tango has been broken for a year now, without any complain 3. I hope to better support D2 features like const, imutable, nothrow, pure. - bug fixes. GtkD-3.7.5/COPYING000066400000000000000000000215531324604450400134220ustar00rootroot00000000000000The GtkD library and included works are provided under the terms of the GNU Library General Public License (LGPL) version 3, or (at your option) any later version, with the following exceptions: 1. Modifications to any of the works included within the GtkD library to support a specific platform or application do not constitute a modified or derivative work. 2. Static linking of applications or any other source to the GtkD library does not constitute a modified or derivative work and does not require the author(s) to provide source code for said work, use the shared GtkD libraries, or link their applications against a user-supplied version of GtkD. If you link applications to a modified version of GtkD, then the changes to GtkD must be provided under the terms of the LGPL. 3. You do not have to provide a copy of the GtkD license with applications that are linked to the GtkD library, nor do you have to identify GtkD's license in your application as required by the LGPL. However, applications must still identify their use of GtkD. The following example statement can be included in the application or it's documentation to satisfy this requirement: [application] is based in part on works of the GtkD project (http://gtkd.org). The above exceptions are temporary and are subject to change at any time. --------------------------------------------------------------------------------------------------- GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. GtkD-3.7.5/GNUmakefile000066400000000000000000000426631324604450400144460ustar00rootroot00000000000000SHELL=/bin/sh prefix?=/usr/local OS=$(shell uname || uname -s) ARCH=$(shell uname -m || arch) datadir?=$(prefix)/share ifeq (, $(shell which dpkg-architecture 2>/dev/null)) libdir?=lib/ else libdir?=lib/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH) endif ifndef DC ifneq ($(strip $(shell which dmd 2>/dev/null)),) DC=dmd else ifneq ($(strip $(shell which ldc 2>/dev/null)),) DC=ldc else ifneq ($(strip $(shell which ldc2 2>/dev/null)),) DC=ldc2 else DC=gdc endif endif # make gtkD libs and test .DEFAULT_GOAL = default-goal default-goal: libs test shared: shared-libs all: libs shared-libs test ifeq ("$(DC)","gdc") DCFLAGS=-O2 LINKERFLAG=-Xlinker DDOCFLAGS=-fsyntax-only -c -fdoc -fdoc-file=$@ DDOCINC=-fdoc-inc= output=-o $@ else DCFLAGS=-O LINKERFLAG=-L DDOCFLAGS=-o- -Df$@ output=-of$@ endif ifneq (,$(findstring ldc,$(DC))) FPIC=-relocation-model=pic else FPIC=-fPIC endif ifeq ("$(OS)","Linux") LDFLAGS+=$(LINKERFLAG)-ldl endif AR=ar RANLIB=ranlib ####################################################################### GTKD_VERSION=3.7.5 SO_VERSION=0 MAJOR = $(word 1,$(subst ., ,$(GTKD_VERSION))) MINOR = $(word 2,$(subst ., ,$(GTKD_VERSION))) BUGFIX = $(word 3,$(subst ., ,$(GTKD_VERSION))) LIBNAME_GTKD = libgtkd-$(MAJOR).a SONAME_GTKD = libgtkd-$(MAJOR).so SOURCES_GTKD = $(wildcard generated/gtkd/*/*.d) $(wildcard generated/gtkd/*/c/*.d) OBJECTS_GTKD = $(patsubst %.d,%.o,$(SOURCES_GTKD)) PICOBJECTS_GTKD = $(patsubst %.o,%.pic.o,$(OBJECTS_GTKD)) LIBNAME_GTKDGL = libgtkdgl-$(MAJOR).a SONAME_GTKDGL = libgtkdgl-$(MAJOR).so SOURCES_GTKDGL = $(wildcard generated/gtkdgl/*/*.d) $(wildcard generated/gtkdgl/*/c/*.d) OBJECTS_GTKDGL = $(patsubst %.d,%.o,$(SOURCES_GTKDGL)) PICOBJECTS_GTKDGL = $(patsubst %.o,%.pic.o,$(OBJECTS_GTKDGL)) LIBNAME_GTKDSV = libgtkdsv-$(MAJOR).a SONAME_GTKDSV = libgtkdsv-$(MAJOR).so SOURCES_GTKDSV = $(wildcard generated/sourceview/*/*.d) $(wildcard generated/sourceview/*/c/*.d) OBJECTS_GTKDSV = $(patsubst %.d,%.o,$(SOURCES_GTKDSV)) PICOBJECTS_GTKDSV = $(patsubst %.o,%.pic.o,$(OBJECTS_GTKDSV)) LIBNAME_GSTREAMERD = libgstreamerd-$(MAJOR).a SONAME_GSTREAMERD = libgstreamerd-$(MAJOR).so SOURCES_GSTREAMERD = $(wildcard generated/gstreamer/*/*.d) $(wildcard generated/gstreamer/*/c/*.d) $(wildcard generated/gstreamer/gst/*/*.d) $(wildcard generated/gstreamer/gst/*/c/*.d) OBJECTS_GSTREAMERD = $(patsubst %.d,%.o,$(SOURCES_GSTREAMERD)) PICOBJECTS_GSTREAMERD = $(patsubst %.o,%.pic.o,$(OBJECTS_GSTREAMERD)) LIBNAME_VTED = libvted-$(MAJOR).a SONAME_VTED = libvted-$(MAJOR).so SOURCES_VTED = $(wildcard generated/vte/*/*.d) $(wildcard generated/vte/*/c/*.d) OBJECTS_VTED = $(patsubst %.d,%.o,$(SOURCES_VTED)) PICOBJECTS_VTED = $(patsubst %.o,%.pic.o,$(OBJECTS_VTED)) LIBNAME_PEASD = libpeasd-$(MAJOR).a SONAME_PEASD = libpeasd-$(MAJOR).so SOURCES_PEASD = $(wildcard generated/peas/*/*.d) $(wildcard generated/peas/*/c/*.d) OBJECTS_PEASD = $(patsubst %.d,%.o,$(SOURCES_PEASD)) PICOBJECTS_PEASD = $(patsubst %.o,%.pic.o,$(OBJECTS_PEASD)) ####################################################################### USE_RUNTIME_LINKER = $(shell grep "Linker" generated/gtkd/gtkc/atk.d) ifeq ($(USE_RUNTIME_LINKER),) SOFLAGS_GTKD = $(subst -l,$(LINKERFLAG)-l,$(shell pkg-config --libs gtk+-3.0 librsvg-2.0)) SOFLAGS_GTKDGL = $(LINKERFLAG)-L. $(LINKERFLAG)./libgtkd-$(MAJOR).so $(subst -l,$(LINKERFLAG)-l,$(shell pkg-config --libs gtkglext-3.0)) SOFLAGS_GTKDSV = $(LINKERFLAG)-L. $(LINKERFLAG)./libgtkd-$(MAJOR).so $(subst -l,$(LINKERFLAG)-l,$(shell pkg-config --libs gtksourceview-3.0)) SOFLAGS_GSTREAMERD = $(LINKERFLAG)-L. $(LINKERFLAG)./libgtkd-$(MAJOR).so $(subst -l,$(LINKERFLAG)-l,$(shell pkg-config --libs gstreamer-base-1.0)) SOFLAGS_VTED = $(LINKERFLAG)-L. $(LINKERFLAG)./libgtkd-$(MAJOR).so $(subst -l,$(LINKERFLAG)-l,$(shell pkg-config --libs vte-2.91)) SOFLAGS_PEASD = $(LINKERFLAG)-L. $(LINKERFLAG)./libgtkd-$(MAJOR).so $(subst -l,$(LINKERFLAG)-l,$(shell pkg-config --libs-only-l libpeas-1.0)) endif ####################################################################### BINNAME_DEMO = TestWindow SOURCES_DEMO = $(shell find \ demos/gtkD/TestWindow \ -name '*.d' ) OBJECTS_DEMO = $(shell echo $(SOURCES_DEMO) | sed -e 's/\.d/\.o/g') ####################################################################### # -Isrc 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 endif gtkd: $(LIBNAME_GTKD) gtkdgl: $(LIBNAME_GTKDGL) sv: $(LIBNAME_GTKDSV) gstreamer: $(LIBNAME_GSTREAMERD) vte: $(LIBNAME_VTED) peas: $(LIBNAME_PEASD) shared-gtkd: $(SONAME_GTKD) shared-gtkdgl: $(SONAME_GTKDGL) shared-sv: $(SONAME_GTKDSV) shared-gstreamer: $(SONAME_GSTREAMERD) shared-vte: $(SONAME_VTED) shared-peas: $(SONAME_PEASD) ####################################################################### $(LIBNAME_GTKD): IMPORTS=-Igenerated/gtkd $(LIBNAME_GTKD): $(OBJECTS_GTKD) $(make-lib) $(LIBNAME_GTKDGL): IMPORTS=-Igenerated/gtkd -Igenerated/gtkdgl $(LIBNAME_GTKDGL): $(LIBNAME_GTKD) $(OBJECTS_GTKDGL) $(make-lib) $(LIBNAME_GTKDSV): IMPORTS=-Igenerated/gtkd -Igenerated/sourceview $(LIBNAME_GTKDSV): $(LIBNAME_GTKD) $(OBJECTS_GTKDSV) $(make-lib) $(LIBNAME_GSTREAMERD): IMPORTS=-Igenerated/gtkd -Igenerated/gstreamer $(LIBNAME_GSTREAMERD): $(LIBNAME_GTKD) $(OBJECTS_GSTREAMERD) $(make-lib) $(LIBNAME_VTED): IMPORTS=-Igenerated/gtkd -Igenerated/vte $(LIBNAME_VTED): $(LIBNAME_GTKD) $(OBJECTS_VTED) $(make-lib) $(LIBNAME_PEASD): IMPORTS=-Igenerated/gtkd -Igenerated/peas $(LIBNAME_PEASD): $(LIBNAME_GTKD) $(OBJECTS_PEASD) $(make-lib) ####################################################################### $(SONAME_GTKD): IMPORTS=-Igenerated/gtkd $(SONAME_GTKD): $(PICOBJECTS_GTKD) $(call make-shared-lib,$(SOFLAGS_GTKD)) $(SONAME_GTKDGL): IMPORTS=-Igenerated/gtkd -Igenerated/gtkdgl $(SONAME_GTKDGL): $(SONAME_GTKD) $(PICOBJECTS_GTKDGL) $(call make-shared-lib,$(SOFLAGS_GTKDGL)) $(SONAME_GTKDSV): IMPORTS=-Igenerated/gtkd -Igenerated/sourceview $(SONAME_GTKDSV): $(SONAME_GTKD) $(PICOBJECTS_GTKDSV) $(call make-shared-lib,$(SOFLAGS_GTKDSV)) $(SONAME_GSTREAMERD): IMPORTS=-Igenerated/gtkd -Igenerated/gstreamer $(SONAME_GSTREAMERD): $(SONAME_GTKD) $(PICOBJECTS_GSTREAMERD) $(call make-shared-lib,$(SOFLAGS_GSTREAMERD)) $(SONAME_VTED): IMPORTS=-Igenerated/gtkd -Igenerated/vte $(SONAME_VTED): $(SONAME_GTKD) $(PICOBJECTS_VTED) $(call make-shared-lib,$(SOFLAGS_VTED)) $(SONAME_PEASD): IMPORTS=-Igenerated/gtkd -Igenerated/peas $(SONAME_PEASD): $(SONAME_GTKD) $(PICOBJECTS_PEASD) $(call make-shared-lib,$(SOFLAGS_PEASD)) ####################################################################### # -Idemos test: $(BINNAME_DEMO) # Build libgtkd.a when neigther neither libgtkd.so and libgtkd.a are pressend. # Use -rpath for the demo so that the shard libs don't need to # be installed for it to run. # Create a versioned symlink so the demo is able to load it. $(BINNAME_DEMO): IMPORTS=-Igenerated/gtkd -Idemos/gtkD/TestWindow $(BINNAME_DEMO): $(OBJECTS_DEMO) $(if $(wildcard $(SONAME_GTKD)),,$(if $(wildcard $(LIBNAME_GTKD)),,$(MAKE) $(LIBNAME_GTKD))) $(if $(wildcard $(SONAME_GTKD)),$(eval LDFLAGS+= $(LINKERFLAG)-rpath=./)) $(if $(wildcard $(SONAME_GTKD)),$(if $(findstring "gdc","$(DC)"),$(eval LDFLAGS+=-shared-libphobos))) $(if $(wildcard $(SONAME_GTKD)),$(if $(wildcard $(SONAME_GTKD).$(SO_VERSION)),,$(shell ln -s $(SONAME_GTKD) $(SONAME_GTKD).$(SO_VERSION)))) $(DC) $(OBJECTS_DEMO) $(output) $(if $(wildcard $(SONAME_GTKD)),$(LINKERFLAG)./libgtkd-$(MAJOR).so,$(LINKERFLAG)./libgtkd-$(MAJOR).a) $(LDFLAGS) ####################################################################### %.o : %.d $(DC) $(DCFLAGS) $(IMPORTS) -c $< $(output) %.pic.o : %.d $(DC) $(DCFLAGS) $(FPIC) $(IMPORTS) -c $< $(output) ####################################################################### ifeq ("$(OS)","Darwin") pkgconfig: pkgconfig-gtkd else pkgconfig: pkgconfig-gtkd pkgconfig-gtkdgl pkgconfig-sv endif pkgconfig-gtkd: gtkd-$(MAJOR).pc pkgconfig-gtkdgl: gtkdgl-$(MAJOR).pc pkgconfig-sv: gtkdsv-$(MAJOR).pc pkgconfig-gstreamer: gstreamerd-$(MAJOR).pc pkgconfig-vte: vted-$(MAJOR).pc pkgconfig-peas: peasd-$(MAJOR).pc gtkd-$(MAJOR).pc: echo Name: GtkD > $@ echo Description: A D binding and OO wrapper for GTK+. >> $@ echo Version: $(GTKD_VERSION) >> $@ echo Libs: $(LINKERFLAG)-L$(prefix)/$(libdir)/ $(LINKERFLAG)-lgtkd-$(MAJOR) $(LINKERFLAG)-ldl >> $@ echo Cflags: -I$(prefix)/include/d/gtkd-$(MAJOR)/ >> $@ gtkdgl-$(MAJOR).pc: echo Name: GtkDGL > $@ echo Description: OpenGL capabilities for GtkD. >> $@ echo Version: $(GTKD_VERSION) >> $@ echo Libs: $(LINKERFLAG)-lgtkdgl-$(MAJOR) >> $@ echo Requires: gtkd-$(MAJOR) >> $@ gtkdsv-$(MAJOR).pc: echo Name: GtkD SourceView > $@ echo Description: A D binding and OO wrapper for GtkSourceView. >> $@ echo Version: $(GTKD_VERSION) >> $@ echo Libs: $(LINKERFLAG)-lgtkdsv-$(MAJOR) >> $@ echo Requires: gtkd-$(MAJOR) >> $@ gstreamerd-$(MAJOR).pc: echo Name: GstreamerD > $@ echo Description: A D binding and OO wrapper for Gstreamer. >> $@ echo Version: $(GTKD_VERSION) >> $@ echo Libs: $(LINKERFLAG)-lgstreamerd-$(MAJOR) >> $@ echo Requires: gtkd-$(MAJOR) >> $@ vted-$(MAJOR).pc: echo Name: VteD > $@ echo Description: A D binding and OO wrapper for Vte. >> $@ echo Version: $(GTKD_VERSION) >> $@ echo Libs: $(LINKERFLAG)-lvted-$(MAJOR) >> $@ echo Requires: gtkd-$(MAJOR) >> $@ peasd-$(MAJOR).pc: echo Name: PeasD > $@ echo Description: A D binding and OO wrapper for Peas. >> $@ echo Version: $(GTKD_VERSION) >> $@ echo Libs: $(LINKERFLAG)-lpeasd-$(MAJOR) >> $@ echo Requires: gtkd-$(MAJOR) >> $@ ####################################################################### ifeq ("$(OS)","Darwin") install: install-gtkd 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-shared-gstreamer install-shared-vte install-shared-peas install-shared: install-shared-gtkd install-shared-gtkdsv install-shared-gstreamer install-shared-vte install-shared-peas endif install-gtkd: $(LIBNAME_GTKD) install-headers-gtkd install -d $(DESTDIR)$(prefix)/$(libdir) install -m 644 $(LIBNAME_GTKD) $(DESTDIR)$(prefix)/$(libdir) install-gtkdgl: $(LIBNAME_GTKDGL) install-gtkd install-headers-gtkdgl install -m 644 $(LIBNAME_GTKDGL) $(DESTDIR)$(prefix)/$(libdir) install-gtkdsv: $(LIBNAME_GTKDSV) install-gtkd install-headers-gtkdsv install -m 644 $(LIBNAME_GTKDSV) $(DESTDIR)$(prefix)/$(libdir) install-gstreamer: $(LIBNAME_GSTREAMERD) install-gtkd install-headers-gstreamer install -m 644 $(LIBNAME_GSTREAMERD) $(DESTDIR)$(prefix)/$(libdir) install-vte: $(LIBNAME_VTED) install-gtkd install-headers-vte install -m 644 $(LIBNAME_VTED) $(DESTDIR)$(prefix)/$(libdir) install-peas: $(LIBNAME_PEASD) install-gtkd install-headers-peas install -m 644 $(LIBNAME_PEASD) $(DESTDIR)$(prefix)/$(libdir) install-shared-gtkd: $(SONAME_GTKD) install -d $(DESTDIR)$(prefix)/$(libdir) $(install-so) install-shared-gtkdgl: $(SONAME_GTKDGL) install-shared-gtkd $(install-so) install-shared-gtkdsv: $(SONAME_GTKDSV) install-shared-gtkd $(install-so) install-shared-gstreamer: $(SONAME_GSTREAMERD) install-shared-gtkd $(install-so) install-shared-vte: $(SONAME_VTED) install-shared-gtkd $(install-so) install-shared-peas: $(SONAME_PEASD) install-shared-gtkd $(install-so) install-headers-gtkd: gtkd-$(MAJOR).pc install -d $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR) install -d $(DESTDIR)$(datadir)/pkgconfig (cd generated/gtkd; echo $(SOURCES_GTKD) | sed -e s,generated/gtkd/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xv) install -m 644 gtkd-$(MAJOR).pc $(DESTDIR)$(datadir)/pkgconfig install-headers-gtkdgl: gtkdgl-$(MAJOR).pc install-headers-gtkd (cd generated/gtkdgl; echo $(SOURCES_GTKDGL) | sed -e s,generated/gtkdgl/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xv) install -m 644 gtkdgl-$(MAJOR).pc $(DESTDIR)$(datadir)/pkgconfig install-headers-gtkdsv: gtkdsv-$(MAJOR).pc install-headers-gtkd (cd generated/sourceview; echo $(SOURCES_GTKDSV) | sed -e s,generated/sourceview/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xv) install -m 644 gtkdsv-$(MAJOR).pc $(DESTDIR)$(datadir)/pkgconfig install-headers-gstreamer: gstreamerd-$(MAJOR).pc install-headers-gtkd (cd generated/gstreamer; echo $(SOURCES_GSTREAMERD) | sed -e s,generated/gstreamer/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xv) install -m 644 gstreamerd-$(MAJOR).pc $(DESTDIR)$(datadir)/pkgconfig install-headers-vte: vted-$(MAJOR).pc install-headers-gtkd (cd generated/vte; echo $(SOURCES_VTED) | sed -e s,generated/vte/,,g | xargs tar cf -) | (cd $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR); tar xv) install -m 644 vted-$(MAJOR).pc $(DESTDIR)$(datadir)/pkgconfig 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 xv) install -m 644 peasd-$(MAJOR).pc $(DESTDIR)$(datadir)/pkgconfig uninstall: uninstall-gtkdgl uninstall-gtkdsv uninstall-gstreamer uninstall-vte uninstall-peas $(foreach dir,$(shell ls generated/gtkd) , rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir)) rm -f $(DESTDIR)$(datadir)/pkgconfig/gtkd-$(MAJOR).pc rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKD) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKD) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKD).$(SO_VERSION) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKD).$(SO_VERSION).$(MINOR).$(BUGFIX) uninstall-gtkdgl: $(foreach dir,$(shell ls generated/gtkdgl), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir)) rm -f $(DESTDIR)$(datadir)/pkgconfig/gtkdgl-$(MAJOR).pc rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKDGL) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDGL) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDGL).$(SO_VERSION) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDGL).$(SO_VERSION).$(MINOR).$(BUGFIX) uninstall-gtkdsv: $(foreach dir,$(shell ls generated/sourceview), rm -rf $(DESTDIR)$(prefix)/include/d/$(dir)) rm -f $(DESTDIR)$(datadir)/pkgconfig/gtkdsv-$(MAJOR).pc rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GTKDSV) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDSV) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDSV).$(SO_VERSION) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GTKDSV).$(SO_VERSION).$(MINOR).$(BUGFIX) uninstall-gstreamer: $(foreach dir,$(shell ls generated/gstreamer), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir)) rm -f $(DESTDIR)$(datadir)/pkgconfig/gstreamerd-$(MAJOR).pc rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_GSTREAMERD) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GSTREAMERD) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GSTREAMERD).$(SO_VERSION) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_GSTREAMERD).$(SO_VERSION).$(MINOR).$(BUGFIX) uninstall-vte: $(foreach dir,$(shell ls generated/vte), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir)) rm -f $(DESTDIR)$(datadir)/pkgconfig/vted-$(MAJOR).pc rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_VTED) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_VTED) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_VTED).$(SO_VERSION) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_VTED).$(SO_VERSION).$(MINOR).$(BUGFIX) uninstall-peas: $(foreach dir,$(shell ls generated/peas), rm -rf $(DESTDIR)$(prefix)/include/d/gtkd-$(MAJOR)/$(dir)) rm -f $(DESTDIR)$(datadir)/pkgconfig/peasd-$(MAJOR).pc rm -f $(DESTDIR)$(prefix)/$(libdir)/$(LIBNAME_PEASD) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD).$(SO_VERSION) rm -f $(DESTDIR)$(prefix)/$(libdir)/$(SONAME_PEASD).$(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) -rm -f $(LIBNAME_GTKDSV) $(SONAME_GTKDSV) gtkdsv-$(MAJOR).pc $(OBJECTS_GTKDSV) $(PICOBJECTS_GTKDSV) -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 $(BINNAME_DEMO) $(OBJECTS_DEMO) $(SONAME_GTKD).$(SO_VERSION) ####################################################################### define make-lib $(AR) rcs $@ $(subst $(LIBNAME_GTKD),,$^) $(RANLIB) $@ endef define make-shared-lib $(if $(findstring "dmd","$(DC)"),$(eval LDFLAGS+=-defaultlib=:libphobos2.so)) $(if $(findstring "gdc","$(DC)"),$(eval LDFLAGS+=-shared-libphobos)) $(DC) -shared $(output) $(LDFLAGS) $1 $(LINKERFLAG)-soname=$@.$(SO_VERSION) $(subst $(SONAME_GTKD),,$^) endef define install-so install -m 755 $< $(DESTDIR)$(prefix)/$(libdir)/$<.$(SO_VERSION).$(MINOR).$(BUGFIX) ldconfig -n $(DESTDIR)$(prefix)/$(libdir)/ cd $(DESTDIR)$(prefix)/$(libdir)/; ln -sf $<.$(SO_VERSION).$(MINOR).$(BUGFIX) $<.$(SO_VERSION) cd $(DESTDIR)$(prefix)/$(libdir)/; ln -sf $<.$(SO_VERSION) $< endef GtkD-3.7.5/README.md000066400000000000000000000053151324604450400136440ustar00rootroot00000000000000# GtkD GtkD is the Digital Mars D programming language OO wrapper for Gtk+ 3.22. GtkD is release on the LGPL license with additional exceptions. Please view COPYING for GtkD's license. ## Requirements - Linux, Windows, or Mac - Gtk libs - dmd, gdc or ldc installation optional: - OpenGL libs (mesa is fine on Linux) - GtkGLext 3 ## Who are you? If you want to write some wicked cool D and Gtk+ apps, grab the gtkD release archive at http://gtkd.org/download.html. If you want to tweak the automatic wrapper or help with it, use git... https://github.com/gtkd-developers/GtkD ## Installation The installation depends on the setup of your development environment. This means that to release your project you must include the GtkD lib on your deliverable or statically link to GtkD – please pay attention to the license. ## Compile the lib and the test programs ### Linux / Posix Using the GNU make to compile GtkD on these Operating systems, calling make with no options will build GtkD, GtkD-Sourceview and one of the demos. Optionally these options are available: Option | Meaning --- | --- all | build everything. libs | build all the static libraries. shared | build all the shared libraries. [shared-]gtkd | build gtkd. [shared-]gtkdsv | build gtkd-sourceview. [shared-]gstreamer | build gstreamer. [shared-]vte | build vte. [shared-]peas | build peas. install and uninstall options are also available for the options mentioned above. Or you can use one of the build options also available for Windows. ### OSX The build options are the same as for Linux. If on OSX GtkD is unable to find the GTK libraries. Some environment variables can be set to override the search path. GTK\_BASEPATH and HOMEBREW\_ROOT. GTK\_BASEPATH takes precedence over HOMEBREW\_ROOT. ### Windows To build on Windows you can use the build script in combination with rdmd. rdmd Build.d By default this builds gtkd, gtkdgl and gtkdsv to compile only one of these or gstreamerd you can pass the following options to the build file: Option | Meaning --- | --- gtkd | build GtkD. gtkdgl | build GtkDGL. sv | build gtkd-sourceview gstreamer | build gstreamer. all | build everything. For all the abobe packages there a two option avalable to specify aditional compiler and linker flags: - --dcflags="your compiler flags" - --ldflags="your linker flags" To specify if it should build for 64 or 32 bits, pass either the -m32 or -m64 flag to rdmd. rdmd -m64 Build.d ## Wrapped Versions GtkD wraps Gtk+ 3.22 the versions of the associated libraries are: Library | Version --- | --- Gtk+ | 3.22 Gdk | 3.22 Glib | 2.54 GObject | 2.54 Gio | 2.54 Pango | 1.40 Atk | 2.26 Gdk-pixbuf | 2.36 Cairo | 1.12.2 GtksourceView | 3.24 GStreamer | 1.12 Vte3 | 0.50 GtkD-3.7.5/demos/000077500000000000000000000000001324604450400134705ustar00rootroot00000000000000GtkD-3.7.5/demos/builder/000077500000000000000000000000001324604450400151165ustar00rootroot00000000000000GtkD-3.7.5/demos/builder/builderTest.d000066400000000000000000000026371324604450400175610ustar00rootroot00000000000000module builder.builderTest; import gio.Application: GioApplication = Application; import gtk.Application; import gtk.ApplicationWindow; import gtk.Builder; import gtk.Button; import std.stdio; import core.stdc.stdlib; /** * Usage ./gladeText /path/to/your/glade/file.glade * */ int main(string[] args) { string gladefile; if(args.length > 1) { writefln("Loading %s", args[1]); gladefile = args[1]; args = args[0..1]; } else { writeln("No glade file specified, using default \"builderTest.glade\""); gladefile = "builderTest.glade"; } auto application = new Application("org.gtkd.demo.builder.builderTest", GApplicationFlags.FLAGS_NONE); void buildAndDisplay(GioApplication a) { auto builder = new Builder(); if( ! builder.addFromFile(gladefile) ) { writeln("Oops, could not create Glade object, check your glade file ;)"); exit(1); } auto window = cast(ApplicationWindow)builder.getObject("window"); window.setApplication(application); if (window !is null) { window.setTitle("This is a glade application window"); auto button = cast(Button)builder.getObject("button"); if(button !is null) { button.addOnClicked( delegate void(Button aux){ a.quit(); } ); window.showAll(); } else { writeln("No button in the window?"); exit(1); } } else { writeln("No window?"); exit(1); } } application.addOnActivate(&buildAndDisplay); return application.run(args); } GtkD-3.7.5/demos/builder/builderTest.glade000066400000000000000000000013771324604450400204120ustar00rootroot00000000000000 200 100 True False False Hello World True True True GtkD-3.7.5/demos/builder/dub.json000066400000000000000000000003321324604450400165610ustar00rootroot00000000000000{ "name": "buildertest", "description": "A Gtk Builder demo", "targetType": "executable", "targetName": "BuilderTest", "sourceFiles": ["builderTest.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../" } } } GtkD-3.7.5/demos/cairo/000077500000000000000000000000001324604450400145655ustar00rootroot00000000000000GtkD-3.7.5/demos/cairo/cairo_clock/000077500000000000000000000000001324604450400170355ustar00rootroot00000000000000GtkD-3.7.5/demos/cairo/cairo_clock/clock.d000066400000000000000000000071361324604450400203040ustar00rootroot00000000000000/** * clock.d * * A gtkD widget that implements a clock face * * Based on the Gtkmm example by: * Jonathon Jongsma * * and the original GTK+ example by: * (c) 2005-2006, Davyd Madeley * * Authors: * Jonas Kivi (D version) * Jonathon Jongsma (C++ version) * Davyd Madeley (C version) */ module clock; import std.stdio; import std.math; import std.datetime; import glib.Timeout; import cairo.Context; import cairo.Surface; import gtk.Widget; import gtk.DrawingArea; class Clock : DrawingArea { public: this() { //Attach our expose callback, which will draw the window. addOnDraw(&drawCallback); } protected: //Override default signal handler: bool drawCallback(Scoped!Context cr, Widget widget) { if ( m_timeout is null ) { //Create a new timeout that will ask the window to be drawn once every second. m_timeout = new Timeout( 1000, &onSecondElapsed, false ); } // This is where we draw on the window GtkAllocation size; getAllocation(size); // scale to unit square and translate (0, 0) to be (0.5, 0.5), i.e. the // center of the window cr.scale(size.width, size.height); cr.translate(0.5, 0.5); cr.setLineWidth(m_lineWidth); cr.save(); cr.setSourceRgba(0.3, 0.6, 0.2, 0.9); // brownish green cr.paint(); cr.restore(); cr.arc(0, 0, m_radius, 0, 2 * PI); cr.save(); cr.setSourceRgba(0.0, 0.0, 0.0, 0.8); cr.fillPreserve(); cr.restore(); cr.save(); cr.setSourceRgba(1.0, 1.0, 1.0, 1.0); cr.setLineWidth( m_lineWidth * 1.7); cr.strokePreserve(); cr.clip(); cr.restore(); //clock ticks for (int i = 0; i < 12; i++) { double inset = 0.07; cr.save(); cr.setSourceRgba(1.0, 1.0, 1.0, 1.0); cr.setLineWidth( m_lineWidth * 0.25); cr.setLineCap(cairo_line_cap_t.ROUND); if (i % 3 != 0) { inset *= 1.2; cr.setLineWidth( m_lineWidth * 0.5 ); } cr.moveTo( (m_radius - inset) * cos (i * PI / 6), (m_radius - inset) * sin (i * PI / 6)); cr.lineTo ( m_radius * cos (i * PI / 6), m_radius * sin (i * PI / 6)); cr.stroke(); cr.restore(); // stack-pen-size } SysTime lNow = std.datetime.Clock.currTime(); // compute the angles of the indicators of our clock double minutes = lNow.minute * PI / 30; double hours = lNow.hour * PI / 6; double seconds= lNow.second * PI / 30; cr.save(); cr.setLineCap(cairo_line_cap_t.ROUND); // draw the seconds hand cr.save(); cr.setLineWidth(m_lineWidth / 3); cr.setSourceRgba(0.7, 0.7, 0.85, 0.8); // blueish gray cr.moveTo(0, 0); cr.lineTo(sin(seconds) * (m_radius * 0.8), -cos(seconds) * (m_radius * 0.8)); cr.stroke(); cr.restore(); // draw the minutes hand //cr.setSourceRgba(0.117, 0.337, 0.612, 0.9); // blue cr.setSourceRgba(0.712, 0.337, 0.117, 0.9); // red cr.moveTo(0, 0); cr.lineTo(sin(minutes + seconds / 60) * (m_radius * 0.7), -cos(minutes + seconds / 60) * (m_radius * 0.7)); cr.stroke(); // draw the hours hand cr.setSourceRgba(0.337, 0.612, 0.117, 0.9); // green cr.moveTo(0, 0); cr.lineTo(sin(hours + minutes / 12.0) * (m_radius * 0.4), -cos(hours + minutes / 12.0) * (m_radius * 0.4)); cr.stroke(); cr.restore(); // draw a little dot in the middle cr.arc(0, 0, m_lineWidth / 3.0, 0, 2 * PI); cr.fill(); return true; } bool onSecondElapsed() { //force our program to redraw the entire clock once per every second. GtkAllocation area; getAllocation(area); queueDrawArea(area.x, area.y, area.width, area.height); return true; } double m_radius = 0.40; double m_lineWidth = 0.065; Timeout m_timeout; } GtkD-3.7.5/demos/cairo/cairo_clock/dub.json000066400000000000000000000002751324604450400205060ustar00rootroot00000000000000{ "name": "cairo_clock", "description": "A Cairo demo", "targetType": "executable", "sourceFiles": ["main.d", "clock.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" } } } GtkD-3.7.5/demos/cairo/cairo_clock/main.d000066400000000000000000000016451324604450400201340ustar00rootroot00000000000000/** * main.d * * A gtkD main window that uses the clock widget from clock.d * * Based on the Gtkmm example by: * Jonathon Jongsma * * and the original GTK+ example by: * (c) 2005-2006, Davyd Madeley * * Authors: * Jonas Kivi (D version) * Jonathon Jongsma (C++ version) * Davyd Madeley (C version) */ module main; import clock; import gio.Application : GioApplication = Application; import gtk.Application; import gtk.ApplicationWindow; int main(string[] args) { Application application; void activateClock(GioApplication app) { ApplicationWindow win = new ApplicationWindow(application); win.setTitle("gtkD Cairo Clock"); win.setDefaultSize( 250, 250 ); Clock c = new Clock(); win.add(c); c.show(); win.showAll(); } application = new Application("org.gtkd.demo.cairo.clock", GApplicationFlags.FLAGS_NONE); application.addOnActivate(&activateClock); return application.run(args); } GtkD-3.7.5/demos/cairo/text_image/000077500000000000000000000000001324604450400167135ustar00rootroot00000000000000GtkD-3.7.5/demos/cairo/text_image/dub.json000066400000000000000000000002671324604450400203650ustar00rootroot00000000000000{ "name": "text_image", "description": "A Cairo demo", "targetType": "executable", "sourceFiles": ["text_image.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" } } } GtkD-3.7.5/demos/cairo/text_image/gtkD_logo.png000066400000000000000000000324221324604450400213350ustar00rootroot00000000000000PNG  IHDRPxz OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3-bKGD pHYs  tIME5 IDATxw$wu?9J vQ%$e3yg8Xc6#-[JH( v%64;{z:?vgvS'TWM{0;fcv̎1;fcv̎1;~yg3x%|~&¦'!)'@ĚN饓*Pd +)\neݪh\Q 4[҃c%bVLR|Fp"ۉhpIuXNWw9E }vh9sc01@,j7FQESGho Zy: ha9%k9]VoqK>6c]U,J@'q1)̂`f@M0$hB h(LAs%Eqj~ڟ!5fg>bPa, IX\P*c%-)S _U/]"͂`ꂮU䃠>:Ԛa.$AP#`y$n:5?Pl0LŗlrZ`ځl1s]}9sp`+iI%(Uy׬ۋ{[nY9:,SG hWlUm M~%K^K$iIA֪m JYI;wzeU,fƁ`_\yٱrgԺ([f96RX(UL*O`,W?wsz-u΂ udDqc1єS PCh lnhOdd. f7&4H'iY\Y\SU `p|ڽ/{u aƀ+k5Rf;d*7TI e|F]8E˻~ADj,밊ұN)x/&fSG!dB,܈@MppPP:&Q^(I^pְDVsf$N;-O8rG.tUM3EC{gtU,X s|Q= `Qvfkޥ |KD2@&i)8mNh”iLX9^o sHX9!m**u6Qx[kEZz<x#PVpjw\t/_"MYL.`)pg)͒r떃#>:ʱ"#r3=C;U;ZTOΔtks b At2@: z0Uֵ0-Р;E18v|MK򢳖gB=b:2qr-N`W깇 yͳ/Ɯ{0WMyipslUϏ%_D./ebԏ#0gB5љd?ǩ jE_ XA|-eg/ DSJ'<`o5HUŲY92V8-wʱ/@DQN_@?u^{ۖm}WU;"PP$>v3VFN*RMV@.c; 6ϳK-8߾@$ x Xlc82T?[3gV\1wF+Λ5noIH?t3mO938[IEL:S o"^` d`mg1q6kwCZY-"&%!9p]woK>UUtQG։ط ks#/il Z,$-' ciS?'.BcF1l#F,Ev9+""a=_" (mc`KpN/ILGc{bUu0$VH8rŹ,EA^vQh/}M B&DءPJ$HfqO8OHĐFI!W >d`96R>%YGvn.e#w0FO>)oy 6_%;V>cP3Y9˯Y= ][Uv; hC,7rYΊ8oIߺȃEeye%(I`~CHH(Ai!Sd|=O**2zu{q0O!:g)E6cnLɇR>v2P$r6Ku;@!i I$ ?Ny&bGP3=E_<+G5.Y WP;"bf uN])[߆<:HᲞVֻ7"~K+)Ra8 Cqi(ƀBOsoY}iִKk:E˻8oqs:\2f?OdW}d>~|jzȴ~vtQa C6Tq62r>糂WAQ 3ő 3kH-qe-]>EDy1Y3mJ=q jR`%r @AjYRtA $Fb@!w睔7m⬿K>ק}C$psudN+-dQO3¾ғl*=ͮG8VJEK襤jZfJ8$X"̱}> 9De;8 VZxX#IR^{7ɂ1xq *8ߤ  t h=9,ŠHr {xWg>rũ_iabc5@Ltu k&GGDټ{XUbi>LJ:0$r PVC!R/[M111pLx26F,W荗+ǘJ5pӞfaOWˢ e9RyMpn_clAR2l>{&- ݳ`_ ^$)T҃vƄB;q'xY(m8WY8DZ9R2Gب9<3/].0wSq2]OF4fX*b0&ғO2xt~-o-/cy8Bkʥ-źݬƂ$nҳdA~Ơ13xR3FJZIHzF4A KU+@ V^$Z2hуFEiJuR^Բx WI * $\*sx}ұjB}-@t)gg}Rp u: to :T$vq+7pOy&ӒTks2$V}!RWGE3q*mdDرlp+JK-ocpgY*)T,粷" 8q ,E^L9 v~rayt}2'6,f(`&u1D'=̏92d7 R#9,u-WgꌋN΄869Sz>~YG1{?"A JfOL Ԍ`DPGL81kaWH5s+|wk&v: wӅ+E q^ˀAAj??C)]rslƧ+Y-":BsPs 4 AxfDYl#H@Q2xFG SrYD- i*k7z@GbU߄@ 4A3# hQh|:,>$=,5FcZZiU|kBxzg"z}9=a) [&gsff'^JSEY+sYLcXAS.=)M`Vu4몥 YǕB\S^bZyDV46r,3a+WPqppX=uf5 s|-`΄}9'+Wqm%A4q-0e8[9|nN!(ZSV_$'X1r49 9!Ai͙C"cM_ pg 6R,fR,-:u$jU.ȾPY=6Y`*(R-y4qk$0\k,f'cͺ@OZ~BzB^hgc?6^Gn|W8{XKri&r wS֓'%$MZ:N1NLU T4i  pI]<0E+j!aesX*a^] lң_JmCuN:s:߫I@c,xMD!UWJVa(?,;爐e Z- p= fgߥ/ j %t.J&3# LH;QDcI~;-PZ@*JfiDMZ e3x=c*rަ;aZ$̞vt>og&c4%ƨOb4AeFNW%$/.]JeVJ?NoAyfj(?@v;ow9Xl0,qmW;YAD{ۦh1Bގ.X4q ;~M}4ybiԡ-xL%HoW]c]XT :TL5dfW\ 7moF08oxbo97:mm- ܌@J/q8/6҆KiW1Q9H:G%TՆQqT:}4ZoZU+Z:9[+yh/h%;_`9$U2GyiItI' $r8/D5٬GM!4)Lj'řCYp~SwLB౵ݥyC*u ~Ao_\8]3+oLӔ$i%2ZNF ;(Yx1F#\]XU r2VfH OgaI qXk|C غnk)=C!5]$_,Mf7#ahDGv8'uLL+ez1Qʋ/0##iܟ;=' +ՆNdjsj{m8Nq/a1)Z1x?#순?L?۴߸KM+;]:r[%Y3s-F‹X&JR2Y6DVn^'8{(I$"8Ӷ3EjJ0i'?l'Ţ?r B ?pE^QJGr_>k<)NS_n(Ѩ4ka 3*mo9|v eJjU,]j6&/=(1 cf1=c)v3w8! Ƌ34LW3ih]3 XﯤtwtvrN6fo;8$NMԋ|.#2u* 'H.AVf$x;YQHv,crCBc>@ANqaL^@QzH{VHqY|XcE3xRKR][\K`,p@e8jjZpQ;|B TޞkН 8IDAT'R5{)B?1e}8=BO74fd1Wua^Ҿ c)x$I"#iIA.۴Vt8WY|>(8A~5\! z"6Ѥ1-c c ]:FnXQv.±ޟjbρk! (}: :KSE멳ėzzWE/T_ǧ>7UoaXʛü'L&0U0RX}+1*?Nt0V981@2eyᇖ z-~mc@t]S!E) :v#ɨHr K^#ϬHf E}8A[t[: lrRVԭMmbUʑh`Tqd-r+G>YNKthb;%)-lҖ[j@pqPb OY DqCy}Ó©C[nY8'=m3,Rc,Gx~%&UOlqv2YuY:XPEJ NmMq].j Ff%k/R8ngY0u(6x\U5sM_/GiVɋXyg_]nsnqHl<''\ݰGZ Fe//JW?+xDH ,Ùenm[7$GcEV-r"3z96&|FX4(8񜔅""_W׾vG>Be˖S'-au&6hJ~|?uNQ&pVp ok/ǚZv%I(fprP$b-nbdFkjy- ;ٚ+1-&<7swSʛ7R('HHɵ\y+eN3w "M'& BM7$HmԲ%HHR+-m$Kij9CcvD5,c$ f7H"qB{hJD+MiQEd~]/z7 J>覝NJ]%-ec `fBL[x!k|nzX [/[Nm ;ld)7K8YxdɓoXܞy4e5&grT"NwxDx SmfJ#@آO^|zơ}-Azgsa\ɵ#?Ȍs94$UE  1QL"1%ûIqj5oGi,BѢ8qfV 3a$X e˾}]ǓZO0UoqX2oVwC'{E$)'Ѝ3f-_'Sa[Pj@FVf fa=K3$rD*d㒀:i],bir.<)rDU?.\v}+&t"LiiXy +RW< |<&ە裃Ism5dxe0 Po}!<фZ.ƫ ziPmݗ x F4GEƻ5‡Ezߑ]w$R9?}#k[Mӻ)5`t;3,?q/KYDscCBWEu$5;e2PgMu!U'BYUd;8]]7$ZnV-,Kmms)Gw:A(ﳐ 8R^]FbȑE=Ύ:t%" +#Et|sNm%4T`n\Vo– q>3^{@'t].%MrcD+'. * * glcorearb.h includes only APIs in the latest OpenGL core profile * implementation together with APIs in newer ARB extensions which can be * can be supported by the core profile. It does not, and never will * include functionality removed from the core profile, such as * fixed-function vertex and fragment processing. * * It is not possible to #include both and either of * or in the same source file. * * Feedback can be given by registering for the Khronos Bugzilla * (www.khronos.org/bugzilla) and filing issues there under product * "OpenGL", category "Registry". */ /* Function declaration macros - to move into glplatform.h */ public: extern(C): version(Windows) import std.c.windows.windows; /* *********************************************************** */ /* Base GL types */ alias uint GLenum; alias ubyte GLboolean; alias uint GLbitfield; alias byte GLbyte; alias short GLshort; alias int GLint; alias int GLsizei; alias ubyte GLubyte; alias ushort GLushort; alias uint GLuint; alias ushort GLhalf; alias float GLfloat; alias float GLclampf; alias double GLdouble; alias double GLclampd; alias void GLvoid; /* *********************************************************** */ enum // GL_VERSION_1_1 { /* AttribMask */ GL_DEPTH_BUFFER_BIT = 0x00000100, GL_STENCIL_BUFFER_BIT = 0x00000400, GL_COLOR_BUFFER_BIT = 0x00004000, /* Boolean */ GL_FALSE = 0, GL_TRUE = 1, /* BeginMode */ GL_POINTS = 0x0000, GL_LINES = 0x0001, GL_LINE_LOOP = 0x0002, GL_LINE_STRIP = 0x0003, GL_TRIANGLES = 0x0004, GL_TRIANGLE_STRIP = 0x0005, GL_TRIANGLE_FAN = 0x0006, GL_QUADS = 0x0007, /* AlphaFunction */ GL_NEVER = 0x0200, GL_LESS = 0x0201, GL_EQUAL = 0x0202, GL_LEQUAL = 0x0203, GL_GREATER = 0x0204, GL_NOTEQUAL = 0x0205, GL_GEQUAL = 0x0206, GL_ALWAYS = 0x0207, /* BlendingFactorDest */ GL_ZERO = 0, GL_ONE = 1, GL_SRC_COLOR = 0x0300, GL_ONE_MINUS_SRC_COLOR = 0x0301, GL_SRC_ALPHA = 0x0302, GL_ONE_MINUS_SRC_ALPHA = 0x0303, GL_DST_ALPHA = 0x0304, GL_ONE_MINUS_DST_ALPHA = 0x0305, /* BlendingFactorSrc */ GL_DST_COLOR = 0x0306, GL_ONE_MINUS_DST_COLOR = 0x0307, GL_SRC_ALPHA_SATURATE = 0x0308, /* DrawBufferMode */ GL_NONE = 0, GL_FRONT_LEFT = 0x0400, GL_FRONT_RIGHT = 0x0401, GL_BACK_LEFT = 0x0402, GL_BACK_RIGHT = 0x0403, GL_FRONT = 0x0404, GL_BACK = 0x0405, GL_LEFT = 0x0406, GL_RIGHT = 0x0407, GL_FRONT_AND_BACK = 0x0408, /* ErrorCode */ GL_NO_ERROR = 0, GL_INVALID_ENUM = 0x0500, GL_INVALID_VALUE = 0x0501, GL_INVALID_OPERATION = 0x0502, GL_OUT_OF_MEMORY = 0x0505, /* FrontFaceDirection */ GL_CW = 0x0900, GL_CCW = 0x0901, /* GetPName */ GL_POINT_SIZE = 0x0B11, GL_POINT_SIZE_RANGE = 0x0B12, GL_POINT_SIZE_GRANULARITY = 0x0B13, GL_LINE_SMOOTH = 0x0B20, GL_LINE_WIDTH = 0x0B21, GL_LINE_WIDTH_RANGE = 0x0B22, GL_LINE_WIDTH_GRANULARITY = 0x0B23, GL_POLYGON_MODE = 0x0B40, GL_POLYGON_SMOOTH = 0x0B41, GL_CULL_FACE = 0x0B44, GL_CULL_FACE_MODE = 0x0B45, GL_FRONT_FACE = 0x0B46, GL_DEPTH_RANGE = 0x0B70, GL_DEPTH_TEST = 0x0B71, GL_DEPTH_WRITEMASK = 0x0B72, GL_DEPTH_CLEAR_VALUE = 0x0B73, GL_DEPTH_FUNC = 0x0B74, GL_STENCIL_TEST = 0x0B90, GL_STENCIL_CLEAR_VALUE = 0x0B91, GL_STENCIL_FUNC = 0x0B92, GL_STENCIL_VALUE_MASK = 0x0B93, GL_STENCIL_FAIL = 0x0B94, GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95, GL_STENCIL_PASS_DEPTH_PASS = 0x0B96, GL_STENCIL_REF = 0x0B97, GL_STENCIL_WRITEMASK = 0x0B98, GL_VIEWPORT = 0x0BA2, GL_DITHER = 0x0BD0, GL_BLEND_DST = 0x0BE0, GL_BLEND_SRC = 0x0BE1, GL_BLEND = 0x0BE2, GL_LOGIC_OP_MODE = 0x0BF0, GL_COLOR_LOGIC_OP = 0x0BF2, GL_DRAW_BUFFER = 0x0C01, GL_READ_BUFFER = 0x0C02, GL_SCISSOR_BOX = 0x0C10, GL_SCISSOR_TEST = 0x0C11, GL_COLOR_CLEAR_VALUE = 0x0C22, GL_COLOR_WRITEMASK = 0x0C23, GL_DOUBLEBUFFER = 0x0C32, GL_STEREO = 0x0C33, GL_LINE_SMOOTH_HINT = 0x0C52, GL_POLYGON_SMOOTH_HINT = 0x0C53, GL_UNPACK_SWAP_BYTES = 0x0CF0, GL_UNPACK_LSB_FIRST = 0x0CF1, GL_UNPACK_ROW_LENGTH = 0x0CF2, GL_UNPACK_SKIP_ROWS = 0x0CF3, GL_UNPACK_SKIP_PIXELS = 0x0CF4, GL_UNPACK_ALIGNMENT = 0x0CF5, GL_PACK_SWAP_BYTES = 0x0D00, GL_PACK_LSB_FIRST = 0x0D01, GL_PACK_ROW_LENGTH = 0x0D02, GL_PACK_SKIP_ROWS = 0x0D03, GL_PACK_SKIP_PIXELS = 0x0D04, GL_PACK_ALIGNMENT = 0x0D05, GL_MAX_TEXTURE_SIZE = 0x0D33, GL_MAX_VIEWPORT_DIMS = 0x0D3A, GL_SUBPIXEL_BITS = 0x0D50, GL_TEXTURE_1D = 0x0DE0, GL_TEXTURE_2D = 0x0DE1, GL_POLYGON_OFFSET_UNITS = 0x2A00, GL_POLYGON_OFFSET_POINT = 0x2A01, GL_POLYGON_OFFSET_LINE = 0x2A02, GL_POLYGON_OFFSET_FILL = 0x8037, GL_POLYGON_OFFSET_FACTOR = 0x8038, GL_TEXTURE_BINDING_1D = 0x8068, GL_TEXTURE_BINDING_2D = 0x8069, /* GetTextureParameter */ GL_TEXTURE_WIDTH = 0x1000, GL_TEXTURE_HEIGHT = 0x1001, GL_TEXTURE_INTERNAL_FORMAT = 0x1003, GL_TEXTURE_BORDER_COLOR = 0x1004, GL_TEXTURE_RED_SIZE = 0x805C, GL_TEXTURE_GREEN_SIZE = 0x805D, GL_TEXTURE_BLUE_SIZE = 0x805E, GL_TEXTURE_ALPHA_SIZE = 0x805F, /* HintMode */ GL_DONT_CARE = 0x1100, GL_FASTEST = 0x1101, GL_NICEST = 0x1102, /* DataType */ GL_BYTE = 0x1400, GL_UNSIGNED_BYTE = 0x1401, GL_SHORT = 0x1402, GL_UNSIGNED_SHORT = 0x1403, GL_INT = 0x1404, GL_UNSIGNED_INT = 0x1405, GL_FLOAT = 0x1406, GL_DOUBLE = 0x140A, /* ErrorCode */ GL_STACK_OVERFLOW = 0x0503, GL_STACK_UNDERFLOW = 0x0504, /* LogicOp */ GL_CLEAR = 0x1500, GL_AND = 0x1501, GL_AND_REVERSE = 0x1502, GL_COPY = 0x1503, GL_AND_INVERTED = 0x1504, GL_NOOP = 0x1505, GL_XOR = 0x1506, GL_OR = 0x1507, GL_NOR = 0x1508, GL_EQUIV = 0x1509, GL_INVERT = 0x150A, GL_OR_REVERSE = 0x150B, GL_COPY_INVERTED = 0x150C, GL_OR_INVERTED = 0x150D, GL_NAND = 0x150E, GL_SET = 0x150F, /* MatrixMode (for gl3.h, FBO attachment type) */ GL_TEXTURE = 0x1702, /* PixelCopyType */ GL_COLOR = 0x1800, GL_DEPTH = 0x1801, GL_STENCIL = 0x1802, /* PixelFormat */ GL_STENCIL_INDEX = 0x1901, GL_DEPTH_COMPONENT = 0x1902, GL_RED = 0x1903, GL_GREEN = 0x1904, GL_BLUE = 0x1905, GL_ALPHA = 0x1906, GL_RGB = 0x1907, GL_RGBA = 0x1908, /* PolygonMode */ GL_POINT = 0x1B00, GL_LINE = 0x1B01, GL_FILL = 0x1B02, /* StencilOp */ GL_KEEP = 0x1E00, GL_REPLACE = 0x1E01, GL_INCR = 0x1E02, GL_DECR = 0x1E03, /* StringName */ GL_VENDOR = 0x1F00, GL_RENDERER = 0x1F01, GL_VERSION = 0x1F02, GL_EXTENSIONS = 0x1F03, /* TextureMagFilter */ GL_NEAREST = 0x2600, GL_LINEAR = 0x2601, /* TextureMinFilter */ GL_NEAREST_MIPMAP_NEAREST = 0x2700, GL_LINEAR_MIPMAP_NEAREST = 0x2701, GL_NEAREST_MIPMAP_LINEAR = 0x2702, GL_LINEAR_MIPMAP_LINEAR = 0x2703, /* TextureParameterName */ GL_TEXTURE_MAG_FILTER = 0x2800, GL_TEXTURE_MIN_FILTER = 0x2801, GL_TEXTURE_WRAP_S = 0x2802, GL_TEXTURE_WRAP_T = 0x2803, /* TextureTarget */ GL_PROXY_TEXTURE_1D = 0x8063, GL_PROXY_TEXTURE_2D = 0x8064, /* TextureWrapMode */ GL_REPEAT = 0x2901, /* PixelInternalFormat */ GL_R3_G3_B2 = 0x2A10, GL_RGB4 = 0x804F, GL_RGB5 = 0x8050, GL_RGB8 = 0x8051, GL_RGB10 = 0x8052, GL_RGB12 = 0x8053, GL_RGB16 = 0x8054, GL_RGBA2 = 0x8055, GL_RGBA4 = 0x8056, GL_RGB5_A1 = 0x8057, GL_RGBA8 = 0x8058, GL_RGB10_A2 = 0x8059, GL_RGBA12 = 0x805A, GL_RGBA16 = 0x805B, } enum // GL_VERSION_1_2 { GL_UNSIGNED_BYTE_3_3_2 = 0x8032, GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, GL_UNSIGNED_INT_8_8_8_8 = 0x8035, GL_UNSIGNED_INT_10_10_10_2 = 0x8036, GL_TEXTURE_BINDING_3D = 0x806A, GL_PACK_SKIP_IMAGES = 0x806B, GL_PACK_IMAGE_HEIGHT = 0x806C, GL_UNPACK_SKIP_IMAGES = 0x806D, GL_UNPACK_IMAGE_HEIGHT = 0x806E, GL_TEXTURE_3D = 0x806F, GL_PROXY_TEXTURE_3D = 0x8070, GL_TEXTURE_DEPTH = 0x8071, GL_TEXTURE_WRAP_R = 0x8072, GL_MAX_3D_TEXTURE_SIZE = 0x8073, GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362, GL_UNSIGNED_SHORT_5_6_5 = 0x8363, GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364, GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365, GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366, GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367, GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368, GL_BGR = 0x80E0, GL_BGRA = 0x80E1, GL_MAX_ELEMENTS_VERTICES = 0x80E8, GL_MAX_ELEMENTS_INDICES = 0x80E9, GL_CLAMP_TO_EDGE = 0x812F, GL_TEXTURE_MIN_LOD = 0x813A, GL_TEXTURE_MAX_LOD = 0x813B, GL_TEXTURE_BASE_LEVEL = 0x813C, GL_TEXTURE_MAX_LEVEL = 0x813D, GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12, GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13, GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22, GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23, GL_ALIASED_LINE_WIDTH_RANGE = 0x846E, } enum // GL_VERSION_1_3 { GL_TEXTURE0 = 0x84C0, GL_TEXTURE1 = 0x84C1, GL_TEXTURE2 = 0x84C2, GL_TEXTURE3 = 0x84C3, GL_TEXTURE4 = 0x84C4, GL_TEXTURE5 = 0x84C5, GL_TEXTURE6 = 0x84C6, GL_TEXTURE7 = 0x84C7, GL_TEXTURE8 = 0x84C8, GL_TEXTURE9 = 0x84C9, GL_TEXTURE10 = 0x84CA, GL_TEXTURE11 = 0x84CB, GL_TEXTURE12 = 0x84CC, GL_TEXTURE13 = 0x84CD, GL_TEXTURE14 = 0x84CE, GL_TEXTURE15 = 0x84CF, GL_TEXTURE16 = 0x84D0, GL_TEXTURE17 = 0x84D1, GL_TEXTURE18 = 0x84D2, GL_TEXTURE19 = 0x84D3, GL_TEXTURE20 = 0x84D4, GL_TEXTURE21 = 0x84D5, GL_TEXTURE22 = 0x84D6, GL_TEXTURE23 = 0x84D7, GL_TEXTURE24 = 0x84D8, GL_TEXTURE25 = 0x84D9, GL_TEXTURE26 = 0x84DA, GL_TEXTURE27 = 0x84DB, GL_TEXTURE28 = 0x84DC, GL_TEXTURE29 = 0x84DD, GL_TEXTURE30 = 0x84DE, GL_TEXTURE31 = 0x84DF, GL_ACTIVE_TEXTURE = 0x84E0, GL_MULTISAMPLE = 0x809D, GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E, GL_SAMPLE_ALPHA_TO_ONE = 0x809F, GL_SAMPLE_COVERAGE = 0x80A0, GL_SAMPLE_BUFFERS = 0x80A8, GL_SAMPLES = 0x80A9, GL_SAMPLE_COVERAGE_VALUE = 0x80AA, GL_SAMPLE_COVERAGE_INVERT = 0x80AB, GL_TEXTURE_CUBE_MAP = 0x8513, GL_TEXTURE_BINDING_CUBE_MAP = 0x8514, GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515, GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516, GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518, GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519, GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A, GL_PROXY_TEXTURE_CUBE_MAP = 0x851B, GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C, GL_COMPRESSED_RGB = 0x84ED, GL_COMPRESSED_RGBA = 0x84EE, GL_TEXTURE_COMPRESSION_HINT = 0x84EF, GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0, GL_TEXTURE_COMPRESSED = 0x86A1, GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2, GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3, GL_CLAMP_TO_BORDER = 0x812D, } enum // GL_VERSION_1_4 { GL_BLEND_DST_RGB = 0x80C8, GL_BLEND_SRC_RGB = 0x80C9, GL_BLEND_DST_ALPHA = 0x80CA, GL_BLEND_SRC_ALPHA = 0x80CB, GL_POINT_FADE_THRESHOLD_SIZE = 0x8128, GL_DEPTH_COMPONENT16 = 0x81A5, GL_DEPTH_COMPONENT24 = 0x81A6, GL_DEPTH_COMPONENT32 = 0x81A7, GL_MIRRORED_REPEAT = 0x8370, GL_MAX_TEXTURE_LOD_BIAS = 0x84FD, GL_TEXTURE_LOD_BIAS = 0x8501, GL_INCR_WRAP = 0x8507, GL_DECR_WRAP = 0x8508, GL_TEXTURE_DEPTH_SIZE = 0x884A, GL_TEXTURE_COMPARE_MODE = 0x884C, GL_TEXTURE_COMPARE_FUNC = 0x884D, } enum // GL_VERSION_1_5 { GL_BUFFER_SIZE = 0x8764, GL_BUFFER_USAGE = 0x8765, GL_QUERY_COUNTER_BITS = 0x8864, GL_CURRENT_QUERY = 0x8865, GL_QUERY_RESULT = 0x8866, GL_QUERY_RESULT_AVAILABLE = 0x8867, GL_ARRAY_BUFFER = 0x8892, GL_ELEMENT_ARRAY_BUFFER = 0x8893, GL_ARRAY_BUFFER_BINDING = 0x8894, GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F, GL_READ_ONLY = 0x88B8, GL_WRITE_ONLY = 0x88B9, GL_READ_WRITE = 0x88BA, GL_BUFFER_ACCESS = 0x88BB, GL_BUFFER_MAPPED = 0x88BC, GL_BUFFER_MAP_POINTER = 0x88BD, GL_STREAM_DRAW = 0x88E0, GL_STREAM_READ = 0x88E1, GL_STREAM_COPY = 0x88E2, GL_STATIC_DRAW = 0x88E4, GL_STATIC_READ = 0x88E5, GL_STATIC_COPY = 0x88E6, GL_DYNAMIC_DRAW = 0x88E8, GL_DYNAMIC_READ = 0x88E9, GL_DYNAMIC_COPY = 0x88EA, GL_SAMPLES_PASSED = 0x8914, GL_SRC1_ALPHA = 0x8589, } enum // GL_VERSION_2_0 { GL_BLEND_EQUATION_RGB = 0x8009, GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622, GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623, GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624, GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625, GL_CURRENT_VERTEX_ATTRIB = 0x8626, GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642, GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645, GL_STENCIL_BACK_FUNC = 0x8800, GL_STENCIL_BACK_FAIL = 0x8801, GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802, GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803, GL_MAX_DRAW_BUFFERS = 0x8824, GL_DRAW_BUFFER0 = 0x8825, GL_DRAW_BUFFER1 = 0x8826, GL_DRAW_BUFFER2 = 0x8827, GL_DRAW_BUFFER3 = 0x8828, GL_DRAW_BUFFER4 = 0x8829, GL_DRAW_BUFFER5 = 0x882A, GL_DRAW_BUFFER6 = 0x882B, GL_DRAW_BUFFER7 = 0x882C, GL_DRAW_BUFFER8 = 0x882D, GL_DRAW_BUFFER9 = 0x882E, GL_DRAW_BUFFER10 = 0x882F, GL_DRAW_BUFFER11 = 0x8830, GL_DRAW_BUFFER12 = 0x8831, GL_DRAW_BUFFER13 = 0x8832, GL_DRAW_BUFFER14 = 0x8833, GL_DRAW_BUFFER15 = 0x8834, GL_BLEND_EQUATION_ALPHA = 0x883D, GL_MAX_VERTEX_ATTRIBS = 0x8869, GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A, GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872, GL_FRAGMENT_SHADER = 0x8B30, GL_VERTEX_SHADER = 0x8B31, GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49, GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A, GL_MAX_VARYING_FLOATS = 0x8B4B, GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C, GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D, GL_SHADER_TYPE = 0x8B4F, GL_FLOAT_VEC2 = 0x8B50, GL_FLOAT_VEC3 = 0x8B51, GL_FLOAT_VEC4 = 0x8B52, GL_INT_VEC2 = 0x8B53, GL_INT_VEC3 = 0x8B54, GL_INT_VEC4 = 0x8B55, GL_BOOL = 0x8B56, GL_BOOL_VEC2 = 0x8B57, GL_BOOL_VEC3 = 0x8B58, GL_BOOL_VEC4 = 0x8B59, GL_FLOAT_MAT2 = 0x8B5A, GL_FLOAT_MAT3 = 0x8B5B, GL_FLOAT_MAT4 = 0x8B5C, GL_SAMPLER_1D = 0x8B5D, GL_SAMPLER_2D = 0x8B5E, GL_SAMPLER_3D = 0x8B5F, GL_SAMPLER_CUBE = 0x8B60, GL_SAMPLER_1D_SHADOW = 0x8B61, GL_SAMPLER_2D_SHADOW = 0x8B62, GL_DELETE_STATUS = 0x8B80, GL_COMPILE_STATUS = 0x8B81, GL_LINK_STATUS = 0x8B82, GL_VALIDATE_STATUS = 0x8B83, GL_INFO_LOG_LENGTH = 0x8B84, GL_ATTACHED_SHADERS = 0x8B85, GL_ACTIVE_UNIFORMS = 0x8B86, GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87, GL_SHADER_SOURCE_LENGTH = 0x8B88, GL_ACTIVE_ATTRIBUTES = 0x8B89, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A, GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B, GL_SHADING_LANGUAGE_VERSION = 0x8B8C, GL_CURRENT_PROGRAM = 0x8B8D, GL_POINT_SPRITE_COORD_ORIGIN = 0x8CA0, GL_LOWER_LEFT = 0x8CA1, GL_UPPER_LEFT = 0x8CA2, GL_STENCIL_BACK_REF = 0x8CA3, GL_STENCIL_BACK_VALUE_MASK = 0x8CA4, GL_STENCIL_BACK_WRITEMASK = 0x8CA5, } enum // GL_VERSION_2_1 { GL_PIXEL_PACK_BUFFER = 0x88EB, GL_PIXEL_UNPACK_BUFFER = 0x88EC, GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED, GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF, GL_FLOAT_MAT2x3 = 0x8B65, GL_FLOAT_MAT2x4 = 0x8B66, GL_FLOAT_MAT3x2 = 0x8B67, GL_FLOAT_MAT3x4 = 0x8B68, GL_FLOAT_MAT4x2 = 0x8B69, GL_FLOAT_MAT4x3 = 0x8B6A, GL_SRGB = 0x8C40, GL_SRGB8 = 0x8C41, GL_SRGB_ALPHA = 0x8C42, GL_SRGB8_ALPHA8 = 0x8C43, GL_COMPRESSED_SRGB = 0x8C48, GL_COMPRESSED_SRGB_ALPHA = 0x8C49, } enum // GL_VERSION_3_0 { GL_COMPARE_REF_TO_TEXTURE = 0x884E, GL_CLIP_DISTANCE0 = 0x3000, GL_CLIP_DISTANCE1 = 0x3001, GL_CLIP_DISTANCE2 = 0x3002, GL_CLIP_DISTANCE3 = 0x3003, GL_CLIP_DISTANCE4 = 0x3004, GL_CLIP_DISTANCE5 = 0x3005, GL_CLIP_DISTANCE6 = 0x3006, GL_CLIP_DISTANCE7 = 0x3007, GL_MAX_CLIP_DISTANCES = 0x0D32, GL_MAJOR_VERSION = 0x821B, GL_MINOR_VERSION = 0x821C, GL_NUM_EXTENSIONS = 0x821D, GL_CONTEXT_FLAGS = 0x821E, GL_COMPRESSED_RED = 0x8225, GL_COMPRESSED_RG = 0x8226, GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x0001, GL_RGBA32F = 0x8814, GL_RGB32F = 0x8815, GL_RGBA16F = 0x881A, GL_RGB16F = 0x881B, GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD, GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF, GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904, GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905, GL_CLAMP_READ_COLOR = 0x891C, GL_FIXED_ONLY = 0x891D, GL_MAX_VARYING_COMPONENTS = 0x8B4B, GL_TEXTURE_1D_ARRAY = 0x8C18, GL_PROXY_TEXTURE_1D_ARRAY = 0x8C19, GL_TEXTURE_2D_ARRAY = 0x8C1A, GL_PROXY_TEXTURE_2D_ARRAY = 0x8C1B, GL_TEXTURE_BINDING_1D_ARRAY = 0x8C1C, GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D, GL_R11F_G11F_B10F = 0x8C3A, GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B, GL_RGB9_E5 = 0x8C3D, GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E, GL_TEXTURE_SHARED_SIZE = 0x8C3F, GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76, GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F, GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80, GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83, GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84, GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85, GL_PRIMITIVES_GENERATED = 0x8C87, GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88, GL_RASTERIZER_DISCARD = 0x8C89, GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A, GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B, GL_INTERLEAVED_ATTRIBS = 0x8C8C, GL_SEPARATE_ATTRIBS = 0x8C8D, GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E, GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F, GL_RGBA32UI = 0x8D70, GL_RGB32UI = 0x8D71, GL_RGBA16UI = 0x8D76, GL_RGB16UI = 0x8D77, GL_RGBA8UI = 0x8D7C, GL_RGB8UI = 0x8D7D, GL_RGBA32I = 0x8D82, GL_RGB32I = 0x8D83, GL_RGBA16I = 0x8D88, GL_RGB16I = 0x8D89, GL_RGBA8I = 0x8D8E, GL_RGB8I = 0x8D8F, GL_RED_INTEGER = 0x8D94, GL_GREEN_INTEGER = 0x8D95, GL_BLUE_INTEGER = 0x8D96, GL_RGB_INTEGER = 0x8D98, GL_RGBA_INTEGER = 0x8D99, GL_BGR_INTEGER = 0x8D9A, GL_BGRA_INTEGER = 0x8D9B, GL_SAMPLER_1D_ARRAY = 0x8DC0, GL_SAMPLER_2D_ARRAY = 0x8DC1, GL_SAMPLER_1D_ARRAY_SHADOW = 0x8DC3, GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4, GL_SAMPLER_CUBE_SHADOW = 0x8DC5, GL_UNSIGNED_INT_VEC2 = 0x8DC6, GL_UNSIGNED_INT_VEC3 = 0x8DC7, GL_UNSIGNED_INT_VEC4 = 0x8DC8, GL_INT_SAMPLER_1D = 0x8DC9, GL_INT_SAMPLER_2D = 0x8DCA, GL_INT_SAMPLER_3D = 0x8DCB, GL_INT_SAMPLER_CUBE = 0x8DCC, GL_INT_SAMPLER_1D_ARRAY = 0x8DCE, GL_INT_SAMPLER_2D_ARRAY = 0x8DCF, GL_UNSIGNED_INT_SAMPLER_1D = 0x8DD1, GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2, GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3, GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4, GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6, GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7, GL_QUERY_WAIT = 0x8E13, GL_QUERY_NO_WAIT = 0x8E14, GL_QUERY_BY_REGION_WAIT = 0x8E15, GL_QUERY_BY_REGION_NO_WAIT = 0x8E16, GL_BUFFER_ACCESS_FLAGS = 0x911F, GL_BUFFER_MAP_LENGTH = 0x9120, GL_BUFFER_MAP_OFFSET = 0x9121, /* Reuse tokens from ARB_depth_buffer_float */ /* reuse GL_DEPTH_COMPONENT32F */ /* reuse GL_DEPTH32F_STENCIL8 */ /* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */ /* Reuse tokens from ARB_framebuffer_object */ /* reuse GL_INVALID_FRAMEBUFFER_OPERATION */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */ /* reuse GL_FRAMEBUFFER_DEFAULT */ /* reuse GL_FRAMEBUFFER_UNDEFINED */ /* reuse GL_DEPTH_STENCIL_ATTACHMENT */ /* reuse GL_INDEX */ /* reuse GL_MAX_RENDERBUFFER_SIZE */ /* reuse GL_DEPTH_STENCIL */ /* reuse GL_UNSIGNED_INT_24_8 */ /* reuse GL_DEPTH24_STENCIL8 */ /* reuse GL_TEXTURE_STENCIL_SIZE */ /* reuse GL_TEXTURE_RED_TYPE */ /* reuse GL_TEXTURE_GREEN_TYPE */ /* reuse GL_TEXTURE_BLUE_TYPE */ /* reuse GL_TEXTURE_ALPHA_TYPE */ /* reuse GL_TEXTURE_DEPTH_TYPE */ /* reuse GL_UNSIGNED_NORMALIZED */ /* reuse GL_FRAMEBUFFER_BINDING */ /* reuse GL_DRAW_FRAMEBUFFER_BINDING */ /* reuse GL_RENDERBUFFER_BINDING */ /* reuse GL_READ_FRAMEBUFFER */ /* reuse GL_DRAW_FRAMEBUFFER */ /* reuse GL_READ_FRAMEBUFFER_BINDING */ /* reuse GL_RENDERBUFFER_SAMPLES */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ /* reuse GL_FRAMEBUFFER_COMPLETE */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */ /* reuse GL_FRAMEBUFFER_UNSUPPORTED */ /* reuse GL_MAX_COLOR_ATTACHMENTS */ /* reuse GL_COLOR_ATTACHMENT0 */ /* reuse GL_COLOR_ATTACHMENT1 */ /* reuse GL_COLOR_ATTACHMENT2 */ /* reuse GL_COLOR_ATTACHMENT3 */ /* reuse GL_COLOR_ATTACHMENT4 */ /* reuse GL_COLOR_ATTACHMENT5 */ /* reuse GL_COLOR_ATTACHMENT6 */ /* reuse GL_COLOR_ATTACHMENT7 */ /* reuse GL_COLOR_ATTACHMENT8 */ /* reuse GL_COLOR_ATTACHMENT9 */ /* reuse GL_COLOR_ATTACHMENT10 */ /* reuse GL_COLOR_ATTACHMENT11 */ /* reuse GL_COLOR_ATTACHMENT12 */ /* reuse GL_COLOR_ATTACHMENT13 */ /* reuse GL_COLOR_ATTACHMENT14 */ /* reuse GL_COLOR_ATTACHMENT15 */ /* reuse GL_DEPTH_ATTACHMENT */ /* reuse GL_STENCIL_ATTACHMENT */ /* reuse GL_FRAMEBUFFER */ /* reuse GL_RENDERBUFFER */ /* reuse GL_RENDERBUFFER_WIDTH */ /* reuse GL_RENDERBUFFER_HEIGHT */ /* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */ /* reuse GL_STENCIL_INDEX1 */ /* reuse GL_STENCIL_INDEX4 */ /* reuse GL_STENCIL_INDEX8 */ /* reuse GL_STENCIL_INDEX16 */ /* reuse GL_RENDERBUFFER_RED_SIZE */ /* reuse GL_RENDERBUFFER_GREEN_SIZE */ /* reuse GL_RENDERBUFFER_BLUE_SIZE */ /* reuse GL_RENDERBUFFER_ALPHA_SIZE */ /* reuse GL_RENDERBUFFER_DEPTH_SIZE */ /* reuse GL_RENDERBUFFER_STENCIL_SIZE */ /* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */ /* reuse GL_MAX_SAMPLES */ /* Reuse tokens from ARB_framebuffer_sRGB */ /* reuse GL_FRAMEBUFFER_SRGB */ /* Reuse tokens from ARB_half_float_vertex */ /* reuse GL_HALF_FLOAT */ /* Reuse tokens from ARB_map_buffer_range */ /* reuse GL_MAP_READ_BIT */ /* reuse GL_MAP_WRITE_BIT */ /* reuse GL_MAP_INVALIDATE_RANGE_BIT */ /* reuse GL_MAP_INVALIDATE_BUFFER_BIT */ /* reuse GL_MAP_FLUSH_EXPLICIT_BIT */ /* reuse GL_MAP_UNSYNCHRONIZED_BIT */ /* Reuse tokens from ARB_texture_compression_rgtc */ /* reuse GL_COMPRESSED_RED_RGTC1 */ /* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */ /* reuse GL_COMPRESSED_RG_RGTC2 */ /* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */ /* Reuse tokens from ARB_texture_rg */ /* reuse GL_RG */ /* reuse GL_RG_INTEGER */ /* reuse GL_R8 */ /* reuse GL_R16 */ /* reuse GL_RG8 */ /* reuse GL_RG16 */ /* reuse GL_R16F */ /* reuse GL_R32F */ /* reuse GL_RG16F */ /* reuse GL_RG32F */ /* reuse GL_R8I */ /* reuse GL_R8UI */ /* reuse GL_R16I */ /* reuse GL_R16UI */ /* reuse GL_R32I */ /* reuse GL_R32UI */ /* reuse GL_RG8I */ /* reuse GL_RG8UI */ /* reuse GL_RG16I */ /* reuse GL_RG16UI */ /* reuse GL_RG32I */ /* reuse GL_RG32UI */ /* Reuse tokens from ARB_vertex_array_object */ /* reuse GL_VERTEX_ARRAY_BINDING */ } enum // GL_VERSION_3_1 { GL_SAMPLER_2D_RECT = 0x8B63, GL_SAMPLER_2D_RECT_SHADOW = 0x8B64, GL_SAMPLER_BUFFER = 0x8DC2, GL_INT_SAMPLER_2D_RECT = 0x8DCD, GL_INT_SAMPLER_BUFFER = 0x8DD0, GL_UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5, GL_UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8, GL_TEXTURE_BUFFER = 0x8C2A, GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B, GL_TEXTURE_BINDING_BUFFER = 0x8C2C, GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D, GL_TEXTURE_RECTANGLE = 0x84F5, GL_TEXTURE_BINDING_RECTANGLE = 0x84F6, GL_PROXY_TEXTURE_RECTANGLE = 0x84F7, GL_MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8, GL_RED_SNORM = 0x8F90, GL_RG_SNORM = 0x8F91, GL_RGB_SNORM = 0x8F92, GL_RGBA_SNORM = 0x8F93, GL_R8_SNORM = 0x8F94, GL_RG8_SNORM = 0x8F95, GL_RGB8_SNORM = 0x8F96, GL_RGBA8_SNORM = 0x8F97, GL_R16_SNORM = 0x8F98, GL_RG16_SNORM = 0x8F99, GL_RGB16_SNORM = 0x8F9A, GL_RGBA16_SNORM = 0x8F9B, GL_SIGNED_NORMALIZED = 0x8F9C, GL_PRIMITIVE_RESTART = 0x8F9D, GL_PRIMITIVE_RESTART_INDEX = 0x8F9E, /* Reuse tokens from ARB_copy_buffer */ /* reuse GL_COPY_READ_BUFFER */ /* reuse GL_COPY_WRITE_BUFFER */ /* Reuse tokens from ARB_draw_instanced (none) */ /* Reuse tokens from ARB_uniform_buffer_object */ /* reuse GL_UNIFORM_BUFFER */ /* reuse GL_UNIFORM_BUFFER_BINDING */ /* reuse GL_UNIFORM_BUFFER_START */ /* reuse GL_UNIFORM_BUFFER_SIZE */ /* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */ /* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */ /* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */ /* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */ /* reuse GL_MAX_UNIFORM_BLOCK_SIZE */ /* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */ /* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */ /* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */ /* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */ /* reuse GL_ACTIVE_UNIFORM_BLOCKS */ /* reuse GL_UNIFORM_TYPE */ /* reuse GL_UNIFORM_SIZE */ /* reuse GL_UNIFORM_NAME_LENGTH */ /* reuse GL_UNIFORM_BLOCK_INDEX */ /* reuse GL_UNIFORM_OFFSET */ /* reuse GL_UNIFORM_ARRAY_STRIDE */ /* reuse GL_UNIFORM_MATRIX_STRIDE */ /* reuse GL_UNIFORM_IS_ROW_MAJOR */ /* reuse GL_UNIFORM_BLOCK_BINDING */ /* reuse GL_UNIFORM_BLOCK_DATA_SIZE */ /* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */ /* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */ /* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */ /* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */ /* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */ /* reuse GL_INVALID_INDEX */ } enum // GL_VERSION_3_2 { GL_CONTEXT_CORE_PROFILE_BIT = 0x00000001, GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002, GL_LINES_ADJACENCY = 0x000A, GL_LINE_STRIP_ADJACENCY = 0x000B, GL_TRIANGLES_ADJACENCY = 0x000C, GL_TRIANGLE_STRIP_ADJACENCY = 0x000D, GL_PROGRAM_POINT_SIZE = 0x8642, GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29, GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7, GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8, GL_GEOMETRY_SHADER = 0x8DD9, GL_GEOMETRY_VERTICES_OUT = 0x8916, GL_GEOMETRY_INPUT_TYPE = 0x8917, GL_GEOMETRY_OUTPUT_TYPE = 0x8918, GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF, GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0, GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1, GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122, GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123, GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124, GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125, GL_CONTEXT_PROFILE_MASK = 0x9126, /* reuse GL_MAX_VARYING_COMPONENTS */ /* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */ /* Reuse tokens from ARB_depth_clamp */ /* reuse GL_DEPTH_CLAMP */ /* Reuse tokens from ARB_draw_elements_base_vertex (none) */ /* Reuse tokens from ARB_fragment_coord_conventions (none) */ /* Reuse tokens from ARB_provoking_vertex */ /* reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */ /* reuse GL_FIRST_VERTEX_CONVENTION */ /* reuse GL_LAST_VERTEX_CONVENTION */ /* reuse GL_PROVOKING_VERTEX */ /* Reuse tokens from ARB_seamless_cube_map */ /* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */ /* Reuse tokens from ARB_sync */ /* reuse GL_MAX_SERVER_WAIT_TIMEOUT */ /* reuse GL_OBJECT_TYPE */ /* reuse GL_SYNC_CONDITION */ /* reuse GL_SYNC_STATUS */ /* reuse GL_SYNC_FLAGS */ /* reuse GL_SYNC_FENCE */ /* reuse GL_SYNC_GPU_COMMANDS_COMPLETE */ /* reuse GL_UNSIGNALED */ /* reuse GL_SIGNALED */ /* reuse GL_ALREADY_SIGNALED */ /* reuse GL_TIMEOUT_EXPIRED */ /* reuse GL_CONDITION_SATISFIED */ /* reuse GL_WAIT_FAILED */ /* reuse GL_TIMEOUT_IGNORED */ /* reuse GL_SYNC_FLUSH_COMMANDS_BIT */ /* reuse GL_TIMEOUT_IGNORED */ /* Reuse tokens from ARB_texture_multisample */ /* reuse GL_SAMPLE_POSITION */ /* reuse GL_SAMPLE_MASK */ /* reuse GL_SAMPLE_MASK_VALUE */ /* reuse GL_MAX_SAMPLE_MASK_WORDS */ /* reuse GL_TEXTURE_2D_MULTISAMPLE */ /* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE */ /* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */ /* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY */ /* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE */ /* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY */ /* reuse GL_TEXTURE_SAMPLES */ /* reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS */ /* reuse GL_SAMPLER_2D_MULTISAMPLE */ /* reuse GL_INT_SAMPLER_2D_MULTISAMPLE */ /* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE */ /* reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY */ /* reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ /* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */ /* reuse GL_MAX_COLOR_TEXTURE_SAMPLES */ /* reuse GL_MAX_DEPTH_TEXTURE_SAMPLES */ /* reuse GL_MAX_INTEGER_SAMPLES */ /* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */ } enum // GL_VERSION_3_3 { GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE, /* Reuse tokens from ARB_blend_func_extended */ /* reuse GL_SRC1_COLOR */ /* reuse GL_ONE_MINUS_SRC1_COLOR */ /* reuse GL_ONE_MINUS_SRC1_ALPHA */ /* reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS */ /* Reuse tokens from ARB_explicit_attrib_location (none) */ /* Reuse tokens from ARB_occlusion_query2 */ /* reuse GL_ANY_SAMPLES_PASSED */ /* Reuse tokens from ARB_sampler_objects */ /* reuse GL_SAMPLER_BINDING */ /* Reuse tokens from ARB_shader_bit_encoding (none) */ /* Reuse tokens from ARB_texture_rgb10_a2ui */ /* reuse GL_RGB10_A2UI */ /* Reuse tokens from ARB_texture_swizzle */ /* reuse GL_TEXTURE_SWIZZLE_R */ /* reuse GL_TEXTURE_SWIZZLE_G */ /* reuse GL_TEXTURE_SWIZZLE_B */ /* reuse GL_TEXTURE_SWIZZLE_A */ /* reuse GL_TEXTURE_SWIZZLE_RGBA */ /* Reuse tokens from ARB_timer_query */ /* reuse GL_TIME_ELAPSED */ /* reuse GL_TIMESTAMP */ /* Reuse tokens from ARB_vertex_type_2_10_10_10_rev */ /* reuse GL_INT_2_10_10_10_REV */ } enum // GL_VERSION_4_0 { GL_SAMPLE_SHADING = 0x8C36, GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37, GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5E, GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET = 0x8E5F, GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009, GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A, GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B, GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C, GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D, GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E, GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F, /* Reuse tokens from ARB_texture_query_lod (none) */ /* Reuse tokens from ARB_draw_buffers_blend (none) */ /* Reuse tokens from ARB_draw_indirect */ /* reuse GL_DRAW_INDIRECT_BUFFER */ /* reuse GL_DRAW_INDIRECT_BUFFER_BINDING */ /* Reuse tokens from ARB_gpu_shader5 */ /* reuse GL_GEOMETRY_SHADER_INVOCATIONS */ /* reuse GL_MAX_GEOMETRY_SHADER_INVOCATIONS */ /* reuse GL_MIN_FRAGMENT_INTERPOLATION_OFFSET */ /* reuse GL_MAX_FRAGMENT_INTERPOLATION_OFFSET */ /* reuse GL_FRAGMENT_INTERPOLATION_OFFSET_BITS */ /* reuse GL_MAX_VERTEX_STREAMS */ /* Reuse tokens from ARB_gpu_shader_fp64 */ /* reuse GL_DOUBLE_VEC2 */ /* reuse GL_DOUBLE_VEC3 */ /* reuse GL_DOUBLE_VEC4 */ /* reuse GL_DOUBLE_MAT2 */ /* reuse GL_DOUBLE_MAT3 */ /* reuse GL_DOUBLE_MAT4 */ /* reuse GL_DOUBLE_MAT2x3 */ /* reuse GL_DOUBLE_MAT2x4 */ /* reuse GL_DOUBLE_MAT3x2 */ /* reuse GL_DOUBLE_MAT3x4 */ /* reuse GL_DOUBLE_MAT4x2 */ /* reuse GL_DOUBLE_MAT4x3 */ /* Reuse tokens from ARB_shader_subroutine */ /* reuse GL_ACTIVE_SUBROUTINES */ /* reuse GL_ACTIVE_SUBROUTINE_UNIFORMS */ /* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS */ /* reuse GL_ACTIVE_SUBROUTINE_MAX_LENGTH */ /* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH */ /* reuse GL_MAX_SUBROUTINES */ /* reuse GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS */ /* reuse GL_NUM_COMPATIBLE_SUBROUTINES */ /* reuse GL_COMPATIBLE_SUBROUTINES */ /* Reuse tokens from ARB_tessellation_shader */ /* reuse GL_PATCHES */ /* reuse GL_PATCH_VERTICES */ /* reuse GL_PATCH_DEFAULT_INNER_LEVEL */ /* reuse GL_PATCH_DEFAULT_OUTER_LEVEL */ /* reuse GL_TESS_CONTROL_OUTPUT_VERTICES */ /* reuse GL_TESS_GEN_MODE */ /* reuse GL_TESS_GEN_SPACING */ /* reuse GL_TESS_GEN_VERTEX_ORDER */ /* reuse GL_TESS_GEN_POINT_MODE */ /* reuse GL_ISOLINES */ /* reuse GL_FRACTIONAL_ODD */ /* reuse GL_FRACTIONAL_EVEN */ /* reuse GL_MAX_PATCH_VERTICES */ /* reuse GL_MAX_TESS_GEN_LEVEL */ /* reuse GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS */ /* reuse GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS */ /* reuse GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS */ /* reuse GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS */ /* reuse GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS */ /* reuse GL_MAX_TESS_PATCH_COMPONENTS */ /* reuse GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS */ /* reuse GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS */ /* reuse GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS */ /* reuse GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS */ /* reuse GL_MAX_TESS_CONTROL_INPUT_COMPONENTS */ /* reuse GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS */ /* reuse GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS */ /* reuse GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS */ /* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER */ /* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER */ /* reuse GL_TESS_EVALUATION_SHADER */ /* reuse GL_TESS_CONTROL_SHADER */ /* Reuse tokens from ARB_texture_buffer_object_rgb32 (none) */ /* Reuse tokens from ARB_transform_feedback2 */ /* reuse GL_TRANSFORM_FEEDBACK */ /* reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */ /* reuse GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */ /* reuse GL_TRANSFORM_FEEDBACK_BINDING */ /* Reuse tokens from ARB_transform_feedback3 */ /* reuse GL_MAX_TRANSFORM_FEEDBACK_BUFFERS */ /* reuse GL_MAX_VERTEX_STREAMS */ } version(none) enum // GL_VERSION_4_1 { /* Reuse tokens from ARB_ES2_compatibility */ /* reuse GL_FIXED */ /* reuse GL_IMPLEMENTATION_COLOR_READ_TYPE */ /* reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT */ /* reuse GL_LOW_FLOAT */ /* reuse GL_MEDIUM_FLOAT */ /* reuse GL_HIGH_FLOAT */ /* reuse GL_LOW_INT */ /* reuse GL_MEDIUM_INT */ /* reuse GL_HIGH_INT */ /* reuse GL_SHADER_COMPILER */ /* reuse GL_SHADER_BINARY_FORMATS */ /* reuse GL_NUM_SHADER_BINARY_FORMATS */ /* reuse GL_MAX_VERTEX_UNIFORM_VECTORS */ /* reuse GL_MAX_VARYING_VECTORS */ /* reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS */ /* reuse GL_RGB565 */ /* Reuse tokens from ARB_get_program_binary */ /* reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT */ /* reuse GL_PROGRAM_BINARY_LENGTH */ /* reuse GL_NUM_PROGRAM_BINARY_FORMATS */ /* reuse GL_PROGRAM_BINARY_FORMATS */ /* Reuse tokens from ARB_separate_shader_objects */ /* reuse GL_VERTEX_SHADER_BIT */ /* reuse GL_FRAGMENT_SHADER_BIT */ /* reuse GL_GEOMETRY_SHADER_BIT */ /* reuse GL_TESS_CONTROL_SHADER_BIT */ /* reuse GL_TESS_EVALUATION_SHADER_BIT */ /* reuse GL_ALL_SHADER_BITS */ /* reuse GL_PROGRAM_SEPARABLE */ /* reuse GL_ACTIVE_PROGRAM */ /* reuse GL_PROGRAM_PIPELINE_BINDING */ /* Reuse tokens from ARB_shader_precision (none) */ /* Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already */ /* Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already */ /* reuse GL_MAX_VIEWPORTS */ /* reuse GL_VIEWPORT_SUBPIXEL_BITS */ /* reuse GL_VIEWPORT_BOUNDS_RANGE */ /* reuse GL_LAYER_PROVOKING_VERTEX */ /* reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX */ /* reuse GL_UNDEFINED_VERTEX */ } version(none) enum // GL_VERSION_4_2 { /* Reuse tokens from ARB_base_instance (none) */ /* Reuse tokens from ARB_shading_language_420pack (none) */ /* Reuse tokens from ARB_transform_feedback_instanced (none) */ /* Reuse tokens from ARB_compressed_texture_pixel_storage */ /* reuse GL_UNPACK_COMPRESSED_BLOCK_WIDTH */ /* reuse GL_UNPACK_COMPRESSED_BLOCK_HEIGHT */ /* reuse GL_UNPACK_COMPRESSED_BLOCK_DEPTH */ /* reuse GL_UNPACK_COMPRESSED_BLOCK_SIZE */ /* reuse GL_PACK_COMPRESSED_BLOCK_WIDTH */ /* reuse GL_PACK_COMPRESSED_BLOCK_HEIGHT */ /* reuse GL_PACK_COMPRESSED_BLOCK_DEPTH */ /* reuse GL_PACK_COMPRESSED_BLOCK_SIZE */ /* Reuse tokens from ARB_conservative_depth (none) */ /* Reuse tokens from ARB_internalformat_query */ /* reuse GL_NUM_SAMPLE_COUNTS */ /* Reuse tokens from ARB_map_buffer_alignment */ /* reuse GL_MIN_MAP_BUFFER_ALIGNMENT */ /* Reuse tokens from ARB_shader_atomic_counters */ /* reuse GL_ATOMIC_COUNTER_BUFFER */ /* reuse GL_ATOMIC_COUNTER_BUFFER_BINDING */ /* reuse GL_ATOMIC_COUNTER_BUFFER_START */ /* reuse GL_ATOMIC_COUNTER_BUFFER_SIZE */ /* reuse GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE */ /* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS */ /* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES */ /* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER */ /* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER */ /* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER */ /* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER */ /* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER */ /* reuse GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS */ /* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS */ /* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS */ /* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS */ /* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS */ /* reuse GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS */ /* reuse GL_MAX_VERTEX_ATOMIC_COUNTERS */ /* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS */ /* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS */ /* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTERS */ /* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTERS */ /* reuse GL_MAX_COMBINED_ATOMIC_COUNTERS */ /* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE */ /* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS */ /* reuse GL_ACTIVE_ATOMIC_COUNTER_BUFFERS */ /* reuse GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX */ /* reuse GL_UNSIGNED_INT_ATOMIC_COUNTER */ /* Reuse tokens from ARB_shader_image_load_store */ /* reuse GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT */ /* reuse GL_ELEMENT_ARRAY_BARRIER_BIT */ /* reuse GL_UNIFORM_BARRIER_BIT */ /* reuse GL_TEXTURE_FETCH_BARRIER_BIT */ /* reuse GL_SHADER_IMAGE_ACCESS_BARRIER_BIT */ /* reuse GL_COMMAND_BARRIER_BIT */ /* reuse GL_PIXEL_BUFFER_BARRIER_BIT */ /* reuse GL_TEXTURE_UPDATE_BARRIER_BIT */ /* reuse GL_BUFFER_UPDATE_BARRIER_BIT */ /* reuse GL_FRAMEBUFFER_BARRIER_BIT */ /* reuse GL_TRANSFORM_FEEDBACK_BARRIER_BIT */ /* reuse GL_ATOMIC_COUNTER_BARRIER_BIT */ /* reuse GL_ALL_BARRIER_BITS */ /* reuse GL_MAX_IMAGE_UNITS */ /* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */ /* reuse GL_IMAGE_BINDING_NAME */ /* reuse GL_IMAGE_BINDING_LEVEL */ /* reuse GL_IMAGE_BINDING_LAYERED */ /* reuse GL_IMAGE_BINDING_LAYER */ /* reuse GL_IMAGE_BINDING_ACCESS */ /* reuse GL_IMAGE_1D */ /* reuse GL_IMAGE_2D */ /* reuse GL_IMAGE_3D */ /* reuse GL_IMAGE_2D_RECT */ /* reuse GL_IMAGE_CUBE */ /* reuse GL_IMAGE_BUFFER */ /* reuse GL_IMAGE_1D_ARRAY */ /* reuse GL_IMAGE_2D_ARRAY */ /* reuse GL_IMAGE_CUBE_MAP_ARRAY */ /* reuse GL_IMAGE_2D_MULTISAMPLE */ /* reuse GL_IMAGE_2D_MULTISAMPLE_ARRAY */ /* reuse GL_INT_IMAGE_1D */ /* reuse GL_INT_IMAGE_2D */ /* reuse GL_INT_IMAGE_3D */ /* reuse GL_INT_IMAGE_2D_RECT */ /* reuse GL_INT_IMAGE_CUBE */ /* reuse GL_INT_IMAGE_BUFFER */ /* reuse GL_INT_IMAGE_1D_ARRAY */ /* reuse GL_INT_IMAGE_2D_ARRAY */ /* reuse GL_INT_IMAGE_CUBE_MAP_ARRAY */ /* reuse GL_INT_IMAGE_2D_MULTISAMPLE */ /* reuse GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ /* reuse GL_UNSIGNED_INT_IMAGE_1D */ /* reuse GL_UNSIGNED_INT_IMAGE_2D */ /* reuse GL_UNSIGNED_INT_IMAGE_3D */ /* reuse GL_UNSIGNED_INT_IMAGE_2D_RECT */ /* reuse GL_UNSIGNED_INT_IMAGE_CUBE */ /* reuse GL_UNSIGNED_INT_IMAGE_BUFFER */ /* reuse GL_UNSIGNED_INT_IMAGE_1D_ARRAY */ /* reuse GL_UNSIGNED_INT_IMAGE_2D_ARRAY */ /* reuse GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY */ /* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE */ /* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY */ /* reuse GL_MAX_IMAGE_SAMPLES */ /* reuse GL_IMAGE_BINDING_FORMAT */ /* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */ /* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE */ /* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS */ /* reuse GL_MAX_VERTEX_IMAGE_UNIFORMS */ /* reuse GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS */ /* reuse GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS */ /* reuse GL_MAX_GEOMETRY_IMAGE_UNIFORMS */ /* reuse GL_MAX_FRAGMENT_IMAGE_UNIFORMS */ /* reuse GL_MAX_COMBINED_IMAGE_UNIFORMS */ /* Reuse tokens from ARB_shading_language_packing (none) */ /* Reuse tokens from ARB_texture_storage */ /* reuse GL_TEXTURE_IMMUTABLE_FORMAT */ } enum // GL_VERSION_4_3 { GL_NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9, GL_VERTEX_ATTRIB_ARRAY_LONG = 0x874E, /* Reuse tokens from ARB_arrays_of_arrays (none, GLSL only) */ /* Reuse tokens from ARB_fragment_layer_viewport (none, GLSL only) */ /* Reuse tokens from ARB_shader_image_size (none, GLSL only) */ /* Reuse tokens from ARB_ES3_compatibility */ /* reuse GL_COMPRESSED_RGB8_ETC2 */ /* reuse GL_COMPRESSED_SRGB8_ETC2 */ /* reuse GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 */ /* reuse GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 */ /* reuse GL_COMPRESSED_RGBA8_ETC2_EAC */ /* reuse GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC */ /* reuse GL_COMPRESSED_R11_EAC */ /* reuse GL_COMPRESSED_SIGNED_R11_EAC */ /* reuse GL_COMPRESSED_RG11_EAC */ /* reuse GL_COMPRESSED_SIGNED_RG11_EAC */ /* reuse GL_PRIMITIVE_RESTART_FIXED_INDEX */ /* reuse GL_ANY_SAMPLES_PASSED_CONSERVATIVE */ /* reuse GL_MAX_ELEMENT_INDEX */ /* Reuse tokens from ARB_clear_buffer_object (none) */ /* Reuse tokens from ARB_compute_shader */ /* reuse GL_COMPUTE_SHADER */ /* reuse GL_MAX_COMPUTE_UNIFORM_BLOCKS */ /* reuse GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS */ /* reuse GL_MAX_COMPUTE_IMAGE_UNIFORMS */ /* reuse GL_MAX_COMPUTE_SHARED_MEMORY_SIZE */ /* reuse GL_MAX_COMPUTE_UNIFORM_COMPONENTS */ /* reuse GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS */ /* reuse GL_MAX_COMPUTE_ATOMIC_COUNTERS */ /* reuse GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS */ /* reuse GL_MAX_COMPUTE_LOCAL_INVOCATIONS */ /* reuse GL_MAX_COMPUTE_WORK_GROUP_COUNT */ /* reuse GL_MAX_COMPUTE_WORK_GROUP_SIZE */ /* reuse GL_COMPUTE_LOCAL_WORK_SIZE */ /* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER */ /* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER */ /* reuse GL_DISPATCH_INDIRECT_BUFFER */ /* reuse GL_DISPATCH_INDIRECT_BUFFER_BINDING */ /* Reuse tokens from ARB_copy_image (none) */ /* Reuse tokens from KHR_debug */ /* reuse GL_DEBUG_OUTPUT_SYNCHRONOUS */ /* reuse GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH */ /* reuse GL_DEBUG_CALLBACK_FUNCTION */ /* reuse GL_DEBUG_CALLBACK_USER_PARAM */ /* reuse GL_DEBUG_SOURCE_API */ /* reuse GL_DEBUG_SOURCE_WINDOW_SYSTEM */ /* reuse GL_DEBUG_SOURCE_SHADER_COMPILER */ /* reuse GL_DEBUG_SOURCE_THIRD_PARTY */ /* reuse GL_DEBUG_SOURCE_APPLICATION */ /* reuse GL_DEBUG_SOURCE_OTHER */ /* reuse GL_DEBUG_TYPE_ERROR */ /* reuse GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR */ /* reuse GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR */ /* reuse GL_DEBUG_TYPE_PORTABILITY */ /* reuse GL_DEBUG_TYPE_PERFORMANCE */ /* reuse GL_DEBUG_TYPE_OTHER */ /* reuse GL_MAX_DEBUG_MESSAGE_LENGTH */ /* reuse GL_MAX_DEBUG_LOGGED_MESSAGES */ /* reuse GL_DEBUG_LOGGED_MESSAGES */ /* reuse GL_DEBUG_SEVERITY_HIGH */ /* reuse GL_DEBUG_SEVERITY_MEDIUM */ /* reuse GL_DEBUG_SEVERITY_LOW */ /* reuse GL_DEBUG_TYPE_MARKER */ /* reuse GL_DEBUG_TYPE_PUSH_GROUP */ /* reuse GL_DEBUG_TYPE_POP_GROUP */ /* reuse GL_DEBUG_SEVERITY_NOTIFICATION */ /* reuse GL_MAX_DEBUG_GROUP_STACK_DEPTH */ /* reuse GL_DEBUG_GROUP_STACK_DEPTH */ /* reuse GL_BUFFER */ /* reuse GL_SHADER */ /* reuse GL_PROGRAM */ /* reuse GL_QUERY */ /* reuse GL_PROGRAM_PIPELINE */ /* reuse GL_SAMPLER */ /* reuse GL_DISPLAY_LIST */ /* reuse GL_MAX_LABEL_LENGTH */ /* reuse GL_DEBUG_OUTPUT */ /* reuse GL_CONTEXT_FLAG_DEBUG_BIT */ /* reuse GL_STACK_UNDERFLOW */ /* reuse GL_STACK_OVERFLOW */ /* Reuse tokens from ARB_explicit_uniform_location */ /* reuse GL_MAX_UNIFORM_LOCATIONS */ /* Reuse tokens from ARB_framebuffer_no_attachments */ /* reuse GL_FRAMEBUFFER_DEFAULT_WIDTH */ /* reuse GL_FRAMEBUFFER_DEFAULT_HEIGHT */ /* reuse GL_FRAMEBUFFER_DEFAULT_LAYERS */ /* reuse GL_FRAMEBUFFER_DEFAULT_SAMPLES */ /* reuse GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS */ /* reuse GL_MAX_FRAMEBUFFER_WIDTH */ /* reuse GL_MAX_FRAMEBUFFER_HEIGHT */ /* reuse GL_MAX_FRAMEBUFFER_LAYERS */ /* reuse GL_MAX_FRAMEBUFFER_SAMPLES */ /* Reuse tokens from ARB_internalformat_query2 */ /* reuse GL_INTERNALFORMAT_SUPPORTED */ /* reuse GL_INTERNALFORMAT_PREFERRED */ /* reuse GL_INTERNALFORMAT_RED_SIZE */ /* reuse GL_INTERNALFORMAT_GREEN_SIZE */ /* reuse GL_INTERNALFORMAT_BLUE_SIZE */ /* reuse GL_INTERNALFORMAT_ALPHA_SIZE */ /* reuse GL_INTERNALFORMAT_DEPTH_SIZE */ /* reuse GL_INTERNALFORMAT_STENCIL_SIZE */ /* reuse GL_INTERNALFORMAT_SHARED_SIZE */ /* reuse GL_INTERNALFORMAT_RED_TYPE */ /* reuse GL_INTERNALFORMAT_GREEN_TYPE */ /* reuse GL_INTERNALFORMAT_BLUE_TYPE */ /* reuse GL_INTERNALFORMAT_ALPHA_TYPE */ /* reuse GL_INTERNALFORMAT_DEPTH_TYPE */ /* reuse GL_INTERNALFORMAT_STENCIL_TYPE */ /* reuse GL_MAX_WIDTH */ /* reuse GL_MAX_HEIGHT */ /* reuse GL_MAX_DEPTH */ /* reuse GL_MAX_LAYERS */ /* reuse GL_MAX_COMBINED_DIMENSIONS */ /* reuse GL_COLOR_COMPONENTS */ /* reuse GL_DEPTH_COMPONENTS */ /* reuse GL_STENCIL_COMPONENTS */ /* reuse GL_COLOR_RENDERABLE */ /* reuse GL_DEPTH_RENDERABLE */ /* reuse GL_STENCIL_RENDERABLE */ /* reuse GL_FRAMEBUFFER_RENDERABLE */ /* reuse GL_FRAMEBUFFER_RENDERABLE_LAYERED */ /* reuse GL_FRAMEBUFFER_BLEND */ /* reuse GL_READ_PIXELS */ /* reuse GL_READ_PIXELS_FORMAT */ /* reuse GL_READ_PIXELS_TYPE */ /* reuse GL_TEXTURE_IMAGE_FORMAT */ /* reuse GL_TEXTURE_IMAGE_TYPE */ /* reuse GL_GET_TEXTURE_IMAGE_FORMAT */ /* reuse GL_GET_TEXTURE_IMAGE_TYPE */ /* reuse GL_MIPMAP */ /* reuse GL_MANUAL_GENERATE_MIPMAP */ /* reuse GL_AUTO_GENERATE_MIPMAP */ /* reuse GL_COLOR_ENCODING */ /* reuse GL_SRGB_READ */ /* reuse GL_SRGB_WRITE */ /* reuse GL_FILTER */ /* reuse GL_VERTEX_TEXTURE */ /* reuse GL_TESS_CONTROL_TEXTURE */ /* reuse GL_TESS_EVALUATION_TEXTURE */ /* reuse GL_GEOMETRY_TEXTURE */ /* reuse GL_FRAGMENT_TEXTURE */ /* reuse GL_COMPUTE_TEXTURE */ /* reuse GL_TEXTURE_SHADOW */ /* reuse GL_TEXTURE_GATHER */ /* reuse GL_TEXTURE_GATHER_SHADOW */ /* reuse GL_SHADER_IMAGE_LOAD */ /* reuse GL_SHADER_IMAGE_STORE */ /* reuse GL_SHADER_IMAGE_ATOMIC */ /* reuse GL_IMAGE_TEXEL_SIZE */ /* reuse GL_IMAGE_COMPATIBILITY_CLASS */ /* reuse GL_IMAGE_PIXEL_FORMAT */ /* reuse GL_IMAGE_PIXEL_TYPE */ /* reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST */ /* reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST */ /* reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE */ /* reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE */ /* reuse GL_TEXTURE_COMPRESSED_BLOCK_WIDTH */ /* reuse GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT */ /* reuse GL_TEXTURE_COMPRESSED_BLOCK_SIZE */ /* reuse GL_CLEAR_BUFFER */ /* reuse GL_TEXTURE_VIEW */ /* reuse GL_VIEW_COMPATIBILITY_CLASS */ /* reuse GL_FULL_SUPPORT */ /* reuse GL_CAVEAT_SUPPORT */ /* reuse GL_IMAGE_CLASS_4_X_32 */ /* reuse GL_IMAGE_CLASS_2_X_32 */ /* reuse GL_IMAGE_CLASS_1_X_32 */ /* reuse GL_IMAGE_CLASS_4_X_16 */ /* reuse GL_IMAGE_CLASS_2_X_16 */ /* reuse GL_IMAGE_CLASS_1_X_16 */ /* reuse GL_IMAGE_CLASS_4_X_8 */ /* reuse GL_IMAGE_CLASS_2_X_8 */ /* reuse GL_IMAGE_CLASS_1_X_8 */ /* reuse GL_IMAGE_CLASS_11_11_10 */ /* reuse GL_IMAGE_CLASS_10_10_10_2 */ /* reuse GL_VIEW_CLASS_128_BITS */ /* reuse GL_VIEW_CLASS_96_BITS */ /* reuse GL_VIEW_CLASS_64_BITS */ /* reuse GL_VIEW_CLASS_48_BITS */ /* reuse GL_VIEW_CLASS_32_BITS */ /* reuse GL_VIEW_CLASS_24_BITS */ /* reuse GL_VIEW_CLASS_16_BITS */ /* reuse GL_VIEW_CLASS_8_BITS */ /* reuse GL_VIEW_CLASS_S3TC_DXT1_RGB */ /* reuse GL_VIEW_CLASS_S3TC_DXT1_RGBA */ /* reuse GL_VIEW_CLASS_S3TC_DXT3_RGBA */ /* reuse GL_VIEW_CLASS_S3TC_DXT5_RGBA */ /* reuse GL_VIEW_CLASS_RGTC1_RED */ /* reuse GL_VIEW_CLASS_RGTC2_RG */ /* reuse GL_VIEW_CLASS_BPTC_UNORM */ /* reuse GL_VIEW_CLASS_BPTC_FLOAT */ /* Reuse tokens from ARB_invalidate_subdata (none) */ /* Reuse tokens from ARB_multi_draw_indirect (none) */ /* Reuse tokens from ARB_program_interface_query */ /* reuse GL_UNIFORM */ /* reuse GL_UNIFORM_BLOCK */ /* reuse GL_PROGRAM_INPUT */ /* reuse GL_PROGRAM_OUTPUT */ /* reuse GL_BUFFER_VARIABLE */ /* reuse GL_SHADER_STORAGE_BLOCK */ /* reuse GL_VERTEX_SUBROUTINE */ /* reuse GL_TESS_CONTROL_SUBROUTINE */ /* reuse GL_TESS_EVALUATION_SUBROUTINE */ /* reuse GL_GEOMETRY_SUBROUTINE */ /* reuse GL_FRAGMENT_SUBROUTINE */ /* reuse GL_COMPUTE_SUBROUTINE */ /* reuse GL_VERTEX_SUBROUTINE_UNIFORM */ /* reuse GL_TESS_CONTROL_SUBROUTINE_UNIFORM */ /* reuse GL_TESS_EVALUATION_SUBROUTINE_UNIFORM */ /* reuse GL_GEOMETRY_SUBROUTINE_UNIFORM */ /* reuse GL_FRAGMENT_SUBROUTINE_UNIFORM */ /* reuse GL_COMPUTE_SUBROUTINE_UNIFORM */ /* reuse GL_TRANSFORM_FEEDBACK_VARYING */ /* reuse GL_ACTIVE_RESOURCES */ /* reuse GL_MAX_NAME_LENGTH */ /* reuse GL_MAX_NUM_ACTIVE_VARIABLES */ /* reuse GL_MAX_NUM_COMPATIBLE_SUBROUTINES */ /* reuse GL_NAME_LENGTH */ /* reuse GL_TYPE */ /* reuse GL_ARRAY_SIZE */ /* reuse GL_OFFSET */ /* reuse GL_BLOCK_INDEX */ /* reuse GL_ARRAY_STRIDE */ /* reuse GL_MATRIX_STRIDE */ /* reuse GL_IS_ROW_MAJOR */ /* reuse GL_ATOMIC_COUNTER_BUFFER_INDEX */ /* reuse GL_BUFFER_BINDING */ /* reuse GL_BUFFER_DATA_SIZE */ /* reuse GL_NUM_ACTIVE_VARIABLES */ /* reuse GL_ACTIVE_VARIABLES */ /* reuse GL_REFERENCED_BY_VERTEX_SHADER */ /* reuse GL_REFERENCED_BY_TESS_CONTROL_SHADER */ /* reuse GL_REFERENCED_BY_TESS_EVALUATION_SHADER */ /* reuse GL_REFERENCED_BY_GEOMETRY_SHADER */ /* reuse GL_REFERENCED_BY_FRAGMENT_SHADER */ /* reuse GL_REFERENCED_BY_COMPUTE_SHADER */ /* reuse GL_TOP_LEVEL_ARRAY_SIZE */ /* reuse GL_TOP_LEVEL_ARRAY_STRIDE */ /* reuse GL_LOCATION */ /* reuse GL_LOCATION_INDEX */ /* reuse GL_IS_PER_PATCH */ /* Reuse tokens from ARB_robust_buffer_access_behavior (none) */ /* Reuse tokens from ARB_shader_storage_buffer_object */ /* reuse GL_SHADER_STORAGE_BUFFER */ /* reuse GL_SHADER_STORAGE_BUFFER_BINDING */ /* reuse GL_SHADER_STORAGE_BUFFER_START */ /* reuse GL_SHADER_STORAGE_BUFFER_SIZE */ /* reuse GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS */ /* reuse GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS */ /* reuse GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS */ /* reuse GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS */ /* reuse GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS */ /* reuse GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS */ /* reuse GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS */ /* reuse GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS */ /* reuse GL_MAX_SHADER_STORAGE_BLOCK_SIZE */ /* reuse GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT */ /* reuse GL_SHADER_STORAGE_BARRIER_BIT */ /* reuse GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES */ /* Reuse tokens from ARB_stencil_texturing */ /* reuse GL_DEPTH_STENCIL_TEXTURE_MODE */ /* Reuse tokens from ARB_texture_buffer_range */ /* reuse GL_TEXTURE_BUFFER_OFFSET */ /* reuse GL_TEXTURE_BUFFER_SIZE */ /* reuse GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT */ /* Reuse tokens from ARB_texture_query_levels (none) */ /* Reuse tokens from ARB_texture_storage_multisample (none) */ /* Reuse tokens from ARB_texture_view */ /* reuse GL_TEXTURE_VIEW_MIN_LEVEL */ /* reuse GL_TEXTURE_VIEW_NUM_LEVELS */ /* reuse GL_TEXTURE_VIEW_MIN_LAYER */ /* reuse GL_TEXTURE_VIEW_NUM_LAYERS */ /* reuse GL_TEXTURE_IMMUTABLE_LEVELS */ /* Reuse tokens from ARB_vertex_attrib_binding */ /* reuse GL_VERTEX_ATTRIB_BINDING */ /* reuse GL_VERTEX_ATTRIB_RELATIVE_OFFSET */ /* reuse GL_VERTEX_BINDING_DIVISOR */ /* reuse GL_VERTEX_BINDING_OFFSET */ /* reuse GL_VERTEX_BINDING_STRIDE */ /* reuse GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET */ /* reuse GL_MAX_VERTEX_ATTRIB_BINDINGS */ } enum // GL_ARB_imaging { GL_CONSTANT_COLOR = 0x8001, GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, GL_CONSTANT_ALPHA = 0x8003, GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004, GL_BLEND_COLOR = 0x8005, GL_FUNC_ADD = 0x8006, GL_MIN = 0x8007, GL_MAX = 0x8008, GL_BLEND_EQUATION = 0x8009, GL_FUNC_SUBTRACT = 0x800A, GL_FUNC_REVERSE_SUBTRACT = 0x800B, } enum // GL_ARB_depth_buffer_float { GL_DEPTH_COMPONENT32F = 0x8CAC, GL_DEPTH32F_STENCIL8 = 0x8CAD, GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD, } enum // GL_ARB_framebuffer_object { GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506, GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210, GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211, GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212, GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213, GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214, GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215, GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216, GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217, GL_FRAMEBUFFER_DEFAULT = 0x8218, GL_FRAMEBUFFER_UNDEFINED = 0x8219, GL_DEPTH_STENCIL_ATTACHMENT = 0x821A, GL_MAX_RENDERBUFFER_SIZE = 0x84E8, GL_DEPTH_STENCIL = 0x84F9, GL_UNSIGNED_INT_24_8 = 0x84FA, GL_DEPTH24_STENCIL8 = 0x88F0, GL_TEXTURE_STENCIL_SIZE = 0x88F1, GL_TEXTURE_RED_TYPE = 0x8C10, GL_TEXTURE_GREEN_TYPE = 0x8C11, GL_TEXTURE_BLUE_TYPE = 0x8C12, GL_TEXTURE_ALPHA_TYPE = 0x8C13, GL_TEXTURE_DEPTH_TYPE = 0x8C16, GL_UNSIGNED_NORMALIZED = 0x8C17, GL_FRAMEBUFFER_BINDING = 0x8CA6, GL_DRAW_FRAMEBUFFER_BINDING = GL_FRAMEBUFFER_BINDING, GL_RENDERBUFFER_BINDING = 0x8CA7, GL_READ_FRAMEBUFFER = 0x8CA8, GL_DRAW_FRAMEBUFFER = 0x8CA9, GL_READ_FRAMEBUFFER_BINDING = 0x8CAA, GL_RENDERBUFFER_SAMPLES = 0x8CAB, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4, GL_FRAMEBUFFER_COMPLETE = 0x8CD5, GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB, GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC, GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, GL_COLOR_ATTACHMENT0 = 0x8CE0, GL_COLOR_ATTACHMENT1 = 0x8CE1, GL_COLOR_ATTACHMENT2 = 0x8CE2, GL_COLOR_ATTACHMENT3 = 0x8CE3, GL_COLOR_ATTACHMENT4 = 0x8CE4, GL_COLOR_ATTACHMENT5 = 0x8CE5, GL_COLOR_ATTACHMENT6 = 0x8CE6, GL_COLOR_ATTACHMENT7 = 0x8CE7, GL_COLOR_ATTACHMENT8 = 0x8CE8, GL_COLOR_ATTACHMENT9 = 0x8CE9, GL_COLOR_ATTACHMENT10 = 0x8CEA, GL_COLOR_ATTACHMENT11 = 0x8CEB, GL_COLOR_ATTACHMENT12 = 0x8CEC, GL_COLOR_ATTACHMENT13 = 0x8CED, GL_COLOR_ATTACHMENT14 = 0x8CEE, GL_COLOR_ATTACHMENT15 = 0x8CEF, GL_DEPTH_ATTACHMENT = 0x8D00, GL_STENCIL_ATTACHMENT = 0x8D20, GL_FRAMEBUFFER = 0x8D40, GL_RENDERBUFFER = 0x8D41, GL_RENDERBUFFER_WIDTH = 0x8D42, GL_RENDERBUFFER_HEIGHT = 0x8D43, GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, GL_STENCIL_INDEX1 = 0x8D46, GL_STENCIL_INDEX4 = 0x8D47, GL_STENCIL_INDEX8 = 0x8D48, GL_STENCIL_INDEX16 = 0x8D49, GL_RENDERBUFFER_RED_SIZE = 0x8D50, GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55, GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56, GL_MAX_SAMPLES = 0x8D57, } enum // GL_ARB_framebuffer_sRGB { GL_FRAMEBUFFER_SRGB = 0x8DB9, } enum // GL_ARB_half_float_vertex { GL_HALF_FLOAT = 0x140B, } enum // GL_ARB_map_buffer_range { GL_MAP_READ_BIT = 0x0001, GL_MAP_WRITE_BIT = 0x0002, GL_MAP_INVALIDATE_RANGE_BIT = 0x0004, GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008, GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010, GL_MAP_UNSYNCHRONIZED_BIT = 0x0020, } enum // GL_ARB_texture_compression_rgtc { GL_COMPRESSED_RED_RGTC1 = 0x8DBB, GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC, GL_COMPRESSED_RG_RGTC2 = 0x8DBD, GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE, } enum // GL_ARB_texture_rg { GL_RG = 0x8227, GL_RG_INTEGER = 0x8228, GL_R8 = 0x8229, GL_R16 = 0x822A, GL_RG8 = 0x822B, GL_RG16 = 0x822C, GL_R16F = 0x822D, GL_R32F = 0x822E, GL_RG16F = 0x822F, GL_RG32F = 0x8230, GL_R8I = 0x8231, GL_R8UI = 0x8232, GL_R16I = 0x8233, GL_R16UI = 0x8234, GL_R32I = 0x8235, GL_R32UI = 0x8236, GL_RG8I = 0x8237, GL_RG8UI = 0x8238, GL_RG16I = 0x8239, GL_RG16UI = 0x823A, GL_RG32I = 0x823B, GL_RG32UI = 0x823C, } enum // GL_ARB_vertex_array_object { GL_VERTEX_ARRAY_BINDING = 0x85B5, } enum // GL_ARB_uniform_buffer_object { GL_UNIFORM_BUFFER = 0x8A11, GL_UNIFORM_BUFFER_BINDING = 0x8A28, GL_UNIFORM_BUFFER_START = 0x8A29, GL_UNIFORM_BUFFER_SIZE = 0x8A2A, GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C, GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32, GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34, GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35, GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36, GL_UNIFORM_TYPE = 0x8A37, GL_UNIFORM_SIZE = 0x8A38, GL_UNIFORM_NAME_LENGTH = 0x8A39, GL_UNIFORM_BLOCK_INDEX = 0x8A3A, GL_UNIFORM_OFFSET = 0x8A3B, GL_UNIFORM_ARRAY_STRIDE = 0x8A3C, GL_UNIFORM_MATRIX_STRIDE = 0x8A3D, GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E, GL_UNIFORM_BLOCK_BINDING = 0x8A3F, GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40, GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41, GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42, GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43, GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44, GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45, GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46, GL_INVALID_INDEX = 0xFFFFFFFFu, } enum // GL_ARB_copy_buffer { GL_COPY_READ_BUFFER_BINDING = 0x8F36, GL_COPY_READ_BUFFER = GL_COPY_READ_BUFFER_BINDING, GL_COPY_WRITE_BUFFER_BINDING = 0x8F37, GL_COPY_WRITE_BUFFER = GL_COPY_WRITE_BUFFER_BINDING, } enum // GL_ARB_depth_clamp { GL_DEPTH_CLAMP = 0x864F, } version(none) enum // GL_ARB_draw_elements_base_vertex { } version(none) enum // GL_ARB_fragment_coord_conventions { } enum // GL_ARB_provoking_vertex { GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C, GL_FIRST_VERTEX_CONVENTION = 0x8E4D, GL_LAST_VERTEX_CONVENTION = 0x8E4E, GL_PROVOKING_VERTEX = 0x8E4F, } enum // GL_ARB_seamless_cube_map { GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F, } enum // GL_ARB_sync { GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111, GL_OBJECT_TYPE = 0x9112, GL_SYNC_CONDITION = 0x9113, GL_SYNC_STATUS = 0x9114, GL_SYNC_FLAGS = 0x9115, GL_SYNC_FENCE = 0x9116, GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117, GL_UNSIGNALED = 0x9118, GL_SIGNALED = 0x9119, GL_ALREADY_SIGNALED = 0x911A, GL_TIMEOUT_EXPIRED = 0x911B, GL_CONDITION_SATISFIED = 0x911C, GL_WAIT_FAILED = 0x911D, GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001, GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFUL, } enum // GL_ARB_texture_multisample { GL_SAMPLE_POSITION = 0x8E50, GL_SAMPLE_MASK = 0x8E51, GL_SAMPLE_MASK_VALUE = 0x8E52, GL_MAX_SAMPLE_MASK_WORDS = 0x8E59, GL_TEXTURE_2D_MULTISAMPLE = 0x9100, GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101, GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102, GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103, GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104, GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105, GL_TEXTURE_SAMPLES = 0x9106, GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107, GL_SAMPLER_2D_MULTISAMPLE = 0x9108, GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109, GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A, GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B, GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C, GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D, GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E, GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F, GL_MAX_INTEGER_SAMPLES = 0x9110, } version(none) enum // GL_ARB_vertex_array_bgra { /* reuse GL_BGRA */ } version(none) enum // GL_ARB_draw_buffers_blend { } enum // GL_ARB_sample_shading { GL_SAMPLE_SHADING_ARB = 0x8C36, GL_MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37, } enum // GL_ARB_texture_cube_map_array { GL_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x9009, GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = 0x900A, GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x900B, GL_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900C, GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = 0x900D, GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900E, GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900F, } enum // GL_ARB_texture_gather { GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E, GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F, GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F, } version(none) enum // GL_ARB_texture_query_lod { } enum // GL_ARB_shading_language_include { GL_SHADER_INCLUDE_ARB = 0x8DAE, GL_NAMED_STRING_LENGTH_ARB = 0x8DE9, GL_NAMED_STRING_TYPE_ARB = 0x8DEA, } enum // GL_ARB_texture_compression_bptc { GL_COMPRESSED_RGBA_BPTC_UNORM_ARB = 0x8E8C, GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = 0x8E8D, GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = 0x8E8E, GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = 0x8E8F, } enum // GL_ARB_blend_func_extended { GL_SRC1_COLOR = 0x88F9, /* reuse GL_SRC1_ALPHA */ GL_ONE_MINUS_SRC1_COLOR = 0x88FA, GL_ONE_MINUS_SRC1_ALPHA = 0x88FB, GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC, } version(none) enum // GL_ARB_explicit_attrib_location { } enum // GL_ARB_occlusion_query2 { GL_ANY_SAMPLES_PASSED = 0x8C2F, } enum // GL_ARB_sampler_objects { GL_SAMPLER_BINDING = 0x8919, } version(none) enum // GL_ARB_shader_bit_encoding { } enum // GL_ARB_texture_rgb10_a2ui { GL_RGB10_A2UI = 0x906F, } enum // GL_ARB_texture_swizzle { GL_TEXTURE_SWIZZLE_R = 0x8E42, GL_TEXTURE_SWIZZLE_G = 0x8E43, GL_TEXTURE_SWIZZLE_B = 0x8E44, GL_TEXTURE_SWIZZLE_A = 0x8E45, GL_TEXTURE_SWIZZLE_RGBA = 0x8E46, } enum // GL_ARB_timer_query { GL_TIME_ELAPSED = 0x88BF, GL_TIMESTAMP = 0x8E28, } enum // GL_ARB_vertex_type_2_10_10_10_rev { /* reuse GL_UNSIGNED_INT_2_10_10_10_REV */ GL_INT_2_10_10_10_REV = 0x8D9F, } enum // GL_ARB_draw_indirect { GL_DRAW_INDIRECT_BUFFER = 0x8F3F, GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43, } enum // GL_ARB_gpu_shader5 { GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F, GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A, GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B, GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C, GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D, /* reuse GL_MAX_VERTEX_STREAMS */ } enum // GL_ARB_gpu_shader_fp64 { /* reuse GL_DOUBLE */ GL_DOUBLE_VEC2 = 0x8FFC, GL_DOUBLE_VEC3 = 0x8FFD, GL_DOUBLE_VEC4 = 0x8FFE, GL_DOUBLE_MAT2 = 0x8F46, GL_DOUBLE_MAT3 = 0x8F47, GL_DOUBLE_MAT4 = 0x8F48, GL_DOUBLE_MAT2x3 = 0x8F49, GL_DOUBLE_MAT2x4 = 0x8F4A, GL_DOUBLE_MAT3x2 = 0x8F4B, GL_DOUBLE_MAT3x4 = 0x8F4C, GL_DOUBLE_MAT4x2 = 0x8F4D, GL_DOUBLE_MAT4x3 = 0x8F4E, } enum // GL_ARB_shader_subroutine { GL_ACTIVE_SUBROUTINES = 0x8DE5, GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6, GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47, GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48, GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49, GL_MAX_SUBROUTINES = 0x8DE7, GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8, GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A, GL_COMPATIBLE_SUBROUTINES = 0x8E4B, /* reuse GL_UNIFORM_SIZE */ /* reuse GL_UNIFORM_NAME_LENGTH */ } enum // GL_ARB_tessellation_shader { GL_PATCHES = 0x000E, GL_PATCH_VERTICES = 0x8E72, GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73, GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74, GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75, GL_TESS_GEN_MODE = 0x8E76, GL_TESS_GEN_SPACING = 0x8E77, GL_TESS_GEN_VERTEX_ORDER = 0x8E78, GL_TESS_GEN_POINT_MODE = 0x8E79, /* reuse GL_TRIANGLES */ /* reuse GL_QUADS */ GL_ISOLINES = 0x8E7A, /* reuse GL_EQUAL */ GL_FRACTIONAL_ODD = 0x8E7B, GL_FRACTIONAL_EVEN = 0x8E7C, /* reuse GL_CCW */ /* reuse GL_CW */ GL_MAX_PATCH_VERTICES = 0x8E7D, GL_MAX_TESS_GEN_LEVEL = 0x8E7E, GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F, GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80, GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81, GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82, GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83, GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84, GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85, GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86, GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89, GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A, GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C, GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D, GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E, GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F, GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0, GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1, GL_TESS_EVALUATION_SHADER = 0x8E87, GL_TESS_CONTROL_SHADER = 0x8E88, } version(none) enum // GL_ARB_texture_buffer_object_rgb32 { /* reuse GL_RGB32F */ /* reuse GL_RGB32UI */ /* reuse GL_RGB32I */ } enum // GL_ARB_transform_feedback2 { GL_TRANSFORM_FEEDBACK = 0x8E22, GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23, GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = GL_TRANSFORM_FEEDBACK_PAUSED, GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24, GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = GL_TRANSFORM_FEEDBACK_ACTIVE, GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25, } enum // GL_ARB_transform_feedback3 { GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70, GL_MAX_VERTEX_STREAMS = 0x8E71, } enum // GL_ARB_ES2_compatibility { GL_FIXED = 0x140C, GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B, GL_LOW_FLOAT = 0x8DF0, GL_MEDIUM_FLOAT = 0x8DF1, GL_HIGH_FLOAT = 0x8DF2, GL_LOW_INT = 0x8DF3, GL_MEDIUM_INT = 0x8DF4, GL_HIGH_INT = 0x8DF5, GL_SHADER_COMPILER = 0x8DFA, GL_SHADER_BINARY_FORMATS = 0x8DF8, GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, GL_MAX_VARYING_VECTORS = 0x8DFC, GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, GL_RGB565 = 0x8D62, } enum // GL_ARB_get_program_binary { GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257, GL_PROGRAM_BINARY_LENGTH = 0x8741, GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, GL_PROGRAM_BINARY_FORMATS = 0x87FF, } enum // GL_ARB_separate_shader_objects { GL_VERTEX_SHADER_BIT = 0x00000001, GL_FRAGMENT_SHADER_BIT = 0x00000002, GL_GEOMETRY_SHADER_BIT = 0x00000004, GL_TESS_CONTROL_SHADER_BIT = 0x00000008, GL_TESS_EVALUATION_SHADER_BIT = 0x00000010, GL_ALL_SHADER_BITS = 0xFFFFFFFF, GL_PROGRAM_SEPARABLE = 0x8258, GL_ACTIVE_PROGRAM = 0x8259, GL_PROGRAM_PIPELINE_BINDING = 0x825A, } version(none) enum // GL_ARB_shader_precision { } version(none) enum // GL_ARB_vertex_attrib_64bit { /* reuse GL_RGB32I */ /* reuse GL_DOUBLE_VEC2 */ /* reuse GL_DOUBLE_VEC3 */ /* reuse GL_DOUBLE_VEC4 */ /* reuse GL_DOUBLE_MAT2 */ /* reuse GL_DOUBLE_MAT3 */ /* reuse GL_DOUBLE_MAT4 */ /* reuse GL_DOUBLE_MAT2x3 */ /* reuse GL_DOUBLE_MAT2x4 */ /* reuse GL_DOUBLE_MAT3x2 */ /* reuse GL_DOUBLE_MAT3x4 */ /* reuse GL_DOUBLE_MAT4x2 */ /* reuse GL_DOUBLE_MAT4x3 */ } enum // GL_ARB_viewport_array { /* reuse GL_SCISSOR_BOX */ /* reuse GL_VIEWPORT */ /* reuse GL_DEPTH_RANGE */ /* reuse GL_SCISSOR_TEST */ GL_MAX_VIEWPORTS = 0x825B, GL_VIEWPORT_SUBPIXEL_BITS = 0x825C, GL_VIEWPORT_BOUNDS_RANGE = 0x825D, GL_LAYER_PROVOKING_VERTEX = 0x825E, GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F, GL_UNDEFINED_VERTEX = 0x8260, /* reuse GL_FIRST_VERTEX_CONVENTION */ /* reuse GL_LAST_VERTEX_CONVENTION */ /* reuse GL_PROVOKING_VERTEX */ } enum // GL_ARB_cl_event { GL_SYNC_CL_EVENT_ARB = 0x8240, GL_SYNC_CL_EVENT_COMPLETE_ARB = 0x8241, } enum // GL_ARB_debug_output { GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB = 0x8242, GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = 0x8243, GL_DEBUG_CALLBACK_FUNCTION_ARB = 0x8244, GL_DEBUG_CALLBACK_USER_PARAM_ARB = 0x8245, GL_DEBUG_SOURCE_API_ARB = 0x8246, GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247, GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248, GL_DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249, GL_DEBUG_SOURCE_APPLICATION_ARB = 0x824A, GL_DEBUG_SOURCE_OTHER_ARB = 0x824B, GL_DEBUG_TYPE_ERROR_ARB = 0x824C, GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D, GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E, GL_DEBUG_TYPE_PORTABILITY_ARB = 0x824F, GL_DEBUG_TYPE_PERFORMANCE_ARB = 0x8250, GL_DEBUG_TYPE_OTHER_ARB = 0x8251, GL_MAX_DEBUG_MESSAGE_LENGTH_ARB = 0x9143, GL_MAX_DEBUG_LOGGED_MESSAGES_ARB = 0x9144, GL_DEBUG_LOGGED_MESSAGES_ARB = 0x9145, GL_DEBUG_SEVERITY_HIGH_ARB = 0x9146, GL_DEBUG_SEVERITY_MEDIUM_ARB = 0x9147, GL_DEBUG_SEVERITY_LOW_ARB = 0x9148, } enum // GL_ARB_robustness { /* reuse GL_NO_ERROR */ GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = 0x00000004, GL_LOSE_CONTEXT_ON_RESET_ARB = 0x8252, GL_GUILTY_CONTEXT_RESET_ARB = 0x8253, GL_INNOCENT_CONTEXT_RESET_ARB = 0x8254, GL_UNKNOWN_CONTEXT_RESET_ARB = 0x8255, GL_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256, GL_NO_RESET_NOTIFICATION_ARB = 0x8261, } version(none) enum // GL_ARB_shader_stencil_export { } version(none) enum // GL_ARB_base_instance { } version(none) enum // GL_ARB_shading_language_420pack { } version(none) enum // GL_ARB_transform_feedback_instanced { } enum // GL_ARB_compressed_texture_pixel_storage { GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127, GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128, GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129, GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A, GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B, GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C, GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D, GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E, } version(none) enum // GL_ARB_conservative_depth { } enum // GL_ARB_internalformat_query { GL_NUM_SAMPLE_COUNTS = 0x9380, } enum // GL_ARB_map_buffer_alignment { GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC, } enum // GL_ARB_shader_atomic_counters { GL_ATOMIC_COUNTER_BUFFER = 0x92C0, GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1, GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2, GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3, GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4, GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5, GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB, GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC, GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD, GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE, GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF, GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0, GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1, GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2, GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3, GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4, GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5, GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6, GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7, GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8, GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC, GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9, GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA, GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB, } enum // GL_ARB_shader_image_load_store { GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x00000001, GL_ELEMENT_ARRAY_BARRIER_BIT = 0x00000002, GL_UNIFORM_BARRIER_BIT = 0x00000004, GL_TEXTURE_FETCH_BARRIER_BIT = 0x00000008, GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x00000020, GL_COMMAND_BARRIER_BIT = 0x00000040, GL_PIXEL_BUFFER_BARRIER_BIT = 0x00000080, GL_TEXTURE_UPDATE_BARRIER_BIT = 0x00000100, GL_BUFFER_UPDATE_BARRIER_BIT = 0x00000200, GL_FRAMEBUFFER_BARRIER_BIT = 0x00000400, GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x00000800, GL_ATOMIC_COUNTER_BARRIER_BIT = 0x00001000, GL_ALL_BARRIER_BITS = 0xFFFFFFFF, GL_MAX_IMAGE_UNITS = 0x8F38, GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39, GL_IMAGE_BINDING_NAME = 0x8F3A, GL_IMAGE_BINDING_LEVEL = 0x8F3B, GL_IMAGE_BINDING_LAYERED = 0x8F3C, GL_IMAGE_BINDING_LAYER = 0x8F3D, GL_IMAGE_BINDING_ACCESS = 0x8F3E, GL_IMAGE_1D = 0x904C, GL_IMAGE_2D = 0x904D, GL_IMAGE_3D = 0x904E, GL_IMAGE_2D_RECT = 0x904F, GL_IMAGE_CUBE = 0x9050, GL_IMAGE_BUFFER = 0x9051, GL_IMAGE_1D_ARRAY = 0x9052, GL_IMAGE_2D_ARRAY = 0x9053, GL_IMAGE_CUBE_MAP_ARRAY = 0x9054, GL_IMAGE_2D_MULTISAMPLE = 0x9055, GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056, GL_INT_IMAGE_1D = 0x9057, GL_INT_IMAGE_2D = 0x9058, GL_INT_IMAGE_3D = 0x9059, GL_INT_IMAGE_2D_RECT = 0x905A, GL_INT_IMAGE_CUBE = 0x905B, GL_INT_IMAGE_BUFFER = 0x905C, GL_INT_IMAGE_1D_ARRAY = 0x905D, GL_INT_IMAGE_2D_ARRAY = 0x905E, GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F, GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060, GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061, GL_UNSIGNED_INT_IMAGE_1D = 0x9062, GL_UNSIGNED_INT_IMAGE_2D = 0x9063, GL_UNSIGNED_INT_IMAGE_3D = 0x9064, GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065, GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066, GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067, GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068, GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069, GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A, GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B, GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C, GL_MAX_IMAGE_SAMPLES = 0x906D, GL_IMAGE_BINDING_FORMAT = 0x906E, GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7, GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8, GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9, GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA, GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB, GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC, GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD, GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE, GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF, } version(none) enum // GL_ARB_shading_language_packing { } enum // GL_ARB_texture_storage { GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F, } enum // GL_KHR_texture_compression_astc_ldr { GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0, GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1, GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2, GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3, GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4, GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5, GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6, GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7, GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8, GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9, GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA, GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB, GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC, GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC, GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD, } enum // GL_KHR_debug { GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242, GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, GL_DEBUG_CALLBACK_FUNCTION = 0x8244, GL_DEBUG_CALLBACK_USER_PARAM = 0x8245, GL_DEBUG_SOURCE_API = 0x8246, GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, GL_DEBUG_SOURCE_APPLICATION = 0x824A, GL_DEBUG_SOURCE_OTHER = 0x824B, GL_DEBUG_TYPE_ERROR = 0x824C, GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, GL_DEBUG_TYPE_PORTABILITY = 0x824F, GL_DEBUG_TYPE_PERFORMANCE = 0x8250, GL_DEBUG_TYPE_OTHER = 0x8251, GL_DEBUG_TYPE_MARKER = 0x8268, GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, GL_DEBUG_TYPE_POP_GROUP = 0x826A, GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B, GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, GL_BUFFER = 0x82E0, GL_SHADER = 0x82E1, GL_PROGRAM = 0x82E2, GL_QUERY = 0x82E3, GL_PROGRAM_PIPELINE = 0x82E4, GL_SAMPLER = 0x82E6, GL_DISPLAY_LIST = 0x82E7, /* DISPLAY_LIST used in compatibility profile only */ GL_MAX_LABEL_LENGTH = 0x82E8, GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, GL_DEBUG_LOGGED_MESSAGES = 0x9145, GL_DEBUG_SEVERITY_HIGH = 0x9146, GL_DEBUG_SEVERITY_MEDIUM = 0x9147, GL_DEBUG_SEVERITY_LOW = 0x9148, GL_DEBUG_OUTPUT = 0x92E0, GL_CONTEXT_FLAG_DEBUG_BIT = 0x00000002, /* reuse GL_STACK_UNDERFLOW */ /* reuse GL_STACK_OVERFLOW */ } version(none) enum // GL_ARB_arrays_of_arrays { } version(none) enum // GL_ARB_clear_buffer_object { } enum // GL_ARB_compute_shader { GL_COMPUTE_SHADER = 0x91B9, GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, GL_MAX_COMPUTE_LOCAL_INVOCATIONS = 0x90EB, GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF, GL_COMPUTE_LOCAL_WORK_SIZE = 0x8267, GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC, GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED, GL_DISPATCH_INDIRECT_BUFFER = 0x90EE, GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF, GL_COMPUTE_SHADER_BIT = 0x00000020, } version(none) enum // GL_ARB_copy_image { } enum // GL_ARB_texture_view { GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB, GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC, GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD, GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE, GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF, } enum // GL_ARB_vertex_attrib_binding { GL_VERTEX_ATTRIB_BINDING = 0x82D4, GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5, GL_VERTEX_BINDING_DIVISOR = 0x82D6, GL_VERTEX_BINDING_OFFSET = 0x82D7, GL_VERTEX_BINDING_STRIDE = 0x82D8, GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9, GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA, } version(none) enum // GL_ARB_robustness_isolation { } enum // GL_ARB_ES3_compatibility { GL_COMPRESSED_RGB8_ETC2 = 0x9274, GL_COMPRESSED_SRGB8_ETC2 = 0x9275, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, GL_COMPRESSED_R11_EAC = 0x9270, GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, GL_COMPRESSED_RG11_EAC = 0x9272, GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273, GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69, GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A, GL_MAX_ELEMENT_INDEX = 0x8D6B, } enum // GL_ARB_explicit_uniform_location { GL_MAX_UNIFORM_LOCATIONS = 0x826E, } version(none) enum // GL_ARB_fragment_layer_viewport { } enum // GL_ARB_framebuffer_no_attachments { GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310, GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311, GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312, GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313, GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314, GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318, } enum // GL_ARB_internalformat_query2 { /* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */ /* reuse GL_NUM_SAMPLE_COUNTS */ /* reuse GL_RENDERBUFFER */ /* reuse GL_SAMPLES */ /* reuse GL_TEXTURE_1D */ /* reuse GL_TEXTURE_1D_ARRAY */ /* reuse GL_TEXTURE_2D */ /* reuse GL_TEXTURE_2D_ARRAY */ /* reuse GL_TEXTURE_3D */ /* reuse GL_TEXTURE_CUBE_MAP */ /* reuse GL_TEXTURE_CUBE_MAP_ARRAY */ /* reuse GL_TEXTURE_RECTANGLE */ /* reuse GL_TEXTURE_BUFFER */ /* reuse GL_TEXTURE_2D_MULTISAMPLE */ /* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */ /* reuse GL_TEXTURE_COMPRESSED */ GL_INTERNALFORMAT_SUPPORTED = 0x826F, GL_INTERNALFORMAT_PREFERRED = 0x8270, GL_INTERNALFORMAT_RED_SIZE = 0x8271, GL_INTERNALFORMAT_GREEN_SIZE = 0x8272, GL_INTERNALFORMAT_BLUE_SIZE = 0x8273, GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274, GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275, GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276, GL_INTERNALFORMAT_SHARED_SIZE = 0x8277, GL_INTERNALFORMAT_RED_TYPE = 0x8278, GL_INTERNALFORMAT_GREEN_TYPE = 0x8279, GL_INTERNALFORMAT_BLUE_TYPE = 0x827A, GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B, GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C, GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D, GL_MAX_WIDTH = 0x827E, GL_MAX_HEIGHT = 0x827F, GL_MAX_DEPTH = 0x8280, GL_MAX_LAYERS = 0x8281, GL_MAX_COMBINED_DIMENSIONS = 0x8282, GL_COLOR_COMPONENTS = 0x8283, GL_DEPTH_COMPONENTS = 0x8284, GL_STENCIL_COMPONENTS = 0x8285, GL_COLOR_RENDERABLE = 0x8286, GL_DEPTH_RENDERABLE = 0x8287, GL_STENCIL_RENDERABLE = 0x8288, GL_FRAMEBUFFER_RENDERABLE = 0x8289, GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A, GL_FRAMEBUFFER_BLEND = 0x828B, GL_READ_PIXELS = 0x828C, GL_READ_PIXELS_FORMAT = 0x828D, GL_READ_PIXELS_TYPE = 0x828E, GL_TEXTURE_IMAGE_FORMAT = 0x828F, GL_TEXTURE_IMAGE_TYPE = 0x8290, GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291, GL_GET_TEXTURE_IMAGE_TYPE = 0x8292, GL_MIPMAP = 0x8293, GL_MANUAL_GENERATE_MIPMAP = 0x8294, GL_AUTO_GENERATE_MIPMAP = 0x8295, GL_COLOR_ENCODING = 0x8296, GL_SRGB_READ = 0x8297, GL_SRGB_WRITE = 0x8298, GL_SRGB_DECODE_ARB = 0x8299, GL_FILTER = 0x829A, GL_VERTEX_TEXTURE = 0x829B, GL_TESS_CONTROL_TEXTURE = 0x829C, GL_TESS_EVALUATION_TEXTURE = 0x829D, GL_GEOMETRY_TEXTURE = 0x829E, GL_FRAGMENT_TEXTURE = 0x829F, GL_COMPUTE_TEXTURE = 0x82A0, GL_TEXTURE_SHADOW = 0x82A1, GL_TEXTURE_GATHER = 0x82A2, GL_TEXTURE_GATHER_SHADOW = 0x82A3, GL_SHADER_IMAGE_LOAD = 0x82A4, GL_SHADER_IMAGE_STORE = 0x82A5, GL_SHADER_IMAGE_ATOMIC = 0x82A6, GL_IMAGE_TEXEL_SIZE = 0x82A7, GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8, GL_IMAGE_PIXEL_FORMAT = 0x82A9, GL_IMAGE_PIXEL_TYPE = 0x82AA, GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC, GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD, GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE, GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF, GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1, GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2, GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3, GL_CLEAR_BUFFER = 0x82B4, GL_TEXTURE_VIEW = 0x82B5, GL_VIEW_COMPATIBILITY_CLASS = 0x82B6, GL_FULL_SUPPORT = 0x82B7, GL_CAVEAT_SUPPORT = 0x82B8, GL_IMAGE_CLASS_4_X_32 = 0x82B9, GL_IMAGE_CLASS_2_X_32 = 0x82BA, GL_IMAGE_CLASS_1_X_32 = 0x82BB, GL_IMAGE_CLASS_4_X_16 = 0x82BC, GL_IMAGE_CLASS_2_X_16 = 0x82BD, GL_IMAGE_CLASS_1_X_16 = 0x82BE, GL_IMAGE_CLASS_4_X_8 = 0x82BF, GL_IMAGE_CLASS_2_X_8 = 0x82C0, GL_IMAGE_CLASS_1_X_8 = 0x82C1, GL_IMAGE_CLASS_11_11_10 = 0x82C2, GL_IMAGE_CLASS_10_10_10_2 = 0x82C3, GL_VIEW_CLASS_128_BITS = 0x82C4, GL_VIEW_CLASS_96_BITS = 0x82C5, GL_VIEW_CLASS_64_BITS = 0x82C6, GL_VIEW_CLASS_48_BITS = 0x82C7, GL_VIEW_CLASS_32_BITS = 0x82C8, GL_VIEW_CLASS_24_BITS = 0x82C9, GL_VIEW_CLASS_16_BITS = 0x82CA, GL_VIEW_CLASS_8_BITS = 0x82CB, GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC, GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD, GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE, GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF, GL_VIEW_CLASS_RGTC1_RED = 0x82D0, GL_VIEW_CLASS_RGTC2_RG = 0x82D1, GL_VIEW_CLASS_BPTC_UNORM = 0x82D2, GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3, } version(none) enum // GL_ARB_invalidate_subdata { } version(none) enum // GL_ARB_multi_draw_indirect { } enum // GL_ARB_program_interface_query { GL_UNIFORM = 0x92E1, GL_UNIFORM_BLOCK = 0x92E2, GL_PROGRAM_INPUT = 0x92E3, GL_PROGRAM_OUTPUT = 0x92E4, GL_BUFFER_VARIABLE = 0x92E5, GL_SHADER_STORAGE_BLOCK = 0x92E6, /* reuse GL_ATOMIC_COUNTER_BUFFER */ GL_VERTEX_SUBROUTINE = 0x92E8, GL_TESS_CONTROL_SUBROUTINE = 0x92E9, GL_TESS_EVALUATION_SUBROUTINE = 0x92EA, GL_GEOMETRY_SUBROUTINE = 0x92EB, GL_FRAGMENT_SUBROUTINE = 0x92EC, GL_COMPUTE_SUBROUTINE = 0x92ED, GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE, GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF, GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0, GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1, GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2, GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3, GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4, GL_ACTIVE_RESOURCES = 0x92F5, GL_MAX_NAME_LENGTH = 0x92F6, GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7, GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8, GL_NAME_LENGTH = 0x92F9, GL_TYPE = 0x92FA, GL_ARRAY_SIZE = 0x92FB, GL_OFFSET = 0x92FC, GL_BLOCK_INDEX = 0x92FD, GL_ARRAY_STRIDE = 0x92FE, GL_MATRIX_STRIDE = 0x92FF, GL_IS_ROW_MAJOR = 0x9300, GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301, GL_BUFFER_BINDING = 0x9302, GL_BUFFER_DATA_SIZE = 0x9303, GL_NUM_ACTIVE_VARIABLES = 0x9304, GL_ACTIVE_VARIABLES = 0x9305, GL_REFERENCED_BY_VERTEX_SHADER = 0x9306, GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307, GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308, GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309, GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A, GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B, GL_TOP_LEVEL_ARRAY_SIZE = 0x930C, GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D, GL_LOCATION = 0x930E, GL_LOCATION_INDEX = 0x930F, GL_IS_PER_PATCH = 0x92E7, /* reuse GL_NUM_COMPATIBLE_SUBROUTINES */ /* reuse GL_COMPATIBLE_SUBROUTINES */ } version(none) enum // GL_ARB_robust_buffer_access_behavior { } version(none) enum // GL_ARB_shader_image_size { } enum // GL_ARB_shader_storage_buffer_object { GL_SHADER_STORAGE_BUFFER = 0x90D2, GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3, GL_SHADER_STORAGE_BUFFER_START = 0x90D4, GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5, GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6, GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7, GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8, GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9, GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA, GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB, GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC, GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD, GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE, GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF, GL_SHADER_STORAGE_BARRIER_BIT = 0x2000, GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS, /* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */ } enum // GL_ARB_stencil_texturing { GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA, } enum // GL_ARB_texture_buffer_range { GL_TEXTURE_BUFFER_OFFSET = 0x919D, GL_TEXTURE_BUFFER_SIZE = 0x919E, GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F, } version(none) enum // GL_ARB_texture_query_levels { } version(none) enum // GL_ARB_texture_storage_multisample { } /* *********************************************************** */ // GL_VERSION_2_0 /* GL type for program/shader text */ alias char GLchar; // GL_VERSION_1_5 /* GL types for handling large vertex buffer objects */ alias ptrdiff_t GLintptr; alias ptrdiff_t GLsizeiptr; // GL_ARB_vertex_buffer_object /* GL types for handling large vertex buffer objects */ alias ptrdiff_t GLintptrARB; alias ptrdiff_t GLsizeiptrARB; // GL_ARB_shader_objects /* GL types for program/shader text and shader object handles */ alias char GLcharARB; alias uint GLhandleARB; /* GL type for "half" precision (s10e5) float data in host memory */ // GL_ARB_half_float_pixel alias ushort GLhalfARB; // GL_NV_half_float alias ushort GLhalfNV; /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GL_EXT_timer_query extension). */ alias int int32_t; alias long int64_t; alias ulong uint64_t; // GL_EXT_timer_query alias int64_t GLint64EXT; alias uint64_t GLuint64EXT; // GL_ARB_sync alias int64_t GLint64; alias uint64_t GLuint64; struct __GLsync; alias __GLsync *GLsync; // GL_ARB_cl_event /* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */ struct _cl_context; struct _cl_event; // GL_ARB_debug_output alias void function(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const(GLchar)* message, GLvoid* userParam) GLDEBUGPROCARB; // GL_AMD_debug_output alias void function(GLuint id, GLenum category, GLenum severity, GLsizei length, const(GLchar)* message, GLvoid* userParam) GLDEBUGPROCAMD; // GL_KHR_debug alias void function(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const(GLchar)* message, GLvoid* userParam) GLDEBUGPROC; // GL_NV_vdpau_interop alias GLintptr GLvdpauSurfaceNV; /* *********************************************************** */ // GL_VERSION_1_0 void glCullFace(GLenum mode); void glFrontFace(GLenum mode); void glHint(GLenum target, GLenum mode); void glLineWidth(GLfloat width); void glPointSize(GLfloat size); void glPolygonMode(GLenum face, GLenum mode); void glScissor(GLint x, GLint y, GLsizei width, GLsizei height); void glTexParameterf(GLenum target, GLenum pname, GLfloat param); void glTexParameterfv(GLenum target, GLenum pname, const(GLfloat)* params); void glTexParameteri(GLenum target, GLenum pname, GLint param); void glTexParameteriv(GLenum target, GLenum pname, const(GLint)* params); void glTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const(GLvoid)* pixels); void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const(GLvoid)* pixels); void glDrawBuffer(GLenum mode); void glClear(GLbitfield mask); void glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); void glClearStencil(GLint s); void glClearDepth(GLdouble depth); void glStencilMask(GLuint mask); void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); void glDepthMask(GLboolean flag); void glDisable(GLenum cap); void glEnable(GLenum cap); void glFinish(); void glFlush(); void glBlendFunc(GLenum sfactor, GLenum dfactor); void glLogicOp(GLenum opcode); void glStencilFunc(GLenum func, GLint ref_, GLuint mask); void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass); void glDepthFunc(GLenum func); void glPixelStoref(GLenum pname, GLfloat param); void glPixelStorei(GLenum pname, GLint param); void glReadBuffer(GLenum mode); void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); void glGetBooleanv(GLenum pname, GLboolean* params); void glGetDoublev(GLenum pname, GLdouble* params); GLenum glGetError(); void glGetFloatv(GLenum pname, GLfloat* params); void glGetIntegerv(GLenum pname, GLint* params); const(GLubyte)* glGetString(GLenum name); void glGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels); void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params); void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params); void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat* params); void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params); GLboolean glIsEnabled(GLenum cap); void glDepthRange(GLdouble near, GLdouble far); void glViewport(GLint x, GLint y, GLsizei width, GLsizei height); alias void function(GLenum mode) PFNGLCULLFACEPROC; alias void function(GLenum mode) PFNGLFRONTFACEPROC; alias void function(GLenum target, GLenum mode) PFNGLHINTPROC; alias void function(GLfloat width) PFNGLLINEWIDTHPROC; alias void function(GLfloat size) PFNGLPOINTSIZEPROC; alias void function(GLenum face, GLenum mode) PFNGLPOLYGONMODEPROC; alias void function(GLint x, GLint y, GLsizei width, GLsizei height) PFNGLSCISSORPROC; alias void function(GLenum target, GLenum pname, GLfloat param) PFNGLTEXPARAMETERFPROC; alias void function(GLenum target, GLenum pname, const(GLfloat)* params) PFNGLTEXPARAMETERFVPROC; alias void function(GLenum target, GLenum pname, GLint param) PFNGLTEXPARAMETERIPROC; alias void function(GLenum target, GLenum pname, const(GLint)* params) PFNGLTEXPARAMETERIVPROC; alias void function(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const(GLvoid)* pixels) PFNGLTEXIMAGE1DPROC; alias void function(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const(GLvoid)* pixels) PFNGLTEXIMAGE2DPROC; alias void function(GLenum mode) PFNGLDRAWBUFFERPROC; alias void function(GLbitfield mask) PFNGLCLEARPROC; alias void function(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) PFNGLCLEARCOLORPROC; alias void function(GLint s) PFNGLCLEARSTENCILPROC; alias void function(GLdouble depth) PFNGLCLEARDEPTHPROC; alias void function(GLuint mask) PFNGLSTENCILMASKPROC; alias void function(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) PFNGLCOLORMASKPROC; alias void function(GLboolean flag) PFNGLDEPTHMASKPROC; alias void function(GLenum cap) PFNGLDISABLEPROC; alias void function(GLenum cap) PFNGLENABLEPROC; alias void function() PFNGLFINISHPROC; alias void function() PFNGLFLUSHPROC; alias void function(GLenum sfactor, GLenum dfactor) PFNGLBLENDFUNCPROC; alias void function(GLenum opcode) PFNGLLOGICOPPROC; alias void function(GLenum func, GLint ref_, GLuint mask) PFNGLSTENCILFUNCPROC; alias void function(GLenum fail, GLenum zfail, GLenum zpass) PFNGLSTENCILOPPROC; alias void function(GLenum func) PFNGLDEPTHFUNCPROC; alias void function(GLenum pname, GLfloat param) PFNGLPIXELSTOREFPROC; alias void function(GLenum pname, GLint param) PFNGLPIXELSTOREIPROC; alias void function(GLenum mode) PFNGLREADBUFFERPROC; alias void function(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) PFNGLREADPIXELSPROC; alias void function(GLenum pname, GLboolean* params) PFNGLGETBOOLEANVPROC; alias void function(GLenum pname, GLdouble* params) PFNGLGETDOUBLEVPROC; alias GLenum function() PFNGLGETERRORPROC; alias void function(GLenum pname, GLfloat* params) PFNGLGETFLOATVPROC; alias void function(GLenum pname, GLint* params) PFNGLGETINTEGERVPROC; alias const(GLubyte)* function(GLenum name) PFNGLGETSTRINGPROC; alias void function(GLenum target, GLint level, GLenum format, GLenum type, GLvoid* pixels) PFNGLGETTEXIMAGEPROC; alias void function(GLenum target, GLenum pname, GLfloat* params) PFNGLGETTEXPARAMETERFVPROC; alias void function(GLenum target, GLenum pname, GLint* params) PFNGLGETTEXPARAMETERIVPROC; alias void function(GLenum target, GLint level, GLenum pname, GLfloat* params) PFNGLGETTEXLEVELPARAMETERFVPROC; alias void function(GLenum target, GLint level, GLenum pname, GLint* params) PFNGLGETTEXLEVELPARAMETERIVPROC; alias GLboolean function(GLenum cap) PFNGLISENABLEDPROC; alias void function(GLdouble near, GLdouble far) PFNGLDEPTHRANGEPROC; alias void function(GLint x, GLint y, GLsizei width, GLsizei height) PFNGLVIEWPORTPROC; // GL_VERSION_1_1 void glDrawArrays(GLenum mode, GLint first, GLsizei count); void glDrawElements(GLenum mode, GLsizei count, GLenum type, const(GLvoid)* indices); void glGetPointerv(GLenum pname, GLvoid** params); void glPolygonOffset(GLfloat factor, GLfloat units); void glCopyTexImage1D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); void glCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); void glTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const(GLvoid)* pixels); void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const(GLvoid)* pixels); void glBindTexture(GLenum target, GLuint texture); void glDeleteTextures(GLsizei n, const(GLuint)* textures); void glGenTextures(GLsizei n, GLuint* textures); GLboolean glIsTexture(GLuint texture); alias void function(GLenum mode, GLint first, GLsizei count) PFNGLDRAWARRAYSPROC; alias void function(GLenum mode, GLsizei count, GLenum type, const(GLvoid)* indices) PFNGLDRAWELEMENTSPROC; alias void function(GLenum pname, GLvoid** params) PFNGLGETPOINTERVPROC; alias void function(GLfloat factor, GLfloat units) PFNGLPOLYGONOFFSETPROC; alias void function(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) PFNGLCOPYTEXIMAGE1DPROC; alias void function(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) PFNGLCOPYTEXIMAGE2DPROC; alias void function(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) PFNGLCOPYTEXSUBIMAGE1DPROC; alias void function(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) PFNGLCOPYTEXSUBIMAGE2DPROC; alias void function(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const(GLvoid)* pixels) PFNGLTEXSUBIMAGE1DPROC; alias void function(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const(GLvoid)* pixels) PFNGLTEXSUBIMAGE2DPROC; alias void function(GLenum target, GLuint texture) PFNGLBINDTEXTUREPROC; alias void function(GLsizei n, const(GLuint)* textures) PFNGLDELETETEXTURESPROC; alias void function(GLsizei n, GLuint* textures) PFNGLGENTEXTURESPROC; alias GLboolean function(GLuint texture) PFNGLISTEXTUREPROC; // GL_VERSION_1_2 void glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); void glBlendEquation(GLenum mode); void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const(GLvoid)* indices); void glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const(GLvoid)* pixels); void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const(GLvoid)* pixels); void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); alias void function(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) PFNGLBLENDCOLORPROC; alias void function(GLenum mode) PFNGLBLENDEQUATIONPROC; alias void function(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const(GLvoid)* indices) PFNGLDRAWRANGEELEMENTSPROC; alias void function(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const(GLvoid)* pixels) PFNGLTEXIMAGE3DPROC; alias void function(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const(GLvoid)* pixels) PFNGLTEXSUBIMAGE3DPROC; alias void function(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) PFNGLCOPYTEXSUBIMAGE3DPROC; // GL_VERSION_1_3 void glActiveTexture(GLenum texture); void glSampleCoverage(GLfloat value, GLboolean invert); void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const(GLvoid)* data); void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const(GLvoid)* data); void glCompressedTexImage1D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const(GLvoid)* data); void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const(GLvoid)* data); void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const(GLvoid)* data); void glCompressedTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const(GLvoid)* data); void glGetCompressedTexImage(GLenum target, GLint level, GLvoid* img); alias void function(GLenum texture) PFNGLACTIVETEXTUREPROC; alias void function(GLfloat value, GLboolean invert) PFNGLSAMPLECOVERAGEPROC; alias void function(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const(GLvoid)* data) PFNGLCOMPRESSEDTEXIMAGE3DPROC; alias void function(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const(GLvoid)* data) PFNGLCOMPRESSEDTEXIMAGE2DPROC; alias void function(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const(GLvoid)* data) PFNGLCOMPRESSEDTEXIMAGE1DPROC; alias void function(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const(GLvoid)* data) PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC; alias void function(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const(GLvoid)* data) PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC; alias void function(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const(GLvoid)* data) PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC; alias void function(GLenum target, GLint level, GLvoid* img) PFNGLGETCOMPRESSEDTEXIMAGEPROC; // GL_VERSION_1_4 void glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); void glMultiDrawArrays(GLenum mode, const(GLint)* first, const(GLsizei)* count, GLsizei drawcount); void glMultiDrawElements(GLenum mode, const(GLsizei)* count, GLenum type, const(GLvoid)** indices, GLsizei drawcount); void glPointParameterf(GLenum pname, GLfloat param); void glPointParameterfv(GLenum pname, const(GLfloat)* params); void glPointParameteri(GLenum pname, GLint param); void glPointParameteriv(GLenum pname, const(GLint)* params); alias void function(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) PFNGLBLENDFUNCSEPARATEPROC; alias void function(GLenum mode, const(GLint)* first, const(GLsizei)* count, GLsizei drawcount) PFNGLMULTIDRAWARRAYSPROC; alias void function(GLenum mode, const(GLsizei)* count, GLenum type, const(GLvoid)** indices, GLsizei drawcount) PFNGLMULTIDRAWELEMENTSPROC; alias void function(GLenum pname, GLfloat param) PFNGLPOINTPARAMETERFPROC; alias void function(GLenum pname, const(GLfloat)* params) PFNGLPOINTPARAMETERFVPROC; alias void function(GLenum pname, GLint param) PFNGLPOINTPARAMETERIPROC; alias void function(GLenum pname, const(GLint)* params) PFNGLPOINTPARAMETERIVPROC; // GL_VERSION_1_5 void glGenQueries(GLsizei n, GLuint* ids); void glDeleteQueries(GLsizei n, const(GLuint)* ids); GLboolean glIsQuery(GLuint id); void glBeginQuery(GLenum target, GLuint id); void glEndQuery(GLenum target); void glGetQueryiv(GLenum target, GLenum pname, GLint* params); void glGetQueryObjectiv(GLuint id, GLenum pname, GLint* params); void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params); void glBindBuffer(GLenum target, GLuint buffer); void glDeleteBuffers(GLsizei n, const(GLuint)* buffers); void glGenBuffers(GLsizei n, GLuint* buffers); GLboolean glIsBuffer(GLuint buffer); void glBufferData(GLenum target, GLsizeiptr size, const(GLvoid)* data, GLenum usage); void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const(GLvoid)* data); void glGetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid* data); GLvoid* glMapBuffer(GLenum target, GLenum access); GLboolean glUnmapBuffer(GLenum target); void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params); void glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params); alias void function(GLsizei n, GLuint* ids) PFNGLGENQUERIESPROC; alias void function(GLsizei n, const(GLuint)* ids) PFNGLDELETEQUERIESPROC; alias GLboolean function(GLuint id) PFNGLISQUERYPROC; alias void function(GLenum target, GLuint id) PFNGLBEGINQUERYPROC; alias void function(GLenum target) PFNGLENDQUERYPROC; alias void function(GLenum target, GLenum pname, GLint* params) PFNGLGETQUERYIVPROC; alias void function(GLuint id, GLenum pname, GLint* params) PFNGLGETQUERYOBJECTIVPROC; alias void function(GLuint id, GLenum pname, GLuint* params) PFNGLGETQUERYOBJECTUIVPROC; alias void function(GLenum target, GLuint buffer) PFNGLBINDBUFFERPROC; alias void function(GLsizei n, const(GLuint)* buffers) PFNGLDELETEBUFFERSPROC; alias void function(GLsizei n, GLuint* buffers) PFNGLGENBUFFERSPROC; alias GLboolean function(GLuint buffer) PFNGLISBUFFERPROC; alias void function(GLenum target, GLsizeiptr size, const(GLvoid)* data, GLenum usage) PFNGLBUFFERDATAPROC; alias void function(GLenum target, GLintptr offset, GLsizeiptr size, const(GLvoid)* data) PFNGLBUFFERSUBDATAPROC; alias void function(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid* data) PFNGLGETBUFFERSUBDATAPROC; alias GLvoid* function(GLenum target, GLenum access) PFNGLMAPBUFFERPROC; alias GLboolean function(GLenum target) PFNGLUNMAPBUFFERPROC; alias void function(GLenum target, GLenum pname, GLint* params) PFNGLGETBUFFERPARAMETERIVPROC; alias void function(GLenum target, GLenum pname, GLvoid** params) PFNGLGETBUFFERPOINTERVPROC; // GL_VERSION_2_0 void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); void glDrawBuffers(GLsizei n, const(GLenum)* bufs); void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref_, GLuint mask); void glStencilMaskSeparate(GLenum face, GLuint mask); void glAttachShader(GLuint program, GLuint shader); void glBindAttribLocation(GLuint program, GLuint index, const(GLchar)* name); void glCompileShader(GLuint shader); GLuint glCreateProgram(); GLuint glCreateShader(GLenum type); void glDeleteProgram(GLuint program); void glDeleteShader(GLuint shader); void glDetachShader(GLuint program, GLuint shader); void glDisableVertexAttribArray(GLuint index); void glEnableVertexAttribArray(GLuint index); void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); void glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei* count, GLuint* obj); GLint glGetAttribLocation(GLuint program, const(GLchar)* name); void glGetProgramiv(GLuint program, GLenum pname, GLint* params); void glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog); void glGetShaderiv(GLuint shader, GLenum pname, GLint* params); void glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog); void glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* source); GLint glGetUniformLocation(GLuint program, const(GLchar)* name); void glGetUniformfv(GLuint program, GLint location, GLfloat* params); void glGetUniformiv(GLuint program, GLint location, GLint* params); void glGetVertexAttribdv(GLuint index, GLenum pname, GLdouble* params); void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params); void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params); void glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer); GLboolean glIsProgram(GLuint program); GLboolean glIsShader(GLuint shader); void glLinkProgram(GLuint program); void glShaderSource(GLuint shader, GLsizei count, const(GLchar)** string, const(GLint)* length); void glUseProgram(GLuint program); void glUniform1f(GLint location, GLfloat v0); void glUniform2f(GLint location, GLfloat v0, GLfloat v1); void glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2); void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); void glUniform1i(GLint location, GLint v0); void glUniform2i(GLint location, GLint v0, GLint v1); void glUniform3i(GLint location, GLint v0, GLint v1, GLint v2); void glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3); void glUniform1fv(GLint location, GLsizei count, const(GLfloat)* value); void glUniform2fv(GLint location, GLsizei count, const(GLfloat)* value); void glUniform3fv(GLint location, GLsizei count, const(GLfloat)* value); void glUniform4fv(GLint location, GLsizei count, const(GLfloat)* value); void glUniform1iv(GLint location, GLsizei count, const(GLint)* value); void glUniform2iv(GLint location, GLsizei count, const(GLint)* value); void glUniform3iv(GLint location, GLsizei count, const(GLint)* value); void glUniform4iv(GLint location, GLsizei count, const(GLint)* value); void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glValidateProgram(GLuint program); void glVertexAttrib1d(GLuint index, GLdouble x); void glVertexAttrib1dv(GLuint index, const(GLdouble)* v); void glVertexAttrib1f(GLuint index, GLfloat x); void glVertexAttrib1fv(GLuint index, const(GLfloat)* v); void glVertexAttrib1s(GLuint index, GLshort x); void glVertexAttrib1sv(GLuint index, const(GLshort)* v); void glVertexAttrib2d(GLuint index, GLdouble x, GLdouble y); void glVertexAttrib2dv(GLuint index, const(GLdouble)* v); void glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y); void glVertexAttrib2fv(GLuint index, const(GLfloat)* v); void glVertexAttrib2s(GLuint index, GLshort x, GLshort y); void glVertexAttrib2sv(GLuint index, const(GLshort)* v); void glVertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z); void glVertexAttrib3dv(GLuint index, const(GLdouble)* v); void glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z); void glVertexAttrib3fv(GLuint index, const(GLfloat)* v); void glVertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z); void glVertexAttrib3sv(GLuint index, const(GLshort)* v); void glVertexAttrib4Nbv(GLuint index, const(GLbyte)* v); void glVertexAttrib4Niv(GLuint index, const(GLint)* v); void glVertexAttrib4Nsv(GLuint index, const(GLshort)* v); void glVertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); void glVertexAttrib4Nubv(GLuint index, const(GLubyte)* v); void glVertexAttrib4Nuiv(GLuint index, const(GLuint)* v); void glVertexAttrib4Nusv(GLuint index, const(GLushort)* v); void glVertexAttrib4bv(GLuint index, const(GLbyte)* v); void glVertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); void glVertexAttrib4dv(GLuint index, const(GLdouble)* v); void glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); void glVertexAttrib4fv(GLuint index, const(GLfloat)* v); void glVertexAttrib4iv(GLuint index, const(GLint)* v); void glVertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); void glVertexAttrib4sv(GLuint index, const(GLshort)* v); void glVertexAttrib4ubv(GLuint index, const(GLubyte)* v); void glVertexAttrib4uiv(GLuint index, const(GLuint)* v); void glVertexAttrib4usv(GLuint index, const(GLushort)* v); void glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const(GLvoid)* pointer); alias void function(GLenum modeRGB, GLenum modeAlpha) PFNGLBLENDEQUATIONSEPARATEPROC; alias void function(GLsizei n, const(GLenum)* bufs) PFNGLDRAWBUFFERSPROC; alias void function(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) PFNGLSTENCILOPSEPARATEPROC; alias void function(GLenum face, GLenum func, GLint ref_, GLuint mask) PFNGLSTENCILFUNCSEPARATEPROC; alias void function(GLenum face, GLuint mask) PFNGLSTENCILMASKSEPARATEPROC; alias void function(GLuint program, GLuint shader) PFNGLATTACHSHADERPROC; alias void function(GLuint program, GLuint index, const(GLchar)* name) PFNGLBINDATTRIBLOCATIONPROC; alias void function(GLuint shader) PFNGLCOMPILESHADERPROC; alias GLuint function() PFNGLCREATEPROGRAMPROC; alias GLuint function(GLenum type) PFNGLCREATESHADERPROC; alias void function(GLuint program) PFNGLDELETEPROGRAMPROC; alias void function(GLuint shader) PFNGLDELETESHADERPROC; alias void function(GLuint program, GLuint shader) PFNGLDETACHSHADERPROC; alias void function(GLuint index) PFNGLDISABLEVERTEXATTRIBARRAYPROC; alias void function(GLuint index) PFNGLENABLEVERTEXATTRIBARRAYPROC; alias void function(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) PFNGLGETACTIVEATTRIBPROC; alias void function(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) PFNGLGETACTIVEUNIFORMPROC; alias void function(GLuint program, GLsizei maxCount, GLsizei* count, GLuint* obj) PFNGLGETATTACHEDSHADERSPROC; alias GLint function(GLuint program, const(GLchar)* name) PFNGLGETATTRIBLOCATIONPROC; alias void function(GLuint program, GLenum pname, GLint* params) PFNGLGETPROGRAMIVPROC; alias void function(GLuint program, GLsizei bufSize, GLsizei* length, GLchar* infoLog) PFNGLGETPROGRAMINFOLOGPROC; alias void function(GLuint shader, GLenum pname, GLint* params) PFNGLGETSHADERIVPROC; alias void function(GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* infoLog) PFNGLGETSHADERINFOLOGPROC; alias void function(GLuint shader, GLsizei bufSize, GLsizei* length, GLchar* source) PFNGLGETSHADERSOURCEPROC; alias GLint function(GLuint program, const(GLchar)* name) PFNGLGETUNIFORMLOCATIONPROC; alias void function(GLuint program, GLint location, GLfloat* params) PFNGLGETUNIFORMFVPROC; alias void function(GLuint program, GLint location, GLint* params) PFNGLGETUNIFORMIVPROC; alias void function(GLuint index, GLenum pname, GLdouble* params) PFNGLGETVERTEXATTRIBDVPROC; alias void function(GLuint index, GLenum pname, GLfloat* params) PFNGLGETVERTEXATTRIBFVPROC; alias void function(GLuint index, GLenum pname, GLint* params) PFNGLGETVERTEXATTRIBIVPROC; alias void function(GLuint index, GLenum pname, GLvoid** pointer) PFNGLGETVERTEXATTRIBPOINTERVPROC; alias GLboolean function(GLuint program) PFNGLISPROGRAMPROC; alias GLboolean function(GLuint shader) PFNGLISSHADERPROC; alias void function(GLuint program) PFNGLLINKPROGRAMPROC; alias void function(GLuint shader, GLsizei count, const(GLchar)** string, const(GLint)* length) PFNGLSHADERSOURCEPROC; alias void function(GLuint program) PFNGLUSEPROGRAMPROC; alias void function(GLint location, GLfloat v0) PFNGLUNIFORM1FPROC; alias void function(GLint location, GLfloat v0, GLfloat v1) PFNGLUNIFORM2FPROC; alias void function(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) PFNGLUNIFORM3FPROC; alias void function(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) PFNGLUNIFORM4FPROC; alias void function(GLint location, GLint v0) PFNGLUNIFORM1IPROC; alias void function(GLint location, GLint v0, GLint v1) PFNGLUNIFORM2IPROC; alias void function(GLint location, GLint v0, GLint v1, GLint v2) PFNGLUNIFORM3IPROC; alias void function(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) PFNGLUNIFORM4IPROC; alias void function(GLint location, GLsizei count, const(GLfloat)* value) PFNGLUNIFORM1FVPROC; alias void function(GLint location, GLsizei count, const(GLfloat)* value) PFNGLUNIFORM2FVPROC; alias void function(GLint location, GLsizei count, const(GLfloat)* value) PFNGLUNIFORM3FVPROC; alias void function(GLint location, GLsizei count, const(GLfloat)* value) PFNGLUNIFORM4FVPROC; alias void function(GLint location, GLsizei count, const(GLint)* value) PFNGLUNIFORM1IVPROC; alias void function(GLint location, GLsizei count, const(GLint)* value) PFNGLUNIFORM2IVPROC; alias void function(GLint location, GLsizei count, const(GLint)* value) PFNGLUNIFORM3IVPROC; alias void function(GLint location, GLsizei count, const(GLint)* value) PFNGLUNIFORM4IVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLUNIFORMMATRIX2FVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLUNIFORMMATRIX3FVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLUNIFORMMATRIX4FVPROC; alias void function(GLuint program) PFNGLVALIDATEPROGRAMPROC; alias void function(GLuint index, GLdouble x) PFNGLVERTEXATTRIB1DPROC; alias void function(GLuint index, const(GLdouble)* v) PFNGLVERTEXATTRIB1DVPROC; alias void function(GLuint index, GLfloat x) PFNGLVERTEXATTRIB1FPROC; alias void function(GLuint index, const(GLfloat)* v) PFNGLVERTEXATTRIB1FVPROC; alias void function(GLuint index, GLshort x) PFNGLVERTEXATTRIB1SPROC; alias void function(GLuint index, const(GLshort)* v) PFNGLVERTEXATTRIB1SVPROC; alias void function(GLuint index, GLdouble x, GLdouble y) PFNGLVERTEXATTRIB2DPROC; alias void function(GLuint index, const(GLdouble)* v) PFNGLVERTEXATTRIB2DVPROC; alias void function(GLuint index, GLfloat x, GLfloat y) PFNGLVERTEXATTRIB2FPROC; alias void function(GLuint index, const(GLfloat)* v) PFNGLVERTEXATTRIB2FVPROC; alias void function(GLuint index, GLshort x, GLshort y) PFNGLVERTEXATTRIB2SPROC; alias void function(GLuint index, const(GLshort)* v) PFNGLVERTEXATTRIB2SVPROC; alias void function(GLuint index, GLdouble x, GLdouble y, GLdouble z) PFNGLVERTEXATTRIB3DPROC; alias void function(GLuint index, const(GLdouble)* v) PFNGLVERTEXATTRIB3DVPROC; alias void function(GLuint index, GLfloat x, GLfloat y, GLfloat z) PFNGLVERTEXATTRIB3FPROC; alias void function(GLuint index, const(GLfloat)* v) PFNGLVERTEXATTRIB3FVPROC; alias void function(GLuint index, GLshort x, GLshort y, GLshort z) PFNGLVERTEXATTRIB3SPROC; alias void function(GLuint index, const(GLshort)* v) PFNGLVERTEXATTRIB3SVPROC; alias void function(GLuint index, const(GLbyte)* v) PFNGLVERTEXATTRIB4NBVPROC; alias void function(GLuint index, const(GLint)* v) PFNGLVERTEXATTRIB4NIVPROC; alias void function(GLuint index, const(GLshort)* v) PFNGLVERTEXATTRIB4NSVPROC; alias void function(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) PFNGLVERTEXATTRIB4NUBPROC; alias void function(GLuint index, const(GLubyte)* v) PFNGLVERTEXATTRIB4NUBVPROC; alias void function(GLuint index, const(GLuint)* v) PFNGLVERTEXATTRIB4NUIVPROC; alias void function(GLuint index, const(GLushort)* v) PFNGLVERTEXATTRIB4NUSVPROC; alias void function(GLuint index, const(GLbyte)* v) PFNGLVERTEXATTRIB4BVPROC; alias void function(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) PFNGLVERTEXATTRIB4DPROC; alias void function(GLuint index, const(GLdouble)* v) PFNGLVERTEXATTRIB4DVPROC; alias void function(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) PFNGLVERTEXATTRIB4FPROC; alias void function(GLuint index, const(GLfloat)* v) PFNGLVERTEXATTRIB4FVPROC; alias void function(GLuint index, const(GLint)* v) PFNGLVERTEXATTRIB4IVPROC; alias void function(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) PFNGLVERTEXATTRIB4SPROC; alias void function(GLuint index, const(GLshort)* v) PFNGLVERTEXATTRIB4SVPROC; alias void function(GLuint index, const(GLubyte)* v) PFNGLVERTEXATTRIB4UBVPROC; alias void function(GLuint index, const(GLuint)* v) PFNGLVERTEXATTRIB4UIVPROC; alias void function(GLuint index, const(GLushort)* v) PFNGLVERTEXATTRIB4USVPROC; alias void function(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const(GLvoid)* pointer) PFNGLVERTEXATTRIBPOINTERPROC; // GL_VERSION_2_1 void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLUNIFORMMATRIX2X3FVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLUNIFORMMATRIX3X2FVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLUNIFORMMATRIX2X4FVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLUNIFORMMATRIX4X2FVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLUNIFORMMATRIX3X4FVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLUNIFORMMATRIX4X3FVPROC; // GL_VERSION_3_0 /* OpenGL 3.0 also reuses entry points from these extensions: */ /* ARB_framebuffer_object*/ /* ARB_map_buffer_range*/ /* ARB_vertex_array_object)*/ void glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); void glGetBooleani_v(GLenum target, GLuint index, GLboolean* data); void glGetIntegeri_v(GLenum target, GLuint index, GLint* data); void glEnablei(GLenum target, GLuint index); void glDisablei(GLenum target, GLuint index); GLboolean glIsEnabledi(GLenum target, GLuint index); void glBeginTransformFeedback(GLenum primitiveMode); void glEndTransformFeedback(); void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); void glBindBufferBase(GLenum target, GLuint index, GLuint buffer); void glTransformFeedbackVaryings(GLuint program, GLsizei count, const(GLchar)** varyings, GLenum bufferMode); void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name); void glClampColor(GLenum target, GLenum clamp); void glBeginConditionalRender(GLuint id, GLenum mode); void glEndConditionalRender(); void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const(GLvoid)* pointer); void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params); void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params); void glVertexAttribI1i(GLuint index, GLint x); void glVertexAttribI2i(GLuint index, GLint x, GLint y); void glVertexAttribI3i(GLuint index, GLint x, GLint y, GLint z); void glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w); void glVertexAttribI1ui(GLuint index, GLuint x); void glVertexAttribI2ui(GLuint index, GLuint x, GLuint y); void glVertexAttribI3ui(GLuint index, GLuint x, GLuint y, GLuint z); void glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); void glVertexAttribI1iv(GLuint index, const(GLint)* v); void glVertexAttribI2iv(GLuint index, const(GLint)* v); void glVertexAttribI3iv(GLuint index, const(GLint)* v); void glVertexAttribI4iv(GLuint index, const(GLint)* v); void glVertexAttribI1uiv(GLuint index, const(GLuint)* v); void glVertexAttribI2uiv(GLuint index, const(GLuint)* v); void glVertexAttribI3uiv(GLuint index, const(GLuint)* v); void glVertexAttribI4uiv(GLuint index, const(GLuint)* v); void glVertexAttribI4bv(GLuint index, const(GLbyte)* v); void glVertexAttribI4sv(GLuint index, const(GLshort)* v); void glVertexAttribI4ubv(GLuint index, const(GLubyte)* v); void glVertexAttribI4usv(GLuint index, const(GLushort)* v); void glGetUniformuiv(GLuint program, GLint location, GLuint* params); void glBindFragDataLocation(GLuint program, GLuint color, const(GLchar)* name); GLint glGetFragDataLocation(GLuint program, const(GLchar)* name); void glUniform1ui(GLint location, GLuint v0); void glUniform2ui(GLint location, GLuint v0, GLuint v1); void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2); void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); void glUniform1uiv(GLint location, GLsizei count, const(GLuint)* value); void glUniform2uiv(GLint location, GLsizei count, const(GLuint)* value); void glUniform3uiv(GLint location, GLsizei count, const(GLuint)* value); void glUniform4uiv(GLint location, GLsizei count, const(GLuint)* value); void glTexParameterIiv(GLenum target, GLenum pname, const(GLint)* params); void glTexParameterIuiv(GLenum target, GLenum pname, const(GLuint)* params); void glGetTexParameterIiv(GLenum target, GLenum pname, GLint* params); void glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint* params); void glClearBufferiv(GLenum buffer, GLint drawbuffer, const(GLint)* value); void glClearBufferuiv(GLenum buffer, GLint drawbuffer, const(GLuint)* value); void glClearBufferfv(GLenum buffer, GLint drawbuffer, const(GLfloat)* value); void glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); const(GLubyte)* glGetStringi(GLenum name, GLuint index); alias void function(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) PFNGLCOLORMASKIPROC; alias void function(GLenum target, GLuint index, GLboolean* data) PFNGLGETBOOLEANI_VPROC; alias void function(GLenum target, GLuint index, GLint* data) PFNGLGETINTEGERI_VPROC; alias void function(GLenum target, GLuint index) PFNGLENABLEIPROC; alias void function(GLenum target, GLuint index) PFNGLDISABLEIPROC; alias GLboolean function(GLenum target, GLuint index) PFNGLISENABLEDIPROC; alias void function(GLenum primitiveMode) PFNGLBEGINTRANSFORMFEEDBACKPROC; alias void function() PFNGLENDTRANSFORMFEEDBACKPROC; alias void function(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) PFNGLBINDBUFFERRANGEPROC; alias void function(GLenum target, GLuint index, GLuint buffer) PFNGLBINDBUFFERBASEPROC; alias void function(GLuint program, GLsizei count, const(GLchar)** varyings, GLenum bufferMode) PFNGLTRANSFORMFEEDBACKVARYINGSPROC; alias void function(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) PFNGLGETTRANSFORMFEEDBACKVARYINGPROC; alias void function(GLenum target, GLenum clamp) PFNGLCLAMPCOLORPROC; alias void function(GLuint id, GLenum mode) PFNGLBEGINCONDITIONALRENDERPROC; alias void function() PFNGLENDCONDITIONALRENDERPROC; alias void function(GLuint index, GLint size, GLenum type, GLsizei stride, const(GLvoid)* pointer) PFNGLVERTEXATTRIBIPOINTERPROC; alias void function(GLuint index, GLenum pname, GLint* params) PFNGLGETVERTEXATTRIBIIVPROC; alias void function(GLuint index, GLenum pname, GLuint* params) PFNGLGETVERTEXATTRIBIUIVPROC; alias void function(GLuint index, GLint x) PFNGLVERTEXATTRIBI1IPROC; alias void function(GLuint index, GLint x, GLint y) PFNGLVERTEXATTRIBI2IPROC; alias void function(GLuint index, GLint x, GLint y, GLint z) PFNGLVERTEXATTRIBI3IPROC; alias void function(GLuint index, GLint x, GLint y, GLint z, GLint w) PFNGLVERTEXATTRIBI4IPROC; alias void function(GLuint index, GLuint x) PFNGLVERTEXATTRIBI1UIPROC; alias void function(GLuint index, GLuint x, GLuint y) PFNGLVERTEXATTRIBI2UIPROC; alias void function(GLuint index, GLuint x, GLuint y, GLuint z) PFNGLVERTEXATTRIBI3UIPROC; alias void function(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) PFNGLVERTEXATTRIBI4UIPROC; alias void function(GLuint index, const(GLint)* v) PFNGLVERTEXATTRIBI1IVPROC; alias void function(GLuint index, const(GLint)* v) PFNGLVERTEXATTRIBI2IVPROC; alias void function(GLuint index, const(GLint)* v) PFNGLVERTEXATTRIBI3IVPROC; alias void function(GLuint index, const(GLint)* v) PFNGLVERTEXATTRIBI4IVPROC; alias void function(GLuint index, const(GLuint)* v) PFNGLVERTEXATTRIBI1UIVPROC; alias void function(GLuint index, const(GLuint)* v) PFNGLVERTEXATTRIBI2UIVPROC; alias void function(GLuint index, const(GLuint)* v) PFNGLVERTEXATTRIBI3UIVPROC; alias void function(GLuint index, const(GLuint)* v) PFNGLVERTEXATTRIBI4UIVPROC; alias void function(GLuint index, const(GLbyte)* v) PFNGLVERTEXATTRIBI4BVPROC; alias void function(GLuint index, const(GLshort)* v) PFNGLVERTEXATTRIBI4SVPROC; alias void function(GLuint index, const(GLubyte)* v) PFNGLVERTEXATTRIBI4UBVPROC; alias void function(GLuint index, const(GLushort)* v) PFNGLVERTEXATTRIBI4USVPROC; alias void function(GLuint program, GLint location, GLuint* params) PFNGLGETUNIFORMUIVPROC; alias void function(GLuint program, GLuint color, const(GLchar)* name) PFNGLBINDFRAGDATALOCATIONPROC; alias GLint function(GLuint program, const(GLchar)* name) PFNGLGETFRAGDATALOCATIONPROC; alias void function(GLint location, GLuint v0) PFNGLUNIFORM1UIPROC; alias void function(GLint location, GLuint v0, GLuint v1) PFNGLUNIFORM2UIPROC; alias void function(GLint location, GLuint v0, GLuint v1, GLuint v2) PFNGLUNIFORM3UIPROC; alias void function(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) PFNGLUNIFORM4UIPROC; alias void function(GLint location, GLsizei count, const(GLuint)* value) PFNGLUNIFORM1UIVPROC; alias void function(GLint location, GLsizei count, const(GLuint)* value) PFNGLUNIFORM2UIVPROC; alias void function(GLint location, GLsizei count, const(GLuint)* value) PFNGLUNIFORM3UIVPROC; alias void function(GLint location, GLsizei count, const(GLuint)* value) PFNGLUNIFORM4UIVPROC; alias void function(GLenum target, GLenum pname, const(GLint)* params) PFNGLTEXPARAMETERIIVPROC; alias void function(GLenum target, GLenum pname, const(GLuint)* params) PFNGLTEXPARAMETERIUIVPROC; alias void function(GLenum target, GLenum pname, GLint* params) PFNGLGETTEXPARAMETERIIVPROC; alias void function(GLenum target, GLenum pname, GLuint* params) PFNGLGETTEXPARAMETERIUIVPROC; alias void function(GLenum buffer, GLint drawbuffer, const(GLint)* value) PFNGLCLEARBUFFERIVPROC; alias void function(GLenum buffer, GLint drawbuffer, const(GLuint)* value) PFNGLCLEARBUFFERUIVPROC; alias void function(GLenum buffer, GLint drawbuffer, const(GLfloat)* value) PFNGLCLEARBUFFERFVPROC; alias void function(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) PFNGLCLEARBUFFERFIPROC; alias const(GLubyte)* function(GLenum name, GLuint index) PFNGLGETSTRINGIPROC; // GL_VERSION_3_1 /* OpenGL 3.1 also reuses entry points from these extensions:*/ /* ARB_copy_buffer*/ /* ARB_uniform_buffer_object*/ void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount); void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const(GLvoid)* indices, GLsizei instancecount); void glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer); void glPrimitiveRestartIndex(GLuint index); alias void function(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) PFNGLDRAWARRAYSINSTANCEDPROC; alias void function(GLenum mode, GLsizei count, GLenum type, const(GLvoid)* indices, GLsizei instancecount) PFNGLDRAWELEMENTSINSTANCEDPROC; alias void function(GLenum target, GLenum internalformat, GLuint buffer) PFNGLTEXBUFFERPROC; alias void function(GLuint index) PFNGLPRIMITIVERESTARTINDEXPROC; // GL_VERSION_3_2 /* OpenGL 3.2 also reuses entry points from these extensions:*/ /* ARB_draw_elements_base_vertex*/ /* ARB_provoking_vertex*/ /* ARB_sync*/ /* ARB_texture_multisample*/ void glGetInteger64i_v(GLenum target, GLuint index, GLint64* data); void glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params); void glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level); alias void function(GLenum target, GLuint index, GLint64* data) PFNGLGETINTEGER64I_VPROC; alias void function(GLenum target, GLenum pname, GLint64* params) PFNGLGETBUFFERPARAMETERI64VPROC; alias void function(GLenum target, GLenum attachment, GLuint texture, GLint level) PFNGLFRAMEBUFFERTEXTUREPROC; // GL_VERSION_3_3 /* OpenGL 3.3 also reuses entry points from these extensions:*/ /* ARB_blend_func_extended*/ /* ARB_sampler_objects*/ /* ARB_explicit_attrib_location, but it has none*/ /* ARB_occlusion_query2(no entry points)*/ /* ARB_shader_bit_encoding(no entry points)*/ /* ARB_texture_rgb10_a2ui(no entry points)*/ /* ARB_texture_swizzle(no entry points)*/ /* ARB_timer_query*/ /* ARB_vertex_type_2_10_10_10_rev*/ void glVertexAttribDivisor(GLuint index, GLuint divisor); alias void function(GLuint index, GLuint divisor) PFNGLVERTEXATTRIBDIVISORPROC; // GL_VERSION_4_0 /* OpenGL 4.0 also reuses entry points from these extensions:*/ /* ARB_texture_query_lod(no entry points)*/ /* ARB_draw_indirect*/ /* ARB_gpu_shader5(no entry points)*/ /* ARB_gpu_shader_fp64*/ /* ARB_shader_subroutine*/ /* ARB_tessellation_shader*/ /* ARB_texture_buffer_object_rgb32(no entry points)*/ /* ARB_texture_cube_map_array(no entry points)*/ /* ARB_texture_gather(no entry points)*/ /* ARB_transform_feedback2*/ /* ARB_transform_feedback3*/ void glMinSampleShading(GLfloat value); void glBlendEquationi(GLuint buf, GLenum mode); void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha); void glBlendFunci(GLuint buf, GLenum src, GLenum dst); void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); alias void function(GLfloat value) PFNGLMINSAMPLESHADINGPROC; alias void function(GLuint buf, GLenum mode) PFNGLBLENDEQUATIONIPROC; alias void function(GLuint buf, GLenum modeRGB, GLenum modeAlpha) PFNGLBLENDEQUATIONSEPARATEIPROC; alias void function(GLuint buf, GLenum src, GLenum dst) PFNGLBLENDFUNCIPROC; alias void function(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) PFNGLBLENDFUNCSEPARATEIPROC; // GL_VERSION_4_1 /* OpenGL 4.1 reuses entry points from these extensions:*/ /* ARB_ES2_compatibility*/ /* ARB_get_program_binary*/ /* ARB_separate_shader_objects*/ /* ARB_shader_precision(no entry points)*/ /* ARB_vertex_attrib_64bit*/ /* ARB_viewport_array*/ // GL_VERSION_4_2 /* OpenGL 4.2 reuses entry points from these extensions:*/ /* ARB_base_instance*/ /* ARB_shading_language_420pack(no entry points)*/ /* ARB_transform_feedback_instanced*/ /* ARB_compressed_texture_pixel_storage(no entry points)*/ /* ARB_conservative_depth(no entry points)*/ /* ARB_internalformat_query*/ /* ARB_map_buffer_alignment(no entry points)*/ /* ARB_shader_atomic_counters*/ /* ARB_shader_image_load_store*/ /* ARB_shading_language_packing(no entry points)*/ /* ARB_texture_storage*/ // GL_VERSION_4_3 /* OpenGL 4.3 reuses entry points from these extensions:*/ /* ARB_arrays_of_arrays(no entry points, GLSL only)*/ /* ARB_fragment_layer_viewport(no entry points, GLSL only)*/ /* ARB_shader_image_size(no entry points, GLSL only)*/ /* ARB_ES3_compatibility(no entry points)*/ /* ARB_clear_buffer_object*/ /* ARB_compute_shader*/ /* ARB_copy_image*/ /* KHR_debug(includes ARB_debug_output commands promoted to KHR without suffixes)*/ /* ARB_explicit_uniform_location(no entry points)*/ /* ARB_framebuffer_no_attachments*/ /* ARB_internalformat_query2*/ /* ARB_invalidate_subdata*/ /* ARB_multi_draw_indirect*/ /* ARB_program_interface_query*/ /* ARB_robust_buffer_access_behavior(no entry points)*/ /* ARB_shader_storage_buffer_object*/ /* ARB_stencil_texturing(no entry points)*/ /* ARB_texture_buffer_range*/ /* ARB_texture_query_levels(no entry points)*/ /* ARB_texture_storage_multisample*/ /* ARB_texture_view*/ /* ARB_vertex_attrib_binding*/ // GL_ARB_depth_buffer_float // GL_ARB_framebuffer_object GLboolean glIsRenderbuffer(GLuint renderbuffer); void glBindRenderbuffer(GLenum target, GLuint renderbuffer); void glDeleteRenderbuffers(GLsizei n, const(GLuint)* renderbuffers); void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers); void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params); GLboolean glIsFramebuffer(GLuint framebuffer); void glBindFramebuffer(GLenum target, GLuint framebuffer); void glDeleteFramebuffers(GLsizei n, const(GLuint)* framebuffers); void glGenFramebuffers(GLsizei n, GLuint* framebuffers); GLenum glCheckFramebufferStatus(GLenum target); void glFramebufferTexture1D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); void glFramebufferTexture3D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params); void glGenerateMipmap(GLenum target); void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); alias GLboolean function(GLuint renderbuffer) PFNGLISRENDERBUFFERPROC; alias void function(GLenum target, GLuint renderbuffer) PFNGLBINDRENDERBUFFERPROC; alias void function(GLsizei n, const(GLuint)* renderbuffers) PFNGLDELETERENDERBUFFERSPROC; alias void function(GLsizei n, GLuint* renderbuffers) PFNGLGENRENDERBUFFERSPROC; alias void function(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) PFNGLRENDERBUFFERSTORAGEPROC; alias void function(GLenum target, GLenum pname, GLint* params) PFNGLGETRENDERBUFFERPARAMETERIVPROC; alias GLboolean function(GLuint framebuffer) PFNGLISFRAMEBUFFERPROC; alias void function(GLenum target, GLuint framebuffer) PFNGLBINDFRAMEBUFFERPROC; alias void function(GLsizei n, const(GLuint)* framebuffers) PFNGLDELETEFRAMEBUFFERSPROC; alias void function(GLsizei n, GLuint* framebuffers) PFNGLGENFRAMEBUFFERSPROC; alias GLenum function(GLenum target) PFNGLCHECKFRAMEBUFFERSTATUSPROC; alias void function(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) PFNGLFRAMEBUFFERTEXTURE1DPROC; alias void function(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) PFNGLFRAMEBUFFERTEXTURE2DPROC; alias void function(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) PFNGLFRAMEBUFFERTEXTURE3DPROC; alias void function(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) PFNGLFRAMEBUFFERRENDERBUFFERPROC; alias void function(GLenum target, GLenum attachment, GLenum pname, GLint* params) PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC; alias void function(GLenum target) PFNGLGENERATEMIPMAPPROC; alias void function(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) PFNGLBLITFRAMEBUFFERPROC; alias void function(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC; alias void function(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) PFNGLFRAMEBUFFERTEXTURELAYERPROC; // GL_ARB_framebuffer_sRGB // GL_ARB_half_float_vertex // GL_ARB_map_buffer_range GLvoid* glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length); alias GLvoid* function(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) PFNGLMAPBUFFERRANGEPROC; alias void function(GLenum target, GLintptr offset, GLsizeiptr length) PFNGLFLUSHMAPPEDBUFFERRANGEPROC; // GL_ARB_texture_compression_rgtc // GL_ARB_texture_rg // GL_ARB_vertex_array_object void glBindVertexArray(GLuint array); void glDeleteVertexArrays(GLsizei n, const(GLuint)* arrays); void glGenVertexArrays(GLsizei n, GLuint* arrays); GLboolean glIsVertexArray(GLuint array); alias void function(GLuint array) PFNGLBINDVERTEXARRAYPROC; alias void function(GLsizei n, const(GLuint)* arrays) PFNGLDELETEVERTEXARRAYSPROC; alias void function(GLsizei n, GLuint* arrays) PFNGLGENVERTEXARRAYSPROC; alias GLboolean function(GLuint array) PFNGLISVERTEXARRAYPROC; // GL_ARB_uniform_buffer_object void glGetUniformIndices(GLuint program, GLsizei uniformCount, const(GLchar)** uniformNames, GLuint* uniformIndices); void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const(GLuint)* uniformIndices, GLenum pname, GLint* params); void glGetActiveUniformName(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformName); GLuint glGetUniformBlockIndex(GLuint program, const(GLchar)* uniformBlockName); void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params); void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName); void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); alias void function(GLuint program, GLsizei uniformCount, const(GLchar)** uniformNames, GLuint* uniformIndices) PFNGLGETUNIFORMINDICESPROC; alias void function(GLuint program, GLsizei uniformCount, const(GLuint)* uniformIndices, GLenum pname, GLint* params) PFNGLGETACTIVEUNIFORMSIVPROC; alias void function(GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformName) PFNGLGETACTIVEUNIFORMNAMEPROC; alias GLuint function(GLuint program, const(GLchar)* uniformBlockName) PFNGLGETUNIFORMBLOCKINDEXPROC; alias void function(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) PFNGLGETACTIVEUNIFORMBLOCKIVPROC; alias void function(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC; alias void function(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) PFNGLUNIFORMBLOCKBINDINGPROC; // GL_ARB_copy_buffer void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); alias void function(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) PFNGLCOPYBUFFERSUBDATAPROC; // GL_ARB_depth_clamp // GL_ARB_draw_elements_base_vertex void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const(GLvoid)* indices, GLint basevertex); void glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const(GLvoid)* indices, GLint basevertex); void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const(GLvoid)* indices, GLsizei instancecount, GLint basevertex); void glMultiDrawElementsBaseVertex(GLenum mode, const(GLsizei)* count, GLenum type, const(GLvoid)** indices, GLsizei drawcount, const(GLint)* basevertex); alias void function(GLenum mode, GLsizei count, GLenum type, const(GLvoid)* indices, GLint basevertex) PFNGLDRAWELEMENTSBASEVERTEXPROC; alias void function(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const(GLvoid)* indices, GLint basevertex) PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC; alias void function(GLenum mode, GLsizei count, GLenum type, const(GLvoid)* indices, GLsizei instancecount, GLint basevertex) PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC; alias void function(GLenum mode, const(GLsizei)* count, GLenum type, const(GLvoid)** indices, GLsizei drawcount, const(GLint)* basevertex) PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC; // GL_ARB_fragment_coord_conventions // GL_ARB_provoking_vertex void glProvokingVertex(GLenum mode); alias void function(GLenum mode) PFNGLPROVOKINGVERTEXPROC; // GL_ARB_seamless_cube_map // GL_ARB_sync GLsync glFenceSync(GLenum condition, GLbitfield flags); GLboolean glIsSync(GLsync sync); void glDeleteSync(GLsync sync); GLenum glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout); void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout); void glGetInteger64v(GLenum pname, GLint64* params); void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values); alias GLsync function(GLenum condition, GLbitfield flags) PFNGLFENCESYNCPROC; alias GLboolean function(GLsync sync) PFNGLISSYNCPROC; alias void function(GLsync sync) PFNGLDELETESYNCPROC; alias GLenum function(GLsync sync, GLbitfield flags, GLuint64 timeout) PFNGLCLIENTWAITSYNCPROC; alias void function(GLsync sync, GLbitfield flags, GLuint64 timeout) PFNGLWAITSYNCPROC; alias void function(GLenum pname, GLint64* params) PFNGLGETINTEGER64VPROC; alias void function(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) PFNGLGETSYNCIVPROC; // GL_ARB_texture_multisample void glTexImage2DMultisample(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); void glTexImage3DMultisample(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat* val); void glSampleMaski(GLuint index, GLbitfield mask); alias void function(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) PFNGLTEXIMAGE2DMULTISAMPLEPROC; alias void function(GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) PFNGLTEXIMAGE3DMULTISAMPLEPROC; alias void function(GLenum pname, GLuint index, GLfloat* val) PFNGLGETMULTISAMPLEFVPROC; alias void function(GLuint index, GLbitfield mask) PFNGLSAMPLEMASKIPROC; // GL_ARB_vertex_array_bgra // GL_ARB_draw_buffers_blend void glBlendEquationiARB(GLuint buf, GLenum mode); void glBlendEquationSeparateiARB(GLuint buf, GLenum modeRGB, GLenum modeAlpha); void glBlendFunciARB(GLuint buf, GLenum src, GLenum dst); void glBlendFuncSeparateiARB(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); alias void function(GLuint buf, GLenum mode) PFNGLBLENDEQUATIONIARBPROC; alias void function(GLuint buf, GLenum modeRGB, GLenum modeAlpha) PFNGLBLENDEQUATIONSEPARATEIARBPROC; alias void function(GLuint buf, GLenum src, GLenum dst) PFNGLBLENDFUNCIARBPROC; alias void function(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) PFNGLBLENDFUNCSEPARATEIARBPROC; // GL_ARB_sample_shading void glMinSampleShadingARB(GLfloat value); alias void function(GLfloat value) PFNGLMINSAMPLESHADINGARBPROC; // GL_ARB_texture_cube_map_array // GL_ARB_texture_gather // GL_ARB_texture_query_lod // GL_ARB_shading_language_include void glNamedStringARB(GLenum type, GLint namelen, const(GLchar)* name, GLint stringlen, const(GLchar)* string); void glDeleteNamedStringARB(GLint namelen, const(GLchar)* name); void glCompileShaderIncludeARB(GLuint shader, GLsizei count, const(GLchar*)* path, const(GLint)* length); GLboolean glIsNamedStringARB(GLint namelen, const(GLchar)* name); void glGetNamedStringARB(GLint namelen, const(GLchar)* name, GLsizei bufSize, GLint* stringlen, GLchar* string); void glGetNamedStringivARB(GLint namelen, const(GLchar)* name, GLenum pname, GLint* params); alias void function(GLenum type, GLint namelen, const(GLchar)* name, GLint stringlen, const(GLchar)* string) PFNGLNAMEDSTRINGARBPROC; alias void function(GLint namelen, const(GLchar)* name) PFNGLDELETENAMEDSTRINGARBPROC; alias void function(GLuint shader, GLsizei count, const(GLchar*)* path, const(GLint)* length) PFNGLCOMPILESHADERINCLUDEARBPROC; alias GLboolean function(GLint namelen, const(GLchar)* name) PFNGLISNAMEDSTRINGARBPROC; alias void function(GLint namelen, const(GLchar)* name, GLsizei bufSize, GLint* stringlen, GLchar* string) PFNGLGETNAMEDSTRINGARBPROC; alias void function(GLint namelen, const(GLchar)* name, GLenum pname, GLint* params) PFNGLGETNAMEDSTRINGIVARBPROC; // GL_ARB_texture_compression_bptc // GL_ARB_blend_func_extended void glBindFragDataLocationIndexed(GLuint program, GLuint colorNumber, GLuint index, const(GLchar)* name); GLint glGetFragDataIndex(GLuint program, const(GLchar)* name); alias void function(GLuint program, GLuint colorNumber, GLuint index, const(GLchar)* name) PFNGLBINDFRAGDATALOCATIONINDEXEDPROC; alias GLint function(GLuint program, const(GLchar)* name) PFNGLGETFRAGDATAINDEXPROC; // GL_ARB_explicit_attrib_location // GL_ARB_occlusion_query2 // GL_ARB_sampler_objects void glGenSamplers(GLsizei count, GLuint* samplers); void glDeleteSamplers(GLsizei count, const(GLuint)* samplers); GLboolean glIsSampler(GLuint sampler); void glBindSampler(GLuint unit, GLuint sampler); void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param); void glSamplerParameteriv(GLuint sampler, GLenum pname, const(GLint)* param); void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param); void glSamplerParameterfv(GLuint sampler, GLenum pname, const(GLfloat)* param); void glSamplerParameterIiv(GLuint sampler, GLenum pname, const(GLint)* param); void glSamplerParameterIuiv(GLuint sampler, GLenum pname, const(GLuint)* param); void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params); void glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint* params); void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params); void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint* params); alias void function(GLsizei count, GLuint* samplers) PFNGLGENSAMPLERSPROC; alias void function(GLsizei count, const(GLuint)* samplers) PFNGLDELETESAMPLERSPROC; alias GLboolean function(GLuint sampler) PFNGLISSAMPLERPROC; alias void function(GLuint unit, GLuint sampler) PFNGLBINDSAMPLERPROC; alias void function(GLuint sampler, GLenum pname, GLint param) PFNGLSAMPLERPARAMETERIPROC; alias void function(GLuint sampler, GLenum pname, const(GLint)* param) PFNGLSAMPLERPARAMETERIVPROC; alias void function(GLuint sampler, GLenum pname, GLfloat param) PFNGLSAMPLERPARAMETERFPROC; alias void function(GLuint sampler, GLenum pname, const(GLfloat)* param) PFNGLSAMPLERPARAMETERFVPROC; alias void function(GLuint sampler, GLenum pname, const(GLint)* param) PFNGLSAMPLERPARAMETERIIVPROC; alias void function(GLuint sampler, GLenum pname, const(GLuint)* param) PFNGLSAMPLERPARAMETERIUIVPROC; alias void function(GLuint sampler, GLenum pname, GLint* params) PFNGLGETSAMPLERPARAMETERIVPROC; alias void function(GLuint sampler, GLenum pname, GLint* params) PFNGLGETSAMPLERPARAMETERIIVPROC; alias void function(GLuint sampler, GLenum pname, GLfloat* params) PFNGLGETSAMPLERPARAMETERFVPROC; alias void function(GLuint sampler, GLenum pname, GLuint* params) PFNGLGETSAMPLERPARAMETERIUIVPROC; // GL_ARB_shader_bit_encoding // GL_ARB_texture_rgb10_a2ui // GL_ARB_texture_swizzle // GL_ARB_timer_query void glQueryCounter(GLuint id, GLenum target); void glGetQueryObjecti64v(GLuint id, GLenum pname, GLint64* params); void glGetQueryObjectui64v(GLuint id, GLenum pname, GLuint64* params); alias void function(GLuint id, GLenum target) PFNGLQUERYCOUNTERPROC; alias void function(GLuint id, GLenum pname, GLint64* params) PFNGLGETQUERYOBJECTI64VPROC; alias void function(GLuint id, GLenum pname, GLuint64* params) PFNGLGETQUERYOBJECTUI64VPROC; // GL_ARB_vertex_type_2_10_10_10_rev void glVertexP2ui(GLenum type, GLuint value); void glVertexP2uiv(GLenum type, const(GLuint)* value); void glVertexP3ui(GLenum type, GLuint value); void glVertexP3uiv(GLenum type, const(GLuint)* value); void glVertexP4ui(GLenum type, GLuint value); void glVertexP4uiv(GLenum type, const(GLuint)* value); void glTexCoordP1ui(GLenum type, GLuint coords); void glTexCoordP1uiv(GLenum type, const(GLuint)* coords); void glTexCoordP2ui(GLenum type, GLuint coords); void glTexCoordP2uiv(GLenum type, const(GLuint)* coords); void glTexCoordP3ui(GLenum type, GLuint coords); void glTexCoordP3uiv(GLenum type, const(GLuint)* coords); void glTexCoordP4ui(GLenum type, GLuint coords); void glTexCoordP4uiv(GLenum type, const(GLuint)* coords); void glMultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords); void glMultiTexCoordP1uiv(GLenum texture, GLenum type, const(GLuint)* coords); void glMultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords); void glMultiTexCoordP2uiv(GLenum texture, GLenum type, const(GLuint)* coords); void glMultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords); void glMultiTexCoordP3uiv(GLenum texture, GLenum type, const(GLuint)* coords); void glMultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords); void glMultiTexCoordP4uiv(GLenum texture, GLenum type, const(GLuint)* coords); void glNormalP3ui(GLenum type, GLuint coords); void glNormalP3uiv(GLenum type, const(GLuint)* coords); void glColorP3ui(GLenum type, GLuint color); void glColorP3uiv(GLenum type, const(GLuint)* color); void glColorP4ui(GLenum type, GLuint color); void glColorP4uiv(GLenum type, const(GLuint)* color); void glSecondaryColorP3ui(GLenum type, GLuint color); void glSecondaryColorP3uiv(GLenum type, const(GLuint)* color); void glVertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value); void glVertexAttribP1uiv(GLuint index, GLenum type, GLboolean normalized, const(GLuint)* value); void glVertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value); void glVertexAttribP2uiv(GLuint index, GLenum type, GLboolean normalized, const(GLuint)* value); void glVertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value); void glVertexAttribP3uiv(GLuint index, GLenum type, GLboolean normalized, const(GLuint)* value); void glVertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value); void glVertexAttribP4uiv(GLuint index, GLenum type, GLboolean normalized, const(GLuint)* value); alias void function(GLenum type, GLuint value) PFNGLVERTEXP2UIPROC; alias void function(GLenum type, const(GLuint)* value) PFNGLVERTEXP2UIVPROC; alias void function(GLenum type, GLuint value) PFNGLVERTEXP3UIPROC; alias void function(GLenum type, const(GLuint)* value) PFNGLVERTEXP3UIVPROC; alias void function(GLenum type, GLuint value) PFNGLVERTEXP4UIPROC; alias void function(GLenum type, const(GLuint)* value) PFNGLVERTEXP4UIVPROC; alias void function(GLenum type, GLuint coords) PFNGLTEXCOORDP1UIPROC; alias void function(GLenum type, const(GLuint)* coords) PFNGLTEXCOORDP1UIVPROC; alias void function(GLenum type, GLuint coords) PFNGLTEXCOORDP2UIPROC; alias void function(GLenum type, const(GLuint)* coords) PFNGLTEXCOORDP2UIVPROC; alias void function(GLenum type, GLuint coords) PFNGLTEXCOORDP3UIPROC; alias void function(GLenum type, const(GLuint)* coords) PFNGLTEXCOORDP3UIVPROC; alias void function(GLenum type, GLuint coords) PFNGLTEXCOORDP4UIPROC; alias void function(GLenum type, const(GLuint)* coords) PFNGLTEXCOORDP4UIVPROC; alias void function(GLenum texture, GLenum type, GLuint coords) PFNGLMULTITEXCOORDP1UIPROC; alias void function(GLenum texture, GLenum type, const(GLuint)* coords) PFNGLMULTITEXCOORDP1UIVPROC; alias void function(GLenum texture, GLenum type, GLuint coords) PFNGLMULTITEXCOORDP2UIPROC; alias void function(GLenum texture, GLenum type, const(GLuint)* coords) PFNGLMULTITEXCOORDP2UIVPROC; alias void function(GLenum texture, GLenum type, GLuint coords) PFNGLMULTITEXCOORDP3UIPROC; alias void function(GLenum texture, GLenum type, const(GLuint)* coords) PFNGLMULTITEXCOORDP3UIVPROC; alias void function(GLenum texture, GLenum type, GLuint coords) PFNGLMULTITEXCOORDP4UIPROC; alias void function(GLenum texture, GLenum type, const(GLuint)* coords) PFNGLMULTITEXCOORDP4UIVPROC; alias void function(GLenum type, GLuint coords) PFNGLNORMALP3UIPROC; alias void function(GLenum type, const(GLuint)* coords) PFNGLNORMALP3UIVPROC; alias void function(GLenum type, GLuint color) PFNGLCOLORP3UIPROC; alias void function(GLenum type, const(GLuint)* color) PFNGLCOLORP3UIVPROC; alias void function(GLenum type, GLuint color) PFNGLCOLORP4UIPROC; alias void function(GLenum type, const(GLuint)* color) PFNGLCOLORP4UIVPROC; alias void function(GLenum type, GLuint color) PFNGLSECONDARYCOLORP3UIPROC; alias void function(GLenum type, const(GLuint)* color) PFNGLSECONDARYCOLORP3UIVPROC; alias void function(GLuint index, GLenum type, GLboolean normalized, GLuint value) PFNGLVERTEXATTRIBP1UIPROC; alias void function(GLuint index, GLenum type, GLboolean normalized, const(GLuint)* value) PFNGLVERTEXATTRIBP1UIVPROC; alias void function(GLuint index, GLenum type, GLboolean normalized, GLuint value) PFNGLVERTEXATTRIBP2UIPROC; alias void function(GLuint index, GLenum type, GLboolean normalized, const(GLuint)* value) PFNGLVERTEXATTRIBP2UIVPROC; alias void function(GLuint index, GLenum type, GLboolean normalized, GLuint value) PFNGLVERTEXATTRIBP3UIPROC; alias void function(GLuint index, GLenum type, GLboolean normalized, const(GLuint)* value) PFNGLVERTEXATTRIBP3UIVPROC; alias void function(GLuint index, GLenum type, GLboolean normalized, GLuint value) PFNGLVERTEXATTRIBP4UIPROC; alias void function(GLuint index, GLenum type, GLboolean normalized, const(GLuint)* value) PFNGLVERTEXATTRIBP4UIVPROC; // GL_ARB_draw_indirect void glDrawArraysIndirect(GLenum mode, const(GLvoid)* indirect); void glDrawElementsIndirect(GLenum mode, GLenum type, const(GLvoid)* indirect); alias void function(GLenum mode, const(GLvoid)* indirect) PFNGLDRAWARRAYSINDIRECTPROC; alias void function(GLenum mode, GLenum type, const(GLvoid)* indirect) PFNGLDRAWELEMENTSINDIRECTPROC; // GL_ARB_gpu_shader5 // GL_ARB_gpu_shader_fp64 void glUniform1d(GLint location, GLdouble x); void glUniform2d(GLint location, GLdouble x, GLdouble y); void glUniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z); void glUniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); void glUniform1dv(GLint location, GLsizei count, const(GLdouble)* value); void glUniform2dv(GLint location, GLsizei count, const(GLdouble)* value); void glUniform3dv(GLint location, GLsizei count, const(GLdouble)* value); void glUniform4dv(GLint location, GLsizei count, const(GLdouble)* value); void glUniformMatrix2dv(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glUniformMatrix3dv(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glUniformMatrix4dv(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glUniformMatrix2x3dv(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glUniformMatrix2x4dv(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glUniformMatrix3x2dv(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glUniformMatrix3x4dv(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glUniformMatrix4x2dv(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glUniformMatrix4x3dv(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glGetUniformdv(GLuint program, GLint location, GLdouble* params); alias void function(GLint location, GLdouble x) PFNGLUNIFORM1DPROC; alias void function(GLint location, GLdouble x, GLdouble y) PFNGLUNIFORM2DPROC; alias void function(GLint location, GLdouble x, GLdouble y, GLdouble z) PFNGLUNIFORM3DPROC; alias void function(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w) PFNGLUNIFORM4DPROC; alias void function(GLint location, GLsizei count, const(GLdouble)* value) PFNGLUNIFORM1DVPROC; alias void function(GLint location, GLsizei count, const(GLdouble)* value) PFNGLUNIFORM2DVPROC; alias void function(GLint location, GLsizei count, const(GLdouble)* value) PFNGLUNIFORM3DVPROC; alias void function(GLint location, GLsizei count, const(GLdouble)* value) PFNGLUNIFORM4DVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLUNIFORMMATRIX2DVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLUNIFORMMATRIX3DVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLUNIFORMMATRIX4DVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLUNIFORMMATRIX2X3DVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLUNIFORMMATRIX2X4DVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLUNIFORMMATRIX3X2DVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLUNIFORMMATRIX3X4DVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLUNIFORMMATRIX4X2DVPROC; alias void function(GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLUNIFORMMATRIX4X3DVPROC; alias void function(GLuint program, GLint location, GLdouble* params) PFNGLGETUNIFORMDVPROC; // GL_ARB_shader_subroutine GLint glGetSubroutineUniformLocation(GLuint program, GLenum shadertype, const(GLchar)* name); GLuint glGetSubroutineIndex(GLuint program, GLenum shadertype, const(GLchar)* name); void glGetActiveSubroutineUniformiv(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint* values); void glGetActiveSubroutineUniformName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar* name); void glGetActiveSubroutineName(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar* name); void glUniformSubroutinesuiv(GLenum shadertype, GLsizei count, const(GLuint)* indices); void glGetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint* params); void glGetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint* values); alias GLint function(GLuint program, GLenum shadertype, const(GLchar)* name) PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC; alias GLuint function(GLuint program, GLenum shadertype, const(GLchar)* name) PFNGLGETSUBROUTINEINDEXPROC; alias void function(GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint* values) PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC; alias void function(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar* name) PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC; alias void function(GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei* length, GLchar* name) PFNGLGETACTIVESUBROUTINENAMEPROC; alias void function(GLenum shadertype, GLsizei count, const(GLuint)* indices) PFNGLUNIFORMSUBROUTINESUIVPROC; alias void function(GLenum shadertype, GLint location, GLuint* params) PFNGLGETUNIFORMSUBROUTINEUIVPROC; alias void function(GLuint program, GLenum shadertype, GLenum pname, GLint* values) PFNGLGETPROGRAMSTAGEIVPROC; // GL_ARB_tessellation_shader void glPatchParameteri(GLenum pname, GLint value); void glPatchParameterfv(GLenum pname, const(GLfloat)* values); alias void function(GLenum pname, GLint value) PFNGLPATCHPARAMETERIPROC; alias void function(GLenum pname, const(GLfloat)* values) PFNGLPATCHPARAMETERFVPROC; // GL_ARB_texture_buffer_object_rgb32 // GL_ARB_transform_feedback2 void glBindTransformFeedback(GLenum target, GLuint id); void glDeleteTransformFeedbacks(GLsizei n, const(GLuint)* ids); void glGenTransformFeedbacks(GLsizei n, GLuint* ids); GLboolean glIsTransformFeedback(GLuint id); void glPauseTransformFeedback(); void glResumeTransformFeedback(); void glDrawTransformFeedback(GLenum mode, GLuint id); alias void function(GLenum target, GLuint id) PFNGLBINDTRANSFORMFEEDBACKPROC; alias void function(GLsizei n, const(GLuint)* ids) PFNGLDELETETRANSFORMFEEDBACKSPROC; alias void function(GLsizei n, GLuint* ids) PFNGLGENTRANSFORMFEEDBACKSPROC; alias GLboolean function(GLuint id) PFNGLISTRANSFORMFEEDBACKPROC; alias void function() PFNGLPAUSETRANSFORMFEEDBACKPROC; alias void function() PFNGLRESUMETRANSFORMFEEDBACKPROC; alias void function(GLenum mode, GLuint id) PFNGLDRAWTRANSFORMFEEDBACKPROC; // GL_ARB_transform_feedback3 void glDrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream); void glBeginQueryIndexed(GLenum target, GLuint index, GLuint id); void glEndQueryIndexed(GLenum target, GLuint index); void glGetQueryIndexediv(GLenum target, GLuint index, GLenum pname, GLint* params); alias void function(GLenum mode, GLuint id, GLuint stream) PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC; alias void function(GLenum target, GLuint index, GLuint id) PFNGLBEGINQUERYINDEXEDPROC; alias void function(GLenum target, GLuint index) PFNGLENDQUERYINDEXEDPROC; alias void function(GLenum target, GLuint index, GLenum pname, GLint* params) PFNGLGETQUERYINDEXEDIVPROC; // GL_ARB_ES2_compatibility void glReleaseShaderCompiler(); void glShaderBinary(GLsizei count, const(GLuint)* shaders, GLenum binaryformat, const(GLvoid)* binary, GLsizei length); void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); void glDepthRangef(GLfloat n, GLfloat f); void glClearDepthf(GLfloat d); alias void function() PFNGLRELEASESHADERCOMPILERPROC; alias void function(GLsizei count, const(GLuint)* shaders, GLenum binaryformat, const(GLvoid)* binary, GLsizei length) PFNGLSHADERBINARYPROC; alias void function(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) PFNGLGETSHADERPRECISIONFORMATPROC; alias void function(GLfloat n, GLfloat f) PFNGLDEPTHRANGEFPROC; alias void function(GLfloat d) PFNGLCLEARDEPTHFPROC; // GL_ARB_get_program_binary void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary); void glProgramBinary(GLuint program, GLenum binaryFormat, const(GLvoid)* binary, GLsizei length); void glProgramParameteri(GLuint program, GLenum pname, GLint value); alias void function(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) PFNGLGETPROGRAMBINARYPROC; alias void function(GLuint program, GLenum binaryFormat, const(GLvoid)* binary, GLsizei length) PFNGLPROGRAMBINARYPROC; alias void function(GLuint program, GLenum pname, GLint value) PFNGLPROGRAMPARAMETERIPROC; // GL_ARB_separate_shader_objects void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program); void glActiveShaderProgram(GLuint pipeline, GLuint program); GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const(GLchar)** strings); void glBindProgramPipeline(GLuint pipeline); void glDeleteProgramPipelines(GLsizei n, const(GLuint)* pipelines); void glGenProgramPipelines(GLsizei n, GLuint* pipelines); GLboolean glIsProgramPipeline(GLuint pipeline); void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint* params); void glProgramUniform1i(GLuint program, GLint location, GLint v0); void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const(GLint)* value); void glProgramUniform1f(GLuint program, GLint location, GLfloat v0); void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const(GLfloat)* value); void glProgramUniform1d(GLuint program, GLint location, GLdouble v0); void glProgramUniform1dv(GLuint program, GLint location, GLsizei count, const(GLdouble)* value); void glProgramUniform1ui(GLuint program, GLint location, GLuint v0); void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const(GLuint)* value); void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1); void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const(GLint)* value); void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1); void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const(GLfloat)* value); void glProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1); void glProgramUniform2dv(GLuint program, GLint location, GLsizei count, const(GLdouble)* value); void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1); void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const(GLuint)* value); void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2); void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const(GLint)* value); void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const(GLfloat)* value); void glProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); void glProgramUniform3dv(GLuint program, GLint location, GLsizei count, const(GLdouble)* value); void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const(GLuint)* value); void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const(GLint)* value); void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const(GLfloat)* value); void glProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); void glProgramUniform4dv(GLuint program, GLint location, GLsizei count, const(GLdouble)* value); void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const(GLuint)* value); void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glProgramUniformMatrix2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glProgramUniformMatrix3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glProgramUniformMatrix4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value); void glProgramUniformMatrix2x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glProgramUniformMatrix3x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glProgramUniformMatrix2x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glProgramUniformMatrix4x2dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glProgramUniformMatrix3x4dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glProgramUniformMatrix4x3dv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value); void glValidateProgramPipeline(GLuint pipeline); void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog); alias void function(GLuint pipeline, GLbitfield stages, GLuint program) PFNGLUSEPROGRAMSTAGESPROC; alias void function(GLuint pipeline, GLuint program) PFNGLACTIVESHADERPROGRAMPROC; alias GLuint function(GLenum type, GLsizei count, const(GLchar)** strings) PFNGLCREATESHADERPROGRAMVPROC; alias void function(GLuint pipeline) PFNGLBINDPROGRAMPIPELINEPROC; alias void function(GLsizei n, const(GLuint)* pipelines) PFNGLDELETEPROGRAMPIPELINESPROC; alias void function(GLsizei n, GLuint* pipelines) PFNGLGENPROGRAMPIPELINESPROC; alias GLboolean function(GLuint pipeline) PFNGLISPROGRAMPIPELINEPROC; alias void function(GLuint pipeline, GLenum pname, GLint* params) PFNGLGETPROGRAMPIPELINEIVPROC; alias void function(GLuint program, GLint location, GLint v0) PFNGLPROGRAMUNIFORM1IPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLint)* value) PFNGLPROGRAMUNIFORM1IVPROC; alias void function(GLuint program, GLint location, GLfloat v0) PFNGLPROGRAMUNIFORM1FPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLfloat)* value) PFNGLPROGRAMUNIFORM1FVPROC; alias void function(GLuint program, GLint location, GLdouble v0) PFNGLPROGRAMUNIFORM1DPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLdouble)* value) PFNGLPROGRAMUNIFORM1DVPROC; alias void function(GLuint program, GLint location, GLuint v0) PFNGLPROGRAMUNIFORM1UIPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLuint)* value) PFNGLPROGRAMUNIFORM1UIVPROC; alias void function(GLuint program, GLint location, GLint v0, GLint v1) PFNGLPROGRAMUNIFORM2IPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLint)* value) PFNGLPROGRAMUNIFORM2IVPROC; alias void function(GLuint program, GLint location, GLfloat v0, GLfloat v1) PFNGLPROGRAMUNIFORM2FPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLfloat)* value) PFNGLPROGRAMUNIFORM2FVPROC; alias void function(GLuint program, GLint location, GLdouble v0, GLdouble v1) PFNGLPROGRAMUNIFORM2DPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLdouble)* value) PFNGLPROGRAMUNIFORM2DVPROC; alias void function(GLuint program, GLint location, GLuint v0, GLuint v1) PFNGLPROGRAMUNIFORM2UIPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLuint)* value) PFNGLPROGRAMUNIFORM2UIVPROC; alias void function(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) PFNGLPROGRAMUNIFORM3IPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLint)* value) PFNGLPROGRAMUNIFORM3IVPROC; alias void function(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) PFNGLPROGRAMUNIFORM3FPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLfloat)* value) PFNGLPROGRAMUNIFORM3FVPROC; alias void function(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2) PFNGLPROGRAMUNIFORM3DPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLdouble)* value) PFNGLPROGRAMUNIFORM3DVPROC; alias void function(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) PFNGLPROGRAMUNIFORM3UIPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLuint)* value) PFNGLPROGRAMUNIFORM3UIVPROC; alias void function(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) PFNGLPROGRAMUNIFORM4IPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLint)* value) PFNGLPROGRAMUNIFORM4IVPROC; alias void function(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) PFNGLPROGRAMUNIFORM4FPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLfloat)* value) PFNGLPROGRAMUNIFORM4FVPROC; alias void function(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3) PFNGLPROGRAMUNIFORM4DPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLdouble)* value) PFNGLPROGRAMUNIFORM4DVPROC; alias void function(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) PFNGLPROGRAMUNIFORM4UIPROC; alias void function(GLuint program, GLint location, GLsizei count, const(GLuint)* value) PFNGLPROGRAMUNIFORM4UIVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLPROGRAMUNIFORMMATRIX2FVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLPROGRAMUNIFORMMATRIX3FVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLPROGRAMUNIFORMMATRIX4FVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLPROGRAMUNIFORMMATRIX2DVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLPROGRAMUNIFORMMATRIX3DVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLPROGRAMUNIFORMMATRIX4DVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLfloat)* value) PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC; alias void function(GLuint program, GLint location, GLsizei count, GLboolean transpose, const(GLdouble)* value) PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC; alias void function(GLuint pipeline) PFNGLVALIDATEPROGRAMPIPELINEPROC; alias void function(GLuint pipeline, GLsizei bufSize, GLsizei* length, GLchar* infoLog) PFNGLGETPROGRAMPIPELINEINFOLOGPROC; // GL_ARB_vertex_attrib_64bit void glVertexAttribL1d(GLuint index, GLdouble x); void glVertexAttribL2d(GLuint index, GLdouble x, GLdouble y); void glVertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z); void glVertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); void glVertexAttribL1dv(GLuint index, const(GLdouble)* v); void glVertexAttribL2dv(GLuint index, const(GLdouble)* v); void glVertexAttribL3dv(GLuint index, const(GLdouble)* v); void glVertexAttribL4dv(GLuint index, const(GLdouble)* v); void glVertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const(GLvoid)* pointer); void glGetVertexAttribLdv(GLuint index, GLenum pname, GLdouble* params); alias void function(GLuint index, GLdouble x) PFNGLVERTEXATTRIBL1DPROC; alias void function(GLuint index, GLdouble x, GLdouble y) PFNGLVERTEXATTRIBL2DPROC; alias void function(GLuint index, GLdouble x, GLdouble y, GLdouble z) PFNGLVERTEXATTRIBL3DPROC; alias void function(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) PFNGLVERTEXATTRIBL4DPROC; alias void function(GLuint index, const(GLdouble)* v) PFNGLVERTEXATTRIBL1DVPROC; alias void function(GLuint index, const(GLdouble)* v) PFNGLVERTEXATTRIBL2DVPROC; alias void function(GLuint index, const(GLdouble)* v) PFNGLVERTEXATTRIBL3DVPROC; alias void function(GLuint index, const(GLdouble)* v) PFNGLVERTEXATTRIBL4DVPROC; alias void function(GLuint index, GLint size, GLenum type, GLsizei stride, const(GLvoid)* pointer) PFNGLVERTEXATTRIBLPOINTERPROC; alias void function(GLuint index, GLenum pname, GLdouble* params) PFNGLGETVERTEXATTRIBLDVPROC; // GL_ARB_viewport_array void glViewportArrayv(GLuint first, GLsizei count, const(GLfloat)* v); void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); void glViewportIndexedfv(GLuint index, const(GLfloat)* v); void glScissorArrayv(GLuint first, GLsizei count, const(GLint)* v); void glScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); void glScissorIndexedv(GLuint index, const(GLint)* v); void glDepthRangeArrayv(GLuint first, GLsizei count, const(GLdouble)* v); void glDepthRangeIndexed(GLuint index, GLdouble n, GLdouble f); void glGetFloati_v(GLenum target, GLuint index, GLfloat* data); void glGetDoublei_v(GLenum target, GLuint index, GLdouble* data); alias void function(GLuint first, GLsizei count, const(GLfloat)* v) PFNGLVIEWPORTARRAYVPROC; alias void function(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h) PFNGLVIEWPORTINDEXEDFPROC; alias void function(GLuint index, const(GLfloat)* v) PFNGLVIEWPORTINDEXEDFVPROC; alias void function(GLuint first, GLsizei count, const(GLint)* v) PFNGLSCISSORARRAYVPROC; alias void function(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height) PFNGLSCISSORINDEXEDPROC; alias void function(GLuint index, const(GLint)* v) PFNGLSCISSORINDEXEDVPROC; alias void function(GLuint first, GLsizei count, const(GLdouble)* v) PFNGLDEPTHRANGEARRAYVPROC; alias void function(GLuint index, GLdouble n, GLdouble f) PFNGLDEPTHRANGEINDEXEDPROC; alias void function(GLenum target, GLuint index, GLfloat* data) PFNGLGETFLOATI_VPROC; alias void function(GLenum target, GLuint index, GLdouble* data) PFNGLGETDOUBLEI_VPROC; // GL_ARB_cl_event GLsync glCreateSyncFromCLeventARB(_cl_context* context, _cl_event* event, GLbitfield flags); alias GLsync function(_cl_context* context, _cl_event* event, GLbitfield flags) PFNGLCREATESYNCFROMCLEVENTARBPROC; // GL_ARB_debug_output void glDebugMessageControlARB(GLenum source, GLenum type, GLenum severity, GLsizei count, const(GLuint)* ids, GLboolean enabled); void glDebugMessageInsertARB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const(GLchar)* buf); void glDebugMessageCallbackARB(GLDEBUGPROCARB callback, const(GLvoid)* userParam); GLuint glGetDebugMessageLogARB(GLuint count, GLsizei bufsize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog); alias void function(GLenum source, GLenum type, GLenum severity, GLsizei count, const(GLuint)* ids, GLboolean enabled) PFNGLDEBUGMESSAGECONTROLARBPROC; alias void function(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const(GLchar)* buf) PFNGLDEBUGMESSAGEINSERTARBPROC; alias void function(GLDEBUGPROCARB callback, const(GLvoid)* userParam) PFNGLDEBUGMESSAGECALLBACKARBPROC; alias GLuint function(GLuint count, GLsizei bufsize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog) PFNGLGETDEBUGMESSAGELOGARBPROC; // GL_ARB_robustness GLenum glGetGraphicsResetStatusARB(); void glGetnTexImageARB(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid* img); void glReadnPixelsARB(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid* data); void glGetnCompressedTexImageARB(GLenum target, GLint lod, GLsizei bufSize, GLvoid* img); void glGetnUniformfvARB(GLuint program, GLint location, GLsizei bufSize, GLfloat* params); void glGetnUniformivARB(GLuint program, GLint location, GLsizei bufSize, GLint* params); void glGetnUniformuivARB(GLuint program, GLint location, GLsizei bufSize, GLuint* params); void glGetnUniformdvARB(GLuint program, GLint location, GLsizei bufSize, GLdouble* params); alias GLenum function() PFNGLGETGRAPHICSRESETSTATUSARBPROC; alias void function(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid* img) PFNGLGETNTEXIMAGEARBPROC; alias void function(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid* data) PFNGLREADNPIXELSARBPROC; alias void function(GLenum target, GLint lod, GLsizei bufSize, GLvoid* img) PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC; alias void function(GLuint program, GLint location, GLsizei bufSize, GLfloat* params) PFNGLGETNUNIFORMFVARBPROC; alias void function(GLuint program, GLint location, GLsizei bufSize, GLint* params) PFNGLGETNUNIFORMIVARBPROC; alias void function(GLuint program, GLint location, GLsizei bufSize, GLuint* params) PFNGLGETNUNIFORMUIVARBPROC; alias void function(GLuint program, GLint location, GLsizei bufSize, GLdouble* params) PFNGLGETNUNIFORMDVARBPROC; // GL_ARB_shader_stencil_export // GL_ARB_base_instance void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance); void glDrawElementsInstancedBaseInstance(GLenum mode, GLsizei count, GLenum type, const(void)* indices, GLsizei instancecount, GLuint baseinstance); void glDrawElementsInstancedBaseVertexBaseInstance(GLenum mode, GLsizei count, GLenum type, const(void)* indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance); alias void function(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance) PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC; alias void function(GLenum mode, GLsizei count, GLenum type, const(void)* indices, GLsizei instancecount, GLuint baseinstance) PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC; alias void function(GLenum mode, GLsizei count, GLenum type, const(void)* indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance) PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC; // GL_ARB_shading_language_420pack // GL_ARB_transform_feedback_instanced void glDrawTransformFeedbackInstanced(GLenum mode, GLuint id, GLsizei instancecount); void glDrawTransformFeedbackStreamInstanced(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount); alias void function(GLenum mode, GLuint id, GLsizei instancecount) PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC; alias void function(GLenum mode, GLuint id, GLuint stream, GLsizei instancecount) PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC; // GL_ARB_compressed_texture_pixel_storage // GL_ARB_conservative_depth // GL_ARB_internalformat_query void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params); alias void function(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) PFNGLGETINTERNALFORMATIVPROC; // GL_ARB_map_buffer_alignment // GL_ARB_shader_atomic_counters void glGetActiveAtomicCounterBufferiv(GLuint program, GLuint bufferIndex, GLenum pname, GLint* params); alias void function(GLuint program, GLuint bufferIndex, GLenum pname, GLint* params) PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC; // GL_ARB_shader_image_load_store void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); void glMemoryBarrier(GLbitfield barriers); alias void function(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) PFNGLBINDIMAGETEXTUREPROC; alias void function(GLbitfield barriers) PFNGLMEMORYBARRIERPROC; // GL_ARB_shading_language_packing // GL_ARB_texture_storage void glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); void glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); void glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); void glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); alias void function(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) PFNGLTEXSTORAGE1DPROC; alias void function(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) PFNGLTEXSTORAGE2DPROC; alias void function(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) PFNGLTEXSTORAGE3DPROC; alias void function(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) PFNGLTEXTURESTORAGE1DEXTPROC; alias void function(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) PFNGLTEXTURESTORAGE2DEXTPROC; alias void function(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) PFNGLTEXTURESTORAGE3DEXTPROC; // GL_KHR_texture_compression_astc_ldr // GL_KHR_debug void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const(GLuint)* ids, GLboolean enabled); void glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const(GLchar)* buf); void glDebugMessageCallback(GLDEBUGPROC callback, const(void)* userParam); GLuint glGetDebugMessageLog(GLuint count, GLsizei bufsize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog); void glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const(GLchar)* message); void glPopDebugGroup(); void glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const(GLchar)* label); void glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar* label); void glObjectPtrLabel(const(void)* ptr, GLsizei length, const(GLchar)* label); void glGetObjectPtrLabel(const(void)* ptr, GLsizei bufSize, GLsizei* length, GLchar* label); alias void function(GLenum source, GLenum type, GLenum severity, GLsizei count, const(GLuint)* ids, GLboolean enabled) PFNGLDEBUGMESSAGECONTROLPROC; alias void function(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const(GLchar)* buf) PFNGLDEBUGMESSAGEINSERTPROC; alias void function(GLDEBUGPROC callback, const(void)* userParam) PFNGLDEBUGMESSAGECALLBACKPROC; alias GLuint function(GLuint count, GLsizei bufsize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog) PFNGLGETDEBUGMESSAGELOGPROC; alias void function(GLenum source, GLuint id, GLsizei length, const(GLchar)* message) PFNGLPUSHDEBUGGROUPPROC; alias void function() PFNGLPOPDEBUGGROUPPROC; alias void function(GLenum identifier, GLuint name, GLsizei length, const(GLchar)* label) PFNGLOBJECTLABELPROC; alias void function(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar* label) PFNGLGETOBJECTLABELPROC; alias void function(const(void)* ptr, GLsizei length, const(GLchar)* label) PFNGLOBJECTPTRLABELPROC; alias void function(const(void)* ptr, GLsizei bufSize, GLsizei* length, GLchar* label) PFNGLGETOBJECTPTRLABELPROC; // GL_ARB_arrays_of_arrays // GL_ARB_clear_buffer_object void glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const(void)* data); void glClearBufferSubData(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const(void)* data); void glClearNamedBufferDataEXT(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const(void)* data); void glClearNamedBufferSubDataEXT(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const(void)* data); alias void function(GLenum target, GLenum internalformat, GLenum format, GLenum type, const(void)* data) PFNGLCLEARBUFFERDATAPROC; alias void function(GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const(void)* data) PFNGLCLEARBUFFERSUBDATAPROC; alias void function(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const(void)* data) PFNGLCLEARNAMEDBUFFERDATAEXTPROC; alias void function(GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const(void)* data) PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC; // GL_ARB_compute_shader void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); void glDispatchComputeIndirect(GLintptr indirect); alias void function(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) PFNGLDISPATCHCOMPUTEPROC; alias void function(GLintptr indirect) PFNGLDISPATCHCOMPUTEINDIRECTPROC; // GL_ARB_copy_image void glCopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); alias void function(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) PFNGLCOPYIMAGESUBDATAPROC; // GL_ARB_texture_view void glTextureView(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); alias void function(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) PFNGLTEXTUREVIEWPROC; // GL_ARB_vertex_attrib_binding void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); void glVertexAttribLFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex); void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor); void glVertexArrayBindVertexBufferEXT(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); void glVertexArrayVertexAttribFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); void glVertexArrayVertexAttribIFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); void glVertexArrayVertexAttribLFormatEXT(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); void glVertexArrayVertexAttribBindingEXT(GLuint vaobj, GLuint attribindex, GLuint bindingindex); void glVertexArrayVertexBindingDivisorEXT(GLuint vaobj, GLuint bindingindex, GLuint divisor); alias void function(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) PFNGLBINDVERTEXBUFFERPROC; alias void function(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) PFNGLVERTEXATTRIBFORMATPROC; alias void function(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) PFNGLVERTEXATTRIBIFORMATPROC; alias void function(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) PFNGLVERTEXATTRIBLFORMATPROC; alias void function(GLuint attribindex, GLuint bindingindex) PFNGLVERTEXATTRIBBINDINGPROC; alias void function(GLuint bindingindex, GLuint divisor) PFNGLVERTEXBINDINGDIVISORPROC; alias void function(GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC; alias void function(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC; alias void function(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC; alias void function(GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC; alias void function(GLuint vaobj, GLuint attribindex, GLuint bindingindex) PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC; alias void function(GLuint vaobj, GLuint bindingindex, GLuint divisor) PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC; // GL_ARB_robustness_isolation // GL_ARB_ES3_compatibility // GL_ARB_explicit_uniform_location // GL_ARB_fragment_layer_viewport // GL_ARB_framebuffer_no_attachments void glFramebufferParameteri(GLenum target, GLenum pname, GLint param); void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint* params); void glNamedFramebufferParameteriEXT(GLuint framebuffer, GLenum pname, GLint param); void glGetNamedFramebufferParameterivEXT(GLuint framebuffer, GLenum pname, GLint* params); alias void function(GLenum target, GLenum pname, GLint param) PFNGLFRAMEBUFFERPARAMETERIPROC; alias void function(GLenum target, GLenum pname, GLint* params) PFNGLGETFRAMEBUFFERPARAMETERIVPROC; alias void function(GLuint framebuffer, GLenum pname, GLint param) PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC; alias void function(GLuint framebuffer, GLenum pname, GLint* params) PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC; // GL_ARB_internalformat_query2 void glGetInternalformati64v(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64* params); alias void function(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64* params) PFNGLGETINTERNALFORMATI64VPROC; // GL_ARB_invalidate_subdata void glInvalidateTexSubImage(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); void glInvalidateTexImage(GLuint texture, GLint level); void glInvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length); void glInvalidateBufferData(GLuint buffer); void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const(GLenum)* attachments); void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const(GLenum)* attachments, GLint x, GLint y, GLsizei width, GLsizei height); alias void function(GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth) PFNGLINVALIDATETEXSUBIMAGEPROC; alias void function(GLuint texture, GLint level) PFNGLINVALIDATETEXIMAGEPROC; alias void function(GLuint buffer, GLintptr offset, GLsizeiptr length) PFNGLINVALIDATEBUFFERSUBDATAPROC; alias void function(GLuint buffer) PFNGLINVALIDATEBUFFERDATAPROC; alias void function(GLenum target, GLsizei numAttachments, const(GLenum)* attachments) PFNGLINVALIDATEFRAMEBUFFERPROC; alias void function(GLenum target, GLsizei numAttachments, const(GLenum)* attachments, GLint x, GLint y, GLsizei width, GLsizei height) PFNGLINVALIDATESUBFRAMEBUFFERPROC; // GL_ARB_multi_draw_indirect void glMultiDrawArraysIndirect(GLenum mode, const(void)* indirect, GLsizei drawcount, GLsizei stride); void glMultiDrawElementsIndirect(GLenum mode, GLenum type, const(void)* indirect, GLsizei drawcount, GLsizei stride); alias void function(GLenum mode, const(void)* indirect, GLsizei drawcount, GLsizei stride) PFNGLMULTIDRAWARRAYSINDIRECTPROC; alias void function(GLenum mode, GLenum type, const(void)* indirect, GLsizei drawcount, GLsizei stride) PFNGLMULTIDRAWELEMENTSINDIRECTPROC; // GL_ARB_program_interface_query void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint* params); GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const(GLchar)* name); void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei* length, GLchar* name); void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const(GLenum)* props, GLsizei bufSize, GLsizei* length, GLint* params); GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const(GLchar)* name); GLint glGetProgramResourceLocationIndex(GLuint program, GLenum programInterface, const(GLchar)* name); alias void function(GLuint program, GLenum programInterface, GLenum pname, GLint* params) PFNGLGETPROGRAMINTERFACEIVPROC; alias GLuint function(GLuint program, GLenum programInterface, const(GLchar)* name) PFNGLGETPROGRAMRESOURCEINDEXPROC; alias void function(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei* length, GLchar* name) PFNGLGETPROGRAMRESOURCENAMEPROC; alias void function(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const(GLenum)* props, GLsizei bufSize, GLsizei* length, GLint* params) PFNGLGETPROGRAMRESOURCEIVPROC; alias GLint function(GLuint program, GLenum programInterface, const(GLchar)* name) PFNGLGETPROGRAMRESOURCELOCATIONPROC; alias GLint function(GLuint program, GLenum programInterface, const(GLchar)* name) PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC; // GL_ARB_robust_buffer_access_behavior // GL_ARB_shader_image_size // GL_ARB_shader_storage_buffer_object void glShaderStorageBlockBinding(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); alias void function(GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding) PFNGLSHADERSTORAGEBLOCKBINDINGPROC; // GL_ARB_stencil_texturing // GL_ARB_texture_buffer_range void glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); void glTextureBufferRangeEXT(GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); alias void function(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) PFNGLTEXBUFFERRANGEPROC; alias void function(GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) PFNGLTEXTUREBUFFERRANGEEXTPROC; // GL_ARB_texture_query_levels // GL_ARB_texture_storage_multisample void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); void glTextureStorage2DMultisampleEXT(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); void glTextureStorage3DMultisampleEXT(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); alias void function(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) PFNGLTEXSTORAGE2DMULTISAMPLEPROC; alias void function(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) PFNGLTEXSTORAGE3DMULTISAMPLEPROC; alias void function(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC; alias void function(GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC; GtkD-3.7.5/demos/gstreamer/000077500000000000000000000000001324604450400154615ustar00rootroot00000000000000GtkD-3.7.5/demos/gstreamer/helloworld/000077500000000000000000000000001324604450400176345ustar00rootroot00000000000000GtkD-3.7.5/demos/gstreamer/helloworld/dub.json000066400000000000000000000003741324604450400213050ustar00rootroot00000000000000{ "name": "gstreamer_helloworld", "description": "A GStreamer demo", "targetType": "executable", "sourceFiles": ["gstreamer_helloworld.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" }, "gtk-d:gstreamer": {"path": "../../../" } } } GtkD-3.7.5/demos/gstreamer/helloworld/gstreamer_helloworld.d000066400000000000000000000043541324604450400242330ustar00rootroot00000000000000/* * gstreamer_helloworld is placed in the * public domain. */ module gstreamer_helloworld; import std.stdio; //gtkD imports: import glib.Str; import gtk.Main; //gstreamerD imports: import gstreamer.GStreamer; import gobject.ObjectG; import glib.ErrorG; import gstreamer.Element; import gstreamer.ElementFactory; import gstreamer.Message; import gstreamer.Uri; class GstHello { public: bool busCall( Message msg ) { debug(gstreamer) { writefln("GstHello.busCall(msg) START."); scope(exit) writefln("GstHello.busCall(msg) END."); } switch( msg.type ) { case GstMessageType.UNKNOWN: writefln("Unknown message type."); break; case GstMessageType.EOS: writefln("End-of-stream."); Main.quit(); break; case GstMessageType.ERROR: { string dbug; ErrorG err; msg.parseError(err, dbug); //g_free (dbug); writefln("Error: %s dbug: %s", Str.toString(err.getErrorGStruct().message), dbug); Main.quit(); break; } default: break; } return true; } this(string file) { // create the playbin. playbin = ElementFactory.make("playbin"); if( playbin is null ) { throw new Exception("'playbin' gstreamer plugin missing."); } // Make sure that file is an URI. if ( !Uri.isValid(file) ) file = Uri.filenameToUri(file); playbin.setProperty("uri", file); playbin.getBus().addWatch( &busCall ); // Now set to playing and iterate. writefln("Setting to PLAYING."); playbin.setState( GstState.PLAYING ); writefln("Running."); } ~this() { playbin.setState( GstState.NULL ); } protected: Element playbin; } int main(string[] args) { writefln("gstreamerD Hello World!"); uint major, minor, micro, nano; writefln("Trying to init..."); //Main.init(args); GStreamer.init(args); // check input arguments if (args.length != 2) { writefln("Usage: %s ", args[0]); return -1; } writefln("Checking version of GStreamer..."); GStreamer.versio(major, minor, micro, nano); writefln("The installed version of GStreamer is %s.%s.%s", major, minor, micro ); writefln( "The file is: %s", args[1] ); GstHello gstHello = new GstHello( args[1] ); //We must use the gtkD mainloop to run gstreamerD apps. Main.run(); return 0; } GtkD-3.7.5/demos/gstreamer/mediaplayer/000077500000000000000000000000001324604450400177555ustar00rootroot00000000000000GtkD-3.7.5/demos/gstreamer/mediaplayer/dub.json000066400000000000000000000003621324604450400214230ustar00rootroot00000000000000{ "name": "gst_mediaplayer", "description": "A GStreamer demo", "targetType": "executable", "sourceFiles": ["gst_mediaplayer.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" }, "gtk-d:gstreamer": {"path": "../../../" } } } GtkD-3.7.5/demos/gstreamer/mediaplayer/gst_mediaplayer.d000066400000000000000000000256361324604450400233070ustar00rootroot00000000000000/* * gst_mediaplayer is placed in the * public domain. */ module gst_mediaplayer; import std.conv; import std.file; import std.path; import std.stdio; //gtkD imports: import cairo.Context; import gtk.Main; import gtk.MainWindow; import gtk.Widget; import gdk.Window; import gdk.Event; import gtk.DrawingArea; import gtk.AspectFrame; import gtk.FileChooserDialog; import gtk.FileFilter; import gdk.X11;//Needed for VideoOverlay import gtk.VBox; import gtk.HBox; import gtk.Button; import gtk.ComboBoxText; import gobject.Value; //gstreamerD imports: import gstreamer.GStreamer; import gobject.ObjectG; import glib.ErrorG; import gstreamer.Element; import gstreamer.Bin; import gstreamer.Pipeline; import gstreamer.ElementFactory; import gstreamer.Pad; import gstreamer.Message; import gstreamer.Structure; import gstreamer.Bus; import gstinterfaces.VideoOverlay; class MonitorOverlay : DrawingArea { public: this() { debug(MonitorOverlay) writeln("Monitor.this() START."); debug(MonitorOverlay) scope(exit) writeln("Monitor.this() END."); setDoubleBuffered(false); } public VideoOverlay videoOverlay() { return m_videoOverlay; } /** * Give this method an VideoOverlay that you've created from * a videoSink. like: monitorOverlay.videoOverlay = new VideoOverlay( videoSink ); */ public VideoOverlay videoOverlay(VideoOverlay set) { debug(MonitorOverlay) writeln("Monitor.videoOverlay(set) START."); debug(MonitorOverlay) scope(exit) writeln("Monitor.videoOverlay(set) END."); m_videoOverlay = set; debug(MonitorOverlay) writeln("Monitor.videoOverlay(set) videoOverlay set. Now setting XwindowId."); m_videoOverlay.setWindowHandle( getWindow().getXid() ); debug(MonitorOverlay) writeln("X11.drawableGetXid: {}", getWindow().getXid() ); return m_videoOverlay; } protected VideoOverlay m_videoOverlay; } class GstMediaPlayer : MainWindow { public: GstBusSyncReply createVideoOverlayWindowCb( Message msg ) { // ignore anything but 'prepare-window-handle' element messages if( msg.type() != GstMessageType.ELEMENT ) return GstBusSyncReply.PASS; Structure str = msg.getStructure(); if( str.hasName("prepare-window-handle") == false ) return GstBusSyncReply.PASS; debug(MonitorOverlay) writeln("Now we should create the X window."); monitorOverlay.videoOverlay = new VideoOverlay( videosink ); debug(MonitorOverlay) writeln("Created an VideoOverlay."); return GstBusSyncReply.DROP; } bool busCall( Message msg ) { debug(gstreamer) writeln("GstMediaPlayer.busCall(msg) START."); debug(gstreamer) scope(exit) writeln("GstMediaPlayer.busCall(msg) END."); switch( msg.type ) { case GstMessageType.UNKNOWN: writeln("Unknown message type."); break; case GstMessageType.EOS: writeln("End-of-stream. Looping from the start."); onSeekToStart(null); break; case GstMessageType.ERROR: { string dbug; ErrorG err; msg.parseError(err, dbug); writefln("Error: %s dbug: %s", to!string(err.getErrorGStruct().message), dbug ); //g_error_free (err); Main.quit(); break; } default: break; } return true; } this(string[] args) { super("GstMediaPlayer"); setSizeRequest(600, 400); vbox = new VBox(false,0); monitorOverlay = new MonitorOverlay(); monitorAspectFrame = new AspectFrame("", 0.5, 0.5, 16.0/9.0, false ); monitorAspectFrame.add( monitorOverlay ); monitorAspectFrame.setShadowType( GtkShadowType.NONE ); monitorAspectFrame.setLabelWidget( null );//Yes! This get's rid of that stupid label on top of the aspectframe! More room for the monitor. vbox.packStart( monitorAspectFrame, true, true, 0 ); buttonsHBox = new HBox(false,0); openButton = new Button("Open..."); openButton.addOnClicked( &onOpen ); buttonsHBox.packStart( openButton, false, false, 0 ); playButton = new Button("Play"); playButton.addOnClicked( &onPlay ); buttonsHBox.packStart( playButton, false, false, 0 ); aspectComboBox = new ComboBoxText();//Create a new text ComboBox. aspectComboBox.appendText("16:9"); aspectComboBox.appendText("4:3"); aspectComboBox.setActiveText("16:9"); aspectComboBox.addOnChanged( &onAspectComboBoxChanged ); buttonsHBox.packStart( aspectComboBox, false, false, 0 ); quitButton = new Button(StockID.QUIT); quitButton.addOnClicked( &onQuit ); buttonsHBox.packStart( quitButton, false, false, 0 ); vbox.packStart( buttonsHBox, false, false, 0 ); add( vbox ); showAll(); if (args.length > 1) { mediaFileUri = args[1]; if ( !isRooted(mediaFileUri) ) { mediaFileUri = buildNormalizedPath(getcwd(), mediaFileUri); } //This will construct the filename to be a URI. if( mediaFileUri[0..7] != "file://" && mediaFileUri[0..7] != "http://" ) mediaFileUri = "file://"~ mediaFileUri; } if( mediaFileUri != "" ) playMediaFile(mediaFileUri); } void playMediaFile(string file) { if( source !is null ) { fullStop(); delete source; } if( videosink !is null ) delete videosink; // create elements source = ElementFactory.make("playbin", "ourplaybin"); videosink = ElementFactory.make("ximagesink", "video-output-xvimagesink"); //Only xvimagesink work (almost) correctly with VideoOverlay, but even it still //has some problems. It won't work with compositing enabled... if( source is null ) { writeln("PlayBin could not be created"); throw new Exception("One or more gstreamerD elements could not be created."); } if( videosink is null ) { writeln("videosink could not be created"); throw new Exception("One or more gstreamerD elements could not be created."); } //add message handlers source.getBus().setSyncHandler( &createVideoOverlayWindowCb ); source.getBus().addWatch( &busCall ); //Some Value handling, to get our videosink C GstElement* //to be accepted by setProperty. This could propably made cleaner. //One idea is to add a Element.setProperty(string, void*); method. Value val = new Value(); val.init(GType.OBJECT); val.setObject( videosink ); source.setProperty( "video-sink", val ); source.setProperty("uri", file); play(); } ~this() { fullStop(); } void onPlay(Button button) { play(); } void play() { if( isPlaying == false ) { isPlaying = true; // Now set to playing and iterate. debug(1) writeln("Setting to PLAYING."); //pipeline.setState( GstState.PLAYING ); source.setState( GstState.PLAYING ); debug(1) writeln("Running."); } else { isPlaying = false; source.setState( GstState.PAUSED ); } } void fullStop() { if( source !is null ) source.setState( GstState.NULL ); isPlaying = false; } void onSeekToStart(Button button) { source.seek( 0 );//seek to start. } void onOpen(Button button) { runImportMaterialFileChooser(); } void onQuit(Button button) { fullStop(); Main.quit(); } void onAspectComboBoxChanged( ComboBoxText combo ) { string asp = combo.getActiveText(); if( asp == "16:9" ) monitorAspectFrame.set( 0.5, 0.5, 16.0/9.0, false ); else //if( asp == "4:3" ) monitorAspectFrame.set( 0.5, 0.5, 4.0/3.0, false ); } void runImportMaterialFileChooser() { string[] a = ["Play file", "Close"]; ResponseType[] r = [ResponseType.APPLY, ResponseType.CANCEL]; if ( importMaterialFileChooserDialog is null ) { importMaterialFileChooserDialog = new FileChooserDialog("Play mediafile", this, FileChooserAction.OPEN, a, r); FileFilter all = new FileFilter(); all.setName("All files"); all.addPattern("*"); importMaterialFileChooserDialog.addFilter(all); FileFilter files = new FileFilter(); files.setName("Supported files"); foreach( mime; supportedMimeTypes ) files.addMimeType(mime); importMaterialFileChooserDialog.addFilter(files); importMaterialFileChooserDialog.setFilter(files); } if( importMaterialFileChooserDialog.run() != ResponseType.CANCEL ) { mediaFileUri = importMaterialFileChooserDialog.getUri(); writefln( "file selected: %s", mediaFileUri ); playMediaFile(mediaFileUri); } importMaterialFileChooserDialog.hide(); } protected: string mediaFileUri = ""; Element source, videosink; VBox vbox; HBox buttonsHBox; Button openButton; Button playButton; bool isPlaying(bool set) { m_isPlaying = set; if( playButton !is null ) { if( m_isPlaying == true ) { playButton.setLabel("Pause"); } else { playButton.setLabel("Play"); } } return m_isPlaying; } bool isPlaying() { return m_isPlaying; } bool m_isPlaying = false; ComboBoxText aspectComboBox; Button quitButton; MonitorOverlay monitorOverlay; AspectFrame monitorAspectFrame; FileChooserDialog importMaterialFileChooserDialog; string[] supportedMimeTypes = ["application/ogg", "application/ram", "application/sdp", "application/smil", "application/smil+xml", "application/vnd.rn-realmedia", "application/x-extension-m4a", "application/x-extension-mp4", "application/x-flac", "application/x-flash-video", "application/x-matroska", "application/x-netshow-channel", "application/x-ogg", "application/x-quicktime-media-link", "application/x-quicktimeplayer", "application/x-shorten", "application/x-smil", "audio/3gpp", "audio/ac3", "audio/AMR", "audio/AMR-WB", "audio/basic", "audio/midi", "audio/mp4", "audio/mpeg", "audio/ogg", "audio/vnd.rn-realaudio", "audio/x-ape", "audio/x-flac", "audio/x-it", "audio/x-m4a", "audio/x-matroska", "audio/x-mod", "audio/x-mp3", "audio/x-mpeg", "audio/x-musepack", "audio/x-pn-aiff", "audio/x-pn-au", "audio/x-pn-realaudio", "audio/x-pn-realaudio-plugin", "audio/x-pn-wav", "audio/x-pn-windows-acm", "audio/x-realaudio", "audio/x-real-audio", "audio/x-sbc", "audio/x-speex", "audio/x-tta", "audio/x-wav", "audio/x-wavpack", "audio/x-vorbis", "audio/x-vorbis+ogg", "audio/x-xm", "image/vnd.rn-realpix", "image/x-pict", "misc/ultravox", "text/google-video-pointer", "text/x-google-video-pointer", "video/3gpp", "video/dv", "video/fli", "video/flv", "video/mp4", "video/mp4v-es", "video/mpeg", "video/msvideo", "video/ogg", "video/quicktime", "video/vivo", "video/vnd.divx", "video/vnd.rn-realvideo", "video/vnd.vivo", "video/x-anim", "video/x-avi", "video/x-flc", "video/x-fli", "video/x-flic", "video/x-flv", "video/x-m4v", "video/x-matroska", "video/x-mpeg", "video/x-ms-asf", "video/x-msvideo", "video/x-ms-wm", "video/x-ms-wmv", "video/x-nsv", "video/x-ogm+ogg", "video/x-theora+ogg", "x-content/video-dvd", "x-content/video-vcd", "x-content/video-svcd"]; } void main(string[] args) { writeln("gstreamerD GstMediaPlayer"); uint major, minor, micro, nano; writeln("Trying to init..."); Main.init(args); GStreamer.init(args); writeln("Checking version of GStreamer..."); GStreamer.versio(major, minor, micro, nano); writefln("The installed version of GStreamer is %s.%s.%s", major, minor, micro ); GstMediaPlayer gstMediaPlayer = new GstMediaPlayer(args); //We must use the gtkD mainloop to run gstreamerD apps. Main.run(); } GtkD-3.7.5/demos/gtk/000077500000000000000000000000001324604450400142555ustar00rootroot00000000000000GtkD-3.7.5/demos/gtk/HelloWorld.d000077500000000000000000000025461324604450400165070ustar00rootroot00000000000000/* * 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 */ module gtk.HelloWorld; import gio.Application : GioApplication = Application; import gtk.Application; import gtk.ApplicationWindow; import gtk.Label; class HelloWorld : ApplicationWindow { this(Application application) { super(application); setTitle("GtkD"); setBorderWidth(10); add(new Label("Hello World")); showAll(); } } int main(string[] args) { auto application = new Application("org.gtkd.demo.helloworld", GApplicationFlags.FLAGS_NONE); application.addOnActivate(delegate void(GioApplication app) { new HelloWorld(application); }); return application.run(args); } GtkD-3.7.5/demos/gtk/OtherTests.d000066400000000000000000000063741324604450400165400ustar00rootroot00000000000000/* * 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 */ module gtk.OtherTests; import gtk.AboutDialog; import gio.Application : GioApplication = Application; import gtk.Application; import gtk.ApplicationWindow; import gtk.Dialog; import gtk.Widget; import gtk.Label; import gtk.Button; import gtk.VBox; import gtk.Image; import glib.Timeout; import gdk.Event; import std.stdio; import core.stdc.stdlib : exit; public class OtherTests : ApplicationWindow { Label byeLabel; Timeout timeout; this(Application application) { super(application); setTitle("GtkD"); setDecorated(true); VBox box = new VBox(false, 2); box.add(new Label("Hello World")); Button button = new Button("About"); button.addOnClicked(&onClicked); button.addOnClicked(&popupAbout); button.addOnClicked(delegate void(Button b){ writefln("\nliterally clicked"); }); button.addOnPressed(&mousePressed); //addOnButtonPress(&mousePressed); box.add(button); byeLabel = new Label("Bye-bye World"); box.add(byeLabel); add(box); setBorderWidth(10); move(0,400); showAll(); addOnDelete(&onDeleteEvent); timeout = new Timeout(1000, &changeLabel); } void mousePressed(Button widget) { writefln("mousePressed"); } bool changeLabel() { switch ( byeLabel.getText() ) { case "Bye-bye World": byeLabel.setText("still here"); break; case "still here": byeLabel.setText("close window"); break; case "close window": byeLabel.setText("to terminate"); break; default : byeLabel.setText("Bye-bye World"); break; } return true; } void onClicked(Button button) { writefln("\nOn click from Hello World %s", button); } void popupAbout(Button button) { with (new AboutDialog()) { string[] names; names ~= "Antonio Monteiro (binding/wrapping/proxying/decorating for D)"; names ~= "www.gtk.org (base C library)"; setAuthors(names); setDocumenters(names); setArtists(names); setLicense("License is LGPL"); setWebsite("http://lisdev.com"); addOnResponse(&onDialogResponse); showAll(); } } void onDialogResponse(int response, Dialog dlg) { if(response == ResponseType.CANCEL) dlg.destroy(); } bool onDeleteEvent(Event event, Widget widget) { destroy(); writefln("Exit by request from HelloWorld"); exit(0); return false; } override string toString() { return "I Am HelloWorld"; } } int main(string[] args) { auto application = new Application("org.gtkd.demo.othertests", GApplicationFlags.FLAGS_NONE); application.addOnActivate(delegate void(GioApplication app) { new OtherTests(application); }); return application.run(args); } GtkD-3.7.5/demos/gtk/PopupMenu.d000066400000000000000000000027651324604450400163640ustar00rootroot00000000000000module gtk.PopupMenu; import gio.Application : GioApplication = Application; import gtk.Application; import gtk.ApplicationWindow; import gtk.EventBox; import gtk.Menu; import gtk.Label; import gtk.ImageMenuItem; import gtk.Widget; import gtk.AccelGroup; import gdk.Event; class PopupMenuDemo : ApplicationWindow { Menu menu; this(Application application) { super(application); setTitle("GtkD: Popup Menu"); setDefaultSize(200, 200); auto eventBox = new EventBox(); eventBox.add( new Label("Right click") ); eventBox.addOnButtonPress(&onButtonPress); add(eventBox); menu = new Menu(); menu.append( new ImageMenuItem(StockID.CUT, cast(AccelGroup)null) ); menu.append( new ImageMenuItem(StockID.COPY, cast(AccelGroup)null) ); menu.append( new ImageMenuItem(StockID.PASTE, cast(AccelGroup)null) ); menu.append( new ImageMenuItem(StockID.DELETE, cast(AccelGroup)null) ); menu.attachToWidget(eventBox, null); showAll(); } public bool onButtonPress(Event event, Widget widget) { if ( event.type == EventType.BUTTON_PRESS ) { GdkEventButton* buttonEvent = event.button; if ( buttonEvent.button == 3) { menu.showAll(); menu.popup(buttonEvent.button, buttonEvent.time); return true; } } return false; } } int main(string[] args) { auto application = new Application("org.gtkd.demo.popupmenu", GApplicationFlags.FLAGS_NONE); application.addOnActivate(delegate void(GioApplication app) { new PopupMenuDemo(application); }); return application.run(args); } GtkD-3.7.5/demos/gtk/SpawnTests.d000066400000000000000000000100011324604450400165250ustar00rootroot00000000000000/* * 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 */ module gtk.SpawnTests; import glib.Spawn; import gio.Application : GioApplication = Application; import gtk.Application; import gtk.ApplicationWindow; import gtk.TextView; import gtk.TextBuffer; import gtk.TextIter; import gtk.Box; import gtk.VBox; import gtk.ScrolledWindow; import gtk.Button; import gtk.Image; import std.string; import std.stdio; class SpawnWindow : ApplicationWindow { TextView viewInput; TextView viewOutput; TextView viewError; TextIter iterOut; TextIter iterError; this(Application application) { super(application); setTitle("Spawn testing"); setupWindow(); setSizeRequest(400,400); showAll(); } private void setupWindow() { Box main = new VBox(false, 2); viewInput = new TextView(); viewOutput = new TextView(); viewError = new TextView(); main.packStart(new ScrolledWindow(viewInput), false, false, 2); Button button = new Button("exec", &execInput); main.packStart(button, false, false, 4); main.packStart(new ScrolledWindow(viewOutput), true, true, 2); main.packStart(new ScrolledWindow(viewError), false, false, 2); setBorderWidth(7); add(main); } private void execInput(Button button) { string[] args = std.string.split(viewInput.getBuffer().getText()); exec(args); } private bool exec(string[] args) { foreach ( int i, string arg ; args) { writefln("[%s] >%s<", i, arg); } Spawn spawn = new Spawn(args[0]); if (args.length > 1 ) { for( int i=1 ; i 0 ) t ~= " "; t ~= arg; } inBuffer.setText(t); } public void setInput(string arg) { viewInput.getBuffer().setText(arg); } } int main(string[] args) { auto application = new Application("org.gtkd.demo.spawntest", GApplicationFlags.FLAGS_NONE); application.addOnActivate(delegate void(GioApplication app) { SpawnWindow sw = new SpawnWindow(application); if ( args.length > 1 ) { sw.setInput(args[1..args.length]); } else { sw.setInput("/bin/ls"); } }); return application.run(args); } GtkD-3.7.5/demos/gtk/dub.json000066400000000000000000000013761324604450400157310ustar00rootroot00000000000000{ "name": "demos", "description": "GtkD demos", "targetType": "none", "subPackages": [ { "name": "hello_world", "targetType": "executable", "sourceFiles": ["HelloWorld.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../" }, }, }, { "name": "other_tests", "targetType": "executable", "sourceFiles": ["OtherTests.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../" }, }, }, { "name": "popup_menu", "targetType": "executable", "sourceFiles": ["PopupMenu.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../" }, }, }, { "name": "spawn_tests", "targetType": "executable", "sourceFiles": ["SpawnTests.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../" }, }, }, ] } GtkD-3.7.5/demos/gtkD/000077500000000000000000000000001324604450400143615ustar00rootroot00000000000000GtkD-3.7.5/demos/gtkD/DemoActions/000077500000000000000000000000001324604450400165665ustar00rootroot00000000000000GtkD-3.7.5/demos/gtkD/DemoActions/DemoActions.d000066400000000000000000000124451324604450400211460ustar00rootroot00000000000000/* * 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: Gerald Nunn This is a demo of using GIO actions with GTK PopOver. It demonstrates stateless and stateful actions displayed as normal, checkbox and radiobutton menu items See here for information about GIO actions: https://wiki.gnome.org/HowDoI/GAction *****************************************************************************/ import std.stdio; import gtk.Application : Application; import gio.Application : GioApplication = Application; import gtk.ApplicationWindow : ApplicationWindow; import gtkc.giotypes : GApplicationFlags; import gdk.Event; import gio.Menu; import gio.MenuItem; import gio.SimpleAction; import glib.Variant; import glib.VariantType; import gtk.HeaderBar; import gtk.Image; import gtk.MenuButton; import gtk.MessageDialog; import gtk.Popover; import gtk.Widget; class MainWindow : ApplicationWindow { this(Application application) { super(application); initUI(); showAll(); } /** * Create and initialize the GTK widgets */ private void initUI() { this.setSizeRequest(1024, 640); //HeaderBar HeaderBar hb = new HeaderBar(); hb.setShowCloseButton(true); hb.setTitle("Actions Demo, Click the menu button >>>"); this.setTitlebar(hb); //Normal stateless action SimpleAction saNormal = new SimpleAction("normal", null); saNormal.addOnActivate(delegate(Variant, SimpleAction) { MessageDialog dialog = new MessageDialog(this, DialogFlags.MODAL, MessageType.ERROR, ButtonsType.OK, "Normal action clicked!", null); scope (exit) { dialog.destroy(); } dialog.run(); }); addAction(saNormal); //Stateful action which generates a Checkbox in popover SimpleAction saCheck = new SimpleAction("check", null, new Variant(false)); saCheck.addOnActivate(delegate(Variant value, SimpleAction sa) { bool newState = !sa.getState().getBoolean(); sa.setState(new Variant(newState)); }); addAction(saCheck); // Stateful action which uses targets. A target is essentially // one of a set of actions that an action can hold as state. When // using this type of action there is only one action for it however // when creating the menu model there is one menu item for each target. // // When using this type of action, you need to create the SimpleAction telling // it what type of variant the state represents. The parameter "new VariantType("s")" // says that it is a string in this example. See GtkD documentation on VariantType // for more information. SimpleAction saRadio = new SimpleAction("radio", new VariantType("s"), new Variant("left")); saRadio.addOnActivate(delegate(Variant value, SimpleAction sa) { //The selected target is passed as the value. sa.setState(value); }); addAction(saRadio); //Menu Model Menu model = new Menu(); // Note that action names consist of a prefix and an id which when // combined make a detailed name. The prefix comes from the container (ActionMap) // that the action is inserted against. GTK Application has a prefix of "app" // while GTK ApplicationWindow has a prefix of "win". You can create your own // prefixes by creating SimpleActionGroup to hold a set of actions and then call // Widget.insertActionGroup with your own prefix. model.append("Normal", "win.normal"); model.append("Checkbox", "win.check"); Menu section = new Menu(); //Note the target of the action is represented by the portion after the double colon section.append("Left", "win.radio::left"); section.append("Center", "win.radio::center"); section.append("Left", "win.radio::right"); model.appendSection(null, section); //MenuButton MenuButton mb = new MenuButton(); mb.setFocusOnClick(false); Image imgHamburger = new Image("open-menu-symbolic", IconSize.MENU); mb.add(imgHamburger); hb.packEnd(mb); //Popover Popover po = new Popover(mb, model); mb.setPopover(po); } } int main(string[] args) { auto application = new Application("demo.gtkd.Actions", GApplicationFlags.FLAGS_NONE); application.addOnActivate(delegate void(GioApplication app) { MainWindow mainWindow = new MainWindow(application); }); return application.run(args); } GtkD-3.7.5/demos/gtkD/DemoActions/dub.json000066400000000000000000000002751324604450400202370ustar00rootroot00000000000000{ "name": "demo_actions", "description": "A Actions demo", "targetType": "executable", "sourceFiles": ["DemoActions.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" }, } } GtkD-3.7.5/demos/gtkD/DemoCustomList/000077500000000000000000000000001324604450400172745ustar00rootroot00000000000000GtkD-3.7.5/demos/gtkD/DemoCustomList/CustomList.d000066400000000000000000000171131324604450400215520ustar00rootroot00000000000000module CustomList; import glib.RandG; import gobject.ObjectG; import gobject.Value; import gtk.TreeIter; import gtk.TreePath; import gtk.TreeModelIF; import gtk.TreeModelT; import gtkd.Implement; struct CustomRecord { /* data - you can extend this */ string name; uint yearBorn; /* admin stuff used by the custom list model */ uint pos; /* pos within the array */ } enum CustomListColumn { Record = 0, Name, YearBorn, NColumns, } class CustomList : ObjectG, TreeModelIF { uint numRows; int nColumns; int stamp; GType[3] columnTypes; CustomRecord*[] rows; mixin ImplementInterface!(GObject, GtkTreeModelIface); mixin TreeModelT!(GtkTreeModel); public this() { super(getType(), null); nColumns = columnTypes.length; columnTypes[0] = GType.POINTER; columnTypes[1] = GType.STRING; columnTypes[2] = GType.UINT; stamp = RandG.randomInt(); } /* * tells the rest of the world whether our tree model * has any special characteristics. In our case, * we have a list model (instead of a tree), and each * tree iter is valid as long as the row in question * exists, as it only contains a pointer to our struct. */ override GtkTreeModelFlags getFlags() { return (GtkTreeModelFlags.LIST_ONLY | GtkTreeModelFlags.ITERS_PERSIST); } /* * tells the rest of the world how many data * columns we export via the tree model interface */ override int getNColumns() { return nColumns; } /* * tells the rest of the world which type of * data an exported model column contains */ override GType getColumnType(int index) { if ( index >= nColumns || index < 0 ) return GType.INVALID; return columnTypes[index]; } /* * converts a tree path (physical position) into a * tree iter structure (the content of the iter * fields will only be used internally by our model). * We simply store a pointer to our CustomRecord * structure that represents that row in the tree iter. */ override int getIter(TreeIter iter, TreePath path) { CustomRecord* record; int[] indices; int n, depth; indices = path.getIndices(); depth = path.getDepth(); /* we do not allow children */ if (depth != 1) return false;//throw new Exception("We only except lists"); n = indices[0]; /* the n-th top level row */ if ( n >= numRows || n < 0 ) return false; record = rows[n]; if ( record is null ) throw new Exception("Not Exsisting record requested"); if ( record.pos != n ) throw new Exception("record.pos != TreePath.getIndices()[0]"); /* We simply store a pointer to our custom record in the iter */ iter.stamp = stamp; iter.userData = record; return true; } /* * converts a tree iter into a tree path (ie. the * physical position of that row in the list). */ override TreePath getPath(TreeIter iter) { TreePath path; CustomRecord* record; if ( iter is null || iter.userData is null || iter.stamp != stamp ) return null; record = cast(CustomRecord*) iter.userData; path = new TreePath(record.pos); return path; } /* * Returns a row's exported data columns * (_get_value is what gtk_tree_model_get uses) */ override Value getValue(TreeIter iter, int column, Value value = null) { CustomRecord *record; if ( value is null ) value = new Value(); if ( iter is null || column >= nColumns || iter.stamp != stamp ) return null; value.init(columnTypes[column]); record = cast(CustomRecord*) iter.userData; if ( record is null || record.pos >= numRows ) return null; switch(column) { case CustomListColumn.Record: value.setPointer(record); break; case CustomListColumn.Name: value.setString(record.name); break; case CustomListColumn.YearBorn: value.setUint(record.yearBorn); break; default: break; } return value; } /* * Takes an iter structure and sets it to point * to the next row. */ override bool iterNext(TreeIter iter) { CustomRecord* record, nextrecord; if ( iter is null || iter.userData is null || iter.stamp != stamp ) return false; record = cast(CustomRecord*) iter.userData; /* Is this the last record in the list? */ if ( (record.pos + 1) >= numRows) return false; nextrecord = rows[(record.pos + 1)]; if ( nextrecord is null || nextrecord.pos != record.pos + 1 ) throw new Exception("Invalid next record"); iter.stamp = stamp; iter.userData = nextrecord; return true; } /* * Returns TRUE or FALSE depending on whether * the row specified by 'parent' has any children. * If it has children, then 'iter' is set to * point to the first child. Special case: if * 'parent' is NULL, then the first top-level * row should be returned if it exists. */ override bool iterChildren(out TreeIter iter, TreeIter parent) { /* this is a list, nodes have no children */ if ( parent !is null ) return false; /* No rows => no first row */ if ( numRows == 0 ) return false; /* Set iter to first item in list */ iter = new TreeIter(); iter.stamp = stamp; iter.userData = rows[0]; return true; } /* * Returns TRUE or FALSE depending on whether * the row specified by 'iter' has any children. * We only have a list and thus no children. */ override bool iterHasChild(TreeIter iter) { return false; } /* * Returns the number of children the row * specified by 'iter' has. This is usually 0, * as we only have a list and thus do not have * any children to any rows. A special case is * when 'iter' is NULL, in which case we need * to return the number of top-level nodes, * ie. the number of rows in our list. */ override int iterNChildren(TreeIter iter) { /* special case: if iter == NULL, return number of top-level rows */ if ( iter is null ) return numRows; return 0; /* otherwise, this is easy again for a list */ } /* * If the row specified by 'parent' has any * children, set 'iter' to the n-th child and * return TRUE if it exists, otherwise FALSE. * A special case is when 'parent' is NULL, in * which case we need to set 'iter' to the n-th * row if it exists. */ override bool iterNthChild(out TreeIter iter, TreeIter parent, int n) { CustomRecord *record; /* a list has only top-level rows */ if( parent !is null ) return false; if( n >= numRows ) return false; record = rows[n]; if ( record == null || record.pos != n ) throw new Exception("Invalid record"); iter = new TreeIter(); iter.stamp = stamp; iter.userData = record; return true; } /* * Point 'iter' to the parent node of 'child'. As * we have a list and thus no children and no * parents of children, we can just return FALSE. */ override bool iterParent(out TreeIter iter, TreeIter child) { return false; } /* * Empty lists are boring. This function can * be used in your own code to add rows to the * list. Note how we emit the "row-inserted" * signal after we have appended the row * internally, so the tree view and other * interested objects know about the new row. */ void appendRecord(string name, uint yearBorn) { TreeIter iter; TreePath path; CustomRecord* newrecord; uint pos; if ( name is null ) return; pos = numRows; numRows++; newrecord = new CustomRecord; newrecord.name = name; newrecord.yearBorn = yearBorn; rows ~= newrecord; newrecord.pos = pos; /* inform the tree view and other interested objects * (e.g. tree row references) that we have inserted * a new row, and where it was inserted */ path = new TreePath(pos); iter = new TreeIter(); getIter(iter, path); rowInserted(path, iter); } } GtkD-3.7.5/demos/gtkD/DemoCustomList/DemoCustomList.d000066400000000000000000000036331324604450400223610ustar00rootroot00000000000000module DemoCustomList; import CustomList; import gio.Application : GioApplication = Application; import glib.RandG; import gtk.Application; import gtk.ApplicationWindow; import gtk.CellRendererText; import gtk.ListStore; import gtk.ScrolledWindow; import gtk.TreeView; import gtk.TreeViewColumn; class CustomListWindow : ApplicationWindow { this(Application application) { super(application); setTitle("GtkD - Custom TreeModel"); setDefaultSize(300, 400); ScrolledWindow scrollwin = new ScrolledWindow(); TreeView view = createViewAndModel(); scrollwin.add(view); add(scrollwin); showAll(); } TreeView createViewAndModel() { TreeViewColumn col; CellRendererText renderer; CustomList customlist; TreeView view; customlist = new CustomList(); fillModel(customlist); view = new TreeView(customlist); col = new TreeViewColumn(); renderer = new CellRendererText(); col.packStart(renderer, true); col.addAttribute(renderer, "text", CustomListColumn.Name); col.setTitle("Name"); view.appendColumn(col); col = new TreeViewColumn(); renderer = new CellRendererText(); col.packStart(renderer, true); col.addAttribute(renderer, "text", CustomListColumn.YearBorn); col.setTitle("Year Born"); view.appendColumn(col); return view; } void fillModel (CustomList customlist) { string[] firstnames = [ "Joe", "Jane", "William", "Hannibal", "Timothy", "Gargamel" ]; string[] surnames = [ "Grokowich", "Twitch", "Borheimer", "Bork" ]; foreach (sname; surnames) { foreach (fname; firstnames) { customlist.appendRecord(fname ~" "~ sname, 1900 + (RandG.randomInt() % 100)); } } } } int main (string[] args) { auto application = new Application("org.gtkd.demo.customlist", GApplicationFlags.FLAGS_NONE); application.addOnActivate(delegate void(GioApplication app) { new CustomListWindow(application); }); return application.run(args); } GtkD-3.7.5/demos/gtkD/DemoCustomList/dub.json000066400000000000000000000003671324604450400207470ustar00rootroot00000000000000{ "name": "demo_customlist", "description": "A Customlist demo", "targetType": "executable", "targetName": "DemoCustomList", "sourceFiles": ["DemoCustomList.d", "CustomList.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" }, } } GtkD-3.7.5/demos/gtkD/DemoMultiCellRenderer/000077500000000000000000000000001324604450400205475ustar00rootroot00000000000000GtkD-3.7.5/demos/gtkD/DemoMultiCellRenderer/DemoMultiCellRenderer.d000066400000000000000000000102561324604450400251060ustar00rootroot00000000000000/* * 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: Frank Benoit muntyan #gtk+ This demo shows a table with key/value pairs. The values can be edited. There are two types of values: strings and bools. Dependent of the type, either a CellRendererText or CellRendererToggle is used to show and edit the value. This is done by connecting the visibility of a CellRenderer to a ListStore column. *****************************************************************************/ module DemoMultiCellRenderer; import gtk.Main; import gdk.Event; import gtk.Window; import gtk.Widget; import gtk.TreeIter; import gtk.TreePath; import gtk.TreeView; import gtk.TreeViewColumn; import gtk.CellRendererText; import gtk.CellRendererToggle; import gtk.ListStore; enum { COLUMN_NAME, COLUMN_TEXT, COLUMN_TEXT_VISIBLE, COLUMN_BOOL, COLUMN_BOOL_VISIBLE } void main(string[] args){ Main.init(args); ListStore store = new ListStore( [ GType.STRING, GType.STRING, GType.INT, GType.INT, GType.INT] ); void appendRecord( string name, string value, bool isBoolean ){ auto it = store.createIter(); store.setValue( it, COLUMN_NAME, name ); store.setValue( it, COLUMN_TEXT, value ); store.setValue( it, COLUMN_TEXT_VISIBLE, !isBoolean ); store.setValue( it, COLUMN_BOOL, value == "true" ); store.setValue( it, COLUMN_BOOL_VISIBLE, isBoolean ); } // fill store with data appendRecord( "Loops", "10", false ); appendRecord( "Name", "keinfarbton", false ); appendRecord( "Verbose", "true", true ); auto wnd = new Window( "Celleditor Demo" ); auto tv = new TreeView(); wnd.add(tv); // create first column with text renderer TreeViewColumn column = new TreeViewColumn(); column.setTitle( "Name" ); tv.appendColumn(column); CellRendererText cell_text = new CellRendererText(); column.packStart(cell_text, 0 ); column.addAttribute(cell_text, "text", COLUMN_NAME); // create second column with two renderers column = new TreeViewColumn(); column.setTitle( "Value" ); tv.appendColumn(column); CellRendererToggle cell_bool = new CellRendererToggle(); column.packStart(cell_bool, 0 ); column.addAttribute(cell_bool, "active", COLUMN_BOOL); column.addAttribute(cell_bool, "visible", COLUMN_BOOL_VISIBLE); cell_text = new CellRendererText(); column.packStart(cell_text, 0 ); column.addAttribute(cell_text, "text", COLUMN_TEXT); column.addAttribute(cell_text, "visible", COLUMN_TEXT_VISIBLE); cell_text.setProperty( "editable", 1 ); // change value in store on toggle event cell_bool.addOnToggled( delegate void(string p, CellRendererToggle){ auto path = new TreePath( p ); auto it = new TreeIter( store, path ); store.setValue(it, COLUMN_BOOL, it.getValueInt( COLUMN_BOOL ) ? 0 : 1 ); }); // change the text in the store on end of edit cell_text.addOnEdited( delegate void(string p, string v, CellRendererText cell ){ auto path = new TreePath( p ); auto it = new TreeIter( store, path ); store.setValue( it, COLUMN_TEXT, v ); }); tv.setModel(store); wnd.showAll(); wnd.addOnDelete( delegate bool (Event event, Widget widget) { widget.destroy(); Main.quit(); return false; }); Main.run(); } GtkD-3.7.5/demos/gtkD/DemoMultiCellRenderer/dub.json000066400000000000000000000004061324604450400222140ustar00rootroot00000000000000{ "name": "demo_multicell_renderer", "description": "A Multi cell renderer demo", "targetType": "executable", "targetName": "DemoMultiCellRenderer", "sourceFiles": ["DemoMultiCellRenderer.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" }, } } GtkD-3.7.5/demos/gtkD/DemoMultithread/000077500000000000000000000000001324604450400174505ustar00rootroot00000000000000GtkD-3.7.5/demos/gtkD/DemoMultithread/DemoMultithread.d000066400000000000000000000124401324604450400227050ustar00rootroot00000000000000/* * 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: Gerald Nunn This is a simple demo of multithreading using gtkd and the D std.concurrency package. It simply spawns a thread that counts with the results being displayed in a TreeView. The demo uses the send/receive message paradigm in D integrated with the gdk.Threads.threadsAddIdle callback. Essentially the spawned thread sends the current count to the GTK thread and the message is received in the threadsAddIdle callback. This allows the GTK widgets to be updated since the threadsAddIdle happens on the GTK main thread. *****************************************************************************/ import core.thread; import std.concurrency; import std.stdio; import gtk.Application: Application; import gio.Application: GioApplication = Application; import gtk.ApplicationWindow: ApplicationWindow; import gtkc.giotypes: GApplicationFlags; import gtk.Box; import gtk.Button; import gtk.CellRendererText; import gdk.Event; import gdk.Threads; import gtk.ListStore; import gtk.ScrolledWindow; import gtk.TreeIter; import gtk.TreeView; import gtk.TreeViewColumn; import gtk.Widget; class MainWindow: ApplicationWindow { private TreeView results; private ListStore store; private Button button; private Tid childTid; this(Application application) { super(application); this.addOnDelete(&windowClosed); setTitle("Multithreading GTKD Example"); initUI(); showAll(); } /** * Create and initialize the GTK widgets */ private void initUI() { this.setSizeRequest(1024,640); Box box = new Box(Orientation.VERTICAL,5); ScrolledWindow scroll = new ScrolledWindow(); results = new TreeView(); results.setHexpand(true); results.setVexpand(true); results.appendColumn(new TreeViewColumn( "Count", new CellRendererText(), "text", 0)); store = new ListStore([GType.LONG]); results.setModel(store); TreeIter iter = store.createIter(); store.setValue(iter, 0, 0); scroll.add(results); box.add(scroll); button = new Button("Start"); button.addOnClicked(&buttonClicked); box.add(button); add(box); } /** * Stop the child thread if it is running */ bool windowClosed(Event event, Widget widget) { stopThread(); return false; } /** * Event handler for the Start/Stop button */ private void buttonClicked(Button button) { if (!running) { writeln("Adding idle delegate"); gdk.Threads.threadsAddIdle(&threadIdleProcess, null); writeln("Spawning thread..."); childTid = spawn(&countNumbers); button.setLabel("Stop"); } else { stopThread(); button.setLabel("Start"); } } /** * Stop the spawned thread by sending it a message to * stop */ public void stopThread() { if (running) { childTid.send(true); } } /** * Called by the idle thread callback to add a value * to the TreeView */ public void addValue(int value) { TreeIter iter = store.createIter(); store.setValue(iter, 0, value); } } // Used to track if the spawned thread is running shared bool running = false; /** * Function call that get's spawned. It simply counts numbers * and sleeps for a second between each interval simulating * doing work and sending progress updates. * * It also listens for a message from the GTK thread telling * it to stop if the user wishes to abort processing. */ void countNumbers() { writeln("Thread running "); int count = 0; running = true; bool stop = false; while (!stop) { count++; writeln("Current count: ",count); ownerTid.send(count); Thread.getThis().sleep(dur!("msecs")( 1000 )); receiveTimeout(dur!("msecs")( 0 ), (bool abort) { stop = abort; } ); } writeln("Shutting down thread"); running = false; } /** * The idle callback invoked by GTK periodically when the * application main thread is not engaged in any processing. */ extern(C) nothrow static int threadIdleProcess(void* data) { //Don't let D exceptions get thrown from function try{ receiveTimeout(dur!("msecs")( 0 ), (int value) { mainWindow.addValue(value); } ); // If thread is not running, return false so GTK removes it // and no longer calls it during idle processing. if (!running) { return 0; } } catch (Throwable t) { return 0; } return 1; } MainWindow mainWindow; int main(string[] args) { std.concurrency.thisTid; auto application = new Application("demo.gtkd.Multithread", GApplicationFlags.FLAGS_NONE); application.addOnActivate(delegate void(GioApplication app){ mainWindow = new MainWindow(application); }); return application.run(args); } GtkD-3.7.5/demos/gtkD/DemoMultithread/dub.json000066400000000000000000000003571324604450400211220ustar00rootroot00000000000000{ "name": "demo_multithread", "description": "A Multi threading demo", "targetType": "executable", "targetName": "DemoMultithread", "sourceFiles": ["DemoMultithread.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" }, } } GtkD-3.7.5/demos/gtkD/TestWindow/000077500000000000000000000000001324604450400164705ustar00rootroot00000000000000GtkD-3.7.5/demos/gtkD/TestWindow/TEditableCells.d000066400000000000000000000206151324604450400214610ustar00rootroot00000000000000///* // * 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 // */ // //module gtkD.TEditableCells; // //private import gtk.gtktypes; // //private import gtk.Window; // //private import gtk.TreeView; //private import gtk.TreeModel; //private import gtk.CellRenderer; //private import gtk.Button; //private import gtk.MenuItem; //private import gtk.VBox; //private import gtk.HBox; //private import gtk.ScrolledWindow; //private import gtk.Label; //private import gtk.ListStore; //private import gtk.TreeView; //private import gtk.TreeIter; //private import gtk.TreePath; //private import gtk.CellRendererText; //private import gtk.TreeViewColumn; //private import gtk.Item; //private import gtk.TreeSelection; //private import gtk.MessageDialog; // //private import std.string; //private import std.stdio; // //private import gtk.TreeNode; // ///** // * reproduces the gtk-demo Editable Cells // * \todo review array of chars copy // */ //public: //class TEditableCells : Window //{ // ListRow[] listRows; // TreeView treeView; // // /** // * ctor. must reactivate the constructor name change loby // */ // this() // { // super("Shopping list"); // setDefaultSize(320,200); // setBorderWidth(5); // // setup(); // // show(); // } // // private void setup() // { // VBox vbox; // HBox hbox; // ScrolledWindow sw; // Button button; // TreeModel model; // // /* create window, etc */ // // vbox = new VBox(false, 5); // add(vbox); // vbox.packStart(new Label("Shopping list (you can edit the cells!)"),false,false, 0); // // sw = new ScrolledWindow(null,null); // sw.setShadowType(ShadowType.ETCHED_IN); // sw.setPolicy(PolicyType.AUTOMATIC,PolicyType.AUTOMATIC); // vbox.packStart(sw,true,true, 0); // // /* create model */ // model = createModel(); // // /* create tree view */ // treeView = new TreeView(model); // add model here // //g_object_unref (model); // do we need this??? // treeView.setRulesHint(true); // treeView.getSelection().setMode(SelectionMode.SINGLE); // // addColumns(treeView); // sw.add(treeView); // // /* some buttons */ // hbox = new HBox(true,4); // vbox.packStart(hbox,false,false,0); // // button = new Button("Add item",&addItem); // hbox.packStart(button,true,true,0); // // button = new Button("Remove item",&removeItem); // hbox.packStart(button,true,true,0); // // } // // enum cols // { // COLUMN_NUMBER, // COLUMN_PRODUCT, // COLUMN_EDITABLE, // NUM_COLUMNS // }; // // TreeModel createModel() // { // // // int i = 0; // ListStore model; // TreeIter iter = new TreeIter(); // // /* create array */ // //articles = g_array_sized_new (FALSE, FALSE, sizeof (Item), 1); // // addItems(); // // GtkDType []columns; //// columns ~= GtkDType.INT; //// columns ~= GtkDType.STRING; //// columns ~= GtkDType.BOOLEAN; // // columns ~= GtkDType.STRING; // columns ~= GtkDType.STRING; // columns ~= GtkDType.BOOLEAN; // // /* create list store */ // model = new ListStore(columns); // // /* add items */ // foreach(ListRow row ; listRows) // { // model.append(iter); // model.set(iter,row); // } // // return model; // } // // void editedCallback(CellRenderer renderer, TreeModel model, string pathString, string newText,int column) // { // //printf("path string %.*s\n",pathString); // //printf("newText %.*s\n",newText); // //printf("column %d\n",column); // // TreeIter iter = new TreeIter(); // // ListStore store = cast(ListStore)model; // // TreePath path = new TreePath(pathString); // model.getIter(iter,path); // //store.getIter(iter,path); // int row = path.getIndices()[0]; // // switch ( column ) // { // case 0: // try // { // listRows[row].setNumber(Integer.toInt(newText)); // } // catch(Error error) // { // //printf("catch error\n"); // // ignore to keep old value // } // //model.set(iter, listRows[row]); // store.setValue(iter, column, listRows[row].getNumber().toString()); // break; // // case 1: // listRows[row].setProduct(newText); // //model.set(iter, listRows[row]); // store.setValue(iter, column, listRows[row].getProduct().toString()); // break; // // default: // printf("TEditableCells.editedCallback : Unexpected column edited %d\n",column); // break; // } // dump(listRows); // // } // void addColumns(TreeView treeView) // { // Dispatcher dispatcher = Dispatcher.getDispatcher(); // CellRenderer renderer; // TreeModel model = treeView.getModel(); // renderer = new CellRendererText(); // int pos = treeView.insertEditableColumn(0, "Number", renderer, true); // //TreeViewColumn column = new TreeViewColumn("Number",new CellRendererText(),"text", 0); // //treeView.appendColumn(column); // TreeViewColumn column = treeView.getColumn(pos-1); // column.setResizable(true); // column.setSortColumnID(0); // column.setSortIndicator(true); // dispatcher.addCellListener(this,renderer,model,pos-1); // // renderer = new CellRendererText(); // pos = treeView.insertEditableColumn(1, "Product", renderer, true); // //column = new TreeViewColumn("Product",new CellRendererText(),"text", 1); // //treeView.appendColumn(column); // column = treeView.getColumn(pos-1); // column.setResizable(true); // column.setSortColumnID(1); // column.setSortIndicator(true); // dispatcher.addCellListener(this,renderer,model,pos-1); // // } // // class ListRow : TreeNode // { // int number; // string product; // bit editable; // this(int number, string prod, bit editable) // { // this.number = number; // product = prod; // this.editable = editable; // } // void setNumber(int number) // { // this.number = number; // } // string getNumber() // { // return number; // } // void setProduct(string prod) // { // product = prod; // } // string getProduct() // { // return product; // } // void* getNodeValue(int column) // { // switch(column) // { // case 0: return number; break; // case 1: return product; break; // case 2: return editable; break; // } // } // string toString() // { // return ""~number ~ "\t" ~ product ~ "\t" ~ editable; // } // } // // void addItems() // { // listRows ~= new ListRow(3,"bottles of coke",true); // listRows ~= new ListRow(5,"packages of noodles",true); // listRows ~= new ListRow(2,"packages of chocolate chip cookies",true); // listRows ~= new ListRow(1,"can vanilla ice cream",true); // listRows ~= new ListRow(6,"eggs",true); // } // // void addItem(Button button) // { // Item foo; // TreeIter iter = new TreeIter; // ListStore model = treeView.getListStore(); // // ListRow row = new ListRow(0,"Description here",true); // // model.append(iter); // model.set(iter,row); // listRows ~= row; // // } // // void removeItem(Button button) // { // // TreeIter iter = new TreeIter; // ListStore model = treeView.getListStore(); // // TreeSelection selection = treeView.getSelection(); // // if ( selection.getSelected(model,iter) ) // { // TreePath path; // path = model.getPath(iter); // int row = path.getIndices()[0]; // model.remove(iter); // // //dump(listRows); // //listRows = listRows[0..row] ~ listRows[row+1..listRows.length]; // listRows[row..listRows.length-1] = listRows[row+1..listRows.length]; // listRows.length = listRows.length-1; // //dump(listRows); // path.free(); // } // } // // // void dump(Object[] oArray) // { // writefln("\n"); // foreach(Object o ; oArray) // { // writefln("%s",o); // } // } //} GtkD-3.7.5/demos/gtkD/TestWindow/TTextView.d000066400000000000000000000420231324604450400205410ustar00rootroot00000000000000/* * 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 */ module TTextView; private import gtk.Window; private import gtk.Widget; private import gtk.TextView; private import gtk.TextBuffer; private import gtk.TextIter; private import gtk.VPaned; private import gtk.ScrolledWindow; private import gtk.TextChildAnchor; private import gtk.Button; private import gtk.Menu; private import gtk.MenuItem; private import gtk.HScale; private import gtk.Image; private import gtk.Entry; private import gdk.Pixbuf; private import gtk.ComboBoxText; private import glib.GException; private import std.stdio; /** * reproduces the gtk-demo TextView * \bug the output shows erros like (DUITest.exe:5012): GLib-GObject-WARNING **: [Invalid UTF-8] gobject.c:882: object class `GtkTextTag' has no property named `l┌E' */ public: class TTextView : Window { TextView view1; TextBuffer buffer; TextView view2; /** * ctor. must reactivate the constructor name change loby */ this() { super("TextView"); setDefaultSize(450,450); setBorderWidth(0); createTextViews(); setupWidgets(); createTags(buffer); insertText(buffer); attachWidgets(view1); attachWidgets(view2); showAll(); } // bit windowDeleteCallback(Window window, Event event) // { // return false; // } // // bit windowDestroyCallback(Window window, Event event) // { // writeln("TTextView windowDestroyCallback"); // return false; // } /** * creates the text view and buffer to use */ void createTextViews() { view1 = new TextView(); buffer = view1.getBuffer(); view2 = new TextView(buffer); } /** * sets up the widgets ot this test */ void setupWidgets() { VPaned vPaned = new VPaned(); vPaned.setBorderWidth(5); add(vPaned); ScrolledWindow sw = new ScrolledWindow(PolicyType.AUTOMATIC, PolicyType.AUTOMATIC); sw.add(view1); vPaned.add1(sw); sw = new ScrolledWindow(PolicyType.AUTOMATIC, PolicyType.AUTOMATIC); sw.add(view2); vPaned.add2(sw); } /** * Creates all the text tags to use * @param buffer the TextBuffer */ void createTags(TextBuffer buffer) { /* Create a bunch of tags. Note that it's also possible to * create tags with gtk_text_tag_new() then add them to the * tag table for the buffer, gtk_text_buffer_create_tag() is * just a convenience function. Also note that you don't have * to give tags a name; pass NULL for the name to create an * anonymous tag. * * In any real app, another useful optimization would be to create * a GtkTextTagTable in advance, and reuse the same tag table for * all the buffers with the same tag set, instead of creating * new copies of the same tags for every buffer. * * Tags are assigned default priorities in order of addition to the * tag table. That is, tags created later that affect the same text * property affected by an earlier tag will override the earlier * tag. You can modify tag priorities with * gtk_text_tag_set_priority(). */ buffer.createTag("heading", "weight", PangoWeight.BOLD, "size", 15 * PANGO_SCALE); buffer.createTag("italic", "style", cast(int)PangoStyle.ITALIC); buffer.createTag("bold", "weight", cast(int)PangoWeight.BOLD); buffer.createTag("big", /* points times the PANGO_SCALE factor */ "size", 20 * PANGO_SCALE); buffer.createTag("xx-small", "scale", PANGO_SCALE_XX_SMALL); buffer.createTag("x-large", "scale", PANGO_SCALE_X_LARGE); buffer.createTag("monospace", "family", "monospace"); buffer.createTag("blue_foreground", "foreground", "blue"); buffer.createTag("red_background", "background", "red"); buffer.createTag("big_gap_before_line", "pixels_above_lines", 30); buffer.createTag("big_gap_after_line", "pixels_below_lines", 30); buffer.createTag("double_spaced_line", "pixels_inside_wrap", 10); buffer.createTag("not_editable", "editable", cast(int)false); buffer.createTag("word_wrap", "wrap_mode", cast(int)WrapMode.WORD); buffer.createTag("char_wrap", "wrap_mode", cast(int)WrapMode.CHAR); buffer.createTag("no_wrap", "wrap_mode", cast(int)WrapMode.NONE); buffer.createTag("center", "justification", cast(int)Justification.CENTER); buffer.createTag("right_justify", "justification", cast(int)Justification.RIGHT); buffer.createTag("wide_margins", "left_margin", 50, "right_margin", 50); buffer.createTag("strikethrough", "strikethrough", cast(int)true); buffer.createTag("underline", "underline", cast(int)PangoUnderline.SINGLE); buffer.createTag("double_underline", "underline", cast(int)PangoUnderline.DOUBLE); buffer.createTag("superscript", "rise", 10 * PANGO_SCALE, /* 10 pixels */ "size", 8 * PANGO_SCALE); /* 8 points */ buffer.createTag("subscript", "rise", -10 * PANGO_SCALE, /* 10 pixels */ "size", 8 * PANGO_SCALE); /* 8 points */ buffer.createTag("rtl_quote", "wrap_mode", WrapMode.WORD, "direction", TextDirection.RTL, "indent", 30, "left_margin", 20, "right_margin", 20); } /** * Inserts all the test text into the buffer * @param buffer the TextBuffer */ void insertText(TextBuffer buffer) { //version(Tango) {} else { TextIter iter = new TextIter(); TextIter start = new TextIter(); TextIter end = new TextIter(); Pixbuf pixbuf; Pixbuf scaled; TextChildAnchor anchor; string filename; /* demo_find_file() looks in the the current directory first, * so you can run gtk-demo without installing GTK, then looks * in the location where the file is installed. */ try { pixbuf = new Pixbuf("images/gtk-logo-rgb.gif"); scaled = pixbuf.scaleSimple(32, 32, InterpType.BILINEAR); pixbuf = pixbuf.scaleSimple(38, 38, InterpType.BILINEAR); } catch (Exception) { version(Tango) Stdout("Failed to load image file gtk-logo-rgb.gif").newline; else writef("Failed to load image file gtk-logo-rgb.gif\n"); } /* get start of buffer; each insertion will revalidate the * iterator to point to just after the inserted text. */ buffer.getIterAtOffset(iter, 0); buffer.insert(iter, "The text widget can display text with all kinds of nifty attributes. It also supports multiple views of the same buffer; this demo is showing the same buffer in two places.\n\n"); buffer.insertWithTagsByName(iter, "Font styles. ","heading"); buffer.insert(iter, "For example, you can have "); buffer.insertWithTagsByName(iter, "italic", "italic"); buffer.insert(iter, ", "); buffer.insertWithTagsByName(iter, "bold", "bold"); buffer.insert(iter, ", or "); buffer.insertWithTagsByName(iter, "monospace (typewriter)", "monospace"); buffer.insert(iter, ", or "); buffer.insertWithTagsByName(iter, "big", "big"); buffer.insert(iter, " text. "); buffer.insert(iter, "It's best not to hardcode specific text sizes; you can use relative sizes as with CSS, such as "); buffer.insertWithTagsByName(iter, "xx-small", "xx-small"); buffer.insert(iter, " or "); buffer.insertWithTagsByName(iter, "x-large", "x-large"); buffer.insert(iter, " to ensure that your program properly adapts if the user changes the default font size.\n\n"); buffer.insertWithTagsByName(iter, "Colors. ", "heading"); buffer.insert(iter, "Colors such as "); buffer.insertWithTagsByName(iter, "a blue foreground", "blue_foreground"); buffer.insert(iter, " or "); buffer.insertWithTagsByName(iter, "a red background", "red_background"); buffer.insert(iter, " can be used.\n\n"); buffer.insertWithTagsByName(iter, "Underline, strikethrough, and rise. ", "heading"); buffer.insertWithTagsByName(iter, "Strikethrough", "strikethrough"); buffer.insert(iter, ", "); buffer.insertWithTagsByName(iter, "underline", "underline"); buffer.insert(iter, ", "); buffer.insertWithTagsByName(iter, "double underline", "double_underline"); buffer.insert(iter, ", "); buffer.insertWithTagsByName(iter, "superscript", "superscript"); buffer.insert(iter, ", and "); buffer.insertWithTagsByName(iter, "subscript", "subscript"); buffer.insert(iter, " are all supported.\n\n"); buffer.insertWithTagsByName(iter, "Images. ", "heading"); buffer.insert(iter, "The buffer can have images in it: "); if ( pixbuf !is null ) { buffer.insertPixbuf(iter, scaled); buffer.insertPixbuf(iter, pixbuf); buffer.insertPixbuf(iter, scaled); } else { buffer.insert(iter,"Sorry can't find the images"); } buffer.insert(iter, " for example.\n\n"); buffer.insertWithTagsByName(iter, "Spacing. ", "heading"); buffer.insert(iter, "You can adjust the amount of space before each line.\n"); buffer.insertWithTagsByName(iter, "This line has a whole lot of space before it.\n", "big_gap_before_line", "wide_margins"); buffer.insertWithTagsByName(iter, "You can also adjust the amount of space after each line; this line has a whole lot of space after it.\n", "big_gap_after_line", "wide_margins"); buffer.insertWithTagsByName(iter, "You can also adjust the amount of space between wrapped lines; this line has extra space between each wrapped line in the same paragraph. To show off wrapping, some filler text: the quick brown fox jumped over the lazy dog. Blah blah blah blah blah blah blah blah blah.\n", "double_spaced_line", "wide_margins"); buffer.insert(iter, "Also note that those lines have extra-wide margins.\n\n"); buffer.insertWithTagsByName(iter, "Editability. ", "heading"); buffer.insertWithTagsByName(iter, "This line is 'locked down' and can't be edited by the user - just try it! You can't delete this line.\n\n", "not_editable"); buffer.insertWithTagsByName(iter, "Wrapping. ", "heading"); buffer.insert(iter, "This line (and most of the others in this buffer) is word-wrapped, using the proper Unicode algorithm. Word wrap should work in all scripts and languages that GTK+ supports. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n"); buffer.insertWithTagsByName(iter, "This line has character-based wrapping, and can wrap between any two character glyphs. Let's make this a long paragraph to demonstrate: blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah\n\n", "char_wrap"); buffer.insertWithTagsByName(iter, "This line has all wrapping turned off, so it makes the horizontal scrollbar appear.\n\n\n", "no_wrap"); buffer.insertWithTagsByName(iter, "Justification. ", "heading"); buffer.insertWithTagsByName(iter, "\nThis line has center justification.\n", "center"); buffer.insertWithTagsByName(iter, "This line has right justification.\n", "right_justify"); buffer.insertWithTagsByName(iter, "\nThis line has big wide margins. Text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text.\n", "wide_margins"); buffer.insertWithTagsByName(iter, "Internationalization. ", "heading"); buffer.insert(iter, "You can put all sorts of Unicode text in the buffer.\n\nGerman (Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek (\316\225\316\273\316\273\316\267\316\275\316\271\316\272\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261\317\202\nHebrew \327\251\327\234\327\225\327\235\nJapanese (\346\227\245\346\234\254\350\252\236)\n\nThe widget properly handles bidirectional text, word wrapping, DOS/UNIX/Unicode paragraph separators, grapheme boundaries, and so on using the Pango internationalization framework.\n"); buffer.insert(iter, "Here's a word-wrapped quote in a right-to-left language:\n"); buffer.insertWithTagsByName(iter, "\331\210\331\202\330\257 \330\250\330\257\330\243 \330\253\331\204\330\247\330\253 \331\205\331\206 \330\243\331\203\330\253\330\261 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \330\252\331\202\330\257\331\205\330\247 \331\201\331\212 \330\264\330\250\331\203\330\251 \330\247\331\203\330\263\331\212\331\210\331\206 \330\250\330\261\330\247\331\205\330\254\331\207\330\247 \331\203\331\205\331\206\330\270\331\205\330\247\330\252 \331\204\330\247 \330\252\330\263\330\271\331\211 \331\204\331\204\330\261\330\250\330\255\330\214 \330\253\331\205 \330\252\330\255\331\210\331\204\330\252 \331\201\331\212 \330\247\331\204\330\263\331\206\331\210\330\247\330\252 \330\247\331\204\330\256\331\205\330\263 \330\247\331\204\331\205\330\247\330\266\331\212\330\251 \330\245\331\204\331\211 \331\205\330\244\330\263\330\263\330\247\330\252 \331\205\330\247\331\204\331\212\330\251 \331\205\331\206\330\270\331\205\330\251\330\214 \331\210\330\250\330\247\330\252\330\252 \330\254\330\262\330\241\330\247 \331\205\331\206 \330\247\331\204\331\206\330\270\330\247\331\205 \330\247\331\204\331\205\330\247\331\204\331\212 \331\201\331\212 \330\250\331\204\330\257\330\247\331\206\331\207\330\247\330\214 \331\210\331\204\331\203\331\206\331\207\330\247 \330\252\330\252\330\256\330\265\330\265 \331\201\331\212 \330\256\330\257\331\205\330\251 \331\202\330\267\330\247\330\271 \330\247\331\204\331\205\330\264\330\261\331\210\330\271\330\247\330\252 \330\247\331\204\330\265\330\272\331\212\330\261\330\251. \331\210\330\243\330\255\330\257 \330\243\331\203\330\253\330\261 \331\207\330\260\331\207 \330\247\331\204\331\205\330\244\330\263\330\263\330\247\330\252 \331\206\330\254\330\247\330\255\330\247 \331\207\331\210 \302\273\330\250\330\247\331\206\331\203\331\210\330\263\331\210\331\204\302\253 \331\201\331\212 \330\250\331\210\331\204\331\212\331\201\331\212\330\247.\n\n", "rtl_quote"); buffer.insert(iter, "You can put widgets in the buffer: Here's a button: "); anchor = buffer.createChildAnchor(iter); buffer.insert(iter, " and a menu: "); anchor = buffer.createChildAnchor(iter); buffer.insert(iter, " and a scale: "); anchor = buffer.createChildAnchor(iter); buffer.insert(iter, " and an animation: "); anchor = buffer.createChildAnchor(iter); buffer.insert(iter, " finally a text entry: "); anchor = buffer.createChildAnchor(iter); buffer.insert(iter, ".\n"); buffer.insert(iter, "\n\nThis demo doesn't demonstrate all the GtkTextBuffer features; it leaves out, for example: invisible/hidden text (doesn't work in GTK 2, but planned), tab stops, application-drawn areas on the sides of the widget for displaying breakpoints and such..."); /* Apply word_wrap tag to whole buffer */ buffer.getBounds(start, end); buffer.applyTagByName("word_wrap", start, end); } } /** * Attaches all test widgets to the text view * @param view the TextView */ void attachWidgets(TextView view) { TextIter iter = new TextIter(); TextBuffer buffer; int i; buffer = view.getBuffer(); buffer.getStartIter(iter); i = 0; while (findAnchor(iter)) { TextChildAnchor anchor;// = new TextChildAnchor(); Widget widget; anchor = iter.getChildAnchor(); if (i == 0) { Button button = new Button("Click Me"); widget = button; } else if (i == 1) { ComboBoxText comboBox = new ComboBoxText(); comboBox.appendText("Option 1"); comboBox.appendText("Option 2"); comboBox.appendText("Option 3"); widget = comboBox; } else if (i == 2) { HScale hScale = new HScale(0.0,100.0,5.0); hScale.setSizeRequest(70, -1); widget = hScale; } else if (i == 3) { Image image = new Image("images/floppybuddy.gif"); widget = image; } else if (i == 4) { widget = new Entry(); } else { widget = null; //g_assert_not_reached (); } if ( widget !is null ) { view.addChildAtAnchor(widget,anchor); } ++i; } } bool findAnchor (TextIter iter) { while (iter.forwardChar()) { if (iter.getChildAnchor() !is null ) //gtk_text_iter_get_child_anchor (iter)) { return true; } } return false; } } GtkD-3.7.5/demos/gtkD/TestWindow/TestAspectFrame.d000066400000000000000000000021441324604450400216700ustar00rootroot00000000000000/* * 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 */ module TestAspectFrame; private import gtk.AspectFrame; private import TestDrawingArea; /** * This tests the DUI aspect frame */ class TestAspectFrame : AspectFrame { this() { // string label, gfloat xalign, gfloat yalign, gfloat ratio, bit obeyChild) super("Aspect 3x1", .5, .5, 3.0, false); add(new TestDrawingArea()); } } GtkD-3.7.5/demos/gtkD/TestWindow/TestDrawingArea.d000066400000000000000000000321311324604450400216610ustar00rootroot00000000000000/* * 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 */ module TestDrawingArea; //debug = trace; private import cairo.Context; private import cairo.ImageSurface; private import gtk.VBox; private import pango.PgContext; private import pango.PgLayout; private import std.stdio; private import std.math; private import gtk.Widget; private import gtk.MenuItem; private import gtk.ComboBox; private import gtk.ComboBoxText; private import gtk.Menu; private import gtk.Adjustment; private import gtk.HBox; private import gdk.Pixbuf; private import gdk.Cairo; private import gdk.Color; private import gdk.Event; private import pango.PgCairo; private import pango.PgFontDescription; private import gtk.DrawingArea; private import gtk.Image; private import gtk.SpinButton; /** * This tests the gtkD drawing area widget */ class TestDrawingArea : VBox { this() { super(false,4); TestDrawing drawingArea = new TestDrawing(); ComboBoxText operators = new ComboBoxText(); operators.appendText("CLEAR"); operators.appendText("SOURCE"); operators.appendText("OVER"); operators.appendText("IN"); operators.appendText("OUT"); operators.appendText("ATOP"); operators.appendText("DEST"); operators.appendText("DEST_OVER"); operators.appendText("DEST_IN"); operators.appendText("DEST_OUT"); operators.appendText("DEST_ATOP"); operators.appendText("XOR"); operators.appendText("ADD"); operators.appendText("SATURATE"); operators.appendText("MULTIPLY"); operators.appendText("SCREEN"); operators.appendText("OVERLAY"); operators.appendText("DARKEN"); operators.appendText("LIGHTEN"); operators.appendText("COLOR_DODGE"); operators.appendText("COLOR_BURN"); operators.appendText("HARD_LIGHT"); operators.appendText("SOFT_LIGHT"); operators.appendText("DIFFERENCE"); operators.appendText("EXCLUSION"); operators.appendText("HSL_HUE"); operators.appendText("HSL_SATURATION"); operators.appendText("HSL_COLOR"); operators.appendText("HSL_LUMINOSITY"); operators.setActive(1); operators.addOnChanged(&drawingArea.onOperatorsChanged); ComboBoxText primOption = new ComboBoxText(); primOption.appendText("Filled Arc"); primOption.appendText("Arc"); primOption.appendText("Line"); primOption.appendText("Point"); primOption.appendText("Rectangle"); primOption.appendText("Filled Rectangle"); primOption.appendText("Text"); primOption.appendText("Pango text"); primOption.appendText("Image"); primOption.appendText("Polygon"); primOption.setActive(0); primOption.addOnChanged(&drawingArea.onPrimOptionChanged); packStart(drawingArea,true,true,0); HBox hbox = new HBox(false,4); hbox.packStart(operators,false,false,2); hbox.packStart(primOption,false,false,2); hbox.packStart(drawingArea.spin,false,false,2); hbox.packStart(drawingArea.backSpin,false,false,2); packStart(hbox, false, false, 0); } class TestDrawing : DrawingArea { CairoOperator operator = CairoOperator.OVER; ImageSurface surface; Color paintColor; Color black; int width; int height; bool buttonIsDown; string primitiveType; PgFontDescription font; Image image; Pixbuf scaledPixbuf; SpinButton spin; SpinButton backSpin; static GdkPoint[] polygonStar = [ {0,4}, {1,1}, {4,0}, {1,-1}, {0,-4}, {-1,-1}, {-4,0}, {-1,1} ]; this() { setSizeRequest(333,333); width = getWidth(); height = getHeight(); primitiveType = "Filled Arc"; font = PgFontDescription.fromString("Courier 48"); image = new Image("images/gtkDlogo_a_small.png"); scaledPixbuf = image.getPixbuf(); if (scaledPixbuf is null) { writeln("\nFailed to load image file gtkDlogo_a_small.png"); } paintColor = new Color(cast(ubyte)0,cast(ubyte)0,cast(ubyte)0); black = new Color(cast(ubyte)0,cast(ubyte)0,cast(ubyte)0); spin = new SpinButton(new Adjustment(30, 1, 400, 1, 10, 0),1,0); sizeSpinChanged(spin); spin.addOnValueChanged(&sizeSpinChanged); backSpin = new SpinButton(new Adjustment(5, 4, 100, 1, 10, 0),1,0); backSpin.addOnValueChanged(&backSpinChanged); addOnDraw(&drawCallback); addOnMotionNotify(&onMotionNotify); addOnSizeAllocate(&onSizeAllocate); addOnButtonPress(&onButtonPress); addOnButtonRelease(&onButtonRelease); } void onSizeAllocate(GtkAllocation* allocation, Widget widget) { width = allocation.width; height = allocation.height; surface = ImageSurface.create(CairoFormat.ARGB32, width, height); drawPoints(Context.create(surface)); } public bool onButtonPress(Event event, Widget widget) { debug(trace) writefln("button DOWN"); if ( event.type == EventType.BUTTON_PRESS && event.button.button == 1 ) { debug(trace) writefln("Button 1 down"); buttonIsDown = true; drawPrimitive(cast(int)event.button.x, cast(int)event.button.y); } return false; } public bool onButtonRelease(Event event, Widget widget) { debug(trace) writefln("button UP"); if ( event.type == EventType.BUTTON_RELEASE && event.button.button == 1 ) { debug(trace) writefln("Button 1 UP"); buttonIsDown = false; } return false; } /** * This will be called from the expose event call back. * \bug this is called on get or loose focus - review */ public bool drawCallback(Scoped!Context context, Widget widget) { //Fill the Widget with the surface we are drawing on. context.setSourceSurface(surface, 0, 0); context.paint(); return true; } public bool onMotionNotify(Event event, Widget widget) { //writeln("testWindow.mouseMoved -----------------------------"); if ( buttonIsDown && event.type == EventType.MOTION_NOTIFY ) { drawPrimitive(cast(int)event.motion.x, cast(int)event.motion.y); } return true; } static int backSpinCount = 0; public void backSpinChanged(SpinButton spinButton) { debug(trace) writefln("backSpinChanged - entry %s", ++backSpinCount); drawPoints(Context.create(surface)); this.queueDraw(); debug(trace) writefln("backSpinChanged - exit"); } public void sizeSpinChanged(SpinButton spinButton) { if ( !(scaledPixbuf is null)) { int width = spinButton.getValueAsInt(); scaledPixbuf = image.getPixbuf(); float ww = width * scaledPixbuf.getWidth() / 30; float hh = width * scaledPixbuf.getHeight() / 30; scaledPixbuf = scaledPixbuf.scaleSimple(cast(int)ww, cast(int)hh, GdkInterpType.HYPER); } } public void drawPrimitive(int x, int y) { int width = spin.getValueAsInt(); int height = width * 3 / 4; Context context = Context.create(surface); context.setOperator(operator); debug(trace) writefln("primitiveType = %s", primitiveType); switch ( primitiveType ) { case "Arc": context.arc(x-width/2,y-width/2,width,0,2*PI); context.stroke(); break; case "Filled Arc": context.arc(x-width/4,y-width/4,width/2,0,2*PI); context.fill(); break; case "Line": context.moveTo(x, y); context.lineTo(x+width, y); context.stroke(); break; case "Point": context.rectangle(x, y, 1, 1); context.fill(); break; case "Rectangle": context.rectangle(x-width/2, y-width/4, width, height); context.stroke(); break; case "Filled Rectangle": context.rectangle(x-width/2, y-width/4, width, height); context.fill(); break; case "Text": context.selectFontFace("FreeMono", CairoFontSlant.NORMAL, CairoFontWeight.NORMAL); context.setFontSize(12); context.moveTo(x, y); context.showText("gtkD toolkit"); break; case "Pango text": PgLayout l = PgCairo.createLayout(context); PgFontDescription fd = new PgFontDescription("Sans", width); l.setText("Gtk+ with D"); l.setFontDescription(fd); context.moveTo(x, y); PgCairo.showLayout(context, l); break; case "Image": if ( !(scaledPixbuf is null)) { context.setSourcePixbuf(scaledPixbuf, x, y); context.paint(); } break; case "Polygon": //TODO: Use Context.scale and transform ? for ( int scale = 10 ; scale<= 300; scale+=15) { context.save(); context.moveTo(polygonStar[0].x*scale/2+x, polygonStar[0].y*scale/2+y); foreach(p; polygonStar[1 .. $]) { context.lineTo(p.x*scale/2+x, p.y*scale/2+y); } context.closePath(); context.stroke(); context.restore(); } break; default: context.arcNegative(x-2,y-2,4,0,6); context.fill(); break; } //Redraw the Widget. this.queueDraw(); } private void drawPoints(Context context) { int square = backSpin.getValueAsInt(); int totalcount = 0; int count = 0; Color color = new Color(); int width = this.width; int height = this.height; int x = 0; int y = 0; debug(trace) writefln("w,h = %s %s",width ,height); float dx = 256.0 / width; float dy = 256.0 / height ; float xx; float yy; while ( x < width || y 1 ) { context.rectangle(x, y, square, square); context.fill(); } else { context.moveTo(x, y); context.stroke(); } x +=square; if ( x > width) { if ( y>height) { //y=0; } else { x = 0; y+=square; } } ++totalcount; context.restore(); } delete color; } void onOperatorsChanged(ComboBoxText comboBoxText) { debug(trace) writefln("CairoOperator = %s", comboBoxText.getActiveText()); switch ( comboBoxText.getActiveText() ) { case "CLEAR": operator = CairoOperator.CLEAR; break; case "SOURCE": operator = CairoOperator.SOURCE; break; case "OVER": operator = CairoOperator.OVER; break; case "IN": operator = CairoOperator.IN; break; case "OUT": operator = CairoOperator.OUT; break; case "ATOP": operator = CairoOperator.ATOP; break; case "DEST": operator = CairoOperator.DEST; break; case "DEST_OVER": operator = CairoOperator.DEST_OVER; break; case "DEST_IN": operator = CairoOperator.DEST_IN; break; case "DEST_OUT": operator = CairoOperator.DEST_OUT; break; case "DEST_ATOP": operator = CairoOperator.DEST_ATOP; break; case "XOR": operator = CairoOperator.XOR; break; case "ADD": operator = CairoOperator.ADD; break; case "SATURATE": operator = CairoOperator.SATURATE; break; case "MULTIPLY": operator = CairoOperator.MULTIPLY; break; case "SCREEN": operator = CairoOperator.SCREEN; break; case "OVERLAY": operator = CairoOperator.OVERLAY; break; case "DARKEN": operator = CairoOperator.DARKEN; break; case "LIGHTEN": operator = CairoOperator.LIGHTEN; break; case "COLOR_DODGE": operator = CairoOperator.COLOR_DODGE; break; case "COLOR_BURN": operator = CairoOperator.COLOR_BURN; break; case "HARD_LIGHT": operator = CairoOperator.HARD_LIGHT; break; case "SOFT_LIGHT": operator = CairoOperator.SOFT_LIGHT; break; case "DIFFERENCE": operator = CairoOperator.DIFFERENCE; break; case "EXCLUSION": operator = CairoOperator.EXCLUSION; break; case "HSL_HUE": operator = CairoOperator.HSL_HUE; break; case "HSL_SATURATION": operator = CairoOperator.HSL_SATURATION; break; case "HSL_COLOR": operator = CairoOperator.HSL_COLOR; break; case "HSL_LUMINOSITY": operator = CairoOperator.HSL_LUMINOSITY; break; default: operator = CairoOperator.OVER; break; } } void onPrimOptionChanged(ComboBoxText comboBoxText) { primitiveType = comboBoxText.getActiveText(); } } } GtkD-3.7.5/demos/gtkD/TestWindow/TestEntries.d000066400000000000000000000047731324604450400211210ustar00rootroot00000000000000/* * 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 */ module TestEntries; private import gtk.Table; private import gtk.Entry; private import gtk.CheckButton; private import gtk.Button; private import gtk.Label; private import glib.Str; private import std.stdio; /** * This tests the GtkD Entry widget */ class TestEntries : Table { /** * Out main widget to test */ Entry entry; /** * Creates a new TestEntries */ this() { super(3,2,false); // create the main test widget entry = new Entry("Change me!"); attach(new Label("Input text"),0,1,0,1,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); attach(entry,1,2,0,1,AttachOptions.EXPAND,AttachOptions.EXPAND,4,4); // create a button that will print the content of the entry to stdout Button testButton = new Button("Show entry", &showEntry); attach(testButton,2,3,0,1,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); //testButton.setTooltip("This is just a test",null); // create a button that will change the entry display mode to invisible // i.e. like a password entry CheckButton entryVisible = new CheckButton("Visible", &entryVisible); entryVisible.setActive(true); attach(entryVisible,2,3,1,2,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); // create a button that will change the entry mode to not editable CheckButton entryEditable = new CheckButton("Editable", &entryEditable); entryEditable.setActive(true); attach(entryEditable,1,2,1,2,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); } void showEntry(Button button) { writef("text field contains '%s'\n",entry.getText()); } void entryEditable(CheckButton button) { entry.setEditable(button.getActive()); } void entryVisible(CheckButton button) { entry.setVisibility(button.getActive()); } } GtkD-3.7.5/demos/gtkD/TestWindow/TestIdle.d000066400000000000000000000213001324604450400203460ustar00rootroot00000000000000/* * 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 */ module TestIdle; //debug = trace private import cairo.Context; private import cairo.ImageSurface; private import gtk.VBox; private import gtk.HBox; private import gtk.Box; private import gtk.DrawingArea; private import gdk.Event; private import gtk.Widget; private import gtk.ComboBox; private import gtk.ComboBoxText; private import gdk.Color; private import gdk.Cairo; private import gtk.SpinButton; private import gtk.Adjustment; private import std.stdio; private import glib.Idle; private import glib.Timeout; /** * This tests the gtkD drawing area widget */ class TestIdle : VBox { SpinButton timeoutSpin; this() { debug(1) { writeln("instantiating TestTimeout"); } super(false,7); TestDrawing drawingArea = new TestDrawing(); ComboBoxText operators = new ComboBoxText(); operators.appendText("CLEAR"); operators.appendText("SOURCE"); operators.appendText("OVER"); operators.appendText("IN"); operators.appendText("OUT"); operators.appendText("ATOP"); operators.appendText("DEST"); operators.appendText("DEST_OVER"); operators.appendText("DEST_IN"); operators.appendText("DEST_OUT"); operators.appendText("DEST_ATOP"); operators.appendText("XOR"); operators.appendText("ADD"); operators.appendText("SATURATE"); operators.appendText("MULTIPLY"); operators.appendText("SCREEN"); operators.appendText("OVERLAY"); operators.appendText("DARKEN"); operators.appendText("LIGHTEN"); operators.appendText("COLOR_DODGE"); operators.appendText("COLOR_BURN"); operators.appendText("HARD_LIGHT"); operators.appendText("SOFT_LIGHT"); operators.appendText("DIFFERENCE"); operators.appendText("EXCLUSION"); operators.appendText("HSL_HUE"); operators.appendText("HSL_SATURATION"); operators.appendText("HSL_COLOR"); operators.appendText("HSL_LUMINOSITY"); operators.setActive(2); operators.addOnChanged(&drawingArea.onOperatorChanged); ComboBoxText callType = new ComboBoxText(); callType.appendText("Idle"); callType.appendText("Timeout"); callType.setActive(1); callType.addOnChanged(&drawingArea.onCallTypeChanged); timeoutSpin = new SpinButton(new Adjustment(200.0, 1.0, 1000.0, 1.0, 100.0, 0),1,0); timeoutSpin.addOnValueChanged(&drawingArea.onTimeoutSpinValueChanged); Box controlBox = new HBox(false, 7); controlBox.packStart(operators, false, false, 2); controlBox.packStart(callType, false, false, 2); controlBox.packStart(timeoutSpin, false, false, 2); packStart(drawingArea,true,true,0); packStart(controlBox,false,false,0); } class TestDrawing : DrawingArea { Idle mainIdle; Timeout mainTimeout; bool continueIdleCallback; CairoOperator operator = CairoOperator.OVER; int x =0; int y =0; int xi =1; int yi =1; int totalcount = 0; int count = 0; int width; int height; ImageSurface surface; CallType callType = CallType.Timeout; this() { setSizeRequest(333,334); addOnMap(&onMap); addOnUnmap(&onUnmap); addOnSizeAllocate(&onSizeAllocate); addOnDraw(&onDraw); } public void onMap(Widget widget) { debug(trace) writefln("idle.onMap"); continueIdleCallback = true; x = 0; y = 0; xi = 1; yi = 1; resetCallType(); } public void onUnmap(Widget widget) { debug(trace) writefln("idle.onUnmap"); continueIdleCallback = false; } void onSizeAllocate(GtkAllocation* allocation, Widget widget) { width = allocation.width; height = allocation.height; x = 0; y = 0; xi = 1; yi = 1; surface = ImageSurface.create(CairoFormat.ARGB32, width, height); } void onTimeoutSpinValueChanged(SpinButton spin) { if ( callType == CallType.Timeout ) { resetCallType(); } } void resetCallType() { if ( mainIdle !is null ) { mainIdle.stop(); } if ( mainTimeout !is null ) { mainTimeout.stop(); } switch ( callType ) { case CallType.Idle: mainIdle = new Idle(&idleCallback); break; case CallType.Timeout: mainTimeout = new Timeout(timeoutSpin.getValueAsInt(),&idleCallback, true); break; default: mainIdle = new Idle(&idleCallback); break; } } bool onDraw(Scoped!Context context, Widget widget) { //Fill the Widget with the surface we are drawing on. context.setSourceSurface(surface, 0, 0); context.paint(); return true; } bool idleCallback() { Context context = Context.create(surface); context.setLineWidth(1); context.setOperator(operator); int xf; int yf; if ( xi<0 )xf = x; // going back else xf = width-x; if ( yi<0 )yf = y; // going up else yf = height-y; if ( xf %s %s (%s %s)\n",x,y,xf,yf,x+yf*xi, y+yf*yi); context.moveTo(x, y); context.lineTo(x+yf*xi, y+yf*yi); context.stroke(); x += yf*xi; y += yf*yi; if ( x>=width || x<=0 ) xi = -xi; if ( y>=height || y<=0 ) yi = -yi; //Redraw the Widget. this.queueDraw(); return continueIdleCallback; } void onCallTypeChanged(ComboBoxText comboBoxText) { debug(trace) writefln("gcOptions = %s", comboBoxText.getActiveText()); switch ( comboBoxText.getActiveText() ) { case "Idle": callType = CallType.Idle; break; case "Timeout": callType = CallType.Timeout; break; default: callType = CallType.Timeout; break; } resetCallType(); } void onOperatorChanged(ComboBoxText comboBoxText) { debug(trace) writefln("CairoOperator = %s", comboBoxText.getActiveText()); switch ( comboBoxText.getActiveText() ) { case "CLEAR": operator = CairoOperator.CLEAR; break; case "SOURCE": operator = CairoOperator.SOURCE; break; case "OVER": operator = CairoOperator.OVER; break; case "IN": operator = CairoOperator.IN; break; case "OUT": operator = CairoOperator.OUT; break; case "ATOP": operator = CairoOperator.ATOP; break; case "DEST": operator = CairoOperator.DEST; break; case "DEST_OVER": operator = CairoOperator.DEST_OVER; break; case "DEST_IN": operator = CairoOperator.DEST_IN; break; case "DEST_OUT": operator = CairoOperator.DEST_OUT; break; case "DEST_ATOP": operator = CairoOperator.DEST_ATOP; break; case "XOR": operator = CairoOperator.XOR; break; case "ADD": operator = CairoOperator.ADD; break; case "SATURATE": operator = CairoOperator.SATURATE; break; case "MULTIPLY": operator = CairoOperator.MULTIPLY; break; case "SCREEN": operator = CairoOperator.SCREEN; break; case "OVERLAY": operator = CairoOperator.OVERLAY; break; case "DARKEN": operator = CairoOperator.DARKEN; break; case "LIGHTEN": operator = CairoOperator.LIGHTEN; break; case "COLOR_DODGE": operator = CairoOperator.COLOR_DODGE; break; case "COLOR_BURN": operator = CairoOperator.COLOR_BURN; break; case "HARD_LIGHT": operator = CairoOperator.HARD_LIGHT; break; case "SOFT_LIGHT": operator = CairoOperator.SOFT_LIGHT; break; case "DIFFERENCE": operator = CairoOperator.DIFFERENCE; break; case "EXCLUSION": operator = CairoOperator.EXCLUSION; break; case "HSL_HUE": operator = CairoOperator.HSL_HUE; break; case "HSL_SATURATION": operator = CairoOperator.HSL_SATURATION; break; case "HSL_COLOR": operator = CairoOperator.HSL_COLOR; break; case "HSL_LUMINOSITY": operator = CairoOperator.HSL_LUMINOSITY; break; default: operator = CairoOperator.OVER; break; } } } } enum CallType { Idle, Timeout, } GtkD-3.7.5/demos/gtkD/TestWindow/TestImage.d000066400000000000000000000102431324604450400205170ustar00rootroot00000000000000/* * 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 */ module TestImage; //debug = trace private import gtk.VBox; private import gtk.Table; private import gtk.FileChooserDialog; private import gtk.Button; private import gtk.Widget; private import gtk.ScrolledWindow; private import gtk.ButtonBox; private import gtk.HButtonBox; private import gtk.Image; private import gtk.Window; private import std.stdio; private import glib.Str; /** * This tests the GtkD loading and display and image file */ class TestImage : VBox { Table table; FileChooserDialog fs; ScrolledWindow sw; Window window; this(Window window) { this.window = window; debug(1) { writeln("instantiating TestImage"); } super(false,8); sw = new ScrolledWindow(null,null); sw.addWithViewport(initTable()); ButtonBox hBox = HButtonBox.createActionBox(); Button loadDir = new Button("Load Files", &loadImages); hBox.packStart(loadDir,false,false,0); packStart(sw,true,true,0); packStart(hBox,false,false,0); } Table initTable() { string[] pngs; pngs ~= "images/gtkD_bevel.png"; pngs ~= "images/gtkDlogo_a.png"; pngs ~= "images/gtkD_logo_plain.png"; pngs ~= "images/gtkD_logo_small.png"; pngs ~= "images/gtkD_icon_1.png"; pngs ~= "images/gtkDlogo_a_small.png"; pngs ~= "images/gtkD_logo.png"; pngs ~= "images/gtkD_logo_too_small.png"; return loadTable(pngs); } private Table loadTable(string[] imageFiles) { //Table table = new Table(1,1,false); if ( table is null ) { table = new Table(1,1,false); } else { table.removeAll(); } int row = 0; int col = 0; Image image; // Window progressWindow = new Window();//WindowType.POPUP); // progressWindow.setBorderWidth(10); // ProgressBar progressBar = new ProgressBar(); // progressWindow.add(progressBar); // progressWindow.show(); for ( int i=0 ; i * test if this works:
* class A {}
* class B {
* class A{}
* method (){ new A;}
* }
*/ class TestTreeView : ScrolledWindow { Image image; //Pixbuf pixbuf; enum columns { //gtkDObject = GtkDType.PIXBUF, gtkDObject = GType.STRING, gtkObject = GType.STRING, desc = GType.STRING, percentDone = GType.STRING, author = GType.STRING } this() { super(null,null); TreeView treeView = setup(); addWithViewport(treeView); treeView.addOnRowActivated(&rowActivatedCallback); treeView.addOnMoveCursor(&moveCursorCallBack); } void rowActivatedCallback(TreePath path, TreeViewColumn column, TreeView treeView) { writeln("rowActivateCallback for %X",treeView); writeln("rowActivateCallback for path %s",path.toString()); } bool moveCursorCallBack(GtkMovementStep step, int direction, TreeView treeView) { writeln("moveCursorCallBack for %X",treeView); writeln("moveCursorCallBack row = %d",direction); return false; } TreeIter [12] h; int stack = 0; void push(TreeIter ti) { h[stack++]=ti; } TreeIter peek() { if ( stack == 0) { return null; } return h[stack-1]; } TreeIter pop() { if ( stack == 0) { return null; } return h[--stack]; } class HTreeNode : TreeNode { string gtkDL; string gtk; string desc; int percent; string author; //TestTreeView ttv; this(string gtkDL,string gtk,string desc,int percent)//, TestTreeView ttv) { this.gtkDL = gtkDL; this.gtk = gtk; this.desc = desc; this.percent = percent; this.author = "Ant"; //this.ttv = ttv; } //Pixbuf getNodePixbuf(int colum) //{ // return pixbuf; //} int columnCount() { return 5; } string getNodeValue(int column) { string value; switch (column) { //case 0: value = pixbuf; break; case 0: value = gtkDL; break; case 1: value = gtk; break; case 2: value = desc; break; case 3: switch(percent) { case -1: value = "uggly: won't get in"; break; case 0: value = "unknown"; break; case 1: value = "not yet";break; case 98: value = "Almost"; break; case 99: value = "AGAIG"; break; case 100: value = "Complete"; break; default:value = "%"; break; } break; case 4: value = author; break; default: value = "N/A"; break; } return value; } } TreeView setup() { class TTreeStore : TreeStore { this() { //this.nCols = nCols; static GType [5] columns = [ //GtkDType.PIXBUF, GType.STRING, GType.STRING, GType.STRING, GType.STRING, GType.STRING]; super(columns); } } TTreeStore testTreeStore = new TTreeStore(); TreeView treeView = new TreeView(testTreeStore); treeView.setRulesHint(true); TreeSelection ts = treeView.getSelection(); ts.setMode(SelectionMode.MULTIPLE); //TreeViewColumn column = new TreeViewColumn("GtkDObject",new CellRendererPixbuf(),"GdkPixbuf", 0); TreeViewColumn column = new TreeViewColumn("GtkDObject",new CellRendererText(),"text", 0); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(0); column.setSortIndicator(true); //pixbuf = new Pixbuf(book_closed_xpm); //image = new Image(pixbuf); //column.setWidget(image); column = new TreeViewColumn("GtkObject",new CellRendererText(),"text", 1); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(1); column.setSortIndicator(true); column = new TreeViewColumn("Desc",new CellRendererText(),"text", 2); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(2); column.setSortIndicator(true); column = new TreeViewColumn("Complete",new CellRendererText(),"text", 3); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(3); column.setSortIndicator(true); column = new TreeViewColumn("Author",new CellRendererText(),"text", 4); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(4); column.setSortIndicator(true); TreeIter iter; TreeIter iterTop = testTreeStore.createIter(null); TreeIter peekIter(bool pushIt) { TreeIter iter = testTreeStore.append(peek()); if ( pushIt ) { push(iter); } return iter; } TreeIter popIter(bool pushIt) { TreeIter iter = testTreeStore.append(pop()); if ( pushIt ) { push(iter); } return iter; } push(iterTop); testTreeStore.set(iterTop, new HTreeNode("ObjectG","GObject","Parent of the main GtkD objects",90)); testTreeStore.set(peekIter(true), new HTreeNode("ObjectGtk","GtkObject","The main gtk object",100)); testTreeStore.set(peekIter(true), new HTreeNode("Misc","GtkMisc","Comon for Most widgets",100)); testTreeStore.set(peekIter(true), new HTreeNode("Label","GtkLabel","Display only widget",100)); testTreeStore.set(popIter(false), new HTreeNode("AccelLabel","GtkAccelLabel","A label with a thing",1)); testTreeStore.set(peekIter(false), new HTreeNode("Arrow","GtkArrow","A standard arrow",100)); testTreeStore.set(popIter(false), new HTreeNode("Image","GtkImage","A image",100)); testTreeStore.set(peekIter(true), new HTreeNode("Container","GtkContainer","Comon for all widgets that can contain other widgets",90)); testTreeStore.set(peekIter(false), new HTreeNode("Bin","GtkBin","Comon for many widgets",90)); testTreeStore.set(peekIter(false), new HTreeNode("Alignment","GtkAlignment","Aligns a widget in a larger area",100)); testTreeStore.set(peekIter(true), new HTreeNode("Frame","GtkFrame","",100)); testTreeStore.set(popIter(false), new HTreeNode("AspectFrame","GtkAspectFrame","",100)); testTreeStore.set(peekIter(true), new HTreeNode("Button","GtkButton","",90)); testTreeStore.set(peekIter(true), new HTreeNode("ToggleButton","GtkToggleButton","",0)); testTreeStore.set(peekIter(false), new HTreeNode("CheckButton","GtkCheckButton","",0)); testTreeStore.set(popIter(false), new HTreeNode("RadioButton","GtkRadioButton","",0)); testTreeStore.set(popIter(false), new HTreeNode("OptionMenu","GtkOptionMenu","",0)); testTreeStore.set(peekIter(true), new HTreeNode("Item","GtkItem","",0)); testTreeStore.set(peekIter(true), new HTreeNode("MenuItem","GtkMenuItem","",0)); testTreeStore.set(peekIter(true), new HTreeNode("CheckMenuItem","GtkCheckMenuItem","",0)); testTreeStore.set(popIter(false), new HTreeNode("RadioMenuItem","GtkRadioMenuItem","",0)); testTreeStore.set(peekIter(false), new HTreeNode("ImageMenuItem","GtkImageMenuItem","",0)); testTreeStore.set(peekIter(false), new HTreeNode("SeparatorMenuItem","GtkSeparatorMenuItem","",0)); testTreeStore.set(popIter(false), new HTreeNode("TearoffMenuItem","GtkTearoffMenuItem","",0)); testTreeStore.set(peekIter(true), new HTreeNode("Window","GtkWindow","",0)); testTreeStore.set(peekIter(true), new HTreeNode("Dialog","GtkDialog","",0)); testTreeStore.set(peekIter(false), new HTreeNode("ColorSelectionDialog","GtkColorSelectionDialog","",0)); testTreeStore.set(peekIter(false), new HTreeNode("FileSelection","GtkFileSelection","",0)); testTreeStore.set(peekIter(false), new HTreeNode("FontSelectionDialog","GtkFontSelectionDialog","",0)); testTreeStore.set(peekIter(false), new HTreeNode("InputDialog","GtkInputDialog","",0)); testTreeStore.set(popIter(false), new HTreeNode("MessageDialog","GtkMessageDialog","",0)); testTreeStore.set(popIter(false), new HTreeNode("Plug","GtkPlug","",0)); testTreeStore.set(peekIter(false), new HTreeNode("EventBox","GtkEventBox","",0)); testTreeStore.set(peekIter(false), new HTreeNode("HandleBox","GtkHandleBox","",0)); testTreeStore.set(peekIter(false), new HTreeNode("ScrolledWindow","GtkScrolledWindow","",0)); testTreeStore.set(popIter(false), new HTreeNode("Viewport","GtkViewport","",0)); testTreeStore.set(peekIter(true), new HTreeNode("Box","GtkBox","",0)); testTreeStore.set(peekIter(true), new HTreeNode("ButtonBox","GtkButtonBox","",0)); testTreeStore.set(peekIter(false), new HTreeNode("HButtonBox","GtkHButtonBox","",0)); testTreeStore.set(popIter(false), new HTreeNode("VButtonBox","GtkVButtonBox","",0)); testTreeStore.set(peekIter(true), new HTreeNode("VBox","GtkVBox","",100)); testTreeStore.set(peekIter(false), new HTreeNode("ColorSelection","GtkColorSelection","",100)); testTreeStore.set(peekIter(false), new HTreeNode("FontSelection","GtkFontSelection","",100)); testTreeStore.set(popIter(false), new HTreeNode("GammaCurve","GtkGammaCurve","",0)); testTreeStore.set(popIter(true), new HTreeNode("HBox","GtkHBox","",100)); testTreeStore.set(peekIter(false), new HTreeNode("Combo","GtkCombo","",0)); testTreeStore.set(popIter(false), new HTreeNode("Statusbar","GtkStatusbar","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Fixed","GtkFixed","",0)); testTreeStore.set(peekIter(true), new HTreeNode("Paned","GtkPaned","",0)); testTreeStore.set(peekIter(false), new HTreeNode("HPaned","GtkHPaned","",0)); testTreeStore.set(popIter(false), new HTreeNode("VPaned","GtkVPaned","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Layout","GtkLayout","",0)); testTreeStore.set(peekIter(true), new HTreeNode("MenuShell","GtkMenuShell","",0)); testTreeStore.set(peekIter(false), new HTreeNode("MenuBar","GtkMenuBar","",0)); testTreeStore.set(popIter(false), new HTreeNode("Menu","GtkMenu","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Notebook","GtkNotebook","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Socket","GtkSocket","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Table","GtkTable","",0)); testTreeStore.set(peekIter(false), new HTreeNode("TextView","GtkTextView","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Toolbar","GtkToolbar","",0)); testTreeStore.set(popIter(false), new HTreeNode("TreeView","GtkTreeView","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Calendar","GtkCalendar","",0)); testTreeStore.set(peekIter(true), new HTreeNode("DrawingArea","GtkDrawingArea","",0)); testTreeStore.set(popIter(false), new HTreeNode("Curve","GtkCurve","",0)); testTreeStore.set(peekIter(true), new HTreeNode("Editable","GtkEditable","",0)); testTreeStore.set(peekIter(true), new HTreeNode("Entry","GtkEntry","",0)); testTreeStore.set(popIter(false), new HTreeNode("SpinButton","GtkSpinButton","",0)); pop(); testTreeStore.set(peekIter(true), new HTreeNode("Ruler","GtkRuler","",0)); testTreeStore.set(peekIter(false), new HTreeNode("HRuler","GtkHRuler","",0)); testTreeStore.set(popIter(false), new HTreeNode("VRuler","GtkVRuler","",0)); testTreeStore.set(peekIter(true), new HTreeNode("Range","GtkRange","",0)); testTreeStore.set(peekIter(true), new HTreeNode("Scale","GtkScale","",0)); testTreeStore.set(peekIter(true), new HTreeNode("HScale","GtkHScale","",0)); testTreeStore.set(popIter(false), new HTreeNode("VScale","GtkVScale","",0)); testTreeStore.set(popIter(true), new HTreeNode("Scrollbar","GtkScrollbar","",0)); testTreeStore.set(peekIter(false), new HTreeNode("HScrollbar","GtkHScrollbar","",0)); testTreeStore.set(popIter(false), new HTreeNode("VScrollbar","GtkVScrollbar","",0)); pop(); testTreeStore.set(peekIter(true), new HTreeNode("Separator","GtkSeparator","",0)); testTreeStore.set(peekIter(false), new HTreeNode("HSeparator","GtkHSeparator","",0)); testTreeStore.set(popIter(false), new HTreeNode("VSeparator","GtkVSeparator","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Invisible","GtkInvisible","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Preview","GtkPreview","",0)); testTreeStore.set(popIter(false), new HTreeNode("ProgressBar","GtkProgressBar","",0)); testTreeStore.set(peekIter(false), new HTreeNode("Adjustment","GtkAdjustment","Values for the range widget (scroolbars, spin buttons...)",0)); testTreeStore.set(peekIter(true), new HTreeNode("CellRenderer","GtkCellRenderer","",0)); testTreeStore.set(peekIter(false), new HTreeNode("CellRendererPixbuf","GtkCellRendererPixbuf","",0)); testTreeStore.set(peekIter(false), new HTreeNode("CellRendererText","GtkCellRendererText","",0)); testTreeStore.set(popIter(false), new HTreeNode("CellRendererToggle","GtkCellRendererToggle","",0)); testTreeStore.set(peekIter(false), new HTreeNode("ItemFactory","GtkItemFactory","",1)); testTreeStore.set(peekIter(false), new HTreeNode("Tooltips","GtkTooltips","",0)); testTreeStore.set(popIter(false), new HTreeNode("TreeViewColumn","GtkTreeViewColumn","",0)); push(iterTop); testTreeStore.set(peekIter(false), new HTreeNode("ListG","GList","a double linked list used to comboBox and stuf",0)); return treeView; } } GtkD-3.7.5/demos/gtkD/TestWindow/TestTreeView1.d000066400000000000000000000273371324604450400213240ustar00rootroot00000000000000/* * 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 */ module TestTreeView1; //debug = trace; private import gtk.VBox; private import gobject.Value; private import gtk.Image; private import gtk.TreeView; private import gtk.TreeStore; private import gtk.TreePath; private import gtk.TreeViewColumn; private import gtk.TreeIter; private import gtk.TreeSelection; private import gtk.CellRendererPixbuf; private import gtk.CellRendererText; private import gtk.ScrolledWindow; private import gdk.Pixbuf; private import glib.Str; private import std.stdio; /** * This tests the gtkD tree widget */ public class TestTreeView1 : VBox { // enum columns // { // gtkDObject = pixbufGetType(), // desc = gtkDType.STRING, // } Image image; Pixbuf pixbuf; Pixbuf pixbufTest; TreeStore testTreeStore1; TreeStore testTreeStore2; this() { debug(trace) writefln("TestTreeView1.this 1"); super(false, 0); debug(trace) writefln("TestTreeView1.this 2"); pixbuf = new Pixbuf(greenClass_xpm); debug(trace) writefln("TestTreeView1.this 2.1"); pixbufTest = new Pixbuf(book_closed_xpm); debug(trace) writefln("TestTreeView1.this 2.2"); image = new Image(pixbufTest); debug(trace) writefln("TestTreeView1.this 3"); TreeView treeView1 = setup1(); populate(testTreeStore1); debug(trace) writefln("TestTreeView1.this 4"); TreeView treeView2 = setup2(); populate(testTreeStore2); debug(trace) writefln("TestTreeView1.this 5"); treeView2.addOnMoveCursor(&moveCursorCallback); packStart(image, false, false, 1); ScrolledWindow sw = new ScrolledWindow(null, null); sw.add(treeView1); packStart(sw, true, true, 1); sw = new ScrolledWindow(null, null); sw.add(treeView2); packStart(sw, true, true, 1); debug(trace) writefln("TestTreeView1.this 6"); //addWithViewport(treeView); } bool moveCursorCallback(GtkMovementStep step, int i, TreeView tree) { TreeIter iter = tree.getSelectedIter(); iter.setModel(tree.getModel()); Value v = new Value(); iter.getValue(1, v); debug(trace) writefln("cursor on %s", v); return false; } void populate(TreeStore treeStore) { TreeIter iterChild; TreeIter iterTop = treeStore.createIter(); treeStore.setValue(iterTop, 0, new Pixbuf(package_xpm) ); treeStore.setValue(iterTop, 1, "Icon for packages" ); iterChild = treeStore.append(iterTop); treeStore.setValue(iterChild, 0,new Pixbuf(greenTemplate_xpm) ); treeStore.setValue(iterChild, 1, "Icon for templates" ); iterChild = treeStore.append(iterTop); treeStore.setValue(iterChild, 0, new Pixbuf(greenInterface_xpm) ); treeStore.setValue(iterChild, 1, "Icon for interfaces" ); iterChild = treeStore.append(iterTop); treeStore.setValue(iterChild, 0, new Pixbuf(greenClass_xpm) ); treeStore.setValue(iterChild, 1, "Icon for classes" ); } /** * Creates the treeView and treeStore * @return */ TreeView setup1() { class TTreeStore : TreeStore { this() { //int* i = cast(int*)pixbufGetType(); GType[] columns; columns ~= Pixbuf.getType(); columns ~= GType.STRING; super(columns); } } testTreeStore1 = new TTreeStore(); TreeView treeView = new TreeView(testTreeStore1); treeView.setRulesHint(true); TreeSelection ts = treeView.getSelection(); ts.setMode(SelectionMode.MULTIPLE); TreeViewColumn column; int col = 0; column = new TreeViewColumn("Icon",new CellRendererPixbuf(),"pixbuf", col); treeView.appendColumn(column); ++col; column = new TreeViewColumn("Description",new CellRendererText(),"text", col); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(col); column.setSortIndicator(true); ++col; return treeView; } /** * Creates the treeView and treeStore * @return */ TreeView setup2() { class TTreeStore : TreeStore { this() { //int* i = cast(int*)pixbufGetType(); GType[] columns; columns ~= Pixbuf.getType(); columns ~= GType.STRING; super(columns); } } testTreeStore2 = new TTreeStore(); TreeView treeView = new TreeView(testTreeStore2); treeView.setRulesHint(true); TreeSelection ts = treeView.getSelection(); ts.setMode(SelectionMode.MULTIPLE); TreeViewColumn column; int col = 0; column = new TreeViewColumn(); CellRendererPixbuf cellPixbuf = new CellRendererPixbuf(); CellRendererText cellText = new CellRendererText(); column.packStart(cellPixbuf, false); column.addAttribute(cellPixbuf, "pixbuf", col); ++col; column.packEnd(cellText, true); column.addAttribute(cellText, "text", col); column.setTitle("Types"); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(col); column.setSortIndicator(true); ++col; return treeView; } void rowActivatedCallback(TreeView treeView, TreePath path, TreeViewColumn column) { writeln("rowActivateCallback for %X",treeView); writeln("rowActivateCallback for path %s",path.toString()); } /* XPM */ static string[] greenClass_xpm = [ "16 16 67 1", " c None", ". c #00CF2E", "+ c #005D14", "@ c #005A16", "# c #005217", "$ c #004B15", "% c #004413", "& c #00BC23", "* c #00BB23", "= c #006A14", "- c #000000", "; c #00B721", "> c #00BF25", ", c #006F17", "' c #00821C", ") c #00801A", "! c #007B17", "~ c #00C126", "{ c #FFFFFF", "] c #00761A", "^ c #008B21", "/ c #00821B", "( c #007316", "_ c #00BA22", ": c #A9EBB6", "< c #007B1D", "[ c #009426", "} c #A9F5BC", "| c #A9F2BA", "1 c #00BA23", "2 c #00D935", "3 c #00BE25", "4 c #A9EDB7", "5 c #007F1F", "6 c #009C2A", "7 c #00ED3E", "8 c #00E339", "9 c #A9F1B9", "0 c #00CB2C", "a c #00BE24", "b c #00C729", "c c #00BF26", "d c #008120", "e c #00A52E", "f c #00F241", "g c #00E53A", "h c #00D933", "i c #00841D", "j c #007B18", "k c #007F20", "l c #009928", "m c #009224", "n c #008B20", "o c #A9EFB8", "p c #00801F", "q c #00BC24", "r c #00C82A", "s c #007A1C", "t c #00791C", "u c #007117", "v c #006B14", "w c #00B822", "x c #00C629", "y c #A9E9B5", "z c #A9E7B4", "A c #00C127", "B c #00CF2C", " ", " .+@#$% ", " &*=----- ", " ;>,--')!-- ", " ~>{]-^{{/!( ", " _:{<-[}|{{1 ", " 234{5-67890a2 ", " bc4{d-efghij. ", " 234{k--lmn--2 ", " 1:o{p-----_ ", " q>ro{st]uv& ", " w>x4{{{{; ", " ~13yyzA ", " Bbh ", " ", " "]; /* XPM */ static string[] greenInterface_xpm = [ "16 16 62 1", " c None", ". c #00CF2E", "+ c #008A1E", "@ c #009023", "# c #00BC23", "$ c #00BB23", "% c #FFFFFF", "& c #007F18", "* c #000000", "= c #00B721", "- c #00BF25", "; c #AAECB7", "> c #00881D", ", c #00861D", "' c #007A16", ") c #00C126", "! c #00C82A", "~ c #AAEFB9", "{ c #008F21", "] c #00861C", "^ c #00BA22", "/ c #00C629", "( c #00D12F", "_ c #AAF3BB", ": c #AAF5BC", "< c #009726", "[ c #008B1F", "} c #00C529", "| c #00BA23", "1 c #00D935", "2 c #00BE25", "3 c #00CA2C", "4 c #00D732", "5 c #00E238", "6 c #AAF8BF", "7 c #009E29", "8 c #00CB2C", "9 c #00BE24", "0 c #00C729", "a c #00BF26", "b c #00CC2C", "c c #00D933", "d c #00E53A", "e c #AAFABF", "f c #00A12B", "g c #009022", "h c #00CC2D", "i c #00CA2B", "j c #00D632", "k c #00E239", "l c #AAF9BE", "m c #009E2A", "n c #00BD25", "o c #009927", "p c #009626", "q c #008A1F", "r c #00841A", "s c #00BC24", "t c #00B822", "u c #00841B", "v c #AAE8B5", "w c #00CF2C", " ", " .+@ ", " #$%&*** ", " =-;%>,*&' ", " )-!~%%{*]-) ", " ^/(_:%<*[}| ", " 123456%7*{891 ", " 0abcde%f*gha. ", " 12ijkl%m*{in1 ", " |/(_%op*qr^ ", " s-!~%g***&# ", " t-;%>,u&' ", " )v%%%%% ", " w0c ", " ", " "]; /* XPM */ static string[] greenTemplate_xpm = [ "16 16 63 1", " c None", ". c #008A1E", "+ c #009023", "@ c #007D17", "# c #000000", "$ c #FFFFFF", "% c #007F18", "& c #003B0C", "* c #003C0C", "= c #00380A", "- c #003609", "; c #A9EAB5", "> c #00851C", ", c #008F21", "' c #00861C", ") c #A9E7B4", "! c #A9F5BB", "~ c #009726", "{ c #008B1F", "] c #A9EBB6", "^ c #00D935", "/ c #A9E9B5", "( c #A9EDB7", "_ c #A9F1B9", ": c #00EC3F", "< c #009E29", "[ c #00CB2C", "} c #00BE24", "| c #00C729", "1 c #00BF26", "2 c #00CC2C", "3 c #00D933", "4 c #00E53A", "5 c #A9FABE", "6 c #00A12B", "7 c #009022", "8 c #00CC2D", "9 c #00CF2E", "0 c #00BE25", "a c #00CA2B", "b c #00D632", "c c #00E239", "d c #A9F8BD", "e c #009E2A", "f c #00BD25", "g c #00BA23", "h c #00C629", "i c #00D12F", "j c #00DB34", "k c #009626", "l c #008A1F", "m c #00C628", "n c #00BA22", "o c #00BC24", "p c #00BF25", "q c #00C82A", "r c #00BC23", "s c #00B822", "t c #00841B", "u c #00B721", "v c #00C126", "w c #00C127", "x c #00CF2C", " ", " ..+ ", " @######### ", " $%#&*&#=-## ", " ;$>#$$,#'$$# ", " )$$$!$~#{]) ", " ^/(_!:$<#,[}^ ", " |12345$6#7819 ", " ^0abcd$e#,af^ ", " ghij!$k#lmn ", " opqi_$,#'pr ", " sph(($tpu ", " vg0//gw ", " x|3 ", " ", " "]; /* XPM */ static string[] package_xpm = [ "16 16 25 1", " c None", ". c #713C17", "+ c #BF8231", "@ c #C17A2D", "# c #93551F", "$ c #C1772B", "% c #DBBF9E", "& c #E5C9A1", "* c #CEAB8B", "= c #9E7058", "- c #BF752A", "; c #F9F1BB", "> c #EDD1A6", ", c #D7B897", "' c #BB712A", ") c #D7B998", "! c #B76D28", "~ c #C7A082", "{ c #794F40", "] c #AE6325", "^ c #A96023", "/ c #A55C22", "( c #A25922", "_ c #C58332", ": c #A05921", " ", " . ", " +@@@@#@@@@+ ", " $%&&*=%&&*$ ", " -&;>,=&;>,- ", " '&>>)=&>>)' ", " !*,)~{*,)~! ", " .#==={{{===#. ", " ]%&&*{%&&*] ", " ^&;>,=&;>,^ ", " /&>>)=&>>)/ ", " (*,)~=*,)~( ", " _::::#::::_ ", " . ", " ", " "]; /* Don't copy this bad example; inline RGB data is always a better * idea than inline XPMs. */ static string[] book_closed_xpm = [ "16 16 7 1", " c None s None", ". c black", "X c red", "B c blue", "o c yellow", "O c #808080", "# c white", " ", " .. ", " ..XB. ", " ..XXXXB. ", " ..XXXXXXXB. ", ".ooXXBBBBBXB. ", "..ooXBBBBBBXB. ", ".X.ooXBBBBBBXB. ", ".XX.ooXBBBXX.. ", " .XX.ooXBX..#O ", " .XX.oo..##OO. ", " .XX..##OO.. ", " .X.#OO.. ", " ..O.. ", " .. ", " " ]; } GtkD-3.7.5/demos/gtkD/TestWindow/TestWindow.d000066400000000000000000000635731324604450400207620ustar00rootroot00000000000000/* * 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 */ module TestWindow; //debug = 1; //version=cairo; version(cairo)import cairo.clock; import gtk.Version; import gtk.Table; import stdlib = core.stdc.stdlib : exit; import core.thread; import std.random; import std.string; import gdk.Threads; import gio.Application : GioApplication = Application; import gtk.Application; import gtk.ApplicationWindow; import gtk.Adjustment; import gtk.AccelGroup; import TestEntries; import TestStock; import TestDrawingArea; import TestScales; import TestText; import TestTreeView; import TestImage; import TestThemes; import TestAspectFrame; import TestIdle; import TTextView; import gtk.MenuItem; import gtk.Widget; import gtk.MenuBar; import gtk.Notebook; import gtk.ComboBoxText; import gtk.FileChooserDialog; import gtk.FontSelectionDialog; import gtk.ColorSelectionDialog; import gtk.Button; import gtk.VBox; import gtk.MessageDialog; import gtk.Frame; import gtk.HButtonBox; import gtk.Statusbar; import gtk.Menu; import gtk.HandleBox; import gtk.Toolbar; import gtk.SeparatorToolItem; import gtk.ToolButton; import gtk.RadioButton; import gtk.CheckButton; import gtk.ToggleButton; import gtk.HBox; import gtk.Arrow; import gtk.ButtonBox; import gtk.Calendar; import gtk.VButtonBox; import gtk.SpinButton; import gtk.ListStore; import gtk.TreeIter; import gtk.TreeView; import gtk.TreeViewColumn; import gtk.CellRendererText; import gtk.Window; import gtk.ScrolledWindow; import gtk.MessageDialog; import core.memory; import glib.ListSG; import glib.Str; import gtk.Label; import glib.ListG; import gtk.Paned; import gtk.HPaned; import gtk.VPaned; import gtk.Calendar; import std.stdio; import gtk.VButtonBox; import gtk.FileChooserButton; import gtk.AboutDialog; import gtk.Dialog; import gtk.TreeStore; import gdk.Pixbuf; import gtk.ComboBox; import gtk.TreePath; import gtk.CellRenderer; import gtk.CellRendererPixbuf; /** * This tests the GtkD widgets */ class TestWindow : ApplicationWindow { /** * Executed when the user tries to close the window * @return true to refuse to close the window */ int windowDelete(GdkEvent* event, Widget widget) { debug(events) writeln("TestWindow.widgetDelete : this and widget to delete %X %X",this,window); MessageDialog d = new MessageDialog( this, GtkDialogFlags.MODAL, MessageType.QUESTION, ButtonsType.YES_NO, "Are you sure you want' to exit these GtkDTests?"); int responce = d.run(); if ( responce == ResponseType.YES ) { stdlib.exit(0); } d.destroy(); return true; } void anyButtonExits(Button button) { stdlib.exit(0); } this(Application application) { super(application); setTitle("GtkD tests"); setup(); showAll(); string versionCompare = Version.checkVersion(3,0,0); if ( versionCompare.length > 0 ) { MessageDialog d = new MessageDialog(this, GtkDialogFlags.MODAL, MessageType.WARNING, ButtonsType.OK, "GtkD : Gtk+ version missmatch\n" ~ versionCompare ~ "\nYou might run into problems!"~ "\n\nPress OK to continue"); d.run(); d.destroy(); } } void setup() { //Frame.defaultBorder = 7; VBox mainBox = new VBox(false,0); mainBox.packStart(getMenuBar(),false,false,0); mainBox.packStart(getToolbar(),false,false,0); Notebook notebook = setNotebook(); notebook.setBorderWidth(10); mainBox.packStart(notebook,true,true,0); Button cancelButton = new Button(StockID.CANCEL, &anyButtonExits); Button exitButton = new Button(StockID.QUIT, &anyButtonExits); Button quitButton = new Button(StockID.OK, &anyButtonExits); ButtonBox bBox = HButtonBox.createActionBox(); bBox.packEnd(exitButton,0,0,10); bBox.packEnd(cancelButton,0,0,10); bBox.packEnd(quitButton,0,0,10); mainBox.packStart(bBox,false,false,0); Statusbar statusbar = new Statusbar(); mainBox.packStart(statusbar,false,true,0); add(mainBox); notebook.appendPage(new TestEntries,"Entry"); testEventBox(notebook); testButtons(notebook); notebook.appendPage(new TestStock,"Stock"); testLists(notebook); testNotebook(notebook); testPaned(notebook); testDialogs(notebook); testViewport(notebook); notebook.appendPage(new TestScales,"Scales"); testSpinButton(notebook); notebook.appendPage(new TestTreeView,"TreeView"); // notebook.appendPage(new TestTreeView1,"TreeView 1"); // testList(notebook); version(linux) { // this block crashes gtk+ on win32 for some reason notebook.appendPage(new Frame(new TestDrawingArea,"Drawing Area"),"Drawing"); notebook.appendPage(new TestText,"Text"); notebook.appendPage(new TestImage(this),"Image"); //TestThemes seems to be unfinished. //notebook.appendPage(new TestThemes(this),"Themes"); notebook.appendPage(new TestAspectFrame(),"Aspect Frame"); notebook.appendPage(new TestIdle(),"Idle"); version(cairo)notebook.appendPage(new Clock(), "Cairo"); gtkDemo(notebook); } } MenuBar getMenuBar() { AccelGroup accelGroup = new AccelGroup(); addAccelGroup(accelGroup); MenuBar menuBar = new MenuBar(); Menu menu = menuBar.append("_File"); MenuItem item = new MenuItem(&onMenuActivate, "_New","file.new", true, accelGroup, 'n'); //item.addAccelerator("activate",accelGroup,'n',GdkModifierType.CONTROL_MASK,GtkAccelFlags.VISIBLE); menu.append(item); menu.append(new MenuItem(&onMenuActivate, "_Open","file.open", true, accelGroup, 'o')); menu.append(new MenuItem(&onMenuActivate, "_Close","file.close", true, accelGroup, 'c')); menu.append(new MenuItem(&onMenuActivate, "E_xit","file.exit", true, accelGroup, 'x')); menu = menuBar.append("_Edit"); menu.append(new MenuItem(&onMenuActivate,"_Find","edit.find", true, accelGroup, 'f')); menu.append(new MenuItem(&onMenuActivate,"_Search","edit.search", true, accelGroup, 's')); menu = menuBar.append("_Help"); menu.append(new MenuItem(&onMenuActivate,"_About","help.about", true, accelGroup, 'a',GdkModifierType.CONTROL_MASK|GdkModifierType.SHIFT_MASK)); return menuBar; } class GtkDAbout : AboutDialog { this() { string[] names; names ~= "Antonio Monteiro (binding/wrapping/proxying/decorating for D)"; names ~= "www.gtk.org (base C library)"; setAuthors( names ); setDocumenters( names ); setArtists( names ); setLicense("License is LGPL"); setWebsite("http://lisdev.com"); } } void onMenuActivate(MenuItem menuItem) { string action = menuItem.getActionName(); switch( action ) { case "help.about": GtkDAbout dlg = new GtkDAbout(); dlg.addOnResponse(&onDialogResponse); dlg.showAll(); break; default: MessageDialog d = new MessageDialog( this, GtkDialogFlags.MODAL, MessageType.INFO, ButtonsType.OK, "You pressed menu item "~action); d.run(); d.destroy(); break; } } void onDialogResponse(int response, Dialog dlg) { if(response == GtkResponseType.CANCEL) dlg.destroy(); } Widget getToolbar() { HandleBox handleBox = new HandleBox(); Toolbar toolbar = new Toolbar(); toolbar.insert(new ToolButton(StockID.OPEN)); toolbar.insert(new ToolButton(StockID.CLOSE)); toolbar.insert(new SeparatorToolItem()); toolbar.insert(new ToolButton(StockID.SAVE)); toolbar.insert(new ToolButton(StockID.SAVE_AS)); handleBox.add(toolbar); return handleBox; } Notebook setNotebook() { Notebook notebook = new Notebook(); notebook.addOnSwitchPage(&onNotebookSwitchPage); notebook.setTabPos(PositionType.LEFT); return notebook; } void onNotebookSwitchPage(Widget notePage, uint pageNumber, Notebook notebook) { //writefln("Notebook switch to page %s", pageNumber); // fullCollect helps finding objects that shouldn't have been collected GC.collect(); //writefln("exiting Notebook switch to page %s", pageNumber); } //import EventBox; void testEventBox(Notebook notebook) { // EventBox eventBox = new EventBox(); // eventBox.add(new Label("label on event box")); // notebook.appendPage(eventBox,"Buttons"); //EventBox eventBox = new EventBox(); //eventBox.add(new Label("label on event box")); notebook.appendPage(new Label("just a simple label"),new Label("label")); } void testButtons(Notebook notebook) { Table table = new Table(2,12,0); //ListSG listSG = new ListSG(); RadioButton radio1Button = new RadioButton(cast(ListSG)null,"Option 1"); RadioButton radio2Button = new RadioButton(radio1Button,"Option 2"); RadioButton radio3Button = new RadioButton(radio2Button,"Option 3"); RadioButton radio4Button = new RadioButton(radio3Button,"Option 4"); RadioButton radio5Button = new RadioButton(radio4Button,"Option 5"); RadioButton radio6Button = new RadioButton(radio5Button,"Option 6"); RadioButton radio7Button = new RadioButton(radio6Button,"Option 7"); RadioButton radio8Button = new RadioButton(radio7Button,"Option 8"); RadioButton radio9Button = new RadioButton(radio8Button,"Option 9"); table.attach(radio1Button,0,1,0,1,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(radio2Button,0,1,1,2,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(radio3Button,0,1,2,3,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(radio4Button,0,1,3,4,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(radio5Button,0,1,4,5,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(radio6Button,0,1,5,6,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(radio7Button,0,1,6,7,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(radio8Button,0,1,7,8,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(radio9Button,0,1,8,9,AttachOptions.FILL,AttachOptions.FILL,4,4); CheckButton editableButton = new CheckButton("editable"); CheckButton visibleButton = new CheckButton("visible"); table.attach(editableButton,0,1,9,10,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(visibleButton,0,1,10,11,AttachOptions.FILL,AttachOptions.FILL,4,4); ToggleButton toggleButton = new ToggleButton("Toggle this"); table.attach(toggleButton,0,1,11,12,AttachOptions.FILL,AttachOptions.FILL,4,4); Button button = new Button("test events"); table.attach(button,0,1,12,13,AttachOptions.FILL,AttachOptions.FILL,4,4); void bActivate(Button button) { writeln("button Activate"); } void bClicked(Button button) { writeln("button Clicked"); } void bEnter(Button button) { writeln("button Enter"); } void bLeave(Button button) { writeln("button Leave"); } void bPressed(Button button) { writeln("button Pressed"); } void bReleased(Button button) { writeln("button Released"); } button.addOnActivate(&bActivate); button.addOnClicked(&bClicked); button.addOnEnter(&bEnter); button.addOnLeave(&bLeave); button.addOnPressed(&bPressed); button.addOnReleased(&bReleased); // for ( ShadowType shadow = 0; shadow<=ShadowType.max ; shadow ++) // { // for ( DirectionType direction = 0 ; direction<=DirectionType.max ; direction++) // { // table.attach(new Arrow(direction,shadow),direction+1,direction+2,shadow,shadow+1,AttachOptions.FILL,AttachOptions.FILL,4,4); // table.attach(new Arrow(direction,shadow),direction+1,direction+2,shadow,shadow+1,AttachOptions.FILL,AttachOptions.FILL,4,4); // table.attach(new Arrow(direction,shadow),direction+1,direction+2,shadow,shadow+1,AttachOptions.FILL,AttachOptions.FILL,4,4); // table.attach(new Arrow(direction,shadow),direction+1,direction+2,shadow,shadow+1,AttachOptions.FILL,AttachOptions.FILL,4,4); // } // } notebook.appendPage(new Frame(table,"Buttons"),"Buttons"); } class ComboStore : TreeStore { this() { //int* i = cast(int*)pixbufGetType(); GType[] columns; columns ~= GType.STRING; columns ~= GType.STRING; super(columns); } } void testLists(Notebook notebook) { VBox mainBox = new VBox(false,3); // comboBoxTextEntry from a list of strings mainBox.packStart(new Label("String combo"),false,true,0); static string[] cbList = ["item 1","item 2","item 3","item 4","item 5","item 6","item 7","item 8","item 9"]; comboText = new ComboBoxText(); string entry3 = "Combo box text entry 3"; comboText.appendText("Combo box text entry 1"); comboText.appendText("Combo box text entry 2"); comboText.appendText(entry3); comboText.appendText("Combo box text entry 4"); comboText.appendText("Combo box text entry 5"); comboText.setActive(2); ButtonBox actionBox1 = HButtonBox.createActionBox(); actionBox1.packStart(comboText,false,false,0); Button showCombo1 = new Button("ShowCombo", &showTextCombo); actionBox1.packStart(showCombo1,false,false,0); mainBox.packStart(new Frame(actionBox1, "Text entry ComboBox"),false,false,0); // TODO combo with widgets // new ComboBox + TreeModel ComboStore comboStore = new ComboStore(); TreeIter iterFirst; // to set the first active iter TreeIter iterChild; TreeIter iterTop = comboStore.append(null); comboStore.setValue(iterTop, 0, "Paganini" ); iterFirst = comboStore.append(iterTop); comboStore.setValue(iterFirst, 0, "Nicolo" ); iterTop = comboStore.append(null); comboStore.setValue(iterTop, 0, "List" ); iterChild = comboStore.append(iterTop); comboStore.setValue(iterChild, 0, "Franz" ); iterTop = comboStore.append(null); comboStore.setValue(iterTop, 0, "Beethoven" ); iterChild = comboStore.append(iterTop); comboStore.setValue(iterChild, 0, "Ludwic" ); iterChild = comboStore.append(iterTop); comboStore.setValue(iterChild, 0, "Maria" ); iterChild = comboStore.append(iterTop); comboStore.setValue(iterChild, 0, "Van" ); iterTop = comboStore.append(null); comboStore.setValue(iterTop, 0, "Bach" ); iterChild = comboStore.append(iterTop); comboStore.setValue(iterChild, 0, "Johann" ); iterChild = comboStore.append(iterTop); comboStore.setValue(iterChild, 0, "Sebastian" ); ComboBox treeCombo = new ComboBox(comboStore); treeCombo.setWrapWidth(1); treeCombo.setProperty("entry-text-column", 0); // TODO something is wrong gettign the ier from the path //TreePath path = new TreePath("0,0"); //comboStore.getIter(iterChild, path); //treeCombo.setActiveIter(iterChild); // use a previously set iter treeCombo.setActiveIter(iterFirst); mainBox.packStart(new Frame(treeCombo,"Tree Combo box"),false,true,0); simpleCombo = new ComboBoxText(); simpleCombo.appendText("Top"); simpleCombo.appendText("Bottom"); simpleCombo.appendText("Left"); simpleCombo.appendText("Right"); simpleCombo.setActive(0); // actions ButtonBox actionBox = HButtonBox.createActionBox(); actionBox.packStart(simpleCombo,false,false,0); Button showCombo = new Button("ShowCombo", &showSimpleCombo); actionBox.packStart(showCombo,false,false,0); mainBox.packStart(new Frame(actionBox, "Simple text list"),false,false,0); notebook.appendPage(new Frame(mainBox,"Lists"),"Lists"); } ComboBoxText simpleCombo; ComboBoxText comboText; void showTextCombo(Button button) { writeln("Combo selected text = %s",comboText.getActiveText()); } void showSimpleCombo(Button button) { writeln("Combo selected text = %s",simpleCombo.getActiveText()); } class NB : Notebook { void itemActivated(MenuItem menu_item) { writeln("NB.activateCallback"); } void buttonClicked(Button button) { setCurrentPage(2); } void switchPage(Notebook notebook, /*NotebookPage page,*/ uint pageNumber) { writeln("new page = %d",pageNumber); } } NB nb; void posLeft(Button button) { nb.setTabPos(PositionType.LEFT); } void posRight(Button button) { nb.setTabPos(PositionType.RIGHT); } void posTop(Button button) { nb.setTabPos(PositionType.TOP); } void posBottom(Button button) { nb.setTabPos(PositionType.BOTTOM); } /** * tests notebook * @param nodebook */ void testNotebook(Notebook notebook) { nb = new NB(); nb.setTabPos(PositionType.min); nb.popupEnable(); nb.setShowBorder(false); nb.setBorderWidth(0); class PageMove { Notebook notebook; PositionType toPos; this(Notebook notebook,PositionType toPos) { this.notebook = notebook; this.toPos = toPos; } void buttonClickedCallback() { notebook.setTabPos(toPos); } } PageMove toLeft = new PageMove(nb,PositionType.LEFT); PageMove toRight = new PageMove(nb,PositionType.RIGHT); PageMove toTop = new PageMove(nb,PositionType.TOP); PageMove toBottom = new PageMove(nb,PositionType.BOTTOM); notebook.appendPage(nb,new Label("Notebook")); for( char i = '1' ; i<'5' ; i++ ) { Table table = new Table(2,2,true); Button left = new Button("Left "~ i); left.addOnClicked(&posLeft); Button right = new Button("Right "~ i); right.addOnClicked(&posRight); Button top = new Button("top "~ i); top.addOnClicked(&posTop); Button bottom = new Button("bottom "~ i); bottom.addOnClicked(&posBottom); table.attach(top,0,1,0,1,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); table.attach(right,1,2,0,1,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); table.attach(left,0,1,1,2,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); table.attach(bottom,1,2,1,2,AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); if ( i == 3 ) { // MenuItem menuItem = new MenuItem("menu page 3",&nb.itemActivated); // // Menu menu = new Menu(); // menu.append(new MenuItem("page 3.1",&nb.itemActivated)); // menu.append(new MenuItem("page 3.2",&nb.itemActivated)); // menu.append(new MenuItem("page 3.3",&nb.itemActivated)); // menu.append(new MenuItem("page 3.4",&nb.itemActivated)); // // menuItem.setSubmenu(menu); HBox box = new HBox(false,0); box.setBorderWidth(0); Button button = new Button("Page " ~ i ~ "\0"); button.addOnClicked(&nb.buttonClicked); button.setBorderWidth(0); button.setRelief(ReliefStyle.NONE); CheckButton checkButton = new CheckButton(); checkButton.setBorderWidth(0); box.packStart(checkButton,false,false,0); box.packStart(button,false,false,0); //nb.appendPageMenu(table,box,menuItem); //nb.appendPage(table,box); } else { nb.appendPage(table,new Label("Page " ~ i ~ "\0")); } } //nb.addOnSwitchPage(&nb.switchPage); } void testPaned(Notebook notebook) { Paned mainPaned = new VPaned(); Paned p0 = mainPaned; Button p1; Paned p2; bool h = true; for ( char c='1' ; c<='5' ; c++ ) { p1 = new Button("Pane "~c); if ( h ) p2 = new HPaned(); else p2 = new VPaned(); p0.add1(p1); p0.add2(p2); p0 = p2; h = !h; } notebook.appendPage(mainPaned,new Label("Paned")); } FileChooserDialog fcd; FontSelectionDialog f; ColorSelectionDialog d; void showFileChooser(Button button) { string[] a; ResponseType[] r; a ~= "Lets go!"; a ~= "Please don't"; r ~= ResponseType.OK; r ~= ResponseType.CANCEL; if ( fcd is null ) { fcd = new FileChooserDialog("File Chooser", this, FileChooserAction.OPEN, a, r); } fcd.setSelectMultiple(true); fcd.run(); // writefln("file selected = %s",fcd.getFileName()); // // foreach ( int i, string selection ; fs.getSelections()) // { // writeln("File(s) selected [%d] %s",i,selection); // } fcd.hide(); } void showColor(Button button) { if ( d is null ) { d = new ColorSelectionDialog("Select the color"); } d.run(); d.hide(); } void showCalendar(Button button) { Window calWin = new Window("Calendar"); Calendar calendar = new Calendar(); //calendar.setTitle("No Title"); calWin.add(calendar); calWin.showAll(); } void showFont(Button button) { if ( f is null ) { f = new FontSelectionDialog("Select the font"); } f.run(); string fontName = f.getFontName(); f.hide(); } Button fontButton; void testDialogs(Notebook notebook) { ButtonBox bBox = VButtonBox.createActionBox(); if ( fcd is null ) { fcd = new FileChooserDialog("File Chooser", this, FileChooserAction.OPEN); } Button fileChooser = new Button("File Chooser", &showFileChooser); FileChooserButton fcb = new FileChooserButton(fcd); Button color = new Button("Color Dialog", &showColor); Button calendar = new Button("Calendar Dialog", &showCalendar); fontButton = new Button("Font Dialog", &showFont); //fontButton.modifyFont("[Newspaper][16]"); bBox.packStart(fileChooser,0,0,10); bBox.packStart(fcb,0,0,10); bBox.packStart(color,0,0,10); bBox.packStart(calendar,0,0,10); bBox.packStart(fontButton,0,0,10); notebook.appendPage(new Frame(bBox,"Dialogs"),new Label("Dialogs")); } void testViewport(Notebook notebook) { Table grid = new Table(21,21,0); for ( int i = 0 ; i<21 ; i++) { for ( int j = 0 ; j<21; j++) { if ( (i == j) || (i+j==20) || (i==10) || (j==10)) { grid.attach( new Button("Button"), i,i+1, j,j+1, AttachOptions.SHRINK,AttachOptions.SHRINK,4,4); } } } ScrolledWindow sw = new ScrolledWindow(null,null); sw.addWithViewport(grid); notebook.appendPage(sw,new Label("Viewport")); } void testSpinButton(Notebook notebook) { Table table = new Table(2,1,false); SpinButton spin = new SpinButton(new Adjustment(1.0, 0.0, 100.0, 1.0, 10.0, 0),1,0); table.attach(new Label("Spin this:"),0,1,0,1,AttachOptions.FILL,AttachOptions.FILL,4,4); table.attach(spin,1,2,0,1,AttachOptions.FILL,AttachOptions.FILL,4,4); notebook.appendPage(table,"Spin Buttons"); } void testList(Notebook notebook) { class TestListStore : ListStore { this() { static GType [3] columns = [ GType.STRING, GType.STRING, GType.STRING ]; super(columns); } } TestListStore testListStore = new TestListStore(); TreeIter iterTop = testListStore.createIter(); static int [3] cols = [0,1,2]; string[] vals; vals ~= "Antonio"; vals ~= "Canada"; vals ~= "Ontario"; testListStore.set(iterTop,cols,vals); testListStore.append(iterTop); string[] vals1; vals1 ~= "John Reimer"; vals1 ~= "Canada"; vals1 ~= "BC"; testListStore.set(iterTop,cols,vals1); testListStore.append(iterTop); string[] vals2; vals2 ~= "Friend of GtkD 2"; vals2 ~= "Poland"; vals2 ~= "Torun"; testListStore.set(iterTop,cols,vals2); testListStore.append(iterTop); string[] vals3; vals3 ~= "Friend of GtkD 3"; vals3 ~= "Norway"; vals3 ~= "Norway"; testListStore.set(iterTop,cols,vals3); TreeView treeView = new TreeView(testListStore); treeView.setHeadersClickable(true); treeView.setRulesHint(true); //CellRendererText cellText = new CellRendererText(); TreeViewColumn column = new TreeViewColumn("Author",new CellRendererText(),"text", 0); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(0); column.setSortIndicator(true); column = new TreeViewColumn("Country",new CellRendererText(),"text", 1); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(1); column.setSortIndicator(true); column = new TreeViewColumn("Province",new CellRendererText(),"text", 2); treeView.appendColumn(column); column.setResizable(true); column.setReorderable(true); column.setSortColumnId(2); column.setSortIndicator(true); //notebook.appendPage(treeView,"ListView"); ScrolledWindow sw = new ScrolledWindow(null,null); sw.addWithViewport(treeView); notebook.appendPage(sw,"ListView"); } void testDelete(Notebook notebook) { // ulong l = 0; // while(true) // { // int i =0; // while(i<1 ) // { // //Button b = new Button("Button"); // Drawable d = getDrawable(); // delete d; // ++i; // } // ++l; // write("testDelete count = %d\n\0",l*i); // } } void gtkDemo(Notebook notebook) { void showTTextView(Button button) { new TTextView(); } void showTEditableCells(Button button) { // new TEditableCells(); } ButtonBox vBBox = VButtonBox.createActionBox(); Button button = new Button("Text View"); button.addOnClicked(&showTTextView); vBBox.packStart(button,false,false,4); button = new Button("Editable Cells"); button.addOnClicked(&showTEditableCells); vBBox.packStart(button,false,false,4); notebook.appendPage(vBBox,"gtk-demo"); } } int main(string[] args) { import gtkd.Loader; Linker.dumpLoadLibraries(); Linker.dumpFailedLoads(); auto application = new Application("org.gtkd.demo.TestWindow", GApplicationFlags.FLAGS_NONE); application.addOnActivate(delegate void(GioApplication app) { new TestWindow(application); }); return application.run(args); } GtkD-3.7.5/demos/gtkD/TestWindow/dub.json000066400000000000000000000007661324604450400201460ustar00rootroot00000000000000{ "name": "testwindow", "description": "A GtkD demo", "targetType": "executable", "targetName": "TestWindow", "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", "TestScales.d", "TestTreeView1.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../../" }, } } GtkD-3.7.5/demos/pango/000077500000000000000000000000001324604450400145745ustar00rootroot00000000000000GtkD-3.7.5/demos/pango/dub.json000066400000000000000000000002651324604450400162440ustar00rootroot00000000000000{ "name": "pangocairo", "description": "A pango demo", "targetType": "executable", "sourceFiles": ["pangocairo.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../" }, } } GtkD-3.7.5/demos/pango/pangocairo.d000066400000000000000000000040141324604450400170620ustar00rootroot00000000000000module pangocairo; import gio.Application : GioApplication = Application; import gtk.Application; import gtk.ApplicationWindow; import gtk.DrawingArea; import gtk.Widget; import cairo.Context; import cairo.ImageSurface; import pango.PgCairo; import pango.PgLayout; import pango.PgFontDescription; import std.stdio; import std.math; class PangoText : DrawingArea { int m_radius = 150; int m_nWords = 10; string m_font = "Sans Bold 27"; public this() { addOnDraw(&drawText); } public bool drawText (Scoped!Context cr, Widget widget) { PgLayout layout; PgFontDescription desc; // Center coordinates on the middle of the region we are drawing cr.translate(m_radius, m_radius); // Create a PangoLayout, set the font and text layout = PgCairo.createLayout(cr); layout.setText("Text"); desc = PgFontDescription.fromString(m_font); layout.setFontDescription(desc); desc.free(); // Draw the layout m_nWords times in a circle for (int i = 0; i < m_nWords; i++) { int width, height; double angle = (360. * i) / m_nWords; double red; cr.save(); /* Gradient from red at angle == 60 to blue at angle == 240 */ red = (1 + cos ((angle - 60) * PI / 180.)) / 2; cr.setSourceRgb(red, 0, 1.0 - red); cr.rotate(angle * PI / 180.); /* Inform Pango to re-layout the text with the new transformation */ PgCairo.updateLayout(cr, layout); layout.getSize(width, height); cr.moveTo( -(cast(double)width / PANGO_SCALE) / 2, - m_radius ); PgCairo.showLayout(cr, layout); cr.restore(); } return true; } } int main(string[] args) { Application application; void activatePangoText(GioApplication app) { auto window = new ApplicationWindow(application); window.setTitle("gtkD Pango text"); window.setDefaultSize(300, 300); auto pt = new PangoText(); window.add(pt); pt.show(); window.showAll(); } application = new Application("org.gtkd.demo.pangocairo", GApplicationFlags.FLAGS_NONE); application.addOnActivate(&activatePangoText); return application.run(args); } GtkD-3.7.5/demos/sourceView/000077500000000000000000000000001324604450400156235ustar00rootroot00000000000000GtkD-3.7.5/demos/sourceView/SVTest.d000066400000000000000000000053321324604450400171630ustar00rootroot00000000000000/* * 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 */ module sourceView.SVTest; private import gio.Application : GioApplication = Application; private import gtk.Application; private import gtk.ApplicationWindow; private import gtk.ScrolledWindow; private import gtk.Widget; private import glib.Str; private import gsv.SourceView; private import gsv.SourceBuffer; private import gsv.SourceLanguage; private import gsv.SourceLanguageManager; private import gsv.SourceBuffer; private import std.stdio; private import std.file; /** * Demos for SourceView. * TODO on gsv: override methods from TextView, TextBuffer, etc */ class HelloWorld : ApplicationWindow { SourceView sourceView; this(Application application) { super(application); setTitle("GtkD SourceView"); setBorderWidth(10); add(getSourceView()); setDefaultSize(640,400); showAll(); } private string getDemoText() { string text; try { text = cast(string)std.file.read("SVTest.d"); } catch ( FileException fe ) { } return text; } private Widget getSourceView() { sourceView = new SourceView(); sourceView.setShowLineNumbers(true); sourceView.setInsertSpacesInsteadOfTabs(false); sourceView.setTabWidth(4); sourceView.setHighlightCurrentLine(true); SourceBuffer sb = sourceView.getBuffer(); sb.setText(getDemoText()); ScrolledWindow scWindow = new ScrolledWindow(); scWindow.add(sourceView); SourceLanguageManager slm = new SourceLanguageManager(); SourceLanguage dLang = slm.getLanguage("d"); if ( dLang !is null ) { writefln("Setting language to D"); sb.setLanguage(dLang); sb.setHighlightSyntax(true); } //sourceView.modifyFont("Courier", 9); sourceView.setRightMarginPosition(72); sourceView.setShowRightMargin(true); sourceView.setAutoIndent(true); return scWindow; } } int main(string[] args) { auto application = new Application("org.gtkd.demo.sourceview", GApplicationFlags.FLAGS_NONE); application.addOnActivate(delegate (GioApplication app) { new HelloWorld(application); }); return application.run(args); } GtkD-3.7.5/demos/sourceView/dub.json000066400000000000000000000003201324604450400172630ustar00rootroot00000000000000{ "name": "svtest", "description": "A pango demo", "targetType": "executable", "sourceFiles": ["SVTest.d"], "dependencies": { "gtk-d:gtkd": {"path": "../../" }, "gtk-d:sv": {"path": "../../" }, } } GtkD-3.7.5/docs/000077500000000000000000000000001324604450400133115ustar00rootroot00000000000000GtkD-3.7.5/docs/candydoc/000077500000000000000000000000001324604450400150755ustar00rootroot00000000000000GtkD-3.7.5/docs/candydoc/candy.ddoc000066400000000000000000000104651324604450400170340ustar00rootroot00000000000000DDOC = $(TITLE)

$(TITLE)

$(BODY)
Page was generated with on $(DATETIME)
$(ADD_MODULES) DDOC_DECL = $(DT $0) DDOC_PSYMBOL = $0 DDOC_MEMBERS = $(DL $0) DDOC_PARAM_ID = $0 DDOC_PARAM =$0 ADD_MODULES = MODULE =explorer.packageExplorer.addModule("$0"); B = $0 I = $0 U = $0 P =

$0

DL =
$0
DT =
$0
DD =
$0
TABLE = $0
TR = $0 TH = $0 TD = $0 OL =
    $0
UL =
    $0
LI =
  • $0
  • BIG = $0 SMALL = $0 BR =
    LINK = $0 LINK2 = $+ LPAREN= ( RPAREN= ) BACKTICK= ` DOLLAR= $ DEPRECATED= $0 RED = $0 BLUE = $0 GREEN = $0 YELLOW =$0 BLACK = $0 WHITE = $0 D_CODE =
    $0
    DDOC_BACKQUOTED = $(D_INLINECODE $0) D_INLINECODE =
    $0
    D_COMMENT = $(GREEN $0) D_STRING = $(RED $0) D_KEYWORD = $(BLUE $0) D_PSYMBOL = $(U $0) D_PARAM = $(I $0) DDOC_COMMENT = DDOC_MEMBER = $0 DDOC_MEMBER_HEADER = DDOC_SYMBOL_NAME = DDOC_HEADER_ANCHOR = DDOC_DECL_DD = $(DD $0) DDOC_DITTO = $(BR)$0 DDOC_SECTIONS = $0 DDOC_SUMMARY = $0$(BR)$(BR) DDOC_DESCRIPTION = $0$(BR)$(BR) DDOC_AUTHORS = $(B Authors:)$(BR) $0$(BR)$(BR) DDOC_BUGS = $(RED BUGS:)$(BR) $0$(BR)$(BR) DDOC_COPYRIGHT = $(B Copyright:)$(BR) $0$(BR)$(BR) DDOC_DATE = $(B Date:)$(BR) $0$(BR)$(BR) DDOC_DEPRECATED = $(RED Deprecated:)$(BR) $0$(BR)$(BR) DDOC_EXAMPLES = $(B Examples:)$(BR) $0$(BR)$(BR) DDOC_HISTORY = $(B History:)$(BR) $0$(BR)$(BR) DDOC_LICENSE = $(B License:)$(BR) $0$(BR)$(BR) DDOC_RETURNS = $(B Returns:)$(BR) $0$(BR)$(BR) DDOC_SEE_ALSO = $(B See Also:)$(BR) $0$(BR)$(BR) DDOC_STANDARDS = $(B Standards:)$(BR) $0$(BR)$(BR) DDOC_THROWS = $(B Throws:)$(BR) $0$(BR)$(BR) DDOC_VERSION = $(B Version:)$(BR) $0$(BR)$(BR) DDOC_SECTION_H = $(B $0)$(BR) DDOC_SECTION = $0$(BR)$(BR) DDOC_MODULE_MEMBERS = $(DDOC_MEMBERS $0) DDOC_CLASS_MEMBERS = $(DDOC_MEMBERS $0) DDOC_STRUCT_MEMBERS = $(DDOC_MEMBERS $0) DDOC_ENUM_MEMBERS = $(DDOC_MEMBERS $0) DDOC_TEMPLATE_MEMBERS = $(DDOC_MEMBERS $0) DDOC_ENUM_BASETYPE = $0 DDOC_PARAMS = $(B Params:)$(BR) $(TABLE $0)$(BR) DDOC_PARAM_ROW = $(TR $0) DDOC_PARAM_DESC = $(TD $0) DDOC_BLANKLINE = $(BR)$(BR) DDOC_ANCHOR = DDOC_PSUPER_SYMBOL = $(U $0) DDOC_KEYWORD = $(B $0) DDOC_CONSTRAINT = $(DDOC_CONSTRAINT) if ($0) DDOC_OVERLOAD_SEPARATOR = DDOC_TEMPLATE_PARAM_LIST = $0 DDOC_TEMPLATE_PARAM = $0 ESCAPES = //>/ /&/&/ GtkD-3.7.5/docs/candydoc/explorer.js000066400000000000000000000261161324604450400173010ustar00rootroot00000000000000/* This file is a part of CanDyDOC fileset. File is written by Victor Nakoryakov and placed into the public domain. This file is javascript with classes that represents explorer window. And things related to navigation. */ var explorer = new Explorer(); /////////////////////////////////////////////////////////////////////////////// // Current symbol marker class constructor /////////////////////////////////////////////////////////////////////////////// function Marker() { this.top = document.createElement("div"); this.middle = document.createElement("div"); this.bottom = document.createElement("div"); this.container = document.createElement("div"); this.setTo = function(term) { // find definition related to `term` var def = term.nextSibling; while (def && def.nodeName != "DD") def = def.nextSibling; var defHeight = 0; var childrenHeight = 0; // children of current declaration if (def) { defHeight = def.offsetHeight; var child = def.firstChild; // traverse until DL tag, until children definition while (child && child.nodeName != "DL") child = child.nextSibling; if (child) childrenHeight = child.offsetHeight; } this.top.style.height = term.offsetHeight; this.middle.style.height = defHeight - childrenHeight; this.bottom.style.height = childrenHeight; if (childrenHeight == 0) this.bottom.style.display = "none"; else this.bottom.style.display = ""; this.container.style.left = getLeft(term) - 8; this.container.style.top = getTop(term); this.container.style.display = ""; } /////////////////////////////////////////////////////////////////////////// this.container.style.position = "absolute"; this.container.style.display = "none"; this.top.className = "markertop"; this.middle.className = "markermiddle"; this.bottom.className = "markerbottom"; this.container.appendChild(this.top); this.container.appendChild(this.middle); this.container.appendChild(this.bottom); //document.body.appendChild( this.container ); // Workaround bug in IE 5/6. We can not append anything to document body until // full page load. window.marker = this; if (window.addEventListener) window.addEventListener("load", new Function("document.body.appendChild( window.marker.container );"), false); else if (window.attachEvent) window.attachEvent("onload", new Function("document.body.appendChild( window.marker.container );")); } /////////////////////////////////////////////////////////////////////////////// // Outline class constructor /////////////////////////////////////////////////////////////////////////////// function Outline() { this.tree = new TreeView(); this.mountPoint = null; this.writeEnabled = false; this.marker = new Marker(); this.classRegExp = new RegExp; this.structRegExp = new RegExp; this.enumRegExp = new RegExp; this.templateRegExp = new RegExp; this.aliasRegExp = new RegExp; this.funcRegExp = new RegExp; this.incSymbolLevel = function() { if (this.mountPoint == null) this.mountPoint = this.tree.children[ 0 ]; else this.mountPoint = this.mountPoint.lastChild(); } this.decSymbolLevel = function() { // place icons near items according to extracted below type for (var i = 0; i < this.mountPoint.children.length; ++i) { child = this.mountPoint.children[i]; var term = child.termRef; // find first span node var n = term.firstChild; while (n && n.nodeName != "SPAN") n = n.nextSibling; if (!n) // shouldn't happen continue; var iconSrc; if (n.firstChild.nodeName == "#text") { var text = n.firstChild.data; // text before declaration if ( this.classRegExp.test(text) ) iconSrc = "../../candydoc/img/outline/class.gif"; else if ( this.structRegExp.test(text) ) iconSrc = "../../candydoc/img/outline/struct.gif"; else if ( this.enumRegExp.test(text) ) iconSrc = "../../candydoc/img/outline/enum.gif"; else if ( this.templateRegExp.test(text) ) iconSrc = "../../candydoc/img/outline/template.gif"; else if ( this.aliasRegExp.test(text) ) iconSrc = "../../candydoc/img/outline/alias.gif"; else // function or variable? check whether '(' ')' exists on the right { var np = n.firstChild; while (np && np.nodeName != "SCRIPT") // find our script "onDecl" np = np.nextSibling; if (np && np.nextSibling && np.nextSibling.nodeName == "#text" && this.funcRegExp.test(np.nextSibling.data)) { iconSrc = "../../candydoc/img/outline/func.gif"; } else iconSrc = "../../candydoc/img/outline/var.gif"; } } else // enum member ? iconSrc = "../../candydoc/img/outline/var.gif"; child.icon.src = iconSrc; child.icon.width = 16; child.icon.height = 16; } this.mountPoint = this.mountPoint.parentNode; } this.addDecl = function(decl) { function getLastLeaf(elem) { if (elem.childNodes.length > 0) return getLastLeaf(elem.lastChild); else return elem; } function getCurrentTerm() { var ret = getLastLeaf( document.getElementById("content") ); while (ret && ret.nodeName != "DT") ret = ret.parentNode; return ret; } if (this.writeEnabled) { var node = this.mountPoint.createChild(decl); node.termRef = getCurrentTerm(); node.setOnclick( new Function("explorer.outline.mark(this.termRef);") ); } } this.mark = function(term) { this.marker.setTo(term); window.scrollTo(0, getTop(term) - getWindowHeight() / 6); } this.classRegExp.compile("(.*\b)?class(\b.*)?"); this.structRegExp.compile("(.*\b)?struct(\b.*)?"); this.enumRegExp.compile("(.*\b)?enum(\b.*)?"); this.templateRegExp.compile("(.*\b)?template(\b.*)?"); this.aliasRegExp.compile("(.*\b)?alias(\b.*)?"); this.funcRegExp.compile(/.*\(.*/); } /////////////////////////////////////////////////////////////////////////////// // Package explorer class constructor /////////////////////////////////////////////////////////////////////////////// function PackageExplorer() { this.tree = new TreeView(true); this.addModule = function(mod) { var moduleIco = "../../candydoc/img/outline/module.gif"; var packageIco = "../../candydoc/img/outline/package.gif"; var path = mod.split("\."); var node = this.tree.branch(path[0]); if ( !node ) node = this.tree.createBranch(path[0], (path.length == 1) ? moduleIco : packageIco); for (var i = 1; i < path.length; ++i) { var prev = node; node = node.child(path[i]); if (!node) node = prev.createChild(path[i], (path.length == i + 1) ? moduleIco : packageIco); if (path.length == i + 1) { if ((path[0] == "gtkglc") || (path[0] == "glgtk") || (path[0] == "glgdk")) { node.setRef("../../gtkdgl/" + path.join("/") + ".html"); } else if ((path[0] == "gstinterfaces") || (path[0] == "gstreamer") || (path[0] == "gstreamerc") || (path[0] == "gst")) { node.setRef("../../gstreamer/" + path.join("/") + ".html"); } else if ((path[0] == "gsv") || (path[0] == "gsvc")) { node.setRef("../../sourceview/" + path.join("/") + ".html"); } else if ((path[0] == "vte") || (path[0] == "vtec")) { node.setRef("../../vte/" + path.join("/") + ".html"); } else if ((path[0] == "peas") || (path[0] == "peasc")) { node.setRef("../../peas/" + path.join("/") + ".html"); } else { node.setRef("../../gtkd/" + path.join("/") + ".html"); } } } } } /////////////////////////////////////////////////////////////////////////////// // Explorer class constructor /////////////////////////////////////////////////////////////////////////////// function Explorer() { this.outline = new Outline(); this.packageExplorer = new PackageExplorer(); this.tabs = new Array(); this.tabCount = 0; this.initialize = function(moduleName) { this.tabArea = document.getElementById("tabarea"); this.clientArea = document.getElementById("explorerclient"); // prevent text selection this.tabArea.onmousedown = new Function("return false;"); this.tabArea.onclick = new Function("return true;"); this.tabArea.onselectstart = new Function("return false;"); this.clientArea.onmousedown = new Function("return false;"); this.clientArea.onclick = new Function("return true;"); this.clientArea.onselectstart = new Function("return false;"); this.outline.tree.createBranch( moduleName, "../../candydoc/img/outline/module.gif" ); // create tabs this.createTab("Outline", this.outline.tree.domEntry); this.createTab("Package", this.packageExplorer.tree.domEntry); } this.createTab = function(name, domEntry) { var tab = new Object(); this.tabs[name] = tab; this.tabCount++; tab.domEntry = domEntry; tab.labelSpan = document.createElement("span"); if (this.tabCount > 1) { tab.labelSpan.className = "inactivetab"; tab.domEntry.style.display = "none"; } else { tab.labelSpan.className = "activetab"; tab.domEntry.style.display = ""; } tab.labelSpan.appendChild( document.createTextNode(name) ); tab.labelSpan.owner = this; tab.labelSpan.onclick = new Function("this.owner.setSelection('" + name + "');"); this.tabArea.appendChild( tab.labelSpan ); this.clientArea.appendChild( domEntry ); } this.setSelection = function(tabName) { for (name in this.tabs) { this.tabs[name].labelSpan.className = "inactivetab"; this.tabs[name].domEntry.style.display = "none"; } this.tabs[tabName].labelSpan.className = "activetab"; this.tabs[tabName].domEntry.style.display = ""; } } GtkD-3.7.5/docs/candydoc/ie56hack.css000066400000000000000000000010371324604450400172070ustar00rootroot00000000000000/* This file is a part of CanDyDOC fileset. File is written by Victor Nakoryakov and placed into the public domain. This file is CSS to work around IE6 and earlier bugs. It's included just in these browsers. */ /* Some magic to emulate unsupported "position: fixed" style. */ #tabarea { _position: absolute; _top: expression(eval(document.body.scrollTop+8)); } /* ditto */ #explorerclient { _position: absolute; _top: expression(eval(document.body.scrollTop+24)); _height: expression(eval(document.body.clientHeight-48)); } GtkD-3.7.5/docs/candydoc/img/000077500000000000000000000000001324604450400156515ustar00rootroot00000000000000GtkD-3.7.5/docs/candydoc/img/bg.gif000066400000000000000000001111771324604450400167400ustar00rootroot00000000000000GIF89a!,I8ͻ`(dihlp,tmx|9H VD#>Qñ 8hl n@y;mk猡o0lW#Itzruv%T(E# Y/s}q-: W ~ j6WCY˦ ^ GWAδH& ]4`栀4;&*h )"$L+23VJUIA "J4K%]xAM561:jC"tSN 7)":!+\crz{:MPbsQn4WR` N.v1nJ ꃜYq.TŒ,&*ʧ1k%%@Kͥ^˵vŰ[EIɷ*sYy.=J:lVtS IV,6}qŁx mG3O;g1-o_x6AF=y] FiXŰ)^)RAW6]a܂CtXm 3 J‹+UWI0\GR@AD t@b4žC*e^W4`6Q"4dVA2$V~3akEaќK/Xi_WuC>!e0_0ɟNj{>Dd&(ʨ+nʢO=fF(a) Td9iɈ`(&GXm7Q3HJ@PPёx:&1= r Pκu@Ozaԯd>f%#y7*hl"gxӂƄ$TjDō墝l눠$0޴dm2O<ҙ)1\% t ¢L T ?X1*j*Ay Q˹ld @LqKR# *rM{I ((Qfhw@۶} (qBg.ه܇ry_gQ*Y;FޜLzm;=^ɥ襜.㔂wæhZᄂ yMm_Q $K<#S3!=.r?-Nk3v$c$8' /`{5)#`"+@oO[^J0Mo+]} AH–E,,\$^ (?J0Ma#?c/l`xdt@fQ@#3.s~gE{t e ^3 $Мhh5MA5L+="z5Hao`ovYbӈ(%$!̝x13ZT8.V:._ Wt# ($!&"q) zwG- +Niǵ 0O('v P؜#<5%NЌg; @tEyWlF4&O)bКUB1"̕.r^pprC }ztlܾ?5 c#6IQCW.(0p`2!#gV=_Ƒo9B^nDܑ3s* 2[?G iAơhhJK$&JbbTl7nI pJC0GŢSojHL;ub8(>% c{ҩ/r.?訿<R`.%ƛsӚ"Z 7^,v/0myY#CuvU̶%Ӛ\ =GulfU U:5Q ={kKO(xPpC^%Xbڪ TcՂK) m 0B II$9+L~a`Ԇq,#W" 3$$tlq,ЎfZ=ZҖ-7|K@_d H*09aDƑ墏I (ۨ_c 4" $,ؐfBDxD` k҄}Z1\CD 9Ju:̮Ml8L> JdZ?ƌAYdo&]&;%X0;I¹wYN~|/";=hKpz8"N@(\ .fFW~r(%9XN7EyLe^@ЇNJ>s;79 d[XϺַ{`NhODnZg< b)/vзÉK!4#ac_x`-`\ ރx5P9 S{ X9AzNNR }Wz>ȱ-,pCKSYEiT^5g&,a&jl7wߒ^Y_> 0DL^oGo鷘F uUBIQq~zK!&#W|cR30r!maeUxA kVVnW7cpsH#UTbVQlzRu');"8hR7nBFQ$|PT$Gb:q "fq1A M8B:<7Y{aq*5vy7x9`HL"ёqć8W€0>e0zPP>V}F#XN7~#pF߁JQ3V_~v42z1j@362`F3?c0R4$H!cf_F}/wsbF9VHR$*uh$R Wh(S`@G9e&<]xQ͘3dq$z%e,3AL65G҂Y* @*A"8U\-fK%1RFA 0 \Kx[]p1)3R%P2{1e:.⓪ȖI9Ad3@t ɣR/`Prz@U)VW%. ZSӇcUT51q 9}DSD9$ZL Bf;ΰyhhC26/ Mdw&mv #G5q R9Ig=XQGuA; rU=ckȎy=ݤTI#=Y4u%CJ\嘎dWSeD>r62rH:8" jS{aQ,C)bRͦI#ŤyyxVD#)+Kǣ󤏘!$ U4w4n]Gv9@\;eA dIDRaHV@O >3yE@L(hHJBD$FIb$W{X5CUQȞ jz=)<5$_ҢiU>IlBSIIfAbh{bڀ}Y7 ]VI_& lVNX_[^ ɴq{3K}' K 01B$Ҹ;iX_br_IkVhg83(b0 x"``˷yo/3zJ$p~U0O&*YLлP1BZuyZ0v^c'hY9W J#U5};6z[El*y c G%}7xK8luxJz8n,wA"V` .hq0¹H='8<5&<  |xk &j{@Pl37Fo 0L?"4Hz!B|'mqaqU8wn )< Dtx\p9I lf i]uxzMLĒTThRɷ(sAu9TĦl,ʥz"1i .&vjC`0{ W0Wg(L"V/ԄlziapJ,HaMn1cueNay''sotjަH@ 9}YڀI A m:iY`ÕB2I tɴ|RBZ_xfXf|?ݧw`{B@UP'~(k\d5W~gs_<ާҰGFp :LȆ()XQٳ8v9r kl~至.70z0jp V5 Xւv!("j3j4!JKzHb>1nh` l[]ڼ=HQD'<(<f?KҊ1αdI'C47+xй1^ .=1ߌ;7I%Y~4ΈLc~(H..rЈ$(3s$DhˆO Z7$+z㜪Ѳݡp2Iڢip?Y@l'YE. [<*9(NAnBIOQJjޡi5@9+=jh:99-oIZ93c#YJn9eO霉A=0I1paGsչKoh΢SoOQ|Ṡ8]39VETZ HbL2 C ZĕqLԙKl^,d`K:MWA[:چ0CCT/`ZI;]v$¿įAnS/ZHCB#Oy5*- M jZƮ+'| *ɼN+ .=8q\$<I)H. sN\~ ٢ڸ{bs :;0{\0Jr8X쐄\lh0rddܛS؅s f mYki J~|n){<Ȧ B/޲Ah6oI0zT\"¦J,**1@8aA2(c  @  Vze͠0XQ:$7Ɓ& e  W^y π)^48#jzc+-[[҅Mjv:yij$ EO 1 B`η)a|~0vYpl3.7a(\ڕH=-̦H[vT§q>c--/ &lap .& Kμc&UV=`Ѭ 8 @I^ j2#y°$ʦ*D2Ӂ |*$H@hG1x FK|ï@=) r9 R>.NI7^|@Dߞ_lfxm;ooW&O>VլꩇbscPXIÍ|<>^3YOF/#Vgє4>^X&gEyM<DŽ&Qbԩ z };7?H뀓CAx.;h҄zTkchv1?܊Nmjcb#:aZg]j MXfFSW10&}䚗 %58!*WmP h1z@t$`N08'[`,nH"`pb$%4'xjy:DuE%/T!iHI+yV'h?'kJ+Q]p)W8P5f:c $#2i45sS|4uV 4˦#+H 2\Q!INNJgۼ<6)wIn%#6anќ#WȓAa B 0 @Dh6%ִI>d!X"R+ c$Cs4;cZel'-#*,?zqMӒ8BL/y`2nmL[ !tQ-3#]RE^ Lzq,T-=Y^@<4`@ V'*8 6*u|΢2둁2jj Peƾg&;fUҷ2%Q~0JaA?PSi|T)b=&:uHC۫,E̽Ix,h)  5n+!V1dӔGwavX`5 lQ>WC$a`,# "mo}EbIn茂S,c\F!R,5̗ '2|@VY;?X]<2I U 5 +h^J-F9퐍Se@M"rw=*1bkcvQ% Wo܍4=.*l + ˰.*3^A`\Yь Nեeedm,0Sw Ԋq_ف?S֓AV_*="Yuq6 (H | 2- zgCм>j{ȑجa#"vO%ވ0ny(\3Qy耸8KÒ! D<ֽ+pf͍qW;ۯ$H*xÅ0vSx8 U뷏Mn'w}NjʹG^m=r7yĄWfyNl b?D1}p;lIb)FX2ās> ̯=`O: \";axY]y NދtjHC=]% 9"N}\ /HC& 8wG$xwH`?&+ sDQO8X$9$$7$tHVZT$dǀ ᔈѱHjGNZHqʕэy!BM$[R˶JG˹˺˻˼˽˾˿DI]HDTiʈ]3ֱ|,ʳŷ̨)MLwYMgɆz{%= ĝ Wr, /KWЀ ݘشCO!1Y`+ 3*X n {O'0J&QYP V(6nX7xZHQ"VˈɪZNQ##WX x !h5_H;0{?>B5#"y#LA(F 1P5+H$ł<814PJ<[3y m5-S]]{uH(9B>bpunIKܮ;R͔ˀO/0`^8e8 *_̸m=G3\)PTʑP9_bL+q7e F[lc5hiᔜkݍk [W;d1} ez"빋HhUQ@q#;b˷;Pbڅ1Nے=|:abG.a! eƈ911OfJd`H.#O}UJ/ 6!o]Y=7*5}%U ] E{+M`Ie1ܥ^8G)>_f_ƽ@e湛\bZpk2e29> CCCgXx# .8U9^1)m̈́υF)Cc|`y8*黹DT^c, 2@4mKC|IbGOszUZݧNj1챌IlHbSwTb=%KNS{Ǜl`-Ȉ̠uI!QsLz VP =>?@A'B7CGDWEgFwGtS!-IGLNИ) O7g>w)qLgi΁TSg>RgZwH_aƗɄǦ)0 Yh8ugrlJ~Qu)s h RQ^ىSn X l/8F *OfMIڞdkWRhD!| =XCʄoGkApT ? 7$$0"I8}8:`*kҭ:&!cUSnzۗDqj6vxQ=inBXUԴ}V>7޼*Vhyh!=YrgǛznr7=-##KRRcT,FLFm'߆N6*Q|\$TFu^|nסer9f/2 *B0kd\`j4ꙗ@->Rx8{%hn,BaǀڭE{ݒlZ\0j/ .B jMҮO͚#,1h'3t@0 Ax `a`2SQ0yN+iH@WWSЭ3RZUNRE`FEH!H@OCAG VN&j_K`CR M!]] ,%M2%5UT R1 QcD8_ otȱ0 :-p Ȣ37elSN 0! ' 4BP€N yEOrLAPPS=}2L˨\Q79edBuXt5ؐ72k0>P!Zg}Hffڸa܇X^vgZ)i aqf:Z&yh|A'd~P[y-P E%_ LKYTb9Oaq_PL$`; F00:xq1$W: 8kDmG ל.誓 n!~U.*&Pp 6.BPax^Qn+zAm1W)fCQ(VRM lWaF#;&Vz&$Cҙ,]*1Ki1Bl X~ ;l- VPՋO_Hu5-/ՕAWMI-`WQM#CNT߄ tFS'!e5=l?`v N\Rn$A7an  wP@+fw-n yx7NE;T`5Jr3<6Ù?'$Aw~y{,D.,CyS~cÅ0~XE)$p&N{8`\P:>(,Bn ۷giaw8C` 谒9Dm;b0ݰK8`; qF A3f€GiH~` >rx!탾<WdZ7*l#DBHOrJ5$R R@%uID|^Z:=#?>1a%TydB#b 3%1f<zd/SIH2bV@T0VW'>}f#U.=glqP۝ 6pO 4jh ɗr.d*A2hZ9 J/Gc*әҴ6<ΛT)P:XSF=Bԟ"iS*թR5Nխr^*X*ֱf=+ZӪֵn}+\Ѹҵ~]׽6% NFYhOeRt }+6bÚN,[u+G7Xޓ/ OzTgd \Zo-4H˺K6EdavO}r6Mem;d1K+ЅRyrV 0>Y@0VS%#Bhb9i@]YB]6_Vاb;&Pt( GhҾPB- 6Ą9O*),/4b.W'EM Fu ؖ?Z+F0g_H%*fyF8 /=S.I TR1p62)|{ON7/엑)s:F3[,]2[F=L-o&JgDr}Gͨ 4,&l+9y-ԴڼgS͕T[2 cD9)>*+”I+EF&D >;@rJx:I5m^lo+Hp ` yN$8)u)󝬌&CB(H j<6 JF KN AvW70[&i5>AEb.CPqbh&#:E]H(a ^`8EŰߨ 2)lڠTxS2.%+lP-$Es*|)5x `z-0m3->\'e,lA;Cv;Zpt/?A!?@ 4KSd>b5sf%8@ ~PC\L pj_nqxnwlhG=SE'_I*}[l&ɝ&Mƌ 9mIc<&D?2"8P XO,rx&T~tEloLޕTLQLiP00%H')12܎y@fA㍝w]XgD8'Vs f}g|P&)ĭB'F|֧klA('HA, AlٌGB'@ĊDH BY[!J(uI;}z渀롏<|^fu`xh|i,π8EP,gF(Ԩ=h)p)ї iiغSjBG?h^ %;(ܓ & SAYGY3m;ZGX vL>a,ꦢSNKOAQS+휗GjԨz$j9\=kӋ SFћ)j^2EVVQ>T<nkW_QXjշV+IkA­PG+X!~Uy>,FQ^,fn,v~,ȆȎ,ɖɞ,ʦʮ,˶˾,ƬV,8@XG(L(#(QV/*T@QDljS*XLe)m>A:==͈R)4}m *=FAԬUިm-?- „-zَ-0tQfIFm8|@!wx8i|BNۘ*_#<9,_cWY>ڐMR_, EV0 {#w1jyEqNKRWBCv"Xo~m|PTk^#/ezW*n+Y%6P V>GXLr~ǣ]kIn8%`}=<[ehIA~)Q,vK-L2R Lq9 $$G d‘а걀!D$ěN2djFk3GP}!ΝH40MZGrcc*2Bsr$Jd/R~[1 x gu05$tG@mIHVd BU`$J"TsS7aIK$;YN$~FZx-b] `XaΡYY E`%7y\CXΩ/#5?cC# Idk~lGs3d_)JP텐B pLBˀ~\Z6ָ@+6Dxc?-ptp8,>~U@MluYnѱLULA0.Wt-v!VVmZu]/ֶblŞ??ǿ?׿??CV{q֛wP|G`JKjhi19mJ1ˣs :2GАZ*U8R-"y20g27 BI>16M)EGN[Fm,%J=&D   #r-X{'q5)nA~aӢL7udM@FK&oz ¸` G:x ,:R'OAXjЯ1>S&l̙~\nV)iV$2 ㆓Mf ; 4E%C2K\bI/t4`\Z8i,br3E@&@.n?t7#EA_.3@ VlfmY'ؾZ KPYed\Y֣n3i7ΝRW^b|+*Sx=Q2^W!gbI;F ͒@A 3ݐ:-4 E{.9Yת?kPڀQ 9HO* ce=ncs16MuĖU^CltrPOj331@Agѯ*Xq6 zOxfzĖ\C.dĤy;͡,q ?92L=3ݓbplJ n ʀuf@i@LՀquNxq:@Xʂ")B[[\j#r3& 1&g KtYh-, x0K=T-ˮd@ ]bv6]MCCҋ hBOdvHJBU(~1yl 8 i{mZ10 rQKѫq :`~`Uj,E6>AKՆ8@hKy)82lm5`n a8NWhoVQHԠ&D["+eryĪ4S=YNG˸̺K0"o& '+ ؁Ŀ7ceG!uN6Ɓ2)$FUc;\o.vE i5Ĥ~3!r|"g$}nogL"qZUBjnSؖu0ꜗd(0E.1!׸-+ sr R"Flh Kn: w[cGcSXL%}C8D1]#"睕M; 4@BN?ud?"(+B-g\6J,Kɂ}}HI, Ƌ-m( 2sr҈Y%pjѻI`bC3X2!.СeB{l)lϊ *F dd\X6RC!Gڤ/|2YjY'py  Kg!`Qڅ@JuωpL"qA ( #/dzhe>@o^32QthRE_jqzє_S{jTI]ySЪq.L' 3X /uQzaL`A3 :8J q>d5)_a%j&]m#@K2S(nE!kX@p뱦.3 )T׌>V5dke$bjF0be5@WLH6 @ϹV -tgTz絪Ͱ;ը$)Dlx7wϺuZ 583F7/ Lםvf) 0q! ,7RUտBޝ,c0`e-ͨE oXZmtʠ5++ZipX @> eR*cXG%ѧ{SL+sS?Ƴ' e9-i: g)0ph;᱆>A>ItS-'.Ls($@G[?g>[' lIDߙ ;I6*;}h/l[ Z6ޒJM@0n98uJ06}.(Ec7WPr:ֿK"!PCPGC0ě(#Ex $ pC]159Q~\<-oxrϜ5qs=ρtE7ёt/]Lwӡu& % ]9m@k-jսSau l麣/ Iq Y}nDL ->v@;]y4׮\O`u|g'7Du]jm:tޜ#1 &Rh֊0@Xn;dp #ƻZ}!cf̻w>J TSWٚP+2> ,Ρzi3vO0.Ԁ'.)X &ރfYdI D/0F.m7h5C?,mVFw>b,24DcN"x *bbEv:O<8ƃYM\4mdZ5C7@ME b7꣧ U C ( ФV6*C)#@d4P;DB.08;0BY&7aڀW sN&ЏL6"Xd^皼9>D( 94hʽDcDI mK耶H狧hv ?DaF%EJmJ* A0JY(RJQio TZd]8B\4<ddUXޑdBكycVF䜬YM$٥ƛ$M %Ǭ5|$Hrj `c6&Ob"'$G)(7c6q4Jԅ]o:H; |f",HOb[Ŗ̱)2\P$+Kj(HSX*kπ- wrbiGJ "n^fwvl`-R*{\"gY$Qq:6.B4=j 6Bp!4j83xf(@XNRQ04}4e C!GZz0!D>6Q;6B4=$Il/Ӹ[bz" 0~60 D 1ԁGPHکIf4j5FQ^]I3d*dϣ 9){. 2 3U7PiH{g>Wz)):AYZ[$Fv X]f"!{(2+'&>X8a}5VUD XfJ0\{؄P^g~u#a;M`Se 0xrfFFIl&f+D&8&y l#i G*Ew+W.˔^"'!!q{*dY@+q;UvG`:/#r!ܥ%z[3?,e90W@ŝ;IeTKƱogkj a;˭U/D5`\qjO5=2/ ϛB:GQH/JKӶrЗ㱠bǂrg9H/#wV)ΥG#'CDFDIkv$JZ56 =hKP=K~їXQ>L픘 }?AQ]hgR)}Zp/ɨ'`ce];Эm+說;'\>]u^ՠ)qbY>>ۺ/RYWt&3AP.v*_>Wi^S/b?Lfb~ ~6^F huac]cG=2/q`ʥ-ͱ3*Zݞ{|ϟ6= ͹Bij Eᐏs4 `L09FuT`QEf8vѪAJ ̌H ܓ[&_~;b+5# bQE҄&' %T3pps#@3XxvXrdPcRzJ3XK{eєձ $mңSX gڰ @-2ͤ ̇|i|Q_/CAL Tki #mGBbaMz|s)*D}qZ-G,  f>q060BR+tIػ!<%KBѪC@x~06Gٳ2:V.1w4Gz -ᾈ5CJ02ฑmKMjф6̸ت~ .hPVߎPbm[vr- jok`,sܺ砳C86G۟o??bj4`t݀` .X `7!gfhr_b\x$b*b.c2Hc6ވc:c>dBIdFdJ.dN> eRNIVeZniby(6f~b"-U2T܅Z E,F6y(wzօ'8ىXT"5\hZ7j2O(vet慙ǫ T(e~~a?mx}ܕG,R> <ghiu,kD#W+M_2޳tet@yEJz)m1 l JS'Clü2P n/'~=|F1cuV瞉n*kk%qb!Nj^&φƅKbF^X3&8*=bIK=t5U֡<]0{f{:Ka_~=9'ݲ58=cNTlLڪ&(۸8QL8}njmjX5Yt8wM:0[ye0ҋXWt՜#Ua9r'$>9CL 4:H@t@GdY`1c'`l%(hA1,![2iЊ_00]AXA We|Sd}dوA+8EIP_yMJcX6Kq3q%! (|zJK6kV'c  9 @·$zl̑I $ @$؎6}HUxҳ!;;; Zxx@&$@ I+CfBQSxvJ`CkVJLk\VjMԶh@DKr*j b9a㕀.@pLTM+Nre-WĒwܜzCI\sjR5Lz-} ʙ-t=XmjSHe#52):jpW%.(b+SoBk#kT l;u5)gʗ~0HKk)dBkrڐV3l)c"٘ *v/jN3lnV۹ UK!HL0~=c=L~mUͤt0+tWm [0c"mo`DРpeRƇj_W3f< XTQZ BuE@5ehm,6Uz8b9P&Erh*LEkS.6yJ 7{`]i,nG=O[8d[[=a׷@m_j)uaz y R@xԐH6Ё'A&Y4t<\EO`o+0qEb\r`K%4q%$h ܈sN~(hNp,k)NpE0*;K`¯(Rtz)z7\uU}^XIi2+@ \ 921  yAM?GV #GO d Żq\ ^wuB#`34k >D4"pҁ/B}%a(/] b]"l n"jx g d8IwhcuMb@x(HhȈ舏(Hhȉ艟1"*[=(c7Z-+bTN@)k)x+bow#(Qڑ'OHYc4;ЌxP!+QbN ȅ2 !0 !0( +4iD"-1#1 !EG C<'W;9xPF,Hl_Qg1!vx%&h#ZuPm%I[!#B=*W7D8BV?Ny8l;b5M">I#d<&c'3c+=1X,Q3hA@=DwQ 0/f_gx;w=xA饒bs3y$P);)PUaUYrU:~xb35"tS9U3Y9ʁI\8T5sD~x@MDG=DM38 d5''+NDItCiTydnq'PQ*qM'$7MYi"TuOT  ͵L+|j֔dp'$DX<I"aC]chu1"Ҡg F\4DIO;ZuPH|B۴,o`T/t7L@:WD.QAQD:)*#BK )g D}`<1}ZVh?,4+p1zn 5f>qJHJq65j!.NACzUˬ!6c&hbJ+i]`'cPe~It/ ^g:k;[u9/hcR{Uf/$y AHi{b Me^hz(Nkh ld#V{6*Kje*!K[^;h{m& Y^3 #P6< l3 lg)Z dvdZ6^ A|)jVj9 m`[mfj Q;"XEU[V\i'WdŰ;t9@E%, 4lhP,*P'Ờa*0j+“#Y-V<;(!\$<ˡb˴˶ɦz(0v}s}7I_6x0|;rRtwyڛwП0q$ ~_` !e?FZG8veL4sdsmo\Swا|fswݸ;9p4IyYtg[ܷZ(U6ګr >Q P5+tlOpy@7 c-{sSDzL#jt+hiFZ{`ܽ5 ˌW(QxStW̓CvR.N w2:286Ii>ؑq%aC`|!eAM̀T%-1>M9{~w%}H4rԒ2ҙ b [wqR%I>(,im+؋bvL*`֡M؇؉$?2Yt} b!"%ؗٙٛ"=ِ١-ڣMڥmڧکګڭگ ۱-۳͈G 82+ f~ySa?p}2aS{yِ݋Wr)=w'ۜQ:!ńq:A.Y>Yܚ$NSK$7t]`sx2Z]߷ /U-I)]!+]{24O#"$؂"T3ө=Iړ5;;ٚD,aCpY6 }5=XB(k1*a!Gkj!>S:cN9fK{;#2籕`^Go>έC8 t笩j9zAay+#T.$P,<g&~^ Y[Ad(1AQc/SVOJ:d(UfzQe~ ;HUkJX&tjVWUy[>O.ɻ}9ĜU^\@H:i"[ƬjTtW'!No5@um*̢*!MX k?9?U<с`C/v.0G?܊5@,9kk/-Laںq瀁 zٮiJ4RRdjsDKAmfM$]!0Kw1hqs(2½*88A·šȧJ)D:7OH5)/ N;Q);ITHUT68*20P6;NZ?>a1ܽk:̧dȒÑ42_9i٠e4YW&it!j%F@sY2fa (|N:QmGsr~5UBhE?p' 1a\ [ b. x58ESE=aPhLqn@mj'X%|Y&%jXÀX1&TKaJ.j ^ۢvCpsyl7K%R-ؠen&ya@߷wTe*Ax(x( X@yd !BLR Spi`b)" @ (@0"~XO>bXnnq>⑊14q5 :oj "Y5B&+(W%oĀɥX3 249s Aӥ> ʘ atP 8:RzD2!-C !|,3;aK.͸O 5R]cO$mlV$B1EEi La:D@PSu^#ͫy[ 0)@Hx f2Qzx^74.*L@6=&G_1Fԁg7?PLT.|%gISD]LT>ɁRM%ӊ|B>;"Ъ@LLĢӠ&{0Rޓ]Elm)dLN,%*g Q A1IDVA3BEeɣA#[9@0s4Zu(g (vutƈ&0/aL6%9VZLnz4vDKI*h %1Ur̐5N-PTWl$i2= D%(fD@S$ 5:,qEQ4W3JvJD+Qv3xpT Jik @;HnpdDyKr6ڡ|)c@t@db=в r|\T4+Je7򀏮r^v+FCb"t(hIMqT$[@_ԢIuV9z&CB !gHäj(b{],XTJ v9#A@:ȷ]ng.:Jc. &M݅xKb"og@ ')A6#9 m[#ž4lr 'z }:R; =roT|W֚ ck zVW 6*B(eNp$ BQ4 h7ЌLpXzfr 2p7q(Q:WĢk<\C4Gm-aDLfRЃ;_٢T'gKp{3BHbٝPbjSx{u E,^(u\(ӡH1!$ (.)AMϪ|+VԚVhC(?eQo$_8x H)?0 T 3׺,hK4 09ۂEC\p DpY1[ ӊxq@AC%/GZ ur0^$^5H8!y fdw+' <{xƍ)F& k`tA,m4ƫelt:vR3K;DB2&ۯ|LƖ2ɑIirt9FљzTHL˫Ι! AFtKȏ|II6A2HIɡ,JU0êZX,.eJVg -@Sd#hݬʇ#Ё.j@S;_}  "0vwXhUɕi{HW у/dVҤAk @0 ;kӲ.rV1|\T@;vB55&X;QM q {2JS;-8 K5Z9Z0Z %)0NP 0ZVZ]ZϜԜ#3s C ^[4 Q"dx|cGH3PEx)YBʅ\=aM*\̈]GمWG\Z2 >j #N#< א:4E[mNe 9K:8Zޫ%M{9_6 I}+:ض=[)V;S $Ʌ:*RCZs~n#_O~{8 L5c+5zv޽U_č4^-ݻ]{#abH `D8ۺ%Xk  kK^y9>ݭEGazL);@Z /VU136 5V1~KWC;څ`^rd<ذ-{&DߣM< ɍ6O-rp z כ5i`%^1LR֌n=1%o[VePE‰GʳN^q G[֋`oXrɑ}II WL1 b]dmcxp@2=yq]V2"Pzo)bDg](,d$)^bE\vlaxlF@˝igllqhlޕDŽt t|u)0CGt0IyLyJn!*!LplTnCJoyTȹY  oJ/pn! 7qqqgqqqqq r!r"/r#?r$Or%wL(h֤F}GsͩҫEߤ%`qp*.LLJ> 74?7Oc71/9> /sOYcrk#b/d# 7՘D[ʄUL߿pF0I߮sq0XC@裆k ns.y a)6PhM)›EdTaH0,әp. Pyjv',EudbA :XXBfGZ"*mQ#xOE UG Rǜ4yE*P1BB)V&wwl5ɲ!}"#}uWIIz $ɴ`eQRF>J.kzRu$1QQe_ʅ1pV\l_)>1 K}n$їG 4 b Lrq(mNP`Ӫ POa~.d< uI5SY35b2lCZǪD?T؂9m_TP|ڂ !pۇWjʋnVR9_9 .xKV:MA z~INErX([eqr~S6uǚײ !æ~||-&U+⊱&δfnM>8$-A 3*BB*mH rs$ ΙkFe> dA+P)!\44ؔ8Q 9!hptP$5M8 |٩~8Dm`MY$>SΝ9pl]0;i#=`2;tW%efnL^?ã}o \6KcU:!XQFƍba IX Q@x@KV&!Y&5UdA ,s0z7cw`SGgvYQ7,Rh,"װNv&3[ZҶ S{ŜS _⸱tV9֦sNY\DR9JE5) 6-];$ 3l&ԩR)f #WP896 svz఻#H Wӊ?^Л"QdO( I([>i9\ZFOPfYnb٢E`^aUUYe gTqnU xa0_XAt:v5.ۉ0]UrM-F" J}2lAl4D(0iyAI7>04L>TEފ,Fi[ QdE46Tq~%C*$i!YHC_.NHF{JLV2鍃^DATG>VAH6 (pd3L Vz 4 yz:K AuLL!h+H&5*3n`]LmB`vaB2ZR{2{'$g8t5;Evq8 vn $;[sQCZHlѵa\K]_ rlu}@ѵԐ301B f$D5$DARn~"+,G C @8!$4Nqt(X3 7#l0fWi1a,>E|!C7-(%HZ&mL1$@iS^$A%+iHV"1$ C1(.i?aA$7c"3\&3iIQљҴh9k6&7o3'9is3\';w3'=i{3'?4(A jЃ63db{%OnAD+k)B9L$J)B-l~D, ,SF^BMQa4 USR.Вa(Ma`zL}Z$Vp%sӝԗ%R!UD_A'QRYHC)XxpY[Dr"E؉ĺ.*@Sd;S? % ήjjPR2F*!Ȝ:* kuX+Q Gr5 CDq'״J V> * T (` ?+pܚxڹH/ ;丁~ ][ UZusUw0zp`bN!&;֒ &ۤlu+ḷ]a9@\~WQGm1ӬzXkdR[ NV=%H`HH3aU3=٘wa|;lCU}"l!tңDXjLqoU*ACD""|pOGB 8A)8񬰂1&Kw2uA }HkAG3lO!)u|md/ӗLi;q|U1Ҩ $ǫ.e,Wx9? Ǡ- ĖPZpœ xGܹV}\ԵʬIO8tݫdC>JU{P"+Ʈ݆EPyXƔA 掆as` k8X b쀡d`H yQo0=sG Ztfot]@qg1ïEAg E.H~%8"CD̆0Qԟl·,ZrO <y"QF'jܠ7\ü$A*ܞ`LMQ%a K("% A9J2Ka30 1BmA }DS4пeYchƁ$+Ԏd>ZOj FS`1؏،8}KHL0@"]n !OQC *8M DzJb!bD%uZD1sV"|m9ǃ q!ƦQMWyRQ&@)%+*IR^_2~IJ'9z'z؛d!M:f茄(˟!n mXS:Íb.$3YKӞ>%2y4Hri ?)8R:,JϹJ4B7x = lS;|%=P5Ġ /Z(cT 6l`M`p#+|TA1 8`7hc58K( !cXs @M,/[Y4aE[F=@GoH =P!̴  Ī7S,1$NcK 00I#O*؜@ S+R`O7 q)y 5HQh?pC(0K-34t$Csts&lm8h p :T=wvN_~8LM:Cd\'/cMn Arn"X2Cݜ0Cf1ð|)U2l?C>G#x 3 `kXK`a0O7.2Y s4`1!`QʰC`"Ce"06Ae(p{p%fl $4n`O JB6B!/= &׬`Б>( n"U&H#p FT 1@A0L!B‘#gzq2A8.,D  rAw *8D [.9 @DԈ?0A`qkS~ƁCAnj@Ӂ(,k#A9'qT#^1UT!Ztvh@VZ@ z;*$XaBȕC Y'D@ހ DJ0w*Pj` ,; I-`ec F*4GPrCA A` $G1Fd, <ܵD Z]?6I@``pt;r7'EPF`yBI  .ZNqhp/PBPE (ѝ8@/GE5b< Ј 38BP :  uB@eb@X4p6+pa *PG0H{Lixȃ!.ā?+C/ b p0Aoby$2la 9ӛ PCvF.Mx!pP[PC8ƈ?0=q80Cp@с4z pb PJz%xQ!C\`"o R` N\`mcpB3>a LA!03 *X!-`EA6Lp]pL !p(,AxE0 a%h c[0<$x귄<6% <;J P+AhZD @W40:7 \7{ ֈJdP"+` =8-Fp` (`sxA0 n`A_ȁx7aT]n00܉ LXZv@HxcaÆ/H 1|VUzpk @SFp}WY22Jl070C2f/*4 bwnr 0 F s $PS6tRpN@Sb r pHR-)T cP P0}^C@xP1m0 d|?` ?p P@ %C@ 2q0ipl%66Ղ HgPx jJpݰ{ I Ss@% 0I_ >&0L a6pu 4`d  pFk0 @ ,Mpb@t-y= } m/k0q Ӡipto9&@Ĕ q 0&[,Ij< P_"g*(,wx'3ENP\m@m81P/ &?R M fuQ  .P3P PP}-`f%0pF` $@c s34 ZPH;p_ P_@H W k@1Z | P հ%tG| 0 i@A @P w0 % 0E_) CF=@/}L #p`'L@|ff+ė,@Pq@p 2 r BP4 ddwp !p/PdFcDepn}R`NQpF:K) <`G\vJP1P-PtRy b [`:@|+V'*IXP,B @0W!h1CusIw>YP@\ ozpKPPC{rl _0aPzIӐ0J4P0 t@Ӱ0W c' uw*=0 F [ NtSSx>!tg ` 340st( c1uVPTz`m 7 o [*`!ta  0YhӰ +c%`qKp n 0ﰀa},kpܓ J;0"3t ]^0I@,`KRzd`nМD ׀4 Pk06NPB2P6E ҪD*H& pZ)B W@@ }` Po[ۚ:b`s wW^q"8g R70|)Zb`1 P Fې14*d<@ $49 uw v hP I\P hW75R 3p 0A@ ^ `@ CjQPC 0C: ih 0wRPd6P؈ Aʅ]@r: w{e[ HU }ȲP`f#c ` xgpC1 P 1({`=y SpM(p "pqf\` 5)0P+ְ:;Z0TiЈ6]sjjmYp 06b@@ fȮ! pMPZ`h  C 0 _! 馉2Hk (p =` 2@d@Yx ]P KM` <`%Q9Ph7@;@ t0  Np\)` 20 py1E" 0pV(`S<PjLI w+ .]0r=p$0]@ Py[ ` ` p@w 1 >0% FQ*,.9=> /$be p@C N0 b(` ~P`iUqn"6n m 5P]p ϳ(r/@b K-L ~/ &DT(ː]UT-jOj y@x0jJMF&@01@`|NDp` f\PS]d1@@qrF CҾx@NlVJP 50 [D[`; RJ )d={0f+ P` +@6!;0% ]O` s[ 0*N`_A *`l09;  %  ws@Pns^>]2qP&@8 "WĤPC`w`b5 P% P EeP0NA&A:J 0@>9"rl@*,ߠU {  0W bPu F `] ΐe@0C A .dC%66 ,aQ70G;0|$u.\tM<a/ ԍ9 \̘ɥ">XS! q e_&.XXYiV! Y5SеPm[jz ia7`K…:N| x H(X%qq-Ȼw1ԁ#"7K-a@cXat3@l9x%0 2@ & ȡ3ܰ"XX' >QG=kQ'n@d) <㈃!tI _ ?cF 0Py>' F' 9d}i _n@A/tq` 3%bc^E ~JJ+}ȟ##& j9rJɃxC+*"yG bXbx# @18 ,v[$ b6 c Յ%D+ aX^h`"i@Ţ8w89GAc P.x؆$%[;FH,ƽÞn0pB-&PΡlLx,̸GL$DY~p=@`2 (X9D*Plj xka@0(`4|A  !`Fs!o#VuK1 sZQYX!XІ;ܱt]:6lC @0p@z#2pH(A -X08՘+?:H,(lp8ʳ. 7 @pm?[(h{7{"]@_ 798 Pj;Æ?Ȅ?&@Fy0+fMtɭ{&ku"s.B*0<rmA3Zn؆:ȿE 90" P:pȁ{قr  xEAt( 8ePC)XSX``Btxu8ex,e.xu/YnÇ /2)x npSMe_4'b3()Ȁ<gԆ2j 8:quˀ6s|`HS";s_{$F3Ȋ*)X.W[(^2(@w@8hGv{xB?)pБ؁.([I50'ɬkʀO(T)@al"@`J+pWZ(% 8%01ȵpG30ˎ8! +@ssAV#\x".Has8|sIo8RʀKZq-8_8Y,Э9ZIboxiX =tlKL6l 3W H HQ0 J?<` TmȀGRMz!# 7oq(j?Ȁ B-s=1q0H$?ˀ5:-1HHPlz>tHo?4(,{0sL!Zӛgr@t0DP٘(L$0xnPu(> p6ph^M{VJ,0R#P;~cF+ 8PM8:8%OX86@?;t>W  Ђ <0e3{UXpjP=xYh"HZЇSO+HSgE"xEȀAH-tt zɁK`iM`n(Eu8 6Ȣi8c[Ek7X5lX.(bXفdx [xlUK2wȀG2hqmPL!0p JEH_ՍiP0pOpXS"S@~[8Y~܋Q-|+{X)mX3`eH ?`@oi XЂ:^68(]3D/9B% e$ hP#`؂0.1}Hx+mhwP9 C7E٫!b_{dy~OД(BZ0 PB7 A6(p[X.p(pdE@@  (SY0w @7H;&浑4%mpebBn]8FqB?N yh8@D (T۲`#h"`2yc%)Hf"z8mN|K85h`-%Їo08W@"@` &0HC@I?=MpOXIz;pp\ 2 \X&XGpȘ)XlmS04pXmfB.h<~{x-PxPV5E(qPmpt(.@{x0P pS5(;8+({7 pu(H=U>n58@y ,n:: i:XePaHAW8T"8v'p)^+6Z|yxЃ2P~ J z7r3|؁$ Ы&,GB}3 *e Aj2qTt4:!|VM'bVЁTSG8@=&T諂p>9M ՈIbV89椓8!KpM lp+3y5@P5☣wdu ϲgޠ"5r'tjͻxb 0`c x# pڠ 68!q`1{b^6,Az ཛ@,'QЃmlc ic8@` G t!WCpr\Clb6A0+G'L q' 0)Ѕ&_`< r:tI@ %[PA!4 %` 6!NP ؆t'\ wzG18 I`%(i_ \ !F P,5G" E qk5P $ , 3,D \XqAB 7_ AU<Q;ob0X@, c Lui(@3ahڠ 4h2!@%u b(/qRhPF}"F TՀ<,x@(0FmXT f@` 6,|B b: 1=0|A % ̱ =HXx@ qBH-xJ@.t< I@pCd)h6\a -xq zЇ_PqfB0B&8xI};D` xz&̝"JT`LT F԰hpƜvYB<`&$q<` np@7]p4V@h:oC1@ aB&bbtS .Ӈ T)[}2Ƃd!W?a7qr X8bh7F4 9cJ0A, ?``I\p>qcr%Za[Pi.BOcNA\`/K e D #{-?2b cXFH < qOD@> a J7@0\L;@ $ۣp AxOw,BQ) 7|@"@tDa¼ A.Mq @\EA?F7AR6LEQBXHLHJdB%O"8@2@4 4$N2B C | @\=\38 (T*4G3?4T"/ 5\ B ,;,A0 , \ g4PtcxA.8A "@,4^2V @A T1D] 8&xSDB@%Ā6ȃA@()> @*tH#%:1z?AdD BP+@lA\ B  Ѕ B@4CBB+t C 8TZC7d"AX;P %@0,P5,B T N$LX[O!$5 q@L0,xpC@/~D- nE 3Ё@r] 8C;8L=d @7  A "XC B8]#1I 7Aj!M,c?9 d]D6(oZDP7IRC98CQ5l<2<?|.`@T}5A@@0o*A D?TA$ Ѐ$^AP(gqX@ AHO 'h]<ÁŸX<`@ B9h*(&\)[N!DA [B D='|(dBD*A{]$0,EqM¥:tz P#85:ȃ;XT2L(!C3ЀHMQ 4[,$@ z4B'6|@*`  `x% wM@ DA*ǫ_`:T@T8!]<Z-pAIA 8*"ZC-H8$؄?A #$8CX܁ ڈ)0,l0%Cw!gl; 78P-@L]ßZApC6t\) gî P%~*  Ѝ$At {A0ILA@C6, 3  =C60A K*AtjCA)@_̀ϑ4@3sA 6t`^#2Pd#.@Q0M$ ?@)P¼272{agiAyK>@0P/D 40Xc4%A! ٕ&@ ‹g AET`}q , CC@?@5@-cBbFB,* @(!"ԃ4doHpA@2# 5 oگ>حeߡy8( qCSveE$\< ;W0!$A/|iW蚟UC 4u  x:"w&(rT9*zL27pd ,BO$ލ@OԂA T%LA.A \=B/\ˆۃ\5<`lЂY%( lA `+d@T$G̟WKH4f'L0^`!' |X"XBkZx AG fD !8iv.ib`6Yc<Ǘ/ l\t&x . Hx#<>Y /IMX'[CB  4^#PC >jΦ&;6kj&j0d P`l2ї^=@íɠ3E޻xk(jjćUe8Ph#(%<1z"iy " 6Xdvـq0 2hc :v=YCZ* ;TRhmH6 l ZPR p1̀O <PE_zћ!,HRC0Miȅ  c+X\A.( - 9 l .;@F:a `d ( G9٤8Eh#8ytcFw/!L@@8zxlTHФEܳ =(p=$ I#T: @qCxGox>FlPnLS* 1=X чn; #6DӂpM@Kp60=p#"h' @wpq1%\8Ajh@ŗb*nx\9ٸ>.`|zF N@Ikk (O<9@L,@.Q u^*`Ѝ C@G[%A:Nc K@j<4p%@*Rq19<>5f "䁚hn8/ApxFBIX;q>bJh 0Ʊt ?:%`n9Amu7%40u`c"@-L@ ŷbBC> NH @4P\\@<< qPCCxxN AHA(@= .0Y$&{ЭW]ܡYGްw< ՠpp=RXڀbZPWx@ bW\ xG*yl*^(+8 ID&C2Y6* wS`g?{ajl7n!p\|O).VRE0a 6au|j #5x=qEo=Xh4 DlCq;=4S~" ,̣97epT`Y0okV=PF4dWwD8=\wCGz#/ `q$=$h@b,(RA(@@ * n`DQdU0aWh+I Gt9@X`E$"JX@ #FAE ! ~!A >0 2~#|+~!c +$:`J@"e M0!i Ԁ'\N'` tCb A7oV @+P#  sb 2"hǥg@/`$$ GR!R$|%i, ޡZrd)s LTDPb@2- 2Z:@KaװaaW YD`@o˦a 8 P:!b| a '@t@ G!(;_Z`P.`ġP>"H `jɂ@1;!P)ր 0  @ z2 t bb`a Oql* @X`*@@aCsi:@C A# NaɠTdbC)(ЍL(HWAD ܀˺< Z@`A| CaA!RLt@mC6Ѐ( N9 0 3 @ `` dحz>@ɀPf R22qP^X~ `ha 5K T!JoRY,@6F|aJ7.Ku.JX@b ȧ|ZA0kTxbnC5A4 `'.P `@666`jm)FqX@P` @n ,& zdRH 6l  B@!@$r @h4@bh7 c< Ajaja& )86$da@z'= @ ,@2Uoۡ 6 4` u 4s(*.n'H\ A ږWzOO'\_hlR0ã %KhcpဋA*! 4~Ba XA8$F3V2n j3 TJ @R:%x!6h4pA0؉ J`> 0x5>ݬL\@D`Mnbn2H3(Bb\ Bk 2#4@L`!r@ӊ]'>f)!`\",a+ @Fȧ AJuàf` @ 2` `&]Yg465J6mE J-Z?NxI U;@ 2`a5k֨ѦN3E|rI֥ ZԩTZ4@ :mifyү.W1 Al e㏓R揀3nxˑ!!TQM[P4hchJ,p`! [~MП{.}#XD}ߑBZ]UBHAl6臼 VlNw wԩ|IR#`ۿ1>ZQBp~@?UDcT&eI5a`eԄD ԉ p*4=jGk&HPc P)4DQ 6O?H%!`@9cM7`8Qc63N dZQ|  0HֈTH[ٰя'6p)FP:1qgAJ?dNs=:NQB.+H5'4MRuOcYD耂,Fl5_!QODxH>`;c8<0Yd@aؠlCM/khӌE$@,C#p$RWԛ a.8=$.ۍ=Z4sB[\^AA L,tPtlJA0C.y` p"X8 E/bd1N+6'b`MxCsҺ.Z{Pb0F?xs #d3xԹЍ5*.@Cs$PT0VB)xa&,0T.-xV_uDAsŔ"?Jq}:;uҺT 8U-( [XrDlDKQ-< 6 h0G('O84 {25p@ na؟dQ</ 6 AH ?B0 V8A+hM.k{Bp&BetD j8܋xT if, <}I@Kd?Ibwx@6Cxk\#Qb6ZAYI]#JPU7Id f1S6ށ m` Ahxܨ!SN$Y#t4؀{ C00P1ȋT)3"&EDttхCl3!PbwR= RyX Aa4Hla p%dXV%rH,P_蔟_ɑIVK B :2@^=<.@ H#LA# c 8шF @& !0 e;P20CE հ~+0 tT rR% 6;pP#  ;].F!  |]E s1 >o^1[ ` h`^ p@&grqX eP` 3>֖fn=# {s 7pb 2ppG}]pY-!/W@/ V-`2*l`PdpG6 (V p  dmULP &G۰ XP OE`2*aֆ_i * g([: p@P1 TVPWq/nr" P m*aY@ U@wz)x@ w0Z000Me fP_P|@ C~, T# M@` 0s  q;H`I;SP.0+C@Fum0+ >b1 p%.? v xڡa 30 "j00%LPkTx 6rp7pJ fpb`unp- Sd݀% #:.@-# HV0YP 0<Ӱ ,P7x}n vX4 o5 c[!Y0^P0-J ɰ{x ` (04(1*v<N3#6@l VP]XWR`K`]~P%pu =*P P  xE'i!^4G `c:b *0>[AZyc@JPFpK,IDIxGmX<7gш a@ X+{к@0=E! s`eD@S#p#h |@P 1pLiRAu'Q 4I@N0^ c K 00KA% L%PQQ[ '` @7Q`"Os8L4g/@ 0p.1Ԡ\ؠ'| 3 u'Ӑ v=k1PaE4`{ @SE.! q` hq; ) !N@ \&0\$PMӗ5!bc85P,ao]nP h CtmnR 40I@ Xh m4ZT+@ f<#  q[' 3 & P pA0 p V>.3ӀPveՠ N I@9~x &0\$0 $[X 8x 1ZC-O vDrb,0= P hp;<0lv< ߰B 6\,%V @F.4W  ah,dMw@:`hU4+Q ݃KfB0ޑ#?GC `iȂD&|: Af G{7l۶ZLA8QZ!tLI/P8|6a"™#`.,lqH!u2q. 0(bPX1$uar{ "G@ܘf/12L*=.I%?yC |h_xa {!%:p{T:Jhp $(&Rcqsb QA ()T $pǝjĦm,5P)|0ön, .{:5"o×ԉ7b$∄ x Dp B Tీ ]HF!=h/h8 X ,@D2+0PChAhEXai#o%d,Y 6l!gQrF@n+%CdPJ|HM…R k&TPTB%Ixa9fGYbvZlh.c*`e j7wkZ`ĐE[XCH 2&G GʉC̀.@SƜv쁡XIax %8~3\ƒM&|H 9C pF,+^p" uۏ XlxUCQHd!՝ xp"D3A/0/LD?2QG.a tAw,j?܆Fn10#`38&L5đE H.\!A70&`MjW(tpB 3! 0=( x!VVPnIO!m^e?`AA?\92t%BHp p x\ 0 v` ~P& 'f+pA It:s !.I@?1!PB E~qEB@2&$l@x;aHa ; /L@\ K`Bp Aˬ Ral!)ږ?0@"P ('T.;LpJ4L&`N /4 Ę 8*X#AװѲx7h` HH@*}(Ȅ±b ` 8 mKަ17H@m 5h@aEjf{H@;ڱ-|C]H=OD*>`X"%4_0:HdԸo7XX" ap486-pFH# iH:m@k@hpqJ| Q`ۖ<3IH!C &# 4Q`LwDIBPЃW.\l0:p4 {؄.ۈ+$uuPЁ󀁤NR }Hz<`fpyh$QF3&πMIH>0"XGy@AnH1Pih5  %h OU#$< j4x X5P{`qC06LQ 1II K 0l8&H/p%hi \A ,;k8j}@j-`&@(4Șx83<CrP#\H؈6r;;.Hl O2e$!O\!D(2: #`q؆jxЀ"q-`pm@JёhQ؃Z{(98/Ha0# ;[YBэ$c"d p~8 ! 7T#8c"D@I `>H8n`Ped(08n؁@!sH{x; .(I`~0Oi':ЂCP-0'($SЇeCG =yx`DD+4j ymR4v6h (OP7PHyjl؈H8̅&x;Xl $X hwxHpH= ҅d-uW,Ohh[0eH8^ Zx{Y;c <[N<CRhKl}@`0 kA\8%(XC$5u\8&p=,np9hΣL8Yhi R)/7c 0XгfV PahPoI( Sh.ЁE /tmpqx@p6˦MhZRw%/^@i0ȂIr; nB9Xhfn[ižxHƠ^FS`] GA[$~!$F,\"0<P`WWJU6 [P ^hh +Pf?~hĝ}6xYF1 ˋo8' BЬpXx(l?xQ!,ey؏/ =a&6^/p.p|$"9=h-p0Yb&ωol[ /tZ`SP4ǀejrH h] hx2HIpAXphJi[2 Y/;jo)/ (Xjdtp(X^&IPpF(+u[@3@.06Ygi_ybxסzWTi@0u ЈYWq .v@p6(w@ X`0\pa". <`ilDH) ArH0(@ ] i^V hyLhyYO5X689X|% .Y@Kxt%p[xN0`Ѐ+[#0!XHC΀5(m,"t_#! ]hb؁ׅ,ЅU[<,RM (z%P֖6XT~,{@ȅ H,P4OV10PY=seƵHIe0 #׺oVj>{~8Oh#`"Lp!Æ",g4Y cƃq PH@cTS-WT:2lsfDذ`BL3Ã7xI3kAV=f#0@A0,dAlv0+XO2`_6P.#/8Q'wJL7d$\VQQXB <&@7@3I 4p+010 BB\x EHH +Ba@Eʂ Lp. Դ †#(mP".b^`HLp a Q(D 2 j#x@ fP-H"H_8 hP'/ <;"H"<5j!z1ՒxAA5e1T(6@! 7Bpa)Ġ'C" aJʏ( FҐb<#O⛥. !, m@WMkBp[4/"5r؍JylC2"֡%4 `BL](O a^UABp/a)(c^Mn!z%@ym.?HpT PC8 _t63QPxl  !a`t~<8w,!0H\RaL,qP[&|e"(Wuh[V؃0w踒Q P L?P!5@\-,F ǑQVc,A@ jt‚WmoAZt#ptuHG^ x!1F6L ~x!0B0T{#m!6;~@{, xCk3D D8A w<Jw0ZPmjYpxG5^ T PIdBL ~C&}ہ z3_//ųyjL#P89tn#t0 pcAaFC?zɌ@d< LT , hBF.5X>M/A 85d?%aZhb{-4BEL_?+#|(=2uhƓ>=lW]LD/T(HW\4x @L &MApP$WG NA@6B4 zhTyL0_A|9@W|("8#@nnTov04 䣠dCԂBL ?] Р.p}J60G D7 (j[I|`g& ݽ\Q2BY-(@`K}:h tA/h\=L,>DJ莾G=H#/CT @/܁'&C(#0(:a'a0X, ɒriaD uat陒n~(a< ))!IAiiҩ )=Οi ""j4j:*,4H߲`3dh$``;GtkD-3.7.5/docs/candydoc/img/outline/func.gif000066400000000000000000000001411324604450400207460ustar00rootroot00000000000000GIF89a???_?__!,&H0ɀ=B xȍe(Od5>;GtkD-3.7.5/docs/candydoc/img/outline/module.gif000066400000000000000000000005331324604450400213050ustar00rootroot00000000000000GIF89a*‘՞pXټڭY!ɡѦyO@Ϋ׸ҫ뼐U麎׹q<ǔǠۭc%`#Ń2ȕۿY"\"㴌ݯಋ!*,x@pH,& T)jj@#p(ɜ" h1o!b*KC$ ]'E ! g)E& q(E%{E" #LLCA;GtkD-3.7.5/docs/candydoc/img/outline/package.gif000066400000000000000000000003451324604450400214140ustar00rootroot00000000000000GIF89aɡpXѦΫY!z-׸׹yO@q<UǠۿ񻿂1u*m(Y"\"w+Ń2q*c%`#!,b &di蘤SN910>@C`R C  !%0b(V#KoX[JcQ~)INSRl% ,h,!;GtkD-3.7.5/docs/candydoc/img/outline/struct.gif000066400000000000000000000002511324604450400213410ustar00rootroot00000000000000GIF89a???__?H V 4Fɦ+PG ;Ȥ * iH P.,~r6N8ѨQr@*++ Ǻ %x댳@I(\V*?J.Y1 Eܹ\$C̏*.\F+` hT:hDca5a[PW6=BN2 cIĂ6oY)  0پdPjl zt4xV+ {@X%ؒ!*GvX|x"g0]@@\nBR쑦e VE+]d- f`B<)R<B~~Tr ^Ѩlɯ84F\V4WHf+3+> ҆״7. B]Ȭ' `4S۳$*Z:Cyϗ (B֏qԧ/ƵsZtyה($<8m,WG # YT  .HcK~Z 2 2H-^-a~YKT@uԩOe,F;8sFsPPzA #kIM ׼նix~RV "ICUL ( rm\CXYo*YQihuf۵xcmJٌQYpGnJnE4VIB 6 ))ݰ L\rj)@f)@*6{ aXh*{7F_nِΈ{(Eڡ@p CEB_j@| 2  ^&LaIpqF +V)u6@VFx'Z7U(x@NiɌݓFiOY Enmڀq L 0<\X 8 jgɚWERaU5ԹȁU:z w)y)Wt %HnN8A9: )xeo j ̺"YsѪ^~8MāPĄ˘ڐ*oɮK4+4נ U *?=ޣدs / `kaiణЬʍ\vzy(N ?&j@05l2 , EA:X) t`:p/ʫ kiakUK[!^2j z$ i؆Y吓vsTy{p@#Sc0w{9`PŪBɳ tjg ` s*J |ZS+`б|`Ѱ Viۿکm۶4w0 ̄@9 eT q<éT@$ ܋li KЛ{i@" U K` 0 /п˘;읗p:?' ,Ps{v<;yRT $@ ,x ” :Ls]K 5wU;й:|ڴаp; ĸ: #'|YP #z @O0|݅@00݁> ל5e@萎-߹NߥBj@幾 P > 0La̿\70 #z:"/Pܮ./4q̋NxnJN(7P>pN!  n]}fZc SP (70Q`&ܬξX@o2kW:i FWPWP>AO/T]Z֯]T H & loo `@* :M[D:ӣ v[? KPfsgU_m?Nъ  kx+L܈mT(LXq &25jG,88qFK..6ɦ$I6o$ɒ%? 4NIGDA]$Ed*ժT DRKWM6U5V\eϮeI+Υ[],RJ$SP!B8H0' B-^l5 )$,k˘3+m4ΞH/Y4{P8"-:R8p@zqNTشתmV xo7Q"R=D !GILQ"?rth Lai_a'ضKDj( 'fb !}*P 0(Rs-`;``= -%Rv`UQi % `pɦ-ld 7$&bE JⰢPQ:^4T`tqQqrNab4aH bOLX2#VUL*,UAnr𧠀 54̀bNPڊDL V`t\xRHbN:ðՎƠU&ZVaYQ$˖ <0^uʩ'K؜~EC9Ӳ+Fg=ʪ+M[Z,`၌ ;AwgoF(e|""(!{AmlXw%d1'"~Ae,`mMrQD4+;ЕseLJDfFXAF"i{A+֑M%-_IWxmp&^{c ;nFﱨNB:p< |Q4VP|P䓠/Er(%Nh4~x""``Y?GwzjZY`r,?+:y(wȬu!>Pʒoz@(`JqQR ! G@e0$@@LԠR<>]5M0Qi #6MOX-Pwc+XEPtj4-939xF˂W`r|^0DAX!CEK^+X1}-,b1w> hYed\@XƖʛE-e,cFrV dR#*h >A@> *FA VB:1€#';9KКg)MiKDg,TX 7aWgE( dd6C6!#IR4@> jf3$:"HRcCЈ/B~h"0IzNkİLe`!*aD87 `>@<@a Kn,$I4hvI}GiH'MuQa5X~A@'zLB7SR홶(N"qFnaGL4V(6qZ> yC!Եb]ڋx3GA t$E$h.b90i /(0QRo)i@Y|%{gUr`lǚ"ṋ z 2&(B6pܐL>0&|,XbLMzhwPIx= \lW7 'Ep/[Q Lvvo2؏h.N8&2 n FE͌f$m 9M22LڤULr=pxbq)eQ&zej4#(uAn f`:8iER`nE]4`, } p E2\mN<{^&0YRz9<,;ۦڎ)@ JԂK`C80nooɰep6¢)"oṰ>X+\ //h=jA8VյHA *xf"a3#)M\JpI^ oK^3 {8d>RH:[LH8{0P T`??[C?C;@1I(D"+lt8@p 7IhdA u~й擋 D @_N>3&۰<;Xc{=Zg=A[:# zإ JB%%j( y(_4,<.L~/ yCzkZN18o@sC1;83|3b/R:4{?k=:"%670D̽z[I2"*u+>O DcN QlX(GtN_{uܰx1{3P/kER%C>܄bt22% @JeܽD%jBl@Bn)~xaj>D,IXr$EN oD8x:0QGcSzI+O%* Jc9,, .~ # JN,1,KZ 5{6KY 1LɚNb*aj4V؀.T*%T!`<+7̃.t;YYB(8^PP\R;Mb4)D@GÄNɜK=aLF{f~hbǤ=|+3ǜIO X~(od8 7+GOȲ<5CIJsɖawuߔJJX%X9N.D(H?A>V34A>K]f@mGf .Jd(-Ldiޭ݌Tc)S#L1&^~OXN?YoH7dc>~G(Q ,gKbinUFôe[u=̃XjPy=gtE,YWcOZ0U0H(Ig.-hhR2d؝]UD-!XFgEXX? 2+ř;ET]m뻾Vހ3"`^&Tbl~_lvS։6DXV]僖h\46v _~(;^4+l>>VP&ڒ3FVgWn7%f`ASBq8p!Oo0VprpicHˎgIRO`pxq o95OpNV-Kcp;ր K=h>orKp(qk˯-Oq/lqf]txOkR 8w%c~5; Z>o&x`Cf:퓵+ <[bJyIߚ́7hti7.JouozWT,zzSO8>Hqŀso^XPPtȒFGvRUȤQq Cs~|^g26zupvӟ'7oeloxoo27~xˮ `A VwL%}h-էw ue̾'m~WcGkP(ONJP! -L0qc'dFK-)qQߤ2gʼtլKy'B%_+KB)ђ%*oժͮp՟%J,I4%ֲm-ܸlm Q#ʗ r*\S gXo;u̱,aT{I6_]1?.~dʔ*jK_G" 1LZ\8Fa.A_d`.^OB&84)tBԙYX(AUl QqR!8쐂,;E<(R,ޠ8@A<x{08HW8A'"lcK@uKcR¶V88 3H8?"RLG`lp+^ъ\ .`%̸4sݛ0Q"ᚄri ,aŲ(1aZ1@x0 7`Q8b#Mg&4Z B`^b5C@Y,DrY=ݛb';7QD0+!1 * RI bQ 3mT)x#D@E5HY\7 DXJ!Ց:‰N3;OI+ys_ nbnoCĜ.,GD^B c* `Cf4;МDPS0I奞OtLK!$(Fn) 3jg DBǵϙSX✆8 M MhUZJ$# R))*AIW] i##I 5BE$Z Qb̪#f lg5QїIC R! u-LgEu'U$Z )z΁6ljK,!I,PxA00hbE7._N&ЗV0KLN` 0|;F.8ošxBaΥ%,;!덈BFK x8A Z-zKwHJ JJS ,¸*3>̩< k XrJJV̧e-CXTJx4ak$(D i4}ުp.q䮇Vy7ET*{GgŴK@U,X':XkL!TԖiQ I> ` Alp7\HAHIKox8Pk:Au)Z GO 3_k%` g)'*a03thm\b;Y1 Sǀ0>rPw ZŐXoO +5[l% H~<5D)|'0axޯrMáB Hěm7Q UB;=M_f%ep,0F (L<挆iO NW-%ȈjXD `CMI!GBFf$G @}KKj|^cK?uqjUlMxU4™'FeR RE$@%H(' G$'@Ѽ,[0&H@/VUe pO UA ^1IT.tEYAf!$Ah 6\^H0[%!GGLaFbTeh$ WNf& (|.J@h<QbT^xW]!Ԁ+e_֦3&BDfuB&bFF`B) g}dG CtZt/@CQ!;F]tL3O0hB,A\Q'{v_A`z \ofGHWv/(J!@'9 09ut|m¸I$1Uլ e@3(nzG'uDqnDbvc"5xȌJQy\6 C+U}qbP(2 HDFx~擨*ĢG4`tg4͖NhY ܍']Y ]_&@@zb~"H" gDCPg_MMÞxlOQ* TUxߛ%+֪*!07|@|rjđgd$DLE+z@>-KBR՞$nPAzkf`(".j 1L$P'$C2Dz8 yVJ,blUUJ','X@7PNK5\C2\1) X L !,ҦNl(`,GPj~m'I #88;&htm>@AZA϶-j |$LkѢ*(|#)DB*rS3P?,A-fZ'>&_؀/-"`~} >ZfƣK(WHB'C pb@,T1A5.d/\$@-|nF.N&'0T.J1d5Y1B(Ԝ ߹ mGodkqB(;Idh$Yr&?܁A1l>,5V9q\$٧Kmc'xin&gh>,l8qṋf2oF."^fn1e?&&0;B*c -.~"Jh #xmB_!"7,Я17*бI~/&Jng  /ۮ23u70ADA @<H0 9 sg]"A!$273<j @0g'  xD@AwV, Tp;GtkD-3.7.5/docs/candydoc/img/tree/tb.gif000066400000000000000000000000771324604450400177100ustar00rootroot00000000000000GIF89a!, }`$F;GtkD-3.7.5/docs/candydoc/img/tree/tbr.gif000066400000000000000000000001011324604450400200560ustar00rootroot00000000000000GIF89a!, 8*$P ~C BPSQUNGLA;GtkD-3.7.5/docs/candydoc/img/tree/tbrp.gif000066400000000000000000000004721324604450400202510ustar00rootroot00000000000000GIF89a!xƾȻú̿¸!!,WP($l60HV0$(W$P*Go͵H8*$P ~C BPSQUNIA;GtkD-3.7.5/docs/candydoc/img/tree/trp.gif000066400000000000000000000004711324604450400201060ustar00rootroot00000000000000GIF89a!xƾȻú̿¸!!,VP($l60HV0$(W$P*Go͵H 1) { // there were already added child before. So copy `level-1` // hierarchy images from it. var prevAddedChild = this.children[ this.children.length - 2 ]; for (var i = 0; i < prevAddedChild.hierarchyImgs.length - 1; ++i) { var prevAddedChildImg = prevAddedChild.hierarchyImgs[i]; var img = createHierarchyImage(); setSrc(img, prevAddedChildImg.src); img.pointsTop = prevAddedChildImg.pointsTop; img.pointsBottom = prevAddedChildImg.pointsBottom; img.pointsRight = prevAddedChildImg.pointsRight; img.pmState = prevAddedChildImg.pmState; child.hierarchyImgs[ child.hierarchyImgs.length ] = img; child.lineDiv.insertBefore(img, child.icon); } // change last hierarchy image of prevAddedChild from |_ to |- var lastHierarchyImg = prevAddedChild.hierarchyImgs[ prevAddedChild.hierarchyImgs.length - 1 ]; lastHierarchyImg.pointsBottom = true; setSrc(lastHierarchyImg, genHierarchyImageSrc(lastHierarchyImg)); // change hierarchy images of prevAddedChild's children on it's last // level to | prevAddedChild.addHierarchyTBLine(prevAddedChild.hierarchyImgs.length - 1); } else { // this is a first child. So copy `level-2` // hierarchy images from parent, i.e. this. for (var i = 0; i < this.hierarchyImgs.length - 1; ++i) { var parentImg = this.hierarchyImgs[i]; var img = createHierarchyImage(); setSrc(img, parentImg.src); img.pointsTop = parentImg.pointsTop; img.pointsBottom = parentImg.pointsBottom; img.pointsRight = parentImg.pointsRight; img.pmState = parentImg.pmState; child.hierarchyImgs[ child.hierarchyImgs.length ] = img; child.lineDiv.insertBefore(img, child.icon); } if (this.hierarchyImgs.length > 0) // we are not root { // change last hierarchy image of parent (i.e. this): add minus to it var lastHierarchyImg = this.hierarchyImgs[ this.hierarchyImgs.length - 1]; lastHierarchyImg.pmState = pmMinus; setSrc(lastHierarchyImg, genHierarchyImageSrc(lastHierarchyImg)); lastHierarchyImg.owner = this; lastHierarchyImg.onclick = new Function("e", "this.owner.processPMClick(e);"); // make decision on image on `level-1`. It depends on parent's (ie this) // image on same level. var parentL1HierarchyImg = lastHierarchyImg; var l1HierarchyImg = createHierarchyImage(); if (parentL1HierarchyImg.pointsBottom) { l1HierarchyImg.pointsTop = true; l1HierarchyImg.pointsBottom = true; } setSrc(l1HierarchyImg, genHierarchyImageSrc(l1HierarchyImg)); child.hierarchyImgs[ child.hierarchyImgs.length ] = l1HierarchyImg; child.lineDiv.insertBefore(l1HierarchyImg, child.icon); } } // in any case on last level our child will have icon |_ var img = createHierarchyImage(); img.pointsTop = true; img.pointsRight = true; setSrc(img, genHierarchyImageSrc(img)); child.hierarchyImgs[ child.hierarchyImgs.length ] = img; child.lineDiv.insertBefore(img, child.icon); return child; } this.lastChild = function() { return this.children[ this.children.length - 1 ]; } this.child = function(text) { var ret = null; for (var i = 0; i < this.children.length; ++i) if (this.children[i].textElement.data == text) { ret = this.children[i]; break; } return ret; } this.addHierarchyTBLine = function(level) { for (var i = 0; i < this.children.length; ++i) { var img = this.children[i].hierarchyImgs[level]; img.pointsTop = true; img.pointsBottom = true; setSrc(img, genHierarchyImageSrc(img)); this.children[i].addHierarchyTBLine(level); } } this.expand = function() { var img = this.hierarchyImgs[ this.hierarchyImgs.length - 1 ]; if (img.pmState == pmPlus) { img.pmState = pmMinus; setSrc(img, genHierarchyImageSrc(img)); for (var i = 0; i < this.children.length; ++i) this.children[i].domEntry.style.display = ""; } } this.collapse = function() { var img = this.hierarchyImgs[ this.hierarchyImgs.length - 1 ]; if (img.pmState == pmMinus) { img.pmState = pmPlus; setSrc(img, genHierarchyImageSrc(img)); for (var i = 0; i < this.children.length; ++i) this.children[i].domEntry.style.display = "none"; } } this.toggle = function() { var img = this.hierarchyImgs[ this.hierarchyImgs.length - 1 ]; if (img.pmState == pmMinus) this.collapse(); else this.expand(); } this.select = function() { if (this.owner.selection != this) { if (this.owner.selection) this.owner.selection.setHighlight(hlNone); this.owner.selection = this; this.setHighlight(hlSelected); } } this.setHighlight = function(mode) { if (mode == hlNone) { this.textSpan.style.backgroundColor = ""; this.textSpan.style.color = ""; this.textSpan.style.border = ""; } else if (mode == hlGrey) { this.textSpan.style.backgroundColor = "#aaaaaa"; this.textSpan.style.color = ""; this.textSpan.style.border = ""; } else if (mode == hlSelected) { this.textSpan.style.backgroundColor = "3399cc"; this.textSpan.style.color = "white"; this.textSpan.style.border = "dotted 1px red"; } } this.setOnclick = function(proc) { this.onclick = proc; } this.setRef = function(url) { if (this.anchor) this.anchor.href = url; } this.processPMClick = function(e) { this.toggle(); // prevent this line selection, stop bubbling if (e) e.stopPropagation(); // Mozilla way if (window.event) window.event.cancelBubble = true; // IE way } this.processOnclick = function() { this.select(); if (this.onclick instanceof Function) this.onclick(); } /////////////////////////////////////////////////////////////////////////// if (iconSrc) this.icon.src = iconSrc; else { this.icon.width = 0; this.icon.height = 0; } this.icon.style.verticalAlign = "middle"; this.icon.style.position = "relative"; this.icon.style.top = "-1px"; this.icon.style.paddingRight = "2px"; if (!hrefMode) { this.textSpan.appendChild( this.textElement ); } else { this.anchor = document.createElement("a"); this.anchor.appendChild( this.textElement ); this.textSpan.appendChild( this.anchor ); } this.lineDiv.appendChild( this.icon ); this.lineDiv.appendChild( this.textSpan ); this.domEntry.appendChild( this.lineDiv ); this.lineDiv.owner = this; if (!hrefMode) this.lineDiv.onclick = new Function("this.owner.processOnclick();"); } GtkD-3.7.5/docs/candydoc/util.js000066400000000000000000000015661324604450400164200ustar00rootroot00000000000000/* This file is a part of CanDyDOC fileset. File is written by Victor Nakoryakov and placed into the public domain. This file is javascript with cross-browser utility functions. */ function getLeft(elem) { var ret = 0; while (elem.offsetParent) { ret += elem.offsetLeft; elem = elem.offsetParent; } return ret; } function getTop(elem) { var ret = 0; while (elem.offsetParent) { ret += elem.offsetTop; elem = elem.offsetParent; } return ret; } function getWindowHeight() { var ret = 0; if (typeof(window.innerHeight) == "number") ret = window.innerHeight; else if (document.documentElement && document.documentElement.clientHeight) ret = document.documentElement.clientHeight; else if (document.body && document.body.clientHeight) ret = document.body.clientHeight; return ret; } GtkD-3.7.5/dub.json000066400000000000000000000046061324604450400140340ustar00rootroot00000000000000{ "name": "gtk-d", "targetType": "none", "description": "GtkD is the Digital Mars D programing language OO wrapper for Gtk+.", "homepage": "http://gtkd.org", "license": "LGPL license with additional exceptions", "authors": [ "Frank Benoit", "Jake Day", "Jonas Kivi", "Alan Knowles", "Antonio Monteiro", "Sebastián E. Peyrott", "John Reimer", "Mike Wey", "hauptmech" ], "dependencies": { "gtk-d:sv": "*", "gtk-d:vte": "*", "gtk-d:gtkd": "*", "gtk-d:gstreamer": "*", "gtk-d:peas": "*" }, "subPackages" : [ { "name": "gtkd", "targetType": "library", "targetName": "gtkd-3", "sourcePaths": ["generated/gtkd"], "libs-posix": ["dl"], "importPaths": ["generated/gtkd"] }, { "name": "gtkdgl", "targetType": "library", "targetName": "gtkdgl-3", "sourcePaths": ["generated/gtkdgl"], "libs-posix": ["dl"], "importPaths": ["generated/gtkdgl"], "dependencies": {"gtk-d:gtkd":"*"} }, { "name": "sv", "targetType": "library", "targetName": "gtkdsv-3", "sourcePaths": ["generated/sourceview"], "libs-posix": ["dl"], "importPaths": ["generated/sourceview"], "dependencies": {"gtk-d:gtkd":"*"} }, { "name": "gstreamer", "targetType": "library", "targetName": "gstreamerd-3", "sourcePaths": ["generated/gstreamer"], "libs-posix": ["dl"], "importPaths": ["generated/gstreamer"], "dependencies": {"gtk-d:gtkd":"*"} }, { "name": "vte", "targetType": "library", "targetName": "vted-3", "sourcePaths": ["generated/vte"], "libs-posix": ["dl"], "importPaths": ["generated/vte"], "dependencies": {"gtk-d:gtkd":"*"} }, { "name": "peas", "targetType": "library", "targetName": "peasd-3", "sourcePaths": ["generated/peas"], "libs-posix": ["dl"], "importPaths": ["generated/peas"], "dependencies": {"gtk-d:gtkd":"*"} } ] } GtkD-3.7.5/generated/000077500000000000000000000000001324604450400143175ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/000077500000000000000000000000001324604450400163105ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gst/000077500000000000000000000000001324604450400171055ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gst/app/000077500000000000000000000000001324604450400176655ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gst/app/AppSink.d000066400000000000000000000662531324604450400214130ustar00rootroot00000000000000/* * 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 gst.app.AppSink; private import gobject.ObjectG; private import gobject.Signals; private import gst.app.c.functions; public import gst.app.c.types; private import gst.base.BaseSink; private import gstreamer.Caps; private import gstreamer.Sample; private import gstreamer.URIHandlerIF; private import gstreamer.URIHandlerT; private import std.algorithm; /** * Appsink is a sink plugin that supports many different methods for making * the application get a handle on the GStreamer data in a pipeline. Unlike * most GStreamer elements, Appsink provides external API functions. * * appsink can be used by linking to the gstappsink.h header file to access the * methods or by using the appsink action signals and properties. * * The normal way of retrieving samples from appsink is by using the * gst_app_sink_pull_sample() and gst_app_sink_pull_preroll() methods. * These methods block until a sample becomes available in the sink or when the * sink is shut down or reaches EOS. There are also timed variants of these * methods, gst_app_sink_try_pull_sample() and gst_app_sink_try_pull_preroll(), * which accept a timeout parameter to limit the amount of time to wait. * * Appsink will internally use a queue to collect buffers from the streaming * thread. If the application is not pulling samples fast enough, this queue * will consume a lot of memory over time. The "max-buffers" property can be * used to limit the queue size. The "drop" property controls whether the * streaming thread blocks or if older buffers are dropped when the maximum * queue size is reached. Note that blocking the streaming thread can negatively * affect real-time performance and should be avoided. * * If a blocking behaviour is not desirable, setting the "emit-signals" property * to %TRUE will make appsink emit the "new-sample" and "new-preroll" signals * when a sample can be pulled without blocking. * * The "caps" property on appsink can be used to control the formats that * appsink can receive. This property can contain non-fixed caps, the format of * the pulled samples can be obtained by getting the sample caps. * * If one of the pull-preroll or pull-sample methods return %NULL, the appsink * is stopped or in the EOS state. You can check for the EOS state with the * "eos" property or with the gst_app_sink_is_eos() method. * * The eos signal can also be used to be informed when the EOS state is reached * to avoid polling. */ public class AppSink : BaseSink, URIHandlerIF { /** the main Gtk struct */ protected GstAppSink* gstAppSink; /** Get the main Gtk struct */ public GstAppSink* getAppSinkStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstAppSink; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstAppSink; } protected override void setStruct(GObject* obj) { gstAppSink = cast(GstAppSink*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstAppSink* gstAppSink, bool ownedRef = false) { this.gstAppSink = gstAppSink; super(cast(GstBaseSink*)gstAppSink, ownedRef); } // add the URIHandler capabilities mixin URIHandlerT!(GstAppSink); /** */ public static GType getType() { return gst_app_sink_get_type(); } /** * Check if @appsink supports buffer lists. * * Returns: %TRUE if @appsink supports buffer lists. * * Since: 1.12 */ public bool getBufferListSupport() { return gst_app_sink_get_buffer_list_support(gstAppSink) != 0; } /** * Get the configured caps on @appsink. * * Returns: the #GstCaps accepted by the sink. gst_caps_unref() after usage. */ public Caps getCaps() { auto p = gst_app_sink_get_caps(gstAppSink); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Check if @appsink will drop old buffers when the maximum amount of queued * buffers is reached. * * Returns: %TRUE if @appsink is dropping old buffers when the queue is * filled. */ public bool getDrop() { return gst_app_sink_get_drop(gstAppSink) != 0; } /** * Check if appsink will emit the "new-preroll" and "new-sample" signals. * * Returns: %TRUE if @appsink is emiting the "new-preroll" and "new-sample" * signals. */ public bool getEmitSignals() { return gst_app_sink_get_emit_signals(gstAppSink) != 0; } /** * Get the maximum amount of buffers that can be queued in @appsink. * * Returns: The maximum amount of buffers that can be queued. */ public uint getMaxBuffers() { return gst_app_sink_get_max_buffers(gstAppSink); } /** * Check if @appsink will wait for all buffers to be consumed when an EOS is * received. * * Returns: %TRUE if @appsink will wait for all buffers to be consumed when an * EOS is received. */ public bool getWaitOnEos() { return gst_app_sink_get_wait_on_eos(gstAppSink) != 0; } /** * Check if @appsink is EOS, which is when no more samples can be pulled because * an EOS event was received. * * This function also returns %TRUE when the appsink is not in the PAUSED or * PLAYING state. * * Returns: %TRUE if no more samples can be pulled and the appsink is EOS. */ public bool isEos() { return gst_app_sink_is_eos(gstAppSink) != 0; } /** * Get the last preroll sample in @appsink. This was the sample that caused the * appsink to preroll in the PAUSED state. This sample can be pulled many times * and remains available to the application even after EOS. * * This function is typically used when dealing with a pipeline in the PAUSED * state. Calling this function after doing a seek will give the sample right * after the seek position. * * Note that the preroll sample will also be returned as the first sample * when calling gst_app_sink_pull_sample(). * * If an EOS event was received before any buffers, this function returns * %NULL. Use gst_app_sink_is_eos () to check for the EOS condition. * * This function blocks until a preroll sample or EOS is received or the appsink * element is set to the READY/NULL state. * * Returns: a #GstSample or NULL when the appsink is stopped or EOS. * Call gst_sample_unref() after usage. */ public Sample pullPreroll() { auto p = gst_app_sink_pull_preroll(gstAppSink); if(p is null) { return null; } return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); } /** * This function blocks until a sample or EOS becomes available or the appsink * element is set to the READY/NULL state. * * This function will only return samples when the appsink is in the PLAYING * state. All rendered buffers will be put in a queue so that the application * can pull samples at its own rate. Note that when the application does not * pull samples fast enough, the queued buffers could consume a lot of memory, * especially when dealing with raw video frames. * * If an EOS event was received before any buffers, this function returns * %NULL. Use gst_app_sink_is_eos () to check for the EOS condition. * * Returns: a #GstSample or NULL when the appsink is stopped or EOS. * Call gst_sample_unref() after usage. */ public Sample pullSample() { auto p = gst_app_sink_pull_sample(gstAppSink); if(p is null) { return null; } return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); } /** * Instruct @appsink to enable or disable buffer list support. * * For backwards-compatibility reasons applications need to opt in * to indicate that they will be able to handle buffer lists. * * Params: * enableLists = enable or disable buffer list support * * Since: 1.12 */ public void setBufferListSupport(bool enableLists) { gst_app_sink_set_buffer_list_support(gstAppSink, enableLists); } /** * Set callbacks which will be executed for each new preroll, new sample and eos. * This is an alternative to using the signals, it has lower overhead and is thus * less expensive, but also less flexible. * * If callbacks are installed, no signals will be emitted for performance * reasons. * * Params: * callbacks = the callbacks * userData = a user_data argument for the callbacks * notify = a destroy notify function */ public void setCallbacks(GstAppSinkCallbacks* callbacks, void* userData, GDestroyNotify notify) { gst_app_sink_set_callbacks(gstAppSink, callbacks, userData, notify); } /** * Set the capabilities on the appsink element. This function takes * a copy of the caps structure. After calling this method, the sink will only * accept caps that match @caps. If @caps is non-fixed, or incomplete, * you must check the caps on the samples to get the actual used caps. * * Params: * caps = caps to set */ public void setCaps(Caps caps) { gst_app_sink_set_caps(gstAppSink, (caps is null) ? null : caps.getCapsStruct()); } /** * Instruct @appsink to drop old buffers when the maximum amount of queued * buffers is reached. * * Params: * drop = the new state */ public void setDrop(bool drop) { gst_app_sink_set_drop(gstAppSink, drop); } /** * Make appsink emit the "new-preroll" and "new-sample" signals. This option is * by default disabled because signal emission is expensive and unneeded when * the application prefers to operate in pull mode. * * Params: * emit = the new state */ public void setEmitSignals(bool emit) { gst_app_sink_set_emit_signals(gstAppSink, emit); } /** * Set the maximum amount of buffers that can be queued in @appsink. After this * amount of buffers are queued in appsink, any more buffers will block upstream * elements until a sample is pulled from @appsink. * * Params: * max = the maximum number of buffers to queue */ public void setMaxBuffers(uint max) { gst_app_sink_set_max_buffers(gstAppSink, max); } /** * Instruct @appsink to wait for all buffers to be consumed when an EOS is received. * * Params: * wait = the new state */ public void setWaitOnEos(bool wait) { gst_app_sink_set_wait_on_eos(gstAppSink, wait); } /** * Get the last preroll sample in @appsink. This was the sample that caused the * appsink to preroll in the PAUSED state. This sample can be pulled many times * and remains available to the application even after EOS. * * This function is typically used when dealing with a pipeline in the PAUSED * state. Calling this function after doing a seek will give the sample right * after the seek position. * * Note that the preroll sample will also be returned as the first sample * when calling gst_app_sink_pull_sample(). * * If an EOS event was received before any buffers or the timeout expires, * this function returns %NULL. Use gst_app_sink_is_eos () to check for the EOS * condition. * * This function blocks until a preroll sample or EOS is received, the appsink * element is set to the READY/NULL state, or the timeout expires. * * Params: * timeout = the maximum amount of time to wait for the preroll sample * * Returns: a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. * Call gst_sample_unref() after usage. * * Since: 1.10 */ public Sample tryPullPreroll(GstClockTime timeout) { auto p = gst_app_sink_try_pull_preroll(gstAppSink, timeout); if(p is null) { return null; } return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); } /** * This function blocks until a sample or EOS becomes available or the appsink * element is set to the READY/NULL state or the timeout expires. * * This function will only return samples when the appsink is in the PLAYING * state. All rendered buffers will be put in a queue so that the application * can pull samples at its own rate. Note that when the application does not * pull samples fast enough, the queued buffers could consume a lot of memory, * especially when dealing with raw video frames. * * If an EOS event was received before any buffers or the timeout expires, * this function returns %NULL. Use gst_app_sink_is_eos () to check for the EOS * condition. * * Params: * timeout = the maximum amount of time to wait for a sample * * Returns: a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. * Call gst_sample_unref() after usage. * * Since: 1.10 */ public Sample tryPullSample(GstClockTime timeout) { auto p = gst_app_sink_try_pull_sample(gstAppSink, timeout); if(p is null) { return null; } return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); } protected class OnEosDelegateWrapper { void delegate(AppSink) dlg; gulong handlerId; this(void delegate(AppSink) dlg) { this.dlg = dlg; onEosListeners ~= this; } void remove(OnEosDelegateWrapper source) { foreach(index, wrapper; onEosListeners) { if (wrapper.handlerId == source.handlerId) { onEosListeners[index] = null; onEosListeners = std.algorithm.remove(onEosListeners, index); break; } } } } OnEosDelegateWrapper[] onEosListeners; /** * Signal that the end-of-stream has been reached. This signal is emitted from * the streaming thread. */ gulong addOnEos(void delegate(AppSink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnEosDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "eos", cast(GCallback)&callBackEos, cast(void*)wrapper, cast(GClosureNotify)&callBackEosDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackEos(GstAppSink* appsinkStruct, OnEosDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackEosDestroy(OnEosDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnNewPrerollDelegateWrapper { GstFlowReturn delegate(AppSink) dlg; gulong handlerId; this(GstFlowReturn delegate(AppSink) dlg) { this.dlg = dlg; onNewPrerollListeners ~= this; } void remove(OnNewPrerollDelegateWrapper source) { foreach(index, wrapper; onNewPrerollListeners) { if (wrapper.handlerId == source.handlerId) { onNewPrerollListeners[index] = null; onNewPrerollListeners = std.algorithm.remove(onNewPrerollListeners, index); break; } } } } OnNewPrerollDelegateWrapper[] onNewPrerollListeners; /** * Signal that a new preroll sample is available. * * This signal is emitted from the streaming thread and only when the * "emit-signals" property is %TRUE. * * The new preroll sample can be retrieved with the "pull-preroll" action * signal or gst_app_sink_pull_preroll() either from this signal callback * or from any other thread. * * Note that this signal is only emitted when the "emit-signals" property is * set to %TRUE, which it is not by default for performance reasons. */ gulong addOnNewPreroll(GstFlowReturn delegate(AppSink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnNewPrerollDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "new-preroll", cast(GCallback)&callBackNewPreroll, cast(void*)wrapper, cast(GClosureNotify)&callBackNewPrerollDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GstFlowReturn callBackNewPreroll(GstAppSink* appsinkStruct, OnNewPrerollDelegateWrapper wrapper) { return wrapper.dlg(wrapper.outer); } extern(C) static void callBackNewPrerollDestroy(OnNewPrerollDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnNewSampleDelegateWrapper { GstFlowReturn delegate(AppSink) dlg; gulong handlerId; this(GstFlowReturn delegate(AppSink) dlg) { this.dlg = dlg; onNewSampleListeners ~= this; } void remove(OnNewSampleDelegateWrapper source) { foreach(index, wrapper; onNewSampleListeners) { if (wrapper.handlerId == source.handlerId) { onNewSampleListeners[index] = null; onNewSampleListeners = std.algorithm.remove(onNewSampleListeners, index); break; } } } } OnNewSampleDelegateWrapper[] onNewSampleListeners; /** * Signal that a new sample is available. * * This signal is emitted from the streaming thread and only when the * "emit-signals" property is %TRUE. * * The new sample can be retrieved with the "pull-sample" action * signal or gst_app_sink_pull_sample() either from this signal callback * or from any other thread. * * Note that this signal is only emitted when the "emit-signals" property is * set to %TRUE, which it is not by default for performance reasons. */ gulong addOnNewSample(GstFlowReturn delegate(AppSink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnNewSampleDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "new-sample", cast(GCallback)&callBackNewSample, cast(void*)wrapper, cast(GClosureNotify)&callBackNewSampleDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GstFlowReturn callBackNewSample(GstAppSink* appsinkStruct, OnNewSampleDelegateWrapper wrapper) { return wrapper.dlg(wrapper.outer); } extern(C) static void callBackNewSampleDestroy(OnNewSampleDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPullPrerollDelegateWrapper { Sample delegate(AppSink) dlg; gulong handlerId; this(Sample delegate(AppSink) dlg) { this.dlg = dlg; onPullPrerollListeners ~= this; } void remove(OnPullPrerollDelegateWrapper source) { foreach(index, wrapper; onPullPrerollListeners) { if (wrapper.handlerId == source.handlerId) { onPullPrerollListeners[index] = null; onPullPrerollListeners = std.algorithm.remove(onPullPrerollListeners, index); break; } } } } OnPullPrerollDelegateWrapper[] onPullPrerollListeners; /** * Get the last preroll sample in @appsink. This was the sample that caused the * appsink to preroll in the PAUSED state. This sample can be pulled many times * and remains available to the application even after EOS. * * This function is typically used when dealing with a pipeline in the PAUSED * state. Calling this function after doing a seek will give the sample right * after the seek position. * * Note that the preroll sample will also be returned as the first sample * when calling gst_app_sink_pull_sample() or the "pull-sample" action signal. * * If an EOS event was received before any buffers, this function returns * %NULL. Use gst_app_sink_is_eos () to check for the EOS condition. * * This function blocks until a preroll sample or EOS is received or the appsink * element is set to the READY/NULL state. * * Returns: a #GstSample or NULL when the appsink is stopped or EOS. */ gulong addOnPullPreroll(Sample delegate(AppSink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPullPrerollDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "pull-preroll", cast(GCallback)&callBackPullPreroll, cast(void*)wrapper, cast(GClosureNotify)&callBackPullPrerollDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GstSample* callBackPullPreroll(GstAppSink* appsinkStruct, OnPullPrerollDelegateWrapper wrapper) { auto r = wrapper.dlg(wrapper.outer); return r.getSampleStruct(); } extern(C) static void callBackPullPrerollDestroy(OnPullPrerollDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPullSampleDelegateWrapper { Sample delegate(AppSink) dlg; gulong handlerId; this(Sample delegate(AppSink) dlg) { this.dlg = dlg; onPullSampleListeners ~= this; } void remove(OnPullSampleDelegateWrapper source) { foreach(index, wrapper; onPullSampleListeners) { if (wrapper.handlerId == source.handlerId) { onPullSampleListeners[index] = null; onPullSampleListeners = std.algorithm.remove(onPullSampleListeners, index); break; } } } } OnPullSampleDelegateWrapper[] onPullSampleListeners; /** * This function blocks until a sample or EOS becomes available or the appsink * element is set to the READY/NULL state. * * This function will only return samples when the appsink is in the PLAYING * state. All rendered samples will be put in a queue so that the application * can pull samples at its own rate. * * Note that when the application does not pull samples fast enough, the * queued samples could consume a lot of memory, especially when dealing with * raw video frames. It's possible to control the behaviour of the queue with * the "drop" and "max-buffers" properties. * * If an EOS event was received before any buffers, this function returns * %NULL. Use gst_app_sink_is_eos () to check for the EOS condition. * * Returns: a #GstSample or NULL when the appsink is stopped or EOS. */ gulong addOnPullSample(Sample delegate(AppSink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPullSampleDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "pull-sample", cast(GCallback)&callBackPullSample, cast(void*)wrapper, cast(GClosureNotify)&callBackPullSampleDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GstSample* callBackPullSample(GstAppSink* appsinkStruct, OnPullSampleDelegateWrapper wrapper) { auto r = wrapper.dlg(wrapper.outer); return r.getSampleStruct(); } extern(C) static void callBackPullSampleDestroy(OnPullSampleDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnTryPullPrerollDelegateWrapper { Sample delegate(ulong, AppSink) dlg; gulong handlerId; this(Sample delegate(ulong, AppSink) dlg) { this.dlg = dlg; onTryPullPrerollListeners ~= this; } void remove(OnTryPullPrerollDelegateWrapper source) { foreach(index, wrapper; onTryPullPrerollListeners) { if (wrapper.handlerId == source.handlerId) { onTryPullPrerollListeners[index] = null; onTryPullPrerollListeners = std.algorithm.remove(onTryPullPrerollListeners, index); break; } } } } OnTryPullPrerollDelegateWrapper[] onTryPullPrerollListeners; /** * Get the last preroll sample in @appsink. This was the sample that caused the * appsink to preroll in the PAUSED state. This sample can be pulled many times * and remains available to the application even after EOS. * * This function is typically used when dealing with a pipeline in the PAUSED * state. Calling this function after doing a seek will give the sample right * after the seek position. * * Note that the preroll sample will also be returned as the first sample * when calling gst_app_sink_pull_sample() or the "pull-sample" action signal. * * If an EOS event was received before any buffers or the timeout expires, * this function returns %NULL. Use gst_app_sink_is_eos () to check for the EOS * condition. * * This function blocks until a preroll sample or EOS is received, the appsink * element is set to the READY/NULL state, or the timeout expires. * * Params: * timeout = the maximum amount of time to wait for the preroll sample * * Returns: a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. * * Since: 1.10 */ gulong addOnTryPullPreroll(Sample delegate(ulong, AppSink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnTryPullPrerollDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "try-pull-preroll", cast(GCallback)&callBackTryPullPreroll, cast(void*)wrapper, cast(GClosureNotify)&callBackTryPullPrerollDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GstSample* callBackTryPullPreroll(GstAppSink* appsinkStruct, ulong timeout, OnTryPullPrerollDelegateWrapper wrapper) { auto r = wrapper.dlg(timeout, wrapper.outer); return r.getSampleStruct(); } extern(C) static void callBackTryPullPrerollDestroy(OnTryPullPrerollDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnTryPullSampleDelegateWrapper { Sample delegate(ulong, AppSink) dlg; gulong handlerId; this(Sample delegate(ulong, AppSink) dlg) { this.dlg = dlg; onTryPullSampleListeners ~= this; } void remove(OnTryPullSampleDelegateWrapper source) { foreach(index, wrapper; onTryPullSampleListeners) { if (wrapper.handlerId == source.handlerId) { onTryPullSampleListeners[index] = null; onTryPullSampleListeners = std.algorithm.remove(onTryPullSampleListeners, index); break; } } } } OnTryPullSampleDelegateWrapper[] onTryPullSampleListeners; /** * This function blocks until a sample or EOS becomes available or the appsink * element is set to the READY/NULL state or the timeout expires. * * This function will only return samples when the appsink is in the PLAYING * state. All rendered samples will be put in a queue so that the application * can pull samples at its own rate. * * Note that when the application does not pull samples fast enough, the * queued samples could consume a lot of memory, especially when dealing with * raw video frames. It's possible to control the behaviour of the queue with * the "drop" and "max-buffers" properties. * * If an EOS event was received before any buffers or the timeout expires, * this function returns %NULL. Use gst_app_sink_is_eos () to check * for the EOS condition. * * Params: * timeout = the maximum amount of time to wait for a sample * * Returns: a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. * * Since: 1.10 */ gulong addOnTryPullSample(Sample delegate(ulong, AppSink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnTryPullSampleDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "try-pull-sample", cast(GCallback)&callBackTryPullSample, cast(void*)wrapper, cast(GClosureNotify)&callBackTryPullSampleDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GstSample* callBackTryPullSample(GstAppSink* appsinkStruct, ulong timeout, OnTryPullSampleDelegateWrapper wrapper) { auto r = wrapper.dlg(timeout, wrapper.outer); return r.getSampleStruct(); } extern(C) static void callBackTryPullSampleDestroy(OnTryPullSampleDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gst/app/AppSrc.d000066400000000000000000000542651324604450400212360ustar00rootroot00000000000000/* * 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 gst.app.AppSrc; private import gobject.ObjectG; private import gobject.Signals; private import gst.app.c.functions; public import gst.app.c.types; private import gst.base.BaseSrc; private import gstreamer.Buffer; private import gstreamer.Caps; private import gstreamer.Sample; private import gstreamer.URIHandlerIF; private import gstreamer.URIHandlerT; private import std.algorithm; /** * The appsrc element can be used by applications to insert data into a * GStreamer pipeline. Unlike most GStreamer elements, appsrc provides * external API functions. * * appsrc can be used by linking with the libgstapp library to access the * methods directly or by using the appsrc action signals. * * Before operating appsrc, the caps property must be set to fixed caps * describing the format of the data that will be pushed with appsrc. An * exception to this is when pushing buffers with unknown caps, in which case no * caps should be set. This is typically true of file-like sources that push raw * byte buffers. If you don't want to explicitly set the caps, you can use * gst_app_src_push_sample. This method gets the caps associated with the * sample and sets them on the appsrc replacing any previously set caps (if * different from sample's caps). * * The main way of handing data to the appsrc element is by calling the * gst_app_src_push_buffer() method or by emitting the push-buffer action signal. * This will put the buffer onto a queue from which appsrc will read from in its * streaming thread. It is important to note that data transport will not happen * from the thread that performed the push-buffer call. * * The "max-bytes" property controls how much data can be queued in appsrc * before appsrc considers the queue full. A filled internal queue will always * signal the "enough-data" signal, which signals the application that it should * stop pushing data into appsrc. The "block" property will cause appsrc to * block the push-buffer method until free data becomes available again. * * When the internal queue is running out of data, the "need-data" signal is * emitted, which signals the application that it should start pushing more data * into appsrc. * * In addition to the "need-data" and "enough-data" signals, appsrc can emit the * "seek-data" signal when the "stream-mode" property is set to "seekable" or * "random-access". The signal argument will contain the new desired position in * the stream expressed in the unit set with the "format" property. After * receiving the seek-data signal, the application should push-buffers from the * new position. * * These signals allow the application to operate the appsrc in two different * ways: * * The push mode, in which the application repeatedly calls the push-buffer/push-sample * method with a new buffer/sample. Optionally, the queue size in the appsrc * can be controlled with the enough-data and need-data signals by respectively * stopping/starting the push-buffer/push-sample calls. This is a typical * mode of operation for the stream-type "stream" and "seekable". Use this * mode when implementing various network protocols or hardware devices. * * The pull mode, in which the need-data signal triggers the next push-buffer call. * This mode is typically used in the "random-access" stream-type. Use this * mode for file access or other randomly accessable sources. In this mode, a * buffer of exactly the amount of bytes given by the need-data signal should be * pushed into appsrc. * * In all modes, the size property on appsrc should contain the total stream * size in bytes. Setting this property is mandatory in the random-access mode. * For the stream and seekable modes, setting this property is optional but * recommended. * * When the application has finished pushing data into appsrc, it should call * gst_app_src_end_of_stream() or emit the end-of-stream action signal. After * this call, no more buffers can be pushed into appsrc until a flushing seek * occurs or the state of the appsrc has gone through READY. */ public class AppSrc : BaseSrc, URIHandlerIF { /** the main Gtk struct */ protected GstAppSrc* gstAppSrc; /** Get the main Gtk struct */ public GstAppSrc* getAppSrcStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstAppSrc; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstAppSrc; } protected override void setStruct(GObject* obj) { gstAppSrc = cast(GstAppSrc*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstAppSrc* gstAppSrc, bool ownedRef = false) { this.gstAppSrc = gstAppSrc; super(cast(GstBaseSrc*)gstAppSrc, ownedRef); } // add the URIHandler capabilities mixin URIHandlerT!(GstAppSrc); /** */ public static GType getType() { return gst_app_src_get_type(); } /** * Indicates to the appsrc element that the last buffer queued in the * element is the last buffer of the stream. * * Returns: #GST_FLOW_OK when the EOS was successfuly queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. */ public GstFlowReturn endOfStream() { return gst_app_src_end_of_stream(gstAppSrc); } /** * Get the configured caps on @appsrc. * * Returns: the #GstCaps produced by the source. gst_caps_unref() after usage. */ public Caps getCaps() { auto p = gst_app_src_get_caps(gstAppSrc); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Get the number of currently queued bytes inside @appsrc. * * Returns: The number of currently queued bytes. * * Since: 1.2 */ public ulong getCurrentLevelBytes() { return gst_app_src_get_current_level_bytes(gstAppSrc); } /** * Get the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is * not known. * * Returns: the duration of the stream previously set with gst_app_src_set_duration(); * * Since: 1.10 */ public GstClockTime getDuration() { return gst_app_src_get_duration(gstAppSrc); } /** * Check if appsrc will emit the "new-preroll" and "new-buffer" signals. * * Returns: %TRUE if @appsrc is emitting the "new-preroll" and "new-buffer" * signals. */ public bool getEmitSignals() { return gst_app_src_get_emit_signals(gstAppSrc) != 0; } /** * Retrieve the min and max latencies in @min and @max respectively. * * Params: * min = the min latency * max = the min latency */ public void getLatency(ulong* min, ulong* max) { gst_app_src_get_latency(gstAppSrc, min, max); } /** * Get the maximum amount of bytes that can be queued in @appsrc. * * Returns: The maximum amount of bytes that can be queued. */ public ulong getMaxBytes() { return gst_app_src_get_max_bytes(gstAppSrc); } /** * Get the size of the stream in bytes. A value of -1 means that the size is * not known. * * Returns: the size of the stream previously set with gst_app_src_set_size(); */ public long getSize() { return gst_app_src_get_size(gstAppSrc); } /** * Get the stream type. Control the stream type of @appsrc * with gst_app_src_set_stream_type(). * * Returns: the stream type. */ public GstAppStreamType getStreamType() { return gst_app_src_get_stream_type(gstAppSrc); } /** * Adds a buffer to the queue of buffers that the appsrc element will * push to its source pad. This function takes ownership of the buffer. * * When the block property is TRUE, this function can block until free * space becomes available in the queue. * * Params: * buffer = a #GstBuffer to push * * Returns: #GST_FLOW_OK when the buffer was successfuly queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. * #GST_FLOW_EOS when EOS occured. */ public GstFlowReturn pushBuffer(Buffer buffer) { return gst_app_src_push_buffer(gstAppSrc, (buffer is null) ? null : buffer.getBufferStruct()); } /** * Extract a buffer from the provided sample and adds it to the queue of * buffers that the appsrc element will push to its source pad. Any * previous caps that were set on appsrc will be replaced by the caps * associated with the sample if not equal. * * When the block property is TRUE, this function can block until free * space becomes available in the queue. * * Params: * sample = a #GstSample from which buffer and caps may be * extracted * * Returns: #GST_FLOW_OK when the buffer was successfuly queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. * #GST_FLOW_EOS when EOS occured. * * Since: 1.6 */ public GstFlowReturn pushSample(Sample sample) { return gst_app_src_push_sample(gstAppSrc, (sample is null) ? null : sample.getSampleStruct()); } /** * Set callbacks which will be executed when data is needed, enough data has * been collected or when a seek should be performed. * This is an alternative to using the signals, it has lower overhead and is thus * less expensive, but also less flexible. * * If callbacks are installed, no signals will be emitted for performance * reasons. * * Params: * callbacks = the callbacks * userData = a user_data argument for the callbacks * notify = a destroy notify function */ public void setCallbacks(GstAppSrcCallbacks* callbacks, void* userData, GDestroyNotify notify) { gst_app_src_set_callbacks(gstAppSrc, callbacks, userData, notify); } /** * Set the duration of the stream in nanoseconds. A value of GST_CLOCK_TIME_NONE means that the duration is * not known. * * Params: * duration = the duration to set * * Since: 1.10 */ public void setDuration(GstClockTime duration) { gst_app_src_set_duration(gstAppSrc, duration); } /** * Make appsrc emit the "new-preroll" and "new-buffer" signals. This option is * by default disabled because signal emission is expensive and unneeded when * the application prefers to operate in pull mode. * * Params: * emit = the new state */ public void setEmitSignals(bool emit) { gst_app_src_set_emit_signals(gstAppSrc, emit); } /** * Configure the @min and @max latency in @src. If @min is set to -1, the * default latency calculations for pseudo-live sources will be used. * * Params: * min = the min latency * max = the min latency */ public void setLatency(ulong min, ulong max) { gst_app_src_set_latency(gstAppSrc, min, max); } /** * Set the maximum amount of bytes that can be queued in @appsrc. * After the maximum amount of bytes are queued, @appsrc will emit the * "enough-data" signal. * * Params: * max = the maximum number of bytes to queue */ public void setMaxBytes(ulong max) { gst_app_src_set_max_bytes(gstAppSrc, max); } /** * Set the size of the stream in bytes. A value of -1 means that the size is * not known. * * Params: * size = the size to set */ public void setSize(long size) { gst_app_src_set_size(gstAppSrc, size); } /** * Set the stream type on @appsrc. For seekable streams, the "seek" signal must * be connected to. * * A stream_type stream * * Params: * type = the new state */ public void setStreamType(GstAppStreamType type) { gst_app_src_set_stream_type(gstAppSrc, type); } protected class OnEndOfStreamDelegateWrapper { GstFlowReturn delegate(AppSrc) dlg; gulong handlerId; this(GstFlowReturn delegate(AppSrc) dlg) { this.dlg = dlg; onEndOfStreamListeners ~= this; } void remove(OnEndOfStreamDelegateWrapper source) { foreach(index, wrapper; onEndOfStreamListeners) { if (wrapper.handlerId == source.handlerId) { onEndOfStreamListeners[index] = null; onEndOfStreamListeners = std.algorithm.remove(onEndOfStreamListeners, index); break; } } } } OnEndOfStreamDelegateWrapper[] onEndOfStreamListeners; /** * Notify @appsrc that no more buffer are available. */ gulong addOnEndOfStream(GstFlowReturn delegate(AppSrc) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnEndOfStreamDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "end-of-stream", cast(GCallback)&callBackEndOfStream, cast(void*)wrapper, cast(GClosureNotify)&callBackEndOfStreamDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GstFlowReturn callBackEndOfStream(GstAppSrc* appsrcStruct, OnEndOfStreamDelegateWrapper wrapper) { return wrapper.dlg(wrapper.outer); } extern(C) static void callBackEndOfStreamDestroy(OnEndOfStreamDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnEnoughDataDelegateWrapper { void delegate(AppSrc) dlg; gulong handlerId; this(void delegate(AppSrc) dlg) { this.dlg = dlg; onEnoughDataListeners ~= this; } void remove(OnEnoughDataDelegateWrapper source) { foreach(index, wrapper; onEnoughDataListeners) { if (wrapper.handlerId == source.handlerId) { onEnoughDataListeners[index] = null; onEnoughDataListeners = std.algorithm.remove(onEnoughDataListeners, index); break; } } } } OnEnoughDataDelegateWrapper[] onEnoughDataListeners; /** * Signal that the source has enough data. It is recommended that the * application stops calling push-buffer until the need-data signal is * emitted again to avoid excessive buffer queueing. */ gulong addOnEnoughData(void delegate(AppSrc) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnEnoughDataDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "enough-data", cast(GCallback)&callBackEnoughData, cast(void*)wrapper, cast(GClosureNotify)&callBackEnoughDataDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackEnoughData(GstAppSrc* appsrcStruct, OnEnoughDataDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackEnoughDataDestroy(OnEnoughDataDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnNeedDataDelegateWrapper { void delegate(uint, AppSrc) dlg; gulong handlerId; this(void delegate(uint, AppSrc) dlg) { this.dlg = dlg; onNeedDataListeners ~= this; } void remove(OnNeedDataDelegateWrapper source) { foreach(index, wrapper; onNeedDataListeners) { if (wrapper.handlerId == source.handlerId) { onNeedDataListeners[index] = null; onNeedDataListeners = std.algorithm.remove(onNeedDataListeners, index); break; } } } } OnNeedDataDelegateWrapper[] onNeedDataListeners; /** * Signal that the source needs more data. In the callback or from another * thread you should call push-buffer or end-of-stream. * * @length is just a hint and when it is set to -1, any number of bytes can be * pushed into @appsrc. * * You can call push-buffer multiple times until the enough-data signal is * fired. * * Params: * length = the amount of bytes needed. */ gulong addOnNeedData(void delegate(uint, AppSrc) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnNeedDataDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "need-data", cast(GCallback)&callBackNeedData, cast(void*)wrapper, cast(GClosureNotify)&callBackNeedDataDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackNeedData(GstAppSrc* appsrcStruct, uint length, OnNeedDataDelegateWrapper wrapper) { wrapper.dlg(length, wrapper.outer); } extern(C) static void callBackNeedDataDestroy(OnNeedDataDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPushBufferDelegateWrapper { GstFlowReturn delegate(Buffer, AppSrc) dlg; gulong handlerId; this(GstFlowReturn delegate(Buffer, AppSrc) dlg) { this.dlg = dlg; onPushBufferListeners ~= this; } void remove(OnPushBufferDelegateWrapper source) { foreach(index, wrapper; onPushBufferListeners) { if (wrapper.handlerId == source.handlerId) { onPushBufferListeners[index] = null; onPushBufferListeners = std.algorithm.remove(onPushBufferListeners, index); break; } } } } OnPushBufferDelegateWrapper[] onPushBufferListeners; /** * Adds a buffer to the queue of buffers that the appsrc element will * push to its source pad. This function does not take ownership of the * buffer so the buffer needs to be unreffed after calling this function. * * When the block property is TRUE, this function can block until free space * becomes available in the queue. * * Params: * buffer = a buffer to push */ gulong addOnPushBuffer(GstFlowReturn delegate(Buffer, AppSrc) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPushBufferDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "push-buffer", cast(GCallback)&callBackPushBuffer, cast(void*)wrapper, cast(GClosureNotify)&callBackPushBufferDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GstFlowReturn callBackPushBuffer(GstAppSrc* appsrcStruct, GstBuffer* buffer, OnPushBufferDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(Buffer)(buffer), wrapper.outer); } extern(C) static void callBackPushBufferDestroy(OnPushBufferDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPushSampleDelegateWrapper { GstFlowReturn delegate(Sample, AppSrc) dlg; gulong handlerId; this(GstFlowReturn delegate(Sample, AppSrc) dlg) { this.dlg = dlg; onPushSampleListeners ~= this; } void remove(OnPushSampleDelegateWrapper source) { foreach(index, wrapper; onPushSampleListeners) { if (wrapper.handlerId == source.handlerId) { onPushSampleListeners[index] = null; onPushSampleListeners = std.algorithm.remove(onPushSampleListeners, index); break; } } } } OnPushSampleDelegateWrapper[] onPushSampleListeners; /** * Extract a buffer from the provided sample and adds the extracted buffer * to the queue of buffers that the appsrc element will * push to its source pad. This function set the appsrc caps based on the caps * in the sample and reset the caps if they change. * Only the caps and the buffer of the provided sample are used and not * for example the segment in the sample. * This function does not take ownership of the * sample so the sample needs to be unreffed after calling this function. * * When the block property is TRUE, this function can block until free space * becomes available in the queue. * * Params: * sample = a sample from which extract buffer to push * * Since: 1.6 */ gulong addOnPushSample(GstFlowReturn delegate(Sample, AppSrc) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPushSampleDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "push-sample", cast(GCallback)&callBackPushSample, cast(void*)wrapper, cast(GClosureNotify)&callBackPushSampleDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GstFlowReturn callBackPushSample(GstAppSrc* appsrcStruct, GstSample* sample, OnPushSampleDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(Sample)(sample), wrapper.outer); } extern(C) static void callBackPushSampleDestroy(OnPushSampleDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnSeekDataDelegateWrapper { bool delegate(ulong, AppSrc) dlg; gulong handlerId; this(bool delegate(ulong, AppSrc) dlg) { this.dlg = dlg; onSeekDataListeners ~= this; } void remove(OnSeekDataDelegateWrapper source) { foreach(index, wrapper; onSeekDataListeners) { if (wrapper.handlerId == source.handlerId) { onSeekDataListeners[index] = null; onSeekDataListeners = std.algorithm.remove(onSeekDataListeners, index); break; } } } } OnSeekDataDelegateWrapper[] onSeekDataListeners; /** * Seek to the given offset. The next push-buffer should produce buffers from * the new @offset. * This callback is only called for seekable stream types. * * Params: * offset = the offset to seek to * * Returns: %TRUE if the seek succeeded. */ gulong addOnSeekData(bool delegate(ulong, AppSrc) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnSeekDataDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "seek-data", cast(GCallback)&callBackSeekData, cast(void*)wrapper, cast(GClosureNotify)&callBackSeekDataDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackSeekData(GstAppSrc* appsrcStruct, ulong offset, OnSeekDataDelegateWrapper wrapper) { return wrapper.dlg(offset, wrapper.outer); } extern(C) static void callBackSeekDataDestroy(OnSeekDataDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** * Set the capabilities on the appsrc element. This function takes * a copy of the caps structure. After calling this method, the source will * only produce caps that match @caps. @caps must be fixed and the caps on the * buffers must match the caps or left NULL. * * Params: * caps = caps to set */ public void appSrcSetCaps(Caps caps) { gst_app_src_set_caps(gstAppSrc, (caps is null) ? null : caps.getCapsStruct()); } } GtkD-3.7.5/generated/gstreamer/gst/app/c/000077500000000000000000000000001324604450400201075ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gst/app/c/functions.d000066400000000000000000000237261324604450400222760ustar00rootroot00000000000000/* * 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 gst.app.c.functions; import std.stdio; import gst.app.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GSTAPP = ["libgstapp-1.0-0.dll"]; else version (OSX) static immutable LIBRARY_GSTAPP = ["libgstapp-1.0.0.dylib"]; else static immutable LIBRARY_GSTAPP = ["libgstapp-1.0.so.0"]; shared static this() { // gst.app.AppSink Linker.link(gst_app_sink_get_type, "gst_app_sink_get_type", LIBRARY_GSTAPP); Linker.link(gst_app_sink_get_buffer_list_support, "gst_app_sink_get_buffer_list_support", LIBRARY_GSTAPP); Linker.link(gst_app_sink_get_caps, "gst_app_sink_get_caps", LIBRARY_GSTAPP); Linker.link(gst_app_sink_get_drop, "gst_app_sink_get_drop", LIBRARY_GSTAPP); Linker.link(gst_app_sink_get_emit_signals, "gst_app_sink_get_emit_signals", LIBRARY_GSTAPP); Linker.link(gst_app_sink_get_max_buffers, "gst_app_sink_get_max_buffers", LIBRARY_GSTAPP); Linker.link(gst_app_sink_get_wait_on_eos, "gst_app_sink_get_wait_on_eos", LIBRARY_GSTAPP); Linker.link(gst_app_sink_is_eos, "gst_app_sink_is_eos", LIBRARY_GSTAPP); Linker.link(gst_app_sink_pull_preroll, "gst_app_sink_pull_preroll", LIBRARY_GSTAPP); Linker.link(gst_app_sink_pull_sample, "gst_app_sink_pull_sample", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_buffer_list_support, "gst_app_sink_set_buffer_list_support", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_callbacks, "gst_app_sink_set_callbacks", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_caps, "gst_app_sink_set_caps", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_drop, "gst_app_sink_set_drop", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_emit_signals, "gst_app_sink_set_emit_signals", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_max_buffers, "gst_app_sink_set_max_buffers", LIBRARY_GSTAPP); Linker.link(gst_app_sink_set_wait_on_eos, "gst_app_sink_set_wait_on_eos", LIBRARY_GSTAPP); Linker.link(gst_app_sink_try_pull_preroll, "gst_app_sink_try_pull_preroll", LIBRARY_GSTAPP); Linker.link(gst_app_sink_try_pull_sample, "gst_app_sink_try_pull_sample", LIBRARY_GSTAPP); // gst.app.AppSrc Linker.link(gst_app_src_get_type, "gst_app_src_get_type", LIBRARY_GSTAPP); Linker.link(gst_app_src_end_of_stream, "gst_app_src_end_of_stream", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_caps, "gst_app_src_get_caps", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_current_level_bytes, "gst_app_src_get_current_level_bytes", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_duration, "gst_app_src_get_duration", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_emit_signals, "gst_app_src_get_emit_signals", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_latency, "gst_app_src_get_latency", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_max_bytes, "gst_app_src_get_max_bytes", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_size, "gst_app_src_get_size", LIBRARY_GSTAPP); Linker.link(gst_app_src_get_stream_type, "gst_app_src_get_stream_type", LIBRARY_GSTAPP); Linker.link(gst_app_src_push_buffer, "gst_app_src_push_buffer", LIBRARY_GSTAPP); Linker.link(gst_app_src_push_sample, "gst_app_src_push_sample", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_callbacks, "gst_app_src_set_callbacks", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_duration, "gst_app_src_set_duration", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_emit_signals, "gst_app_src_set_emit_signals", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_latency, "gst_app_src_set_latency", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_max_bytes, "gst_app_src_set_max_bytes", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_size, "gst_app_src_set_size", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_stream_type, "gst_app_src_set_stream_type", LIBRARY_GSTAPP); Linker.link(gst_app_src_set_caps, "gst_app_src_set_caps", LIBRARY_GSTAPP); } __gshared extern(C) { // gst.app.AppSink GType function() c_gst_app_sink_get_type; int function(GstAppSink* appsink) c_gst_app_sink_get_buffer_list_support; GstCaps* function(GstAppSink* appsink) c_gst_app_sink_get_caps; int function(GstAppSink* appsink) c_gst_app_sink_get_drop; int function(GstAppSink* appsink) c_gst_app_sink_get_emit_signals; uint function(GstAppSink* appsink) c_gst_app_sink_get_max_buffers; int function(GstAppSink* appsink) c_gst_app_sink_get_wait_on_eos; int function(GstAppSink* appsink) c_gst_app_sink_is_eos; GstSample* function(GstAppSink* appsink) c_gst_app_sink_pull_preroll; GstSample* function(GstAppSink* appsink) c_gst_app_sink_pull_sample; void function(GstAppSink* appsink, int enableLists) c_gst_app_sink_set_buffer_list_support; void function(GstAppSink* appsink, GstAppSinkCallbacks* callbacks, void* userData, GDestroyNotify notify) c_gst_app_sink_set_callbacks; void function(GstAppSink* appsink, GstCaps* caps) c_gst_app_sink_set_caps; void function(GstAppSink* appsink, int drop) c_gst_app_sink_set_drop; void function(GstAppSink* appsink, int emit) c_gst_app_sink_set_emit_signals; void function(GstAppSink* appsink, uint max) c_gst_app_sink_set_max_buffers; void function(GstAppSink* appsink, int wait) c_gst_app_sink_set_wait_on_eos; GstSample* function(GstAppSink* appsink, GstClockTime timeout) c_gst_app_sink_try_pull_preroll; GstSample* function(GstAppSink* appsink, GstClockTime timeout) c_gst_app_sink_try_pull_sample; // gst.app.AppSrc GType function() c_gst_app_src_get_type; GstFlowReturn function(GstAppSrc* appsrc) c_gst_app_src_end_of_stream; GstCaps* function(GstAppSrc* appsrc) c_gst_app_src_get_caps; ulong function(GstAppSrc* appsrc) c_gst_app_src_get_current_level_bytes; GstClockTime function(GstAppSrc* appsrc) c_gst_app_src_get_duration; int function(GstAppSrc* appsrc) c_gst_app_src_get_emit_signals; void function(GstAppSrc* appsrc, ulong* min, ulong* max) c_gst_app_src_get_latency; ulong function(GstAppSrc* appsrc) c_gst_app_src_get_max_bytes; long function(GstAppSrc* appsrc) c_gst_app_src_get_size; GstAppStreamType function(GstAppSrc* appsrc) c_gst_app_src_get_stream_type; GstFlowReturn function(GstAppSrc* appsrc, GstBuffer* buffer) c_gst_app_src_push_buffer; GstFlowReturn function(GstAppSrc* appsrc, GstSample* sample) c_gst_app_src_push_sample; void function(GstAppSrc* appsrc, GstAppSrcCallbacks* callbacks, void* userData, GDestroyNotify notify) c_gst_app_src_set_callbacks; void function(GstAppSrc* appsrc, GstClockTime duration) c_gst_app_src_set_duration; void function(GstAppSrc* appsrc, int emit) c_gst_app_src_set_emit_signals; void function(GstAppSrc* appsrc, ulong min, ulong max) c_gst_app_src_set_latency; void function(GstAppSrc* appsrc, ulong max) c_gst_app_src_set_max_bytes; void function(GstAppSrc* appsrc, long size) c_gst_app_src_set_size; void function(GstAppSrc* appsrc, GstAppStreamType type) c_gst_app_src_set_stream_type; void function(GstAppSrc* appsrc, GstCaps* caps) c_gst_app_src_set_caps; } // gst.app.AppSink alias c_gst_app_sink_get_type gst_app_sink_get_type; alias c_gst_app_sink_get_buffer_list_support gst_app_sink_get_buffer_list_support; alias c_gst_app_sink_get_caps gst_app_sink_get_caps; alias c_gst_app_sink_get_drop gst_app_sink_get_drop; alias c_gst_app_sink_get_emit_signals gst_app_sink_get_emit_signals; alias c_gst_app_sink_get_max_buffers gst_app_sink_get_max_buffers; alias c_gst_app_sink_get_wait_on_eos gst_app_sink_get_wait_on_eos; alias c_gst_app_sink_is_eos gst_app_sink_is_eos; alias c_gst_app_sink_pull_preroll gst_app_sink_pull_preroll; alias c_gst_app_sink_pull_sample gst_app_sink_pull_sample; alias c_gst_app_sink_set_buffer_list_support gst_app_sink_set_buffer_list_support; alias c_gst_app_sink_set_callbacks gst_app_sink_set_callbacks; alias c_gst_app_sink_set_caps gst_app_sink_set_caps; alias c_gst_app_sink_set_drop gst_app_sink_set_drop; alias c_gst_app_sink_set_emit_signals gst_app_sink_set_emit_signals; alias c_gst_app_sink_set_max_buffers gst_app_sink_set_max_buffers; alias c_gst_app_sink_set_wait_on_eos gst_app_sink_set_wait_on_eos; alias c_gst_app_sink_try_pull_preroll gst_app_sink_try_pull_preroll; alias c_gst_app_sink_try_pull_sample gst_app_sink_try_pull_sample; // gst.app.AppSrc alias c_gst_app_src_get_type gst_app_src_get_type; alias c_gst_app_src_end_of_stream gst_app_src_end_of_stream; alias c_gst_app_src_get_caps gst_app_src_get_caps; alias c_gst_app_src_get_current_level_bytes gst_app_src_get_current_level_bytes; alias c_gst_app_src_get_duration gst_app_src_get_duration; alias c_gst_app_src_get_emit_signals gst_app_src_get_emit_signals; alias c_gst_app_src_get_latency gst_app_src_get_latency; alias c_gst_app_src_get_max_bytes gst_app_src_get_max_bytes; alias c_gst_app_src_get_size gst_app_src_get_size; alias c_gst_app_src_get_stream_type gst_app_src_get_stream_type; alias c_gst_app_src_push_buffer gst_app_src_push_buffer; alias c_gst_app_src_push_sample gst_app_src_push_sample; alias c_gst_app_src_set_callbacks gst_app_src_set_callbacks; alias c_gst_app_src_set_duration gst_app_src_set_duration; alias c_gst_app_src_set_emit_signals gst_app_src_set_emit_signals; alias c_gst_app_src_set_latency gst_app_src_set_latency; alias c_gst_app_src_set_max_bytes gst_app_src_set_max_bytes; alias c_gst_app_src_set_size gst_app_src_set_size; alias c_gst_app_src_set_stream_type gst_app_src_set_stream_type; alias c_gst_app_src_set_caps gst_app_src_set_caps; GtkD-3.7.5/generated/gstreamer/gst/app/c/types.d000066400000000000000000000123761324604450400214310ustar00rootroot00000000000000/* * 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 gst.app.c.types; public import glib.c.types; public import gobject.c.types; public import gst.base.c.types; public import gstreamer.c.types; /** * The stream type. */ public enum GstAppStreamType { /** * No seeking is supported in the stream, such as a * live stream. */ STREAM = 0, /** * The stream is seekable but seeking might not * be very fast, such as data from a webserver. */ SEEKABLE = 1, /** * The stream is seekable and seeking is fast, * such as in a local file. */ RANDOM_ACCESS = 2, } alias GstAppStreamType AppStreamType; struct GstAppSink { GstBaseSink basesink; GstAppSinkPrivate* priv; void*[4] GstReserved; } /** * A set of callbacks that can be installed on the appsink with * gst_app_sink_set_callbacks(). */ struct GstAppSinkCallbacks { /** */ extern(C) void function(GstAppSink* appsink, void* userData) eos; /** */ extern(C) GstFlowReturn function(GstAppSink* appsink, void* userData) newPreroll; /** */ extern(C) GstFlowReturn function(GstAppSink* appsink, void* userData) newSample; void*[4] GstReserved; } struct GstAppSinkClass { GstBaseSinkClass basesinkClass; /** */ extern(C) void function(GstAppSink* appsink) eos; /** */ extern(C) GstFlowReturn function(GstAppSink* appsink) newPreroll; /** */ extern(C) GstFlowReturn function(GstAppSink* appsink) newSample; /** * * Params: * appsink = a #GstAppSink * Returns: a #GstSample or NULL when the appsink is stopped or EOS. * Call gst_sample_unref() after usage. */ extern(C) GstSample* function(GstAppSink* appsink) pullPreroll; /** * * Params: * appsink = a #GstAppSink * Returns: a #GstSample or NULL when the appsink is stopped or EOS. * Call gst_sample_unref() after usage. */ extern(C) GstSample* function(GstAppSink* appsink) pullSample; /** * * Params: * appsink = a #GstAppSink * timeout = the maximum amount of time to wait for the preroll sample * Returns: a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. * Call gst_sample_unref() after usage. */ extern(C) GstSample* function(GstAppSink* appsink, GstClockTime timeout) tryPullPreroll; /** * * Params: * appsink = a #GstAppSink * timeout = the maximum amount of time to wait for a sample * Returns: a #GstSample or NULL when the appsink is stopped or EOS or the timeout expires. * Call gst_sample_unref() after usage. */ extern(C) GstSample* function(GstAppSink* appsink, GstClockTime timeout) tryPullSample; void*[2] GstReserved; } struct GstAppSinkPrivate; struct GstAppSrc { GstBaseSrc basesrc; GstAppSrcPrivate* priv; void*[4] GstReserved; } /** * A set of callbacks that can be installed on the appsrc with * gst_app_src_set_callbacks(). */ struct GstAppSrcCallbacks { /** */ extern(C) void function(GstAppSrc* src, uint length, void* userData) needData; /** */ extern(C) void function(GstAppSrc* src, void* userData) enoughData; /** */ extern(C) int function(GstAppSrc* src, ulong offset, void* userData) seekData; void*[4] GstReserved; } struct GstAppSrcClass { GstBaseSrcClass basesrcClass; /** */ extern(C) void function(GstAppSrc* appsrc, uint length) needData; /** */ extern(C) void function(GstAppSrc* appsrc) enoughData; /** */ extern(C) int function(GstAppSrc* appsrc, ulong offset) seekData; /** * * Params: * appsrc = a #GstAppSrc * buffer = a #GstBuffer to push * Returns: #GST_FLOW_OK when the buffer was successfuly queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. * #GST_FLOW_EOS when EOS occured. */ extern(C) GstFlowReturn function(GstAppSrc* appsrc, GstBuffer* buffer) pushBuffer; /** * * Params: * appsrc = a #GstAppSrc * Returns: #GST_FLOW_OK when the EOS was successfuly queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. */ extern(C) GstFlowReturn function(GstAppSrc* appsrc) endOfStream; /** * * Params: * appsrc = a #GstAppSrc * sample = a #GstSample from which buffer and caps may be * extracted * Returns: #GST_FLOW_OK when the buffer was successfuly queued. * #GST_FLOW_FLUSHING when @appsrc is not PAUSED or PLAYING. * #GST_FLOW_EOS when EOS occured. */ extern(C) GstFlowReturn function(GstAppSrc* appsrc, GstSample* sample) pushSample; void*[3] GstReserved; } struct GstAppSrcPrivate; GtkD-3.7.5/generated/gstreamer/gst/base/000077500000000000000000000000001324604450400200175ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gst/base/Adapter.d000066400000000000000000000655451324604450400215630ustar00rootroot00000000000000/* * 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 gst.base.Adapter; private import glib.Bytes; private import glib.ConstructionException; private import glib.ListG; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.Buffer; private import gstreamer.BufferList; /** * This class is for elements that receive buffers in an undesired size. * While for example raw video contains one image per buffer, the same is not * true for a lot of other formats, especially those that come directly from * a file. So if you have undefined buffer sizes and require a specific size, * this object is for you. * * An adapter is created with gst_adapter_new(). It can be freed again with * g_object_unref(). * * The theory of operation is like this: All buffers received are put * into the adapter using gst_adapter_push() and the data is then read back * in chunks of the desired size using gst_adapter_map()/gst_adapter_unmap() * and/or gst_adapter_copy(). After the data has been processed, it is freed * using gst_adapter_unmap(). * * Other methods such as gst_adapter_take() and gst_adapter_take_buffer() * combine gst_adapter_map() and gst_adapter_unmap() in one method and are * potentially more convenient for some use cases. * * For example, a sink pad's chain function that needs to pass data to a library * in 512-byte chunks could be implemented like this: * |[ * static GstFlowReturn * sink_pad_chain (GstPad *pad, GstObject *parent, GstBuffer *buffer) * { * MyElement *this; * GstAdapter *adapter; * GstFlowReturn ret = GST_FLOW_OK; * * this = MY_ELEMENT (parent); * * adapter = this->adapter; * * // put buffer into adapter * gst_adapter_push (adapter, buffer); * * // while we can read out 512 bytes, process them * while (gst_adapter_available (adapter) >= 512 && ret == GST_FLOW_OK) { * const guint8 *data = gst_adapter_map (adapter, 512); * // use flowreturn as an error value * ret = my_library_foo (data); * gst_adapter_unmap (adapter); * gst_adapter_flush (adapter, 512); * } * return ret; * } * ]| * * For another example, a simple element inside GStreamer that uses #GstAdapter * is the libvisual element. * * An element using #GstAdapter in its sink pad chain function should ensure that * when the FLUSH_STOP event is received, that any queued data is cleared using * gst_adapter_clear(). Data should also be cleared or processed on EOS and * when changing state from %GST_STATE_PAUSED to %GST_STATE_READY. * * Also check the GST_BUFFER_FLAG_DISCONT flag on the buffer. Some elements might * need to clear the adapter after a discontinuity. * * The adapter will keep track of the timestamps of the buffers * that were pushed. The last seen timestamp before the current position * can be queried with gst_adapter_prev_pts(). This function can * optionally return the number of bytes between the start of the buffer that * carried the timestamp and the current adapter position. The distance is * useful when dealing with, for example, raw audio samples because it allows * you to calculate the timestamp of the current adapter position by using the * last seen timestamp and the amount of bytes since. Additionally, the * gst_adapter_prev_pts_at_offset() can be used to determine the last * seen timestamp at a particular offset in the adapter. * * The adapter will also keep track of the offset of the buffers * (#GST_BUFFER_OFFSET) that were pushed. The last seen offset before the * current position can be queried with gst_adapter_prev_offset(). This function * can optionally return the number of bytes between the start of the buffer * that carried the offset and the current adapter position. * * Additionally the adapter also keeps track of the PTS, DTS and buffer offset * at the last discontinuity, which can be retrieved with * gst_adapter_pts_at_discont(), gst_adapter_dts_at_discont() and * gst_adapter_offset_at_discont(). The number of bytes that were consumed * since then can be queried with gst_adapter_distance_from_discont(). * * A last thing to note is that while #GstAdapter is pretty optimized, * merging buffers still might be an operation that requires a malloc() and * memcpy() operation, and these operations are not the fastest. Because of * this, some functions like gst_adapter_available_fast() are provided to help * speed up such cases should you want to. To avoid repeated memory allocations, * gst_adapter_copy() can be used to copy data into a (statically allocated) * user provided buffer. * * #GstAdapter is not MT safe. All operations on an adapter must be serialized by * the caller. This is not normally a problem, however, as the normal use case * of #GstAdapter is inside one pad's chain function, in which case access is * serialized via the pad's STREAM_LOCK. * * Note that gst_adapter_push() takes ownership of the buffer passed. Use * gst_buffer_ref() before pushing it into the adapter if you still want to * access the buffer later. The adapter will never modify the data in the * buffer pushed in it. */ public class Adapter : ObjectG { /** the main Gtk struct */ protected GstAdapter* gstAdapter; /** Get the main Gtk struct */ public GstAdapter* getAdapterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstAdapter; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstAdapter; } protected override void setStruct(GObject* obj) { gstAdapter = cast(GstAdapter*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstAdapter* gstAdapter, bool ownedRef = false) { this.gstAdapter = gstAdapter; super(cast(GObject*)gstAdapter, ownedRef); } /** */ public static GType getType() { return gst_adapter_get_type(); } /** * Creates a new #GstAdapter. Free with g_object_unref(). * * Returns: a new #GstAdapter * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_adapter_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstAdapter*) p, true); } /** * Gets the maximum amount of bytes available, that is it returns the maximum * value that can be supplied to gst_adapter_map() without that function * returning %NULL. * * Returns: number of bytes available in @adapter */ public size_t available() { return gst_adapter_available(gstAdapter); } /** * Gets the maximum number of bytes that are immediately available without * requiring any expensive operations (like copying the data into a * temporary buffer). * * Returns: number of bytes that are available in @adapter without expensive * operations */ public size_t availableFast() { return gst_adapter_available_fast(gstAdapter); } /** * Removes all buffers from @adapter. */ public void clear() { gst_adapter_clear(gstAdapter); } /** * Copies @size bytes of data starting at @offset out of the buffers * contained in #GstAdapter into an array @dest provided by the caller. * * The array @dest should be large enough to contain @size bytes. * The user should check that the adapter has (@offset + @size) bytes * available before calling this function. * * Params: * dest = the memory to copy into * offset = the bytes offset in the adapter to start from */ public void copy(ubyte[] dest, size_t offset) { gst_adapter_copy(gstAdapter, dest.ptr, offset, cast(size_t)dest.length); } /** * Similar to gst_adapter_copy, but more suitable for language bindings. @size * bytes of data starting at @offset will be copied out of the buffers contained * in @adapter and into a new #GBytes structure which is returned. Depending on * the value of the @size argument an empty #GBytes structure may be returned. * * Params: * offset = the bytes offset in the adapter to start from * size = the number of bytes to copy * * Returns: A new #GBytes structure containing the copied data. * * Since: 1.4 */ public Bytes copyBytes(size_t offset, size_t size) { auto p = gst_adapter_copy_bytes(gstAdapter, offset, size); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** */ public ulong distanceFromDiscont() { return gst_adapter_distance_from_discont(gstAdapter); } /** * Get the DTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT * flag, or GST_CLOCK_TIME_NONE. * * Returns: The DTS at the last discont or GST_CLOCK_TIME_NONE. * * Since: 1.10 */ public GstClockTime dtsAtDiscont() { return gst_adapter_dts_at_discont(gstAdapter); } /** * Flushes the first @flush bytes in the @adapter. The caller must ensure that * at least this many bytes are available. * * See also: gst_adapter_map(), gst_adapter_unmap() * * Params: * flush = the number of bytes to flush */ public void flush(size_t flush) { gst_adapter_flush(gstAdapter, flush); } /** * Returns a #GstBuffer containing the first @nbytes of the @adapter, but * does not flush them from the adapter. See gst_adapter_take_buffer() * for details. * * Caller owns a reference to the returned buffer. gst_buffer_unref() after * usage. * * Free-function: gst_buffer_unref * * Params: * nbytes = the number of bytes to get * * Returns: a #GstBuffer containing the first * @nbytes of the adapter, or %NULL if @nbytes bytes are not available. * gst_buffer_unref() when no longer needed. * * Since: 1.6 */ public Buffer getBuffer(size_t nbytes) { auto p = gst_adapter_get_buffer(gstAdapter, nbytes); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Returns a #GstBuffer containing the first @nbytes of the @adapter, but * does not flush them from the adapter. See gst_adapter_take_buffer_fast() * for details. * * Caller owns a reference to the returned buffer. gst_buffer_unref() after * usage. * * Free-function: gst_buffer_unref * * Params: * nbytes = the number of bytes to get * * Returns: a #GstBuffer containing the first * @nbytes of the adapter, or %NULL if @nbytes bytes are not available. * gst_buffer_unref() when no longer needed. * * Since: 1.6 */ public Buffer getBufferFast(size_t nbytes) { auto p = gst_adapter_get_buffer_fast(gstAdapter, nbytes); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Returns a #GstBufferList of buffers containing the first @nbytes bytes of * the @adapter but does not flush them from the adapter. See * gst_adapter_take_buffer_list() for details. * * Caller owns the returned list. Call gst_buffer_list_unref() to free * the list after usage. * * Params: * nbytes = the number of bytes to get * * Returns: a #GstBufferList of buffers containing * the first @nbytes of the adapter, or %NULL if @nbytes bytes are not * available * * Since: 1.6 */ public BufferList getBufferList(size_t nbytes) { auto p = gst_adapter_get_buffer_list(gstAdapter, nbytes); if(p is null) { return null; } return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p, true); } /** * Returns a #GList of buffers containing the first @nbytes bytes of the * @adapter, but does not flush them from the adapter. See * gst_adapter_take_list() for details. * * Caller owns returned list and contained buffers. gst_buffer_unref() each * buffer in the list before freeing the list after usage. * * Params: * nbytes = the number of bytes to get * * Returns: a #GList of * buffers containing the first @nbytes of the adapter, or %NULL if @nbytes * bytes are not available * * Since: 1.6 */ public ListG getList(size_t nbytes) { auto p = gst_adapter_get_list(gstAdapter, nbytes); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Gets the first @size bytes stored in the @adapter. The returned pointer is * valid until the next function is called on the adapter. * * Note that setting the returned pointer as the data of a #GstBuffer is * incorrect for general-purpose plugins. The reason is that if a downstream * element stores the buffer so that it has access to it outside of the bounds * of its chain function, the buffer will have an invalid data pointer after * your element flushes the bytes. In that case you should use * gst_adapter_take(), which returns a freshly-allocated buffer that you can set * as #GstBuffer memory or the potentially more performant * gst_adapter_take_buffer(). * * Returns %NULL if @size bytes are not available. * * Params: * size = the number of bytes to map/peek * * Returns: a pointer to the first @size bytes of data, or %NULL */ public ubyte[] map(size_t size) { auto p = gst_adapter_map(gstAdapter, size); return cast(ubyte[])p[0 .. size]; } /** * Scan for pattern @pattern with applied mask @mask in the adapter data, * starting from offset @offset. * * The bytes in @pattern and @mask are interpreted left-to-right, regardless * of endianness. All four bytes of the pattern must be present in the * adapter for it to match, even if the first or last bytes are masked out. * * It is an error to call this function without making sure that there is * enough data (offset+size bytes) in the adapter. * * This function calls gst_adapter_masked_scan_uint32_peek() passing %NULL * for value. * * Params: * mask = mask to apply to data before matching against @pattern * pattern = pattern to match (after mask is applied) * offset = offset into the adapter data from which to start scanning, returns * the last scanned position. * size = number of bytes to scan from offset * * Returns: offset of the first match, or -1 if no match was found. * * Example: * |[ * // Assume the adapter contains 0x00 0x01 0x02 ... 0xfe 0xff * * gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x00010203, 0, 256); * // -> returns 0 * gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x00010203, 1, 255); * // -> returns -1 * gst_adapter_masked_scan_uint32 (adapter, 0xffffffff, 0x01020304, 1, 255); * // -> returns 1 * gst_adapter_masked_scan_uint32 (adapter, 0xffff, 0x0001, 0, 256); * // -> returns -1 * gst_adapter_masked_scan_uint32 (adapter, 0xffff, 0x0203, 0, 256); * // -> returns 0 * gst_adapter_masked_scan_uint32 (adapter, 0xffff0000, 0x02030000, 0, 256); * // -> returns 2 * gst_adapter_masked_scan_uint32 (adapter, 0xffff0000, 0x02030000, 0, 4); * // -> returns -1 * ]| */ public ptrdiff_t maskedScanUint32(uint mask, uint pattern, size_t offset, size_t size) { return gst_adapter_masked_scan_uint32(gstAdapter, mask, pattern, offset, size); } /** * Scan for pattern @pattern with applied mask @mask in the adapter data, * starting from offset @offset. If a match is found, the value that matched * is returned through @value, otherwise @value is left untouched. * * The bytes in @pattern and @mask are interpreted left-to-right, regardless * of endianness. All four bytes of the pattern must be present in the * adapter for it to match, even if the first or last bytes are masked out. * * It is an error to call this function without making sure that there is * enough data (offset+size bytes) in the adapter. * * Params: * mask = mask to apply to data before matching against @pattern * pattern = pattern to match (after mask is applied) * offset = offset into the adapter data from which to start scanning, returns * the last scanned position. * size = number of bytes to scan from offset * value = pointer to uint32 to return matching data * * Returns: offset of the first match, or -1 if no match was found. */ public ptrdiff_t maskedScanUint32Peek(uint mask, uint pattern, size_t offset, size_t size, out uint value) { return gst_adapter_masked_scan_uint32_peek(gstAdapter, mask, pattern, offset, size, &value); } /** * Get the offset that was on the last buffer with the GST_BUFFER_FLAG_DISCONT * flag, or GST_BUFFER_OFFSET_NONE. * * Returns: The offset at the last discont or GST_BUFFER_OFFSET_NONE. * * Since: 1.10 */ public ulong offsetAtDiscont() { return gst_adapter_offset_at_discont(gstAdapter); } /** * Get the dts that was before the current byte in the adapter. When * @distance is given, the amount of bytes between the dts and the current * position is returned. * * The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when * the adapter is first created or when it is cleared. This also means that before * the first byte with a dts is removed from the adapter, the dts * and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. * * Params: * distance = pointer to location for distance, or %NULL * * Returns: The previously seen dts. */ public GstClockTime prevDts(out ulong distance) { return gst_adapter_prev_dts(gstAdapter, &distance); } /** * Get the dts that was before the byte at offset @offset in the adapter. When * @distance is given, the amount of bytes between the dts and the current * position is returned. * * The dts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when * the adapter is first created or when it is cleared. This also means that before * the first byte with a dts is removed from the adapter, the dts * and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. * * Params: * offset = the offset in the adapter at which to get timestamp * distance = pointer to location for distance, or %NULL * * Returns: The previously seen dts at given offset. * * Since: 1.2 */ public GstClockTime prevDtsAtOffset(size_t offset, out ulong distance) { return gst_adapter_prev_dts_at_offset(gstAdapter, offset, &distance); } /** * Get the offset that was before the current byte in the adapter. When * @distance is given, the amount of bytes between the offset and the current * position is returned. * * The offset is reset to GST_BUFFER_OFFSET_NONE and the distance is set to 0 * when the adapter is first created or when it is cleared. This also means that * before the first byte with an offset is removed from the adapter, the offset * and distance returned are GST_BUFFER_OFFSET_NONE and 0 respectively. * * Params: * distance = pointer to a location for distance, or %NULL * * Returns: The previous seen offset. * * Since: 1.10 */ public ulong prevOffset(out ulong distance) { return gst_adapter_prev_offset(gstAdapter, &distance); } /** * Get the pts that was before the current byte in the adapter. When * @distance is given, the amount of bytes between the pts and the current * position is returned. * * The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when * the adapter is first created or when it is cleared. This also means that before * the first byte with a pts is removed from the adapter, the pts * and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. * * Params: * distance = pointer to location for distance, or %NULL * * Returns: The previously seen pts. */ public GstClockTime prevPts(out ulong distance) { return gst_adapter_prev_pts(gstAdapter, &distance); } /** * Get the pts that was before the byte at offset @offset in the adapter. When * @distance is given, the amount of bytes between the pts and the current * position is returned. * * The pts is reset to GST_CLOCK_TIME_NONE and the distance is set to 0 when * the adapter is first created or when it is cleared. This also means that before * the first byte with a pts is removed from the adapter, the pts * and distance returned are GST_CLOCK_TIME_NONE and 0 respectively. * * Params: * offset = the offset in the adapter at which to get timestamp * distance = pointer to location for distance, or %NULL * * Returns: The previously seen pts at given offset. * * Since: 1.2 */ public GstClockTime prevPtsAtOffset(size_t offset, out ulong distance) { return gst_adapter_prev_pts_at_offset(gstAdapter, offset, &distance); } /** * Get the PTS that was on the last buffer with the GST_BUFFER_FLAG_DISCONT * flag, or GST_CLOCK_TIME_NONE. * * Returns: The PTS at the last discont or GST_CLOCK_TIME_NONE. * * Since: 1.10 */ public GstClockTime ptsAtDiscont() { return gst_adapter_pts_at_discont(gstAdapter); } /** * Adds the data from @buf to the data stored inside @adapter and takes * ownership of the buffer. * * Params: * buf = a #GstBuffer to add to queue in the adapter */ public void push(Buffer buf) { gst_adapter_push(gstAdapter, (buf is null) ? null : buf.getBufferStruct()); } /** * Returns a freshly allocated buffer containing the first @nbytes bytes of the * @adapter. The returned bytes will be flushed from the adapter. * * Caller owns returned value. g_free after usage. * * Free-function: g_free * * Params: * nbytes = the number of bytes to take * * Returns: oven-fresh hot data, or %NULL if @nbytes bytes are not available */ public ubyte[] take(size_t nbytes) { auto p = gst_adapter_take(gstAdapter, nbytes); return cast(ubyte[])p[0 .. nbytes]; } /** * Returns a #GstBuffer containing the first @nbytes bytes of the * @adapter. The returned bytes will be flushed from the adapter. * This function is potentially more performant than * gst_adapter_take() since it can reuse the memory in pushed buffers * by subbuffering or merging. This function will always return a * buffer with a single memory region. * * Note that no assumptions should be made as to whether certain buffer * flags such as the DISCONT flag are set on the returned buffer, or not. * The caller needs to explicitly set or unset flags that should be set or * unset. * * Since 1.6 this will also copy over all GstMeta of the input buffers except * for meta with the %GST_META_FLAG_POOLED flag or with the "memory" tag. * * Caller owns a reference to the returned buffer. gst_buffer_unref() after * usage. * * Free-function: gst_buffer_unref * * Params: * nbytes = the number of bytes to take * * Returns: a #GstBuffer containing the first * @nbytes of the adapter, or %NULL if @nbytes bytes are not available. * gst_buffer_unref() when no longer needed. */ public Buffer takeBuffer(size_t nbytes) { auto p = gst_adapter_take_buffer(gstAdapter, nbytes); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Returns a #GstBuffer containing the first @nbytes of the @adapter. * The returned bytes will be flushed from the adapter. This function * is potentially more performant than gst_adapter_take_buffer() since * it can reuse the memory in pushed buffers by subbuffering or * merging. Unlike gst_adapter_take_buffer(), the returned buffer may * be composed of multiple non-contiguous #GstMemory objects, no * copies are made. * * Note that no assumptions should be made as to whether certain buffer * flags such as the DISCONT flag are set on the returned buffer, or not. * The caller needs to explicitly set or unset flags that should be set or * unset. * * This will also copy over all GstMeta of the input buffers except * for meta with the %GST_META_FLAG_POOLED flag or with the "memory" tag. * * This function can return buffer up to the return value of * gst_adapter_available() without making copies if possible. * * Caller owns a reference to the returned buffer. gst_buffer_unref() after * usage. * * Free-function: gst_buffer_unref * * Params: * nbytes = the number of bytes to take * * Returns: a #GstBuffer containing the first * @nbytes of the adapter, or %NULL if @nbytes bytes are not available. * gst_buffer_unref() when no longer needed. * * Since: 1.2 */ public Buffer takeBufferFast(size_t nbytes) { auto p = gst_adapter_take_buffer_fast(gstAdapter, nbytes); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Returns a #GstBufferList of buffers containing the first @nbytes bytes of * the @adapter. The returned bytes will be flushed from the adapter. * When the caller can deal with individual buffers, this function is more * performant because no memory should be copied. * * Caller owns the returned list. Call gst_buffer_list_unref() to free * the list after usage. * * Params: * nbytes = the number of bytes to take * * Returns: a #GstBufferList of buffers containing * the first @nbytes of the adapter, or %NULL if @nbytes bytes are not * available * * Since: 1.6 */ public BufferList takeBufferList(size_t nbytes) { auto p = gst_adapter_take_buffer_list(gstAdapter, nbytes); if(p is null) { return null; } return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p, true); } /** * Returns a #GList of buffers containing the first @nbytes bytes of the * @adapter. The returned bytes will be flushed from the adapter. * When the caller can deal with individual buffers, this function is more * performant because no memory should be copied. * * Caller owns returned list and contained buffers. gst_buffer_unref() each * buffer in the list before freeing the list after usage. * * Params: * nbytes = the number of bytes to take * * Returns: a #GList of * buffers containing the first @nbytes of the adapter, or %NULL if @nbytes * bytes are not available */ public ListG takeList(size_t nbytes) { auto p = gst_adapter_take_list(gstAdapter, nbytes); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Releases the memory obtained with the last gst_adapter_map(). */ public void unmap() { gst_adapter_unmap(gstAdapter); } } GtkD-3.7.5/generated/gstreamer/gst/base/Base.d000066400000000000000000000163571324604450400210520ustar00rootroot00000000000000/* * 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 gst.base.Base; private import glib.Str; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.Buffer; private import gstreamer.Caps; private import gstreamer.ObjectGst; private import gstreamer.Pad; /** */ public struct Base { /** * Tries to find what type of data is flowing from the given source #GstPad. * * Free-function: gst_caps_unref * * Params: * src = A source #GstPad * size = The length in bytes * * Returns: the #GstCaps corresponding to the data * stream. Returns %NULL if no #GstCaps matches the data stream. */ public static Caps typeFindHelper(Pad src, ulong size) { auto p = gst_type_find_helper((src is null) ? null : src.getPadStruct(), size); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Tries to find what type of data is contained in the given #GstBuffer, the * assumption being that the buffer represents the beginning of the stream or * file. * * All available typefinders will be called on the data in order of rank. If * a typefinding function returns a probability of %GST_TYPE_FIND_MAXIMUM, * typefinding is stopped immediately and the found caps will be returned * right away. Otherwise, all available typefind functions will the tried, * and the caps with the highest probability will be returned, or %NULL if * the content of the buffer could not be identified. * * Free-function: gst_caps_unref * * Params: * obj = object doing the typefinding, or %NULL (used for logging) * buf = a #GstBuffer with data to typefind * prob = location to store the probability of the found * caps, or %NULL * * Returns: the #GstCaps corresponding to the data, * or %NULL if no type could be found. The caller should free the caps * returned with gst_caps_unref(). */ public static Caps typeFindHelperForBuffer(ObjectGst obj, Buffer buf, out GstTypeFindProbability prob) { auto p = gst_type_find_helper_for_buffer((obj is null) ? null : obj.getObjectGstStruct(), (buf is null) ? null : buf.getBufferStruct(), &prob); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Tries to find what type of data is contained in the given @data, the * assumption being that the data represents the beginning of the stream or * file. * * All available typefinders will be called on the data in order of rank. If * a typefinding function returns a probability of %GST_TYPE_FIND_MAXIMUM, * typefinding is stopped immediately and the found caps will be returned * right away. Otherwise, all available typefind functions will the tried, * and the caps with the highest probability will be returned, or %NULL if * the content of @data could not be identified. * * Free-function: gst_caps_unref * * Params: * obj = object doing the typefinding, or %NULL (used for logging) * data = a pointer with data to typefind * prob = location to store the probability of the found * caps, or %NULL * * Returns: the #GstCaps corresponding to the data, * or %NULL if no type could be found. The caller should free the caps * returned with gst_caps_unref(). */ public static Caps typeFindHelperForData(ObjectGst obj, ubyte[] data, out GstTypeFindProbability prob) { auto p = gst_type_find_helper_for_data((obj is null) ? null : obj.getObjectGstStruct(), data.ptr, cast(size_t)data.length, &prob); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Tries to find the best #GstCaps associated with @extension. * * All available typefinders will be checked against the extension in order * of rank. The caps of the first typefinder that can handle @extension will be * returned. * * Free-function: gst_caps_unref * * Params: * obj = object doing the typefinding, or %NULL (used for logging) * extension = an extension * * Returns: the #GstCaps corresponding to * @extension, or %NULL if no type could be found. The caller should free * the caps returned with gst_caps_unref(). */ public static Caps typeFindHelperForExtension(ObjectGst obj, string extension) { auto p = gst_type_find_helper_for_extension((obj is null) ? null : obj.getObjectGstStruct(), Str.toStringz(extension)); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Utility function to do pull-based typefinding. Unlike gst_type_find_helper() * however, this function will use the specified function @func to obtain the * data needed by the typefind functions, rather than operating on a given * source pad. This is useful mostly for elements like tag demuxers which * strip off data at the beginning and/or end of a file and want to typefind * the stripped data stream before adding their own source pad (the specified * callback can then call the upstream peer pad with offsets adjusted for the * tag size, for example). * * When @extension is not %NULL, this function will first try the typefind * functions for the given extension, which might speed up the typefinding * in many cases. * * Free-function: gst_caps_unref * * Params: * obj = A #GstObject that will be passed as first argument to @func * parent = the parent of @obj or %NULL * func = A generic #GstTypeFindHelperGetRangeFunction that will * be used to access data at random offsets when doing the typefinding * size = The length in bytes * extension = extension of the media * prob = location to store the probability of the found * caps, or %NULL * * Returns: the #GstCaps corresponding to the data * stream. Returns %NULL if no #GstCaps matches the data stream. */ public static Caps typeFindHelperGetRange(ObjectGst obj, ObjectGst parent, GstTypeFindHelperGetRangeFunction func, ulong size, string extension, out GstTypeFindProbability prob) { auto p = gst_type_find_helper_get_range((obj is null) ? null : obj.getObjectGstStruct(), (parent is null) ? null : parent.getObjectGstStruct(), func, size, Str.toStringz(extension), &prob); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } } GtkD-3.7.5/generated/gstreamer/gst/base/BaseParse.d000066400000000000000000000426651324604450400220460ustar00rootroot00000000000000/* * 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 gst.base.BaseParse; private import gst.base.BaseParseFrame; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.Element; private import gstreamer.TagList; /** * This base class is for parser elements that process data and splits it * into separate audio/video/whatever frames. * * It provides for: * * * provides one sink pad and one source pad * * handles state changes * * can operate in pull mode or push mode * * handles seeking in both modes * * handles events (SEGMENT/EOS/FLUSH) * * handles queries (POSITION/DURATION/SEEKING/FORMAT/CONVERT) * * handles flushing * * The purpose of this base class is to provide the basic functionality of * a parser and share a lot of rather complex code. * * # Description of the parsing mechanism: * * ## Set-up phase * * * #GstBaseParse calls @start to inform subclass that data processing is * about to start now. * * * #GstBaseParse class calls @set_sink_caps to inform the subclass about * incoming sinkpad caps. Subclass could already set the srcpad caps * accordingly, but this might be delayed until calling * gst_base_parse_finish_frame() with a non-queued frame. * * * At least at this point subclass needs to tell the #GstBaseParse class * how big data chunks it wants to receive (min_frame_size). It can do * this with gst_base_parse_set_min_frame_size(). * * * #GstBaseParse class sets up appropriate data passing mode (pull/push) * and starts to process the data. * * ## Parsing phase * * * #GstBaseParse gathers at least min_frame_size bytes of data either * by pulling it from upstream or collecting buffers in an internal * #GstAdapter. * * * A buffer of (at least) min_frame_size bytes is passed to subclass with * @handle_frame. Subclass checks the contents and can optionally * return GST_FLOW_OK along with an amount of data to be skipped to find * a valid frame (which will result in a subsequent DISCONT). * If, otherwise, the buffer does not hold a complete frame, * @handle_frame can merely return and will be called again when additional * data is available. In push mode this amounts to an * additional input buffer (thus minimal additional latency), in pull mode * this amounts to some arbitrary reasonable buffer size increase. * Of course, gst_base_parse_set_min_frame_size() could also be used if a * very specific known amount of additional data is required. * If, however, the buffer holds a complete valid frame, it can pass * the size of this frame to gst_base_parse_finish_frame(). * If acting as a converter, it can also merely indicate consumed input data * while simultaneously providing custom output data. * Note that baseclass performs some processing (such as tracking * overall consumed data rate versus duration) for each finished frame, * but other state is only updated upon each call to @handle_frame * (such as tracking upstream input timestamp). * * Subclass is also responsible for setting the buffer metadata * (e.g. buffer timestamp and duration, or keyframe if applicable). * (although the latter can also be done by #GstBaseParse if it is * appropriately configured, see below). Frame is provided with * timestamp derived from upstream (as much as generally possible), * duration obtained from configuration (see below), and offset * if meaningful (in pull mode). * * Note that @check_valid_frame might receive any small * amount of input data when leftover data is being drained (e.g. at EOS). * * * As part of finish frame processing, * just prior to actually pushing the buffer in question, * it is passed to @pre_push_frame which gives subclass yet one * last chance to examine buffer metadata, or to send some custom (tag) * events, or to perform custom (segment) filtering. * * * During the parsing process #GstBaseParseClass will handle both srcpad * and sinkpad events. They will be passed to subclass if @event or * @src_event callbacks have been provided. * * ## Shutdown phase * * * #GstBaseParse class calls @stop to inform the subclass that data * parsing will be stopped. * * Subclass is responsible for providing pad template caps for * source and sink pads. The pads need to be named "sink" and "src". It also * needs to set the fixed caps on srcpad, when the format is ensured (e.g. * when base class calls subclass' @set_sink_caps function). * * This base class uses %GST_FORMAT_DEFAULT as a meaning of frames. So, * subclass conversion routine needs to know that conversion from * %GST_FORMAT_TIME to %GST_FORMAT_DEFAULT must return the * frame number that can be found from the given byte position. * * #GstBaseParse uses subclasses conversion methods also for seeking (or * otherwise uses its own default one, see also below). * * Subclass @start and @stop functions will be called to inform the beginning * and end of data processing. * * Things that subclass need to take care of: * * * Provide pad templates * * Fixate the source pad caps when appropriate * * Inform base class how big data chunks should be retrieved. This is * done with gst_base_parse_set_min_frame_size() function. * * Examine data chunks passed to subclass with @handle_frame and pass * proper frame(s) to gst_base_parse_finish_frame(), and setting src pad * caps and timestamps on frame. * * Provide conversion functions * * Update the duration information with gst_base_parse_set_duration() * * Optionally passthrough using gst_base_parse_set_passthrough() * * Configure various baseparse parameters using * gst_base_parse_set_average_bitrate(), gst_base_parse_set_syncable() * and gst_base_parse_set_frame_rate(). * * * In particular, if subclass is unable to determine a duration, but * parsing (or specs) yields a frames per seconds rate, then this can be * provided to #GstBaseParse to enable it to cater for * buffer time metadata (which will be taken from upstream as much as * possible). Internally keeping track of frame durations and respective * sizes that have been pushed provides #GstBaseParse with an estimated * bitrate. A default @convert (used if not overridden) will then use these * rates to perform obvious conversions. These rates are also used to * update (estimated) duration at regular frame intervals. */ public class BaseParse : Element { /** the main Gtk struct */ protected GstBaseParse* gstBaseParse; /** Get the main Gtk struct */ public GstBaseParse* getBaseParseStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBaseParse; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstBaseParse; } protected override void setStruct(GObject* obj) { gstBaseParse = cast(GstBaseParse*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstBaseParse* gstBaseParse, bool ownedRef = false) { this.gstBaseParse = gstBaseParse; super(cast(GstElement*)gstBaseParse, ownedRef); } /** */ public static GType getType() { return gst_base_parse_get_type(); } /** * Adds an entry to the index associating @offset to @ts. It is recommended * to only add keyframe entries. @force allows to bypass checks, such as * whether the stream is (upstream) seekable, another entry is already "close" * to the new entry, etc. * * Params: * offset = offset of entry * ts = timestamp associated with offset * key = whether entry refers to keyframe * force = add entry disregarding sanity checks * * Returns: #gboolean indicating whether entry was added */ public bool addIndexEntry(ulong offset, GstClockTime ts, bool key, bool force) { return gst_base_parse_add_index_entry(gstBaseParse, offset, ts, key, force) != 0; } /** * Default implementation of "convert" vmethod in #GstBaseParse class. * * Params: * srcFormat = #GstFormat describing the source format. * srcValue = Source value to be converted. * destFormat = #GstFormat defining the converted format. * destValue = Pointer where the conversion result will be put. * * Returns: %TRUE if conversion was successful. */ public bool convertDefault(GstFormat srcFormat, long srcValue, GstFormat destFormat, out long destValue) { return gst_base_parse_convert_default(gstBaseParse, srcFormat, srcValue, destFormat, &destValue) != 0; } /** * Drains the adapter until it is empty. It decreases the min_frame_size to * match the current adapter size and calls chain method until the adapter * is emptied or chain returns with error. * * Since: 1.12 */ public void drain() { gst_base_parse_drain(gstBaseParse); } /** * Collects parsed data and pushes this downstream. * Source pad caps must be set when this is called. * * If @frame's out_buffer is set, that will be used as subsequent frame data. * Otherwise, @size samples will be taken from the input and used for output, * and the output's metadata (timestamps etc) will be taken as (optionally) * set by the subclass on @frame's (input) buffer (which is otherwise * ignored for any but the above purpose/information). * * Note that the latter buffer is invalidated by this call, whereas the * caller retains ownership of @frame. * * Params: * frame = a #GstBaseParseFrame * size = consumed input data represented by frame * * Returns: a #GstFlowReturn that should be escalated to caller (of caller) */ public GstFlowReturn finishFrame(BaseParseFrame frame, int size) { return gst_base_parse_finish_frame(gstBaseParse, (frame is null) ? null : frame.getBaseParseFrameStruct(), size); } /** * Sets the parser subclass's tags and how they should be merged with any * upstream stream tags. This will override any tags previously-set * with gst_base_parse_merge_tags(). * * Note that this is provided for convenience, and the subclass is * not required to use this and can still do tag handling on its own. * * Params: * tags = a #GstTagList to merge, or NULL to unset * previously-set tags * mode = the #GstTagMergeMode to use, usually #GST_TAG_MERGE_REPLACE * * Since: 1.6 */ public void mergeTags(TagList tags, GstTagMergeMode mode) { gst_base_parse_merge_tags(gstBaseParse, (tags is null) ? null : tags.getTagListStruct(), mode); } /** * Pushes the frame's buffer downstream, sends any pending events and * does some timestamp and segment handling. Takes ownership of * frame's buffer, though caller retains ownership of @frame. * * This must be called with sinkpad STREAM_LOCK held. * * Params: * frame = a #GstBaseParseFrame * * Returns: #GstFlowReturn */ public GstFlowReturn pushFrame(BaseParseFrame frame) { return gst_base_parse_push_frame(gstBaseParse, (frame is null) ? null : frame.getBaseParseFrameStruct()); } /** * Optionally sets the average bitrate detected in media (if non-zero), * e.g. based on metadata, as it will be posted to the application. * * By default, announced average bitrate is estimated. The average bitrate * is used to estimate the total duration of the stream and to estimate * a seek position, if there's no index and the format is syncable * (see gst_base_parse_set_syncable()). * * Params: * bitrate = average bitrate in bits/second */ public void setAverageBitrate(uint bitrate) { gst_base_parse_set_average_bitrate(gstBaseParse, bitrate); } /** * Sets the duration of the currently playing media. Subclass can use this * when it is able to determine duration and/or notices a change in the media * duration. Alternatively, if @interval is non-zero (default), then stream * duration is determined based on estimated bitrate, and updated every @interval * frames. * * Params: * fmt = #GstFormat. * duration = duration value. * interval = how often to update the duration estimate based on bitrate, or 0. */ public void setDuration(GstFormat fmt, long duration, int interval) { gst_base_parse_set_duration(gstBaseParse, fmt, duration, interval); } /** * If frames per second is configured, parser can take care of buffer duration * and timestamping. When performing segment clipping, or seeking to a specific * location, a corresponding decoder might need an initial @lead_in and a * following @lead_out number of frames to ensure the desired segment is * entirely filled upon decoding. * * Params: * fpsNum = frames per second (numerator). * fpsDen = frames per second (denominator). * leadIn = frames needed before a segment for subsequent decode * leadOut = frames needed after a segment */ public void setFrameRate(uint fpsNum, uint fpsDen, uint leadIn, uint leadOut) { gst_base_parse_set_frame_rate(gstBaseParse, fpsNum, fpsDen, leadIn, leadOut); } /** * Set if frames carry timing information which the subclass can (generally) * parse and provide. In particular, intrinsic (rather than estimated) time * can be obtained following a seek. * * Params: * hasTiming = whether frames carry timing information */ public void setHasTimingInfo(bool hasTiming) { gst_base_parse_set_has_timing_info(gstBaseParse, hasTiming); } /** * By default, the base class might try to infer PTS from DTS and vice * versa. While this is generally correct for audio data, it may not * be otherwise. Sub-classes implementing such formats should disable * timestamp inferring. * * Params: * inferTs = %TRUE if parser should infer DTS/PTS from each other */ public void setInferTs(bool inferTs) { gst_base_parse_set_infer_ts(gstBaseParse, inferTs); } /** * Sets the minimum and maximum (which may likely be equal) latency introduced * by the parsing process. If there is such a latency, which depends on the * particular parsing of the format, it typically corresponds to 1 frame duration. * * Params: * minLatency = minimum parse latency * maxLatency = maximum parse latency */ public void setLatency(GstClockTime minLatency, GstClockTime maxLatency) { gst_base_parse_set_latency(gstBaseParse, minLatency, maxLatency); } /** * Subclass can use this function to tell the base class that it needs to * give at least #min_size buffers. * * Params: * minSize = Minimum size of the data that this base class should give to * subclass. */ public void setMinFrameSize(uint minSize) { gst_base_parse_set_min_frame_size(gstBaseParse, minSize); } /** * Set if the nature of the format or configuration does not allow (much) * parsing, and the parser should operate in passthrough mode (which only * applies when operating in push mode). That is, incoming buffers are * pushed through unmodified, i.e. no @check_valid_frame or @parse_frame * callbacks will be invoked, but @pre_push_frame will still be invoked, * so subclass can perform as much or as little is appropriate for * passthrough semantics in @pre_push_frame. * * Params: * passthrough = %TRUE if parser should run in passthrough mode */ public void setPassthrough(bool passthrough) { gst_base_parse_set_passthrough(gstBaseParse, passthrough); } /** * By default, the base class will guess PTS timestamps using a simple * interpolation (previous timestamp + duration), which is incorrect for * data streams with reordering, where PTS can go backward. Sub-classes * implementing such formats should disable PTS interpolation. * * Params: * ptsInterpolate = %TRUE if parser should interpolate PTS timestamps */ public void setPtsInterpolation(bool ptsInterpolate) { gst_base_parse_set_pts_interpolation(gstBaseParse, ptsInterpolate); } /** * Set if frame starts can be identified. This is set by default and * determines whether seeking based on bitrate averages * is possible for a format/stream. * * Params: * syncable = set if frame starts can be identified */ public void setSyncable(bool syncable) { gst_base_parse_set_syncable(gstBaseParse, syncable); } /** * This function should only be called from a @handle_frame implementation. * * #GstBaseParse creates initial timestamps for frames by using the last * timestamp seen in the stream before the frame starts. In certain * cases, the correct timestamps will occur in the stream after the * start of the frame, but before the start of the actual picture data. * This function can be used to set the timestamps based on the offset * into the frame data that the picture starts. * * Params: * offset = offset into current buffer * * Since: 1.2 */ public void setTsAtOffset(size_t offset) { gst_base_parse_set_ts_at_offset(gstBaseParse, offset); } } GtkD-3.7.5/generated/gstreamer/gst/base/BaseParseFrame.d000066400000000000000000000104601324604450400230050ustar00rootroot00000000000000/* * 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 gst.base.BaseParseFrame; private import glib.ConstructionException; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.Buffer; private import gtkd.Loader; /** * Frame (context) data passed to each frame parsing virtual methods. In * addition to providing the data to be checked for a valid frame or an already * identified frame, it conveys additional metadata or control information * from and to the subclass w.r.t. the particular frame in question (rather * than global parameters). Some of these may apply to each parsing stage, others * only to some a particular one. These parameters are effectively zeroed at start * of each frame's processing, i.e. parsing virtual method invocation sequence. */ public class BaseParseFrame { /** the main Gtk struct */ protected GstBaseParseFrame* gstBaseParseFrame; protected bool ownedRef; /** Get the main Gtk struct */ public GstBaseParseFrame* getBaseParseFrameStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBaseParseFrame; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstBaseParseFrame; } /** * Sets our main struct and passes it to the parent class. */ public this (GstBaseParseFrame* gstBaseParseFrame, bool ownedRef = false) { this.gstBaseParseFrame = gstBaseParseFrame; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTBASE) && ownedRef ) gst_base_parse_frame_free(gstBaseParseFrame); } /** */ public static GType getType() { return gst_base_parse_frame_get_type(); } /** * Allocates a new #GstBaseParseFrame. This function is mainly for bindings, * elements written in C should usually allocate the frame on the stack and * then use gst_base_parse_frame_init() to initialise it. * * Params: * buffer = a #GstBuffer * flags = the flags * overhead = number of bytes in this frame which should be counted as * metadata overhead, ie. not used to calculate the average bitrate. * Set to -1 to mark the entire frame as metadata. If in doubt, set to 0. * * Returns: a newly-allocated #GstBaseParseFrame. Free with * gst_base_parse_frame_free() when no longer needed. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Buffer buffer, GstBaseParseFrameFlags flags, int overhead) { auto p = gst_base_parse_frame_new((buffer is null) ? null : buffer.getBufferStruct(), flags, overhead); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstBaseParseFrame*) p); } /** */ public BaseParseFrame copy() { auto p = gst_base_parse_frame_copy(gstBaseParseFrame); if(p is null) { return null; } return ObjectG.getDObject!(BaseParseFrame)(cast(GstBaseParseFrame*) p, true); } /** */ public void free() { gst_base_parse_frame_free(gstBaseParseFrame); ownedRef = false; } /** * Sets a #GstBaseParseFrame to initial state. Currently this means * all public fields are zero-ed and a private flag is set to make * sure gst_base_parse_frame_free() only frees the contents but not * the actual frame. Use this function to initialise a #GstBaseParseFrame * allocated on the stack. */ public void init() { gst_base_parse_frame_init(gstBaseParseFrame); } } GtkD-3.7.5/generated/gstreamer/gst/base/BaseSink.d000066400000000000000000000512001324604450400216610ustar00rootroot00000000000000/* * 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 gst.base.BaseSink; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.Element; private import gstreamer.MiniObject; private import gstreamer.Sample; /** * #GstBaseSink is the base class for sink elements in GStreamer, such as * xvimagesink or filesink. It is a layer on top of #GstElement that provides a * simplified interface to plugin writers. #GstBaseSink handles many details * for you, for example: preroll, clock synchronization, state changes, * activation in push or pull mode, and queries. * * In most cases, when writing sink elements, there is no need to implement * class methods from #GstElement or to set functions on pads, because the * #GstBaseSink infrastructure should be sufficient. * * #GstBaseSink provides support for exactly one sink pad, which should be * named "sink". A sink implementation (subclass of #GstBaseSink) should * install a pad template in its class_init function, like so: * |[ * static void * my_element_class_init (GstMyElementClass *klass) * { * GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); * * // sinktemplate should be a #GstStaticPadTemplate with direction * // %GST_PAD_SINK and name "sink" * gst_element_class_add_static_pad_template (gstelement_class, &sinktemplate); * * gst_element_class_set_static_metadata (gstelement_class, * "Sink name", * "Sink", * "My Sink element", * "The author "); * } * ]| * * #GstBaseSink will handle the prerolling correctly. This means that it will * return %GST_STATE_CHANGE_ASYNC from a state change to PAUSED until the first * buffer arrives in this element. The base class will call the * #GstBaseSinkClass.preroll() vmethod with this preroll buffer and will then * commit the state change to the next asynchronously pending state. * * When the element is set to PLAYING, #GstBaseSink will synchronise on the * clock using the times returned from #GstBaseSinkClass.get_times(). If this * function returns %GST_CLOCK_TIME_NONE for the start time, no synchronisation * will be done. Synchronisation can be disabled entirely by setting the object * #GstBaseSink:sync property to %FALSE. * * After synchronisation the virtual method #GstBaseSinkClass.render() will be * called. Subclasses should minimally implement this method. * * Subclasses that synchronise on the clock in the #GstBaseSinkClass.render() * method are supported as well. These classes typically receive a buffer in * the render method and can then potentially block on the clock while * rendering. A typical example is an audiosink. * These subclasses can use gst_base_sink_wait_preroll() to perform the * blocking wait. * * Upon receiving the EOS event in the PLAYING state, #GstBaseSink will wait * for the clock to reach the time indicated by the stop time of the last * #GstBaseSinkClass.get_times() call before posting an EOS message. When the * element receives EOS in PAUSED, preroll completes, the event is queued and an * EOS message is posted when going to PLAYING. * * #GstBaseSink will internally use the %GST_EVENT_SEGMENT events to schedule * synchronisation and clipping of buffers. Buffers that fall completely outside * of the current segment are dropped. Buffers that fall partially in the * segment are rendered (and prerolled). Subclasses should do any subbuffer * clipping themselves when needed. * * #GstBaseSink will by default report the current playback position in * %GST_FORMAT_TIME based on the current clock time and segment information. * If no clock has been set on the element, the query will be forwarded * upstream. * * The #GstBaseSinkClass.set_caps() function will be called when the subclass * should configure itself to process a specific media type. * * The #GstBaseSinkClass.start() and #GstBaseSinkClass.stop() virtual methods * will be called when resources should be allocated. Any * #GstBaseSinkClass.preroll(), #GstBaseSinkClass.render() and * #GstBaseSinkClass.set_caps() function will be called between the * #GstBaseSinkClass.start() and #GstBaseSinkClass.stop() calls. * * The #GstBaseSinkClass.event() virtual method will be called when an event is * received by #GstBaseSink. Normally this method should only be overridden by * very specific elements (such as file sinks) which need to handle the * newsegment event specially. * * The #GstBaseSinkClass.unlock() method is called when the elements should * unblock any blocking operations they perform in the * #GstBaseSinkClass.render() method. This is mostly useful when the * #GstBaseSinkClass.render() method performs a blocking write on a file * descriptor, for example. * * The #GstBaseSink:max-lateness property affects how the sink deals with * buffers that arrive too late in the sink. A buffer arrives too late in the * sink when the presentation time (as a combination of the last segment, buffer * timestamp and element base_time) plus the duration is before the current * time of the clock. * If the frame is later than max-lateness, the sink will drop the buffer * without calling the render method. * This feature is disabled if sync is disabled, the * #GstBaseSinkClass.get_times() method does not return a valid start time or * max-lateness is set to -1 (the default). * Subclasses can use gst_base_sink_set_max_lateness() to configure the * max-lateness value. * * The #GstBaseSink:qos property will enable the quality-of-service features of * the basesink which gather statistics about the real-time performance of the * clock synchronisation. For each buffer received in the sink, statistics are * gathered and a QOS event is sent upstream with these numbers. This * information can then be used by upstream elements to reduce their processing * rate, for example. * * The #GstBaseSink:async property can be used to instruct the sink to never * perform an ASYNC state change. This feature is mostly usable when dealing * with non-synchronized streams or sparse streams. */ public class BaseSink : Element { /** the main Gtk struct */ protected GstBaseSink* gstBaseSink; /** Get the main Gtk struct */ public GstBaseSink* getBaseSinkStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBaseSink; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstBaseSink; } protected override void setStruct(GObject* obj) { gstBaseSink = cast(GstBaseSink*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstBaseSink* gstBaseSink, bool ownedRef = false) { this.gstBaseSink = gstBaseSink; super(cast(GstElement*)gstBaseSink, ownedRef); } /** */ public static GType getType() { return gst_base_sink_get_type(); } /** * If the @sink spawns its own thread for pulling buffers from upstream it * should call this method after it has pulled a buffer. If the element needed * to preroll, this function will perform the preroll and will then block * until the element state is changed. * * This function should be called with the PREROLL_LOCK held. * * Params: * obj = the mini object that caused the preroll * * Returns: %GST_FLOW_OK if the preroll completed and processing can * continue. Any other return value should be returned from the render vmethod. */ public GstFlowReturn doPreroll(MiniObject obj) { return gst_base_sink_do_preroll(gstBaseSink, (obj is null) ? null : obj.getMiniObjectStruct()); } /** * Get the number of bytes that the sink will pull when it is operating in pull * mode. * * Returns: the number of bytes @sink will pull in pull mode. */ public uint getBlocksize() { return gst_base_sink_get_blocksize(gstBaseSink); } /** * Checks if @sink is currently configured to drop buffers which are outside * the current segment * * Returns: %TRUE if the sink is configured to drop buffers outside the * current segment. * * Since: 1.12 */ public bool getDropOutOfSegment() { return gst_base_sink_get_drop_out_of_segment(gstBaseSink) != 0; } /** * Get the last sample that arrived in the sink and was used for preroll or for * rendering. This property can be used to generate thumbnails. * * The #GstCaps on the sample can be used to determine the type of the buffer. * * Free-function: gst_sample_unref * * Returns: a #GstSample. gst_sample_unref() after * usage. This function returns %NULL when no buffer has arrived in the * sink yet or when the sink is not in PAUSED or PLAYING. */ public Sample getLastSample() { auto p = gst_base_sink_get_last_sample(gstBaseSink); if(p is null) { return null; } return ObjectG.getDObject!(Sample)(cast(GstSample*) p, true); } /** * Get the currently configured latency. * * Returns: The configured latency. */ public GstClockTime getLatency() { return gst_base_sink_get_latency(gstBaseSink); } /** * Get the maximum amount of bits per second that the sink will render. * * Returns: the maximum number of bits per second @sink will render. * * Since: 1.2 */ public ulong getMaxBitrate() { return gst_base_sink_get_max_bitrate(gstBaseSink); } /** * Gets the max lateness value. See gst_base_sink_set_max_lateness() for * more details. * * Returns: The maximum time in nanoseconds that a buffer can be late * before it is dropped and not rendered. A value of -1 means an * unlimited time. */ public long getMaxLateness() { return gst_base_sink_get_max_lateness(gstBaseSink); } /** * Get the render delay of @sink. see gst_base_sink_set_render_delay() for more * information about the render delay. * * Returns: the render delay of @sink. */ public GstClockTime getRenderDelay() { return gst_base_sink_get_render_delay(gstBaseSink); } /** * Checks if @sink is currently configured to synchronize against the * clock. * * Returns: %TRUE if the sink is configured to synchronize against the clock. */ public bool getSync() { return gst_base_sink_get_sync(gstBaseSink) != 0; } /** * Get the time that will be inserted between frames to control the * maximum buffers per second. * * Returns: the number of nanoseconds @sink will put between frames. */ public ulong getThrottleTime() { return gst_base_sink_get_throttle_time(gstBaseSink); } /** * Get the synchronisation offset of @sink. * * Returns: The synchronisation offset. */ public GstClockTimeDiff getTsOffset() { return gst_base_sink_get_ts_offset(gstBaseSink); } /** * Checks if @sink is currently configured to perform asynchronous state * changes to PAUSED. * * Returns: %TRUE if the sink is configured to perform asynchronous state * changes. */ public bool isAsyncEnabled() { return gst_base_sink_is_async_enabled(gstBaseSink) != 0; } /** * Checks if @sink is currently configured to store the last received sample in * the last-sample property. * * Returns: %TRUE if the sink is configured to store the last received sample. */ public bool isLastSampleEnabled() { return gst_base_sink_is_last_sample_enabled(gstBaseSink) != 0; } /** * Checks if @sink is currently configured to send Quality-of-Service events * upstream. * * Returns: %TRUE if the sink is configured to perform Quality-of-Service. */ public bool isQosEnabled() { return gst_base_sink_is_qos_enabled(gstBaseSink) != 0; } /** * Query the sink for the latency parameters. The latency will be queried from * the upstream elements. @live will be %TRUE if @sink is configured to * synchronize against the clock. @upstream_live will be %TRUE if an upstream * element is live. * * If both @live and @upstream_live are %TRUE, the sink will want to compensate * for the latency introduced by the upstream elements by setting the * @min_latency to a strictly positive value. * * This function is mostly used by subclasses. * * Params: * live = if the sink is live * upstreamLive = if an upstream element is live * minLatency = the min latency of the upstream elements * maxLatency = the max latency of the upstream elements * * Returns: %TRUE if the query succeeded. */ public bool queryLatency(out bool live, out bool upstreamLive, out GstClockTime minLatency, out GstClockTime maxLatency) { int outlive; int outupstreamLive; auto p = gst_base_sink_query_latency(gstBaseSink, &outlive, &outupstreamLive, &minLatency, &maxLatency) != 0; live = (outlive == 1); upstreamLive = (outupstreamLive == 1); return p; } /** * Configures @sink to perform all state changes asynchronously. When async is * disabled, the sink will immediately go to PAUSED instead of waiting for a * preroll buffer. This feature is useful if the sink does not synchronize * against the clock or when it is dealing with sparse streams. * * Params: * enabled = the new async value. */ public void setAsyncEnabled(bool enabled) { gst_base_sink_set_async_enabled(gstBaseSink, enabled); } /** * Set the number of bytes that the sink will pull when it is operating in pull * mode. * * Params: * blocksize = the blocksize in bytes */ public void setBlocksize(uint blocksize) { gst_base_sink_set_blocksize(gstBaseSink, blocksize); } /** * Configure @sink to drop buffers which are outside the current segment * * Params: * dropOutOfSegment = drop buffers outside the segment * * Since: 1.12 */ public void setDropOutOfSegment(bool dropOutOfSegment) { gst_base_sink_set_drop_out_of_segment(gstBaseSink, dropOutOfSegment); } /** * Configures @sink to store the last received sample in the last-sample * property. * * Params: * enabled = the new enable-last-sample value. */ public void setLastSampleEnabled(bool enabled) { gst_base_sink_set_last_sample_enabled(gstBaseSink, enabled); } /** * Set the maximum amount of bits per second that the sink will render. * * Params: * maxBitrate = the max_bitrate in bits per second * * Since: 1.2 */ public void setMaxBitrate(ulong maxBitrate) { gst_base_sink_set_max_bitrate(gstBaseSink, maxBitrate); } /** * Sets the new max lateness value to @max_lateness. This value is * used to decide if a buffer should be dropped or not based on the * buffer timestamp and the current clock time. A value of -1 means * an unlimited time. * * Params: * maxLateness = the new max lateness value. */ public void setMaxLateness(long maxLateness) { gst_base_sink_set_max_lateness(gstBaseSink, maxLateness); } /** * Configures @sink to send Quality-of-Service events upstream. * * Params: * enabled = the new qos value. */ public void setQosEnabled(bool enabled) { gst_base_sink_set_qos_enabled(gstBaseSink, enabled); } /** * Set the render delay in @sink to @delay. The render delay is the time * between actual rendering of a buffer and its synchronisation time. Some * devices might delay media rendering which can be compensated for with this * function. * * After calling this function, this sink will report additional latency and * other sinks will adjust their latency to delay the rendering of their media. * * This function is usually called by subclasses. * * Params: * delay = the new delay */ public void setRenderDelay(GstClockTime delay) { gst_base_sink_set_render_delay(gstBaseSink, delay); } /** * Configures @sink to synchronize on the clock or not. When * @sync is %FALSE, incoming samples will be played as fast as * possible. If @sync is %TRUE, the timestamps of the incoming * buffers will be used to schedule the exact render time of its * contents. * * Params: * sync = the new sync value. */ public void setSync(bool sync) { gst_base_sink_set_sync(gstBaseSink, sync); } /** * Set the time that will be inserted between rendered buffers. This * can be used to control the maximum buffers per second that the sink * will render. * * Params: * throttle = the throttle time in nanoseconds */ public void setThrottleTime(ulong throttle) { gst_base_sink_set_throttle_time(gstBaseSink, throttle); } /** * Adjust the synchronisation of @sink with @offset. A negative value will * render buffers earlier than their timestamp. A positive value will delay * rendering. This function can be used to fix playback of badly timestamped * buffers. * * Params: * offset = the new offset */ public void setTsOffset(GstClockTimeDiff offset) { gst_base_sink_set_ts_offset(gstBaseSink, offset); } /** * This function will wait for preroll to complete and will then block until @time * is reached. It is usually called by subclasses that use their own internal * synchronisation but want to let some synchronization (like EOS) be handled * by the base class. * * This function should only be called with the PREROLL_LOCK held (like when * receiving an EOS event in the ::event vmethod or when handling buffers in * ::render). * * The @time argument should be the running_time of when the timeout should happen * and will be adjusted with any latency and offset configured in the sink. * * Params: * time = the running_time to be reached * jitter = the jitter to be filled with time diff, or %NULL * * Returns: #GstFlowReturn */ public GstFlowReturn wait(GstClockTime time, out GstClockTimeDiff jitter) { return gst_base_sink_wait(gstBaseSink, time, &jitter); } /** * This function will block until @time is reached. It is usually called by * subclasses that use their own internal synchronisation. * * If @time is not valid, no synchronisation is done and %GST_CLOCK_BADTIME is * returned. Likewise, if synchronisation is disabled in the element or there * is no clock, no synchronisation is done and %GST_CLOCK_BADTIME is returned. * * This function should only be called with the PREROLL_LOCK held, like when * receiving an EOS event in the #GstBaseSinkClass.event() vmethod or when * receiving a buffer in * the #GstBaseSinkClass.render() vmethod. * * The @time argument should be the running_time of when this method should * return and is not adjusted with any latency or offset configured in the * sink. * * Params: * time = the running_time to be reached * jitter = the jitter to be filled with time diff, or %NULL * * Returns: #GstClockReturn */ public GstClockReturn waitClock(GstClockTime time, out GstClockTimeDiff jitter) { return gst_base_sink_wait_clock(gstBaseSink, time, &jitter); } /** * If the #GstBaseSinkClass.render() method performs its own synchronisation * against the clock it must unblock when going from PLAYING to the PAUSED state * and call this method before continuing to render the remaining data. * * If the #GstBaseSinkClass.render() method can block on something else than * the clock, it must also be ready to unblock immediately on * the #GstBaseSinkClass.unlock() method and cause the * #GstBaseSinkClass.render() method to immediately call this function. * In this case, the subclass must be prepared to continue rendering where it * left off if this function returns %GST_FLOW_OK. * * This function will block until a state change to PLAYING happens (in which * case this function returns %GST_FLOW_OK) or the processing must be stopped due * to a state change to READY or a FLUSH event (in which case this function * returns %GST_FLOW_FLUSHING). * * This function should only be called with the PREROLL_LOCK held, like in the * render function. * * Returns: %GST_FLOW_OK if the preroll completed and processing can * continue. Any other return value should be returned from the render vmethod. */ public GstFlowReturn waitPreroll() { return gst_base_sink_wait_preroll(gstBaseSink); } } GtkD-3.7.5/generated/gstreamer/gst/base/BaseSrc.d000066400000000000000000000365331324604450400215200ustar00rootroot00000000000000/* * 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 gst.base.BaseSrc; private import glib.MemorySlice; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.AllocationParams; private import gstreamer.Allocator; private import gstreamer.BufferPool; private import gstreamer.Caps; private import gstreamer.Element; /** * This is a generic base class for source elements. The following * types of sources are supported: * * * random access sources like files * * seekable sources * * live sources * * The source can be configured to operate in any #GstFormat with the * gst_base_src_set_format() method. The currently set format determines * the format of the internal #GstSegment and any %GST_EVENT_SEGMENT * events. The default format for #GstBaseSrc is %GST_FORMAT_BYTES. * * #GstBaseSrc always supports push mode scheduling. If the following * conditions are met, it also supports pull mode scheduling: * * * The format is set to %GST_FORMAT_BYTES (default). * * #GstBaseSrcClass.is_seekable() returns %TRUE. * * If all the conditions are met for operating in pull mode, #GstBaseSrc is * automatically seekable in push mode as well. The following conditions must * be met to make the element seekable in push mode when the format is not * %GST_FORMAT_BYTES: * * * #GstBaseSrcClass.is_seekable() returns %TRUE. * * #GstBaseSrcClass.query() can convert all supported seek formats to the * internal format as set with gst_base_src_set_format(). * * #GstBaseSrcClass.do_seek() is implemented, performs the seek and returns * %TRUE. * * When the element does not meet the requirements to operate in pull mode, the * offset and length in the #GstBaseSrcClass.create() method should be ignored. * It is recommended to subclass #GstPushSrc instead, in this situation. If the * element can operate in pull mode but only with specific offsets and * lengths, it is allowed to generate an error when the wrong values are passed * to the #GstBaseSrcClass.create() function. * * #GstBaseSrc has support for live sources. Live sources are sources that when * paused discard data, such as audio or video capture devices. A typical live * source also produces data at a fixed rate and thus provides a clock to publish * this rate. * Use gst_base_src_set_live() to activate the live source mode. * * A live source does not produce data in the PAUSED state. This means that the * #GstBaseSrcClass.create() method will not be called in PAUSED but only in * PLAYING. To signal the pipeline that the element will not produce data, the * return value from the READY to PAUSED state will be * %GST_STATE_CHANGE_NO_PREROLL. * * A typical live source will timestamp the buffers it creates with the * current running time of the pipeline. This is one reason why a live source * can only produce data in the PLAYING state, when the clock is actually * distributed and running. * * Live sources that synchronize and block on the clock (an audio source, for * example) can use gst_base_src_wait_playing() when the * #GstBaseSrcClass.create() function was interrupted by a state change to * PAUSED. * * The #GstBaseSrcClass.get_times() method can be used to implement pseudo-live * sources. It only makes sense to implement the #GstBaseSrcClass.get_times() * function if the source is a live source. The #GstBaseSrcClass.get_times() * function should return timestamps starting from 0, as if it were a non-live * source. The base class will make sure that the timestamps are transformed * into the current running_time. The base source will then wait for the * calculated running_time before pushing out the buffer. * * For live sources, the base class will by default report a latency of 0. * For pseudo live sources, the base class will by default measure the difference * between the first buffer timestamp and the start time of get_times and will * report this value as the latency. * Subclasses should override the query function when this behaviour is not * acceptable. * * There is only support in #GstBaseSrc for exactly one source pad, which * should be named "src". A source implementation (subclass of #GstBaseSrc) * should install a pad template in its class_init function, like so: * |[ * static void * my_element_class_init (GstMyElementClass *klass) * { * GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); * // srctemplate should be a #GstStaticPadTemplate with direction * // %GST_PAD_SRC and name "src" * gst_element_class_add_static_pad_template (gstelement_class, &srctemplate); * * gst_element_class_set_static_metadata (gstelement_class, * "Source name", * "Source", * "My Source element", * "The author "); * } * ]| * * ## Controlled shutdown of live sources in applications * * Applications that record from a live source may want to stop recording * in a controlled way, so that the recording is stopped, but the data * already in the pipeline is processed to the end (remember that many live * sources would go on recording forever otherwise). For that to happen the * application needs to make the source stop recording and send an EOS * event down the pipeline. The application would then wait for an * EOS message posted on the pipeline's bus to know when all data has * been processed and the pipeline can safely be stopped. * * An application may send an EOS event to a source element to make it * perform the EOS logic (send EOS event downstream or post a * %GST_MESSAGE_SEGMENT_DONE on the bus). This can typically be done * with the gst_element_send_event() function on the element or its parent bin. * * After the EOS has been sent to the element, the application should wait for * an EOS message to be posted on the pipeline's bus. Once this EOS message is * received, it may safely shut down the entire pipeline. */ public class BaseSrc : Element { /** the main Gtk struct */ protected GstBaseSrc* gstBaseSrc; /** Get the main Gtk struct */ public GstBaseSrc* getBaseSrcStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBaseSrc; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstBaseSrc; } protected override void setStruct(GObject* obj) { gstBaseSrc = cast(GstBaseSrc*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstBaseSrc* gstBaseSrc, bool ownedRef = false) { this.gstBaseSrc = gstBaseSrc; super(cast(GstElement*)gstBaseSrc, ownedRef); } /** */ public static GType getType() { return gst_base_src_get_type(); } /** * Lets #GstBaseSrc sub-classes to know the memory @allocator * used by the base class and its @params. * * Unref the @allocator after usage. * * Params: * allocator = the #GstAllocator * used * params = the * #GstAllocationParams of @allocator */ public void getAllocator(out Allocator allocator, out AllocationParams params) { GstAllocator* outallocator = null; GstAllocationParams* outparams = sliceNew!GstAllocationParams(); gst_base_src_get_allocator(gstBaseSrc, &outallocator, outparams); allocator = ObjectG.getDObject!(Allocator)(outallocator); params = ObjectG.getDObject!(AllocationParams)(outparams, true); } /** * Get the number of bytes that @src will push out with each buffer. * * Returns: the number of bytes pushed with each buffer. */ public uint getBlocksize() { return gst_base_src_get_blocksize(gstBaseSrc); } /** * Returns: the instance of the #GstBufferPool used * by the src; unref it after usage. */ public BufferPool getBufferPool() { auto p = gst_base_src_get_buffer_pool(gstBaseSrc); if(p is null) { return null; } return ObjectG.getDObject!(BufferPool)(cast(GstBufferPool*) p, true); } /** * Query if @src timestamps outgoing buffers based on the current running_time. * * Returns: %TRUE if the base class will automatically timestamp outgoing buffers. */ public bool getDoTimestamp() { return gst_base_src_get_do_timestamp(gstBaseSrc) != 0; } /** * Get the current async behaviour of @src. See also gst_base_src_set_async(). * * Returns: %TRUE if @src is operating in async mode. */ public bool isAsync() { return gst_base_src_is_async(gstBaseSrc) != 0; } /** * Check if an element is in live mode. * * Returns: %TRUE if element is in live mode. */ public bool isLive() { return gst_base_src_is_live(gstBaseSrc) != 0; } /** * Prepare a new seamless segment for emission downstream. This function must * only be called by derived sub-classes, and only from the create() function, * as the stream-lock needs to be held. * * The format for the new segment will be the current format of the source, as * configured with gst_base_src_set_format() * * Params: * start = The new start value for the segment * stop = Stop value for the new segment * time = The new time value for the start of the new segment * * Returns: %TRUE if preparation of the seamless segment succeeded. */ public bool newSeamlessSegment(long start, long stop, long time) { return gst_base_src_new_seamless_segment(gstBaseSrc, start, stop, time) != 0; } /** * Query the source for the latency parameters. @live will be %TRUE when @src is * configured as a live source. @min_latency and @max_latency will be set * to the difference between the running time and the timestamp of the first * buffer. * * This function is mostly used by subclasses. * * Params: * live = if the source is live * minLatency = the min latency of the source * maxLatency = the max latency of the source * * Returns: %TRUE if the query succeeded. */ public bool queryLatency(out bool live, out GstClockTime minLatency, out GstClockTime maxLatency) { int outlive; auto p = gst_base_src_query_latency(gstBaseSrc, &outlive, &minLatency, &maxLatency) != 0; live = (outlive == 1); return p; } /** * Configure async behaviour in @src, no state change will block. The open, * close, start, stop, play and pause virtual methods will be executed in a * different thread and are thus allowed to perform blocking operations. Any * blocking operation should be unblocked with the unlock vmethod. * * Params: * async = new async mode */ public void setAsync(bool async) { gst_base_src_set_async(gstBaseSrc, async); } /** * If @automatic_eos is %TRUE, @src will automatically go EOS if a buffer * after the total size is returned. By default this is %TRUE but sources * that can't return an authoritative size and only know that they're EOS * when trying to read more should set this to %FALSE. * * Params: * automaticEos = automatic eos * * Since: 1.4 */ public void setAutomaticEos(bool automaticEos) { gst_base_src_set_automatic_eos(gstBaseSrc, automaticEos); } /** * Set the number of bytes that @src will push out with each buffer. When * @blocksize is set to -1, a default length will be used. * * Params: * blocksize = the new blocksize in bytes */ public void setBlocksize(uint blocksize) { gst_base_src_set_blocksize(gstBaseSrc, blocksize); } /** * Set new caps on the basesrc source pad. * * Params: * caps = a #GstCaps * * Returns: %TRUE if the caps could be set */ public bool setCaps(Caps caps) { return gst_base_src_set_caps(gstBaseSrc, (caps is null) ? null : caps.getCapsStruct()) != 0; } /** * Configure @src to automatically timestamp outgoing buffers based on the * current running_time of the pipeline. This property is mostly useful for live * sources. * * Params: * timestamp = enable or disable timestamping */ public void setDoTimestamp(bool timestamp) { gst_base_src_set_do_timestamp(gstBaseSrc, timestamp); } /** * If not @dynamic, size is only updated when needed, such as when trying to * read past current tracked size. Otherwise, size is checked for upon each * read. * * Params: * dynamic = new dynamic size mode */ public void setDynamicSize(bool dynamic) { gst_base_src_set_dynamic_size(gstBaseSrc, dynamic); } /** * Sets the default format of the source. This will be the format used * for sending SEGMENT events and for performing seeks. * * If a format of GST_FORMAT_BYTES is set, the element will be able to * operate in pull mode if the #GstBaseSrcClass.is_seekable() returns %TRUE. * * This function must only be called in states < %GST_STATE_PAUSED. * * Params: * format = the format to use */ public void setFormat(GstFormat format) { gst_base_src_set_format(gstBaseSrc, format); } /** * If the element listens to a live source, @live should * be set to %TRUE. * * A live source will not produce data in the PAUSED state and * will therefore not be able to participate in the PREROLL phase * of a pipeline. To signal this fact to the application and the * pipeline, the state change return value of the live source will * be GST_STATE_CHANGE_NO_PREROLL. * * Params: * live = new live-mode */ public void setLive(bool live) { gst_base_src_set_live(gstBaseSrc, live); } /** * Complete an asynchronous start operation. When the subclass overrides the * start method, it should call gst_base_src_start_complete() when the start * operation completes either from the same thread or from an asynchronous * helper thread. * * Params: * ret = a #GstFlowReturn */ public void startComplete(GstFlowReturn ret) { gst_base_src_start_complete(gstBaseSrc, ret); } /** * Wait until the start operation completes. * * Returns: a #GstFlowReturn. */ public GstFlowReturn startWait() { return gst_base_src_start_wait(gstBaseSrc); } /** * If the #GstBaseSrcClass.create() method performs its own synchronisation * against the clock it must unblock when going from PLAYING to the PAUSED state * and call this method before continuing to produce the remaining data. * * This function will block until a state change to PLAYING happens (in which * case this function returns %GST_FLOW_OK) or the processing must be stopped due * to a state change to READY or a FLUSH event (in which case this function * returns %GST_FLOW_FLUSHING). * * Returns: %GST_FLOW_OK if @src is PLAYING and processing can * continue. Any other return value should be returned from the create vmethod. */ public GstFlowReturn waitPlaying() { return gst_base_src_wait_playing(gstBaseSrc); } } GtkD-3.7.5/generated/gstreamer/gst/base/BaseTransform.d000066400000000000000000000303501324604450400227330ustar00rootroot00000000000000/* * 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 gst.base.BaseTransform; private import glib.MemorySlice; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.AllocationParams; private import gstreamer.Allocator; private import gstreamer.BufferPool; private import gstreamer.Caps; private import gstreamer.Element; /** * This base class is for filter elements that process data. Elements * that are suitable for implementation using #GstBaseTransform are ones * where the size and caps of the output is known entirely from the input * caps and buffer sizes. These include elements that directly transform * one buffer into another, modify the contents of a buffer in-place, as * well as elements that collate multiple input buffers into one output buffer, * or that expand one input buffer into multiple output buffers. See below * for more concrete use cases. * * It provides for: * * * one sinkpad and one srcpad * * Possible formats on sink and source pad implemented * with custom transform_caps function. By default uses * same format on sink and source. * * * Handles state changes * * Does flushing * * Push mode * * Pull mode if the sub-class transform can operate on arbitrary data * * # Use Cases * * ## Passthrough mode * * * Element has no interest in modifying the buffer. It may want to inspect it, * in which case the element should have a transform_ip function. If there * is no transform_ip function in passthrough mode, the buffer is pushed * intact. * * * The #GstBaseTransformClass.passthrough_on_same_caps variable * will automatically set/unset passthrough based on whether the * element negotiates the same caps on both pads. * * * #GstBaseTransformClass.passthrough_on_same_caps on an element that * doesn't implement a transform_caps function is useful for elements that * only inspect data (such as level) * * * Example elements * * * Level * * Videoscale, audioconvert, videoconvert, audioresample in certain modes. * * ## Modifications in-place - input buffer and output buffer are the same thing. * * * The element must implement a transform_ip function. * * Output buffer size must <= input buffer size * * If the always_in_place flag is set, non-writable buffers will be copied * and passed to the transform_ip function, otherwise a new buffer will be * created and the transform function called. * * * Incoming writable buffers will be passed to the transform_ip function * immediately. * * only implementing transform_ip and not transform implies always_in_place = %TRUE * * * Example elements: * * Volume * * Audioconvert in certain modes (signed/unsigned conversion) * * videoconvert in certain modes (endianness swapping) * * ## Modifications only to the caps/metadata of a buffer * * * The element does not require writable data, but non-writable buffers * should be subbuffered so that the meta-information can be replaced. * * * Elements wishing to operate in this mode should replace the * prepare_output_buffer method to create subbuffers of the input buffer * and set always_in_place to %TRUE * * * Example elements * * Capsfilter when setting caps on outgoing buffers that have * none. * * identity when it is going to re-timestamp buffers by * datarate. * * ## Normal mode * * always_in_place flag is not set, or there is no transform_ip function * * Element will receive an input buffer and output buffer to operate on. * * Output buffer is allocated by calling the prepare_output_buffer function. * * Example elements: * * Videoscale, videoconvert, audioconvert when doing * scaling/conversions * * ## Special output buffer allocations * * Elements which need to do special allocation of their output buffers * beyond allocating output buffers via the negotiated allocator or * buffer pool should implement the prepare_output_buffer method. * * * Example elements: * * efence * * # Sub-class settable flags on GstBaseTransform * * * passthrough * * * Implies that in the current configuration, the sub-class is not interested in modifying the buffers. * * Elements which are always in passthrough mode whenever the same caps has been negotiated on both pads can set the class variable passthrough_on_same_caps to have this behaviour automatically. * * * always_in_place * * Determines whether a non-writable buffer will be copied before passing * to the transform_ip function. * * * Implied %TRUE if no transform function is implemented. * * Implied %FALSE if ONLY transform function is implemented. */ public class BaseTransform : Element { /** the main Gtk struct */ protected GstBaseTransform* gstBaseTransform; /** Get the main Gtk struct */ public GstBaseTransform* getBaseTransformStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBaseTransform; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstBaseTransform; } protected override void setStruct(GObject* obj) { gstBaseTransform = cast(GstBaseTransform*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstBaseTransform* gstBaseTransform, bool ownedRef = false) { this.gstBaseTransform = gstBaseTransform; super(cast(GstElement*)gstBaseTransform, ownedRef); } /** */ public static GType getType() { return gst_base_transform_get_type(); } /** * Lets #GstBaseTransform sub-classes to know the memory @allocator * used by the base class and its @params. * * Unref the @allocator after use it. * * Params: * allocator = the #GstAllocator * used * params = the * #GstAllocationParams of @allocator */ public void getAllocator(out Allocator allocator, out AllocationParams params) { GstAllocator* outallocator = null; GstAllocationParams* outparams = sliceNew!GstAllocationParams(); gst_base_transform_get_allocator(gstBaseTransform, &outallocator, outparams); allocator = ObjectG.getDObject!(Allocator)(outallocator); params = ObjectG.getDObject!(AllocationParams)(outparams, true); } /** * Returns: the instance of the #GstBufferPool used * by @trans; free it after use it */ public BufferPool getBufferPool() { auto p = gst_base_transform_get_buffer_pool(gstBaseTransform); if(p is null) { return null; } return ObjectG.getDObject!(BufferPool)(cast(GstBufferPool*) p, true); } /** * See if @trans is configured as a in_place transform. * * Returns: %TRUE is the transform is configured in in_place mode. * * MT safe. */ public bool isInPlace() { return gst_base_transform_is_in_place(gstBaseTransform) != 0; } /** * See if @trans is configured as a passthrough transform. * * Returns: %TRUE is the transform is configured in passthrough mode. * * MT safe. */ public bool isPassthrough() { return gst_base_transform_is_passthrough(gstBaseTransform) != 0; } /** * Queries if the transform will handle QoS. * * Returns: %TRUE if QoS is enabled. * * MT safe. */ public bool isQosEnabled() { return gst_base_transform_is_qos_enabled(gstBaseTransform) != 0; } /** * Instructs @trans to request renegotiation upstream. This function is * typically called after properties on the transform were set that * influence the input format. */ public void reconfigureSink() { gst_base_transform_reconfigure_sink(gstBaseTransform); } /** * Instructs @trans to renegotiate a new downstream transform on the next * buffer. This function is typically called after properties on the transform * were set that influence the output format. */ public void reconfigureSrc() { gst_base_transform_reconfigure_src(gstBaseTransform); } /** * If @gap_aware is %FALSE (the default), output buffers will have the * %GST_BUFFER_FLAG_GAP flag unset. * * If set to %TRUE, the element must handle output buffers with this flag set * correctly, i.e. it can assume that the buffer contains neutral data but must * unset the flag if the output is no neutral data. * * MT safe. * * Params: * gapAware = New state */ public void setGapAware(bool gapAware) { gst_base_transform_set_gap_aware(gstBaseTransform, gapAware); } /** * Determines whether a non-writable buffer will be copied before passing * to the transform_ip function. * * * Always %TRUE if no transform function is implemented. * * Always %FALSE if ONLY transform function is implemented. * * MT safe. * * Params: * inPlace = Boolean value indicating that we would like to operate * on in_place buffers. */ public void setInPlace(bool inPlace) { gst_base_transform_set_in_place(gstBaseTransform, inPlace); } /** * Set passthrough mode for this filter by default. This is mostly * useful for filters that do not care about negotiation. * * Always %TRUE for filters which don't implement either a transform * or transform_ip method. * * MT safe. * * Params: * passthrough = boolean indicating passthrough mode. */ public void setPassthrough(bool passthrough) { gst_base_transform_set_passthrough(gstBaseTransform, passthrough); } /** * If @prefer_passthrough is %TRUE (the default), @trans will check and * prefer passthrough caps from the list of caps returned by the * transform_caps vmethod. * * If set to %FALSE, the element must order the caps returned from the * transform_caps function in such a way that the preferred format is * first in the list. This can be interesting for transforms that can do * passthrough transforms but prefer to do something else, like a * capsfilter. * * MT safe. * * Params: * preferPassthrough = New state * * Since: 1.0.1 */ public void setPreferPassthrough(bool preferPassthrough) { gst_base_transform_set_prefer_passthrough(gstBaseTransform, preferPassthrough); } /** * Enable or disable QoS handling in the transform. * * MT safe. * * Params: * enabled = new state */ public void setQosEnabled(bool enabled) { gst_base_transform_set_qos_enabled(gstBaseTransform, enabled); } /** * Set the QoS parameters in the transform. This function is called internally * when a QOS event is received but subclasses can provide custom information * when needed. * * MT safe. * * Params: * proportion = the proportion * diff = the diff against the clock * timestamp = the timestamp of the buffer generating the QoS expressed in * running_time. */ public void updateQos(double proportion, GstClockTimeDiff diff, GstClockTime timestamp) { gst_base_transform_update_qos(gstBaseTransform, proportion, diff, timestamp); } /** * Updates the srcpad caps and send the caps downstream. This function * can be used by subclasses when they have already negotiated their caps * but found a change in them (or computed new informations). This way, * they can notify downstream about that change without loosing any * buffer. * * Params: * updatedCaps = An updated version of the srcpad caps to be pushed * downstream * * Returns: %TRUE if the caps could be send downstream %FALSE otherwise * * Since: 1.6 */ public bool updateSrcCaps(Caps updatedCaps) { return gst_base_transform_update_src_caps(gstBaseTransform, (updatedCaps is null) ? null : updatedCaps.getCapsStruct()) != 0; } } GtkD-3.7.5/generated/gstreamer/gst/base/BitReader.d000066400000000000000000000166601324604450400220360ustar00rootroot00000000000000/* * 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 gst.base.BitReader; private import glib.ConstructionException; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gtkd.Loader; /** * #GstBitReader provides a bit reader that can read any number of bits * from a memory buffer. It provides functions for reading any number of bits * into 8, 16, 32 and 64 bit variables. */ public class BitReader { /** the main Gtk struct */ protected GstBitReader* gstBitReader; protected bool ownedRef; /** Get the main Gtk struct */ public GstBitReader* getBitReaderStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBitReader; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstBitReader; } /** * Sets our main struct and passes it to the parent class. */ public this (GstBitReader* gstBitReader, bool ownedRef = false) { this.gstBitReader = gstBitReader; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTBASE) && ownedRef ) gst_bit_reader_free(gstBitReader); } /** * Frees a #GstBitReader instance, which was previously allocated by * gst_bit_reader_new(). */ public void free() { gst_bit_reader_free(gstBitReader); ownedRef = false; } /** * Read @nbits bits into @val and update the current position. * * Params: * val = Pointer to a #guint16 to store the result * nbits = number of bits to read * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getBitsUint16(out ushort val, uint nbits) { return gst_bit_reader_get_bits_uint16(gstBitReader, &val, nbits) != 0; } /** * Read @nbits bits into @val and update the current position. * * Params: * val = Pointer to a #guint32 to store the result * nbits = number of bits to read * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getBitsUint32(out uint val, uint nbits) { return gst_bit_reader_get_bits_uint32(gstBitReader, &val, nbits) != 0; } /** * Read @nbits bits into @val and update the current position. * * Params: * val = Pointer to a #guint64 to store the result * nbits = number of bits to read * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getBitsUint64(out ulong val, uint nbits) { return gst_bit_reader_get_bits_uint64(gstBitReader, &val, nbits) != 0; } /** * Read @nbits bits into @val and update the current position. * * Params: * val = Pointer to a #guint8 to store the result * nbits = number of bits to read * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getBitsUint8(out ubyte val, uint nbits) { return gst_bit_reader_get_bits_uint8(gstBitReader, &val, nbits) != 0; } /** * Returns the current position of a #GstBitReader instance in bits. * * Returns: The current position of @reader in bits. */ public uint getPos() { return gst_bit_reader_get_pos(gstBitReader); } /** * Returns the remaining number of bits of a #GstBitReader instance. * * Returns: The remaining number of bits of @reader instance. */ public uint getRemaining() { return gst_bit_reader_get_remaining(gstBitReader); } /** * Returns the total number of bits of a #GstBitReader instance. * * Returns: The total number of bits of @reader instance. */ public uint getSize() { return gst_bit_reader_get_size(gstBitReader); } /** * Initializes a #GstBitReader instance to read from @data. This function * can be called on already initialized instances. * * Params: * data = data from which the bit reader should read */ public void init(ubyte[] data) { gst_bit_reader_init(gstBitReader, data.ptr, cast(uint)data.length); } /** * Read @nbits bits into @val but keep the current position. * * Params: * val = Pointer to a #guint16 to store the result * nbits = number of bits to read * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekBitsUint16(out ushort val, uint nbits) { return gst_bit_reader_peek_bits_uint16(gstBitReader, &val, nbits) != 0; } /** * Read @nbits bits into @val but keep the current position. * * Params: * val = Pointer to a #guint32 to store the result * nbits = number of bits to read * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekBitsUint32(out uint val, uint nbits) { return gst_bit_reader_peek_bits_uint32(gstBitReader, &val, nbits) != 0; } /** * Read @nbits bits into @val but keep the current position. * * Params: * val = Pointer to a #guint64 to store the result * nbits = number of bits to read * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekBitsUint64(out ulong val, uint nbits) { return gst_bit_reader_peek_bits_uint64(gstBitReader, &val, nbits) != 0; } /** * Read @nbits bits into @val but keep the current position. * * Params: * val = Pointer to a #guint8 to store the result * nbits = number of bits to read * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekBitsUint8(out ubyte val, uint nbits) { return gst_bit_reader_peek_bits_uint8(gstBitReader, &val, nbits) != 0; } /** * Sets the new position of a #GstBitReader instance to @pos in bits. * * Params: * pos = The new position in bits * * Returns: %TRUE if the position could be set successfully, %FALSE * otherwise. */ public bool setPos(uint pos) { return gst_bit_reader_set_pos(gstBitReader, pos) != 0; } /** * Skips @nbits bits of the #GstBitReader instance. * * Params: * nbits = the number of bits to skip * * Returns: %TRUE if @nbits bits could be skipped, %FALSE otherwise. */ public bool skip(uint nbits) { return gst_bit_reader_skip(gstBitReader, nbits) != 0; } /** * Skips until the next byte. * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool skipToByte() { return gst_bit_reader_skip_to_byte(gstBitReader) != 0; } /** * Create a new #GstBitReader instance, which will read from @data. * * Free-function: gst_bit_reader_free * * Params: * data = Data from which the #GstBitReader * should read * * Returns: a new #GstBitReader instance * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] data) { auto p = gst_bit_reader_new(data.ptr, cast(uint)data.length); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstBitReader*) p); } } GtkD-3.7.5/generated/gstreamer/gst/base/ByteReader.d000066400000000000000000000773461324604450400222330ustar00rootroot00000000000000/* * 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 gst.base.ByteReader; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gtkd.Loader; /** * #GstByteReader provides a byte reader that can read different integer and * floating point types from a memory buffer. It provides functions for reading * signed/unsigned, little/big endian integers of 8, 16, 24, 32 and 64 bits * and functions for reading little/big endian floating points numbers of * 32 and 64 bits. It also provides functions to read NUL-terminated strings * in various character encodings. */ public class ByteReader { /** the main Gtk struct */ protected GstByteReader* gstByteReader; protected bool ownedRef; /** Get the main Gtk struct */ public GstByteReader* getByteReaderStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstByteReader; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstByteReader; } /** * Sets our main struct and passes it to the parent class. */ public this (GstByteReader* gstByteReader, bool ownedRef = false) { this.gstByteReader = gstByteReader; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTBASE) && ownedRef ) gst_byte_reader_free(gstByteReader); } /** * Free-function: g_free * * Returns a newly-allocated copy of the current data * position if at least @size bytes are left and * updates the current position. Free with g_free() when no longer needed. * * Params: * val = address of a * #guint8 pointer variable in which to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool dupData(out ubyte[] val) { ubyte* outval = null; auto p = gst_byte_reader_dup_data(gstByteReader, cast(uint)val.length, &outval) != 0; val = outval[0 .. cast(uint)val.length]; return p; } /** * Free-function: g_free * * Returns a newly-allocated copy of the current data position if there is * a NUL-terminated UTF-16 string in the data (this could be an empty string * as well), and advances the current position. * * No input checking for valid UTF-16 is done. This function is endianness * agnostic - you should not assume the UTF-16 characters are in host * endianness. * * This function will fail if no NUL-terminator was found in in the data. * * Note: there is no peek or get variant of this function to ensure correct * byte alignment of the UTF-16 string. * * Params: * str = address of a * #guint16 pointer variable in which to store the result * * Returns: %TRUE if a string could be read, %FALSE otherwise. The * string put into @str must be freed with g_free() when no longer needed. */ public bool dupStringUtf16(out ushort[] str) { ushort* outstr = null; auto p = gst_byte_reader_dup_string_utf16(gstByteReader, &outstr) != 0; str = outstr[0 .. getArrayLength(outstr)]; return p; } /** * Free-function: g_free * * Returns a newly-allocated copy of the current data position if there is * a NUL-terminated UTF-32 string in the data (this could be an empty string * as well), and advances the current position. * * No input checking for valid UTF-32 is done. This function is endianness * agnostic - you should not assume the UTF-32 characters are in host * endianness. * * This function will fail if no NUL-terminator was found in in the data. * * Note: there is no peek or get variant of this function to ensure correct * byte alignment of the UTF-32 string. * * Params: * str = address of a * #guint32 pointer variable in which to store the result * * Returns: %TRUE if a string could be read, %FALSE otherwise. The * string put into @str must be freed with g_free() when no longer needed. */ public bool dupStringUtf32(out uint[] str) { uint* outstr = null; auto p = gst_byte_reader_dup_string_utf32(gstByteReader, &outstr) != 0; str = outstr[0 .. getArrayLength(outstr)]; return p; } /** * Free-function: g_free * * FIXME:Reads (copies) a NUL-terminated string in the #GstByteReader instance, * advancing the current position to the byte after the string. This will work * for any NUL-terminated string with a character width of 8 bits, so ASCII, * UTF-8, ISO-8859-N etc. No input checking for valid UTF-8 is done. * * This function will fail if no NUL-terminator was found in in the data. * * Params: * str = address of a * #gchar pointer variable in which to store the result * * Returns: %TRUE if a string could be read into @str, %FALSE otherwise. The * string put into @str must be freed with g_free() when no longer needed. */ public bool dupStringUtf8(out string str) { char* outstr = null; auto p = gst_byte_reader_dup_string_utf8(gstByteReader, &outstr) != 0; str = Str.toString(outstr); return p; } /** * Frees a #GstByteReader instance, which was previously allocated by * gst_byte_reader_new(). */ public void free() { gst_byte_reader_free(gstByteReader); ownedRef = false; } /** * Returns a constant pointer to the current data * position if at least @size bytes are left and * updates the current position. * * Params: * val = address of a * #guint8 pointer variable in which to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getData(out ubyte[] val) { ubyte* outval = null; auto p = gst_byte_reader_get_data(gstByteReader, cast(uint)val.length, &outval) != 0; val = outval[0 .. cast(uint)val.length]; return p; } /** * Read a 32 bit big endian floating point value into @val * and update the current position. * * Params: * val = Pointer to a #gfloat to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getFloat32Be(out float val) { return gst_byte_reader_get_float32_be(gstByteReader, &val) != 0; } /** * Read a 32 bit little endian floating point value into @val * and update the current position. * * Params: * val = Pointer to a #gfloat to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getFloat32Le(out float val) { return gst_byte_reader_get_float32_le(gstByteReader, &val) != 0; } /** * Read a 64 bit big endian floating point value into @val * and update the current position. * * Params: * val = Pointer to a #gdouble to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getFloat64Be(out double val) { return gst_byte_reader_get_float64_be(gstByteReader, &val) != 0; } /** * Read a 64 bit little endian floating point value into @val * and update the current position. * * Params: * val = Pointer to a #gdouble to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getFloat64Le(out double val) { return gst_byte_reader_get_float64_le(gstByteReader, &val) != 0; } /** * Read a signed 16 bit big endian integer into @val * and update the current position. * * Params: * val = Pointer to a #gint16 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getInt16Be(out short val) { return gst_byte_reader_get_int16_be(gstByteReader, &val) != 0; } /** * Read a signed 16 bit little endian integer into @val * and update the current position. * * Params: * val = Pointer to a #gint16 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getInt16Le(out short val) { return gst_byte_reader_get_int16_le(gstByteReader, &val) != 0; } /** * Read a signed 24 bit big endian integer into @val * and update the current position. * * Params: * val = Pointer to a #gint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getInt24Be(out int val) { return gst_byte_reader_get_int24_be(gstByteReader, &val) != 0; } /** * Read a signed 24 bit little endian integer into @val * and update the current position. * * Params: * val = Pointer to a #gint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getInt24Le(out int val) { return gst_byte_reader_get_int24_le(gstByteReader, &val) != 0; } /** * Read a signed 32 bit big endian integer into @val * and update the current position. * * Params: * val = Pointer to a #gint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getInt32Be(out int val) { return gst_byte_reader_get_int32_be(gstByteReader, &val) != 0; } /** * Read a signed 32 bit little endian integer into @val * and update the current position. * * Params: * val = Pointer to a #gint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getInt32Le(out int val) { return gst_byte_reader_get_int32_le(gstByteReader, &val) != 0; } /** * Read a signed 64 bit big endian integer into @val * and update the current position. * * Params: * val = Pointer to a #gint64 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getInt64Be(out long val) { return gst_byte_reader_get_int64_be(gstByteReader, &val) != 0; } /** * Read a signed 64 bit little endian integer into @val * and update the current position. * * Params: * val = Pointer to a #gint64 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getInt64Le(out long val) { return gst_byte_reader_get_int64_le(gstByteReader, &val) != 0; } /** * Read a signed 8 bit integer into @val and update the current position. * * Params: * val = Pointer to a #gint8 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getInt8(out byte val) { return gst_byte_reader_get_int8(gstByteReader, &val) != 0; } /** * Returns the current position of a #GstByteReader instance in bytes. * * Returns: The current position of @reader in bytes. */ public uint getPos() { return gst_byte_reader_get_pos(gstByteReader); } /** * Returns the remaining number of bytes of a #GstByteReader instance. * * Returns: The remaining number of bytes of @reader instance. */ public uint getRemaining() { return gst_byte_reader_get_remaining(gstByteReader); } /** * Returns the total number of bytes of a #GstByteReader instance. * * Returns: The total number of bytes of @reader instance. */ public uint getSize() { return gst_byte_reader_get_size(gstByteReader); } /** * Returns a constant pointer to the current data position if there is * a NUL-terminated string in the data (this could be just a NUL terminator), * advancing the current position to the byte after the string. This will work * for any NUL-terminated string with a character width of 8 bits, so ASCII, * UTF-8, ISO-8859-N etc. * * No input checking for valid UTF-8 is done. * * This function will fail if no NUL-terminator was found in in the data. * * Params: * str = address of a * #gchar pointer variable in which to store the result * * Returns: %TRUE if a string could be found, %FALSE otherwise. */ public bool getStringUtf8(out string str) { char* outstr = null; auto p = gst_byte_reader_get_string_utf8(gstByteReader, &outstr) != 0; str = Str.toString(outstr); return p; } /** * Initializes a #GstByteReader sub-reader instance to contain @size bytes of * data from the current position of @reader. This is useful to read chunked * formats and make sure that one doesn't read beyond the size of the sub-chunk. * * Unlike gst_byte_reader_peek_sub_reader(), this function also modifies the * position of @reader and moves it forward by @size bytes. * * Params: * subReader = a #GstByteReader instance to initialize as sub-reader * size = size of @sub_reader in bytes * * Returns: FALSE on error or if @reader does not contain @size more bytes from * the current position, and otherwise TRUE * * Since: 1.6 */ public bool getSubReader(ByteReader subReader, uint size) { return gst_byte_reader_get_sub_reader(gstByteReader, (subReader is null) ? null : subReader.getByteReaderStruct(), size) != 0; } /** * Read an unsigned 16 bit big endian integer into @val * and update the current position. * * Params: * val = Pointer to a #guint16 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getUint16Be(out ushort val) { return gst_byte_reader_get_uint16_be(gstByteReader, &val) != 0; } /** * Read an unsigned 16 bit little endian integer into @val * and update the current position. * * Params: * val = Pointer to a #guint16 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getUint16Le(out ushort val) { return gst_byte_reader_get_uint16_le(gstByteReader, &val) != 0; } /** * Read an unsigned 24 bit big endian integer into @val * and update the current position. * * Params: * val = Pointer to a #guint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getUint24Be(out uint val) { return gst_byte_reader_get_uint24_be(gstByteReader, &val) != 0; } /** * Read an unsigned 24 bit little endian integer into @val * and update the current position. * * Params: * val = Pointer to a #guint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getUint24Le(out uint val) { return gst_byte_reader_get_uint24_le(gstByteReader, &val) != 0; } /** * Read an unsigned 32 bit big endian integer into @val * and update the current position. * * Params: * val = Pointer to a #guint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getUint32Be(out uint val) { return gst_byte_reader_get_uint32_be(gstByteReader, &val) != 0; } /** * Read an unsigned 32 bit little endian integer into @val * and update the current position. * * Params: * val = Pointer to a #guint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getUint32Le(out uint val) { return gst_byte_reader_get_uint32_le(gstByteReader, &val) != 0; } /** * Read an unsigned 64 bit big endian integer into @val * and update the current position. * * Params: * val = Pointer to a #guint64 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getUint64Be(out ulong val) { return gst_byte_reader_get_uint64_be(gstByteReader, &val) != 0; } /** * Read an unsigned 64 bit little endian integer into @val * and update the current position. * * Params: * val = Pointer to a #guint64 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getUint64Le(out ulong val) { return gst_byte_reader_get_uint64_le(gstByteReader, &val) != 0; } /** * Read an unsigned 8 bit integer into @val and update the current position. * * Params: * val = Pointer to a #guint8 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool getUint8(out ubyte val) { return gst_byte_reader_get_uint8(gstByteReader, &val) != 0; } /** * Initializes a #GstByteReader instance to read from @data. This function * can be called on already initialized instances. * * Params: * data = data from which * the #GstByteReader should read */ public void init(ubyte[] data) { gst_byte_reader_init(gstByteReader, data.ptr, cast(uint)data.length); } /** * Scan for pattern @pattern with applied mask @mask in the byte reader data, * starting from offset @offset relative to the current position. * * The bytes in @pattern and @mask are interpreted left-to-right, regardless * of endianness. All four bytes of the pattern must be present in the * byte reader data for it to match, even if the first or last bytes are masked * out. * * It is an error to call this function without making sure that there is * enough data (offset+size bytes) in the byte reader. * * Params: * mask = mask to apply to data before matching against @pattern * pattern = pattern to match (after mask is applied) * offset = offset from which to start scanning, relative to the current * position * size = number of bytes to scan from offset * * Returns: offset of the first match, or -1 if no match was found. * * Example: * |[ * // Assume the reader contains 0x00 0x01 0x02 ... 0xfe 0xff * * gst_byte_reader_masked_scan_uint32 (reader, 0xffffffff, 0x00010203, 0, 256); * // -> returns 0 * gst_byte_reader_masked_scan_uint32 (reader, 0xffffffff, 0x00010203, 1, 255); * // -> returns -1 * gst_byte_reader_masked_scan_uint32 (reader, 0xffffffff, 0x01020304, 1, 255); * // -> returns 1 * gst_byte_reader_masked_scan_uint32 (reader, 0xffff, 0x0001, 0, 256); * // -> returns -1 * gst_byte_reader_masked_scan_uint32 (reader, 0xffff, 0x0203, 0, 256); * // -> returns 0 * gst_byte_reader_masked_scan_uint32 (reader, 0xffff0000, 0x02030000, 0, 256); * // -> returns 2 * gst_byte_reader_masked_scan_uint32 (reader, 0xffff0000, 0x02030000, 0, 4); * // -> returns -1 * ]| */ public uint maskedScanUint32(uint mask, uint pattern, uint offset, uint size) { return gst_byte_reader_masked_scan_uint32(gstByteReader, mask, pattern, offset, size); } /** * Scan for pattern @pattern with applied mask @mask in the byte reader data, * starting from offset @offset relative to the current position. * * The bytes in @pattern and @mask are interpreted left-to-right, regardless * of endianness. All four bytes of the pattern must be present in the * byte reader data for it to match, even if the first or last bytes are masked * out. * * It is an error to call this function without making sure that there is * enough data (offset+size bytes) in the byte reader. * * Params: * mask = mask to apply to data before matching against @pattern * pattern = pattern to match (after mask is applied) * offset = offset from which to start scanning, relative to the current * position * size = number of bytes to scan from offset * value = pointer to uint32 to return matching data * * Returns: offset of the first match, or -1 if no match was found. * * Since: 1.6 */ public uint maskedScanUint32Peek(uint mask, uint pattern, uint offset, uint size, out uint value) { return gst_byte_reader_masked_scan_uint32_peek(gstByteReader, mask, pattern, offset, size, &value); } /** * Returns a constant pointer to the current data * position if at least @size bytes are left and * keeps the current position. * * Params: * val = address of a * #guint8 pointer variable in which to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekData(out ubyte[] val) { ubyte* outval = null; auto p = gst_byte_reader_peek_data(gstByteReader, cast(uint)val.length, &outval) != 0; val = outval[0 .. cast(uint)val.length]; return p; } /** * Read a 32 bit big endian floating point value into @val * but keep the current position. * * Params: * val = Pointer to a #gfloat to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekFloat32Be(out float val) { return gst_byte_reader_peek_float32_be(gstByteReader, &val) != 0; } /** * Read a 32 bit little endian floating point value into @val * but keep the current position. * * Params: * val = Pointer to a #gfloat to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekFloat32Le(out float val) { return gst_byte_reader_peek_float32_le(gstByteReader, &val) != 0; } /** * Read a 64 bit big endian floating point value into @val * but keep the current position. * * Params: * val = Pointer to a #gdouble to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekFloat64Be(out double val) { return gst_byte_reader_peek_float64_be(gstByteReader, &val) != 0; } /** * Read a 64 bit little endian floating point value into @val * but keep the current position. * * Params: * val = Pointer to a #gdouble to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekFloat64Le(out double val) { return gst_byte_reader_peek_float64_le(gstByteReader, &val) != 0; } /** * Read a signed 16 bit big endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #gint16 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekInt16Be(out short val) { return gst_byte_reader_peek_int16_be(gstByteReader, &val) != 0; } /** * Read a signed 16 bit little endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #gint16 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekInt16Le(out short val) { return gst_byte_reader_peek_int16_le(gstByteReader, &val) != 0; } /** * Read a signed 24 bit big endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #gint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekInt24Be(out int val) { return gst_byte_reader_peek_int24_be(gstByteReader, &val) != 0; } /** * Read a signed 24 bit little endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #gint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekInt24Le(out int val) { return gst_byte_reader_peek_int24_le(gstByteReader, &val) != 0; } /** * Read a signed 32 bit big endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #gint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekInt32Be(out int val) { return gst_byte_reader_peek_int32_be(gstByteReader, &val) != 0; } /** * Read a signed 32 bit little endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #gint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekInt32Le(out int val) { return gst_byte_reader_peek_int32_le(gstByteReader, &val) != 0; } /** * Read a signed 64 bit big endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #gint64 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekInt64Be(out long val) { return gst_byte_reader_peek_int64_be(gstByteReader, &val) != 0; } /** * Read a signed 64 bit little endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #gint64 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekInt64Le(out long val) { return gst_byte_reader_peek_int64_le(gstByteReader, &val) != 0; } /** * Read a signed 8 bit integer into @val but keep the current position. * * Params: * val = Pointer to a #gint8 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekInt8(out byte val) { return gst_byte_reader_peek_int8(gstByteReader, &val) != 0; } /** * Returns a constant pointer to the current data position if there is * a NUL-terminated string in the data (this could be just a NUL terminator). * The current position will be maintained. This will work for any * NUL-terminated string with a character width of 8 bits, so ASCII, * UTF-8, ISO-8859-N etc. * * No input checking for valid UTF-8 is done. * * This function will fail if no NUL-terminator was found in in the data. * * Params: * str = address of a * #gchar pointer variable in which to store the result * * Returns: %TRUE if a string could be skipped, %FALSE otherwise. */ public bool peekStringUtf8(out string str) { char* outstr = null; auto p = gst_byte_reader_peek_string_utf8(gstByteReader, &outstr) != 0; str = Str.toString(outstr); return p; } /** * Initializes a #GstByteReader sub-reader instance to contain @size bytes of * data from the current position of @reader. This is useful to read chunked * formats and make sure that one doesn't read beyond the size of the sub-chunk. * * Unlike gst_byte_reader_get_sub_reader(), this function does not modify the * current position of @reader. * * Params: * subReader = a #GstByteReader instance to initialize as sub-reader * size = size of @sub_reader in bytes * * Returns: FALSE on error or if @reader does not contain @size more bytes from * the current position, and otherwise TRUE * * Since: 1.6 */ public bool peekSubReader(ByteReader subReader, uint size) { return gst_byte_reader_peek_sub_reader(gstByteReader, (subReader is null) ? null : subReader.getByteReaderStruct(), size) != 0; } /** * Read an unsigned 16 bit big endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #guint16 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekUint16Be(out ushort val) { return gst_byte_reader_peek_uint16_be(gstByteReader, &val) != 0; } /** * Read an unsigned 16 bit little endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #guint16 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekUint16Le(out ushort val) { return gst_byte_reader_peek_uint16_le(gstByteReader, &val) != 0; } /** * Read an unsigned 24 bit big endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #guint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekUint24Be(out uint val) { return gst_byte_reader_peek_uint24_be(gstByteReader, &val) != 0; } /** * Read an unsigned 24 bit little endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #guint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekUint24Le(out uint val) { return gst_byte_reader_peek_uint24_le(gstByteReader, &val) != 0; } /** * Read an unsigned 32 bit big endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #guint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekUint32Be(out uint val) { return gst_byte_reader_peek_uint32_be(gstByteReader, &val) != 0; } /** * Read an unsigned 32 bit little endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #guint32 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekUint32Le(out uint val) { return gst_byte_reader_peek_uint32_le(gstByteReader, &val) != 0; } /** * Read an unsigned 64 bit big endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #guint64 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekUint64Be(out ulong val) { return gst_byte_reader_peek_uint64_be(gstByteReader, &val) != 0; } /** * Read an unsigned 64 bit little endian integer into @val * but keep the current position. * * Params: * val = Pointer to a #guint64 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekUint64Le(out ulong val) { return gst_byte_reader_peek_uint64_le(gstByteReader, &val) != 0; } /** * Read an unsigned 8 bit integer into @val but keep the current position. * * Params: * val = Pointer to a #guint8 to store the result * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool peekUint8(out ubyte val) { return gst_byte_reader_peek_uint8(gstByteReader, &val) != 0; } /** * Sets the new position of a #GstByteReader instance to @pos in bytes. * * Params: * pos = The new position in bytes * * Returns: %TRUE if the position could be set successfully, %FALSE * otherwise. */ public bool setPos(uint pos) { return gst_byte_reader_set_pos(gstByteReader, pos) != 0; } /** * Skips @nbytes bytes of the #GstByteReader instance. * * Params: * nbytes = the number of bytes to skip * * Returns: %TRUE if @nbytes bytes could be skipped, %FALSE otherwise. */ public bool skip(uint nbytes) { return gst_byte_reader_skip(gstByteReader, nbytes) != 0; } /** * Skips a NUL-terminated UTF-16 string in the #GstByteReader instance, * advancing the current position to the byte after the string. * * No input checking for valid UTF-16 is done. * * This function will fail if no NUL-terminator was found in in the data. * * Returns: %TRUE if a string could be skipped, %FALSE otherwise. */ public bool skipStringUtf16() { return gst_byte_reader_skip_string_utf16(gstByteReader) != 0; } /** * Skips a NUL-terminated UTF-32 string in the #GstByteReader instance, * advancing the current position to the byte after the string. * * No input checking for valid UTF-32 is done. * * This function will fail if no NUL-terminator was found in in the data. * * Returns: %TRUE if a string could be skipped, %FALSE otherwise. */ public bool skipStringUtf32() { return gst_byte_reader_skip_string_utf32(gstByteReader) != 0; } /** * Skips a NUL-terminated string in the #GstByteReader instance, advancing * the current position to the byte after the string. This will work for * any NUL-terminated string with a character width of 8 bits, so ASCII, * UTF-8, ISO-8859-N etc. No input checking for valid UTF-8 is done. * * This function will fail if no NUL-terminator was found in in the data. * * Returns: %TRUE if a string could be skipped, %FALSE otherwise. */ public bool skipStringUtf8() { return gst_byte_reader_skip_string_utf8(gstByteReader) != 0; } /** * Create a new #GstByteReader instance, which will read from @data. * * Free-function: gst_byte_reader_free * * Params: * data = data from which the * #GstByteReader should read * * Returns: a new #GstByteReader instance * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] data) { auto p = gst_byte_reader_new(data.ptr, cast(uint)data.length); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstByteReader*) p); } } GtkD-3.7.5/generated/gstreamer/gst/base/ByteWriter.d000066400000000000000000000363361324604450400222770ustar00rootroot00000000000000/* * 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 gst.base.ByteWriter; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.Buffer; private import gtkd.Loader; /** * #GstByteWriter provides a byte writer and reader that can write/read different * integer and floating point types to/from a memory buffer. It provides functions * for writing/reading signed/unsigned, little/big endian integers of 8, 16, 24, * 32 and 64 bits and functions for reading little/big endian floating points numbers of * 32 and 64 bits. It also provides functions to write/read NUL-terminated strings * in various character encodings. */ public class ByteWriter { /** the main Gtk struct */ protected GstByteWriter* gstByteWriter; protected bool ownedRef; /** Get the main Gtk struct */ public GstByteWriter* getByteWriterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstByteWriter; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstByteWriter; } /** * Sets our main struct and passes it to the parent class. */ public this (GstByteWriter* gstByteWriter, bool ownedRef = false) { this.gstByteWriter = gstByteWriter; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTBASE) && ownedRef ) gst_byte_writer_free(gstByteWriter); } /** * Frees @writer and all memory allocated by it except * the current data, which is returned. * * Free-function: g_free * * Returns: the current data. g_free() after usage. */ public ubyte[] freeAndGetData() { ubyte* p = gst_byte_writer_free_and_get_data(gstByteWriter); ownedRef = false; return p[0 .. gstByteWriter.parent.size]; } /** * Resets @writer and returns the current data. * * Free-function: g_free * * Returns: the current data. g_free() after * usage. */ public ubyte[] resetAndGetData() { auto p = gst_byte_writer_reset_and_get_data(gstByteWriter); return p[0 .. gstByteWriter.parent.size]; } /** */ /** * Checks if enough free space from the current write cursor is * available and reallocates if necessary. * * Params: * size = Number of bytes that should be available * * Returns: %TRUE if at least @size bytes are still available */ public bool ensureFreeSpace(uint size) { return gst_byte_writer_ensure_free_space(gstByteWriter, size) != 0; } /** * Writes @size bytes containing @value to @writer. * * Params: * value = Value to be written * size = Number of bytes to be written * * Returns: %TRUE if the value could be written */ public bool fill(ubyte value, uint size) { return gst_byte_writer_fill(gstByteWriter, value, size) != 0; } /** * Frees @writer and all memory allocated by it. */ public void free() { gst_byte_writer_free(gstByteWriter); ownedRef = false; } /** * Frees @writer and all memory allocated by it except * the current data, which is returned as #GstBuffer. * * Free-function: gst_buffer_unref * * Returns: the current data as buffer. gst_buffer_unref() * after usage. */ public Buffer freeAndGetBuffer() { auto p = gst_byte_writer_free_and_get_buffer(gstByteWriter); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Returns the remaining size of data that can still be written. If * -1 is returned the remaining size is only limited by system resources. * * Returns: the remaining size of data that can still be written */ public uint getRemaining() { return gst_byte_writer_get_remaining(gstByteWriter); } /** * Initializes @writer to an empty instance */ public void init() { gst_byte_writer_init(gstByteWriter); } /** * Initializes @writer with the given * memory area. If @initialized is %TRUE it is possible to * read @size bytes from the #GstByteWriter from the beginning. * * Params: * data = Memory area for writing * initialized = If %TRUE the complete data can be read from the beginning */ public void initWithData(ubyte[] data, bool initialized) { gst_byte_writer_init_with_data(gstByteWriter, data.ptr, cast(uint)data.length, initialized); } /** * Initializes @writer with the given initial data size. * * Params: * size = Initial size of data * fixed = If %TRUE the data can't be reallocated */ public void initWithSize(uint size, bool fixed) { gst_byte_writer_init_with_size(gstByteWriter, size, fixed); } /** * Writes @size bytes of @data to @writer. * * Params: * buffer = source #GstBuffer * offset = offset to copy from * size = total size to copy. If -1, all data is copied * * Returns: %TRUE if the data could be written */ public bool putBuffer(Buffer buffer, size_t offset, ptrdiff_t size) { return gst_byte_writer_put_buffer(gstByteWriter, (buffer is null) ? null : buffer.getBufferStruct(), offset, size) != 0; } /** * Writes @size bytes of @data to @writer. * * Params: * data = Data to write * * Returns: %TRUE if the value could be written */ public bool putData(ubyte[] data) { return gst_byte_writer_put_data(gstByteWriter, data.ptr, cast(uint)data.length) != 0; } /** * Writes a big endian 32 bit float to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putFloat32Be(float val) { return gst_byte_writer_put_float32_be(gstByteWriter, val) != 0; } /** * Writes a little endian 32 bit float to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putFloat32Le(float val) { return gst_byte_writer_put_float32_le(gstByteWriter, val) != 0; } /** * Writes a big endian 64 bit float to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putFloat64Be(double val) { return gst_byte_writer_put_float64_be(gstByteWriter, val) != 0; } /** * Writes a little endian 64 bit float to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putFloat64Le(double val) { return gst_byte_writer_put_float64_le(gstByteWriter, val) != 0; } /** * Writes a signed big endian 16 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putInt16Be(short val) { return gst_byte_writer_put_int16_be(gstByteWriter, val) != 0; } /** * Writes a signed little endian 16 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putInt16Le(short val) { return gst_byte_writer_put_int16_le(gstByteWriter, val) != 0; } /** * Writes a signed big endian 24 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putInt24Be(int val) { return gst_byte_writer_put_int24_be(gstByteWriter, val) != 0; } /** * Writes a signed little endian 24 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putInt24Le(int val) { return gst_byte_writer_put_int24_le(gstByteWriter, val) != 0; } /** * Writes a signed big endian 32 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putInt32Be(int val) { return gst_byte_writer_put_int32_be(gstByteWriter, val) != 0; } /** * Writes a signed little endian 32 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putInt32Le(int val) { return gst_byte_writer_put_int32_le(gstByteWriter, val) != 0; } /** * Writes a signed big endian 64 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putInt64Be(long val) { return gst_byte_writer_put_int64_be(gstByteWriter, val) != 0; } /** * Writes a signed little endian 64 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putInt64Le(long val) { return gst_byte_writer_put_int64_le(gstByteWriter, val) != 0; } /** * Writes a signed 8 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putInt8(byte val) { return gst_byte_writer_put_int8(gstByteWriter, val) != 0; } /** * Writes a NUL-terminated UTF16 string to @writer (including the terminator). * * Params: * data = UTF16 string to write * * Returns: %TRUE if the value could be written */ public bool putStringUtf16(ushort[] data) { return gst_byte_writer_put_string_utf16(gstByteWriter, data.ptr) != 0; } /** * Writes a NUL-terminated UTF32 string to @writer (including the terminator). * * Params: * data = UTF32 string to write * * Returns: %TRUE if the value could be written */ public bool putStringUtf32(uint[] data) { return gst_byte_writer_put_string_utf32(gstByteWriter, data.ptr) != 0; } /** * Writes a NUL-terminated UTF8 string to @writer (including the terminator). * * Params: * data = UTF8 string to * write * * Returns: %TRUE if the value could be written */ public bool putStringUtf8(string data) { return gst_byte_writer_put_string_utf8(gstByteWriter, Str.toStringz(data)) != 0; } /** * Writes a unsigned big endian 16 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putUint16Be(ushort val) { return gst_byte_writer_put_uint16_be(gstByteWriter, val) != 0; } /** * Writes a unsigned little endian 16 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putUint16Le(ushort val) { return gst_byte_writer_put_uint16_le(gstByteWriter, val) != 0; } /** * Writes a unsigned big endian 24 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putUint24Be(uint val) { return gst_byte_writer_put_uint24_be(gstByteWriter, val) != 0; } /** * Writes a unsigned little endian 24 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putUint24Le(uint val) { return gst_byte_writer_put_uint24_le(gstByteWriter, val) != 0; } /** * Writes a unsigned big endian 32 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putUint32Be(uint val) { return gst_byte_writer_put_uint32_be(gstByteWriter, val) != 0; } /** * Writes a unsigned little endian 32 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putUint32Le(uint val) { return gst_byte_writer_put_uint32_le(gstByteWriter, val) != 0; } /** * Writes a unsigned big endian 64 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putUint64Be(ulong val) { return gst_byte_writer_put_uint64_be(gstByteWriter, val) != 0; } /** * Writes a unsigned little endian 64 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putUint64Le(ulong val) { return gst_byte_writer_put_uint64_le(gstByteWriter, val) != 0; } /** * Writes a unsigned 8 bit integer to @writer. * * Params: * val = Value to write * * Returns: %TRUE if the value could be written */ public bool putUint8(ubyte val) { return gst_byte_writer_put_uint8(gstByteWriter, val) != 0; } /** * Resets @writer and frees the data if it's * owned by @writer. */ public void reset() { gst_byte_writer_reset(gstByteWriter); } /** * Resets @writer and returns the current data as buffer. * * Free-function: gst_buffer_unref * * Returns: the current data as buffer. gst_buffer_unref() * after usage. */ public Buffer resetAndGetBuffer() { auto p = gst_byte_writer_reset_and_get_buffer(gstByteWriter); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Creates a new, empty #GstByteWriter instance * * Free-function: gst_byte_writer_free * * Returns: a new, empty #GstByteWriter instance * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_byte_writer_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstByteWriter*) p); } /** * Creates a new #GstByteWriter instance with the given * memory area. If @initialized is %TRUE it is possible to * read @size bytes from the #GstByteWriter from the beginning. * * Free-function: gst_byte_writer_free * * Params: * data = Memory area for writing * initialized = If %TRUE the complete data can be read from the beginning * * Returns: a new #GstByteWriter instance * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] data, bool initialized) { auto p = gst_byte_writer_new_with_data(data.ptr, cast(uint)data.length, initialized); if(p is null) { throw new ConstructionException("null returned by new_with_data"); } this(cast(GstByteWriter*) p); } /** * Creates a new #GstByteWriter instance with the given * initial data size. * * Free-function: gst_byte_writer_free * * Params: * size = Initial size of data * fixed = If %TRUE the data can't be reallocated * * Returns: a new #GstByteWriter instance * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint size, bool fixed) { auto p = gst_byte_writer_new_with_size(size, fixed); if(p is null) { throw new ConstructionException("null returned by new_with_size"); } this(cast(GstByteWriter*) p); } } GtkD-3.7.5/generated/gstreamer/gst/base/CollectPads.d000066400000000000000000000440041324604450400223630ustar00rootroot00000000000000/* * 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 gst.base.CollectPads; private import glib.ConstructionException; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.Buffer; private import gstreamer.Event; private import gstreamer.ObjectGst; private import gstreamer.Pad; private import gstreamer.Query; /** * Manages a set of pads that operate in collect mode. This means that control * is given to the manager of this object when all pads have data. * * * Collectpads are created with gst_collect_pads_new(). A callback should then * be installed with gst_collect_pads_set_function (). * * * Pads are added to the collection with gst_collect_pads_add_pad()/ * gst_collect_pads_remove_pad(). The pad * has to be a sinkpad. The chain and event functions of the pad are * overridden. The element_private of the pad is used to store * private information for the collectpads. * * * For each pad, data is queued in the _chain function or by * performing a pull_range. * * * When data is queued on all pads in waiting mode, the callback function is called. * * * Data can be dequeued from the pad with the gst_collect_pads_pop() method. * One can peek at the data with the gst_collect_pads_peek() function. * These functions will return %NULL if the pad received an EOS event. When all * pads return %NULL from a gst_collect_pads_peek(), the element can emit an EOS * event itself. * * * Data can also be dequeued in byte units using the gst_collect_pads_available(), * gst_collect_pads_read_buffer() and gst_collect_pads_flush() calls. * * * Elements should call gst_collect_pads_start() and gst_collect_pads_stop() in * their state change functions to start and stop the processing of the collectpads. * The gst_collect_pads_stop() call should be called before calling the parent * element state change function in the PAUSED_TO_READY state change to ensure * no pad is blocked and the element can finish streaming. * * * gst_collect_pads_set_waiting() sets a pad to waiting or non-waiting mode. * CollectPads element is not waiting for data to be collected on non-waiting pads. * Thus these pads may but need not have data when the callback is called. * All pads are in waiting mode by default. */ public class CollectPads : ObjectGst { /** the main Gtk struct */ protected GstCollectPads* gstCollectPads; /** Get the main Gtk struct */ public GstCollectPads* getCollectPadsStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstCollectPads; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstCollectPads; } protected override void setStruct(GObject* obj) { gstCollectPads = cast(GstCollectPads*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstCollectPads* gstCollectPads, bool ownedRef = false) { this.gstCollectPads = gstCollectPads; super(cast(GstObject*)gstCollectPads, ownedRef); } /** */ public static GType getType() { return gst_collect_pads_get_type(); } /** * Create a new instance of #GstCollectPads. * * MT safe. * * Returns: a new #GstCollectPads, or %NULL in case of an error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_collect_pads_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstCollectPads*) p, true); } /** * Add a pad to the collection of collect pads. The pad has to be * a sinkpad. The refcount of the pad is incremented. Use * gst_collect_pads_remove_pad() to remove the pad from the collection * again. * * You specify a size for the returned #GstCollectData structure * so that you can use it to store additional information. * * You can also specify a #GstCollectDataDestroyNotify that will be called * just before the #GstCollectData structure is freed. It is passed the * pointer to the structure and should free any custom memory and resources * allocated for it. * * Keeping a pad locked in waiting state is only relevant when using * the default collection algorithm (providing the oldest buffer). * It ensures a buffer must be available on this pad for a collection * to take place. This is of typical use to a muxer element where * non-subtitle streams should always be in waiting state, * e.g. to assure that caps information is available on all these streams * when initial headers have to be written. * * The pad will be automatically activated in push mode when @pads is * started. * * MT safe. * * Params: * pad = the pad to add * size = the size of the returned #GstCollectData structure * destroyNotify = function to be called before the returned * #GstCollectData structure is freed * lock = whether to lock this pad in usual waiting state * * Returns: a new #GstCollectData to identify the * new pad. Or %NULL if wrong parameters are supplied. */ public GstCollectData* addPad(Pad pad, uint size, GstCollectDataDestroyNotify destroyNotify, bool lock) { return gst_collect_pads_add_pad(gstCollectPads, (pad is null) ? null : pad.getPadStruct(), size, destroyNotify, lock); } /** * Query how much bytes can be read from each queued buffer. This means * that the result of this call is the maximum number of bytes that can * be read from each of the pads. * * This function should be called with @pads STREAM_LOCK held, such as * in the callback. * * MT safe. * * Returns: The maximum number of bytes queued on all pads. This function * returns 0 if a pad has no queued buffer. */ public uint available() { return gst_collect_pads_available(gstCollectPads); } /** * Convenience clipping function that converts incoming buffer's timestamp * to running time, or clips the buffer if outside configured segment. * * Since 1.6, this clipping function also sets the DTS parameter of the * GstCollectData structure. This version of the running time DTS can be * negative. G_MININT64 is used to indicate invalid value. * * Params: * cdata = collect data of corresponding pad * buf = buffer being clipped * outbuf = output buffer with running time, or NULL if clipped * userData = user data (unused) */ public GstFlowReturn clipRunningTime(GstCollectData* cdata, Buffer buf, out Buffer outbuf, void* userData) { GstBuffer* outoutbuf = null; auto p = gst_collect_pads_clip_running_time(gstCollectPads, cdata, (buf is null) ? null : buf.getBufferStruct(), &outoutbuf, userData); outbuf = ObjectG.getDObject!(Buffer)(outoutbuf); return p; } /** * Default #GstCollectPads event handling that elements should always * chain up to to ensure proper operation. Element might however indicate * event should not be forwarded downstream. * * Params: * data = collect data of corresponding pad * event = event being processed * discard = process but do not send event downstream */ public bool eventDefault(GstCollectData* data, Event event, bool discard) { return gst_collect_pads_event_default(gstCollectPads, data, (event is null) ? null : event.getEventStruct(), discard) != 0; } /** * Flush @size bytes from the pad @data. * * This function should be called with @pads STREAM_LOCK held, such as * in the callback. * * MT safe. * * Params: * data = the data to use * size = the number of bytes to flush * * Returns: The number of bytes flushed This can be less than @size and * is 0 if the pad was end-of-stream. */ public uint flush(GstCollectData* data, uint size) { return gst_collect_pads_flush(gstCollectPads, data, size); } /** * Peek at the buffer currently queued in @data. This function * should be called with the @pads STREAM_LOCK held, such as in the callback * handler. * * MT safe. * * Params: * data = the data to use * * Returns: The buffer in @data or %NULL if no * buffer is queued. should unref the buffer after usage. */ public Buffer peek(GstCollectData* data) { auto p = gst_collect_pads_peek(gstCollectPads, data); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Pop the buffer currently queued in @data. This function * should be called with the @pads STREAM_LOCK held, such as in the callback * handler. * * MT safe. * * Params: * data = the data to use * * Returns: The buffer in @data or %NULL if no * buffer was queued. You should unref the buffer after usage. */ public Buffer pop(GstCollectData* data) { auto p = gst_collect_pads_pop(gstCollectPads, data); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Default #GstCollectPads query handling that elements should always * chain up to to ensure proper operation. Element might however indicate * query should not be forwarded downstream. * * Params: * data = collect data of corresponding pad * query = query being processed * discard = process but do not send event downstream */ public bool queryDefault(GstCollectData* data, Query query, bool discard) { return gst_collect_pads_query_default(gstCollectPads, data, (query is null) ? null : query.getQueryStruct(), discard) != 0; } /** * Get a subbuffer of @size bytes from the given pad @data. * * This function should be called with @pads STREAM_LOCK held, such as in the * callback. * * MT safe. * * Params: * data = the data to use * size = the number of bytes to read * * Returns: A sub buffer. The size of the buffer can * be less that requested. A return of %NULL signals that the pad is * end-of-stream. Unref the buffer after use. */ public Buffer readBuffer(GstCollectData* data, uint size) { auto p = gst_collect_pads_read_buffer(gstCollectPads, data, size); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Remove a pad from the collection of collect pads. This function will also * free the #GstCollectData and all the resources that were allocated with * gst_collect_pads_add_pad(). * * The pad will be deactivated automatically when @pads is stopped. * * MT safe. * * Params: * pad = the pad to remove * * Returns: %TRUE if the pad could be removed. */ public bool removePad(Pad pad) { return gst_collect_pads_remove_pad(gstCollectPads, (pad is null) ? null : pad.getPadStruct()) != 0; } /** * Set the callback function and user data that will be called with * the oldest buffer when all pads have been collected, or %NULL on EOS. * If a buffer is passed, the callback owns a reference and must unref * it. * * MT safe. * * Params: * func = the function to set * userData = user data passed to the function */ public void setBufferFunction(GstCollectPadsBufferFunction func, void* userData) { gst_collect_pads_set_buffer_function(gstCollectPads, func, userData); } /** * Install a clipping function that is called right after a buffer is received * on a pad managed by @pads. See #GstCollectPadsClipFunction for more info. * * Params: * clipfunc = clip function to install * userData = user data to pass to @clip_func */ public void setClipFunction(GstCollectPadsClipFunction clipfunc, void* userData) { gst_collect_pads_set_clip_function(gstCollectPads, clipfunc, userData); } /** * Set the timestamp comparison function. * * MT safe. * * Params: * func = the function to set * userData = user data passed to the function */ public void setCompareFunction(GstCollectPadsCompareFunction func, void* userData) { gst_collect_pads_set_compare_function(gstCollectPads, func, userData); } /** * Set the event callback function and user data that will be called when * collectpads has received an event originating from one of the collected * pads. If the event being processed is a serialized one, this callback is * called with @pads STREAM_LOCK held, otherwise not. As this lock should be * held when calling a number of CollectPads functions, it should be acquired * if so (unusually) needed. * * MT safe. * * Params: * func = the function to set * userData = user data passed to the function */ public void setEventFunction(GstCollectPadsEventFunction func, void* userData) { gst_collect_pads_set_event_function(gstCollectPads, func, userData); } /** * Install a flush function that is called when the internal * state of all pads should be flushed as part of flushing seek * handling. See #GstCollectPadsFlushFunction for more info. * * Params: * func = flush function to install * userData = user data to pass to @func * * Since: 1.4 */ public void setFlushFunction(GstCollectPadsFlushFunction func, void* userData) { gst_collect_pads_set_flush_function(gstCollectPads, func, userData); } /** * Change the flushing state of all the pads in the collection. No pad * is able to accept anymore data when @flushing is %TRUE. Calling this * function with @flushing %FALSE makes @pads accept data again. * Caller must ensure that downstream streaming (thread) is not blocked, * e.g. by sending a FLUSH_START downstream. * * MT safe. * * Params: * flushing = desired state of the pads */ public void setFlushing(bool flushing) { gst_collect_pads_set_flushing(gstCollectPads, flushing); } /** * CollectPads provides a default collection algorithm that will determine * the oldest buffer available on all of its pads, and then delegate * to a configured callback. * However, if circumstances are more complicated and/or more control * is desired, this sets a callback that will be invoked instead when * all the pads added to the collection have buffers queued. * Evidently, this callback is not compatible with * gst_collect_pads_set_buffer_function() callback. * If this callback is set, the former will be unset. * * MT safe. * * Params: * func = the function to set * userData = user data passed to the function */ public void setFunction(GstCollectPadsFunction func, void* userData) { gst_collect_pads_set_function(gstCollectPads, func, userData); } /** * Set the query callback function and user data that will be called after * collectpads has received a query originating from one of the collected * pads. If the query being processed is a serialized one, this callback is * called with @pads STREAM_LOCK held, otherwise not. As this lock should be * held when calling a number of CollectPads functions, it should be acquired * if so (unusually) needed. * * MT safe. * * Params: * func = the function to set * userData = user data passed to the function */ public void setQueryFunction(GstCollectPadsQueryFunction func, void* userData) { gst_collect_pads_set_query_function(gstCollectPads, func, userData); } /** * Sets a pad to waiting or non-waiting mode, if at least this pad * has not been created with locked waiting state, * in which case nothing happens. * * This function should be called with @pads STREAM_LOCK held, such as * in the callback. * * MT safe. * * Params: * data = the data to use * waiting = boolean indicating whether this pad should operate * in waiting or non-waiting mode */ public void setWaiting(GstCollectData* data, bool waiting) { gst_collect_pads_set_waiting(gstCollectPads, data, waiting); } /** * Default #GstCollectPads event handling for the src pad of elements. * Elements can chain up to this to let flushing seek event handling * be done by #GstCollectPads. * * Params: * pad = src #GstPad that received the event * event = event being processed * * Since: 1.4 */ public bool srcEventDefault(Pad pad, Event event) { return gst_collect_pads_src_event_default(gstCollectPads, (pad is null) ? null : pad.getPadStruct(), (event is null) ? null : event.getEventStruct()) != 0; } /** * Starts the processing of data in the collect_pads. * * MT safe. */ public void start() { gst_collect_pads_start(gstCollectPads); } /** * Stops the processing of data in the collect_pads. this function * will also unblock any blocking operations. * * MT safe. */ public void stop() { gst_collect_pads_stop(gstCollectPads); } /** * Get a subbuffer of @size bytes from the given pad @data. Flushes the amount * of read bytes. * * This function should be called with @pads STREAM_LOCK held, such as in the * callback. * * MT safe. * * Params: * data = the data to use * size = the number of bytes to read * * Returns: A sub buffer. The size of the buffer can * be less that requested. A return of %NULL signals that the pad is * end-of-stream. Unref the buffer after use. */ public Buffer takeBuffer(GstCollectData* data, uint size) { auto p = gst_collect_pads_take_buffer(gstCollectPads, data, size); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } } GtkD-3.7.5/generated/gstreamer/gst/base/DataQueue.d000066400000000000000000000255061324604450400220520ustar00rootroot00000000000000/* * 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 gst.base.DataQueue; private import glib.ConstructionException; private import gobject.ObjectG; private import gobject.Signals; private import gst.base.c.functions; public import gst.base.c.types; private import std.algorithm; /** * #GstDataQueue is an object that handles threadsafe queueing of objects. It * also provides size-related functionality. This object should be used for * any #GstElement that wishes to provide some sort of queueing functionality. */ public class DataQueue : ObjectG { /** the main Gtk struct */ protected GstDataQueue* gstDataQueue; /** Get the main Gtk struct */ public GstDataQueue* getDataQueueStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstDataQueue; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstDataQueue; } protected override void setStruct(GObject* obj) { gstDataQueue = cast(GstDataQueue*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstDataQueue* gstDataQueue, bool ownedRef = false) { this.gstDataQueue = gstDataQueue; super(cast(GObject*)gstDataQueue, ownedRef); } /** */ public static GType getType() { return gst_data_queue_get_type(); } /** * Creates a new #GstDataQueue. If @fullcallback or @emptycallback are supplied, then * the #GstDataQueue will call the respective callback to signal full or empty condition. * If the callbacks are NULL the #GstDataQueue will instead emit 'full' and 'empty' * signals. * * Params: * checkfull = the callback used to tell if the element considers the queue full * or not. * fullcallback = the callback which will be called when the queue is considered full. * emptycallback = the callback which will be called when the queue is considered empty. * checkdata = a #gpointer that will be passed to the @checkfull, @fullcallback, * and @emptycallback callbacks. * * Returns: a new #GstDataQueue. * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstDataQueueCheckFullFunction checkfull, GstDataQueueFullCallback fullcallback, GstDataQueueEmptyCallback emptycallback, void* checkdata) { auto p = gst_data_queue_new(checkfull, fullcallback, emptycallback, checkdata); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstDataQueue*) p, true); } /** * Pop and unref the head-most #GstMiniObject with the given #GType. * * Params: * type = The #GType of the item to drop. * * Returns: %TRUE if an element was removed. * * Since: 1.2 */ public bool dropHead(GType type) { return gst_data_queue_drop_head(gstDataQueue, type) != 0; } /** * Flushes all the contents of the @queue. Any call to #gst_data_queue_push and * #gst_data_queue_pop will be released. * MT safe. * * Since: 1.2 */ public void flush() { gst_data_queue_flush(gstDataQueue); } /** * Get the current level of the queue. * * Params: * level = the location to store the result * * Since: 1.2 */ public void getLevel(out GstDataQueueSize level) { gst_data_queue_get_level(gstDataQueue, &level); } /** * Queries if there are any items in the @queue. * MT safe. * * Returns: %TRUE if @queue is empty. * * Since: 1.2 */ public bool isEmpty() { return gst_data_queue_is_empty(gstDataQueue) != 0; } /** * Queries if @queue is full. This check will be done using the * #GstDataQueueCheckFullFunction registered with @queue. * MT safe. * * Returns: %TRUE if @queue is full. * * Since: 1.2 */ public bool isFull() { return gst_data_queue_is_full(gstDataQueue) != 0; } /** * Inform the queue that the limits for the fullness check have changed and that * any blocking gst_data_queue_push() should be unblocked to recheck the limits. * * Since: 1.2 */ public void limitsChanged() { gst_data_queue_limits_changed(gstDataQueue); } /** * Retrieves the first @item available on the @queue without removing it. * If the queue is currently empty, the call will block until at least * one item is available, OR the @queue is set to the flushing state. * MT safe. * * Params: * item = pointer to store the returned #GstDataQueueItem. * * Returns: %TRUE if an @item was successfully retrieved from the @queue. * * Since: 1.2 */ public bool peek(out GstDataQueueItem* item) { return gst_data_queue_peek(gstDataQueue, &item) != 0; } /** * Retrieves the first @item available on the @queue. If the queue is currently * empty, the call will block until at least one item is available, OR the * @queue is set to the flushing state. * MT safe. * * Params: * item = pointer to store the returned #GstDataQueueItem. * * Returns: %TRUE if an @item was successfully retrieved from the @queue. * * Since: 1.2 */ public bool pop(out GstDataQueueItem* item) { return gst_data_queue_pop(gstDataQueue, &item) != 0; } /** * Pushes a #GstDataQueueItem (or a structure that begins with the same fields) * on the @queue. If the @queue is full, the call will block until space is * available, OR the @queue is set to flushing state. * MT safe. * * Note that this function has slightly different semantics than gst_pad_push() * and gst_pad_push_event(): this function only takes ownership of @item and * the #GstMiniObject contained in @item if the push was successful. If %FALSE * is returned, the caller is responsible for freeing @item and its contents. * * Params: * item = a #GstDataQueueItem. * * Returns: %TRUE if the @item was successfully pushed on the @queue. * * Since: 1.2 */ public bool push(GstDataQueueItem* item) { return gst_data_queue_push(gstDataQueue, item) != 0; } /** * Pushes a #GstDataQueueItem (or a structure that begins with the same fields) * on the @queue. It ignores if the @queue is full or not and forces the @item * to be pushed anyway. * MT safe. * * Note that this function has slightly different semantics than gst_pad_push() * and gst_pad_push_event(): this function only takes ownership of @item and * the #GstMiniObject contained in @item if the push was successful. If %FALSE * is returned, the caller is responsible for freeing @item and its contents. * * Params: * item = a #GstDataQueueItem. * * Returns: %TRUE if the @item was successfully pushed on the @queue. * * Since: 1.2 */ public bool pushForce(GstDataQueueItem* item) { return gst_data_queue_push_force(gstDataQueue, item) != 0; } /** * Sets the queue to flushing state if @flushing is %TRUE. If set to flushing * state, any incoming data on the @queue will be discarded. Any call currently * blocking on #gst_data_queue_push or #gst_data_queue_pop will return straight * away with a return value of %FALSE. While the @queue is in flushing state, * all calls to those two functions will return %FALSE. * * MT Safe. * * Params: * flushing = a #gboolean stating if the queue will be flushing or not. * * Since: 1.2 */ public void setFlushing(bool flushing) { gst_data_queue_set_flushing(gstDataQueue, flushing); } protected class OnEmptyDelegateWrapper { void delegate(DataQueue) dlg; gulong handlerId; this(void delegate(DataQueue) dlg) { this.dlg = dlg; onEmptyListeners ~= this; } void remove(OnEmptyDelegateWrapper source) { foreach(index, wrapper; onEmptyListeners) { if (wrapper.handlerId == source.handlerId) { onEmptyListeners[index] = null; onEmptyListeners = std.algorithm.remove(onEmptyListeners, index); break; } } } } OnEmptyDelegateWrapper[] onEmptyListeners; /** * Reports that the queue became empty (empty). * A queue is empty if the total amount of visible items inside it (num-visible, time, * size) is lower than the boundary values which can be set through the GObject * properties. */ gulong addOnEmpty(void delegate(DataQueue) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnEmptyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "empty", cast(GCallback)&callBackEmpty, cast(void*)wrapper, cast(GClosureNotify)&callBackEmptyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackEmpty(GstDataQueue* dataqueueStruct, OnEmptyDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackEmptyDestroy(OnEmptyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnFullDelegateWrapper { void delegate(DataQueue) dlg; gulong handlerId; this(void delegate(DataQueue) dlg) { this.dlg = dlg; onFullListeners ~= this; } void remove(OnFullDelegateWrapper source) { foreach(index, wrapper; onFullListeners) { if (wrapper.handlerId == source.handlerId) { onFullListeners[index] = null; onFullListeners = std.algorithm.remove(onFullListeners, index); break; } } } } OnFullDelegateWrapper[] onFullListeners; /** * Reports that the queue became full (full). * A queue is full if the total amount of data inside it (num-visible, time, * size) is higher than the boundary values which can be set through the GObject * properties. */ gulong addOnFull(void delegate(DataQueue) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnFullDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "full", cast(GCallback)&callBackFull, cast(void*)wrapper, cast(GClosureNotify)&callBackFullDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackFull(GstDataQueue* dataqueueStruct, OnFullDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackFullDestroy(OnFullDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gst/base/FlowCombiner.d000066400000000000000000000153321324604450400225560ustar00rootroot00000000000000/* * 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 gst.base.FlowCombiner; private import glib.ConstructionException; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gstreamer.Pad; private import gtkd.Loader; /** * Utility struct to help handling #GstFlowReturn combination. Useful for * #GstElements that have multiple source pads and need to combine * the different #GstFlowReturn for those pads. * * #GstFlowCombiner works by using the last #GstFlowReturn for all #GstPad * it has in its list and computes the combined return value and provides * it to the caller. * * To add a new pad to the #GstFlowCombiner use gst_flow_combiner_add_pad(). * The new #GstPad is stored with a default value of %GST_FLOW_OK. * * In case you want a #GstPad to be removed, use gst_flow_combiner_remove_pad(). * * Please be aware that this struct isn't thread safe as its designed to be * used by demuxers, those usually will have a single thread operating it. * * These functions will take refs on the passed #GstPads. * * Aside from reducing the user's code size, the main advantage of using this * helper struct is to follow the standard rules for #GstFlowReturn combination. * These rules are: * * * %GST_FLOW_EOS: only if all returns are EOS too * * %GST_FLOW_NOT_LINKED: only if all returns are NOT_LINKED too * * %GST_FLOW_ERROR or below: if at least one returns an error return * * %GST_FLOW_NOT_NEGOTIATED: if at least one returns a not-negotiated return * * %GST_FLOW_FLUSHING: if at least one returns flushing * * %GST_FLOW_OK: otherwise * * %GST_FLOW_ERROR or below, GST_FLOW_NOT_NEGOTIATED and GST_FLOW_FLUSHING are * returned immediatelly from the gst_flow_combiner_update_flow() function. * * Since: 1.4 */ public class FlowCombiner { /** the main Gtk struct */ protected GstFlowCombiner* gstFlowCombiner; protected bool ownedRef; /** Get the main Gtk struct */ public GstFlowCombiner* getFlowCombinerStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstFlowCombiner; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstFlowCombiner; } /** * Sets our main struct and passes it to the parent class. */ public this (GstFlowCombiner* gstFlowCombiner, bool ownedRef = false) { this.gstFlowCombiner = gstFlowCombiner; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTBASE) && ownedRef ) gst_flow_combiner_unref(gstFlowCombiner); } /** */ public static GType getType() { return gst_flow_combiner_get_type(); } /** * Creates a new #GstFlowCombiner, use gst_flow_combiner_free() to free it. * * Returns: A new #GstFlowCombiner * * Since: 1.4 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_flow_combiner_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstFlowCombiner*) p); } /** * Adds a new #GstPad to the #GstFlowCombiner. * * Params: * pad = the #GstPad that is being added * * Since: 1.4 */ public void addPad(Pad pad) { gst_flow_combiner_add_pad(gstFlowCombiner, (pad is null) ? null : pad.getPadStruct()); } /** * Removes all pads from a #GstFlowCombiner and resets it to its initial state. * * Since: 1.6 */ public void clear() { gst_flow_combiner_clear(gstFlowCombiner); } /** * Frees a #GstFlowCombiner struct and all its internal data. * * Since: 1.4 */ public void free() { gst_flow_combiner_free(gstFlowCombiner); ownedRef = false; } /** */ public FlowCombiner doref() { auto p = gst_flow_combiner_ref(gstFlowCombiner); if(p is null) { return null; } return ObjectG.getDObject!(FlowCombiner)(cast(GstFlowCombiner*) p, true); } /** * Removes a #GstPad from the #GstFlowCombiner. * * Params: * pad = the #GstPad to remove * * Since: 1.4 */ public void removePad(Pad pad) { gst_flow_combiner_remove_pad(gstFlowCombiner, (pad is null) ? null : pad.getPadStruct()); } /** * Reset flow combiner and all pads to their initial state without removing pads. * * Since: 1.6 */ public void reset() { gst_flow_combiner_reset(gstFlowCombiner); } /** */ public void unref() { gst_flow_combiner_unref(gstFlowCombiner); } /** * Computes the combined flow return for the pads in it. * * The #GstFlowReturn parameter should be the last flow return update for a pad * in this #GstFlowCombiner. It will use this value to be able to shortcut some * combinations and avoid looking over all pads again. e.g. The last combined * return is the same as the latest obtained #GstFlowReturn. * * Params: * fret = the latest #GstFlowReturn received for a pad in this #GstFlowCombiner * * Returns: The combined #GstFlowReturn * * Since: 1.4 */ public GstFlowReturn updateFlow(GstFlowReturn fret) { return gst_flow_combiner_update_flow(gstFlowCombiner, fret); } /** * Sets the provided pad's last flow return to provided value and computes * the combined flow return for the pads in it. * * The #GstFlowReturn parameter should be the last flow return update for a pad * in this #GstFlowCombiner. It will use this value to be able to shortcut some * combinations and avoid looking over all pads again. e.g. The last combined * return is the same as the latest obtained #GstFlowReturn. * * Params: * pad = the #GstPad whose #GstFlowReturn to update * fret = the latest #GstFlowReturn received for a pad in this #GstFlowCombiner * * Returns: The combined #GstFlowReturn * * Since: 1.6 */ public GstFlowReturn updatePadFlow(Pad pad, GstFlowReturn fret) { return gst_flow_combiner_update_pad_flow(gstFlowCombiner, (pad is null) ? null : pad.getPadStruct(), fret); } } GtkD-3.7.5/generated/gstreamer/gst/base/PushSrc.d000066400000000000000000000052541324604450400215610ustar00rootroot00000000000000/* * 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 gst.base.PushSrc; private import gst.base.BaseSrc; private import gst.base.c.functions; public import gst.base.c.types; /** * This class is mostly useful for elements that cannot do * random access, or at least very slowly. The source usually * prefers to push out a fixed size buffer. * * Subclasses usually operate in a format that is different from the * default GST_FORMAT_BYTES format of #GstBaseSrc. * * Classes extending this base class will usually be scheduled * in a push based mode. If the peer accepts to operate without * offsets and within the limits of the allowed block size, this * class can operate in getrange based mode automatically. To make * this possible, the subclass should implement and override the * SCHEDULING query. * * The subclass should extend the methods from the baseclass in * addition to the ::create method. * * Seeking, flushing, scheduling and sync is all handled by this * base class. */ public class PushSrc : BaseSrc { /** the main Gtk struct */ protected GstPushSrc* gstPushSrc; /** Get the main Gtk struct */ public GstPushSrc* getPushSrcStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstPushSrc; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstPushSrc; } protected override void setStruct(GObject* obj) { gstPushSrc = cast(GstPushSrc*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstPushSrc* gstPushSrc, bool ownedRef = false) { this.gstPushSrc = gstPushSrc; super(cast(GstBaseSrc*)gstPushSrc, ownedRef); } /** */ public static GType getType() { return gst_push_src_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/base/QueueArray.d000066400000000000000000000156751324604450400222650ustar00rootroot00000000000000/* * 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 gst.base.QueueArray; private import glib.ConstructionException; private import gobject.ObjectG; private import gst.base.c.functions; public import gst.base.c.types; private import gtkd.Loader; /** * #GstQueueArray is an object that provides standard queue functionality * based on an array instead of linked lists. This reduces the overhead * caused by memory management by a large factor. */ public class QueueArray { /** the main Gtk struct */ protected GstQueueArray* gstQueueArray; protected bool ownedRef; /** Get the main Gtk struct */ public GstQueueArray* getQueueArrayStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstQueueArray; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstQueueArray; } /** * Sets our main struct and passes it to the parent class. */ public this (GstQueueArray* gstQueueArray, bool ownedRef = false) { this.gstQueueArray = gstQueueArray; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTBASE) && ownedRef ) gst_queue_array_free(gstQueueArray); } /** * Drops the queue element at position @idx from queue @array. * * Params: * idx = index to drop * * Returns: the dropped element * * Since: 1.2 */ public void* dropElement(uint idx) { return gst_queue_array_drop_element(gstQueueArray, idx); } /** * Drops the queue element at position @idx from queue @array and copies the * data of the element or structure that was removed into @p_struct if * @p_struct is set (not NULL). * * Params: * idx = index to drop * pStruct = address into which to store the data of the dropped structure, or NULL * * Returns: TRUE on success, or FALSE on error * * Since: 1.6 */ public bool dropStruct(uint idx, void* pStruct) { return gst_queue_array_drop_struct(gstQueueArray, idx, pStruct) != 0; } /** * Finds an element in the queue @array, either by comparing every element * with @func or by looking up @data if no compare function @func is provided, * and returning the index of the found element. * * Note that the index is not 0-based, but an internal index number with a * random offset. The index can be used in connection with * gst_queue_array_drop_element(). FIXME: return index 0-based and make * gst_queue_array_drop_element() take a 0-based index. * * Params: * func = comparison function, or %NULL to find @data by value * data = data for comparison function * * Returns: Index of the found element or -1 if nothing was found. * * Since: 1.2 */ public uint find(GCompareFunc func, void* data) { return gst_queue_array_find(gstQueueArray, func, data); } /** * Frees queue @array and all memory associated to it. * * Since: 1.2 */ public void free() { gst_queue_array_free(gstQueueArray); ownedRef = false; } /** * Returns the length of the queue @array * * Returns: the length of the queue @array. * * Since: 1.2 */ public uint getLength() { return gst_queue_array_get_length(gstQueueArray); } /** * Checks if the queue @array is empty. * * Returns: %TRUE if the queue @array is empty * * Since: 1.2 */ public bool isEmpty() { return gst_queue_array_is_empty(gstQueueArray) != 0; } /** * Returns the head of the queue @array and does not * remove it from the queue. * * Returns: The head of the queue * * Since: 1.2 */ public void* peekHead() { return gst_queue_array_peek_head(gstQueueArray); } /** * Returns the head of the queue @array without removing it from the queue. * * Returns: pointer to element or struct, or NULL if @array was empty. The * data pointed to by the returned pointer stays valid only as long as * the queue array is not modified further! * * Since: 1.6 */ public void* peekHeadStruct() { return gst_queue_array_peek_head_struct(gstQueueArray); } /** * Returns and head of the queue @array and removes * it from the queue. * * Returns: The head of the queue * * Since: 1.2 */ public void* popHead() { return gst_queue_array_pop_head(gstQueueArray); } /** * Returns the head of the queue @array and removes it from the queue. * * Returns: pointer to element or struct, or NULL if @array was empty. The * data pointed to by the returned pointer stays valid only as long as * the queue array is not modified further! * * Since: 1.6 */ public void* popHeadStruct() { return gst_queue_array_pop_head_struct(gstQueueArray); } /** * Pushes @data to the tail of the queue @array. * * Params: * data = object to push * * Since: 1.2 */ public void pushTail(void* data) { gst_queue_array_push_tail(gstQueueArray, data); } /** */ public void pushTailStruct(void* pStruct) { gst_queue_array_push_tail_struct(gstQueueArray, pStruct); } /** * Allocates a new #GstQueueArray object with an initial * queue size of @initial_size. * * Params: * initialSize = Initial size of the new queue * * Returns: a new #GstQueueArray object * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint initialSize) { auto p = gst_queue_array_new(initialSize); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstQueueArray*) p); } /** * Allocates a new #GstQueueArray object for elements (e.g. structures) * of size @struct_size, with an initial queue size of @initial_size. * * Params: * structSize = Size of each element (e.g. structure) in the array * initialSize = Initial size of the new queue * * Returns: a new #GstQueueArray object * * Since: 1.6 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(size_t structSize, uint initialSize) { auto p = gst_queue_array_new_for_struct(structSize, initialSize); if(p is null) { throw new ConstructionException("null returned by new_for_struct"); } this(cast(GstQueueArray*) p); } } GtkD-3.7.5/generated/gstreamer/gst/base/c/000077500000000000000000000000001324604450400202415ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gst/base/c/functions.d000066400000000000000000002306341324604450400224260ustar00rootroot00000000000000/* * 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 gst.base.c.functions; import std.stdio; import gst.base.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GSTBASE = ["libgstbase-1.0-0.dll"]; else version (OSX) static immutable LIBRARY_GSTBASE = ["libgstbase-1.0.0.dylib"]; else static immutable LIBRARY_GSTBASE = ["libgstbase-1.0.so.0"]; shared static this() { // gst.base.Adapter Linker.link(gst_adapter_get_type, "gst_adapter_get_type", LIBRARY_GSTBASE); Linker.link(gst_adapter_new, "gst_adapter_new", LIBRARY_GSTBASE); Linker.link(gst_adapter_available, "gst_adapter_available", LIBRARY_GSTBASE); Linker.link(gst_adapter_available_fast, "gst_adapter_available_fast", LIBRARY_GSTBASE); Linker.link(gst_adapter_clear, "gst_adapter_clear", LIBRARY_GSTBASE); Linker.link(gst_adapter_copy, "gst_adapter_copy", LIBRARY_GSTBASE); Linker.link(gst_adapter_copy_bytes, "gst_adapter_copy_bytes", LIBRARY_GSTBASE); Linker.link(gst_adapter_distance_from_discont, "gst_adapter_distance_from_discont", LIBRARY_GSTBASE); Linker.link(gst_adapter_dts_at_discont, "gst_adapter_dts_at_discont", LIBRARY_GSTBASE); Linker.link(gst_adapter_flush, "gst_adapter_flush", LIBRARY_GSTBASE); Linker.link(gst_adapter_get_buffer, "gst_adapter_get_buffer", LIBRARY_GSTBASE); Linker.link(gst_adapter_get_buffer_fast, "gst_adapter_get_buffer_fast", LIBRARY_GSTBASE); Linker.link(gst_adapter_get_buffer_list, "gst_adapter_get_buffer_list", LIBRARY_GSTBASE); Linker.link(gst_adapter_get_list, "gst_adapter_get_list", LIBRARY_GSTBASE); Linker.link(gst_adapter_map, "gst_adapter_map", LIBRARY_GSTBASE); Linker.link(gst_adapter_masked_scan_uint32, "gst_adapter_masked_scan_uint32", LIBRARY_GSTBASE); Linker.link(gst_adapter_masked_scan_uint32_peek, "gst_adapter_masked_scan_uint32_peek", LIBRARY_GSTBASE); Linker.link(gst_adapter_offset_at_discont, "gst_adapter_offset_at_discont", LIBRARY_GSTBASE); Linker.link(gst_adapter_prev_dts, "gst_adapter_prev_dts", LIBRARY_GSTBASE); Linker.link(gst_adapter_prev_dts_at_offset, "gst_adapter_prev_dts_at_offset", LIBRARY_GSTBASE); Linker.link(gst_adapter_prev_offset, "gst_adapter_prev_offset", LIBRARY_GSTBASE); Linker.link(gst_adapter_prev_pts, "gst_adapter_prev_pts", LIBRARY_GSTBASE); Linker.link(gst_adapter_prev_pts_at_offset, "gst_adapter_prev_pts_at_offset", LIBRARY_GSTBASE); Linker.link(gst_adapter_pts_at_discont, "gst_adapter_pts_at_discont", LIBRARY_GSTBASE); Linker.link(gst_adapter_push, "gst_adapter_push", LIBRARY_GSTBASE); Linker.link(gst_adapter_take, "gst_adapter_take", LIBRARY_GSTBASE); Linker.link(gst_adapter_take_buffer, "gst_adapter_take_buffer", LIBRARY_GSTBASE); Linker.link(gst_adapter_take_buffer_fast, "gst_adapter_take_buffer_fast", LIBRARY_GSTBASE); Linker.link(gst_adapter_take_buffer_list, "gst_adapter_take_buffer_list", LIBRARY_GSTBASE); Linker.link(gst_adapter_take_list, "gst_adapter_take_list", LIBRARY_GSTBASE); Linker.link(gst_adapter_unmap, "gst_adapter_unmap", LIBRARY_GSTBASE); // gst.base.BaseParse Linker.link(gst_base_parse_get_type, "gst_base_parse_get_type", LIBRARY_GSTBASE); Linker.link(gst_base_parse_add_index_entry, "gst_base_parse_add_index_entry", LIBRARY_GSTBASE); Linker.link(gst_base_parse_convert_default, "gst_base_parse_convert_default", LIBRARY_GSTBASE); Linker.link(gst_base_parse_drain, "gst_base_parse_drain", LIBRARY_GSTBASE); Linker.link(gst_base_parse_finish_frame, "gst_base_parse_finish_frame", LIBRARY_GSTBASE); Linker.link(gst_base_parse_merge_tags, "gst_base_parse_merge_tags", LIBRARY_GSTBASE); Linker.link(gst_base_parse_push_frame, "gst_base_parse_push_frame", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_average_bitrate, "gst_base_parse_set_average_bitrate", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_duration, "gst_base_parse_set_duration", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_frame_rate, "gst_base_parse_set_frame_rate", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_has_timing_info, "gst_base_parse_set_has_timing_info", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_infer_ts, "gst_base_parse_set_infer_ts", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_latency, "gst_base_parse_set_latency", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_min_frame_size, "gst_base_parse_set_min_frame_size", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_passthrough, "gst_base_parse_set_passthrough", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_pts_interpolation, "gst_base_parse_set_pts_interpolation", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_syncable, "gst_base_parse_set_syncable", LIBRARY_GSTBASE); Linker.link(gst_base_parse_set_ts_at_offset, "gst_base_parse_set_ts_at_offset", LIBRARY_GSTBASE); // gst.base.BaseParseFrame Linker.link(gst_base_parse_frame_get_type, "gst_base_parse_frame_get_type", LIBRARY_GSTBASE); Linker.link(gst_base_parse_frame_new, "gst_base_parse_frame_new", LIBRARY_GSTBASE); Linker.link(gst_base_parse_frame_copy, "gst_base_parse_frame_copy", LIBRARY_GSTBASE); Linker.link(gst_base_parse_frame_free, "gst_base_parse_frame_free", LIBRARY_GSTBASE); Linker.link(gst_base_parse_frame_init, "gst_base_parse_frame_init", LIBRARY_GSTBASE); // gst.base.BaseSink Linker.link(gst_base_sink_get_type, "gst_base_sink_get_type", LIBRARY_GSTBASE); Linker.link(gst_base_sink_do_preroll, "gst_base_sink_do_preroll", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_blocksize, "gst_base_sink_get_blocksize", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_drop_out_of_segment, "gst_base_sink_get_drop_out_of_segment", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_last_sample, "gst_base_sink_get_last_sample", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_latency, "gst_base_sink_get_latency", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_max_bitrate, "gst_base_sink_get_max_bitrate", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_max_lateness, "gst_base_sink_get_max_lateness", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_render_delay, "gst_base_sink_get_render_delay", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_sync, "gst_base_sink_get_sync", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_throttle_time, "gst_base_sink_get_throttle_time", LIBRARY_GSTBASE); Linker.link(gst_base_sink_get_ts_offset, "gst_base_sink_get_ts_offset", LIBRARY_GSTBASE); Linker.link(gst_base_sink_is_async_enabled, "gst_base_sink_is_async_enabled", LIBRARY_GSTBASE); Linker.link(gst_base_sink_is_last_sample_enabled, "gst_base_sink_is_last_sample_enabled", LIBRARY_GSTBASE); Linker.link(gst_base_sink_is_qos_enabled, "gst_base_sink_is_qos_enabled", LIBRARY_GSTBASE); Linker.link(gst_base_sink_query_latency, "gst_base_sink_query_latency", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_async_enabled, "gst_base_sink_set_async_enabled", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_blocksize, "gst_base_sink_set_blocksize", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_drop_out_of_segment, "gst_base_sink_set_drop_out_of_segment", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_last_sample_enabled, "gst_base_sink_set_last_sample_enabled", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_max_bitrate, "gst_base_sink_set_max_bitrate", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_max_lateness, "gst_base_sink_set_max_lateness", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_qos_enabled, "gst_base_sink_set_qos_enabled", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_render_delay, "gst_base_sink_set_render_delay", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_sync, "gst_base_sink_set_sync", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_throttle_time, "gst_base_sink_set_throttle_time", LIBRARY_GSTBASE); Linker.link(gst_base_sink_set_ts_offset, "gst_base_sink_set_ts_offset", LIBRARY_GSTBASE); Linker.link(gst_base_sink_wait, "gst_base_sink_wait", LIBRARY_GSTBASE); Linker.link(gst_base_sink_wait_clock, "gst_base_sink_wait_clock", LIBRARY_GSTBASE); Linker.link(gst_base_sink_wait_preroll, "gst_base_sink_wait_preroll", LIBRARY_GSTBASE); // gst.base.BaseSrc Linker.link(gst_base_src_get_type, "gst_base_src_get_type", LIBRARY_GSTBASE); Linker.link(gst_base_src_get_allocator, "gst_base_src_get_allocator", LIBRARY_GSTBASE); Linker.link(gst_base_src_get_blocksize, "gst_base_src_get_blocksize", LIBRARY_GSTBASE); Linker.link(gst_base_src_get_buffer_pool, "gst_base_src_get_buffer_pool", LIBRARY_GSTBASE); Linker.link(gst_base_src_get_do_timestamp, "gst_base_src_get_do_timestamp", LIBRARY_GSTBASE); Linker.link(gst_base_src_is_async, "gst_base_src_is_async", LIBRARY_GSTBASE); Linker.link(gst_base_src_is_live, "gst_base_src_is_live", LIBRARY_GSTBASE); Linker.link(gst_base_src_new_seamless_segment, "gst_base_src_new_seamless_segment", LIBRARY_GSTBASE); Linker.link(gst_base_src_query_latency, "gst_base_src_query_latency", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_async, "gst_base_src_set_async", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_automatic_eos, "gst_base_src_set_automatic_eos", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_blocksize, "gst_base_src_set_blocksize", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_caps, "gst_base_src_set_caps", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_do_timestamp, "gst_base_src_set_do_timestamp", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_dynamic_size, "gst_base_src_set_dynamic_size", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_format, "gst_base_src_set_format", LIBRARY_GSTBASE); Linker.link(gst_base_src_set_live, "gst_base_src_set_live", LIBRARY_GSTBASE); Linker.link(gst_base_src_start_complete, "gst_base_src_start_complete", LIBRARY_GSTBASE); Linker.link(gst_base_src_start_wait, "gst_base_src_start_wait", LIBRARY_GSTBASE); Linker.link(gst_base_src_wait_playing, "gst_base_src_wait_playing", LIBRARY_GSTBASE); // gst.base.BaseTransform Linker.link(gst_base_transform_get_type, "gst_base_transform_get_type", LIBRARY_GSTBASE); Linker.link(gst_base_transform_get_allocator, "gst_base_transform_get_allocator", LIBRARY_GSTBASE); Linker.link(gst_base_transform_get_buffer_pool, "gst_base_transform_get_buffer_pool", LIBRARY_GSTBASE); Linker.link(gst_base_transform_is_in_place, "gst_base_transform_is_in_place", LIBRARY_GSTBASE); Linker.link(gst_base_transform_is_passthrough, "gst_base_transform_is_passthrough", LIBRARY_GSTBASE); Linker.link(gst_base_transform_is_qos_enabled, "gst_base_transform_is_qos_enabled", LIBRARY_GSTBASE); Linker.link(gst_base_transform_reconfigure_sink, "gst_base_transform_reconfigure_sink", LIBRARY_GSTBASE); Linker.link(gst_base_transform_reconfigure_src, "gst_base_transform_reconfigure_src", LIBRARY_GSTBASE); Linker.link(gst_base_transform_set_gap_aware, "gst_base_transform_set_gap_aware", LIBRARY_GSTBASE); Linker.link(gst_base_transform_set_in_place, "gst_base_transform_set_in_place", LIBRARY_GSTBASE); Linker.link(gst_base_transform_set_passthrough, "gst_base_transform_set_passthrough", LIBRARY_GSTBASE); Linker.link(gst_base_transform_set_prefer_passthrough, "gst_base_transform_set_prefer_passthrough", LIBRARY_GSTBASE); Linker.link(gst_base_transform_set_qos_enabled, "gst_base_transform_set_qos_enabled", LIBRARY_GSTBASE); Linker.link(gst_base_transform_update_qos, "gst_base_transform_update_qos", LIBRARY_GSTBASE); Linker.link(gst_base_transform_update_src_caps, "gst_base_transform_update_src_caps", LIBRARY_GSTBASE); // gst.base.BitReader Linker.link(gst_bit_reader_free, "gst_bit_reader_free", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_get_bits_uint16, "gst_bit_reader_get_bits_uint16", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_get_bits_uint32, "gst_bit_reader_get_bits_uint32", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_get_bits_uint64, "gst_bit_reader_get_bits_uint64", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_get_bits_uint8, "gst_bit_reader_get_bits_uint8", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_get_pos, "gst_bit_reader_get_pos", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_get_remaining, "gst_bit_reader_get_remaining", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_get_size, "gst_bit_reader_get_size", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_init, "gst_bit_reader_init", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_peek_bits_uint16, "gst_bit_reader_peek_bits_uint16", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_peek_bits_uint32, "gst_bit_reader_peek_bits_uint32", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_peek_bits_uint64, "gst_bit_reader_peek_bits_uint64", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_peek_bits_uint8, "gst_bit_reader_peek_bits_uint8", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_set_pos, "gst_bit_reader_set_pos", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_skip, "gst_bit_reader_skip", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_skip_to_byte, "gst_bit_reader_skip_to_byte", LIBRARY_GSTBASE); Linker.link(gst_bit_reader_new, "gst_bit_reader_new", LIBRARY_GSTBASE); // gst.base.ByteReader Linker.link(gst_byte_reader_dup_data, "gst_byte_reader_dup_data", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_dup_string_utf16, "gst_byte_reader_dup_string_utf16", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_dup_string_utf32, "gst_byte_reader_dup_string_utf32", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_dup_string_utf8, "gst_byte_reader_dup_string_utf8", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_free, "gst_byte_reader_free", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_data, "gst_byte_reader_get_data", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_float32_be, "gst_byte_reader_get_float32_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_float32_le, "gst_byte_reader_get_float32_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_float64_be, "gst_byte_reader_get_float64_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_float64_le, "gst_byte_reader_get_float64_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_int16_be, "gst_byte_reader_get_int16_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_int16_le, "gst_byte_reader_get_int16_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_int24_be, "gst_byte_reader_get_int24_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_int24_le, "gst_byte_reader_get_int24_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_int32_be, "gst_byte_reader_get_int32_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_int32_le, "gst_byte_reader_get_int32_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_int64_be, "gst_byte_reader_get_int64_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_int64_le, "gst_byte_reader_get_int64_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_int8, "gst_byte_reader_get_int8", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_pos, "gst_byte_reader_get_pos", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_remaining, "gst_byte_reader_get_remaining", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_size, "gst_byte_reader_get_size", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_string_utf8, "gst_byte_reader_get_string_utf8", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_sub_reader, "gst_byte_reader_get_sub_reader", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_uint16_be, "gst_byte_reader_get_uint16_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_uint16_le, "gst_byte_reader_get_uint16_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_uint24_be, "gst_byte_reader_get_uint24_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_uint24_le, "gst_byte_reader_get_uint24_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_uint32_be, "gst_byte_reader_get_uint32_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_uint32_le, "gst_byte_reader_get_uint32_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_uint64_be, "gst_byte_reader_get_uint64_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_uint64_le, "gst_byte_reader_get_uint64_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_get_uint8, "gst_byte_reader_get_uint8", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_init, "gst_byte_reader_init", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_masked_scan_uint32, "gst_byte_reader_masked_scan_uint32", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_masked_scan_uint32_peek, "gst_byte_reader_masked_scan_uint32_peek", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_data, "gst_byte_reader_peek_data", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_float32_be, "gst_byte_reader_peek_float32_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_float32_le, "gst_byte_reader_peek_float32_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_float64_be, "gst_byte_reader_peek_float64_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_float64_le, "gst_byte_reader_peek_float64_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_int16_be, "gst_byte_reader_peek_int16_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_int16_le, "gst_byte_reader_peek_int16_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_int24_be, "gst_byte_reader_peek_int24_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_int24_le, "gst_byte_reader_peek_int24_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_int32_be, "gst_byte_reader_peek_int32_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_int32_le, "gst_byte_reader_peek_int32_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_int64_be, "gst_byte_reader_peek_int64_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_int64_le, "gst_byte_reader_peek_int64_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_int8, "gst_byte_reader_peek_int8", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_string_utf8, "gst_byte_reader_peek_string_utf8", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_sub_reader, "gst_byte_reader_peek_sub_reader", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_uint16_be, "gst_byte_reader_peek_uint16_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_uint16_le, "gst_byte_reader_peek_uint16_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_uint24_be, "gst_byte_reader_peek_uint24_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_uint24_le, "gst_byte_reader_peek_uint24_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_uint32_be, "gst_byte_reader_peek_uint32_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_uint32_le, "gst_byte_reader_peek_uint32_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_uint64_be, "gst_byte_reader_peek_uint64_be", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_uint64_le, "gst_byte_reader_peek_uint64_le", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_peek_uint8, "gst_byte_reader_peek_uint8", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_set_pos, "gst_byte_reader_set_pos", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_skip, "gst_byte_reader_skip", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_skip_string_utf16, "gst_byte_reader_skip_string_utf16", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_skip_string_utf32, "gst_byte_reader_skip_string_utf32", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_skip_string_utf8, "gst_byte_reader_skip_string_utf8", LIBRARY_GSTBASE); Linker.link(gst_byte_reader_new, "gst_byte_reader_new", LIBRARY_GSTBASE); // gst.base.ByteWriter Linker.link(gst_byte_writer_ensure_free_space, "gst_byte_writer_ensure_free_space", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_fill, "gst_byte_writer_fill", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_free, "gst_byte_writer_free", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_free_and_get_buffer, "gst_byte_writer_free_and_get_buffer", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_free_and_get_data, "gst_byte_writer_free_and_get_data", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_get_remaining, "gst_byte_writer_get_remaining", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_init, "gst_byte_writer_init", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_init_with_data, "gst_byte_writer_init_with_data", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_init_with_size, "gst_byte_writer_init_with_size", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_buffer, "gst_byte_writer_put_buffer", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_data, "gst_byte_writer_put_data", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_float32_be, "gst_byte_writer_put_float32_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_float32_le, "gst_byte_writer_put_float32_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_float64_be, "gst_byte_writer_put_float64_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_float64_le, "gst_byte_writer_put_float64_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_int16_be, "gst_byte_writer_put_int16_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_int16_le, "gst_byte_writer_put_int16_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_int24_be, "gst_byte_writer_put_int24_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_int24_le, "gst_byte_writer_put_int24_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_int32_be, "gst_byte_writer_put_int32_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_int32_le, "gst_byte_writer_put_int32_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_int64_be, "gst_byte_writer_put_int64_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_int64_le, "gst_byte_writer_put_int64_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_int8, "gst_byte_writer_put_int8", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_string_utf16, "gst_byte_writer_put_string_utf16", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_string_utf32, "gst_byte_writer_put_string_utf32", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_string_utf8, "gst_byte_writer_put_string_utf8", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_uint16_be, "gst_byte_writer_put_uint16_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_uint16_le, "gst_byte_writer_put_uint16_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_uint24_be, "gst_byte_writer_put_uint24_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_uint24_le, "gst_byte_writer_put_uint24_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_uint32_be, "gst_byte_writer_put_uint32_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_uint32_le, "gst_byte_writer_put_uint32_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_uint64_be, "gst_byte_writer_put_uint64_be", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_uint64_le, "gst_byte_writer_put_uint64_le", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_put_uint8, "gst_byte_writer_put_uint8", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_reset, "gst_byte_writer_reset", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_reset_and_get_buffer, "gst_byte_writer_reset_and_get_buffer", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_reset_and_get_data, "gst_byte_writer_reset_and_get_data", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_new, "gst_byte_writer_new", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_new_with_data, "gst_byte_writer_new_with_data", LIBRARY_GSTBASE); Linker.link(gst_byte_writer_new_with_size, "gst_byte_writer_new_with_size", LIBRARY_GSTBASE); // gst.base.CollectPads Linker.link(gst_collect_pads_get_type, "gst_collect_pads_get_type", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_new, "gst_collect_pads_new", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_add_pad, "gst_collect_pads_add_pad", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_available, "gst_collect_pads_available", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_clip_running_time, "gst_collect_pads_clip_running_time", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_event_default, "gst_collect_pads_event_default", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_flush, "gst_collect_pads_flush", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_peek, "gst_collect_pads_peek", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_pop, "gst_collect_pads_pop", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_query_default, "gst_collect_pads_query_default", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_read_buffer, "gst_collect_pads_read_buffer", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_remove_pad, "gst_collect_pads_remove_pad", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_set_buffer_function, "gst_collect_pads_set_buffer_function", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_set_clip_function, "gst_collect_pads_set_clip_function", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_set_compare_function, "gst_collect_pads_set_compare_function", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_set_event_function, "gst_collect_pads_set_event_function", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_set_flush_function, "gst_collect_pads_set_flush_function", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_set_flushing, "gst_collect_pads_set_flushing", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_set_function, "gst_collect_pads_set_function", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_set_query_function, "gst_collect_pads_set_query_function", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_set_waiting, "gst_collect_pads_set_waiting", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_src_event_default, "gst_collect_pads_src_event_default", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_start, "gst_collect_pads_start", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_stop, "gst_collect_pads_stop", LIBRARY_GSTBASE); Linker.link(gst_collect_pads_take_buffer, "gst_collect_pads_take_buffer", LIBRARY_GSTBASE); // gst.base.DataQueue Linker.link(gst_data_queue_get_type, "gst_data_queue_get_type", LIBRARY_GSTBASE); Linker.link(gst_data_queue_new, "gst_data_queue_new", LIBRARY_GSTBASE); Linker.link(gst_data_queue_drop_head, "gst_data_queue_drop_head", LIBRARY_GSTBASE); Linker.link(gst_data_queue_flush, "gst_data_queue_flush", LIBRARY_GSTBASE); Linker.link(gst_data_queue_get_level, "gst_data_queue_get_level", LIBRARY_GSTBASE); Linker.link(gst_data_queue_is_empty, "gst_data_queue_is_empty", LIBRARY_GSTBASE); Linker.link(gst_data_queue_is_full, "gst_data_queue_is_full", LIBRARY_GSTBASE); Linker.link(gst_data_queue_limits_changed, "gst_data_queue_limits_changed", LIBRARY_GSTBASE); Linker.link(gst_data_queue_peek, "gst_data_queue_peek", LIBRARY_GSTBASE); Linker.link(gst_data_queue_pop, "gst_data_queue_pop", LIBRARY_GSTBASE); Linker.link(gst_data_queue_push, "gst_data_queue_push", LIBRARY_GSTBASE); Linker.link(gst_data_queue_push_force, "gst_data_queue_push_force", LIBRARY_GSTBASE); Linker.link(gst_data_queue_set_flushing, "gst_data_queue_set_flushing", LIBRARY_GSTBASE); // gst.base.FlowCombiner Linker.link(gst_flow_combiner_get_type, "gst_flow_combiner_get_type", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_new, "gst_flow_combiner_new", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_add_pad, "gst_flow_combiner_add_pad", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_clear, "gst_flow_combiner_clear", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_free, "gst_flow_combiner_free", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_ref, "gst_flow_combiner_ref", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_remove_pad, "gst_flow_combiner_remove_pad", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_reset, "gst_flow_combiner_reset", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_unref, "gst_flow_combiner_unref", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_update_flow, "gst_flow_combiner_update_flow", LIBRARY_GSTBASE); Linker.link(gst_flow_combiner_update_pad_flow, "gst_flow_combiner_update_pad_flow", LIBRARY_GSTBASE); // gst.base.PushSrc Linker.link(gst_push_src_get_type, "gst_push_src_get_type", LIBRARY_GSTBASE); // gst.base.QueueArray Linker.link(gst_queue_array_drop_element, "gst_queue_array_drop_element", LIBRARY_GSTBASE); Linker.link(gst_queue_array_drop_struct, "gst_queue_array_drop_struct", LIBRARY_GSTBASE); Linker.link(gst_queue_array_find, "gst_queue_array_find", LIBRARY_GSTBASE); Linker.link(gst_queue_array_free, "gst_queue_array_free", LIBRARY_GSTBASE); Linker.link(gst_queue_array_get_length, "gst_queue_array_get_length", LIBRARY_GSTBASE); Linker.link(gst_queue_array_is_empty, "gst_queue_array_is_empty", LIBRARY_GSTBASE); Linker.link(gst_queue_array_peek_head, "gst_queue_array_peek_head", LIBRARY_GSTBASE); Linker.link(gst_queue_array_peek_head_struct, "gst_queue_array_peek_head_struct", LIBRARY_GSTBASE); Linker.link(gst_queue_array_pop_head, "gst_queue_array_pop_head", LIBRARY_GSTBASE); Linker.link(gst_queue_array_pop_head_struct, "gst_queue_array_pop_head_struct", LIBRARY_GSTBASE); Linker.link(gst_queue_array_push_tail, "gst_queue_array_push_tail", LIBRARY_GSTBASE); Linker.link(gst_queue_array_push_tail_struct, "gst_queue_array_push_tail_struct", LIBRARY_GSTBASE); Linker.link(gst_queue_array_new, "gst_queue_array_new", LIBRARY_GSTBASE); Linker.link(gst_queue_array_new_for_struct, "gst_queue_array_new_for_struct", LIBRARY_GSTBASE); // gst.base.Base Linker.link(gst_type_find_helper, "gst_type_find_helper", LIBRARY_GSTBASE); Linker.link(gst_type_find_helper_for_buffer, "gst_type_find_helper_for_buffer", LIBRARY_GSTBASE); Linker.link(gst_type_find_helper_for_data, "gst_type_find_helper_for_data", LIBRARY_GSTBASE); Linker.link(gst_type_find_helper_for_extension, "gst_type_find_helper_for_extension", LIBRARY_GSTBASE); Linker.link(gst_type_find_helper_get_range, "gst_type_find_helper_get_range", LIBRARY_GSTBASE); } __gshared extern(C) { // gst.base.Adapter GType function() c_gst_adapter_get_type; GstAdapter* function() c_gst_adapter_new; size_t function(GstAdapter* adapter) c_gst_adapter_available; size_t function(GstAdapter* adapter) c_gst_adapter_available_fast; void function(GstAdapter* adapter) c_gst_adapter_clear; void function(GstAdapter* adapter, void* dest, size_t offset, size_t size) c_gst_adapter_copy; GBytes* function(GstAdapter* adapter, size_t offset, size_t size) c_gst_adapter_copy_bytes; ulong function(GstAdapter* adapter) c_gst_adapter_distance_from_discont; GstClockTime function(GstAdapter* adapter) c_gst_adapter_dts_at_discont; void function(GstAdapter* adapter, size_t flush) c_gst_adapter_flush; GstBuffer* function(GstAdapter* adapter, size_t nbytes) c_gst_adapter_get_buffer; GstBuffer* function(GstAdapter* adapter, size_t nbytes) c_gst_adapter_get_buffer_fast; GstBufferList* function(GstAdapter* adapter, size_t nbytes) c_gst_adapter_get_buffer_list; GList* function(GstAdapter* adapter, size_t nbytes) c_gst_adapter_get_list; void* function(GstAdapter* adapter, size_t size) c_gst_adapter_map; ptrdiff_t function(GstAdapter* adapter, uint mask, uint pattern, size_t offset, size_t size) c_gst_adapter_masked_scan_uint32; ptrdiff_t function(GstAdapter* adapter, uint mask, uint pattern, size_t offset, size_t size, uint* value) c_gst_adapter_masked_scan_uint32_peek; ulong function(GstAdapter* adapter) c_gst_adapter_offset_at_discont; GstClockTime function(GstAdapter* adapter, ulong* distance) c_gst_adapter_prev_dts; GstClockTime function(GstAdapter* adapter, size_t offset, ulong* distance) c_gst_adapter_prev_dts_at_offset; ulong function(GstAdapter* adapter, ulong* distance) c_gst_adapter_prev_offset; GstClockTime function(GstAdapter* adapter, ulong* distance) c_gst_adapter_prev_pts; GstClockTime function(GstAdapter* adapter, size_t offset, ulong* distance) c_gst_adapter_prev_pts_at_offset; GstClockTime function(GstAdapter* adapter) c_gst_adapter_pts_at_discont; void function(GstAdapter* adapter, GstBuffer* buf) c_gst_adapter_push; void* function(GstAdapter* adapter, size_t nbytes) c_gst_adapter_take; GstBuffer* function(GstAdapter* adapter, size_t nbytes) c_gst_adapter_take_buffer; GstBuffer* function(GstAdapter* adapter, size_t nbytes) c_gst_adapter_take_buffer_fast; GstBufferList* function(GstAdapter* adapter, size_t nbytes) c_gst_adapter_take_buffer_list; GList* function(GstAdapter* adapter, size_t nbytes) c_gst_adapter_take_list; void function(GstAdapter* adapter) c_gst_adapter_unmap; // gst.base.BaseParse GType function() c_gst_base_parse_get_type; int function(GstBaseParse* parse, ulong offset, GstClockTime ts, int key, int force) c_gst_base_parse_add_index_entry; int function(GstBaseParse* parse, GstFormat srcFormat, long srcValue, GstFormat destFormat, long* destValue) c_gst_base_parse_convert_default; void function(GstBaseParse* parse) c_gst_base_parse_drain; GstFlowReturn function(GstBaseParse* parse, GstBaseParseFrame* frame, int size) c_gst_base_parse_finish_frame; void function(GstBaseParse* parse, GstTagList* tags, GstTagMergeMode mode) c_gst_base_parse_merge_tags; GstFlowReturn function(GstBaseParse* parse, GstBaseParseFrame* frame) c_gst_base_parse_push_frame; void function(GstBaseParse* parse, uint bitrate) c_gst_base_parse_set_average_bitrate; void function(GstBaseParse* parse, GstFormat fmt, long duration, int interval) c_gst_base_parse_set_duration; void function(GstBaseParse* parse, uint fpsNum, uint fpsDen, uint leadIn, uint leadOut) c_gst_base_parse_set_frame_rate; void function(GstBaseParse* parse, int hasTiming) c_gst_base_parse_set_has_timing_info; void function(GstBaseParse* parse, int inferTs) c_gst_base_parse_set_infer_ts; void function(GstBaseParse* parse, GstClockTime minLatency, GstClockTime maxLatency) c_gst_base_parse_set_latency; void function(GstBaseParse* parse, uint minSize) c_gst_base_parse_set_min_frame_size; void function(GstBaseParse* parse, int passthrough) c_gst_base_parse_set_passthrough; void function(GstBaseParse* parse, int ptsInterpolate) c_gst_base_parse_set_pts_interpolation; void function(GstBaseParse* parse, int syncable) c_gst_base_parse_set_syncable; void function(GstBaseParse* parse, size_t offset) c_gst_base_parse_set_ts_at_offset; // gst.base.BaseParseFrame GType function() c_gst_base_parse_frame_get_type; GstBaseParseFrame* function(GstBuffer* buffer, GstBaseParseFrameFlags flags, int overhead) c_gst_base_parse_frame_new; GstBaseParseFrame* function(GstBaseParseFrame* frame) c_gst_base_parse_frame_copy; void function(GstBaseParseFrame* frame) c_gst_base_parse_frame_free; void function(GstBaseParseFrame* frame) c_gst_base_parse_frame_init; // gst.base.BaseSink GType function() c_gst_base_sink_get_type; GstFlowReturn function(GstBaseSink* sink, GstMiniObject* obj) c_gst_base_sink_do_preroll; uint function(GstBaseSink* sink) c_gst_base_sink_get_blocksize; int function(GstBaseSink* sink) c_gst_base_sink_get_drop_out_of_segment; GstSample* function(GstBaseSink* sink) c_gst_base_sink_get_last_sample; GstClockTime function(GstBaseSink* sink) c_gst_base_sink_get_latency; ulong function(GstBaseSink* sink) c_gst_base_sink_get_max_bitrate; long function(GstBaseSink* sink) c_gst_base_sink_get_max_lateness; GstClockTime function(GstBaseSink* sink) c_gst_base_sink_get_render_delay; int function(GstBaseSink* sink) c_gst_base_sink_get_sync; ulong function(GstBaseSink* sink) c_gst_base_sink_get_throttle_time; GstClockTimeDiff function(GstBaseSink* sink) c_gst_base_sink_get_ts_offset; int function(GstBaseSink* sink) c_gst_base_sink_is_async_enabled; int function(GstBaseSink* sink) c_gst_base_sink_is_last_sample_enabled; int function(GstBaseSink* sink) c_gst_base_sink_is_qos_enabled; int function(GstBaseSink* sink, int* live, int* upstreamLive, GstClockTime* minLatency, GstClockTime* maxLatency) c_gst_base_sink_query_latency; void function(GstBaseSink* sink, int enabled) c_gst_base_sink_set_async_enabled; void function(GstBaseSink* sink, uint blocksize) c_gst_base_sink_set_blocksize; void function(GstBaseSink* sink, int dropOutOfSegment) c_gst_base_sink_set_drop_out_of_segment; void function(GstBaseSink* sink, int enabled) c_gst_base_sink_set_last_sample_enabled; void function(GstBaseSink* sink, ulong maxBitrate) c_gst_base_sink_set_max_bitrate; void function(GstBaseSink* sink, long maxLateness) c_gst_base_sink_set_max_lateness; void function(GstBaseSink* sink, int enabled) c_gst_base_sink_set_qos_enabled; void function(GstBaseSink* sink, GstClockTime delay) c_gst_base_sink_set_render_delay; void function(GstBaseSink* sink, int sync) c_gst_base_sink_set_sync; void function(GstBaseSink* sink, ulong throttle) c_gst_base_sink_set_throttle_time; void function(GstBaseSink* sink, GstClockTimeDiff offset) c_gst_base_sink_set_ts_offset; GstFlowReturn function(GstBaseSink* sink, GstClockTime time, GstClockTimeDiff* jitter) c_gst_base_sink_wait; GstClockReturn function(GstBaseSink* sink, GstClockTime time, GstClockTimeDiff* jitter) c_gst_base_sink_wait_clock; GstFlowReturn function(GstBaseSink* sink) c_gst_base_sink_wait_preroll; // gst.base.BaseSrc GType function() c_gst_base_src_get_type; void function(GstBaseSrc* src, GstAllocator** allocator, GstAllocationParams* params) c_gst_base_src_get_allocator; uint function(GstBaseSrc* src) c_gst_base_src_get_blocksize; GstBufferPool* function(GstBaseSrc* src) c_gst_base_src_get_buffer_pool; int function(GstBaseSrc* src) c_gst_base_src_get_do_timestamp; int function(GstBaseSrc* src) c_gst_base_src_is_async; int function(GstBaseSrc* src) c_gst_base_src_is_live; int function(GstBaseSrc* src, long start, long stop, long time) c_gst_base_src_new_seamless_segment; int function(GstBaseSrc* src, int* live, GstClockTime* minLatency, GstClockTime* maxLatency) c_gst_base_src_query_latency; void function(GstBaseSrc* src, int async) c_gst_base_src_set_async; void function(GstBaseSrc* src, int automaticEos) c_gst_base_src_set_automatic_eos; void function(GstBaseSrc* src, uint blocksize) c_gst_base_src_set_blocksize; int function(GstBaseSrc* src, GstCaps* caps) c_gst_base_src_set_caps; void function(GstBaseSrc* src, int timestamp) c_gst_base_src_set_do_timestamp; void function(GstBaseSrc* src, int dynamic) c_gst_base_src_set_dynamic_size; void function(GstBaseSrc* src, GstFormat format) c_gst_base_src_set_format; void function(GstBaseSrc* src, int live) c_gst_base_src_set_live; void function(GstBaseSrc* basesrc, GstFlowReturn ret) c_gst_base_src_start_complete; GstFlowReturn function(GstBaseSrc* basesrc) c_gst_base_src_start_wait; GstFlowReturn function(GstBaseSrc* src) c_gst_base_src_wait_playing; // gst.base.BaseTransform GType function() c_gst_base_transform_get_type; void function(GstBaseTransform* trans, GstAllocator** allocator, GstAllocationParams* params) c_gst_base_transform_get_allocator; GstBufferPool* function(GstBaseTransform* trans) c_gst_base_transform_get_buffer_pool; int function(GstBaseTransform* trans) c_gst_base_transform_is_in_place; int function(GstBaseTransform* trans) c_gst_base_transform_is_passthrough; int function(GstBaseTransform* trans) c_gst_base_transform_is_qos_enabled; void function(GstBaseTransform* trans) c_gst_base_transform_reconfigure_sink; void function(GstBaseTransform* trans) c_gst_base_transform_reconfigure_src; void function(GstBaseTransform* trans, int gapAware) c_gst_base_transform_set_gap_aware; void function(GstBaseTransform* trans, int inPlace) c_gst_base_transform_set_in_place; void function(GstBaseTransform* trans, int passthrough) c_gst_base_transform_set_passthrough; void function(GstBaseTransform* trans, int preferPassthrough) c_gst_base_transform_set_prefer_passthrough; void function(GstBaseTransform* trans, int enabled) c_gst_base_transform_set_qos_enabled; void function(GstBaseTransform* trans, double proportion, GstClockTimeDiff diff, GstClockTime timestamp) c_gst_base_transform_update_qos; int function(GstBaseTransform* trans, GstCaps* updatedCaps) c_gst_base_transform_update_src_caps; // gst.base.BitReader void function(GstBitReader* reader) c_gst_bit_reader_free; int function(GstBitReader* reader, ushort* val, uint nbits) c_gst_bit_reader_get_bits_uint16; int function(GstBitReader* reader, uint* val, uint nbits) c_gst_bit_reader_get_bits_uint32; int function(GstBitReader* reader, ulong* val, uint nbits) c_gst_bit_reader_get_bits_uint64; int function(GstBitReader* reader, ubyte* val, uint nbits) c_gst_bit_reader_get_bits_uint8; uint function(GstBitReader* reader) c_gst_bit_reader_get_pos; uint function(GstBitReader* reader) c_gst_bit_reader_get_remaining; uint function(GstBitReader* reader) c_gst_bit_reader_get_size; void function(GstBitReader* reader, ubyte* data, uint size) c_gst_bit_reader_init; int function(GstBitReader* reader, ushort* val, uint nbits) c_gst_bit_reader_peek_bits_uint16; int function(GstBitReader* reader, uint* val, uint nbits) c_gst_bit_reader_peek_bits_uint32; int function(GstBitReader* reader, ulong* val, uint nbits) c_gst_bit_reader_peek_bits_uint64; int function(GstBitReader* reader, ubyte* val, uint nbits) c_gst_bit_reader_peek_bits_uint8; int function(GstBitReader* reader, uint pos) c_gst_bit_reader_set_pos; int function(GstBitReader* reader, uint nbits) c_gst_bit_reader_skip; int function(GstBitReader* reader) c_gst_bit_reader_skip_to_byte; GstBitReader* function(ubyte* data, uint size) c_gst_bit_reader_new; // gst.base.ByteReader int function(GstByteReader* reader, uint size, ubyte** val) c_gst_byte_reader_dup_data; int function(GstByteReader* reader, ushort** str) c_gst_byte_reader_dup_string_utf16; int function(GstByteReader* reader, uint** str) c_gst_byte_reader_dup_string_utf32; int function(GstByteReader* reader, char** str) c_gst_byte_reader_dup_string_utf8; void function(GstByteReader* reader) c_gst_byte_reader_free; int function(GstByteReader* reader, uint size, ubyte** val) c_gst_byte_reader_get_data; int function(GstByteReader* reader, float* val) c_gst_byte_reader_get_float32_be; int function(GstByteReader* reader, float* val) c_gst_byte_reader_get_float32_le; int function(GstByteReader* reader, double* val) c_gst_byte_reader_get_float64_be; int function(GstByteReader* reader, double* val) c_gst_byte_reader_get_float64_le; int function(GstByteReader* reader, short* val) c_gst_byte_reader_get_int16_be; int function(GstByteReader* reader, short* val) c_gst_byte_reader_get_int16_le; int function(GstByteReader* reader, int* val) c_gst_byte_reader_get_int24_be; int function(GstByteReader* reader, int* val) c_gst_byte_reader_get_int24_le; int function(GstByteReader* reader, int* val) c_gst_byte_reader_get_int32_be; int function(GstByteReader* reader, int* val) c_gst_byte_reader_get_int32_le; int function(GstByteReader* reader, long* val) c_gst_byte_reader_get_int64_be; int function(GstByteReader* reader, long* val) c_gst_byte_reader_get_int64_le; int function(GstByteReader* reader, byte* val) c_gst_byte_reader_get_int8; uint function(GstByteReader* reader) c_gst_byte_reader_get_pos; uint function(GstByteReader* reader) c_gst_byte_reader_get_remaining; uint function(GstByteReader* reader) c_gst_byte_reader_get_size; int function(GstByteReader* reader, char** str) c_gst_byte_reader_get_string_utf8; int function(GstByteReader* reader, GstByteReader* subReader, uint size) c_gst_byte_reader_get_sub_reader; int function(GstByteReader* reader, ushort* val) c_gst_byte_reader_get_uint16_be; int function(GstByteReader* reader, ushort* val) c_gst_byte_reader_get_uint16_le; int function(GstByteReader* reader, uint* val) c_gst_byte_reader_get_uint24_be; int function(GstByteReader* reader, uint* val) c_gst_byte_reader_get_uint24_le; int function(GstByteReader* reader, uint* val) c_gst_byte_reader_get_uint32_be; int function(GstByteReader* reader, uint* val) c_gst_byte_reader_get_uint32_le; int function(GstByteReader* reader, ulong* val) c_gst_byte_reader_get_uint64_be; int function(GstByteReader* reader, ulong* val) c_gst_byte_reader_get_uint64_le; int function(GstByteReader* reader, ubyte* val) c_gst_byte_reader_get_uint8; void function(GstByteReader* reader, ubyte* data, uint size) c_gst_byte_reader_init; uint function(GstByteReader* reader, uint mask, uint pattern, uint offset, uint size) c_gst_byte_reader_masked_scan_uint32; uint function(GstByteReader* reader, uint mask, uint pattern, uint offset, uint size, uint* value) c_gst_byte_reader_masked_scan_uint32_peek; int function(GstByteReader* reader, uint size, ubyte** val) c_gst_byte_reader_peek_data; int function(GstByteReader* reader, float* val) c_gst_byte_reader_peek_float32_be; int function(GstByteReader* reader, float* val) c_gst_byte_reader_peek_float32_le; int function(GstByteReader* reader, double* val) c_gst_byte_reader_peek_float64_be; int function(GstByteReader* reader, double* val) c_gst_byte_reader_peek_float64_le; int function(GstByteReader* reader, short* val) c_gst_byte_reader_peek_int16_be; int function(GstByteReader* reader, short* val) c_gst_byte_reader_peek_int16_le; int function(GstByteReader* reader, int* val) c_gst_byte_reader_peek_int24_be; int function(GstByteReader* reader, int* val) c_gst_byte_reader_peek_int24_le; int function(GstByteReader* reader, int* val) c_gst_byte_reader_peek_int32_be; int function(GstByteReader* reader, int* val) c_gst_byte_reader_peek_int32_le; int function(GstByteReader* reader, long* val) c_gst_byte_reader_peek_int64_be; int function(GstByteReader* reader, long* val) c_gst_byte_reader_peek_int64_le; int function(GstByteReader* reader, byte* val) c_gst_byte_reader_peek_int8; int function(GstByteReader* reader, char** str) c_gst_byte_reader_peek_string_utf8; int function(GstByteReader* reader, GstByteReader* subReader, uint size) c_gst_byte_reader_peek_sub_reader; int function(GstByteReader* reader, ushort* val) c_gst_byte_reader_peek_uint16_be; int function(GstByteReader* reader, ushort* val) c_gst_byte_reader_peek_uint16_le; int function(GstByteReader* reader, uint* val) c_gst_byte_reader_peek_uint24_be; int function(GstByteReader* reader, uint* val) c_gst_byte_reader_peek_uint24_le; int function(GstByteReader* reader, uint* val) c_gst_byte_reader_peek_uint32_be; int function(GstByteReader* reader, uint* val) c_gst_byte_reader_peek_uint32_le; int function(GstByteReader* reader, ulong* val) c_gst_byte_reader_peek_uint64_be; int function(GstByteReader* reader, ulong* val) c_gst_byte_reader_peek_uint64_le; int function(GstByteReader* reader, ubyte* val) c_gst_byte_reader_peek_uint8; int function(GstByteReader* reader, uint pos) c_gst_byte_reader_set_pos; int function(GstByteReader* reader, uint nbytes) c_gst_byte_reader_skip; int function(GstByteReader* reader) c_gst_byte_reader_skip_string_utf16; int function(GstByteReader* reader) c_gst_byte_reader_skip_string_utf32; int function(GstByteReader* reader) c_gst_byte_reader_skip_string_utf8; GstByteReader* function(ubyte* data, uint size) c_gst_byte_reader_new; // gst.base.ByteWriter int function(GstByteWriter* writer, uint size) c_gst_byte_writer_ensure_free_space; int function(GstByteWriter* writer, ubyte value, uint size) c_gst_byte_writer_fill; void function(GstByteWriter* writer) c_gst_byte_writer_free; GstBuffer* function(GstByteWriter* writer) c_gst_byte_writer_free_and_get_buffer; ubyte* function(GstByteWriter* writer) c_gst_byte_writer_free_and_get_data; uint function(GstByteWriter* writer) c_gst_byte_writer_get_remaining; void function(GstByteWriter* writer) c_gst_byte_writer_init; void function(GstByteWriter* writer, ubyte* data, uint size, int initialized) c_gst_byte_writer_init_with_data; void function(GstByteWriter* writer, uint size, int fixed) c_gst_byte_writer_init_with_size; int function(GstByteWriter* writer, GstBuffer* buffer, size_t offset, ptrdiff_t size) c_gst_byte_writer_put_buffer; int function(GstByteWriter* writer, ubyte* data, uint size) c_gst_byte_writer_put_data; int function(GstByteWriter* writer, float val) c_gst_byte_writer_put_float32_be; int function(GstByteWriter* writer, float val) c_gst_byte_writer_put_float32_le; int function(GstByteWriter* writer, double val) c_gst_byte_writer_put_float64_be; int function(GstByteWriter* writer, double val) c_gst_byte_writer_put_float64_le; int function(GstByteWriter* writer, short val) c_gst_byte_writer_put_int16_be; int function(GstByteWriter* writer, short val) c_gst_byte_writer_put_int16_le; int function(GstByteWriter* writer, int val) c_gst_byte_writer_put_int24_be; int function(GstByteWriter* writer, int val) c_gst_byte_writer_put_int24_le; int function(GstByteWriter* writer, int val) c_gst_byte_writer_put_int32_be; int function(GstByteWriter* writer, int val) c_gst_byte_writer_put_int32_le; int function(GstByteWriter* writer, long val) c_gst_byte_writer_put_int64_be; int function(GstByteWriter* writer, long val) c_gst_byte_writer_put_int64_le; int function(GstByteWriter* writer, byte val) c_gst_byte_writer_put_int8; int function(GstByteWriter* writer, ushort* data) c_gst_byte_writer_put_string_utf16; int function(GstByteWriter* writer, uint* data) c_gst_byte_writer_put_string_utf32; int function(GstByteWriter* writer, char* data) c_gst_byte_writer_put_string_utf8; int function(GstByteWriter* writer, ushort val) c_gst_byte_writer_put_uint16_be; int function(GstByteWriter* writer, ushort val) c_gst_byte_writer_put_uint16_le; int function(GstByteWriter* writer, uint val) c_gst_byte_writer_put_uint24_be; int function(GstByteWriter* writer, uint val) c_gst_byte_writer_put_uint24_le; int function(GstByteWriter* writer, uint val) c_gst_byte_writer_put_uint32_be; int function(GstByteWriter* writer, uint val) c_gst_byte_writer_put_uint32_le; int function(GstByteWriter* writer, ulong val) c_gst_byte_writer_put_uint64_be; int function(GstByteWriter* writer, ulong val) c_gst_byte_writer_put_uint64_le; int function(GstByteWriter* writer, ubyte val) c_gst_byte_writer_put_uint8; void function(GstByteWriter* writer) c_gst_byte_writer_reset; GstBuffer* function(GstByteWriter* writer) c_gst_byte_writer_reset_and_get_buffer; ubyte* function(GstByteWriter* writer) c_gst_byte_writer_reset_and_get_data; GstByteWriter* function() c_gst_byte_writer_new; GstByteWriter* function(ubyte* data, uint size, int initialized) c_gst_byte_writer_new_with_data; GstByteWriter* function(uint size, int fixed) c_gst_byte_writer_new_with_size; // gst.base.CollectPads GType function() c_gst_collect_pads_get_type; GstCollectPads* function() c_gst_collect_pads_new; GstCollectData* function(GstCollectPads* pads, GstPad* pad, uint size, GstCollectDataDestroyNotify destroyNotify, int lock) c_gst_collect_pads_add_pad; uint function(GstCollectPads* pads) c_gst_collect_pads_available; GstFlowReturn function(GstCollectPads* pads, GstCollectData* cdata, GstBuffer* buf, GstBuffer** outbuf, void* userData) c_gst_collect_pads_clip_running_time; int function(GstCollectPads* pads, GstCollectData* data, GstEvent* event, int discard) c_gst_collect_pads_event_default; uint function(GstCollectPads* pads, GstCollectData* data, uint size) c_gst_collect_pads_flush; GstBuffer* function(GstCollectPads* pads, GstCollectData* data) c_gst_collect_pads_peek; GstBuffer* function(GstCollectPads* pads, GstCollectData* data) c_gst_collect_pads_pop; int function(GstCollectPads* pads, GstCollectData* data, GstQuery* query, int discard) c_gst_collect_pads_query_default; GstBuffer* function(GstCollectPads* pads, GstCollectData* data, uint size) c_gst_collect_pads_read_buffer; int function(GstCollectPads* pads, GstPad* pad) c_gst_collect_pads_remove_pad; void function(GstCollectPads* pads, GstCollectPadsBufferFunction func, void* userData) c_gst_collect_pads_set_buffer_function; void function(GstCollectPads* pads, GstCollectPadsClipFunction clipfunc, void* userData) c_gst_collect_pads_set_clip_function; void function(GstCollectPads* pads, GstCollectPadsCompareFunction func, void* userData) c_gst_collect_pads_set_compare_function; void function(GstCollectPads* pads, GstCollectPadsEventFunction func, void* userData) c_gst_collect_pads_set_event_function; void function(GstCollectPads* pads, GstCollectPadsFlushFunction func, void* userData) c_gst_collect_pads_set_flush_function; void function(GstCollectPads* pads, int flushing) c_gst_collect_pads_set_flushing; void function(GstCollectPads* pads, GstCollectPadsFunction func, void* userData) c_gst_collect_pads_set_function; void function(GstCollectPads* pads, GstCollectPadsQueryFunction func, void* userData) c_gst_collect_pads_set_query_function; void function(GstCollectPads* pads, GstCollectData* data, int waiting) c_gst_collect_pads_set_waiting; int function(GstCollectPads* pads, GstPad* pad, GstEvent* event) c_gst_collect_pads_src_event_default; void function(GstCollectPads* pads) c_gst_collect_pads_start; void function(GstCollectPads* pads) c_gst_collect_pads_stop; GstBuffer* function(GstCollectPads* pads, GstCollectData* data, uint size) c_gst_collect_pads_take_buffer; // gst.base.DataQueue GType function() c_gst_data_queue_get_type; GstDataQueue* function(GstDataQueueCheckFullFunction checkfull, GstDataQueueFullCallback fullcallback, GstDataQueueEmptyCallback emptycallback, void* checkdata) c_gst_data_queue_new; int function(GstDataQueue* queue, GType type) c_gst_data_queue_drop_head; void function(GstDataQueue* queue) c_gst_data_queue_flush; void function(GstDataQueue* queue, GstDataQueueSize* level) c_gst_data_queue_get_level; int function(GstDataQueue* queue) c_gst_data_queue_is_empty; int function(GstDataQueue* queue) c_gst_data_queue_is_full; void function(GstDataQueue* queue) c_gst_data_queue_limits_changed; int function(GstDataQueue* queue, GstDataQueueItem** item) c_gst_data_queue_peek; int function(GstDataQueue* queue, GstDataQueueItem** item) c_gst_data_queue_pop; int function(GstDataQueue* queue, GstDataQueueItem* item) c_gst_data_queue_push; int function(GstDataQueue* queue, GstDataQueueItem* item) c_gst_data_queue_push_force; void function(GstDataQueue* queue, int flushing) c_gst_data_queue_set_flushing; // gst.base.FlowCombiner GType function() c_gst_flow_combiner_get_type; GstFlowCombiner* function() c_gst_flow_combiner_new; void function(GstFlowCombiner* combiner, GstPad* pad) c_gst_flow_combiner_add_pad; void function(GstFlowCombiner* combiner) c_gst_flow_combiner_clear; void function(GstFlowCombiner* combiner) c_gst_flow_combiner_free; GstFlowCombiner* function(GstFlowCombiner* combiner) c_gst_flow_combiner_ref; void function(GstFlowCombiner* combiner, GstPad* pad) c_gst_flow_combiner_remove_pad; void function(GstFlowCombiner* combiner) c_gst_flow_combiner_reset; void function(GstFlowCombiner* combiner) c_gst_flow_combiner_unref; GstFlowReturn function(GstFlowCombiner* combiner, GstFlowReturn fret) c_gst_flow_combiner_update_flow; GstFlowReturn function(GstFlowCombiner* combiner, GstPad* pad, GstFlowReturn fret) c_gst_flow_combiner_update_pad_flow; // gst.base.PushSrc GType function() c_gst_push_src_get_type; // gst.base.QueueArray void* function(GstQueueArray* array, uint idx) c_gst_queue_array_drop_element; int function(GstQueueArray* array, uint idx, void* pStruct) c_gst_queue_array_drop_struct; uint function(GstQueueArray* array, GCompareFunc func, void* data) c_gst_queue_array_find; void function(GstQueueArray* array) c_gst_queue_array_free; uint function(GstQueueArray* array) c_gst_queue_array_get_length; int function(GstQueueArray* array) c_gst_queue_array_is_empty; void* function(GstQueueArray* array) c_gst_queue_array_peek_head; void* function(GstQueueArray* array) c_gst_queue_array_peek_head_struct; void* function(GstQueueArray* array) c_gst_queue_array_pop_head; void* function(GstQueueArray* array) c_gst_queue_array_pop_head_struct; void function(GstQueueArray* array, void* data) c_gst_queue_array_push_tail; void function(GstQueueArray* array, void* pStruct) c_gst_queue_array_push_tail_struct; GstQueueArray* function(uint initialSize) c_gst_queue_array_new; GstQueueArray* function(size_t structSize, uint initialSize) c_gst_queue_array_new_for_struct; // gst.base.Base GstCaps* function(GstPad* src, ulong size) c_gst_type_find_helper; GstCaps* function(GstObject* obj, GstBuffer* buf, GstTypeFindProbability* prob) c_gst_type_find_helper_for_buffer; GstCaps* function(GstObject* obj, ubyte* data, size_t size, GstTypeFindProbability* prob) c_gst_type_find_helper_for_data; GstCaps* function(GstObject* obj, const(char)* extension) c_gst_type_find_helper_for_extension; GstCaps* function(GstObject* obj, GstObject* parent, GstTypeFindHelperGetRangeFunction func, ulong size, const(char)* extension, GstTypeFindProbability* prob) c_gst_type_find_helper_get_range; } // gst.base.Adapter alias c_gst_adapter_get_type gst_adapter_get_type; alias c_gst_adapter_new gst_adapter_new; alias c_gst_adapter_available gst_adapter_available; alias c_gst_adapter_available_fast gst_adapter_available_fast; alias c_gst_adapter_clear gst_adapter_clear; alias c_gst_adapter_copy gst_adapter_copy; alias c_gst_adapter_copy_bytes gst_adapter_copy_bytes; alias c_gst_adapter_distance_from_discont gst_adapter_distance_from_discont; alias c_gst_adapter_dts_at_discont gst_adapter_dts_at_discont; alias c_gst_adapter_flush gst_adapter_flush; alias c_gst_adapter_get_buffer gst_adapter_get_buffer; alias c_gst_adapter_get_buffer_fast gst_adapter_get_buffer_fast; alias c_gst_adapter_get_buffer_list gst_adapter_get_buffer_list; alias c_gst_adapter_get_list gst_adapter_get_list; alias c_gst_adapter_map gst_adapter_map; alias c_gst_adapter_masked_scan_uint32 gst_adapter_masked_scan_uint32; alias c_gst_adapter_masked_scan_uint32_peek gst_adapter_masked_scan_uint32_peek; alias c_gst_adapter_offset_at_discont gst_adapter_offset_at_discont; alias c_gst_adapter_prev_dts gst_adapter_prev_dts; alias c_gst_adapter_prev_dts_at_offset gst_adapter_prev_dts_at_offset; alias c_gst_adapter_prev_offset gst_adapter_prev_offset; alias c_gst_adapter_prev_pts gst_adapter_prev_pts; alias c_gst_adapter_prev_pts_at_offset gst_adapter_prev_pts_at_offset; alias c_gst_adapter_pts_at_discont gst_adapter_pts_at_discont; alias c_gst_adapter_push gst_adapter_push; alias c_gst_adapter_take gst_adapter_take; alias c_gst_adapter_take_buffer gst_adapter_take_buffer; alias c_gst_adapter_take_buffer_fast gst_adapter_take_buffer_fast; alias c_gst_adapter_take_buffer_list gst_adapter_take_buffer_list; alias c_gst_adapter_take_list gst_adapter_take_list; alias c_gst_adapter_unmap gst_adapter_unmap; // gst.base.BaseParse alias c_gst_base_parse_get_type gst_base_parse_get_type; alias c_gst_base_parse_add_index_entry gst_base_parse_add_index_entry; alias c_gst_base_parse_convert_default gst_base_parse_convert_default; alias c_gst_base_parse_drain gst_base_parse_drain; alias c_gst_base_parse_finish_frame gst_base_parse_finish_frame; alias c_gst_base_parse_merge_tags gst_base_parse_merge_tags; alias c_gst_base_parse_push_frame gst_base_parse_push_frame; alias c_gst_base_parse_set_average_bitrate gst_base_parse_set_average_bitrate; alias c_gst_base_parse_set_duration gst_base_parse_set_duration; alias c_gst_base_parse_set_frame_rate gst_base_parse_set_frame_rate; alias c_gst_base_parse_set_has_timing_info gst_base_parse_set_has_timing_info; alias c_gst_base_parse_set_infer_ts gst_base_parse_set_infer_ts; alias c_gst_base_parse_set_latency gst_base_parse_set_latency; alias c_gst_base_parse_set_min_frame_size gst_base_parse_set_min_frame_size; alias c_gst_base_parse_set_passthrough gst_base_parse_set_passthrough; alias c_gst_base_parse_set_pts_interpolation gst_base_parse_set_pts_interpolation; alias c_gst_base_parse_set_syncable gst_base_parse_set_syncable; alias c_gst_base_parse_set_ts_at_offset gst_base_parse_set_ts_at_offset; // gst.base.BaseParseFrame alias c_gst_base_parse_frame_get_type gst_base_parse_frame_get_type; alias c_gst_base_parse_frame_new gst_base_parse_frame_new; alias c_gst_base_parse_frame_copy gst_base_parse_frame_copy; alias c_gst_base_parse_frame_free gst_base_parse_frame_free; alias c_gst_base_parse_frame_init gst_base_parse_frame_init; // gst.base.BaseSink alias c_gst_base_sink_get_type gst_base_sink_get_type; alias c_gst_base_sink_do_preroll gst_base_sink_do_preroll; alias c_gst_base_sink_get_blocksize gst_base_sink_get_blocksize; alias c_gst_base_sink_get_drop_out_of_segment gst_base_sink_get_drop_out_of_segment; alias c_gst_base_sink_get_last_sample gst_base_sink_get_last_sample; alias c_gst_base_sink_get_latency gst_base_sink_get_latency; alias c_gst_base_sink_get_max_bitrate gst_base_sink_get_max_bitrate; alias c_gst_base_sink_get_max_lateness gst_base_sink_get_max_lateness; alias c_gst_base_sink_get_render_delay gst_base_sink_get_render_delay; alias c_gst_base_sink_get_sync gst_base_sink_get_sync; alias c_gst_base_sink_get_throttle_time gst_base_sink_get_throttle_time; alias c_gst_base_sink_get_ts_offset gst_base_sink_get_ts_offset; alias c_gst_base_sink_is_async_enabled gst_base_sink_is_async_enabled; alias c_gst_base_sink_is_last_sample_enabled gst_base_sink_is_last_sample_enabled; alias c_gst_base_sink_is_qos_enabled gst_base_sink_is_qos_enabled; alias c_gst_base_sink_query_latency gst_base_sink_query_latency; alias c_gst_base_sink_set_async_enabled gst_base_sink_set_async_enabled; alias c_gst_base_sink_set_blocksize gst_base_sink_set_blocksize; alias c_gst_base_sink_set_drop_out_of_segment gst_base_sink_set_drop_out_of_segment; alias c_gst_base_sink_set_last_sample_enabled gst_base_sink_set_last_sample_enabled; alias c_gst_base_sink_set_max_bitrate gst_base_sink_set_max_bitrate; alias c_gst_base_sink_set_max_lateness gst_base_sink_set_max_lateness; alias c_gst_base_sink_set_qos_enabled gst_base_sink_set_qos_enabled; alias c_gst_base_sink_set_render_delay gst_base_sink_set_render_delay; alias c_gst_base_sink_set_sync gst_base_sink_set_sync; alias c_gst_base_sink_set_throttle_time gst_base_sink_set_throttle_time; alias c_gst_base_sink_set_ts_offset gst_base_sink_set_ts_offset; alias c_gst_base_sink_wait gst_base_sink_wait; alias c_gst_base_sink_wait_clock gst_base_sink_wait_clock; alias c_gst_base_sink_wait_preroll gst_base_sink_wait_preroll; // gst.base.BaseSrc alias c_gst_base_src_get_type gst_base_src_get_type; alias c_gst_base_src_get_allocator gst_base_src_get_allocator; alias c_gst_base_src_get_blocksize gst_base_src_get_blocksize; alias c_gst_base_src_get_buffer_pool gst_base_src_get_buffer_pool; alias c_gst_base_src_get_do_timestamp gst_base_src_get_do_timestamp; alias c_gst_base_src_is_async gst_base_src_is_async; alias c_gst_base_src_is_live gst_base_src_is_live; alias c_gst_base_src_new_seamless_segment gst_base_src_new_seamless_segment; alias c_gst_base_src_query_latency gst_base_src_query_latency; alias c_gst_base_src_set_async gst_base_src_set_async; alias c_gst_base_src_set_automatic_eos gst_base_src_set_automatic_eos; alias c_gst_base_src_set_blocksize gst_base_src_set_blocksize; alias c_gst_base_src_set_caps gst_base_src_set_caps; alias c_gst_base_src_set_do_timestamp gst_base_src_set_do_timestamp; alias c_gst_base_src_set_dynamic_size gst_base_src_set_dynamic_size; alias c_gst_base_src_set_format gst_base_src_set_format; alias c_gst_base_src_set_live gst_base_src_set_live; alias c_gst_base_src_start_complete gst_base_src_start_complete; alias c_gst_base_src_start_wait gst_base_src_start_wait; alias c_gst_base_src_wait_playing gst_base_src_wait_playing; // gst.base.BaseTransform alias c_gst_base_transform_get_type gst_base_transform_get_type; alias c_gst_base_transform_get_allocator gst_base_transform_get_allocator; alias c_gst_base_transform_get_buffer_pool gst_base_transform_get_buffer_pool; alias c_gst_base_transform_is_in_place gst_base_transform_is_in_place; alias c_gst_base_transform_is_passthrough gst_base_transform_is_passthrough; alias c_gst_base_transform_is_qos_enabled gst_base_transform_is_qos_enabled; alias c_gst_base_transform_reconfigure_sink gst_base_transform_reconfigure_sink; alias c_gst_base_transform_reconfigure_src gst_base_transform_reconfigure_src; alias c_gst_base_transform_set_gap_aware gst_base_transform_set_gap_aware; alias c_gst_base_transform_set_in_place gst_base_transform_set_in_place; alias c_gst_base_transform_set_passthrough gst_base_transform_set_passthrough; alias c_gst_base_transform_set_prefer_passthrough gst_base_transform_set_prefer_passthrough; alias c_gst_base_transform_set_qos_enabled gst_base_transform_set_qos_enabled; alias c_gst_base_transform_update_qos gst_base_transform_update_qos; alias c_gst_base_transform_update_src_caps gst_base_transform_update_src_caps; // gst.base.BitReader alias c_gst_bit_reader_free gst_bit_reader_free; alias c_gst_bit_reader_get_bits_uint16 gst_bit_reader_get_bits_uint16; alias c_gst_bit_reader_get_bits_uint32 gst_bit_reader_get_bits_uint32; alias c_gst_bit_reader_get_bits_uint64 gst_bit_reader_get_bits_uint64; alias c_gst_bit_reader_get_bits_uint8 gst_bit_reader_get_bits_uint8; alias c_gst_bit_reader_get_pos gst_bit_reader_get_pos; alias c_gst_bit_reader_get_remaining gst_bit_reader_get_remaining; alias c_gst_bit_reader_get_size gst_bit_reader_get_size; alias c_gst_bit_reader_init gst_bit_reader_init; alias c_gst_bit_reader_peek_bits_uint16 gst_bit_reader_peek_bits_uint16; alias c_gst_bit_reader_peek_bits_uint32 gst_bit_reader_peek_bits_uint32; alias c_gst_bit_reader_peek_bits_uint64 gst_bit_reader_peek_bits_uint64; alias c_gst_bit_reader_peek_bits_uint8 gst_bit_reader_peek_bits_uint8; alias c_gst_bit_reader_set_pos gst_bit_reader_set_pos; alias c_gst_bit_reader_skip gst_bit_reader_skip; alias c_gst_bit_reader_skip_to_byte gst_bit_reader_skip_to_byte; alias c_gst_bit_reader_new gst_bit_reader_new; // gst.base.ByteReader alias c_gst_byte_reader_dup_data gst_byte_reader_dup_data; alias c_gst_byte_reader_dup_string_utf16 gst_byte_reader_dup_string_utf16; alias c_gst_byte_reader_dup_string_utf32 gst_byte_reader_dup_string_utf32; alias c_gst_byte_reader_dup_string_utf8 gst_byte_reader_dup_string_utf8; alias c_gst_byte_reader_free gst_byte_reader_free; alias c_gst_byte_reader_get_data gst_byte_reader_get_data; alias c_gst_byte_reader_get_float32_be gst_byte_reader_get_float32_be; alias c_gst_byte_reader_get_float32_le gst_byte_reader_get_float32_le; alias c_gst_byte_reader_get_float64_be gst_byte_reader_get_float64_be; alias c_gst_byte_reader_get_float64_le gst_byte_reader_get_float64_le; alias c_gst_byte_reader_get_int16_be gst_byte_reader_get_int16_be; alias c_gst_byte_reader_get_int16_le gst_byte_reader_get_int16_le; alias c_gst_byte_reader_get_int24_be gst_byte_reader_get_int24_be; alias c_gst_byte_reader_get_int24_le gst_byte_reader_get_int24_le; alias c_gst_byte_reader_get_int32_be gst_byte_reader_get_int32_be; alias c_gst_byte_reader_get_int32_le gst_byte_reader_get_int32_le; alias c_gst_byte_reader_get_int64_be gst_byte_reader_get_int64_be; alias c_gst_byte_reader_get_int64_le gst_byte_reader_get_int64_le; alias c_gst_byte_reader_get_int8 gst_byte_reader_get_int8; alias c_gst_byte_reader_get_pos gst_byte_reader_get_pos; alias c_gst_byte_reader_get_remaining gst_byte_reader_get_remaining; alias c_gst_byte_reader_get_size gst_byte_reader_get_size; alias c_gst_byte_reader_get_string_utf8 gst_byte_reader_get_string_utf8; alias c_gst_byte_reader_get_sub_reader gst_byte_reader_get_sub_reader; alias c_gst_byte_reader_get_uint16_be gst_byte_reader_get_uint16_be; alias c_gst_byte_reader_get_uint16_le gst_byte_reader_get_uint16_le; alias c_gst_byte_reader_get_uint24_be gst_byte_reader_get_uint24_be; alias c_gst_byte_reader_get_uint24_le gst_byte_reader_get_uint24_le; alias c_gst_byte_reader_get_uint32_be gst_byte_reader_get_uint32_be; alias c_gst_byte_reader_get_uint32_le gst_byte_reader_get_uint32_le; alias c_gst_byte_reader_get_uint64_be gst_byte_reader_get_uint64_be; alias c_gst_byte_reader_get_uint64_le gst_byte_reader_get_uint64_le; alias c_gst_byte_reader_get_uint8 gst_byte_reader_get_uint8; alias c_gst_byte_reader_init gst_byte_reader_init; alias c_gst_byte_reader_masked_scan_uint32 gst_byte_reader_masked_scan_uint32; alias c_gst_byte_reader_masked_scan_uint32_peek gst_byte_reader_masked_scan_uint32_peek; alias c_gst_byte_reader_peek_data gst_byte_reader_peek_data; alias c_gst_byte_reader_peek_float32_be gst_byte_reader_peek_float32_be; alias c_gst_byte_reader_peek_float32_le gst_byte_reader_peek_float32_le; alias c_gst_byte_reader_peek_float64_be gst_byte_reader_peek_float64_be; alias c_gst_byte_reader_peek_float64_le gst_byte_reader_peek_float64_le; alias c_gst_byte_reader_peek_int16_be gst_byte_reader_peek_int16_be; alias c_gst_byte_reader_peek_int16_le gst_byte_reader_peek_int16_le; alias c_gst_byte_reader_peek_int24_be gst_byte_reader_peek_int24_be; alias c_gst_byte_reader_peek_int24_le gst_byte_reader_peek_int24_le; alias c_gst_byte_reader_peek_int32_be gst_byte_reader_peek_int32_be; alias c_gst_byte_reader_peek_int32_le gst_byte_reader_peek_int32_le; alias c_gst_byte_reader_peek_int64_be gst_byte_reader_peek_int64_be; alias c_gst_byte_reader_peek_int64_le gst_byte_reader_peek_int64_le; alias c_gst_byte_reader_peek_int8 gst_byte_reader_peek_int8; alias c_gst_byte_reader_peek_string_utf8 gst_byte_reader_peek_string_utf8; alias c_gst_byte_reader_peek_sub_reader gst_byte_reader_peek_sub_reader; alias c_gst_byte_reader_peek_uint16_be gst_byte_reader_peek_uint16_be; alias c_gst_byte_reader_peek_uint16_le gst_byte_reader_peek_uint16_le; alias c_gst_byte_reader_peek_uint24_be gst_byte_reader_peek_uint24_be; alias c_gst_byte_reader_peek_uint24_le gst_byte_reader_peek_uint24_le; alias c_gst_byte_reader_peek_uint32_be gst_byte_reader_peek_uint32_be; alias c_gst_byte_reader_peek_uint32_le gst_byte_reader_peek_uint32_le; alias c_gst_byte_reader_peek_uint64_be gst_byte_reader_peek_uint64_be; alias c_gst_byte_reader_peek_uint64_le gst_byte_reader_peek_uint64_le; alias c_gst_byte_reader_peek_uint8 gst_byte_reader_peek_uint8; alias c_gst_byte_reader_set_pos gst_byte_reader_set_pos; alias c_gst_byte_reader_skip gst_byte_reader_skip; alias c_gst_byte_reader_skip_string_utf16 gst_byte_reader_skip_string_utf16; alias c_gst_byte_reader_skip_string_utf32 gst_byte_reader_skip_string_utf32; alias c_gst_byte_reader_skip_string_utf8 gst_byte_reader_skip_string_utf8; alias c_gst_byte_reader_new gst_byte_reader_new; // gst.base.ByteWriter alias c_gst_byte_writer_ensure_free_space gst_byte_writer_ensure_free_space; alias c_gst_byte_writer_fill gst_byte_writer_fill; alias c_gst_byte_writer_free gst_byte_writer_free; alias c_gst_byte_writer_free_and_get_buffer gst_byte_writer_free_and_get_buffer; alias c_gst_byte_writer_free_and_get_data gst_byte_writer_free_and_get_data; alias c_gst_byte_writer_get_remaining gst_byte_writer_get_remaining; alias c_gst_byte_writer_init gst_byte_writer_init; alias c_gst_byte_writer_init_with_data gst_byte_writer_init_with_data; alias c_gst_byte_writer_init_with_size gst_byte_writer_init_with_size; alias c_gst_byte_writer_put_buffer gst_byte_writer_put_buffer; alias c_gst_byte_writer_put_data gst_byte_writer_put_data; alias c_gst_byte_writer_put_float32_be gst_byte_writer_put_float32_be; alias c_gst_byte_writer_put_float32_le gst_byte_writer_put_float32_le; alias c_gst_byte_writer_put_float64_be gst_byte_writer_put_float64_be; alias c_gst_byte_writer_put_float64_le gst_byte_writer_put_float64_le; alias c_gst_byte_writer_put_int16_be gst_byte_writer_put_int16_be; alias c_gst_byte_writer_put_int16_le gst_byte_writer_put_int16_le; alias c_gst_byte_writer_put_int24_be gst_byte_writer_put_int24_be; alias c_gst_byte_writer_put_int24_le gst_byte_writer_put_int24_le; alias c_gst_byte_writer_put_int32_be gst_byte_writer_put_int32_be; alias c_gst_byte_writer_put_int32_le gst_byte_writer_put_int32_le; alias c_gst_byte_writer_put_int64_be gst_byte_writer_put_int64_be; alias c_gst_byte_writer_put_int64_le gst_byte_writer_put_int64_le; alias c_gst_byte_writer_put_int8 gst_byte_writer_put_int8; alias c_gst_byte_writer_put_string_utf16 gst_byte_writer_put_string_utf16; alias c_gst_byte_writer_put_string_utf32 gst_byte_writer_put_string_utf32; alias c_gst_byte_writer_put_string_utf8 gst_byte_writer_put_string_utf8; alias c_gst_byte_writer_put_uint16_be gst_byte_writer_put_uint16_be; alias c_gst_byte_writer_put_uint16_le gst_byte_writer_put_uint16_le; alias c_gst_byte_writer_put_uint24_be gst_byte_writer_put_uint24_be; alias c_gst_byte_writer_put_uint24_le gst_byte_writer_put_uint24_le; alias c_gst_byte_writer_put_uint32_be gst_byte_writer_put_uint32_be; alias c_gst_byte_writer_put_uint32_le gst_byte_writer_put_uint32_le; alias c_gst_byte_writer_put_uint64_be gst_byte_writer_put_uint64_be; alias c_gst_byte_writer_put_uint64_le gst_byte_writer_put_uint64_le; alias c_gst_byte_writer_put_uint8 gst_byte_writer_put_uint8; alias c_gst_byte_writer_reset gst_byte_writer_reset; alias c_gst_byte_writer_reset_and_get_buffer gst_byte_writer_reset_and_get_buffer; alias c_gst_byte_writer_reset_and_get_data gst_byte_writer_reset_and_get_data; alias c_gst_byte_writer_new gst_byte_writer_new; alias c_gst_byte_writer_new_with_data gst_byte_writer_new_with_data; alias c_gst_byte_writer_new_with_size gst_byte_writer_new_with_size; // gst.base.CollectPads alias c_gst_collect_pads_get_type gst_collect_pads_get_type; alias c_gst_collect_pads_new gst_collect_pads_new; alias c_gst_collect_pads_add_pad gst_collect_pads_add_pad; alias c_gst_collect_pads_available gst_collect_pads_available; alias c_gst_collect_pads_clip_running_time gst_collect_pads_clip_running_time; alias c_gst_collect_pads_event_default gst_collect_pads_event_default; alias c_gst_collect_pads_flush gst_collect_pads_flush; alias c_gst_collect_pads_peek gst_collect_pads_peek; alias c_gst_collect_pads_pop gst_collect_pads_pop; alias c_gst_collect_pads_query_default gst_collect_pads_query_default; alias c_gst_collect_pads_read_buffer gst_collect_pads_read_buffer; alias c_gst_collect_pads_remove_pad gst_collect_pads_remove_pad; alias c_gst_collect_pads_set_buffer_function gst_collect_pads_set_buffer_function; alias c_gst_collect_pads_set_clip_function gst_collect_pads_set_clip_function; alias c_gst_collect_pads_set_compare_function gst_collect_pads_set_compare_function; alias c_gst_collect_pads_set_event_function gst_collect_pads_set_event_function; alias c_gst_collect_pads_set_flush_function gst_collect_pads_set_flush_function; alias c_gst_collect_pads_set_flushing gst_collect_pads_set_flushing; alias c_gst_collect_pads_set_function gst_collect_pads_set_function; alias c_gst_collect_pads_set_query_function gst_collect_pads_set_query_function; alias c_gst_collect_pads_set_waiting gst_collect_pads_set_waiting; alias c_gst_collect_pads_src_event_default gst_collect_pads_src_event_default; alias c_gst_collect_pads_start gst_collect_pads_start; alias c_gst_collect_pads_stop gst_collect_pads_stop; alias c_gst_collect_pads_take_buffer gst_collect_pads_take_buffer; // gst.base.DataQueue alias c_gst_data_queue_get_type gst_data_queue_get_type; alias c_gst_data_queue_new gst_data_queue_new; alias c_gst_data_queue_drop_head gst_data_queue_drop_head; alias c_gst_data_queue_flush gst_data_queue_flush; alias c_gst_data_queue_get_level gst_data_queue_get_level; alias c_gst_data_queue_is_empty gst_data_queue_is_empty; alias c_gst_data_queue_is_full gst_data_queue_is_full; alias c_gst_data_queue_limits_changed gst_data_queue_limits_changed; alias c_gst_data_queue_peek gst_data_queue_peek; alias c_gst_data_queue_pop gst_data_queue_pop; alias c_gst_data_queue_push gst_data_queue_push; alias c_gst_data_queue_push_force gst_data_queue_push_force; alias c_gst_data_queue_set_flushing gst_data_queue_set_flushing; // gst.base.FlowCombiner alias c_gst_flow_combiner_get_type gst_flow_combiner_get_type; alias c_gst_flow_combiner_new gst_flow_combiner_new; alias c_gst_flow_combiner_add_pad gst_flow_combiner_add_pad; alias c_gst_flow_combiner_clear gst_flow_combiner_clear; alias c_gst_flow_combiner_free gst_flow_combiner_free; alias c_gst_flow_combiner_ref gst_flow_combiner_ref; alias c_gst_flow_combiner_remove_pad gst_flow_combiner_remove_pad; alias c_gst_flow_combiner_reset gst_flow_combiner_reset; alias c_gst_flow_combiner_unref gst_flow_combiner_unref; alias c_gst_flow_combiner_update_flow gst_flow_combiner_update_flow; alias c_gst_flow_combiner_update_pad_flow gst_flow_combiner_update_pad_flow; // gst.base.PushSrc alias c_gst_push_src_get_type gst_push_src_get_type; // gst.base.QueueArray alias c_gst_queue_array_drop_element gst_queue_array_drop_element; alias c_gst_queue_array_drop_struct gst_queue_array_drop_struct; alias c_gst_queue_array_find gst_queue_array_find; alias c_gst_queue_array_free gst_queue_array_free; alias c_gst_queue_array_get_length gst_queue_array_get_length; alias c_gst_queue_array_is_empty gst_queue_array_is_empty; alias c_gst_queue_array_peek_head gst_queue_array_peek_head; alias c_gst_queue_array_peek_head_struct gst_queue_array_peek_head_struct; alias c_gst_queue_array_pop_head gst_queue_array_pop_head; alias c_gst_queue_array_pop_head_struct gst_queue_array_pop_head_struct; alias c_gst_queue_array_push_tail gst_queue_array_push_tail; alias c_gst_queue_array_push_tail_struct gst_queue_array_push_tail_struct; alias c_gst_queue_array_new gst_queue_array_new; alias c_gst_queue_array_new_for_struct gst_queue_array_new_for_struct; // gst.base.Base alias c_gst_type_find_helper gst_type_find_helper; alias c_gst_type_find_helper_for_buffer gst_type_find_helper_for_buffer; alias c_gst_type_find_helper_for_data gst_type_find_helper_for_data; alias c_gst_type_find_helper_for_extension gst_type_find_helper_for_extension; alias c_gst_type_find_helper_get_range gst_type_find_helper_get_range; GtkD-3.7.5/generated/gstreamer/gst/base/c/types.d000066400000000000000000000575611324604450400215700ustar00rootroot00000000000000/* * 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 gst.base.c.types; public import glib.c.types; public import gobject.c.types; public import gstreamer.c.types; /** * Flags to be used in a #GstBaseParseFrame. */ public enum GstBaseParseFrameFlags { /** * no flag */ NONE = 0, /** * set by baseclass if current frame * is passed for processing to the subclass for the first time * (and not set on subsequent calls with same data). */ NEW_FRAME = 1, /** * set to indicate this buffer should not be * counted as frame, e.g. if this frame is dependent on a previous one. * As it is not counted as a frame, bitrate increases but frame to time * conversions are maintained. */ NO_FRAME = 2, /** * @pre_push_frame can set this to indicate * that regular segment clipping can still be performed (as opposed to * any custom one having been done). */ CLIP = 4, /** * indicates to @finish_frame that the * the frame should be dropped (and might be handled internally by subclass) */ DROP = 8, /** * indicates to @finish_frame that the * the frame should be queued for now and processed fully later * when the first non-queued frame is finished */ QUEUE = 16, } alias GstBaseParseFrameFlags BaseParseFrameFlags; /** * The #GstElement flags that a basesrc element may have. */ public enum GstBaseSrcFlags { /** * has source is starting */ STARTING = 16384, /** * has source been started */ STARTED = 32768, /** * offset to define more flags */ LAST = 1048576, } alias GstBaseSrcFlags BaseSrcFlags; public enum GstCollectPadsStateFlags { /** * Set if collectdata's pad is EOS. */ EOS = 1, /** * Set if collectdata's pad is flushing. */ FLUSHING = 2, /** * Set if collectdata's pad received a * new_segment event. */ NEW_SEGMENT = 4, /** * Set if collectdata's pad must be waited * for when collecting. */ WAITING = 8, /** * Set collectdata's pad WAITING state must * not be changed. * #GstCollectPadsStateFlags indicate private state of a collectdata('s pad). */ LOCKED = 16, } alias GstCollectPadsStateFlags CollectPadsStateFlags; struct GstAdapter; struct GstAdapterClass; struct GstBaseParse { /** * the parent element. */ GstElement element; GstPad* sinkpad; GstPad* srcpad; uint flags; GstSegment segment; void*[20] GstReserved; GstBaseParsePrivate* priv; } /** * Subclasses can override any of the available virtual methods or not, as * needed. At minimum @handle_frame needs to be overridden. */ struct GstBaseParseClass { /** * the parent class */ GstElementClass parentClass; /** */ extern(C) int function(GstBaseParse* parse) start; /** */ extern(C) int function(GstBaseParse* parse) stop; /** */ extern(C) int function(GstBaseParse* parse, GstCaps* caps) setSinkCaps; /** */ extern(C) GstFlowReturn function(GstBaseParse* parse, GstBaseParseFrame* frame, int* skipsize) handleFrame; /** */ extern(C) GstFlowReturn function(GstBaseParse* parse, GstBaseParseFrame* frame) prePushFrame; /** */ extern(C) int function(GstBaseParse* parse, GstFormat srcFormat, long srcValue, GstFormat destFormat, long* destValue) convert; /** */ extern(C) int function(GstBaseParse* parse, GstEvent* event) sinkEvent; /** */ extern(C) int function(GstBaseParse* parse, GstEvent* event) srcEvent; /** */ extern(C) GstCaps* function(GstBaseParse* parse, GstCaps* filter) getSinkCaps; /** */ extern(C) GstFlowReturn function(GstBaseParse* parse, GstBuffer* buffer) detect; /** */ extern(C) int function(GstBaseParse* parse, GstQuery* query) sinkQuery; /** */ extern(C) int function(GstBaseParse* parse, GstQuery* query) srcQuery; void*[18] GstReserved; } struct GstBaseParseFrame { /** * input data to be parsed for frames. */ GstBuffer* buffer; /** * output data. */ GstBuffer* outBuffer; /** * a combination of input and output #GstBaseParseFrameFlags that * convey additional context to subclass or allow subclass to tune * subsequent #GstBaseParse actions. */ uint flags; /** * media specific offset of input frame * Note that a converter may have a different one on the frame's buffer. */ ulong offset; /** * subclass can set this to indicates the metadata overhead * for the given frame, which is then used to enable more accurate bitrate * computations. If this is -1, it is assumed that this frame should be * skipped in bitrate calculation. */ int overhead; int size; uint[2] GstReservedI; void*[2] GstReservedP; uint PrivateFlags; } struct GstBaseParsePrivate; struct GstBaseSink { GstElement element; GstPad* sinkpad; GstPadMode padMode; ulong offset; bool canActivatePull; bool canActivatePush; GMutex prerollLock; GCond prerollCond; bool eos; bool needPreroll; bool havePreroll; bool playingAsync; bool haveNewsegment; GstSegment segment; GstClockID clockId; bool sync; bool flushing; bool running; long maxLateness; GstBaseSinkPrivate* priv; void*[20] GstReserved; } /** * Subclasses can override any of the available virtual methods or not, as * needed. At the minimum, the @render method should be overridden to * output/present buffers. */ struct GstBaseSinkClass { /** * Element parent class */ GstElementClass parentClass; /** */ extern(C) GstCaps* function(GstBaseSink* sink, GstCaps* filter) getCaps; /** */ extern(C) int function(GstBaseSink* sink, GstCaps* caps) setCaps; /** */ extern(C) GstCaps* function(GstBaseSink* sink, GstCaps* caps) fixate; /** */ extern(C) int function(GstBaseSink* sink, int active) activatePull; /** */ extern(C) void function(GstBaseSink* sink, GstBuffer* buffer, GstClockTime* start, GstClockTime* end) getTimes; /** */ extern(C) int function(GstBaseSink* sink, GstQuery* query) proposeAllocation; /** */ extern(C) int function(GstBaseSink* sink) start; /** */ extern(C) int function(GstBaseSink* sink) stop; /** */ extern(C) int function(GstBaseSink* sink) unlock; /** */ extern(C) int function(GstBaseSink* sink) unlockStop; /** */ extern(C) int function(GstBaseSink* sink, GstQuery* query) query; /** */ extern(C) int function(GstBaseSink* sink, GstEvent* event) event; /** */ extern(C) GstFlowReturn function(GstBaseSink* sink, GstEvent* event) waitEvent; /** */ extern(C) GstFlowReturn function(GstBaseSink* sink, GstBuffer* buffer) prepare; /** */ extern(C) GstFlowReturn function(GstBaseSink* sink, GstBufferList* bufferList) prepareList; /** */ extern(C) GstFlowReturn function(GstBaseSink* sink, GstBuffer* buffer) preroll; /** */ extern(C) GstFlowReturn function(GstBaseSink* sink, GstBuffer* buffer) render; /** */ extern(C) GstFlowReturn function(GstBaseSink* sink, GstBufferList* bufferList) renderList; void*[20] GstReserved; } struct GstBaseSinkPrivate; struct GstBaseSrc { GstElement element; GstPad* srcpad; GMutex liveLock; GCond liveCond; bool isLive; bool liveRunning; uint blocksize; bool canActivatePush; bool randomAccess; GstClockID clockId; GstSegment segment; bool needNewsegment; int numBuffers; int numBuffersLeft; bool typefind; bool running; GstEvent* pendingSeek; GstBaseSrcPrivate* priv; void*[20] GstReserved; } /** * Subclasses can override any of the available virtual methods or not, as * needed. At the minimum, the @create method should be overridden to produce * buffers. */ struct GstBaseSrcClass { /** * Element parent class */ GstElementClass parentClass; /** */ extern(C) GstCaps* function(GstBaseSrc* src, GstCaps* filter) getCaps; /** */ extern(C) int function(GstBaseSrc* src) negotiate; /** */ extern(C) GstCaps* function(GstBaseSrc* src, GstCaps* caps) fixate; /** * * Params: * src = a #GstBaseSrc * caps = a #GstCaps * Returns: %TRUE if the caps could be set */ extern(C) int function(GstBaseSrc* src, GstCaps* caps) setCaps; /** */ extern(C) int function(GstBaseSrc* src, GstQuery* query) decideAllocation; /** */ extern(C) int function(GstBaseSrc* src) start; /** */ extern(C) int function(GstBaseSrc* src) stop; /** */ extern(C) void function(GstBaseSrc* src, GstBuffer* buffer, GstClockTime* start, GstClockTime* end) getTimes; /** */ extern(C) int function(GstBaseSrc* src, ulong* size) getSize; /** */ extern(C) int function(GstBaseSrc* src) isSeekable; /** */ extern(C) int function(GstBaseSrc* src, GstEvent* seek, GstSegment* segment) prepareSeekSegment; /** */ extern(C) int function(GstBaseSrc* src, GstSegment* segment) doSeek; /** */ extern(C) int function(GstBaseSrc* src) unlock; /** */ extern(C) int function(GstBaseSrc* src) unlockStop; /** */ extern(C) int function(GstBaseSrc* src, GstQuery* query) query; /** */ extern(C) int function(GstBaseSrc* src, GstEvent* event) event; /** */ extern(C) GstFlowReturn function(GstBaseSrc* src, ulong offset, uint size, GstBuffer** buf) create; /** */ extern(C) GstFlowReturn function(GstBaseSrc* src, ulong offset, uint size, GstBuffer** buf) alloc; /** */ extern(C) GstFlowReturn function(GstBaseSrc* src, ulong offset, uint size, GstBuffer* buf) fill; void*[20] GstReserved; } struct GstBaseSrcPrivate; struct GstBaseTransform { GstElement element; GstPad* sinkpad; GstPad* srcpad; bool haveSegment; GstSegment segment; GstBuffer* queuedBuf; GstBaseTransformPrivate* priv; void*[19] GstReserved; } /** * Subclasses can override any of the available virtual methods or not, as * needed. At minimum either @transform or @transform_ip need to be overridden. * If the element can overwrite the input data with the results (data is of the * same type and quantity) it should provide @transform_ip. */ struct GstBaseTransformClass { /** * Element parent class */ GstElementClass parentClass; /** * If set to %TRUE, passthrough mode will be * automatically enabled if the caps are the same. * Set to %FALSE by default. */ bool passthroughOnSameCaps; /** * If set to %TRUE, @transform_ip will be called in * passthrough mode. The passed buffer might not be * writable. When %FALSE, neither @transform nor * @transform_ip will be called in passthrough mode. * Set to %TRUE by default. */ bool transformIpOnPassthrough; /** */ extern(C) GstCaps* function(GstBaseTransform* trans, GstPadDirection direction, GstCaps* caps, GstCaps* filter) transformCaps; /** */ extern(C) GstCaps* function(GstBaseTransform* trans, GstPadDirection direction, GstCaps* caps, GstCaps* othercaps) fixateCaps; /** */ extern(C) int function(GstBaseTransform* trans, GstPadDirection direction, GstCaps* caps) acceptCaps; /** */ extern(C) int function(GstBaseTransform* trans, GstCaps* incaps, GstCaps* outcaps) setCaps; /** */ extern(C) int function(GstBaseTransform* trans, GstPadDirection direction, GstQuery* query) query; /** */ extern(C) int function(GstBaseTransform* trans, GstQuery* query) decideAllocation; /** */ extern(C) int function(GstBaseTransform* trans, GstQuery* query, GType api, GstStructure* params) filterMeta; /** */ extern(C) int function(GstBaseTransform* trans, GstQuery* decideQuery, GstQuery* query) proposeAllocation; /** */ extern(C) int function(GstBaseTransform* trans, GstPadDirection direction, GstCaps* caps, size_t size, GstCaps* othercaps, size_t* othersize) transformSize; /** */ extern(C) int function(GstBaseTransform* trans, GstCaps* caps, size_t* size) getUnitSize; /** */ extern(C) int function(GstBaseTransform* trans) start; /** */ extern(C) int function(GstBaseTransform* trans) stop; /** */ extern(C) int function(GstBaseTransform* trans, GstEvent* event) sinkEvent; /** */ extern(C) int function(GstBaseTransform* trans, GstEvent* event) srcEvent; /** */ extern(C) GstFlowReturn function(GstBaseTransform* trans, GstBuffer* input, GstBuffer** outbuf) prepareOutputBuffer; /** */ extern(C) int function(GstBaseTransform* trans, GstBuffer* input, GstBuffer* outbuf) copyMetadata; /** */ extern(C) int function(GstBaseTransform* trans, GstBuffer* outbuf, GstMeta* meta, GstBuffer* inbuf) transformMeta; /** */ extern(C) void function(GstBaseTransform* trans, GstBuffer* buffer) beforeTransform; /** */ extern(C) GstFlowReturn function(GstBaseTransform* trans, GstBuffer* inbuf, GstBuffer* outbuf) transform; /** */ extern(C) GstFlowReturn function(GstBaseTransform* trans, GstBuffer* buf) transformIp; /** */ extern(C) GstFlowReturn function(GstBaseTransform* trans, int isDiscont, GstBuffer* input) submitInputBuffer; /** */ extern(C) GstFlowReturn function(GstBaseTransform* trans, GstBuffer** outbuf) generateOutput; void*[18] GstReserved; } struct GstBaseTransformPrivate; struct GstBitReader { /** * Data from which the bit reader will * read */ ubyte* data; /** * Size of @data in bytes */ uint size; /** * Current byte position */ uint _byte; /** * Bit position in the current byte */ uint bit; void*[4] GstReserved; } struct GstByteReader { /** * Data from which the bit reader will * read */ ubyte* data; /** * Size of @data in bytes */ uint size; /** * Current byte position */ uint _byte; void*[4] GstReserved; } struct GstByteWriter { /** * #GstByteReader parent */ GstByteReader parent; /** * Allocation size of the data */ uint allocSize; /** * If %TRUE no reallocations are allowed */ bool fixed; /** * If %FALSE no reallocations are allowed and copies of data are returned */ bool owned; void*[4] GstReserved; } /** * Structure used by the collect_pads. */ struct GstCollectData { /** * owner #GstCollectPads */ GstCollectPads* collect; /** * #GstPad managed by this data */ GstPad* pad; /** * currently queued buffer. */ GstBuffer* buffer; /** * position in the buffer */ uint pos; /** * last segment received. */ GstSegment segment; GstCollectPadsStateFlags state; GstCollectDataPrivate* priv; union ABI { struct Abi { long dts; } Abi abi; void*[4] GstReserved; } ABI abi; } struct GstCollectDataPrivate; struct GstCollectPads { GstObject object; /** * #GList of #GstCollectData managed * by this #GstCollectPads. */ GSList* data; GRecMutex streamLock; GstCollectPadsPrivate* priv; void*[4] GstReserved; } struct GstCollectPadsClass { GstObjectClass parentClass; void*[4] GstReserved; } struct GstCollectPadsPrivate; struct GstDataQueue { /** * the parent structure */ GObject object; GstDataQueuePrivate* priv; void*[4] GstReserved; } struct GstDataQueueClass { GObjectClass parentClass; /** */ extern(C) void function(GstDataQueue* queue) empty; /** */ extern(C) void function(GstDataQueue* queue) full; void*[4] GstReserved; } /** * Structure used by #GstDataQueue. You can supply a different structure, as * long as the top of the structure is identical to this structure. */ struct GstDataQueueItem { /** * the #GstMiniObject to queue. */ GstMiniObject* object; /** * the size in bytes of the miniobject. */ uint size; /** * the duration in #GstClockTime of the miniobject. Can not be * %GST_CLOCK_TIME_NONE. */ ulong duration; /** * %TRUE if @object should be considered as a visible object. */ bool visible; /** * The #GDestroyNotify function to use to free the #GstDataQueueItem. * This function should also drop the reference to @object the owner of the * #GstDataQueueItem is assumed to hold. */ GDestroyNotify destroy; void*[4] GstReserved; } struct GstDataQueuePrivate; /** * Structure describing the size of a queue. */ struct GstDataQueueSize { /** * number of buffers */ uint visible; /** * number of bytes */ uint bytes; /** * amount of time */ ulong time; } struct GstFlowCombiner; struct GstPushSrc { GstBaseSrc parent; void*[4] GstReserved; } /** * Subclasses can override any of the available virtual methods or not, as * needed. At the minimum, the @fill method should be overridden to produce * buffers. */ struct GstPushSrcClass { /** * Element parent class */ GstBaseSrcClass parentClass; /** */ extern(C) GstFlowReturn function(GstPushSrc* src, GstBuffer** buf) create; /** */ extern(C) GstFlowReturn function(GstPushSrc* src, GstBuffer** buf) alloc; /** */ extern(C) GstFlowReturn function(GstPushSrc* src, GstBuffer* buf) fill; void*[4] GstReserved; } struct GstQueueArray; /** * A function that will be called when the #GstCollectData will be freed. * It is passed the pointer to the structure and should free any custom * memory and resources allocated for it. * * Params: * data = the #GstCollectData that will be freed */ public alias extern(C) void function(GstCollectData* data) GstCollectDataDestroyNotify; /** * A function that will be called when a (considered oldest) buffer can be muxed. * If all pads have reached EOS, this function is called with %NULL @buffer * and %NULL @data. * * Params: * pads = the #GstCollectPads that triggered the callback * data = the #GstCollectData of pad that has received the buffer * buffer = the #GstBuffer * userData = user data passed to gst_collect_pads_set_buffer_function() * * Returns: %GST_FLOW_OK for success */ public alias extern(C) GstFlowReturn function(GstCollectPads* pads, GstCollectData* data, GstBuffer* buffer, void* userData) GstCollectPadsBufferFunction; /** * A function that will be called when @inbuffer is received on the pad managed * by @data in the collectpad object @pads. * * The function should use the segment of @data and the negotiated media type on * the pad to perform clipping of @inbuffer. * * This function takes ownership of @inbuffer and should output a buffer in * @outbuffer or return %NULL in @outbuffer if the buffer should be dropped. * * Params: * pads = a #GstCollectPads * data = a #GstCollectData * inbuffer = the input #GstBuffer * outbuffer = the output #GstBuffer * userData = user data * * Returns: a #GstFlowReturn that corresponds to the result of clipping. */ public alias extern(C) GstFlowReturn function(GstCollectPads* pads, GstCollectData* data, GstBuffer* inbuffer, GstBuffer** outbuffer, void* userData) GstCollectPadsClipFunction; /** * A function for comparing two timestamps of buffers or newsegments collected on one pad. * * Params: * pads = the #GstCollectPads that is comparing the timestamps * data1 = the first #GstCollectData * timestamp1 = the first timestamp * data2 = the second #GstCollectData * timestamp2 = the second timestamp * userData = user data passed to gst_collect_pads_set_compare_function() * * Returns: Integer less than zero when first timestamp is deemed older than the second one. * Zero if the timestamps are deemed equally old. * Integer greater than zero when second timestamp is deemed older than the first one. */ public alias extern(C) int function(GstCollectPads* pads, GstCollectData* data1, GstClockTime timestamp1, GstCollectData* data2, GstClockTime timestamp2, void* userData) GstCollectPadsCompareFunction; /** * A function that will be called while processing an event. It takes * ownership of the event and is responsible for chaining up (to * gst_collect_pads_event_default()) or dropping events (such typical cases * being handled by the default handler). * * Params: * pads = the #GstCollectPads that triggered the callback * pad = the #GstPad that received an event * event = the #GstEvent received * userData = user data passed to gst_collect_pads_set_event_function() * * Returns: %TRUE if the pad could handle the event */ public alias extern(C) int function(GstCollectPads* pads, GstCollectData* pad, GstEvent* event, void* userData) GstCollectPadsEventFunction; /** * A function that will be called while processing a flushing seek event. * * The function should flush any internal state of the element and the state of * all the pads. It should clear only the state not directly managed by the * @pads object. It is therefore not necessary to call * gst_collect_pads_set_flushing nor gst_collect_pads_clear from this function. * * Params: * pads = a #GstCollectPads * userData = user data * * Since: 1.4 */ public alias extern(C) void function(GstCollectPads* pads, void* userData) GstCollectPadsFlushFunction; /** * A function that will be called when all pads have received data. * * Params: * pads = the #GstCollectPads that triggered the callback * userData = user data passed to gst_collect_pads_set_function() * * Returns: %GST_FLOW_OK for success */ public alias extern(C) GstFlowReturn function(GstCollectPads* pads, void* userData) GstCollectPadsFunction; /** * A function that will be called while processing a query. It takes * ownership of the query and is responsible for chaining up (to * events downstream (with gst_pad_event_default()). * * Params: * pads = the #GstCollectPads that triggered the callback * pad = the #GstPad that received an event * query = the #GstEvent received * userData = user data passed to gst_collect_pads_set_query_function() * * Returns: %TRUE if the pad could handle the event */ public alias extern(C) int function(GstCollectPads* pads, GstCollectData* pad, GstQuery* query, void* userData) GstCollectPadsQueryFunction; /** * The prototype of the function used to inform the queue that it should be * considered as full. * * Params: * queue = a #GstDataQueue. * visible = The number of visible items currently in the queue. * bytes = The amount of bytes currently in the queue. * time = The accumulated duration of the items currently in the queue. * checkdata = The #gpointer registered when the #GstDataQueue was created. * * Returns: %TRUE if the queue should be considered full. */ public alias extern(C) int function(GstDataQueue* queue, uint visible, uint bytes, ulong time, void* checkdata) GstDataQueueCheckFullFunction; /** */ public alias extern(C) void function(GstDataQueue* queue, void* checkdata) GstDataQueueEmptyCallback; /** */ public alias extern(C) void function(GstDataQueue* queue, void* checkdata) GstDataQueueFullCallback; /** * This function will be called by gst_type_find_helper_get_range() when * typefinding functions request to peek at the data of a stream at certain * offsets. If this function returns GST_FLOW_OK, the result buffer will be * stored in @buffer. The contents of @buffer is invalid for any other * return value. * * This function is supposed to behave exactly like a #GstPadGetRangeFunction. * * Params: * obj = a #GstObject that will handle the getrange request * parent = the parent of @obj or %NULL * offset = the offset of the range * length = the length of the range * buffer = a memory location to hold the result buffer * * Returns: GST_FLOW_OK for success */ public alias extern(C) GstFlowReturn function(GstObject* obj, GstObject* parent, ulong offset, uint length, GstBuffer** buffer) GstTypeFindHelperGetRangeFunction; enum BASE_PARSE_FLAG_DRAINING = 2; alias GST_BASE_PARSE_FLAG_DRAINING = BASE_PARSE_FLAG_DRAINING; enum BASE_PARSE_FLAG_LOST_SYNC = 1; alias GST_BASE_PARSE_FLAG_LOST_SYNC = BASE_PARSE_FLAG_LOST_SYNC; /** * The name of the templates for the sink pad. */ enum BASE_TRANSFORM_SINK_NAME = "sink"; alias GST_BASE_TRANSFORM_SINK_NAME = BASE_TRANSFORM_SINK_NAME; /** * The name of the templates for the source pad. */ enum BASE_TRANSFORM_SRC_NAME = "src"; alias GST_BASE_TRANSFORM_SRC_NAME = BASE_TRANSFORM_SRC_NAME; GtkD-3.7.5/generated/gstreamer/gst/mpegts/000077500000000000000000000000001324604450400204045ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscEIT.d000066400000000000000000000052041324604450400220060ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscEIT; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Event Information Table (ATSC) */ public final class AtscEIT { /** the main Gtk struct */ protected GstMpegtsAtscEIT* gstMpegtsAtscEIT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscEIT* getAtscEITStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscEIT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscEIT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscEIT* gstMpegtsAtscEIT, bool ownedRef = false) { this.gstMpegtsAtscEIT = gstMpegtsAtscEIT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscEIT); } /** */ public @property ushort sourceId() { return gstMpegtsAtscEIT.sourceId; } /** Ditto */ public @property void sourceId(ushort value) { gstMpegtsAtscEIT.sourceId = value; } /** */ public @property ubyte protocolVersion() { return gstMpegtsAtscEIT.protocolVersion; } /** Ditto */ public @property void protocolVersion(ubyte value) { gstMpegtsAtscEIT.protocolVersion = value; } /** * Events */ public @property PtrArray events() { return new PtrArray(gstMpegtsAtscEIT.events, false); } /** Ditto */ public @property void events(PtrArray value) { gstMpegtsAtscEIT.events = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_atsc_eit_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscEITEvent.d000066400000000000000000000066121324604450400230140ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscEITEvent; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * An ATSC EIT Event */ public final class AtscEITEvent { /** the main Gtk struct */ protected GstMpegtsAtscEITEvent* gstMpegtsAtscEITEvent; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscEITEvent* getAtscEITEventStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscEITEvent; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscEITEvent; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscEITEvent* gstMpegtsAtscEITEvent, bool ownedRef = false) { this.gstMpegtsAtscEITEvent = gstMpegtsAtscEITEvent; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscEITEvent); } /** */ public @property ushort eventId() { return gstMpegtsAtscEITEvent.eventId; } /** Ditto */ public @property void eventId(ushort value) { gstMpegtsAtscEITEvent.eventId = value; } /** */ public @property uint startTime() { return gstMpegtsAtscEITEvent.startTime; } /** Ditto */ public @property void startTime(uint value) { gstMpegtsAtscEITEvent.startTime = value; } /** */ public @property ubyte etmLocation() { return gstMpegtsAtscEITEvent.etmLocation; } /** Ditto */ public @property void etmLocation(ubyte value) { gstMpegtsAtscEITEvent.etmLocation = value; } /** */ public @property uint lengthInSeconds() { return gstMpegtsAtscEITEvent.lengthInSeconds; } /** Ditto */ public @property void lengthInSeconds(uint value) { gstMpegtsAtscEITEvent.lengthInSeconds = value; } /** * the titles */ public @property PtrArray titles() { return new PtrArray(gstMpegtsAtscEITEvent.titles, false); } /** Ditto */ public @property void titles(PtrArray value) { gstMpegtsAtscEITEvent.titles = value.getPtrArrayStruct(); } /** * descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsAtscEITEvent.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsAtscEITEvent.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_atsc_eit_event_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscETT.d000066400000000000000000000055541324604450400220310ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscETT; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Extended Text Table (ATSC) */ public final class AtscETT { /** the main Gtk struct */ protected GstMpegtsAtscETT* gstMpegtsAtscETT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscETT* getAtscETTStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscETT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscETT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscETT* gstMpegtsAtscETT, bool ownedRef = false) { this.gstMpegtsAtscETT = gstMpegtsAtscETT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscETT); } /** */ public @property ushort ettTableIdExtension() { return gstMpegtsAtscETT.ettTableIdExtension; } /** Ditto */ public @property void ettTableIdExtension(ushort value) { gstMpegtsAtscETT.ettTableIdExtension = value; } /** */ public @property ushort protocolVersion() { return gstMpegtsAtscETT.protocolVersion; } /** Ditto */ public @property void protocolVersion(ushort value) { gstMpegtsAtscETT.protocolVersion = value; } /** */ public @property uint etmId() { return gstMpegtsAtscETT.etmId; } /** Ditto */ public @property void etmId(uint value) { gstMpegtsAtscETT.etmId = value; } /** * List of texts */ public @property PtrArray messages() { return new PtrArray(gstMpegtsAtscETT.messages, false); } /** Ditto */ public @property void messages(PtrArray value) { gstMpegtsAtscETT.messages = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_atsc_ett_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscMGT.d000066400000000000000000000056401324604450400220200ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscMGT; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Master Guide Table (A65) */ public final class AtscMGT { /** the main Gtk struct */ protected GstMpegtsAtscMGT* gstMpegtsAtscMGT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscMGT* getAtscMGTStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscMGT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscMGT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscMGT* gstMpegtsAtscMGT, bool ownedRef = false) { this.gstMpegtsAtscMGT = gstMpegtsAtscMGT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscMGT); } /** */ public @property ubyte protocolVersion() { return gstMpegtsAtscMGT.protocolVersion; } /** Ditto */ public @property void protocolVersion(ubyte value) { gstMpegtsAtscMGT.protocolVersion = value; } /** */ public @property ushort tablesDefined() { return gstMpegtsAtscMGT.tablesDefined; } /** Ditto */ public @property void tablesDefined(ushort value) { gstMpegtsAtscMGT.tablesDefined = value; } /** * the tables */ public @property PtrArray tables() { return new PtrArray(gstMpegtsAtscMGT.tables, false); } /** Ditto */ public @property void tables(PtrArray value) { gstMpegtsAtscMGT.tables = value.getPtrArrayStruct(); } /** * descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsAtscMGT.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsAtscMGT.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_atsc_mgt_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscMGTTable.d000066400000000000000000000062051324604450400227660ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscMGTTable; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Source from a @GstMpegtsAtscMGT */ public final class AtscMGTTable { /** the main Gtk struct */ protected GstMpegtsAtscMGTTable* gstMpegtsAtscMGTTable; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscMGTTable* getAtscMGTTableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscMGTTable; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscMGTTable; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscMGTTable* gstMpegtsAtscMGTTable, bool ownedRef = false) { this.gstMpegtsAtscMGTTable = gstMpegtsAtscMGTTable; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscMGTTable); } /** */ public @property ushort tableType() { return gstMpegtsAtscMGTTable.tableType; } /** Ditto */ public @property void tableType(ushort value) { gstMpegtsAtscMGTTable.tableType = value; } /** */ public @property ushort pid() { return gstMpegtsAtscMGTTable.pid; } /** Ditto */ public @property void pid(ushort value) { gstMpegtsAtscMGTTable.pid = value; } /** */ public @property ubyte versionNumber() { return gstMpegtsAtscMGTTable.versionNumber; } /** Ditto */ public @property void versionNumber(ubyte value) { gstMpegtsAtscMGTTable.versionNumber = value; } /** */ public @property uint numberBytes() { return gstMpegtsAtscMGTTable.numberBytes; } /** Ditto */ public @property void numberBytes(uint value) { gstMpegtsAtscMGTTable.numberBytes = value; } /** * descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsAtscMGTTable.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsAtscMGTTable.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_atsc_mgt_table_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscMultString.d000066400000000000000000000050651324604450400235020ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscMultString; private import glib.PtrArray; private import glib.Str; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** */ public final class AtscMultString { /** the main Gtk struct */ protected GstMpegtsAtscMultString* gstMpegtsAtscMultString; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscMultString* getAtscMultStringStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscMultString; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscMultString; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscMultString* gstMpegtsAtscMultString, bool ownedRef = false) { this.gstMpegtsAtscMultString = gstMpegtsAtscMultString; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscMultString); } /** */ public @property char[4] iso639Langcode() { return gstMpegtsAtscMultString.iso639Langcode; } /** Ditto */ public @property void iso639Langcode(char[4] value) { gstMpegtsAtscMultString.iso639Langcode = value; } /** */ public @property PtrArray segments() { return new PtrArray(gstMpegtsAtscMultString.segments, false); } /** Ditto */ public @property void segments(PtrArray value) { gstMpegtsAtscMultString.segments = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_atsc_mult_string_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscSTT.d000066400000000000000000000077271324604450400220530ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscSTT; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gstreamer.DateTime; private import gtkd.Loader; /** * System Time Table (A65) */ public final class AtscSTT { /** the main Gtk struct */ protected GstMpegtsAtscSTT* gstMpegtsAtscSTT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscSTT* getAtscSTTStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscSTT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscSTT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscSTT* gstMpegtsAtscSTT, bool ownedRef = false) { this.gstMpegtsAtscSTT = gstMpegtsAtscSTT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscSTT); } /** */ public @property ubyte protocolVersion() { return gstMpegtsAtscSTT.protocolVersion; } /** Ditto */ public @property void protocolVersion(ubyte value) { gstMpegtsAtscSTT.protocolVersion = value; } /** */ public @property uint systemTime() { return gstMpegtsAtscSTT.systemTime; } /** Ditto */ public @property void systemTime(uint value) { gstMpegtsAtscSTT.systemTime = value; } /** */ public @property ubyte gpsUtcOffset() { return gstMpegtsAtscSTT.gpsUtcOffset; } /** Ditto */ public @property void gpsUtcOffset(ubyte value) { gstMpegtsAtscSTT.gpsUtcOffset = value; } /** */ public @property bool dsStatus() { return gstMpegtsAtscSTT.dsStatus != 0; } /** Ditto */ public @property void dsStatus(bool value) { gstMpegtsAtscSTT.dsStatus = value; } /** */ public @property ubyte dsDayofmonth() { return gstMpegtsAtscSTT.dsDayofmonth; } /** Ditto */ public @property void dsDayofmonth(ubyte value) { gstMpegtsAtscSTT.dsDayofmonth = value; } /** */ public @property ubyte dsHour() { return gstMpegtsAtscSTT.dsHour; } /** Ditto */ public @property void dsHour(ubyte value) { gstMpegtsAtscSTT.dsHour = value; } /** * descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsAtscSTT.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsAtscSTT.descriptors = value.getPtrArrayStruct(); } /** */ public @property DateTime utcDatetime() { return ObjectG.getDObject!(DateTime)(gstMpegtsAtscSTT.utcDatetime, false); } /** Ditto */ public @property void utcDatetime(DateTime value) { gstMpegtsAtscSTT.utcDatetime = value.getDateTimeStruct(); } /** */ public static GType getType() { return gst_mpegts_atsc_stt_get_type(); } /** */ public DateTime getDatetimeUtc() { auto p = gst_mpegts_atsc_stt_get_datetime_utc(gstMpegtsAtscSTT); if(p is null) { return null; } return ObjectG.getDObject!(DateTime)(cast(GstDateTime*) p, true); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscStringSegment.d000066400000000000000000000064051324604450400241620ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscStringSegment; private import glib.Str; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** */ public final class AtscStringSegment { /** the main Gtk struct */ protected GstMpegtsAtscStringSegment* gstMpegtsAtscStringSegment; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscStringSegment* getAtscStringSegmentStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscStringSegment; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscStringSegment; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscStringSegment* gstMpegtsAtscStringSegment, bool ownedRef = false) { this.gstMpegtsAtscStringSegment = gstMpegtsAtscStringSegment; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscStringSegment); } /** */ public @property ubyte compressionType() { return gstMpegtsAtscStringSegment.compressionType; } /** Ditto */ public @property void compressionType(ubyte value) { gstMpegtsAtscStringSegment.compressionType = value; } /** */ public @property ubyte mode() { return gstMpegtsAtscStringSegment.mode; } /** Ditto */ public @property void mode(ubyte value) { gstMpegtsAtscStringSegment.mode = value; } /** */ public @property ubyte[] compressedData() { return gstMpegtsAtscStringSegment.compressedData[0..gstMpegtsAtscStringSegment.compressedDataSize]; } /** Ditto */ public @property void compressedData(ubyte[] value) { gstMpegtsAtscStringSegment.compressedData = value.ptr; gstMpegtsAtscStringSegment.compressedDataSize = cast(ubyte)value.length; } /** */ public @property string cachedString() { return Str.toString(gstMpegtsAtscStringSegment.cachedString); } /** Ditto */ public @property void cachedString(string value) { gstMpegtsAtscStringSegment.cachedString = Str.toStringz(value); } /** */ public static GType getType() { return gst_mpegts_atsc_string_segment_get_type(); } /** */ public string getString() { return Str.toString(gst_mpegts_atsc_string_segment_get_string(gstMpegtsAtscStringSegment)); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscVCT.d000066400000000000000000000057711324604450400220320ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscVCT; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Represents both: * Terrestrial Virtual Channel Table (A65) * Cable Virtual Channel Table (A65) */ public final class AtscVCT { /** the main Gtk struct */ protected GstMpegtsAtscVCT* gstMpegtsAtscVCT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscVCT* getAtscVCTStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscVCT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscVCT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscVCT* gstMpegtsAtscVCT, bool ownedRef = false) { this.gstMpegtsAtscVCT = gstMpegtsAtscVCT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscVCT); } /** */ public @property ushort transportStreamId() { return gstMpegtsAtscVCT.transportStreamId; } /** Ditto */ public @property void transportStreamId(ushort value) { gstMpegtsAtscVCT.transportStreamId = value; } /** */ public @property ubyte protocolVersion() { return gstMpegtsAtscVCT.protocolVersion; } /** Ditto */ public @property void protocolVersion(ubyte value) { gstMpegtsAtscVCT.protocolVersion = value; } /** * sources */ public @property PtrArray sources() { return new PtrArray(gstMpegtsAtscVCT.sources, false); } /** Ditto */ public @property void sources(PtrArray value) { gstMpegtsAtscVCT.sources = value.getPtrArrayStruct(); } /** * descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsAtscVCT.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsAtscVCT.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_atsc_vct_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/AtscVCTSource.d000066400000000000000000000132241324604450400232030ustar00rootroot00000000000000/* * 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 gst.mpegts.AtscVCTSource; private import glib.PtrArray; private import glib.Str; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Source from a @GstMpegtsAtscVCT, can be used both for TVCT and CVCT tables */ public final class AtscVCTSource { /** the main Gtk struct */ protected GstMpegtsAtscVCTSource* gstMpegtsAtscVCTSource; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsAtscVCTSource* getAtscVCTSourceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsAtscVCTSource; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsAtscVCTSource; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsAtscVCTSource* gstMpegtsAtscVCTSource, bool ownedRef = false) { this.gstMpegtsAtscVCTSource = gstMpegtsAtscVCTSource; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsAtscVCTSource); } /** */ public @property string shortName() { return Str.toString(gstMpegtsAtscVCTSource.shortName); } /** Ditto */ public @property void shortName(string value) { gstMpegtsAtscVCTSource.shortName = Str.toStringz(value); } /** */ public @property ushort majorChannelNumber() { return gstMpegtsAtscVCTSource.majorChannelNumber; } /** Ditto */ public @property void majorChannelNumber(ushort value) { gstMpegtsAtscVCTSource.majorChannelNumber = value; } /** */ public @property ushort minorChannelNumber() { return gstMpegtsAtscVCTSource.minorChannelNumber; } /** Ditto */ public @property void minorChannelNumber(ushort value) { gstMpegtsAtscVCTSource.minorChannelNumber = value; } /** */ public @property ubyte modulationMode() { return gstMpegtsAtscVCTSource.modulationMode; } /** Ditto */ public @property void modulationMode(ubyte value) { gstMpegtsAtscVCTSource.modulationMode = value; } /** */ public @property uint carrierFrequency() { return gstMpegtsAtscVCTSource.carrierFrequency; } /** Ditto */ public @property void carrierFrequency(uint value) { gstMpegtsAtscVCTSource.carrierFrequency = value; } /** */ public @property ushort channelTSID() { return gstMpegtsAtscVCTSource.channelTSID; } /** Ditto */ public @property void channelTSID(ushort value) { gstMpegtsAtscVCTSource.channelTSID = value; } /** */ public @property ushort programNumber() { return gstMpegtsAtscVCTSource.programNumber; } /** Ditto */ public @property void programNumber(ushort value) { gstMpegtsAtscVCTSource.programNumber = value; } /** */ public @property ubyte ETMLocation() { return gstMpegtsAtscVCTSource.ETMLocation; } /** Ditto */ public @property void ETMLocation(ubyte value) { gstMpegtsAtscVCTSource.ETMLocation = value; } /** */ public @property bool accessControlled() { return gstMpegtsAtscVCTSource.accessControlled != 0; } /** Ditto */ public @property void accessControlled(bool value) { gstMpegtsAtscVCTSource.accessControlled = value; } /** */ public @property bool hidden() { return gstMpegtsAtscVCTSource.hidden != 0; } /** Ditto */ public @property void hidden(bool value) { gstMpegtsAtscVCTSource.hidden = value; } /** */ public @property bool pathSelect() { return gstMpegtsAtscVCTSource.pathSelect != 0; } /** Ditto */ public @property void pathSelect(bool value) { gstMpegtsAtscVCTSource.pathSelect = value; } /** */ public @property bool outOfBand() { return gstMpegtsAtscVCTSource.outOfBand != 0; } /** Ditto */ public @property void outOfBand(bool value) { gstMpegtsAtscVCTSource.outOfBand = value; } /** */ public @property bool hideGuide() { return gstMpegtsAtscVCTSource.hideGuide != 0; } /** Ditto */ public @property void hideGuide(bool value) { gstMpegtsAtscVCTSource.hideGuide = value; } /** */ public @property ubyte serviceType() { return gstMpegtsAtscVCTSource.serviceType; } /** Ditto */ public @property void serviceType(ubyte value) { gstMpegtsAtscVCTSource.serviceType = value; } /** */ public @property ushort sourceId() { return gstMpegtsAtscVCTSource.sourceId; } /** Ditto */ public @property void sourceId(ushort value) { gstMpegtsAtscVCTSource.sourceId = value; } /** * descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsAtscVCTSource.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsAtscVCTSource.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_atsc_vct_source_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/BAT.d000066400000000000000000000046361324604450400211700ustar00rootroot00000000000000/* * 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 gst.mpegts.BAT; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * DVB Bouquet Association Table (EN 300 468) */ public final class BAT { /** the main Gtk struct */ protected GstMpegtsBAT* gstMpegtsBAT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsBAT* getBATStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsBAT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsBAT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsBAT* gstMpegtsBAT, bool ownedRef = false) { this.gstMpegtsBAT = gstMpegtsBAT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsBAT); } /** */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsBAT.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsBAT.descriptors = value.getPtrArrayStruct(); } /** */ public @property PtrArray streams() { return new PtrArray(gstMpegtsBAT.streams, false); } /** Ditto */ public @property void streams(PtrArray value) { gstMpegtsBAT.streams = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_bat_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/BATStream.d000066400000000000000000000052761324604450400223450ustar00rootroot00000000000000/* * 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 gst.mpegts.BATStream; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** */ public final class BATStream { /** the main Gtk struct */ protected GstMpegtsBATStream* gstMpegtsBATStream; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsBATStream* getBATStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsBATStream; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsBATStream; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsBATStream* gstMpegtsBATStream, bool ownedRef = false) { this.gstMpegtsBATStream = gstMpegtsBATStream; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsBATStream); } /** */ public @property ushort transportStreamId() { return gstMpegtsBATStream.transportStreamId; } /** Ditto */ public @property void transportStreamId(ushort value) { gstMpegtsBATStream.transportStreamId = value; } /** */ public @property ushort originalNetworkId() { return gstMpegtsBATStream.originalNetworkId; } /** Ditto */ public @property void originalNetworkId(ushort value) { gstMpegtsBATStream.originalNetworkId = value; } /** */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsBATStream.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsBATStream.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_bat_stream_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/ComponentDescriptor.d000066400000000000000000000067131324604450400245610ustar00rootroot00000000000000/* * 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 gst.mpegts.ComponentDescriptor; private import glib.Str; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** */ public final class ComponentDescriptor { /** the main Gtk struct */ protected GstMpegtsComponentDescriptor* gstMpegtsComponentDescriptor; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsComponentDescriptor* getComponentDescriptorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsComponentDescriptor; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsComponentDescriptor; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsComponentDescriptor* gstMpegtsComponentDescriptor, bool ownedRef = false) { this.gstMpegtsComponentDescriptor = gstMpegtsComponentDescriptor; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsComponentDescriptor); } /** */ public @property ubyte streamContent() { return gstMpegtsComponentDescriptor.streamContent; } /** Ditto */ public @property void streamContent(ubyte value) { gstMpegtsComponentDescriptor.streamContent = value; } /** */ public @property ubyte componentType() { return gstMpegtsComponentDescriptor.componentType; } /** Ditto */ public @property void componentType(ubyte value) { gstMpegtsComponentDescriptor.componentType = value; } /** */ public @property ubyte componentTag() { return gstMpegtsComponentDescriptor.componentTag; } /** Ditto */ public @property void componentTag(ubyte value) { gstMpegtsComponentDescriptor.componentTag = value; } /** */ public @property string languageCode() { return Str.toString(gstMpegtsComponentDescriptor.languageCode); } /** Ditto */ public @property void languageCode(string value) { gstMpegtsComponentDescriptor.languageCode = Str.toStringz(value); } /** */ public @property string text() { return Str.toString(gstMpegtsComponentDescriptor.text); } /** Ditto */ public @property void text(string value) { gstMpegtsComponentDescriptor.text = Str.toStringz(value); } /** */ public static GType getType() { return gst_mpegts_component_descriptor_get_type(); } /** */ public static void free(ComponentDescriptor source) { gst_mpegts_dvb_component_descriptor_free((source is null) ? null : source.getComponentDescriptorStruct()); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/DVBLinkageDescriptor.d000066400000000000000000000060461324604450400245240ustar00rootroot00000000000000/* * 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 gst.mpegts.DVBLinkageDescriptor; private import glib.PtrArray; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** */ public class DVBLinkageDescriptor { /** the main Gtk struct */ protected GstMpegtsDVBLinkageDescriptor* gstMpegtsDVBLinkageDescriptor; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsDVBLinkageDescriptor* getDVBLinkageDescriptorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsDVBLinkageDescriptor; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsDVBLinkageDescriptor; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsDVBLinkageDescriptor* gstMpegtsDVBLinkageDescriptor, bool ownedRef = false) { this.gstMpegtsDVBLinkageDescriptor = gstMpegtsDVBLinkageDescriptor; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) gst_mpegts_dvb_linkage_descriptor_free(gstMpegtsDVBLinkageDescriptor); } /** */ public static GType getType() { return gst_mpegts_dvb_linkage_descriptor_get_type(); } /** */ public void free() { gst_mpegts_dvb_linkage_descriptor_free(gstMpegtsDVBLinkageDescriptor); ownedRef = false; } /** * Returns: The #GstMpegtsDVBLinkageEvent or %NULL if an error happened */ public GstMpegtsDVBLinkageEvent* getEvent() { return gst_mpegts_dvb_linkage_descriptor_get_event(gstMpegtsDVBLinkageDescriptor); } /** * Returns: an #GstMpegtsDVBLinkageExtendedEvent array or %NULL if an error happened */ public PtrArray getExtendedEvent() { auto p = gst_mpegts_dvb_linkage_descriptor_get_extended_event(gstMpegtsDVBLinkageDescriptor); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p); } /** * Returns: The #GstMpegtsDVBLinkageMobileHandOver or %NULL if an error happened */ public GstMpegtsDVBLinkageMobileHandOver* getMobileHandOver() { return gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over(gstMpegtsDVBLinkageDescriptor); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/DataBroadcastDescriptor.d000066400000000000000000000075021324604450400253100ustar00rootroot00000000000000/* * 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 gst.mpegts.DataBroadcastDescriptor; private import glib.Str; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** */ public final class DataBroadcastDescriptor { /** the main Gtk struct */ protected GstMpegtsDataBroadcastDescriptor* gstMpegtsDataBroadcastDescriptor; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsDataBroadcastDescriptor* getDataBroadcastDescriptorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsDataBroadcastDescriptor; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsDataBroadcastDescriptor; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsDataBroadcastDescriptor* gstMpegtsDataBroadcastDescriptor, bool ownedRef = false) { this.gstMpegtsDataBroadcastDescriptor = gstMpegtsDataBroadcastDescriptor; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) gst_mpegts_dvb_data_broadcast_descriptor_free(gstMpegtsDataBroadcastDescriptor); } /** * the data broadcast id */ public @property ushort dataBroadcastId() { return gstMpegtsDataBroadcastDescriptor.dataBroadcastId; } /** Ditto */ public @property void dataBroadcastId(ushort value) { gstMpegtsDataBroadcastDescriptor.dataBroadcastId = value; } /** * the component tag */ public @property ubyte componentTag() { return gstMpegtsDataBroadcastDescriptor.componentTag; } /** Ditto */ public @property void componentTag(ubyte value) { gstMpegtsDataBroadcastDescriptor.componentTag = value; } /** * the selector byte field */ public @property ubyte[] selectorBytes() { return gstMpegtsDataBroadcastDescriptor.selectorBytes[0..gstMpegtsDataBroadcastDescriptor.length]; } /** Ditto */ public @property void selectorBytes(ubyte[] value) { gstMpegtsDataBroadcastDescriptor.selectorBytes = value.ptr; gstMpegtsDataBroadcastDescriptor.length = cast(ubyte)value.length; } /** * language of @text */ public @property string languageCode() { return Str.toString(gstMpegtsDataBroadcastDescriptor.languageCode); } /** Ditto */ public @property void languageCode(string value) { gstMpegtsDataBroadcastDescriptor.languageCode = Str.toStringz(value); } /** * description of data broadcast */ public @property string text() { return Str.toString(gstMpegtsDataBroadcastDescriptor.text); } /** Ditto */ public @property void text(string value) { gstMpegtsDataBroadcastDescriptor.text = Str.toStringz(value); } /** */ public static GType getType() { return gst_mpegts_dvb_data_broadcast_descriptor_get_type(); } /** */ public void free() { gst_mpegts_dvb_data_broadcast_descriptor_free(gstMpegtsDataBroadcastDescriptor); ownedRef = false; } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/Descriptor.d000066400000000000000000000630411324604450400226730ustar00rootroot00000000000000/* * 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 gst.mpegts.Descriptor; private import glib.ArrayG; private import glib.PtrArray; private import glib.Str; private import gobject.ObjectG; private import gst.mpegts.ComponentDescriptor; private import gst.mpegts.DVBLinkageDescriptor; private import gst.mpegts.DataBroadcastDescriptor; private import gst.mpegts.ExtendedEventDescriptor; private import gst.mpegts.ISO639LanguageDescriptor; private import gst.mpegts.T2DeliverySystemDescriptor; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * These are the base descriptor types and methods. * * For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications * and other specifications mentionned in the documentation. */ public class Descriptor { /** the main Gtk struct */ protected GstMpegtsDescriptor* gstMpegtsDescriptor; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsDescriptor* getDescriptorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsDescriptor; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsDescriptor; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsDescriptor* gstMpegtsDescriptor, bool ownedRef = false) { this.gstMpegtsDescriptor = gstMpegtsDescriptor; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) gst_mpegts_descriptor_free(gstMpegtsDescriptor); } /** * Parses out the stuffing bytes from the @descriptor. * * Params: * stuffingBytes = the stuffing bytes * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbStuffing(out ubyte[] stuffingBytes) { ubyte* outstuffingBytes = null; auto p = gst_mpegts_descriptor_parse_dvb_stuffing(gstMpegtsDescriptor, &outstuffingBytes) != 0; stuffingBytes = outstuffingBytes[0 .. gstMpegtsDescriptor.length]; return p; } /** */ /** */ public static GType getType() { return gst_mpegts_descriptor_get_type(); } /** * Frees @desc */ public void free() { gst_mpegts_descriptor_free(gstMpegtsDescriptor); ownedRef = false; } /** * Extracts the Conditional Access information from @descriptor. * * Params: * caSystemId = the type of CA system used * caPid = The PID containing ECM or EMM data * privateData = The private data * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseCa(out ushort caSystemId, out ushort caPid, out ubyte[] privateData) { ubyte* outprivateData = null; size_t privateDataSize; auto p = gst_mpegts_descriptor_parse_ca(gstMpegtsDescriptor, &caSystemId, &caPid, &outprivateData, &privateDataSize) != 0; privateData = outprivateData[0 .. privateDataSize]; return p; } /** * Extracts the cable delivery system information from @descriptor. * * Params: * res = the #GstMpegtsCableDeliverySystemDescriptor to fill * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseCableDeliverySystem(out GstMpegtsCableDeliverySystemDescriptor res) { return gst_mpegts_descriptor_parse_cable_delivery_system(gstMpegtsDescriptor, &res) != 0; } /** * Extracts the bouquet name from @descriptor. * * Params: * bouquetName = the bouquet name * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseDvbBouquetName(out string bouquetName) { char* outbouquetName = null; auto p = gst_mpegts_descriptor_parse_dvb_bouquet_name(gstMpegtsDescriptor, &outbouquetName) != 0; bouquetName = Str.toString(outbouquetName); return p; } /** * Extracts ca id's from @descriptor. * * Params: * list = a list of ca identifier. * Edge entry identifies the CA system. Allocations of the value of this field * are found in http://www.dvbservices.com * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbCaIdentifier(out ArrayG list) { GArray* outlist = null; auto p = gst_mpegts_descriptor_parse_dvb_ca_identifier(gstMpegtsDescriptor, &outlist) != 0; list = new ArrayG(outlist); return p; } /** * Extracts the DVB component information from @descriptor. * * Params: * res = the #GstMpegtsComponentDescriptor to fill * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseDvbComponent(out ComponentDescriptor res) { GstMpegtsComponentDescriptor* outres = null; auto p = gst_mpegts_descriptor_parse_dvb_component(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(ComponentDescriptor)(outres); return p; } /** * Extracts the DVB content information from @descriptor. * * Params: * content = #GstMpegtsContent * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbContent(out PtrArray content) { GPtrArray* outcontent = null; auto p = gst_mpegts_descriptor_parse_dvb_content(gstMpegtsDescriptor, &outcontent) != 0; content = new PtrArray(outcontent); return p; } /** * Parses out the data broadcast from the @descriptor. * * Params: * res = #GstMpegtsDataBroadcastDescriptor * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbDataBroadcast(out DataBroadcastDescriptor res) { GstMpegtsDataBroadcastDescriptor* outres = null; auto p = gst_mpegts_descriptor_parse_dvb_data_broadcast(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(DataBroadcastDescriptor)(outres); return p; } /** * Parses out the data broadcast id from the @descriptor. * * Params: * dataBroadcastId = the data broadcast id * idSelectorBytes = the selector bytes, if present * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbDataBroadcastId(out ushort dataBroadcastId, out ubyte[] idSelectorBytes) { ubyte* outidSelectorBytes = null; ubyte len; auto p = gst_mpegts_descriptor_parse_dvb_data_broadcast_id(gstMpegtsDescriptor, &dataBroadcastId, &outidSelectorBytes, &len) != 0; idSelectorBytes = outidSelectorBytes[0 .. len]; return p; } /** * Extracts the DVB extended event information from @descriptor. * * Params: * res = the #GstMpegtsExtendedEventDescriptor to fill * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseDvbExtendedEvent(out ExtendedEventDescriptor res) { GstMpegtsExtendedEventDescriptor* outres = null; auto p = gst_mpegts_descriptor_parse_dvb_extended_event(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(ExtendedEventDescriptor)(outres); return p; } /** * Parses out a list of frequencies from the @descriptor. * * Params: * offset = %FALSE in Hz, %TRUE in kHz * list = a list of all frequencies in Hz/kHz * depending on %offset * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbFrequencyList(out bool offset, out ArrayG list) { int outoffset; GArray* outlist = null; auto p = gst_mpegts_descriptor_parse_dvb_frequency_list(gstMpegtsDescriptor, &outoffset, &outlist) != 0; offset = (outoffset == 1); list = new ArrayG(outlist); return p; } /** * Extracts the DVB linkage information from @descriptor. * * Params: * res = the #GstMpegtsDVBLinkageDescriptor to fill * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseDvbLinkage(out DVBLinkageDescriptor res) { GstMpegtsDVBLinkageDescriptor* outres = null; auto p = gst_mpegts_descriptor_parse_dvb_linkage(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(DVBLinkageDescriptor)(outres); return p; } /** * Parses out the multilingual bouquet name from the @descriptor. * * Params: * bouquetNameItems = a #GstMpegtsDvbMultilingualBouquetNameItem * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbMultilingualBouquetName(out PtrArray bouquetNameItems) { GPtrArray* outbouquetNameItems = null; auto p = gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name(gstMpegtsDescriptor, &outbouquetNameItems) != 0; bouquetNameItems = new PtrArray(outbouquetNameItems); return p; } /** * Parses out the multilingual component from the @descriptor. * * Params: * componentTag = the component tag * componentDescriptionItems = a #GstMpegtsDvbMultilingualComponentItem * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbMultilingualComponent(out ubyte componentTag, out PtrArray componentDescriptionItems) { GPtrArray* outcomponentDescriptionItems = null; auto p = gst_mpegts_descriptor_parse_dvb_multilingual_component(gstMpegtsDescriptor, &componentTag, &outcomponentDescriptionItems) != 0; componentDescriptionItems = new PtrArray(outcomponentDescriptionItems); return p; } /** * Parses out the multilingual network name from the @descriptor. * * Params: * networkNameItems = a #GstMpegtsDvbMultilingualNetworkNameItem * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbMultilingualNetworkName(out PtrArray networkNameItems) { GPtrArray* outnetworkNameItems = null; auto p = gst_mpegts_descriptor_parse_dvb_multilingual_network_name(gstMpegtsDescriptor, &outnetworkNameItems) != 0; networkNameItems = new PtrArray(outnetworkNameItems); return p; } /** * Parses out the multilingual service name from the @descriptor. * * Params: * serviceNameItems = a #GstMpegtsDvbMultilingualServiceNameItem * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbMultilingualServiceName(out PtrArray serviceNameItems) { GPtrArray* outserviceNameItems = null; auto p = gst_mpegts_descriptor_parse_dvb_multilingual_service_name(gstMpegtsDescriptor, &outserviceNameItems) != 0; serviceNameItems = new PtrArray(outserviceNameItems); return p; } /** * Parses out the dvb network name from the @descriptor: * * Params: * name = the extracted name * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbNetworkName(out string name) { char* outname = null; auto p = gst_mpegts_descriptor_parse_dvb_network_name(gstMpegtsDescriptor, &outname) != 0; name = Str.toString(outname); return p; } /** * Extracts the DVB parental rating information from @descriptor. * * Params: * rating = #GstMpegtsDVBParentalRatingItem * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbParentalRating(out PtrArray rating) { GPtrArray* outrating = null; auto p = gst_mpegts_descriptor_parse_dvb_parental_rating(gstMpegtsDescriptor, &outrating) != 0; rating = new PtrArray(outrating); return p; } /** * Parses out the private data specifier from the @descriptor. * * Params: * privateDataSpecifier = the private data specifier id * registered by http://www.dvbservices.com/ * privateData = additional data or NULL * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbPrivateDataSpecifier(out uint privateDataSpecifier, out ubyte[] privateData) { ubyte* outprivateData = null; ubyte length; auto p = gst_mpegts_descriptor_parse_dvb_private_data_specifier(gstMpegtsDescriptor, &privateDataSpecifier, &outprivateData, &length) != 0; privateData = outprivateData[0 .. length]; return p; } /** * Parses out the scrambling mode from the @descriptor. * * Params: * scramblingMode = This 8-bit field identifies the selected * mode of the scrambling algorithm (#GstMpegtsDVBScramblingModeType). * The technical details of the scrambling algorithm are available only * to bona-fide users upon signature of a Non Disclosure Agreement (NDA) * administered by the DVB Common Scrambling Algorithm Custodian. * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbScrambling(out GstMpegtsDVBScramblingModeType scramblingMode) { return gst_mpegts_descriptor_parse_dvb_scrambling(gstMpegtsDescriptor, &scramblingMode) != 0; } /** * Extracts the dvb service information from @descriptor. * * Params: * serviceType = the service type * serviceName = the service name * providerName = the provider name * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseDvbService(out GstMpegtsDVBServiceType serviceType, out string serviceName, out string providerName) { char* outserviceName = null; char* outproviderName = null; auto p = gst_mpegts_descriptor_parse_dvb_service(gstMpegtsDescriptor, &serviceType, &outserviceName, &outproviderName) != 0; serviceName = Str.toString(outserviceName); providerName = Str.toString(outproviderName); return p; } /** * Parses out a list of services from the @descriptor: * * Params: * list = the list of services * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbServiceList(out PtrArray list) { GPtrArray* outlist = null; auto p = gst_mpegts_descriptor_parse_dvb_service_list(gstMpegtsDescriptor, &outlist) != 0; list = new PtrArray(outlist); return p; } /** * Extracts the DVB short event information from @descriptor. * * Params: * languageCode = the language code * eventName = the event name * text = the event text * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseDvbShortEvent(out string languageCode, out string eventName, out string text) { char* outlanguageCode = null; char* outeventName = null; char* outtext = null; auto p = gst_mpegts_descriptor_parse_dvb_short_event(gstMpegtsDescriptor, &outlanguageCode, &outeventName, &outtext) != 0; languageCode = Str.toString(outlanguageCode); eventName = Str.toString(outeventName); text = Str.toString(outtext); return p; } /** * Extracts the component tag from @descriptor. * * Params: * componentTag = the component tag * * Returns: %TRUE if the parsing happended correctly, else %FALSE. */ public bool parseDvbStreamIdentifier(out ubyte componentTag) { return gst_mpegts_descriptor_parse_dvb_stream_identifier(gstMpegtsDescriptor, &componentTag) != 0; } /** * Extracts the DVB subtitling informatio from specific table id in @descriptor. * * Note: Use #gst_tag_get_language_code if you want to get the the * ISO 639-1 language code from the returned ISO 639-2 one. * * Params: * idx = Table id of the entry to parse * lang = the language code * type = the type of subtitling * compositionPageId = the composition page id * ancillaryPageId = the ancillary page id * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseDvbSubtitlingIdx(uint idx, out string lang, out ubyte type, out ushort compositionPageId, out ushort ancillaryPageId) { char* outlang = null; auto p = gst_mpegts_descriptor_parse_dvb_subtitling_idx(gstMpegtsDescriptor, idx, &outlang, &type, &compositionPageId, &ancillaryPageId) != 0; lang = Str.toString(outlang); return p; } /** * Returns: The number of entries in @descriptor */ public uint parseDvbSubtitlingNb() { return gst_mpegts_descriptor_parse_dvb_subtitling_nb(gstMpegtsDescriptor); } /** * Parses out the DVB-T2 delivery system from the @descriptor. * * Params: * res = #GstMpegtsT2DeliverySystemDescriptor * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseDvbT2DeliverySystem(out T2DeliverySystemDescriptor res) { GstMpegtsT2DeliverySystemDescriptor* outres = null; auto p = gst_mpegts_descriptor_parse_dvb_t2_delivery_system(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(T2DeliverySystemDescriptor)(outres); return p; } /** * Parses teletext number @idx in the @descriptor. The language is in ISO639 format. * * Params: * idx = The id of the teletext to get * languageCode = a null-terminated string * teletextType = #GstMpegtsDVBTeletextType * * Returns: FALSE on out-of-bounds and errors */ public bool parseDvbTeletextIdx(uint idx, out string languageCode, out GstMpegtsDVBTeletextType teletextType, out ubyte magazineNumber, out ubyte pageNumber) { char* outlanguageCode = null; auto p = gst_mpegts_descriptor_parse_dvb_teletext_idx(gstMpegtsDescriptor, idx, &outlanguageCode, &teletextType, &magazineNumber, &pageNumber) != 0; languageCode = Str.toString(outlanguageCode); return p; } /** * Find the number of teletext entries in @descriptor * * Returns: Number of teletext entries */ public uint parseDvbTeletextNb() { return gst_mpegts_descriptor_parse_dvb_teletext_nb(gstMpegtsDescriptor); } /** * Extracts the iso 639-2 language information from @descriptor. * * Note: Use #gst_tag_get_language_code if you want to get the the * ISO 639-1 language code from the returned ISO 639-2 one. * * Params: * res = the #GstMpegtsISO639LanguageDescriptor to fill * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseIso639Language(out ISO639LanguageDescriptor res) { GstMpegtsISO639LanguageDescriptor* outres = null; auto p = gst_mpegts_descriptor_parse_iso_639_language(gstMpegtsDescriptor, &outres) != 0; res = ObjectG.getDObject!(ISO639LanguageDescriptor)(outres); return p; } /** * Extracts the iso 639-2 language information from specific table id in @descriptor. * * Note: Use #gst_tag_get_language_code if you want to get the the * ISO 639-1 language code from the returned ISO 639-2 one. * * Params: * idx = Table id of the language to parse * lang = 4-byte gchar array to hold the language code * audioType = the #GstMpegtsIso639AudioType to set * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseIso639LanguageIdx(uint idx, out string lang, out GstMpegtsIso639AudioType audioType) { char* outlang = null; auto p = gst_mpegts_descriptor_parse_iso_639_language_idx(gstMpegtsDescriptor, idx, &outlang, &audioType) != 0; lang = Str.toString(outlang); return p; } /** * Returns: The number of languages in @descriptor */ public uint parseIso639LanguageNb() { return gst_mpegts_descriptor_parse_iso_639_language_nb(gstMpegtsDescriptor); } /** * Extracts the logical channels from @descriptor. * * Params: * res = the #GstMpegtsLogicalChannelDescriptor to fill * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseLogicalChannel(out GstMpegtsLogicalChannelDescriptor res) { return gst_mpegts_descriptor_parse_logical_channel(gstMpegtsDescriptor, &res) != 0; } /** * Extracts the satellite delivery system information from @descriptor. * * Params: * res = the #GstMpegtsSatelliteDeliverySystemDescriptor to fill * * Returns: %TRUE if parsing succeeded, else %FALSE. */ public bool parseSatelliteDeliverySystem(out GstMpegtsSatelliteDeliverySystemDescriptor res) { return gst_mpegts_descriptor_parse_satellite_delivery_system(gstMpegtsDescriptor, &res) != 0; } /** * Parses out the terrestrial delivery system from the @descriptor. * * Params: * res = #GstMpegtsTerrestrialDeliverySystemDescriptor * * Returns: %TRUE if the parsing happened correctly, else %FALSE. */ public bool parseTerrestrialDeliverySystem(out GstMpegtsTerrestrialDeliverySystemDescriptor res) { return gst_mpegts_descriptor_parse_terrestrial_delivery_system(gstMpegtsDescriptor, &res) != 0; } /** * Creates a #GstMpegtsDescriptor with custom @tag and @data * * Params: * tag = descriptor tag * data = descriptor data (after tag and length field) * * Returns: #GstMpegtsDescriptor */ public static Descriptor fromCustom(ubyte tag, ubyte[] data) { auto p = gst_mpegts_descriptor_from_custom(tag, data.ptr, cast(size_t)data.length); if(p is null) { return null; } return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); } /** * Creates a #GstMpegtsDescriptor with custom @tag, @tag_extension and @data * * Params: * tag = descriptor tag * tagExtension = descriptor tag extension * data = descriptor data (after tag and length field) * * Returns: #GstMpegtsDescriptor */ public static Descriptor fromCustomWithExtension(ubyte tag, ubyte tagExtension, ubyte[] data) { auto p = gst_mpegts_descriptor_from_custom_with_extension(tag, tagExtension, data.ptr, cast(size_t)data.length); if(p is null) { return null; } return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); } /** * Creates a #GstMpegtsDescriptor to be a %GST_MTS_DESC_DVB_NETWORK_NAME, * with the network name @name. The data field of the #GstMpegtsDescriptor * will be allocated, and transferred to the caller. * * Params: * name = the network name to set * * Returns: the #GstMpegtsDescriptor or %NULL on fail */ public static Descriptor fromDvbNetworkName(string name) { auto p = gst_mpegts_descriptor_from_dvb_network_name(Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); } /** * Fills a #GstMpegtsDescriptor to be a %GST_MTS_DESC_DVB_SERVICE. * The data field of the #GstMpegtsDescriptor will be allocated, * and transferred to the caller. * * Params: * serviceType = Service type defined as a #GstMpegtsDVBServiceType * serviceName = Name of the service * serviceProvider = Name of the service provider * * Returns: the #GstMpegtsDescriptor or %NULL on fail */ public static Descriptor fromDvbService(GstMpegtsDVBServiceType serviceType, string serviceName, string serviceProvider) { auto p = gst_mpegts_descriptor_from_dvb_service(serviceType, Str.toStringz(serviceName), Str.toStringz(serviceProvider)); if(p is null) { return null; } return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); } /** */ public static Descriptor fromDvbSubtitling(string lang, ubyte type, ushort composition, ushort ancillary) { auto p = gst_mpegts_descriptor_from_dvb_subtitling(Str.toStringz(lang), type, composition, ancillary); if(p is null) { return null; } return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); } /** * Creates a %GST_MTS_DESC_ISO_639_LANGUAGE #GstMpegtsDescriptor with * a single language * * Params: * language = ISO-639-2 language 3-char code * * Returns: #GstMpegtsDescriptor, %NULL on failure */ public static Descriptor fromIso639Language(string language) { auto p = gst_mpegts_descriptor_from_iso_639_language(Str.toStringz(language)); if(p is null) { return null; } return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); } /** * Creates a %GST_MTS_DESC_REGISTRATION #GstMpegtsDescriptor * * Params: * formatIdentifier = a 4 character format identifier string * additionalInfo = pointer to optional additional info * * Returns: #GstMpegtsDescriptor, %NULL on failure */ public static Descriptor fromRegistration(string formatIdentifier, ubyte[] additionalInfo) { auto p = gst_mpegts_descriptor_from_registration(Str.toStringz(formatIdentifier), additionalInfo.ptr, cast(size_t)additionalInfo.length); if(p is null) { return null; } return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p, true); } /** * Finds the first descriptor of type @tag in the array. * * Note: To look for descriptors that can be present more than once in an * array of descriptors, iterate the #GArray manually. * * Params: * descriptors = an array * of #GstMpegtsDescriptor * tag = the tag to look for * * Returns: the first descriptor matchin @tag, else %NULL. */ public static Descriptor findDescriptor(PtrArray descriptors, ubyte tag) { auto p = gst_mpegts_find_descriptor((descriptors is null) ? null : descriptors.getPtrArrayStruct(), tag); if(p is null) { return null; } return ObjectG.getDObject!(Descriptor)(cast(GstMpegtsDescriptor*) p); } /** * Parses the descriptors present in @buffer and returns them as an * array. * * Note: The data provided in @buffer will not be copied. * * Params: * buffer = descriptors to parse * bufLen = Size of @buffer * * Returns: an * array of the parsed descriptors or %NULL if there was an error. * Release with #g_array_unref when done with it. */ public static PtrArray parseDescriptors(ubyte* buffer, size_t bufLen) { auto p = gst_mpegts_parse_descriptors(buffer, bufLen); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p, true); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/EIT.d000066400000000000000000000067051324604450400212020ustar00rootroot00000000000000/* * 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 gst.mpegts.EIT; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Event Information Table (EN 300 468) */ public final class EIT { /** the main Gtk struct */ protected GstMpegtsEIT* gstMpegtsEIT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsEIT* getEITStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsEIT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsEIT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsEIT* gstMpegtsEIT, bool ownedRef = false) { this.gstMpegtsEIT = gstMpegtsEIT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsEIT); } /** */ public @property ushort transportStreamId() { return gstMpegtsEIT.transportStreamId; } /** Ditto */ public @property void transportStreamId(ushort value) { gstMpegtsEIT.transportStreamId = value; } /** */ public @property ushort originalNetworkId() { return gstMpegtsEIT.originalNetworkId; } /** Ditto */ public @property void originalNetworkId(ushort value) { gstMpegtsEIT.originalNetworkId = value; } /** */ public @property ubyte segmentLastSectionNumber() { return gstMpegtsEIT.segmentLastSectionNumber; } /** Ditto */ public @property void segmentLastSectionNumber(ubyte value) { gstMpegtsEIT.segmentLastSectionNumber = value; } /** */ public @property ubyte lastTableId() { return gstMpegtsEIT.lastTableId; } /** Ditto */ public @property void lastTableId(ubyte value) { gstMpegtsEIT.lastTableId = value; } /** */ public @property bool actualStream() { return gstMpegtsEIT.actualStream != 0; } /** Ditto */ public @property void actualStream(bool value) { gstMpegtsEIT.actualStream = value; } /** */ public @property bool presentFollowing() { return gstMpegtsEIT.presentFollowing != 0; } /** Ditto */ public @property void presentFollowing(bool value) { gstMpegtsEIT.presentFollowing = value; } /** * List of events */ public @property PtrArray events() { return new PtrArray(gstMpegtsEIT.events, false); } /** Ditto */ public @property void events(PtrArray value) { gstMpegtsEIT.events = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_eit_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/EITEvent.d000066400000000000000000000066301324604450400222010ustar00rootroot00000000000000/* * 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 gst.mpegts.EITEvent; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gstreamer.DateTime; private import gtkd.Loader; /** * Event from a @GstMpegtsEIT */ public final class EITEvent { /** the main Gtk struct */ protected GstMpegtsEITEvent* gstMpegtsEITEvent; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsEITEvent* getEITEventStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsEITEvent; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsEITEvent; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsEITEvent* gstMpegtsEITEvent, bool ownedRef = false) { this.gstMpegtsEITEvent = gstMpegtsEITEvent; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsEITEvent); } /** */ public @property ushort eventId() { return gstMpegtsEITEvent.eventId; } /** Ditto */ public @property void eventId(ushort value) { gstMpegtsEITEvent.eventId = value; } /** */ public @property DateTime startTime() { return ObjectG.getDObject!(DateTime)(gstMpegtsEITEvent.startTime, false); } /** Ditto */ public @property void startTime(DateTime value) { gstMpegtsEITEvent.startTime = value.getDateTimeStruct(); } /** */ public @property uint duration() { return gstMpegtsEITEvent.duration; } /** Ditto */ public @property void duration(uint value) { gstMpegtsEITEvent.duration = value; } /** */ public @property GstMpegtsRunningStatus runningStatus() { return gstMpegtsEITEvent.runningStatus; } /** Ditto */ public @property void runningStatus(GstMpegtsRunningStatus value) { gstMpegtsEITEvent.runningStatus = value; } /** */ public @property bool freeCAMode() { return gstMpegtsEITEvent.freeCAMode != 0; } /** Ditto */ public @property void freeCAMode(bool value) { gstMpegtsEITEvent.freeCAMode = value; } /** * List of descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsEITEvent.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsEITEvent.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_eit_event_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/ExtendedEventDescriptor.d000066400000000000000000000073741324604450400253650ustar00rootroot00000000000000/* * 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 gst.mpegts.ExtendedEventDescriptor; private import glib.PtrArray; private import glib.Str; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Extended Event Descriptor (EN 300 468 v.1.13.1) */ public final class ExtendedEventDescriptor { /** the main Gtk struct */ protected GstMpegtsExtendedEventDescriptor* gstMpegtsExtendedEventDescriptor; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsExtendedEventDescriptor* getExtendedEventDescriptorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsExtendedEventDescriptor; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsExtendedEventDescriptor; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsExtendedEventDescriptor* gstMpegtsExtendedEventDescriptor, bool ownedRef = false) { this.gstMpegtsExtendedEventDescriptor = gstMpegtsExtendedEventDescriptor; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) gst_mpegts_extended_event_descriptor_free(gstMpegtsExtendedEventDescriptor); } /** */ public @property ubyte descriptorNumber() { return gstMpegtsExtendedEventDescriptor.descriptorNumber; } /** Ditto */ public @property void descriptorNumber(ubyte value) { gstMpegtsExtendedEventDescriptor.descriptorNumber = value; } /** */ public @property ubyte lastDescriptorNumber() { return gstMpegtsExtendedEventDescriptor.lastDescriptorNumber; } /** Ditto */ public @property void lastDescriptorNumber(ubyte value) { gstMpegtsExtendedEventDescriptor.lastDescriptorNumber = value; } /** * NULL terminated language code. */ public @property string languageCode() { return Str.toString(gstMpegtsExtendedEventDescriptor.languageCode); } /** Ditto */ public @property void languageCode(string value) { gstMpegtsExtendedEventDescriptor.languageCode = Str.toStringz(value); } /** * the #GstMpegtsExtendedEventItem */ public @property PtrArray items() { return new PtrArray(gstMpegtsExtendedEventDescriptor.items, false); } /** Ditto */ public @property void items(PtrArray value) { gstMpegtsExtendedEventDescriptor.items = value.getPtrArrayStruct(); } /** */ public @property string text() { return Str.toString(gstMpegtsExtendedEventDescriptor.text); } /** Ditto */ public @property void text(string value) { gstMpegtsExtendedEventDescriptor.text = Str.toStringz(value); } /** */ public static GType getType() { return gst_mpegts_extended_event_descriptor_get_type(); } /** */ public void free() { gst_mpegts_extended_event_descriptor_free(gstMpegtsExtendedEventDescriptor); ownedRef = false; } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/ISO639LanguageDescriptor.d000066400000000000000000000062721324604450400251570ustar00rootroot00000000000000/* * 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 gst.mpegts.ISO639LanguageDescriptor; private import glib.Str; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** */ public final class ISO639LanguageDescriptor { /** the main Gtk struct */ protected GstMpegtsISO639LanguageDescriptor* gstMpegtsISO639LanguageDescriptor; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsISO639LanguageDescriptor* getISO639LanguageDescriptorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsISO639LanguageDescriptor; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsISO639LanguageDescriptor; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsISO639LanguageDescriptor* gstMpegtsISO639LanguageDescriptor, bool ownedRef = false) { this.gstMpegtsISO639LanguageDescriptor = gstMpegtsISO639LanguageDescriptor; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsISO639LanguageDescriptor); } /** */ public @property uint nbLanguage() { return gstMpegtsISO639LanguageDescriptor.nbLanguage; } /** Ditto */ public @property void nbLanguage(uint value) { gstMpegtsISO639LanguageDescriptor.nbLanguage = value; } /** */ public @property string[64] language() { string[64] arr; foreach( i, str; gstMpegtsISO639LanguageDescriptor.language ) { arr[i] = Str.toString(str); } return arr; } /** Ditto */ public @property void language(string[64] value) { char*[64] arr; foreach( i, str; value ) { arr[i] = Str.toStringz(str); } gstMpegtsISO639LanguageDescriptor.language = arr; } /** */ public @property GstMpegtsIso639AudioType[64] audioType() { return gstMpegtsISO639LanguageDescriptor.audioType; } /** Ditto */ public @property void audioType(GstMpegtsIso639AudioType[64] value) { gstMpegtsISO639LanguageDescriptor.audioType = value; } /** */ public static GType getType() { return gst_mpegts_iso_639_language_get_type(); } /** */ public void descriptorFree() { gst_mpegts_iso_639_language_descriptor_free(gstMpegtsISO639LanguageDescriptor); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/Mpegts.d000066400000000000000000000023471324604450400220160ustar00rootroot00000000000000/* * 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 gst.mpegts.Mpegts; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; /** */ public struct Mpegts { /** * Initializes the MPEG-TS helper library. Must be called before any * usage. */ public static void initialize() { gst_mpegts_initialize(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/NIT.d000066400000000000000000000065621324604450400212140ustar00rootroot00000000000000/* * 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 gst.mpegts.NIT; private import glib.ConstructionException; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Network Information Table (ISO/IEC 13818-1 / EN 300 468) */ public final class NIT { /** the main Gtk struct */ protected GstMpegtsNIT* gstMpegtsNIT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsNIT* getNITStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsNIT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsNIT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsNIT* gstMpegtsNIT, bool ownedRef = false) { this.gstMpegtsNIT = gstMpegtsNIT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsNIT); } /** * Whether this NIT corresponds to the actual stream */ public @property bool actualNetwork() { return gstMpegtsNIT.actualNetwork != 0; } /** Ditto */ public @property void actualNetwork(bool value) { gstMpegtsNIT.actualNetwork = value; } /** * ID of the network that this NIT describes */ public @property ushort networkId() { return gstMpegtsNIT.networkId; } /** Ditto */ public @property void networkId(ushort value) { gstMpegtsNIT.networkId = value; } /** * the global descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsNIT.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsNIT.descriptors = value.getPtrArrayStruct(); } /** * the streams */ public @property PtrArray streams() { return new PtrArray(gstMpegtsNIT.streams, false); } /** Ditto */ public @property void streams(PtrArray value) { gstMpegtsNIT.streams = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_nit_get_type(); } /** * Allocates and initializes a #GstMpegtsNIT. * * Returns: A newly allocated #GstMpegtsNIT * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_mpegts_nit_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstMpegtsNIT*) p); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/NITStream.d000066400000000000000000000061761324604450400223710ustar00rootroot00000000000000/* * 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 gst.mpegts.NITStream; private import glib.ConstructionException; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** */ public final class NITStream { /** the main Gtk struct */ protected GstMpegtsNITStream* gstMpegtsNITStream; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsNITStream* getNITStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsNITStream; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsNITStream; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsNITStream* gstMpegtsNITStream, bool ownedRef = false) { this.gstMpegtsNITStream = gstMpegtsNITStream; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsNITStream); } /** */ public @property ushort transportStreamId() { return gstMpegtsNITStream.transportStreamId; } /** Ditto */ public @property void transportStreamId(ushort value) { gstMpegtsNITStream.transportStreamId = value; } /** */ public @property ushort originalNetworkId() { return gstMpegtsNITStream.originalNetworkId; } /** Ditto */ public @property void originalNetworkId(ushort value) { gstMpegtsNITStream.originalNetworkId = value; } /** */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsNITStream.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsNITStream.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_nit_stream_get_type(); } /** * Allocates and initializes a #GstMpegtsNITStream * * Returns: A newly allocated #GstMpegtsNITStream * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_mpegts_nit_stream_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstMpegtsNITStream*) p); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/PMT.d000066400000000000000000000066101324604450400212140ustar00rootroot00000000000000/* * 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 gst.mpegts.PMT; private import glib.ConstructionException; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Program Map Table (ISO/IEC 13818-1). * * The program_number is contained in the subtable_extension field of the * container #GstMpegtsSection. */ public final class PMT { /** the main Gtk struct */ protected GstMpegtsPMT* gstMpegtsPMT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsPMT* getPMTStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsPMT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsPMT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsPMT* gstMpegtsPMT, bool ownedRef = false) { this.gstMpegtsPMT = gstMpegtsPMT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsPMT); } /** * PID of the stream containing PCR */ public @property ushort pcrPid() { return gstMpegtsPMT.pcrPid; } /** Ditto */ public @property void pcrPid(ushort value) { gstMpegtsPMT.pcrPid = value; } /** */ public @property ushort programNumber() { return gstMpegtsPMT.programNumber; } /** Ditto */ public @property void programNumber(ushort value) { gstMpegtsPMT.programNumber = value; } /** * array of #GstMpegtsDescriptor */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsPMT.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsPMT.descriptors = value.getPtrArrayStruct(); } /** * Array of #GstMpegtsPMTStream */ public @property PtrArray streams() { return new PtrArray(gstMpegtsPMT.streams, false); } /** Ditto */ public @property void streams(PtrArray value) { gstMpegtsPMT.streams = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_pmt_get_type(); } /** * Allocates and initializes a new #GstMpegtsPMT. * * Returns: #GstMpegtsPMT * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_mpegts_pmt_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstMpegtsPMT*) p); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/PMTStream.d000066400000000000000000000062671324604450400224000ustar00rootroot00000000000000/* * 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 gst.mpegts.PMTStream; private import glib.ConstructionException; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * An individual stream definition. */ public final class PMTStream { /** the main Gtk struct */ protected GstMpegtsPMTStream* gstMpegtsPMTStream; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsPMTStream* getPMTStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsPMTStream; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsPMTStream; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsPMTStream* gstMpegtsPMTStream, bool ownedRef = false) { this.gstMpegtsPMTStream = gstMpegtsPMTStream; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsPMTStream); } /** * the type of stream. See #GstMpegtsStreamType */ public @property ubyte streamType() { return gstMpegtsPMTStream.streamType; } /** Ditto */ public @property void streamType(ubyte value) { gstMpegtsPMTStream.streamType = value; } /** * the PID of the stream */ public @property ushort pid() { return gstMpegtsPMTStream.pid; } /** Ditto */ public @property void pid(ushort value) { gstMpegtsPMTStream.pid = value; } /** * the descriptors of the * stream */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsPMTStream.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsPMTStream.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_pmt_stream_get_type(); } /** * Allocates and initializes a new #GstMpegtsPMTStream. * * Returns: #GstMpegtsPMTStream * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_mpegts_pmt_stream_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstMpegtsPMTStream*) p); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/PatProgram.d000066400000000000000000000064701324604450400226340ustar00rootroot00000000000000/* * 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 gst.mpegts.PatProgram; private import glib.ConstructionException; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * A program entry from a Program Association Table (ITU H.222.0, ISO/IEC 13818-1). */ public final class PatProgram { /** the main Gtk struct */ protected GstMpegtsPatProgram* gstMpegtsPatProgram; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsPatProgram* getPatProgramStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsPatProgram; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsPatProgram; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsPatProgram* gstMpegtsPatProgram, bool ownedRef = false) { this.gstMpegtsPatProgram = gstMpegtsPatProgram; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsPatProgram); } /** * the program number */ public @property ushort programNumber() { return gstMpegtsPatProgram.programNumber; } /** Ditto */ public @property void programNumber(ushort value) { gstMpegtsPatProgram.programNumber = value; } /** * the network of program map PID */ public @property ushort networkOrProgramMapPID() { return gstMpegtsPatProgram.networkOrProgramMapPID; } /** Ditto */ public @property void networkOrProgramMapPID(ushort value) { gstMpegtsPatProgram.networkOrProgramMapPID = value; } /** */ public static GType getType() { return gst_mpegts_pat_program_get_type(); } /** * Allocates a new #GstMpegtsPatProgram. * * Returns: A newly allocated #GstMpegtsPatProgram * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_mpegts_pat_program_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstMpegtsPatProgram*) p); } /** * Allocates a new #GPtrArray for #GstMpegtsPatProgram * * Returns: A newly allocated #GPtrArray */ public static PtrArray patNew() { auto p = gst_mpegts_pat_new(); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p, true); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/SDT.d000066400000000000000000000065511324604450400212120ustar00rootroot00000000000000/* * 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 gst.mpegts.SDT; private import glib.ConstructionException; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * Service Description Table (EN 300 468) */ public final class SDT { /** the main Gtk struct */ protected GstMpegtsSDT* gstMpegtsSDT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsSDT* getSDTStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsSDT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsSDT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsSDT* gstMpegtsSDT, bool ownedRef = false) { this.gstMpegtsSDT = gstMpegtsSDT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsSDT); } /** * Network ID of the originating delivery system */ public @property ushort originalNetworkId() { return gstMpegtsSDT.originalNetworkId; } /** Ditto */ public @property void originalNetworkId(ushort value) { gstMpegtsSDT.originalNetworkId = value; } /** * True if the table describes this transport stream */ public @property bool actualTs() { return gstMpegtsSDT.actualTs != 0; } /** Ditto */ public @property void actualTs(bool value) { gstMpegtsSDT.actualTs = value; } /** * ID of this transport stream */ public @property ushort transportStreamId() { return gstMpegtsSDT.transportStreamId; } /** Ditto */ public @property void transportStreamId(ushort value) { gstMpegtsSDT.transportStreamId = value; } /** * List of services */ public @property PtrArray services() { return new PtrArray(gstMpegtsSDT.services, false); } /** Ditto */ public @property void services(PtrArray value) { gstMpegtsSDT.services = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_sdt_get_type(); } /** * Allocates and initializes a #GstMpegtsSDT. * * Returns: A newly allocated #GstMpegtsSDT * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_mpegts_sdt_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstMpegtsSDT*) p); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/SDTService.d000066400000000000000000000101551324604450400225260ustar00rootroot00000000000000/* * 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 gst.mpegts.SDTService; private import glib.ConstructionException; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** */ public final class SDTService { /** the main Gtk struct */ protected GstMpegtsSDTService* gstMpegtsSDTService; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsSDTService* getSDTServiceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsSDTService; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsSDTService; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsSDTService* gstMpegtsSDTService, bool ownedRef = false) { this.gstMpegtsSDTService = gstMpegtsSDTService; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsSDTService); } /** * The program number this table belongs to */ public @property ushort serviceId() { return gstMpegtsSDTService.serviceId; } /** Ditto */ public @property void serviceId(ushort value) { gstMpegtsSDTService.serviceId = value; } /** * EIT schedule information is present in this transport stream */ public @property bool EITScheduleFlag() { return gstMpegtsSDTService.EITScheduleFlag != 0; } /** Ditto */ public @property void EITScheduleFlag(bool value) { gstMpegtsSDTService.EITScheduleFlag = value; } /** * EIT present/following information is present in this transport stream */ public @property bool EITPresentFollowingFlag() { return gstMpegtsSDTService.EITPresentFollowingFlag != 0; } /** Ditto */ public @property void EITPresentFollowingFlag(bool value) { gstMpegtsSDTService.EITPresentFollowingFlag = value; } /** * Status of this service */ public @property GstMpegtsRunningStatus runningStatus() { return gstMpegtsSDTService.runningStatus; } /** Ditto */ public @property void runningStatus(GstMpegtsRunningStatus value) { gstMpegtsSDTService.runningStatus = value; } /** * True if one or more streams is controlled by a CA system */ public @property bool freeCAMode() { return gstMpegtsSDTService.freeCAMode != 0; } /** Ditto */ public @property void freeCAMode(bool value) { gstMpegtsSDTService.freeCAMode = value; } /** * List of descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsSDTService.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsSDTService.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_sdt_service_get_type(); } /** * Allocates and initializes a #GstMpegtsSDTService. * * Returns: A newly allocated #GstMpegtsSDTService * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_mpegts_sdt_service_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstMpegtsSDTService*) p); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/Section.d000066400000000000000000000341621324604450400221630ustar00rootroot00000000000000/* * 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 gst.mpegts.Section; private import glib.Bytes; private import glib.ConstructionException; private import glib.PtrArray; private import gobject.ObjectG; private import gst.mpegts.AtscEIT; private import gst.mpegts.AtscETT; private import gst.mpegts.AtscMGT; private import gst.mpegts.AtscSTT; private import gst.mpegts.AtscVCT; private import gst.mpegts.BAT; private import gst.mpegts.EIT; private import gst.mpegts.NIT; private import gst.mpegts.PMT; private import gst.mpegts.PatProgram; private import gst.mpegts.SDT; private import gst.mpegts.TOT; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gstreamer.DateTime; private import gstreamer.Element; private import gstreamer.Event; private import gstreamer.Message; private import gstreamer.ObjectGst; /** * For more details, refer to the ITU H.222.0 or ISO/IEC 13818-1 specifications * and other specifications mentioned in the documentation. */ public class Section { /** the main Gtk struct */ protected GstMpegtsSection* gstMpegtsSection; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsSection* getSectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsSection; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsSection; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsSection* gstMpegtsSection, bool ownedRef = false) { this.gstMpegtsSection = gstMpegtsSection; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_mpegts_section_get_type(); } /** * Creates a new #GstMpegtsSection from the provided @data. * * Note: Ensuring @data is big enough to contain the full section is the * responsibility of the caller. If it is not big enough, %NULL will be * returned. * * Note: it is the responsibility of the caller to ensure @data does point * to the beginning of the section. * * Params: * pid = the PID to which this section belongs * data = a pointer to the beginning of the section (i.e. the first byte * should contain the table_id field). * * Returns: A new #GstMpegtsSection if the data was valid, * else %NULL * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ushort pid, ubyte[] data) { auto p = gst_mpegts_section_new(pid, data.ptr, cast(size_t)data.length); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstMpegtsSection*) p); } /** * Returns the #GstMpegtsAtscVCT contained in the @section * * Returns: The #GstMpegtsAtscVCT contained in the section, or %NULL if an error * happened. */ public AtscVCT getAtscCvct() { auto p = gst_mpegts_section_get_atsc_cvct(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(AtscVCT)(cast(GstMpegtsAtscVCT*) p); } /** * Returns the #GstMpegtsAtscEIT contained in the @section. * * Returns: The #GstMpegtsAtscEIT contained in the section, or %NULL if an error * happened. */ public AtscEIT getAtscEit() { auto p = gst_mpegts_section_get_atsc_eit(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(AtscEIT)(cast(GstMpegtsAtscEIT*) p); } /** * Returns the #GstMpegtsAtscETT contained in the @section. * * Returns: The #GstMpegtsAtscETT contained in the section, or %NULL if an error * happened. */ public AtscETT getAtscEtt() { auto p = gst_mpegts_section_get_atsc_ett(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(AtscETT)(cast(GstMpegtsAtscETT*) p); } /** * Returns the #GstMpegtsAtscMGT contained in the @section. * * Returns: The #GstMpegtsAtscMGT contained in the section, or %NULL if an error * happened. */ public AtscMGT getAtscMgt() { auto p = gst_mpegts_section_get_atsc_mgt(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(AtscMGT)(cast(GstMpegtsAtscMGT*) p); } /** * Returns the #GstMpegtsAtscSTT contained in the @section. * * Returns: The #GstMpegtsAtscSTT contained in the section, or %NULL if an error * happened. */ public AtscSTT getAtscStt() { auto p = gst_mpegts_section_get_atsc_stt(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(AtscSTT)(cast(GstMpegtsAtscSTT*) p); } /** * Returns the #GstMpegtsAtscVCT contained in the @section * * Returns: The #GstMpegtsAtscVCT contained in the section, or %NULL if an error * happened. */ public AtscVCT getAtscTvct() { auto p = gst_mpegts_section_get_atsc_tvct(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(AtscVCT)(cast(GstMpegtsAtscVCT*) p); } /** * Returns the #GstMpegtsBAT contained in the @section. * * Returns: The #GstMpegtsBAT contained in the section, or %NULL if an error * happened. */ public BAT getBat() { auto p = gst_mpegts_section_get_bat(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(BAT)(cast(GstMpegtsBAT*) p); } /** * Returns the array of #GstMpegtsDescriptor contained in the Conditional * Access Table. * * Returns: The * #GstMpegtsDescriptor contained in the section, or %NULL if an error * happened. Release with #g_array_unref when done. */ public PtrArray getCat() { auto p = gst_mpegts_section_get_cat(gstMpegtsSection); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p); } /** * Gets the original unparsed section data. * * Returns: The original unparsed section data. */ public Bytes getData() { auto p = gst_mpegts_section_get_data(gstMpegtsSection); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Returns the #GstMpegtsEIT contained in the @section. * * Returns: The #GstMpegtsEIT contained in the section, or %NULL if an error * happened. */ public EIT getEit() { auto p = gst_mpegts_section_get_eit(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(EIT)(cast(GstMpegtsEIT*) p); } /** * Returns the #GstMpegtsNIT contained in the @section. * * Returns: The #GstMpegtsNIT contained in the section, or %NULL if an error * happened. */ public NIT getNit() { auto p = gst_mpegts_section_get_nit(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(NIT)(cast(GstMpegtsNIT*) p); } /** * Parses a Program Association Table (ITU H.222.0, ISO/IEC 13818-1). * * Returns the array of #GstMpegtsPatProgram contained in the section. * * Note: The PAT "transport_id" field corresponds to the "subtable_extension" * field of the provided @section. * * Returns: The * #GstMpegtsPatProgram contained in the section, or %NULL if an error * happened. Release with #g_ptr_array_unref when done. */ public PtrArray getPat() { auto p = gst_mpegts_section_get_pat(gstMpegtsSection); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p); } /** * Returns the #GstMpegtsPMT contained in the @section. * * Returns: The #GstMpegtsPMT contained in the section, or %NULL if an error * happened. */ public PMT getPmt() { auto p = gst_mpegts_section_get_pmt(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(PMT)(cast(GstMpegtsPMT*) p); } /** * Returns the #GstMpegtsSDT contained in the @section. * * Returns: The #GstMpegtsSDT contained in the section, or %NULL if an error * happened. */ public SDT getSdt() { auto p = gst_mpegts_section_get_sdt(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(SDT)(cast(GstMpegtsSDT*) p); } /** * Returns the #GstDateTime of the TDT * * Returns: The #GstDateTime contained in the section, or %NULL * if an error happened. Release with #gst_date_time_unref when done. */ public DateTime getTdt() { auto p = gst_mpegts_section_get_tdt(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(DateTime)(cast(GstDateTime*) p, true); } /** * Returns the #GstMpegtsTOT contained in the @section. * * Returns: The #GstMpegtsTOT contained in the section, or %NULL if an error * happened. */ public TOT getTot() { auto p = gst_mpegts_section_get_tot(gstMpegtsSection); if(p is null) { return null; } return ObjectG.getDObject!(TOT)(cast(GstMpegtsTOT*) p); } /** * Returns the array of #GstMpegtsDescriptor contained in the section * * Returns: The * #GstMpegtsDescriptor contained in the section, or %NULL if an error * happened. Release with #g_array_unref when done. */ public PtrArray getTsdt() { auto p = gst_mpegts_section_get_tsdt(gstMpegtsSection); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p); } /** * If the data in @section has already been packetized, the data pointer is returned * immediately. Otherwise, the data field is allocated and populated. * * Returns: pointer to section data, or %NULL on fail */ public ubyte[] packetize() { size_t outputSize; auto p = gst_mpegts_section_packetize(gstMpegtsSection, &outputSize); return p[0 .. outputSize]; } /** * Creates a custom #GstEvent with a @GstMpegtsSection. * The #GstEvent is sent to the @element #GstElement. * * Params: * element = The #GstElement to send to section event to * * Returns: %TRUE if the event is sent */ public bool sendEvent(Element element) { return gst_mpegts_section_send_event(gstMpegtsSection, (element is null) ? null : element.getElementStruct()) != 0; } /** * Ownership of @nit is taken. The data in @nit is managed by the #GstMpegtsSection * * Params: * nit = a #GstMpegtsNIT to create the #GstMpegtsSection from * * Returns: the #GstMpegtsSection */ public static Section fromNit(NIT nit) { auto p = gst_mpegts_section_from_nit((nit is null) ? null : nit.getNITStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); } /** * Creates a PAT #GstMpegtsSection from the @programs array of #GstMpegtsPatPrograms * * Params: * programs = an array of #GstMpegtsPatProgram * tsId = Transport stream ID of the PAT * * Returns: a #GstMpegtsSection */ public static Section fromPat(PtrArray programs, ushort tsId) { auto p = gst_mpegts_section_from_pat((programs is null) ? null : programs.getPtrArrayStruct(), tsId); if(p is null) { return null; } return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); } /** * Creates a #GstMpegtsSection from @pmt that is bound to @pid * * Params: * pmt = a #GstMpegtsPMT to create a #GstMpegtsSection from * pid = The PID that the #GstMpegtsPMT belongs to * * Returns: #GstMpegtsSection */ public static Section fromPmt(PMT pmt, ushort pid) { auto p = gst_mpegts_section_from_pmt((pmt is null) ? null : pmt.getPMTStruct(), pid); if(p is null) { return null; } return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); } /** * Ownership of @sdt is taken. The data in @sdt is managed by the #GstMpegtsSection * * Params: * sdt = a #GstMpegtsSDT to create the #GstMpegtsSection from * * Returns: the #GstMpegtsSection */ public static Section fromSdt(SDT sdt) { auto p = gst_mpegts_section_from_sdt((sdt is null) ? null : sdt.getSDTStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); } /** * Extracts the #GstMpegtsSection contained in the @event #GstEvent * * Params: * event = #GstEvent containing a #GstMpegtsSection * * Returns: The extracted #GstMpegtsSection */ public static Section eventParseMpegtsSection(Event event) { auto p = gst_event_parse_mpegts_section((event is null) ? null : event.getEventStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); } /** * Creates a new #GstMessage for a @GstMpegtsSection. * * Params: * parent = The creator of the message * section = The #GstMpegtsSection to put in a message * * Returns: The new #GstMessage to be posted, or %NULL if the * section is not valid. */ public static Message messageNewMpegtsSection(ObjectGst parent, Section section) { auto p = gst_message_new_mpegts_section((parent is null) ? null : parent.getObjectGstStruct(), (section is null) ? null : section.getSectionStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); } /** * Returns the #GstMpegtsSection contained in a message. * * Params: * message = a #GstMessage * * Returns: the contained #GstMpegtsSection, or %NULL. */ public static Section messageParseMpegtsSection(Message message) { auto p = gst_message_parse_mpegts_section((message is null) ? null : message.getMessageStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Section)(cast(GstMpegtsSection*) p, true); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/T2DeliverySystemDescriptor.d000066400000000000000000000112441324604450400260100ustar00rootroot00000000000000/* * 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 gst.mpegts.T2DeliverySystemDescriptor; private import glib.PtrArray; private import glib.c.functions; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gtkd.Loader; /** * describe DVB-T2 transmissions according to EN 302 755 */ public final class T2DeliverySystemDescriptor { /** the main Gtk struct */ protected GstMpegtsT2DeliverySystemDescriptor* gstMpegtsT2DeliverySystemDescriptor; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsT2DeliverySystemDescriptor* getT2DeliverySystemDescriptorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsT2DeliverySystemDescriptor; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsT2DeliverySystemDescriptor; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsT2DeliverySystemDescriptor* gstMpegtsT2DeliverySystemDescriptor, bool ownedRef = false) { this.gstMpegtsT2DeliverySystemDescriptor = gstMpegtsT2DeliverySystemDescriptor; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) gst_mpegts_t2_delivery_system_descriptor_free(gstMpegtsT2DeliverySystemDescriptor); } /** */ public @property ubyte plpId() { return gstMpegtsT2DeliverySystemDescriptor.plpId; } /** Ditto */ public @property void plpId(ubyte value) { gstMpegtsT2DeliverySystemDescriptor.plpId = value; } /** */ public @property ushort t2SystemId() { return gstMpegtsT2DeliverySystemDescriptor.t2SystemId; } /** Ditto */ public @property void t2SystemId(ushort value) { gstMpegtsT2DeliverySystemDescriptor.t2SystemId = value; } /** */ public @property ubyte sisoMiso() { return gstMpegtsT2DeliverySystemDescriptor.sisoMiso; } /** Ditto */ public @property void sisoMiso(ubyte value) { gstMpegtsT2DeliverySystemDescriptor.sisoMiso = value; } /** */ public @property uint bandwidth() { return gstMpegtsT2DeliverySystemDescriptor.bandwidth; } /** Ditto */ public @property void bandwidth(uint value) { gstMpegtsT2DeliverySystemDescriptor.bandwidth = value; } /** */ public @property GstMpegtsTerrestrialGuardInterval guardInterval() { return gstMpegtsT2DeliverySystemDescriptor.guardInterval; } /** Ditto */ public @property void guardInterval(GstMpegtsTerrestrialGuardInterval value) { gstMpegtsT2DeliverySystemDescriptor.guardInterval = value; } /** */ public @property GstMpegtsTerrestrialTransmissionMode transmissionMode() { return gstMpegtsT2DeliverySystemDescriptor.transmissionMode; } /** Ditto */ public @property void transmissionMode(GstMpegtsTerrestrialTransmissionMode value) { gstMpegtsT2DeliverySystemDescriptor.transmissionMode = value; } /** */ public @property bool otherFrequency() { return gstMpegtsT2DeliverySystemDescriptor.otherFrequency != 0; } /** Ditto */ public @property void otherFrequency(bool value) { gstMpegtsT2DeliverySystemDescriptor.otherFrequency = value; } /** */ public @property bool tfs() { return gstMpegtsT2DeliverySystemDescriptor.tfs != 0; } /** Ditto */ public @property void tfs(bool value) { gstMpegtsT2DeliverySystemDescriptor.tfs = value; } /** */ public @property PtrArray cells() { return new PtrArray(gstMpegtsT2DeliverySystemDescriptor.cells, false); } /** Ditto */ public @property void cells(PtrArray value) { gstMpegtsT2DeliverySystemDescriptor.cells = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_t2_delivery_system_descriptor_get_type(); } /** */ public void free() { gst_mpegts_t2_delivery_system_descriptor_free(gstMpegtsT2DeliverySystemDescriptor); ownedRef = false; } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/TOT.d000066400000000000000000000050001324604450400212120ustar00rootroot00000000000000/* * 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 gst.mpegts.TOT; private import glib.PtrArray; private import glib.c.functions; private import gobject.ObjectG; private import gst.mpegts.c.functions; public import gst.mpegts.c.types; private import gstreamer.DateTime; private import gtkd.Loader; /** * Time Offset Table (EN 300 468) */ public final class TOT { /** the main Gtk struct */ protected GstMpegtsTOT* gstMpegtsTOT; protected bool ownedRef; /** Get the main Gtk struct */ public GstMpegtsTOT* getTOTStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMpegtsTOT; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMpegtsTOT; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMpegtsTOT* gstMpegtsTOT, bool ownedRef = false) { this.gstMpegtsTOT = gstMpegtsTOT; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTMPEGTS) && ownedRef ) g_free(gstMpegtsTOT); } /** */ public @property DateTime utcTime() { return ObjectG.getDObject!(DateTime)(gstMpegtsTOT.utcTime, false); } /** Ditto */ public @property void utcTime(DateTime value) { gstMpegtsTOT.utcTime = value.getDateTimeStruct(); } /** * List of descriptors */ public @property PtrArray descriptors() { return new PtrArray(gstMpegtsTOT.descriptors, false); } /** Ditto */ public @property void descriptors(PtrArray value) { gstMpegtsTOT.descriptors = value.getPtrArrayStruct(); } /** */ public static GType getType() { return gst_mpegts_tot_get_type(); } } GtkD-3.7.5/generated/gstreamer/gst/mpegts/c/000077500000000000000000000000001324604450400206265ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gst/mpegts/c/functions.d000066400000000000000000001143131324604450400230060ustar00rootroot00000000000000/* * 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 gst.mpegts.c.functions; import std.stdio; import gst.mpegts.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GSTMPEGTS = ["libgstmpegts-1.0-0.dll"]; else version (OSX) static immutable LIBRARY_GSTMPEGTS = ["libgstmpegts-1.0.0.dylib"]; else static immutable LIBRARY_GSTMPEGTS = ["libgstmpegts-1.0.so.0"]; shared static this() { // gst.mpegts.AtscEIT Linker.link(gst_mpegts_atsc_eit_get_type, "gst_mpegts_atsc_eit_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscEITEvent Linker.link(gst_mpegts_atsc_eit_event_get_type, "gst_mpegts_atsc_eit_event_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscETT Linker.link(gst_mpegts_atsc_ett_get_type, "gst_mpegts_atsc_ett_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscMGT Linker.link(gst_mpegts_atsc_mgt_get_type, "gst_mpegts_atsc_mgt_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscMGTTable Linker.link(gst_mpegts_atsc_mgt_table_get_type, "gst_mpegts_atsc_mgt_table_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscMultString Linker.link(gst_mpegts_atsc_mult_string_get_type, "gst_mpegts_atsc_mult_string_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscSTT Linker.link(gst_mpegts_atsc_stt_get_type, "gst_mpegts_atsc_stt_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_atsc_stt_get_datetime_utc, "gst_mpegts_atsc_stt_get_datetime_utc", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscStringSegment Linker.link(gst_mpegts_atsc_string_segment_get_type, "gst_mpegts_atsc_string_segment_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_atsc_string_segment_get_string, "gst_mpegts_atsc_string_segment_get_string", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscVCT Linker.link(gst_mpegts_atsc_vct_get_type, "gst_mpegts_atsc_vct_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.AtscVCTSource Linker.link(gst_mpegts_atsc_vct_source_get_type, "gst_mpegts_atsc_vct_source_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.BAT Linker.link(gst_mpegts_bat_get_type, "gst_mpegts_bat_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.BATStream Linker.link(gst_mpegts_bat_stream_get_type, "gst_mpegts_bat_stream_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.ComponentDescriptor Linker.link(gst_mpegts_component_descriptor_get_type, "gst_mpegts_component_descriptor_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_dvb_component_descriptor_free, "gst_mpegts_dvb_component_descriptor_free", LIBRARY_GSTMPEGTS); // gst.mpegts.DVBLinkageDescriptor Linker.link(gst_mpegts_dvb_linkage_descriptor_get_type, "gst_mpegts_dvb_linkage_descriptor_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_dvb_linkage_descriptor_free, "gst_mpegts_dvb_linkage_descriptor_free", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_dvb_linkage_descriptor_get_event, "gst_mpegts_dvb_linkage_descriptor_get_event", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_dvb_linkage_descriptor_get_extended_event, "gst_mpegts_dvb_linkage_descriptor_get_extended_event", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over, "gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over", LIBRARY_GSTMPEGTS); // gst.mpegts.DataBroadcastDescriptor Linker.link(gst_mpegts_dvb_data_broadcast_descriptor_get_type, "gst_mpegts_dvb_data_broadcast_descriptor_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_dvb_data_broadcast_descriptor_free, "gst_mpegts_dvb_data_broadcast_descriptor_free", LIBRARY_GSTMPEGTS); // gst.mpegts.Descriptor Linker.link(gst_mpegts_descriptor_get_type, "gst_mpegts_descriptor_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_free, "gst_mpegts_descriptor_free", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_ca, "gst_mpegts_descriptor_parse_ca", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_cable_delivery_system, "gst_mpegts_descriptor_parse_cable_delivery_system", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_bouquet_name, "gst_mpegts_descriptor_parse_dvb_bouquet_name", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_ca_identifier, "gst_mpegts_descriptor_parse_dvb_ca_identifier", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_component, "gst_mpegts_descriptor_parse_dvb_component", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_content, "gst_mpegts_descriptor_parse_dvb_content", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_data_broadcast, "gst_mpegts_descriptor_parse_dvb_data_broadcast", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_data_broadcast_id, "gst_mpegts_descriptor_parse_dvb_data_broadcast_id", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_extended_event, "gst_mpegts_descriptor_parse_dvb_extended_event", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_frequency_list, "gst_mpegts_descriptor_parse_dvb_frequency_list", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_linkage, "gst_mpegts_descriptor_parse_dvb_linkage", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name, "gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_multilingual_component, "gst_mpegts_descriptor_parse_dvb_multilingual_component", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_multilingual_network_name, "gst_mpegts_descriptor_parse_dvb_multilingual_network_name", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_multilingual_service_name, "gst_mpegts_descriptor_parse_dvb_multilingual_service_name", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_network_name, "gst_mpegts_descriptor_parse_dvb_network_name", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_parental_rating, "gst_mpegts_descriptor_parse_dvb_parental_rating", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_private_data_specifier, "gst_mpegts_descriptor_parse_dvb_private_data_specifier", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_scrambling, "gst_mpegts_descriptor_parse_dvb_scrambling", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_service, "gst_mpegts_descriptor_parse_dvb_service", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_service_list, "gst_mpegts_descriptor_parse_dvb_service_list", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_short_event, "gst_mpegts_descriptor_parse_dvb_short_event", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_stream_identifier, "gst_mpegts_descriptor_parse_dvb_stream_identifier", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_stuffing, "gst_mpegts_descriptor_parse_dvb_stuffing", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_subtitling_idx, "gst_mpegts_descriptor_parse_dvb_subtitling_idx", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_subtitling_nb, "gst_mpegts_descriptor_parse_dvb_subtitling_nb", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_t2_delivery_system, "gst_mpegts_descriptor_parse_dvb_t2_delivery_system", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_teletext_idx, "gst_mpegts_descriptor_parse_dvb_teletext_idx", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_dvb_teletext_nb, "gst_mpegts_descriptor_parse_dvb_teletext_nb", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_iso_639_language, "gst_mpegts_descriptor_parse_iso_639_language", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_iso_639_language_idx, "gst_mpegts_descriptor_parse_iso_639_language_idx", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_iso_639_language_nb, "gst_mpegts_descriptor_parse_iso_639_language_nb", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_logical_channel, "gst_mpegts_descriptor_parse_logical_channel", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_satellite_delivery_system, "gst_mpegts_descriptor_parse_satellite_delivery_system", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_parse_terrestrial_delivery_system, "gst_mpegts_descriptor_parse_terrestrial_delivery_system", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_custom, "gst_mpegts_descriptor_from_custom", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_custom_with_extension, "gst_mpegts_descriptor_from_custom_with_extension", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_dvb_network_name, "gst_mpegts_descriptor_from_dvb_network_name", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_dvb_service, "gst_mpegts_descriptor_from_dvb_service", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_dvb_subtitling, "gst_mpegts_descriptor_from_dvb_subtitling", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_iso_639_language, "gst_mpegts_descriptor_from_iso_639_language", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_descriptor_from_registration, "gst_mpegts_descriptor_from_registration", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_find_descriptor, "gst_mpegts_find_descriptor", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_parse_descriptors, "gst_mpegts_parse_descriptors", LIBRARY_GSTMPEGTS); // gst.mpegts.EIT Linker.link(gst_mpegts_eit_get_type, "gst_mpegts_eit_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.EITEvent Linker.link(gst_mpegts_eit_event_get_type, "gst_mpegts_eit_event_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.ExtendedEventDescriptor Linker.link(gst_mpegts_extended_event_descriptor_get_type, "gst_mpegts_extended_event_descriptor_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_extended_event_descriptor_free, "gst_mpegts_extended_event_descriptor_free", LIBRARY_GSTMPEGTS); // gst.mpegts.ISO639LanguageDescriptor Linker.link(gst_mpegts_iso_639_language_get_type, "gst_mpegts_iso_639_language_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_iso_639_language_descriptor_free, "gst_mpegts_iso_639_language_descriptor_free", LIBRARY_GSTMPEGTS); // gst.mpegts.NIT Linker.link(gst_mpegts_nit_get_type, "gst_mpegts_nit_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_nit_new, "gst_mpegts_nit_new", LIBRARY_GSTMPEGTS); // gst.mpegts.NITStream Linker.link(gst_mpegts_nit_stream_get_type, "gst_mpegts_nit_stream_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_nit_stream_new, "gst_mpegts_nit_stream_new", LIBRARY_GSTMPEGTS); // gst.mpegts.PMT Linker.link(gst_mpegts_pmt_get_type, "gst_mpegts_pmt_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_pmt_new, "gst_mpegts_pmt_new", LIBRARY_GSTMPEGTS); // gst.mpegts.PMTStream Linker.link(gst_mpegts_pmt_stream_get_type, "gst_mpegts_pmt_stream_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_pmt_stream_new, "gst_mpegts_pmt_stream_new", LIBRARY_GSTMPEGTS); // gst.mpegts.PatProgram Linker.link(gst_mpegts_pat_program_get_type, "gst_mpegts_pat_program_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_pat_program_new, "gst_mpegts_pat_program_new", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_pat_new, "gst_mpegts_pat_new", LIBRARY_GSTMPEGTS); // gst.mpegts.SDT Linker.link(gst_mpegts_sdt_get_type, "gst_mpegts_sdt_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_sdt_new, "gst_mpegts_sdt_new", LIBRARY_GSTMPEGTS); // gst.mpegts.SDTService Linker.link(gst_mpegts_sdt_service_get_type, "gst_mpegts_sdt_service_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_sdt_service_new, "gst_mpegts_sdt_service_new", LIBRARY_GSTMPEGTS); // gst.mpegts.Section Linker.link(gst_mpegts_section_get_type, "gst_mpegts_section_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_new, "gst_mpegts_section_new", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_cvct, "gst_mpegts_section_get_atsc_cvct", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_eit, "gst_mpegts_section_get_atsc_eit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_ett, "gst_mpegts_section_get_atsc_ett", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_mgt, "gst_mpegts_section_get_atsc_mgt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_stt, "gst_mpegts_section_get_atsc_stt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_atsc_tvct, "gst_mpegts_section_get_atsc_tvct", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_bat, "gst_mpegts_section_get_bat", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_cat, "gst_mpegts_section_get_cat", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_data, "gst_mpegts_section_get_data", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_eit, "gst_mpegts_section_get_eit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_nit, "gst_mpegts_section_get_nit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_pat, "gst_mpegts_section_get_pat", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_pmt, "gst_mpegts_section_get_pmt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_sdt, "gst_mpegts_section_get_sdt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_tdt, "gst_mpegts_section_get_tdt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_tot, "gst_mpegts_section_get_tot", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_get_tsdt, "gst_mpegts_section_get_tsdt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_packetize, "gst_mpegts_section_packetize", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_send_event, "gst_mpegts_section_send_event", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_from_nit, "gst_mpegts_section_from_nit", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_from_pat, "gst_mpegts_section_from_pat", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_from_pmt, "gst_mpegts_section_from_pmt", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_section_from_sdt, "gst_mpegts_section_from_sdt", LIBRARY_GSTMPEGTS); Linker.link(gst_event_parse_mpegts_section, "gst_event_parse_mpegts_section", LIBRARY_GSTMPEGTS); Linker.link(gst_message_new_mpegts_section, "gst_message_new_mpegts_section", LIBRARY_GSTMPEGTS); Linker.link(gst_message_parse_mpegts_section, "gst_message_parse_mpegts_section", LIBRARY_GSTMPEGTS); // gst.mpegts.T2DeliverySystemDescriptor Linker.link(gst_mpegts_t2_delivery_system_descriptor_get_type, "gst_mpegts_t2_delivery_system_descriptor_get_type", LIBRARY_GSTMPEGTS); Linker.link(gst_mpegts_t2_delivery_system_descriptor_free, "gst_mpegts_t2_delivery_system_descriptor_free", LIBRARY_GSTMPEGTS); // gst.mpegts.TOT Linker.link(gst_mpegts_tot_get_type, "gst_mpegts_tot_get_type", LIBRARY_GSTMPEGTS); // gst.mpegts.Mpegts Linker.link(gst_mpegts_initialize, "gst_mpegts_initialize", LIBRARY_GSTMPEGTS); } __gshared extern(C) { // gst.mpegts.AtscEIT GType function() c_gst_mpegts_atsc_eit_get_type; // gst.mpegts.AtscEITEvent GType function() c_gst_mpegts_atsc_eit_event_get_type; // gst.mpegts.AtscETT GType function() c_gst_mpegts_atsc_ett_get_type; // gst.mpegts.AtscMGT GType function() c_gst_mpegts_atsc_mgt_get_type; // gst.mpegts.AtscMGTTable GType function() c_gst_mpegts_atsc_mgt_table_get_type; // gst.mpegts.AtscMultString GType function() c_gst_mpegts_atsc_mult_string_get_type; // gst.mpegts.AtscSTT GType function() c_gst_mpegts_atsc_stt_get_type; GstDateTime* function(GstMpegtsAtscSTT* stt) c_gst_mpegts_atsc_stt_get_datetime_utc; // gst.mpegts.AtscStringSegment GType function() c_gst_mpegts_atsc_string_segment_get_type; const(char)* function(GstMpegtsAtscStringSegment* seg) c_gst_mpegts_atsc_string_segment_get_string; // gst.mpegts.AtscVCT GType function() c_gst_mpegts_atsc_vct_get_type; // gst.mpegts.AtscVCTSource GType function() c_gst_mpegts_atsc_vct_source_get_type; // gst.mpegts.BAT GType function() c_gst_mpegts_bat_get_type; // gst.mpegts.BATStream GType function() c_gst_mpegts_bat_stream_get_type; // gst.mpegts.ComponentDescriptor GType function() c_gst_mpegts_component_descriptor_get_type; void function(GstMpegtsComponentDescriptor* source) c_gst_mpegts_dvb_component_descriptor_free; // gst.mpegts.DVBLinkageDescriptor GType function() c_gst_mpegts_dvb_linkage_descriptor_get_type; void function(GstMpegtsDVBLinkageDescriptor* source) c_gst_mpegts_dvb_linkage_descriptor_free; GstMpegtsDVBLinkageEvent* function(GstMpegtsDVBLinkageDescriptor* desc) c_gst_mpegts_dvb_linkage_descriptor_get_event; GPtrArray* function(GstMpegtsDVBLinkageDescriptor* desc) c_gst_mpegts_dvb_linkage_descriptor_get_extended_event; GstMpegtsDVBLinkageMobileHandOver* function(GstMpegtsDVBLinkageDescriptor* desc) c_gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over; // gst.mpegts.DataBroadcastDescriptor GType function() c_gst_mpegts_dvb_data_broadcast_descriptor_get_type; void function(GstMpegtsDataBroadcastDescriptor* source) c_gst_mpegts_dvb_data_broadcast_descriptor_free; // gst.mpegts.Descriptor GType function() c_gst_mpegts_descriptor_get_type; void function(GstMpegtsDescriptor* desc) c_gst_mpegts_descriptor_free; int function(GstMpegtsDescriptor* descriptor, ushort* caSystemId, ushort* caPid, ubyte** privateData, size_t* privateDataSize) c_gst_mpegts_descriptor_parse_ca; int function(GstMpegtsDescriptor* descriptor, GstMpegtsCableDeliverySystemDescriptor* res) c_gst_mpegts_descriptor_parse_cable_delivery_system; int function(GstMpegtsDescriptor* descriptor, char** bouquetName) c_gst_mpegts_descriptor_parse_dvb_bouquet_name; int function(GstMpegtsDescriptor* descriptor, GArray** list) c_gst_mpegts_descriptor_parse_dvb_ca_identifier; int function(GstMpegtsDescriptor* descriptor, GstMpegtsComponentDescriptor** res) c_gst_mpegts_descriptor_parse_dvb_component; int function(GstMpegtsDescriptor* descriptor, GPtrArray** content) c_gst_mpegts_descriptor_parse_dvb_content; int function(GstMpegtsDescriptor* descriptor, GstMpegtsDataBroadcastDescriptor** res) c_gst_mpegts_descriptor_parse_dvb_data_broadcast; int function(GstMpegtsDescriptor* descriptor, ushort* dataBroadcastId, ubyte** idSelectorBytes, ubyte* len) c_gst_mpegts_descriptor_parse_dvb_data_broadcast_id; int function(GstMpegtsDescriptor* descriptor, GstMpegtsExtendedEventDescriptor** res) c_gst_mpegts_descriptor_parse_dvb_extended_event; int function(GstMpegtsDescriptor* descriptor, int* offset, GArray** list) c_gst_mpegts_descriptor_parse_dvb_frequency_list; int function(GstMpegtsDescriptor* descriptor, GstMpegtsDVBLinkageDescriptor** res) c_gst_mpegts_descriptor_parse_dvb_linkage; int function(GstMpegtsDescriptor* descriptor, GPtrArray** bouquetNameItems) c_gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name; int function(GstMpegtsDescriptor* descriptor, ubyte* componentTag, GPtrArray** componentDescriptionItems) c_gst_mpegts_descriptor_parse_dvb_multilingual_component; int function(GstMpegtsDescriptor* descriptor, GPtrArray** networkNameItems) c_gst_mpegts_descriptor_parse_dvb_multilingual_network_name; int function(GstMpegtsDescriptor* descriptor, GPtrArray** serviceNameItems) c_gst_mpegts_descriptor_parse_dvb_multilingual_service_name; int function(GstMpegtsDescriptor* descriptor, char** name) c_gst_mpegts_descriptor_parse_dvb_network_name; int function(GstMpegtsDescriptor* descriptor, GPtrArray** rating) c_gst_mpegts_descriptor_parse_dvb_parental_rating; int function(GstMpegtsDescriptor* descriptor, uint* privateDataSpecifier, ubyte** privateData, ubyte* length) c_gst_mpegts_descriptor_parse_dvb_private_data_specifier; int function(GstMpegtsDescriptor* descriptor, GstMpegtsDVBScramblingModeType* scramblingMode) c_gst_mpegts_descriptor_parse_dvb_scrambling; int function(GstMpegtsDescriptor* descriptor, GstMpegtsDVBServiceType* serviceType, char** serviceName, char** providerName) c_gst_mpegts_descriptor_parse_dvb_service; int function(GstMpegtsDescriptor* descriptor, GPtrArray** list) c_gst_mpegts_descriptor_parse_dvb_service_list; int function(GstMpegtsDescriptor* descriptor, char** languageCode, char** eventName, char** text) c_gst_mpegts_descriptor_parse_dvb_short_event; int function(GstMpegtsDescriptor* descriptor, ubyte* componentTag) c_gst_mpegts_descriptor_parse_dvb_stream_identifier; int function(GstMpegtsDescriptor* descriptor, ubyte** stuffingBytes) c_gst_mpegts_descriptor_parse_dvb_stuffing; int function(GstMpegtsDescriptor* descriptor, uint idx, char** lang, ubyte* type, ushort* compositionPageId, ushort* ancillaryPageId) c_gst_mpegts_descriptor_parse_dvb_subtitling_idx; uint function(GstMpegtsDescriptor* descriptor) c_gst_mpegts_descriptor_parse_dvb_subtitling_nb; int function(GstMpegtsDescriptor* descriptor, GstMpegtsT2DeliverySystemDescriptor** res) c_gst_mpegts_descriptor_parse_dvb_t2_delivery_system; int function(GstMpegtsDescriptor* descriptor, uint idx, char** languageCode, GstMpegtsDVBTeletextType* teletextType, ubyte* magazineNumber, ubyte* pageNumber) c_gst_mpegts_descriptor_parse_dvb_teletext_idx; uint function(GstMpegtsDescriptor* descriptor) c_gst_mpegts_descriptor_parse_dvb_teletext_nb; int function(GstMpegtsDescriptor* descriptor, GstMpegtsISO639LanguageDescriptor** res) c_gst_mpegts_descriptor_parse_iso_639_language; int function(GstMpegtsDescriptor* descriptor, uint idx, char** lang, GstMpegtsIso639AudioType* audioType) c_gst_mpegts_descriptor_parse_iso_639_language_idx; uint function(GstMpegtsDescriptor* descriptor) c_gst_mpegts_descriptor_parse_iso_639_language_nb; int function(GstMpegtsDescriptor* descriptor, GstMpegtsLogicalChannelDescriptor* res) c_gst_mpegts_descriptor_parse_logical_channel; int function(GstMpegtsDescriptor* descriptor, GstMpegtsSatelliteDeliverySystemDescriptor* res) c_gst_mpegts_descriptor_parse_satellite_delivery_system; int function(GstMpegtsDescriptor* descriptor, GstMpegtsTerrestrialDeliverySystemDescriptor* res) c_gst_mpegts_descriptor_parse_terrestrial_delivery_system; GstMpegtsDescriptor* function(ubyte tag, ubyte* data, size_t length) c_gst_mpegts_descriptor_from_custom; GstMpegtsDescriptor* function(ubyte tag, ubyte tagExtension, ubyte* data, size_t length) c_gst_mpegts_descriptor_from_custom_with_extension; GstMpegtsDescriptor* function(const(char)* name) c_gst_mpegts_descriptor_from_dvb_network_name; GstMpegtsDescriptor* function(GstMpegtsDVBServiceType serviceType, const(char)* serviceName, const(char)* serviceProvider) c_gst_mpegts_descriptor_from_dvb_service; GstMpegtsDescriptor* function(const(char)* lang, ubyte type, ushort composition, ushort ancillary) c_gst_mpegts_descriptor_from_dvb_subtitling; GstMpegtsDescriptor* function(const(char)* language) c_gst_mpegts_descriptor_from_iso_639_language; GstMpegtsDescriptor* function(const(char)* formatIdentifier, ubyte* additionalInfo, size_t additionalInfoLength) c_gst_mpegts_descriptor_from_registration; GstMpegtsDescriptor* function(GPtrArray* descriptors, ubyte tag) c_gst_mpegts_find_descriptor; GPtrArray* function(ubyte* buffer, size_t bufLen) c_gst_mpegts_parse_descriptors; // gst.mpegts.EIT GType function() c_gst_mpegts_eit_get_type; // gst.mpegts.EITEvent GType function() c_gst_mpegts_eit_event_get_type; // gst.mpegts.ExtendedEventDescriptor GType function() c_gst_mpegts_extended_event_descriptor_get_type; void function(GstMpegtsExtendedEventDescriptor* source) c_gst_mpegts_extended_event_descriptor_free; // gst.mpegts.ISO639LanguageDescriptor GType function() c_gst_mpegts_iso_639_language_get_type; void function(GstMpegtsISO639LanguageDescriptor* desc) c_gst_mpegts_iso_639_language_descriptor_free; // gst.mpegts.NIT GType function() c_gst_mpegts_nit_get_type; GstMpegtsNIT* function() c_gst_mpegts_nit_new; // gst.mpegts.NITStream GType function() c_gst_mpegts_nit_stream_get_type; GstMpegtsNITStream* function() c_gst_mpegts_nit_stream_new; // gst.mpegts.PMT GType function() c_gst_mpegts_pmt_get_type; GstMpegtsPMT* function() c_gst_mpegts_pmt_new; // gst.mpegts.PMTStream GType function() c_gst_mpegts_pmt_stream_get_type; GstMpegtsPMTStream* function() c_gst_mpegts_pmt_stream_new; // gst.mpegts.PatProgram GType function() c_gst_mpegts_pat_program_get_type; GstMpegtsPatProgram* function() c_gst_mpegts_pat_program_new; GPtrArray* function() c_gst_mpegts_pat_new; // gst.mpegts.SDT GType function() c_gst_mpegts_sdt_get_type; GstMpegtsSDT* function() c_gst_mpegts_sdt_new; // gst.mpegts.SDTService GType function() c_gst_mpegts_sdt_service_get_type; GstMpegtsSDTService* function() c_gst_mpegts_sdt_service_new; // gst.mpegts.Section GType function() c_gst_mpegts_section_get_type; GstMpegtsSection* function(ushort pid, ubyte* data, size_t dataSize) c_gst_mpegts_section_new; GstMpegtsAtscVCT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_cvct; GstMpegtsAtscEIT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_eit; GstMpegtsAtscETT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_ett; GstMpegtsAtscMGT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_mgt; GstMpegtsAtscSTT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_stt; GstMpegtsAtscVCT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_atsc_tvct; GstMpegtsBAT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_bat; GPtrArray* function(GstMpegtsSection* section) c_gst_mpegts_section_get_cat; GBytes* function(GstMpegtsSection* section) c_gst_mpegts_section_get_data; GstMpegtsEIT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_eit; GstMpegtsNIT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_nit; GPtrArray* function(GstMpegtsSection* section) c_gst_mpegts_section_get_pat; GstMpegtsPMT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_pmt; GstMpegtsSDT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_sdt; GstDateTime* function(GstMpegtsSection* section) c_gst_mpegts_section_get_tdt; GstMpegtsTOT* function(GstMpegtsSection* section) c_gst_mpegts_section_get_tot; GPtrArray* function(GstMpegtsSection* section) c_gst_mpegts_section_get_tsdt; ubyte* function(GstMpegtsSection* section, size_t* outputSize) c_gst_mpegts_section_packetize; int function(GstMpegtsSection* section, GstElement* element) c_gst_mpegts_section_send_event; GstMpegtsSection* function(GstMpegtsNIT* nit) c_gst_mpegts_section_from_nit; GstMpegtsSection* function(GPtrArray* programs, ushort tsId) c_gst_mpegts_section_from_pat; GstMpegtsSection* function(GstMpegtsPMT* pmt, ushort pid) c_gst_mpegts_section_from_pmt; GstMpegtsSection* function(GstMpegtsSDT* sdt) c_gst_mpegts_section_from_sdt; GstMpegtsSection* function(GstEvent* event) c_gst_event_parse_mpegts_section; GstMessage* function(GstObject* parent, GstMpegtsSection* section) c_gst_message_new_mpegts_section; GstMpegtsSection* function(GstMessage* message) c_gst_message_parse_mpegts_section; // gst.mpegts.T2DeliverySystemDescriptor GType function() c_gst_mpegts_t2_delivery_system_descriptor_get_type; void function(GstMpegtsT2DeliverySystemDescriptor* source) c_gst_mpegts_t2_delivery_system_descriptor_free; // gst.mpegts.TOT GType function() c_gst_mpegts_tot_get_type; // gst.mpegts.Mpegts void function() c_gst_mpegts_initialize; } // gst.mpegts.AtscEIT alias c_gst_mpegts_atsc_eit_get_type gst_mpegts_atsc_eit_get_type; // gst.mpegts.AtscEITEvent alias c_gst_mpegts_atsc_eit_event_get_type gst_mpegts_atsc_eit_event_get_type; // gst.mpegts.AtscETT alias c_gst_mpegts_atsc_ett_get_type gst_mpegts_atsc_ett_get_type; // gst.mpegts.AtscMGT alias c_gst_mpegts_atsc_mgt_get_type gst_mpegts_atsc_mgt_get_type; // gst.mpegts.AtscMGTTable alias c_gst_mpegts_atsc_mgt_table_get_type gst_mpegts_atsc_mgt_table_get_type; // gst.mpegts.AtscMultString alias c_gst_mpegts_atsc_mult_string_get_type gst_mpegts_atsc_mult_string_get_type; // gst.mpegts.AtscSTT alias c_gst_mpegts_atsc_stt_get_type gst_mpegts_atsc_stt_get_type; alias c_gst_mpegts_atsc_stt_get_datetime_utc gst_mpegts_atsc_stt_get_datetime_utc; // gst.mpegts.AtscStringSegment alias c_gst_mpegts_atsc_string_segment_get_type gst_mpegts_atsc_string_segment_get_type; alias c_gst_mpegts_atsc_string_segment_get_string gst_mpegts_atsc_string_segment_get_string; // gst.mpegts.AtscVCT alias c_gst_mpegts_atsc_vct_get_type gst_mpegts_atsc_vct_get_type; // gst.mpegts.AtscVCTSource alias c_gst_mpegts_atsc_vct_source_get_type gst_mpegts_atsc_vct_source_get_type; // gst.mpegts.BAT alias c_gst_mpegts_bat_get_type gst_mpegts_bat_get_type; // gst.mpegts.BATStream alias c_gst_mpegts_bat_stream_get_type gst_mpegts_bat_stream_get_type; // gst.mpegts.ComponentDescriptor alias c_gst_mpegts_component_descriptor_get_type gst_mpegts_component_descriptor_get_type; alias c_gst_mpegts_dvb_component_descriptor_free gst_mpegts_dvb_component_descriptor_free; // gst.mpegts.DVBLinkageDescriptor alias c_gst_mpegts_dvb_linkage_descriptor_get_type gst_mpegts_dvb_linkage_descriptor_get_type; alias c_gst_mpegts_dvb_linkage_descriptor_free gst_mpegts_dvb_linkage_descriptor_free; alias c_gst_mpegts_dvb_linkage_descriptor_get_event gst_mpegts_dvb_linkage_descriptor_get_event; alias c_gst_mpegts_dvb_linkage_descriptor_get_extended_event gst_mpegts_dvb_linkage_descriptor_get_extended_event; alias c_gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over gst_mpegts_dvb_linkage_descriptor_get_mobile_hand_over; // gst.mpegts.DataBroadcastDescriptor alias c_gst_mpegts_dvb_data_broadcast_descriptor_get_type gst_mpegts_dvb_data_broadcast_descriptor_get_type; alias c_gst_mpegts_dvb_data_broadcast_descriptor_free gst_mpegts_dvb_data_broadcast_descriptor_free; // gst.mpegts.Descriptor alias c_gst_mpegts_descriptor_get_type gst_mpegts_descriptor_get_type; alias c_gst_mpegts_descriptor_free gst_mpegts_descriptor_free; alias c_gst_mpegts_descriptor_parse_ca gst_mpegts_descriptor_parse_ca; alias c_gst_mpegts_descriptor_parse_cable_delivery_system gst_mpegts_descriptor_parse_cable_delivery_system; alias c_gst_mpegts_descriptor_parse_dvb_bouquet_name gst_mpegts_descriptor_parse_dvb_bouquet_name; alias c_gst_mpegts_descriptor_parse_dvb_ca_identifier gst_mpegts_descriptor_parse_dvb_ca_identifier; alias c_gst_mpegts_descriptor_parse_dvb_component gst_mpegts_descriptor_parse_dvb_component; alias c_gst_mpegts_descriptor_parse_dvb_content gst_mpegts_descriptor_parse_dvb_content; alias c_gst_mpegts_descriptor_parse_dvb_data_broadcast gst_mpegts_descriptor_parse_dvb_data_broadcast; alias c_gst_mpegts_descriptor_parse_dvb_data_broadcast_id gst_mpegts_descriptor_parse_dvb_data_broadcast_id; alias c_gst_mpegts_descriptor_parse_dvb_extended_event gst_mpegts_descriptor_parse_dvb_extended_event; alias c_gst_mpegts_descriptor_parse_dvb_frequency_list gst_mpegts_descriptor_parse_dvb_frequency_list; alias c_gst_mpegts_descriptor_parse_dvb_linkage gst_mpegts_descriptor_parse_dvb_linkage; alias c_gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name gst_mpegts_descriptor_parse_dvb_multilingual_bouquet_name; alias c_gst_mpegts_descriptor_parse_dvb_multilingual_component gst_mpegts_descriptor_parse_dvb_multilingual_component; alias c_gst_mpegts_descriptor_parse_dvb_multilingual_network_name gst_mpegts_descriptor_parse_dvb_multilingual_network_name; alias c_gst_mpegts_descriptor_parse_dvb_multilingual_service_name gst_mpegts_descriptor_parse_dvb_multilingual_service_name; alias c_gst_mpegts_descriptor_parse_dvb_network_name gst_mpegts_descriptor_parse_dvb_network_name; alias c_gst_mpegts_descriptor_parse_dvb_parental_rating gst_mpegts_descriptor_parse_dvb_parental_rating; alias c_gst_mpegts_descriptor_parse_dvb_private_data_specifier gst_mpegts_descriptor_parse_dvb_private_data_specifier; alias c_gst_mpegts_descriptor_parse_dvb_scrambling gst_mpegts_descriptor_parse_dvb_scrambling; alias c_gst_mpegts_descriptor_parse_dvb_service gst_mpegts_descriptor_parse_dvb_service; alias c_gst_mpegts_descriptor_parse_dvb_service_list gst_mpegts_descriptor_parse_dvb_service_list; alias c_gst_mpegts_descriptor_parse_dvb_short_event gst_mpegts_descriptor_parse_dvb_short_event; alias c_gst_mpegts_descriptor_parse_dvb_stream_identifier gst_mpegts_descriptor_parse_dvb_stream_identifier; alias c_gst_mpegts_descriptor_parse_dvb_stuffing gst_mpegts_descriptor_parse_dvb_stuffing; alias c_gst_mpegts_descriptor_parse_dvb_subtitling_idx gst_mpegts_descriptor_parse_dvb_subtitling_idx; alias c_gst_mpegts_descriptor_parse_dvb_subtitling_nb gst_mpegts_descriptor_parse_dvb_subtitling_nb; alias c_gst_mpegts_descriptor_parse_dvb_t2_delivery_system gst_mpegts_descriptor_parse_dvb_t2_delivery_system; alias c_gst_mpegts_descriptor_parse_dvb_teletext_idx gst_mpegts_descriptor_parse_dvb_teletext_idx; alias c_gst_mpegts_descriptor_parse_dvb_teletext_nb gst_mpegts_descriptor_parse_dvb_teletext_nb; alias c_gst_mpegts_descriptor_parse_iso_639_language gst_mpegts_descriptor_parse_iso_639_language; alias c_gst_mpegts_descriptor_parse_iso_639_language_idx gst_mpegts_descriptor_parse_iso_639_language_idx; alias c_gst_mpegts_descriptor_parse_iso_639_language_nb gst_mpegts_descriptor_parse_iso_639_language_nb; alias c_gst_mpegts_descriptor_parse_logical_channel gst_mpegts_descriptor_parse_logical_channel; alias c_gst_mpegts_descriptor_parse_satellite_delivery_system gst_mpegts_descriptor_parse_satellite_delivery_system; alias c_gst_mpegts_descriptor_parse_terrestrial_delivery_system gst_mpegts_descriptor_parse_terrestrial_delivery_system; alias c_gst_mpegts_descriptor_from_custom gst_mpegts_descriptor_from_custom; alias c_gst_mpegts_descriptor_from_custom_with_extension gst_mpegts_descriptor_from_custom_with_extension; alias c_gst_mpegts_descriptor_from_dvb_network_name gst_mpegts_descriptor_from_dvb_network_name; alias c_gst_mpegts_descriptor_from_dvb_service gst_mpegts_descriptor_from_dvb_service; alias c_gst_mpegts_descriptor_from_dvb_subtitling gst_mpegts_descriptor_from_dvb_subtitling; alias c_gst_mpegts_descriptor_from_iso_639_language gst_mpegts_descriptor_from_iso_639_language; alias c_gst_mpegts_descriptor_from_registration gst_mpegts_descriptor_from_registration; alias c_gst_mpegts_find_descriptor gst_mpegts_find_descriptor; alias c_gst_mpegts_parse_descriptors gst_mpegts_parse_descriptors; // gst.mpegts.EIT alias c_gst_mpegts_eit_get_type gst_mpegts_eit_get_type; // gst.mpegts.EITEvent alias c_gst_mpegts_eit_event_get_type gst_mpegts_eit_event_get_type; // gst.mpegts.ExtendedEventDescriptor alias c_gst_mpegts_extended_event_descriptor_get_type gst_mpegts_extended_event_descriptor_get_type; alias c_gst_mpegts_extended_event_descriptor_free gst_mpegts_extended_event_descriptor_free; // gst.mpegts.ISO639LanguageDescriptor alias c_gst_mpegts_iso_639_language_get_type gst_mpegts_iso_639_language_get_type; alias c_gst_mpegts_iso_639_language_descriptor_free gst_mpegts_iso_639_language_descriptor_free; // gst.mpegts.NIT alias c_gst_mpegts_nit_get_type gst_mpegts_nit_get_type; alias c_gst_mpegts_nit_new gst_mpegts_nit_new; // gst.mpegts.NITStream alias c_gst_mpegts_nit_stream_get_type gst_mpegts_nit_stream_get_type; alias c_gst_mpegts_nit_stream_new gst_mpegts_nit_stream_new; // gst.mpegts.PMT alias c_gst_mpegts_pmt_get_type gst_mpegts_pmt_get_type; alias c_gst_mpegts_pmt_new gst_mpegts_pmt_new; // gst.mpegts.PMTStream alias c_gst_mpegts_pmt_stream_get_type gst_mpegts_pmt_stream_get_type; alias c_gst_mpegts_pmt_stream_new gst_mpegts_pmt_stream_new; // gst.mpegts.PatProgram alias c_gst_mpegts_pat_program_get_type gst_mpegts_pat_program_get_type; alias c_gst_mpegts_pat_program_new gst_mpegts_pat_program_new; alias c_gst_mpegts_pat_new gst_mpegts_pat_new; // gst.mpegts.SDT alias c_gst_mpegts_sdt_get_type gst_mpegts_sdt_get_type; alias c_gst_mpegts_sdt_new gst_mpegts_sdt_new; // gst.mpegts.SDTService alias c_gst_mpegts_sdt_service_get_type gst_mpegts_sdt_service_get_type; alias c_gst_mpegts_sdt_service_new gst_mpegts_sdt_service_new; // gst.mpegts.Section alias c_gst_mpegts_section_get_type gst_mpegts_section_get_type; alias c_gst_mpegts_section_new gst_mpegts_section_new; alias c_gst_mpegts_section_get_atsc_cvct gst_mpegts_section_get_atsc_cvct; alias c_gst_mpegts_section_get_atsc_eit gst_mpegts_section_get_atsc_eit; alias c_gst_mpegts_section_get_atsc_ett gst_mpegts_section_get_atsc_ett; alias c_gst_mpegts_section_get_atsc_mgt gst_mpegts_section_get_atsc_mgt; alias c_gst_mpegts_section_get_atsc_stt gst_mpegts_section_get_atsc_stt; alias c_gst_mpegts_section_get_atsc_tvct gst_mpegts_section_get_atsc_tvct; alias c_gst_mpegts_section_get_bat gst_mpegts_section_get_bat; alias c_gst_mpegts_section_get_cat gst_mpegts_section_get_cat; alias c_gst_mpegts_section_get_data gst_mpegts_section_get_data; alias c_gst_mpegts_section_get_eit gst_mpegts_section_get_eit; alias c_gst_mpegts_section_get_nit gst_mpegts_section_get_nit; alias c_gst_mpegts_section_get_pat gst_mpegts_section_get_pat; alias c_gst_mpegts_section_get_pmt gst_mpegts_section_get_pmt; alias c_gst_mpegts_section_get_sdt gst_mpegts_section_get_sdt; alias c_gst_mpegts_section_get_tdt gst_mpegts_section_get_tdt; alias c_gst_mpegts_section_get_tot gst_mpegts_section_get_tot; alias c_gst_mpegts_section_get_tsdt gst_mpegts_section_get_tsdt; alias c_gst_mpegts_section_packetize gst_mpegts_section_packetize; alias c_gst_mpegts_section_send_event gst_mpegts_section_send_event; alias c_gst_mpegts_section_from_nit gst_mpegts_section_from_nit; alias c_gst_mpegts_section_from_pat gst_mpegts_section_from_pat; alias c_gst_mpegts_section_from_pmt gst_mpegts_section_from_pmt; alias c_gst_mpegts_section_from_sdt gst_mpegts_section_from_sdt; alias c_gst_event_parse_mpegts_section gst_event_parse_mpegts_section; alias c_gst_message_new_mpegts_section gst_message_new_mpegts_section; alias c_gst_message_parse_mpegts_section gst_message_parse_mpegts_section; // gst.mpegts.T2DeliverySystemDescriptor alias c_gst_mpegts_t2_delivery_system_descriptor_get_type gst_mpegts_t2_delivery_system_descriptor_get_type; alias c_gst_mpegts_t2_delivery_system_descriptor_free gst_mpegts_t2_delivery_system_descriptor_free; // gst.mpegts.TOT alias c_gst_mpegts_tot_get_type gst_mpegts_tot_get_type; // gst.mpegts.Mpegts alias c_gst_mpegts_initialize gst_mpegts_initialize; GtkD-3.7.5/generated/gstreamer/gst/mpegts/c/types.d000066400000000000000000001033771324604450400221520ustar00rootroot00000000000000/* * 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 gst.mpegts.c.types; public import glib.c.types; public import gobject.c.types; public import gstreamer.c.types; /** * These values correspond to the registered descriptor type from * the various ATSC specifications. * * Consult the relevant specifications for more details. */ public enum GstMpegtsATSCDescriptorType { STUFFING = 128, AC3 = 131, CAPTION_SERVICE = 134, CONTENT_ADVISORY = 135, EXTENDED_CHANNEL_NAME = 160, SERVICE_LOCATION = 161, TIME_SHIFTED_SERVICE = 162, COMPONENT_NAME = 163, DCC_DEPARTING_REQUEST = 168, DCC_ARRIVING_REQUEST = 169, REDISTRIBUTION_CONTROL = 170, GENRE = 171, PRIVATE_INFORMATION = 173, EAC3 = 204, ENHANCED_SIGNALING = 178, DATA_SERVICE = 164, PID_COUNT = 165, DOWNLOAD_DESCRIPTOR = 166, MULTIPROTOCOL_ENCAPSULATION = 167, MODULE_LINK = 180, CRC32 = 181, GROUP_LINK = 184, } alias GstMpegtsATSCDescriptorType ATSCDescriptorType; public enum GstMpegtsAtscMGTTableType { EIT0 = 256, EIT127 = 383, ETT0 = 512, ETT127 = 639, } alias GstMpegtsAtscMGTTableType AtscMGTTableType; public enum GstMpegtsCableOuterFECScheme { UNDEFINED = 0, NONE = 1, RS_204_188 = 2, } alias GstMpegtsCableOuterFECScheme CableOuterFECScheme; public enum GstMpegtsComponentStreamContent { MPEG2_VIDEO = 1, MPEG1_LAYER2_AUDIO = 2, TELETEXT_OR_SUBTITLE = 3, AC_3 = 4, AVC = 5, AAC = 6, DTS = 7, SRM_CPCM = 8, } alias GstMpegtsComponentStreamContent ComponentStreamContent; public enum GstMpegtsContentNibbleHi { MOVIE_DRAMA = 1, NEWS_CURRENT_AFFAIRS = 2, SHOW_GAME_SHOW = 3, SPORTS = 4, CHILDREN_YOUTH_PROGRAM = 5, MUSIC_BALLET_DANCE = 6, ARTS_CULTURE = 7, SOCIAL_POLITICAL_ECONOMICS = 8, EDUCATION_SCIENCE_FACTUAL = 9, LEISURE_HOBBIES = 10, SPECIAL_CHARACTERISTICS = 11, } alias GstMpegtsContentNibbleHi ContentNibbleHi; public enum GstMpegtsDVBCodeRate { NONE = 0, _1_2 = 1, _2_3 = 2, _3_4 = 3, _4_5 = 4, _5_6 = 5, _6_7 = 6, _7_8 = 7, _8_9 = 8, AUTO = 9, _3_5 = 10, _9_10 = 11, _2_5 = 12, } alias GstMpegtsDVBCodeRate DVBCodeRate; /** * The type of #GstMpegtsDescriptor * * These values correspond to the registered descriptor type from * the various DVB specifications. * * Consult the relevant specifications for more details. */ public enum GstMpegtsDVBDescriptorType { NETWORK_NAME = 64, SERVICE_LIST = 65, STUFFING = 66, SATELLITE_DELIVERY_SYSTEM = 67, CABLE_DELIVERY_SYSTEM = 68, VBI_DATA = 69, VBI_TELETEXT = 70, BOUQUET_NAME = 71, SERVICE = 72, COUNTRY_AVAILABILITY = 73, LINKAGE = 74, NVOD_REFERENCE = 75, TIME_SHIFTED_SERVICE = 76, SHORT_EVENT = 77, EXTENDED_EVENT = 78, TIME_SHIFTED_EVENT = 79, COMPONENT = 80, MOSAIC = 81, STREAM_IDENTIFIER = 82, CA_IDENTIFIER = 83, CONTENT = 84, PARENTAL_RATING = 85, TELETEXT = 86, TELEPHONE = 87, LOCAL_TIME_OFFSET = 88, SUBTITLING = 89, TERRESTRIAL_DELIVERY_SYSTEM = 90, MULTILINGUAL_NETWORK_NAME = 91, MULTILINGUAL_BOUQUET_NAME = 92, MULTILINGUAL_SERVICE_NAME = 93, MULTILINGUAL_COMPONENT = 94, PRIVATE_DATA_SPECIFIER = 95, SERVICE_MOVE = 96, SHORT_SMOOTHING_BUFFER = 97, FREQUENCY_LIST = 98, PARTIAL_TRANSPORT_STREAM = 99, DATA_BROADCAST = 100, SCRAMBLING = 101, DATA_BROADCAST_ID = 102, TRANSPORT_STREAM = 103, DSNG = 104, PDC = 105, AC3 = 106, ANCILLARY_DATA = 107, CELL_LIST = 108, CELL_FREQUENCY_LINK = 109, ANNOUNCEMENT_SUPPORT = 110, APPLICATION_SIGNALLING = 111, ADAPTATION_FIELD_DATA = 112, SERVICE_IDENTIFIER = 113, SERVICE_AVAILABILITY = 114, DEFAULT_AUTHORITY = 115, RELATED_CONTENT = 116, TVA_ID = 117, CONTENT_IDENTIFIER = 118, TIMESLICE_FEC_IDENTIFIER = 119, ECM_REPETITION_RATE = 120, S2_SATELLITE_DELIVERY_SYSTEM = 121, ENHANCED_AC3 = 122, DTS = 123, AAC = 124, XAIT_LOCATION = 125, FTA_CONTENT_MANAGEMENT = 126, EXTENSION = 127, } alias GstMpegtsDVBDescriptorType DVBDescriptorType; /** * The type of #GstMpegtsDescriptor * * These values correspond to the registered extended descriptor * type from the various DVB specifications. * * Consult the relevant specifications for more details. */ public enum GstMpegtsDVBExtendedDescriptorType { IMAGE_ICON = 0, CPCM_DELIVERY_SIGNALLING = 1, CP = 2, CP_IDENTIFIER = 3, T2_DELIVERY_SYSTEM = 4, SH_DELIVERY_SYSTEM = 5, SUPPLEMENTARY_AUDIO = 6, NETWORK_CHANGE_NOTIFY = 7, MESSAGE = 8, TARGET_REGION = 9, TARGET_REGION_NAME = 10, SERVICE_RELOCATED = 11, XAIT_PID = 12, C2_DELIVERY_SYSTEM = 13, DTS_HD_AUDIO_STREAM = 14, DTS_NEUTRAL = 15, VIDEO_DEPTH_RANGE = 16, T2MI = 17, URI_LINKAGE = 19, } alias GstMpegtsDVBExtendedDescriptorType DVBExtendedDescriptorType; public enum GstMpegtsDVBLinkageHandOverType { RESERVED = 0, IDENTICAL = 1, LOCAL_VARIATION = 2, ASSOCIATED = 3, } alias GstMpegtsDVBLinkageHandOverType DVBLinkageHandOverType; /** * Linkage Type (EN 300 468 v.1.13.1) */ public enum GstMpegtsDVBLinkageType { RESERVED_00 = 0, INFORMATION = 1, EPG = 2, CA_REPLACEMENT = 3, TS_CONTAINING_COMPLETE_SI = 4, SERVICE_REPLACEMENT = 5, DATA_BROADCAST = 6, RCS_MAP = 7, MOBILE_HAND_OVER = 8, SYSTEM_SOFTWARE_UPDATE = 9, TS_CONTAINING_SSU = 10, IP_MAC_NOTIFICATION = 11, TS_CONTAINING_INT = 12, EVENT = 13, EXTENDED_EVENT = 14, } alias GstMpegtsDVBLinkageType DVBLinkageType; public enum GstMpegtsDVBScramblingModeType { RESERVED = 0, CSA1 = 1, CSA2 = 2, CSA3_STANDARD = 3, CSA3_MINIMAL_ENHANCED = 4, CSA3_FULL_ENHANCED = 5, CISSA = 16, ATIS_0 = 112, ATIS_F = 127, } alias GstMpegtsDVBScramblingModeType DVBScramblingModeType; /** * The type of service of a channel. * * As specified in Table 87 of ETSI EN 300 468 v1.13.1 */ public enum GstMpegtsDVBServiceType { RESERVED_00 = 0, DIGITAL_TELEVISION = 1, DIGITAL_RADIO_SOUND = 2, TELETEXT = 3, NVOD_REFERENCE = 4, NVOD_TIME_SHIFTED = 5, MOSAIC = 6, FM_RADIO = 7, DVB_SRM = 8, RESERVED_09 = 9, ADVANCED_CODEC_DIGITAL_RADIO_SOUND = 10, ADVANCED_CODEC_MOSAIC = 11, DATA_BROADCAST = 12, RESERVED_0D_COMMON_INTERFACE = 13, RCS_MAP = 14, RCS_FLS = 15, DVB_MHP = 16, MPEG2_HD_DIGITAL_TELEVISION = 17, ADVANCED_CODEC_SD_DIGITAL_TELEVISION = 22, ADVANCED_CODEC_SD_NVOD_TIME_SHIFTED = 23, ADVANCED_CODEC_SD_NVOD_REFERENCE = 24, ADVANCED_CODEC_HD_DIGITAL_TELEVISION = 25, ADVANCED_CODEC_HD_NVOD_TIME_SHIFTED = 26, ADVANCED_CODEC_HD_NVOD_REFERENCE = 27, ADVANCED_CODEC_STEREO_HD_DIGITAL_TELEVISION = 28, ADVANCED_CODEC_STEREO_HD_NVOD_TIME_SHIFTED = 29, ADVANCED_CODEC_STEREO_HD_NVOD_REFERENCE = 30, RESERVED_FF = 31, } alias GstMpegtsDVBServiceType DVBServiceType; /** * The type of teletext page. * * As specified in Table 100 of ETSI EN 300 468 v1.13.1 */ public enum GstMpegtsDVBTeletextType { NITIAL_PAGE = 1, UBTITLE_PAGE = 2, DDITIONAL_INFO_PAGE = 3, ROGRAMME_SCHEDULE_PAGE = 4, EARING_IMPAIRED_PAGE = 5, } alias GstMpegtsDVBTeletextType DVBTeletextType; /** * The type of #GstMpegtsDescriptor * * These values correspond to the registered descriptor type from * the base MPEG-TS specifications (ITU H.222.0 | ISO/IEC 13818-1). * * Consult the relevant specifications for more details. */ public enum GstMpegtsDescriptorType { RESERVED_00 = 0, RESERVED_01 = 1, VIDEO_STREAM = 2, AUDIO_STREAM = 3, HIERARCHY = 4, REGISTRATION = 5, DATA_STREAM_ALIGNMENT = 6, TARGET_BACKGROUND_GRID = 7, VIDEO_WINDOW = 8, CA = 9, ISO_639_LANGUAGE = 10, SYSTEM_CLOCK = 11, MULTIPLEX_BUFFER_UTILISATION = 12, COPYRIGHT = 13, MAXIMUM_BITRATE = 14, PRIVATE_DATA_INDICATOR = 15, SMOOTHING_BUFFER = 16, STD = 17, IBP = 18, DSMCC_CAROUSEL_IDENTIFIER = 19, DSMCC_ASSOCIATION_TAG = 20, DSMCC_DEFERRED_ASSOCIATION_TAG = 21, DSMCC_NPT_REFERENCE = 23, DSMCC_NPT_ENDPOINT = 24, DSMCC_STREAM_MODE = 25, DSMCC_STREAM_EVENT = 26, MPEG4_VIDEO = 27, MPEG4_AUDIO = 28, IOD = 29, SL = 30, FMC = 31, EXTERNAL_ES_ID = 32, MUX_CODE = 33, FMX_BUFFER_SIZE = 34, MULTIPLEX_BUFFER = 35, CONTENT_LABELING = 36, METADATA_POINTER = 37, METADATA = 38, METADATA_STD = 39, AVC_VIDEO = 40, IPMP = 41, AVC_TIMING_AND_HRD = 42, MPEG2_AAC_AUDIO = 43, FLEX_MUX_TIMING = 44, MPEG4_TEXT = 45, MPEG4_AUDIO_EXTENSION = 46, AUXILIARY_VIDEO_STREAM = 47, SVC_EXTENSION = 48, MVC_EXTENSION = 49, J2K_VIDEO = 50, MVC_OPERATION_POINT = 51, MPEG2_STEREOSCOPIC_VIDEO_FORMAT = 52, STEREOSCOPIC_PROGRAM_INFO = 53, STEREOSCOPIC_VIDEO_INFO = 54, } alias GstMpegtsDescriptorType DescriptorType; /** * These values correspond to the registered descriptor type from * the various ISDB specifications. * * Consult the relevant specifications for more details. */ public enum GstMpegtsISDBDescriptorType { HIERARCHICAL_TRANSMISSION = 192, DIGITAL_COPY_CONTROL = 193, NETWORK_IDENTIFICATION = 194, PARTIAL_TS_TIME = 195, AUDIO_COMPONENT = 196, HYPERLINK = 197, TARGET_REGION = 198, DATA_CONTENT = 199, VIDEO_DECODE_CONTROL = 200, DOWNLOAD_CONTENT = 201, CA_EMM_TS = 202, CA_CONTRACT_INFORMATION = 203, CA_SERVICE = 204, TS_INFORMATION = 205, EXTENDED_BROADCASTER = 206, LOGO_TRANSMISSION = 207, BASIC_LOCAL_EVENT = 208, REFERENCE = 209, NODE_RELATION = 210, SHORT_NODE_INFORMATION = 211, STC_REFERENCE = 212, SERIES = 213, EVENT_GROUP = 214, SI_PARAMETER = 215, BROADCASTER_NAME = 216, COMPONENT_GROUP = 217, SI_PRIME_TS = 218, BOARD_INFORMATION = 219, LDT_LINKAGE = 220, CONNECTED_TRANSMISSION = 221, CONTENT_AVAILABILITY = 222, SERVICE_GROUP = 224, } alias GstMpegtsISDBDescriptorType ISDBDescriptorType; public enum GstMpegtsIso639AudioType { UNDEFINED = 0, CLEAN_EFFECTS = 1, HEARING_IMPAIRED = 2, VISUAL_IMPAIRED_COMMENTARY = 3, } alias GstMpegtsIso639AudioType Iso639AudioType; /** * The type of #GstMpegtsDescriptor * * These values correspond to miscellaneous descriptor types that are * not yet identified from known specifications. */ public enum GstMpegtsMiscDescriptorType { AC3_AUDIO_STREAM = 129, DTG_LOGICAL_CHANNEL = 131, } alias GstMpegtsMiscDescriptorType MiscDescriptorType; public enum GstMpegtsModulationType { QPSK = 0, QAM_16 = 1, QAM_32 = 2, QAM_64 = 3, QAM_128 = 4, QAM_256 = 5, QAM_AUTO = 6, VSB_8 = 7, VSB_16 = 8, PSK_8 = 9, APSK_16 = 10, APSK_32 = 11, DQPSK = 12, QAM_4_NR_ = 13, NONE = 14, } alias GstMpegtsModulationType ModulationType; /** * Running status of a service. * * Corresponds to table 6 of ETSI EN 300 468 (v1.13.0) */ public enum GstMpegtsRunningStatus { UNDEFINED = 0, NOT_RUNNING = 1, STARTS_IN_FEW_SECONDS = 2, PAUSING = 3, RUNNING = 4, OFF_AIR = 5, } alias GstMpegtsRunningStatus RunningStatus; public enum GstMpegtsSatellitePolarizationType { LINEAR_HORIZONTAL = 0, LINEAR_VERTICAL = 1, CIRCULAR_LEFT = 2, CIRCULAR_RIGHT = 3, } alias GstMpegtsSatellitePolarizationType SatellitePolarizationType; public enum GstMpegtsSatelliteRolloff { _35 = 0, _20 = 1, _25 = 2, RESERVED = 3, AUTO = 4, } alias GstMpegtsSatelliteRolloff SatelliteRolloff; /** * Type of mpeg-ts streams for SCTE */ public enum GstMpegtsScteStreamType { /** * SCTE-27 Subtitling */ SUBTITLING = 130, /** * SCTE-19 Isochronous data */ ISOCH_DATA = 131, /** * SCTE-07 Data Service or * Network Resource Table */ DST_NRT = 149, /** * Type B - DSM-CC Data Carousel * [IEC 13818-6]) */ DSMCC_DCB = 176, /** * Enhanced Television Application * Signaling (OC-SP-ETV-AM1.0.1-120614) */ SIGNALING = 192, /** * SCTE-07 Synchronous data */ SYNC_DATA = 194, /** * SCTE-53 Asynchronous data */ ASYNC_DATA = 195, } alias GstMpegtsScteStreamType ScteStreamType; /** * Values for a #GstMpegtsSection table_id. * * These are the registered ATSC table_id variants. * * see also: #GstMpegtsSectionTableID */ public enum GstMpegtsSectionATSCTableID { MASTER_GUIDE = 199, TERRESTRIAL_VIRTUAL_CHANNEL = 200, CABLE_VIRTUAL_CHANNEL = 201, RATING_REGION = 202, EVENT_INFORMATION = 203, CHANNEL_OR_EVENT_EXTENDED_TEXT = 204, SYSTEM_TIME = 205, DATA_EVENT = 206, DATA_SERVICE = 207, NETWORK_RESOURCE = 209, LONG_TERM_SERVICE = 210, DIRECTED_CHANNEL_CHANGE = 211, DIRECTED_CHANNEL_CHANGE_SECTION_CODE = 212, AGGREGATE_EVENT_INFORMATION = 214, AGGREGATE_EXTENDED_TEXT = 215, AGGREGATE_DATA_EVENT = 217, SATELLITE_VIRTUAL_CHANNEL = 218, } alias GstMpegtsSectionATSCTableID SectionATSCTableID; /** * Values for a #GstMpegtsSection table_id. * * These are the registered DVB table_id variants. * * see also: #GstMpegtsSectionTableID */ public enum GstMpegtsSectionDVBTableID { NETWORK_INFORMATION_ACTUAL_NETWORK = 64, NETWORK_INFORMATION_OTHER_NETWORK = 65, SERVICE_DESCRIPTION_ACTUAL_TS = 66, SERVICE_DESCRIPTION_OTHER_TS = 70, BOUQUET_ASSOCIATION = 74, EVENT_INFORMATION_ACTUAL_TS_PRESENT = 78, EVENT_INFORMATION_OTHER_TS_PRESENT = 79, EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_1 = 80, EVENT_INFORMATION_ACTUAL_TS_SCHEDULE_N = 95, EVENT_INFORMATION_OTHER_TS_SCHEDULE_1 = 96, EVENT_INFORMATION_OTHER_TS_SCHEDULE_N = 111, TIME_DATE = 112, RUNNING_STATUS = 113, STUFFING = 114, TIME_OFFSET = 115, APPLICATION_INFORMATION_TABLE = 116, CONTAINER = 117, RELATED_CONTENT = 118, CONTENT_IDENTIFIER = 119, MPE_FEC = 120, RESOLUTION_NOTIFICATION = 121, MPE_IFEC = 122, DISCONTINUITY_INFORMATION = 126, SELECTION_INFORMATION = 127, CA_MESSAGE_ECM_0 = 128, CA_MESSAGE_ECM_1 = 129, CA_MESSAGE_SYSTEM_PRIVATE_1 = 130, CA_MESSAGE_SYSTEM_PRIVATE_N = 143, SCT = 160, FCT = 161, TCT = 162, SPT = 163, CMT = 164, TBTP = 165, PCR_PACKET_PAYLOAD = 166, TRANSMISSION_MODE_SUPPORT_PAYLOAD = 170, TIM = 176, LL_FEC_PARITY_DATA_TABLE = 177, } alias GstMpegtsSectionDVBTableID SectionDVBTableID; /** * Values for a #GstMpegtsSection table_id. * * These are the registered SCTE table_id variants. * * see also: #GstMpegtsSectionTableID */ public enum GstMpegtsSectionSCTETableID { /** * SCTE-18 Emergency Alert System */ EAS = 216, /** * CL-SP-ETV-AM 1.0.1 EBIF message */ EBIF = 224, RESERVED = 225, /** * CL-SP-ETV-AM 1.0.1 EBIF Int. Signaling Sect. */ EISS = 226, /** * CL-SP-ETV-AM 1.0.1 DSMCC DII message */ DII = 227, /** * CL-SP-ETV-AM 1.0.1 DSMCC Data Download Block */ DDB = 228, /** * SCTE-35 splice information is carried in a * section stream on a separate PID in the program’s Map Table (PMT) allowing * Splice Event notifications to remain associated with the program and pass * through multiplexers. */ SPLICE = 252, } alias GstMpegtsSectionSCTETableID SectionSCTETableID; /** * Values for a #GstMpegtsSection table_id * * These are the registered ITU H.222.0 | ISO/IEC 13818-1 table_id variants. * * see also #GstMpegtsSectionATSCTableID, #GstMpegtsSectionDVBTableID, and * #GstMpegtsSectionSCTETableID */ public enum GstMpegtsSectionTableID { PROGRAM_ASSOCIATION = 0, CONDITIONAL_ACCESS = 1, TS_PROGRAM_MAP = 2, TS_DESCRIPTION = 3, _14496_SCENE_DESCRIPTION = 4, _14496_OBJET_DESCRIPTOR = 5, METADATA = 6, IPMP_CONTROL_INFORMATION = 7, DSM_CC_MULTIPROTO_ENCAPSULATED_DATA = 58, DSM_CC_U_N_MESSAGES = 59, DSM_CC_DOWNLOAD_DATA_MESSAGES = 60, DSM_CC_STREAM_DESCRIPTORS = 61, DSM_CC_PRIVATE_DATA = 62, DSM_CC_ADDRESSABLE_SECTIONS = 63, UNSET = 255, } alias GstMpegtsSectionTableID SectionTableID; /** * Types of #GstMpegtsSection that the library handles. */ public enum GstMpegtsSectionType { /** * Unknown section type */ UNKNOWN = 0, /** * Program Association Table (ISO/IEC 13818-1) */ PAT = 1, /** * Program Map Table (ISO/IEC 13818-1) */ PMT = 2, /** * Conditional Access Table (ISO/IEC 13818-1) */ CAT = 3, /** * Transport Stream Description Table (ISO/IEC 13818-1) */ TSDT = 4, /** * Event Information Table (EN 300 468) */ EIT = 5, /** * Network Information Table (ISO/IEC 13818-1 / EN 300 468) */ NIT = 6, /** * Bouquet Association Table ((EN 300 468) */ BAT = 7, /** * Service Description Table (EN 300 468) */ SDT = 8, /** * Time and Date Table (EN 300 468) */ TDT = 9, /** * Time Offset Table (EN 300 468) */ TOT = 10, /** * ATSC Terrestrial Virtual Channel Table (A65) */ ATSC_TVCT = 11, /** * ATSC Cable Virtual Channel Table (A65) */ ATSC_CVCT = 12, /** * ATSC Master Guide Table (A65) */ ATSC_MGT = 13, /** * ATSC Extended Text Table (A65) */ ATSC_ETT = 14, /** * ATSC Event Information Table (A65) */ ATSC_EIT = 15, /** * ATSC System Time Table (A65) */ ATSC_STT = 16, } alias GstMpegtsSectionType SectionType; /** * Type of mpeg-ts stream type. * * These values correspond to the base standard registered types. Depending * on the variant of mpeg-ts being used (Bluray, ATSC, DVB, ...), other * types might also be used, but will not conflict with these. * * Corresponds to table 2-34 of ITU H.222.0 | ISO/IEC 13818-1 */ public enum GstMpegtsStreamType { /** * ITU-T | ISO/IEC Reserved */ RESERVED_00 = 0, /** * ISO/IEC 11172-2 Video */ VIDEO_MPEG1 = 1, /** * Rec. ITU-T H.262 | ISO/IEC 13818-2 * Video or ISO/IEC 11172-2 constrained parameter video stream */ VIDEO_MPEG2 = 2, /** * ISO/IEC 11172-3 Audio */ AUDIO_MPEG1 = 3, /** * ISO/IEC 13818-3 Audio */ AUDIO_MPEG2 = 4, /** * private sections */ PRIVATE_SECTIONS = 5, /** * PES packets containing private data */ PRIVATE_PES_PACKETS = 6, /** * ISO/IEC 13522 MHEG */ MHEG = 7, /** * Annex A DSM-CC */ DSM_CC = 8, /** * Rec. ITU-T H.222.1 */ H_222_1 = 9, /** * ISO/IEC 13818-6 type A */ DSMCC_A = 10, /** * ISO/IEC 13818-6 type B */ DSMCC_B = 11, /** * ISO/IEC 13818-6 type C */ DSMCC_C = 12, /** * ISO/IEC 13818-6 type D */ DSMCC_D = 13, /** * auxiliary streams */ AUXILIARY = 14, /** * ISO/IEC 13818-7 Audio with ADTS * transport syntax */ AUDIO_AAC_ADTS = 15, /** * ISO/IEC 14496-2 Visual */ VIDEO_MPEG4 = 16, /** * ISO/IEC 14496-3 Audio with the LATM * transport syntax as defined in ISO/IEC 14496-3 */ AUDIO_AAC_LATM = 17, /** * ISO/IEC 14496-1 * SL-packetized stream or FlexMux stream carried in PES packets */ SL_FLEXMUX_PES_PACKETS = 18, /** * ISO/IEC 14496-1 SL-packetized * stream or FlexMux stream carried in ISO/IEC 14496_sections */ SL_FLEXMUX_SECTIONS = 19, /** * ISO/IEC 13818-6 Synchronized * Download Protocol */ SYNCHRONIZED_DOWNLOAD = 20, /** * Metadata carried in PES packets */ METADATA_PES_PACKETS = 21, /** * Metadata carried in metadata_sections */ METADATA_SECTIONS = 22, /** * Metadata carried in ISO/IEC * 13818-6 Data Carousel */ METADATA_DATA_CAROUSEL = 23, /** * Metadata carried in * ISO/IEC 13818-6 Object Carousel */ METADATA_OBJECT_CAROUSEL = 24, /** * Metadata carried in * ISO/IEC 13818-6 Synchronized Download Protocol */ METADATA_SYNCHRONIZED_DOWNLOAD = 25, /** * IPMP stream (defined in ISO/IEC 13818-11, * MPEG-2 IPMP) */ MPEG2_IPMP = 26, /** * AVC video stream conforming to one or * more profiles defined in Annex A of Rec. ITU-T H.264 | ISO/IEC 14496-10 or * AVC video sub-bitstream of SVC as defined in 2.1.78 or MVC base view * sub-bitstream, as defined in 2.1.85, or AVC video sub-bitstream of MVC, as * defined in 2.1.88 */ VIDEO_H264 = 27, /** * ISO/IEC 14496-3 Audio, without * using any additional transport syntax, such as DST, ALS and SLS */ AUDIO_AAC_CLEAN = 28, /** * ISO/IEC 14496-17 Text */ MPEG4_TIMED_TEXT = 29, /** * Auxiliary video stream as defined in * ISO/IEC 23002-3 */ VIDEO_RVC = 30, /** * SVC video sub-bitstream * of an AVC video stream conforming to one or more profiles defined in Annex G * of Rec. ITU-T H.264 | ISO/IEC 14496-10 */ VIDEO_H264_SVC_SUB_BITSTREAM = 31, /** * MVC video sub-bitstream * of an AVC video stream conforming to one or more profiles defined in Annex H * of Rec. ITU-T H.264 | ISO/IEC 14496-10 */ VIDEO_H264_MVC_SUB_BITSTREAM = 32, /** * Video stream conforming to one or more * profiles as defined in Rec. ITU-T T.800 | ISO/IEC 15444-1 */ VIDEO_JP2K = 33, /** * Additional view * Rec. ITU-T H.262 | ISO/IEC 13818-2 video stream for service-compatible * stereoscopic 3D services */ VIDEO_MPEG2_STEREO_ADDITIONAL_VIEW = 34, /** * Additional view * Rec. ITU-T H.264 | ISO/IEC 14496-10 video stream conforming to one or more * profiles defined in Annex A for service-compatible stereoscopic 3D services */ VIDEO_H264_STEREO_ADDITIONAL_VIEW = 35, VIDEO_HEVC = 36, /** * IPMP stream */ IPMP_STREAM = 127, } alias GstMpegtsStreamType StreamType; public enum GstMpegtsTerrestrialGuardInterval { _1_32 = 0, _1_16 = 1, _1_8 = 2, _1_4 = 3, AUTO = 4, _1_128 = 5, _19_128 = 6, _19_256 = 7, PN420 = 8, PN595 = 9, PN945 = 10, } alias GstMpegtsTerrestrialGuardInterval TerrestrialGuardInterval; public enum GstMpegtsTerrestrialHierarchy { NONE = 0, _1 = 1, _2 = 2, _4 = 3, AUTO = 4, } alias GstMpegtsTerrestrialHierarchy TerrestrialHierarchy; public enum GstMpegtsTerrestrialTransmissionMode { _2K = 0, _8K = 1, AUTO = 2, _4K = 3, _1K = 4, _16K = 5, _32K = 6, C1 = 7, C3780 = 8, } alias GstMpegtsTerrestrialTransmissionMode TerrestrialTransmissionMode; /** * Event Information Table (ATSC) */ struct GstMpegtsAtscEIT { ushort sourceId; ubyte protocolVersion; /** * Events */ GPtrArray* events; } /** * An ATSC EIT Event */ struct GstMpegtsAtscEITEvent { ushort eventId; uint startTime; ubyte etmLocation; uint lengthInSeconds; /** * the titles */ GPtrArray* titles; /** * descriptors */ GPtrArray* descriptors; } /** * Extended Text Table (ATSC) */ struct GstMpegtsAtscETT { ushort ettTableIdExtension; ushort protocolVersion; uint etmId; /** * List of texts */ GPtrArray* messages; } /** * Master Guide Table (A65) */ struct GstMpegtsAtscMGT { ubyte protocolVersion; ushort tablesDefined; /** * the tables */ GPtrArray* tables; /** * descriptors */ GPtrArray* descriptors; } /** * Source from a @GstMpegtsAtscMGT */ struct GstMpegtsAtscMGTTable { ushort tableType; ushort pid; ubyte versionNumber; uint numberBytes; /** * descriptors */ GPtrArray* descriptors; } struct GstMpegtsAtscMultString { char[4] iso639Langcode; GPtrArray* segments; } struct GstMpegtsAtscSTT { ubyte protocolVersion; uint systemTime; ubyte gpsUtcOffset; bool dsStatus; ubyte dsDayofmonth; ubyte dsHour; /** * descriptors */ GPtrArray* descriptors; GstDateTime* utcDatetime; } struct GstMpegtsAtscStringSegment { ubyte compressionType; ubyte mode; ubyte compressedDataSize; ubyte* compressedData; char* cachedString; } /** * Represents both: * Terrestrial Virtual Channel Table (A65) * Cable Virtual Channel Table (A65) */ struct GstMpegtsAtscVCT { ushort transportStreamId; ubyte protocolVersion; /** * sources */ GPtrArray* sources; /** * descriptors */ GPtrArray* descriptors; } /** * Source from a @GstMpegtsAtscVCT, can be used both for TVCT and CVCT tables */ struct GstMpegtsAtscVCTSource { char* shortName; ushort majorChannelNumber; ushort minorChannelNumber; ubyte modulationMode; uint carrierFrequency; ushort channelTSID; ushort programNumber; ubyte ETMLocation; bool accessControlled; bool hidden; bool pathSelect; bool outOfBand; bool hideGuide; ubyte serviceType; ushort sourceId; /** * descriptors */ GPtrArray* descriptors; } /** * DVB Bouquet Association Table (EN 300 468) */ struct GstMpegtsBAT { GPtrArray* descriptors; GPtrArray* streams; } struct GstMpegtsBATStream { ushort transportStreamId; ushort originalNetworkId; GPtrArray* descriptors; } /** * Cable Delivery System Descriptor (EN 300 468 v.1.13.1) */ struct GstMpegtsCableDeliverySystemDescriptor { /** * the frequency in Hz (Hertz) */ uint frequency; /** * the outer FEC scheme used */ GstMpegtsCableOuterFECScheme outerFec; /** * Modulation scheme used */ GstMpegtsModulationType modulation; /** * Symbol rate (in symbols per second) */ uint symbolRate; /** * inner FEC scheme used */ GstMpegtsDVBCodeRate fecInner; } struct GstMpegtsComponentDescriptor { ubyte streamContent; ubyte componentType; ubyte componentTag; char* languageCode; char* text; } struct GstMpegtsContent { GstMpegtsContentNibbleHi contentNibble1; ubyte contentNibble2; ubyte userByte; } struct GstMpegtsDVBLinkageDescriptor { /** * the transport id */ ushort transportStreamId; /** * the original network id */ ushort originalNetworkId; /** * the service id */ ushort serviceId; /** * the type which %linkage_data has */ GstMpegtsDVBLinkageType linkageType; void* linkageData; /** * the length for %private_data_bytes */ ubyte privateDataLength; /** * additional data bytes */ ubyte* privateDataBytes; } struct GstMpegtsDVBLinkageEvent { ushort targetEventId; bool targetListed; bool eventSimulcast; } struct GstMpegtsDVBLinkageExtendedEvent { ushort targetEventId; bool targetListed; bool eventSimulcast; ubyte linkType; ubyte targetIdType; bool originalNetworkIdFlag; bool serviceIdFlag; ushort userDefinedId; ushort targetTransportStreamId; ushort targetOriginalNetworkId; ushort targetServiceId; } struct GstMpegtsDVBLinkageMobileHandOver { GstMpegtsDVBLinkageHandOverType handOverType; bool originType; ushort networkId; ushort initialServiceId; } struct GstMpegtsDVBParentalRatingItem { char* countryCode; ubyte rating; } struct GstMpegtsDVBServiceListItem { /** * the id of a service */ ushort serviceId; /** * the type of a service */ GstMpegtsDVBServiceType type; } struct GstMpegtsDataBroadcastDescriptor { /** * the data broadcast id */ ushort dataBroadcastId; /** * the component tag */ ubyte componentTag; ubyte length; /** * the selector byte field */ ubyte* selectorBytes; /** * language of @text */ char* languageCode; /** * description of data broadcast */ char* text; } struct GstMpegtsDescriptor { /** * the type of descriptor */ ubyte tag; /** * the extended type (if @descriptor_tag is 0x7f) */ ubyte tagExtension; /** * the length of the descriptor content (excluding tag/length field) */ ubyte length; /** * the full descriptor data (including tag, extension, length). The first * two bytes are the @tag and @length. */ ubyte* data; void*[4] GstReserved; } /** * a multilingual bouquet name entry */ struct GstMpegtsDvbMultilingualBouquetNameItem { /** * the ISO 639 language code */ char* languageCode; /** * the bouquet name */ char* bouquetName; } struct GstMpegtsDvbMultilingualComponentItem { /** * the ISO 639 language code */ char* languageCode; /** * the component description */ char* description; } /** * a multilingual network name entry */ struct GstMpegtsDvbMultilingualNetworkNameItem { /** * the ISO 639 language code */ char* languageCode; /** * the network name */ char* networkName; } /** * a multilingual service name entry */ struct GstMpegtsDvbMultilingualServiceNameItem { /** * the ISO 639 language code */ char* languageCode; /** * the provider name */ char* providerName; /** * the service name */ char* serviceName; } /** * Event Information Table (EN 300 468) */ struct GstMpegtsEIT { ushort transportStreamId; ushort originalNetworkId; ubyte segmentLastSectionNumber; ubyte lastTableId; bool actualStream; bool presentFollowing; /** * List of events */ GPtrArray* events; } /** * Event from a @GstMpegtsEIT */ struct GstMpegtsEITEvent { ushort eventId; GstDateTime* startTime; uint duration; GstMpegtsRunningStatus runningStatus; bool freeCAMode; /** * List of descriptors */ GPtrArray* descriptors; } struct GstMpegtsExtendedEventDescriptor { ubyte descriptorNumber; ubyte lastDescriptorNumber; /** * NULL terminated language code. */ char* languageCode; /** * the #GstMpegtsExtendedEventItem */ GPtrArray* items; char* text; } struct GstMpegtsExtendedEventItem { char* itemDescription; char* item; } struct GstMpegtsISO639LanguageDescriptor { uint nbLanguage; char*[64] language; GstMpegtsIso639AudioType[64] audioType; } struct GstMpegtsLogicalChannel { ushort serviceId; bool visibleService; ushort logicalChannelNumber; } struct GstMpegtsLogicalChannelDescriptor { uint nbChannels; GstMpegtsLogicalChannel[64] channels; } struct GstMpegtsNIT { /** * Whether this NIT corresponds to the actual stream */ bool actualNetwork; /** * ID of the network that this NIT describes */ ushort networkId; /** * the global descriptors */ GPtrArray* descriptors; /** * the streams */ GPtrArray* streams; } struct GstMpegtsNITStream { ushort transportStreamId; ushort originalNetworkId; GPtrArray* descriptors; } struct GstMpegtsPMT { /** * PID of the stream containing PCR */ ushort pcrPid; ushort programNumber; /** * array of #GstMpegtsDescriptor */ GPtrArray* descriptors; /** * Array of #GstMpegtsPMTStream */ GPtrArray* streams; } struct GstMpegtsPMTStream { /** * the type of stream. See #GstMpegtsStreamType */ ubyte streamType; /** * the PID of the stream */ ushort pid; /** * the descriptors of the * stream */ GPtrArray* descriptors; } struct GstMpegtsPatProgram { /** * the program number */ ushort programNumber; /** * the network of program map PID */ ushort networkOrProgramMapPID; } struct GstMpegtsSDT { /** * Network ID of the originating delivery system */ ushort originalNetworkId; /** * True if the table describes this transport stream */ bool actualTs; /** * ID of this transport stream */ ushort transportStreamId; /** * List of services */ GPtrArray* services; } struct GstMpegtsSDTService { /** * The program number this table belongs to */ ushort serviceId; /** * EIT schedule information is present in this transport stream */ bool EITScheduleFlag; /** * EIT present/following information is present in this transport stream */ bool EITPresentFollowingFlag; /** * Status of this service */ GstMpegtsRunningStatus runningStatus; /** * True if one or more streams is controlled by a CA system */ bool freeCAMode; /** * List of descriptors */ GPtrArray* descriptors; } /** * Satellite Delivery System Descriptor (EN 300 468 v.1.13.1) */ struct GstMpegtsSatelliteDeliverySystemDescriptor { /** * the frequency in kHz (kiloHertz) */ uint frequency; /** * the orbital position in degrees */ float orbitalPosition; /** * If %TRUE, the satellite is in the eastern part of the orbit, * else in the western part. */ bool westEast; /** * The polarization of the transmitted signal */ GstMpegtsSatellitePolarizationType polarization; /** * Roll-off factor used in DVB-S2 */ GstMpegtsSatelliteRolloff rollOff; /** * modulation system, %TRUE if DVB-S2, else DVB-S */ bool modulationSystem; /** * Modulation scheme used */ GstMpegtsModulationType modulationType; /** * Symbol rate (in symbols per second) */ uint symbolRate; /** * inner FEC scheme used */ GstMpegtsDVBCodeRate fecInner; } struct GstMpegtsSection { GstMiniObject parent; /** * The type of section */ GstMpegtsSectionType sectionType; /** * The pid on which this section was found */ ushort pid; /** * The table id of this section */ ubyte tableId; /** * This meaning differs per section. See the documentation * of the parsed section type for the meaning of this field */ ushort subtableExtension; /** * Version of the section. */ ubyte versionNumber; /** * Applies to current/next stream or not */ bool currentNextIndicator; /** * Number of the section (if multiple) */ ubyte sectionNumber; /** * Number of the last expected section (if multiple) */ ubyte lastSectionNumber; /** * CRC */ uint crc; ubyte* data; uint sectionLength; void** cachedParsed; GDestroyNotify destroyParsed; ulong offset; bool shortSection; GstMpegtsPacketizeFunc packetizer; void*[4] GstReserved; } struct GstMpegtsT2DeliverySystemCell { /** * id of the cell */ ushort cellId; /** * centre frequencies in Hz */ GArray* centreFrequencies; GPtrArray* subCells; } struct GstMpegtsT2DeliverySystemCellExtension { /** * id of the sub cell */ ubyte cellIdExtension; /** * centre frequency of the sub cell in Hz */ uint transposerFrequency; } struct GstMpegtsT2DeliverySystemDescriptor { ubyte plpId; ushort t2SystemId; ubyte sisoMiso; uint bandwidth; GstMpegtsTerrestrialGuardInterval guardInterval; GstMpegtsTerrestrialTransmissionMode transmissionMode; bool otherFrequency; bool tfs; GPtrArray* cells; } /** * Time Offset Table (EN 300 468) */ struct GstMpegtsTOT { GstDateTime* utcTime; /** * List of descriptors */ GPtrArray* descriptors; } /** * Terrestrial Delivery System Descriptor (EN 300 468 v.1.13.1) */ struct GstMpegtsTerrestrialDeliverySystemDescriptor { /** * the frequency in Hz (Hertz) */ uint frequency; /** * the bandwidth in Hz (Hertz) */ uint bandwidth; /** * %TRUE High Priority %FALSE Low Priority */ bool priority; /** * %TRUE no time slicing %FALSE time slicing */ bool timeSlicing; /** * %TRUE no mpe-fec is used %FALSE mpe-fec is use */ bool mpeFec; /** * the constallation */ GstMpegtsModulationType constellation; /** * the hierarchy */ GstMpegtsTerrestrialHierarchy hierarchy; GstMpegtsDVBCodeRate codeRateHp; GstMpegtsDVBCodeRate codeRateLp; GstMpegtsTerrestrialGuardInterval guardInterval; GstMpegtsTerrestrialTransmissionMode transmissionMode; /** * %TRUE more frequency are use, else not */ bool otherFrequency; } /** */ public alias extern(C) int function(GstMpegtsSection* section) GstMpegtsPacketizeFunc; GtkD-3.7.5/generated/gstreamer/gstinterfaces/000077500000000000000000000000001324604450400211515ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gstinterfaces/VideoOverlay.d000066400000000000000000000353421324604450400237350ustar00rootroot00000000000000/* * 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 gstinterfaces.VideoOverlay; private import gstinterfaces.c.functions; public import gstinterfaces.c.types; private import gstreamer.Element; public import gstreamerc.gstinterfacestypes; /** * The #GstVideoOverlay interface is used for 2 main purposes : * * * To get a grab on the Window where the video sink element is going to render. * This is achieved by either being informed about the Window identifier that * the video sink element generated, or by forcing the video sink element to use * a specific Window identifier for rendering. * * To force a redrawing of the latest video frame the video sink element * displayed on the Window. Indeed if the #GstPipeline is in #GST_STATE_PAUSED * state, moving the Window around will damage its content. Application * developers will want to handle the Expose events themselves and force the * video sink element to refresh the Window's content. * * Using the Window created by the video sink is probably the simplest scenario, * in some cases, though, it might not be flexible enough for application * developers if they need to catch events such as mouse moves and button * clicks. * * Setting a specific Window identifier on the video sink element is the most * flexible solution but it has some issues. Indeed the application needs to set * its Window identifier at the right time to avoid internal Window creation * from the video sink element. To solve this issue a #GstMessage is posted on * the bus to inform the application that it should set the Window identifier * immediately. Here is an example on how to do that correctly: * |[ * static GstBusSyncReply * create_window (GstBus * bus, GstMessage * message, GstPipeline * pipeline) * { * // ignore anything but 'prepare-window-handle' element messages * if (!gst_is_video_overlay_prepare_window_handle_message (message)) * return GST_BUS_PASS; * * win = XCreateSimpleWindow (disp, root, 0, 0, 320, 240, 0, 0, 0); * * XSetWindowBackgroundPixmap (disp, win, None); * * XMapRaised (disp, win); * * XSync (disp, FALSE); * * gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)), * win); * * gst_message_unref (message); * * return GST_BUS_DROP; * } * ... * int * main (int argc, char **argv) * { * ... * bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); * gst_bus_set_sync_handler (bus, (GstBusSyncHandler) create_window, pipeline, * NULL); * ... * } * ]| * * ## Two basic usage scenarios * * There are two basic usage scenarios: in the simplest case, the application * uses #playbin or #plasink or knows exactly what particular element is used * for video output, which is usually the case when the application creates * the videosink to use (e.g. #xvimagesink, #ximagesink, etc.) itself; in this * case, the application can just create the videosink element, create and * realize the window to render the video on and then * call gst_video_overlay_set_window_handle() directly with the XID or native * window handle, before starting up the pipeline. * As #playbin and #playsink implement the video overlay interface and proxy * it transparently to the actual video sink even if it is created later, this * case also applies when using these elements. * * In the other and more common case, the application does not know in advance * what GStreamer video sink element will be used for video output. This is * usually the case when an element such as #autovideosink is used. * In this case, the video sink element itself is created * asynchronously from a GStreamer streaming thread some time after the * pipeline has been started up. When that happens, however, the video sink * will need to know right then whether to render onto an already existing * application window or whether to create its own window. This is when it * posts a prepare-window-handle message, and that is also why this message needs * to be handled in a sync bus handler which will be called from the streaming * thread directly (because the video sink will need an answer right then). * * As response to the prepare-window-handle element message in the bus sync * handler, the application may use gst_video_overlay_set_window_handle() to tell * the video sink to render onto an existing window surface. At this point the * application should already have obtained the window handle / XID, so it * just needs to set it. It is generally not advisable to call any GUI toolkit * functions or window system functions from the streaming thread in which the * prepare-window-handle message is handled, because most GUI toolkits and * windowing systems are not thread-safe at all and a lot of care would be * required to co-ordinate the toolkit and window system calls of the * different threads (Gtk+ users please note: prior to Gtk+ 2.18 * GDK_WINDOW_XID() was just a simple structure access, so generally fine to do * within the bus sync handler; this macro was changed to a function call in * Gtk+ 2.18 and later, which is likely to cause problems when called from a * sync handler; see below for a better approach without GDK_WINDOW_XID() * used in the callback). * * ## GstVideoOverlay and Gtk+ * * |[ * #include <gst/video/videooverlay.h> * #include <gtk/gtk.h> * #ifdef GDK_WINDOWING_X11 * #include <gdk/gdkx.h> // for GDK_WINDOW_XID * #endif * #ifdef GDK_WINDOWING_WIN32 * #include <gdk/gdkwin32.h> // for GDK_WINDOW_HWND * #endif * ... * static guintptr video_window_handle = 0; * ... * static GstBusSyncReply * bus_sync_handler (GstBus * bus, GstMessage * message, gpointer user_data) * { * // ignore anything but 'prepare-window-handle' element messages * if (!gst_is_video_overlay_prepare_window_handle_message (message)) * return GST_BUS_PASS; * * if (video_window_handle != 0) { * GstVideoOverlay *overlay; * * // GST_MESSAGE_SRC (message) will be the video sink element * overlay = GST_VIDEO_OVERLAY (GST_MESSAGE_SRC (message)); * gst_video_overlay_set_window_handle (overlay, video_window_handle); * } else { * g_warning ("Should have obtained video_window_handle by now!"); * } * * gst_message_unref (message); * return GST_BUS_DROP; * } * ... * static void * video_widget_realize_cb (GtkWidget * widget, gpointer data) * { * #if GTK_CHECK_VERSION(2,18,0) * // Tell Gtk+/Gdk to create a native window for this widget instead of * // drawing onto the parent widget. * // This is here just for pedagogical purposes, GDK_WINDOW_XID will call * // it as well in newer Gtk versions * if (!gdk_window_ensure_native (widget->window)) * g_error ("Couldn't create native window needed for GstVideoOverlay!"); * #endif * * #ifdef GDK_WINDOWING_X11 * { * gulong xid = GDK_WINDOW_XID (gtk_widget_get_window (video_window)); * video_window_handle = xid; * } * #endif * #ifdef GDK_WINDOWING_WIN32 * { * HWND wnd = GDK_WINDOW_HWND (gtk_widget_get_window (video_window)); * video_window_handle = (guintptr) wnd; * } * #endif * } * ... * int * main (int argc, char **argv) * { * GtkWidget *video_window; * GtkWidget *app_window; * ... * app_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); * ... * video_window = gtk_drawing_area_new (); * g_signal_connect (video_window, "realize", * G_CALLBACK (video_widget_realize_cb), NULL); * gtk_widget_set_double_buffered (video_window, FALSE); * ... * // usually the video_window will not be directly embedded into the * // application window like this, but there will be many other widgets * // and the video window will be embedded in one of them instead * gtk_container_add (GTK_CONTAINER (ap_window), video_window); * ... * // show the GUI * gtk_widget_show_all (app_window); * * // realize window now so that the video window gets created and we can * // obtain its XID/HWND before the pipeline is started up and the videosink * // asks for the XID/HWND of the window to render onto * gtk_widget_realize (video_window); * * // we should have the XID/HWND now * g_assert (video_window_handle != 0); * ... * // set up sync handler for setting the xid once the pipeline is started * bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline)); * gst_bus_set_sync_handler (bus, (GstBusSyncHandler) bus_sync_handler, NULL, * NULL); * gst_object_unref (bus); * ... * gst_element_set_state (pipeline, GST_STATE_PLAYING); * ... * } * ]| * * ## GstVideoOverlay and Qt * * |[ * #include <glib.h> * #include <gst/gst.h> * #include <gst/video/videooverlay.h> * * #include <QApplication> * #include <QTimer> * #include <QWidget> * * int main(int argc, char *argv[]) * { * if (!g_thread_supported ()) * g_thread_init (NULL); * * gst_init (&argc, &argv); * QApplication app(argc, argv); * app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit ())); * * // prepare the pipeline * * GstElement *pipeline = gst_pipeline_new ("xvoverlay"); * GstElement *src = gst_element_factory_make ("videotestsrc", NULL); * GstElement *sink = gst_element_factory_make ("xvimagesink", NULL); * gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL); * gst_element_link (src, sink); * * // prepare the ui * * QWidget window; * window.resize(320, 240); * window.show(); * * WId xwinid = window.winId(); * gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (sink), xwinid); * * // run the pipeline * * GstStateChangeReturn sret = gst_element_set_state (pipeline, * GST_STATE_PLAYING); * if (sret == GST_STATE_CHANGE_FAILURE) { * gst_element_set_state (pipeline, GST_STATE_NULL); * gst_object_unref (pipeline); * // Exit application * QTimer::singleShot(0, QApplication::activeWindow(), SLOT(quit())); * } * * int ret = app.exec(); * * window.hide(); * gst_element_set_state (pipeline, GST_STATE_NULL); * gst_object_unref (pipeline); * * return ret; * } * ]| */ public class VideoOverlay { /** the main Gtk struct */ protected GstVideoOverlay* gstVideoOverlay; protected bool ownedRef; /** Get the main Gtk struct */ public GstVideoOverlay* getVideoOverlayStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstVideoOverlay; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstVideoOverlay; } /** * Sets our main struct and passes it to the parent class. */ public this (GstVideoOverlay* gstVideoOverlay, bool ownedRef = false) { this.gstVideoOverlay = gstVideoOverlay; this.ownedRef = ownedRef; } /** * The Element parameter should usually be * your videosink that you want to create your * XOverlay with. */ public this(Element elem) { this( cast(GstVideoOverlay*)elem.getElementStruct() ); } /** */ /** */ public static GType getType() { return gst_video_overlay_get_type(); } /** * Tell an overlay that it has been exposed. This will redraw the current frame * in the drawable even if the pipeline is PAUSED. */ public void expose() { gst_video_overlay_expose(getVideoOverlayStruct()); } /** * This will post a "have-window-handle" element message on the bus. * * This function should only be used by video overlay plugin developers. * * Params: * handle = a platform-specific handle referencing the window */ public void gotWindowHandle(size_t handle) { gst_video_overlay_got_window_handle(getVideoOverlayStruct(), handle); } /** * Tell an overlay that it should handle events from the window system. These * events are forwarded upstream as navigation events. In some window system, * events are not propagated in the window hierarchy if a client is listening * for them. This method allows you to disable events handling completely * from the #GstVideoOverlay. * * Params: * handleEvents = a #gboolean indicating if events should be handled or not. */ public void handleEvents(bool handleEvents) { gst_video_overlay_handle_events(getVideoOverlayStruct(), handleEvents); } /** * This will post a "prepare-window-handle" element message on the bus * to give applications an opportunity to call * gst_video_overlay_set_window_handle() before a plugin creates its own * window. * * This function should only be used by video overlay plugin developers. */ public void prepareWindowHandle() { gst_video_overlay_prepare_window_handle(getVideoOverlayStruct()); } /** * Configure a subregion as a video target within the window set by * gst_video_overlay_set_window_handle(). If this is not used or not supported * the video will fill the area of the window set as the overlay to 100%. * By specifying the rectangle, the video can be overlayed to a specific region * of that window only. After setting the new rectangle one should call * gst_video_overlay_expose() to force a redraw. To unset the region pass -1 for * the @width and @height parameters. * * This method is needed for non fullscreen video overlay in UI toolkits that * do not support subwindows. * * Params: * x = the horizontal offset of the render area inside the window * y = the vertical offset of the render area inside the window * width = the width of the render area inside the window * height = the height of the render area inside the window * * Returns: %FALSE if not supported by the sink. */ public bool setRenderRectangle(int x, int y, int width, int height) { return gst_video_overlay_set_render_rectangle(getVideoOverlayStruct(), x, y, width, height) != 0; } /** * This will call the video overlay's set_window_handle method. You * should use this method to tell to an overlay to display video output to a * specific window (e.g. an XWindow on X11). Passing 0 as the @handle will * tell the overlay to stop using that window and create an internal one. * * Params: * handle = a handle referencing the window. */ public void setWindowHandle(size_t handle) { gst_video_overlay_set_window_handle(getVideoOverlayStruct(), handle); } } GtkD-3.7.5/generated/gstreamer/gstinterfaces/c/000077500000000000000000000000001324604450400213735ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gstinterfaces/c/functions.d000066400000000000000000000064371324604450400235620ustar00rootroot00000000000000/* * 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 gstinterfaces.c.functions; import std.stdio; import gstinterfaces.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GSTINTERFACES = ["libgstvideo-1.0-0.dll"]; else version (OSX) static immutable LIBRARY_GSTINTERFACES = ["libgstvideo-1.0.0.dylib"]; else static immutable LIBRARY_GSTINTERFACES = ["libgstvideo-1.0.so.0"]; shared static this() { // gstinterfaces.VideoOverlay Linker.link(gst_video_overlay_get_type, "gst_video_overlay_get_type", LIBRARY_GSTINTERFACES); Linker.link(gst_video_overlay_expose, "gst_video_overlay_expose", LIBRARY_GSTINTERFACES); Linker.link(gst_video_overlay_got_window_handle, "gst_video_overlay_got_window_handle", LIBRARY_GSTINTERFACES); Linker.link(gst_video_overlay_handle_events, "gst_video_overlay_handle_events", LIBRARY_GSTINTERFACES); Linker.link(gst_video_overlay_prepare_window_handle, "gst_video_overlay_prepare_window_handle", LIBRARY_GSTINTERFACES); Linker.link(gst_video_overlay_set_render_rectangle, "gst_video_overlay_set_render_rectangle", LIBRARY_GSTINTERFACES); Linker.link(gst_video_overlay_set_window_handle, "gst_video_overlay_set_window_handle", LIBRARY_GSTINTERFACES); } __gshared extern(C) { // gstinterfaces.VideoOverlay GType function() c_gst_video_overlay_get_type; void function(GstVideoOverlay* overlay) c_gst_video_overlay_expose; void function(GstVideoOverlay* overlay, size_t handle) c_gst_video_overlay_got_window_handle; void function(GstVideoOverlay* overlay, int handleEvents) c_gst_video_overlay_handle_events; void function(GstVideoOverlay* overlay) c_gst_video_overlay_prepare_window_handle; int function(GstVideoOverlay* overlay, int x, int y, int width, int height) c_gst_video_overlay_set_render_rectangle; void function(GstVideoOverlay* overlay, size_t handle) c_gst_video_overlay_set_window_handle; } // gstinterfaces.VideoOverlay alias c_gst_video_overlay_get_type gst_video_overlay_get_type; alias c_gst_video_overlay_expose gst_video_overlay_expose; alias c_gst_video_overlay_got_window_handle gst_video_overlay_got_window_handle; alias c_gst_video_overlay_handle_events gst_video_overlay_handle_events; alias c_gst_video_overlay_prepare_window_handle gst_video_overlay_prepare_window_handle; alias c_gst_video_overlay_set_render_rectangle gst_video_overlay_set_render_rectangle; alias c_gst_video_overlay_set_window_handle gst_video_overlay_set_window_handle; GtkD-3.7.5/generated/gstreamer/gstinterfaces/c/types.d000066400000000000000000000437011324604450400227110ustar00rootroot00000000000000/* * 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 gstinterfaces.c.types; public import gobject.c.types; /** * The different video orientation methods. * * Since: 1.10 */ public enum GstVideoOrientationMethod { /** * Identity (no rotation) */ IDENTITY = 0, /** * Rotate clockwise 90 degrees */ _90R = 1, /** * Rotate 180 degrees */ _180 = 2, /** * Rotate counter-clockwise 90 degrees */ _90L = 3, /** * Flip horizontally */ HORIZ = 4, /** * Flip vertically */ VERT = 5, /** * Flip across upper left/lower right diagonal */ UL_LR = 6, /** * Flip across upper right/lower left diagonal */ UR_LL = 7, /** * Select flip method based on image-orientation tag */ AUTO = 8, /** * Current status depends on plugin internal setup */ CUSTOM = 9, } alias GstVideoOrientationMethod VideoOrientationMethod; /** * Flags related to the time code information. * For drop frame, only 30000/1001 and 60000/1001 frame rates are supported. * * Since: 1.10 */ public enum GstVideoTimeCodeFlags { /** * No flags */ NONE = 0, /** * Whether we have drop frame rate */ DROP_FRAME = 1, /** * Whether we have interlaced video */ INTERLACED = 2, } alias GstVideoTimeCodeFlags VideoTimeCodeFlags; /** * #GstVideoDirectionInterface interface. * * Since: 1.10 */ struct GstVideoDirectionInterface { /** * parent interface type. */ GTypeInterface iface; } struct GstVideoOverlay; /** * #GstVideoOverlay interface */ struct GstVideoOverlayInterface { /** * parent interface type. */ GTypeInterface iface; /** */ extern(C) void function(GstVideoOverlay* overlay) expose; /** */ extern(C) void function(GstVideoOverlay* overlay, int handleEvents) handleEvents; /** */ extern(C) void function(GstVideoOverlay* overlay, int x, int y, int width, int height) setRenderRectangle; /** */ extern(C) void function(GstVideoOverlay* overlay, size_t handle) setWindowHandle; } /** * Supported frame rates: 30000/1001, 60000/1001 (both with and without drop * frame), and integer frame rates e.g. 25/1, 30/1, 50/1, 60/1. * * The configuration of the time code. * * Since: 1.10 */ struct GstVideoTimeCodeConfig { /** * Numerator of the frame rate */ uint fpsN; /** * Denominator of the frame rate */ uint fpsD; /** * the corresponding #GstVideoTimeCodeFlags */ GstVideoTimeCodeFlags flags; /** * The latest daily jam information, if present, or NULL */ GDateTime* latestDailyJam; } enum BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META = "GstBufferPoolOptionVideoAffineTransformation"; alias GST_BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META = BUFFER_POOL_OPTION_VIDEO_AFFINE_TRANSFORMATION_META; /** * A bufferpool option to enable extra padding. When a bufferpool supports this * option, gst_buffer_pool_config_set_video_alignment() can be called. * * When this option is enabled on the bufferpool, * #GST_BUFFER_POOL_OPTION_VIDEO_META should also be enabled. */ enum BUFFER_POOL_OPTION_VIDEO_ALIGNMENT = "GstBufferPoolOptionVideoAlignment"; alias GST_BUFFER_POOL_OPTION_VIDEO_ALIGNMENT = BUFFER_POOL_OPTION_VIDEO_ALIGNMENT; /** * An option that can be activated on a bufferpool to request gl texture upload * meta on buffers from the pool. * * When this option is enabled on the bufferpool, * @GST_BUFFER_POOL_OPTION_VIDEO_META should also be enabled. */ enum BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META = "GstBufferPoolOptionVideoGLTextureUploadMeta"; alias GST_BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META = BUFFER_POOL_OPTION_VIDEO_GL_TEXTURE_UPLOAD_META; /** * An option that can be activated on bufferpool to request video metadata * on buffers from the pool. */ enum BUFFER_POOL_OPTION_VIDEO_META = "GstBufferPoolOptionVideoMeta"; alias GST_BUFFER_POOL_OPTION_VIDEO_META = BUFFER_POOL_OPTION_VIDEO_META; enum CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META = "meta:GstVideoAffineTransformation"; alias GST_CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META = CAPS_FEATURE_META_GST_VIDEO_AFFINE_TRANSFORMATION_META; enum CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META = "meta:GstVideoGLTextureUploadMeta"; alias GST_CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META = CAPS_FEATURE_META_GST_VIDEO_GL_TEXTURE_UPLOAD_META; enum CAPS_FEATURE_META_GST_VIDEO_META = "meta:GstVideoMeta"; alias GST_CAPS_FEATURE_META_GST_VIDEO_META = CAPS_FEATURE_META_GST_VIDEO_META; enum CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION = "meta:GstVideoOverlayComposition"; alias GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION = CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION; /** * This metadata stays relevant as long as video colorspace is unchanged. */ enum META_TAG_VIDEO_COLORSPACE_STR = "colorspace"; alias GST_META_TAG_VIDEO_COLORSPACE_STR = META_TAG_VIDEO_COLORSPACE_STR; /** * This metadata stays relevant as long as video orientation is unchanged. */ enum META_TAG_VIDEO_ORIENTATION_STR = "orientation"; alias GST_META_TAG_VIDEO_ORIENTATION_STR = META_TAG_VIDEO_ORIENTATION_STR; /** * This metadata stays relevant as long as video size is unchanged. */ enum META_TAG_VIDEO_SIZE_STR = "size"; alias GST_META_TAG_VIDEO_SIZE_STR = META_TAG_VIDEO_SIZE_STR; /** * This metadata is relevant for video streams. */ enum META_TAG_VIDEO_STR = "video"; alias GST_META_TAG_VIDEO_STR = META_TAG_VIDEO_STR; enum VIDEO_COLORIMETRY_BT2020 = "bt2020"; alias GST_VIDEO_COLORIMETRY_BT2020 = VIDEO_COLORIMETRY_BT2020; enum VIDEO_COLORIMETRY_BT601 = "bt601"; alias GST_VIDEO_COLORIMETRY_BT601 = VIDEO_COLORIMETRY_BT601; enum VIDEO_COLORIMETRY_BT709 = "bt709"; alias GST_VIDEO_COLORIMETRY_BT709 = VIDEO_COLORIMETRY_BT709; enum VIDEO_COLORIMETRY_SMPTE240M = "smpte240m"; alias GST_VIDEO_COLORIMETRY_SMPTE240M = VIDEO_COLORIMETRY_SMPTE240M; enum VIDEO_COLORIMETRY_SRGB = "sRGB"; alias GST_VIDEO_COLORIMETRY_SRGB = VIDEO_COLORIMETRY_SRGB; enum VIDEO_COMP_A = 3; alias GST_VIDEO_COMP_A = VIDEO_COMP_A; enum VIDEO_COMP_B = 2; alias GST_VIDEO_COMP_B = VIDEO_COMP_B; enum VIDEO_COMP_G = 1; alias GST_VIDEO_COMP_G = VIDEO_COMP_G; enum VIDEO_COMP_INDEX = 0; alias GST_VIDEO_COMP_INDEX = VIDEO_COMP_INDEX; enum VIDEO_COMP_PALETTE = 1; alias GST_VIDEO_COMP_PALETTE = VIDEO_COMP_PALETTE; enum VIDEO_COMP_R = 0; alias GST_VIDEO_COMP_R = VIDEO_COMP_R; enum VIDEO_COMP_U = 1; alias GST_VIDEO_COMP_U = VIDEO_COMP_U; enum VIDEO_COMP_V = 2; alias GST_VIDEO_COMP_V = VIDEO_COMP_V; enum VIDEO_COMP_Y = 0; alias GST_VIDEO_COMP_Y = VIDEO_COMP_Y; /** * #GST_TYPE_VIDEO_ALPHA_MODE, the alpha mode to use. * Default is #GST_VIDEO_ALPHA_MODE_COPY. */ enum VIDEO_CONVERTER_OPT_ALPHA_MODE = "GstVideoConverter.alpha-mode"; alias GST_VIDEO_CONVERTER_OPT_ALPHA_MODE = VIDEO_CONVERTER_OPT_ALPHA_MODE; /** * #G_TYPE_DOUBLE, the alpha color value to use. * Default to 1.0 */ enum VIDEO_CONVERTER_OPT_ALPHA_VALUE = "GstVideoConverter.alpha-value"; alias GST_VIDEO_CONVERTER_OPT_ALPHA_VALUE = VIDEO_CONVERTER_OPT_ALPHA_VALUE; /** * #G_TYPE_UINT, the border color to use if #GST_VIDEO_CONVERTER_OPT_FILL_BORDER * is set to %TRUE. The color is in ARGB format. * Default 0xff000000 */ enum VIDEO_CONVERTER_OPT_BORDER_ARGB = "GstVideoConverter.border-argb"; alias GST_VIDEO_CONVERTER_OPT_BORDER_ARGB = VIDEO_CONVERTER_OPT_BORDER_ARGB; /** * #GST_TYPE_VIDEO_CHROMA_MODE, set the chroma resample mode subsampled * formats. Default is #GST_VIDEO_CHROMA_MODE_FULL. */ enum VIDEO_CONVERTER_OPT_CHROMA_MODE = "GstVideoConverter.chroma-mode"; alias GST_VIDEO_CONVERTER_OPT_CHROMA_MODE = VIDEO_CONVERTER_OPT_CHROMA_MODE; /** * #GST_TYPE_RESAMPLER_METHOD, The resampler method to use for * chroma resampling. Other options for the resampler can be used, see * the #GstResampler. Default is #GST_RESAMPLER_METHOD_LINEAR */ enum VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD = "GstVideoConverter.chroma-resampler-method"; alias GST_VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD = VIDEO_CONVERTER_OPT_CHROMA_RESAMPLER_METHOD; /** * #G_TYPE_INT, height in the destination frame, default destination height */ enum VIDEO_CONVERTER_OPT_DEST_HEIGHT = "GstVideoConverter.dest-height"; alias GST_VIDEO_CONVERTER_OPT_DEST_HEIGHT = VIDEO_CONVERTER_OPT_DEST_HEIGHT; /** * #G_TYPE_INT, width in the destination frame, default destination width */ enum VIDEO_CONVERTER_OPT_DEST_WIDTH = "GstVideoConverter.dest-width"; alias GST_VIDEO_CONVERTER_OPT_DEST_WIDTH = VIDEO_CONVERTER_OPT_DEST_WIDTH; /** * #G_TYPE_INT, x position in the destination frame, default 0 */ enum VIDEO_CONVERTER_OPT_DEST_X = "GstVideoConverter.dest-x"; alias GST_VIDEO_CONVERTER_OPT_DEST_X = VIDEO_CONVERTER_OPT_DEST_X; /** * #G_TYPE_INT, y position in the destination frame, default 0 */ enum VIDEO_CONVERTER_OPT_DEST_Y = "GstVideoConverter.dest-y"; alias GST_VIDEO_CONVERTER_OPT_DEST_Y = VIDEO_CONVERTER_OPT_DEST_Y; /** * #GST_TYPE_VIDEO_DITHER_METHOD, The dither method to use when * changing bit depth. * Default is #GST_VIDEO_DITHER_BAYER. */ enum VIDEO_CONVERTER_OPT_DITHER_METHOD = "GstVideoConverter.dither-method"; alias GST_VIDEO_CONVERTER_OPT_DITHER_METHOD = VIDEO_CONVERTER_OPT_DITHER_METHOD; /** * #G_TYPE_UINT, The quantization amount to dither to. Components will be * quantized to multiples of this value. * Default is 1 */ enum VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION = "GstVideoConverter.dither-quantization"; alias GST_VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION = VIDEO_CONVERTER_OPT_DITHER_QUANTIZATION; /** * #G_TYPE_BOOLEAN, if the destination rectangle does not fill the complete * destination image, render a border with * #GST_VIDEO_CONVERTER_OPT_BORDER_ARGB. Otherwise the unusded pixels in the * destination are untouched. Default %TRUE. */ enum VIDEO_CONVERTER_OPT_FILL_BORDER = "GstVideoConverter.fill-border"; alias GST_VIDEO_CONVERTER_OPT_FILL_BORDER = VIDEO_CONVERTER_OPT_FILL_BORDER; /** * #GST_TYPE_VIDEO_GAMMA_MODE, set the gamma mode. * Default is #GST_VIDEO_GAMMA_MODE_NONE. */ enum VIDEO_CONVERTER_OPT_GAMMA_MODE = "GstVideoConverter.gamma-mode"; alias GST_VIDEO_CONVERTER_OPT_GAMMA_MODE = VIDEO_CONVERTER_OPT_GAMMA_MODE; /** * #GST_TYPE_VIDEO_MATRIX_MODE, set the color matrix conversion mode for * converting between Y'PbPr and non-linear RGB (R'G'B'). * Default is #GST_VIDEO_MATRIX_MODE_FULL. */ enum VIDEO_CONVERTER_OPT_MATRIX_MODE = "GstVideoConverter.matrix-mode"; alias GST_VIDEO_CONVERTER_OPT_MATRIX_MODE = VIDEO_CONVERTER_OPT_MATRIX_MODE; /** * #GST_TYPE_VIDEO_PRIMARIES_MODE, set the primaries conversion mode. * Default is #GST_VIDEO_PRIMARIES_MODE_NONE. */ enum VIDEO_CONVERTER_OPT_PRIMARIES_MODE = "GstVideoConverter.primaries-mode"; alias GST_VIDEO_CONVERTER_OPT_PRIMARIES_MODE = VIDEO_CONVERTER_OPT_PRIMARIES_MODE; /** * #GST_TYPE_RESAMPLER_METHOD, The resampler method to use for * resampling. Other options for the resampler can be used, see * the #GstResampler. Default is #GST_RESAMPLER_METHOD_CUBIC */ enum VIDEO_CONVERTER_OPT_RESAMPLER_METHOD = "GstVideoConverter.resampler-method"; alias GST_VIDEO_CONVERTER_OPT_RESAMPLER_METHOD = VIDEO_CONVERTER_OPT_RESAMPLER_METHOD; /** * #G_TYPE_UINT, The number of taps for the resampler. * Default is 0: let the resampler choose a good value. */ enum VIDEO_CONVERTER_OPT_RESAMPLER_TAPS = "GstVideoConverter.resampler-taps"; alias GST_VIDEO_CONVERTER_OPT_RESAMPLER_TAPS = VIDEO_CONVERTER_OPT_RESAMPLER_TAPS; /** * #G_TYPE_INT, source height to convert, default source height */ enum VIDEO_CONVERTER_OPT_SRC_HEIGHT = "GstVideoConverter.src-height"; alias GST_VIDEO_CONVERTER_OPT_SRC_HEIGHT = VIDEO_CONVERTER_OPT_SRC_HEIGHT; /** * #G_TYPE_INT, source width to convert, default source width */ enum VIDEO_CONVERTER_OPT_SRC_WIDTH = "GstVideoConverter.src-width"; alias GST_VIDEO_CONVERTER_OPT_SRC_WIDTH = VIDEO_CONVERTER_OPT_SRC_WIDTH; /** * #G_TYPE_INT, source x position to start conversion, default 0 */ enum VIDEO_CONVERTER_OPT_SRC_X = "GstVideoConverter.src-x"; alias GST_VIDEO_CONVERTER_OPT_SRC_X = VIDEO_CONVERTER_OPT_SRC_X; /** * #G_TYPE_INT, source y position to start conversion, default 0 */ enum VIDEO_CONVERTER_OPT_SRC_Y = "GstVideoConverter.src-y"; alias GST_VIDEO_CONVERTER_OPT_SRC_Y = VIDEO_CONVERTER_OPT_SRC_Y; /** * #G_TYPE_UINT, maximum number of threads to use. Default 1, 0 for the number * of cores. */ enum VIDEO_CONVERTER_OPT_THREADS = "GstVideoConverter.threads"; alias GST_VIDEO_CONVERTER_OPT_THREADS = VIDEO_CONVERTER_OPT_THREADS; /** * Default maximum number of errors tolerated before signaling error. */ enum VIDEO_DECODER_MAX_ERRORS = 10; alias GST_VIDEO_DECODER_MAX_ERRORS = VIDEO_DECODER_MAX_ERRORS; /** * The name of the templates for the sink pad. */ enum VIDEO_DECODER_SINK_NAME = "sink"; alias GST_VIDEO_DECODER_SINK_NAME = VIDEO_DECODER_SINK_NAME; /** * The name of the templates for the source pad. */ enum VIDEO_DECODER_SRC_NAME = "src"; alias GST_VIDEO_DECODER_SRC_NAME = VIDEO_DECODER_SRC_NAME; /** * The name of the templates for the sink pad. */ enum VIDEO_ENCODER_SINK_NAME = "sink"; alias GST_VIDEO_ENCODER_SINK_NAME = VIDEO_ENCODER_SINK_NAME; /** * The name of the templates for the source pad. */ enum VIDEO_ENCODER_SRC_NAME = "src"; alias GST_VIDEO_ENCODER_SRC_NAME = VIDEO_ENCODER_SRC_NAME; enum VIDEO_FORMATS_ALL = "{ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }"; alias GST_VIDEO_FORMATS_ALL = VIDEO_FORMATS_ALL; enum VIDEO_FPS_RANGE = "(fraction) [ 0, max ]"; alias GST_VIDEO_FPS_RANGE = VIDEO_FPS_RANGE; enum VIDEO_MAX_COMPONENTS = 4; alias GST_VIDEO_MAX_COMPONENTS = VIDEO_MAX_COMPONENTS; enum VIDEO_MAX_PLANES = 4; alias GST_VIDEO_MAX_PLANES = VIDEO_MAX_PLANES; /** * Video formats supported by gst_video_overlay_composition_blend(), for * use in overlay elements' pad template caps. */ enum VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS = "{ BGRx, RGBx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, I420, YV12, AYUV, YUY2, UYVY, v308, Y41B, Y42B, Y444, NV12, NV21, A420, YUV9, YVU9, IYU1, GRAY8 }"; alias GST_VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS = VIDEO_OVERLAY_COMPOSITION_BLEND_FORMATS; /** * G_TYPE_DOUBLE, B parameter of the cubic filter. The B * parameter controls the bluriness. Values between 0.0 and * 2.0 are accepted. 1/3 is the default. * * Below are some values of popular filters: * B C * Hermite 0.0 0.0 * Spline 1.0 0.0 * Catmull-Rom 0.0 1/2 * Mitchell 1/3 1/3 * Robidoux 0.3782 0.3109 * Robidoux * Sharp 0.2620 0.3690 * Robidoux * Soft 0.6796 0.1602 */ enum VIDEO_RESAMPLER_OPT_CUBIC_B = "GstVideoResampler.cubic-b"; alias GST_VIDEO_RESAMPLER_OPT_CUBIC_B = VIDEO_RESAMPLER_OPT_CUBIC_B; /** * G_TYPE_DOUBLE, C parameter of the cubic filter. The C * parameter controls the Keys alpha value. Values between 0.0 and * 2.0 are accepted. 1/3 is the default. * * See #GST_VIDEO_RESAMPLER_OPT_CUBIC_B for some more common values */ enum VIDEO_RESAMPLER_OPT_CUBIC_C = "GstVideoResampler.cubic-c"; alias GST_VIDEO_RESAMPLER_OPT_CUBIC_C = VIDEO_RESAMPLER_OPT_CUBIC_C; /** * G_TYPE_DOUBLE, specifies the size of filter envelope for * @GST_VIDEO_RESAMPLER_METHOD_LANCZOS. values are clamped between * 1.0 and 5.0. 2.0 is the default. */ enum VIDEO_RESAMPLER_OPT_ENVELOPE = "GstVideoResampler.envelope"; alias GST_VIDEO_RESAMPLER_OPT_ENVELOPE = VIDEO_RESAMPLER_OPT_ENVELOPE; /** * G_TYPE_INT, limits the maximum number of taps to use. * 16 is the default. */ enum VIDEO_RESAMPLER_OPT_MAX_TAPS = "GstVideoResampler.max-taps"; alias GST_VIDEO_RESAMPLER_OPT_MAX_TAPS = VIDEO_RESAMPLER_OPT_MAX_TAPS; /** * G_TYPE_DOUBLE, specifies sharpening of the filter for * @GST_VIDEO_RESAMPLER_METHOD_LANCZOS. values are clamped between * 0.0 and 1.0. 0.0 is the default. */ enum VIDEO_RESAMPLER_OPT_SHARPEN = "GstVideoResampler.sharpen"; alias GST_VIDEO_RESAMPLER_OPT_SHARPEN = VIDEO_RESAMPLER_OPT_SHARPEN; /** * G_TYPE_DOUBLE, specifies sharpness of the filter for * @GST_VIDEO_RESAMPLER_METHOD_LANCZOS. values are clamped between * 0.5 and 1.5. 1.0 is the default. */ enum VIDEO_RESAMPLER_OPT_SHARPNESS = "GstVideoResampler.sharpness"; alias GST_VIDEO_RESAMPLER_OPT_SHARPNESS = VIDEO_RESAMPLER_OPT_SHARPNESS; /** * #GST_TYPE_VIDEO_DITHER_METHOD, The dither method to use for propagating * quatization errors. */ enum VIDEO_SCALER_OPT_DITHER_METHOD = "GstVideoScaler.dither-method"; alias GST_VIDEO_SCALER_OPT_DITHER_METHOD = VIDEO_SCALER_OPT_DITHER_METHOD; enum VIDEO_SIZE_RANGE = "(int) [ 1, max ]"; alias GST_VIDEO_SIZE_RANGE = VIDEO_SIZE_RANGE; enum VIDEO_TILE_TYPE_MASK = 0; alias GST_VIDEO_TILE_TYPE_MASK = VIDEO_TILE_TYPE_MASK; enum VIDEO_TILE_TYPE_SHIFT = 16; alias GST_VIDEO_TILE_TYPE_SHIFT = VIDEO_TILE_TYPE_SHIFT; enum VIDEO_TILE_X_TILES_MASK = 0; alias GST_VIDEO_TILE_X_TILES_MASK = VIDEO_TILE_X_TILES_MASK; enum VIDEO_TILE_Y_TILES_SHIFT = 16; alias GST_VIDEO_TILE_Y_TILES_SHIFT = VIDEO_TILE_Y_TILES_SHIFT; GtkD-3.7.5/generated/gstreamer/gstreamer/000077500000000000000000000000001324604450400203015ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gstreamer/AllocationParams.d000066400000000000000000000053671324604450400237120ustar00rootroot00000000000000/* * 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 gstreamer.AllocationParams; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * Parameters to control the allocation of memory */ public class AllocationParams { /** the main Gtk struct */ protected GstAllocationParams* gstAllocationParams; protected bool ownedRef; /** Get the main Gtk struct */ public GstAllocationParams* getAllocationParamsStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstAllocationParams; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstAllocationParams; } /** * Sets our main struct and passes it to the parent class. */ public this (GstAllocationParams* gstAllocationParams, bool ownedRef = false) { this.gstAllocationParams = gstAllocationParams; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_allocation_params_free(gstAllocationParams); } /** */ public static GType getType() { return gst_allocation_params_get_type(); } /** * Create a copy of @params. * * Free-function: gst_allocation_params_free * * Returns: a new ##GstAllocationParams, free with * gst_allocation_params_free(). */ public AllocationParams copy() { auto p = gst_allocation_params_copy(gstAllocationParams); if(p is null) { return null; } return ObjectG.getDObject!(AllocationParams)(cast(GstAllocationParams*) p, true); } /** * Free @params */ public void free() { gst_allocation_params_free(gstAllocationParams); ownedRef = false; } /** * Initialize @params to its default values */ public void init() { gst_allocation_params_init(gstAllocationParams); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Allocator.d000066400000000000000000000117521324604450400223740ustar00rootroot00000000000000/* * 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 gstreamer.Allocator; private import glib.Str; private import gobject.ObjectG; private import gstreamer.AllocationParams; private import gstreamer.Memory; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Memory is usually created by allocators with a gst_allocator_alloc() * method call. When %NULL is used as the allocator, the default allocator will * be used. * * New allocators can be registered with gst_allocator_register(). * Allocators are identified by name and can be retrieved with * gst_allocator_find(). gst_allocator_set_default() can be used to change the * default allocator. * * New memory can be created with gst_memory_new_wrapped() that wraps the memory * allocated elsewhere. */ public class Allocator : ObjectGst { /** the main Gtk struct */ protected GstAllocator* gstAllocator; /** Get the main Gtk struct */ public GstAllocator* getAllocatorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstAllocator; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstAllocator; } protected override void setStruct(GObject* obj) { gstAllocator = cast(GstAllocator*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstAllocator* gstAllocator, bool ownedRef = false) { this.gstAllocator = gstAllocator; super(cast(GstObject*)gstAllocator, ownedRef); } /** */ public static GType getType() { return gst_allocator_get_type(); } /** * Find a previously registered allocator with @name. When @name is %NULL, the * default allocator will be returned. * * Params: * name = the name of the allocator * * Returns: a #GstAllocator or %NULL when * the allocator with @name was not registered. Use gst_object_unref() * to release the allocator after usage. */ public static Allocator find(string name) { auto p = gst_allocator_find(Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Allocator)(cast(GstAllocator*) p, true); } /** * Registers the memory @allocator with @name. This function takes ownership of * @allocator. * * Params: * name = the name of the allocator * allocator = #GstAllocator */ public static void register(string name, Allocator allocator) { gst_allocator_register(Str.toStringz(name), (allocator is null) ? null : allocator.getAllocatorStruct()); } /** * Use @allocator to allocate a new memory block with memory that is at least * @size big. * * The optional @params can specify the prefix and padding for the memory. If * %NULL is passed, no flags, no extra prefix/padding and a default alignment is * used. * * The prefix/padding will be filled with 0 if flags contains * #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. * * When @allocator is %NULL, the default allocator will be used. * * The alignment in @params is given as a bitmask so that @align + 1 equals * the amount of bytes to align to. For example, to align to 8 bytes, * use an alignment of 7. * * Params: * size = size of the visible memory area * params = optional parameters * * Returns: a new #GstMemory. */ public Memory alloc(size_t size, AllocationParams params) { auto p = gst_allocator_alloc(gstAllocator, size, (params is null) ? null : params.getAllocationParamsStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); } /** * Free @memory that was previously allocated with gst_allocator_alloc(). * * Params: * memory = the memory to free */ public void free(Memory memory) { gst_allocator_free(gstAllocator, (memory is null) ? null : memory.getMemoryStruct()); } /** * Set the default allocator. This function takes ownership of @allocator. */ public void setDefault() { gst_allocator_set_default(gstAllocator); } } GtkD-3.7.5/generated/gstreamer/gstreamer/AtomicQueue.d000066400000000000000000000073271324604450400227000ustar00rootroot00000000000000/* * 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 gstreamer.AtomicQueue; private import glib.ConstructionException; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * The #GstAtomicQueue object implements a queue that can be used from multiple * threads without performing any blocking operations. */ public class AtomicQueue { /** the main Gtk struct */ protected GstAtomicQueue* gstAtomicQueue; protected bool ownedRef; /** Get the main Gtk struct */ public GstAtomicQueue* getAtomicQueueStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstAtomicQueue; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstAtomicQueue; } /** * Sets our main struct and passes it to the parent class. */ public this (GstAtomicQueue* gstAtomicQueue, bool ownedRef = false) { this.gstAtomicQueue = gstAtomicQueue; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_atomic_queue_unref(gstAtomicQueue); } /** */ public static GType getType() { return gst_atomic_queue_get_type(); } /** * Create a new atomic queue instance. @initial_size will be rounded up to the * nearest power of 2 and used as the initial size of the queue. * * Params: * initialSize = initial queue size * * Returns: a new #GstAtomicQueue * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint initialSize) { auto p = gst_atomic_queue_new(initialSize); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstAtomicQueue*) p); } /** * Get the amount of items in the queue. * * Returns: the number of elements in the queue. */ public uint length() { return gst_atomic_queue_length(gstAtomicQueue); } /** * Peek the head element of the queue without removing it from the queue. * * Returns: the head element of @queue or * %NULL when the queue is empty. */ public void* peek() { return gst_atomic_queue_peek(gstAtomicQueue); } /** * Get the head element of the queue. * * Returns: the head element of @queue or %NULL when * the queue is empty. */ public void* pop() { return gst_atomic_queue_pop(gstAtomicQueue); } /** * Append @data to the tail of the queue. * * Params: * data = the data */ public void push(void* data) { gst_atomic_queue_push(gstAtomicQueue, data); } /** * Increase the refcount of @queue. */ public void doref() { gst_atomic_queue_ref(gstAtomicQueue); } /** * Unref @queue and free the memory when the refcount reaches 0. */ public void unref() { gst_atomic_queue_unref(gstAtomicQueue); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Bin.d000066400000000000000000000613671324604450400211730ustar00rootroot00000000000000/* * 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 gstreamer.Bin; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.ChildProxyIF; private import gstreamer.ChildProxyT; private import gstreamer.Element; private import gstreamer.Iterator; private import gstreamer.Pad; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * #GstBin is an element that can contain other #GstElement, allowing them to be * managed as a group. * Pads from the child elements can be ghosted to the bin, see #GstGhostPad. * This makes the bin look like any other elements and enables creation of * higher-level abstraction elements. * * A new #GstBin is created with gst_bin_new(). Use a #GstPipeline instead if you * want to create a toplevel bin because a normal bin doesn't have a bus or * handle clock distribution of its own. * * After the bin has been created you will typically add elements to it with * gst_bin_add(). You can remove elements with gst_bin_remove(). * * An element can be retrieved from a bin with gst_bin_get_by_name(), using the * elements name. gst_bin_get_by_name_recurse_up() is mainly used for internal * purposes and will query the parent bins when the element is not found in the * current bin. * * An iterator of elements in a bin can be retrieved with * gst_bin_iterate_elements(). Various other iterators exist to retrieve the * elements in a bin. * * gst_object_unref() is used to drop your reference to the bin. * * The #GstBin::element-added signal is fired whenever a new element is added to * the bin. Likewise the #GstBin::element-removed signal is fired whenever an * element is removed from the bin. * * ## Notes * * A #GstBin internally intercepts every #GstMessage posted by its children and * implements the following default behaviour for each of them: * * * GST_MESSAGE_EOS: This message is only posted by sinks in the PLAYING * state. If all sinks posted the EOS message, this bin will post and EOS * message upwards. * * * GST_MESSAGE_SEGMENT_START: Just collected and never forwarded upwards. * The messages are used to decide when all elements have completed playback * of their segment. * * * GST_MESSAGE_SEGMENT_DONE: Is posted by #GstBin when all elements that posted * a SEGMENT_START have posted a SEGMENT_DONE. * * * GST_MESSAGE_DURATION_CHANGED: Is posted by an element that detected a change * in the stream duration. The default bin behaviour is to clear any * cached duration values so that the next duration query will perform * a full duration recalculation. The duration change is posted to the * application so that it can refetch the new duration with a duration * query. Note that these messages can be posted before the bin is * prerolled, in which case the duration query might fail. * * * GST_MESSAGE_CLOCK_LOST: This message is posted by an element when it * can no longer provide a clock. The default bin behaviour is to * check if the lost clock was the one provided by the bin. If so and * the bin is currently in the PLAYING state, the message is forwarded to * the bin parent. * This message is also generated when a clock provider is removed from * the bin. If this message is received by the application, it should * PAUSE the pipeline and set it back to PLAYING to force a new clock * distribution. * * * GST_MESSAGE_CLOCK_PROVIDE: This message is generated when an element * can provide a clock. This mostly happens when a new clock * provider is added to the bin. The default behaviour of the bin is to * mark the currently selected clock as dirty, which will perform a clock * recalculation the next time the bin is asked to provide a clock. * This message is never sent tot the application but is forwarded to * the parent of the bin. * * * OTHERS: posted upwards. * * A #GstBin implements the following default behaviour for answering to a * #GstQuery: * * * GST_QUERY_DURATION:If the query has been asked before with the same format * and the bin is a toplevel bin (ie. has no parent), * use the cached previous value. If no previous value was cached, the * query is sent to all sink elements in the bin and the MAXIMUM of all * values is returned. If the bin is a toplevel bin the value is cached. * If no sinks are available in the bin, the query fails. * * * GST_QUERY_POSITION:The query is sent to all sink elements in the bin and the * MAXIMUM of all values is returned. If no sinks are available in the bin, * the query fails. * * * OTHERS:the query is forwarded to all sink elements, the result * of the first sink that answers the query successfully is returned. If no * sink is in the bin, the query fails. * * A #GstBin will by default forward any event sent to it to all sink * (#GST_EVENT_TYPE_DOWNSTREAM) or source (#GST_EVENT_TYPE_UPSTREAM) elements * depending on the event type. * If all the elements return %TRUE, the bin will also return %TRUE, else %FALSE * is returned. If no elements of the required type are in the bin, the event * handler will return %TRUE. */ public class Bin : Element, ChildProxyIF { /** the main Gtk struct */ protected GstBin* gstBin; /** Get the main Gtk struct */ public GstBin* getBinStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBin; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstBin; } protected override void setStruct(GObject* obj) { gstBin = cast(GstBin*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstBin* gstBin, bool ownedRef = false) { this.gstBin = gstBin; super(cast(GstElement*)gstBin, ownedRef); } // add the ChildProxy capabilities mixin ChildProxyT!(GstBin); /** */ public this(Element elem) { super( elem.getElementStruct(), true ); this.gstBin = cast(GstBin*)elem.getElementStruct(); } /** * Adds a list of elements to a bin. * This function is equivalent to calling add() for each member of the list. * The return value of each add() is ignored. */ public void addMany( Element[] elems... ) { foreach( e; elems ) add( e ); } /** * Remove a list of elements from a bin. * This function is equivalent to calling remove() with each member of the list. */ public void removeMany( Element[] elems... ) { foreach( e; elems ) remove( e ); } /** */ /** */ public static GType getType() { return gst_bin_get_type(); } /** * Creates a new bin with the given name. * * Params: * name = the name of the new bin * * Returns: a new #GstBin * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name) { auto p = gst_bin_new(Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstBin*) p); } /** * Adds the given element to the bin. Sets the element's parent, and thus * takes ownership of the element. An element can only be added to one bin. * * If the element's pads are linked to other pads, the pads will be unlinked * before the element is added to the bin. * * > When you add an element to an already-running pipeline, you will have to * > take care to set the state of the newly-added element to the desired * > state (usually PLAYING or PAUSED, same you set the pipeline to originally) * > with gst_element_set_state(), or use gst_element_sync_state_with_parent(). * > The bin or pipeline will not take care of this for you. * * MT safe. * * Params: * element = the #GstElement to add * * Returns: %TRUE if the element could be added, %FALSE if * the bin does not want to accept the element. */ public bool add(Element element) { return gst_bin_add(gstBin, (element is null) ? null : element.getElementStruct()) != 0; } /** * Recursively looks for elements with an unlinked pad of the given * direction within the specified bin and returns an unlinked pad * if one is found, or %NULL otherwise. If a pad is found, the caller * owns a reference to it and should use gst_object_unref() on the * pad when it is not needed any longer. * * Params: * direction = whether to look for an unlinked source or sink pad * * Returns: unlinked pad of the given * direction, %NULL. */ public Pad findUnlinkedPad(GstPadDirection direction) { auto p = gst_bin_find_unlinked_pad(gstBin, direction); if(p is null) { return null; } return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); } /** * Looks for an element inside the bin that implements the given * interface. If such an element is found, it returns the element. * You can cast this element to the given interface afterwards. If you want * all elements that implement the interface, use * gst_bin_iterate_all_by_interface(). This function recurses into child bins. * * MT safe. Caller owns returned reference. * * Params: * iface = the #GType of an interface * * Returns: A #GstElement inside the bin implementing the interface */ public Element getByInterface(GType iface) { auto p = gst_bin_get_by_interface(gstBin, iface); if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); } /** * Gets the element with the given name from a bin. This * function recurses into child bins. * * Returns %NULL if no element with the given name is found in the bin. * * MT safe. Caller owns returned reference. * * Params: * name = the element name to search for * * Returns: the #GstElement with the given * name, or %NULL */ public Element getByName(string name) { auto p = gst_bin_get_by_name(gstBin, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); } /** * Gets the element with the given name from this bin. If the * element is not found, a recursion is performed on the parent bin. * * Returns %NULL if: * - no element with the given name is found in the bin * * MT safe. Caller owns returned reference. * * Params: * name = the element name to search for * * Returns: the #GstElement with the given * name, or %NULL */ public Element getByNameRecurseUp(string name) { auto p = gst_bin_get_by_name_recurse_up(gstBin, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); } /** * Return the suppressed flags of the bin. * * MT safe. * * Returns: the bin's suppressed #GstElementFlags. * * Since: 1.10 */ public GstElementFlags getSuppressedFlags() { return gst_bin_get_suppressed_flags(gstBin); } /** * Looks for all elements inside the bin that implements the given * interface. You can safely cast all returned elements to the given interface. * The function recurses inside child bins. The iterator will yield a series * of #GstElement that should be unreffed after use. * * MT safe. Caller owns returned value. * * Params: * iface = the #GType of an interface * * Returns: a #GstIterator of #GstElement * for all elements in the bin implementing the given interface, * or %NULL */ public Iterator iterateAllByInterface(GType iface) { auto p = gst_bin_iterate_all_by_interface(gstBin, iface); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Gets an iterator for the elements in this bin. * * MT safe. Caller owns returned value. * * Returns: a #GstIterator of #GstElement, * or %NULL */ public Iterator iterateElements() { auto p = gst_bin_iterate_elements(gstBin); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Gets an iterator for the elements in this bin. * This iterator recurses into GstBin children. * * MT safe. Caller owns returned value. * * Returns: a #GstIterator of #GstElement, * or %NULL */ public Iterator iterateRecurse() { auto p = gst_bin_iterate_recurse(gstBin); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Gets an iterator for all elements in the bin that have the * #GST_ELEMENT_FLAG_SINK flag set. * * MT safe. Caller owns returned value. * * Returns: a #GstIterator of #GstElement, * or %NULL */ public Iterator iterateSinks() { auto p = gst_bin_iterate_sinks(gstBin); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Gets an iterator for the elements in this bin in topologically * sorted order. This means that the elements are returned from * the most downstream elements (sinks) to the sources. * * This function is used internally to perform the state changes * of the bin elements and for clock selection. * * MT safe. Caller owns returned value. * * Returns: a #GstIterator of #GstElement, * or %NULL */ public Iterator iterateSorted() { auto p = gst_bin_iterate_sorted(gstBin); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Gets an iterator for all elements in the bin that have the * #GST_ELEMENT_FLAG_SOURCE flag set. * * MT safe. Caller owns returned value. * * Returns: a #GstIterator of #GstElement, * or %NULL */ public Iterator iterateSources() { auto p = gst_bin_iterate_sources(gstBin); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Query @bin for the current latency using and reconfigures this latency to all the * elements with a LATENCY event. * * This method is typically called on the pipeline when a #GST_MESSAGE_LATENCY * is posted on the bus. * * This function simply emits the 'do-latency' signal so any custom latency * calculations will be performed. * * Returns: %TRUE if the latency could be queried and reconfigured. */ public bool recalculateLatency() { return gst_bin_recalculate_latency(gstBin) != 0; } /** * Removes the element from the bin, unparenting it as well. * Unparenting the element means that the element will be dereferenced, * so if the bin holds the only reference to the element, the element * will be freed in the process of removing it from the bin. If you * want the element to still exist after removing, you need to call * gst_object_ref() before removing it from the bin. * * If the element's pads are linked to other pads, the pads will be unlinked * before the element is removed from the bin. * * MT safe. * * Params: * element = the #GstElement to remove * * Returns: %TRUE if the element could be removed, %FALSE if * the bin does not want to remove the element. */ public bool remove(Element element) { return gst_bin_remove(gstBin, (element is null) ? null : element.getElementStruct()) != 0; } /** * Suppress the given flags on the bin. #GstElementFlags of a * child element are propagated when it is added to the bin. * When suppressed flags are set, those specified flags will * not be propagated to the bin. * * MT safe. * * Params: * flags = the #GstElementFlags to suppress * * Since: 1.10 */ public void setSuppressedFlags(GstElementFlags flags) { gst_bin_set_suppressed_flags(gstBin, flags); } /** * Synchronizes the state of every child of @bin with the state * of @bin. See also gst_element_sync_state_with_parent(). * * Returns: %TRUE if syncing the state was successful for all children, * otherwise %FALSE. * * Since: 1.6 */ public bool syncChildrenStates() { return gst_bin_sync_children_states(gstBin) != 0; } protected class OnDeepElementAddedDelegateWrapper { void delegate(Bin, Element, Bin) dlg; gulong handlerId; this(void delegate(Bin, Element, Bin) dlg) { this.dlg = dlg; onDeepElementAddedListeners ~= this; } void remove(OnDeepElementAddedDelegateWrapper source) { foreach(index, wrapper; onDeepElementAddedListeners) { if (wrapper.handlerId == source.handlerId) { onDeepElementAddedListeners[index] = null; onDeepElementAddedListeners = std.algorithm.remove(onDeepElementAddedListeners, index); break; } } } } OnDeepElementAddedDelegateWrapper[] onDeepElementAddedListeners; /** * Will be emitted after the element was added to sub_bin. * * Params: * subBin = the #GstBin the element was added to * element = the #GstElement that was added to @sub_bin * * Since: 1.10 */ gulong addOnDeepElementAdded(void delegate(Bin, Element, Bin) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDeepElementAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "deep-element-added", cast(GCallback)&callBackDeepElementAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackDeepElementAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDeepElementAdded(GstBin* binStruct, GstBin* subBin, GstElement* element, OnDeepElementAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Bin)(subBin), ObjectG.getDObject!(Element)(element), wrapper.outer); } extern(C) static void callBackDeepElementAddedDestroy(OnDeepElementAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDeepElementRemovedDelegateWrapper { void delegate(Bin, Element, Bin) dlg; gulong handlerId; this(void delegate(Bin, Element, Bin) dlg) { this.dlg = dlg; onDeepElementRemovedListeners ~= this; } void remove(OnDeepElementRemovedDelegateWrapper source) { foreach(index, wrapper; onDeepElementRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onDeepElementRemovedListeners[index] = null; onDeepElementRemovedListeners = std.algorithm.remove(onDeepElementRemovedListeners, index); break; } } } } OnDeepElementRemovedDelegateWrapper[] onDeepElementRemovedListeners; /** * Will be emitted after the element was removed from sub_bin. * * Params: * subBin = the #GstBin the element was removed from * element = the #GstElement that was removed from @sub_bin * * Since: 1.10 */ gulong addOnDeepElementRemoved(void delegate(Bin, Element, Bin) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDeepElementRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "deep-element-removed", cast(GCallback)&callBackDeepElementRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackDeepElementRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDeepElementRemoved(GstBin* binStruct, GstBin* subBin, GstElement* element, OnDeepElementRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Bin)(subBin), ObjectG.getDObject!(Element)(element), wrapper.outer); } extern(C) static void callBackDeepElementRemovedDestroy(OnDeepElementRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDoLatencyDelegateWrapper { bool delegate(Bin) dlg; gulong handlerId; this(bool delegate(Bin) dlg) { this.dlg = dlg; onDoLatencyListeners ~= this; } void remove(OnDoLatencyDelegateWrapper source) { foreach(index, wrapper; onDoLatencyListeners) { if (wrapper.handlerId == source.handlerId) { onDoLatencyListeners[index] = null; onDoLatencyListeners = std.algorithm.remove(onDoLatencyListeners, index); break; } } } } OnDoLatencyDelegateWrapper[] onDoLatencyListeners; /** * Will be emitted when the bin needs to perform latency calculations. This * signal is only emitted for toplevel bins or when async-handling is * enabled. * * Only one signal handler is invoked. If no signals are connected, the * default handler is invoked, which will query and distribute the lowest * possible latency to all sinks. * * Connect to this signal if the default latency calculations are not * sufficient, like when you need different latencies for different sinks in * the same pipeline. */ gulong addOnDoLatency(bool delegate(Bin) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDoLatencyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "do-latency", cast(GCallback)&callBackDoLatency, cast(void*)wrapper, cast(GClosureNotify)&callBackDoLatencyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackDoLatency(GstBin* binStruct, OnDoLatencyDelegateWrapper wrapper) { return wrapper.dlg(wrapper.outer); } extern(C) static void callBackDoLatencyDestroy(OnDoLatencyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnElementAddedDelegateWrapper { void delegate(Element, Bin) dlg; gulong handlerId; this(void delegate(Element, Bin) dlg) { this.dlg = dlg; onElementAddedListeners ~= this; } void remove(OnElementAddedDelegateWrapper source) { foreach(index, wrapper; onElementAddedListeners) { if (wrapper.handlerId == source.handlerId) { onElementAddedListeners[index] = null; onElementAddedListeners = std.algorithm.remove(onElementAddedListeners, index); break; } } } } OnElementAddedDelegateWrapper[] onElementAddedListeners; /** * Will be emitted after the element was added to the bin. * * Params: * element = the #GstElement that was added to the bin */ gulong addOnElementAdded(void delegate(Element, Bin) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnElementAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "element-added", cast(GCallback)&callBackElementAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackElementAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackElementAdded(GstBin* binStruct, GstElement* element, OnElementAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Element)(element), wrapper.outer); } extern(C) static void callBackElementAddedDestroy(OnElementAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnElementRemovedDelegateWrapper { void delegate(Element, Bin) dlg; gulong handlerId; this(void delegate(Element, Bin) dlg) { this.dlg = dlg; onElementRemovedListeners ~= this; } void remove(OnElementRemovedDelegateWrapper source) { foreach(index, wrapper; onElementRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onElementRemovedListeners[index] = null; onElementRemovedListeners = std.algorithm.remove(onElementRemovedListeners, index); break; } } } } OnElementRemovedDelegateWrapper[] onElementRemovedListeners; /** * Will be emitted after the element was removed from the bin. * * Params: * element = the #GstElement that was removed from the bin */ gulong addOnElementRemoved(void delegate(Element, Bin) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnElementRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "element-removed", cast(GCallback)&callBackElementRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackElementRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackElementRemoved(GstBin* binStruct, GstElement* element, OnElementRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Element)(element), wrapper.outer); } extern(C) static void callBackElementRemovedDestroy(OnElementRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Bitmask.d000066400000000000000000000023001324604450400220330ustar00rootroot00000000000000/* * 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 gstreamer.Bitmask; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class Bitmask { /** */ public static GType getType() { return gst_bitmask_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Buffer.d000066400000000000000000001007521324604450400216640ustar00rootroot00000000000000/* * 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 gstreamer.Buffer; private import glib.ConstructionException; private import gobject.ObjectG; private import gstreamer.AllocationParams; private import gstreamer.Allocator; private import gstreamer.Memory; private import gstreamer.ParentBufferMeta; private import gstreamer.ProtectionMeta; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Buffers are the basic unit of data transfer in GStreamer. They contain the * timing and offset along with other arbitrary metadata that is associated * with the #GstMemory blocks that the buffer contains. * * Buffers are usually created with gst_buffer_new(). After a buffer has been * created one will typically allocate memory for it and add it to the buffer. * The following example creates a buffer that can hold a given video frame * with a given width, height and bits per plane. * |[ * GstBuffer *buffer; * GstMemory *memory; * gint size, width, height, bpp; * ... * size = width * height * bpp; * buffer = gst_buffer_new (); * memory = gst_allocator_alloc (NULL, size, NULL); * gst_buffer_insert_memory (buffer, -1, memory); * ... * ]| * * Alternatively, use gst_buffer_new_allocate() to create a buffer with * preallocated data of a given size. * * Buffers can contain a list of #GstMemory objects. You can retrieve how many * memory objects with gst_buffer_n_memory() and you can get a pointer * to memory with gst_buffer_peek_memory() * * A buffer will usually have timestamps, and a duration, but neither of these * are guaranteed (they may be set to #GST_CLOCK_TIME_NONE). Whenever a * meaningful value can be given for these, they should be set. The timestamps * and duration are measured in nanoseconds (they are #GstClockTime values). * * The buffer DTS refers to the timestamp when the buffer should be decoded and * is usually monotonically increasing. The buffer PTS refers to the timestamp when * the buffer content should be presented to the user and is not always * monotonically increasing. * * A buffer can also have one or both of a start and an end offset. These are * media-type specific. For video buffers, the start offset will generally be * the frame number. For audio buffers, it will be the number of samples * produced so far. For compressed data, it could be the byte offset in a * source or destination file. Likewise, the end offset will be the offset of * the end of the buffer. These can only be meaningfully interpreted if you * know the media type of the buffer (the preceding CAPS event). Either or both * can be set to #GST_BUFFER_OFFSET_NONE. * * gst_buffer_ref() is used to increase the refcount of a buffer. This must be * done when you want to keep a handle to the buffer after pushing it to the * next element. The buffer refcount determines the writability of the buffer, a * buffer is only writable when the refcount is exactly 1, i.e. when the caller * has the only reference to the buffer. * * To efficiently create a smaller buffer out of an existing one, you can * use gst_buffer_copy_region(). This method tries to share the memory objects * between the two buffers. * * If a plug-in wants to modify the buffer data or metadata in-place, it should * first obtain a buffer that is safe to modify by using * gst_buffer_make_writable(). This function is optimized so that a copy will * only be made when it is necessary. * * Several flags of the buffer can be set and unset with the * GST_BUFFER_FLAG_SET() and GST_BUFFER_FLAG_UNSET() macros. Use * GST_BUFFER_FLAG_IS_SET() to test if a certain #GstBufferFlags flag is set. * * Buffers can be efficiently merged into a larger buffer with * gst_buffer_append(). Copying of memory will only be done when absolutely * needed. * * Arbitrary extra metadata can be set on a buffer with gst_buffer_add_meta(). * Metadata can be retrieved with gst_buffer_get_meta(). See also #GstMeta * * An element should either unref the buffer or push it out on a src pad * using gst_pad_push() (see #GstPad). * * Buffers are usually freed by unreffing them with gst_buffer_unref(). When * the refcount drops to 0, any memory and metadata pointed to by the buffer is * unreffed as well. Buffers allocated from a #GstBufferPool will be returned to * the pool when the refcount drops to 0. * * The #GstParentBufferMeta is a meta which can be attached to a #GstBuffer * to hold a reference to another buffer that is only released when the child * #GstBuffer is released. * * Typically, #GstParentBufferMeta is used when the child buffer is directly * using the #GstMemory of the parent buffer, and wants to prevent the parent * buffer from being returned to a buffer pool until the #GstMemory is available * for re-use. (Since 1.6) */ public class Buffer { /** the main Gtk struct */ protected GstBuffer* gstBuffer; protected bool ownedRef; /** Get the main Gtk struct */ public GstBuffer* getBufferStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBuffer; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstBuffer; } /** * Sets our main struct and passes it to the parent class. */ public this (GstBuffer* gstBuffer, bool ownedRef = false) { this.gstBuffer = gstBuffer; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_buffer_get_type(); } /** * Creates a newly allocated buffer without any data. * * MT safe. * * Returns: the new #GstBuffer. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_buffer_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstBuffer*) p); } /** * Tries to create a newly allocated buffer with data of the given size and * extra parameters from @allocator. If the requested amount of memory can't be * allocated, %NULL will be returned. The allocated buffer memory is not cleared. * * When @allocator is %NULL, the default memory allocator will be used. * * Note that when @size == 0, the buffer will not have memory associated with it. * * MT safe. * * Params: * allocator = the #GstAllocator to use, or %NULL to use the * default allocator * size = the size in bytes of the new buffer's data. * params = optional parameters * * Returns: a new #GstBuffer, or %NULL if * the memory couldn't be allocated. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Allocator allocator, size_t size, AllocationParams params) { auto p = gst_buffer_new_allocate((allocator is null) ? null : allocator.getAllocatorStruct(), size, (params is null) ? null : params.getAllocationParamsStruct()); if(p is null) { throw new ConstructionException("null returned by new_allocate"); } this(cast(GstBuffer*) p); } /** * Creates a new buffer that wraps the given @data. The memory will be freed * with g_free and will be marked writable. * * MT safe. * * Params: * data = data to wrap * * Returns: a new #GstBuffer * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] data) { auto p = gst_buffer_new_wrapped(data.ptr, cast(size_t)data.length); if(p is null) { throw new ConstructionException("null returned by new_wrapped"); } this(cast(GstBuffer*) p); } /** * Allocate a new buffer that wraps the given memory. @data must point to * @maxsize of memory, the wrapped buffer will have the region from @offset and * @size visible. * * When the buffer is destroyed, @notify will be called with @user_data. * * The prefix/padding must be filled with 0 if @flags contains * #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. * * Params: * flags = #GstMemoryFlags * data = data to wrap * maxsize = allocated size of @data * offset = offset in @data * userData = user_data * notify = called with @user_data when the memory is freed * * Returns: a new #GstBuffer * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstMemoryFlags flags, ubyte[] data, size_t maxsize, size_t offset, void* userData, GDestroyNotify notify) { auto p = gst_buffer_new_wrapped_full(flags, data.ptr, maxsize, offset, cast(size_t)data.length, userData, notify); if(p is null) { throw new ConstructionException("null returned by new_wrapped_full"); } this(cast(GstBuffer*) p); } /** * Add metadata for @info to @buffer using the parameters in @params. * * Params: * info = a #GstMetaInfo * params = params for @info * * Returns: the metadata for the api in @info on @buffer. */ public GstMeta* addMeta(GstMetaInfo* info, void* params) { return gst_buffer_add_meta(gstBuffer, info, params); } /** * Add a #GstParentBufferMeta to @buffer that holds a reference on * @ref until the buffer is freed. * * Params: * doref = a #GstBuffer to ref * * Returns: The #GstParentBufferMeta that was added to the buffer * * Since: 1.6 */ public ParentBufferMeta addParentBufferMeta(Buffer doref) { auto p = gst_buffer_add_parent_buffer_meta(gstBuffer, (doref is null) ? null : doref.getBufferStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ParentBufferMeta)(cast(GstParentBufferMeta*) p); } /** * Attaches protection metadata to a #GstBuffer. * * Params: * info = a #GstStructure holding cryptographic * information relating to the sample contained in @buffer. This * function takes ownership of @info. * * Returns: a pointer to the added #GstProtectionMeta if successful; %NULL if * unsuccessful. * * Since: 1.6 */ public ProtectionMeta addProtectionMeta(Structure info) { auto p = gst_buffer_add_protection_meta(gstBuffer, (info is null) ? null : info.getStructureStruct(true)); if(p is null) { return null; } return ObjectG.getDObject!(ProtectionMeta)(cast(GstProtectionMeta*) p); } /** * Append all the memory from @buf2 to @buf1. The result buffer will contain a * concatenation of the memory of @buf1 and @buf2. * * Params: * buf2 = the second source #GstBuffer to append. * * Returns: the new #GstBuffer that contains the memory * of the two source buffers. */ public Buffer append(Buffer buf2) { auto p = gst_buffer_append(gstBuffer, (buf2 is null) ? null : buf2.getBufferStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Append the memory block @mem to @buffer. This function takes * ownership of @mem and thus doesn't increase its refcount. * * This function is identical to gst_buffer_insert_memory() with an index of -1. * See gst_buffer_insert_memory() for more details. * * Params: * mem = a #GstMemory. */ public void appendMemory(Memory mem) { gst_buffer_append_memory(gstBuffer, (mem is null) ? null : mem.getMemoryStruct()); } /** * Append @size bytes at @offset from @buf2 to @buf1. The result buffer will * contain a concatenation of the memory of @buf1 and the requested region of * @buf2. * * Params: * buf2 = the second source #GstBuffer to append. * offset = the offset in @buf2 * size = the size or -1 of @buf2 * * Returns: the new #GstBuffer that contains the memory * of the two source buffers. */ public Buffer appendRegion(Buffer buf2, ptrdiff_t offset, ptrdiff_t size) { auto p = gst_buffer_append_region(gstBuffer, (buf2 is null) ? null : buf2.getBufferStruct(), offset, size); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Create a copy of the given buffer. This will make a newly allocated * copy of the data the source buffer contains. * * Returns: a new copy of @buf. * * Since: 1.6 */ public Buffer copyDeep() { auto p = gst_buffer_copy_deep(gstBuffer); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Copies the information from @src into @dest. * * If @dest already contains memory and @flags contains GST_BUFFER_COPY_MEMORY, * the memory from @src will be appended to @dest. * * @flags indicate which fields will be copied. * * Params: * src = a source #GstBuffer * flags = flags indicating what metadata fields should be copied. * offset = offset to copy from * size = total size to copy. If -1, all data is copied. * * Returns: %TRUE if the copying succeeded, %FALSE otherwise. */ public bool copyInto(Buffer src, GstBufferCopyFlags flags, size_t offset, size_t size) { return gst_buffer_copy_into(gstBuffer, (src is null) ? null : src.getBufferStruct(), flags, offset, size) != 0; } /** * Creates a sub-buffer from @parent at @offset and @size. * This sub-buffer uses the actual memory space of the parent buffer. * This function will copy the offset and timestamp fields when the * offset is 0. If not, they will be set to #GST_CLOCK_TIME_NONE and * #GST_BUFFER_OFFSET_NONE. * If @offset equals 0 and @size equals the total size of @buffer, the * duration and offset end fields are also copied. If not they will be set * to #GST_CLOCK_TIME_NONE and #GST_BUFFER_OFFSET_NONE. * * MT safe. * * Params: * flags = the #GstBufferCopyFlags * offset = the offset into parent #GstBuffer at which the new sub-buffer * begins. * size = the size of the new #GstBuffer sub-buffer, in bytes. If -1, all * data is copied. * * Returns: the new #GstBuffer or %NULL if the arguments were * invalid. */ public Buffer copyRegion(GstBufferCopyFlags flags, size_t offset, size_t size) { auto p = gst_buffer_copy_region(gstBuffer, flags, offset, size); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p, true); } /** * Copy @size bytes starting from @offset in @buffer to @dest. * * Params: * offset = the offset to extract * dest = the destination address * size = the size to extract * * Returns: The amount of bytes extracted. This value can be lower than @size * when @buffer did not contain enough data. */ public size_t extract(size_t offset, void* dest, size_t size) { return gst_buffer_extract(gstBuffer, offset, dest, size); } /** * Extracts a copy of at most @size bytes the data at @offset into * newly-allocated memory. @dest must be freed using g_free() when done. * * Params: * offset = the offset to extract * size = the size to extract * dest = A pointer where * the destination array will be written. * * Since: 1.0.10 */ public void extractDup(size_t offset, size_t size, out ubyte[] dest) { ubyte* outdest = null; size_t destSize; gst_buffer_extract_dup(gstBuffer, offset, size, cast(void**)&outdest, &destSize); dest = outdest[0 .. destSize]; } /** * Copy @size bytes from @src to @buffer at @offset. * * Params: * offset = the offset to fill * src = the source address * * Returns: The amount of bytes copied. This value can be lower than @size * when @buffer did not contain enough data. */ public size_t fill(size_t offset, ubyte[] src) { return gst_buffer_fill(gstBuffer, offset, src.ptr, cast(size_t)src.length); } /** * Find the memory blocks that span @size bytes starting from @offset * in @buffer. * * When this function returns %TRUE, @idx will contain the index of the first * memory block where the byte for @offset can be found and @length contains the * number of memory blocks containing the @size remaining bytes. @skip contains * the number of bytes to skip in the memory block at @idx to get to the byte * for @offset. * * @size can be -1 to get all the memory blocks after @idx. * * Params: * offset = an offset * size = a size * idx = pointer to index * length = pointer to length * skip = pointer to skip * * Returns: %TRUE when @size bytes starting from @offset could be found in * @buffer and @idx, @length and @skip will be filled. */ public bool findMemory(size_t offset, size_t size, out uint idx, out uint length, out size_t skip) { return gst_buffer_find_memory(gstBuffer, offset, size, &idx, &length, &skip) != 0; } /** * Call @func with @user_data for each meta in @buffer. * * @func can modify the passed meta pointer or its contents. The return value * of @func define if this function returns or if the remaining metadata items * in the buffer should be skipped. * * Params: * func = a #GstBufferForeachMetaFunc to call * userData = user data passed to @func * * Returns: %FALSE when @func returned %FALSE for one of the metadata. */ public bool foreachMeta(GstBufferForeachMetaFunc func, void* userData) { return gst_buffer_foreach_meta(gstBuffer, func, userData) != 0; } /** * Get all the memory block in @buffer. The memory blocks will be merged * into one large #GstMemory. * * Returns: a #GstMemory that contains the merged memory. * Use gst_memory_unref () after usage. */ public Memory getAllMemory() { auto p = gst_buffer_get_all_memory(gstBuffer); if(p is null) { return null; } return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); } /** * Get the #GstBufferFlags flags set on this buffer. * * Returns: the flags set on this buffer. * * Since: 1.10 */ public GstBufferFlags getFlags() { return gst_buffer_get_flags(gstBuffer); } /** * Get the memory block at index @idx in @buffer. * * Params: * idx = an index * * Returns: a #GstMemory that contains the data of the * memory block at @idx. Use gst_memory_unref () after usage. */ public Memory getMemory(uint idx) { auto p = gst_buffer_get_memory(gstBuffer, idx); if(p is null) { return null; } return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); } /** * Get @length memory blocks in @buffer starting at @idx. The memory blocks will * be merged into one large #GstMemory. * * If @length is -1, all memory starting from @idx is merged. * * Params: * idx = an index * length = a length * * Returns: a #GstMemory that contains the merged data of @length * blocks starting at @idx. Use gst_memory_unref () after usage. */ public Memory getMemoryRange(uint idx, int length) { auto p = gst_buffer_get_memory_range(gstBuffer, idx, length); if(p is null) { return null; } return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); } /** * Get the metadata for @api on buffer. When there is no such metadata, %NULL is * returned. If multiple metadata with the given @api are attached to this * buffer only the first one is returned. To handle multiple metadata with a * given API use gst_buffer_iterate_meta() or gst_buffer_foreach_meta() instead * and check the meta->info.api member for the API type. * * Params: * api = the #GType of an API * * Returns: the metadata for @api on * @buffer. */ public GstMeta* getMeta(GType api) { return gst_buffer_get_meta(gstBuffer, api); } /** * Get the total size of the memory blocks in @buffer. * * Returns: total size of the memory blocks in @buffer. */ public size_t getSize() { return gst_buffer_get_size(gstBuffer); } /** * Get the total size of the memory blocks in @b. * * When not %NULL, @offset will contain the offset of the data in the * first memory block in @buffer and @maxsize will contain the sum of * the size and @offset and the amount of extra padding on the last * memory block. @offset and @maxsize can be used to resize the * buffer memory blocks with gst_buffer_resize(). * * Params: * offset = a pointer to the offset * maxsize = a pointer to the maxsize * * Returns: total size of the memory blocks in @buffer. */ public size_t getSizes(out size_t offset, out size_t maxsize) { return gst_buffer_get_sizes(gstBuffer, &offset, &maxsize); } /** * Get the total size of @length memory blocks stating from @idx in @buffer. * * When not %NULL, @offset will contain the offset of the data in the * memory block in @buffer at @idx and @maxsize will contain the sum of the size * and @offset and the amount of extra padding on the memory block at @idx + * @length -1. * @offset and @maxsize can be used to resize the buffer memory blocks with * gst_buffer_resize_range(). * * Params: * idx = an index * length = a length * offset = a pointer to the offset * maxsize = a pointer to the maxsize * * Returns: total size of @length memory blocks starting at @idx in @buffer. */ public size_t getSizesRange(uint idx, int length, out size_t offset, out size_t maxsize) { return gst_buffer_get_sizes_range(gstBuffer, idx, length, &offset, &maxsize); } /** */ public bool hasFlags(GstBufferFlags flags) { return gst_buffer_has_flags(gstBuffer, flags) != 0; } /** * Insert the memory block @mem to @buffer at @idx. This function takes ownership * of @mem and thus doesn't increase its refcount. * * Only gst_buffer_get_max_memory() can be added to a buffer. If more memory is * added, existing memory blocks will automatically be merged to make room for * the new memory. * * Params: * idx = the index to add the memory at, or -1 to append it to the end * mem = a #GstMemory. */ public void insertMemory(int idx, Memory mem) { gst_buffer_insert_memory(gstBuffer, idx, (mem is null) ? null : mem.getMemoryStruct()); } /** * Check if all memory blocks in @buffer are writable. * * Note that this function does not check if @buffer is writable, use * gst_buffer_is_writable() to check that if needed. * * Returns: %TRUE if all memory blocks in @buffer are writable * * Since: 1.4 */ public bool isAllMemoryWritable() { return gst_buffer_is_all_memory_writable(gstBuffer) != 0; } /** * Check if @length memory blocks in @buffer starting from @idx are writable. * * @length can be -1 to check all the memory blocks after @idx. * * Note that this function does not check if @buffer is writable, use * gst_buffer_is_writable() to check that if needed. * * Params: * idx = an index * length = a length should not be 0 * * Returns: %TRUE if the memory range is writable * * Since: 1.4 */ public bool isMemoryRangeWritable(uint idx, int length) { return gst_buffer_is_memory_range_writable(gstBuffer, idx, length) != 0; } /** * Retrieve the next #GstMeta after @current. If @state points * to %NULL, the first metadata is returned. * * @state will be updated with an opaque state pointer * * Params: * state = an opaque state pointer * * Returns: The next #GstMeta or %NULL * when there are no more items. */ public GstMeta* iterateMeta(void** state) { return gst_buffer_iterate_meta(gstBuffer, state); } /** * Retrieve the next #GstMeta of type @meta_api_type after the current one * according to @state. If @state points to %NULL, the first metadata of * type @meta_api_type is returned. * * @state will be updated with an opaque state pointer * * Params: * state = an opaque state pointer * metaApiType = only return #GstMeta of this type * * Returns: The next #GstMeta of type * @meta_api_type or %NULL when there are no more items. * * Since: 1.12 */ public GstMeta* iterateMetaFiltered(void** state, GType metaApiType) { return gst_buffer_iterate_meta_filtered(gstBuffer, state, metaApiType); } /** * This function fills @info with the #GstMapInfo of all merged memory * blocks in @buffer. * * @flags describe the desired access of the memory. When @flags is * #GST_MAP_WRITE, @buffer should be writable (as returned from * gst_buffer_is_writable()). * * When @buffer is writable but the memory isn't, a writable copy will * automatically be created and returned. The readonly copy of the * buffer memory will then also be replaced with this writable copy. * * The memory in @info should be unmapped with gst_buffer_unmap() after * usage. * * Params: * info = info about the mapping * flags = flags for the mapping * * Returns: %TRUE if the map succeeded and @info contains valid data. */ public bool map(out GstMapInfo info, GstMapFlags flags) { return gst_buffer_map(gstBuffer, &info, flags) != 0; } /** * This function fills @info with the #GstMapInfo of @length merged memory blocks * starting at @idx in @buffer. When @length is -1, all memory blocks starting * from @idx are merged and mapped. * * @flags describe the desired access of the memory. When @flags is * #GST_MAP_WRITE, @buffer should be writable (as returned from * gst_buffer_is_writable()). * * When @buffer is writable but the memory isn't, a writable copy will * automatically be created and returned. The readonly copy of the buffer memory * will then also be replaced with this writable copy. * * The memory in @info should be unmapped with gst_buffer_unmap() after usage. * * Params: * idx = an index * length = a length * info = info about the mapping * flags = flags for the mapping * * Returns: %TRUE if the map succeeded and @info contains valid * data. */ public bool mapRange(uint idx, int length, out GstMapInfo info, GstMapFlags flags) { return gst_buffer_map_range(gstBuffer, idx, length, &info, flags) != 0; } /** * Compare @size bytes starting from @offset in @buffer with the memory in @mem. * * Params: * offset = the offset in @buffer * mem = the memory to compare * * Returns: 0 if the memory is equal. */ public int memcmp(size_t offset, ubyte[] mem) { return gst_buffer_memcmp(gstBuffer, offset, mem.ptr, cast(size_t)mem.length); } /** * Fill @buf with @size bytes with @val starting from @offset. * * Params: * offset = the offset in @buffer * val = the value to set * size = the size to set * * Returns: The amount of bytes filled. This value can be lower than @size * when @buffer did not contain enough data. */ public size_t memset(size_t offset, ubyte val, size_t size) { return gst_buffer_memset(gstBuffer, offset, val, size); } /** * Get the amount of memory blocks that this buffer has. This amount is never * larger than what gst_buffer_get_max_memory() returns. * * Returns: the number of memory blocks this buffer is made of. */ public uint nMemory() { return gst_buffer_n_memory(gstBuffer); } /** * Get the memory block at @idx in @buffer. The memory block stays valid until * the memory block in @buffer is removed, replaced or merged, typically with * any call that modifies the memory in @buffer. * * Params: * idx = an index * * Returns: the #GstMemory at @idx. */ public Memory peekMemory(uint idx) { auto p = gst_buffer_peek_memory(gstBuffer, idx); if(p is null) { return null; } return ObjectG.getDObject!(Memory)(cast(GstMemory*) p); } /** * Prepend the memory block @mem to @buffer. This function takes * ownership of @mem and thus doesn't increase its refcount. * * This function is identical to gst_buffer_insert_memory() with an index of 0. * See gst_buffer_insert_memory() for more details. * * Params: * mem = a #GstMemory. */ public void prependMemory(Memory mem) { gst_buffer_prepend_memory(gstBuffer, (mem is null) ? null : mem.getMemoryStruct()); } /** * Remove all the memory blocks in @buffer. */ public void removeAllMemory() { gst_buffer_remove_all_memory(gstBuffer); } /** * Remove the memory block in @b at index @i. * * Params: * idx = an index */ public void removeMemory(uint idx) { gst_buffer_remove_memory(gstBuffer, idx); } /** * Remove @length memory blocks in @buffer starting from @idx. * * @length can be -1, in which case all memory starting from @idx is removed. * * Params: * idx = an index * length = a length */ public void removeMemoryRange(uint idx, int length) { gst_buffer_remove_memory_range(gstBuffer, idx, length); } /** * Remove the metadata for @meta on @buffer. * * Params: * meta = a #GstMeta * * Returns: %TRUE if the metadata existed and was removed, %FALSE if no such * metadata was on @buffer. */ public bool removeMeta(GstMeta* meta) { return gst_buffer_remove_meta(gstBuffer, meta) != 0; } /** * Replaces all memory in @buffer with @mem. * * Params: * mem = a #GstMemory */ public void replaceAllMemory(Memory mem) { gst_buffer_replace_all_memory(gstBuffer, (mem is null) ? null : mem.getMemoryStruct()); } /** * Replaces the memory block at index @idx in @buffer with @mem. * * Params: * idx = an index * mem = a #GstMemory */ public void replaceMemory(uint idx, Memory mem) { gst_buffer_replace_memory(gstBuffer, idx, (mem is null) ? null : mem.getMemoryStruct()); } /** * Replaces @length memory blocks in @buffer starting at @idx with @mem. * * If @length is -1, all memory starting from @idx will be removed and * replaced with @mem. * * @buffer should be writable. * * Params: * idx = an index * length = a length should not be 0 * mem = a #GstMemory */ public void replaceMemoryRange(uint idx, int length, Memory mem) { gst_buffer_replace_memory_range(gstBuffer, idx, length, (mem is null) ? null : mem.getMemoryStruct()); } /** * Set the offset and total size of the memory blocks in @buffer. * * Params: * offset = the offset adjustment * size = the new size or -1 to just adjust the offset */ public void resize(ptrdiff_t offset, ptrdiff_t size) { gst_buffer_resize(gstBuffer, offset, size); } /** * Set the total size of the @length memory blocks starting at @idx in * @buffer * * Params: * idx = an index * length = a length * offset = the offset adjustment * size = the new size or -1 to just adjust the offset * * Returns: %TRUE if resizing succeeded, %FALSE otherwise. */ public bool resizeRange(uint idx, int length, ptrdiff_t offset, ptrdiff_t size) { return gst_buffer_resize_range(gstBuffer, idx, length, offset, size) != 0; } /** * Sets one or more buffer flags on a buffer. * * Params: * flags = the #GstBufferFlags to set. * * Returns: %TRUE if @flags were successfully set on buffer. * * Since: 1.10 */ public bool setFlags(GstBufferFlags flags) { return gst_buffer_set_flags(gstBuffer, flags) != 0; } /** * Set the total size of the memory blocks in @buffer. * * Params: * size = the new size */ public void setSize(ptrdiff_t size) { gst_buffer_set_size(gstBuffer, size); } /** * Release the memory previously mapped with gst_buffer_map(). * * Params: * info = a #GstMapInfo */ public void unmap(GstMapInfo* info) { gst_buffer_unmap(gstBuffer, info); } /** * Clears one or more buffer flags. * * Params: * flags = the #GstBufferFlags to clear * * Returns: true if @flags is successfully cleared from buffer. * * Since: 1.10 */ public bool unsetFlags(GstBufferFlags flags) { return gst_buffer_unset_flags(gstBuffer, flags) != 0; } /** * Get the maximum amount of memory blocks that a buffer can hold. This is a * compile time constant that can be queried with the function. * * When more memory blocks are added, existing memory blocks will be merged * together to make room for the new block. * * Returns: the maximum amount of memory blocks that a buffer can hold. * * Since: 1.2 */ public static uint getMaxMemory() { return gst_buffer_get_max_memory(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/BufferList.d000066400000000000000000000133511324604450400225160ustar00rootroot00000000000000/* * 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 gstreamer.BufferList; private import glib.ConstructionException; private import gobject.ObjectG; private import gstreamer.Buffer; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Buffer lists are an object containing a list of buffers. * * Buffer lists are created with gst_buffer_list_new() and filled with data * using a gst_buffer_list_insert(). * * Buffer lists can be pushed on a srcpad with gst_pad_push_list(). This is * interesting when multiple buffers need to be pushed in one go because it * can reduce the amount of overhead for pushing each buffer individually. */ public class BufferList { /** the main Gtk struct */ protected GstBufferList* gstBufferList; protected bool ownedRef; /** Get the main Gtk struct */ public GstBufferList* getBufferListStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBufferList; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstBufferList; } /** * Sets our main struct and passes it to the parent class. */ public this (GstBufferList* gstBufferList, bool ownedRef = false) { this.gstBufferList = gstBufferList; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_buffer_list_get_type(); } /** * Creates a new, empty #GstBufferList. The caller is responsible for unreffing * the returned #GstBufferList. * * Free-function: gst_buffer_list_unref * * Returns: the new #GstBufferList. gst_buffer_list_unref() * after usage. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_buffer_list_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstBufferList*) p); } /** * Creates a new, empty #GstBufferList. The caller is responsible for unreffing * the returned #GstBufferList. The list will have @size space preallocated so * that memory reallocations can be avoided. * * Free-function: gst_buffer_list_unref * * Params: * size = an initial reserved size * * Returns: the new #GstBufferList. gst_buffer_list_unref() * after usage. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint size) { auto p = gst_buffer_list_new_sized(size); if(p is null) { throw new ConstructionException("null returned by new_sized"); } this(cast(GstBufferList*) p); } /** * Create a copy of the given buffer list. This will make a newly allocated * copy of the buffer that the source buffer list contains. * * Returns: a new copy of @list. * * Since: 1.6 */ public BufferList copyDeep() { auto p = gst_buffer_list_copy_deep(gstBufferList); if(p is null) { return null; } return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p, true); } /** * Call @func with @data for each buffer in @list. * * @func can modify the passed buffer pointer or its contents. The return value * of @func define if this function returns or if the remaining buffers in * the list should be skipped. * * Params: * func = a #GstBufferListFunc to call * userData = user data passed to @func * * Returns: %TRUE when @func returned %TRUE for each buffer in @list or when * @list is empty. */ public bool foreac(GstBufferListFunc func, void* userData) { return gst_buffer_list_foreach(gstBufferList, func, userData) != 0; } /** * Get the buffer at @idx. * * Params: * idx = the index * * Returns: the buffer at @idx in @group * or %NULL when there is no buffer. The buffer remains valid as * long as @list is valid and buffer is not removed from the list. */ public Buffer get(uint idx) { auto p = gst_buffer_list_get(gstBufferList, idx); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p); } /** * Insert @buffer at @idx in @list. Other buffers are moved to make room for * this new buffer. * * A -1 value for @idx will append the buffer at the end. * * Params: * idx = the index * buffer = a #GstBuffer */ public void insert(int idx, Buffer buffer) { gst_buffer_list_insert(gstBufferList, idx, (buffer is null) ? null : buffer.getBufferStruct()); } /** * Returns the number of buffers in @list. * * Returns: the number of buffers in the buffer list */ public uint length() { return gst_buffer_list_length(gstBufferList); } /** * Remove @length buffers starting from @idx in @list. The following buffers * are moved to close the gap. * * Params: * idx = the index * length = the amount to remove */ public void remove(uint idx, uint length) { gst_buffer_list_remove(gstBufferList, idx, length); } } GtkD-3.7.5/generated/gstreamer/gstreamer/BufferPool.d000066400000000000000000000367201324604450400225210ustar00rootroot00000000000000/* * 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 gstreamer.BufferPool; private import glib.ConstructionException; private import glib.MemorySlice; private import glib.Str; private import gobject.ObjectG; private import gstreamer.AllocationParams; private import gstreamer.Allocator; private import gstreamer.Buffer; private import gstreamer.Caps; private import gstreamer.ObjectGst; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * A #GstBufferPool is an object that can be used to pre-allocate and recycle * buffers of the same size and with the same properties. * * A #GstBufferPool is created with gst_buffer_pool_new(). * * Once a pool is created, it needs to be configured. A call to * gst_buffer_pool_get_config() returns the current configuration structure from * the pool. With gst_buffer_pool_config_set_params() and * gst_buffer_pool_config_set_allocator() the bufferpool parameters and * allocator can be configured. Other properties can be configured in the pool * depending on the pool implementation. * * A bufferpool can have extra options that can be enabled with * gst_buffer_pool_config_add_option(). The available options can be retrieved * with gst_buffer_pool_get_options(). Some options allow for additional * configuration properties to be set. * * After the configuration structure has been configured, * gst_buffer_pool_set_config() updates the configuration in the pool. This can * fail when the configuration structure is not accepted. * * After the a pool has been configured, it can be activated with * gst_buffer_pool_set_active(). This will preallocate the configured resources * in the pool. * * When the pool is active, gst_buffer_pool_acquire_buffer() can be used to * retrieve a buffer from the pool. * * Buffers allocated from a bufferpool will automatically be returned to the * pool with gst_buffer_pool_release_buffer() when their refcount drops to 0. * * The bufferpool can be deactivated again with gst_buffer_pool_set_active(). * All further gst_buffer_pool_acquire_buffer() calls will return an error. When * all buffers are returned to the pool they will be freed. * * Use gst_object_unref() to release the reference to a bufferpool. If the * refcount of the pool reaches 0, the pool will be freed. */ public class BufferPool : ObjectGst { /** the main Gtk struct */ protected GstBufferPool* gstBufferPool; /** Get the main Gtk struct */ public GstBufferPool* getBufferPoolStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBufferPool; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstBufferPool; } protected override void setStruct(GObject* obj) { gstBufferPool = cast(GstBufferPool*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstBufferPool* gstBufferPool, bool ownedRef = false) { this.gstBufferPool = gstBufferPool; super(cast(GstObject*)gstBufferPool, ownedRef); } /** */ public static GType getType() { return gst_buffer_pool_get_type(); } /** * Creates a new #GstBufferPool instance. * * Returns: a new #GstBufferPool instance * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_buffer_pool_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstBufferPool*) p); } /** * Enabled the option in @config. This will instruct the @bufferpool to enable * the specified option on the buffers that it allocates. * * The supported options by @pool can be retrieved with gst_buffer_pool_get_options(). * * Params: * config = a #GstBufferPool configuration * option = an option to add */ public static void configAddOption(Structure config, string option) { gst_buffer_pool_config_add_option((config is null) ? null : config.getStructureStruct(), Str.toStringz(option)); } /** * Get the @allocator and @params from @config. * * Params: * config = a #GstBufferPool configuration * allocator = a #GstAllocator, or %NULL * params = #GstAllocationParams, or %NULL * * Returns: %TRUE, if the values are set. */ public static bool configGetAllocator(Structure config, ref Allocator allocator, out AllocationParams params) { GstAllocator* outallocator = allocator.getAllocatorStruct(); GstAllocationParams* outparams = sliceNew!GstAllocationParams(); auto p = gst_buffer_pool_config_get_allocator((config is null) ? null : config.getStructureStruct(), &outallocator, outparams) != 0; allocator = ObjectG.getDObject!(Allocator)(outallocator); params = ObjectG.getDObject!(AllocationParams)(outparams, true); return p; } /** * Parse an available @config and get the option at @index of the options API * array. * * Params: * config = a #GstBufferPool configuration * index = position in the option array to read * * Returns: a #gchar of the option at @index. */ public static string configGetOption(Structure config, uint index) { return Str.toString(gst_buffer_pool_config_get_option((config is null) ? null : config.getStructureStruct(), index)); } /** * Get the configuration values from @config. * * Params: * config = a #GstBufferPool configuration * caps = the caps of buffers * size = the size of each buffer, not including prefix and padding * minBuffers = the minimum amount of buffers to allocate. * maxBuffers = the maximum amount of buffers to allocate or 0 for unlimited. * * Returns: %TRUE if all parameters could be fetched. */ public static bool configGetParams(Structure config, out Caps caps, out uint size, out uint minBuffers, out uint maxBuffers) { GstCaps* outcaps = null; auto p = gst_buffer_pool_config_get_params((config is null) ? null : config.getStructureStruct(), &outcaps, &size, &minBuffers, &maxBuffers) != 0; caps = ObjectG.getDObject!(Caps)(outcaps); return p; } /** * Check if @config contains @option. * * Params: * config = a #GstBufferPool configuration * option = an option * * Returns: %TRUE if the options array contains @option. */ public static bool configHasOption(Structure config, string option) { return gst_buffer_pool_config_has_option((config is null) ? null : config.getStructureStruct(), Str.toStringz(option)) != 0; } /** * Retrieve the number of values currently stored in the options array of the * @config structure. * * Params: * config = a #GstBufferPool configuration * * Returns: the options array size as a #guint. */ public static uint configNOptions(Structure config) { return gst_buffer_pool_config_n_options((config is null) ? null : config.getStructureStruct()); } /** * Set the @allocator and @params on @config. * * One of @allocator and @params can be %NULL, but not both. When @allocator * is %NULL, the default allocator of the pool will use the values in @param * to perform its allocation. When @param is %NULL, the pool will use the * provided @allocator with its default #GstAllocationParams. * * A call to gst_buffer_pool_set_config() can update the allocator and params * with the values that it is able to do. Some pools are, for example, not able * to operate with different allocators or cannot allocate with the values * specified in @params. Use gst_buffer_pool_get_config() to get the currently * used values. * * Params: * config = a #GstBufferPool configuration * allocator = a #GstAllocator * params = #GstAllocationParams */ public static void configSetAllocator(Structure config, Allocator allocator, AllocationParams params) { gst_buffer_pool_config_set_allocator((config is null) ? null : config.getStructureStruct(), (allocator is null) ? null : allocator.getAllocatorStruct(), (params is null) ? null : params.getAllocationParamsStruct()); } /** * Configure @config with the given parameters. * * Params: * config = a #GstBufferPool configuration * caps = caps for the buffers * size = the size of each buffer, not including prefix and padding * minBuffers = the minimum amount of buffers to allocate. * maxBuffers = the maximum amount of buffers to allocate or 0 for unlimited. */ public static void configSetParams(Structure config, Caps caps, uint size, uint minBuffers, uint maxBuffers) { gst_buffer_pool_config_set_params((config is null) ? null : config.getStructureStruct(), (caps is null) ? null : caps.getCapsStruct(), size, minBuffers, maxBuffers); } /** * Validate that changes made to @config are still valid in the context of the * expected parameters. This function is a helper that can be used to validate * changes made by a pool to a config when gst_buffer_pool_set_config() * returns %FALSE. This expects that @caps haven't changed and that * @min_buffers aren't lower then what we initially expected. * This does not check if options or allocator parameters are still valid, * won't check if size have changed, since changing the size is valid to adapt * padding. * * Params: * config = a #GstBufferPool configuration * caps = the excepted caps of buffers * size = the expected size of each buffer, not including prefix and padding * minBuffers = the expected minimum amount of buffers to allocate. * maxBuffers = the expect maximum amount of buffers to allocate or 0 for unlimited. * * Returns: %TRUE, if the parameters are valid in this context. * * Since: 1.4 */ public static bool configValidateParams(Structure config, Caps caps, uint size, uint minBuffers, uint maxBuffers) { return gst_buffer_pool_config_validate_params((config is null) ? null : config.getStructureStruct(), (caps is null) ? null : caps.getCapsStruct(), size, minBuffers, maxBuffers) != 0; } /** * Acquire a buffer from @pool. @buffer should point to a memory location that * can hold a pointer to the new buffer. * * @params can be %NULL or contain optional parameters to influence the * allocation. * * Params: * buffer = a location for a #GstBuffer * params = parameters. * * Returns: a #GstFlowReturn such as %GST_FLOW_FLUSHING when the pool is * inactive. */ public GstFlowReturn acquireBuffer(out Buffer buffer, GstBufferPoolAcquireParams* params) { GstBuffer* outbuffer = null; auto p = gst_buffer_pool_acquire_buffer(gstBufferPool, &outbuffer, params); buffer = ObjectG.getDObject!(Buffer)(outbuffer); return p; } /** * Get a copy of the current configuration of the pool. This configuration * can either be modified and used for the gst_buffer_pool_set_config() call * or it must be freed after usage. * * Returns: a copy of the current configuration of @pool. use * gst_structure_free() after usage or gst_buffer_pool_set_config(). */ public Structure getConfig() { auto p = gst_buffer_pool_get_config(gstBufferPool); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); } /** * Get a %NULL terminated array of string with supported bufferpool options for * @pool. An option would typically be enabled with * gst_buffer_pool_config_add_option(). * * Returns: a %NULL terminated array * of strings. */ public string[] getOptions() { return Str.toStringArray(gst_buffer_pool_get_options(gstBufferPool)); } /** * Check if the bufferpool supports @option. * * Params: * option = an option * * Returns: %TRUE if the buffer pool contains @option. */ public bool hasOption(string option) { return gst_buffer_pool_has_option(gstBufferPool, Str.toStringz(option)) != 0; } /** * Check if @pool is active. A pool can be activated with the * gst_buffer_pool_set_active() call. * * Returns: %TRUE when the pool is active. */ public bool isActive() { return gst_buffer_pool_is_active(gstBufferPool) != 0; } /** * Release @buffer to @pool. @buffer should have previously been allocated from * @pool with gst_buffer_pool_acquire_buffer(). * * This function is usually called automatically when the last ref on @buffer * disappears. * * Params: * buffer = a #GstBuffer */ public void releaseBuffer(Buffer buffer) { gst_buffer_pool_release_buffer(gstBufferPool, (buffer is null) ? null : buffer.getBufferStruct()); } /** * Control the active state of @pool. When the pool is inactive, new calls to * gst_buffer_pool_acquire_buffer() will return with %GST_FLOW_FLUSHING. * * Activating the bufferpool will preallocate all resources in the pool based on * the configuration of the pool. * * Deactivating will free the resources again when there are no outstanding * buffers. When there are outstanding buffers, they will be freed as soon as * they are all returned to the pool. * * Params: * active = the new active state * * Returns: %FALSE when the pool was not configured or when preallocation of the * buffers failed. */ public bool setActive(bool active) { return gst_buffer_pool_set_active(gstBufferPool, active) != 0; } /** * Set the configuration of the pool. If the pool is already configured, and * the configuration haven't change, this function will return %TRUE. If the * pool is active, this method will return %FALSE and active configuration * will remain. Buffers allocated form this pool must be returned or else this * function will do nothing and return %FALSE. * * @config is a #GstStructure that contains the configuration parameters for * the pool. A default and mandatory set of parameters can be configured with * gst_buffer_pool_config_set_params(), gst_buffer_pool_config_set_allocator() * and gst_buffer_pool_config_add_option(). * * If the parameters in @config can not be set exactly, this function returns * %FALSE and will try to update as much state as possible. The new state can * then be retrieved and refined with gst_buffer_pool_get_config(). * * This function takes ownership of @config. * * Params: * config = a #GstStructure * * Returns: %TRUE when the configuration could be set. */ public bool setConfig(Structure config) { return gst_buffer_pool_set_config(gstBufferPool, (config is null) ? null : config.getStructureStruct(true)) != 0; } /** * Enable or disable the flushing state of a @pool without freeing or * allocating buffers. * * Params: * flushing = whether to start or stop flushing * * Since: 1.4 */ public void setFlushing(bool flushing) { gst_buffer_pool_set_flushing(gstBufferPool, flushing); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Bus.d000066400000000000000000000557661324604450400212220ustar00rootroot00000000000000/* * 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 gstreamer.Bus; private import glib.ConstructionException; private import glib.Source; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.Message; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * The #GstBus is an object responsible for delivering #GstMessage packets in * a first-in first-out way from the streaming threads (see #GstTask) to the * application. * * Since the application typically only wants to deal with delivery of these * messages from one thread, the GstBus will marshall the messages between * different threads. This is important since the actual streaming of media * is done in another thread than the application. * * The GstBus provides support for #GSource based notifications. This makes it * possible to handle the delivery in the glib mainloop. * * The #GSource callback function gst_bus_async_signal_func() can be used to * convert all bus messages into signal emissions. * * A message is posted on the bus with the gst_bus_post() method. With the * gst_bus_peek() and gst_bus_pop() methods one can look at or retrieve a * previously posted message. * * The bus can be polled with the gst_bus_poll() method. This methods blocks * up to the specified timeout value until one of the specified messages types * is posted on the bus. The application can then gst_bus_pop() the messages * from the bus to handle them. * Alternatively the application can register an asynchronous bus function * using gst_bus_add_watch_full() or gst_bus_add_watch(). This function will * install a #GSource in the default glib main loop and will deliver messages * a short while after they have been posted. Note that the main loop should * be running for the asynchronous callbacks. * * It is also possible to get messages from the bus without any thread * marshalling with the gst_bus_set_sync_handler() method. This makes it * possible to react to a message in the same thread that posted the * message on the bus. This should only be used if the application is able * to deal with messages from different threads. * * Every #GstPipeline has one bus. * * Note that a #GstPipeline will set its bus into flushing state when changing * from READY to NULL state. */ public class Bus : ObjectGst { /** the main Gtk struct */ protected GstBus* gstBus; /** Get the main Gtk struct */ public GstBus* getBusStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstBus; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstBus; } protected override void setStruct(GObject* obj) { gstBus = cast(GstBus*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstBus* gstBus, bool ownedRef = false) { this.gstBus = gstBus; super(cast(GstObject*)gstBus, ownedRef); } /** * Adds a bus watch to the default main context with the default priority. * This function is used to receive asynchronous messages in the main loop. * The watch can be removed using g_source_remove() or by returning FALSE * from func. * MT safe. * Params: * dlg = A function to call when a message is received. * Returns: * The event source id. */ public uint addWatch( bool delegate(Message) dlg ) { onWatchListener = dlg; return gst_bus_add_watch(gstBus, cast(GstBusFunc)&watchCallBack, cast(void*)this); } bool delegate(Message) onWatchListener; extern(C) static int watchCallBack(GstBus* bus, GstMessage* msg, Bus bus_d )//gpointer data) { Message msg_d = new Message( msg ); return bus_d.onWatchListener( msg_d ); } /** * Use this for making an XOverlay. * Sets the synchronous handler on the bus. The function will be called * every time a new message is posted on the bus. Note that the function * will be called in the same thread context as the posting object. This * function is usually only called by the creator of the bus. Applications * should handle messages asynchronously using the gst_bus watch and poll * functions. * You cannot replace an existing sync_handler. You can pass NULL to this * function, which will clear the existing handler. * Params: * dlg = The handler function to install */ public void setSyncHandler( GstBusSyncReply delegate(Message) dlg ) { onSyncHandlerListener = dlg; gst_bus_set_sync_handler(gstBus, cast(GstBusSyncHandler)&syncHandlerCallBack, cast(void*)this, null); } GstBusSyncReply delegate(Message) onSyncHandlerListener; extern(C) static GstBusSyncReply syncHandlerCallBack(GstBus* bus, GstMessage* msg, Bus bus_d) { Message msg_d = new Message( msg ); return bus_d.onSyncHandlerListener( msg_d ); } /** */ /** */ public static GType getType() { return gst_bus_get_type(); } /** * Creates a new #GstBus instance. * * Returns: a new #GstBus instance * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_bus_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstBus*) p, true); } /** * Adds a bus signal watch to the default main context with the default priority * (%G_PRIORITY_DEFAULT). It is also possible to use a non-default * main context set up using g_main_context_push_thread_default() (before * one had to create a bus watch source and attach it to the desired main * context 'manually'). * * After calling this statement, the bus will emit the "message" signal for each * message posted on the bus. * * This function may be called multiple times. To clean up, the caller is * responsible for calling gst_bus_remove_signal_watch() as many times as this * function is called. * * MT safe. */ public void addSignalWatch() { gst_bus_add_signal_watch(gstBus); } /** * Adds a bus signal watch to the default main context with the given @priority * (e.g. %G_PRIORITY_DEFAULT). It is also possible to use a non-default main * context set up using g_main_context_push_thread_default() * (before one had to create a bus watch source and attach it to the desired * main context 'manually'). * * After calling this statement, the bus will emit the "message" signal for each * message posted on the bus when the main loop is running. * * This function may be called multiple times. To clean up, the caller is * responsible for calling gst_bus_remove_signal_watch() as many times as this * function is called. * * There can only be a single bus watch per bus, you must remove any signal * watch before you can set another type of watch. * * MT safe. * * Params: * priority = The priority of the watch. */ public void addSignalWatchFull(int priority) { gst_bus_add_signal_watch_full(gstBus, priority); } /** * Adds a bus watch to the default main context with the given @priority (e.g. * %G_PRIORITY_DEFAULT). It is also possible to use a non-default main * context set up using g_main_context_push_thread_default() (before * one had to create a bus watch source and attach it to the desired main * context 'manually'). * * This function is used to receive asynchronous messages in the main loop. * There can only be a single bus watch per bus, you must remove it before you * can set a new one. * * The bus watch will only work if a GLib main loop is being run. * * When @func is called, the message belongs to the caller; if you want to * keep a copy of it, call gst_message_ref() before leaving @func. * * The watch can be removed using gst_bus_remove_watch() or by returning %FALSE * from @func. If the watch was added to the default main context it is also * possible to remove the watch using g_source_remove(). * * MT safe. * * Params: * priority = The priority of the watch. * func = A function to call when a message is received. * userData = user data passed to @func. * notify = the function to call when the source is removed. * * Returns: The event source id or 0 if @bus already got an event source. */ public uint addWatchFull(int priority, GstBusFunc func, void* userData, GDestroyNotify notify) { return gst_bus_add_watch_full(gstBus, priority, func, userData, notify); } /** * A helper #GstBusFunc that can be used to convert all asynchronous messages * into signals. * * Params: * message = the #GstMessage received * data = user data * * Returns: %TRUE */ public bool asyncSignalFunc(Message message, void* data) { return gst_bus_async_signal_func(gstBus, (message is null) ? null : message.getMessageStruct(), data) != 0; } /** * Create watch for this bus. The GSource will be dispatched whenever * a message is on the bus. After the GSource is dispatched, the * message is popped off the bus and unreffed. * * Returns: a #GSource that can be added to a mainloop. */ public Source createWatch() { auto p = gst_bus_create_watch(gstBus); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } /** * Instructs GStreamer to stop emitting the "sync-message" signal for this bus. * See gst_bus_enable_sync_message_emission() for more information. * * In the event that multiple pieces of code have called * gst_bus_enable_sync_message_emission(), the sync-message emissions will only * be stopped after all calls to gst_bus_enable_sync_message_emission() were * "cancelled" by calling this function. In this way the semantics are exactly * the same as gst_object_ref() that which calls enable should also call * disable. * * MT safe. */ public void disableSyncMessageEmission() { gst_bus_disable_sync_message_emission(gstBus); } /** * Instructs GStreamer to emit the "sync-message" signal after running the bus's * sync handler. This function is here so that code can ensure that they can * synchronously receive messages without having to affect what the bin's sync * handler is. * * This function may be called multiple times. To clean up, the caller is * responsible for calling gst_bus_disable_sync_message_emission() as many times * as this function is called. * * While this function looks similar to gst_bus_add_signal_watch(), it is not * exactly the same -- this function enables synchronous emission of * signals when messages arrive; gst_bus_add_signal_watch() adds an idle callback * to pop messages off the bus asynchronously. The sync-message signal * comes from the thread of whatever object posted the message; the "message" * signal is marshalled to the main thread via the main loop. * * MT safe. */ public void enableSyncMessageEmission() { gst_bus_enable_sync_message_emission(gstBus); } /** * Check if there are pending messages on the bus that * should be handled. * * Returns: %TRUE if there are messages on the bus to be handled, %FALSE * otherwise. * * MT safe. */ public bool havePending() { return gst_bus_have_pending(gstBus) != 0; } /** * Peek the message on the top of the bus' queue. The message will remain * on the bus' message queue. A reference is returned, and needs to be unreffed * by the caller. * * Returns: the #GstMessage that is on the * bus, or %NULL if the bus is empty. * * MT safe. */ public Message peek() { auto p = gst_bus_peek(gstBus); if(p is null) { return null; } return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); } /** * Poll the bus for messages. Will block while waiting for messages to come. * You can specify a maximum time to poll with the @timeout parameter. If * @timeout is negative, this function will block indefinitely. * * All messages not in @events will be popped off the bus and will be ignored. * It is not possible to use message enums beyond #GST_MESSAGE_EXTENDED in the * @events mask * * Because poll is implemented using the "message" signal enabled by * gst_bus_add_signal_watch(), calling gst_bus_poll() will cause the "message" * signal to be emitted for every message that poll sees. Thus a "message" * signal handler will see the same messages that this function sees -- neither * will steal messages from the other. * * This function will run a main loop from the default main context when * polling. * * You should never use this function, since it is pure evil. This is * especially true for GUI applications based on Gtk+ or Qt, but also for any * other non-trivial application that uses the GLib main loop. As this function * runs a GLib main loop, any callback attached to the default GLib main * context may be invoked. This could be timeouts, GUI events, I/O events etc.; * even if gst_bus_poll() is called with a 0 timeout. Any of these callbacks * may do things you do not expect, e.g. destroy the main application window or * some other resource; change other application state; display a dialog and * run another main loop until the user clicks it away. In short, using this * function may add a lot of complexity to your code through unexpected * re-entrancy and unexpected changes to your application's state. * * For 0 timeouts use gst_bus_pop_filtered() instead of this function; for * other short timeouts use gst_bus_timed_pop_filtered(); everything else is * better handled by setting up an asynchronous bus watch and doing things * from there. * * Params: * events = a mask of #GstMessageType, representing the set of message types to * poll for (note special handling of extended message types below) * timeout = the poll timeout, as a #GstClockTime, or #GST_CLOCK_TIME_NONE to poll * indefinitely. * * Returns: the message that was received, * or %NULL if the poll timed out. The message is taken from the * bus and needs to be unreffed with gst_message_unref() after * usage. */ public Message poll(GstMessageType events, GstClockTime timeout) { auto p = gst_bus_poll(gstBus, events, timeout); if(p is null) { return null; } return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); } /** * Get a message from the bus. * * Returns: the #GstMessage that is on the * bus, or %NULL if the bus is empty. The message is taken from * the bus and needs to be unreffed with gst_message_unref() after * usage. * * MT safe. */ public Message pop() { auto p = gst_bus_pop(gstBus); if(p is null) { return null; } return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); } /** * Get a message matching @type from the bus. Will discard all messages on * the bus that do not match @type and that have been posted before the first * message that does match @type. If there is no message matching @type on * the bus, all messages will be discarded. It is not possible to use message * enums beyond #GST_MESSAGE_EXTENDED in the @events mask. * * Params: * types = message types to take into account * * Returns: the next #GstMessage matching * @type that is on the bus, or %NULL if the bus is empty or there * is no message matching @type. The message is taken from the bus * and needs to be unreffed with gst_message_unref() after usage. * * MT safe. */ public Message popFiltered(GstMessageType types) { auto p = gst_bus_pop_filtered(gstBus, types); if(p is null) { return null; } return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); } /** * Post a message on the given bus. Ownership of the message * is taken by the bus. * * Params: * message = the #GstMessage to post * * Returns: %TRUE if the message could be posted, %FALSE if the bus is flushing. * * MT safe. */ public bool post(Message message) { return gst_bus_post(gstBus, (message is null) ? null : message.getMessageStruct()) != 0; } /** * Removes a signal watch previously added with gst_bus_add_signal_watch(). * * MT safe. */ public void removeSignalWatch() { gst_bus_remove_signal_watch(gstBus); } /** * Removes an installed bus watch from @bus. * * Returns: %TRUE on success or %FALSE if @bus has no event source. * * Since: 1.6 */ public bool removeWatch() { return gst_bus_remove_watch(gstBus) != 0; } /** * If @flushing, flush out and unref any messages queued in the bus. Releases * references to the message origin objects. Will flush future messages until * gst_bus_set_flushing() sets @flushing to %FALSE. * * MT safe. * * Params: * flushing = whether or not to flush the bus */ public void setFlushing(bool flushing) { gst_bus_set_flushing(gstBus, flushing); } /** * A helper GstBusSyncHandler that can be used to convert all synchronous * messages into signals. * * Params: * message = the #GstMessage received * data = user data * * Returns: GST_BUS_PASS */ public GstBusSyncReply syncSignalHandler(Message message, void* data) { return gst_bus_sync_signal_handler(gstBus, (message is null) ? null : message.getMessageStruct(), data); } /** * Get a message from the bus, waiting up to the specified timeout. * * If @timeout is 0, this function behaves like gst_bus_pop(). If @timeout is * #GST_CLOCK_TIME_NONE, this function will block forever until a message was * posted on the bus. * * Params: * timeout = a timeout * * Returns: the #GstMessage that is on the * bus after the specified timeout or %NULL if the bus is empty * after the timeout expired. The message is taken from the bus * and needs to be unreffed with gst_message_unref() after usage. * * MT safe. */ public Message timedPop(GstClockTime timeout) { auto p = gst_bus_timed_pop(gstBus, timeout); if(p is null) { return null; } return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); } /** * Get a message from the bus whose type matches the message type mask @types, * waiting up to the specified timeout (and discarding any messages that do not * match the mask provided). * * If @timeout is 0, this function behaves like gst_bus_pop_filtered(). If * @timeout is #GST_CLOCK_TIME_NONE, this function will block forever until a * matching message was posted on the bus. * * Params: * timeout = a timeout in nanoseconds, or GST_CLOCK_TIME_NONE to wait forever * types = message types to take into account, GST_MESSAGE_ANY for any type * * Returns: a #GstMessage matching the * filter in @types, or %NULL if no matching message was found on * the bus until the timeout expired. The message is taken from * the bus and needs to be unreffed with gst_message_unref() after * usage. * * MT safe. */ public Message timedPopFiltered(GstClockTime timeout, GstMessageType types) { auto p = gst_bus_timed_pop_filtered(gstBus, timeout, types); if(p is null) { return null; } return ObjectG.getDObject!(Message)(cast(GstMessage*) p, true); } protected class OnMessageDelegateWrapper { void delegate(Message, Bus) dlg; gulong handlerId; this(void delegate(Message, Bus) dlg) { this.dlg = dlg; onMessageListeners ~= this; } void remove(OnMessageDelegateWrapper source) { foreach(index, wrapper; onMessageListeners) { if (wrapper.handlerId == source.handlerId) { onMessageListeners[index] = null; onMessageListeners = std.algorithm.remove(onMessageListeners, index); break; } } } } OnMessageDelegateWrapper[] onMessageListeners; /** * A message has been posted on the bus. This signal is emitted from a * GSource added to the mainloop. this signal will only be emitted when * there is a mainloop running. * * Params: * message = the message that has been posted asynchronously */ gulong addOnMessage(void delegate(Message, Bus) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMessageDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "message", cast(GCallback)&callBackMessage, cast(void*)wrapper, cast(GClosureNotify)&callBackMessageDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMessage(GstBus* busStruct, GstMessage* message, OnMessageDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Message)(message), wrapper.outer); } extern(C) static void callBackMessageDestroy(OnMessageDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnSyncMessageDelegateWrapper { void delegate(Message, Bus) dlg; gulong handlerId; this(void delegate(Message, Bus) dlg) { this.dlg = dlg; onSyncMessageListeners ~= this; } void remove(OnSyncMessageDelegateWrapper source) { foreach(index, wrapper; onSyncMessageListeners) { if (wrapper.handlerId == source.handlerId) { onSyncMessageListeners[index] = null; onSyncMessageListeners = std.algorithm.remove(onSyncMessageListeners, index); break; } } } } OnSyncMessageDelegateWrapper[] onSyncMessageListeners; /** * A message has been posted on the bus. This signal is emitted from the * thread that posted the message so one has to be careful with locking. * * This signal will not be emitted by default, you have to call * gst_bus_enable_sync_message_emission() before. * * Params: * message = the message that has been posted synchronously */ gulong addOnSyncMessage(void delegate(Message, Bus) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnSyncMessageDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "sync-message", cast(GCallback)&callBackSyncMessage, cast(void*)wrapper, cast(GClosureNotify)&callBackSyncMessageDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackSyncMessage(GstBus* busStruct, GstMessage* message, OnSyncMessageDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Message)(message), wrapper.outer); } extern(C) static void callBackSyncMessageDestroy(OnSyncMessageDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Caps.d000066400000000000000000000573151324604450400213470ustar00rootroot00000000000000/* * 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 gstreamer.Caps; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.CapsFeatures; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Caps (capabilities) are lightweight refcounted objects describing media types. * They are composed of an array of #GstStructure. * * Caps are exposed on #GstPadTemplate to describe all possible types a * given pad can handle. They are also stored in the #GstRegistry along with * a description of the #GstElement. * * Caps are exposed on the element pads using the gst_pad_query_caps() pad * function. This function describes the possible types that the pad can * handle or produce at runtime. * * A #GstCaps can be constructed with the following code fragment: * |[ * GstCaps *caps = gst_caps_new_simple ("video/x-raw", * "format", G_TYPE_STRING, "I420", * "framerate", GST_TYPE_FRACTION, 25, 1, * "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1, * "width", G_TYPE_INT, 320, * "height", G_TYPE_INT, 240, * NULL); * ]| * * A #GstCaps is fixed when it has no properties with ranges or lists. Use * gst_caps_is_fixed() to test for fixed caps. Fixed caps can be used in a * caps event to notify downstream elements of the current media type. * * Various methods exist to work with the media types such as subtracting * or intersecting. * * Be aware that the current #GstCaps / #GstStructure serialization into string * has limited support for nested #GstCaps / #GstStructure fields. It can only * support one level of nesting. Using more levels will lead to unexpected * behavior when using serialization features, such as gst_caps_to_string() or * gst_value_serialize() and their counterparts. */ public class Caps { /** the main Gtk struct */ protected GstCaps* gstCaps; protected bool ownedRef; /** Get the main Gtk struct */ public GstCaps* getCapsStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstCaps; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstCaps; } /** * Sets our main struct and passes it to the parent class. */ public this (GstCaps* gstCaps, bool ownedRef = false) { this.gstCaps = gstCaps; this.ownedRef = ownedRef; } /** * Creates a new GstCaps that indicates that it is compatible with * any media format. * Returns: * the new GstCaps */ public static Caps newAny() { // GstCaps* gst_caps_new_any (void); auto p = cast(GstCaps*)gst_caps_new_any(); if(p is null) { throw new ConstructionException("null returned by gst_caps_new_any"); } return new Caps(cast(GstCaps*)p); //, true); } /** */ /** */ public static GType getType() { return gst_caps_get_type(); } /** * Creates a new #GstCaps that is empty. That is, the returned * #GstCaps contains no media formats. * The #GstCaps is guaranteed to be writable. * Caller is responsible for unreffing the returned caps. * * Returns: the new #GstCaps * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_caps_new_empty(); if(p is null) { throw new ConstructionException("null returned by new_empty"); } this(cast(GstCaps*) p); } /** * Creates a new #GstCaps that contains one #GstStructure with name * @media_type. * Caller is responsible for unreffing the returned caps. * * Params: * mediaType = the media type of the structure * * Returns: the new #GstCaps * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string mediaType) { auto p = gst_caps_new_empty_simple(Str.toStringz(mediaType)); if(p is null) { throw new ConstructionException("null returned by new_empty_simple"); } this(cast(GstCaps*) p); } /** * Creates a new #GstCaps and adds all the structures listed as * arguments. The list must be %NULL-terminated. The structures * are not copied; the returned #GstCaps owns the structures. * * Params: * structure = the first structure to add * varArgs = additional structures to add * * Returns: the new #GstCaps * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Structure structure, void* varArgs) { auto p = gst_caps_new_full_valist((structure is null) ? null : structure.getStructureStruct(), varArgs); if(p is null) { throw new ConstructionException("null returned by new_full_valist"); } this(cast(GstCaps*) p); } /** * Appends the structures contained in @caps2 to @caps1. The structures in * @caps2 are not copied -- they are transferred to @caps1, and then @caps2 is * freed. If either caps is ANY, the resulting caps will be ANY. * * Params: * caps2 = the #GstCaps to append */ public void append(Caps caps2) { gst_caps_append(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()); } /** * Appends @structure to @caps. The structure is not copied; @caps * becomes the owner of @structure. * * Params: * structure = the #GstStructure to append */ public void appendStructure(Structure structure) { gst_caps_append_structure(gstCaps, (structure is null) ? null : structure.getStructureStruct(true)); } /** * Appends @structure with @features to @caps. The structure is not copied; @caps * becomes the owner of @structure. * * Params: * structure = the #GstStructure to append * features = the #GstCapsFeatures to append * * Since: 1.2 */ public void appendStructureFull(Structure structure, CapsFeatures features) { gst_caps_append_structure_full(gstCaps, (structure is null) ? null : structure.getStructureStruct(true), (features is null) ? null : features.getCapsFeaturesStruct(true)); } /** * Tries intersecting @caps1 and @caps2 and reports whether the result would not * be empty * * Params: * caps2 = a #GstCaps to intersect * * Returns: %TRUE if intersection would be not empty */ public bool canIntersect(Caps caps2) { return gst_caps_can_intersect(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()) != 0; } /** * Creates a new #GstCaps and appends a copy of the nth structure * contained in @caps. * * Params: * nth = the nth structure to copy * * Returns: the new #GstCaps */ public Caps copyNth(uint nth) { auto p = gst_caps_copy_nth(gstCaps, nth); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Calls the provided function once for each structure and caps feature in the * #GstCaps. In contrast to gst_caps_foreach(), the function may modify the * structure and features. In contrast to gst_caps_filter_and_map_in_place(), * the structure and features are removed from the caps if %FALSE is returned * from the function. * The caps must be mutable. * * Params: * func = a function to call for each field * userData = private data * * Since: 1.6 */ public void filterAndMapInPlace(GstCapsFilterMapFunc func, void* userData) { gst_caps_filter_and_map_in_place(gstCaps, func, userData); } /** * Modifies the given @caps into a representation with only fixed * values. First the caps will be truncated and then the first structure will be * fixated with gst_structure_fixate(). * * This function takes ownership of @caps and will call gst_caps_make_writable() * on it so you must not use @caps afterwards unless you keep an additional * reference to it with gst_caps_ref(). * * Returns: the fixated caps */ public Caps fixate() { auto p = gst_caps_fixate(gstCaps); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Calls the provided function once for each structure and caps feature in the * #GstCaps. The function must not modify the fields. * Also see gst_caps_map_in_place() and gst_caps_filter_and_map_in_place(). * * Params: * func = a function to call for each field * userData = private data * * Returns: %TRUE if the supplied function returns %TRUE for each call, * %FALSE otherwise. * * Since: 1.6 */ public bool foreac(GstCapsForeachFunc func, void* userData) { return gst_caps_foreach(gstCaps, func, userData) != 0; } /** * Finds the features in @caps that has the index @index, and * returns it. * * WARNING: This function takes a const GstCaps *, but returns a * non-const GstCapsFeatures *. This is for programming convenience -- * the caller should be aware that structures inside a constant * #GstCaps should not be modified. However, if you know the caps * are writable, either because you have just copied them or made * them writable with gst_caps_make_writable(), you may modify the * features returned in the usual way, e.g. with functions like * gst_caps_features_add(). * * You do not need to free or unref the structure returned, it * belongs to the #GstCaps. * * Params: * index = the index of the structure * * Returns: a pointer to the #GstCapsFeatures corresponding * to @index * * Since: 1.2 */ public CapsFeatures getFeatures(uint index) { auto p = gst_caps_get_features(gstCaps, index); if(p is null) { return null; } return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) p); } /** * Gets the number of structures contained in @caps. * * Returns: the number of structures that @caps contains */ public uint getSize() { return gst_caps_get_size(gstCaps); } /** * Finds the structure in @caps that has the index @index, and * returns it. * * WARNING: This function takes a const GstCaps *, but returns a * non-const GstStructure *. This is for programming convenience -- * the caller should be aware that structures inside a constant * #GstCaps should not be modified. However, if you know the caps * are writable, either because you have just copied them or made * them writable with gst_caps_make_writable(), you may modify the * structure returned in the usual way, e.g. with functions like * gst_structure_set(). * * You do not need to free or unref the structure returned, it * belongs to the #GstCaps. * * Params: * index = the index of the structure * * Returns: a pointer to the #GstStructure corresponding * to @index */ public Structure getStructure(uint index) { auto p = gst_caps_get_structure(gstCaps, index); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Creates a new #GstCaps that contains all the formats that are common * to both @caps1 and @caps2. Defaults to %GST_CAPS_INTERSECT_ZIG_ZAG mode. * * Params: * caps2 = a #GstCaps to intersect * * Returns: the new #GstCaps */ public Caps intersect(Caps caps2) { auto p = gst_caps_intersect(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Creates a new #GstCaps that contains all the formats that are common * to both @caps1 and @caps2, the order is defined by the #GstCapsIntersectMode * used. * * Params: * caps2 = a #GstCaps to intersect * mode = The intersection algorithm/mode to use * * Returns: the new #GstCaps */ public Caps intersectFull(Caps caps2, GstCapsIntersectMode mode) { auto p = gst_caps_intersect_full(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct(), mode); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * A given #GstCaps structure is always compatible with another if * every media format that is in the first is also contained in the * second. That is, @caps1 is a subset of @caps2. * * Params: * caps2 = the #GstCaps to test * * Returns: %TRUE if @caps1 is a subset of @caps2. */ public bool isAlwaysCompatible(Caps caps2) { return gst_caps_is_always_compatible(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()) != 0; } /** * Determines if @caps represents any media format. * * Returns: %TRUE if @caps represents any format. */ public bool isAny() { return gst_caps_is_any(gstCaps) != 0; } /** * Determines if @caps represents no media formats. * * Returns: %TRUE if @caps represents no formats. */ public bool isEmpty() { return gst_caps_is_empty(gstCaps) != 0; } /** * Checks if the given caps represent the same set of caps. * * Params: * caps2 = another #GstCaps * * Returns: %TRUE if both caps are equal. */ public bool isEqual(Caps caps2) { return gst_caps_is_equal(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()) != 0; } /** * Tests if two #GstCaps are equal. This function only works on fixed * #GstCaps. * * Params: * caps2 = the #GstCaps to test * * Returns: %TRUE if the arguments represent the same format */ public bool isEqualFixed(Caps caps2) { return gst_caps_is_equal_fixed(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()) != 0; } /** * Fixed #GstCaps describe exactly one format, that is, they have exactly * one structure, and each field in the structure describes a fixed type. * Examples of non-fixed types are GST_TYPE_INT_RANGE and GST_TYPE_LIST. * * Returns: %TRUE if @caps is fixed */ public bool isFixed() { return gst_caps_is_fixed(gstCaps) != 0; } /** * Checks if the given caps are exactly the same set of caps. * * Params: * caps2 = another #GstCaps * * Returns: %TRUE if both caps are strictly equal. */ public bool isStrictlyEqual(Caps caps2) { return gst_caps_is_strictly_equal(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()) != 0; } /** * Checks if all caps represented by @subset are also represented by @superset. * * Params: * superset = a potentially greater #GstCaps * * Returns: %TRUE if @subset is a subset of @superset */ public bool isSubset(Caps superset) { return gst_caps_is_subset(gstCaps, (superset is null) ? null : superset.getCapsStruct()) != 0; } /** * Checks if @structure is a subset of @caps. See gst_caps_is_subset() * for more information. * * Params: * structure = a potential #GstStructure subset of @caps * * Returns: %TRUE if @structure is a subset of @caps */ public bool isSubsetStructure(Structure structure) { return gst_caps_is_subset_structure(gstCaps, (structure is null) ? null : structure.getStructureStruct()) != 0; } /** * Checks if @structure is a subset of @caps. See gst_caps_is_subset() * for more information. * * Params: * structure = a potential #GstStructure subset of @caps * features = a #GstCapsFeatures for @structure * * Returns: %TRUE if @structure is a subset of @caps * * Since: 1.2 */ public bool isSubsetStructureFull(Structure structure, CapsFeatures features) { return gst_caps_is_subset_structure_full(gstCaps, (structure is null) ? null : structure.getStructureStruct(), (features is null) ? null : features.getCapsFeaturesStruct()) != 0; } /** * Calls the provided function once for each structure and caps feature in the * #GstCaps. In contrast to gst_caps_foreach(), the function may modify but not * delete the structures and features. The caps must be mutable. * * Params: * func = a function to call for each field * userData = private data * * Returns: %TRUE if the supplied function returns %TRUE for each call, * %FALSE otherwise. * * Since: 1.6 */ public bool mapInPlace(GstCapsMapFunc func, void* userData) { return gst_caps_map_in_place(gstCaps, func, userData) != 0; } /** * Appends the structures contained in @caps2 to @caps1 if they are not yet * expressed by @caps1. The structures in @caps2 are not copied -- they are * transferred to a writable copy of @caps1, and then @caps2 is freed. * If either caps is ANY, the resulting caps will be ANY. * * Params: * caps2 = the #GstCaps to merge in * * Returns: the merged caps. */ public Caps merge(Caps caps2) { auto p = gst_caps_merge(gstCaps, (caps2 is null) ? null : caps2.getCapsStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Appends @structure to @caps if its not already expressed by @caps. * * Params: * structure = the #GstStructure to merge * * Returns: the merged caps. */ public Caps mergeStructure(Structure structure) { auto p = gst_caps_merge_structure(gstCaps, (structure is null) ? null : structure.getStructureStruct(true)); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Appends @structure with @features to @caps if its not already expressed by @caps. * * Params: * structure = the #GstStructure to merge * features = the #GstCapsFeatures to merge * * Returns: the merged caps. * * Since: 1.2 */ public Caps mergeStructureFull(Structure structure, CapsFeatures features) { auto p = gst_caps_merge_structure_full(gstCaps, (structure is null) ? null : structure.getStructureStruct(true), (features is null) ? null : features.getCapsFeaturesStruct(true)); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Returns a #GstCaps that represents the same set of formats as * @caps, but contains no lists. Each list is expanded into separate * @GstStructures. * * This function takes ownership of @caps and will call gst_caps_make_writable() * on it so you must not use @caps afterwards unless you keep an additional * reference to it with gst_caps_ref(). * * Returns: the normalized #GstCaps */ public Caps normalize() { auto p = gst_caps_normalize(gstCaps); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * removes the structure with the given index from the list of structures * contained in @caps. * * Params: * idx = Index of the structure to remove */ public void removeStructure(uint idx) { gst_caps_remove_structure(gstCaps, idx); } /** * Sets the #GstCapsFeatures @features for the structure at @index. * * Params: * index = the index of the structure * features = the #GstCapsFeatures to set * * Since: 1.2 */ public void setFeatures(uint index, CapsFeatures features) { gst_caps_set_features(gstCaps, index, (features is null) ? null : features.getCapsFeaturesStruct(true)); } /** * Sets fields in a #GstCaps. The arguments must be passed in the same * manner as gst_structure_set(), and be %NULL-terminated. * * Params: * field = first field to set * varargs = additional parameters */ public void setSimpleValist(string field, void* varargs) { gst_caps_set_simple_valist(gstCaps, Str.toStringz(field), varargs); } /** * Sets the given @field on all structures of @caps to the given @value. * This is a convenience function for calling gst_structure_set_value() on * all structures of @caps. * * Params: * field = name of the field to set * value = value to set the field to */ public void setValue(string field, Value value) { gst_caps_set_value(gstCaps, Str.toStringz(field), (value is null) ? null : value.getValueStruct()); } /** * Converts the given @caps into a representation that represents the * same set of formats, but in a simpler form. Component structures that are * identical are merged. Component structures that have values that can be * merged are also merged. * * This function takes ownership of @caps and will call gst_caps_make_writable() * on it if necessary, so you must not use @caps afterwards unless you keep an * additional reference to it with gst_caps_ref(). * * This method does not preserve the original order of @caps. * * Returns: The simplified caps. */ public Caps simplify() { auto p = gst_caps_simplify(gstCaps); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Retrieves the structure with the given index from the list of structures * contained in @caps. The caller becomes the owner of the returned structure. * * Params: * index = Index of the structure to retrieve * * Returns: a pointer to the #GstStructure corresponding * to @index. */ public Structure stealStructure(uint index) { auto p = gst_caps_steal_structure(gstCaps, index); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); } /** * Subtracts the @subtrahend from the @minuend. * > This function does not work reliably if optional properties for caps * > are included on one caps and omitted on the other. * * Params: * subtrahend = #GstCaps to subtract * * Returns: the resulting caps */ public Caps subtract(Caps subtrahend) { auto p = gst_caps_subtract(gstCaps, (subtrahend is null) ? null : subtrahend.getCapsStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Converts @caps to a string representation. This string representation * can be converted back to a #GstCaps by gst_caps_from_string(). * * For debugging purposes its easier to do something like this: * |[ * GST_LOG ("caps are %" GST_PTR_FORMAT, caps); * ]| * This prints the caps in human readable form. * * The current implementation of serialization will lead to unexpected results * when there are nested #GstCaps / #GstStructure deeper than one level. * * Returns: a newly allocated string representing @caps. */ public override string toString() { auto retStr = gst_caps_to_string(gstCaps); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Discard all but the first structure from @caps. Useful when * fixating. * * This function takes ownership of @caps and will call gst_caps_make_writable() * on it if necessary, so you must not use @caps afterwards unless you keep an * additional reference to it with gst_caps_ref(). * * Returns: truncated caps */ public Caps truncate() { auto p = gst_caps_truncate(gstCaps); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Converts @caps from a string representation. * * The current implementation of serialization will lead to unexpected results * when there are nested #GstCaps / #GstStructure deeper than one level. * * Params: * str = a string to convert to #GstCaps * * Returns: a newly allocated #GstCaps */ public static Caps fromString(string str) { auto p = gst_caps_from_string(Str.toStringz(str)); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } } GtkD-3.7.5/generated/gstreamer/gstreamer/CapsFeatures.d000066400000000000000000000246161324604450400230440ustar00rootroot00000000000000/* * 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 gstreamer.CapsFeatures; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * #GstCapsFeatures can optionally be set on a #GstCaps to add requirements * for additional features for a specific #GstStructure. Caps structures with * the same name but with a non-equal set of caps features are not compatible. * If a pad supports multiple sets of features it has to add multiple equal * structures with different feature sets to the caps. * * Empty #GstCapsFeatures are equivalent with the #GstCapsFeatures that only * contain #GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY. ANY #GstCapsFeatures as * created by gst_caps_features_new_any() are equal to any other #GstCapsFeatures * and can be used to specify that any #GstCapsFeatures would be supported, e.g. * for elements that don't touch buffer memory. #GstCaps with ANY #GstCapsFeatures * are considered non-fixed and during negotiation some #GstCapsFeatures have * to be selected. * * Examples for caps features would be the requirement of a specific #GstMemory * types or the requirement of having a specific #GstMeta on the buffer. Features * are given as a string of the format "memory:GstMemoryTypeName" or * "meta:GstMetaAPIName". */ public class CapsFeatures { /** the main Gtk struct */ protected GstCapsFeatures* gstCapsFeatures; protected bool ownedRef; /** Get the main Gtk struct */ public GstCapsFeatures* getCapsFeaturesStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstCapsFeatures; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstCapsFeatures; } /** * Sets our main struct and passes it to the parent class. */ public this (GstCapsFeatures* gstCapsFeatures, bool ownedRef = false) { this.gstCapsFeatures = gstCapsFeatures; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_caps_features_free(gstCapsFeatures); } /** * Creates a new, ANY #GstCapsFeatures. This will be equal * to any other #GstCapsFeatures but caps with these are * unfixed. * * Free-function: gst_caps_features_free * * Return: a new, ANY #GstCapsFeatures * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public static newAny() { auto p = gst_caps_features_new_any(); if(p is null) { throw new ConstructionException("null returned by new_any"); } return new CapsFeatures(cast(GstCapsFeatures*)p); } /** */ /** */ public static GType getType() { return gst_caps_features_get_type(); } /** * Creates a new, empty #GstCapsFeatures. * * Free-function: gst_caps_features_free * * Returns: a new, empty #GstCapsFeatures * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_caps_features_new_empty(); if(p is null) { throw new ConstructionException("null returned by new_empty"); } this(cast(GstCapsFeatures*) p); } /** * Creates a new #GstCapsFeatures with the given features. * * Free-function: gst_caps_features_free * * Params: * feature1 = name of first feature to set * varargs = variable argument list * * Returns: a new, empty #GstCapsFeatures * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GQuark feature1, void* varargs) { auto p = gst_caps_features_new_id_valist(feature1, varargs); if(p is null) { throw new ConstructionException("null returned by new_id_valist"); } this(cast(GstCapsFeatures*) p); } /** * Creates a new #GstCapsFeatures with the given features. * * Free-function: gst_caps_features_free * * Params: * feature1 = name of first feature to set * varargs = variable argument list * * Returns: a new, empty #GstCapsFeatures * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string feature1, void* varargs) { auto p = gst_caps_features_new_valist(Str.toStringz(feature1), varargs); if(p is null) { throw new ConstructionException("null returned by new_valist"); } this(cast(GstCapsFeatures*) p); } /** * Adds @feature to @features. * * Params: * feature = a feature. * * Since: 1.2 */ public void add(string feature) { gst_caps_features_add(gstCapsFeatures, Str.toStringz(feature)); } /** * Adds @feature to @features. * * Params: * feature = a feature. * * Since: 1.2 */ public void addId(GQuark feature) { gst_caps_features_add_id(gstCapsFeatures, feature); } /** * Check if @features contains @feature. * * Params: * feature = a feature * * Returns: %TRUE if @features contains @feature. * * Since: 1.2 */ public bool contains(string feature) { return gst_caps_features_contains(gstCapsFeatures, Str.toStringz(feature)) != 0; } /** * Check if @features contains @feature. * * Params: * feature = a feature * * Returns: %TRUE if @features contains @feature. * * Since: 1.2 */ public bool containsId(GQuark feature) { return gst_caps_features_contains_id(gstCapsFeatures, feature) != 0; } /** * Duplicates a #GstCapsFeatures and all its values. * * Free-function: gst_caps_features_free * * Returns: a new #GstCapsFeatures. * * Since: 1.2 */ public CapsFeatures copy() { auto p = gst_caps_features_copy(gstCapsFeatures); if(p is null) { return null; } return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) p, true); } /** * Frees a #GstCapsFeatures and all its values. The caps features must not * have a parent when this function is called. * * Since: 1.2 */ public void free() { gst_caps_features_free(gstCapsFeatures); ownedRef = false; } /** * Returns the @i-th feature of @features. * * Params: * i = index of the feature * * Returns: The @i-th feature of @features. * * Since: 1.2 */ public string getNth(uint i) { return Str.toString(gst_caps_features_get_nth(gstCapsFeatures, i)); } /** * Returns the @i-th feature of @features. * * Params: * i = index of the feature * * Returns: The @i-th feature of @features. * * Since: 1.2 */ public GQuark getNthId(uint i) { return gst_caps_features_get_nth_id(gstCapsFeatures, i); } /** * Returns the number of features in @features. * * Returns: The number of features in @features. * * Since: 1.2 */ public uint getSize() { return gst_caps_features_get_size(gstCapsFeatures); } /** * Check if @features is %GST_CAPS_FEATURES_ANY. * * Returns: %TRUE if @features is %GST_CAPS_FEATURES_ANY. * * Since: 1.2 */ public bool isAny() { return gst_caps_features_is_any(gstCapsFeatures) != 0; } /** * Check if @features1 and @features2 are equal. * * Params: * features2 = a #GstCapsFeatures. * * Returns: %TRUE if @features1 and @features2 are equal. * * Since: 1.2 */ public bool isEqual(CapsFeatures features2) { return gst_caps_features_is_equal(gstCapsFeatures, (features2 is null) ? null : features2.getCapsFeaturesStruct()) != 0; } /** * Removes @feature from @features. * * Params: * feature = a feature. * * Since: 1.2 */ public void remove(string feature) { gst_caps_features_remove(gstCapsFeatures, Str.toStringz(feature)); } /** * Removes @feature from @features. * * Params: * feature = a feature. * * Since: 1.2 */ public void removeId(GQuark feature) { gst_caps_features_remove_id(gstCapsFeatures, feature); } /** * Sets the parent_refcount field of #GstCapsFeatures. This field is used to * determine whether a caps features is mutable or not. This function should only be * called by code implementing parent objects of #GstCapsFeatures, as described in * the MT Refcounting section of the design documents. * * Params: * refcount = a pointer to the parent's refcount * * Returns: %TRUE if the parent refcount could be set. * * Since: 1.2 */ public bool setParentRefcount(int* refcount) { return gst_caps_features_set_parent_refcount(gstCapsFeatures, refcount) != 0; } /** * Converts @features to a human-readable string representation. * * For debugging purposes its easier to do something like this: * |[ * GST_LOG ("features is %" GST_PTR_FORMAT, features); * ]| * This prints the features in human readable form. * * Free-function: g_free * * Returns: a pointer to string allocated by g_malloc(). * g_free() after usage. * * Since: 1.2 */ public override string toString() { auto retStr = gst_caps_features_to_string(gstCapsFeatures); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Creates a #GstCapsFeatures from a string representation. * * Free-function: gst_caps_features_free * * Params: * features = a string representation of a #GstCapsFeatures. * * Returns: a new #GstCapsFeatures or * %NULL when the string could not be parsed. Free with * gst_caps_features_free() after use. * * Since: 1.2 */ public static CapsFeatures fromString(string features) { auto p = gst_caps_features_from_string(Str.toStringz(features)); if(p is null) { return null; } return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) p, true); } } GtkD-3.7.5/generated/gstreamer/gstreamer/ChildProxyIF.d000066400000000000000000000140331324604450400227530ustar00rootroot00000000000000/* * 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 gstreamer.ChildProxyIF; private import glib.MemorySlice; private import glib.Str; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.Signals; private import gobject.Value; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * This interface abstracts handling of property sets for elements with * children. Imagine elements such as mixers or polyphonic generators. They all * have multiple #GstPad or some kind of voice objects. Another use case are * container elements like #GstBin. * The element implementing the interface acts as a parent for those child * objects. * * By implementing this interface the child properties can be accessed from the * parent element by using gst_child_proxy_get() and gst_child_proxy_set(). * * Property names are written as "child-name::property-name". The whole naming * scheme is recursive. Thus "child1::child2::property" is valid too, if * "child1" and "child2" implement the #GstChildProxy interface. */ public interface ChildProxyIF{ /** Get the main Gtk struct */ public GstChildProxy* getChildProxyStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gst_child_proxy_get_type(); } /** * Emits the "child-added" signal. * * Params: * child = the newly added child * name = the name of the new child */ public void childAdded(ObjectG child, string name); /** * Emits the "child-removed" signal. * * Params: * child = the removed child * name = the name of the old child */ public void childRemoved(ObjectG child, string name); /** * Fetches a child by its number. * * Params: * index = the child's position in the child list * * Returns: the child object or %NULL if * not found (index too high). Unref after usage. * * MT safe. */ public ObjectG getChildByIndex(uint index); /** * Looks up a child element by the given name. * * This virtual method has a default implementation that uses #GstObject * together with gst_object_get_name(). If the interface is to be used with * #GObjects, this methods needs to be overridden. * * Params: * name = the child's name * * Returns: the child object or %NULL if * not found. Unref after usage. * * MT safe. */ public ObjectG getChildByName(string name); /** * Gets the number of child objects this parent contains. * * Returns: the number of child objects * * MT safe. */ public uint getChildrenCount(); /** * Gets a single property using the GstChildProxy mechanism. * You are responsible for freeing it by calling g_value_unset() * * Params: * name = name of the property * value = a #GValue that should take the result. */ public void childGetProperty(string name, out Value value); /** * Gets properties of the parent object and its children. * * Params: * firstPropertyName = name of the first property to get * varArgs = return location for the first property, followed optionally by more name/return location pairs, followed by %NULL */ public void childGetValist(string firstPropertyName, void* varArgs); /** * Looks up which object and #GParamSpec would be effected by the given @name. * * MT safe. * * Params: * name = name of the property to look up * target = pointer to a #GObject that * takes the real object to set property on * pspec = pointer to take the #GParamSpec * describing the property * * Returns: %TRUE if @target and @pspec could be found. %FALSE otherwise. In that * case the values for @pspec and @target are not modified. Unref @target after * usage. For plain GObjects @target is the same as @object. */ public bool lookup(string name, out ObjectG target, out ParamSpec pspec); /** * Sets a single property using the GstChildProxy mechanism. * * Params: * name = name of the property to set * value = new #GValue for the property */ public void childSetProperty(string name, Value value); /** * Sets properties of the parent object and its children. * * Params: * firstPropertyName = name of the first property to set * varArgs = value for the first property, followed optionally by more name/value pairs, followed by %NULL */ public void childSetValist(string firstPropertyName, void* varArgs); /** * Will be emitted after the @object was added to the @child_proxy. * * Params: * object = the #GObject that was added * name = the name of the new child */ gulong addOnChildAdded(void delegate(ObjectG, string, ChildProxyIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Will be emitted after the @object was removed from the @child_proxy. * * Params: * object = the #GObject that was removed * name = the name of the old child */ gulong addOnChildRemoved(void delegate(ObjectG, string, ChildProxyIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gstreamer/gstreamer/ChildProxyT.d000066400000000000000000000237721324604450400226720ustar00rootroot00000000000000/* * 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 gstreamer.ChildProxyT; public import glib.MemorySlice; public import glib.Str; public import gobject.ObjectG; public import gobject.ParamSpec; public import gobject.Signals; public import gobject.Value; public import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; public import std.algorithm; /** * This interface abstracts handling of property sets for elements with * children. Imagine elements such as mixers or polyphonic generators. They all * have multiple #GstPad or some kind of voice objects. Another use case are * container elements like #GstBin. * The element implementing the interface acts as a parent for those child * objects. * * By implementing this interface the child properties can be accessed from the * parent element by using gst_child_proxy_get() and gst_child_proxy_set(). * * Property names are written as "child-name::property-name". The whole naming * scheme is recursive. Thus "child1::child2::property" is valid too, if * "child1" and "child2" implement the #GstChildProxy interface. */ public template ChildProxyT(TStruct) { /** Get the main Gtk struct */ public GstChildProxy* getChildProxyStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GstChildProxy*)getStruct(); } /** * Emits the "child-added" signal. * * Params: * child = the newly added child * name = the name of the new child */ public void childAdded(ObjectG child, string name) { gst_child_proxy_child_added(getChildProxyStruct(), (child is null) ? null : child.getObjectGStruct(), Str.toStringz(name)); } /** * Emits the "child-removed" signal. * * Params: * child = the removed child * name = the name of the old child */ public void childRemoved(ObjectG child, string name) { gst_child_proxy_child_removed(getChildProxyStruct(), (child is null) ? null : child.getObjectGStruct(), Str.toStringz(name)); } /** * Fetches a child by its number. * * Params: * index = the child's position in the child list * * Returns: the child object or %NULL if * not found (index too high). Unref after usage. * * MT safe. */ public ObjectG getChildByIndex(uint index) { auto p = gst_child_proxy_get_child_by_index(getChildProxyStruct(), index); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); } /** * Looks up a child element by the given name. * * This virtual method has a default implementation that uses #GstObject * together with gst_object_get_name(). If the interface is to be used with * #GObjects, this methods needs to be overridden. * * Params: * name = the child's name * * Returns: the child object or %NULL if * not found. Unref after usage. * * MT safe. */ public ObjectG getChildByName(string name) { auto p = gst_child_proxy_get_child_by_name(getChildProxyStruct(), Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); } /** * Gets the number of child objects this parent contains. * * Returns: the number of child objects * * MT safe. */ public uint getChildrenCount() { return gst_child_proxy_get_children_count(getChildProxyStruct()); } /** * Gets a single property using the GstChildProxy mechanism. * You are responsible for freeing it by calling g_value_unset() * * Params: * name = name of the property * value = a #GValue that should take the result. */ public void childGetProperty(string name, out Value value) { GValue* outvalue = sliceNew!GValue(); gst_child_proxy_get_property(getChildProxyStruct(), Str.toStringz(name), outvalue); value = ObjectG.getDObject!(Value)(outvalue, true); } /** * Gets properties of the parent object and its children. * * Params: * firstPropertyName = name of the first property to get * varArgs = return location for the first property, followed optionally by more name/return location pairs, followed by %NULL */ public void childGetValist(string firstPropertyName, void* varArgs) { gst_child_proxy_get_valist(getChildProxyStruct(), Str.toStringz(firstPropertyName), varArgs); } /** * Looks up which object and #GParamSpec would be effected by the given @name. * * MT safe. * * Params: * name = name of the property to look up * target = pointer to a #GObject that * takes the real object to set property on * pspec = pointer to take the #GParamSpec * describing the property * * Returns: %TRUE if @target and @pspec could be found. %FALSE otherwise. In that * case the values for @pspec and @target are not modified. Unref @target after * usage. For plain GObjects @target is the same as @object. */ public bool lookup(string name, out ObjectG target, out ParamSpec pspec) { GObject* outtarget = null; GParamSpec* outpspec = null; auto p = gst_child_proxy_lookup(getChildProxyStruct(), Str.toStringz(name), &outtarget, &outpspec) != 0; target = ObjectG.getDObject!(ObjectG)(outtarget); pspec = ObjectG.getDObject!(ParamSpec)(outpspec); return p; } /** * Sets a single property using the GstChildProxy mechanism. * * Params: * name = name of the property to set * value = new #GValue for the property */ public void childSetProperty(string name, Value value) { gst_child_proxy_set_property(getChildProxyStruct(), Str.toStringz(name), (value is null) ? null : value.getValueStruct()); } /** * Sets properties of the parent object and its children. * * Params: * firstPropertyName = name of the first property to set * varArgs = value for the first property, followed optionally by more name/value pairs, followed by %NULL */ public void childSetValist(string firstPropertyName, void* varArgs) { gst_child_proxy_set_valist(getChildProxyStruct(), Str.toStringz(firstPropertyName), varArgs); } protected class OnChildAddedDelegateWrapper { void delegate(ObjectG, string, ChildProxyIF) dlg; gulong handlerId; this(void delegate(ObjectG, string, ChildProxyIF) dlg) { this.dlg = dlg; onChildAddedListeners ~= this; } void remove(OnChildAddedDelegateWrapper source) { foreach(index, wrapper; onChildAddedListeners) { if (wrapper.handlerId == source.handlerId) { onChildAddedListeners[index] = null; onChildAddedListeners = std.algorithm.remove(onChildAddedListeners, index); break; } } } } OnChildAddedDelegateWrapper[] onChildAddedListeners; /** * Will be emitted after the @object was added to the @child_proxy. * * Params: * object = the #GObject that was added * name = the name of the new child */ gulong addOnChildAdded(void delegate(ObjectG, string, ChildProxyIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChildAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "child-added", cast(GCallback)&callBackChildAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackChildAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChildAdded(GstChildProxy* childproxyStruct, GObject* object, char* name, OnChildAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(ObjectG)(object), Str.toString(name), wrapper.outer); } extern(C) static void callBackChildAddedDestroy(OnChildAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnChildRemovedDelegateWrapper { void delegate(ObjectG, string, ChildProxyIF) dlg; gulong handlerId; this(void delegate(ObjectG, string, ChildProxyIF) dlg) { this.dlg = dlg; onChildRemovedListeners ~= this; } void remove(OnChildRemovedDelegateWrapper source) { foreach(index, wrapper; onChildRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onChildRemovedListeners[index] = null; onChildRemovedListeners = std.algorithm.remove(onChildRemovedListeners, index); break; } } } } OnChildRemovedDelegateWrapper[] onChildRemovedListeners; /** * Will be emitted after the @object was removed from the @child_proxy. * * Params: * object = the #GObject that was removed * name = the name of the old child */ gulong addOnChildRemoved(void delegate(ObjectG, string, ChildProxyIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChildRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "child-removed", cast(GCallback)&callBackChildRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackChildRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChildRemoved(GstChildProxy* childproxyStruct, GObject* object, char* name, OnChildRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(ObjectG)(object), Str.toString(name), wrapper.outer); } extern(C) static void callBackChildRemovedDestroy(OnChildRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Clock.d000066400000000000000000000631721324604450400215120ustar00rootroot00000000000000/* * 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 gstreamer.Clock; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * GStreamer uses a global clock to synchronize the plugins in a pipeline. * Different clock implementations are possible by implementing this abstract * base class or, more conveniently, by subclassing #GstSystemClock. * * The #GstClock returns a monotonically increasing time with the method * gst_clock_get_time(). Its accuracy and base time depend on the specific * clock implementation but time is always expressed in nanoseconds. Since the * baseline of the clock is undefined, the clock time returned is not * meaningful in itself, what matters are the deltas between two clock times. * The time returned by a clock is called the absolute time. * * The pipeline uses the clock to calculate the running time. Usually all * renderers synchronize to the global clock using the buffer timestamps, the * newsegment events and the element's base time, see #GstPipeline. * * A clock implementation can support periodic and single shot clock * notifications both synchronous and asynchronous. * * One first needs to create a #GstClockID for the periodic or single shot * notification using gst_clock_new_single_shot_id() or * gst_clock_new_periodic_id(). * * To perform a blocking wait for the specific time of the #GstClockID use the * gst_clock_id_wait(). To receive a callback when the specific time is reached * in the clock use gst_clock_id_wait_async(). Both these calls can be * interrupted with the gst_clock_id_unschedule() call. If the blocking wait is * unscheduled a return value of #GST_CLOCK_UNSCHEDULED is returned. * * Periodic callbacks scheduled async will be repeatedly called automatically * until it is unscheduled. To schedule a sync periodic callback, * gst_clock_id_wait() should be called repeatedly. * * The async callbacks can happen from any thread, either provided by the core * or from a streaming thread. The application should be prepared for this. * * A #GstClockID that has been unscheduled cannot be used again for any wait * operation, a new #GstClockID should be created and the old unscheduled one * should be destroyed with gst_clock_id_unref(). * * It is possible to perform a blocking wait on the same #GstClockID from * multiple threads. However, registering the same #GstClockID for multiple * async notifications is not possible, the callback will only be called for * the thread registering the entry last. * * None of the wait operations unref the #GstClockID, the owner is responsible * for unreffing the ids itself. This holds for both periodic and single shot * notifications. The reason being that the owner of the #GstClockID has to * keep a handle to the #GstClockID to unblock the wait on FLUSHING events or * state changes and if the entry would be unreffed automatically, the handle * might become invalid without any notification. * * These clock operations do not operate on the running time, so the callbacks * will also occur when not in PLAYING state as if the clock just keeps on * running. Some clocks however do not progress when the element that provided * the clock is not PLAYING. * * When a clock has the #GST_CLOCK_FLAG_CAN_SET_MASTER flag set, it can be * slaved to another #GstClock with the gst_clock_set_master(). The clock will * then automatically be synchronized to this master clock by repeatedly * sampling the master clock and the slave clock and recalibrating the slave * clock with gst_clock_set_calibration(). This feature is mostly useful for * plugins that have an internal clock but must operate with another clock * selected by the #GstPipeline. They can track the offset and rate difference * of their internal clock relative to the master clock by using the * gst_clock_get_calibration() function. * * The master/slave synchronisation can be tuned with the #GstClock:timeout, * #GstClock:window-size and #GstClock:window-threshold properties. * The #GstClock:timeout property defines the interval to sample the master * clock and run the calibration functions. #GstClock:window-size defines the * number of samples to use when calibrating and #GstClock:window-threshold * defines the minimum number of samples before the calibration is performed. */ public class Clock : ObjectGst { /** the main Gtk struct */ protected GstClock* gstClock; /** Get the main Gtk struct */ public GstClock* getClockStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstClock; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstClock; } protected override void setStruct(GObject* obj) { gstClock = cast(GstClock*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstClock* gstClock, bool ownedRef = false) { this.gstClock = gstClock; super(cast(GstObject*)gstClock, ownedRef); } /** */ public static GType getType() { return gst_clock_get_type(); } /** * Compares the two #GstClockID instances. This function can be used * as a GCompareFunc when sorting ids. * * Params: * id1 = A #GstClockID * id2 = A #GstClockID to compare with * * Returns: negative value if a < b; zero if a = b; positive value if a > b * * MT safe. */ public static int idCompareFunc(void* id1, void* id2) { return gst_clock_id_compare_func(id1, id2); } /** * Get the time of the clock ID * * Params: * id = The #GstClockID to query * * Returns: the time of the given clock id. * * MT safe. */ public static GstClockTime idGetTime(GstClockID id) { return gst_clock_id_get_time(id); } /** * Increase the refcount of given @id. * * Params: * id = The #GstClockID to ref * * Returns: The same #GstClockID with increased refcount. * * MT safe. */ public static GstClockID idRef(GstClockID id) { return gst_clock_id_ref(id); } /** * Unref given @id. When the refcount reaches 0 the * #GstClockID will be freed. * * MT safe. * * Params: * id = The #GstClockID to unref */ public static void idUnref(GstClockID id) { gst_clock_id_unref(id); } /** * Cancel an outstanding request with @id. This can either * be an outstanding async notification or a pending sync notification. * After this call, @id cannot be used anymore to receive sync or * async notifications, you need to create a new #GstClockID. * * MT safe. * * Params: * id = The id to unschedule */ public static void idUnschedule(GstClockID id) { gst_clock_id_unschedule(id); } /** * Perform a blocking wait on @id. * @id should have been created with gst_clock_new_single_shot_id() * or gst_clock_new_periodic_id() and should not have been unscheduled * with a call to gst_clock_id_unschedule(). * * If the @jitter argument is not %NULL and this function returns #GST_CLOCK_OK * or #GST_CLOCK_EARLY, it will contain the difference * against the clock and the time of @id when this method was * called. * Positive values indicate how late @id was relative to the clock * (in which case this function will return #GST_CLOCK_EARLY). * Negative values indicate how much time was spent waiting on the clock * before this function returned. * * Params: * id = The #GstClockID to wait on * jitter = a pointer that will contain the jitter, * can be %NULL. * * Returns: the result of the blocking wait. #GST_CLOCK_EARLY will be returned * if the current clock time is past the time of @id, #GST_CLOCK_OK if * @id was scheduled in time. #GST_CLOCK_UNSCHEDULED if @id was * unscheduled with gst_clock_id_unschedule(). * * MT safe. */ public static GstClockReturn idWait(GstClockID id, out GstClockTimeDiff jitter) { return gst_clock_id_wait(id, &jitter); } /** * Register a callback on the given #GstClockID @id with the given * function and user_data. When passing a #GstClockID with an invalid * time to this function, the callback will be called immediately * with a time set to GST_CLOCK_TIME_NONE. The callback will * be called when the time of @id has been reached. * * The callback @func can be invoked from any thread, either provided by the * core or from a streaming thread. The application should be prepared for this. * * Params: * id = a #GstClockID to wait on * func = The callback function * userData = User data passed in the callback * destroyData = #GDestroyNotify for user_data * * Returns: the result of the non blocking wait. * * MT safe. */ public static GstClockReturn idWaitAsync(GstClockID id, GstClockCallback func, void* userData, GDestroyNotify destroyData) { return gst_clock_id_wait_async(id, func, userData, destroyData); } /** * The time @master of the master clock and the time @slave of the slave * clock are added to the list of observations. If enough observations * are available, a linear regression algorithm is run on the * observations and @clock is recalibrated. * * If this functions returns %TRUE, @r_squared will contain the * correlation coefficient of the interpolation. A value of 1.0 * means a perfect regression was performed. This value can * be used to control the sampling frequency of the master and slave * clocks. * * Params: * slave = a time on the slave * master = a time on the master * rSquared = a pointer to hold the result * * Returns: %TRUE if enough observations were added to run the * regression algorithm. * * MT safe. */ public bool addObservation(GstClockTime slave, GstClockTime master, out double rSquared) { return gst_clock_add_observation(gstClock, slave, master, &rSquared) != 0; } /** * Add a clock observation to the internal slaving algorithm the same as * gst_clock_add_observation(), and return the result of the master clock * estimation, without updating the internal calibration. * * The caller can then take the results and call gst_clock_set_calibration() * with the values, or some modified version of them. * * Params: * slave = a time on the slave * master = a time on the master * rSquared = a pointer to hold the result * internal = a location to store the internal time * external = a location to store the external time * rateNum = a location to store the rate numerator * rateDenom = a location to store the rate denominator * * Since: 1.6 */ public bool addObservationUnapplied(GstClockTime slave, GstClockTime master, out double rSquared, out GstClockTime internal, out GstClockTime external, out GstClockTime rateNum, out GstClockTime rateDenom) { return gst_clock_add_observation_unapplied(gstClock, slave, master, &rSquared, &internal, &external, &rateNum, &rateDenom) != 0; } /** * Converts the given @internal clock time to the external time, adjusting for the * rate and reference time set with gst_clock_set_calibration() and making sure * that the returned time is increasing. This function should be called with the * clock's OBJECT_LOCK held and is mainly used by clock subclasses. * * This function is the reverse of gst_clock_unadjust_unlocked(). * * Params: * internal = a clock time * * Returns: the converted time of the clock. */ public GstClockTime adjustUnlocked(GstClockTime internal) { return gst_clock_adjust_unlocked(gstClock, internal); } /** * Converts the given @internal_target clock time to the external time, * using the passed calibration parameters. This function performs the * same calculation as gst_clock_adjust_unlocked() when called using the * current calibration parameters, but doesn't ensure a monotonically * increasing result as gst_clock_adjust_unlocked() does. * * Note: The @clock parameter is unused and can be NULL * * Params: * internalTarget = a clock time * cinternal = a reference internal time * cexternal = a reference external time * cnum = the numerator of the rate of the clock relative to its * internal time * cdenom = the denominator of the rate of the clock * * Returns: the converted time of the clock. * * Since: 1.6 */ public GstClockTime adjustWithCalibration(GstClockTime internalTarget, GstClockTime cinternal, GstClockTime cexternal, GstClockTime cnum, GstClockTime cdenom) { return gst_clock_adjust_with_calibration(gstClock, internalTarget, cinternal, cexternal, cnum, cdenom); } /** * Gets the internal rate and reference time of @clock. See * gst_clock_set_calibration() for more information. * * @internal, @external, @rate_num, and @rate_denom can be left %NULL if the * caller is not interested in the values. * * MT safe. * * Params: * internal = a location to store the internal time * external = a location to store the external time * rateNum = a location to store the rate numerator * rateDenom = a location to store the rate denominator */ public void getCalibration(out GstClockTime internal, out GstClockTime external, out GstClockTime rateNum, out GstClockTime rateDenom) { gst_clock_get_calibration(gstClock, &internal, &external, &rateNum, &rateDenom); } /** * Gets the current internal time of the given clock. The time is returned * unadjusted for the offset and the rate. * * Returns: the internal time of the clock. Or GST_CLOCK_TIME_NONE when * given invalid input. * * MT safe. */ public GstClockTime getInternalTime() { return gst_clock_get_internal_time(gstClock); } /** * Get the master clock that @clock is slaved to or %NULL when the clock is * not slaved to any master clock. * * Returns: a master #GstClock or %NULL * when this clock is not slaved to a master clock. Unref after * usage. * * MT safe. */ public Clock getMaster() { auto p = gst_clock_get_master(gstClock); if(p is null) { return null; } return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); } /** * Get the accuracy of the clock. The accuracy of the clock is the granularity * of the values returned by gst_clock_get_time(). * * Returns: the resolution of the clock in units of #GstClockTime. * * MT safe. */ public GstClockTime getResolution() { return gst_clock_get_resolution(gstClock); } /** * Gets the current time of the given clock. The time is always * monotonically increasing and adjusted according to the current * offset and rate. * * Returns: the time of the clock. Or GST_CLOCK_TIME_NONE when * given invalid input. * * MT safe. */ public GstClockTime getTime() { return gst_clock_get_time(gstClock); } /** * Get the amount of time that master and slave clocks are sampled. * * Returns: the interval between samples. */ public GstClockTime getTimeout() { return gst_clock_get_timeout(gstClock); } /** * Checks if the clock is currently synced. * * This returns if GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC is not set on the clock. * * Returns: %TRUE if the clock is currently synced * * Since: 1.6 */ public bool isSynced() { return gst_clock_is_synced(gstClock) != 0; } /** * Get an ID from @clock to trigger a periodic notification. * The periodic notifications will start at time @start_time and * will then be fired with the given @interval. @id should be unreffed * after usage. * * Free-function: gst_clock_id_unref * * Params: * startTime = the requested start time * interval = the requested interval * * Returns: a #GstClockID that can be used to request the * time notification. * * MT safe. */ public GstClockID newPeriodicId(GstClockTime startTime, GstClockTime interval) { return gst_clock_new_periodic_id(gstClock, startTime, interval); } /** * Get a #GstClockID from @clock to trigger a single shot * notification at the requested time. The single shot id should be * unreffed after usage. * * Free-function: gst_clock_id_unref * * Params: * time = the requested time * * Returns: a #GstClockID that can be used to request the * time notification. * * MT safe. */ public GstClockID newSingleShotId(GstClockTime time) { return gst_clock_new_single_shot_id(gstClock, time); } /** * Reinitializes the provided periodic @id to the provided start time and * interval. Does not modify the reference count. * * Params: * id = a #GstClockID * startTime = the requested start time * interval = the requested interval * * Returns: %TRUE if the GstClockID could be reinitialized to the provided * @time, else %FALSE. */ public bool periodicIdReinit(GstClockID id, GstClockTime startTime, GstClockTime interval) { return gst_clock_periodic_id_reinit(gstClock, id, startTime, interval) != 0; } /** * Adjusts the rate and time of @clock. A rate of 1/1 is the normal speed of * the clock. Values bigger than 1/1 make the clock go faster. * * @internal and @external are calibration parameters that arrange that * gst_clock_get_time() should have been @external at internal time @internal. * This internal time should not be in the future; that is, it should be less * than the value of gst_clock_get_internal_time() when this function is called. * * Subsequent calls to gst_clock_get_time() will return clock times computed as * follows: * * |[ * time = (internal_time - internal) * rate_num / rate_denom + external * ]| * * This formula is implemented in gst_clock_adjust_unlocked(). Of course, it * tries to do the integer arithmetic as precisely as possible. * * Note that gst_clock_get_time() always returns increasing values so when you * move the clock backwards, gst_clock_get_time() will report the previous value * until the clock catches up. * * MT safe. * * Params: * internal = a reference internal time * external = a reference external time * rateNum = the numerator of the rate of the clock relative to its * internal time * rateDenom = the denominator of the rate of the clock */ public void setCalibration(GstClockTime internal, GstClockTime external, GstClockTime rateNum, GstClockTime rateDenom) { gst_clock_set_calibration(gstClock, internal, external, rateNum, rateDenom); } /** * Set @master as the master clock for @clock. @clock will be automatically * calibrated so that gst_clock_get_time() reports the same time as the * master clock. * * A clock provider that slaves its clock to a master can get the current * calibration values with gst_clock_get_calibration(). * * @master can be %NULL in which case @clock will not be slaved anymore. It will * however keep reporting its time adjusted with the last configured rate * and time offsets. * * Params: * master = a master #GstClock * * Returns: %TRUE if the clock is capable of being slaved to a master clock. * Trying to set a master on a clock without the * #GST_CLOCK_FLAG_CAN_SET_MASTER flag will make this function return %FALSE. * * MT safe. */ public bool setMaster(Clock master) { return gst_clock_set_master(gstClock, (master is null) ? null : master.getClockStruct()) != 0; } /** * Set the accuracy of the clock. Some clocks have the possibility to operate * with different accuracy at the expense of more resource usage. There is * normally no need to change the default resolution of a clock. The resolution * of a clock can only be changed if the clock has the * #GST_CLOCK_FLAG_CAN_SET_RESOLUTION flag set. * * Params: * resolution = The resolution to set * * Returns: the new resolution of the clock. */ public GstClockTime setResolution(GstClockTime resolution) { return gst_clock_set_resolution(gstClock, resolution); } /** * Sets @clock to synced and emits the GstClock::synced signal, and wakes up any * thread waiting in gst_clock_wait_for_sync(). * * This function must only be called if GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC * is set on the clock, and is intended to be called by subclasses only. * * Params: * synced = if the clock is synced * * Since: 1.6 */ public void setSynced(bool synced) { gst_clock_set_synced(gstClock, synced); } /** * Set the amount of time, in nanoseconds, to sample master and slave * clocks * * Params: * timeout = a timeout */ public void setTimeout(GstClockTime timeout) { gst_clock_set_timeout(gstClock, timeout); } /** * Reinitializes the provided single shot @id to the provided time. Does not * modify the reference count. * * Params: * id = a #GstClockID * time = The requested time. * * Returns: %TRUE if the GstClockID could be reinitialized to the provided * @time, else %FALSE. */ public bool singleShotIdReinit(GstClockID id, GstClockTime time) { return gst_clock_single_shot_id_reinit(gstClock, id, time) != 0; } /** * Converts the given @external clock time to the internal time of @clock, * using the rate and reference time set with gst_clock_set_calibration(). * This function should be called with the clock's OBJECT_LOCK held and * is mainly used by clock subclasses. * * This function is the reverse of gst_clock_adjust_unlocked(). * * Params: * external = an external clock time * * Returns: the internal time of the clock corresponding to @external. */ public GstClockTime unadjustUnlocked(GstClockTime external) { return gst_clock_unadjust_unlocked(gstClock, external); } /** * Converts the given @external_target clock time to the internal time, * using the passed calibration parameters. This function performs the * same calculation as gst_clock_unadjust_unlocked() when called using the * current calibration parameters. * * Note: The @clock parameter is unused and can be NULL * * Params: * externalTarget = a clock time * cinternal = a reference internal time * cexternal = a reference external time * cnum = the numerator of the rate of the clock relative to its * internal time * cdenom = the denominator of the rate of the clock * * Returns: the converted time of the clock. * * Since: 1.8 */ public GstClockTime unadjustWithCalibration(GstClockTime externalTarget, GstClockTime cinternal, GstClockTime cexternal, GstClockTime cnum, GstClockTime cdenom) { return gst_clock_unadjust_with_calibration(gstClock, externalTarget, cinternal, cexternal, cnum, cdenom); } /** * Waits until @clock is synced for reporting the current time. If @timeout * is %GST_CLOCK_TIME_NONE it will wait forever, otherwise it will time out * after @timeout nanoseconds. * * For asynchronous waiting, the GstClock::synced signal can be used. * * This returns immediately with TRUE if GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC * is not set on the clock, or if the clock is already synced. * * Params: * timeout = timeout for waiting or %GST_CLOCK_TIME_NONE * * Returns: %TRUE if waiting was successful, or %FALSE on timeout * * Since: 1.6 */ public bool waitForSync(GstClockTime timeout) { return gst_clock_wait_for_sync(gstClock, timeout) != 0; } protected class OnSyncedDelegateWrapper { void delegate(bool, Clock) dlg; gulong handlerId; this(void delegate(bool, Clock) dlg) { this.dlg = dlg; onSyncedListeners ~= this; } void remove(OnSyncedDelegateWrapper source) { foreach(index, wrapper; onSyncedListeners) { if (wrapper.handlerId == source.handlerId) { onSyncedListeners[index] = null; onSyncedListeners = std.algorithm.remove(onSyncedListeners, index); break; } } } } OnSyncedDelegateWrapper[] onSyncedListeners; /** * Signaled on clocks with GST_CLOCK_FLAG_NEEDS_STARTUP_SYNC set once * the clock is synchronized, or when it completely lost synchronization. * This signal will not be emitted on clocks without the flag. * * This signal will be emitted from an arbitrary thread, most likely not * the application's main thread. * * Params: * synced = if the clock is synced now * * Since: 1.6 */ gulong addOnSynced(void delegate(bool, Clock) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnSyncedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "synced", cast(GCallback)&callBackSynced, cast(void*)wrapper, cast(GClosureNotify)&callBackSyncedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackSynced(GstClock* clockStruct, bool synced, OnSyncedDelegateWrapper wrapper) { wrapper.dlg(synced, wrapper.outer); } extern(C) static void callBackSyncedDestroy(OnSyncedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Context.d000066400000000000000000000130321324604450400220710ustar00rootroot00000000000000/* * 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 gstreamer.Context; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * #GstContext is a container object used to store contexts like a device * context, a display server connection and similar concepts that should * be shared between multiple elements. * * Applications can set a context on a complete pipeline by using * gst_element_set_context(), which will then be propagated to all * child elements. Elements can handle these in #GstElementClass.set_context() * and merge them with the context information they already have. * * When an element needs a context it will do the following actions in this * order until one step succeeds: * 1. Check if the element already has a context * 2. Query downstream with GST_QUERY_CONTEXT for the context * 3. Query upstream with GST_QUERY_CONTEXT for the context * 4. Post a GST_MESSAGE_NEED_CONTEXT message on the bus with the required * context types and afterwards check if a usable context was set now * 5. Create a context by itself and post a GST_MESSAGE_HAVE_CONTEXT message * on the bus. * * Bins will catch GST_MESSAGE_NEED_CONTEXT messages and will set any previously * known context on the element that asks for it if possible. Otherwise the * application should provide one if it can. * * #GstContexts can be persistent. * A persistent #GstContext is kept in elements when they reach * %GST_STATE_NULL, non-persistent ones will be removed. * Also, a non-persistent context won't override a previous persistent * context set to an element. */ public class Context { /** the main Gtk struct */ protected GstContext* gstContext; protected bool ownedRef; /** Get the main Gtk struct */ public GstContext* getContextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstContext; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstContext; } /** * Sets our main struct and passes it to the parent class. */ public this (GstContext* gstContext, bool ownedRef = false) { this.gstContext = gstContext; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_context_get_type(); } /** * Create a new context. * * Params: * contextType = Context type * persistent = Persistent context * * Returns: The new context. * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string contextType, bool persistent) { auto p = gst_context_new(Str.toStringz(contextType), persistent); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstContext*) p); } /** * Get the type of @context. * * Returns: The type of the context. * * Since: 1.2 */ public string getContextType() { return Str.toString(gst_context_get_context_type(gstContext)); } /** * Access the structure of the context. * * Returns: The structure of the context. The structure is * still owned by the context, which means that you should not modify it, * free it and that the pointer becomes invalid when you free the context. * * Since: 1.2 */ public Structure getStructure() { auto p = gst_context_get_structure(gstContext); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Checks if @context has @context_type. * * Params: * contextType = Context type to check. * * Returns: %TRUE if @context has @context_type. * * Since: 1.2 */ public bool hasContextType(string contextType) { return gst_context_has_context_type(gstContext, Str.toStringz(contextType)) != 0; } /** * Check if @context is persistent. * * Returns: %TRUE if the context is persistent. * * Since: 1.2 */ public bool isPersistent() { return gst_context_is_persistent(gstContext) != 0; } /** * Get a writable version of the structure. * * Returns: The structure of the context. The structure is still * owned by the context, which means that you should not free it and * that the pointer becomes invalid when you free the context. * This function checks if @context is writable. * * Since: 1.2 */ public Structure writableStructure() { auto p = gst_context_writable_structure(gstContext); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); } } GtkD-3.7.5/generated/gstreamer/gstreamer/ControlBinding.d000066400000000000000000000141631324604450400233660ustar00rootroot00000000000000/* * 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 gstreamer.ControlBinding; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * A base class for value mapping objects that attaches control sources to gobject * properties. Such an object is taking one or more #GstControlSource instances, * combines them and maps the resulting value to the type and value range of the * bound property. */ public class ControlBinding : ObjectGst { /** the main Gtk struct */ protected GstControlBinding* gstControlBinding; /** Get the main Gtk struct */ public GstControlBinding* getControlBindingStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstControlBinding; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstControlBinding; } protected override void setStruct(GObject* obj) { gstControlBinding = cast(GstControlBinding*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstControlBinding* gstControlBinding, bool ownedRef = false) { this.gstControlBinding = gstControlBinding; super(cast(GstObject*)gstControlBinding, ownedRef); } /** */ public static GType getType() { return gst_control_binding_get_type(); } /** * Gets a number of #GValues for the given controlled property starting at the * requested time. The array @values need to hold enough space for @n_values of * #GValue. * * This function is useful if one wants to e.g. draw a graph of the control * curve or apply a control curve sample by sample. * * Params: * timestamp = the time that should be processed * interval = the time spacing between subsequent values * values = array to put control-values in * * Returns: %TRUE if the given array could be filled, %FALSE otherwise */ public bool getGValueArray(GstClockTime timestamp, GstClockTime interval, Value[] values) { GValue[] valuesArray = new GValue[values.length]; for ( int i = 0; i < values.length; i++ ) { valuesArray[i] = *(values[i].getValueStruct()); } return gst_control_binding_get_g_value_array(gstControlBinding, timestamp, interval, cast(uint)values.length, valuesArray.ptr) != 0; } /** * Gets the value for the given controlled property at the requested time. * * Params: * timestamp = the time the control-change should be read from * * Returns: the GValue of the property at the given time, * or %NULL if the property isn't controlled. */ public Value getValue(GstClockTime timestamp) { auto p = gst_control_binding_get_value(gstControlBinding, timestamp); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p, true); } /** * Gets a number of values for the given controlled property starting at the * requested time. The array @values need to hold enough space for @n_values of * the same type as the objects property's type. * * This function is useful if one wants to e.g. draw a graph of the control * curve or apply a control curve sample by sample. * * The values are unboxed and ready to be used. The similar function * gst_control_binding_get_g_value_array() returns the array as #GValues and is * more suitable for bindings. * * Params: * timestamp = the time that should be processed * interval = the time spacing between subsequent values * values = array to put control-values in * * Returns: %TRUE if the given array could be filled, %FALSE otherwise */ public bool getValueArray(GstClockTime timestamp, GstClockTime interval, void*[] values) { return gst_control_binding_get_value_array(gstControlBinding, timestamp, interval, cast(uint)values.length, values.ptr) != 0; } /** * Check if the control binding is disabled. * * Returns: %TRUE if the binding is inactive */ public bool isDisabled() { return gst_control_binding_is_disabled(gstControlBinding) != 0; } /** * This function is used to disable a control binding for some time, i.e. * gst_object_sync_values() will do nothing. * * Params: * disabled = boolean that specifies whether to disable the controller * or not. */ public void setDisabled(bool disabled) { gst_control_binding_set_disabled(gstControlBinding, disabled); } /** * Sets the property of the @object, according to the #GstControlSources that * handle them and for the given timestamp. * * If this function fails, it is most likely the application developers fault. * Most probably the control sources are not setup correctly. * * Params: * object = the object that has controlled properties * timestamp = the time that should be processed * lastSync = the last time this was called * * Returns: %TRUE if the controller value could be applied to the object * property, %FALSE otherwise */ public bool syncValues(ObjectGst object, GstClockTime timestamp, GstClockTime lastSync) { return gst_control_binding_sync_values(gstControlBinding, (object is null) ? null : object.getObjectGstStruct(), timestamp, lastSync) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/ControlSource.d000066400000000000000000000073201324604450400232510ustar00rootroot00000000000000/* * 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 gstreamer.ControlSource; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * The #GstControlSource is a base class for control value sources that could * be used to get timestamp-value pairs. A control source essentially is a * function over time. * * A #GstControlSource is used by first getting an instance of a specific * control-source, creating a binding for the control-source to the target property * of the element and then adding the binding to the element. The binding will * convert the data types and value range to fit to the bound property. * * For implementing a new #GstControlSource one has to implement * #GstControlSourceGetValue and #GstControlSourceGetValueArray functions. * These are then used by gst_control_source_get_value() and * gst_control_source_get_value_array() to get values for specific timestamps. */ public class ControlSource : ObjectGst { /** the main Gtk struct */ protected GstControlSource* gstControlSource; /** Get the main Gtk struct */ public GstControlSource* getControlSourceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstControlSource; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstControlSource; } protected override void setStruct(GObject* obj) { gstControlSource = cast(GstControlSource*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstControlSource* gstControlSource, bool ownedRef = false) { this.gstControlSource = gstControlSource; super(cast(GstObject*)gstControlSource, ownedRef); } /** */ public static GType getType() { return gst_control_source_get_type(); } /** * Gets the value for this #GstControlSource at a given timestamp. * * Params: * timestamp = the time for which the value should be returned * value = the value * * Returns: %FALSE if the value couldn't be returned, %TRUE otherwise. */ public bool getValue(GstClockTime timestamp, out double value) { return gst_control_source_get_value(gstControlSource, timestamp, &value) != 0; } /** * Gets an array of values for for this #GstControlSource. Values that are * undefined contain NANs. * * Params: * timestamp = the first timestamp * interval = the time steps * values = array to put control-values in * * Returns: %TRUE if the given array could be filled, %FALSE otherwise */ public bool getValueArray(GstClockTime timestamp, GstClockTime interval, double[] values) { return gst_control_source_get_value_array(gstControlSource, timestamp, interval, cast(uint)values.length, values.ptr) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/DateTime.d000066400000000000000000000355341324604450400221540ustar00rootroot00000000000000/* * 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 gstreamer.DateTime; private import glib.ConstructionException; private import glib.DateTime : GLibDateTime = DateTime; private import glib.Str; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * Struct to store date, time and timezone information altogether. * #GstDateTime is refcounted and immutable. * * Date information is handled using the proleptic Gregorian calendar. * * Provides basic creation functions and accessor functions to its fields. */ public class DateTime { /** the main Gtk struct */ protected GstDateTime* gstDateTime; protected bool ownedRef; /** Get the main Gtk struct */ public GstDateTime* getDateTimeStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstDateTime; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstDateTime; } /** * Sets our main struct and passes it to the parent class. */ public this (GstDateTime* gstDateTime, bool ownedRef = false) { this.gstDateTime = gstDateTime; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_date_time_unref(gstDateTime); } /** * Creates a new GstDateTime representing the current date and time. * * Params: * utc = If true use utc else use the local timezone. * Throws: ConstructionException GTK+ fails to create the object. */ public this (bool utc) { GstDateTime* p; if ( utc ) { p = gst_date_time_new_now_utc(); } else { p = gst_date_time_new_now_local_time(); } if(p is null) { throw new ConstructionException("null returned by gst_date_time_new_now_local_time()"); } this(p); //, true); } /** * Creates a new GstDateTime using the time since Jan 1, 1970 specified by * secs. * * Params: * secs = Seconds from the Unix epoch * utc = If true use utc else use the local timezone. * Throws: ConstructionException GTK+ fails to create the object. */ public this (long secs, bool utc) { GstDateTime* p; if ( utc ) { p = gst_date_time_new_from_unix_epoch_utc(secs); } else { p = gst_date_time_new_from_unix_epoch_local_time(secs); } if(p is null) { throw new ConstructionException("null returned by gst_date_time_new_from_unix_epoch_local_time(secs)"); } this(p); //, true); } /** */ /** */ public static GType getType() { return gst_date_time_get_type(); } /** * Creates a new #GstDateTime using the date and times in the gregorian calendar * in the supplied timezone. * * @year should be from 1 to 9999, @month should be from 1 to 12, @day from * 1 to 31, @hour from 0 to 23, @minutes and @seconds from 0 to 59. * * Note that @tzoffset is a float and was chosen so for being able to handle * some fractional timezones, while it still keeps the readability of * representing it in hours for most timezones. * * If value is -1 then all over value will be ignored. For example * if @month == -1, then #GstDateTime will created only for @year. If * @day == -1, then #GstDateTime will created for @year and @month and * so on. * * Free-function: gst_date_time_unref * * Params: * tzoffset = Offset from UTC in hours. * year = the gregorian year * month = the gregorian month * day = the day of the gregorian month * hour = the hour of the day * minute = the minute of the hour * seconds = the second of the minute * * Returns: the newly created #GstDateTime * * Throws: ConstructionException GTK+ fails to create the object. */ public this(float tzoffset, int year, int month, int day, int hour, int minute, double seconds) { auto p = gst_date_time_new(tzoffset, year, month, day, hour, minute, seconds); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstDateTime*) p); } /** * Creates a new #GstDateTime from a #GDateTime object. * * Free-function: gst_date_time_unref * * Params: * dt = the #GDateTime. The new #GstDateTime takes ownership. * * Returns: a newly created #GstDateTime, * or %NULL on error * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GLibDateTime dt) { auto p = gst_date_time_new_from_g_date_time((dt is null) ? null : dt.getDateTimeStruct(true)); if(p is null) { throw new ConstructionException("null returned by new_from_g_date_time"); } this(cast(GstDateTime*) p); } /** * Tries to parse common variants of ISO-8601 datetime strings into a * #GstDateTime. Possible input formats are (for example): * 2012-06-30T22:46:43Z, 2012, 2012-06, 2012-06-30, 2012-06-30T22:46:43-0430, * 2012-06-30T22:46Z, 2012-06-30T22:46-0430, 2012-06-30 22:46, * 2012-06-30 22:46:43, 2012-06-00, 2012-00-00, 2012-00-30, 22:46:43Z, 22:46Z, * 22:46:43-0430, 22:46-0430, 22:46:30, 22:46 * If no date is provided, it is assumed to be "today" in the timezone * provided (if any), otherwise UTC. * * Free-function: gst_date_time_unref * * Params: * str = ISO 8601-formatted datetime string. * * Returns: a newly created #GstDateTime, * or %NULL on error * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string str) { auto p = gst_date_time_new_from_iso8601_string(Str.toStringz(str)); if(p is null) { throw new ConstructionException("null returned by new_from_iso8601_string"); } this(cast(GstDateTime*) p); } /** * Creates a new #GstDateTime using the date and times in the gregorian calendar * in the local timezone. * * @year should be from 1 to 9999, @month should be from 1 to 12, @day from * 1 to 31, @hour from 0 to 23, @minutes and @seconds from 0 to 59. * * If @month is -1, then the #GstDateTime created will only contain @year, * and all other fields will be considered not set. * * If @day is -1, then the #GstDateTime created will only contain @year and * @month and all other fields will be considered not set. * * If @hour is -1, then the #GstDateTime created will only contain @year and * @month and @day, and the time fields will be considered not set. In this * case @minute and @seconds should also be -1. * * Free-function: gst_date_time_unref * * Params: * year = the gregorian year * month = the gregorian month, or -1 * day = the day of the gregorian month, or -1 * hour = the hour of the day, or -1 * minute = the minute of the hour, or -1 * seconds = the second of the minute, or -1 * * Returns: the newly created #GstDateTime * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int year, int month, int day, int hour, int minute, double seconds) { auto p = gst_date_time_new_local_time(year, month, day, hour, minute, seconds); if(p is null) { throw new ConstructionException("null returned by new_local_time"); } this(cast(GstDateTime*) p); } /** * Creates a new #GstDateTime using the date and times in the gregorian calendar * in the local timezone. * * @year should be from 1 to 9999. * * Free-function: gst_date_time_unref * * Params: * year = the gregorian year * * Returns: the newly created #GstDateTime * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int year) { auto p = gst_date_time_new_y(year); if(p is null) { throw new ConstructionException("null returned by new_y"); } this(cast(GstDateTime*) p); } /** * Creates a new #GstDateTime using the date and times in the gregorian calendar * in the local timezone. * * @year should be from 1 to 9999, @month should be from 1 to 12. * * If value is -1 then all over value will be ignored. For example * if @month == -1, then #GstDateTime will created only for @year. * * Free-function: gst_date_time_unref * * Params: * year = the gregorian year * month = the gregorian month * * Returns: the newly created #GstDateTime * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int year, int month) { auto p = gst_date_time_new_ym(year, month); if(p is null) { throw new ConstructionException("null returned by new_ym"); } this(cast(GstDateTime*) p); } /** * Creates a new #GstDateTime using the date and times in the gregorian calendar * in the local timezone. * * @year should be from 1 to 9999, @month should be from 1 to 12, @day from * 1 to 31. * * If value is -1 then all over value will be ignored. For example * if @month == -1, then #GstDateTime will created only for @year. If * @day == -1, then #GstDateTime will created for @year and @month and * so on. * * Free-function: gst_date_time_unref * * Params: * year = the gregorian year * month = the gregorian month * day = the day of the gregorian month * * Returns: the newly created #GstDateTime * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int year, int month, int day) { auto p = gst_date_time_new_ymd(year, month, day); if(p is null) { throw new ConstructionException("null returned by new_ymd"); } this(cast(GstDateTime*) p); } /** * Returns the day of the month of this #GstDateTime. * Call gst_date_time_has_day before, to avoid warnings. * * Returns: The day of this #GstDateTime */ public int getDay() { return gst_date_time_get_day(gstDateTime); } /** * Retrieves the hour of the day represented by @datetime in the gregorian * calendar. The return is in the range of 0 to 23. * Call gst_date_time_has_haur before, to avoid warnings. * * Returns: the hour of the day */ public int getHour() { return gst_date_time_get_hour(gstDateTime); } /** * Retrieves the fractional part of the seconds in microseconds represented by * @datetime in the gregorian calendar. * * Returns: the microsecond of the second */ public int getMicrosecond() { return gst_date_time_get_microsecond(gstDateTime); } /** * Retrieves the minute of the hour represented by @datetime in the gregorian * calendar. * Call gst_date_time_has_minute before, to avoid warnings. * * Returns: the minute of the hour */ public int getMinute() { return gst_date_time_get_minute(gstDateTime); } /** * Returns the month of this #GstDateTime. January is 1, February is 2, etc.. * Call gst_date_time_has_month before, to avoid warnings. * * Returns: The month of this #GstDateTime */ public int getMonth() { return gst_date_time_get_month(gstDateTime); } /** * Retrieves the second of the minute represented by @datetime in the gregorian * calendar. * Call gst_date_time_has_second before, to avoid warnings. * * Returns: the second represented by @datetime */ public int getSecond() { return gst_date_time_get_second(gstDateTime); } /** * Retrieves the offset from UTC in hours that the timezone specified * by @datetime represents. Timezones ahead (to the east) of UTC have positive * values, timezones before (to the west) of UTC have negative values. * If @datetime represents UTC time, then the offset is zero. * * Returns: the offset from UTC in hours */ public float getTimeZoneOffset() { return gst_date_time_get_time_zone_offset(gstDateTime); } /** * Returns the year of this #GstDateTime * Call gst_date_time_has_year before, to avoid warnings. * * Returns: The year of this #GstDateTime */ public int getYear() { return gst_date_time_get_year(gstDateTime); } /** * Returns: %TRUE if @datetime's day field is set, otherwise %FALSE */ public bool hasDay() { return gst_date_time_has_day(gstDateTime) != 0; } /** * Returns: %TRUE if @datetime's month field is set, otherwise %FALSE */ public bool hasMonth() { return gst_date_time_has_month(gstDateTime) != 0; } /** * Returns: %TRUE if @datetime's second field is set, otherwise %FALSE */ public bool hasSecond() { return gst_date_time_has_second(gstDateTime) != 0; } /** * Returns: %TRUE if @datetime's hour and minute fields are set, * otherwise %FALSE */ public bool hasTime() { return gst_date_time_has_time(gstDateTime) != 0; } /** * Returns: %TRUE if @datetime's year field is set (which should always * be the case), otherwise %FALSE */ public bool hasYear() { return gst_date_time_has_year(gstDateTime) != 0; } /** * Atomically increments the reference count of @datetime by one. * * Returns: the reference @datetime */ public DateTime doref() { auto p = gst_date_time_ref(gstDateTime); if(p is null) { return null; } return ObjectG.getDObject!(DateTime)(cast(GstDateTime*) p, true); } /** * Creates a new #GDateTime from a fully defined #GstDateTime object. * * Free-function: g_date_time_unref * * Returns: a newly created #GDateTime, or * %NULL on error */ public GLibDateTime toGDateTime() { auto p = gst_date_time_to_g_date_time(gstDateTime); if(p is null) { return null; } return new GLibDateTime(cast(GDateTime*) p, true); } /** * Create a minimal string compatible with ISO-8601. Possible output formats * are (for example): 2012, 2012-06, 2012-06-23, 2012-06-23T23:30Z, * 2012-06-23T23:30+0100, 2012-06-23T23:30:59Z, 2012-06-23T23:30:59+0100 * * Returns: a newly allocated string formatted according * to ISO 8601 and only including the datetime fields that are * valid, or %NULL in case there was an error. The string should * be freed with g_free(). */ public string toIso8601String() { auto retStr = gst_date_time_to_iso8601_string(gstDateTime); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Atomically decrements the reference count of @datetime by one. When the * reference count reaches zero, the structure is freed. */ public void unref() { gst_date_time_unref(gstDateTime); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Debug.d000066400000000000000000000257621324604450400215100ustar00rootroot00000000000000/* * 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 gstreamer.Debug; private import glib.ListSG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Bin; private import gstreamer.DebugCategory; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public struct Debug { /** * Adds the logging function to the list of logging functions. * Be sure to use #G_GNUC_NO_INSTRUMENT on that function, it is needed. * * Params: * func = the function to use * userData = user data * notify = called when @user_data is not used anymore */ public static void addLogFunction(GstLogFunction func, void* userData, GDestroyNotify notify) { gst_debug_add_log_function(func, userData, notify); } /** */ public static string binToDotData(Bin bin, GstDebugGraphDetails details) { auto retStr = gst_debug_bin_to_dot_data((bin is null) ? null : bin.getBinStruct(), details); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** */ public static void binToDotFile(Bin bin, GstDebugGraphDetails details, string fileName) { gst_debug_bin_to_dot_file((bin is null) ? null : bin.getBinStruct(), details, Str.toStringz(fileName)); } /** */ public static void binToDotFileWithTs(Bin bin, GstDebugGraphDetails details, string fileName) { gst_debug_bin_to_dot_file_with_ts((bin is null) ? null : bin.getBinStruct(), details, Str.toStringz(fileName)); } /** * Constructs a string that can be used for getting the desired color in color * terminals. * You need to free the string after use. * * Params: * colorinfo = the color info * * Returns: a string containing the color * definition */ public static string constructTermColor(uint colorinfo) { auto retStr = gst_debug_construct_term_color(colorinfo); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Constructs an integer that can be used for getting the desired color in * windows' terminals (cmd.exe). As there is no mean to underline, we simply * ignore this attribute. * * This function returns 0 on non-windows machines. * * Params: * colorinfo = the color info * * Returns: an integer containing the color definition */ public static int constructWinColor(uint colorinfo) { return gst_debug_construct_win_color(colorinfo); } /** * Returns a snapshot of a all categories that are currently in use . This list * may change anytime. * The caller has to free the list after use. * * Returns: the list of * debug categories */ public static ListSG getAllCategories() { auto p = gst_debug_get_all_categories(); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Changes the coloring mode for debug output. * * Returns: see @GstDebugColorMode for possible values. * * Since: 1.2 */ public static GstDebugColorMode getColorMode() { return gst_debug_get_color_mode(); } /** * Returns the default threshold that is used for new categories. * * Returns: the default threshold level */ public static GstDebugLevel getDefaultThreshold() { return gst_debug_get_default_threshold(); } /** * Checks if debugging output is activated. * * Returns: %TRUE, if debugging is activated */ public static bool isActive() { return gst_debug_is_active() != 0; } /** * Checks if the debugging output should be colored. * * Returns: %TRUE, if the debug output should be colored. */ public static bool isColored() { return gst_debug_is_colored() != 0; } /** * Get the string representation of a debugging level * * Params: * level = the level to get the name for * * Returns: the name */ public static string levelGetName(GstDebugLevel level) { return Str.toString(gst_debug_level_get_name(level)); } /** * The default logging handler used by GStreamer. Logging functions get called * whenever a macro like GST_DEBUG or similar is used. By default this function * is setup to output the message and additional info to stderr (or the log file * specified via the GST_DEBUG_FILE environment variable) as received via * @user_data. * * You can add other handlers by using gst_debug_add_log_function(). * And you can remove this handler by calling * gst_debug_remove_log_function(gst_debug_log_default); * * Params: * category = category to log * level = level of the message * file = the file that emitted the message, usually the __FILE__ identifier * funct = the function that emitted the message * line = the line from that the message was emitted, usually __LINE__ * object = the object this message relates to, * or %NULL if none * message = the actual message * userData = the FILE* to log to */ public static void logDefault(DebugCategory category, GstDebugLevel level, string file, string funct, int line, ObjectG object, GstDebugMessage* message, void* userData) { gst_debug_log_default((category is null) ? null : category.getDebugCategoryStruct(), level, Str.toStringz(file), Str.toStringz(funct), line, (object is null) ? null : object.getObjectGStruct(), message, userData); } /** * Logs the given message using the currently registered debugging handlers. * * Params: * category = category to log * level = level of the message is in * file = the file that emitted the message, usually the __FILE__ identifier * funct = the function that emitted the message * line = the line from that the message was emitted, usually __LINE__ * object = the object this message relates to, * or %NULL if none * format = a printf style format string * args = optional arguments for the format */ public static void logValist(DebugCategory category, GstDebugLevel level, string file, string funct, int line, ObjectG object, string format, void* args) { gst_debug_log_valist((category is null) ? null : category.getDebugCategoryStruct(), level, Str.toStringz(file), Str.toStringz(funct), line, (object is null) ? null : object.getObjectGStruct(), Str.toStringz(format), args); } /** * If libunwind or glibc backtrace are present * a stack trace is printed. */ public static void printStackTrace() { gst_debug_print_stack_trace(); } /** * Removes all registered instances of the given logging functions. * * Params: * func = the log function to remove, or %NULL to * remove the default log function * * Returns: How many instances of the function were removed */ public static uint removeLogFunction(GstLogFunction func) { return gst_debug_remove_log_function(func); } /** * Removes all registered instances of log functions with the given user data. * * Params: * data = user data of the log function to remove * * Returns: How many instances of the function were removed */ public static uint removeLogFunctionByData(void* data) { return gst_debug_remove_log_function_by_data(data); } /** * If activated, debugging messages are sent to the debugging * handlers. * It makes sense to deactivate it for speed issues. * > This function is not threadsafe. It makes sense to only call it * during initialization. * * Params: * active = Whether to use debugging output or not */ public static void setActive(bool active) { gst_debug_set_active(active); } /** * Changes the coloring mode for debug output. * * This function may be called before gst_init(). * * Params: * mode = The coloring mode for debug output. See @GstDebugColorMode. * * Since: 1.2 */ public static void setColorMode(GstDebugColorMode mode) { gst_debug_set_color_mode(mode); } /** * Changes the coloring mode for debug output. * * This function may be called before gst_init(). * * Params: * mode = The coloring mode for debug output. One of the following: * "on", "auto", "off", "disable", "unix". * * Since: 1.2 */ public static void setColorModeFromString(string mode) { gst_debug_set_color_mode_from_string(Str.toStringz(mode)); } /** * Sets or unsets the use of coloured debugging output. * Same as gst_debug_set_color_mode () with the argument being * being GST_DEBUG_COLOR_MODE_ON or GST_DEBUG_COLOR_MODE_OFF. * * This function may be called before gst_init(). * * Params: * colored = Whether to use colored output or not */ public static void setColored(bool colored) { gst_debug_set_colored(colored); } /** * Sets the default threshold to the given level and updates all categories to * use this threshold. * * This function may be called before gst_init(). * * Params: * level = level to set */ public static void setDefaultThreshold(GstDebugLevel level) { gst_debug_set_default_threshold(level); } /** * Sets all categories which match the given glob style pattern to the given * level. * * Params: * name = name of the categories to set * level = level to set them to */ public static void setThresholdForName(string name, GstDebugLevel level) { gst_debug_set_threshold_for_name(Str.toStringz(name), level); } /** * Sets the debug logging wanted in the same form as with the GST_DEBUG * environment variable. You can use wildcards such as '*', but note that * the order matters when you use wild cards, e.g. "foosrc:6,*src:3,*:2" sets * everything to log level 2. * * Params: * list = comma-separated list of "category:level" pairs to be used * as debug logging levels * reset = %TRUE to clear all previously-set debug levels before setting * new thresholds * %FALSE if adding the threshold described by @list to the one already set. * * Since: 1.2 */ public static void setThresholdFromString(string list, bool reset) { gst_debug_set_threshold_from_string(Str.toStringz(list), reset); } /** * Resets all categories with the given name back to the default level. * * Params: * name = name of the categories to set */ public static void unsetThresholdForName(string name) { gst_debug_unset_threshold_for_name(Str.toStringz(name)); } } GtkD-3.7.5/generated/gstreamer/gstreamer/DebugCategory.d000066400000000000000000000100401324604450400231650ustar00rootroot00000000000000/* * 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 gstreamer.DebugCategory; private import glib.Str; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * This is the struct that describes the categories. Once initialized with * #GST_DEBUG_CATEGORY_INIT, its values can't be changed anymore. */ public class DebugCategory { /** the main Gtk struct */ protected GstDebugCategory* gstDebugCategory; protected bool ownedRef; /** Get the main Gtk struct */ public GstDebugCategory* getDebugCategoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstDebugCategory; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstDebugCategory; } /** * Sets our main struct and passes it to the parent class. */ public this (GstDebugCategory* gstDebugCategory, bool ownedRef = false) { this.gstDebugCategory = gstDebugCategory; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_debug_category_free(gstDebugCategory); } /** * Removes and frees the category and all associated resources. */ public void free() { gst_debug_category_free(gstDebugCategory); ownedRef = false; } /** * Returns the color of a debug category used when printing output in this * category. * * Returns: the color of the category. */ public uint getColor() { return gst_debug_category_get_color(gstDebugCategory); } /** * Returns the description of a debug category. * * Returns: the description of the category. */ public string getDescription() { return Str.toString(gst_debug_category_get_description(gstDebugCategory)); } /** * Returns the name of a debug category. * * Returns: the name of the category. */ public string getName() { return Str.toString(gst_debug_category_get_name(gstDebugCategory)); } /** * Returns the threshold of a #GstDebugCategory. * * Returns: the #GstDebugLevel that is used as threshold. */ public GstDebugLevel getThreshold() { return gst_debug_category_get_threshold(gstDebugCategory); } /** * Resets the threshold of the category to the default level. Debug information * will only be output if the threshold is lower or equal to the level of the * debugging message. * Use this function to set the threshold back to where it was after using * gst_debug_category_set_threshold(). */ public void resetThreshold() { gst_debug_category_reset_threshold(gstDebugCategory); } /** * Sets the threshold of the category to the given level. Debug information will * only be output if the threshold is lower or equal to the level of the * debugging message. * > Do not use this function in production code, because other functions may * > change the threshold of categories as side effect. It is however a nice * > function to use when debugging (even from gdb). * * Params: * level = the #GstDebugLevel threshold to set. */ public void setThreshold(GstDebugLevel level) { gst_debug_category_set_threshold(gstDebugCategory, level); } } GtkD-3.7.5/generated/gstreamer/gstreamer/DebugMessage.d000066400000000000000000000027211324604450400230030ustar00rootroot00000000000000/* * 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 gstreamer.DebugMessage; private import glib.Str; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public struct DebugMessage { /** * Gets the string representation of a #GstDebugMessage. This function is used * in debug handlers to extract the message. * * Returns: the string representation of a #GstDebugMessage. */ public static string get(GstDebugMessage* message) { return Str.toString(gst_debug_message_get(message)); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Device.d000066400000000000000000000157171324604450400216600ustar00rootroot00000000000000/* * 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 gstreamer.Device; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.Caps; private import gstreamer.Element; private import gstreamer.ObjectGst; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * #GstDevice are objects representing a device, they contain * relevant metadata about the device, such as its class and the #GstCaps * representing the media types it can produce or handle. * * #GstDevice are created by #GstDeviceProvider objects which can be * aggregated by #GstDeviceMonitor objects. * * Since: 1.4 */ public class Device : ObjectGst { /** the main Gtk struct */ protected GstDevice* gstDevice; /** Get the main Gtk struct */ public GstDevice* getDeviceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstDevice; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstDevice; } protected override void setStruct(GObject* obj) { gstDevice = cast(GstDevice*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstDevice* gstDevice, bool ownedRef = false) { this.gstDevice = gstDevice; super(cast(GstObject*)gstDevice, ownedRef); } /** */ public static GType getType() { return gst_device_get_type(); } /** * Creates the element with all of the required parameters set to use * this device. * * Params: * name = name of new element, or %NULL to automatically * create a unique name. * * Returns: a new #GstElement configured to use this device * * Since: 1.4 */ public Element createElement(string name) { auto p = gst_device_create_element(gstDevice, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); } /** * Getter for the #GstCaps that this device supports. * * Returns: The #GstCaps supported by this device. Unref with * gst_caps_unref() when done. * * Since: 1.4 */ public Caps getCaps() { auto p = gst_device_get_caps(gstDevice); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Gets the "class" of a device. This is a "/" separated list of * classes that represent this device. They are a subset of the * classes of the #GstDeviceProvider that produced this device. * * Returns: The device class. Free with g_free() after use. * * Since: 1.4 */ public string getDeviceClass() { auto retStr = gst_device_get_device_class(gstDevice); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the user-friendly name of the device. * * Returns: The device name. Free with g_free() after use. * * Since: 1.4 */ public string getDisplayName() { auto retStr = gst_device_get_display_name(gstDevice); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the extra properties of a device. * * Returns: The extra properties or %NULL when there are none. * Free with gst_structure_free() after use. * * Since: 1.6 */ public Structure getProperties() { auto p = gst_device_get_properties(gstDevice); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); } /** * Check if @device matches all of the given classes * * Params: * classes = a "/"-separated list of device classes to match, only match if * all classes are matched * * Returns: %TRUE if @device matches. * * Since: 1.4 */ public bool hasClasses(string classes) { return gst_device_has_classes(gstDevice, Str.toStringz(classes)) != 0; } /** * Check if @factory matches all of the given classes * * Params: * classes = a %NULL terminated array of classes * to match, only match if all classes are matched * * Returns: %TRUE if @device matches. * * Since: 1.4 */ public bool hasClassesv(string[] classes) { return gst_device_has_classesv(gstDevice, Str.toStringzArray(classes)) != 0; } /** * Tries to reconfigure an existing element to use the device. If this * function fails, then one must destroy the element and create a new one * using gst_device_create_element(). * * Note: This should only be implemented for elements can change their * device in the PLAYING state. * * Params: * element = a #GstElement * * Returns: %TRUE if the element could be reconfigured to use this device, * %FALSE otherwise. * * Since: 1.4 */ public bool reconfigureElement(Element element) { return gst_device_reconfigure_element(gstDevice, (element is null) ? null : element.getElementStruct()) != 0; } protected class OnRemovedDelegateWrapper { void delegate(Device) dlg; gulong handlerId; this(void delegate(Device) dlg) { this.dlg = dlg; onRemovedListeners ~= this; } void remove(OnRemovedDelegateWrapper source) { foreach(index, wrapper; onRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onRemovedListeners[index] = null; onRemovedListeners = std.algorithm.remove(onRemovedListeners, index); break; } } } } OnRemovedDelegateWrapper[] onRemovedListeners; /** */ gulong addOnRemoved(void delegate(Device) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "removed", cast(GCallback)&callBackRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackRemoved(GstDevice* deviceStruct, OnRemovedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackRemovedDestroy(OnRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/DeviceMonitor.d000066400000000000000000000176051324604450400232260ustar00rootroot00000000000000/* * 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 gstreamer.DeviceMonitor; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Bus; private import gstreamer.Caps; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Applications should create a #GstDeviceMonitor when they want * to probe, list and monitor devices of a specific type. The * #GstDeviceMonitor will create the appropriate * #GstDeviceProvider objects and manage them. It will then post * messages on its #GstBus for devices that have been added and * removed. * * The device monitor will monitor all devices matching the filters that * the application has set. * * The basic use pattern of a device monitor is as follows: * |[ * static gboolean * my_bus_func (GstBus * bus, GstMessage * message, gpointer user_data) * { * GstDevice *device; * gchar *name; * * switch (GST_MESSAGE_TYPE (message)) { * case GST_MESSAGE_DEVICE_ADDED: * gst_message_parse_device_added (message, &device); * name = gst_device_get_display_name (device); * g_print("Device added: %s\n", name); * g_free (name); * gst_object_unref (device); * break; * case GST_MESSAGE_DEVICE_REMOVED: * gst_message_parse_device_removed (message, &device); * name = gst_device_get_display_name (device); * g_print("Device removed: %s\n", name); * g_free (name); * gst_object_unref (device); * break; * default: * break; * } * * return G_SOURCE_CONTINUE; * } * * GstDeviceMonitor * * setup_raw_video_source_device_monitor (void) { * GstDeviceMonitor *monitor; * GstBus *bus; * GstCaps *caps; * * monitor = gst_device_monitor_new (); * * bus = gst_device_monitor_get_bus (monitor); * gst_bus_add_watch (bus, my_bus_func, NULL); * gst_object_unref (bus); * * caps = gst_caps_new_empty_simple ("video/x-raw"); * gst_device_monitor_add_filter (monitor, "Video/Source", caps); * gst_caps_unref (caps); * * gst_device_monitor_start (monitor); * * return monitor; * } * ]| * * Since: 1.4 */ public class DeviceMonitor : ObjectGst { /** the main Gtk struct */ protected GstDeviceMonitor* gstDeviceMonitor; /** Get the main Gtk struct */ public GstDeviceMonitor* getDeviceMonitorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstDeviceMonitor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstDeviceMonitor; } protected override void setStruct(GObject* obj) { gstDeviceMonitor = cast(GstDeviceMonitor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstDeviceMonitor* gstDeviceMonitor, bool ownedRef = false) { this.gstDeviceMonitor = gstDeviceMonitor; super(cast(GstObject*)gstDeviceMonitor, ownedRef); } /** */ public static GType getType() { return gst_device_monitor_get_type(); } /** * Create a new #GstDeviceMonitor * * Returns: a new device monitor. * * Since: 1.4 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_device_monitor_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstDeviceMonitor*) p, true); } /** * Adds a filter for which #GstDevice will be monitored, any device that matches * all these classes and the #GstCaps will be returned. * * If this function is called multiple times to add more filters, each will be * matched independently. That is, adding more filters will not further restrict * what devices are matched. * * The #GstCaps supported by the device as returned by gst_device_get_caps() are * not intersected with caps filters added using this function. * * Filters must be added before the #GstDeviceMonitor is started. * * Params: * classes = device classes to use as filter or %NULL for any class * caps = the #GstCaps to filter or %NULL for ANY * * Returns: The id of the new filter or 0 if no provider matched the filter's * classes. * * Since: 1.4 */ public uint addFilter(string classes, Caps caps) { return gst_device_monitor_add_filter(gstDeviceMonitor, Str.toStringz(classes), (caps is null) ? null : caps.getCapsStruct()); } /** * Gets the #GstBus of this #GstDeviceMonitor * * Returns: a #GstBus * * Since: 1.4 */ public Bus getBus() { auto p = gst_device_monitor_get_bus(gstDeviceMonitor); if(p is null) { return null; } return ObjectG.getDObject!(Bus)(cast(GstBus*) p, true); } /** * Gets a list of devices from all of the relevant monitors. This may actually * probe the hardware if the monitor is not currently started. * * Returns: a #GList of * #GstDevice * * Since: 1.4 */ public ListG getDevices() { auto p = gst_device_monitor_get_devices(gstDeviceMonitor); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Get a list of the currently selected device provider factories. * * This * * Returns: A list of device provider factory names that are currently being * monitored by @monitor or %NULL when nothing is being monitored. * * Since: 1.6 */ public string[] getProviders() { auto retStr = gst_device_monitor_get_providers(gstDeviceMonitor); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Get if @monitor is curretly showing all devices, even those from hidden * providers. * * Returns: %TRUE when all devices will be shown. * * Since: 1.6 */ public bool getShowAllDevices() { return gst_device_monitor_get_show_all_devices(gstDeviceMonitor) != 0; } /** * Removes a filter from the #GstDeviceMonitor using the id that was returned * by gst_device_monitor_add_filter(). * * Params: * filterId = the id of the filter * * Returns: %TRUE of the filter id was valid, %FALSE otherwise * * Since: 1.4 */ public bool removeFilter(uint filterId) { return gst_device_monitor_remove_filter(gstDeviceMonitor, filterId) != 0; } /** * Set if all devices should be visible, even those devices from hidden * providers. Setting @show_all to true might show some devices multiple times. * * Params: * showAll = show all devices * * Since: 1.6 */ public void setShowAllDevices(bool showAll) { gst_device_monitor_set_show_all_devices(gstDeviceMonitor, showAll); } /** * Starts monitoring the devices, one this has succeeded, the * %GST_MESSAGE_DEVICE_ADDED and %GST_MESSAGE_DEVICE_REMOVED messages * will be emitted on the bus when the list of devices changes. * * Returns: %TRUE if the device monitoring could be started * * Since: 1.4 */ public bool start() { return gst_device_monitor_start(gstDeviceMonitor) != 0; } /** * Stops monitoring the devices. * * Since: 1.4 */ public void stop() { gst_device_monitor_stop(gstDeviceMonitor); } } GtkD-3.7.5/generated/gstreamer/gstreamer/DeviceProvider.d000066400000000000000000000252511324604450400233650ustar00rootroot00000000000000/* * 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 gstreamer.DeviceProvider; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.Bus; private import gstreamer.Device; private import gstreamer.DeviceProviderFactory; private import gstreamer.ObjectGst; private import gstreamer.Plugin; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * A #GstDeviceProvider subclass is provided by a plugin that handles devices * if there is a way to programatically list connected devices. It can also * optionally provide updates to the list of connected devices. * * Each #GstDeviceProvider subclass is a singleton, a plugin should * normally provide a single subclass for all devices. * * Applications would normally use a #GstDeviceMonitor to monitor devices * from all relevant providers. * * Since: 1.4 */ public class DeviceProvider : ObjectGst { /** the main Gtk struct */ protected GstDeviceProvider* gstDeviceProvider; /** Get the main Gtk struct */ public GstDeviceProvider* getDeviceProviderStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstDeviceProvider; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstDeviceProvider; } protected override void setStruct(GObject* obj) { gstDeviceProvider = cast(GstDeviceProvider*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstDeviceProvider* gstDeviceProvider, bool ownedRef = false) { this.gstDeviceProvider = gstDeviceProvider; super(cast(GstObject*)gstDeviceProvider, ownedRef); } /** */ public static GType getType() { return gst_device_provider_get_type(); } /** * Create a new device providerfactory capable of instantiating objects of the * @type and add the factory to @plugin. * * Params: * plugin = #GstPlugin to register the device provider with, or %NULL for * a static device provider. * name = name of device providers of this type * rank = rank of device provider (higher rank means more importance when autoplugging) * type = GType of device provider to register * * Returns: %TRUE, if the registering succeeded, %FALSE on error * * Since: 1.4 */ public static bool register(Plugin plugin, string name, uint rank, GType type) { return gst_device_provider_register((plugin is null) ? null : plugin.getPluginStruct(), Str.toStringz(name), rank, type) != 0; } /** */ public bool canMonitor() { return gst_device_provider_can_monitor(gstDeviceProvider) != 0; } /** * Posts a message on the provider's #GstBus to inform applications that * a new device has been added. * * This is for use by subclasses. * * Params: * device = a #GstDevice that has been added * * Since: 1.4 */ public void deviceAdd(Device device) { gst_device_provider_device_add(gstDeviceProvider, (device is null) ? null : device.getDeviceStruct()); } /** * Posts a message on the provider's #GstBus to inform applications that * a device has been removed. * * This is for use by subclasses. * * Params: * device = a #GstDevice that has been removed * * Since: 1.4 */ public void deviceRemove(Device device) { gst_device_provider_device_remove(gstDeviceProvider, (device is null) ? null : device.getDeviceStruct()); } /** * Gets the #GstBus of this #GstDeviceProvider * * Returns: a #GstBus * * Since: 1.4 */ public Bus getBus() { auto p = gst_device_provider_get_bus(gstDeviceProvider); if(p is null) { return null; } return ObjectG.getDObject!(Bus)(cast(GstBus*) p, true); } /** * Gets a list of devices that this provider understands. This may actually * probe the hardware if the provider is not currently started. * * Returns: a #GList of * #GstDevice * * Since: 1.4 */ public ListG getDevices() { auto p = gst_device_provider_get_devices(gstDeviceProvider); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Retrieves the factory that was used to create this device provider. * * Returns: the #GstDeviceProviderFactory used for * creating this device provider. no refcounting is needed. * * Since: 1.4 */ public DeviceProviderFactory getFactory() { auto p = gst_device_provider_get_factory(gstDeviceProvider); if(p is null) { return null; } return ObjectG.getDObject!(DeviceProviderFactory)(cast(GstDeviceProviderFactory*) p); } /** * Get the provider factory names of the #GstDeviceProvider instances that * are hidden by @provider. * * Returns: a list of hidden providers factory names or %NULL when * nothing is hidden by @provider. Free with g_strfreev. * * Since: 1.6 */ public string[] getHiddenProviders() { auto retStr = gst_device_provider_get_hidden_providers(gstDeviceProvider); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Make @provider hide the devices from the factory with @name. * * This function is used when @provider will also provide the devices reported * by provider factory @name. A monitor should stop monitoring the * device provider with @name to avoid duplicate devices. * * Params: * name = a provider factory name * * Since: 1.6 */ public void hideProvider(string name) { gst_device_provider_hide_provider(gstDeviceProvider, Str.toStringz(name)); } /** * Starts providering the devices. This will cause #GST_MESSAGE_DEVICE_ADDED * and #GST_MESSAGE_DEVICE_REMOVED messages to be posted on the provider's bus * when devices are added or removed from the system. * * Since the #GstDeviceProvider is a singleton, * gst_device_provider_start() may already have been called by another * user of the object, gst_device_provider_stop() needs to be called the same * number of times. * * Returns: %TRUE if the device providering could be started * * Since: 1.4 */ public bool start() { return gst_device_provider_start(gstDeviceProvider) != 0; } /** * Decreases the use-count by one. If the use count reaches zero, this * #GstDeviceProvider will stop providering the devices. This needs to be * called the same number of times that gst_device_provider_start() was called. * * Since: 1.4 */ public void stop() { gst_device_provider_stop(gstDeviceProvider); } /** * Make @provider unhide the devices from factory @name. * * This function is used when @provider will no longer provide the devices * reported by provider factory @name. A monitor should start * monitoring the devices from provider factory @name in order to see * all devices again. * * Params: * name = a provider factory name * * Since: 1.6 */ public void unhideProvider(string name) { gst_device_provider_unhide_provider(gstDeviceProvider, Str.toStringz(name)); } protected class OnProviderHiddenDelegateWrapper { void delegate(string, DeviceProvider) dlg; gulong handlerId; this(void delegate(string, DeviceProvider) dlg) { this.dlg = dlg; onProviderHiddenListeners ~= this; } void remove(OnProviderHiddenDelegateWrapper source) { foreach(index, wrapper; onProviderHiddenListeners) { if (wrapper.handlerId == source.handlerId) { onProviderHiddenListeners[index] = null; onProviderHiddenListeners = std.algorithm.remove(onProviderHiddenListeners, index); break; } } } } OnProviderHiddenDelegateWrapper[] onProviderHiddenListeners; /** */ gulong addOnProviderHidden(void delegate(string, DeviceProvider) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnProviderHiddenDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "provider-hidden", cast(GCallback)&callBackProviderHidden, cast(void*)wrapper, cast(GClosureNotify)&callBackProviderHiddenDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackProviderHidden(GstDeviceProvider* deviceproviderStruct, char* object, OnProviderHiddenDelegateWrapper wrapper) { wrapper.dlg(Str.toString(object), wrapper.outer); } extern(C) static void callBackProviderHiddenDestroy(OnProviderHiddenDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnProviderUnhiddenDelegateWrapper { void delegate(string, DeviceProvider) dlg; gulong handlerId; this(void delegate(string, DeviceProvider) dlg) { this.dlg = dlg; onProviderUnhiddenListeners ~= this; } void remove(OnProviderUnhiddenDelegateWrapper source) { foreach(index, wrapper; onProviderUnhiddenListeners) { if (wrapper.handlerId == source.handlerId) { onProviderUnhiddenListeners[index] = null; onProviderUnhiddenListeners = std.algorithm.remove(onProviderUnhiddenListeners, index); break; } } } } OnProviderUnhiddenDelegateWrapper[] onProviderUnhiddenListeners; /** */ gulong addOnProviderUnhidden(void delegate(string, DeviceProvider) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnProviderUnhiddenDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "provider-unhidden", cast(GCallback)&callBackProviderUnhidden, cast(void*)wrapper, cast(GClosureNotify)&callBackProviderUnhiddenDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackProviderUnhidden(GstDeviceProvider* deviceproviderStruct, char* object, OnProviderUnhiddenDelegateWrapper wrapper) { wrapper.dlg(Str.toString(object), wrapper.outer); } extern(C) static void callBackProviderUnhiddenDestroy(OnProviderUnhiddenDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/DeviceProviderClass.d000066400000000000000000000130051324604450400243450ustar00rootroot00000000000000/* * 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 gstreamer.DeviceProviderClass; private import glib.Str; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * The structure of the base #GstDeviceProviderClass * * Since: 1.4 */ public class DeviceProviderClass { /** the main Gtk struct */ protected GstDeviceProviderClass* gstDeviceProviderClass; protected bool ownedRef; /** Get the main Gtk struct */ public GstDeviceProviderClass* getDeviceProviderClassStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstDeviceProviderClass; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstDeviceProviderClass; } /** * Sets our main struct and passes it to the parent class. */ public this (GstDeviceProviderClass* gstDeviceProviderClass, bool ownedRef = false) { this.gstDeviceProviderClass = gstDeviceProviderClass; this.ownedRef = ownedRef; } /** * Set @key with @value as metadata in @klass. * * Params: * key = the key to set * value = the value to set * * Since: 1.4 */ public void addMetadata(string key, string value) { gst_device_provider_class_add_metadata(gstDeviceProviderClass, Str.toStringz(key), Str.toStringz(value)); } /** * Set @key with @value as metadata in @klass. * * Same as gst_device_provider_class_add_metadata(), but @value must be a static string * or an inlined string, as it will not be copied. (GStreamer plugins will * be made resident once loaded, so this function can be used even from * dynamically loaded plugins.) * * Params: * key = the key to set * value = the value to set * * Since: 1.4 */ public void addStaticMetadata(string key, string value) { gst_device_provider_class_add_static_metadata(gstDeviceProviderClass, Str.toStringz(key), Str.toStringz(value)); } /** * Get metadata with @key in @klass. * * Params: * key = the key to get * * Returns: the metadata for @key. * * Since: 1.4 */ public string getMetadata(string key) { return Str.toString(gst_device_provider_class_get_metadata(gstDeviceProviderClass, Str.toStringz(key))); } /** * Sets the detailed information for a #GstDeviceProviderClass. * * > This function is for use in _class_init functions only. * * Params: * longname = The long English name of the device provider. E.g. "File Sink" * classification = String describing the type of device provider, as an * unordered list separated with slashes ('/'). See draft-klass.txt of the * design docs * for more details and common types. E.g: "Sink/File" * description = Sentence describing the purpose of the device provider. * E.g: "Write stream to a file" * author = Name and contact details of the author(s). Use \n to separate * multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>" * * Since: 1.4 */ public void setMetadata(string longname, string classification, string description, string author) { gst_device_provider_class_set_metadata(gstDeviceProviderClass, Str.toStringz(longname), Str.toStringz(classification), Str.toStringz(description), Str.toStringz(author)); } /** * Sets the detailed information for a #GstDeviceProviderClass. * * > This function is for use in _class_init functions only. * * Same as gst_device_provider_class_set_metadata(), but @longname, @classification, * @description, and @author must be static strings or inlined strings, as * they will not be copied. (GStreamer plugins will be made resident once * loaded, so this function can be used even from dynamically loaded plugins.) * * Params: * longname = The long English name of the element. E.g. "File Sink" * classification = String describing the type of element, as * an unordered list separated with slashes ('/'). See draft-klass.txt of the * design docs for more details and common types. E.g: "Sink/File" * description = Sentence describing the purpose of the * element. E.g: "Write stream to a file" * author = Name and contact details of the author(s). Use \n * to separate multiple author metadata. E.g: "Joe Bloggs <joe.blogs at * foo.com>" * * Since: 1.4 */ public void setStaticMetadata(string longname, string classification, string description, string author) { gst_device_provider_class_set_static_metadata(gstDeviceProviderClass, Str.toStringz(longname), Str.toStringz(classification), Str.toStringz(description), Str.toStringz(author)); } } GtkD-3.7.5/generated/gstreamer/gstreamer/DeviceProviderFactory.d000066400000000000000000000154771324604450400247260ustar00rootroot00000000000000/* * 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 gstreamer.DeviceProviderFactory; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.DeviceProvider; private import gstreamer.PluginFeature; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * #GstDeviceProviderFactory is used to create instances of device providers. A * GstDeviceProviderfactory can be added to a #GstPlugin as it is also a * #GstPluginFeature. * * Use the gst_device_provider_factory_find() and * gst_device_provider_factory_get() functions to create device * provider instances or use gst_device_provider_factory_get_by_name() as a * convenient shortcut. * * Since: 1.4 */ public class DeviceProviderFactory : PluginFeature { /** the main Gtk struct */ protected GstDeviceProviderFactory* gstDeviceProviderFactory; /** Get the main Gtk struct */ public GstDeviceProviderFactory* getDeviceProviderFactoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstDeviceProviderFactory; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstDeviceProviderFactory; } protected override void setStruct(GObject* obj) { gstDeviceProviderFactory = cast(GstDeviceProviderFactory*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstDeviceProviderFactory* gstDeviceProviderFactory, bool ownedRef = false) { this.gstDeviceProviderFactory = gstDeviceProviderFactory; super(cast(GstPluginFeature*)gstDeviceProviderFactory, ownedRef); } /** */ public static GType getType() { return gst_device_provider_factory_get_type(); } /** * Search for an device provider factory of the given name. Refs the returned * device provider factory; caller is responsible for unreffing. * * Params: * name = name of factory to find * * Returns: #GstDeviceProviderFactory if * found, %NULL otherwise * * Since: 1.4 */ public static DeviceProviderFactory find(string name) { auto p = gst_device_provider_factory_find(Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(DeviceProviderFactory)(cast(GstDeviceProviderFactory*) p, true); } /** * Returns the device provider of the type defined by the given device * provider factory. * * Params: * factoryname = a named factory to instantiate * * Returns: a #GstDeviceProvider or %NULL * if unable to create device provider * * Since: 1.4 */ public static DeviceProvider getByName(string factoryname) { auto p = gst_device_provider_factory_get_by_name(Str.toStringz(factoryname)); if(p is null) { return null; } return ObjectG.getDObject!(DeviceProvider)(cast(GstDeviceProvider*) p, true); } /** * Get a list of factories with a rank greater or equal to @minrank. * The list of factories is returned by decreasing rank. * * Params: * minrank = Minimum rank * * Returns: a #GList of #GstDeviceProviderFactory device providers. Use * gst_plugin_feature_list_free() after usage. * * Since: 1.4 */ public static ListG listGetDeviceProviders(GstRank minrank) { auto p = gst_device_provider_factory_list_get_device_providers(minrank); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Returns the device provider of the type defined by the given device * providerfactory. * * Returns: the #GstDeviceProvider or %NULL * if the device provider couldn't be created * * Since: 1.4 */ public DeviceProvider get() { auto p = gst_device_provider_factory_get(gstDeviceProviderFactory); if(p is null) { return null; } return ObjectG.getDObject!(DeviceProvider)(cast(GstDeviceProvider*) p, true); } /** * Get the #GType for device providers managed by this factory. The type can * only be retrieved if the device provider factory is loaded, which can be * assured with gst_plugin_feature_load(). * * Returns: the #GType for device providers managed by this factory. * * Since: 1.4 */ public GType getDeviceProviderType() { return gst_device_provider_factory_get_device_provider_type(gstDeviceProviderFactory); } /** * Get the metadata on @factory with @key. * * Params: * key = a key * * Returns: the metadata with @key on @factory or %NULL * when there was no metadata with the given @key. * * Since: 1.4 */ public string getMetadata(string key) { return Str.toString(gst_device_provider_factory_get_metadata(gstDeviceProviderFactory, Str.toStringz(key))); } /** * Get the available keys for the metadata on @factory. * * Returns: a %NULL-terminated array of key strings, or %NULL when there is no * metadata. Free with g_strfreev() when no longer needed. * * Since: 1.4 */ public string[] getMetadataKeys() { auto retStr = gst_device_provider_factory_get_metadata_keys(gstDeviceProviderFactory); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Check if @factory matches all of the given @classes * * Params: * classes = a "/" separate list of classes to match, only match * if all classes are matched * * Returns: %TRUE if @factory matches or if @classes is %NULL. * * Since: 1.4 */ public bool hasClasses(string classes) { return gst_device_provider_factory_has_classes(gstDeviceProviderFactory, Str.toStringz(classes)) != 0; } /** * Check if @factory matches all of the given classes * * Params: * classes = a %NULL terminated array * of classes to match, only match if all classes are matched * * Returns: %TRUE if @factory matches. * * Since: 1.4 */ public bool hasClassesv(string[] classes) { return gst_device_provider_factory_has_classesv(gstDeviceProviderFactory, Str.toStringzArray(classes)) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/DoubleRange.d000066400000000000000000000023151324604450400226360ustar00rootroot00000000000000/* * 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 gstreamer.DoubleRange; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class DoubleRange { /** */ public static GType getType() { return gst_double_range_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/DynamicTypeFactory.d000066400000000000000000000056011324604450400242260ustar00rootroot00000000000000/* * 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 gstreamer.DynamicTypeFactory; private import glib.Str; private import gstreamer.PluginFeature; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * #GstDynamicTypeFactory is used to represent a type that can be * automatically loaded the first time it is used. For example, * a non-standard type for use in caps fields. * * In general, applications and plugins don't need to use the factory * beyond registering the type in a plugin init function. Once that is * done, the type is stored in the registry, and ready as soon as the * registry is loaded. * * ## Registering a type for dynamic loading * * |[ * * static gboolean * plugin_init (GstPlugin * plugin) * { * return gst_dynamic_type_register (plugin, GST_TYPE_CUSTOM_CAPS_FIELD); * } * ]| */ public class DynamicTypeFactory : PluginFeature { /** the main Gtk struct */ protected GstDynamicTypeFactory* gstDynamicTypeFactory; /** Get the main Gtk struct */ public GstDynamicTypeFactory* getDynamicTypeFactoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstDynamicTypeFactory; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstDynamicTypeFactory; } protected override void setStruct(GObject* obj) { gstDynamicTypeFactory = cast(GstDynamicTypeFactory*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstDynamicTypeFactory* gstDynamicTypeFactory, bool ownedRef = false) { this.gstDynamicTypeFactory = gstDynamicTypeFactory; super(cast(GstPluginFeature*)gstDynamicTypeFactory, ownedRef); } /** */ public static GType getType() { return gst_dynamic_type_factory_get_type(); } /** */ public static GType load(string factoryname) { return gst_dynamic_type_factory_load(Str.toStringz(factoryname)); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Element.d000066400000000000000000001464641324604450400220560ustar00rootroot00000000000000/* * 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 gstreamer.Element; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gobject.Type; private import gobject.c.functions; private import gstreamer.Bus; private import gstreamer.Caps; private import gstreamer.Clock; private import gstreamer.Context; private import gstreamer.ElementFactory; private import gstreamer.Event; private import gstreamer.Iterator; private import gstreamer.Message; private import gstreamer.ObjectGst; private import gstreamer.Pad; private import gstreamer.PadTemplate; private import gstreamer.Plugin; private import gstreamer.Query; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * GstElement is the abstract base class needed to construct an element that * can be used in a GStreamer pipeline. Please refer to the plugin writers * guide for more information on creating #GstElement subclasses. * * The name of a #GstElement can be get with gst_element_get_name() and set with * gst_element_set_name(). For speed, GST_ELEMENT_NAME() can be used in the * core when using the appropriate locking. Do not use this in plug-ins or * applications in order to retain ABI compatibility. * * Elements can have pads (of the type #GstPad). These pads link to pads on * other elements. #GstBuffer flow between these linked pads. * A #GstElement has a #GList of #GstPad structures for all their input (or sink) * and output (or source) pads. * Core and plug-in writers can add and remove pads with gst_element_add_pad() * and gst_element_remove_pad(). * * An existing pad of an element can be retrieved by name with * gst_element_get_static_pad(). A new dynamic pad can be created using * gst_element_request_pad() with a #GstPadTemplate. * An iterator of all pads can be retrieved with gst_element_iterate_pads(). * * Elements can be linked through their pads. * If the link is straightforward, use the gst_element_link() * convenience function to link two elements, or gst_element_link_many() * for more elements in a row. * Use gst_element_link_filtered() to link two elements constrained by * a specified set of #GstCaps. * For finer control, use gst_element_link_pads() and * gst_element_link_pads_filtered() to specify the pads to link on * each element by name. * * Each element has a state (see #GstState). You can get and set the state * of an element with gst_element_get_state() and gst_element_set_state(). * Setting a state triggers a #GstStateChange. To get a string representation * of a #GstState, use gst_element_state_get_name(). * * You can get and set a #GstClock on an element using gst_element_get_clock() * and gst_element_set_clock(). * Some elements can provide a clock for the pipeline if * the #GST_ELEMENT_FLAG_PROVIDE_CLOCK flag is set. With the * gst_element_provide_clock() method one can retrieve the clock provided by * such an element. * Not all elements require a clock to operate correctly. If the * #GST_ELEMENT_FLAG_REQUIRE_CLOCK() flag is set, a clock should be set on the * element with gst_element_set_clock(). * * Note that clock selection and distribution is normally handled by the * toplevel #GstPipeline so the clock functions are only to be used in very * specific situations. */ public class Element : ObjectGst { /** the main Gtk struct */ protected GstElement* gstElement; /** Get the main Gtk struct */ public GstElement* getElementStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstElement; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstElement; } protected override void setStruct(GObject* obj) { gstElement = cast(GstElement*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstElement* gstElement, bool ownedRef = false) { this.gstElement = gstElement; super(cast(GstObject*)gstElement, ownedRef); } /** * Queries an element for the stream position. * This is a convenience function for gstreamerD. * Returns: * The current position in nanoseconds - GstFormat.TIME. */ public long queryPosition() { GstFormat form = GstFormat.TIME; long cur_pos; queryPosition( form, cur_pos ); return cur_pos; } /** * Queries an element for the stream duration. * This is a convenience function for gstreamerD. * Returns: * The duration in nanoseconds - GstFormat.TIME. */ public long queryDuration() { GstFormat form = GstFormat.TIME; long cur_dur; queryDuration( form, cur_dur ); return cur_dur; } /** * This set's the filename for a filesrc element. */ public void location( string set ) { //g_object_set( G_OBJECT(getElementStruct()), "location", set, NULL); setProperty("location", set); } /** * Set the caps property of an Element. */ void caps( Caps cp ) { g_object_set( getElementStruct(), Str.toStringz("caps"), cp.getCapsStruct(), null ); } /** * For your convenience in gstreamerD: you can seek to the * position of the pipeline measured in time_nanoseconds. */ public int seek( long time_nanoseconds ) //gint64 { return seek( 1.0, GstFormat.TIME, GstSeekFlags.FLUSH, GstSeekType.SET, time_nanoseconds, GstSeekType.NONE, GST_CLOCK_TIME_NONE); } /** * Get's all the pads from an element in a Pad[]. */ public Pad[] pads() { Pad[] result; GValue* pad = g_value_init(new GValue(), Pad.getType()); GstIterator* iter = gst_element_iterate_pads(gstElement); while ( gst_iterator_next(iter, pad) == GstIteratorResult.OK ) { result ~= ObjectG.getDObject!(Pad)(cast(GstPad*)g_value_get_object(pad)); g_value_reset(pad); } g_value_unset(pad); return result; } /** */ /** */ public static GType getType() { return gst_element_get_type(); } /** * Creates an element for handling the given URI. * * Params: * type = Whether to create a source or a sink * uri = URI to create an element for * elementname = Name of created element, can be %NULL. * * Returns: a new element or %NULL if none could be created * * Throws: GException on failure. */ public static Element makeFromUri(GstURIType type, string uri, string elementname) { GError* err = null; auto p = gst_element_make_from_uri(type, Str.toStringz(uri), Str.toStringz(elementname), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p); } /** * Create a new elementfactory capable of instantiating objects of the * @type and add the factory to @plugin. * * Params: * plugin = #GstPlugin to register the element with, or %NULL for * a static element. * name = name of elements of this type * rank = rank of element (higher rank means more importance when autoplugging) * type = GType of element to register * * Returns: %TRUE, if the registering succeeded, %FALSE on error */ public static bool register(Plugin plugin, string name, uint rank, GType type) { return gst_element_register((plugin is null) ? null : plugin.getPluginStruct(), Str.toStringz(name), rank, type) != 0; } /** * Gets a string representing the given state change result. * * Params: * stateRet = a #GstStateChangeReturn to get the name of. * * Returns: a string with the name of the state * result. */ public static string stateChangeReturnGetName(GstStateChangeReturn stateRet) { return Str.toString(gst_element_state_change_return_get_name(stateRet)); } /** * Gets a string representing the given state. * * Params: * state = a #GstState to get the name of. * * Returns: a string with the name of the state. */ public static string stateGetName(GstState state) { return Str.toString(gst_element_state_get_name(state)); } /** * Abort the state change of the element. This function is used * by elements that do asynchronous state changes and find out * something is wrong. * * This function should be called with the STATE_LOCK held. * * MT safe. */ public void abortState() { gst_element_abort_state(gstElement); } /** * Adds a pad (link point) to @element. @pad's parent will be set to @element; * see gst_object_set_parent() for refcounting information. * * Pads are not automatically activated so elements should perform the needed * steps to activate the pad in case this pad is added in the PAUSED or PLAYING * state. See gst_pad_set_active() for more information about activating pads. * * The pad and the element should be unlocked when calling this function. * * This function will emit the #GstElement::pad-added signal on the element. * * Params: * pad = the #GstPad to add to the element. * * Returns: %TRUE if the pad could be added. This function can fail when * a pad with the same name already existed or the pad already had another * parent. * * MT safe. */ public bool addPad(Pad pad) { return gst_element_add_pad(gstElement, (pad is null) ? null : pad.getPadStruct()) != 0; } /** * * Params: * propertyName = name of property to watch for changes, or * NULL to watch all properties * includeValue = whether to include the new property value in the message * Returns: a watch id, which can be used in connection with * gst_element_remove_property_notify_watch() to remove the watch again. * * Since: 1.10 */ public gulong addPropertyDeepNotifyWatch(string propertyName, bool includeValue) { return gst_element_add_property_deep_notify_watch(gstElement, Str.toStringz(propertyName), includeValue); } /** * * Params: * propertyName = name of property to watch for changes, or * NULL to watch all properties * includeValue = whether to include the new property value in the message * Returns: a watch id, which can be used in connection with * gst_element_remove_property_notify_watch() to remove the watch again. * * Since: 1.10 */ public gulong addPropertyNotifyWatch(string propertyName, bool includeValue) { return gst_element_add_property_notify_watch(gstElement, Str.toStringz(propertyName), includeValue); } /** * Calls @func from another thread and passes @user_data to it. This is to be * used for cases when a state change has to be performed from a streaming * thread, directly via gst_element_set_state() or indirectly e.g. via SEEK * events. * * Calling those functions directly from the streaming thread will cause * deadlocks in many situations, as they might involve waiting for the * streaming thread to shut down from this very streaming thread. * * MT safe. * * Params: * func = Function to call asynchronously from another thread * userData = Data to pass to @func * destroyNotify = GDestroyNotify for @user_data * * Since: 1.10 */ public void callAsync(GstElementCallAsyncFunc func, void* userData, GDestroyNotify destroyNotify) { gst_element_call_async(gstElement, func, userData, destroyNotify); } /** * Perform @transition on @element. * * This function must be called with STATE_LOCK held and is mainly used * internally. * * Params: * transition = the requested transition * * Returns: the #GstStateChangeReturn of the state transition. */ public GstStateChangeReturn changeState(GstStateChange transition) { return gst_element_change_state(gstElement, transition); } /** * Commit the state change of the element and proceed to the next * pending state if any. This function is used * by elements that do asynchronous state changes. * The core will normally call this method automatically when an * element returned %GST_STATE_CHANGE_SUCCESS from the state change function. * * If after calling this method the element still has not reached * the pending state, the next state change is performed. * * This method is used internally and should normally not be called by plugins * or applications. * * Params: * ret = The previous state return value * * Returns: The result of the commit state change. * * MT safe. */ public GstStateChangeReturn continueState(GstStateChangeReturn ret) { return gst_element_continue_state(gstElement, ret); } /** * Creates a pad for each pad template that is always available. * This function is only useful during object initialization of * subclasses of #GstElement. */ public void createAllPads() { gst_element_create_all_pads(gstElement); } /** * Returns the base time of the element. The base time is the * absolute time of the clock when this element was last put to * PLAYING. Subtracting the base time from the clock time gives * the running time of the element. * * Returns: the base time of the element. * * MT safe. */ public GstClockTime getBaseTime() { return gst_element_get_base_time(gstElement); } /** * Returns the bus of the element. Note that only a #GstPipeline will provide a * bus for the application. * * Returns: the element's #GstBus. unref after usage. * * MT safe. */ public Bus getBus() { auto p = gst_element_get_bus(gstElement); if(p is null) { return null; } return ObjectG.getDObject!(Bus)(cast(GstBus*) p, true); } /** * Gets the currently configured clock of the element. This is the clock as was * last set with gst_element_set_clock(). * * Elements in a pipeline will only have their clock set when the * pipeline is in the PLAYING state. * * Returns: the #GstClock of the element. unref after usage. * * MT safe. */ public Clock getClock() { auto p = gst_element_get_clock(gstElement); if(p is null) { return null; } return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); } /** * Looks for an unlinked pad to which the given pad can link. It is not * guaranteed that linking the pads will work, though it should work in most * cases. * * This function will first attempt to find a compatible unlinked ALWAYS pad, * and if none can be found, it will request a compatible REQUEST pad by looking * at the templates of @element. * * Params: * pad = the #GstPad to find a compatible one for. * caps = the #GstCaps to use as a filter. * * Returns: the #GstPad to which a link * can be made, or %NULL if one cannot be found. gst_object_unref() * after usage. */ public Pad getCompatiblePad(Pad pad, Caps caps) { auto p = gst_element_get_compatible_pad(gstElement, (pad is null) ? null : pad.getPadStruct(), (caps is null) ? null : caps.getCapsStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); } /** * Retrieves a pad template from @element that is compatible with @compattempl. * Pads from compatible templates can be linked together. * * Params: * compattempl = the #GstPadTemplate to find a compatible * template for * * Returns: a compatible #GstPadTemplate, * or %NULL if none was found. No unreferencing is necessary. */ public PadTemplate getCompatiblePadTemplate(PadTemplate compattempl) { auto p = gst_element_get_compatible_pad_template(gstElement, (compattempl is null) ? null : compattempl.getPadTemplateStruct()); if(p is null) { return null; } return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) p); } /** * Gets the context with @context_type set on the element or NULL. * * MT safe. * * Params: * contextType = a name of a context to retrieve * * Returns: A #GstContext or NULL * * Since: 1.8 */ public Context getContext(string contextType) { auto p = gst_element_get_context(gstElement, Str.toStringz(contextType)); if(p is null) { return null; } return ObjectG.getDObject!(Context)(cast(GstContext*) p, true); } /** * Gets the context with @context_type set on the element or NULL. * * Params: * contextType = a name of a context to retrieve * * Returns: A #GstContext or NULL * * Since: 1.8 */ public Context getContextUnlocked(string contextType) { auto p = gst_element_get_context_unlocked(gstElement, Str.toStringz(contextType)); if(p is null) { return null; } return ObjectG.getDObject!(Context)(cast(GstContext*) p, true); } /** * Gets the contexts set on the element. * * MT safe. * * Returns: List of #GstContext * * Since: 1.8 */ public ListG getContexts() { auto p = gst_element_get_contexts(gstElement); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Retrieves the factory that was used to create this element. * * Returns: the #GstElementFactory used for creating this * element. no refcounting is needed. */ public ElementFactory getFactory() { auto p = gst_element_get_factory(gstElement); if(p is null) { return null; } return ObjectG.getDObject!(ElementFactory)(cast(GstElementFactory*) p); } /** * Retrieves a pad from the element by name (e.g. "src_\%d"). This version only * retrieves request pads. The pad should be released with * gst_element_release_request_pad(). * * This method is slower than manually getting the pad template and calling * gst_element_request_pad() if the pads should have a specific name (e.g. * @name is "src_1" instead of "src_\%u"). * * Params: * name = the name of the request #GstPad to retrieve. * * Returns: requested #GstPad if found, * otherwise %NULL. Release after usage. */ public Pad getRequestPad(string name) { auto p = gst_element_get_request_pad(gstElement, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); } /** * Returns the start time of the element. The start time is the * running time of the clock when this element was last put to PAUSED. * * Usually the start_time is managed by a toplevel element such as * #GstPipeline. * * MT safe. * * Returns: the start time of the element. */ public GstClockTime getStartTime() { return gst_element_get_start_time(gstElement); } /** * Gets the state of the element. * * For elements that performed an ASYNC state change, as reported by * gst_element_set_state(), this function will block up to the * specified timeout value for the state change to complete. * If the element completes the state change or goes into * an error, this function returns immediately with a return value of * %GST_STATE_CHANGE_SUCCESS or %GST_STATE_CHANGE_FAILURE respectively. * * For elements that did not return %GST_STATE_CHANGE_ASYNC, this function * returns the current and pending state immediately. * * This function returns %GST_STATE_CHANGE_NO_PREROLL if the element * successfully changed its state but is not able to provide data yet. * This mostly happens for live sources that only produce data in * %GST_STATE_PLAYING. While the state change return is equivalent to * %GST_STATE_CHANGE_SUCCESS, it is returned to the application to signal that * some sink elements might not be able to complete their state change because * an element is not producing data to complete the preroll. When setting the * element to playing, the preroll will complete and playback will start. * * Params: * state = a pointer to #GstState to hold the state. * Can be %NULL. * pending = a pointer to #GstState to hold the pending * state. Can be %NULL. * timeout = a #GstClockTime to specify the timeout for an async * state change or %GST_CLOCK_TIME_NONE for infinite timeout. * * Returns: %GST_STATE_CHANGE_SUCCESS if the element has no more pending state * and the last state change succeeded, %GST_STATE_CHANGE_ASYNC if the * element is still performing a state change or * %GST_STATE_CHANGE_FAILURE if the last state change failed. * * MT safe. */ public GstStateChangeReturn getState(out GstState state, out GstState pending, GstClockTime timeout) { return gst_element_get_state(gstElement, &state, &pending, timeout); } /** * Retrieves a pad from @element by name. This version only retrieves * already-existing (i.e. 'static') pads. * * Params: * name = the name of the static #GstPad to retrieve. * * Returns: the requested #GstPad if * found, otherwise %NULL. unref after usage. * * MT safe. */ public Pad getStaticPad(string name) { auto p = gst_element_get_static_pad(gstElement, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); } /** * Checks if the state of an element is locked. * If the state of an element is locked, state changes of the parent don't * affect the element. * This way you can leave currently unused elements inside bins. Just lock their * state before changing the state from #GST_STATE_NULL. * * MT safe. * * Returns: %TRUE, if the element's state is locked. */ public bool isLockedState() { return gst_element_is_locked_state(gstElement) != 0; } /** * Retrieves an iterator of @element's pads. The iterator should * be freed after usage. Also more specialized iterators exists such as * gst_element_iterate_src_pads() or gst_element_iterate_sink_pads(). * * The order of pads returned by the iterator will be the order in which * the pads were added to the element. * * Returns: the #GstIterator of #GstPad. * * MT safe. */ public Iterator iteratePads() { auto p = gst_element_iterate_pads(gstElement); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Retrieves an iterator of @element's sink pads. * * The order of pads returned by the iterator will be the order in which * the pads were added to the element. * * Returns: the #GstIterator of #GstPad. * * MT safe. */ public Iterator iterateSinkPads() { auto p = gst_element_iterate_sink_pads(gstElement); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Retrieves an iterator of @element's source pads. * * The order of pads returned by the iterator will be the order in which * the pads were added to the element. * * Returns: the #GstIterator of #GstPad. * * MT safe. */ public Iterator iterateSrcPads() { auto p = gst_element_iterate_src_pads(gstElement); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Links @src to @dest. The link must be from source to * destination; the other direction will not be tried. The function looks for * existing pads that aren't linked yet. It will request new pads if necessary. * Such pads need to be released manually when unlinking. * If multiple links are possible, only one is established. * * Make sure you have added your elements to a bin or pipeline with * gst_bin_add() before trying to link them. * * Params: * dest = the #GstElement containing the destination pad. * * Returns: %TRUE if the elements could be linked, %FALSE otherwise. */ public bool link(Element dest) { return gst_element_link(gstElement, (dest is null) ? null : dest.getElementStruct()) != 0; } /** * Links @src to @dest using the given caps as filtercaps. * The link must be from source to * destination; the other direction will not be tried. The function looks for * existing pads that aren't linked yet. It will request new pads if necessary. * If multiple links are possible, only one is established. * * Make sure you have added your elements to a bin or pipeline with * gst_bin_add() before trying to link them. * * Params: * dest = the #GstElement containing the destination pad. * filter = the #GstCaps to filter the link, * or %NULL for no filter. * * Returns: %TRUE if the pads could be linked, %FALSE otherwise. */ public bool linkFiltered(Element dest, Caps filter) { return gst_element_link_filtered(gstElement, (dest is null) ? null : dest.getElementStruct(), (filter is null) ? null : filter.getCapsStruct()) != 0; } /** * Links the two named pads of the source and destination elements. * Side effect is that if one of the pads has no parent, it becomes a * child of the parent of the other element. If they have different * parents, the link fails. * * Params: * srcpadname = the name of the #GstPad in source element * or %NULL for any pad. * dest = the #GstElement containing the destination pad. * destpadname = the name of the #GstPad in destination element, * or %NULL for any pad. * * Returns: %TRUE if the pads could be linked, %FALSE otherwise. */ public bool linkPads(string srcpadname, Element dest, string destpadname) { return gst_element_link_pads(gstElement, Str.toStringz(srcpadname), (dest is null) ? null : dest.getElementStruct(), Str.toStringz(destpadname)) != 0; } /** * Links the two named pads of the source and destination elements. Side effect * is that if one of the pads has no parent, it becomes a child of the parent of * the other element. If they have different parents, the link fails. If @caps * is not %NULL, makes sure that the caps of the link is a subset of @caps. * * Params: * srcpadname = the name of the #GstPad in source element * or %NULL for any pad. * dest = the #GstElement containing the destination pad. * destpadname = the name of the #GstPad in destination element * or %NULL for any pad. * filter = the #GstCaps to filter the link, * or %NULL for no filter. * * Returns: %TRUE if the pads could be linked, %FALSE otherwise. */ public bool linkPadsFiltered(string srcpadname, Element dest, string destpadname, Caps filter) { return gst_element_link_pads_filtered(gstElement, Str.toStringz(srcpadname), (dest is null) ? null : dest.getElementStruct(), Str.toStringz(destpadname), (filter is null) ? null : filter.getCapsStruct()) != 0; } /** * Links the two named pads of the source and destination elements. * Side effect is that if one of the pads has no parent, it becomes a * child of the parent of the other element. If they have different * parents, the link fails. * * Calling gst_element_link_pads_full() with @flags == %GST_PAD_LINK_CHECK_DEFAULT * is the same as calling gst_element_link_pads() and the recommended way of * linking pads with safety checks applied. * * This is a convenience function for gst_pad_link_full(). * * Params: * srcpadname = the name of the #GstPad in source element * or %NULL for any pad. * dest = the #GstElement containing the destination pad. * destpadname = the name of the #GstPad in destination element, * or %NULL for any pad. * flags = the #GstPadLinkCheck to be performed when linking pads. * * Returns: %TRUE if the pads could be linked, %FALSE otherwise. */ public bool linkPadsFull(string srcpadname, Element dest, string destpadname, GstPadLinkCheck flags) { return gst_element_link_pads_full(gstElement, Str.toStringz(srcpadname), (dest is null) ? null : dest.getElementStruct(), Str.toStringz(destpadname), flags) != 0; } /** * Brings the element to the lost state. The current state of the * element is copied to the pending state so that any call to * gst_element_get_state() will return %GST_STATE_CHANGE_ASYNC. * * An ASYNC_START message is posted. If the element was PLAYING, it will * go to PAUSED. The element will be restored to its PLAYING state by * the parent pipeline when it prerolls again. * * This is mostly used for elements that lost their preroll buffer * in the %GST_STATE_PAUSED or %GST_STATE_PLAYING state after a flush, * they will go to their pending state again when a new preroll buffer is * queued. This function can only be called when the element is currently * not in error or an async state change. * * This function is used internally and should normally not be called from * plugins or applications. */ public void lostState() { gst_element_lost_state(gstElement); } /** * Post an error, warning or info message on the bus from inside an element. * * @type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or * #GST_MESSAGE_INFO. * * MT safe. * * Params: * type = the #GstMessageType * domain = the GStreamer GError domain this message belongs to * code = the GError code belonging to the domain * text = an allocated text string to be used * as a replacement for the default message connected to code, * or %NULL * dbg = an allocated debug message to be * used as a replacement for the default debugging information, * or %NULL * file = the source code file where the error was generated * funct = the source code function where the error was generated * line = the source code line where the error was generated */ public void messageFull(GstMessageType type, GQuark domain, int code, string text, string dbg, string file, string funct, int line) { gst_element_message_full(gstElement, type, domain, code, Str.toStringz(text), Str.toStringz(dbg), Str.toStringz(file), Str.toStringz(funct), line); } /** * Post an error, warning or info message on the bus from inside an element. * * @type must be of #GST_MESSAGE_ERROR, #GST_MESSAGE_WARNING or * #GST_MESSAGE_INFO. * * Params: * type = the #GstMessageType * domain = the GStreamer GError domain this message belongs to * code = the GError code belonging to the domain * text = an allocated text string to be used * as a replacement for the default message connected to code, * or %NULL * dbg = an allocated debug message to be * used as a replacement for the default debugging information, * or %NULL * file = the source code file where the error was generated * funct = the source code function where the error was generated * line = the source code line where the error was generated * structure = optional details structure * * Since: 1.10 */ public void messageFullWithDetails(GstMessageType type, GQuark domain, int code, string text, string dbg, string file, string funct, int line, Structure structure) { gst_element_message_full_with_details(gstElement, type, domain, code, Str.toStringz(text), Str.toStringz(dbg), Str.toStringz(file), Str.toStringz(funct), line, (structure is null) ? null : structure.getStructureStruct(true)); } /** * Use this function to signal that the element does not expect any more pads * to show up in the current pipeline. This function should be called whenever * pads have been added by the element itself. Elements with #GST_PAD_SOMETIMES * pad templates use this in combination with autopluggers to figure out that * the element is done initializing its pads. * * This function emits the #GstElement::no-more-pads signal. * * MT safe. */ public void noMorePads() { gst_element_no_more_pads(gstElement); } /** * Post a message on the element's #GstBus. This function takes ownership of the * message; if you want to access the message after this call, you should add an * additional reference before calling. * * Params: * message = a #GstMessage to post * * Returns: %TRUE if the message was successfully posted. The function returns * %FALSE if the element did not have a bus. * * MT safe. */ public bool postMessage(Message message) { return gst_element_post_message(gstElement, (message is null) ? null : message.getMessageStruct()) != 0; } /** * Get the clock provided by the given element. * > An element is only required to provide a clock in the PAUSED * > state. Some elements can provide a clock in other states. * * Returns: the GstClock provided by the * element or %NULL if no clock could be provided. Unref after usage. * * MT safe. */ public Clock provideClock() { auto p = gst_element_provide_clock(gstElement); if(p is null) { return null; } return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); } /** * Performs a query on the given element. * * For elements that don't implement a query handler, this function * forwards the query to a random srcpad or to the peer of a * random linked sinkpad of this element. * * Please note that some queries might need a running pipeline to work. * * Params: * query = the #GstQuery. * * Returns: %TRUE if the query could be performed. * * MT safe. */ public bool query(Query query) { return gst_element_query(gstElement, (query is null) ? null : query.getQueryStruct()) != 0; } /** * Queries an element to convert @src_val in @src_format to @dest_format. * * Params: * srcFormat = a #GstFormat to convert from. * srcVal = a value to convert. * destFormat = the #GstFormat to convert to. * destVal = a pointer to the result. * * Returns: %TRUE if the query could be performed. */ public bool queryConvert(GstFormat srcFormat, long srcVal, GstFormat destFormat, out long destVal) { return gst_element_query_convert(gstElement, srcFormat, srcVal, destFormat, &destVal) != 0; } /** * Queries an element (usually top-level pipeline or playbin element) for the * total stream duration in nanoseconds. This query will only work once the * pipeline is prerolled (i.e. reached PAUSED or PLAYING state). The application * will receive an ASYNC_DONE message on the pipeline bus when that is the case. * * If the duration changes for some reason, you will get a DURATION_CHANGED * message on the pipeline bus, in which case you should re-query the duration * using this function. * * Params: * format = the #GstFormat requested * duration = A location in which to store the total duration, or %NULL. * * Returns: %TRUE if the query could be performed. */ public bool queryDuration(GstFormat format, out long duration) { return gst_element_query_duration(gstElement, format, &duration) != 0; } /** * Queries an element (usually top-level pipeline or playbin element) for the * stream position in nanoseconds. This will be a value between 0 and the * stream duration (if the stream duration is known). This query will usually * only work once the pipeline is prerolled (i.e. reached PAUSED or PLAYING * state). The application will receive an ASYNC_DONE message on the pipeline * bus when that is the case. * * If one repeatedly calls this function one can also create a query and reuse * it in gst_element_query(). * * Params: * format = the #GstFormat requested * cur = a location in which to store the current * position, or %NULL. * * Returns: %TRUE if the query could be performed. */ public bool queryPosition(GstFormat format, out long cur) { return gst_element_query_position(gstElement, format, &cur) != 0; } /** * Makes the element free the previously requested pad as obtained * with gst_element_request_pad(). * * This does not unref the pad. If the pad was created by using * gst_element_request_pad(), gst_element_release_request_pad() needs to be * followed by gst_object_unref() to free the @pad. * * MT safe. * * Params: * pad = the #GstPad to release. */ public void releaseRequestPad(Pad pad) { gst_element_release_request_pad(gstElement, (pad is null) ? null : pad.getPadStruct()); } /** * Removes @pad from @element. @pad will be destroyed if it has not been * referenced elsewhere using gst_object_unparent(). * * This function is used by plugin developers and should not be used * by applications. Pads that were dynamically requested from elements * with gst_element_request_pad() should be released with the * gst_element_release_request_pad() function instead. * * Pads are not automatically deactivated so elements should perform the needed * steps to deactivate the pad in case this pad is removed in the PAUSED or * PLAYING state. See gst_pad_set_active() for more information about * deactivating pads. * * The pad and the element should be unlocked when calling this function. * * This function will emit the #GstElement::pad-removed signal on the element. * * Params: * pad = the #GstPad to remove from the element. * * Returns: %TRUE if the pad could be removed. Can return %FALSE if the * pad does not belong to the provided element. * * MT safe. */ public bool removePad(Pad pad) { return gst_element_remove_pad(gstElement, (pad is null) ? null : pad.getPadStruct()) != 0; } /** */ public void removePropertyNotifyWatch(gulong watchId) { gst_element_remove_property_notify_watch(gstElement, watchId); } /** * Retrieves a request pad from the element according to the provided template. * Pad templates can be looked up using * gst_element_factory_get_static_pad_templates(). * * The pad should be released with gst_element_release_request_pad(). * * Params: * templ = a #GstPadTemplate of which we want a pad of. * name = the name of the request #GstPad * to retrieve. Can be %NULL. * caps = the caps of the pad we want to * request. Can be %NULL. * * Returns: requested #GstPad if found, * otherwise %NULL. Release after usage. */ public Pad requestPad(PadTemplate templ, string name, Caps caps) { auto p = gst_element_request_pad(gstElement, (templ is null) ? null : templ.getPadTemplateStruct(), Str.toStringz(name), (caps is null) ? null : caps.getCapsStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); } /** * Sends a seek event to an element. See gst_event_new_seek() for the details of * the parameters. The seek event is sent to the element using * gst_element_send_event(). * * MT safe. * * Params: * rate = The new playback rate * format = The format of the seek values * flags = The optional seek flags. * startType = The type and flags for the new start position * start = The value of the new start position * stopType = The type and flags for the new stop position * stop = The value of the new stop position * * Returns: %TRUE if the event was handled. Flushing seeks will trigger a * preroll, which will emit %GST_MESSAGE_ASYNC_DONE. */ public bool seek(double rate, GstFormat format, GstSeekFlags flags, GstSeekType startType, long start, GstSeekType stopType, long stop) { return gst_element_seek(gstElement, rate, format, flags, startType, start, stopType, stop) != 0; } /** * Simple API to perform a seek on the given element, meaning it just seeks * to the given position relative to the start of the stream. For more complex * operations like segment seeks (e.g. for looping) or changing the playback * rate or seeking relative to the last configured playback segment you should * use gst_element_seek(). * * In a completely prerolled PAUSED or PLAYING pipeline, seeking is always * guaranteed to return %TRUE on a seekable media type or %FALSE when the media * type is certainly not seekable (such as a live stream). * * Some elements allow for seeking in the READY state, in this * case they will store the seek event and execute it when they are put to * PAUSED. If the element supports seek in READY, it will always return %TRUE when * it receives the event in the READY state. * * Params: * format = a #GstFormat to execute the seek in, such as #GST_FORMAT_TIME * seekFlags = seek options; playback applications will usually want to use * GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT here * seekPos = position to seek to (relative to the start); if you are doing * a seek in #GST_FORMAT_TIME this value is in nanoseconds - * multiply with #GST_SECOND to convert seconds to nanoseconds or * with #GST_MSECOND to convert milliseconds to nanoseconds. * * Returns: %TRUE if the seek operation succeeded. Flushing seeks will trigger a * preroll, which will emit %GST_MESSAGE_ASYNC_DONE. */ public bool seekSimple(GstFormat format, GstSeekFlags seekFlags, long seekPos) { return gst_element_seek_simple(gstElement, format, seekFlags, seekPos) != 0; } /** * Sends an event to an element. If the element doesn't implement an * event handler, the event will be pushed on a random linked sink pad for * downstream events or a random linked source pad for upstream events. * * This function takes ownership of the provided event so you should * gst_event_ref() it if you want to reuse the event after this call. * * MT safe. * * Params: * event = the #GstEvent to send to the element. * * Returns: %TRUE if the event was handled. Events that trigger a preroll (such * as flushing seeks and steps) will emit %GST_MESSAGE_ASYNC_DONE. */ public bool sendEvent(Event event) { return gst_element_send_event(gstElement, (event is null) ? null : event.getEventStruct()) != 0; } /** * Set the base time of an element. See gst_element_get_base_time(). * * MT safe. * * Params: * time = the base time to set. */ public void setBaseTime(GstClockTime time) { gst_element_set_base_time(gstElement, time); } /** * Sets the bus of the element. Increases the refcount on the bus. * For internal use only, unless you're testing elements. * * MT safe. * * Params: * bus = the #GstBus to set. */ public void setBus(Bus bus) { gst_element_set_bus(gstElement, (bus is null) ? null : bus.getBusStruct()); } /** * Sets the clock for the element. This function increases the * refcount on the clock. Any previously set clock on the object * is unreffed. * * Params: * clock = the #GstClock to set for the element. * * Returns: %TRUE if the element accepted the clock. An element can refuse a * clock when it, for example, is not able to slave its internal clock to the * @clock or when it requires a specific clock to operate. * * MT safe. */ public bool setClock(Clock clock) { return gst_element_set_clock(gstElement, (clock is null) ? null : clock.getClockStruct()) != 0; } /** * Sets the context of the element. Increases the refcount of the context. * * MT safe. * * Params: * context = the #GstContext to set. */ public void setContext(Context context) { gst_element_set_context(gstElement, (context is null) ? null : context.getContextStruct()); } /** * Locks the state of an element, so state changes of the parent don't affect * this element anymore. * * MT safe. * * Params: * lockedState = %TRUE to lock the element's state * * Returns: %TRUE if the state was changed, %FALSE if bad parameters were given * or the elements state-locking needed no change. */ public bool setLockedState(bool lockedState) { return gst_element_set_locked_state(gstElement, lockedState) != 0; } /** * Set the start time of an element. The start time of the element is the * running time of the element when it last went to the PAUSED state. In READY * or after a flushing seek, it is set to 0. * * Toplevel elements like #GstPipeline will manage the start_time and * base_time on its children. Setting the start_time to #GST_CLOCK_TIME_NONE * on such a toplevel element will disable the distribution of the base_time to * the children and can be useful if the application manages the base_time * itself, for example if you want to synchronize capture from multiple * pipelines, and you can also ensure that the pipelines have the same clock. * * MT safe. * * Params: * time = the base time to set. */ public void setStartTime(GstClockTime time) { gst_element_set_start_time(gstElement, time); } /** * Sets the state of the element. This function will try to set the * requested state by going through all the intermediary states and calling * the class's state change function for each. * * This function can return #GST_STATE_CHANGE_ASYNC, in which case the * element will perform the remainder of the state change asynchronously in * another thread. * An application can use gst_element_get_state() to wait for the completion * of the state change or it can wait for a %GST_MESSAGE_ASYNC_DONE or * %GST_MESSAGE_STATE_CHANGED on the bus. * * State changes to %GST_STATE_READY or %GST_STATE_NULL never return * #GST_STATE_CHANGE_ASYNC. * * Params: * state = the element's new #GstState. * * Returns: Result of the state change using #GstStateChangeReturn. * * MT safe. */ public GstStateChangeReturn setState(GstState state) { return gst_element_set_state(gstElement, state); } /** * Tries to change the state of the element to the same as its parent. * If this function returns %FALSE, the state of element is undefined. * * Returns: %TRUE, if the element's state could be synced to the parent's state. * * MT safe. */ public bool syncStateWithParent() { return gst_element_sync_state_with_parent(gstElement) != 0; } /** * Unlinks all source pads of the source element with all sink pads * of the sink element to which they are linked. * * If the link has been made using gst_element_link(), it could have created an * requestpad, which has to be released using gst_element_release_request_pad(). * * Params: * dest = the sink #GstElement to unlink. */ public void unlink(Element dest) { gst_element_unlink(gstElement, (dest is null) ? null : dest.getElementStruct()); } /** * Unlinks the two named pads of the source and destination elements. * * This is a convenience function for gst_pad_unlink(). * * Params: * srcpadname = the name of the #GstPad in source element. * dest = a #GstElement containing the destination pad. * destpadname = the name of the #GstPad in destination element. */ public void unlinkPads(string srcpadname, Element dest, string destpadname) { gst_element_unlink_pads(gstElement, Str.toStringz(srcpadname), (dest is null) ? null : dest.getElementStruct(), Str.toStringz(destpadname)); } protected class OnNoMorePadsDelegateWrapper { void delegate(Element) dlg; gulong handlerId; this(void delegate(Element) dlg) { this.dlg = dlg; onNoMorePadsListeners ~= this; } void remove(OnNoMorePadsDelegateWrapper source) { foreach(index, wrapper; onNoMorePadsListeners) { if (wrapper.handlerId == source.handlerId) { onNoMorePadsListeners[index] = null; onNoMorePadsListeners = std.algorithm.remove(onNoMorePadsListeners, index); break; } } } } OnNoMorePadsDelegateWrapper[] onNoMorePadsListeners; /** * This signals that the element will not generate more dynamic pads. * Note that this signal will usually be emitted from the context of * the streaming thread. */ gulong addOnNoMorePads(void delegate(Element) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnNoMorePadsDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "no-more-pads", cast(GCallback)&callBackNoMorePads, cast(void*)wrapper, cast(GClosureNotify)&callBackNoMorePadsDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackNoMorePads(GstElement* elementStruct, OnNoMorePadsDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackNoMorePadsDestroy(OnNoMorePadsDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPadAddedDelegateWrapper { void delegate(Pad, Element) dlg; gulong handlerId; this(void delegate(Pad, Element) dlg) { this.dlg = dlg; onPadAddedListeners ~= this; } void remove(OnPadAddedDelegateWrapper source) { foreach(index, wrapper; onPadAddedListeners) { if (wrapper.handlerId == source.handlerId) { onPadAddedListeners[index] = null; onPadAddedListeners = std.algorithm.remove(onPadAddedListeners, index); break; } } } } OnPadAddedDelegateWrapper[] onPadAddedListeners; /** * a new #GstPad has been added to the element. Note that this signal will * usually be emitted from the context of the streaming thread. Also keep in * mind that if you add new elements to the pipeline in the signal handler * you will need to set them to the desired target state with * gst_element_set_state() or gst_element_sync_state_with_parent(). * * Params: * newPad = the pad that has been added */ gulong addOnPadAdded(void delegate(Pad, Element) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPadAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "pad-added", cast(GCallback)&callBackPadAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackPadAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPadAdded(GstElement* elementStruct, GstPad* newPad, OnPadAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Pad)(newPad), wrapper.outer); } extern(C) static void callBackPadAddedDestroy(OnPadAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPadRemovedDelegateWrapper { void delegate(Pad, Element) dlg; gulong handlerId; this(void delegate(Pad, Element) dlg) { this.dlg = dlg; onPadRemovedListeners ~= this; } void remove(OnPadRemovedDelegateWrapper source) { foreach(index, wrapper; onPadRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onPadRemovedListeners[index] = null; onPadRemovedListeners = std.algorithm.remove(onPadRemovedListeners, index); break; } } } } OnPadRemovedDelegateWrapper[] onPadRemovedListeners; /** * a #GstPad has been removed from the element * * Params: * oldPad = the pad that has been removed */ gulong addOnPadRemoved(void delegate(Pad, Element) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPadRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "pad-removed", cast(GCallback)&callBackPadRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackPadRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPadRemoved(GstElement* elementStruct, GstPad* oldPad, OnPadRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Pad)(oldPad), wrapper.outer); } extern(C) static void callBackPadRemovedDestroy(OnPadRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/ElementClass.d000066400000000000000000000172241324604450400230330ustar00rootroot00000000000000/* * 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 gstreamer.ElementClass; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.PadTemplate; private import gstreamer.StaticPadTemplate; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * GStreamer element class. Override the vmethods to implement the element * functionality. */ public class ElementClass { /** the main Gtk struct */ protected GstElementClass* gstElementClass; protected bool ownedRef; /** Get the main Gtk struct */ public GstElementClass* getElementClassStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstElementClass; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstElementClass; } /** * Sets our main struct and passes it to the parent class. */ public this (GstElementClass* gstElementClass, bool ownedRef = false) { this.gstElementClass = gstElementClass; this.ownedRef = ownedRef; } /** * Set @key with @value as metadata in @klass. * * Params: * key = the key to set * value = the value to set */ public void addMetadata(string key, string value) { gst_element_class_add_metadata(gstElementClass, Str.toStringz(key), Str.toStringz(value)); } /** * Adds a padtemplate to an element class. This is mainly used in the _class_init * functions of classes. If a pad template with the same name as an already * existing one is added the old one is replaced by the new one. * * Params: * templ = a #GstPadTemplate to add to the element class. */ public void addPadTemplate(PadTemplate templ) { gst_element_class_add_pad_template(gstElementClass, (templ is null) ? null : templ.getPadTemplateStruct()); } /** * Set @key with @value as metadata in @klass. * * Same as gst_element_class_add_metadata(), but @value must be a static string * or an inlined string, as it will not be copied. (GStreamer plugins will * be made resident once loaded, so this function can be used even from * dynamically loaded plugins.) * * Params: * key = the key to set * value = the value to set */ public void addStaticMetadata(string key, string value) { gst_element_class_add_static_metadata(gstElementClass, Str.toStringz(key), Str.toStringz(value)); } /** * Adds a pad template to an element class based on the static pad template * @templ. This is mainly used in the _class_init functions of element * implementations. If a pad template with the same name already exists, * the old one is replaced by the new one. * * Params: * staticTempl = #GstStaticPadTemplate to add as pad template to the element class. * * Since: 1.8 */ public void addStaticPadTemplate(StaticPadTemplate staticTempl) { gst_element_class_add_static_pad_template(gstElementClass, (staticTempl is null) ? null : staticTempl.getStaticPadTemplateStruct()); } /** * Get metadata with @key in @klass. * * Params: * key = the key to get * * Returns: the metadata for @key. */ public string getMetadata(string key) { return Str.toString(gst_element_class_get_metadata(gstElementClass, Str.toStringz(key))); } /** * Retrieves a padtemplate from @element_class with the given name. * > If you use this function in the #GInstanceInitFunc of an object class * > that has subclasses, make sure to pass the g_class parameter of the * > #GInstanceInitFunc here. * * Params: * name = the name of the #GstPadTemplate to get. * * Returns: the #GstPadTemplate with the * given name, or %NULL if none was found. No unreferencing is * necessary. */ public PadTemplate getPadTemplate(string name) { auto p = gst_element_class_get_pad_template(gstElementClass, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) p); } /** * Retrieves a list of the pad templates associated with @element_class. The * list must not be modified by the calling code. * > If you use this function in the #GInstanceInitFunc of an object class * > that has subclasses, make sure to pass the g_class parameter of the * > #GInstanceInitFunc here. * * Returns: the #GList of * pad templates. */ public ListG getPadTemplateList() { auto p = gst_element_class_get_pad_template_list(gstElementClass); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Sets the detailed information for a #GstElementClass. * > This function is for use in _class_init functions only. * * Params: * longname = The long English name of the element. E.g. "File Sink" * classification = String describing the type of element, as an unordered list * separated with slashes ('/'). See draft-klass.txt of the design docs * for more details and common types. E.g: "Sink/File" * description = Sentence describing the purpose of the element. * E.g: "Write stream to a file" * author = Name and contact details of the author(s). Use \n to separate * multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>" */ public void setMetadata(string longname, string classification, string description, string author) { gst_element_class_set_metadata(gstElementClass, Str.toStringz(longname), Str.toStringz(classification), Str.toStringz(description), Str.toStringz(author)); } /** * Sets the detailed information for a #GstElementClass. * * > This function is for use in _class_init functions only. * * Same as gst_element_class_set_metadata(), but @longname, @classification, * @description, and @author must be static strings or inlined strings, as * they will not be copied. (GStreamer plugins will be made resident once * loaded, so this function can be used even from dynamically loaded plugins.) * * Params: * longname = The long English name of the element. E.g. "File Sink" * classification = String describing the type of element, as an unordered list * separated with slashes ('/'). See draft-klass.txt of the design docs * for more details and common types. E.g: "Sink/File" * description = Sentence describing the purpose of the element. * E.g: "Write stream to a file" * author = Name and contact details of the author(s). Use \n to separate * multiple author metadata. E.g: "Joe Bloggs <joe.blogs at foo.com>" */ public void setStaticMetadata(string longname, string classification, string description, string author) { gst_element_class_set_static_metadata(gstElementClass, Str.toStringz(longname), Str.toStringz(classification), Str.toStringz(description), Str.toStringz(author)); } } GtkD-3.7.5/generated/gstreamer/gstreamer/ElementFactory.d000066400000000000000000000267421324604450400234020ustar00rootroot00000000000000/* * 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 gstreamer.ElementFactory; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Caps; private import gstreamer.Element; private import gstreamer.PluginFeature; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * #GstElementFactory is used to create instances of elements. A * GstElementFactory can be added to a #GstPlugin as it is also a * #GstPluginFeature. * * Use the gst_element_factory_find() and gst_element_factory_create() * functions to create element instances or use gst_element_factory_make() as a * convenient shortcut. * * The following code example shows you how to create a GstFileSrc element. * * ## Using an element factory * |[ * #include <gst/gst.h> * * GstElement *src; * GstElementFactory *srcfactory; * * gst_init (&argc, &argv); * * srcfactory = gst_element_factory_find ("filesrc"); * g_return_if_fail (srcfactory != NULL); * src = gst_element_factory_create (srcfactory, "src"); * g_return_if_fail (src != NULL); * ... * ]| */ public class ElementFactory : PluginFeature { /** the main Gtk struct */ protected GstElementFactory* gstElementFactory; /** Get the main Gtk struct */ public GstElementFactory* getElementFactoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstElementFactory; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstElementFactory; } protected override void setStruct(GObject* obj) { gstElementFactory = cast(GstElementFactory*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstElementFactory* gstElementFactory, bool ownedRef = false) { this.gstElementFactory = gstElementFactory; super(cast(GstPluginFeature*)gstElementFactory, ownedRef); } /** * Create a new element of the type defined by the given element factory. * The element will receive a guaranteed unique name, * consisting of the element factory name and a number. * Params: * factoryname = a named factory to instantiate * Returns: * new GstElement or NULL if unable to create element */ public static Element make( string factoryname ) { // GstElement* gst_element_factory_make (const gchar *factoryname, const gchar *name); auto p = gst_element_factory_make(Str.toStringz(factoryname), null ); if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p); } /** */ /** */ public static GType getType() { return gst_element_factory_get_type(); } /** * Search for an element factory of the given name. Refs the returned * element factory; caller is responsible for unreffing. * * Params: * name = name of factory to find * * Returns: #GstElementFactory if found, * %NULL otherwise */ public static ElementFactory find(string name) { auto p = gst_element_factory_find(Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(ElementFactory)(cast(GstElementFactory*) p, true); } /** * Filter out all the elementfactories in @list that can handle @caps in * the given direction. * * If @subsetonly is %TRUE, then only the elements whose pads templates * are a complete superset of @caps will be returned. Else any element * whose pad templates caps can intersect with @caps will be returned. * * Params: * list = a #GList of * #GstElementFactory to filter * caps = a #GstCaps * direction = a #GstPadDirection to filter on * subsetonly = whether to filter on caps subsets or not. * * Returns: a #GList of * #GstElementFactory elements that match the given requisites. * Use #gst_plugin_feature_list_free after usage. */ public static ListG listFilter(ListG list, Caps caps, GstPadDirection direction, bool subsetonly) { auto p = gst_element_factory_list_filter((list is null) ? null : list.getListGStruct(), (caps is null) ? null : caps.getCapsStruct(), direction, subsetonly); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Get a list of factories that match the given @type. Only elements * with a rank greater or equal to @minrank will be returned. * The list of factories is returned by decreasing rank. * * Params: * type = a #GstElementFactoryListType * minrank = Minimum rank * * Returns: a #GList of * #GstElementFactory elements. Use gst_plugin_feature_list_free() after * usage. */ public static ListG listGetElements(GstElementFactoryListType type, GstRank minrank) { auto p = gst_element_factory_list_get_elements(type, minrank); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Create a new element of the type defined by the given element factory. * If name is %NULL, then the element will receive a guaranteed unique name, * consisting of the element factory name and a number. * If name is given, it will be given the name supplied. * * Params: * factoryname = a named factory to instantiate * name = name of new element, or %NULL to automatically create * a unique name * * Returns: new #GstElement or %NULL * if unable to create element */ public static Element make(string factoryname, string name) { auto p = gst_element_factory_make(Str.toStringz(factoryname), Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p); } /** * Checks if the factory can sink all possible capabilities. * * Params: * caps = the caps to check * * Returns: %TRUE if the caps are fully compatible. */ public bool canSinkAllCaps(Caps caps) { return gst_element_factory_can_sink_all_caps(gstElementFactory, (caps is null) ? null : caps.getCapsStruct()) != 0; } /** * Checks if the factory can sink any possible capability. * * Params: * caps = the caps to check * * Returns: %TRUE if the caps have a common subset. */ public bool canSinkAnyCaps(Caps caps) { return gst_element_factory_can_sink_any_caps(gstElementFactory, (caps is null) ? null : caps.getCapsStruct()) != 0; } /** * Checks if the factory can src all possible capabilities. * * Params: * caps = the caps to check * * Returns: %TRUE if the caps are fully compatible. */ public bool canSrcAllCaps(Caps caps) { return gst_element_factory_can_src_all_caps(gstElementFactory, (caps is null) ? null : caps.getCapsStruct()) != 0; } /** * Checks if the factory can src any possible capability. * * Params: * caps = the caps to check * * Returns: %TRUE if the caps have a common subset. */ public bool canSrcAnyCaps(Caps caps) { return gst_element_factory_can_src_any_caps(gstElementFactory, (caps is null) ? null : caps.getCapsStruct()) != 0; } /** * Create a new element of the type defined by the given elementfactory. * It will be given the name supplied, since all elements require a name as * their first argument. * * Params: * name = name of new element, or %NULL to automatically create * a unique name * * Returns: new #GstElement or %NULL * if the element couldn't be created */ public Element create(string name) { auto p = gst_element_factory_create(gstElementFactory, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p); } /** * Get the #GType for elements managed by this factory. The type can * only be retrieved if the element factory is loaded, which can be * assured with gst_plugin_feature_load(). * * Returns: the #GType for elements managed by this factory or 0 if * the factory is not loaded. */ public GType getElementType() { return gst_element_factory_get_element_type(gstElementFactory); } /** * Get the metadata on @factory with @key. * * Params: * key = a key * * Returns: the metadata with @key on @factory or %NULL * when there was no metadata with the given @key. */ public string getMetadata(string key) { return Str.toString(gst_element_factory_get_metadata(gstElementFactory, Str.toStringz(key))); } /** * Get the available keys for the metadata on @factory. * * Returns: a %NULL-terminated array of key strings, or %NULL when there is no * metadata. Free with g_strfreev() when no longer needed. */ public string[] getMetadataKeys() { auto retStr = gst_element_factory_get_metadata_keys(gstElementFactory); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Gets the number of pad_templates in this factory. * * Returns: the number of pad_templates */ public uint getNumPadTemplates() { return gst_element_factory_get_num_pad_templates(gstElementFactory); } /** * Gets the #GList of #GstStaticPadTemplate for this factory. * * Returns: the * static pad templates */ public ListG getStaticPadTemplates() { auto p = gst_element_factory_get_static_pad_templates(gstElementFactory); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets a %NULL-terminated array of protocols this element supports or %NULL if * no protocols are supported. You may not change the contents of the returned * array, as it is still owned by the element factory. Use g_strdupv() to * make a copy of the protocol string array if you need to. * * Returns: the supported protocols * or %NULL */ public string[] getUriProtocols() { return Str.toStringArray(gst_element_factory_get_uri_protocols(gstElementFactory)); } /** * Gets the type of URIs the element supports or #GST_URI_UNKNOWN if none. * * Returns: type of URIs this element supports */ public GstURIType getUriType() { return gst_element_factory_get_uri_type(gstElementFactory); } /** * Check if @factory implements the interface with name @interfacename. * * Params: * interfacename = an interface name * * Returns: %TRUE when @factory implement the interface. */ public bool hasInterface(string interfacename) { return gst_element_factory_has_interface(gstElementFactory, Str.toStringz(interfacename)) != 0; } /** * Check if @factory is of the given types. * * Params: * type = a #GstElementFactoryListType * * Returns: %TRUE if @factory is of @type. */ public bool listIsType(GstElementFactoryListType type) { return gst_element_factory_list_is_type(gstElementFactory, type) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/Event.d000066400000000000000000001321201324604450400215260ustar00rootroot00000000000000/* * 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 gstreamer.Event; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Buffer; private import gstreamer.Caps; private import gstreamer.Message; private import gstreamer.Segment; private import gstreamer.Stream; private import gstreamer.StreamCollection; private import gstreamer.Structure; private import gstreamer.TagList; private import gstreamer.Toc; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * The event class provides factory methods to construct events for sending * and functions to query (parse) received events. * * Events are usually created with gst_event_new_*() which takes event-type * specific parameters as arguments. * To send an event application will usually use gst_element_send_event() and * elements will use gst_pad_send_event() or gst_pad_push_event(). * The event should be unreffed with gst_event_unref() if it has not been sent. * * Events that have been received can be parsed with their respective * gst_event_parse_*() functions. It is valid to pass %NULL for unwanted details. * * Events are passed between elements in parallel to the data stream. Some events * are serialized with buffers, others are not. Some events only travel downstream, * others only upstream. Some events can travel both upstream and downstream. * * The events are used to signal special conditions in the datastream such as * EOS (end of stream) or the start of a new stream-segment. * Events are also used to flush the pipeline of any pending data. * * Most of the event API is used inside plugins. Applications usually only * construct and use seek events. * To do that gst_event_new_seek() is used to create a seek event. It takes * the needed parameters to specify seeking time and mode. * |[ * GstEvent *event; * gboolean result; * ... * // construct a seek event to play the media from second 2 to 5, flush * // the pipeline to decrease latency. * event = gst_event_new_seek (1.0, * GST_FORMAT_TIME, * GST_SEEK_FLAG_FLUSH, * GST_SEEK_TYPE_SET, 2 * GST_SECOND, * GST_SEEK_TYPE_SET, 5 * GST_SECOND); * ... * result = gst_element_send_event (pipeline, event); * if (!result) * g_warning ("seek failed"); * ... * ]| */ public class Event { /** the main Gtk struct */ protected GstEvent* gstEvent; protected bool ownedRef; /** Get the main Gtk struct */ public GstEvent* getEventStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstEvent; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstEvent; } /** * Sets our main struct and passes it to the parent class. */ public this (GstEvent* gstEvent, bool ownedRef = false) { this.gstEvent = gstEvent; this.ownedRef = ownedRef; } /** * Create a new EOS event. The eos event can only travel downstream * synchronized with the buffer flow. Elements that receive the EOS * event on a pad can return UNEXPECTED as a GstFlowReturn when data * after the EOS event arrives. * The EOS event will travel down to the sink elements in the pipeline * which will then post the GST_MESSAGE_EOS on the bus after they have * finished playing any buffered data. * When all sinks have posted an EOS message, the EOS message is * forwarded to the application. * Returns: * The new EOS event. */ public static Event newEOS() { // GstEvent* gst_event_new_eos (void); auto p = gst_event_new_eos(); if(p is null) { throw new ConstructionException("null returned by gst_event_new_eos"); } return new Event(cast(GstEvent*)p ); } /** * Allocate a new flush start event. The flush start event can be send * upstream and downstream and travels out-of-bounds with the dataflow. * It marks pads as being in a WRONG_STATE to process more data. * Elements unlock and blocking functions and exit their streaming functions * as fast as possible. * This event is typically generated after a seek to minimize the latency * after the seek. * Returns: * A new flush start event. */ public static Event newFlushStart() { // GstEvent* gst_event_new_flush_start (void); auto p = gst_event_new_flush_start(); if(p is null) { throw new ConstructionException("null returned by gst_event_new_flush_start"); } return new Event(cast(GstEvent*)p ); } /** * Generate a TOC select event with the given uid. The purpose of the * TOC select event is to start playback based on the TOC's entry with * the given uid. */ public static Event newTocSelect(string uid) { // GstEvent* gst_event_new_toc_select (const gchar *uid); auto p = gst_event_new_toc_select(cast(char*)uid.ptr); if(p is null) { throw new ConstructionException("null returned by gst_event_new_toc_select"); } return new Event(cast(GstEvent*)p ); } /** */ /** */ public static GType getType() { return gst_event_get_type(); } /** * Create a new buffersize event. The event is sent downstream and notifies * elements that they should provide a buffer of the specified dimensions. * * When the @async flag is set, a thread boundary is preferred. * * Params: * format = buffer format * minsize = minimum buffer size * maxsize = maximum buffer size * async = thread behavior * * Returns: a new #GstEvent * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstFormat format, long minsize, long maxsize, bool async) { auto p = gst_event_new_buffer_size(format, minsize, maxsize, async); if(p is null) { throw new ConstructionException("null returned by new_buffer_size"); } this(cast(GstEvent*) p); } /** * Create a new CAPS event for @caps. The caps event can only travel downstream * synchronized with the buffer flow and contains the format of the buffers * that will follow after the event. * * Params: * caps = a #GstCaps * * Returns: the new CAPS event. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Caps caps) { auto p = gst_event_new_caps((caps is null) ? null : caps.getCapsStruct()); if(p is null) { throw new ConstructionException("null returned by new_caps"); } this(cast(GstEvent*) p); } /** * Create a new custom-typed event. This can be used for anything not * handled by other event-specific functions to pass an event to another * element. * * Make sure to allocate an event type with the #GST_EVENT_MAKE_TYPE macro, * assigning a free number and filling in the correct direction and * serialization flags. * * New custom events can also be created by subclassing the event type if * needed. * * Params: * type = The type of the new event * structure = the structure for the event. The event will * take ownership of the structure. * * Returns: the new custom event. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstEventType type, Structure structure) { auto p = gst_event_new_custom(type, (structure is null) ? null : structure.getStructureStruct(true)); if(p is null) { throw new ConstructionException("null returned by new_custom"); } this(cast(GstEvent*) p); } /** * Allocate a new flush stop event. The flush stop event can be sent * upstream and downstream and travels serialized with the dataflow. * It is typically sent after sending a FLUSH_START event to make the * pads accept data again. * * Elements can process this event synchronized with the dataflow since * the preceding FLUSH_START event stopped the dataflow. * * This event is typically generated to complete a seek and to resume * dataflow. * * Params: * resetTime = if time should be reset * * Returns: a new flush stop event. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(bool resetTime) { auto p = gst_event_new_flush_stop(resetTime); if(p is null) { throw new ConstructionException("null returned by new_flush_stop"); } this(cast(GstEvent*) p); } /** * Create a new GAP event. A gap event can be thought of as conceptually * equivalent to a buffer to signal that there is no data for a certain * amount of time. This is useful to signal a gap to downstream elements * which may wait for data, such as muxers or mixers or overlays, especially * for sparse streams such as subtitle streams. * * Params: * timestamp = the start time (pts) of the gap * duration = the duration of the gap * * Returns: the new GAP event. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstClockTime timestamp, GstClockTime duration) { auto p = gst_event_new_gap(timestamp, duration); if(p is null) { throw new ConstructionException("null returned by new_gap"); } this(cast(GstEvent*) p); } /** * Create a new latency event. The event is sent upstream from the sinks and * notifies elements that they should add an additional @latency to the * running time before synchronising against the clock. * * The latency is mostly used in live sinks and is always expressed in * the time format. * * Params: * latency = the new latency value * * Returns: a new #GstEvent * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstClockTime latency) { auto p = gst_event_new_latency(latency); if(p is null) { throw new ConstructionException("null returned by new_latency"); } this(cast(GstEvent*) p); } /** * Create a new navigation event from the given description. * * Params: * structure = description of the event. The event will take * ownership of the structure. * * Returns: a new #GstEvent * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Structure structure) { auto p = gst_event_new_navigation((structure is null) ? null : structure.getStructureStruct(true)); if(p is null) { throw new ConstructionException("null returned by new_navigation"); } this(cast(GstEvent*) p); } /** * Creates a new event containing information specific to a particular * protection system (uniquely identified by @system_id), by which that * protection system can acquire key(s) to decrypt a protected stream. * * In order for a decryption element to decrypt media * protected using a specific system, it first needs all the * protection system specific information necessary to acquire the decryption * key(s) for that stream. The functions defined here enable this information * to be passed in events from elements that extract it * (e.g., ISOBMFF demuxers, MPEG DASH demuxers) to protection decrypter * elements that use it. * * Events containing protection system specific information are created using * #gst_event_new_protection, and they can be parsed by downstream elements * using #gst_event_parse_protection. * * In Common Encryption, protection system specific information may be located * within ISOBMFF files, both in movie (moov) boxes and movie fragment (moof) * boxes; it may also be contained in ContentProtection elements within MPEG * DASH MPDs. The events created by #gst_event_new_protection contain data * identifying from which of these locations the encapsulated protection system * specific information originated. This origin information is required as * some protection systems use different encodings depending upon where the * information originates. * * The events returned by gst_event_new_protection() are implemented * in such a way as to ensure that the most recently-pushed protection info * event of a particular @origin and @system_id will * be stuck to the output pad of the sending element. * * Params: * systemId = a string holding a UUID that uniquely * identifies a protection system. * data = a #GstBuffer holding protection system specific * information. The reference count of the buffer will be incremented by one. * origin = a string indicating where the protection * information carried in the event was extracted from. The allowed values * of this string will depend upon the protection scheme. * * Returns: a #GST_EVENT_PROTECTION event, if successful; %NULL * if unsuccessful. * * Since: 1.6 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string systemId, Buffer data, string origin) { auto p = gst_event_new_protection(Str.toStringz(systemId), (data is null) ? null : data.getBufferStruct(), Str.toStringz(origin)); if(p is null) { throw new ConstructionException("null returned by new_protection"); } this(cast(GstEvent*) p); } /** * Allocate a new qos event with the given values. * The QOS event is generated in an element that wants an upstream * element to either reduce or increase its rate because of * high/low CPU load or other resource usage such as network performance or * throttling. Typically sinks generate these events for each buffer * they receive. * * @type indicates the reason for the QoS event. #GST_QOS_TYPE_OVERFLOW is * used when a buffer arrived in time or when the sink cannot keep up with * the upstream datarate. #GST_QOS_TYPE_UNDERFLOW is when the sink is not * receiving buffers fast enough and thus has to drop late buffers. * #GST_QOS_TYPE_THROTTLE is used when the datarate is artificially limited * by the application, for example to reduce power consumption. * * @proportion indicates the real-time performance of the streaming in the * element that generated the QoS event (usually the sink). The value is * generally computed based on more long term statistics about the streams * timestamps compared to the clock. * A value < 1.0 indicates that the upstream element is producing data faster * than real-time. A value > 1.0 indicates that the upstream element is not * producing data fast enough. 1.0 is the ideal @proportion value. The * proportion value can safely be used to lower or increase the quality of * the element. * * @diff is the difference against the clock in running time of the last * buffer that caused the element to generate the QOS event. A negative value * means that the buffer with @timestamp arrived in time. A positive value * indicates how late the buffer with @timestamp was. When throttling is * enabled, @diff will be set to the requested throttling interval. * * @timestamp is the timestamp of the last buffer that cause the element * to generate the QOS event. It is expressed in running time and thus an ever * increasing value. * * The upstream element can use the @diff and @timestamp values to decide * whether to process more buffers. For positive @diff, all buffers with * timestamp <= @timestamp + @diff will certainly arrive late in the sink * as well. A (negative) @diff value so that @timestamp + @diff would yield a * result smaller than 0 is not allowed. * * The application can use general event probes to intercept the QoS * event and implement custom application specific QoS handling. * * Params: * type = the QoS type * proportion = the proportion of the qos message * diff = The time difference of the last Clock sync * timestamp = The timestamp of the buffer * * Returns: a new QOS event. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstQOSType type, double proportion, GstClockTimeDiff diff, GstClockTime timestamp) { auto p = gst_event_new_qos(type, proportion, diff, timestamp); if(p is null) { throw new ConstructionException("null returned by new_qos"); } this(cast(GstEvent*) p); } /** * Create a new reconfigure event. The purpose of the reconfigure event is * to travel upstream and make elements renegotiate their caps or reconfigure * their buffer pools. This is useful when changing properties on elements * or changing the topology of the pipeline. * * Returns: a new #GstEvent * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_event_new_reconfigure(); if(p is null) { throw new ConstructionException("null returned by new_reconfigure"); } this(cast(GstEvent*) p); } /** * Allocate a new seek event with the given parameters. * * The seek event configures playback of the pipeline between @start to @stop * at the speed given in @rate, also called a playback segment. * The @start and @stop values are expressed in @format. * * A @rate of 1.0 means normal playback rate, 2.0 means double speed. * Negatives values means backwards playback. A value of 0.0 for the * rate is not allowed and should be accomplished instead by PAUSING the * pipeline. * * A pipeline has a default playback segment configured with a start * position of 0, a stop position of -1 and a rate of 1.0. The currently * configured playback segment can be queried with #GST_QUERY_SEGMENT. * * @start_type and @stop_type specify how to adjust the currently configured * start and stop fields in playback segment. Adjustments can be made relative * or absolute to the last configured values. A type of #GST_SEEK_TYPE_NONE * means that the position should not be updated. * * When the rate is positive and @start has been updated, playback will start * from the newly configured start position. * * For negative rates, playback will start from the newly configured stop * position (if any). If the stop position is updated, it must be different from * -1 (#GST_CLOCK_TIME_NONE) for negative rates. * * It is not possible to seek relative to the current playback position, to do * this, PAUSE the pipeline, query the current playback position with * #GST_QUERY_POSITION and update the playback segment current position with a * #GST_SEEK_TYPE_SET to the desired position. * * Params: * rate = The new playback rate * format = The format of the seek values * flags = The optional seek flags * startType = The type and flags for the new start position * start = The value of the new start position * stopType = The type and flags for the new stop position * stop = The value of the new stop position * * Returns: a new seek event. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(double rate, GstFormat format, GstSeekFlags flags, GstSeekType startType, long start, GstSeekType stopType, long stop) { auto p = gst_event_new_seek(rate, format, flags, startType, start, stopType, stop); if(p is null) { throw new ConstructionException("null returned by new_seek"); } this(cast(GstEvent*) p); } /** * Create a new SEGMENT event for @segment. The segment event can only travel * downstream synchronized with the buffer flow and contains timing information * and playback properties for the buffers that will follow. * * The segment event marks the range of buffers to be processed. All * data not within the segment range is not to be processed. This can be * used intelligently by plugins to apply more efficient methods of skipping * unneeded data. The valid range is expressed with the @start and @stop * values. * * The time value of the segment is used in conjunction with the start * value to convert the buffer timestamps into the stream time. This is * usually done in sinks to report the current stream_time. * @time represents the stream_time of a buffer carrying a timestamp of * @start. @time cannot be -1. * * @start cannot be -1, @stop can be -1. If there * is a valid @stop given, it must be greater or equal the @start, including * when the indicated playback @rate is < 0. * * The @applied_rate value provides information about any rate adjustment that * has already been made to the timestamps and content on the buffers of the * stream. (@rate * @applied_rate) should always equal the rate that has been * requested for playback. For example, if an element has an input segment * with intended playback @rate of 2.0 and applied_rate of 1.0, it can adjust * incoming timestamps and buffer content by half and output a segment event * with @rate of 1.0 and @applied_rate of 2.0 * * After a segment event, the buffer stream time is calculated with: * * time + (TIMESTAMP(buf) - start) * ABS (rate * applied_rate) * * Params: * segment = a #GstSegment * * Returns: the new SEGMENT event. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Segment segment) { auto p = gst_event_new_segment((segment is null) ? null : segment.getSegmentStruct()); if(p is null) { throw new ConstructionException("null returned by new_segment"); } this(cast(GstEvent*) p); } /** * Create a new segment-done event. This event is sent by elements that * finish playback of a segment as a result of a segment seek. * * Params: * format = The format of the position being done * position = The position of the segment being done * * Returns: a new #GstEvent * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstFormat format, long position) { auto p = gst_event_new_segment_done(format, position); if(p is null) { throw new ConstructionException("null returned by new_segment_done"); } this(cast(GstEvent*) p); } /** * Allocate a new select-streams event. * * The select-streams event requests the specified @streams to be activated. * * The list of @streams corresponds to the "Stream ID" of each stream to be * activated. Those ID can be obtained via the #GstStream objects present * in #GST_EVENT_STREAM_START, #GST_EVENT_STREAM_COLLECTION or * #GST_MESSSAGE_STREAM_COLLECTION. * * Params: * streams = the list of streams to * activate * * Returns: a new select-streams event. * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ListG streams) { auto p = gst_event_new_select_streams((streams is null) ? null : streams.getListGStruct()); if(p is null) { throw new ConstructionException("null returned by new_select_streams"); } this(cast(GstEvent*) p); } /** * Create a new sink-message event. The purpose of the sink-message event is * to instruct a sink to post the message contained in the event synchronized * with the stream. * * @name is used to store multiple sticky events on one pad. * * Params: * name = a name for the event * msg = the #GstMessage to be posted * * Returns: a new #GstEvent * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, Message msg) { auto p = gst_event_new_sink_message(Str.toStringz(name), (msg is null) ? null : msg.getMessageStruct()); if(p is null) { throw new ConstructionException("null returned by new_sink_message"); } this(cast(GstEvent*) p); } /** * Create a new step event. The purpose of the step event is to instruct a sink * to skip @amount (expressed in @format) of media. It can be used to implement * stepping through the video frame by frame or for doing fast trick modes. * * A rate of <= 0.0 is not allowed. Pause the pipeline, for the effect of rate * = 0.0 or first reverse the direction of playback using a seek event to get * the same effect as rate < 0.0. * * The @flush flag will clear any pending data in the pipeline before starting * the step operation. * * The @intermediate flag instructs the pipeline that this step operation is * part of a larger step operation. * * Params: * format = the format of @amount * amount = the amount of data to step * rate = the step rate * flush = flushing steps * intermediate = intermediate steps * * Returns: a new #GstEvent * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstFormat format, ulong amount, double rate, bool flush, bool intermediate) { auto p = gst_event_new_step(format, amount, rate, flush, intermediate); if(p is null) { throw new ConstructionException("null returned by new_step"); } this(cast(GstEvent*) p); } /** * Create a new STREAM_COLLECTION event. The stream collection event can only * travel downstream synchronized with the buffer flow. * * Source elements, demuxers and other elements that manage collections * of streams and post #GstStreamCollection messages on the bus also send * this event downstream on each pad involved in the collection, so that * activation of a new collection can be tracked through the downstream * data flow. * * Params: * collection = Active collection for this data flow * * Returns: the new STREAM_COLLECTION event. * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(StreamCollection collection) { auto p = gst_event_new_stream_collection((collection is null) ? null : collection.getStreamCollectionStruct()); if(p is null) { throw new ConstructionException("null returned by new_stream_collection"); } this(cast(GstEvent*) p); } /** * Create a new Stream Group Done event. The stream-group-done event can * only travel downstream synchronized with the buffer flow. Elements * that receive the event on a pad should handle it mostly like EOS, * and emit any data or pending buffers that would depend on more data * arriving and unblock, since there won't be any more data. * * This event is followed by EOS at some point in the future, and is * generally used when switching pads - to unblock downstream so that * new pads can be exposed before sending EOS on the existing pads. * * Params: * groupId = the group id of the stream group which is ending * * Returns: the new stream-group-done event. * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint groupId) { auto p = gst_event_new_stream_group_done(groupId); if(p is null) { throw new ConstructionException("null returned by new_stream_group_done"); } this(cast(GstEvent*) p); } /** * Create a new STREAM_START event. The stream start event can only * travel downstream synchronized with the buffer flow. It is expected * to be the first event that is sent for a new stream. * * Source elements, demuxers and other elements that create new streams * are supposed to send this event as the first event of a new stream. It * should not be sent after a flushing seek or in similar situations * and is used to mark the beginning of a new logical stream. Elements * combining multiple streams must ensure that this event is only forwarded * downstream once and not for every single input stream. * * The @stream_id should be a unique string that consists of the upstream * stream-id, / as separator and a unique stream-id for this specific * stream. A new stream-id should only be created for a stream if the upstream * stream is split into (potentially) multiple new streams, e.g. in a demuxer, * but not for every single element in the pipeline. * gst_pad_create_stream_id() or gst_pad_create_stream_id_printf() can be * used to create a stream-id. There are no particular semantics for the * stream-id, though it should be deterministic (to support stream matching) * and it might be used to order streams (besides any information conveyed by * stream flags). * * Params: * streamId = Identifier for this stream * * Returns: the new STREAM_START event. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string streamId) { auto p = gst_event_new_stream_start(Str.toStringz(streamId)); if(p is null) { throw new ConstructionException("null returned by new_stream_start"); } this(cast(GstEvent*) p); } /** * Generates a metadata tag event from the given @taglist. * * The scope of the taglist specifies if the taglist applies to the * complete medium or only to this specific stream. As the tag event * is a sticky event, elements should merge tags received from * upstream with a given scope with their own tags with the same * scope and create a new tag event from it. * * Params: * taglist = metadata list. The event will take ownership * of the taglist. * * Returns: a new #GstEvent * * Throws: ConstructionException GTK+ fails to create the object. */ public this(TagList taglist) { auto p = gst_event_new_tag((taglist is null) ? null : taglist.getTagListStruct()); if(p is null) { throw new ConstructionException("null returned by new_tag"); } this(cast(GstEvent*) p); } /** * Generate a TOC event from the given @toc. The purpose of the TOC event is to * inform elements that some kind of the TOC was found. * * Params: * toc = #GstToc structure. * updated = whether @toc was updated or not. * * Returns: a new #GstEvent. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Toc toc, bool updated) { auto p = gst_event_new_toc((toc is null) ? null : toc.getTocStruct(), updated); if(p is null) { throw new ConstructionException("null returned by new_toc"); } this(cast(GstEvent*) p); } /** * Parses a segment @event and copies the #GstSegment into the location * given by @segment. * * Params: * segment = a pointer to a #GstSegment */ public void copySegment(Segment segment) { gst_event_copy_segment(gstEvent, (segment is null) ? null : segment.getSegmentStruct()); } /** * Retrieve the accumulated running time offset of the event. * * Events passing through #GstPads that have a running time * offset set via gst_pad_set_offset() will get their offset * adjusted according to the pad's offset. * * If the event contains any information that related to the * running time, this information will need to be updated * before usage with this offset. * * Returns: The event's running time offset * * MT safe. * * Since: 1.4 */ public long getRunningTimeOffset() { return gst_event_get_running_time_offset(gstEvent); } /** * Retrieve the sequence number of a event. * * Events have ever-incrementing sequence numbers, which may also be set * explicitly via gst_event_set_seqnum(). Sequence numbers are typically used to * indicate that a event corresponds to some other set of events or messages, * for example an EOS event corresponding to a SEEK event. It is considered good * practice to make this correspondence when possible, though it is not * required. * * Note that events and messages share the same sequence number incrementor; * two events or messages will never have the same sequence number unless * that correspondence was made explicitly. * * Returns: The event's sequence number. * * MT safe. */ public uint getSeqnum() { return gst_event_get_seqnum(gstEvent); } /** * Access the structure of the event. * * Returns: The structure of the event. The structure is still * owned by the event, which means that you should not free it and * that the pointer becomes invalid when you free the event. * * MT safe. */ public Structure getStructure() { auto p = gst_event_get_structure(gstEvent); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Checks if @event has the given @name. This function is usually used to * check the name of a custom event. * * Params: * name = name to check * * Returns: %TRUE if @name matches the name of the event structure. */ public bool hasName(string name) { return gst_event_has_name(gstEvent, Str.toStringz(name)) != 0; } /** * Get the format, minsize, maxsize and async-flag in the buffersize event. * * Params: * format = A pointer to store the format in * minsize = A pointer to store the minsize in * maxsize = A pointer to store the maxsize in * async = A pointer to store the async-flag in */ public void parseBufferSize(out GstFormat format, out long minsize, out long maxsize, out bool async) { int outasync; gst_event_parse_buffer_size(gstEvent, &format, &minsize, &maxsize, &outasync); async = (outasync == 1); } /** * Get the caps from @event. The caps remains valid as long as @event remains * valid. * * Params: * caps = A pointer to the caps */ public void parseCaps(out Caps caps) { GstCaps* outcaps = null; gst_event_parse_caps(gstEvent, &outcaps); caps = ObjectG.getDObject!(Caps)(outcaps); } /** * Parse the FLUSH_STOP event and retrieve the @reset_time member. * * Params: * resetTime = if time should be reset */ public void parseFlushStop(out bool resetTime) { int outresetTime; gst_event_parse_flush_stop(gstEvent, &outresetTime); resetTime = (outresetTime == 1); } /** * Extract timestamp and duration from a new GAP event. * * Params: * timestamp = location where to store the * start time (pts) of the gap, or %NULL * duration = location where to store the duration of * the gap, or %NULL */ public void parseGap(out GstClockTime timestamp, out GstClockTime duration) { gst_event_parse_gap(gstEvent, ×tamp, &duration); } /** * * Params: * groupId = address of variable where to store the group id * Returns: %TRUE if a group id was set on the event and could be parsed, * %FALSE otherwise. * * Since: 1.2 */ public bool parseGroupId(out uint groupId) { return gst_event_parse_group_id(gstEvent, &groupId) != 0; } /** * Get the latency in the latency event. * * Params: * latency = A pointer to store the latency in. */ public void parseLatency(out GstClockTime latency) { gst_event_parse_latency(gstEvent, &latency); } /** * Parses an event containing protection system specific information and stores * the results in @system_id, @data and @origin. The data stored in @system_id, * @origin and @data are valid until @event is released. * * Params: * systemId = pointer to store the UUID * string uniquely identifying a content protection system. * data = pointer to store a #GstBuffer * holding protection system specific information. * origin = pointer to store a value that * indicates where the protection information carried by @event was extracted * from. * * Since: 1.6 */ public void parseProtection(out string systemId, out Buffer data, string[] origin) { char* outsystemId = null; GstBuffer* outdata = null; gst_event_parse_protection(gstEvent, &outsystemId, &outdata, Str.toStringzArray(origin)); systemId = Str.toString(outsystemId); data = ObjectG.getDObject!(Buffer)(outdata); } /** * Get the type, proportion, diff and timestamp in the qos event. See * gst_event_new_qos() for more information about the different QoS values. * * @timestamp will be adjusted for any pad offsets of pads it was passing through. * * Params: * type = A pointer to store the QoS type in * proportion = A pointer to store the proportion in * diff = A pointer to store the diff in * timestamp = A pointer to store the timestamp in */ public void parseQos(out GstQOSType type, out double proportion, out GstClockTimeDiff diff, out GstClockTime timestamp) { gst_event_parse_qos(gstEvent, &type, &proportion, &diff, ×tamp); } /** * Parses a seek @event and stores the results in the given result locations. * * Params: * rate = result location for the rate * format = result location for the stream format * flags = result location for the #GstSeekFlags * startType = result location for the #GstSeekType of the start position * start = result location for the start position expressed in @format * stopType = result location for the #GstSeekType of the stop position * stop = result location for the stop position expressed in @format */ public void parseSeek(out double rate, out GstFormat format, out GstSeekFlags flags, out GstSeekType startType, out long start, out GstSeekType stopType, out long stop) { gst_event_parse_seek(gstEvent, &rate, &format, &flags, &startType, &start, &stopType, &stop); } /** * Parses a segment @event and stores the result in the given @segment location. * @segment remains valid only until the @event is freed. Don't modify the segment * and make a copy if you want to modify it or store it for later use. * * Params: * segment = a pointer to a #GstSegment */ public void parseSegment(out Segment segment) { GstSegment* outsegment = null; gst_event_parse_segment(gstEvent, &outsegment); segment = ObjectG.getDObject!(Segment)(outsegment); } /** * Extracts the position and format from the segment done message. * * Params: * format = Result location for the format, or %NULL * position = Result location for the position, or %NULL */ public void parseSegmentDone(out GstFormat format, out long position) { gst_event_parse_segment_done(gstEvent, &format, &position); } /** * Parse the SELECT_STREAMS event and retrieve the contained streams. * * Params: * streams = the streams * * Since: 1.10 */ public void parseSelectStreams(out ListG streams) { GList* outstreams = null; gst_event_parse_select_streams(gstEvent, &outstreams); streams = new ListG(outstreams); } /** * Parse the sink-message event. Unref @msg after usage. * * Params: * msg = a pointer to store the #GstMessage in. */ public void parseSinkMessage(out Message msg) { GstMessage* outmsg = null; gst_event_parse_sink_message(gstEvent, &outmsg); msg = ObjectG.getDObject!(Message)(outmsg); } /** * Parse the step event. * * Params: * format = a pointer to store the format in * amount = a pointer to store the amount in * rate = a pointer to store the rate in * flush = a pointer to store the flush boolean in * intermediate = a pointer to store the intermediate * boolean in */ public void parseStep(out GstFormat format, out ulong amount, out double rate, out bool flush, out bool intermediate) { int outflush; int outintermediate; gst_event_parse_step(gstEvent, &format, &amount, &rate, &outflush, &outintermediate); flush = (outflush == 1); intermediate = (outintermediate == 1); } /** * Parse a stream-start @event and extract the #GstStream from it. * * Params: * stream = adress of variable to store the stream * * Since: 1.10 */ public void parseStream(out Stream stream) { GstStream* outstream = null; gst_event_parse_stream(gstEvent, &outstream); stream = ObjectG.getDObject!(Stream)(outstream); } /** * Retrieve new #GstStreamCollection from STREAM_COLLECTION event @event. * * Params: * collection = pointer to store the collection * * Since: 1.10 */ public void parseStreamCollection(out StreamCollection collection) { GstStreamCollection* outcollection = null; gst_event_parse_stream_collection(gstEvent, &outcollection); collection = ObjectG.getDObject!(StreamCollection)(outcollection); } /** */ public void parseStreamFlags(out GstStreamFlags flags) { gst_event_parse_stream_flags(gstEvent, &flags); } /** * Parse a stream-group-done @event and store the result in the given * @group_id location. * * Params: * groupId = address of variable to store the group id into * * Since: 1.10 */ public void parseStreamGroupDone(out uint groupId) { gst_event_parse_stream_group_done(gstEvent, &groupId); } /** * Parse a stream-id @event and store the result in the given @stream_id * location. The string stored in @stream_id must not be modified and will * remain valid only until @event gets freed. Make a copy if you want to * modify it or store it for later use. * * Params: * streamId = pointer to store the stream-id */ public void parseStreamStart(out string streamId) { char* outstreamId = null; gst_event_parse_stream_start(gstEvent, &outstreamId); streamId = Str.toString(outstreamId); } /** * Parses a tag @event and stores the results in the given @taglist location. * No reference to the taglist will be returned, it remains valid only until * the @event is freed. Don't modify or free the taglist, make a copy if you * want to modify it or store it for later use. * * Params: * taglist = pointer to metadata list */ public void parseTag(out TagList taglist) { GstTagList* outtaglist = null; gst_event_parse_tag(gstEvent, &outtaglist); taglist = ObjectG.getDObject!(TagList)(outtaglist); } /** * Parse a TOC @event and store the results in the given @toc and @updated locations. * * Params: * toc = pointer to #GstToc structure. * updated = pointer to store TOC updated flag. */ public void parseToc(out Toc toc, out bool updated) { GstToc* outtoc = null; int outupdated; gst_event_parse_toc(gstEvent, &outtoc, &outupdated); toc = ObjectG.getDObject!(Toc)(outtoc); updated = (outupdated == 1); } /** * Parse a TOC select @event and store the results in the given @uid location. * * Params: * uid = storage for the selection UID. */ public void parseTocSelect(out string uid) { char* outuid = null; gst_event_parse_toc_select(gstEvent, &outuid); uid = Str.toString(outuid); } /** * All streams that have the same group id are supposed to be played * together, i.e. all streams inside a container file should have the * same group id but different stream ids. The group id should change * each time the stream is started, resulting in different group ids * each time a file is played for example. * * Use gst_util_group_id_next() to get a new group id. * * Params: * groupId = the group id to set * * Since: 1.2 */ public void setGroupId(uint groupId) { gst_event_set_group_id(gstEvent, groupId); } /** * Set the running time offset of a event. See * gst_event_get_running_time_offset() for more information. * * MT safe. * * Params: * offset = A the new running time offset * * Since: 1.4 */ public void setRunningTimeOffset(long offset) { gst_event_set_running_time_offset(gstEvent, offset); } /** * Set the sequence number of a event. * * This function might be called by the creator of a event to indicate that the * event relates to other events or messages. See gst_event_get_seqnum() for * more information. * * MT safe. * * Params: * seqnum = A sequence number. */ public void setSeqnum(uint seqnum) { gst_event_set_seqnum(gstEvent, seqnum); } /** * Set the @stream on the stream-start @event * * Params: * stream = the stream object to set * * Since: 1.10 */ public void setStream(Stream stream) { gst_event_set_stream(gstEvent, (stream is null) ? null : stream.getStreamStruct()); } /** */ public void setStreamFlags(GstStreamFlags flags) { gst_event_set_stream_flags(gstEvent, flags); } /** * Get a writable version of the structure. * * Returns: The structure of the event. The structure * is still owned by the event, which means that you should not free * it and that the pointer becomes invalid when you free the event. * This function checks if @event is writable and will never return * %NULL. * * MT safe. */ public Structure writableStructure() { auto p = gst_event_writable_structure(gstEvent); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Gets the #GstEventTypeFlags associated with @type. * * Params: * type = a #GstEventType * * Returns: a #GstEventTypeFlags. */ public static GstEventTypeFlags typeGetFlags(GstEventType type) { return gst_event_type_get_flags(type); } /** * Get a printable name for the given event type. Do not modify or free. * * Params: * type = the event type * * Returns: a reference to the static name of the event. */ public static string typeGetName(GstEventType type) { return Str.toString(gst_event_type_get_name(type)); } /** * Get the unique quark for the given event type. * * Params: * type = the event type * * Returns: the quark associated with the event type */ public static GQuark typeToQuark(GstEventType type) { return gst_event_type_to_quark(type); } } GtkD-3.7.5/generated/gstreamer/gstreamer/FlagSet.d000066400000000000000000000030251324604450400217730ustar00rootroot00000000000000/* * 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 gstreamer.FlagSet; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class FlagSet { /** */ public static GType getType() { return gst_flagset_get_type(); } /** * Create a new sub-class of #GST_TYPE_FLAG_SET * which will pretty-print the human-readable flags * when serializing, for easier debugging. * * Params: * flagsType = a #GType of a #G_TYPE_FLAGS type. * * Since: 1.6 */ public static GType register(GType flagsType) { return gst_flagset_register(flagsType); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Format.d000066400000000000000000000072121324604450400217000ustar00rootroot00000000000000/* * 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 gstreamer.Format; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Iterator; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public struct Format { /** * Return the format registered with the given nick. * * Params: * nick = The nick of the format * * Returns: The format with @nick or GST_FORMAT_UNDEFINED * if the format was not registered. */ public static GstFormat getByNick(string nick) { return gst_format_get_by_nick(Str.toStringz(nick)); } /** * Get details about the given format. * * Params: * format = The format to get details of * * Returns: The #GstFormatDefinition for @format or %NULL * on failure. * * MT safe. */ public static GstFormatDefinition* getDetails(GstFormat format) { return gst_format_get_details(format); } /** * Get a printable name for the given format. Do not modify or free. * * Params: * format = a #GstFormat * * Returns: a reference to the static name of the format * or %NULL if the format is unknown. */ public static string getName(GstFormat format) { return Str.toString(gst_format_get_name(format)); } /** * Iterate all the registered formats. The format definition is read * only. * * Returns: a GstIterator of #GstFormatDefinition. */ public static Iterator iterateDefinitions() { auto p = gst_format_iterate_definitions(); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Create a new GstFormat based on the nick or return an * already registered format with that nick. * * Params: * nick = The nick of the new format * description = The description of the new format * * Returns: A new GstFormat or an already registered format * with the same nick. * * MT safe. */ public static GstFormat register(string nick, string description) { return gst_format_register(Str.toStringz(nick), Str.toStringz(description)); } /** * Get the unique quark for the given format. * * Params: * format = a #GstFormat * * Returns: the quark associated with the format or 0 if the format * is unknown. */ public static GQuark toQuark(GstFormat format) { return gst_format_to_quark(format); } /** * See if the given format is inside the format array. * * Params: * formats = The format array to search * format = the format to find * * Returns: %TRUE if the format is found inside the array */ public static bool contains(GstFormat[] formats, GstFormat format) { return gst_formats_contains(formats.ptr, format) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/Fraction.d000066400000000000000000000023031324604450400222110ustar00rootroot00000000000000/* * 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 gstreamer.Fraction; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class Fraction { /** */ public static GType getType() { return gst_fraction_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/FractionRange.d000066400000000000000000000023231324604450400231700ustar00rootroot00000000000000/* * 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 gstreamer.FractionRange; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class FractionRange { /** */ public static GType getType() { return gst_fraction_range_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/GError.d000066400000000000000000000032061324604450400216470ustar00rootroot00000000000000/* * 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 gstreamer.GError; private import glib.Str; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public struct GError { /** * Get a string describing the error message in the current locale. * * Params: * domain = the GStreamer error domain this error belongs to. * code = the error code belonging to the domain. * * Returns: a newly allocated string describing * the error message (in UTF-8 encoding) */ public static string errorGetMessage(GQuark domain, int code) { auto retStr = gst_error_get_message(domain, code); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gstreamer/gstreamer/GStreamer.d000066400000000000000000000172461324604450400223510ustar00rootroot00000000000000/* * 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 gstreamer.GStreamer; private import glib.ErrorG; private import glib.GException; private import glib.OptionGroup; private import glib.Str; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public struct GStreamer { /** * Clean up any resources created by GStreamer in gst_init(). * * It is normally not needed to call this function in a normal application * as the resources will automatically be freed when the program terminates. * This function is therefore mostly used by testsuites and other memory * profiling tools. * * After this call GStreamer (including this method) should not be used anymore. */ public static void deinit() { gst_deinit(); } /** * Initializes the GStreamer library, setting up internal path lists, * registering built-in elements, and loading standard plugins. * * Unless the plugin registry is disabled at compile time, the registry will be * loaded. By default this will also check if the registry cache needs to be * updated and rescan all plugins if needed. See gst_update_registry() for * details and section * Running GStreamer Applications * for how to disable automatic registry updates. * * > This function will terminate your program if it was unable to initialize * > GStreamer for some reason. If you want your program to fall back, * > use gst_init_check() instead. * * WARNING: This function does not work in the same way as corresponding * functions in other glib-style libraries, such as gtk_init\(\). In * particular, unknown command line options cause this function to * abort program execution. * * Params: * argv = pointer to application's argv */ public static void init(ref string[] argv) { int argc = cast(int)argv.length; char** outargv = Str.toStringzArray(argv); gst_init(&argc, &outargv); argv = Str.toStringArray(outargv, argc); } /** * Initializes the GStreamer library, setting up internal path lists, * registering built-in elements, and loading standard plugins. * * This function will return %FALSE if GStreamer could not be initialized * for some reason. If you want your program to fail fatally, * use gst_init() instead. * * Params: * argv = pointer to application's argv * * Returns: %TRUE if GStreamer could be initialized. * * Throws: GException on failure. */ public static bool initCheck(ref string[] argv) { int argc = cast(int)argv.length; char** outargv = Str.toStringzArray(argv); GError* err = null; auto p = gst_init_check(&argc, &outargv, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } argv = Str.toStringArray(outargv, argc); return p; } /** * Returns a #GOptionGroup with GStreamer's argument specifications. The * group is set up to use standard GOption callbacks, so when using this * group in combination with GOption parsing methods, all argument parsing * and initialization is automated. * * This function is useful if you want to integrate GStreamer with other * libraries that use GOption (see g_option_context_add_group() ). * * If you use this function, you should make sure you initialise the GLib * threading system as one of the very first things in your program * (see the example at the beginning of this section). * * Returns: a pointer to GStreamer's option group. */ public static OptionGroup initGetOptionGroup() { auto p = gst_init_get_option_group(); if(p is null) { return null; } return new OptionGroup(cast(GOptionGroup*) p, true); } /** * Use this function to check if GStreamer has been initialized with gst_init() * or gst_init_check(). * * Returns: %TRUE if initialization has been done, %FALSE otherwise. */ public static bool isInitialized() { return gst_is_initialized() != 0; } /** * Some functions in the GStreamer core might install a custom SIGSEGV handler * to better catch and report errors to the application. Currently this feature * is enabled by default when loading plugins. * * Applications might want to disable this behaviour with the * gst_segtrap_set_enabled() function. This is typically done if the application * wants to install its own handler without GStreamer interfering. * * Returns: %TRUE if GStreamer is allowed to install a custom SIGSEGV handler. */ public static bool segtrapIsEnabled() { return gst_segtrap_is_enabled() != 0; } /** * Applications might want to disable/enable the SIGSEGV handling of * the GStreamer core. See gst_segtrap_is_enabled() for more information. * * Params: * enabled = whether a custom SIGSEGV handler should be installed. */ public static void segtrapSetEnabled(bool enabled) { gst_segtrap_set_enabled(enabled); } /** * Forces GStreamer to re-scan its plugin paths and update the default * plugin registry. * * Applications will almost never need to call this function, it is only * useful if the application knows new plugins have been installed (or old * ones removed) since the start of the application (or, to be precise, the * first call to gst_init()) and the application wants to make use of any * newly-installed plugins without restarting the application. * * Applications should assume that the registry update is neither atomic nor * thread-safe and should therefore not have any dynamic pipelines running * (including the playbin and decodebin elements) and should also not create * any elements or access the GStreamer registry while the update is in * progress. * * Note that this function may block for a significant amount of time. * * Returns: %TRUE if the registry has been updated successfully (does not * imply that there were changes), otherwise %FALSE. */ public static bool updateRegistry() { return gst_update_registry() != 0; } /** * Gets the version number of the GStreamer library. * * Params: * major = pointer to a guint to store the major version number * minor = pointer to a guint to store the minor version number * micro = pointer to a guint to store the micro version number * nano = pointer to a guint to store the nano version number */ public static void versio(out uint major, out uint minor, out uint micro, out uint nano) { gst_version(&major, &minor, µ, &nano); } /** * This function returns a string that is useful for describing this version * of GStreamer to the outside world: user agent strings, logging, ... * * Returns: a newly allocated string describing this version * of GStreamer. */ public static string versionString() { auto retStr = gst_version_string(); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gstreamer/gstreamer/GhostPad.d000066400000000000000000000211421324604450400221570ustar00rootroot00000000000000/* * 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 gstreamer.GhostPad; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gstreamer.ObjectGst; private import gstreamer.Pad; private import gstreamer.PadTemplate; private import gstreamer.ProxyPad; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * GhostPads are useful when organizing pipelines with #GstBin like elements. * The idea here is to create hierarchical element graphs. The bin element * contains a sub-graph. Now one would like to treat the bin-element like any * other #GstElement. This is where GhostPads come into play. A GhostPad acts as * a proxy for another pad. Thus the bin can have sink and source ghost-pads * that are associated with sink and source pads of the child elements. * * If the target pad is known at creation time, gst_ghost_pad_new() is the * function to use to get a ghost-pad. Otherwise one can use gst_ghost_pad_new_no_target() * to create the ghost-pad and use gst_ghost_pad_set_target() to establish the * association later on. * * Note that GhostPads add overhead to the data processing of a pipeline. */ public class GhostPad : ProxyPad { /** the main Gtk struct */ protected GstGhostPad* gstGhostPad; /** Get the main Gtk struct */ public GstGhostPad* getGhostPadStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstGhostPad; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstGhostPad; } protected override void setStruct(GObject* obj) { gstGhostPad = cast(GstGhostPad*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstGhostPad* gstGhostPad, bool ownedRef = false) { this.gstGhostPad = gstGhostPad; super(cast(GstProxyPad*)gstGhostPad, ownedRef); } /** */ public static GType getType() { return gst_ghost_pad_get_type(); } /** * Create a new ghostpad with @target as the target. The direction will be taken * from the target pad. @target must be unlinked. * * Will ref the target. * * Params: * name = the name of the new pad, or %NULL to assign a default name * target = the pad to ghost. * * Returns: a new #GstPad, or %NULL in * case of an error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, Pad target) { auto p = gst_ghost_pad_new(Str.toStringz(name), (target is null) ? null : target.getPadStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstGhostPad*) p); } /** * Create a new ghostpad with @target as the target. The direction will be taken * from the target pad. The template used on the ghostpad will be @template. * * Will ref the target. * * Params: * name = the name of the new pad, or %NULL to assign a default name. * target = the pad to ghost. * templ = the #GstPadTemplate to use on the ghostpad. * * Returns: a new #GstPad, or %NULL in * case of an error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, Pad target, PadTemplate templ) { auto p = gst_ghost_pad_new_from_template(Str.toStringz(name), (target is null) ? null : target.getPadStruct(), (templ is null) ? null : templ.getPadTemplateStruct()); if(p is null) { throw new ConstructionException("null returned by new_from_template"); } this(cast(GstGhostPad*) p, true); } /** * Create a new ghostpad without a target with the given direction. * A target can be set on the ghostpad later with the * gst_ghost_pad_set_target() function. * * The created ghostpad will not have a padtemplate. * * Params: * name = the name of the new pad, or %NULL to assign a default name. * dir = the direction of the ghostpad * * Returns: a new #GstPad, or %NULL in * case of an error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, GstPadDirection dir) { auto p = gst_ghost_pad_new_no_target(Str.toStringz(name), dir); if(p is null) { throw new ConstructionException("null returned by new_no_target"); } this(cast(GstGhostPad*) p, true); } /** * Create a new ghostpad based on @templ, without setting a target. The * direction will be taken from the @templ. * * Params: * name = the name of the new pad, or %NULL to assign a default name * templ = the #GstPadTemplate to create the ghostpad from. * * Returns: a new #GstPad, or %NULL in * case of an error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, PadTemplate templ) { auto p = gst_ghost_pad_new_no_target_from_template(Str.toStringz(name), (templ is null) ? null : templ.getPadTemplateStruct()); if(p is null) { throw new ConstructionException("null returned by new_no_target_from_template"); } this(cast(GstGhostPad*) p, true); } /** * Invoke the default activate mode function of a ghost pad. * * Params: * pad = the #GstPad to activate or deactivate. * parent = the parent of @pad or %NULL * mode = the requested activation mode * active = whether the pad should be active or not. * * Returns: %TRUE if the operation was successful. */ public static bool activateModeDefault(Pad pad, ObjectGst parent, GstPadMode mode, bool active) { return gst_ghost_pad_activate_mode_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), mode, active) != 0; } /** * Invoke the default activate mode function of a proxy pad that is * owned by a ghost pad. * * Params: * pad = the #GstPad to activate or deactivate. * parent = the parent of @pad or %NULL * mode = the requested activation mode * active = whether the pad should be active or not. * * Returns: %TRUE if the operation was successful. */ public static bool internalActivateModeDefault(Pad pad, ObjectGst parent, GstPadMode mode, bool active) { return gst_ghost_pad_internal_activate_mode_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), mode, active) != 0; } /** * Finish initialization of a newly allocated ghost pad. * * This function is most useful in language bindings and when subclassing * #GstGhostPad; plugin and application developers normally will not call this * function. Call this function directly after a call to g_object_new * (GST_TYPE_GHOST_PAD, "direction", @dir, ..., NULL). * * Returns: %TRUE if the construction succeeds, %FALSE otherwise. */ public bool construct() { return gst_ghost_pad_construct(gstGhostPad) != 0; } /** * Get the target pad of @gpad. Unref target pad after usage. * * Returns: the target #GstPad, can be * %NULL if the ghostpad has no target set. Unref target pad after * usage. */ public Pad getTarget() { auto p = gst_ghost_pad_get_target(gstGhostPad); if(p is null) { return null; } return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); } /** * Set the new target of the ghostpad @gpad. Any existing target * is unlinked and links to the new target are established. if @newtarget is * %NULL the target will be cleared. * * Params: * newtarget = the new pad target * * Returns: %TRUE if the new target could be set. This function * can return %FALSE when the internal pads could not be linked. */ public bool setTarget(Pad newtarget) { return gst_ghost_pad_set_target(gstGhostPad, (newtarget is null) ? null : newtarget.getPadStruct()) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/Int64Range.d000066400000000000000000000023121324604450400223250ustar00rootroot00000000000000/* * 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 gstreamer.Int64Range; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class Int64Range { /** */ public static GType getType() { return gst_int64_range_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/IntRange.d000066400000000000000000000023041324604450400221540ustar00rootroot00000000000000/* * 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 gstreamer.IntRange; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class IntRange { /** */ public static GType getType() { return gst_int_range_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Iterator.d000066400000000000000000000314701324604450400222440ustar00rootroot00000000000000/* * 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 gstreamer.Iterator; private import glib.ConstructionException; private import glib.ListG; private import glib.MemorySlice; private import glib.Mutex; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * A GstIterator is used to retrieve multiple objects from another object in * a threadsafe way. * * Various GStreamer objects provide access to their internal structures using * an iterator. * * Note that if calling a GstIterator function results in your code receiving * a refcounted object (with, say, g_value_get_object()), the refcount for that * object will not be increased. Your code is responsible for taking a reference * if it wants to continue using it later. * * The basic use pattern of an iterator is as follows: * |[ * GstIterator *it = _get_iterator(object); * GValue item = G_VALUE_INIT; * done = FALSE; * while (!done) { * switch (gst_iterator_next (it, &item)) { * case GST_ITERATOR_OK: * ...get/use/change item here... * g_value_reset (&item); * break; * case GST_ITERATOR_RESYNC: * ...rollback changes to items... * gst_iterator_resync (it); * break; * case GST_ITERATOR_ERROR: * ...wrong parameters were given... * done = TRUE; * break; * case GST_ITERATOR_DONE: * done = TRUE; * break; * } * } * g_value_unset (&item); * gst_iterator_free (it); * ]| */ public class Iterator { /** the main Gtk struct */ protected GstIterator* gstIterator; protected bool ownedRef; /** Get the main Gtk struct */ public GstIterator* getIteratorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstIterator; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstIterator; } /** * Sets our main struct and passes it to the parent class. */ public this (GstIterator* gstIterator, bool ownedRef = false) { this.gstIterator = gstIterator; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_iterator_free(gstIterator); } /** */ public static GType getType() { return gst_iterator_get_type(); } /** * Create a new iterator. This function is mainly used for objects * implementing the next/resync/free function to iterate a data structure. * * For each item retrieved, the @item function is called with the lock * held. The @free function is called when the iterator is freed. * * Params: * size = the size of the iterator structure * type = #GType of children * lock = pointer to a #GMutex. * masterCookie = pointer to a guint32 that is changed when the items in the * iterator changed. * copy = copy function * next = function to get next item * item = function to call on each item retrieved * resync = function to resync the iterator * free = function to free the iterator * * Returns: the new #GstIterator. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint size, GType type, Mutex lock, uint* masterCookie, GstIteratorCopyFunction copy, GstIteratorNextFunction next, GstIteratorItemFunction item, GstIteratorResyncFunction resync, GstIteratorFreeFunction free) { auto p = gst_iterator_new(size, type, (lock is null) ? null : lock.getMutexStruct(), masterCookie, copy, next, item, resync, free); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstIterator*) p); } /** * Create a new iterator designed for iterating @list. * * The list you iterate is usually part of a data structure @owner and is * protected with @lock. * * The iterator will use @lock to retrieve the next item of the list and it * will then call the @item function before releasing @lock again. * * When a concurrent update to the list is performed, usually by @owner while * holding @lock, @master_cookie will be updated. The iterator implementation * will notice the update of the cookie and will return %GST_ITERATOR_RESYNC to * the user of the iterator in the next call to gst_iterator_next(). * * Params: * type = #GType of elements * lock = pointer to a #GMutex protecting the list. * masterCookie = pointer to a guint32 that is incremented when the list * is changed. * list = pointer to the list * owner = object owning the list * item = function to call on each item retrieved * * Returns: the new #GstIterator for @list. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GType type, Mutex lock, uint* masterCookie, ref ListG list, ObjectG owner, GstIteratorItemFunction item) { GList* outlist = list.getListGStruct(); auto p = gst_iterator_new_list(type, (lock is null) ? null : lock.getMutexStruct(), masterCookie, &outlist, (owner is null) ? null : owner.getObjectGStruct(), item); if(p is null) { throw new ConstructionException("null returned by new_list"); } list = new ListG(outlist); this(cast(GstIterator*) p); } /** * This #GstIterator is a convenient iterator for the common * case where a #GstIterator needs to be returned but only * a single object has to be considered. This happens often * for the #GstPadIterIntLinkFunction. * * Params: * type = #GType of the passed object * object = object that this iterator should return * * Returns: the new #GstIterator for @object. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GType type, Value object) { auto p = gst_iterator_new_single(type, (object is null) ? null : object.getValueStruct()); if(p is null) { throw new ConstructionException("null returned by new_single"); } this(cast(GstIterator*) p); } /** * Copy the iterator and its state. * * Returns: a new copy of @it. */ public Iterator copy() { auto p = gst_iterator_copy(gstIterator); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Create a new iterator from an existing iterator. The new iterator * will only return those elements that match the given compare function @func. * The first parameter that is passed to @func is the #GValue of the current * iterator element and the second parameter is @user_data. @func should * return 0 for elements that should be included in the filtered iterator. * * When this iterator is freed, @it will also be freed. * * Params: * func = the compare function to select elements * userData = user data passed to the compare function * * Returns: a new #GstIterator. * * MT safe. */ public Iterator filter(GCompareFunc func, Value userData) { auto p = gst_iterator_filter(gstIterator, func, (userData is null) ? null : userData.getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Find the first element in @it that matches the compare function @func. * @func should return 0 when the element is found. The first parameter * to @func will be the current element of the iterator and the * second parameter will be @user_data. * The result will be stored in @elem if a result is found. * * The iterator will not be freed. * * This function will return %FALSE if an error happened to the iterator * or if the element wasn't found. * * Params: * func = the compare function to use * elem = pointer to a #GValue where to store the result * userData = user data passed to the compare function * * Returns: Returns %TRUE if the element was found, else %FALSE. * * MT safe. */ public bool findCustom(GCompareFunc func, out Value elem, void* userData) { GValue* outelem = sliceNew!GValue(); auto p = gst_iterator_find_custom(gstIterator, func, outelem, userData) != 0; elem = ObjectG.getDObject!(Value)(outelem, true); return p; } /** * Folds @func over the elements of @iter. That is to say, @func will be called * as @func (object, @ret, @user_data) for each object in @it. The normal use * of this procedure is to accumulate the results of operating on the objects in * @ret. * * This procedure can be used (and is used internally) to implement the * gst_iterator_foreach() and gst_iterator_find_custom() operations. * * The fold will proceed as long as @func returns %TRUE. When the iterator has no * more arguments, %GST_ITERATOR_DONE will be returned. If @func returns %FALSE, * the fold will stop, and %GST_ITERATOR_OK will be returned. Errors or resyncs * will cause fold to return %GST_ITERATOR_ERROR or %GST_ITERATOR_RESYNC as * appropriate. * * The iterator will not be freed. * * Params: * func = the fold function * ret = the seed value passed to the fold function * userData = user data passed to the fold function * * Returns: A #GstIteratorResult, as described above. * * MT safe. */ public GstIteratorResult fold(GstIteratorFoldFunction func, Value ret, void* userData) { return gst_iterator_fold(gstIterator, func, (ret is null) ? null : ret.getValueStruct(), userData); } /** * Iterate over all element of @it and call the given function @func for * each element. * * Params: * func = the function to call for each element. * userData = user data passed to the function * * Returns: the result call to gst_iterator_fold(). The iterator will not be * freed. * * MT safe. */ public GstIteratorResult foreac(GstIteratorForeachFunction func, void* userData) { return gst_iterator_foreach(gstIterator, func, userData); } /** * Free the iterator. * * MT safe. */ public void free() { gst_iterator_free(gstIterator); ownedRef = false; } /** * Get the next item from the iterator in @elem. * * Only when this function returns %GST_ITERATOR_OK, @elem will contain a valid * value. @elem must have been initialized to the type of the iterator or * initialized to zeroes with g_value_unset(). The caller is responsible for * unsetting or resetting @elem with g_value_unset() or g_value_reset() * after usage. * * When this function returns %GST_ITERATOR_DONE, no more elements can be * retrieved from @it. * * A return value of %GST_ITERATOR_RESYNC indicates that the element list was * concurrently updated. The user of @it should call gst_iterator_resync() to * get the newly updated list. * * A return value of %GST_ITERATOR_ERROR indicates an unrecoverable fatal error. * * Params: * elem = pointer to hold next element * * Returns: The result of the iteration. Unset @elem after usage. * * MT safe. */ public GstIteratorResult next(out Value elem) { GValue* outelem = sliceNew!GValue(); auto p = gst_iterator_next(gstIterator, outelem); elem = ObjectG.getDObject!(Value)(outelem, true); return p; } /** * Pushes @other iterator onto @it. All calls performed on @it are * forwarded to @other. If @other returns %GST_ITERATOR_DONE, it is * popped again and calls are handled by @it again. * * This function is mainly used by objects implementing the iterator * next function to recurse into substructures. * * When gst_iterator_resync() is called on @it, @other will automatically be * popped. * * MT safe. * * Params: * other = The #GstIterator to push */ public void push(Iterator other) { gst_iterator_push(gstIterator, (other is null) ? null : other.getIteratorStruct()); } /** * Resync the iterator. this function is mostly called * after gst_iterator_next() returned %GST_ITERATOR_RESYNC. * * When an iterator was pushed on @it, it will automatically be popped again * with this function. * * MT safe. */ public void resync() { gst_iterator_resync(gstIterator); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Memory.d000066400000000000000000000235201324604450400217200ustar00rootroot00000000000000/* * 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 gstreamer.Memory; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Allocator; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * GstMemory is a lightweight refcounted object that wraps a region of memory. * They are typically used to manage the data of a #GstBuffer. * * A GstMemory object has an allocated region of memory of maxsize. The maximum * size does not change during the lifetime of the memory object. The memory * also has an offset and size property that specifies the valid range of memory * in the allocated region. * * Memory is usually created by allocators with a gst_allocator_alloc() * method call. When %NULL is used as the allocator, the default allocator will * be used. * * New allocators can be registered with gst_allocator_register(). * Allocators are identified by name and can be retrieved with * gst_allocator_find(). gst_allocator_set_default() can be used to change the * default allocator. * * New memory can be created with gst_memory_new_wrapped() that wraps the memory * allocated elsewhere. * * Refcounting of the memory block is performed with gst_memory_ref() and * gst_memory_unref(). * * The size of the memory can be retrieved and changed with * gst_memory_get_sizes() and gst_memory_resize() respectively. * * Getting access to the data of the memory is performed with gst_memory_map(). * The call will return a pointer to offset bytes into the region of memory. * After the memory access is completed, gst_memory_unmap() should be called. * * Memory can be copied with gst_memory_copy(), which will return a writable * copy. gst_memory_share() will create a new memory block that shares the * memory with an existing memory block at a custom offset and with a custom * size. * * Memory can be efficiently merged when gst_memory_is_span() returns %TRUE. */ public class Memory { /** the main Gtk struct */ protected GstMemory* gstMemory; protected bool ownedRef; /** Get the main Gtk struct */ public GstMemory* getMemoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMemory; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMemory; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMemory* gstMemory, bool ownedRef = false) { this.gstMemory = gstMemory; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_memory_get_type(); } /** * Allocate a new memory block that wraps the given @data. * * The prefix/padding must be filled with 0 if @flags contains * #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED respectively. * * Params: * flags = #GstMemoryFlags * data = data to * wrap * maxsize = allocated size of @data * offset = offset in @data * userData = user_data * notify = called with @user_data when the memory is freed * * Returns: a new #GstMemory. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstMemoryFlags flags, ubyte[] data, size_t maxsize, size_t offset, void* userData, GDestroyNotify notify) { auto p = gst_memory_new_wrapped(flags, data.ptr, maxsize, offset, cast(size_t)data.length, userData, notify); if(p is null) { throw new ConstructionException("null returned by new_wrapped"); } this(cast(GstMemory*) p); } /** * Return a copy of @size bytes from @mem starting from @offset. This copy is * guaranteed to be writable. @size can be set to -1 to return a copy * from @offset to the end of the memory region. * * Params: * offset = offset to copy from * size = size to copy, or -1 to copy to the end of the memory region * * Returns: a new #GstMemory. */ public Memory copy(ptrdiff_t offset, ptrdiff_t size) { auto p = gst_memory_copy(gstMemory, offset, size); if(p is null) { return null; } return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); } /** * Get the current @size, @offset and @maxsize of @mem. * * Params: * offset = pointer to offset * maxsize = pointer to maxsize * * Returns: the current sizes of @mem */ public size_t getSizes(size_t* offset, size_t* maxsize) { return gst_memory_get_sizes(gstMemory, offset, maxsize); } /** * Initializes a newly allocated @mem with the given parameters. This function * will call gst_mini_object_init() with the default memory parameters. * * Params: * flags = #GstMemoryFlags * allocator = the #GstAllocator * parent = the parent of @mem * maxsize = the total size of the memory * alig = the alignment of the memory * offset = The offset in the memory * size = the size of valid data in the memory */ public void init(GstMemoryFlags flags, Allocator allocator, Memory parent, size_t maxsize, size_t alig, size_t offset, size_t size) { gst_memory_init(gstMemory, flags, (allocator is null) ? null : allocator.getAllocatorStruct(), (parent is null) ? null : parent.getMemoryStruct(), maxsize, alig, offset, size); } /** * Check if @mem1 and mem2 share the memory with a common parent memory object * and that the memory is contiguous. * * If this is the case, the memory of @mem1 and @mem2 can be merged * efficiently by performing gst_memory_share() on the parent object from * the returned @offset. * * Params: * mem2 = a #GstMemory * offset = a pointer to a result offset * * Returns: %TRUE if the memory is contiguous and of a common parent. */ public bool isSpan(Memory mem2, size_t* offset) { return gst_memory_is_span(gstMemory, (mem2 is null) ? null : mem2.getMemoryStruct(), offset) != 0; } /** * Check if @mem if allocated with an allocator for @mem_type. * * Params: * memType = a memory type * * Returns: %TRUE if @mem was allocated from an allocator for @mem_type. * * Since: 1.2 */ public bool isType(string memType) { return gst_memory_is_type(gstMemory, Str.toStringz(memType)) != 0; } /** * Create a #GstMemory object that is mapped with @flags. If @mem is mappable * with @flags, this function returns the mapped @mem directly. Otherwise a * mapped copy of @mem is returned. * * This function takes ownership of old @mem and returns a reference to a new * #GstMemory. * * Params: * info = pointer for info * flags = mapping flags * * Returns: a #GstMemory object mapped * with @flags or %NULL when a mapping is not possible. */ public Memory makeMapped(out GstMapInfo info, GstMapFlags flags) { auto p = gst_memory_make_mapped(gstMemory, &info, flags); if(p is null) { return null; } return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); } /** * Fill @info with the pointer and sizes of the memory in @mem that can be * accessed according to @flags. * * This function can return %FALSE for various reasons: * - the memory backed by @mem is not accessible with the given @flags. * - the memory was already mapped with a different mapping. * * @info and its contents remain valid for as long as @mem is valid and * until gst_memory_unmap() is called. * * For each gst_memory_map() call, a corresponding gst_memory_unmap() call * should be done. * * Params: * info = pointer for info * flags = mapping flags * * Returns: %TRUE if the map operation was successful. */ public bool map(out GstMapInfo info, GstMapFlags flags) { return gst_memory_map(gstMemory, &info, flags) != 0; } /** * Resize the memory region. @mem should be writable and offset + size should be * less than the maxsize of @mem. * * #GST_MEMORY_FLAG_ZERO_PREFIXED and #GST_MEMORY_FLAG_ZERO_PADDED will be * cleared when offset or padding is increased respectively. * * Params: * offset = a new offset * size = a new size */ public void resize(ptrdiff_t offset, size_t size) { gst_memory_resize(gstMemory, offset, size); } /** * Return a shared copy of @size bytes from @mem starting from @offset. No * memory copy is performed and the memory region is simply shared. The result * is guaranteed to be non-writable. @size can be set to -1 to return a shared * copy from @offset to the end of the memory region. * * Params: * offset = offset to share from * size = size to share, or -1 to share to the end of the memory region * * Returns: a new #GstMemory. */ public Memory share(ptrdiff_t offset, ptrdiff_t size) { auto p = gst_memory_share(gstMemory, offset, size); if(p is null) { return null; } return ObjectG.getDObject!(Memory)(cast(GstMemory*) p, true); } /** * Release the memory obtained with gst_memory_map() * * Params: * info = a #GstMapInfo */ public void unmap(GstMapInfo* info) { gst_memory_unmap(gstMemory, info); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Message.d000066400000000000000000002111231324604450400220320ustar00rootroot00000000000000/* * 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 gstreamer.Message; private import glib.ConstructionException; private import glib.ErrorG; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.Clock; private import gstreamer.Context; private import gstreamer.Device; private import gstreamer.Element; private import gstreamer.ObjectGst; private import gstreamer.Stream; private import gstreamer.StreamCollection; private import gstreamer.Structure; private import gstreamer.TagList; private import gstreamer.Toc; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Messages are implemented as a subclass of #GstMiniObject with a generic * #GstStructure as the content. This allows for writing custom messages without * requiring an API change while allowing a wide range of different types * of messages. * * Messages are posted by objects in the pipeline and are passed to the * application using the #GstBus. * * The basic use pattern of posting a message on a #GstBus is as follows: * |[ * gst_bus_post (bus, gst_message_new_eos()); * ]| * * A #GstElement usually posts messages on the bus provided by the parent * container using gst_element_post_message(). */ public class Message { /** the main Gtk struct */ protected GstMessage* gstMessage; protected bool ownedRef; /** Get the main Gtk struct */ public GstMessage* getMessageStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMessage; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMessage; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMessage* gstMessage, bool ownedRef = false) { this.gstMessage = gstMessage; this.ownedRef = ownedRef; } /** * Get the type of the message. */ public GstMessageType type() { return cast(GstMessageType)getMessageStruct().type; } /** * Get the src (the element that originated the message) of the message. */ public ObjectGst src() { return new ObjectGst( cast(GstObject*)getMessageStruct().src ); } /** * Create a new element-specific message. This is meant as a generic way of * allowing one-way communication from an element to an application, for example * "the firewire cable was unplugged". The format of the message should be * documented in the element's documentation. The structure field can be NULL. * MT safe. * Params: * src = The object originating the message. * structure = The structure for the message. The message will take ownership of * the structure. * Returns: * The new element message. */ public static Message newElement(ObjectGst src, Structure structure) { // GstMessage* gst_message_new_element (GstObject *src, GstStructure *structure); auto p = gst_message_new_element((src is null) ? null : src.getObjectGstStruct(), (structure is null) ? null : structure.getStructureStruct()); if(p is null) { throw new ConstructionException("null returned by gst_message_new_element"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a new clock message. This message is posted whenever the * pipeline selectes a new clock for the pipeline. * MT safe. * Params: * src = The object originating the message. * clock = the new selected clock * Returns: * The new new clock message. */ public static Message newNewClock(ObjectGst src, Clock clock) { // GstMessage* gst_message_new_new_clock (GstObject *src, GstClock *clock); auto p = gst_message_new_new_clock((src is null) ? null : src.getObjectGstStruct(), (clock is null) ? null : clock.getClockStruct()); if(p is null) { throw new ConstructionException("null returned by gst_message_new_new_clock"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a new segment done message. This message is posted by elements that * finish playback of a segment as a result of a segment seek. This message * is received by the application after all elements that posted a segment_start * have posted the segment_done. * MT safe. * Params: * src = The object originating the message. * format = The format of the position being done * position = The position of the segment being done * Returns: * The new segment done message. */ public static Message newSegmentDone(ObjectGst src, GstFormat format, long position) { // GstMessage* gst_message_new_segment_done (GstObject *src, GstFormat format, gint64 position); auto p = gst_message_new_segment_done((src is null) ? null : src.getObjectGstStruct(), format, position); if(p is null) { throw new ConstructionException("null returned by gst_message_new_segment_done"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a new segment message. This message is posted by elements that * start playback of a segment as a result of a segment seek. This message * is not received by the application but is used for maintenance reasons in * container elements. * MT safe. * Params: * src = The object originating the message. * format = The format of the position being played * position = The position of the segment being played * Returns: * The new segment start message. */ public static Message newSegmentStart(ObjectGst src, GstFormat format, long position) { // GstMessage* gst_message_new_segment_start (GstObject *src, GstFormat format, gint64 position); auto p = gst_message_new_segment_start((src is null) ? null : src.getObjectGstStruct(), format, position); if(p is null) { throw new ConstructionException("null returned by gst_message_new_segment_start"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a new warning message. The message will make copies of error and * debug. * MT safe. * Params: * src = The object originating the message. * error = The GError for this message. * debug = A debugging string for something or other. * Returns: * The new warning message. */ public static Message newWarning(ObjectGst src, ErrorG error, string dbug) { // GstMessage* gst_message_new_warning (GstObject *src, GError *error, gchar *debug); auto p = gst_message_new_warning((src is null) ? null : src.getObjectGstStruct(), (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbug)); if(p is null) { throw new ConstructionException("null returned by gst_message_new_warning"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a state dirty message. This message is posted whenever an element * changed its state asynchronously and is used internally to update the * states of container objects. * MT safe. * Params: * src = the object originating the message * Returns: * The new state dirty message. */ public static Message newStateDirty(ObjectGst src) { // GstMessage* gst_message_new_state_dirty (GstObject *src); auto p = gst_message_new_state_dirty((src is null) ? null : src.getObjectGstStruct()); if(p is null) { throw new ConstructionException("null returned by gst_message_new_state_dirty"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a new eos message. This message is generated and posted in * the sink elements of a GstBin. The bin will only forward the EOS * message to the application if all sinks have posted an EOS message. * MT safe. * Params: * src = The object originating the message. * Returns: * The new eos message. */ public static Message newEOS(ObjectGst src) { // GstMessage* gst_message_new_eos (GstObject *src); auto p = gst_message_new_eos((src is null) ? null : src.getObjectGstStruct()); if(p is null) { throw new ConstructionException("null returned by gst_message_new_eos"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a new error message. The message will copy error and * debug. This message is posted by element when a fatal event * occured. The pipeline will probably (partially) stop. The application * receiving this message should stop the pipeline. * MT safe. * Params: * src = The object originating the message. * error = The GError for this message. * debug = A debugging string for something or other. * Returns: * The new error message. */ public static Message newError(ObjectGst src, ErrorG error, string dbug) { // GstMessage* gst_message_new_error (GstObject *src, GError *error, gchar *debug); auto p = gst_message_new_error((src is null) ? null : src.getObjectGstStruct(), (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbug)); if(p is null) { throw new ConstructionException("null returned by gst_message_new_error"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a new info message. The message will make copies of error and * debug. * MT safe. * Since 0.10.12 * Params: * src = The object originating the message. * error = The GError for this message. * debug = A debugging string for something or other. * Returns: * The new info message. */ public static Message newInfo(ObjectGst src, ErrorG error, string dbug) { // GstMessage* gst_message_new_info (GstObject *src, GError *error, gchar *debug); auto p = gst_message_new_info((src is null) ? null : src.getObjectGstStruct(), (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbug)); if(p is null) { throw new ConstructionException("null returned by gst_message_new_info"); } return new Message(cast(GstMessage*)p); //, true); } /** * This message can be posted by elements when their latency requirements * have changed. * Params: * src = The object originating the message. * Returns: * The new latency message. MT safe. */ public static Message newLatency(ObjectGst src) { // GstMessage* gst_message_new_latency (GstObject *src); auto p = gst_message_new_latency((src is null) ? null : src.getObjectGstStruct()); if(p is null) { throw new ConstructionException("null returned by gst_message_new_latency"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a new duration changed message. This message is posted by elements * that know the duration of a stream when the duration changes. This message * is received by bins and is used to calculate the total duration of a * pipeline. Elements may post a duration message with a duration of * GST_CLOCK_TIME_NONE to indicate that the duration has changed and the * cached duration should be discarded. The new duration can then be * retrieved via a query. * Params: * src = The object originating the message. [transfer none] * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newDurationChanged(ObjectGst src) { // GstMessage * gst_message_new_duration_changed (GstObject *src); auto p = gst_message_new_duration_changed((src is null) ? null : src.getObjectGstStruct()); if(p is null) { throw new ConstructionException("null returned by gst_message_new_duration_changed((src is null) ? null : src.getObjectGstStruct())"); } return new Message(cast(GstMessage*)p); //, true); } /** * This message is posted by elements when they start an ASYNC state change. * Params: * src = The object originating the message. [transfer none] * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newAsyncStart(ObjectGst src) { // GstMessage * gst_message_new_async_start (GstObject *src); auto p = gst_message_new_async_start((src is null) ? null : src.getObjectGstStruct()); if(p is null) { throw new ConstructionException("null returned by gst_message_new_async_start((src is null) ? null : src.getObjectGstStruct())"); } return new Message(cast(GstMessage*)p); //, true); } /** * The message is posted when elements completed an ASYNC state change. * running_time contains the time of the desired running_time when this * elements goes to PLAYING. A value of GST_CLOCK_TIME_NONE for running_time * means that the element has no clock interaction and thus doesn't care about * the running_time of the pipeline. * Params: * src = The object originating the message. [transfer none] * runningTime = the desired running_time * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newAsyncDone(ObjectGst src, GstClockTime runningTime) { // GstMessage * gst_message_new_async_done (GstObject *src, GstClockTime running_time); auto p = gst_message_new_async_done((src is null) ? null : src.getObjectGstStruct(), runningTime); if(p is null) { throw new ConstructionException("null returned by gst_message_new_async_done((src is null) ? null : src.getObjectGstStruct(), runningTime)"); } return new Message(cast(GstMessage*)p); //, true); } /** * Creates a new device-added message. The device-added message is produced by * #GstDeviceProvider or a #GstDeviceMonitor. They announce the appearance * of monitored devices. * * Params: * src = The #GstObject that created the message * device = The new #GstDevice * * Return: a newly allocated #GstMessage * * Since: 1.4 * * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newDeviceAdded(ObjectGst src, Device device) { auto p = gst_message_new_device_added((src is null) ? null : src.getObjectGstStruct(), (device is null) ? null : device.getDeviceStruct()); if(p is null) { throw new ConstructionException("null returned by new_device_added"); } return new Message(cast(GstMessage*)p); //, true); } /** * Creates a new device-removed message. The device-removed message is produced * by #GstDeviceProvider or a #GstDeviceMonitor. They announce the * disappearance of monitored devices. * * Params: * src = The #GstObject that created the message * device = The removed #GstDevice * * Return: a newly allocated #GstMessage * * Since: 1.4 * * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newDeviceRemoved(ObjectGst src, Device device) { auto p = gst_message_new_device_removed((src is null) ? null : src.getObjectGstStruct(), (device is null) ? null : device.getDeviceStruct()); if(p is null) { throw new ConstructionException("null returned by new_device_removed"); } return new Message(cast(GstMessage*)p); //, true); } /** * Create a new error message. The message will copy @error and * @debug. This message is posted by element when a fatal event * occurred. The pipeline will probably (partially) stop. The application * receiving this message should stop the pipeline. * * Params: * src = The object originating the message. * error = The GError for this message. * dbg = A debugging string. * details = (allow-none): A GstStructure with details * * Return: the new error message. * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newErrorWithDetails(ObjectGst src, ErrorG error, string dbg, Structure details) { auto p = gst_message_new_error_with_details((src is null) ? null : src.getObjectGstStruct(), (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbg), (details is null) ? null : details.getStructureStruct()); if(p is null) { throw new ConstructionException("null returned by new_error_with_details"); } return new Message(cast(GstMessage*)p, true); } /** * Create a new info message. The message will make copies of @error and * @debug. * * Params: * src = The object originating the message. * error = The GError for this message. * dbg = A debugging string. * details = (allow-none): A GstStructure with details * * Return: the new warning message. * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newInfoWithDetails(ObjectGst src, ErrorG error, string dbg, Structure details) { auto p = gst_message_new_info_with_details((src is null) ? null : src.getObjectGstStruct(), (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbg), (details is null) ? null : details.getStructureStruct()); if(p is null) { throw new ConstructionException("null returned by new_info_with_details"); } return new Message(cast(GstMessage*)p, true); } /** * Create a new warning message. The message will make copies of @error and * @debug. * * Params: * src = The object originating the message. * error = The GError for this message. * dbg = A debugging string. * details = (allow-none): A GstStructure with details * * Return: the new warning message. * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newWarningWithDetails(ObjectGst src, ErrorG error, string dbg, Structure details) { auto p = gst_message_new_warning_with_details((src is null) ? null : src.getObjectGstStruct(), (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbg), (details is null) ? null : details.getStructureStruct()); if(p is null) { throw new ConstructionException("null returned by new_warning_with_details"); } return new Message(cast(GstMessage*)p, true); } /** * Creates a new stream-collection message. The message is used to announce new * #GstStreamCollection * * Params: * src = The #GstObject that created the message * collection = The #GstStreamCollection * * Return: a newly allocated #GstMessage * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newStreamCollection(ObjectGst src, StreamCollection collection) { auto p = gst_message_new_stream_collection((src is null) ? null : src.getObjectGstStruct(), (collection is null) ? null : collection.getStreamCollectionStruct()); if(p is null) { throw new ConstructionException("null returned by new_stream_collection"); } return new Message(cast(GstMessage*)p, true); } /** * Creates a new steams-selected message. The message is used to announce * that an array of streams has been selected. This is generally in response * to a #GST_EVENT_SELECT_STREAMS event, or when an element (such as decodebin3) * makes an initial selection of streams. * * The message also contains the #GstStreamCollection to which the various streams * belong to. * * Users of gst_message_new_streams_selected() can add the selected streams with * gst_message_streams_selected_add(). * * Params: * src = The #GstObject that created the message * collection = The #GstStreamCollection * * Return: a newly allocated #GstMessage * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public static Message newStreamsSelected(ObjectGst src, StreamCollection collection) { auto p = gst_message_new_streams_selected((src is null) ? null : src.getObjectGstStruct(), (collection is null) ? null : collection.getStreamCollectionStruct()); if(p is null) { throw new ConstructionException("null returned by new_streams_selected"); } return new Message(cast(GstMessage*)p, true); } /** */ /** */ public static GType getType() { return gst_message_get_type(); } /** * Create a new application-typed message. GStreamer will never create these * messages; they are a gift from us to you. Enjoy. * * Params: * src = The object originating the message. * structure = the structure for the message. The message * will take ownership of the structure. * * Returns: The new application message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, Structure structure) { auto p = gst_message_new_application((src is null) ? null : src.getObjectGstStruct(), (structure is null) ? null : structure.getStructureStruct(true)); if(p is null) { throw new ConstructionException("null returned by new_application"); } this(cast(GstMessage*) p); } /** * The message is posted when elements completed an ASYNC state change. * @running_time contains the time of the desired running_time when this * elements goes to PLAYING. A value of #GST_CLOCK_TIME_NONE for @running_time * means that the element has no clock interaction and thus doesn't care about * the running_time of the pipeline. * * Params: * src = The object originating the message. * runningTime = the desired running_time * * Returns: The new async_done message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, GstClockTime runningTime) { auto p = gst_message_new_async_done((src is null) ? null : src.getObjectGstStruct(), runningTime); if(p is null) { throw new ConstructionException("null returned by new_async_done"); } this(cast(GstMessage*) p); } /** * Create a new buffering message. This message can be posted by an element that * needs to buffer data before it can continue processing. @percent should be a * value between 0 and 100. A value of 100 means that the buffering completed. * * When @percent is < 100 the application should PAUSE a PLAYING pipeline. When * @percent is 100, the application can set the pipeline (back) to PLAYING. * The application must be prepared to receive BUFFERING messages in the * PREROLLING state and may only set the pipeline to PLAYING after receiving a * message with @percent set to 100, which can happen after the pipeline * completed prerolling. * * MT safe. * * Params: * src = The object originating the message. * percent = The buffering percent * * Returns: The new buffering message. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, int percent) { auto p = gst_message_new_buffering((src is null) ? null : src.getObjectGstStruct(), percent); if(p is null) { throw new ConstructionException("null returned by new_buffering"); } this(cast(GstMessage*) p); } /** * Create a clock lost message. This message is posted whenever the * clock is not valid anymore. * * If this message is posted by the pipeline, the pipeline will * select a new clock again when it goes to PLAYING. It might therefore * be needed to set the pipeline to PAUSED and PLAYING again. * * Params: * src = The object originating the message. * clock = the clock that was lost * * Returns: The new clock lost message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, Clock clock) { auto p = gst_message_new_clock_lost((src is null) ? null : src.getObjectGstStruct(), (clock is null) ? null : clock.getClockStruct()); if(p is null) { throw new ConstructionException("null returned by new_clock_lost"); } this(cast(GstMessage*) p); } /** * Create a clock provide message. This message is posted whenever an * element is ready to provide a clock or lost its ability to provide * a clock (maybe because it paused or became EOS). * * This message is mainly used internally to manage the clock * selection. * * Params: * src = The object originating the message. * clock = the clock it provides * ready = %TRUE if the sender can provide a clock * * Returns: the new provide clock message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, Clock clock, bool ready) { auto p = gst_message_new_clock_provide((src is null) ? null : src.getObjectGstStruct(), (clock is null) ? null : clock.getClockStruct(), ready); if(p is null) { throw new ConstructionException("null returned by new_clock_provide"); } this(cast(GstMessage*) p); } /** * Create a new custom-typed message. This can be used for anything not * handled by other message-specific functions to pass a message to the * app. The structure field can be %NULL. * * Params: * type = The #GstMessageType to distinguish messages * src = The object originating the message. * structure = the structure for the * message. The message will take ownership of the structure. * * Returns: The new message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstMessageType type, ObjectGst src, Structure structure) { auto p = gst_message_new_custom(type, (src is null) ? null : src.getObjectGstStruct(), (structure is null) ? null : structure.getStructureStruct(true)); if(p is null) { throw new ConstructionException("null returned by new_custom"); } this(cast(GstMessage*) p); } /** * This message is posted when an element has a new local #GstContext. * * Params: * src = The object originating the message. * context = the context * * Returns: The new have-context message. * * MT safe. * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, Context context) { auto p = gst_message_new_have_context((src is null) ? null : src.getObjectGstStruct(), (context is null) ? null : context.getContextStruct()); if(p is null) { throw new ConstructionException("null returned by new_have_context"); } this(cast(GstMessage*) p); } /** * This message is posted when an element needs a specific #GstContext. * * Params: * src = The object originating the message. * contextType = The context type that is needed * * Returns: The new need-context message. * * MT safe. * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, string contextType) { auto p = gst_message_new_need_context((src is null) ? null : src.getObjectGstStruct(), Str.toStringz(contextType)); if(p is null) { throw new ConstructionException("null returned by new_need_context"); } this(cast(GstMessage*) p); } /** * Progress messages are posted by elements when they use an asynchronous task * to perform actions triggered by a state change. * * @code contains a well defined string describing the action. * @text should contain a user visible string detailing the current action. * * Params: * src = The object originating the message. * type = a #GstProgressType * code = a progress code * text = free, user visible text describing the progress * * Returns: The new qos message. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, GstProgressType type, string code, string text) { auto p = gst_message_new_progress((src is null) ? null : src.getObjectGstStruct(), type, Str.toStringz(code), Str.toStringz(text)); if(p is null) { throw new ConstructionException("null returned by new_progress"); } this(cast(GstMessage*) p); } /** * * Params: * src = The #GstObject whose property changed (may or may not be a #GstElement) * propertyName = name of the property that changed * val = new property value, or %NULL * Returns: a newly allocated #GstMessage * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, string propertyName, Value val) { auto p = gst_message_new_property_notify((src is null) ? null : src.getObjectGstStruct(), Str.toStringz(propertyName), (val is null) ? null : val.getValueStruct()); if(p is null) { throw new ConstructionException("null returned by new_property_notify"); } this(cast(GstMessage*) p); } /** * A QOS message is posted on the bus whenever an element decides to drop a * buffer because of QoS reasons or whenever it changes its processing strategy * because of QoS reasons (quality adjustments such as processing at lower * accuracy). * * This message can be posted by an element that performs synchronisation against the * clock (live) or it could be dropped by an element that performs QoS because of QOS * events received from a downstream element (!live). * * @running_time, @stream_time, @timestamp, @duration should be set to the * respective running-time, stream-time, timestamp and duration of the (dropped) * buffer that generated the QoS event. Values can be left to * GST_CLOCK_TIME_NONE when unknown. * * Params: * src = The object originating the message. * live = if the message was generated by a live element * runningTime = the running time of the buffer that generated the message * streamTime = the stream time of the buffer that generated the message * timestamp = the timestamps of the buffer that generated the message * duration = the duration of the buffer that generated the message * * Returns: The new qos message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, bool live, ulong runningTime, ulong streamTime, ulong timestamp, ulong duration) { auto p = gst_message_new_qos((src is null) ? null : src.getObjectGstStruct(), live, runningTime, streamTime, timestamp, duration); if(p is null) { throw new ConstructionException("null returned by new_qos"); } this(cast(GstMessage*) p); } /** * Creates a new redirect message and adds a new entry to it. Redirect messages * are posted when an element detects that the actual data has to be retrieved * from a different location. This is useful if such a redirection cannot be * handled inside a source element, for example when HTTP 302/303 redirects * return a non-HTTP URL. * * The redirect message can hold multiple entries. The first one is added * when the redirect message is created, with the given location, tag_list, * entry_struct arguments. Use gst_message_add_redirect_entry() to add more * entries. * * Each entry has a location, a tag list, and a structure. All of these are * optional. The tag list and structure are useful for additional metadata, * such as bitrate statistics for the given location. * * By default, message recipients should treat entries in the order they are * stored. The recipient should therefore try entry #0 first, and if this * entry is not acceptable or working, try entry #1 etc. Senders must make * sure that they add entries in this order. However, recipients are free to * ignore the order and pick an entry that is "best" for them. One example * would be a recipient that scans the entries for the one with the highest * bitrate tag. * * The specified location string is copied. However, ownership over the tag * list and structure are transferred to the message. * * Params: * src = The #GstObject whose property changed (may or may not be a #GstElement) * location = location string for the new entry * tagList = tag list for the new entry * entryStruct = structure for the new entry * * Returns: a newly allocated #GstMessage * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, string location, TagList tagList, Structure entryStruct) { auto p = gst_message_new_redirect((src is null) ? null : src.getObjectGstStruct(), Str.toStringz(location), (tagList is null) ? null : tagList.getTagListStruct(), (entryStruct is null) ? null : entryStruct.getStructureStruct(true)); if(p is null) { throw new ConstructionException("null returned by new_redirect"); } this(cast(GstMessage*) p); } /** * This message can be posted by elements when they want to have their state * changed. A typical use case would be an audio server that wants to pause the * pipeline because a higher priority stream is being played. * * Params: * src = The object originating the message. * state = The new requested state * * Returns: the new request state message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, GstState state) { auto p = gst_message_new_request_state((src is null) ? null : src.getObjectGstStruct(), state); if(p is null) { throw new ConstructionException("null returned by new_request_state"); } this(cast(GstMessage*) p); } /** * Create a state change message. This message is posted whenever an element * changed its state. * * Params: * src = The object originating the message. * oldstate = the previous state * newstate = the new (current) state * pending = the pending (target) state * * Returns: the new state change message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, GstState oldstate, GstState newstate, GstState pending) { auto p = gst_message_new_state_changed((src is null) ? null : src.getObjectGstStruct(), oldstate, newstate, pending); if(p is null) { throw new ConstructionException("null returned by new_state_changed"); } this(cast(GstMessage*) p); } /** * This message is posted by elements when they complete a part, when @intermediate set * to %TRUE, or a complete step operation. * * @duration will contain the amount of time (in GST_FORMAT_TIME) of the stepped * @amount of media in format @format. * * Params: * src = The object originating the message. * format = the format of @amount * amount = the amount of stepped data * rate = the rate of the stepped amount * flush = is this an flushing step * intermediate = is this an intermediate step * duration = the duration of the data * eos = the step caused EOS * * Returns: the new step_done message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, GstFormat format, ulong amount, double rate, bool flush, bool intermediate, ulong duration, bool eos) { auto p = gst_message_new_step_done((src is null) ? null : src.getObjectGstStruct(), format, amount, rate, flush, intermediate, duration, eos); if(p is null) { throw new ConstructionException("null returned by new_step_done"); } this(cast(GstMessage*) p); } /** * This message is posted by elements when they accept or activate a new step * event for @amount in @format. * * @active is set to %FALSE when the element accepted the new step event and has * queued it for execution in the streaming threads. * * @active is set to %TRUE when the element has activated the step operation and * is now ready to start executing the step in the streaming thread. After this * message is emitted, the application can queue a new step operation in the * element. * * Params: * src = The object originating the message. * active = if the step is active or queued * format = the format of @amount * amount = the amount of stepped data * rate = the rate of the stepped amount * flush = is this an flushing step * intermediate = is this an intermediate step * * Returns: The new step_start message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, bool active, GstFormat format, ulong amount, double rate, bool flush, bool intermediate) { auto p = gst_message_new_step_start((src is null) ? null : src.getObjectGstStruct(), active, format, amount, rate, flush, intermediate); if(p is null) { throw new ConstructionException("null returned by new_step_start"); } this(cast(GstMessage*) p); } /** * Create a new stream_start message. This message is generated and posted in * the sink elements of a GstBin. The bin will only forward the STREAM_START * message to the application if all sinks have posted an STREAM_START message. * * Params: * src = The object originating the message. * * Returns: The new stream_start message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src) { auto p = gst_message_new_stream_start((src is null) ? null : src.getObjectGstStruct()); if(p is null) { throw new ConstructionException("null returned by new_stream_start"); } this(cast(GstMessage*) p); } /** * Create a new stream status message. This message is posted when a streaming * thread is created/destroyed or when the state changed. * * Params: * src = The object originating the message. * type = The stream status type. * owner = the owner element of @src. * * Returns: the new stream status message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, GstStreamStatusType type, Element owner) { auto p = gst_message_new_stream_status((src is null) ? null : src.getObjectGstStruct(), type, (owner is null) ? null : owner.getElementStruct()); if(p is null) { throw new ConstructionException("null returned by new_stream_status"); } this(cast(GstMessage*) p); } /** * Create a new structure change message. This message is posted when the * structure of a pipeline is in the process of being changed, for example * when pads are linked or unlinked. * * @src should be the sinkpad that unlinked or linked. * * Params: * src = The object originating the message. * type = The change type. * owner = The owner element of @src. * busy = Whether the structure change is busy. * * Returns: the new structure change message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, GstStructureChangeType type, Element owner, bool busy) { auto p = gst_message_new_structure_change((src is null) ? null : src.getObjectGstStruct(), type, (owner is null) ? null : owner.getElementStruct(), busy); if(p is null) { throw new ConstructionException("null returned by new_structure_change"); } this(cast(GstMessage*) p); } /** * Create a new tag message. The message will take ownership of the tag list. * The message is posted by elements that discovered a new taglist. * * Params: * src = The object originating the message. * tagList = the tag list for the message. * * Returns: the new tag message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, TagList tagList) { auto p = gst_message_new_tag((src is null) ? null : src.getObjectGstStruct(), (tagList is null) ? null : tagList.getTagListStruct()); if(p is null) { throw new ConstructionException("null returned by new_tag"); } this(cast(GstMessage*) p); } /** * Create a new TOC message. The message is posted by elements * that discovered or updated a TOC. * * Params: * src = the object originating the message. * toc = #GstToc structure for the message. * updated = whether TOC was updated or not. * * Returns: a new TOC message. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectGst src, Toc toc, bool updated) { auto p = gst_message_new_toc((src is null) ? null : src.getObjectGstStruct(), (toc is null) ? null : toc.getTocStruct(), updated); if(p is null) { throw new ConstructionException("null returned by new_toc"); } this(cast(GstMessage*) p); } /** * Creates and appends a new entry. * * The specified location string is copied. However, ownership over the tag * list and structure are transferred to the message. * * Params: * location = location string for the new entry * tagList = tag list for the new entry * entryStruct = structure for the new entry * * Since: 1.10 */ public void addRedirectEntry(string location, TagList tagList, Structure entryStruct) { gst_message_add_redirect_entry(gstMessage, Str.toStringz(location), (tagList is null) ? null : tagList.getTagListStruct(), (entryStruct is null) ? null : entryStruct.getStructureStruct(true)); } /** * Returns: the number of entries stored in the message * * Since: 1.10 */ public size_t getNumRedirectEntries() { return gst_message_get_num_redirect_entries(gstMessage); } /** * Retrieve the sequence number of a message. * * Messages have ever-incrementing sequence numbers, which may also be set * explicitly via gst_message_set_seqnum(). Sequence numbers are typically used * to indicate that a message corresponds to some other set of messages or * events, for example a SEGMENT_DONE message corresponding to a SEEK event. It * is considered good practice to make this correspondence when possible, though * it is not required. * * Note that events and messages share the same sequence number incrementor; * two events or messages will never have the same sequence number unless * that correspondence was made explicitly. * * Returns: The message's sequence number. * * MT safe. */ public uint getSeqnum() { return gst_message_get_seqnum(gstMessage); } /** * Extracts the object managing the streaming thread from @message. * * Returns: a GValue containing the object that manages the streaming thread. * This object is usually of type GstTask but other types can be added in the * future. The object remains valid as long as @message is valid. */ public Value getStreamStatusObject() { auto p = gst_message_get_stream_status_object(gstMessage); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Access the structure of the message. * * Returns: The structure of the message. The structure is * still owned by the message, which means that you should not free it and * that the pointer becomes invalid when you free the message. * * MT safe. */ public Structure getStructure() { auto p = gst_message_get_structure(gstMessage); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Checks if @message has the given @name. This function is usually used to * check the name of a custom message. * * Params: * name = name to check * * Returns: %TRUE if @name matches the name of the message structure. */ public bool hasName(string name) { return gst_message_has_name(gstMessage, Str.toStringz(name)) != 0; } /** * Extract the running_time from the async_done message. * * MT safe. * * Params: * runningTime = Result location for the running_time or %NULL */ public void parseAsyncDone(out GstClockTime runningTime) { gst_message_parse_async_done(gstMessage, &runningTime); } /** * Extracts the buffering percent from the GstMessage. see also * gst_message_new_buffering(). * * MT safe. * * Params: * percent = Return location for the percent. */ public void parseBuffering(out int percent) { gst_message_parse_buffering(gstMessage, &percent); } /** * Extracts the buffering stats values from @message. * * Params: * mode = a buffering mode, or %NULL * avgIn = the average input rate, or %NULL * avgOut = the average output rate, or %NULL * bufferingLeft = amount of buffering time left in * milliseconds, or %NULL */ public void parseBufferingStats(out GstBufferingMode mode, out int avgIn, out int avgOut, out long bufferingLeft) { gst_message_parse_buffering_stats(gstMessage, &mode, &avgIn, &avgOut, &bufferingLeft); } /** * Extracts the lost clock from the GstMessage. * The clock object returned remains valid until the message is freed. * * MT safe. * * Params: * clock = a pointer to hold the lost clock */ public void parseClockLost(out Clock clock) { GstClock* outclock = null; gst_message_parse_clock_lost(gstMessage, &outclock); clock = ObjectG.getDObject!(Clock)(outclock); } /** * Extracts the clock and ready flag from the GstMessage. * The clock object returned remains valid until the message is freed. * * MT safe. * * Params: * clock = a pointer to hold a clock * object, or %NULL * ready = a pointer to hold the ready flag, or %NULL */ public void parseClockProvide(out Clock clock, out bool ready) { GstClock* outclock = null; int outready; gst_message_parse_clock_provide(gstMessage, &outclock, &outready); clock = ObjectG.getDObject!(Clock)(outclock); ready = (outready == 1); } /** * Parse a context type from an existing GST_MESSAGE_NEED_CONTEXT message. * * Params: * contextType = the context type, or %NULL * * Returns: a #gboolean indicating if the parsing succeeded. * * Since: 1.2 */ public bool parseContextType(out string contextType) { char* outcontextType = null; auto p = gst_message_parse_context_type(gstMessage, &outcontextType) != 0; contextType = Str.toString(outcontextType); return p; } /** * Parses a device-added message. The device-added message is produced by * #GstDeviceProvider or a #GstDeviceMonitor. It announces the appearance * of monitored devices. * * Params: * device = A location where to store a * pointer to the new #GstDevice, or %NULL * * Since: 1.4 */ public void parseDeviceAdded(out Device device) { GstDevice* outdevice = null; gst_message_parse_device_added(gstMessage, &outdevice); device = ObjectG.getDObject!(Device)(outdevice); } /** * Parses a device-removed message. The device-removed message is produced by * #GstDeviceProvider or a #GstDeviceMonitor. It announces the * disappearance of monitored devices. * * Params: * device = A location where to store a * pointer to the removed #GstDevice, or %NULL * * Since: 1.4 */ public void parseDeviceRemoved(out Device device) { GstDevice* outdevice = null; gst_message_parse_device_removed(gstMessage, &outdevice); device = ObjectG.getDObject!(Device)(outdevice); } /** * Extracts the GError and debug string from the GstMessage. The values returned * in the output arguments are copies; the caller must free them when done. * * Typical usage of this function might be: * |[ * ... * switch (GST_MESSAGE_TYPE (msg)) { * case GST_MESSAGE_ERROR: { * GError *err = NULL; * gchar *dbg_info = NULL; * * gst_message_parse_error (msg, &err, &dbg_info); * g_printerr ("ERROR from element %s: %s\n", * GST_OBJECT_NAME (msg->src), err->message); * g_printerr ("Debugging info: %s\n", (dbg_info) ? dbg_info : "none"); * g_error_free (err); * g_free (dbg_info); * break; * } * ... * } * ... * ]| * * MT safe. * * Params: * gerror = location for the GError * dbg = location for the debug message, * or %NULL */ public void parseError(out ErrorG gerror, out string dbg) { GError* outgerror = null; char* outdbg = null; gst_message_parse_error(gstMessage, &outgerror, &outdbg); gerror = new ErrorG(outgerror); dbg = Str.toString(outdbg); } /** * Returns the optional details structure, may be NULL if none. * The returned structure must not be freed. * * Params: * structure = A pointer to the returned details * * Since: 1.10 */ public void parseErrorDetails(out Structure structure) { GstStructure* outstructure = null; gst_message_parse_error_details(gstMessage, &outstructure); structure = ObjectG.getDObject!(Structure)(outstructure); } /** * Extract the group from the STREAM_START message. * * Params: * groupId = Result location for the group id or * %NULL * * Returns: %TRUE if the message had a group id set, %FALSE otherwise * * MT safe. * * Since: 1.2 */ public bool parseGroupId(out uint groupId) { return gst_message_parse_group_id(gstMessage, &groupId) != 0; } /** * Extract the context from the HAVE_CONTEXT message. * * MT safe. * * Params: * context = Result location for the * context or %NULL * * Since: 1.2 */ public void parseHaveContext(out Context context) { GstContext* outcontext = null; gst_message_parse_have_context(gstMessage, &outcontext); context = ObjectG.getDObject!(Context)(outcontext); } /** * Extracts the GError and debug string from the GstMessage. The values returned * in the output arguments are copies; the caller must free them when done. * * MT safe. * * Params: * gerror = location for the GError * dbg = location for the debug message, * or %NULL */ public void parseInfo(out ErrorG gerror, out string dbg) { GError* outgerror = null; char* outdbg = null; gst_message_parse_info(gstMessage, &outgerror, &outdbg); gerror = new ErrorG(outgerror); dbg = Str.toString(outdbg); } /** * Returns the optional details structure, may be NULL if none * The returned structure must not be freed. * * Params: * structure = A pointer to the returned details structure * * Since: 1.10 */ public void parseInfoDetails(out Structure structure) { GstStructure* outstructure = null; gst_message_parse_info_details(gstMessage, &outstructure); structure = ObjectG.getDObject!(Structure)(outstructure); } /** * Extracts the new clock from the GstMessage. * The clock object returned remains valid until the message is freed. * * MT safe. * * Params: * clock = a pointer to hold the selected * new clock */ public void parseNewClock(out Clock clock) { GstClock* outclock = null; gst_message_parse_new_clock(gstMessage, &outclock); clock = ObjectG.getDObject!(Clock)(outclock); } /** * Parses the progress @type, @code and @text. * * Params: * type = location for the type * code = location for the code * text = location for the text */ public void parseProgress(out GstProgressType type, out string code, out string text) { char* outcode = null; char* outtext = null; gst_message_parse_progress(gstMessage, &type, &outcode, &outtext); code = Str.toString(outcode); text = Str.toString(outtext); } /** * Parses a property-notify message. These will be posted on the bus only * when set up with gst_element_add_property_notify_watch() or * gst_element_add_property_deep_notify_watch(). * * Params: * object = location where to store a * pointer to the object whose property got changed, or %NULL * propertyName = return location for the name of the * property that got changed, or %NULL * propertyValue = return location for the new value of * the property that got changed, or %NULL. This will only be set if the * property notify watch was told to include the value when it was set up * * Since: 1.10 */ public void parsePropertyNotify(out ObjectGst object, out string propertyName, out Value propertyValue) { GstObject* outobject = null; char* outpropertyName = null; GValue* outpropertyValue = null; gst_message_parse_property_notify(gstMessage, &outobject, &outpropertyName, &outpropertyValue); object = ObjectG.getDObject!(ObjectGst)(outobject); propertyName = Str.toString(outpropertyName); propertyValue = ObjectG.getDObject!(Value)(outpropertyValue); } /** * Extract the timestamps and live status from the QoS message. * * The returned values give the running_time, stream_time, timestamp and * duration of the dropped buffer. Values of GST_CLOCK_TIME_NONE mean unknown * values. * * MT safe. * * Params: * live = if the message was generated by a live element * runningTime = the running time of the buffer that * generated the message * streamTime = the stream time of the buffer that * generated the message * timestamp = the timestamps of the buffer that * generated the message * duration = the duration of the buffer that * generated the message */ public void parseQos(out bool live, out ulong runningTime, out ulong streamTime, out ulong timestamp, out ulong duration) { int outlive; gst_message_parse_qos(gstMessage, &outlive, &runningTime, &streamTime, ×tamp, &duration); live = (outlive == 1); } /** * Extract the QoS stats representing the history of the current continuous * pipeline playback period. * * When @format is @GST_FORMAT_UNDEFINED both @dropped and @processed are * invalid. Values of -1 for either @processed or @dropped mean unknown values. * * MT safe. * * Params: * format = Units of the 'processed' and 'dropped' fields. * Video sinks and video filters will use GST_FORMAT_BUFFERS (frames). * Audio sinks and audio filters will likely use GST_FORMAT_DEFAULT * (samples). * processed = Total number of units correctly processed * since the last state change to READY or a flushing operation. * dropped = Total number of units dropped since the last * state change to READY or a flushing operation. */ public void parseQosStats(out GstFormat format, out ulong processed, out ulong dropped) { gst_message_parse_qos_stats(gstMessage, &format, &processed, &dropped); } /** * Extract the QoS values that have been calculated/analysed from the QoS data * * MT safe. * * Params: * jitter = The difference of the running-time against * the deadline. * proportion = Long term prediction of the ideal rate * relative to normal rate to get optimal quality. * quality = An element dependent integer value that * specifies the current quality level of the element. The default * maximum quality is 1000000. */ public void parseQosValues(out long jitter, out double proportion, out int quality) { gst_message_parse_qos_values(gstMessage, &jitter, &proportion, &quality); } /** * Parses the location and/or structure from the entry with the given index. * The index must be between 0 and gst_message_get_num_redirect_entries() - 1. * Returned pointers are valid for as long as this message exists. * * Params: * entryIndex = index of the entry to parse * location = return location for * the pointer to the entry's location string, or %NULL * tagList = return location for * the pointer to the entry's tag list, or %NULL * entryStruct = return location * for the pointer to the entry's structure, or %NULL * * Since: 1.10 */ public void parseRedirectEntry(size_t entryIndex, out string location, out TagList tagList, out Structure entryStruct) { char* outlocation = null; GstTagList* outtagList = null; GstStructure* outentryStruct = null; gst_message_parse_redirect_entry(gstMessage, entryIndex, &outlocation, &outtagList, &outentryStruct); location = Str.toString(outlocation); tagList = ObjectG.getDObject!(TagList)(outtagList); entryStruct = ObjectG.getDObject!(Structure)(outentryStruct); } /** * Extract the requested state from the request_state message. * * MT safe. * * Params: * state = Result location for the requested state or %NULL */ public void parseRequestState(out GstState state) { gst_message_parse_request_state(gstMessage, &state); } /** * Extract the running-time from the RESET_TIME message. * * MT safe. * * Params: * runningTime = Result location for the running_time or * %NULL */ public void parseResetTime(out GstClockTime runningTime) { gst_message_parse_reset_time(gstMessage, &runningTime); } /** * Extracts the position and format from the segment done message. * * MT safe. * * Params: * format = Result location for the format, or %NULL * position = Result location for the position, or %NULL */ public void parseSegmentDone(out GstFormat format, out long position) { gst_message_parse_segment_done(gstMessage, &format, &position); } /** * Extracts the position and format from the segment start message. * * MT safe. * * Params: * format = Result location for the format, or %NULL * position = Result location for the position, or %NULL */ public void parseSegmentStart(out GstFormat format, out long position) { gst_message_parse_segment_start(gstMessage, &format, &position); } /** * Extracts the old and new states from the GstMessage. * * Typical usage of this function might be: * |[ * ... * switch (GST_MESSAGE_TYPE (msg)) { * case GST_MESSAGE_STATE_CHANGED: { * GstState old_state, new_state; * * gst_message_parse_state_changed (msg, &old_state, &new_state, NULL); * g_print ("Element %s changed state from %s to %s.\n", * GST_OBJECT_NAME (msg->src), * gst_element_state_get_name (old_state), * gst_element_state_get_name (new_state)); * break; * } * ... * } * ... * ]| * * MT safe. * * Params: * oldstate = the previous state, or %NULL * newstate = the new (current) state, or %NULL * pending = the pending (target) state, or %NULL */ public void parseStateChanged(out GstState oldstate, out GstState newstate, out GstState pending) { gst_message_parse_state_changed(gstMessage, &oldstate, &newstate, &pending); } /** * Extract the values the step_done message. * * MT safe. * * Params: * format = result location for the format * amount = result location for the amount * rate = result location for the rate * flush = result location for the flush flag * intermediate = result location for the intermediate flag * duration = result location for the duration * eos = result location for the EOS flag */ public void parseStepDone(out GstFormat format, out ulong amount, out double rate, out bool flush, out bool intermediate, out ulong duration, out bool eos) { int outflush; int outintermediate; int outeos; gst_message_parse_step_done(gstMessage, &format, &amount, &rate, &outflush, &outintermediate, &duration, &outeos); flush = (outflush == 1); intermediate = (outintermediate == 1); eos = (outeos == 1); } /** * Extract the values from step_start message. * * MT safe. * * Params: * active = result location for the active flag * format = result location for the format * amount = result location for the amount * rate = result location for the rate * flush = result location for the flush flag * intermediate = result location for the intermediate flag */ public void parseStepStart(out bool active, out GstFormat format, out ulong amount, out double rate, out bool flush, out bool intermediate) { int outactive; int outflush; int outintermediate; gst_message_parse_step_start(gstMessage, &outactive, &format, &amount, &rate, &outflush, &outintermediate); active = (outactive == 1); flush = (outflush == 1); intermediate = (outintermediate == 1); } /** * Parses a stream-collection message. * * Params: * collection = A location where to store a * pointer to the #GstStreamCollection, or %NULL * * Since: 1.10 */ public void parseStreamCollection(out StreamCollection collection) { GstStreamCollection* outcollection = null; gst_message_parse_stream_collection(gstMessage, &outcollection); collection = ObjectG.getDObject!(StreamCollection)(outcollection); } /** * Extracts the stream status type and owner the GstMessage. The returned * owner remains valid for as long as the reference to @message is valid and * should thus not be unreffed. * * MT safe. * * Params: * type = A pointer to hold the status type * owner = The owner element of the message source */ public void parseStreamStatus(out GstStreamStatusType type, out Element owner) { GstElement* outowner = null; gst_message_parse_stream_status(gstMessage, &type, &outowner); owner = ObjectG.getDObject!(Element)(outowner); } /** * Parses a streams-selected message. * * Params: * collection = A location where to store a * pointer to the #GstStreamCollection, or %NULL * * Since: 1.10 */ public void parseStreamsSelected(out StreamCollection collection) { GstStreamCollection* outcollection = null; gst_message_parse_streams_selected(gstMessage, &outcollection); collection = ObjectG.getDObject!(StreamCollection)(outcollection); } /** * Extracts the change type and completion status from the GstMessage. * * MT safe. * * Params: * type = A pointer to hold the change type * owner = The owner element of the * message source * busy = a pointer to hold whether the change is in * progress or has been completed */ public void parseStructureChange(out GstStructureChangeType type, out Element owner, out bool busy) { GstElement* outowner = null; int outbusy; gst_message_parse_structure_change(gstMessage, &type, &outowner, &outbusy); owner = ObjectG.getDObject!(Element)(outowner); busy = (outbusy == 1); } /** * Extracts the tag list from the GstMessage. The tag list returned in the * output argument is a copy; the caller must free it when done. * * Typical usage of this function might be: * |[ * ... * switch (GST_MESSAGE_TYPE (msg)) { * case GST_MESSAGE_TAG: { * GstTagList *tags = NULL; * * gst_message_parse_tag (msg, &tags); * g_print ("Got tags from element %s\n", GST_OBJECT_NAME (msg->src)); * handle_tags (tags); * gst_tag_list_unref (tags); * break; * } * ... * } * ... * ]| * * MT safe. * * Params: * tagList = return location for the tag-list. */ public void parseTag(out TagList tagList) { GstTagList* outtagList = null; gst_message_parse_tag(gstMessage, &outtagList); tagList = ObjectG.getDObject!(TagList)(outtagList); } /** * Extract the TOC from the #GstMessage. The TOC returned in the * output argument is a copy; the caller must free it with * gst_toc_unref() when done. * * MT safe. * * Params: * toc = return location for the TOC. * updated = return location for the updated flag. */ public void parseToc(out Toc toc, out bool updated) { GstToc* outtoc = null; int outupdated; gst_message_parse_toc(gstMessage, &outtoc, &outupdated); toc = ObjectG.getDObject!(Toc)(outtoc); updated = (outupdated == 1); } /** * Extracts the GError and debug string from the GstMessage. The values returned * in the output arguments are copies; the caller must free them when done. * * MT safe. * * Params: * gerror = location for the GError * dbg = location for the debug message, * or %NULL */ public void parseWarning(out ErrorG gerror, out string dbg) { GError* outgerror = null; char* outdbg = null; gst_message_parse_warning(gstMessage, &outgerror, &outdbg); gerror = new ErrorG(outgerror); dbg = Str.toString(outdbg); } /** * Returns the optional details structure, may be NULL if none * The returned structure must not be freed. * * Params: * structure = A pointer to the returned details structure * * Since: 1.10 */ public void parseWarningDetails(out Structure structure) { GstStructure* outstructure = null; gst_message_parse_warning_details(gstMessage, &outstructure); structure = ObjectG.getDObject!(Structure)(outstructure); } /** * Configures the buffering stats values in @message. * * Params: * mode = a buffering mode * avgIn = the average input rate * avgOut = the average output rate * bufferingLeft = amount of buffering time left in milliseconds */ public void setBufferingStats(GstBufferingMode mode, int avgIn, int avgOut, long bufferingLeft) { gst_message_set_buffering_stats(gstMessage, mode, avgIn, avgOut, bufferingLeft); } /** * Sets the group id on the stream-start message. * * All streams that have the same group id are supposed to be played * together, i.e. all streams inside a container file should have the * same group id but different stream ids. The group id should change * each time the stream is started, resulting in different group ids * each time a file is played for example. * * MT safe. * * Params: * groupId = the group id * * Since: 1.2 */ public void setGroupId(uint groupId) { gst_message_set_group_id(gstMessage, groupId); } /** * Set the QoS stats representing the history of the current continuous pipeline * playback period. * * When @format is @GST_FORMAT_UNDEFINED both @dropped and @processed are * invalid. Values of -1 for either @processed or @dropped mean unknown values. * * MT safe. * * Params: * format = Units of the 'processed' and 'dropped' fields. Video sinks and video * filters will use GST_FORMAT_BUFFERS (frames). Audio sinks and audio filters * will likely use GST_FORMAT_DEFAULT (samples). * processed = Total number of units correctly processed since the last state * change to READY or a flushing operation. * dropped = Total number of units dropped since the last state change to READY * or a flushing operation. */ public void setQosStats(GstFormat format, ulong processed, ulong dropped) { gst_message_set_qos_stats(gstMessage, format, processed, dropped); } /** * Set the QoS values that have been calculated/analysed from the QoS data * * MT safe. * * Params: * jitter = The difference of the running-time against the deadline. * proportion = Long term prediction of the ideal rate relative to normal rate * to get optimal quality. * quality = An element dependent integer value that specifies the current * quality level of the element. The default maximum quality is 1000000. */ public void setQosValues(long jitter, double proportion, int quality) { gst_message_set_qos_values(gstMessage, jitter, proportion, quality); } /** * Set the sequence number of a message. * * This function might be called by the creator of a message to indicate that * the message relates to other messages or events. See gst_message_get_seqnum() * for more information. * * MT safe. * * Params: * seqnum = A sequence number. */ public void setSeqnum(uint seqnum) { gst_message_set_seqnum(gstMessage, seqnum); } /** * Configures the object handling the streaming thread. This is usually a * GstTask object but other objects might be added in the future. * * Params: * object = the object controlling the streaming */ public void setStreamStatusObject(Value object) { gst_message_set_stream_status_object(gstMessage, (object is null) ? null : object.getValueStruct()); } /** * Adds the @stream to the @message. * * Params: * stream = a #GstStream to add to @message * * Since: 1.10 */ public void streamsSelectedAdd(Stream stream) { gst_message_streams_selected_add(gstMessage, (stream is null) ? null : stream.getStreamStruct()); } /** * Returns the number of streams contained in the @message. * * Returns: The number of streams contained within. * * Since: 1.10 */ public uint streamsSelectedGetSize() { return gst_message_streams_selected_get_size(gstMessage); } /** * Retrieves the #GstStream with index @index from the @message. * * Params: * idx = Index of the stream to retrieve * * Returns: A #GstStream * * Since: 1.10 */ public Stream streamsSelectedGetStream(uint idx) { auto p = gst_message_streams_selected_get_stream(gstMessage, idx); if(p is null) { return null; } return ObjectG.getDObject!(Stream)(cast(GstStream*) p, true); } /** * Get a printable name for the given message type. Do not modify or free. * * Params: * type = the message type * * Returns: a reference to the static name of the message. */ public static string typeGetName(GstMessageType type) { return Str.toString(gst_message_type_get_name(type)); } /** * Get the unique quark for the given message type. * * Params: * type = the message type * * Returns: the quark associated with the message type */ public static GQuark typeToQuark(GstMessageType type) { return gst_message_type_to_quark(type); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Meta.d000066400000000000000000000102541324604450400213360ustar00rootroot00000000000000/* * 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 gstreamer.Meta; private import glib.Str; private import glib.c.functions; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * The #GstMeta structure should be included as the first member of a #GstBuffer * metadata structure. The structure defines the API of the metadata and should * be accessible to all elements using the metadata. * * A metadata API is registered with gst_meta_api_type_register() which takes a * name for the metadata API and some tags associated with the metadata. * With gst_meta_api_type_has_tag() one can check if a certain metadata API * contains a given tag. * * Multiple implementations of a metadata API can be registered. * To implement a metadata API, gst_meta_register() should be used. This * function takes all parameters needed to create, free and transform metadata * along with the size of the metadata. The function returns a #GstMetaInfo * structure that contains the information for the implementation of the API. * * A specific implementation can be retrieved by name with gst_meta_get_info(). * * See #GstBuffer for how the metadata can be added, retrieved and removed from * buffers. */ public struct Meta { /** * * Params: * api = an API * Returns: an array of tags as strings. * * Since: 1.2 */ public static string[] apiTypeGetTags(GType api) { return Str.toStringArray(gst_meta_api_type_get_tags(api)); } /** * Check if @api was registered with @tag. * * Params: * api = an API * tag = the tag to check * * Returns: %TRUE if @api was registered with @tag. */ public static bool apiTypeHasTag(GType api, GQuark tag) { return gst_meta_api_type_has_tag(api, tag) != 0; } /** * Register and return a GType for the @api and associate it with * @tags. * * Params: * api = an API to register * tags = tags for @api * * Returns: a unique GType for @api. */ public static GType apiTypeRegister(string api, string[] tags) { return gst_meta_api_type_register(Str.toStringz(api), Str.toStringzArray(tags)); } /** * Lookup a previously registered meta info structure by its implementation name * @impl. * * Params: * impl = the name * * Returns: a #GstMetaInfo with @impl, or * %NULL when no such metainfo exists. */ public static GstMetaInfo* getInfo(string impl) { return gst_meta_get_info(Str.toStringz(impl)); } /** * Register a new #GstMeta implementation. * * The same @info can be retrieved later with gst_meta_get_info() by using * @impl as the key. * * Params: * api = the type of the #GstMeta API * impl = the name of the #GstMeta implementation * size = the size of the #GstMeta structure * initFunc = a #GstMetaInitFunction * freeFunc = a #GstMetaFreeFunction * transformFunc = a #GstMetaTransformFunction * * Returns: a #GstMetaInfo that can be used to access metadata. */ public static GstMetaInfo* register(GType api, string impl, size_t size, GstMetaInitFunction initFunc, GstMetaFreeFunction freeFunc, GstMetaTransformFunction transformFunc) { return gst_meta_register(api, Str.toStringz(impl), size, initFunc, freeFunc, transformFunc); } } GtkD-3.7.5/generated/gstreamer/gstreamer/MiniObject.d000066400000000000000000000264141324604450400225000ustar00rootroot00000000000000/* * 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 gstreamer.MiniObject; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * #GstMiniObject is a simple structure that can be used to implement refcounted * types. * * Subclasses will include #GstMiniObject as the first member in their structure * and then call gst_mini_object_init() to initialize the #GstMiniObject fields. * * gst_mini_object_ref() and gst_mini_object_unref() increment and decrement the * refcount respectively. When the refcount of a mini-object reaches 0, the * dispose function is called first and when this returns %TRUE, the free * function of the miniobject is called. * * A copy can be made with gst_mini_object_copy(). * * gst_mini_object_is_writable() will return %TRUE when the refcount of the * object is exactly 1, meaning the current caller has the only reference to the * object. gst_mini_object_make_writable() will return a writable version of the * object, which might be a new copy when the refcount was not 1. * * Opaque data can be associated with a #GstMiniObject with * gst_mini_object_set_qdata() and gst_mini_object_get_qdata(). The data is * meant to be specific to the particular object and is not automatically copied * with gst_mini_object_copy() or similar methods. * * A weak reference can be added and remove with gst_mini_object_weak_ref() * and gst_mini_object_weak_unref() respectively. */ public class MiniObject { /** the main Gtk struct */ protected GstMiniObject* gstMiniObject; protected bool ownedRef; /** Get the main Gtk struct */ public GstMiniObject* getMiniObjectStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstMiniObject; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstMiniObject; } /** * Sets our main struct and passes it to the parent class. */ public this (GstMiniObject* gstMiniObject, bool ownedRef = false) { this.gstMiniObject = gstMiniObject; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_mini_object_unref(gstMiniObject); } /** * Creates a copy of the mini-object. * * MT safe * * Returns: the new mini-object. */ public MiniObject copy() { auto p = gst_mini_object_copy(gstMiniObject); if(p is null) { return null; } return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) p, true); } /** * This function gets back user data pointers stored via * gst_mini_object_set_qdata(). * * Params: * quark = A #GQuark, naming the user data pointer * * Returns: The user data pointer set, or * %NULL */ public void* getQdata(GQuark quark) { return gst_mini_object_get_qdata(gstMiniObject, quark); } /** * Initializes a mini-object with the desired type and copy/dispose/free * functions. * * Params: * flags = initial #GstMiniObjectFlags * type = the #GType of the mini-object to create * copyFunc = the copy function, or %NULL * disposeFunc = the dispose function, or %NULL * freeFunc = the free function or %NULL */ public void init(uint flags, GType type, GstMiniObjectCopyFunction copyFunc, GstMiniObjectDisposeFunction disposeFunc, GstMiniObjectFreeFunction freeFunc) { gst_mini_object_init(gstMiniObject, flags, type, copyFunc, disposeFunc, freeFunc); } /** * If @mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE * lock on @object is the only one, this means that changes to the object will * not be visible to any other object. * * If the LOCKABLE flag is not set, check if the refcount of @mini_object is * exactly 1, meaning that no other reference exists to the object and that the * object is therefore writable. * * Modification of a mini-object should only be done after verifying that it * is writable. * * Returns: %TRUE if the object is writable. */ public bool isWritable() { return gst_mini_object_is_writable(gstMiniObject) != 0; } /** * Lock the mini-object with the specified access mode in @flags. * * Params: * flags = #GstLockFlags * * Returns: %TRUE if @object could be locked. */ public bool lock(GstLockFlags flags) { return gst_mini_object_lock(gstMiniObject, flags) != 0; } /** * Checks if a mini-object is writable. If not, a writable copy is made and * returned. This gives away the reference to the original mini object, * and returns a reference to the new object. * * MT safe * * Returns: a mini-object (possibly the same pointer) that * is writable. */ public MiniObject makeWritable() { auto p = gst_mini_object_make_writable(gstMiniObject); if(p is null) { return null; } return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) p, true); } /** * Increase the reference count of the mini-object. * * Note that the refcount affects the writability * of @mini-object, see gst_mini_object_is_writable(). It is * important to note that keeping additional references to * GstMiniObject instances can potentially increase the number * of memcpy operations in a pipeline, especially if the miniobject * is a #GstBuffer. * * Returns: the mini-object. */ public MiniObject doref() { auto p = gst_mini_object_ref(gstMiniObject); if(p is null) { return null; } return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) p, true); } /** * This sets an opaque, named pointer on a miniobject. * The name is specified through a #GQuark (retrieved e.g. via * g_quark_from_static_string()), and the pointer * can be gotten back from the @object with gst_mini_object_get_qdata() * until the @object is disposed. * Setting a previously set user data pointer, overrides (frees) * the old pointer set, using %NULL as pointer essentially * removes the data stored. * * @destroy may be specified which is called with @data as argument * when the @object is disposed, or the data is being overwritten by * a call to gst_mini_object_set_qdata() with the same @quark. * * Params: * quark = A #GQuark, naming the user data pointer * data = An opaque user data pointer * destroy = Function to invoke with @data as argument, when @data * needs to be freed */ public void setQdata(GQuark quark, void* data, GDestroyNotify destroy) { gst_mini_object_set_qdata(gstMiniObject, quark, data, destroy); } /** * This function gets back user data pointers stored via gst_mini_object_set_qdata() * and removes the data from @object without invoking its destroy() function (if * any was set). * * Params: * quark = A #GQuark, naming the user data pointer * * Returns: The user data pointer set, or * %NULL */ public void* stealQdata(GQuark quark) { return gst_mini_object_steal_qdata(gstMiniObject, quark); } /** * Unlock the mini-object with the specified access mode in @flags. * * Params: * flags = #GstLockFlags */ public void unlock(GstLockFlags flags) { gst_mini_object_unlock(gstMiniObject, flags); } /** * Decreases the reference count of the mini-object, possibly freeing * the mini-object. */ public void unref() { gst_mini_object_unref(gstMiniObject); } /** * Adds a weak reference callback to a mini object. Weak references are * used for notification when a mini object is finalized. They are called * "weak references" because they allow you to safely hold a pointer * to the mini object without calling gst_mini_object_ref() * (gst_mini_object_ref() adds a strong reference, that is, forces the object * to stay alive). * * Params: * notify = callback to invoke before the mini object is freed * data = extra data to pass to notify */ public void weakRef(GstMiniObjectNotify notify, void* data) { gst_mini_object_weak_ref(gstMiniObject, notify, data); } /** * Removes a weak reference callback from a mini object. * * Params: * notify = callback to search for * data = data to search for */ public void weakUnref(GstMiniObjectNotify notify, void* data) { gst_mini_object_weak_unref(gstMiniObject, notify, data); } /** * Atomically modifies a pointer to point to a new mini-object. * The reference count of @olddata is decreased and the reference count of * @newdata is increased. * * Either @newdata and the value pointed to by @olddata may be %NULL. * * Params: * olddata = pointer to a pointer to a * mini-object to be replaced * newdata = pointer to new mini-object * * Returns: %TRUE if @newdata was different from @olddata */ public static bool replace(ref MiniObject olddata, MiniObject newdata) { GstMiniObject* outolddata = olddata.getMiniObjectStruct(); auto p = gst_mini_object_replace(&outolddata, (newdata is null) ? null : newdata.getMiniObjectStruct()) != 0; olddata = ObjectG.getDObject!(MiniObject)(outolddata); return p; } /** * Replace the current #GstMiniObject pointer to by @olddata with %NULL and * return the old value. * * Params: * olddata = pointer to a pointer to a mini-object to * be stolen * * Returns: the #GstMiniObject at @oldata */ public static MiniObject steal(ref MiniObject olddata) { GstMiniObject* outolddata = olddata.getMiniObjectStruct(); auto p = gst_mini_object_steal(&outolddata); olddata = ObjectG.getDObject!(MiniObject)(outolddata); if(p is null) { return null; } return ObjectG.getDObject!(MiniObject)(cast(GstMiniObject*) p); } /** * Modifies a pointer to point to a new mini-object. The modification * is done atomically. This version is similar to gst_mini_object_replace() * except that it does not increase the refcount of @newdata and thus * takes ownership of @newdata. * * Either @newdata and the value pointed to by @olddata may be %NULL. * * Params: * olddata = pointer to a pointer to a mini-object to * be replaced * newdata = pointer to new mini-object * * Returns: %TRUE if @newdata was different from @olddata */ public static bool take(ref MiniObject olddata, MiniObject newdata) { GstMiniObject* outolddata = olddata.getMiniObjectStruct(); auto p = gst_mini_object_take(&outolddata, (newdata is null) ? null : newdata.getMiniObjectStruct()) != 0; olddata = ObjectG.getDObject!(MiniObject)(outolddata); return p; } } GtkD-3.7.5/generated/gstreamer/gstreamer/ObjectGst.d000066400000000000000000000552761324604450400223510ustar00rootroot00000000000000/* * 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 gstreamer.ObjectGst; private import glib.ErrorG; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.Signals; private import gobject.Value; private import gstreamer.ControlBinding; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * #GstObject provides a root for the object hierarchy tree filed in by the * GStreamer library. It is currently a thin wrapper on top of * #GInitiallyUnowned. It is an abstract class that is not very usable on its own. * * #GstObject gives us basic refcounting, parenting functionality and locking. * Most of the functions are just extended for special GStreamer needs and can be * found under the same name in the base class of #GstObject which is #GObject * (e.g. g_object_ref() becomes gst_object_ref()). * * Since #GstObject derives from #GInitiallyUnowned, it also inherits the * floating reference. Be aware that functions such as gst_bin_add() and * gst_element_add_pad() take ownership of the floating reference. * * In contrast to #GObject instances, #GstObject adds a name property. The functions * gst_object_set_name() and gst_object_get_name() are used to set/get the name * of the object. * * ## controlled properties * * Controlled properties offers a lightweight way to adjust gobject properties * over stream-time. It works by using time-stamped value pairs that are queued * for element-properties. At run-time the elements continuously pull value * changes for the current stream-time. * * What needs to be changed in a #GstElement? * Very little - it is just two steps to make a plugin controllable! * * * mark gobject-properties paramspecs that make sense to be controlled, * by GST_PARAM_CONTROLLABLE. * * * when processing data (get, chain, loop function) at the beginning call * gst_object_sync_values(element,timestamp). * This will make the controller update all GObject properties that are * under its control with the current values based on the timestamp. * * What needs to be done in applications? Again it's not a lot to change. * * * create a #GstControlSource. * csource = gst_interpolation_control_source_new (); * g_object_set (csource, "mode", GST_INTERPOLATION_MODE_LINEAR, NULL); * * * Attach the #GstControlSource on the controller to a property. * gst_object_add_control_binding (object, gst_direct_control_binding_new (object, "prop1", csource)); * * * Set the control values * gst_timed_value_control_source_set ((GstTimedValueControlSource *)csource,0 * GST_SECOND, value1); * gst_timed_value_control_source_set ((GstTimedValueControlSource *)csource,1 * GST_SECOND, value2); * * * start your pipeline */ public class ObjectGst : ObjectG { /** the main Gtk struct */ protected GstObject* gstObject; /** Get the main Gtk struct */ public GstObject* getObjectGstStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstObject; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstObject; } protected override void setStruct(GObject* obj) { gstObject = cast(GstObject*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstObject* gstObject, bool ownedRef = false) { this.gstObject = gstObject; super(cast(GObject*)gstObject, ownedRef); } /** */ public static GType getType() { return gst_object_get_type(); } /** * Checks to see if there is any object named @name in @list. This function * does not do any locking of any kind. You might want to protect the * provided list with the lock of the owner of the list. This function * will lock each #GstObject in the list to compare the name, so be * careful when passing a list with a locked object. * * Params: * list = a list of #GstObject to * check through * name = the name to search for * * Returns: %TRUE if a #GstObject named @name does not appear in @list, * %FALSE if it does. * * MT safe. Grabs and releases the LOCK of each object in the list. */ public static bool checkUniqueness(ListG list, string name) { return gst_object_check_uniqueness((list is null) ? null : list.getListGStruct(), Str.toStringz(name)) != 0; } /** * A default deep_notify signal callback for an object. The user data * should contain a pointer to an array of strings that should be excluded * from the notify. The default handler will print the new value of the property * using g_print. * * MT safe. This function grabs and releases @object's LOCK for getting its * path string. * * Params: * object = the #GObject that signalled the notify. * orig = a #GstObject that initiated the notify. * pspec = a #GParamSpec of the property. * excludedProps = a set of user-specified properties to exclude or %NULL to show * all changes. */ public static void defaultDeepNotify(ObjectG object, ObjectGst orig, ParamSpec pspec, string[] excludedProps) { gst_object_default_deep_notify((object is null) ? null : object.getObjectGStruct(), (orig is null) ? null : orig.getObjectGstStruct(), (pspec is null) ? null : pspec.getParamSpecStruct(), Str.toStringzArray(excludedProps)); } /** * Increase the reference count of @object, and possibly remove the floating * reference, if @object has a floating reference. * * In other words, if the object is floating, then this call "assumes ownership" * of the floating reference, converting it to a normal reference by clearing * the floating flag while leaving the reference count unchanged. If the object * is not floating, then this call adds a new normal reference increasing the * reference count by one. * * Params: * object = a #GstObject to sink */ public static void* refSink(void* object) { return gst_object_ref_sink(object); } /** * Atomically modifies a pointer to point to a new object. * The reference count of @oldobj is decreased and the reference count of * @newobj is increased. * * Either @newobj and the value pointed to by @oldobj may be %NULL. * * Params: * oldobj = pointer to a place of * a #GstObject to replace * newobj = a new #GstObject * * Returns: %TRUE if @newobj was different from @oldobj */ public static bool replace(ref ObjectGst oldobj, ObjectGst newobj) { GstObject* outoldobj = oldobj.getObjectGstStruct(); auto p = gst_object_replace(&outoldobj, (newobj is null) ? null : newobj.getObjectGstStruct()) != 0; oldobj = ObjectG.getDObject!(ObjectGst)(outoldobj); return p; } /** * Attach the #GstControlBinding to the object. If there already was a * #GstControlBinding for this property it will be replaced. * * The @object will take ownership of the @binding. * * Params: * binding = the #GstControlBinding that should be used * * Returns: %FALSE if the given @binding has not been setup for this object or * has been setup for a non suitable property, %TRUE otherwise. */ public bool addControlBinding(ControlBinding binding) { return gst_object_add_control_binding(gstObject, (binding is null) ? null : binding.getControlBindingStruct()) != 0; } /** * A default error function that uses g_printerr() to display the error message * and the optional debug sting.. * * The default handler will simply print the error string using g_print. * * Params: * error = the GError. * dbg = an additional debug information string, or %NULL */ public void defaultError(ErrorG error, string dbg) { gst_object_default_error(gstObject, (error is null) ? null : error.getErrorGStruct(), Str.toStringz(dbg)); } /** * Gets the corresponding #GstControlBinding for the property. This should be * unreferenced again after use. * * Params: * propertyName = name of the property * * Returns: the #GstControlBinding for * @property_name or %NULL if the property is not controlled. */ public ControlBinding getControlBinding(string propertyName) { auto p = gst_object_get_control_binding(gstObject, Str.toStringz(propertyName)); if(p is null) { return null; } return ObjectG.getDObject!(ControlBinding)(cast(GstControlBinding*) p, true); } /** * Obtain the control-rate for this @object. Audio processing #GstElement * objects will use this rate to sub-divide their processing loop and call * gst_object_sync_values() inbetween. The length of the processing segment * should be up to @control-rate nanoseconds. * * If the @object is not under property control, this will return * %GST_CLOCK_TIME_NONE. This allows the element to avoid the sub-dividing. * * The control-rate is not expected to change if the element is in * %GST_STATE_PAUSED or %GST_STATE_PLAYING. * * Returns: the control rate in nanoseconds */ public GstClockTime getControlRate() { return gst_object_get_control_rate(gstObject); } /** * Gets a number of #GValues for the given controlled property starting at the * requested time. The array @values need to hold enough space for @n_values of * #GValue. * * This function is useful if one wants to e.g. draw a graph of the control * curve or apply a control curve sample by sample. * * Params: * propertyName = the name of the property to get * timestamp = the time that should be processed * interval = the time spacing between subsequent values * values = array to put control-values in * * Returns: %TRUE if the given array could be filled, %FALSE otherwise */ public bool getGValueArray(string propertyName, GstClockTime timestamp, GstClockTime interval, Value[] values) { GValue[] valuesArray = new GValue[values.length]; for ( int i = 0; i < values.length; i++ ) { valuesArray[i] = *(values[i].getValueStruct()); } return gst_object_get_g_value_array(gstObject, Str.toStringz(propertyName), timestamp, interval, cast(uint)values.length, valuesArray.ptr) != 0; } /** * Returns a copy of the name of @object. * Caller should g_free() the return value after usage. * For a nameless object, this returns %NULL, which you can safely g_free() * as well. * * Free-function: g_free * * Returns: the name of @object. g_free() * after usage. * * MT safe. This function grabs and releases @object's LOCK. */ public string getName() { auto retStr = gst_object_get_name(gstObject); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns the parent of @object. This function increases the refcount * of the parent object so you should gst_object_unref() it after usage. * * Returns: parent of @object, this can be * %NULL if @object has no parent. unref after usage. * * MT safe. Grabs and releases @object's LOCK. */ public ObjectGst getParent() { auto p = gst_object_get_parent(gstObject); if(p is null) { return null; } return ObjectG.getDObject!(ObjectGst)(cast(GstObject*) p, true); } /** * Generates a string describing the path of @object in * the object hierarchy. Only useful (or used) for debugging. * * Free-function: g_free * * Returns: a string describing the path of @object. You must * g_free() the string after usage. * * MT safe. Grabs and releases the #GstObject's LOCK for all objects * in the hierarchy. */ public string getPathString() { auto retStr = gst_object_get_path_string(gstObject); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the value for the given controlled property at the requested time. * * Params: * propertyName = the name of the property to get * timestamp = the time the control-change should be read from * * Returns: the GValue of the property at the given time, * or %NULL if the property isn't controlled. */ public Value getValue(string propertyName, GstClockTime timestamp) { auto p = gst_object_get_value(gstObject, Str.toStringz(propertyName), timestamp); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p, true); } /** * Gets a number of values for the given controlled property starting at the * requested time. The array @values need to hold enough space for @n_values of * the same type as the objects property's type. * * This function is useful if one wants to e.g. draw a graph of the control * curve or apply a control curve sample by sample. * * The values are unboxed and ready to be used. The similar function * gst_object_get_g_value_array() returns the array as #GValues and is * better suites for bindings. * * Params: * propertyName = the name of the property to get * timestamp = the time that should be processed * interval = the time spacing between subsequent values * nValues = the number of values * values = array to put control-values in * * Returns: %TRUE if the given array could be filled, %FALSE otherwise */ public bool getValueArray(string propertyName, GstClockTime timestamp, GstClockTime interval, uint nValues, void* values) { return gst_object_get_value_array(gstObject, Str.toStringz(propertyName), timestamp, interval, nValues, values) != 0; } /** * Check if the @object has active controlled properties. * * Returns: %TRUE if the object has active controlled properties */ public bool hasActiveControlBindings() { return gst_object_has_active_control_bindings(gstObject) != 0; } /** * Check if @object has an ancestor @ancestor somewhere up in * the hierarchy. One can e.g. check if a #GstElement is inside a #GstPipeline. * * Deprecated: Use gst_object_has_as_ancestor() instead. * * MT safe. Grabs and releases @object's locks. * * Params: * ancestor = a #GstObject to check as ancestor * * Returns: %TRUE if @ancestor is an ancestor of @object. */ public bool hasAncestor(ObjectGst ancestor) { return gst_object_has_ancestor(gstObject, (ancestor is null) ? null : ancestor.getObjectGstStruct()) != 0; } /** * Check if @object has an ancestor @ancestor somewhere up in * the hierarchy. One can e.g. check if a #GstElement is inside a #GstPipeline. * * Params: * ancestor = a #GstObject to check as ancestor * * Returns: %TRUE if @ancestor is an ancestor of @object. * * MT safe. Grabs and releases @object's locks. */ public bool hasAsAncestor(ObjectGst ancestor) { return gst_object_has_as_ancestor(gstObject, (ancestor is null) ? null : ancestor.getObjectGstStruct()) != 0; } /** * Check if @parent is the parent of @object. * E.g. a #GstElement can check if it owns a given #GstPad. * * Params: * parent = a #GstObject to check as parent * * Returns: %FALSE if either @object or @parent is %NULL. %TRUE if @parent is * the parent of @object. Otherwise %FALSE. * * MT safe. Grabs and releases @object's locks. * * Since: 1.6 */ public bool hasAsParent(ObjectGst parent) { return gst_object_has_as_parent(gstObject, (parent is null) ? null : parent.getObjectGstStruct()) != 0; } /** * Increments the reference count on @object. This function * does not take the lock on @object because it relies on * atomic refcounting. * * This object returns the input parameter to ease writing * constructs like : * result = gst_object_ref (object->parent); * * Returns: A pointer to @object */ public override ObjectGst doref() { auto p = gst_object_ref(gstObject); if(p is null) { return null; } return ObjectG.getDObject!(ObjectGst)(cast(GstObject*) p, true); } /** * Removes the corresponding #GstControlBinding. If it was the * last ref of the binding, it will be disposed. * * Params: * binding = the binding * * Returns: %TRUE if the binding could be removed. */ public bool removeControlBinding(ControlBinding binding) { return gst_object_remove_control_binding(gstObject, (binding is null) ? null : binding.getControlBindingStruct()) != 0; } /** * This function is used to disable the control bindings on a property for * some time, i.e. gst_object_sync_values() will do nothing for the * property. * * Params: * propertyName = property to disable * disabled = boolean that specifies whether to disable the controller * or not. */ public void setControlBindingDisabled(string propertyName, bool disabled) { gst_object_set_control_binding_disabled(gstObject, Str.toStringz(propertyName), disabled); } /** * This function is used to disable all controlled properties of the @object for * some time, i.e. gst_object_sync_values() will do nothing. * * Params: * disabled = boolean that specifies whether to disable the controller * or not. */ public void setControlBindingsDisabled(bool disabled) { gst_object_set_control_bindings_disabled(gstObject, disabled); } /** * Change the control-rate for this @object. Audio processing #GstElement * objects will use this rate to sub-divide their processing loop and call * gst_object_sync_values() inbetween. The length of the processing segment * should be up to @control-rate nanoseconds. * * The control-rate should not change if the element is in %GST_STATE_PAUSED or * %GST_STATE_PLAYING. * * Params: * controlRate = the new control-rate in nanoseconds. */ public void setControlRate(GstClockTime controlRate) { gst_object_set_control_rate(gstObject, controlRate); } /** * Sets the name of @object, or gives @object a guaranteed unique * name (if @name is %NULL). * This function makes a copy of the provided name, so the caller * retains ownership of the name it sent. * * Params: * name = new name of object * * Returns: %TRUE if the name could be set. Since Objects that have * a parent cannot be renamed, this function returns %FALSE in those * cases. * * MT safe. This function grabs and releases @object's LOCK. */ public bool setName(string name) { return gst_object_set_name(gstObject, Str.toStringz(name)) != 0; } /** * Sets the parent of @object to @parent. The object's reference count will * be incremented, and any floating reference will be removed (see gst_object_ref_sink()). * * Params: * parent = new parent of object * * Returns: %TRUE if @parent could be set or %FALSE when @object * already had a parent or @object and @parent are the same. * * MT safe. Grabs and releases @object's LOCK. */ public bool setParent(ObjectGst parent) { return gst_object_set_parent(gstObject, (parent is null) ? null : parent.getObjectGstStruct()) != 0; } /** * Returns a suggestion for timestamps where buffers should be split * to get best controller results. * * Returns: Returns the suggested timestamp or %GST_CLOCK_TIME_NONE * if no control-rate was set. */ public GstClockTime suggestNextSync() { return gst_object_suggest_next_sync(gstObject); } /** * Sets the properties of the object, according to the #GstControlSources that * (maybe) handle them and for the given timestamp. * * If this function fails, it is most likely the application developers fault. * Most probably the control sources are not setup correctly. * * Params: * timestamp = the time that should be processed * * Returns: %TRUE if the controller values could be applied to the object * properties, %FALSE otherwise */ public bool syncValues(GstClockTime timestamp) { return gst_object_sync_values(gstObject, timestamp) != 0; } /** * Clear the parent of @object, removing the associated reference. * This function decreases the refcount of @object. * * MT safe. Grabs and releases @object's lock. */ public void unparent() { gst_object_unparent(gstObject); } /** * Decrements the reference count on @object. If reference count hits * zero, destroy @object. This function does not take the lock * on @object as it relies on atomic refcounting. * * The unref method should never be called with the LOCK held since * this might deadlock the dispose function. */ public override void unref() { gst_object_unref(gstObject); } protected class OnDeepNotifyDelegateWrapper { void delegate(ObjectGst, ParamSpec, ObjectGst) dlg; gulong handlerId; this(void delegate(ObjectGst, ParamSpec, ObjectGst) dlg) { this.dlg = dlg; onDeepNotifyListeners ~= this; } void remove(OnDeepNotifyDelegateWrapper source) { foreach(index, wrapper; onDeepNotifyListeners) { if (wrapper.handlerId == source.handlerId) { onDeepNotifyListeners[index] = null; onDeepNotifyListeners = std.algorithm.remove(onDeepNotifyListeners, index); break; } } } } OnDeepNotifyDelegateWrapper[] onDeepNotifyListeners; /** * The deep notify signal is used to be notified of property changes. It is * typically attached to the toplevel bin to receive notifications from all * the elements contained in that bin. * * Params: * propObject = the object that originated the signal * prop = the property that changed */ gulong addOnDeepNotify(void delegate(ObjectGst, ParamSpec, ObjectGst) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDeepNotifyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "deep-notify", cast(GCallback)&callBackDeepNotify, cast(void*)wrapper, cast(GClosureNotify)&callBackDeepNotifyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDeepNotify(GstObject* objectgstStruct, GstObject* propObject, GParamSpec* prop, OnDeepNotifyDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(ObjectGst)(propObject), ObjectG.getDObject!(ParamSpec)(prop), wrapper.outer); } extern(C) static void callBackDeepNotifyDestroy(OnDeepNotifyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Pad.d000066400000000000000000001633131324604450400211610ustar00rootroot00000000000000/* * 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 gstreamer.Pad; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.Buffer; private import gstreamer.BufferList; private import gstreamer.Caps; private import gstreamer.Element; private import gstreamer.Event; private import gstreamer.Iterator; private import gstreamer.ObjectGst; private import gstreamer.PadTemplate; private import gstreamer.Query; private import gstreamer.StaticPadTemplate; private import gstreamer.Stream; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * A #GstElement is linked to other elements via "pads", which are extremely * light-weight generic link points. * * Pads have a #GstPadDirection, source pads produce data, sink pads consume * data. * * Pads are typically created from a #GstPadTemplate with * gst_pad_new_from_template() and are then added to a #GstElement. This usually * happens when the element is created but it can also happen dynamically based * on the data that the element is processing or based on the pads that the * application requests. * * Pads without pad templates can be created with gst_pad_new(), * which takes a direction and a name as an argument. If the name is %NULL, * then a guaranteed unique name will be assigned to it. * * A #GstElement creating a pad will typically use the various * gst_pad_set_*_function() calls to register callbacks for events, queries or * dataflow on the pads. * * gst_pad_get_parent() will retrieve the #GstElement that owns the pad. * * After two pads are retrieved from an element by gst_element_get_static_pad(), * the pads can be linked with gst_pad_link(). (For quick links, * you can also use gst_element_link(), which will make the obvious * link for you if it's straightforward.). Pads can be unlinked again with * gst_pad_unlink(). gst_pad_get_peer() can be used to check what the pad is * linked to. * * Before dataflow is possible on the pads, they need to be activated with * gst_pad_set_active(). * * gst_pad_query() and gst_pad_peer_query() can be used to query various * properties of the pad and the stream. * * To send a #GstEvent on a pad, use gst_pad_send_event() and * gst_pad_push_event(). Some events will be sticky on the pad, meaning that * after they pass on the pad they can be queried later with * gst_pad_get_sticky_event() and gst_pad_sticky_events_foreach(). * gst_pad_get_current_caps() and gst_pad_has_current_caps() are convenience * functions to query the current sticky CAPS event on a pad. * * GstElements will use gst_pad_push() and gst_pad_pull_range() to push out * or pull in a buffer. * * The dataflow, events and queries that happen on a pad can be monitored with * probes that can be installed with gst_pad_add_probe(). gst_pad_is_blocked() * can be used to check if a block probe is installed on the pad. * gst_pad_is_blocking() checks if the blocking probe is currently blocking the * pad. gst_pad_remove_probe() is used to remove a previously installed probe * and unblock blocking probes if any. * * Pad have an offset that can be retrieved with gst_pad_get_offset(). This * offset will be applied to the running_time of all data passing over the pad. * gst_pad_set_offset() can be used to change the offset. * * Convenience functions exist to start, pause and stop the task on a pad with * gst_pad_start_task(), gst_pad_pause_task() and gst_pad_stop_task() * respectively. */ public class Pad : ObjectGst { /** the main Gtk struct */ protected GstPad* gstPad; /** Get the main Gtk struct */ public GstPad* getPadStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstPad; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstPad; } protected override void setStruct(GObject* obj) { gstPad = cast(GstPad*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstPad* gstPad, bool ownedRef = false) { this.gstPad = gstPad; super(cast(GstObject*)gstPad, ownedRef); } /** * Queries a pad for the stream position. * This is a convenience function for gstreamerD. * Returns: * The current position in nanoseconds - GstFormat.TIME. */ public long queryPosition() { long cur_pos; queryPosition( GstFormat.TIME, cur_pos ); return cur_pos; } /** * Queries a pad for the stream duration. * This is a convenience function for gstreamerD. * Returns: * The duration in nanoseconds - GstFormat.TIME. */ public long queryDuration() { long cur_dur; queryDuration( GstFormat.TIME, cur_dur ); return cur_dur; } /** */ /** */ public static GType getType() { return gst_pad_get_type(); } /** * Creates a new pad with the given name in the given direction. * If name is %NULL, a guaranteed unique name (across all pads) * will be assigned. * This function makes a copy of the name so you can safely free the name. * * Params: * name = the name of the new pad. * direction = the #GstPadDirection of the pad. * * Returns: a new #GstPad, or %NULL in * case of an error. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, GstPadDirection direction) { auto p = gst_pad_new(Str.toStringz(name), direction); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstPad*) p); } /** * Creates a new pad with the given name from the given static template. * If name is %NULL, a guaranteed unique name (across all pads) * will be assigned. * This function makes a copy of the name so you can safely free the name. * * Params: * templ = the #GstStaticPadTemplate to use * name = the name of the pad * * Returns: a new #GstPad, or %NULL in * case of an error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(StaticPadTemplate templ, string name) { auto p = gst_pad_new_from_static_template((templ is null) ? null : templ.getStaticPadTemplateStruct(), Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by new_from_static_template"); } this(cast(GstPad*) p); } /** * Creates a new pad with the given name from the given template. * If name is %NULL, a guaranteed unique name (across all pads) * will be assigned. * This function makes a copy of the name so you can safely free the name. * * Params: * templ = the pad template to use * name = the name of the pad * * Returns: a new #GstPad, or %NULL in * case of an error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(PadTemplate templ, string name) { auto p = gst_pad_new_from_template((templ is null) ? null : templ.getPadTemplateStruct(), Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by new_from_template"); } this(cast(GstPad*) p); } /** * Gets a string representing the given pad-link return. * * Params: * ret = a #GstPadLinkReturn to get the name of. * * Returns: a static string with the name of the pad-link return. * * Since: 1.4 */ public static string linkGetName(GstPadLinkReturn ret) { return Str.toString(gst_pad_link_get_name(ret)); } /** * Activates or deactivates the given pad in @mode via dispatching to the * pad's activatemodefunc. For use from within pad activation functions only. * * If you don't know what this is, you probably don't want to call it. * * Params: * mode = the requested activation mode * active = whether or not the pad should be active. * * Returns: %TRUE if the operation was successful. * * MT safe. */ public bool activateMode(GstPadMode mode, bool active) { return gst_pad_activate_mode(gstPad, mode, active) != 0; } /** * Be notified of different states of pads. The provided callback is called for * every state that matches @mask. * * Probes are called in groups: First GST_PAD_PROBE_TYPE_BLOCK probes are * called, then others, then finally GST_PAD_PROBE_TYPE_IDLE. The only * exception here are GST_PAD_PROBE_TYPE_IDLE probes that are called * immediately if the pad is already idle while calling gst_pad_add_probe(). * In each of the groups, probes are called in the order in which they were * added. * * Params: * mask = the probe mask * callback = #GstPadProbeCallback that will be called with notifications of * the pad state * userData = user data passed to the callback * destroyData = #GDestroyNotify for user_data * * Returns: an id or 0 if no probe is pending. The id can be used to remove the * probe with gst_pad_remove_probe(). When using GST_PAD_PROBE_TYPE_IDLE it can * happen that the probe can be run immediately and if the probe returns * GST_PAD_PROBE_REMOVE this functions returns 0. * * MT safe. */ public gulong addProbe(GstPadProbeType mask, GstPadProbeCallback callback, void* userData, GDestroyNotify destroyData) { return gst_pad_add_probe(gstPad, mask, callback, userData, destroyData); } /** * Checks if the source pad and the sink pad are compatible so they can be * linked. * * Params: * sinkpad = the sink #GstPad. * * Returns: %TRUE if the pads can be linked. */ public bool canLink(Pad sinkpad) { return gst_pad_can_link(gstPad, (sinkpad is null) ? null : sinkpad.getPadStruct()) != 0; } /** * Chain a buffer to @pad. * * The function returns #GST_FLOW_FLUSHING if the pad was flushing. * * If the buffer type is not acceptable for @pad (as negotiated with a * preceding GST_EVENT_CAPS event), this function returns * #GST_FLOW_NOT_NEGOTIATED. * * The function proceeds calling the chain function installed on @pad (see * gst_pad_set_chain_function()) and the return value of that function is * returned to the caller. #GST_FLOW_NOT_SUPPORTED is returned if @pad has no * chain function. * * In all cases, success or failure, the caller loses its reference to @buffer * after calling this function. * * Params: * buffer = the #GstBuffer to send, return GST_FLOW_ERROR * if not. * * Returns: a #GstFlowReturn from the pad. * * MT safe. */ public GstFlowReturn chain(Buffer buffer) { return gst_pad_chain(gstPad, (buffer is null) ? null : buffer.getBufferStruct()); } /** * Chain a bufferlist to @pad. * * The function returns #GST_FLOW_FLUSHING if the pad was flushing. * * If @pad was not negotiated properly with a CAPS event, this function * returns #GST_FLOW_NOT_NEGOTIATED. * * The function proceeds calling the chainlist function installed on @pad (see * gst_pad_set_chain_list_function()) and the return value of that function is * returned to the caller. #GST_FLOW_NOT_SUPPORTED is returned if @pad has no * chainlist function. * * In all cases, success or failure, the caller loses its reference to @list * after calling this function. * * MT safe. * * Params: * list = the #GstBufferList to send, return GST_FLOW_ERROR * if not. * * Returns: a #GstFlowReturn from the pad. */ public GstFlowReturn chainList(BufferList list) { return gst_pad_chain_list(gstPad, (list is null) ? null : list.getBufferListStruct()); } /** * Check and clear the #GST_PAD_FLAG_NEED_RECONFIGURE flag on @pad and return %TRUE * if the flag was set. * * Returns: %TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag was set on @pad. */ public bool checkReconfigure() { return gst_pad_check_reconfigure(gstPad) != 0; } /** * Creates a stream-id for the source #GstPad @pad by combining the * upstream information with the optional @stream_id of the stream * of @pad. @pad must have a parent #GstElement and which must have zero * or one sinkpad. @stream_id can only be %NULL if the parent element * of @pad has only a single source pad. * * This function generates an unique stream-id by getting the upstream * stream-start event stream ID and appending @stream_id to it. If the * element has no sinkpad it will generate an upstream stream-id by * doing an URI query on the element and in the worst case just uses * a random number. Source elements that don't implement the URI * handler interface should ideally generate a unique, deterministic * stream-id manually instead. * * Since stream IDs are sorted alphabetically, any numbers in the * stream ID should be printed with a fixed number of characters, * preceded by 0's, such as by using the format \%03u instead of \%u. * * Params: * parent = Parent #GstElement of @pad * streamId = The stream-id * * Returns: A stream-id for @pad. g_free() after usage. */ public string createStreamId(Element parent, string streamId) { auto retStr = gst_pad_create_stream_id(gstPad, (parent is null) ? null : parent.getElementStruct(), Str.toStringz(streamId)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Creates a stream-id for the source #GstPad @pad by combining the * upstream information with the optional @stream_id of the stream * of @pad. @pad must have a parent #GstElement and which must have zero * or one sinkpad. @stream_id can only be %NULL if the parent element * of @pad has only a single source pad. * * This function generates an unique stream-id by getting the upstream * stream-start event stream ID and appending @stream_id to it. If the * element has no sinkpad it will generate an upstream stream-id by * doing an URI query on the element and in the worst case just uses * a random number. Source elements that don't implement the URI * handler interface should ideally generate a unique, deterministic * stream-id manually instead. * * Params: * parent = Parent #GstElement of @pad * streamId = The stream-id * varArgs = parameters for the @stream_id format string * * Returns: A stream-id for @pad. g_free() after usage. */ public string createStreamIdPrintfValist(Element parent, string streamId, void* varArgs) { auto retStr = gst_pad_create_stream_id_printf_valist(gstPad, (parent is null) ? null : parent.getElementStruct(), Str.toStringz(streamId), varArgs); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Invokes the default event handler for the given pad. * * The EOS event will pause the task associated with @pad before it is forwarded * to all internally linked pads, * * The event is sent to all pads internally linked to @pad. This function * takes ownership of @event. * * Params: * parent = the parent of @pad or %NULL * event = the #GstEvent to handle. * * Returns: %TRUE if the event was sent successfully. */ public bool eventDefault(ObjectGst parent, Event event) { return gst_pad_event_default(gstPad, (parent is null) ? null : parent.getObjectGstStruct(), (event is null) ? null : event.getEventStruct()) != 0; } /** * Calls @forward for all internally linked pads of @pad. This function deals with * dynamically changing internal pads and will make sure that the @forward * function is only called once for each pad. * * When @forward returns %TRUE, no further pads will be processed. * * Params: * forward = a #GstPadForwardFunction * userData = user data passed to @forward * * Returns: %TRUE if one of the dispatcher functions returned %TRUE. */ public bool forward(GstPadForwardFunction forward, void* userData) { return gst_pad_forward(gstPad, forward, userData) != 0; } /** * Gets the capabilities of the allowed media types that can flow through * @pad and its peer. * * The allowed capabilities is calculated as the intersection of the results of * calling gst_pad_query_caps() on @pad and its peer. The caller owns a reference * on the resulting caps. * * Returns: the allowed #GstCaps of the * pad link. Unref the caps when you no longer need it. This * function returns %NULL when @pad has no peer. * * MT safe. */ public Caps getAllowedCaps() { auto p = gst_pad_get_allowed_caps(gstPad); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Gets the capabilities currently configured on @pad with the last * #GST_EVENT_CAPS event. * * Returns: the current caps of the pad with * incremented ref-count or %NULL when pad has no caps. Unref after usage. */ public Caps getCurrentCaps() { auto p = gst_pad_get_current_caps(gstPad); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Gets the direction of the pad. The direction of the pad is * decided at construction time so this function does not take * the LOCK. * * Returns: the #GstPadDirection of the pad. * * MT safe. */ public GstPadDirection getDirection() { return gst_pad_get_direction(gstPad); } /** * Gets the private data of a pad. * No locking is performed in this function. * * Returns: a #gpointer to the private data. */ public void* getElementPrivate() { return gst_pad_get_element_private(gstPad); } /** * Gets the #GstFlowReturn return from the last data passed by this pad. * * Since: 1.4 */ public GstFlowReturn getLastFlowReturn() { return gst_pad_get_last_flow_return(gstPad); } /** * Get the offset applied to the running time of @pad. @pad has to be a source * pad. * * Returns: the offset. */ public long getOffset() { return gst_pad_get_offset(gstPad); } /** * Gets the template for @pad. * * Returns: the #GstPadTemplate from which * this pad was instantiated, or %NULL if this pad has no * template. Unref after usage. */ public PadTemplate getPadTemplate() { auto p = gst_pad_get_pad_template(gstPad); if(p is null) { return null; } return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) p, true); } /** * Gets the capabilities for @pad's template. * * Returns: the #GstCaps of this pad template. * Unref after usage. */ public Caps getPadTemplateCaps() { auto p = gst_pad_get_pad_template_caps(gstPad); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Gets the parent of @pad, cast to a #GstElement. If a @pad has no parent or * its parent is not an element, return %NULL. * * Returns: the parent of the pad. The * caller has a reference on the parent, so unref when you're finished * with it. * * MT safe. */ public Element getParentElement() { auto p = gst_pad_get_parent_element(gstPad); if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p, true); } /** * Gets the peer of @pad. This function refs the peer pad so * you need to unref it after use. * * Returns: the peer #GstPad. Unref after usage. * * MT safe. */ public Pad getPeer() { auto p = gst_pad_get_peer(gstPad); if(p is null) { return null; } return ObjectG.getDObject!(Pad)(cast(GstPad*) p, true); } /** * When @pad is flushing this function returns #GST_FLOW_FLUSHING * immediately and @buffer is %NULL. * * Calls the getrange function of @pad, see #GstPadGetRangeFunction for a * description of a getrange function. If @pad has no getrange function * installed (see gst_pad_set_getrange_function()) this function returns * #GST_FLOW_NOT_SUPPORTED. * * If @buffer points to a variable holding %NULL, a valid new #GstBuffer will be * placed in @buffer when this function returns #GST_FLOW_OK. The new buffer * must be freed with gst_buffer_unref() after usage. * * When @buffer points to a variable that points to a valid #GstBuffer, the * buffer will be filled with the result data when this function returns * #GST_FLOW_OK. If the provided buffer is larger than @size, only * @size bytes will be filled in the result buffer and its size will be updated * accordingly. * * Note that less than @size bytes can be returned in @buffer when, for example, * an EOS condition is near or when @buffer is not large enough to hold @size * bytes. The caller should check the result buffer size to get the result size. * * When this function returns any other result value than #GST_FLOW_OK, @buffer * will be unchanged. * * This is a lowlevel function. Usually gst_pad_pull_range() is used. * * Params: * offset = The start offset of the buffer * size = The length of the buffer * buffer = a pointer to hold the #GstBuffer, * returns #GST_FLOW_ERROR if %NULL. * * Returns: a #GstFlowReturn from the pad. * * MT safe. */ public GstFlowReturn getRange(ulong offset, uint size, out Buffer buffer) { GstBuffer* outbuffer = null; auto p = gst_pad_get_range(gstPad, offset, size, &outbuffer); buffer = ObjectG.getDObject!(Buffer)(outbuffer); return p; } /** * Returns a new reference of the sticky event of type @event_type * from the event. * * Params: * eventType = the #GstEventType that should be retrieved. * idx = the index of the event * * Returns: a #GstEvent of type * @event_type or %NULL when no event of @event_type was on * @pad. Unref after usage. */ public Event getStickyEvent(GstEventType eventType, uint idx) { auto p = gst_pad_get_sticky_event(gstPad, eventType, idx); if(p is null) { return null; } return ObjectG.getDObject!(Event)(cast(GstEvent*) p, true); } /** * Returns the current #GstStream for the @pad, or %NULL if none has been * set yet, i.e. the pad has not received a stream-start event yet. * * This is a convenience wrapper around gst_pad_get_sticky_event() and * gst_event_parse_stream(). * * Returns: the current #GstStream for @pad, or %NULL. * unref the returned stream when no longer needed. * * Since: 1.10 */ public Stream getStream() { auto p = gst_pad_get_stream(gstPad); if(p is null) { return null; } return ObjectG.getDObject!(Stream)(cast(GstStream*) p, true); } /** * Returns the current stream-id for the @pad, or %NULL if none has been * set yet, i.e. the pad has not received a stream-start event yet. * * This is a convenience wrapper around gst_pad_get_sticky_event() and * gst_event_parse_stream_start(). * * The returned stream-id string should be treated as an opaque string, its * contents should not be interpreted. * * Returns: a newly-allocated copy of the stream-id for * @pad, or %NULL. g_free() the returned string when no longer * needed. * * Since: 1.2 */ public string getStreamId() { auto retStr = gst_pad_get_stream_id(gstPad); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Get @pad task state. If no task is currently * set, #GST_TASK_STOPPED is returned. * * Returns: The current state of @pad's task. * * Since: 1.12 */ public GstTaskState getTaskState() { return gst_pad_get_task_state(gstPad); } /** * Check if @pad has caps set on it with a #GST_EVENT_CAPS event. * * Returns: %TRUE when @pad has caps associated with it. */ public bool hasCurrentCaps() { return gst_pad_has_current_caps(gstPad) != 0; } /** * Query if a pad is active * * Returns: %TRUE if the pad is active. * * MT safe. */ public bool isActive() { return gst_pad_is_active(gstPad) != 0; } /** * Checks if the pad is blocked or not. This function returns the * last requested state of the pad. It is not certain that the pad * is actually blocking at this point (see gst_pad_is_blocking()). * * Returns: %TRUE if the pad is blocked. * * MT safe. */ public bool isBlocked() { return gst_pad_is_blocked(gstPad) != 0; } /** * Checks if the pad is blocking or not. This is a guaranteed state * of whether the pad is actually blocking on a #GstBuffer or a #GstEvent. * * Returns: %TRUE if the pad is blocking. * * MT safe. */ public bool isBlocking() { return gst_pad_is_blocking(gstPad) != 0; } /** * Checks if a @pad is linked to another pad or not. * * Returns: %TRUE if the pad is linked, %FALSE otherwise. * * MT safe. */ public bool isLinked() { return gst_pad_is_linked(gstPad) != 0; } /** * Gets an iterator for the pads to which the given pad is linked to inside * of the parent element. * * Each #GstPad element yielded by the iterator will have its refcount increased, * so unref after use. * * Free-function: gst_iterator_free * * Returns: a new #GstIterator of #GstPad * or %NULL when the pad does not have an iterator function * configured. Use gst_iterator_free() after usage. */ public Iterator iterateInternalLinks() { auto p = gst_pad_iterate_internal_links(gstPad); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Iterate the list of pads to which the given pad is linked to inside of * the parent element. * This is the default handler, and thus returns an iterator of all of the * pads inside the parent element with opposite direction. * * The caller must free this iterator after use with gst_iterator_free(). * * Params: * parent = the parent of @pad or %NULL * * Returns: a #GstIterator of #GstPad, or %NULL if @pad * has no parent. Unref each returned pad with gst_object_unref(). */ public Iterator iterateInternalLinksDefault(ObjectGst parent) { auto p = gst_pad_iterate_internal_links_default(gstPad, (parent is null) ? null : parent.getObjectGstStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Links the source pad and the sink pad. * * Params: * sinkpad = the sink #GstPad to link. * * Returns: A result code indicating if the connection worked or * what went wrong. * * MT Safe. */ public GstPadLinkReturn link(Pad sinkpad) { return gst_pad_link(gstPad, (sinkpad is null) ? null : sinkpad.getPadStruct()); } /** * Links the source pad and the sink pad. * * This variant of #gst_pad_link provides a more granular control on the * checks being done when linking. While providing some considerable speedups * the caller of this method must be aware that wrong usage of those flags * can cause severe issues. Refer to the documentation of #GstPadLinkCheck * for more information. * * MT Safe. * * Params: * sinkpad = the sink #GstPad to link. * flags = the checks to validate when linking * * Returns: A result code indicating if the connection worked or * what went wrong. */ public GstPadLinkReturn linkFull(Pad sinkpad, GstPadLinkCheck flags) { return gst_pad_link_full(gstPad, (sinkpad is null) ? null : sinkpad.getPadStruct(), flags); } /** * Links @src to @sink, creating any #GstGhostPad's in between as necessary. * * This is a convenience function to save having to create and add intermediate * #GstGhostPad's as required for linking across #GstBin boundaries. * * If @src or @sink pads don't have parent elements or do not share a common * ancestor, the link will fail. * * Params: * sink = a #GstPad * * Returns: whether the link succeeded. * * Since: 1.10 */ public bool linkMaybeGhosting(Pad sink) { return gst_pad_link_maybe_ghosting(gstPad, (sink is null) ? null : sink.getPadStruct()) != 0; } /** * Links @src to @sink, creating any #GstGhostPad's in between as necessary. * * This is a convenience function to save having to create and add intermediate * #GstGhostPad's as required for linking across #GstBin boundaries. * * If @src or @sink pads don't have parent elements or do not share a common * ancestor, the link will fail. * * Calling gst_pad_link_maybe_ghosting_full() with * @flags == %GST_PAD_LINK_CHECK_DEFAULT is the recommended way of linking * pads with safety checks applied. * * Params: * sink = a #GstPad * flags = some #GstPadLinkCheck flags * * Returns: whether the link succeeded. * * Since: 1.10 */ public bool linkMaybeGhostingFull(Pad sink, GstPadLinkCheck flags) { return gst_pad_link_maybe_ghosting_full(gstPad, (sink is null) ? null : sink.getPadStruct(), flags) != 0; } /** * Mark a pad for needing reconfiguration. The next call to * gst_pad_check_reconfigure() will return %TRUE after this call. */ public void markReconfigure() { gst_pad_mark_reconfigure(gstPad); } /** * Check the #GST_PAD_FLAG_NEED_RECONFIGURE flag on @pad and return %TRUE * if the flag was set. * * Returns: %TRUE is the GST_PAD_FLAG_NEED_RECONFIGURE flag is set on @pad. */ public bool needsReconfigure() { return gst_pad_needs_reconfigure(gstPad) != 0; } /** * Pause the task of @pad. This function will also wait until the * function executed by the task is finished if this function is not * called from the task function. * * Returns: a %TRUE if the task could be paused or %FALSE when the pad * has no task. */ public bool pauseTask() { return gst_pad_pause_task(gstPad) != 0; } /** * Performs gst_pad_query() on the peer of @pad. * * The caller is responsible for both the allocation and deallocation of * the query structure. * * Params: * query = the #GstQuery to perform. * * Returns: %TRUE if the query could be performed. This function returns %FALSE * if @pad has no peer. */ public bool peerQuery(Query query) { return gst_pad_peer_query(gstPad, (query is null) ? null : query.getQueryStruct()) != 0; } /** * Check if the peer of @pad accepts @caps. If @pad has no peer, this function * returns %TRUE. * * Params: * caps = a #GstCaps to check on the pad * * Returns: %TRUE if the peer of @pad can accept the caps or @pad has no peer. */ public bool peerQueryAcceptCaps(Caps caps) { return gst_pad_peer_query_accept_caps(gstPad, (caps is null) ? null : caps.getCapsStruct()) != 0; } /** * Gets the capabilities of the peer connected to this pad. Similar to * gst_pad_query_caps(). * * When called on srcpads @filter contains the caps that * upstream could produce in the order preferred by upstream. When * called on sinkpads @filter contains the caps accepted by * downstream in the preferred order. @filter might be %NULL but * if it is not %NULL the returned caps will be a subset of @filter. * * Params: * filter = a #GstCaps filter, or %NULL. * * Returns: the caps of the peer pad with incremented * ref-count. When there is no peer pad, this function returns @filter or, * when @filter is %NULL, ANY caps. */ public Caps peerQueryCaps(Caps filter) { auto p = gst_pad_peer_query_caps(gstPad, (filter is null) ? null : filter.getCapsStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Queries the peer pad of a given sink pad to convert @src_val in @src_format * to @dest_format. * * Params: * srcFormat = a #GstFormat to convert from. * srcVal = a value to convert. * destFormat = the #GstFormat to convert to. * destVal = a pointer to the result. * * Returns: %TRUE if the query could be performed. */ public bool peerQueryConvert(GstFormat srcFormat, long srcVal, GstFormat destFormat, out long destVal) { return gst_pad_peer_query_convert(gstPad, srcFormat, srcVal, destFormat, &destVal) != 0; } /** * Queries the peer pad of a given sink pad for the total stream duration. * * Params: * format = the #GstFormat requested * duration = a location in which to store the total * duration, or %NULL. * * Returns: %TRUE if the query could be performed. */ public bool peerQueryDuration(GstFormat format, out long duration) { return gst_pad_peer_query_duration(gstPad, format, &duration) != 0; } /** * Queries the peer of a given sink pad for the stream position. * * Params: * format = the #GstFormat requested * cur = a location in which to store the current * position, or %NULL. * * Returns: %TRUE if the query could be performed. */ public bool peerQueryPosition(GstFormat format, out long cur) { return gst_pad_peer_query_position(gstPad, format, &cur) != 0; } /** * Checks if all internally linked pads of @pad accepts the caps in @query and * returns the intersection of the results. * * This function is useful as a default accept caps query function for an element * that can handle any stream format, but requires caps that are acceptable for * all opposite pads. * * Params: * query = an ACCEPT_CAPS #GstQuery. * * Returns: %TRUE if @query could be executed */ public bool proxyQueryAcceptCaps(Query query) { return gst_pad_proxy_query_accept_caps(gstPad, (query is null) ? null : query.getQueryStruct()) != 0; } /** * Calls gst_pad_query_caps() for all internally linked pads of @pad and returns * the intersection of the results. * * This function is useful as a default caps query function for an element * that can handle any stream format, but requires all its pads to have * the same caps. Two such elements are tee and adder. * * Params: * query = a CAPS #GstQuery. * * Returns: %TRUE if @query could be executed */ public bool proxyQueryCaps(Query query) { return gst_pad_proxy_query_caps(gstPad, (query is null) ? null : query.getQueryStruct()) != 0; } /** * Pulls a @buffer from the peer pad or fills up a provided buffer. * * This function will first trigger the pad block signal if it was * installed. * * When @pad is not linked #GST_FLOW_NOT_LINKED is returned else this * function returns the result of gst_pad_get_range() on the peer pad. * See gst_pad_get_range() for a list of return values and for the * semantics of the arguments of this function. * * If @buffer points to a variable holding %NULL, a valid new #GstBuffer will be * placed in @buffer when this function returns #GST_FLOW_OK. The new buffer * must be freed with gst_buffer_unref() after usage. When this function * returns any other result value, @buffer will still point to %NULL. * * When @buffer points to a variable that points to a valid #GstBuffer, the * buffer will be filled with the result data when this function returns * #GST_FLOW_OK. When this function returns any other result value, * @buffer will be unchanged. If the provided buffer is larger than @size, only * @size bytes will be filled in the result buffer and its size will be updated * accordingly. * * Note that less than @size bytes can be returned in @buffer when, for example, * an EOS condition is near or when @buffer is not large enough to hold @size * bytes. The caller should check the result buffer size to get the result size. * * Params: * offset = The start offset of the buffer * size = The length of the buffer * buffer = a pointer to hold the #GstBuffer, returns * GST_FLOW_ERROR if %NULL. * * Returns: a #GstFlowReturn from the peer pad. * * MT safe. */ public GstFlowReturn pullRange(ulong offset, uint size, out Buffer buffer) { GstBuffer* outbuffer = null; auto p = gst_pad_pull_range(gstPad, offset, size, &outbuffer); buffer = ObjectG.getDObject!(Buffer)(outbuffer); return p; } /** * Pushes a buffer to the peer of @pad. * * This function will call installed block probes before triggering any * installed data probes. * * The function proceeds calling gst_pad_chain() on the peer pad and returns * the value from that function. If @pad has no peer, #GST_FLOW_NOT_LINKED will * be returned. * * In all cases, success or failure, the caller loses its reference to @buffer * after calling this function. * * Params: * buffer = the #GstBuffer to push returns GST_FLOW_ERROR * if not. * * Returns: a #GstFlowReturn from the peer pad. * * MT safe. */ public GstFlowReturn push(Buffer buffer) { return gst_pad_push(gstPad, (buffer is null) ? null : buffer.getBufferStruct()); } /** * Sends the event to the peer of the given pad. This function is * mainly used by elements to send events to their peer * elements. * * This function takes ownership of the provided event so you should * gst_event_ref() it if you want to reuse the event after this call. * * Params: * event = the #GstEvent to send to the pad. * * Returns: %TRUE if the event was handled. * * MT safe. */ public bool pushEvent(Event event) { return gst_pad_push_event(gstPad, (event is null) ? null : event.getEventStruct()) != 0; } /** * Pushes a buffer list to the peer of @pad. * * This function will call installed block probes before triggering any * installed data probes. * * The function proceeds calling the chain function on the peer pad and returns * the value from that function. If @pad has no peer, #GST_FLOW_NOT_LINKED will * be returned. If the peer pad does not have any installed chainlist function * every group buffer of the list will be merged into a normal #GstBuffer and * chained via gst_pad_chain(). * * In all cases, success or failure, the caller loses its reference to @list * after calling this function. * * Params: * list = the #GstBufferList to push returns GST_FLOW_ERROR * if not. * * Returns: a #GstFlowReturn from the peer pad. * * MT safe. */ public GstFlowReturn pushList(BufferList list) { return gst_pad_push_list(gstPad, (list is null) ? null : list.getBufferListStruct()); } /** * Dispatches a query to a pad. The query should have been allocated by the * caller via one of the type-specific allocation functions. The element that * the pad belongs to is responsible for filling the query with an appropriate * response, which should then be parsed with a type-specific query parsing * function. * * Again, the caller is responsible for both the allocation and deallocation of * the query structure. * * Please also note that some queries might need a running pipeline to work. * * Params: * query = the #GstQuery to perform. * * Returns: %TRUE if the query could be performed. */ public bool query(Query query) { return gst_pad_query(gstPad, (query is null) ? null : query.getQueryStruct()) != 0; } /** * Check if the given pad accepts the caps. * * Params: * caps = a #GstCaps to check on the pad * * Returns: %TRUE if the pad can accept the caps. */ public bool queryAcceptCaps(Caps caps) { return gst_pad_query_accept_caps(gstPad, (caps is null) ? null : caps.getCapsStruct()) != 0; } /** * Gets the capabilities this pad can produce or consume. * Note that this method doesn't necessarily return the caps set by sending a * gst_event_new_caps() - use gst_pad_get_current_caps() for that instead. * gst_pad_query_caps returns all possible caps a pad can operate with, using * the pad's CAPS query function, If the query fails, this function will return * @filter, if not %NULL, otherwise ANY. * * When called on sinkpads @filter contains the caps that * upstream could produce in the order preferred by upstream. When * called on srcpads @filter contains the caps accepted by * downstream in the preferred order. @filter might be %NULL but * if it is not %NULL the returned caps will be a subset of @filter. * * Note that this function does not return writable #GstCaps, use * gst_caps_make_writable() before modifying the caps. * * Params: * filter = suggested #GstCaps, or %NULL * * Returns: the caps of the pad with incremented ref-count. */ public Caps queryCaps(Caps filter) { auto p = gst_pad_query_caps(gstPad, (filter is null) ? null : filter.getCapsStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Queries a pad to convert @src_val in @src_format to @dest_format. * * Params: * srcFormat = a #GstFormat to convert from. * srcVal = a value to convert. * destFormat = the #GstFormat to convert to. * destVal = a pointer to the result. * * Returns: %TRUE if the query could be performed. */ public bool queryConvert(GstFormat srcFormat, long srcVal, GstFormat destFormat, out long destVal) { return gst_pad_query_convert(gstPad, srcFormat, srcVal, destFormat, &destVal) != 0; } /** * Invokes the default query handler for the given pad. * The query is sent to all pads internally linked to @pad. Note that * if there are many possible sink pads that are internally linked to * @pad, only one will be sent the query. * Multi-sinkpad elements should implement custom query handlers. * * Params: * parent = the parent of @pad or %NULL * query = the #GstQuery to handle. * * Returns: %TRUE if the query was performed successfully. */ public bool queryDefault(ObjectGst parent, Query query) { return gst_pad_query_default(gstPad, (parent is null) ? null : parent.getObjectGstStruct(), (query is null) ? null : query.getQueryStruct()) != 0; } /** * Queries a pad for the total stream duration. * * Params: * format = the #GstFormat requested * duration = a location in which to store the total * duration, or %NULL. * * Returns: %TRUE if the query could be performed. */ public bool queryDuration(GstFormat format, out long duration) { return gst_pad_query_duration(gstPad, format, &duration) != 0; } /** * Queries a pad for the stream position. * * Params: * format = the #GstFormat requested * cur = A location in which to store the current position, or %NULL. * * Returns: %TRUE if the query could be performed. */ public bool queryPosition(GstFormat format, out long cur) { return gst_pad_query_position(gstPad, format, &cur) != 0; } /** * Remove the probe with @id from @pad. * * MT safe. * * Params: * id = the probe id to remove */ public void removeProbe(gulong id) { gst_pad_remove_probe(gstPad, id); } /** * Sends the event to the pad. This function can be used * by applications to send events in the pipeline. * * If @pad is a source pad, @event should be an upstream event. If @pad is a * sink pad, @event should be a downstream event. For example, you would not * send a #GST_EVENT_EOS on a src pad; EOS events only propagate downstream. * Furthermore, some downstream events have to be serialized with data flow, * like EOS, while some can travel out-of-band, like #GST_EVENT_FLUSH_START. If * the event needs to be serialized with data flow, this function will take the * pad's stream lock while calling its event function. * * To find out whether an event type is upstream, downstream, or downstream and * serialized, see #GstEventTypeFlags, gst_event_type_get_flags(), * #GST_EVENT_IS_UPSTREAM, #GST_EVENT_IS_DOWNSTREAM, and * #GST_EVENT_IS_SERIALIZED. Note that in practice that an application or * plugin doesn't need to bother itself with this information; the core handles * all necessary locks and checks. * * This function takes ownership of the provided event so you should * gst_event_ref() it if you want to reuse the event after this call. * * Params: * event = the #GstEvent to send to the pad. * * Returns: %TRUE if the event was handled. */ public bool sendEvent(Event event) { return gst_pad_send_event(gstPad, (event is null) ? null : event.getEventStruct()) != 0; } /** * Sets the given activate function for @pad. The activate function will * dispatch to gst_pad_activate_mode() to perform the actual activation. * Only makes sense to set on sink pads. * * Call this function if your sink pad can start a pull-based task. * * Params: * activate = the #GstPadActivateFunction to set. * userData = user_data passed to @notify * notify = notify called when @activate will not be used anymore. */ public void setActivateFunctionFull(GstPadActivateFunction activate, void* userData, GDestroyNotify notify) { gst_pad_set_activate_function_full(gstPad, activate, userData, notify); } /** * Sets the given activate_mode function for the pad. An activate_mode function * prepares the element for data passing. * * Params: * activatemode = the #GstPadActivateModeFunction to set. * userData = user_data passed to @notify * notify = notify called when @activatemode will not be used anymore. */ public void setActivatemodeFunctionFull(GstPadActivateModeFunction activatemode, void* userData, GDestroyNotify notify) { gst_pad_set_activatemode_function_full(gstPad, activatemode, userData, notify); } /** * Activates or deactivates the given pad. * Normally called from within core state change functions. * * If @active, makes sure the pad is active. If it is already active, either in * push or pull mode, just return. Otherwise dispatches to the pad's activate * function to perform the actual activation. * * If not @active, calls gst_pad_activate_mode() with the pad's current mode * and a %FALSE argument. * * Params: * active = whether or not the pad should be active. * * Returns: %TRUE if the operation was successful. * * MT safe. */ public bool setActive(bool active) { return gst_pad_set_active(gstPad, active) != 0; } /** * Sets the given chain function for the pad. The chain function is called to * process a #GstBuffer input buffer. see #GstPadChainFunction for more details. * * Params: * chain = the #GstPadChainFunction to set. * userData = user_data passed to @notify * notify = notify called when @chain will not be used anymore. */ public void setChainFunctionFull(GstPadChainFunction chain, void* userData, GDestroyNotify notify) { gst_pad_set_chain_function_full(gstPad, chain, userData, notify); } /** * Sets the given chain list function for the pad. The chainlist function is * called to process a #GstBufferList input buffer list. See * #GstPadChainListFunction for more details. * * Params: * chainlist = the #GstPadChainListFunction to set. * userData = user_data passed to @notify * notify = notify called when @chainlist will not be used anymore. */ public void setChainListFunctionFull(GstPadChainListFunction chainlist, void* userData, GDestroyNotify notify) { gst_pad_set_chain_list_function_full(gstPad, chainlist, userData, notify); } /** * Set the given private data gpointer on the pad. * This function can only be used by the element that owns the pad. * No locking is performed in this function. * * Params: * priv = The private data to attach to the pad. */ public void setElementPrivate(void* priv) { gst_pad_set_element_private(gstPad, priv); } /** * Sets the given event handler for the pad. * * Params: * event = the #GstPadEventFullFunction to set. * userData = user_data passed to @notify * notify = notify called when @event will not be used anymore. * * Since: 1.8 */ public void setEventFullFunctionFull(GstPadEventFullFunction event, void* userData, GDestroyNotify notify) { gst_pad_set_event_full_function_full(gstPad, event, userData, notify); } /** * Sets the given event handler for the pad. * * Params: * event = the #GstPadEventFunction to set. * userData = user_data passed to @notify * notify = notify called when @event will not be used anymore. */ public void setEventFunctionFull(GstPadEventFunction event, void* userData, GDestroyNotify notify) { gst_pad_set_event_function_full(gstPad, event, userData, notify); } /** * Sets the given getrange function for the pad. The getrange function is * called to produce a new #GstBuffer to start the processing pipeline. see * #GstPadGetRangeFunction for a description of the getrange function. * * Params: * get = the #GstPadGetRangeFunction to set. * userData = user_data passed to @notify * notify = notify called when @get will not be used anymore. */ public void setGetrangeFunctionFull(GstPadGetRangeFunction get, void* userData, GDestroyNotify notify) { gst_pad_set_getrange_function_full(gstPad, get, userData, notify); } /** * Sets the given internal link iterator function for the pad. * * Params: * iterintlink = the #GstPadIterIntLinkFunction to set. * userData = user_data passed to @notify * notify = notify called when @iterintlink will not be used anymore. */ public void setIterateInternalLinksFunctionFull(GstPadIterIntLinkFunction iterintlink, void* userData, GDestroyNotify notify) { gst_pad_set_iterate_internal_links_function_full(gstPad, iterintlink, userData, notify); } /** * Sets the given link function for the pad. It will be called when * the pad is linked with another pad. * * The return value #GST_PAD_LINK_OK should be used when the connection can be * made. * * The return value #GST_PAD_LINK_REFUSED should be used when the connection * cannot be made for some reason. * * If @link is installed on a source pad, it should call the #GstPadLinkFunction * of the peer sink pad, if present. * * Params: * link = the #GstPadLinkFunction to set. * userData = user_data passed to @notify * notify = notify called when @link will not be used anymore. */ public void setLinkFunctionFull(GstPadLinkFunction link, void* userData, GDestroyNotify notify) { gst_pad_set_link_function_full(gstPad, link, userData, notify); } /** * Set the offset that will be applied to the running time of @pad. * * Params: * offset = the offset */ public void setOffset(long offset) { gst_pad_set_offset(gstPad, offset); } /** * Set the given query function for the pad. * * Params: * query = the #GstPadQueryFunction to set. * userData = user_data passed to @notify * notify = notify called when @query will not be used anymore. */ public void setQueryFunctionFull(GstPadQueryFunction query, void* userData, GDestroyNotify notify) { gst_pad_set_query_function_full(gstPad, query, userData, notify); } /** * Sets the given unlink function for the pad. It will be called * when the pad is unlinked. * * Params: * unlink = the #GstPadUnlinkFunction to set. * userData = user_data passed to @notify * notify = notify called when @unlink will not be used anymore. */ public void setUnlinkFunctionFull(GstPadUnlinkFunction unlink, void* userData, GDestroyNotify notify) { gst_pad_set_unlink_function_full(gstPad, unlink, userData, notify); } /** * Starts a task that repeatedly calls @func with @user_data. This function * is mostly used in pad activation functions to start the dataflow. * The #GST_PAD_STREAM_LOCK of @pad will automatically be acquired * before @func is called. * * Params: * func = the task function to call * userData = user data passed to the task function * notify = called when @user_data is no longer referenced * * Returns: a %TRUE if the task could be started. */ public bool startTask(GstTaskFunction func, void* userData, GDestroyNotify notify) { return gst_pad_start_task(gstPad, func, userData, notify) != 0; } /** * Iterates all sticky events on @pad and calls @foreach_func for every * event. If @foreach_func returns %FALSE the iteration is immediately stopped. * * Params: * foreachFunc = the #GstPadStickyEventsForeachFunction that * should be called for every event. * userData = the optional user data. */ public void stickyEventsForeach(GstPadStickyEventsForeachFunction foreachFunc, void* userData) { gst_pad_sticky_events_foreach(gstPad, foreachFunc, userData); } /** * Stop the task of @pad. This function will also make sure that the * function executed by the task will effectively stop if not called * from the GstTaskFunction. * * This function will deadlock if called from the GstTaskFunction of * the task. Use gst_task_pause() instead. * * Regardless of whether the pad has a task, the stream lock is acquired and * released so as to ensure that streaming through this pad has finished. * * Returns: a %TRUE if the task could be stopped or %FALSE on error. */ public bool stopTask() { return gst_pad_stop_task(gstPad) != 0; } /** * Store the sticky @event on @pad * * Params: * event = a #GstEvent * * Returns: #GST_FLOW_OK on success, #GST_FLOW_FLUSHING when the pad * was flushing or #GST_FLOW_EOS when the pad was EOS. * * Since: 1.2 */ public GstFlowReturn storeStickyEvent(Event event) { return gst_pad_store_sticky_event(gstPad, (event is null) ? null : event.getEventStruct()); } /** * Unlinks the source pad from the sink pad. Will emit the #GstPad::unlinked * signal on both pads. * * Params: * sinkpad = the sink #GstPad to unlink. * * Returns: %TRUE if the pads were unlinked. This function returns %FALSE if * the pads were not linked together. * * MT safe. */ public bool unlink(Pad sinkpad) { return gst_pad_unlink(gstPad, (sinkpad is null) ? null : sinkpad.getPadStruct()) != 0; } /** * A helper function you can use that sets the FIXED_CAPS flag * This way the default CAPS query will always return the negotiated caps * or in case the pad is not negotiated, the padtemplate caps. * * The negotiated caps are the caps of the last CAPS event that passed on the * pad. Use this function on a pad that, once it negotiated to a CAPS, cannot * be renegotiated to something else. */ public void useFixedCaps() { gst_pad_use_fixed_caps(gstPad); } protected class OnLinkedDelegateWrapper { void delegate(Pad, Pad) dlg; gulong handlerId; this(void delegate(Pad, Pad) dlg) { this.dlg = dlg; onLinkedListeners ~= this; } void remove(OnLinkedDelegateWrapper source) { foreach(index, wrapper; onLinkedListeners) { if (wrapper.handlerId == source.handlerId) { onLinkedListeners[index] = null; onLinkedListeners = std.algorithm.remove(onLinkedListeners, index); break; } } } } OnLinkedDelegateWrapper[] onLinkedListeners; /** * Signals that a pad has been linked to the peer pad. * * Params: * peer = the peer pad that has been connected */ gulong addOnLinked(void delegate(Pad, Pad) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnLinkedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "linked", cast(GCallback)&callBackLinked, cast(void*)wrapper, cast(GClosureNotify)&callBackLinkedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackLinked(GstPad* padStruct, GstPad* peer, OnLinkedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Pad)(peer), wrapper.outer); } extern(C) static void callBackLinkedDestroy(OnLinkedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnUnlinkedDelegateWrapper { void delegate(Pad, Pad) dlg; gulong handlerId; this(void delegate(Pad, Pad) dlg) { this.dlg = dlg; onUnlinkedListeners ~= this; } void remove(OnUnlinkedDelegateWrapper source) { foreach(index, wrapper; onUnlinkedListeners) { if (wrapper.handlerId == source.handlerId) { onUnlinkedListeners[index] = null; onUnlinkedListeners = std.algorithm.remove(onUnlinkedListeners, index); break; } } } } OnUnlinkedDelegateWrapper[] onUnlinkedListeners; /** * Signals that a pad has been unlinked from the peer pad. * * Params: * peer = the peer pad that has been disconnected */ gulong addOnUnlinked(void delegate(Pad, Pad) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnUnlinkedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "unlinked", cast(GCallback)&callBackUnlinked, cast(void*)wrapper, cast(GClosureNotify)&callBackUnlinkedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackUnlinked(GstPad* padStruct, GstPad* peer, OnUnlinkedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Pad)(peer), wrapper.outer); } extern(C) static void callBackUnlinkedDestroy(OnUnlinkedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** * Gets a string representing the given flow return. * * Params: * ret = a #GstFlowReturn to get the name of. * * Returns: a static string with the name of the flow return. */ public static string flowGetName(GstFlowReturn ret) { return Str.toString(gst_flow_get_name(ret)); } /** * Get the unique quark for the given GstFlowReturn. * * Params: * ret = a #GstFlowReturn to get the quark of. * * Returns: the quark associated with the flow return or 0 if an * invalid return was specified. */ public static GQuark flowToQuark(GstFlowReturn ret) { return gst_flow_to_quark(ret); } /** * Return the name of a pad mode, for use in debug messages mostly. * * Params: * mode = the pad mode * * Returns: short mnemonic for pad mode @mode */ public static string modeGetName(GstPadMode mode) { return Str.toString(gst_pad_mode_get_name(mode)); } } GtkD-3.7.5/generated/gstreamer/gstreamer/PadProbeInfo.d000066400000000000000000000056371324604450400227710ustar00rootroot00000000000000/* * 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 gstreamer.PadProbeInfo; private import gobject.ObjectG; private import gstreamer.Buffer; private import gstreamer.BufferList; private import gstreamer.Event; private import gstreamer.Query; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Info passed in the #GstPadProbeCallback. */ public class PadProbeInfo { /** the main Gtk struct */ protected GstPadProbeInfo* gstPadProbeInfo; protected bool ownedRef; /** Get the main Gtk struct */ public GstPadProbeInfo* getPadProbeInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstPadProbeInfo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstPadProbeInfo; } /** * Sets our main struct and passes it to the parent class. */ public this (GstPadProbeInfo* gstPadProbeInfo, bool ownedRef = false) { this.gstPadProbeInfo = gstPadProbeInfo; this.ownedRef = ownedRef; } /** * Returns: The #GstBuffer from the probe */ public Buffer getBuffer() { auto p = gst_pad_probe_info_get_buffer(gstPadProbeInfo); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p); } /** * Returns: The #GstBufferList from the probe */ public BufferList getBufferList() { auto p = gst_pad_probe_info_get_buffer_list(gstPadProbeInfo); if(p is null) { return null; } return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p); } /** * Returns: The #GstEvent from the probe */ public Event getEvent() { auto p = gst_pad_probe_info_get_event(gstPadProbeInfo); if(p is null) { return null; } return ObjectG.getDObject!(Event)(cast(GstEvent*) p); } /** * Returns: The #GstQuery from the probe */ public Query getQuery() { auto p = gst_pad_probe_info_get_query(gstPadProbeInfo); if(p is null) { return null; } return ObjectG.getDObject!(Query)(cast(GstQuery*) p); } } GtkD-3.7.5/generated/gstreamer/gstreamer/PadTemplate.d000066400000000000000000000166471324604450400226640ustar00rootroot00000000000000/* * 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 gstreamer.PadTemplate; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.Caps; private import gstreamer.ObjectGst; private import gstreamer.Pad; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * Padtemplates describe the possible media types a pad or an elementfactory can * handle. This allows for both inspection of handled types before loading the * element plugin as well as identifying pads on elements that are not yet * created (request or sometimes pads). * * Pad and PadTemplates have #GstCaps attached to it to describe the media type * they are capable of dealing with. gst_pad_template_get_caps() or * GST_PAD_TEMPLATE_CAPS() are used to get the caps of a padtemplate. It's not * possible to modify the caps of a padtemplate after creation. * * PadTemplates have a #GstPadPresence property which identifies the lifetime * of the pad and that can be retrieved with GST_PAD_TEMPLATE_PRESENCE(). Also * the direction of the pad can be retrieved from the #GstPadTemplate with * GST_PAD_TEMPLATE_DIRECTION(). * * The GST_PAD_TEMPLATE_NAME_TEMPLATE () is important for GST_PAD_REQUEST pads * because it has to be used as the name in the gst_element_get_request_pad() * call to instantiate a pad from this template. * * Padtemplates can be created with gst_pad_template_new() or with * gst_static_pad_template_get (), which creates a #GstPadTemplate from a * #GstStaticPadTemplate that can be filled with the * convenient GST_STATIC_PAD_TEMPLATE() macro. * * A padtemplate can be used to create a pad (see gst_pad_new_from_template() * or gst_pad_new_from_static_template ()) or to add to an element class * (see gst_element_class_add_static_pad_template ()). * * The following code example shows the code to create a pad from a padtemplate. * |[ * GstStaticPadTemplate my_template = * GST_STATIC_PAD_TEMPLATE ( * "sink", // the name of the pad * GST_PAD_SINK, // the direction of the pad * GST_PAD_ALWAYS, // when this pad will be present * GST_STATIC_CAPS ( // the capabilities of the padtemplate * "audio/x-raw, " * "channels = (int) [ 1, 6 ]" * ) * ); * void * my_method (void) * { * GstPad *pad; * pad = gst_pad_new_from_static_template (&my_template, "sink"); * ... * } * ]| * * The following example shows you how to add the padtemplate to an * element class, this is usually done in the class_init of the class: * |[ * static void * my_element_class_init (GstMyElementClass *klass) * { * GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); * * gst_element_class_add_static_pad_template (gstelement_class, &my_template); * } * ]| */ public class PadTemplate : ObjectGst { /** the main Gtk struct */ protected GstPadTemplate* gstPadTemplate; /** Get the main Gtk struct */ public GstPadTemplate* getPadTemplateStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstPadTemplate; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstPadTemplate; } protected override void setStruct(GObject* obj) { gstPadTemplate = cast(GstPadTemplate*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstPadTemplate* gstPadTemplate, bool ownedRef = false) { this.gstPadTemplate = gstPadTemplate; super(cast(GstObject*)gstPadTemplate, ownedRef); } /** */ public static GType getType() { return gst_pad_template_get_type(); } /** * Creates a new pad template with a name according to the given template * and with the given arguments. * * Params: * nameTemplate = the name template. * direction = the #GstPadDirection of the template. * presence = the #GstPadPresence of the pad. * caps = a #GstCaps set for the template. * * Returns: a new #GstPadTemplate. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string nameTemplate, GstPadDirection direction, GstPadPresence presence, Caps caps) { auto p = gst_pad_template_new(Str.toStringz(nameTemplate), direction, presence, (caps is null) ? null : caps.getCapsStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstPadTemplate*) p); } /** * Gets the capabilities of the pad template. * * Returns: the #GstCaps of the pad template. * Unref after usage. */ public Caps getCaps() { auto p = gst_pad_template_get_caps(gstPadTemplate); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Emit the pad-created signal for this template when created by this pad. * * Params: * pad = the #GstPad that created it */ public void padCreated(Pad pad) { gst_pad_template_pad_created(gstPadTemplate, (pad is null) ? null : pad.getPadStruct()); } protected class OnPadCreatedDelegateWrapper { void delegate(Pad, PadTemplate) dlg; gulong handlerId; this(void delegate(Pad, PadTemplate) dlg) { this.dlg = dlg; onPadCreatedListeners ~= this; } void remove(OnPadCreatedDelegateWrapper source) { foreach(index, wrapper; onPadCreatedListeners) { if (wrapper.handlerId == source.handlerId) { onPadCreatedListeners[index] = null; onPadCreatedListeners = std.algorithm.remove(onPadCreatedListeners, index); break; } } } } OnPadCreatedDelegateWrapper[] onPadCreatedListeners; /** * This signal is fired when an element creates a pad from this template. * * Params: * pad = the pad that was created. */ gulong addOnPadCreated(void delegate(Pad, PadTemplate) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPadCreatedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "pad-created", cast(GCallback)&callBackPadCreated, cast(void*)wrapper, cast(GClosureNotify)&callBackPadCreatedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPadCreated(GstPadTemplate* padtemplateStruct, GstPad* pad, OnPadCreatedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Pad)(pad), wrapper.outer); } extern(C) static void callBackPadCreatedDestroy(OnPadCreatedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/ParamSpecFraction.d000066400000000000000000000064041324604450400240130ustar00rootroot00000000000000/* * 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 gstreamer.ParamSpecFraction; private import glib.ConstructionException; private import glib.Str; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * A GParamSpec derived structure that contains the meta data for fractional * properties. */ public class ParamSpecFraction { /** the main Gtk struct */ protected GstParamSpecFraction* gstParamSpecFraction; protected bool ownedRef; /** Get the main Gtk struct */ public GstParamSpecFraction* getParamSpecFractionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstParamSpecFraction; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstParamSpecFraction; } /** * Sets our main struct and passes it to the parent class. */ public this (GstParamSpecFraction* gstParamSpecFraction, bool ownedRef = false) { this.gstParamSpecFraction = gstParamSpecFraction; this.ownedRef = ownedRef; } /** * This function creates a fraction GParamSpec for use by objects/elements * that want to expose properties of fraction type. This function is typically * used in connection with g_object_class_install_property() in a GObjects's * instance_init function. * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minNum = minimum value (fraction numerator) * minDenom = minimum value (fraction denominator) * maxNum = maximum value (fraction numerator) * maxDenom = maximum value (fraction denominator) * defaultNum = default value (fraction numerator) * defaultDenom = default value (fraction denominator) * flags = flags for the property specified * Returns: a newly created parameter specification. [transfer full] */ public this(string name, string nick, string blurb, int minNum, int minDenom, int maxNum, int maxDenom, int defaultNum, int defaultDenom, GParamFlags flags) { auto p = gst_param_spec_fraction(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minNum, minDenom, maxNum, maxDenom, defaultNum, defaultDenom, flags); if(p is null) { throw new ConstructionException("null returned by gst_param_spec_fraction"); } this(cast(GstParamSpecFraction*) p); } /** */ } GtkD-3.7.5/generated/gstreamer/gstreamer/ParentBufferMeta.d000066400000000000000000000064361324604450400236510ustar00rootroot00000000000000/* * 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 gstreamer.ParentBufferMeta; private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Buffer; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * The #GstParentBufferMeta is a #GstMeta which can be attached to a #GstBuffer * to hold a reference to another buffer that is only released when the child * #GstBuffer is released. * * Typically, #GstParentBufferMeta is used when the child buffer is directly * using the #GstMemory of the parent buffer, and wants to prevent the parent * buffer from being returned to a buffer pool until the #GstMemory is available * for re-use. * * Since: 1.6 */ public final class ParentBufferMeta { /** the main Gtk struct */ protected GstParentBufferMeta* gstParentBufferMeta; protected bool ownedRef; /** Get the main Gtk struct */ public GstParentBufferMeta* getParentBufferMetaStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstParentBufferMeta; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstParentBufferMeta; } /** * Sets our main struct and passes it to the parent class. */ public this (GstParentBufferMeta* gstParentBufferMeta, bool ownedRef = false) { this.gstParentBufferMeta = gstParentBufferMeta; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) g_free(gstParentBufferMeta); } /** * the parent #GstMeta structure */ public @property GstMeta parent() { return gstParentBufferMeta.parent; } /** Ditto */ public @property void parent(GstMeta value) { gstParentBufferMeta.parent = value; } /** * the #GstBuffer on which a reference is being held. */ public @property Buffer buffer() { return ObjectG.getDObject!(Buffer)(gstParentBufferMeta.buffer, false); } /** Ditto */ public @property void buffer(Buffer value) { gstParentBufferMeta.buffer = value.getBufferStruct(); } /** * Get the global #GstMetaInfo describing the #GstParentBufferMeta meta. * * Returns: The #GstMetaInfo * * Since: 1.6 */ public static GstMetaInfo* getInfo() { return gst_parent_buffer_meta_get_info(); } /** */ public static GType getType() { return gst_parent_buffer_meta_api_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Parse.d000066400000000000000000000206711324604450400215260ustar00rootroot00000000000000/* * 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 gstreamer.Parse; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Bin; private import gstreamer.Element; private import gstreamer.ParseContext; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public struct Parse { /** * This is a convenience wrapper around gst_parse_launch() to create a * #GstBin from a gst-launch-style pipeline description. See * gst_parse_launch() and the gst-launch man page for details about the * syntax. Ghost pads on the bin for unlinked source or sink pads * within the bin can automatically be created (but only a maximum of * one ghost pad for each direction will be created; if you expect * multiple unlinked source pads or multiple unlinked sink pads * and want them all ghosted, you will have to create the ghost pads * yourself). * * Params: * binDescription = command line describing the bin * ghostUnlinkedPads = whether to automatically create ghost pads * for unlinked source or sink pads within the bin * * Returns: a * newly-created bin, or %NULL if an error occurred. * * Throws: GException on failure. */ public static Bin binFromDescription(string binDescription, bool ghostUnlinkedPads) { GError* err = null; auto p = gst_parse_bin_from_description(Str.toStringz(binDescription), ghostUnlinkedPads, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Bin)(cast(GstBin*) p); } /** * This is a convenience wrapper around gst_parse_launch() to create a * #GstBin from a gst-launch-style pipeline description. See * gst_parse_launch() and the gst-launch man page for details about the * syntax. Ghost pads on the bin for unlinked source or sink pads * within the bin can automatically be created (but only a maximum of * one ghost pad for each direction will be created; if you expect * multiple unlinked source pads or multiple unlinked sink pads * and want them all ghosted, you will have to create the ghost pads * yourself). * * Params: * binDescription = command line describing the bin * ghostUnlinkedPads = whether to automatically create ghost pads * for unlinked source or sink pads within the bin * context = a parse context allocated with * gst_parse_context_new(), or %NULL * flags = parsing options, or #GST_PARSE_FLAG_NONE * * Returns: a newly-created * element, which is guaranteed to be a bin unless * GST_FLAG_NO_SINGLE_ELEMENT_BINS was passed, or %NULL if an error * occurred. * * Throws: GException on failure. */ public static Element binFromDescriptionFull(string binDescription, bool ghostUnlinkedPads, ParseContext context, GstParseFlags flags) { GError* err = null; auto p = gst_parse_bin_from_description_full(Str.toStringz(binDescription), ghostUnlinkedPads, (context is null) ? null : context.getParseContextStruct(), flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p); } /** * Get the error quark used by the parsing subsystem. * * Returns: the quark of the parse errors. */ public static GQuark errorQuark() { return gst_parse_error_quark(); } /** * Create a new pipeline based on command line syntax. * Please note that you might get a return value that is not %NULL even though * the @error is set. In this case there was a recoverable parsing error and you * can try to play the pipeline. * * Params: * pipelineDescription = the command line describing the pipeline * * Returns: a new element on success, %NULL on failure. If * more than one toplevel element is specified by the @pipeline_description, * all elements are put into a #GstPipeline, which than is returned. * * Throws: GException on failure. */ public static Element launch(string pipelineDescription) { GError* err = null; auto p = gst_parse_launch(Str.toStringz(pipelineDescription), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p); } /** * Create a new pipeline based on command line syntax. * Please note that you might get a return value that is not %NULL even though * the @error is set. In this case there was a recoverable parsing error and you * can try to play the pipeline. * * Params: * pipelineDescription = the command line describing the pipeline * context = a parse context allocated with * gst_parse_context_new(), or %NULL * flags = parsing options, or #GST_PARSE_FLAG_NONE * * Returns: a new element on success, %NULL on failure. If * more than one toplevel element is specified by the @pipeline_description, * all elements are put into a #GstPipeline, which then is returned (unless * the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in which case they are put * in a #GstBin instead). * * Throws: GException on failure. */ public static Element launchFull(string pipelineDescription, ParseContext context, GstParseFlags flags) { GError* err = null; auto p = gst_parse_launch_full(Str.toStringz(pipelineDescription), (context is null) ? null : context.getParseContextStruct(), flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p); } /** * Create a new element based on command line syntax. * @error will contain an error message if an erroneous pipeline is specified. * An error does not mean that the pipeline could not be constructed. * * Params: * argv = null-terminated array of arguments * * Returns: a new element on success and %NULL on failure. * * Throws: GException on failure. */ public static Element launchv(string[] argv) { GError* err = null; auto p = gst_parse_launchv(Str.toStringzArray(argv), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p); } /** * Create a new element based on command line syntax. * @error will contain an error message if an erroneous pipeline is specified. * An error does not mean that the pipeline could not be constructed. * * Params: * argv = null-terminated array of arguments * context = a parse context allocated with * gst_parse_context_new(), or %NULL * flags = parsing options, or #GST_PARSE_FLAG_NONE * * Returns: a new element on success; on failure, either %NULL * or a partially-constructed bin or element will be returned and @error will * be set (unless you passed #GST_PARSE_FLAG_FATAL_ERRORS in @flags, then * %NULL will always be returned on failure) * * Throws: GException on failure. */ public static Element launchvFull(string[] argv, ParseContext context, GstParseFlags flags) { GError* err = null; auto p = gst_parse_launchv_full(Str.toStringzArray(argv), (context is null) ? null : context.getParseContextStruct(), flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Element)(cast(GstElement*) p); } } GtkD-3.7.5/generated/gstreamer/gstreamer/ParseContext.d000066400000000000000000000071271324604450400230740ustar00rootroot00000000000000/* * 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 gstreamer.ParseContext; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * Opaque structure. */ public class ParseContext { /** the main Gtk struct */ protected GstParseContext* gstParseContext; protected bool ownedRef; /** Get the main Gtk struct */ public GstParseContext* getParseContextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstParseContext; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstParseContext; } /** * Sets our main struct and passes it to the parent class. */ public this (GstParseContext* gstParseContext, bool ownedRef = false) { this.gstParseContext = gstParseContext; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_parse_context_free(gstParseContext); } /** */ public static GType getType() { return gst_parse_context_get_type(); } /** * Allocates a parse context for use with gst_parse_launch_full() or * gst_parse_launchv_full(). * * Free-function: gst_parse_context_free * * Returns: a newly-allocated parse context. Free with * gst_parse_context_free() when no longer needed. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_parse_context_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstParseContext*) p); } /** * Copies the @context. * * Returns: A copied #GstParseContext */ public ParseContext copy() { auto p = gst_parse_context_copy(gstParseContext); if(p is null) { return null; } return ObjectG.getDObject!(ParseContext)(cast(GstParseContext*) p, true); } /** * Frees a parse context previously allocated with gst_parse_context_new(). */ public void free() { gst_parse_context_free(gstParseContext); ownedRef = false; } /** * Retrieve missing elements from a previous run of gst_parse_launch_full() * or gst_parse_launchv_full(). Will only return results if an error code * of %GST_PARSE_ERROR_NO_SUCH_ELEMENT was returned. * * Returns: a * %NULL-terminated array of element factory name strings of missing * elements. Free with g_strfreev() when no longer needed. */ public string[] getMissingElements() { auto retStr = gst_parse_context_get_missing_elements(gstParseContext); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Pipeline.d000066400000000000000000000253001324604450400222130ustar00rootroot00000000000000/* * 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 gstreamer.Pipeline; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Bin; private import gstreamer.Bus; private import gstreamer.Clock; private import gstreamer.Element; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * A #GstPipeline is a special #GstBin used as the toplevel container for * the filter graph. The #GstPipeline will manage the selection and * distribution of a global #GstClock as well as provide a #GstBus to the * application. * * gst_pipeline_new() is used to create a pipeline. when you are done with * the pipeline, use gst_object_unref() to free its resources including all * added #GstElement objects (if not otherwise referenced). * * Elements are added and removed from the pipeline using the #GstBin * methods like gst_bin_add() and gst_bin_remove() (see #GstBin). * * Before changing the state of the #GstPipeline (see #GstElement) a #GstBus * can be retrieved with gst_pipeline_get_bus(). This bus can then be * used to receive #GstMessage from the elements in the pipeline. * * By default, a #GstPipeline will automatically flush the pending #GstBus * messages when going to the NULL state to ensure that no circular * references exist when no messages are read from the #GstBus. This * behaviour can be changed with gst_pipeline_set_auto_flush_bus(). * * When the #GstPipeline performs the PAUSED to PLAYING state change it will * select a clock for the elements. The clock selection algorithm will by * default select a clock provided by an element that is most upstream * (closest to the source). For live pipelines (ones that return * #GST_STATE_CHANGE_NO_PREROLL from the gst_element_set_state() call) this * will select the clock provided by the live source. For normal pipelines * this will select a clock provided by the sinks (most likely the audio * sink). If no element provides a clock, a default #GstSystemClock is used. * * The clock selection can be controlled with the gst_pipeline_use_clock() * method, which will enforce a given clock on the pipeline. With * gst_pipeline_auto_clock() the default clock selection algorithm can be * restored. * * A #GstPipeline maintains a running time for the elements. The running * time is defined as the difference between the current clock time and * the base time. When the pipeline goes to READY or a flushing seek is * performed on it, the running time is reset to 0. When the pipeline is * set from PLAYING to PAUSED, the current clock time is sampled and used to * configure the base time for the elements when the pipeline is set * to PLAYING again. The effect is that the running time (as the difference * between the clock time and the base time) will count how much time was spent * in the PLAYING state. This default behaviour can be changed with the * gst_element_set_start_time() method. */ public class Pipeline : Bin { /** the main Gtk struct */ protected GstPipeline* gstPipeline; /** Get the main Gtk struct */ public GstPipeline* getPipelineStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstPipeline; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstPipeline; } protected override void setStruct(GObject* obj) { gstPipeline = cast(GstPipeline*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstPipeline* gstPipeline, bool ownedRef = false) { this.gstPipeline = gstPipeline; super(cast(GstBin*)gstPipeline, ownedRef); } /** */ public static GType getType() { return gst_pipeline_get_type(); } /** * Create a new pipeline with the given name. * * Params: * name = name of new pipeline * * Returns: newly created GstPipeline * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name) { auto p = gst_pipeline_new(Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstPipeline*) p); } /** * Let @pipeline select a clock automatically. This is the default * behaviour. * * Use this function if you previous forced a fixed clock with * gst_pipeline_use_clock() and want to restore the default * pipeline clock selection algorithm. * * MT safe. */ public void autoClock() { gst_pipeline_auto_clock(gstPipeline); } /** * Check if @pipeline will automatically flush messages when going to * the NULL state. * * Returns: whether the pipeline will automatically flush its bus when * going from READY to NULL state or not. * * MT safe. */ public bool getAutoFlushBus() { return gst_pipeline_get_auto_flush_bus(gstPipeline) != 0; } /** * Gets the #GstBus of @pipeline. The bus allows applications to receive * #GstMessage packets. * * Returns: a #GstBus, unref after usage. * * MT safe. */ public override Bus getBus() { auto p = gst_pipeline_get_bus(gstPipeline); if(p is null) { return null; } return ObjectG.getDObject!(Bus)(cast(GstBus*) p, true); } /** * Gets the current clock used by @pipeline. Users of object * oriented languages should use gst_pipeline_get_pipeline_clock() * to avoid confusion with gst_element_get_clock() which has a different behavior. * * Unlike gst_element_get_clock(), this function will always return a * clock, even if the pipeline is not in the PLAYING state. * * Returns: a #GstClock, unref after usage. */ public override Clock getClock() { auto p = gst_pipeline_get_clock(gstPipeline); if(p is null) { return null; } return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); } /** * Get the configured delay (see gst_pipeline_set_delay()). * * Returns: The configured delay. * * MT safe. */ public GstClockTime getDelay() { return gst_pipeline_get_delay(gstPipeline); } /** * Gets the latency that should be configured on the pipeline. See * gst_pipeline_set_latency(). * * Returns: Latency to configure on the pipeline or GST_CLOCK_TIME_NONE * * Since: 1.6 */ public GstClockTime getLatency() { return gst_pipeline_get_latency(gstPipeline); } /** * Gets the current clock used by @pipeline. * * Unlike gst_element_get_clock(), this function will always return a * clock, even if the pipeline is not in the PLAYING state. * * Returns: a #GstClock, unref after usage. * * Since: 1.6 */ public Clock getPipelineClock() { auto p = gst_pipeline_get_pipeline_clock(gstPipeline); if(p is null) { return null; } return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); } /** * Usually, when a pipeline goes from READY to NULL state, it automatically * flushes all pending messages on the bus, which is done for refcounting * purposes, to break circular references. * * This means that applications that update state using (async) bus messages * (e.g. do certain things when a pipeline goes from PAUSED to READY) might * not get to see messages when the pipeline is shut down, because they might * be flushed before they can be dispatched in the main thread. This behaviour * can be disabled using this function. * * It is important that all messages on the bus are handled when the * automatic flushing is disabled else memory leaks will be introduced. * * MT safe. * * Params: * autoFlush = whether or not to automatically flush the bus when * the pipeline goes from READY to NULL state */ public void setAutoFlushBus(bool autoFlush) { gst_pipeline_set_auto_flush_bus(gstPipeline, autoFlush); } /** * Set the clock for @pipeline. The clock will be distributed * to all the elements managed by the pipeline. * * Params: * clock = the clock to set * * Returns: %TRUE if the clock could be set on the pipeline. %FALSE if * some element did not accept the clock. * * MT safe. */ public override bool setClock(Clock clock) { return gst_pipeline_set_clock(gstPipeline, (clock is null) ? null : clock.getClockStruct()) != 0; } /** * Set the expected delay needed for all elements to perform the * PAUSED to PLAYING state change. @delay will be added to the * base time of the elements so that they wait an additional @delay * amount of time before starting to process buffers and cannot be * #GST_CLOCK_TIME_NONE. * * This option is used for tuning purposes and should normally not be * used. * * MT safe. * * Params: * delay = the delay */ public void setDelay(GstClockTime delay) { gst_pipeline_set_delay(gstPipeline, delay); } /** * Sets the latency that should be configured on the pipeline. Setting * GST_CLOCK_TIME_NONE will restore the default behaviour of using the minimum * latency from the LATENCY query. Setting this is usually not required and * the pipeline will figure out an appropriate latency automatically. * * Setting a too low latency, especially lower than the minimum latency from * the LATENCY query, will most likely cause the pipeline to fail. * * Params: * latency = latency to configure * * Since: 1.6 */ public void setLatency(GstClockTime latency) { gst_pipeline_set_latency(gstPipeline, latency); } /** * Force @pipeline to use the given @clock. The pipeline will * always use the given clock even if new clock providers are added * to this pipeline. * * If @clock is %NULL all clocking will be disabled which will make * the pipeline run as fast as possible. * * MT safe. * * Params: * clock = the clock to use */ public void useClock(Clock clock) { gst_pipeline_use_clock(gstPipeline, (clock is null) ? null : clock.getClockStruct()); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Plugin.d000066400000000000000000000371501324604450400217120ustar00rootroot00000000000000/* * 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 gstreamer.Plugin; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.ObjectGst; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * GStreamer is extensible, so #GstElement instances can be loaded at runtime. * A plugin system can provide one or more of the basic * GStreamer #GstPluginFeature subclasses. * * A plugin should export a symbol gst_plugin_desc that is a * struct of type #GstPluginDesc. * the plugin loader will check the version of the core library the plugin was * linked against and will create a new #GstPlugin. It will then call the * #GstPluginInitFunc function that was provided in the * gst_plugin_desc. * * Once you have a handle to a #GstPlugin (e.g. from the #GstRegistry), you * can add any object that subclasses #GstPluginFeature. * * Usually plugins are always automatically loaded so you don't need to call * gst_plugin_load() explicitly to bring it into memory. There are options to * statically link plugins to an app or even use GStreamer without a plugin * repository in which case gst_plugin_load() can be needed to bring the plugin * into memory. */ public class Plugin : ObjectGst { /** the main Gtk struct */ protected GstPlugin* gstPlugin; /** Get the main Gtk struct */ public GstPlugin* getPluginStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstPlugin; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstPlugin; } protected override void setStruct(GObject* obj) { gstPlugin = cast(GstPlugin*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstPlugin* gstPlugin, bool ownedRef = false) { this.gstPlugin = gstPlugin; super(cast(GstObject*)gstPlugin, ownedRef); } /** */ public static GType getType() { return gst_plugin_get_type(); } /** * Unrefs each member of @list, then frees the list. * * Params: * list = list of #GstPlugin */ public static void listFree(ListG list) { gst_plugin_list_free((list is null) ? null : list.getListGStruct()); } /** * Load the named plugin. Refs the plugin. * * Params: * name = name of plugin to load * * Returns: a reference to a loaded plugin, or %NULL on error. */ public static Plugin loadByName(string name) { auto p = gst_plugin_load_by_name(Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); } /** * Loads the given plugin and refs it. Caller needs to unref after use. * * Params: * filename = the plugin filename to load * * Returns: a reference to the existing loaded GstPlugin, a * reference to the newly-loaded GstPlugin, or %NULL if an error occurred. * * Throws: GException on failure. */ public static Plugin loadFile(string filename) { GError* err = null; auto p = gst_plugin_load_file(Str.toStringz(filename), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); } /** * Registers a static plugin, ie. a plugin which is private to an application * or library and contained within the application or library (as opposed to * being shipped as a separate module file). * * You must make sure that GStreamer has been initialised (with gst_init() or * via gst_init_get_option_group()) before calling this function. * * Params: * majorVersion = the major version number of the GStreamer core that the * plugin was compiled for, you can just use GST_VERSION_MAJOR here * minorVersion = the minor version number of the GStreamer core that the * plugin was compiled for, you can just use GST_VERSION_MINOR here * name = a unique name of the plugin (ideally prefixed with an application- or * library-specific namespace prefix in order to avoid name conflicts in * case a similar plugin with the same name ever gets added to GStreamer) * description = description of the plugin * initFunc = pointer to the init function of this plugin. * versio = version string of the plugin * license = effective license of plugin. Must be one of the approved licenses * (see #GstPluginDesc above) or the plugin will not be registered. * source = source module plugin belongs to * p = shipped package plugin belongs to * origin = URL to provider of plugin * * Returns: %TRUE if the plugin was registered correctly, otherwise %FALSE. */ public static bool registerStatic(int majorVersion, int minorVersion, string name, string description, GstPluginInitFunc initFunc, string versio, string license, string source, string p, string origin) { return gst_plugin_register_static(majorVersion, minorVersion, Str.toStringz(name), Str.toStringz(description), initFunc, Str.toStringz(versio), Str.toStringz(license), Str.toStringz(source), Str.toStringz(p), Str.toStringz(origin)) != 0; } /** * Registers a static plugin, ie. a plugin which is private to an application * or library and contained within the application or library (as opposed to * being shipped as a separate module file) with a #GstPluginInitFullFunc * which allows user data to be passed to the callback function (useful * for bindings). * * You must make sure that GStreamer has been initialised (with gst_init() or * via gst_init_get_option_group()) before calling this function. * * Params: * majorVersion = the major version number of the GStreamer core that the * plugin was compiled for, you can just use GST_VERSION_MAJOR here * minorVersion = the minor version number of the GStreamer core that the * plugin was compiled for, you can just use GST_VERSION_MINOR here * name = a unique name of the plugin (ideally prefixed with an application- or * library-specific namespace prefix in order to avoid name conflicts in * case a similar plugin with the same name ever gets added to GStreamer) * description = description of the plugin * initFullFunc = pointer to the init function with user data * of this plugin. * versio = version string of the plugin * license = effective license of plugin. Must be one of the approved licenses * (see #GstPluginDesc above) or the plugin will not be registered. * source = source module plugin belongs to * p = shipped package plugin belongs to * origin = URL to provider of plugin * userData = gpointer to user data * * Returns: %TRUE if the plugin was registered correctly, otherwise %FALSE. */ public static bool registerStaticFull(int majorVersion, int minorVersion, string name, string description, GstPluginInitFullFunc initFullFunc, string versio, string license, string source, string p, string origin, void* userData) { return gst_plugin_register_static_full(majorVersion, minorVersion, Str.toStringz(name), Str.toStringz(description), initFullFunc, Str.toStringz(versio), Str.toStringz(license), Str.toStringz(source), Str.toStringz(p), Str.toStringz(origin), userData) != 0; } /** * Make GStreamer aware of external dependencies which affect the feature * set of this plugin (ie. the elements or typefinders associated with it). * * GStreamer will re-inspect plugins with external dependencies whenever any * of the external dependencies change. This is useful for plugins which wrap * other plugin systems, e.g. a plugin which wraps a plugin-based visualisation * library and makes visualisations available as GStreamer elements, or a * codec loader which exposes elements and/or caps dependent on what external * codec libraries are currently installed. * * Params: * envVars = %NULL-terminated array of environment variables affecting the * feature set of the plugin (e.g. an environment variable containing * paths where to look for additional modules/plugins of a library), * or %NULL. Environment variable names may be followed by a path component * which will be added to the content of the environment variable, e.g. * "HOME/.mystuff/plugins". * paths = %NULL-terminated array of directories/paths where dependent files * may be, or %NULL. * names = %NULL-terminated array of file names (or file name suffixes, * depending on @flags) to be used in combination with the paths from * @paths and/or the paths extracted from the environment variables in * @env_vars, or %NULL. * flags = optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE */ public void addDependency(string[] envVars, string[] paths, string[] names, GstPluginDependencyFlags flags) { gst_plugin_add_dependency(gstPlugin, Str.toStringzArray(envVars), Str.toStringzArray(paths), Str.toStringzArray(names), flags); } /** * Make GStreamer aware of external dependencies which affect the feature * set of this plugin (ie. the elements or typefinders associated with it). * * GStreamer will re-inspect plugins with external dependencies whenever any * of the external dependencies change. This is useful for plugins which wrap * other plugin systems, e.g. a plugin which wraps a plugin-based visualisation * library and makes visualisations available as GStreamer elements, or a * codec loader which exposes elements and/or caps dependent on what external * codec libraries are currently installed. * * Convenience wrapper function for gst_plugin_add_dependency() which * takes simple strings as arguments instead of string arrays, with multiple * arguments separated by predefined delimiters (see above). * * Params: * envVars = one or more environment variables (separated by ':', ';' or ','), * or %NULL. Environment variable names may be followed by a path component * which will be added to the content of the environment variable, e.g. * "HOME/.mystuff/plugins:MYSTUFF_PLUGINS_PATH" * paths = one ore more directory paths (separated by ':' or ';' or ','), * or %NULL. Example: "/usr/lib/mystuff/plugins" * names = one or more file names or file name suffixes (separated by commas), * or %NULL * flags = optional flags, or #GST_PLUGIN_DEPENDENCY_FLAG_NONE */ public void addDependencySimple(string envVars, string paths, string names, GstPluginDependencyFlags flags) { gst_plugin_add_dependency_simple(gstPlugin, Str.toStringz(envVars), Str.toStringz(paths), Str.toStringz(names), flags); } /** * Gets the plugin specific data cache. If it is %NULL there is no cached data * stored. This is the case when the registry is getting rebuilt. * * Returns: The cached data as a * #GstStructure or %NULL. */ public Structure getCacheData() { auto p = gst_plugin_get_cache_data(gstPlugin); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Get the long descriptive name of the plugin * * Returns: the long name of the plugin */ public string getDescription() { return Str.toString(gst_plugin_get_description(gstPlugin)); } /** * get the filename of the plugin * * Returns: the filename of the plugin */ public string getFilename() { return Str.toString(gst_plugin_get_filename(gstPlugin)); } /** * get the license of the plugin * * Returns: the license of the plugin */ public string getLicense() { return Str.toString(gst_plugin_get_license(gstPlugin)); } /** * Get the short name of the plugin * * Returns: the name of the plugin */ public override string getName() { return Str.toString(gst_plugin_get_name(gstPlugin)); } /** * get the URL where the plugin comes from * * Returns: the origin of the plugin */ public string getOrigin() { return Str.toString(gst_plugin_get_origin(gstPlugin)); } /** * get the package the plugin belongs to. * * Returns: the package of the plugin */ public string getPackage() { return Str.toString(gst_plugin_get_package(gstPlugin)); } /** * Get the release date (and possibly time) in form of a string, if available. * * For normal GStreamer plugin releases this will usually just be a date in * the form of "YYYY-MM-DD", while pre-releases and builds from git may contain * a time component after the date as well, in which case the string will be * formatted like "YYYY-MM-DDTHH:MMZ" (e.g. "2012-04-30T09:30Z"). * * There may be plugins that do not have a valid release date set on them. * * Returns: the date string of the plugin, or %NULL if not * available. */ public string getReleaseDateString() { return Str.toString(gst_plugin_get_release_date_string(gstPlugin)); } /** * get the source module the plugin belongs to. * * Returns: the source of the plugin */ public string getSource() { return Str.toString(gst_plugin_get_source(gstPlugin)); } /** * get the version of the plugin * * Returns: the version of the plugin */ public string getVersion() { return Str.toString(gst_plugin_get_version(gstPlugin)); } /** * queries if the plugin is loaded into memory * * Returns: %TRUE is loaded, %FALSE otherwise */ public bool isLoaded() { return gst_plugin_is_loaded(gstPlugin) != 0; } /** * Loads @plugin. Note that the *return value* is the loaded plugin; @plugin is * untouched. The normal use pattern of this function goes like this: * * |[ * GstPlugin *loaded_plugin; * loaded_plugin = gst_plugin_load (plugin); * // presumably, we're no longer interested in the potentially-unloaded plugin * gst_object_unref (plugin); * plugin = loaded_plugin; * ]| * * Returns: a reference to a loaded plugin, or %NULL on error. */ public Plugin load() { auto p = gst_plugin_load(gstPlugin); if(p is null) { return null; } return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); } /** * Adds plugin specific data to cache. Passes the ownership of the structure to * the @plugin. * * The cache is flushed every time the registry is rebuilt. * * Params: * cacheData = a structure containing the data to cache */ public void setCacheData(Structure cacheData) { gst_plugin_set_cache_data(gstPlugin, (cacheData is null) ? null : cacheData.getStructureStruct(true)); } /** * Get the error quark. * * Returns: The error quark used in GError messages */ public static GQuark pluginErrorQuark() { return gst_plugin_error_quark(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/PluginFeature.d000066400000000000000000000144261324604450400232270ustar00rootroot00000000000000/* * 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 gstreamer.PluginFeature; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.ObjectGst; private import gstreamer.Plugin; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * This is a base class for anything that can be added to a #GstPlugin. */ public class PluginFeature : ObjectGst { /** the main Gtk struct */ protected GstPluginFeature* gstPluginFeature; /** Get the main Gtk struct */ public GstPluginFeature* getPluginFeatureStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstPluginFeature; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstPluginFeature; } protected override void setStruct(GObject* obj) { gstPluginFeature = cast(GstPluginFeature*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstPluginFeature* gstPluginFeature, bool ownedRef = false) { this.gstPluginFeature = gstPluginFeature; super(cast(GstObject*)gstPluginFeature, ownedRef); } /** */ public static GType getType() { return gst_plugin_feature_get_type(); } /** * Copies the list of features. Caller should call @gst_plugin_feature_list_free * when done with the list. * * Params: * list = list * of #GstPluginFeature * * Returns: a copy of @list, * with each feature's reference count incremented. */ public static ListG listCopy(ListG list) { auto p = gst_plugin_feature_list_copy((list is null) ? null : list.getListGStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Debug the plugin feature names in @list. * * Params: * list = a #GList of * plugin features */ public static void listDebug(ListG list) { gst_plugin_feature_list_debug((list is null) ? null : list.getListGStruct()); } /** * Unrefs each member of @list, then frees the list. * * Params: * list = list * of #GstPluginFeature */ public static void listFree(ListG list) { gst_plugin_feature_list_free((list is null) ? null : list.getListGStruct()); } /** * Compares the two given #GstPluginFeature instances. This function can be * used as a #GCompareFunc when sorting by rank and then by name. * * Params: * p1 = a #GstPluginFeature * p2 = a #GstPluginFeature * * Returns: negative value if the rank of p1 > the rank of p2 or the ranks are * equal but the name of p1 comes before the name of p2; zero if the rank * and names are equal; positive value if the rank of p1 < the rank of p2 or the * ranks are equal but the name of p2 comes before the name of p1 */ public static int rankCompareFunc(void* p1, void* p2) { return gst_plugin_feature_rank_compare_func(p1, p2); } /** * Checks whether the given plugin feature is at least * the required version * * Params: * minMajor = minimum required major version * minMinor = minimum required minor version * minMicro = minimum required micro version * * Returns: %TRUE if the plugin feature has at least * the required version, otherwise %FALSE. */ public bool checkVersion(uint minMajor, uint minMinor, uint minMicro) { return gst_plugin_feature_check_version(gstPluginFeature, minMajor, minMinor, minMicro) != 0; } /** * Get the plugin that provides this feature. * * Returns: the plugin that provides this * feature, or %NULL. Unref with gst_object_unref() when no * longer needed. */ public Plugin getPlugin() { auto p = gst_plugin_feature_get_plugin(gstPluginFeature); if(p is null) { return null; } return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); } /** * Get the name of the plugin that provides this feature. * * Returns: the name of the plugin that provides this * feature, or %NULL if the feature is not associated with a * plugin. * * Since: 1.2 */ public string getPluginName() { return Str.toString(gst_plugin_feature_get_plugin_name(gstPluginFeature)); } /** * Gets the rank of a plugin feature. * * Returns: The rank of the feature */ public uint getRank() { return gst_plugin_feature_get_rank(gstPluginFeature); } /** * Loads the plugin containing @feature if it's not already loaded. @feature is * unaffected; use the return value instead. * * Normally this function is used like this: * |[ * GstPluginFeature *loaded_feature; * * loaded_feature = gst_plugin_feature_load (feature); * // presumably, we're no longer interested in the potentially-unloaded feature * gst_object_unref (feature); * feature = loaded_feature; * ]| * * Returns: a reference to the loaded * feature, or %NULL on error */ public PluginFeature load() { auto p = gst_plugin_feature_load(gstPluginFeature); if(p is null) { return null; } return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) p, true); } /** * Specifies a rank for a plugin feature, so that autoplugging uses * the most appropriate feature. * * Params: * rank = rank value - higher number means more priority rank */ public void setRank(uint rank) { gst_plugin_feature_set_rank(gstPluginFeature, rank); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Poll.d000066400000000000000000000270311324604450400213570ustar00rootroot00000000000000/* * 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 gstreamer.Poll; private import glib.ConstructionException; private import gobject.ObjectG; private import gstreamer.PollFD; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * A #GstPoll keeps track of file descriptors much like fd_set (used with * select()) or a struct pollfd array (used with poll()). Once created with * gst_poll_new(), the set can be used to wait for file descriptors to be * readable and/or writable. It is possible to make this wait be controlled * by specifying %TRUE for the @controllable flag when creating the set (or * later calling gst_poll_set_controllable()). * * New file descriptors are added to the set using gst_poll_add_fd(), and * removed using gst_poll_remove_fd(). Controlling which file descriptors * should be waited for to become readable and/or writable are done using * gst_poll_fd_ctl_read() and gst_poll_fd_ctl_write(). * * Use gst_poll_wait() to wait for the file descriptors to actually become * readable and/or writable, or to timeout if no file descriptor is available * in time. The wait can be controlled by calling gst_poll_restart() and * gst_poll_set_flushing(). * * Once the file descriptor set has been waited for, one can use * gst_poll_fd_has_closed() to see if the file descriptor has been closed, * gst_poll_fd_has_error() to see if it has generated an error, * gst_poll_fd_can_read() to see if it is possible to read from the file * descriptor, and gst_poll_fd_can_write() to see if it is possible to * write to it. */ public class Poll { /** the main Gtk struct */ protected GstPoll* gstPoll; protected bool ownedRef; /** Get the main Gtk struct */ public GstPoll* getPollStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstPoll; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstPoll; } /** * Sets our main struct and passes it to the parent class. */ public this (GstPoll* gstPoll, bool ownedRef = false) { this.gstPoll = gstPoll; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_poll_free(gstPoll); } /** * Add a file descriptor to the file descriptor set. * * Params: * fd = a file descriptor. * * Returns: %TRUE if the file descriptor was successfully added to the set. */ public bool addFd(PollFD fd) { return gst_poll_add_fd(gstPoll, (fd is null) ? null : fd.getPollFDStruct()) != 0; } /** * Check if @fd in @set has data to be read. * * Params: * fd = a file descriptor. * * Returns: %TRUE if the descriptor has data to be read. */ public bool fdCanRead(PollFD fd) { return gst_poll_fd_can_read(gstPoll, (fd is null) ? null : fd.getPollFDStruct()) != 0; } /** * Check if @fd in @set can be used for writing. * * Params: * fd = a file descriptor. * * Returns: %TRUE if the descriptor can be used for writing. */ public bool fdCanWrite(PollFD fd) { return gst_poll_fd_can_write(gstPoll, (fd is null) ? null : fd.getPollFDStruct()) != 0; } /** * Control whether the descriptor @fd in @set will be monitored for * readability. * * Params: * fd = a file descriptor. * active = a new status. * * Returns: %TRUE if the descriptor was successfully updated. */ public bool fdCtlRead(PollFD fd, bool active) { return gst_poll_fd_ctl_read(gstPoll, (fd is null) ? null : fd.getPollFDStruct(), active) != 0; } /** * Control whether the descriptor @fd in @set will be monitored for * writability. * * Params: * fd = a file descriptor. * active = a new status. * * Returns: %TRUE if the descriptor was successfully updated. */ public bool fdCtlWrite(PollFD fd, bool active) { return gst_poll_fd_ctl_write(gstPoll, (fd is null) ? null : fd.getPollFDStruct(), active) != 0; } /** * Check if @fd in @set has closed the connection. * * Params: * fd = a file descriptor. * * Returns: %TRUE if the connection was closed. */ public bool fdHasClosed(PollFD fd) { return gst_poll_fd_has_closed(gstPoll, (fd is null) ? null : fd.getPollFDStruct()) != 0; } /** * Check if @fd in @set has an error. * * Params: * fd = a file descriptor. * * Returns: %TRUE if the descriptor has an error. */ public bool fdHasError(PollFD fd) { return gst_poll_fd_has_error(gstPoll, (fd is null) ? null : fd.getPollFDStruct()) != 0; } /** * Mark @fd as ignored so that the next call to gst_poll_wait() will yield * the same result for @fd as last time. This function must be called if no * operation (read/write/recv/send/etc.) will be performed on @fd before * the next call to gst_poll_wait(). * * The reason why this is needed is because the underlying implementation * might not allow querying the fd more than once between calls to one of * the re-enabling operations. * * Params: * fd = a file descriptor. */ public void fdIgnored(PollFD fd) { gst_poll_fd_ignored(gstPoll, (fd is null) ? null : fd.getPollFDStruct()); } /** * Free a file descriptor set. */ public void free() { gst_poll_free(gstPoll); ownedRef = false; } /** * Get a GPollFD for the reading part of the control socket. This is useful when * integrating with a GSource and GMainLoop. * * Params: * fd = a #GPollFD */ public void getReadGpollfd(GPollFD* fd) { gst_poll_get_read_gpollfd(gstPoll, fd); } /** * Read a byte from the control socket of the controllable @set. * * This function only works for timer #GstPoll objects created with * gst_poll_new_timer(). * * Returns: %TRUE on success. %FALSE when when there was no byte to read or * reading the byte failed. If there was no byte to read, and only then, errno * will contain EWOULDBLOCK or EAGAIN. For all other values of errno this always signals a * critical error. */ public bool readControl() { return gst_poll_read_control(gstPoll) != 0; } /** * Remove a file descriptor from the file descriptor set. * * Params: * fd = a file descriptor. * * Returns: %TRUE if the file descriptor was successfully removed from the set. */ public bool removeFd(PollFD fd) { return gst_poll_remove_fd(gstPoll, (fd is null) ? null : fd.getPollFDStruct()) != 0; } /** * Restart any gst_poll_wait() that is in progress. This function is typically * used after adding or removing descriptors to @set. * * If @set is not controllable, then this call will have no effect. * * This function only works for non-timer #GstPoll objects created with * gst_poll_new(). */ public void restart() { gst_poll_restart(gstPoll); } /** * When @controllable is %TRUE, this function ensures that future calls to * gst_poll_wait() will be affected by gst_poll_restart() and * gst_poll_set_flushing(). * * This function only works for non-timer #GstPoll objects created with * gst_poll_new(). * * Params: * controllable = new controllable state. * * Returns: %TRUE if the controllability of @set could be updated. */ public bool setControllable(bool controllable) { return gst_poll_set_controllable(gstPoll, controllable) != 0; } /** * When @flushing is %TRUE, this function ensures that current and future calls * to gst_poll_wait() will return -1, with errno set to EBUSY. * * Unsetting the flushing state will restore normal operation of @set. * * This function only works for non-timer #GstPoll objects created with * gst_poll_new(). * * Params: * flushing = new flushing state. */ public void setFlushing(bool flushing) { gst_poll_set_flushing(gstPoll, flushing); } /** * Wait for activity on the file descriptors in @set. This function waits up to * the specified @timeout. A timeout of #GST_CLOCK_TIME_NONE waits forever. * * For #GstPoll objects created with gst_poll_new(), this function can only be * called from a single thread at a time. If called from multiple threads, * -1 will be returned with errno set to EPERM. * * This is not true for timer #GstPoll objects created with * gst_poll_new_timer(), where it is allowed to have multiple threads waiting * simultaneously. * * Params: * timeout = a timeout in nanoseconds. * * Returns: The number of #GstPollFD in @set that have activity or 0 when no * activity was detected after @timeout. If an error occurs, -1 is returned * and errno is set. */ public int wait(GstClockTime timeout) { return gst_poll_wait(gstPoll, timeout); } /** * Write a byte to the control socket of the controllable @set. * This function is mostly useful for timer #GstPoll objects created with * gst_poll_new_timer(). * * It will make any current and future gst_poll_wait() function return with * 1, meaning the control socket is set. After an equal amount of calls to * gst_poll_read_control() have been performed, calls to gst_poll_wait() will * block again until their timeout expired. * * This function only works for timer #GstPoll objects created with * gst_poll_new_timer(). * * Returns: %TRUE on success. %FALSE when when the byte could not be written. * errno contains the detailed error code but will never be EAGAIN, EINTR or * EWOULDBLOCK. %FALSE always signals a critical error. */ public bool writeControl() { return gst_poll_write_control(gstPoll) != 0; } /** * Create a new file descriptor set. If @controllable, it * is possible to restart or flush a call to gst_poll_wait() with * gst_poll_restart() and gst_poll_set_flushing() respectively. * * Free-function: gst_poll_free * * Params: * controllable = whether it should be possible to control a wait. * * Returns: a new #GstPoll, or %NULL in * case of an error. Free with gst_poll_free(). * * Throws: ConstructionException GTK+ fails to create the object. */ public this(bool controllable) { auto p = gst_poll_new(controllable); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstPoll*) p); } /** * Create a new poll object that can be used for scheduling cancellable * timeouts. * * A timeout is performed with gst_poll_wait(). Multiple timeouts can be * performed from different threads. * * Free-function: gst_poll_free * * Returns: a new #GstPoll, or %NULL in * case of an error. Free with gst_poll_free(). * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_poll_new_timer(); if(p is null) { throw new ConstructionException("null returned by new_timer"); } this(cast(GstPoll*) p); } } GtkD-3.7.5/generated/gstreamer/gstreamer/PollFD.d000066400000000000000000000035261324604450400215740ustar00rootroot00000000000000/* * 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 gstreamer.PollFD; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * A file descriptor object. */ public class PollFD { /** the main Gtk struct */ protected GstPollFD* gstPollFD; protected bool ownedRef; /** Get the main Gtk struct */ public GstPollFD* getPollFDStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstPollFD; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstPollFD; } /** * Sets our main struct and passes it to the parent class. */ public this (GstPollFD* gstPollFD, bool ownedRef = false) { this.gstPollFD = gstPollFD; this.ownedRef = ownedRef; } /** * Initializes @fd. Alternatively you can initialize it with * #GST_POLL_FD_INIT. */ public void init() { gst_poll_fd_init(gstPollFD); } } GtkD-3.7.5/generated/gstreamer/gstreamer/PresetIF.d000066400000000000000000000141531324604450400221330ustar00rootroot00000000000000/* * 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 gstreamer.PresetIF; private import glib.Str; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * This interface offers methods to query and manipulate parameter preset sets. * A preset is a bunch of property settings, together with meta data and a name. * The name of a preset serves as key for subsequent method calls to manipulate * single presets. * All instances of one type will share the list of presets. The list is created * on demand, if presets are not used, the list is not created. * * The interface comes with a default implementation that serves most plugins. * Wrapper plugins will override most methods to implement support for the * native preset format of those wrapped plugins. * One method that is useful to be overridden is gst_preset_get_property_names(). * With that one can control which properties are saved and in which order. * When implementing support for read-only presets, one should set the vmethods * for gst_preset_save_preset() and gst_preset_delete_preset() to %NULL. * Applications can use gst_preset_is_editable() to check for that. * * The default implementation supports presets located in a system directory, * application specific directory and in the users home directory. When getting * a list of presets individual presets are read and overlaid in 1) system, * 2) application and 3) user order. Whenever an earlier entry is newer, the * later entries will be updated. Since 1.8 you can also provide extra paths * where to find presets through the GST_PRESET_PATH environment variable. * Presets found in those paths will be concidered as "app presets". */ public interface PresetIF{ /** Get the main Gtk struct */ public GstPreset* getPresetStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gst_preset_get_type(); } /** * Gets the directory for application specific presets if set by the * application. * * Returns: the directory or %NULL, don't free or modify * the string */ public static string getAppDir() { return Str.toString(gst_preset_get_app_dir()); } /** * Sets an extra directory as an absolute path that should be considered when * looking for presets. Any presets in the application dir will shadow the * system presets. * * Params: * appDir = the application specific preset dir * * Returns: %TRUE for success, %FALSE if the dir already has been set */ public static bool setAppDir(string appDir) { return gst_preset_set_app_dir(Str.toStringz(appDir)) != 0; } /** * Delete the given preset. * * Params: * name = preset name to remove * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name */ public bool deletePreset(string name); /** * Gets the @value for an existing meta data @tag. Meta data @tag names can be * something like e.g. "comment". Returned values need to be released when done. * * Params: * name = preset name * tag = meta data item name * value = value * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name * or no value for the given @tag */ public bool getMeta(string name, string tag, out string value); /** * Get a copy of preset names as a %NULL terminated string array. * * Returns: list with names, use g_strfreev() after usage. */ public string[] getPresetNames(); /** * Get a the names of the GObject properties that can be used for presets. * * Returns: an * array of property names which should be freed with g_strfreev() after use. */ public string[] getPropertyNames(); /** * Check if one can add new presets, change existing ones and remove presets. * * Returns: %TRUE if presets are editable or %FALSE if they are static * * Since: 1.6 */ public bool isEditable(); /** * Load the given preset. * * Params: * name = preset name to load * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name */ public bool loadPreset(string name); /** * Renames a preset. If there is already a preset by the @new_name it will be * overwritten. * * Params: * oldName = current preset name * newName = new preset name * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with @old_name */ public bool renamePreset(string oldName, string newName); /** * Save the current object settings as a preset under the given name. If there * is already a preset by this @name it will be overwritten. * * Params: * name = preset name to save * * Returns: %TRUE for success, %FALSE */ public bool savePreset(string name); /** * Sets a new @value for an existing meta data item or adds a new item. Meta * data @tag names can be something like e.g. "comment". Supplying %NULL for the * @value will unset an existing value. * * Params: * name = preset name * tag = meta data item name * value = new value * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name */ public bool setMeta(string name, string tag, string value); } GtkD-3.7.5/generated/gstreamer/gstreamer/PresetT.d000066400000000000000000000145731324604450400220460ustar00rootroot00000000000000/* * 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 gstreamer.PresetT; public import glib.Str; public import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * This interface offers methods to query and manipulate parameter preset sets. * A preset is a bunch of property settings, together with meta data and a name. * The name of a preset serves as key for subsequent method calls to manipulate * single presets. * All instances of one type will share the list of presets. The list is created * on demand, if presets are not used, the list is not created. * * The interface comes with a default implementation that serves most plugins. * Wrapper plugins will override most methods to implement support for the * native preset format of those wrapped plugins. * One method that is useful to be overridden is gst_preset_get_property_names(). * With that one can control which properties are saved and in which order. * When implementing support for read-only presets, one should set the vmethods * for gst_preset_save_preset() and gst_preset_delete_preset() to %NULL. * Applications can use gst_preset_is_editable() to check for that. * * The default implementation supports presets located in a system directory, * application specific directory and in the users home directory. When getting * a list of presets individual presets are read and overlaid in 1) system, * 2) application and 3) user order. Whenever an earlier entry is newer, the * later entries will be updated. Since 1.8 you can also provide extra paths * where to find presets through the GST_PRESET_PATH environment variable. * Presets found in those paths will be concidered as "app presets". */ public template PresetT(TStruct) { /** Get the main Gtk struct */ public GstPreset* getPresetStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GstPreset*)getStruct(); } /** * Delete the given preset. * * Params: * name = preset name to remove * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name */ public bool deletePreset(string name) { return gst_preset_delete_preset(getPresetStruct(), Str.toStringz(name)) != 0; } /** * Gets the @value for an existing meta data @tag. Meta data @tag names can be * something like e.g. "comment". Returned values need to be released when done. * * Params: * name = preset name * tag = meta data item name * value = value * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name * or no value for the given @tag */ public bool getMeta(string name, string tag, out string value) { char* outvalue = null; auto p = gst_preset_get_meta(getPresetStruct(), Str.toStringz(name), Str.toStringz(tag), &outvalue) != 0; value = Str.toString(outvalue); return p; } /** * Get a copy of preset names as a %NULL terminated string array. * * Returns: list with names, use g_strfreev() after usage. */ public string[] getPresetNames() { auto retStr = gst_preset_get_preset_names(getPresetStruct()); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Get a the names of the GObject properties that can be used for presets. * * Returns: an * array of property names which should be freed with g_strfreev() after use. */ public string[] getPropertyNames() { auto retStr = gst_preset_get_property_names(getPresetStruct()); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Check if one can add new presets, change existing ones and remove presets. * * Returns: %TRUE if presets are editable or %FALSE if they are static * * Since: 1.6 */ public bool isEditable() { return gst_preset_is_editable(getPresetStruct()) != 0; } /** * Load the given preset. * * Params: * name = preset name to load * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name */ public bool loadPreset(string name) { return gst_preset_load_preset(getPresetStruct(), Str.toStringz(name)) != 0; } /** * Renames a preset. If there is already a preset by the @new_name it will be * overwritten. * * Params: * oldName = current preset name * newName = new preset name * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with @old_name */ public bool renamePreset(string oldName, string newName) { return gst_preset_rename_preset(getPresetStruct(), Str.toStringz(oldName), Str.toStringz(newName)) != 0; } /** * Save the current object settings as a preset under the given name. If there * is already a preset by this @name it will be overwritten. * * Params: * name = preset name to save * * Returns: %TRUE for success, %FALSE */ public bool savePreset(string name) { return gst_preset_save_preset(getPresetStruct(), Str.toStringz(name)) != 0; } /** * Sets a new @value for an existing meta data item or adds a new item. Meta * data @tag names can be something like e.g. "comment". Supplying %NULL for the * @value will unset an existing value. * * Params: * name = preset name * tag = meta data item name * value = new value * * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name */ public bool setMeta(string name, string tag, string value) { return gst_preset_set_meta(getPresetStruct(), Str.toStringz(name), Str.toStringz(tag), Str.toStringz(value)) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/ProtectionMeta.d000066400000000000000000000057031324604450400234100ustar00rootroot00000000000000/* * 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 gstreamer.ProtectionMeta; private import glib.Str; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Metadata type that holds information about a sample from a protection-protected * track, including the information needed to decrypt it (if it is encrypted). * * Since: 1.6 */ public class ProtectionMeta { /** the main Gtk struct */ protected GstProtectionMeta* gstProtectionMeta; protected bool ownedRef; /** Get the main Gtk struct */ public GstProtectionMeta* getProtectionMetaStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstProtectionMeta; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstProtectionMeta; } /** * Sets our main struct and passes it to the parent class. */ public this (GstProtectionMeta* gstProtectionMeta, bool ownedRef = false) { this.gstProtectionMeta = gstProtectionMeta; this.ownedRef = ownedRef; } /** */ public static GstMetaInfo* getInfo() { return gst_protection_meta_get_info(); } /** */ public static GType getType() { return gst_protection_meta_api_get_type(); } /** * Iterates the supplied list of UUIDs and checks the GstRegistry for * an element that supports one of the supplied UUIDs. If more than one * element matches, the system ID of the highest ranked element is selected. * * Params: * systemIdentifiers = A null terminated array of strings * that contains the UUID values of each protection system that is to be * checked. * * Returns: One of the strings from @system_identifiers that * indicates the highest ranked element that implements the protection system * indicated by that system ID, or %NULL if no element has been found. * * Since: 1.6 */ public static string protectionSelectSystem(string[] systemIdentifiers) { return Str.toString(gst_protection_select_system(Str.toStringzArray(systemIdentifiers))); } } GtkD-3.7.5/generated/gstreamer/gstreamer/ProxyPad.d000066400000000000000000000123231324604450400222150ustar00rootroot00000000000000/* * 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 gstreamer.ProxyPad; private import gobject.ObjectG; private import gstreamer.Buffer; private import gstreamer.BufferList; private import gstreamer.Iterator; private import gstreamer.ObjectGst; private import gstreamer.Pad; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class ProxyPad : Pad { /** the main Gtk struct */ protected GstProxyPad* gstProxyPad; /** Get the main Gtk struct */ public GstProxyPad* getProxyPadStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstProxyPad; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstProxyPad; } protected override void setStruct(GObject* obj) { gstProxyPad = cast(GstProxyPad*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstProxyPad* gstProxyPad, bool ownedRef = false) { this.gstProxyPad = gstProxyPad; super(cast(GstPad*)gstProxyPad, ownedRef); } /** */ public static GType getType() { return gst_proxy_pad_get_type(); } /** * Invoke the default chain function of the proxy pad. * * Params: * pad = a sink #GstPad, returns GST_FLOW_ERROR if not. * parent = the parent of @pad or %NULL * buffer = the #GstBuffer to send, return GST_FLOW_ERROR * if not. * * Returns: a #GstFlowReturn from the pad. */ public static GstFlowReturn chainDefault(Pad pad, ObjectGst parent, Buffer buffer) { return gst_proxy_pad_chain_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), (buffer is null) ? null : buffer.getBufferStruct()); } /** * Invoke the default chain list function of the proxy pad. * * Params: * pad = a sink #GstPad, returns GST_FLOW_ERROR if not. * parent = the parent of @pad or %NULL * list = the #GstBufferList to send, return GST_FLOW_ERROR * if not. * * Returns: a #GstFlowReturn from the pad. */ public static GstFlowReturn chainListDefault(Pad pad, ObjectGst parent, BufferList list) { return gst_proxy_pad_chain_list_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), (list is null) ? null : list.getBufferListStruct()); } /** * Invoke the default getrange function of the proxy pad. * * Params: * pad = a src #GstPad, returns #GST_FLOW_ERROR if not. * parent = the parent of @pad * offset = The start offset of the buffer * size = The length of the buffer * buffer = a pointer to hold the #GstBuffer, * returns #GST_FLOW_ERROR if %NULL. * * Returns: a #GstFlowReturn from the pad. */ public static GstFlowReturn getrangeDefault(Pad pad, ObjectGst parent, ulong offset, uint size, out Buffer buffer) { GstBuffer* outbuffer = null; auto p = gst_proxy_pad_getrange_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct(), offset, size, &outbuffer); buffer = ObjectG.getDObject!(Buffer)(outbuffer); return p; } /** * Invoke the default iterate internal links function of the proxy pad. * * Params: * pad = the #GstPad to get the internal links of. * parent = the parent of @pad or %NULL * * Returns: a #GstIterator of #GstPad, or %NULL if @pad * has no parent. Unref each returned pad with gst_object_unref(). */ public static Iterator iterateInternalLinksDefault(Pad pad, ObjectGst parent) { auto p = gst_proxy_pad_iterate_internal_links_default((pad is null) ? null : pad.getPadStruct(), (parent is null) ? null : parent.getObjectGstStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Iterator)(cast(GstIterator*) p, true); } /** * Get the internal pad of @pad. Unref target pad after usage. * * The internal pad of a #GstGhostPad is the internally used * pad of opposite direction, which is used to link to the target. * * Returns: the target #GstProxyPad, can * be %NULL. Unref target pad after usage. */ public ProxyPad getInternal() { auto p = gst_proxy_pad_get_internal(gstProxyPad); if(p is null) { return null; } return ObjectG.getDObject!(ProxyPad)(cast(GstProxyPad*) p, true); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Query.d000066400000000000000000001201641324604450400215570ustar00rootroot00000000000000/* * 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 gstreamer.Query; private import glib.ConstructionException; private import glib.MemorySlice; private import glib.Str; private import gobject.ObjectG; private import gstreamer.AllocationParams; private import gstreamer.Allocator; private import gstreamer.BufferPool; private import gstreamer.Caps; private import gstreamer.Context; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Queries can be performed on pads (gst_pad_query()) and elements * (gst_element_query()). Please note that some queries might need a running * pipeline to work. * * Queries can be created using the gst_query_new_*() functions. * Query values can be set using gst_query_set_*(), and parsed using * gst_query_parse_*() helpers. * * The following example shows how to query the duration of a pipeline: * |[ * GstQuery *query; * gboolean res; * query = gst_query_new_duration (GST_FORMAT_TIME); * res = gst_element_query (pipeline, query); * if (res) { * gint64 duration; * gst_query_parse_duration (query, NULL, &duration); * g_print ("duration = %"GST_TIME_FORMAT, GST_TIME_ARGS (duration)); * } else { * g_print ("duration query failed..."); * } * gst_query_unref (query); * ]| */ public class Query { /** the main Gtk struct */ protected GstQuery* gstQuery; protected bool ownedRef; /** Get the main Gtk struct */ public GstQuery* getQueryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstQuery; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstQuery; } /** * Sets our main struct and passes it to the parent class. */ public this (GstQuery* gstQuery, bool ownedRef = false) { this.gstQuery = gstQuery; this.ownedRef = ownedRef; } /** * Constructs a new query stream position query object. Use gst_query_unref() * when done with it. A position query is used to query the current position * of playback in the streams, in some format. * Params: * format = the default GstFormat for the new query * Returns: * A GstQuery */ public static Query newPosition(GstFormat format) { auto p = gst_query_new_position(format); if(p is null) { throw new ConstructionException("null returned by gst_query_new_position"); } return new Query( cast(GstQuery*)p); //, true); } /** * Constructs a new stream duration query object to query in the given format. * Use gst_query_unref() when done with it. A duration query will give the * total length of the stream. * Params: * format = the GstFormat for this duration query * Returns: * A GstQuery */ public static Query newDuration(GstFormat format) { auto p = gst_query_new_duration(format); if(p is null) { throw new ConstructionException("null returned by gst_query_new_duration"); } return new Query( cast(GstQuery*)p); //, true); } /** * Constructs a new query object for querying seeking properties of * the stream. * Params: * format = the default GstFormat for the new query * Returns: * A GstQuery */ public static Query newSeeking(GstFormat format) { auto p = gst_query_new_seeking(format); if(p is null) { throw new ConstructionException("null returned by gst_query_new_seeking"); } return new Query(cast(GstQuery*)p); //, true); } /** * Constructs a new query object for querying formats of * the stream. * Returns: * A GstQuery */ public static Query newFormats() { auto p = gst_query_new_formats(); if(p is null) { throw new ConstructionException("null returned by gst_query_new_formats"); } return new Query(cast(GstQuery*)p); //, true); } /** * Constructs a new segment query object. Use gst_query_unref() * when done with it. A segment query is used to discover information about the * currently configured segment for playback. * Params: * format = the GstFormat for the new query * Returns: * a GstQuery */ public static Query newSegment(GstFormat format) { auto p = gst_query_new_segment(format); if(p is null) { throw new ConstructionException("null returned by gst_query_new_segment"); } return new Query(cast(GstQuery*)p); //, true); } /** * Constructs a new latency query object. * Use gst_query_unref() when done with it. A latency query is usually performed * by sinks to compensate for additional latency introduced by elements in the * pipeline. * Free-function: gst_query_unref */ public static Query newLatency() { auto p = gst_query_new_latency(); if(p is null) { throw new ConstructionException("null returned by gst_query_new_latency()"); } return new Query(cast(GstQuery*)p); //, true); } /** * Constructs a new query URI query object. Use gst_query_unref() * when done with it. An URI query is used to query the current URI * that is used by the source or sink. * Free-function: gst_query_unref * Throws: ConstructionException GTK+ fails to create the object. */ public static Query newUri() { auto p = gst_query_new_uri(); if(p is null) { throw new ConstructionException("null returned by gst_query_new_uri()"); } return new Query(cast(GstQuery*)p); //, true); } /** * Constructs a new query object for querying the scheduling properties. * Free-function: gst_query_unref * Throws: ConstructionException GTK+ fails to create the object. */ public static Query newScheduling() { auto p = gst_query_new_scheduling(); if(p is null) { throw new ConstructionException("null returned by gst_query_new_scheduling()"); } return new Query(cast(GstQuery*)p); //, true); } /** * Constructs a new query object for querying the drain state. * Free-function: gst_query_unref * Throws: ConstructionException GTK+ fails to create the object. */ public static Query newDrain() { auto p = gst_query_new_drain(); if(p is null) { throw new ConstructionException("null returned by gst_query_new_drain()"); } return new Query(cast(GstQuery*)p); //, true); } /** * Constructs a new query object for querying if caps are accepted. * Free-function: gst_query_unref * Params: * caps = a fixed GstCaps * Throws: ConstructionException GTK+ fails to create the object. */ public static Query newAcceptCaps(Caps caps) { auto p = gst_query_new_accept_caps((caps is null) ? null : caps.getCapsStruct()); if(p is null) { throw new ConstructionException("null returned by gst_query_new_accept_caps((caps is null) ? null : caps.getCapsStruct())"); } return new Query(cast(GstQuery*)p); //, true); } /** */ /** */ public static GType getType() { return gst_query_get_type(); } /** * Constructs a new query object for querying the allocation properties. * * Free-function: gst_query_unref() * * Params: * caps = the negotiated caps * needPool = return a pool * * Returns: a new #GstQuery * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Caps caps, bool needPool) { auto p = gst_query_new_allocation((caps is null) ? null : caps.getCapsStruct(), needPool); if(p is null) { throw new ConstructionException("null returned by new_allocation"); } this(cast(GstQuery*) p); } /** * Constructs a new query object for querying the buffering status of * a stream. * * Free-function: gst_query_unref() * * Params: * format = the default #GstFormat for the new query * * Returns: a new #GstQuery * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstFormat format) { auto p = gst_query_new_buffering(format); if(p is null) { throw new ConstructionException("null returned by new_buffering"); } this(cast(GstQuery*) p); } /** * Constructs a new query object for querying the caps. * * The CAPS query should return the allowable caps for a pad in the context * of the element's state, its link to other elements, and the devices or files * it has opened. These caps must be a subset of the pad template caps. In the * NULL state with no links, the CAPS query should ideally return the same caps * as the pad template. In rare circumstances, an object property can affect * the caps returned by the CAPS query, but this is discouraged. * * For most filters, the caps returned by CAPS query is directly affected by the * allowed caps on other pads. For demuxers and decoders, the caps returned by * the srcpad's getcaps function is directly related to the stream data. Again, * the CAPS query should return the most specific caps it reasonably can, since this * helps with autoplugging. * * The @filter is used to restrict the result caps, only the caps matching * @filter should be returned from the CAPS query. Specifying a filter might * greatly reduce the amount of processing an element needs to do. * * Free-function: gst_query_unref() * * Params: * filter = a filter * * Returns: a new #GstQuery * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Caps filter) { auto p = gst_query_new_caps((filter is null) ? null : filter.getCapsStruct()); if(p is null) { throw new ConstructionException("null returned by new_caps"); } this(cast(GstQuery*) p); } /** * Constructs a new query object for querying the pipeline-local context. * * Free-function: gst_query_unref() * * Params: * contextType = Context type to query * * Returns: a new #GstQuery * * Since: 1.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string contextType) { auto p = gst_query_new_context(Str.toStringz(contextType)); if(p is null) { throw new ConstructionException("null returned by new_context"); } this(cast(GstQuery*) p); } /** * Constructs a new convert query object. Use gst_query_unref() * when done with it. A convert query is used to ask for a conversion between * one format and another. * * Free-function: gst_query_unref() * * Params: * srcFormat = the source #GstFormat for the new query * value = the value to convert * destFormat = the target #GstFormat * * Returns: a #GstQuery * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstFormat srcFormat, long value, GstFormat destFormat) { auto p = gst_query_new_convert(srcFormat, value, destFormat); if(p is null) { throw new ConstructionException("null returned by new_convert"); } this(cast(GstQuery*) p); } /** * Constructs a new custom query object. Use gst_query_unref() * when done with it. * * Free-function: gst_query_unref() * * Params: * type = the query type * structure = a structure for the query * * Returns: a new #GstQuery * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstQueryType type, Structure structure) { auto p = gst_query_new_custom(type, (structure is null) ? null : structure.getStructureStruct(true)); if(p is null) { throw new ConstructionException("null returned by new_custom"); } this(cast(GstQuery*) p); } /** * Add @api with @params as one of the supported metadata API to @query. * * Params: * api = the metadata API * params = API specific parameters */ public void addAllocationMeta(GType api, Structure params) { gst_query_add_allocation_meta(gstQuery, api, (params is null) ? null : params.getStructureStruct()); } /** * Add @allocator and its @params as a supported memory allocator. * * Params: * allocator = the memory allocator * params = a #GstAllocationParams */ public void addAllocationParam(Allocator allocator, AllocationParams params) { gst_query_add_allocation_param(gstQuery, (allocator is null) ? null : allocator.getAllocatorStruct(), (params is null) ? null : params.getAllocationParamsStruct()); } /** * Set the pool parameters in @query. * * Params: * pool = the #GstBufferPool * size = the buffer size * minBuffers = the min buffers * maxBuffers = the max buffers */ public void addAllocationPool(BufferPool pool, uint size, uint minBuffers, uint maxBuffers) { gst_query_add_allocation_pool(gstQuery, (pool is null) ? null : pool.getBufferPoolStruct(), size, minBuffers, maxBuffers); } /** * Set the buffering-ranges array field in @query. The current last * start position of the array should be inferior to @start. * * Params: * start = start position of the range * stop = stop position of the range * * Returns: a #gboolean indicating if the range was added or not. */ public bool addBufferingRange(long start, long stop) { return gst_query_add_buffering_range(gstQuery, start, stop) != 0; } /** * Add @mode as one of the supported scheduling modes to @query. * * Params: * mode = a #GstPadMode */ public void addSchedulingMode(GstPadMode mode) { gst_query_add_scheduling_mode(gstQuery, mode); } /** * Check if @query has metadata @api set. When this function returns %TRUE, * @index will contain the index where the requested API and the parameters * can be found. * * Params: * api = the metadata API * index = the index * * Returns: %TRUE when @api is in the list of metadata. */ public bool findAllocationMeta(GType api, out uint index) { return gst_query_find_allocation_meta(gstQuery, api, &index) != 0; } /** * Retrieve the number of values currently stored in the * meta API array of the query's structure. * * Returns: the metadata API array size as a #guint. */ public uint getNAllocationMetas() { return gst_query_get_n_allocation_metas(gstQuery); } /** * Retrieve the number of values currently stored in the * allocator params array of the query's structure. * * If no memory allocator is specified, the downstream element can handle * the default memory allocator. The first memory allocator in the query * should be generic and allow mapping to system memory, all following * allocators should be ordered by preference with the preferred one first. * * Returns: the allocator array size as a #guint. */ public uint getNAllocationParams() { return gst_query_get_n_allocation_params(gstQuery); } /** * Retrieve the number of values currently stored in the * pool array of the query's structure. * * Returns: the pool array size as a #guint. */ public uint getNAllocationPools() { return gst_query_get_n_allocation_pools(gstQuery); } /** * Retrieve the number of values currently stored in the * buffered-ranges array of the query's structure. * * Returns: the range array size as a #guint. */ public uint getNBufferingRanges() { return gst_query_get_n_buffering_ranges(gstQuery); } /** * Retrieve the number of values currently stored in the * scheduling mode array of the query's structure. * * Returns: the scheduling mode array size as a #guint. */ public uint getNSchedulingModes() { return gst_query_get_n_scheduling_modes(gstQuery); } /** * Get the structure of a query. * * Returns: the #GstStructure of the query. The structure is * still owned by the query and will therefore be freed when the query * is unreffed. */ public Structure getStructure() { auto p = gst_query_get_structure(gstQuery); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Check if @query has scheduling mode set. * * > When checking if upstream supports pull mode, it is usually not * > enough to just check for GST_PAD_MODE_PULL with this function, you * > also want to check whether the scheduling flags returned by * > gst_query_parse_scheduling() have the seeking flag set (meaning * > random access is supported, not only sequential pulls). * * Params: * mode = the scheduling mode * * Returns: %TRUE when @mode is in the list of scheduling modes. */ public bool hasSchedulingMode(GstPadMode mode) { return gst_query_has_scheduling_mode(gstQuery, mode) != 0; } /** * Check if @query has scheduling mode set and @flags is set in * query scheduling flags. * * Params: * mode = the scheduling mode * flags = #GstSchedulingFlags * * Returns: %TRUE when @mode is in the list of scheduling modes * and @flags are compatible with query flags. */ public bool hasSchedulingModeWithFlags(GstPadMode mode, GstSchedulingFlags flags) { return gst_query_has_scheduling_mode_with_flags(gstQuery, mode, flags) != 0; } /** * Get the caps from @query. The caps remains valid as long as @query remains * valid. * * Params: * caps = A pointer to the caps */ public void parseAcceptCaps(out Caps caps) { GstCaps* outcaps = null; gst_query_parse_accept_caps(gstQuery, &outcaps); caps = ObjectG.getDObject!(Caps)(outcaps); } /** * Parse the result from @query and store in @result. * * Params: * result = location for the result */ public void parseAcceptCapsResult(ref bool result) { int outresult = (result ? 1 : 0); gst_query_parse_accept_caps_result(gstQuery, &outresult); result = (outresult == 1); } /** * Parse an allocation query, writing the requested caps in @caps and * whether a pool is needed in @need_pool, if the respective parameters * are non-%NULL. * * Pool details can be retrieved using gst_query_get_n_allocation_pools() and * gst_query_parse_nth_allocation_pool(). * * Params: * caps = The #GstCaps * needPool = Whether a #GstBufferPool is needed */ public void parseAllocation(out Caps caps, out bool needPool) { GstCaps* outcaps = null; int outneedPool; gst_query_parse_allocation(gstQuery, &outcaps, &outneedPool); caps = ObjectG.getDObject!(Caps)(outcaps); needPool = (outneedPool == 1); } /** * Get the percentage of buffered data. This is a value between 0 and 100. * The @busy indicator is %TRUE when the buffering is in progress. * * Params: * busy = if buffering is busy, or %NULL * percent = a buffering percent, or %NULL */ public void parseBufferingPercent(out bool busy, out int percent) { int outbusy; gst_query_parse_buffering_percent(gstQuery, &outbusy, &percent); busy = (outbusy == 1); } /** * Parse an available query, writing the format into @format, and * other results into the passed parameters, if the respective parameters * are non-%NULL * * Params: * format = the format to set for the @segment_start * and @segment_end values, or %NULL * start = the start to set, or %NULL * stop = the stop to set, or %NULL * estimatedTotal = estimated total amount of download * time remaining in milliseconds, or %NULL */ public void parseBufferingRange(out GstFormat format, out long start, out long stop, out long estimatedTotal) { gst_query_parse_buffering_range(gstQuery, &format, &start, &stop, &estimatedTotal); } /** * Extracts the buffering stats values from @query. * * Params: * mode = a buffering mode, or %NULL * avgIn = the average input rate, or %NULL * avgOut = the average output rat, or %NULL * bufferingLeft = amount of buffering time left in * milliseconds, or %NULL */ public void parseBufferingStats(out GstBufferingMode mode, out int avgIn, out int avgOut, out long bufferingLeft) { gst_query_parse_buffering_stats(gstQuery, &mode, &avgIn, &avgOut, &bufferingLeft); } /** * Get the filter from the caps @query. The caps remains valid as long as * @query remains valid. * * Params: * filter = A pointer to the caps filter */ public void parseCaps(out Caps filter) { GstCaps* outfilter = null; gst_query_parse_caps(gstQuery, &outfilter); filter = ObjectG.getDObject!(Caps)(outfilter); } /** * Get the caps result from @query. The caps remains valid as long as * @query remains valid. * * Params: * caps = A pointer to the caps */ public void parseCapsResult(out Caps caps) { GstCaps* outcaps = null; gst_query_parse_caps_result(gstQuery, &outcaps); caps = ObjectG.getDObject!(Caps)(outcaps); } /** * Get the context from the context @query. The context remains valid as long as * @query remains valid. * * Params: * context = A pointer to store the #GstContext * * Since: 1.2 */ public void parseContext(out Context context) { GstContext* outcontext = null; gst_query_parse_context(gstQuery, &outcontext); context = ObjectG.getDObject!(Context)(outcontext); } /** * Parse a context type from an existing GST_QUERY_CONTEXT query. * * Params: * contextType = the context type, or %NULL * * Returns: a #gboolean indicating if the parsing succeeded. * * Since: 1.2 */ public bool parseContextType(out string contextType) { char* outcontextType = null; auto p = gst_query_parse_context_type(gstQuery, &outcontextType) != 0; contextType = Str.toString(outcontextType); return p; } /** * Parse a convert query answer. Any of @src_format, @src_value, @dest_format, * and @dest_value may be %NULL, in which case that value is omitted. * * Params: * srcFormat = the storage for the #GstFormat of the * source value, or %NULL * srcValue = the storage for the source value, or %NULL * destFormat = the storage for the #GstFormat of the * destination value, or %NULL * destValue = the storage for the destination value, * or %NULL */ public void parseConvert(out GstFormat srcFormat, out long srcValue, out GstFormat destFormat, out long destValue) { gst_query_parse_convert(gstQuery, &srcFormat, &srcValue, &destFormat, &destValue); } /** * Parse a duration query answer. Write the format of the duration into @format, * and the value into @duration, if the respective variables are non-%NULL. * * Params: * format = the storage for the #GstFormat of the duration * value, or %NULL. * duration = the storage for the total duration, or %NULL. */ public void parseDuration(out GstFormat format, out long duration) { gst_query_parse_duration(gstQuery, &format, &duration); } /** * Parse a latency query answer. * * Params: * live = storage for live or %NULL * minLatency = the storage for the min latency or %NULL * maxLatency = the storage for the max latency or %NULL */ public void parseLatency(out bool live, out GstClockTime minLatency, out GstClockTime maxLatency) { int outlive; gst_query_parse_latency(gstQuery, &outlive, &minLatency, &maxLatency); live = (outlive == 1); } /** * Parse the number of formats in the formats @query. * * Params: * nFormats = the number of formats in this query. */ public void parseNFormats(out uint nFormats) { gst_query_parse_n_formats(gstQuery, &nFormats); } /** * Parse an available query and get the metadata API * at @index of the metadata API array. * * Params: * index = position in the metadata API array to read * params = API specific parameters * * Returns: a #GType of the metadata API at @index. */ public GType parseNthAllocationMeta(uint index, out Structure params) { GstStructure* outparams = null; auto p = gst_query_parse_nth_allocation_meta(gstQuery, index, &outparams); params = ObjectG.getDObject!(Structure)(outparams); return p; } /** * Parse an available query and get the allocator and its params * at @index of the allocator array. * * Params: * index = position in the allocator array to read * allocator = variable to hold the result * params = parameters for the allocator */ public void parseNthAllocationParam(uint index, out Allocator allocator, out AllocationParams params) { GstAllocator* outallocator = null; GstAllocationParams* outparams = sliceNew!GstAllocationParams(); gst_query_parse_nth_allocation_param(gstQuery, index, &outallocator, outparams); allocator = ObjectG.getDObject!(Allocator)(outallocator); params = ObjectG.getDObject!(AllocationParams)(outparams, true); } /** * Get the pool parameters in @query. * * Unref @pool with gst_object_unref() when it's not needed any more. * * Params: * index = index to parse * pool = the #GstBufferPool * size = the buffer size * minBuffers = the min buffers * maxBuffers = the max buffers */ public void parseNthAllocationPool(uint index, out BufferPool pool, out uint size, out uint minBuffers, out uint maxBuffers) { GstBufferPool* outpool = null; gst_query_parse_nth_allocation_pool(gstQuery, index, &outpool, &size, &minBuffers, &maxBuffers); pool = ObjectG.getDObject!(BufferPool)(outpool); } /** * Parse an available query and get the start and stop values stored * at the @index of the buffered ranges array. * * Params: * index = position in the buffered-ranges array to read * start = the start position to set, or %NULL * stop = the stop position to set, or %NULL * * Returns: a #gboolean indicating if the parsing succeeded. */ public bool parseNthBufferingRange(uint index, out long start, out long stop) { return gst_query_parse_nth_buffering_range(gstQuery, index, &start, &stop) != 0; } /** * Parse the format query and retrieve the @nth format from it into * @format. If the list contains less elements than @nth, @format will be * set to GST_FORMAT_UNDEFINED. * * Params: * nth = the nth format to retrieve. * format = a pointer to store the nth format */ public void parseNthFormat(uint nth, out GstFormat format) { gst_query_parse_nth_format(gstQuery, nth, &format); } /** * Parse an available query and get the scheduling mode * at @index of the scheduling modes array. * * Params: * index = position in the scheduling modes array to read * * Returns: a #GstPadMode of the scheduling mode at @index. */ public GstPadMode parseNthSchedulingMode(uint index) { return gst_query_parse_nth_scheduling_mode(gstQuery, index); } /** * Parse a position query, writing the format into @format, and the position * into @cur, if the respective parameters are non-%NULL. * * Params: * format = the storage for the #GstFormat of the * position values (may be %NULL) * cur = the storage for the current position (may be %NULL) */ public void parsePosition(out GstFormat format, out long cur) { gst_query_parse_position(gstQuery, &format, &cur); } /** * Set the scheduling properties. * * Params: * flags = #GstSchedulingFlags * minsize = the suggested minimum size of pull requests * maxsize = the suggested maximum size of pull requests: * alig = the suggested alignment of pull requests */ public void parseScheduling(out GstSchedulingFlags flags, out int minsize, out int maxsize, out int alig) { gst_query_parse_scheduling(gstQuery, &flags, &minsize, &maxsize, &alig); } /** * Parse a seeking query, writing the format into @format, and * other results into the passed parameters, if the respective parameters * are non-%NULL * * Params: * format = the format to set for the @segment_start * and @segment_end values, or %NULL * seekable = the seekable flag to set, or %NULL * segmentStart = the segment_start to set, or %NULL * segmentEnd = the segment_end to set, or %NULL */ public void parseSeeking(out GstFormat format, out bool seekable, out long segmentStart, out long segmentEnd) { int outseekable; gst_query_parse_seeking(gstQuery, &format, &outseekable, &segmentStart, &segmentEnd); seekable = (outseekable == 1); } /** * Parse a segment query answer. Any of @rate, @format, @start_value, and * @stop_value may be %NULL, which will cause this value to be omitted. * * See gst_query_set_segment() for an explanation of the function arguments. * * Params: * rate = the storage for the rate of the segment, or %NULL * format = the storage for the #GstFormat of the values, * or %NULL * startValue = the storage for the start value, or %NULL * stopValue = the storage for the stop value, or %NULL */ public void parseSegment(out double rate, out GstFormat format, out long startValue, out long stopValue) { gst_query_parse_segment(gstQuery, &rate, &format, &startValue, &stopValue); } /** * Parse an URI query, writing the URI into @uri as a newly * allocated string, if the respective parameters are non-%NULL. * Free the string with g_free() after usage. * * Params: * uri = the storage for the current URI * (may be %NULL) */ public void parseUri(out string uri) { char* outuri = null; gst_query_parse_uri(gstQuery, &outuri); uri = Str.toString(outuri); } /** * Parse an URI query, writing the URI into @uri as a newly * allocated string, if the respective parameters are non-%NULL. * Free the string with g_free() after usage. * * Params: * uri = the storage for the redirect URI * (may be %NULL) * * Since: 1.2 */ public void parseUriRedirection(out string uri) { char* outuri = null; gst_query_parse_uri_redirection(gstQuery, &outuri); uri = Str.toString(outuri); } /** * Parse an URI query, and set @permanent to %TRUE if there is a redirection * and it should be considered permanent. If a redirection is permanent, * applications should update their internal storage of the URI, otherwise * they should make all future requests to the original URI. * * Params: * permanent = if the URI redirection is permanent * (may be %NULL) * * Since: 1.4 */ public void parseUriRedirectionPermanent(out bool permanent) { int outpermanent; gst_query_parse_uri_redirection_permanent(gstQuery, &outpermanent); permanent = (outpermanent == 1); } /** * Remove the metadata API at @index of the metadata API array. * * Params: * index = position in the metadata API array to remove */ public void removeNthAllocationMeta(uint index) { gst_query_remove_nth_allocation_meta(gstQuery, index); } /** * Remove the allocation param at @index of the allocation param array. * * Params: * index = position in the allocation param array to remove * * Since: 1.2 */ public void removeNthAllocationParam(uint index) { gst_query_remove_nth_allocation_param(gstQuery, index); } /** * Remove the allocation pool at @index of the allocation pool array. * * Params: * index = position in the allocation pool array to remove * * Since: 1.2 */ public void removeNthAllocationPool(uint index) { gst_query_remove_nth_allocation_pool(gstQuery, index); } /** * Set @result as the result for the @query. * * Params: * result = the result to set */ public void setAcceptCapsResult(bool result) { gst_query_set_accept_caps_result(gstQuery, result); } /** * Set the percentage of buffered data. This is a value between 0 and 100. * The @busy indicator is %TRUE when the buffering is in progress. * * Params: * busy = if buffering is busy * percent = a buffering percent */ public void setBufferingPercent(bool busy, int percent) { gst_query_set_buffering_percent(gstQuery, busy, percent); } /** * Set the available query result fields in @query. * * Params: * format = the format to set for the @start and @stop values * start = the start to set * stop = the stop to set * estimatedTotal = estimated total amount of download time remaining in * milliseconds */ public void setBufferingRange(GstFormat format, long start, long stop, long estimatedTotal) { gst_query_set_buffering_range(gstQuery, format, start, stop, estimatedTotal); } /** * Configures the buffering stats values in @query. * * Params: * mode = a buffering mode * avgIn = the average input rate * avgOut = the average output rate * bufferingLeft = amount of buffering time left in milliseconds */ public void setBufferingStats(GstBufferingMode mode, int avgIn, int avgOut, long bufferingLeft) { gst_query_set_buffering_stats(gstQuery, mode, avgIn, avgOut, bufferingLeft); } /** * Set the @caps result in @query. * * Params: * caps = A pointer to the caps */ public void setCapsResult(Caps caps) { gst_query_set_caps_result(gstQuery, (caps is null) ? null : caps.getCapsStruct()); } /** * Answer a context query by setting the requested context. * * Params: * context = the requested #GstContext * * Since: 1.2 */ public void setContext(Context context) { gst_query_set_context(gstQuery, (context is null) ? null : context.getContextStruct()); } /** * Answer a convert query by setting the requested values. * * Params: * srcFormat = the source #GstFormat * srcValue = the source value * destFormat = the destination #GstFormat * destValue = the destination value */ public void setConvert(GstFormat srcFormat, long srcValue, GstFormat destFormat, long destValue) { gst_query_set_convert(gstQuery, srcFormat, srcValue, destFormat, destValue); } /** * Answer a duration query by setting the requested value in the given format. * * Params: * format = the #GstFormat for the duration * duration = the duration of the stream */ public void setDuration(GstFormat format, long duration) { gst_query_set_duration(gstQuery, format, duration); } /** * Set the formats query result fields in @query. The number of formats passed * in the @formats array must be equal to @n_formats. * * Params: * formats = an array containing @n_formats * @GstFormat values. */ public void setFormatsv(GstFormat[] formats) { gst_query_set_formatsv(gstQuery, cast(int)formats.length, formats.ptr); } /** * Answer a latency query by setting the requested values in the given format. * * Params: * live = if there is a live element upstream * minLatency = the minimal latency of the upstream elements * maxLatency = the maximal latency of the upstream elements */ public void setLatency(bool live, GstClockTime minLatency, GstClockTime maxLatency) { gst_query_set_latency(gstQuery, live, minLatency, maxLatency); } /** * Parse an available query and get the allocator and its params * at @index of the allocator array. * * Params: * index = position in the allocator array to set * allocator = new allocator to set * params = parameters for the allocator */ public void setNthAllocationParam(uint index, Allocator allocator, AllocationParams params) { gst_query_set_nth_allocation_param(gstQuery, index, (allocator is null) ? null : allocator.getAllocatorStruct(), (params is null) ? null : params.getAllocationParamsStruct()); } /** * Set the pool parameters in @query. * * Params: * index = index to modify * pool = the #GstBufferPool * size = the size * minBuffers = the min buffers * maxBuffers = the max buffers */ public void setNthAllocationPool(uint index, BufferPool pool, uint size, uint minBuffers, uint maxBuffers) { gst_query_set_nth_allocation_pool(gstQuery, index, (pool is null) ? null : pool.getBufferPoolStruct(), size, minBuffers, maxBuffers); } /** * Answer a position query by setting the requested value in the given format. * * Params: * format = the requested #GstFormat * cur = the position to set */ public void setPosition(GstFormat format, long cur) { gst_query_set_position(gstQuery, format, cur); } /** * Set the scheduling properties. * * Params: * flags = #GstSchedulingFlags * minsize = the suggested minimum size of pull requests * maxsize = the suggested maximum size of pull requests * alig = the suggested alignment of pull requests */ public void setScheduling(GstSchedulingFlags flags, int minsize, int maxsize, int alig) { gst_query_set_scheduling(gstQuery, flags, minsize, maxsize, alig); } /** * Set the seeking query result fields in @query. * * Params: * format = the format to set for the @segment_start and @segment_end values * seekable = the seekable flag to set * segmentStart = the segment_start to set * segmentEnd = the segment_end to set */ public void setSeeking(GstFormat format, bool seekable, long segmentStart, long segmentEnd) { gst_query_set_seeking(gstQuery, format, seekable, segmentStart, segmentEnd); } /** * Answer a segment query by setting the requested values. The normal * playback segment of a pipeline is 0 to duration at the default rate of * 1.0. If a seek was performed on the pipeline to play a different * segment, this query will return the range specified in the last seek. * * @start_value and @stop_value will respectively contain the configured * playback range start and stop values expressed in @format. * The values are always between 0 and the duration of the media and * @start_value <= @stop_value. @rate will contain the playback rate. For * negative rates, playback will actually happen from @stop_value to * @start_value. * * Params: * rate = the rate of the segment * format = the #GstFormat of the segment values (@start_value and @stop_value) * startValue = the start value * stopValue = the stop value */ public void setSegment(double rate, GstFormat format, long startValue, long stopValue) { gst_query_set_segment(gstQuery, rate, format, startValue, stopValue); } /** * Answer a URI query by setting the requested URI. * * Params: * uri = the URI to set */ public void setUri(string uri) { gst_query_set_uri(gstQuery, Str.toStringz(uri)); } /** * Answer a URI query by setting the requested URI redirection. * * Params: * uri = the URI to set * * Since: 1.2 */ public void setUriRedirection(string uri) { gst_query_set_uri_redirection(gstQuery, Str.toStringz(uri)); } /** * Answer a URI query by setting the requested URI redirection * to permanent or not. * * Params: * permanent = whether the redirect is permanent or not * * Since: 1.4 */ public void setUriRedirectionPermanent(bool permanent) { gst_query_set_uri_redirection_permanent(gstQuery, permanent); } /** * Get the structure of a query. This method should be called with a writable * @query so that the returned structure is guaranteed to be writable. * * Returns: the #GstStructure of the query. The structure is * still owned by the query and will therefore be freed when the query * is unreffed. */ public Structure writableStructure() { auto p = gst_query_writable_structure(gstQuery); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Gets the #GstQueryTypeFlags associated with @type. * * Params: * type = a #GstQueryType * * Returns: a #GstQueryTypeFlags. */ public static GstQueryTypeFlags typeGetFlags(GstQueryType type) { return gst_query_type_get_flags(type); } /** * Get a printable name for the given query type. Do not modify or free. * * Params: * type = the query type * * Returns: a reference to the static name of the query. */ public static string typeGetName(GstQueryType type) { return Str.toString(gst_query_type_get_name(type)); } /** * Get the unique quark for the given query type. * * Params: * type = the query type * * Returns: the quark associated with the query type */ public static GQuark typeToQuark(GstQueryType type) { return gst_query_type_to_quark(type); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Registry.d000066400000000000000000000415521324604450400222650ustar00rootroot00000000000000/* * 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 gstreamer.Registry; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gstreamer.ObjectGst; private import gstreamer.Plugin; private import gstreamer.PluginFeature; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * One registry holds the metadata of a set of plugins. * * Design: * * The #GstRegistry object is a list of plugins and some functions for dealing * with them. Each #GstPlugin is matched 1-1 with a file on disk, and may or may * not be loaded at a given time. * * The primary source, at all times, of plugin information is each plugin file * itself. Thus, if an application wants information about a particular plugin, * or wants to search for a feature that satisfies given criteria, the primary * means of doing so is to load every plugin and look at the resulting * information that is gathered in the default registry. Clearly, this is a time * consuming process, so we cache information in the registry file. The format * and location of the cache file is internal to gstreamer. * * On startup, plugins are searched for in the plugin search path. The following * locations are checked in this order: * * * location from --gst-plugin-path commandline option. * * the GST_PLUGIN_PATH environment variable. * * the GST_PLUGIN_SYSTEM_PATH environment variable. * * default locations (if GST_PLUGIN_SYSTEM_PATH is not set). * Those default locations are: * `$XDG_DATA_HOME/gstreamer-$GST_API_VERSION/plugins/` * and `$prefix/libs/gstreamer-$GST_API_VERSION/`. * [$XDG_DATA_HOME](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) defaults to * `$HOME/.local/share`. * * The registry cache file is loaded from * `$XDG_CACHE_HOME/gstreamer-$GST_API_VERSION/registry-$ARCH.bin` * (where $XDG_CACHE_HOME defaults to `$HOME/.cache`) or the file listed in the `GST_REGISTRY` * env var. One reason to change the registry location is for testing. * * For each plugin that is found in the plugin search path, there could be 3 * possibilities for cached information: * * * the cache may not contain information about a given file. * * the cache may have stale information. * * the cache may have current information. * * In the first two cases, the plugin is loaded and the cache updated. In * addition to these cases, the cache may have entries for plugins that are not * relevant to the current process. These are marked as not available to the * current process. If the cache is updated for whatever reason, it is marked * dirty. * * A dirty cache is written out at the end of initialization. Each entry is * checked to make sure the information is minimally valid. If not, the entry is * simply dropped. * * ## Implementation notes: * * The "cache" and "registry" are different concepts and can represent * different sets of plugins. For various reasons, at init time, the cache is * stored in the default registry, and plugins not relevant to the current * process are marked with the %GST_PLUGIN_FLAG_CACHED bit. These plugins are * removed at the end of initialization. */ public class Registry : ObjectGst { /** the main Gtk struct */ protected GstRegistry* gstRegistry; /** Get the main Gtk struct */ public GstRegistry* getRegistryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstRegistry; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstRegistry; } protected override void setStruct(GObject* obj) { gstRegistry = cast(GstRegistry*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstRegistry* gstRegistry, bool ownedRef = false) { this.gstRegistry = gstRegistry; super(cast(GstObject*)gstRegistry, ownedRef); } /** */ public static GType getType() { return gst_registry_get_type(); } /** * By default GStreamer will perform scanning and rebuilding of the * registry file using a helper child process. * * Applications might want to disable this behaviour with the * gst_registry_fork_set_enabled() function, in which case new plugins * are scanned (and loaded) into the application process. * * Returns: %TRUE if GStreamer will use the child helper process when * rebuilding the registry. */ public static bool forkIsEnabled() { return gst_registry_fork_is_enabled() != 0; } /** * Applications might want to disable/enable spawning of a child helper process * when rebuilding the registry. See gst_registry_fork_is_enabled() for more * information. * * Params: * enabled = whether rebuilding the registry can use a temporary child helper process. */ public static void forkSetEnabled(bool enabled) { gst_registry_fork_set_enabled(enabled); } /** * Retrieves the singleton plugin registry. The caller does not own a * reference on the registry, as it is alive as long as GStreamer is * initialized. * * Returns: the #GstRegistry. */ public static Registry get() { auto p = gst_registry_get(); if(p is null) { return null; } return ObjectG.getDObject!(Registry)(cast(GstRegistry*) p); } /** * Add the feature to the registry. The feature-added signal will be emitted. * This function sinks @feature. * * Params: * feature = the feature to add * * Returns: %TRUE on success. * * MT safe. */ public bool addFeature(PluginFeature feature) { return gst_registry_add_feature(gstRegistry, (feature is null) ? null : feature.getPluginFeatureStruct()) != 0; } /** * Add the plugin to the registry. The plugin-added signal will be emitted. * This function will sink @plugin. * * Params: * plugin = the plugin to add * * Returns: %TRUE on success. * * MT safe. */ public bool addPlugin(Plugin plugin) { return gst_registry_add_plugin(gstRegistry, (plugin is null) ? null : plugin.getPluginStruct()) != 0; } /** * Checks whether a plugin feature by the given name exists in * @registry and whether its version is at least the * version required. * * Params: * featureName = the name of the feature (e.g. "oggdemux") * minMajor = the minimum major version number * minMinor = the minimum minor version number * minMicro = the minimum micro version number * * Returns: %TRUE if the feature could be found and the version is * the same as the required version or newer, and %FALSE otherwise. */ public bool checkFeatureVersion(string featureName, uint minMajor, uint minMinor, uint minMicro) { return gst_registry_check_feature_version(gstRegistry, Str.toStringz(featureName), minMajor, minMinor, minMicro) != 0; } /** * Runs a filter against all features of the plugins in the registry * and returns a GList with the results. * If the first flag is set, only the first match is * returned (as a list with a single object). * * Params: * filter = the filter to use * first = only return first match * userData = user data passed to the filter function * * Returns: a #GList of * #GstPluginFeature. Use gst_plugin_feature_list_free() after usage. * * MT safe. */ public ListG featureFilter(GstPluginFeatureFilter filter, bool first, void* userData) { auto p = gst_registry_feature_filter(gstRegistry, filter, first, userData); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Find the pluginfeature with the given name and type in the registry. * * Params: * name = the pluginfeature name to find * type = the pluginfeature type to find * * Returns: the pluginfeature with the * given name and type or %NULL if the plugin was not * found. gst_object_unref() after usage. * * MT safe. */ public PluginFeature findFeature(string name, GType type) { auto p = gst_registry_find_feature(gstRegistry, Str.toStringz(name), type); if(p is null) { return null; } return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) p, true); } /** * Find the plugin with the given name in the registry. * The plugin will be reffed; caller is responsible for unreffing. * * Params: * name = the plugin name to find * * Returns: the plugin with the given name * or %NULL if the plugin was not found. gst_object_unref() after * usage. * * MT safe. */ public Plugin findPlugin(string name) { auto p = gst_registry_find_plugin(gstRegistry, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); } /** * Retrieves a #GList of #GstPluginFeature of @type. * * Params: * type = a #GType. * * Returns: a #GList of * #GstPluginFeature of @type. Use gst_plugin_feature_list_free() after use * * MT safe. */ public ListG getFeatureList(GType type) { auto p = gst_registry_get_feature_list(gstRegistry, type); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Retrieves a #GList of features of the plugin with name @name. * * Params: * name = a plugin name. * * Returns: a #GList of * #GstPluginFeature. Use gst_plugin_feature_list_free() after usage. */ public ListG getFeatureListByPlugin(string name) { auto p = gst_registry_get_feature_list_by_plugin(gstRegistry, Str.toStringz(name)); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Returns the registry's feature list cookie. This changes * every time a feature is added or removed from the registry. * * Returns: the feature list cookie. */ public uint getFeatureListCookie() { return gst_registry_get_feature_list_cookie(gstRegistry); } /** * Get a copy of all plugins registered in the given registry. The refcount * of each element in the list in incremented. * * Returns: a #GList of #GstPlugin. * Use gst_plugin_list_free() after usage. * * MT safe. */ public ListG getPluginList() { auto p = gst_registry_get_plugin_list(gstRegistry); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Look up a plugin in the given registry with the given filename. * If found, plugin is reffed. * * Params: * filename = the name of the file to look up * * Returns: the #GstPlugin if found, or * %NULL if not. gst_object_unref() after usage. */ public Plugin lookup(string filename) { auto p = gst_registry_lookup(gstRegistry, Str.toStringz(filename)); if(p is null) { return null; } return ObjectG.getDObject!(Plugin)(cast(GstPlugin*) p, true); } /** * Find a #GstPluginFeature with @name in @registry. * * Params: * name = a #GstPluginFeature name * * Returns: a #GstPluginFeature with its refcount incremented, * use gst_object_unref() after usage. * * MT safe. */ public PluginFeature lookupFeature(string name) { auto p = gst_registry_lookup_feature(gstRegistry, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(PluginFeature)(cast(GstPluginFeature*) p, true); } /** * Runs a filter against all plugins in the registry and returns a #GList with * the results. If the first flag is set, only the first match is * returned (as a list with a single object). * Every plugin is reffed; use gst_plugin_list_free() after use, which * will unref again. * * Params: * filter = the filter to use * first = only return first match * userData = user data passed to the filter function * * Returns: a #GList of #GstPlugin. * Use gst_plugin_list_free() after usage. * * MT safe. */ public ListG pluginFilter(GstPluginFilter filter, bool first, void* userData) { auto p = gst_registry_plugin_filter(gstRegistry, filter, first, userData); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Remove the feature from the registry. * * MT safe. * * Params: * feature = the feature to remove */ public void removeFeature(PluginFeature feature) { gst_registry_remove_feature(gstRegistry, (feature is null) ? null : feature.getPluginFeatureStruct()); } /** * Remove the plugin from the registry. * * MT safe. * * Params: * plugin = the plugin to remove */ public void removePlugin(Plugin plugin) { gst_registry_remove_plugin(gstRegistry, (plugin is null) ? null : plugin.getPluginStruct()); } /** * Scan the given path for plugins to add to the registry. The syntax of the * path is specific to the registry. * * Params: * path = the path to scan * * Returns: %TRUE if registry changed */ public bool scanPath(string path) { return gst_registry_scan_path(gstRegistry, Str.toStringz(path)) != 0; } protected class OnFeatureAddedDelegateWrapper { void delegate(PluginFeature, Registry) dlg; gulong handlerId; this(void delegate(PluginFeature, Registry) dlg) { this.dlg = dlg; onFeatureAddedListeners ~= this; } void remove(OnFeatureAddedDelegateWrapper source) { foreach(index, wrapper; onFeatureAddedListeners) { if (wrapper.handlerId == source.handlerId) { onFeatureAddedListeners[index] = null; onFeatureAddedListeners = std.algorithm.remove(onFeatureAddedListeners, index); break; } } } } OnFeatureAddedDelegateWrapper[] onFeatureAddedListeners; /** * Signals that a feature has been added to the registry (possibly * replacing a previously-added one by the same name) * * Params: * feature = the feature that has been added */ gulong addOnFeatureAdded(void delegate(PluginFeature, Registry) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnFeatureAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "feature-added", cast(GCallback)&callBackFeatureAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackFeatureAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackFeatureAdded(GstRegistry* registryStruct, GstPluginFeature* feature, OnFeatureAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(PluginFeature)(feature), wrapper.outer); } extern(C) static void callBackFeatureAddedDestroy(OnFeatureAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPluginAddedDelegateWrapper { void delegate(Plugin, Registry) dlg; gulong handlerId; this(void delegate(Plugin, Registry) dlg) { this.dlg = dlg; onPluginAddedListeners ~= this; } void remove(OnPluginAddedDelegateWrapper source) { foreach(index, wrapper; onPluginAddedListeners) { if (wrapper.handlerId == source.handlerId) { onPluginAddedListeners[index] = null; onPluginAddedListeners = std.algorithm.remove(onPluginAddedListeners, index); break; } } } } OnPluginAddedDelegateWrapper[] onPluginAddedListeners; /** * Signals that a plugin has been added to the registry (possibly * replacing a previously-added one by the same name) * * Params: * plugin = the plugin that has been added */ gulong addOnPluginAdded(void delegate(Plugin, Registry) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPluginAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "plugin-added", cast(GCallback)&callBackPluginAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackPluginAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPluginAdded(GstRegistry* registryStruct, GstPlugin* plugin, OnPluginAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Plugin)(plugin), wrapper.outer); } extern(C) static void callBackPluginAddedDestroy(OnPluginAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Sample.d000066400000000000000000000125311324604450400216710ustar00rootroot00000000000000/* * 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 gstreamer.Sample; private import glib.ConstructionException; private import gobject.ObjectG; private import gstreamer.Buffer; private import gstreamer.BufferList; private import gstreamer.Caps; private import gstreamer.Segment; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * A #GstSample is a small object containing data, a type, timing and * extra arbitrary information. */ public class Sample { /** the main Gtk struct */ protected GstSample* gstSample; protected bool ownedRef; /** Get the main Gtk struct */ public GstSample* getSampleStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstSample; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstSample; } /** * Sets our main struct and passes it to the parent class. */ public this (GstSample* gstSample, bool ownedRef = false) { this.gstSample = gstSample; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_sample_get_type(); } /** * Create a new #GstSample with the provided details. * * Free-function: gst_sample_unref * * Params: * buffer = a #GstBuffer, or %NULL * caps = a #GstCaps, or %NULL * segment = a #GstSegment, or %NULL * info = a #GstStructure, or %NULL * * Returns: the new #GstSample. gst_sample_unref() * after usage. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Buffer buffer, Caps caps, Segment segment, Structure info) { auto p = gst_sample_new((buffer is null) ? null : buffer.getBufferStruct(), (caps is null) ? null : caps.getCapsStruct(), (segment is null) ? null : segment.getSegmentStruct(), (info is null) ? null : info.getStructureStruct(true)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstSample*) p); } /** * Get the buffer associated with @sample * * Returns: the buffer of @sample or %NULL * when there is no buffer. The buffer remains valid as long as * @sample is valid. If you need to hold on to it for longer than * that, take a ref to the buffer with gst_buffer_ref(). */ public Buffer getBuffer() { auto p = gst_sample_get_buffer(gstSample); if(p is null) { return null; } return ObjectG.getDObject!(Buffer)(cast(GstBuffer*) p); } /** * Get the buffer list associated with @sample * * Returns: the buffer list of @sample or %NULL * when there is no buffer list. The buffer list remains valid as long as * @sample is valid. If you need to hold on to it for longer than * that, take a ref to the buffer list with gst_mini_object_ref (). * * Since: 1.6 */ public BufferList getBufferList() { auto p = gst_sample_get_buffer_list(gstSample); if(p is null) { return null; } return ObjectG.getDObject!(BufferList)(cast(GstBufferList*) p); } /** * Get the caps associated with @sample * * Returns: the caps of @sample or %NULL * when there is no caps. The caps remain valid as long as @sample is * valid. If you need to hold on to the caps for longer than that, * take a ref to the caps with gst_caps_ref(). */ public Caps getCaps() { auto p = gst_sample_get_caps(gstSample); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p); } /** * Get extra information associated with @sample. * * Returns: the extra info of @sample. * The info remains valid as long as @sample is valid. */ public Structure getInfo() { auto p = gst_sample_get_info(gstSample); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Get the segment associated with @sample * * Returns: the segment of @sample. * The segment remains valid as long as @sample is valid. */ public Segment getSegment() { auto p = gst_sample_get_segment(gstSample); if(p is null) { return null; } return ObjectG.getDObject!(Segment)(cast(GstSegment*) p); } /** * Set the buffer list associated with @sample * * Params: * bufferList = a #GstBufferList * * Since: 1.6 */ public void setBufferList(BufferList bufferList) { gst_sample_set_buffer_list(gstSample, (bufferList is null) ? null : bufferList.getBufferListStruct()); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Segment.d000066400000000000000000000451461324604450400220620ustar00rootroot00000000000000/* * 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 gstreamer.Segment; private import glib.ConstructionException; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * This helper structure holds the relevant values for tracking the region of * interest in a media file, called a segment. * * The structure can be used for two purposes: * * * performing seeks (handling seek events) * * tracking playback regions (handling newsegment events) * * The segment is usually configured by the application with a seek event which * is propagated upstream and eventually handled by an element that performs the seek. * * The configured segment is then propagated back downstream with a newsegment event. * This information is then used to clip media to the segment boundaries. * * A segment structure is initialized with gst_segment_init(), which takes a #GstFormat * that will be used as the format of the segment values. The segment will be configured * with a start value of 0 and a stop/duration of -1, which is undefined. The default * rate and applied_rate is 1.0. * * The public duration field contains the duration of the segment. When using * the segment for seeking, the start and time members should normally be left * to their default 0 value. The stop position is left to -1 unless explicitly * configured to a different value after a seek event. * * The current position in the segment should be set by changing the position * member in the structure. * * For elements that perform seeks, the current segment should be updated with the * gst_segment_do_seek() and the values from the seek event. This method will update * all the segment fields. The position field will contain the new playback position. * If the start_type was different from GST_SEEK_TYPE_NONE, playback continues from * the position position, possibly with updated flags or rate. * * For elements that want to use #GstSegment to track the playback region, * update the segment fields with the information from the newsegment event. * The gst_segment_clip() method can be used to check and clip * the media data to the segment boundaries. * * For elements that want to synchronize to the pipeline clock, gst_segment_to_running_time() * can be used to convert a timestamp to a value that can be used to synchronize * to the clock. This function takes into account the base as well as * any rate or applied_rate conversions. * * For elements that need to perform operations on media data in stream_time, * gst_segment_to_stream_time() can be used to convert a timestamp and the segment * info to stream time (which is always between 0 and the duration of the stream). */ public class Segment { /** the main Gtk struct */ protected GstSegment* gstSegment; protected bool ownedRef; /** Get the main Gtk struct */ public GstSegment* getSegmentStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstSegment; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstSegment; } /** * Sets our main struct and passes it to the parent class. */ public this (GstSegment* gstSegment, bool ownedRef = false) { this.gstSegment = gstSegment; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_segment_free(gstSegment); } /** */ public static GType getType() { return gst_segment_get_type(); } /** * Allocate a new #GstSegment structure and initialize it using * gst_segment_init(). * * Free-function: gst_segment_free * * Returns: a new #GstSegment, free with gst_segment_free(). * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_segment_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstSegment*) p); } /** * Clip the given @start and @stop values to the segment boundaries given * in @segment. @start and @stop are compared and clipped to @segment * start and stop values. * * If the function returns %FALSE, @start and @stop are known to fall * outside of @segment and @clip_start and @clip_stop are not updated. * * When the function returns %TRUE, @clip_start and @clip_stop will be * updated. If @clip_start or @clip_stop are different from @start or @stop * respectively, the region fell partially in the segment. * * Note that when @stop is -1, @clip_stop will be set to the end of the * segment. Depending on the use case, this may or may not be what you want. * * Params: * format = the format of the segment. * start = the start position in the segment * stop = the stop position in the segment * clipStart = the clipped start position in the segment * clipStop = the clipped stop position in the segment * * Returns: %TRUE if the given @start and @stop times fall partially or * completely in @segment, %FALSE if the values are completely outside * of the segment. */ public bool clip(GstFormat format, ulong start, ulong stop, out ulong clipStart, out ulong clipStop) { return gst_segment_clip(gstSegment, format, start, stop, &clipStart, &clipStop) != 0; } /** * Create a copy of given @segment. * * Free-function: gst_segment_free * * Returns: a new #GstSegment, free with gst_segment_free(). */ public Segment copy() { auto p = gst_segment_copy(gstSegment); if(p is null) { return null; } return ObjectG.getDObject!(Segment)(cast(GstSegment*) p, true); } /** * Copy the contents of @src into @dest. * * Params: * dest = a #GstSegment */ public void copyInto(Segment dest) { gst_segment_copy_into(gstSegment, (dest is null) ? null : dest.getSegmentStruct()); } /** * Update the segment structure with the field values of a seek event (see * gst_event_new_seek()). * * After calling this method, the segment field position and time will * contain the requested new position in the segment. The new requested * position in the segment depends on @rate and @start_type and @stop_type. * * For positive @rate, the new position in the segment is the new @segment * start field when it was updated with a @start_type different from * #GST_SEEK_TYPE_NONE. If no update was performed on @segment start position * (#GST_SEEK_TYPE_NONE), @start is ignored and @segment position is * unmodified. * * For negative @rate, the new position in the segment is the new @segment * stop field when it was updated with a @stop_type different from * #GST_SEEK_TYPE_NONE. If no stop was previously configured in the segment, the * duration of the segment will be used to update the stop position. * If no update was performed on @segment stop position (#GST_SEEK_TYPE_NONE), * @stop is ignored and @segment position is unmodified. * * The applied rate of the segment will be set to 1.0 by default. * If the caller can apply a rate change, it should update @segment * rate and applied_rate after calling this function. * * @update will be set to %TRUE if a seek should be performed to the segment * position field. This field can be %FALSE if, for example, only the @rate * has been changed but not the playback position. * * Params: * rate = the rate of the segment. * format = the format of the segment. * flags = the segment flags for the segment * startType = the seek method * start = the seek start value * stopType = the seek method * stop = the seek stop value * update = boolean holding whether position was updated. * * Returns: %TRUE if the seek could be performed. */ public bool doSeek(double rate, GstFormat format, GstSeekFlags flags, GstSeekType startType, ulong start, GstSeekType stopType, ulong stop, ref bool update) { int outupdate = (update ? 1 : 0); auto p = gst_segment_do_seek(gstSegment, rate, format, flags, startType, start, stopType, stop, &outupdate) != 0; update = (outupdate == 1); return p; } /** * Free the allocated segment @segment. */ public void free() { gst_segment_free(gstSegment); ownedRef = false; } /** * The start/position fields are set to 0 and the stop/duration * fields are set to -1 (unknown). The default rate of 1.0 and no * flags are set. * * Initialize @segment to its default values. * * Params: * format = the format of the segment. */ public void init(GstFormat format) { gst_segment_init(gstSegment, format); } /** * Checks for two segments being equal. Equality here is defined * as perfect equality, including floating point values. * * Params: * s1 = a #GstSegment structure. * * Returns: %TRUE if the segments are equal, %FALSE otherwise. * * Since: 1.6 */ public bool isEqual(Segment s1) { return gst_segment_is_equal(gstSegment, (s1 is null) ? null : s1.getSegmentStruct()) != 0; } /** * Adjust the values in @segment so that @offset is applied to all * future running-time calculations. * * Params: * format = the format of the segment. * offset = the offset to apply in the segment * * Returns: %TRUE if the segment could be updated successfully. If %FALSE is * returned, @offset is not in @segment. * * Since: 1.2.3 */ public bool offsetRunningTime(GstFormat format, long offset) { return gst_segment_offset_running_time(gstSegment, format, offset) != 0; } /** * Convert @running_time into a position in the segment so that * gst_segment_to_running_time() with that position returns @running_time. * * Params: * format = the format of the segment. * runningTime = the running_time in the segment * * Returns: the position in the segment for @running_time. This function returns * -1 when @running_time is -1 or when it is not inside @segment. * * Since: 1.8 */ public ulong positionFromRunningTime(GstFormat format, ulong runningTime) { return gst_segment_position_from_running_time(gstSegment, format, runningTime); } /** * Translate @running_time to the segment position using the currently configured * segment. Compared to gst_segment_position_from_running_time() this function can * return negative segment position. * * This function is typically used by elements that need to synchronize buffers * against the clock or each other. * * @running_time can be any value and the result of this function for values * outside of the segment is extrapolated. * * When 1 is returned, @running_time resulted in a positive position returned * in @position. * * When this function returns -1, the returned @position should be negated * to get the real negative segment position. * * Params: * format = the format of the segment. * runningTime = the running-time * position = the resulting position in the segment * * Returns: a 1 or -1 on success, 0 on failure. * * Since: 1.8 */ public int positionFromRunningTimeFull(GstFormat format, ulong runningTime, out ulong position) { return gst_segment_position_from_running_time_full(gstSegment, format, runningTime, &position); } /** * Convert @stream_time into a position in the segment so that * gst_segment_to_stream_time() with that position returns @stream_time. * * Params: * format = the format of the segment. * streamTime = the stream_time in the segment * * Returns: the position in the segment for @stream_time. This function returns * -1 when @stream_time is -1 or when it is not inside @segment. * * Since: 1.8 */ public ulong positionFromStreamTime(GstFormat format, ulong streamTime) { return gst_segment_position_from_stream_time(gstSegment, format, streamTime); } /** * Translate @stream_time to the segment position using the currently configured * segment. Compared to gst_segment_position_from_stream_time() this function can * return negative segment position. * * This function is typically used by elements that need to synchronize buffers * against the clock or each other. * * @stream_time can be any value and the result of this function for values outside * of the segment is extrapolated. * * When 1 is returned, @stream_time resulted in a positive position returned * in @position. * * When this function returns -1, the returned @position should be negated * to get the real negative segment position. * * Params: * format = the format of the segment. * streamTime = the stream-time * position = the resulting position in the segment * * Returns: a 1 or -1 on success, 0 on failure. * * Since: 1.8 */ public int positionFromStreamTimeFull(GstFormat format, ulong streamTime, out ulong position) { return gst_segment_position_from_stream_time_full(gstSegment, format, streamTime, &position); } /** * Adjust the start/stop and base values of @segment such that the next valid * buffer will be one with @running_time. * * Params: * format = the format of the segment. * runningTime = the running_time in the segment * * Returns: %TRUE if the segment could be updated successfully. If %FALSE is * returned, @running_time is -1 or not in @segment. */ public bool setRunningTime(GstFormat format, ulong runningTime) { return gst_segment_set_running_time(gstSegment, format, runningTime) != 0; } /** * Convert @running_time into a position in the segment so that * gst_segment_to_running_time() with that position returns @running_time. * * Params: * format = the format of the segment. * runningTime = the running_time in the segment * * Returns: the position in the segment for @running_time. This function returns * -1 when @running_time is -1 or when it is not inside @segment. * * Deprecated. Use gst_segment_position_from_running_time() instead. */ public ulong toPosition(GstFormat format, ulong runningTime) { return gst_segment_to_position(gstSegment, format, runningTime); } /** * Translate @position to the total running time using the currently configured * segment. Position is a value between @segment start and stop time. * * This function is typically used by elements that need to synchronize to the * global clock in a pipeline. The running time is a constantly increasing value * starting from 0. When gst_segment_init() is called, this value will reset to * 0. * * This function returns -1 if the position is outside of @segment start and stop. * * Params: * format = the format of the segment. * position = the position in the segment * * Returns: the position as the total running time or -1 when an invalid position * was given. */ public ulong toRunningTime(GstFormat format, ulong position) { return gst_segment_to_running_time(gstSegment, format, position); } /** * Translate @position to the total running time using the currently configured * segment. Compared to gst_segment_to_running_time() this function can return * negative running-time. * * This function is typically used by elements that need to synchronize buffers * against the clock or eachother. * * @position can be any value and the result of this function for values outside * of the segment is extrapolated. * * When 1 is returned, @position resulted in a positive running-time returned * in @running_time. * * When this function returns -1, the returned @running_time should be negated * to get the real negative running time. * * Params: * format = the format of the segment. * position = the position in the segment * runningTime = result running-time * * Returns: a 1 or -1 on success, 0 on failure. * * Since: 1.6 */ public int toRunningTimeFull(GstFormat format, ulong position, out ulong runningTime) { return gst_segment_to_running_time_full(gstSegment, format, position, &runningTime); } /** * Translate @position to stream time using the currently configured * segment. The @position value must be between @segment start and * stop value. * * This function is typically used by elements that need to operate on * the stream time of the buffers it receives, such as effect plugins. * In those use cases, @position is typically the buffer timestamp or * clock time that one wants to convert to the stream time. * The stream time is always between 0 and the total duration of the * media stream. * * Params: * format = the format of the segment. * position = the position in the segment * * Returns: the position in stream_time or -1 when an invalid position * was given. * * Since: 1.8 */ public ulong toStreamTime(GstFormat format, ulong position) { return gst_segment_to_stream_time(gstSegment, format, position); } /** * Translate @position to the total stream time using the currently configured * segment. Compared to gst_segment_to_stream_time() this function can return * negative stream-time. * * This function is typically used by elements that need to synchronize buffers * against the clock or eachother. * * @position can be any value and the result of this function for values outside * of the segment is extrapolated. * * When 1 is returned, @position resulted in a positive stream-time returned * in @stream_time. * * When this function returns -1, the returned @stream_time should be negated * to get the real negative stream time. * * Params: * format = the format of the segment. * position = the position in the segment * streamTime = result stream-time * * Returns: a 1 or -1 on success, 0 on failure. * * Since: 1.8 */ public int toStreamTimeFull(GstFormat format, ulong position, out ulong streamTime) { return gst_segment_to_stream_time_full(gstSegment, format, position, &streamTime); } } GtkD-3.7.5/generated/gstreamer/gstreamer/StaticCaps.d000066400000000000000000000047731324604450400225170ustar00rootroot00000000000000/* * 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 gstreamer.StaticCaps; private import gobject.ObjectG; private import gstreamer.Caps; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Datastructure to initialize #GstCaps from a string description usually * used in conjunction with GST_STATIC_CAPS() and gst_static_caps_get() to * instantiate a #GstCaps. */ public class StaticCaps { /** the main Gtk struct */ protected GstStaticCaps* gstStaticCaps; protected bool ownedRef; /** Get the main Gtk struct */ public GstStaticCaps* getStaticCapsStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstStaticCaps; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstStaticCaps; } /** * Sets our main struct and passes it to the parent class. */ public this (GstStaticCaps* gstStaticCaps, bool ownedRef = false) { this.gstStaticCaps = gstStaticCaps; this.ownedRef = ownedRef; } /** * Clean up the cached caps contained in @static_caps. */ public void cleanup() { gst_static_caps_cleanup(gstStaticCaps); } /** * Converts a #GstStaticCaps to a #GstCaps. * * Returns: a pointer to the #GstCaps. Unref after usage. * Since the core holds an additional ref to the returned caps, * use gst_caps_make_writable() on the returned caps to modify it. */ public Caps get() { auto p = gst_static_caps_get(gstStaticCaps); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } } GtkD-3.7.5/generated/gstreamer/gstreamer/StaticPadTemplate.d000066400000000000000000000077351324604450400240320ustar00rootroot00000000000000/* * 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 gstreamer.StaticPadTemplate; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; private import gstreamer.Caps; private import gstreamer.PadTemplate; private import gstreamer.StaticCaps; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * Structure describing the #GstStaticPadTemplate. */ public final class StaticPadTemplate { /** the main Gtk struct */ protected GstStaticPadTemplate* gstStaticPadTemplate; protected bool ownedRef; /** Get the main Gtk struct */ public GstStaticPadTemplate* getStaticPadTemplateStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstStaticPadTemplate; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstStaticPadTemplate; } /** * Sets our main struct and passes it to the parent class. */ public this (GstStaticPadTemplate* gstStaticPadTemplate, bool ownedRef = false) { this.gstStaticPadTemplate = gstStaticPadTemplate; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) g_free(gstStaticPadTemplate); } /** * the name of the template */ public @property string nameTemplate() { return Str.toString(gstStaticPadTemplate.nameTemplate); } /** Ditto */ public @property void nameTemplate(string value) { gstStaticPadTemplate.nameTemplate = Str.toStringz(value); } /** * the direction of the template */ public @property GstPadDirection direction() { return gstStaticPadTemplate.direction; } /** Ditto */ public @property void direction(GstPadDirection value) { gstStaticPadTemplate.direction = value; } /** * the presence of the template */ public @property GstPadPresence presence() { return gstStaticPadTemplate.presence; } /** Ditto */ public @property void presence(GstPadPresence value) { gstStaticPadTemplate.presence = value; } /** * the caps of the template. */ public @property GstStaticCaps staticCaps() { return gstStaticPadTemplate.staticCaps; } /** Ditto */ public @property void staticCaps(GstStaticCaps value) { gstStaticPadTemplate.staticCaps = value; } /** * Converts a #GstStaticPadTemplate into a #GstPadTemplate. * * Returns: a new #GstPadTemplate. */ public PadTemplate get() { auto p = gst_static_pad_template_get(gstStaticPadTemplate); if(p is null) { return null; } return ObjectG.getDObject!(PadTemplate)(cast(GstPadTemplate*) p, true); } /** * Gets the capabilities of the static pad template. * * Returns: the #GstCaps of the static pad template. * Unref after usage. Since the core holds an additional * ref to the returned caps, use gst_caps_make_writable() * on the returned caps to modify it. */ public Caps getCaps() { auto p = gst_static_pad_template_get_caps(gstStaticPadTemplate); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Stream.d000066400000000000000000000131051324604450400217010ustar00rootroot00000000000000/* * 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 gstreamer.Stream; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Caps; private import gstreamer.ObjectGst; private import gstreamer.TagList; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * A high-level object representing a single stream. It might be backed, or * not, by an actual flow of data in a pipeline (#GstPad). * * A #GstStream does not care about data changes (such as decoding, encoding, * parsing,...) as long as the underlying data flow corresponds to the same * high-level flow (ex: a certain audio track). * * A #GstStream contains all the information pertinent to a stream, such as * stream-id, tags, caps, type, ... * * Elements can subclass a #GstStream for internal usage (to contain information * pertinent to streams of data). */ public class Stream : ObjectGst { /** the main Gtk struct */ protected GstStream* gstStream; /** Get the main Gtk struct */ public GstStream* getStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstStream; } protected override void setStruct(GObject* obj) { gstStream = cast(GstStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstStream* gstStream, bool ownedRef = false) { this.gstStream = gstStream; super(cast(GstObject*)gstStream, ownedRef); } /** */ public static GType getType() { return gst_stream_get_type(); } /** * Create a new #GstStream for the given @stream_id, @caps, @type * and @flags * * Params: * streamId = the id for the new stream. If %NULL, * a new one will be automatically generated * caps = the #GstCaps of the stream * type = the #GstStreamType of the stream * flags = the #GstStreamFlags of the stream * * Returns: The new #GstStream * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string streamId, Caps caps, GstStreamType type, GstStreamFlags flags) { auto p = gst_stream_new(Str.toStringz(streamId), (caps is null) ? null : caps.getCapsStruct(), type, flags); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstStream*) p); } /** * Retrieve the caps for @stream, if any * * Returns: The #GstCaps for @stream * * Since: 1.10 */ public Caps getCaps() { auto p = gst_stream_get_caps(gstStream); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p, true); } /** * Retrieve the current stream flags for @stream * * Returns: The #GstStreamFlags for @stream * * Since: 1.10 */ public GstStreamFlags getStreamFlags() { return gst_stream_get_stream_flags(gstStream); } /** * Returns the stream ID of @stream. * * Returns: the stream ID of @stream. Only valid * during the lifetime of @stream. * * Since: 1.10 */ public string getStreamId() { return Str.toString(gst_stream_get_stream_id(gstStream)); } /** * Retrieve the stream type for @stream * * Returns: The #GstStreamType for @stream * * Since: 1.10 */ public GstStreamType getStreamType() { return gst_stream_get_stream_type(gstStream); } /** * Retrieve the tags for @stream, if any * * Returns: The #GstTagList for @stream * * Since: 1.10 */ public TagList getTags() { auto p = gst_stream_get_tags(gstStream); if(p is null) { return null; } return ObjectG.getDObject!(TagList)(cast(GstTagList*) p, true); } /** * Set the caps for the #GstStream * * Params: * caps = a #GstCaps * * Since: 1.10 */ public void setCaps(Caps caps) { gst_stream_set_caps(gstStream, (caps is null) ? null : caps.getCapsStruct()); } /** * Set the @flags for the @stream. * * Params: * flags = the flags to set on @stream * * Since: 1.10 */ public void setStreamFlags(GstStreamFlags flags) { gst_stream_set_stream_flags(gstStream, flags); } /** * Set the stream type of @stream * * Params: * streamType = the type to set on @stream * * Since: 1.10 */ public void setStreamType(GstStreamType streamType) { gst_stream_set_stream_type(gstStream, streamType); } /** * Set the tags for the #GstStream * * Params: * tags = a #GstTagList * * Since: 1.10 */ public void setTags(TagList tags) { gst_stream_set_tags(gstStream, (tags is null) ? null : tags.getTagListStruct()); } } GtkD-3.7.5/generated/gstreamer/gstreamer/StreamCollection.d000066400000000000000000000144641324604450400237260ustar00rootroot00000000000000/* * 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 gstreamer.StreamCollection; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.Signals; private import gstreamer.ObjectGst; private import gstreamer.Stream; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import std.algorithm; /** * A collection of #GstStream that are available. * * A #GstStreamCollection will be provided by elements that can make those * streams available. Applications can use the collection to show the user * what streams are available by using %gst_stream_collection_get_stream() * * Once posted, a #GstStreamCollection is immutable. Updates are made by sending * a new #GstStreamCollection message, which may or may not share some of * the #GstStream objects from the collection it replaces. The receiver can check * the sender of a stream collection message to know which collection is * obsoleted. * * Several elements in a pipeline can provide #GstStreamCollection. * * Applications can activate streams from a collection by using the * #GST_EVENT_SELECT_STREAMS event on a pipeline, bin or element. * * Since: 1.10 */ public class StreamCollection : ObjectGst { /** the main Gtk struct */ protected GstStreamCollection* gstStreamCollection; /** Get the main Gtk struct */ public GstStreamCollection* getStreamCollectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstStreamCollection; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstStreamCollection; } protected override void setStruct(GObject* obj) { gstStreamCollection = cast(GstStreamCollection*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstStreamCollection* gstStreamCollection, bool ownedRef = false) { this.gstStreamCollection = gstStreamCollection; super(cast(GstObject*)gstStreamCollection, ownedRef); } /** */ public static GType getType() { return gst_stream_collection_get_type(); } /** * Create a new #GstStreamCollection. * * Params: * upstreamId = The stream id of the parent stream * * Returns: The new #GstStreamCollection. * * Since: 1.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string upstreamId) { auto p = gst_stream_collection_new(Str.toStringz(upstreamId)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstStreamCollection*) p); } /** * Add the given @stream to the @collection. * * Params: * stream = the #GstStream to add * * Returns: %TRUE if the @stream was properly added, else %FALSE * * Since: 1.10 */ public bool addStream(Stream stream) { return gst_stream_collection_add_stream(gstStreamCollection, (stream is null) ? null : stream.getStreamStruct()) != 0; } /** * Get the number of streams this collection contains * * Returns: The number of streams that @collection contains * * Since: 1.10 */ public uint getSize() { return gst_stream_collection_get_size(gstStreamCollection); } /** * Retrieve the #GstStream with index @index from the collection. * * The caller should not modify the returned #GstStream * * Params: * index = Index of the stream to retrieve * * Returns: A #GstStream * * Since: 1.10 */ public Stream getStream(uint index) { auto p = gst_stream_collection_get_stream(gstStreamCollection, index); if(p is null) { return null; } return ObjectG.getDObject!(Stream)(cast(GstStream*) p); } /** * Returns the upstream id of the @collection. * * Returns: The upstream id * * Since: 1.10 */ public string getUpstreamId() { return Str.toString(gst_stream_collection_get_upstream_id(gstStreamCollection)); } protected class OnStreamNotifyDelegateWrapper { void delegate(Stream, ParamSpec, StreamCollection) dlg; gulong handlerId; this(void delegate(Stream, ParamSpec, StreamCollection) dlg) { this.dlg = dlg; onStreamNotifyListeners ~= this; } void remove(OnStreamNotifyDelegateWrapper source) { foreach(index, wrapper; onStreamNotifyListeners) { if (wrapper.handlerId == source.handlerId) { onStreamNotifyListeners[index] = null; onStreamNotifyListeners = std.algorithm.remove(onStreamNotifyListeners, index); break; } } } } OnStreamNotifyDelegateWrapper[] onStreamNotifyListeners; /** */ gulong addOnStreamNotify(void delegate(Stream, ParamSpec, StreamCollection) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnStreamNotifyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "stream-notify", cast(GCallback)&callBackStreamNotify, cast(void*)wrapper, cast(GClosureNotify)&callBackStreamNotifyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackStreamNotify(GstStreamCollection* streamcollectionStruct, GstStream* object, GParamSpec* p0, OnStreamNotifyDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Stream)(object), ObjectG.getDObject!(ParamSpec)(p0), wrapper.outer); } extern(C) static void callBackStreamNotifyDestroy(OnStreamNotifyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Structure.d000066400000000000000000001070331324604450400224520ustar00rootroot00000000000000/* * 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 gstreamer.Structure; private import glib.ConstructionException; private import glib.Date; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; private import gobject.ValueArray; private import gstreamer.DateTime; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; private import gtkd.Loader; /** * A #GstStructure is a collection of key/value pairs. The keys are expressed * as GQuarks and the values can be of any GType. * * In addition to the key/value pairs, a #GstStructure also has a name. The name * starts with a letter and can be filled by letters, numbers and any of "/-_.:". * * #GstStructure is used by various GStreamer subsystems to store information * in a flexible and extensible way. A #GstStructure does not have a refcount * because it usually is part of a higher level object such as #GstCaps, * #GstMessage, #GstEvent, #GstQuery. It provides a means to enforce mutability * using the refcount of the parent with the gst_structure_set_parent_refcount() * method. * * A #GstStructure can be created with gst_structure_new_empty() or * gst_structure_new(), which both take a name and an optional set of * key/value pairs along with the types of the values. * * Field values can be changed with gst_structure_set_value() or * gst_structure_set(). * * Field values can be retrieved with gst_structure_get_value() or the more * convenient gst_structure_get_*() functions. * * Fields can be removed with gst_structure_remove_field() or * gst_structure_remove_fields(). * * Strings in structures must be ASCII or UTF-8 encoded. Other encodings are * not allowed. Strings may be %NULL however. * * Be aware that the current #GstCaps / #GstStructure serialization into string * has limited support for nested #GstCaps / #GstStructure fields. It can only * support one level of nesting. Using more levels will lead to unexpected * behavior when using serialization features, such as gst_caps_to_string() or * gst_value_serialize() and their counterparts. */ public class Structure { /** the main Gtk struct */ protected GstStructure* gstStructure; protected bool ownedRef; /** Get the main Gtk struct */ public GstStructure* getStructureStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstStructure; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstStructure; } /** * Sets our main struct and passes it to the parent class. */ public this (GstStructure* gstStructure, bool ownedRef = false) { this.gstStructure = gstStructure; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GSTREAMER) && ownedRef ) gst_structure_free(gstStructure); } public static Structure fromString(string name) { auto p = gst_structure_new_from_string(Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by gst_structure_new_from_string(Str.toStringz(name))"); } return new Structure(cast(GstStructure*)p); //, true); } /** */ /** */ public static GType getType() { return gst_structure_get_type(); } /** * Creates a new, empty #GstStructure with the given @name. * * See gst_structure_set_name() for constraints on the @name parameter. * * Free-function: gst_structure_free * * Params: * name = name of new structure * * Returns: a new, empty #GstStructure * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name) { auto p = gst_structure_new_empty(Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by new_empty"); } this(cast(GstStructure*) p); } /** * Creates a new, empty #GstStructure with the given name as a GQuark. * * Free-function: gst_structure_free * * Params: * quark = name of new structure * * Returns: a new, empty #GstStructure * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GQuark quark) { auto p = gst_structure_new_id_empty(quark); if(p is null) { throw new ConstructionException("null returned by new_id_empty"); } this(cast(GstStructure*) p); } /** * Creates a new #GstStructure with the given @name. Structure fields * are set according to the varargs in a manner similar to * gst_structure_new(). * * See gst_structure_set_name() for constraints on the @name parameter. * * Free-function: gst_structure_free * * Params: * name = name of new structure * firstfield = name of first field to set * varargs = variable argument list * * Returns: a new #GstStructure * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, string firstfield, void* varargs) { auto p = gst_structure_new_valist(Str.toStringz(name), Str.toStringz(firstfield), varargs); if(p is null) { throw new ConstructionException("null returned by new_valist"); } this(cast(GstStructure*) p); } /** * Tries intersecting @struct1 and @struct2 and reports whether the result * would not be empty. * * Params: * struct2 = a #GstStructure * * Returns: %TRUE if intersection would not be empty */ public bool canIntersect(Structure struct2) { return gst_structure_can_intersect(gstStructure, (struct2 is null) ? null : struct2.getStructureStruct()) != 0; } /** * Duplicates a #GstStructure and all its fields and values. * * Free-function: gst_structure_free * * Returns: a new #GstStructure. */ public Structure copy() { auto p = gst_structure_copy(gstStructure); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); } /** * Calls the provided function once for each field in the #GstStructure. In * contrast to gst_structure_foreach(), the function may modify the fields. * In contrast to gst_structure_map_in_place(), the field is removed from * the structure if %FALSE is returned from the function. * The structure must be mutable. * * Params: * func = a function to call for each field * userData = private data * * Since: 1.6 */ public void filterAndMapInPlace(GstStructureFilterMapFunc func, void* userData) { gst_structure_filter_and_map_in_place(gstStructure, func, userData); } /** * Fixate all values in @structure using gst_value_fixate(). * @structure will be modified in-place and should be writable. */ public void fixate() { gst_structure_fixate(gstStructure); } /** * Fixates a #GstStructure by changing the given field with its fixated value. * * Params: * fieldName = a field in @structure * * Returns: %TRUE if the structure field could be fixated */ public bool fixateField(string fieldName) { return gst_structure_fixate_field(gstStructure, Str.toStringz(fieldName)) != 0; } /** * Fixates a #GstStructure by changing the given @field_name field to the given * @target boolean if that field is not fixed yet. * * Params: * fieldName = a field in @structure * target = the target value of the fixation * * Returns: %TRUE if the structure could be fixated */ public bool fixateFieldBoolean(string fieldName, bool target) { return gst_structure_fixate_field_boolean(gstStructure, Str.toStringz(fieldName), target) != 0; } /** * Fixates a #GstStructure by changing the given field to the nearest * double to @target that is a subset of the existing field. * * Params: * fieldName = a field in @structure * target = the target value of the fixation * * Returns: %TRUE if the structure could be fixated */ public bool fixateFieldNearestDouble(string fieldName, double target) { return gst_structure_fixate_field_nearest_double(gstStructure, Str.toStringz(fieldName), target) != 0; } /** * Fixates a #GstStructure by changing the given field to the nearest * fraction to @target_numerator/@target_denominator that is a subset * of the existing field. * * Params: * fieldName = a field in @structure * targetNumerator = The numerator of the target value of the fixation * targetDenominator = The denominator of the target value of the fixation * * Returns: %TRUE if the structure could be fixated */ public bool fixateFieldNearestFraction(string fieldName, int targetNumerator, int targetDenominator) { return gst_structure_fixate_field_nearest_fraction(gstStructure, Str.toStringz(fieldName), targetNumerator, targetDenominator) != 0; } /** * Fixates a #GstStructure by changing the given field to the nearest * integer to @target that is a subset of the existing field. * * Params: * fieldName = a field in @structure * target = the target value of the fixation * * Returns: %TRUE if the structure could be fixated */ public bool fixateFieldNearestInt(string fieldName, int target) { return gst_structure_fixate_field_nearest_int(gstStructure, Str.toStringz(fieldName), target) != 0; } /** * Fixates a #GstStructure by changing the given @field_name field to the given * @target string if that field is not fixed yet. * * Params: * fieldName = a field in @structure * target = the target value of the fixation * * Returns: %TRUE if the structure could be fixated */ public bool fixateFieldString(string fieldName, string target) { return gst_structure_fixate_field_string(gstStructure, Str.toStringz(fieldName), Str.toStringz(target)) != 0; } /** * Calls the provided function once for each field in the #GstStructure. The * function must not modify the fields. Also see gst_structure_map_in_place() * and gst_structure_filter_and_map_in_place(). * * Params: * func = a function to call for each field * userData = private data * * Returns: %TRUE if the supplied function returns %TRUE For each of the fields, * %FALSE otherwise. */ public bool foreac(GstStructureForeachFunc func, void* userData) { return gst_structure_foreach(gstStructure, func, userData) != 0; } /** * Frees a #GstStructure and all its fields and values. The structure must not * have a parent when this function is called. */ public void free() { gst_structure_free(gstStructure); ownedRef = false; } /** * This is useful in language bindings where unknown #GValue types are not * supported. This function will convert the %GST_TYPE_ARRAY and * %GST_TYPE_LIST into a newly allocated #GValueArray and return it through * @array. Be aware that this is slower then getting the #GValue directly. * * Params: * fieldname = the name of a field * array = a pointer to a #GValueArray * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain an int, this function * returns %FALSE. */ public bool getArray(string fieldname, out ValueArray array) { GValueArray* outarray = null; auto p = gst_structure_get_array(gstStructure, Str.toStringz(fieldname), &outarray) != 0; array = ObjectG.getDObject!(ValueArray)(outarray); return p; } /** * Sets the boolean pointed to by @value corresponding to the value of the * given field. Caller is responsible for making sure the field exists * and has the correct type. * * Params: * fieldname = the name of a field * value = a pointer to a #gboolean to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain a boolean, this * function returns %FALSE. */ public bool getBoolean(string fieldname, out bool value) { int outvalue; auto p = gst_structure_get_boolean(gstStructure, Str.toStringz(fieldname), &outvalue) != 0; value = (outvalue == 1); return p; } /** * Sets the clock time pointed to by @value corresponding to the clock time * of the given field. Caller is responsible for making sure the field exists * and has the correct type. * * Params: * fieldname = the name of a field * value = a pointer to a #GstClockTime to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain a #GstClockTime, this * function returns %FALSE. */ public bool getClockTime(string fieldname, out GstClockTime value) { return gst_structure_get_clock_time(gstStructure, Str.toStringz(fieldname), &value) != 0; } /** * Sets the date pointed to by @value corresponding to the date of the * given field. Caller is responsible for making sure the field exists * and has the correct type. * * On success @value will point to a newly-allocated copy of the date which * should be freed with g_date_free() when no longer needed (note: this is * inconsistent with e.g. gst_structure_get_string() which doesn't return a * copy of the string). * * Params: * fieldname = the name of a field * value = a pointer to a #GDate to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain a data, this function * returns %FALSE. */ public bool getDate(string fieldname, out Date value) { GDate* outvalue = null; auto p = gst_structure_get_date(gstStructure, Str.toStringz(fieldname), &outvalue) != 0; value = new Date(outvalue); return p; } /** * Sets the datetime pointed to by @value corresponding to the datetime of the * given field. Caller is responsible for making sure the field exists * and has the correct type. * * On success @value will point to a reference of the datetime which * should be unreffed with gst_date_time_unref() when no longer needed * (note: this is inconsistent with e.g. gst_structure_get_string() * which doesn't return a copy of the string). * * Params: * fieldname = the name of a field * value = a pointer to a #GstDateTime to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain a data, this function * returns %FALSE. */ public bool getDateTime(string fieldname, out DateTime value) { GstDateTime* outvalue = null; auto p = gst_structure_get_date_time(gstStructure, Str.toStringz(fieldname), &outvalue) != 0; value = ObjectG.getDObject!(DateTime)(outvalue); return p; } /** * Sets the double pointed to by @value corresponding to the value of the * given field. Caller is responsible for making sure the field exists * and has the correct type. * * Params: * fieldname = the name of a field * value = a pointer to a gdouble to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain a double, this * function returns %FALSE. */ public bool getDouble(string fieldname, out double value) { return gst_structure_get_double(gstStructure, Str.toStringz(fieldname), &value) != 0; } /** * Sets the int pointed to by @value corresponding to the value of the * given field. Caller is responsible for making sure the field exists, * has the correct type and that the enumtype is correct. * * Params: * fieldname = the name of a field * enumtype = the enum type of a field * value = a pointer to an int to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain an enum of the given * type, this function returns %FALSE. */ public bool getEnum(string fieldname, GType enumtype, out int value) { return gst_structure_get_enum(gstStructure, Str.toStringz(fieldname), enumtype, &value) != 0; } /** * Finds the field with the given name, and returns the type of the * value it contains. If the field is not found, G_TYPE_INVALID is * returned. * * Params: * fieldname = the name of the field * * Returns: the #GValue of the field */ public GType getFieldType(string fieldname) { return gst_structure_get_field_type(gstStructure, Str.toStringz(fieldname)); } /** * Read the GstFlagSet flags and mask out of the structure into the * provided pointers. * * Params: * fieldname = the name of a field * valueFlags = a pointer to a guint for the flags field * valueMask = a pointer to a guint for the mask field * * Returns: %TRUE if the values could be set correctly. If there was no field * with @fieldname or the existing field did not contain a GstFlagSet, this * function returns %FALSE. * * Since: 1.6 */ public bool getFlagset(string fieldname, out uint valueFlags, out uint valueMask) { return gst_structure_get_flagset(gstStructure, Str.toStringz(fieldname), &valueFlags, &valueMask) != 0; } /** * Sets the integers pointed to by @value_numerator and @value_denominator * corresponding to the value of the given field. Caller is responsible * for making sure the field exists and has the correct type. * * Params: * fieldname = the name of a field * valueNumerator = a pointer to an int to set * valueDenominator = a pointer to an int to set * * Returns: %TRUE if the values could be set correctly. If there was no field * with @fieldname or the existing field did not contain a GstFraction, this * function returns %FALSE. */ public bool getFraction(string fieldname, out int valueNumerator, out int valueDenominator) { return gst_structure_get_fraction(gstStructure, Str.toStringz(fieldname), &valueNumerator, &valueDenominator) != 0; } /** * Sets the int pointed to by @value corresponding to the value of the * given field. Caller is responsible for making sure the field exists * and has the correct type. * * Params: * fieldname = the name of a field * value = a pointer to an int to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain an int, this function * returns %FALSE. */ public bool getInt(string fieldname, out int value) { return gst_structure_get_int(gstStructure, Str.toStringz(fieldname), &value) != 0; } /** * Sets the #gint64 pointed to by @value corresponding to the value of the * given field. Caller is responsible for making sure the field exists * and has the correct type. * * Params: * fieldname = the name of a field * value = a pointer to a #gint64 to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain a #gint64, this function * returns %FALSE. * * Since: 1.4 */ public bool getInt64(string fieldname, out long value) { return gst_structure_get_int64(gstStructure, Str.toStringz(fieldname), &value) != 0; } /** * This is useful in language bindings where unknown #GValue types are not * supported. This function will convert the %GST_TYPE_ARRAY and * %GST_TYPE_LIST into a newly allocated GValueArray and return it through * @array. Be aware that this is slower then getting the #GValue directly. * * Params: * fieldname = the name of a field * array = a pointer to a #GValueArray * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain an int, this function * returns %FALSE. * * Since 1.12 */ public bool getList(string fieldname, out ValueArray array) { GValueArray* outarray = null; auto p = gst_structure_get_list(gstStructure, Str.toStringz(fieldname), &outarray) != 0; array = ObjectG.getDObject!(ValueArray)(outarray); return p; } /** * Get the name of @structure as a string. * * Returns: the name of the structure. */ public string getName() { return Str.toString(gst_structure_get_name(gstStructure)); } /** * Get the name of @structure as a GQuark. * * Returns: the quark representing the name of the structure. */ public GQuark getNameId() { return gst_structure_get_name_id(gstStructure); } /** * Finds the field corresponding to @fieldname, and returns the string * contained in the field's value. Caller is responsible for making * sure the field exists and has the correct type. * * The string should not be modified, and remains valid until the next * call to a gst_structure_*() function with the given structure. * * Params: * fieldname = the name of a field * * Returns: a pointer to the string or %NULL when the * field did not exist or did not contain a string. */ public string getString(string fieldname) { return Str.toString(gst_structure_get_string(gstStructure, Str.toStringz(fieldname))); } /** * Sets the uint pointed to by @value corresponding to the value of the * given field. Caller is responsible for making sure the field exists * and has the correct type. * * Params: * fieldname = the name of a field * value = a pointer to a uint to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain a uint, this function * returns %FALSE. */ public bool getUint(string fieldname, out uint value) { return gst_structure_get_uint(gstStructure, Str.toStringz(fieldname), &value) != 0; } /** * Sets the #guint64 pointed to by @value corresponding to the value of the * given field. Caller is responsible for making sure the field exists * and has the correct type. * * Params: * fieldname = the name of a field * value = a pointer to a #guint64 to set * * Returns: %TRUE if the value could be set correctly. If there was no field * with @fieldname or the existing field did not contain a #guint64, this function * returns %FALSE. * * Since: 1.4 */ public bool getUint64(string fieldname, out ulong value) { return gst_structure_get_uint64(gstStructure, Str.toStringz(fieldname), &value) != 0; } /** * Parses the variable arguments and reads fields from @structure accordingly. * valist-variant of gst_structure_get(). Look at the documentation of * gst_structure_get() for more details. * * Params: * firstFieldname = the name of the first field to read * args = variable arguments * * Returns: %TRUE, or %FALSE if there was a problem reading any of the fields */ public bool getValist(string firstFieldname, void* args) { return gst_structure_get_valist(gstStructure, Str.toStringz(firstFieldname), args) != 0; } /** * Get the value of the field with name @fieldname. * * Params: * fieldname = the name of the field to get * * Returns: the #GValue corresponding to the field with the given name. */ public Value getValue(string fieldname) { auto p = gst_structure_get_value(gstStructure, Str.toStringz(fieldname)); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Check if @structure contains a field named @fieldname. * * Params: * fieldname = the name of a field * * Returns: %TRUE if the structure contains a field with the given name */ public bool hasField(string fieldname) { return gst_structure_has_field(gstStructure, Str.toStringz(fieldname)) != 0; } /** * Check if @structure contains a field named @fieldname and with GType @type. * * Params: * fieldname = the name of a field * type = the type of a value * * Returns: %TRUE if the structure contains a field with the given name and type */ public bool hasFieldTyped(string fieldname, GType type) { return gst_structure_has_field_typed(gstStructure, Str.toStringz(fieldname), type) != 0; } /** * Checks if the structure has the given name * * Params: * name = structure name to check for * * Returns: %TRUE if @name matches the name of the structure. */ public bool hasName(string name) { return gst_structure_has_name(gstStructure, Str.toStringz(name)) != 0; } /** * Parses the variable arguments and reads fields from @structure accordingly. * valist-variant of gst_structure_id_get(). Look at the documentation of * gst_structure_id_get() for more details. * * Params: * firstFieldId = the quark of the first field to read * args = variable arguments * * Returns: %TRUE, or %FALSE if there was a problem reading any of the fields */ public bool idGetValist(GQuark firstFieldId, void* args) { return gst_structure_id_get_valist(gstStructure, firstFieldId, args) != 0; } /** * Get the value of the field with GQuark @field. * * Params: * field = the #GQuark of the field to get * * Returns: the #GValue corresponding to the field with the given name * identifier. */ public Value idGetValue(GQuark field) { auto p = gst_structure_id_get_value(gstStructure, field); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Check if @structure contains a field named @field. * * Params: * field = #GQuark of the field name * * Returns: %TRUE if the structure contains a field with the given name */ public bool idHasField(GQuark field) { return gst_structure_id_has_field(gstStructure, field) != 0; } /** * Check if @structure contains a field named @field and with GType @type. * * Params: * field = #GQuark of the field name * type = the type of a value * * Returns: %TRUE if the structure contains a field with the given name and type */ public bool idHasFieldTyped(GQuark field, GType type) { return gst_structure_id_has_field_typed(gstStructure, field, type) != 0; } /** * va_list form of gst_structure_id_set(). * * Params: * fieldname = the name of the field to set * varargs = variable arguments */ public void idSetValist(GQuark fieldname, void* varargs) { gst_structure_id_set_valist(gstStructure, fieldname, varargs); } /** * Sets the field with the given GQuark @field to @value. If the field * does not exist, it is created. If the field exists, the previous * value is replaced and freed. * * Params: * field = a #GQuark representing a field * value = the new value of the field */ public void idSetValue(GQuark field, Value value) { gst_structure_id_set_value(gstStructure, field, (value is null) ? null : value.getValueStruct()); } /** * Sets the field with the given GQuark @field to @value. If the field * does not exist, it is created. If the field exists, the previous * value is replaced and freed. * * Params: * field = a #GQuark representing a field * value = the new value of the field */ public void idTakeValue(GQuark field, Value value) { gst_structure_id_take_value(gstStructure, field, (value is null) ? null : value.getValueStruct()); } /** * Intersects @struct1 and @struct2 and returns the intersection. * * Params: * struct2 = a #GstStructure * * Returns: Intersection of @struct1 and @struct2 */ public Structure intersect(Structure struct2) { auto p = gst_structure_intersect(gstStructure, (struct2 is null) ? null : struct2.getStructureStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); } /** * Tests if the two #GstStructure are equal. * * Params: * structure2 = a #GstStructure. * * Returns: %TRUE if the two structures have the same name and field. */ public bool isEqual(Structure structure2) { return gst_structure_is_equal(gstStructure, (structure2 is null) ? null : structure2.getStructureStruct()) != 0; } /** * Checks if @subset is a subset of @superset, i.e. has the same * structure name and for all fields that are existing in @superset, * @subset has a value that is a subset of the value in @superset. * * Params: * superset = a potentially greater #GstStructure * * Returns: %TRUE if @subset is a subset of @superset */ public bool isSubset(Structure superset) { return gst_structure_is_subset(gstStructure, (superset is null) ? null : superset.getStructureStruct()) != 0; } /** * Calls the provided function once for each field in the #GstStructure. In * contrast to gst_structure_foreach(), the function may modify but not delete the * fields. The structure must be mutable. * * Params: * func = a function to call for each field * userData = private data * * Returns: %TRUE if the supplied function returns %TRUE For each of the fields, * %FALSE otherwise. */ public bool mapInPlace(GstStructureMapFunc func, void* userData) { return gst_structure_map_in_place(gstStructure, func, userData) != 0; } /** * Get the number of fields in the structure. * * Returns: the number of fields in the structure */ public int nFields() { return gst_structure_n_fields(gstStructure); } /** * Get the name of the given field number, counting from 0 onwards. * * Params: * index = the index to get the name of * * Returns: the name of the given field number */ public string nthFieldName(uint index) { return Str.toString(gst_structure_nth_field_name(gstStructure, index)); } /** * Removes all fields in a GstStructure. */ public void removeAllFields() { gst_structure_remove_all_fields(gstStructure); } /** * Removes the field with the given name. If the field with the given * name does not exist, the structure is unchanged. * * Params: * fieldname = the name of the field to remove */ public void removeField(string fieldname) { gst_structure_remove_field(gstStructure, Str.toStringz(fieldname)); } /** * va_list form of gst_structure_remove_fields(). * * Params: * fieldname = the name of the field to remove * varargs = %NULL-terminated list of more fieldnames to remove */ public void removeFieldsValist(string fieldname, void* varargs) { gst_structure_remove_fields_valist(gstStructure, Str.toStringz(fieldname), varargs); } /** * This is useful in language bindings where unknown GValue types are not * supported. This function will convert a @array to %GST_TYPE_ARRAY and set * the field specified by @fieldname. Be aware that this is slower then using * %GST_TYPE_ARRAY in a #GValue directly. * * Since 1.12 * * Params: * fieldname = the name of a field * array = a pointer to a #GValueArray */ public void setArray(string fieldname, ValueArray array) { gst_structure_set_array(gstStructure, Str.toStringz(fieldname), (array is null) ? null : array.getValueArrayStruct()); } /** * This is useful in language bindings where unknown GValue types are not * supported. This function will convert a @array to %GST_TYPE_ARRAY and set * the field specified by @fieldname. Be aware that this is slower then using * %GST_TYPE_ARRAY in a #GValue directly. * * Since 1.12 * * Params: * fieldname = the name of a field * array = a pointer to a #GValueArray */ public void setList(string fieldname, ValueArray array) { gst_structure_set_list(gstStructure, Str.toStringz(fieldname), (array is null) ? null : array.getValueArrayStruct()); } /** * Sets the name of the structure to the given @name. The string * provided is copied before being used. It must not be empty, start with a * letter and can be followed by letters, numbers and any of "/-_.:". * * Params: * name = the new name of the structure */ public void setName(string name) { gst_structure_set_name(gstStructure, Str.toStringz(name)); } /** * Sets the parent_refcount field of #GstStructure. This field is used to * determine whether a structure is mutable or not. This function should only be * called by code implementing parent objects of #GstStructure, as described in * the MT Refcounting section of the design documents. * * Params: * refcount = a pointer to the parent's refcount * * Returns: %TRUE if the parent refcount could be set. */ public bool setParentRefcount(int* refcount) { return gst_structure_set_parent_refcount(gstStructure, refcount) != 0; } /** * va_list form of gst_structure_set(). * * Params: * fieldname = the name of the field to set * varargs = variable arguments */ public void setValist(string fieldname, void* varargs) { gst_structure_set_valist(gstStructure, Str.toStringz(fieldname), varargs); } /** * Sets the field with the given name @field to @value. If the field * does not exist, it is created. If the field exists, the previous * value is replaced and freed. * * Params: * fieldname = the name of the field to set * value = the new value of the field */ public void setValue(string fieldname, Value value) { gst_structure_set_value(gstStructure, Str.toStringz(fieldname), (value is null) ? null : value.getValueStruct()); } /** * Sets the field with the given name @field to @value. If the field * does not exist, it is created. If the field exists, the previous * value is replaced and freed. The function will take ownership of @value. * * Params: * fieldname = the name of the field to set * value = the new value of the field */ public void takeValue(string fieldname, Value value) { gst_structure_take_value(gstStructure, Str.toStringz(fieldname), (value is null) ? null : value.getValueStruct()); } /** * Converts @structure to a human-readable string representation. * * For debugging purposes its easier to do something like this: * |[ * GST_LOG ("structure is %" GST_PTR_FORMAT, structure); * ]| * This prints the structure in human readable form. * * The current implementation of serialization will lead to unexpected results * when there are nested #GstCaps / #GstStructure deeper than one level. * * Free-function: g_free * * Returns: a pointer to string allocated by g_malloc(). * g_free() after usage. */ public override string toString() { auto retStr = gst_structure_to_string(gstStructure); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Creates a #GstStructure from a string representation. * If end is not %NULL, a pointer to the place inside the given string * where parsing ended will be returned. * * Free-function: gst_structure_free * * Params: * str = a string representation of a #GstStructure. * end = pointer to store the end of the string in. * * Returns: a new #GstStructure or %NULL * when the string could not be parsed. Free with * gst_structure_free() after use. */ public static Structure fromString(string str, out string end) { char* outend = null; auto p = gst_structure_from_string(Str.toStringz(str), &outend); end = Str.toString(outend); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p, true); } } GtkD-3.7.5/generated/gstreamer/gstreamer/SystemClock.d000066400000000000000000000064111324604450400227100ustar00rootroot00000000000000/* * 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 gstreamer.SystemClock; private import gobject.ObjectG; private import gstreamer.Clock; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * The GStreamer core provides a GstSystemClock based on the system time. * Asynchronous callbacks are scheduled from an internal thread. * * Clock implementors are encouraged to subclass this systemclock as it * implements the async notification. * * Subclasses can however override all of the important methods for sync and * async notifications to implement their own callback methods or blocking * wait operations. */ public class SystemClock : Clock { /** the main Gtk struct */ protected GstSystemClock* gstSystemClock; /** Get the main Gtk struct */ public GstSystemClock* getSystemClockStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstSystemClock; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstSystemClock; } protected override void setStruct(GObject* obj) { gstSystemClock = cast(GstSystemClock*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstSystemClock* gstSystemClock, bool ownedRef = false) { this.gstSystemClock = gstSystemClock; super(cast(GstClock*)gstSystemClock, ownedRef); } /** */ public static GType getType() { return gst_system_clock_get_type(); } /** * Get a handle to the default system clock. The refcount of the * clock will be increased so you need to unref the clock after * usage. * * Returns: the default clock. * * MT safe. */ public static Clock obtain() { auto p = gst_system_clock_obtain(); if(p is null) { return null; } return ObjectG.getDObject!(Clock)(cast(GstClock*) p, true); } /** * Sets the default system clock that can be obtained with * gst_system_clock_obtain(). * * This is mostly used for testing and debugging purposes when you * want to have control over the time reported by the default system * clock. * * MT safe. * * Params: * newClock = a #GstClock * * Since: 1.4 */ public static void setDefault(Clock newClock) { gst_system_clock_set_default((newClock is null) ? null : newClock.getClockStruct()); } } GtkD-3.7.5/generated/gstreamer/gstreamer/TagList.d000066400000000000000000000724301324604450400220230ustar00rootroot00000000000000/* * 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 gstreamer.TagList; private import glib.ConstructionException; private import glib.Date; private import glib.MemorySlice; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.DateTime; private import gstreamer.Sample; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * List of tags and values used to describe media metadata. * * Strings in structures must be ASCII or UTF-8 encoded. Other encodings are * not allowed. Strings must not be empty or %NULL. */ public class TagList { /** the main Gtk struct */ protected GstTagList* gstTagList; protected bool ownedRef; /** Get the main Gtk struct */ public GstTagList* getTagListStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstTagList; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstTagList; } /** * Sets our main struct and passes it to the parent class. */ public this (GstTagList* gstTagList, bool ownedRef = false) { this.gstTagList = gstTagList; this.ownedRef = ownedRef; } /** * Gets the #GType used for this tag. * * Params: * tag = the tag * * Returns: the #GType of this tag */ public static GType getType(string tag) { return gst_tag_get_type(Str.toStringz(tag)); } /** * Creates a new empty GstTagList. * * Free-function: gst_tag_list_unref * * Returns: An empty tag list * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_tag_list_new_empty(); if(p is null) { throw new ConstructionException("null returned by new_empty"); } this(cast(GstTagList*) p); } /** * Deserializes a tag list. * * Params: * str = a string created with gst_tag_list_to_string() * * Returns: a new #GstTagList, or %NULL in case of an * error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string str) { auto p = gst_tag_list_new_from_string(Str.toStringz(str)); if(p is null) { throw new ConstructionException("null returned by new_from_string"); } this(cast(GstTagList*) p); } /** * Just like gst_tag_list_new(), only that it takes a va_list argument. * Useful mostly for language bindings. * * Free-function: gst_tag_list_unref * * Params: * varArgs = tag / value pairs to set * * Returns: a new #GstTagList. Free with gst_tag_list_unref() * when no longer needed. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(void* varArgs) { auto p = gst_tag_list_new_valist(varArgs); if(p is null) { throw new ConstructionException("null returned by new_valist"); } this(cast(GstTagList*) p); } /** * Sets the values for the given tags using the specified mode. * * Params: * mode = the mode to use * tag = tag * varArgs = tag / value pairs to set */ public void addValist(GstTagMergeMode mode, string tag, void* varArgs) { gst_tag_list_add_valist(gstTagList, mode, Str.toStringz(tag), varArgs); } /** * Sets the GValues for the given tags using the specified mode. * * Params: * mode = the mode to use * tag = tag * varArgs = tag / GValue pairs to set */ public void addValistValues(GstTagMergeMode mode, string tag, void* varArgs) { gst_tag_list_add_valist_values(gstTagList, mode, Str.toStringz(tag), varArgs); } /** * Sets the GValue for a given tag using the specified mode. * * Params: * mode = the mode to use * tag = tag * value = GValue for this tag */ public void addValue(GstTagMergeMode mode, string tag, Value value) { gst_tag_list_add_value(gstTagList, mode, Str.toStringz(tag), (value is null) ? null : value.getValueStruct()); } /** * Calls the given function for each tag inside the tag list. Note that if there * is no tag, the function won't be called at all. * * Params: * func = function to be called for each tag * userData = user specified data */ public void foreac(GstTagForeachFunc func, void* userData) { gst_tag_list_foreach(gstTagList, func, userData); } /** * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * * Params: * tag = tag to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getBoolean(string tag, out bool value) { int outvalue; auto p = gst_tag_list_get_boolean(gstTagList, Str.toStringz(tag), &outvalue) != 0; value = (outvalue == 1); return p; } /** * Gets the value that is at the given index for the given tag in the given * list. * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getBooleanIndex(string tag, uint index, out bool value) { int outvalue; auto p = gst_tag_list_get_boolean_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = (outvalue == 1); return p; } /** * Copies the first date for the given tag in the taglist into the variable * pointed to by @value. Free the date with g_date_free() when it is no longer * needed. * * Free-function: g_date_free * * Params: * tag = tag to read out * value = address of a GDate pointer * variable to store the result into * * Returns: %TRUE, if a date was copied, %FALSE if the tag didn't exist in the * given list or if it was %NULL. */ public bool getDate(string tag, out Date value) { GDate* outvalue = null; auto p = gst_tag_list_get_date(gstTagList, Str.toStringz(tag), &outvalue) != 0; value = new Date(outvalue); return p; } /** * Gets the date that is at the given index for the given tag in the given * list and copies it into the variable pointed to by @value. Free the date * with g_date_free() when it is no longer needed. * * Free-function: g_date_free * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list or if it was %NULL. */ public bool getDateIndex(string tag, uint index, out Date value) { GDate* outvalue = null; auto p = gst_tag_list_get_date_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = new Date(outvalue); return p; } /** * Copies the first datetime for the given tag in the taglist into the variable * pointed to by @value. Unref the date with gst_date_time_unref() when * it is no longer needed. * * Free-function: gst_date_time_unref * * Params: * tag = tag to read out * value = address of a #GstDateTime * pointer variable to store the result into * * Returns: %TRUE, if a datetime was copied, %FALSE if the tag didn't exist in * the given list or if it was %NULL. */ public bool getDateTime(string tag, out DateTime value) { GstDateTime* outvalue = null; auto p = gst_tag_list_get_date_time(gstTagList, Str.toStringz(tag), &outvalue) != 0; value = ObjectG.getDObject!(DateTime)(outvalue); return p; } /** * Gets the datetime that is at the given index for the given tag in the given * list and copies it into the variable pointed to by @value. Unref the datetime * with gst_date_time_unref() when it is no longer needed. * * Free-function: gst_date_time_unref * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list or if it was %NULL. */ public bool getDateTimeIndex(string tag, uint index, out DateTime value) { GstDateTime* outvalue = null; auto p = gst_tag_list_get_date_time_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = ObjectG.getDObject!(DateTime)(outvalue); return p; } /** * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * * Params: * tag = tag to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getDouble(string tag, out double value) { return gst_tag_list_get_double(gstTagList, Str.toStringz(tag), &value) != 0; } /** * Gets the value that is at the given index for the given tag in the given * list. * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getDoubleIndex(string tag, uint index, out double value) { return gst_tag_list_get_double_index(gstTagList, Str.toStringz(tag), index, &value) != 0; } /** * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * * Params: * tag = tag to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getFloat(string tag, out float value) { return gst_tag_list_get_float(gstTagList, Str.toStringz(tag), &value) != 0; } /** * Gets the value that is at the given index for the given tag in the given * list. * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getFloatIndex(string tag, uint index, out float value) { return gst_tag_list_get_float_index(gstTagList, Str.toStringz(tag), index, &value) != 0; } /** * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * * Params: * tag = tag to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getInt(string tag, out int value) { return gst_tag_list_get_int(gstTagList, Str.toStringz(tag), &value) != 0; } /** */ public bool getInt64(string tag, long* value) { return gst_tag_list_get_int64(gstTagList, Str.toStringz(tag), value) != 0; } /** * Gets the value that is at the given index for the given tag in the given * list. * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getInt64Index(string tag, uint index, out long value) { return gst_tag_list_get_int64_index(gstTagList, Str.toStringz(tag), index, &value) != 0; } /** * Gets the value that is at the given index for the given tag in the given * list. * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getIntIndex(string tag, uint index, out int value) { return gst_tag_list_get_int_index(gstTagList, Str.toStringz(tag), index, &value) != 0; } /** * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * * Params: * tag = tag to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getPointer(string tag, out void* value) { return gst_tag_list_get_pointer(gstTagList, Str.toStringz(tag), &value) != 0; } /** * Gets the value that is at the given index for the given tag in the given * list. * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getPointerIndex(string tag, uint index, out void* value) { return gst_tag_list_get_pointer_index(gstTagList, Str.toStringz(tag), index, &value) != 0; } /** * Copies the first sample for the given tag in the taglist into the variable * pointed to by @sample. Free the sample with gst_sample_unref() when it is * no longer needed. You can retrieve the buffer from the sample using * gst_sample_get_buffer() and the associated caps (if any) with * gst_sample_get_caps(). * * Free-function: gst_sample_unref * * Params: * tag = tag to read out * sample = address of a GstSample * pointer variable to store the result into * * Returns: %TRUE, if a sample was returned, %FALSE if the tag didn't exist in * the given list or if it was %NULL. */ public bool getSample(string tag, out Sample sample) { GstSample* outsample = null; auto p = gst_tag_list_get_sample(gstTagList, Str.toStringz(tag), &outsample) != 0; sample = ObjectG.getDObject!(Sample)(outsample); return p; } /** * Gets the sample that is at the given index for the given tag in the given * list and copies it into the variable pointed to by @sample. Free the sample * with gst_sample_unref() when it is no longer needed. You can retrieve the * buffer from the sample using gst_sample_get_buffer() and the associated * caps (if any) with gst_sample_get_caps(). * * Free-function: gst_sample_unref * * Params: * tag = tag to read out * index = number of entry to read out * sample = address of a GstSample * pointer variable to store the result into * * Returns: %TRUE, if a sample was copied, %FALSE if the tag didn't exist in the * given list or if it was %NULL. */ public bool getSampleIndex(string tag, uint index, out Sample sample) { GstSample* outsample = null; auto p = gst_tag_list_get_sample_index(gstTagList, Str.toStringz(tag), index, &outsample) != 0; sample = ObjectG.getDObject!(Sample)(outsample); return p; } /** * Gets the scope of @list. * * Returns: The scope of @list */ public GstTagScope getScope() { return gst_tag_list_get_scope(gstTagList); } /** * Copies the contents for the given tag into the value, possibly merging * multiple values into one if multiple values are associated with the tag. * * Use gst_tag_list_get_string_index (list, tag, 0, value) if you want * to retrieve the first string associated with this tag unmodified. * * The resulting string in @value will be in UTF-8 encoding and should be * freed by the caller using g_free when no longer needed. The * returned string is also guaranteed to be non-%NULL and non-empty. * * Free-function: g_free * * Params: * tag = tag to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getString(string tag, out string value) { char* outvalue = null; auto p = gst_tag_list_get_string(gstTagList, Str.toStringz(tag), &outvalue) != 0; value = Str.toString(outvalue); return p; } /** * Gets the value that is at the given index for the given tag in the given * list. * * The resulting string in @value will be in UTF-8 encoding and should be * freed by the caller using g_free when no longer needed. The * returned string is also guaranteed to be non-%NULL and non-empty. * * Free-function: g_free * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getStringIndex(string tag, uint index, out string value) { char* outvalue = null; auto p = gst_tag_list_get_string_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = Str.toString(outvalue); return p; } /** * Checks how many value are stored in this tag list for the given tag. * * Params: * tag = the tag to query * * Returns: The number of tags stored */ public uint getTagSize(string tag) { return gst_tag_list_get_tag_size(gstTagList, Str.toStringz(tag)); } /** * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * * Params: * tag = tag to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getUint(string tag, out uint value) { return gst_tag_list_get_uint(gstTagList, Str.toStringz(tag), &value) != 0; } /** * Copies the contents for the given tag into the value, merging multiple values * into one if multiple values are associated with the tag. * * Params: * tag = tag to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getUint64(string tag, out ulong value) { return gst_tag_list_get_uint64(gstTagList, Str.toStringz(tag), &value) != 0; } /** * Gets the value that is at the given index for the given tag in the given * list. * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getUint64Index(string tag, uint index, out ulong value) { return gst_tag_list_get_uint64_index(gstTagList, Str.toStringz(tag), index, &value) != 0; } /** * Gets the value that is at the given index for the given tag in the given * list. * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public bool getUintIndex(string tag, uint index, out uint value) { return gst_tag_list_get_uint_index(gstTagList, Str.toStringz(tag), index, &value) != 0; } /** * Gets the value that is at the given index for the given tag in the given * list. * * Params: * tag = tag to read out * index = number of entry to read out * * Returns: The GValue for the specified * entry or %NULL if the tag wasn't available or the tag * doesn't have as many entries */ public Value getValueIndex(string tag, uint index) { auto p = gst_tag_list_get_value_index(gstTagList, Str.toStringz(tag), index); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Inserts the tags of the @from list into the first list using the given mode. * * Params: * from = list to merge from * mode = the mode to use */ public void insert(TagList from, GstTagMergeMode mode) { gst_tag_list_insert(gstTagList, (from is null) ? null : from.getTagListStruct(), mode); } /** * Checks if the given taglist is empty. * * Returns: %TRUE if the taglist is empty, otherwise %FALSE. */ public bool isEmpty() { return gst_tag_list_is_empty(gstTagList) != 0; } /** * Checks if the two given taglists are equal. * * Params: * list2 = a #GstTagList. * * Returns: %TRUE if the taglists are equal, otherwise %FALSE */ public bool isEqual(TagList list2) { return gst_tag_list_is_equal(gstTagList, (list2 is null) ? null : list2.getTagListStruct()) != 0; } /** * Merges the two given lists into a new list. If one of the lists is %NULL, a * copy of the other is returned. If both lists are %NULL, %NULL is returned. * * Free-function: gst_tag_list_unref * * Params: * list2 = second list to merge * mode = the mode to use * * Returns: the new list */ public TagList merge(TagList list2, GstTagMergeMode mode) { auto p = gst_tag_list_merge(gstTagList, (list2 is null) ? null : list2.getTagListStruct(), mode); if(p is null) { return null; } return ObjectG.getDObject!(TagList)(cast(GstTagList*) p, true); } /** * Get the number of tags in @list. * * Returns: The number of tags in @list. */ public int nTags() { return gst_tag_list_n_tags(gstTagList); } /** * Get the name of the tag in @list at @index. * * Params: * index = the index * * Returns: The name of the tag at @index. */ public string nthTagName(uint index) { return Str.toString(gst_tag_list_nth_tag_name(gstTagList, index)); } /** * Peeks at the value that is at the given index for the given tag in the given * list. * * The resulting string in @value will be in UTF-8 encoding and doesn't need * to be freed by the caller. The returned string is also guaranteed to * be non-%NULL and non-empty. * * Params: * tag = tag to read out * index = number of entry to read out * value = location for the result * * Returns: %TRUE, if a value was set, %FALSE if the tag didn't exist in the * given list. */ public bool peekStringIndex(string tag, uint index, out string value) { char* outvalue = null; auto p = gst_tag_list_peek_string_index(gstTagList, Str.toStringz(tag), index, &outvalue) != 0; value = Str.toString(outvalue); return p; } /** * Removes the given tag from the taglist. * * Params: * tag = tag to remove */ public void removeTag(string tag) { gst_tag_list_remove_tag(gstTagList, Str.toStringz(tag)); } /** * Sets the scope of @list to @scope. By default the scope * of a taglist is stream scope. * * Params: * scop = new scope for @list */ public void setScope(GstTagScope scop) { gst_tag_list_set_scope(gstTagList, scop); } /** * Serializes a tag list to a string. * * Returns: a newly-allocated string, or %NULL in case of * an error. The string must be freed with g_free() when no longer * needed. */ public override string toString() { auto retStr = gst_tag_list_to_string(gstTagList); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Copies the contents for the given tag into the value, * merging multiple values into one if multiple values are associated * with the tag. * You must g_value_unset() the value after use. * * Params: * dest = uninitialized #GValue to copy into * list = list to get the tag from * tag = tag to read out * * Returns: %TRUE, if a value was copied, %FALSE if the tag didn't exist in the * given list. */ public static bool copyValue(out Value dest, TagList list, string tag) { GValue* outdest = sliceNew!GValue(); auto p = gst_tag_list_copy_value(outdest, (list is null) ? null : list.getTagListStruct(), Str.toStringz(tag)) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); return p; } /** * Checks if the given type is already registered. * * Params: * tag = name of the tag * * Returns: %TRUE if the type is already registered */ public static bool exists(string tag) { return gst_tag_exists(Str.toStringz(tag)) != 0; } /** * Returns the human-readable description of this tag, You must not change or * free this string. * * Params: * tag = the tag * * Returns: the human-readable description of this tag */ public static string getDescription(string tag) { return Str.toString(gst_tag_get_description(Str.toStringz(tag))); } /** * Gets the flag of @tag. * * Params: * tag = the tag * * Returns: the flag of this tag. */ public static GstTagFlag getFlag(string tag) { return gst_tag_get_flag(Str.toStringz(tag)); } /** * Returns the human-readable name of this tag, You must not change or free * this string. * * Params: * tag = the tag * * Returns: the human-readable name of this tag */ public static string getNick(string tag) { return Str.toString(gst_tag_get_nick(Str.toStringz(tag))); } /** * Checks if the given tag is fixed. A fixed tag can only contain one value. * Unfixed tags can contain lists of values. * * Params: * tag = tag to check * * Returns: %TRUE, if the given tag is fixed. */ public static bool isFixed(string tag) { return gst_tag_is_fixed(Str.toStringz(tag)) != 0; } /** * This is a convenience function for the func argument of gst_tag_register(). * It concatenates all given strings using a comma. The tag must be registered * as a G_TYPE_STRING or this function will fail. * * Params: * dest = uninitialized GValue to store result in * src = GValue to copy from */ public static void mergeStringsWithComma(out Value dest, Value src) { GValue* outdest = sliceNew!GValue(); gst_tag_merge_strings_with_comma(outdest, (src is null) ? null : src.getValueStruct()); dest = ObjectG.getDObject!(Value)(outdest, true); } /** * This is a convenience function for the func argument of gst_tag_register(). * It creates a copy of the first value from the list. * * Params: * dest = uninitialized GValue to store result in * src = GValue to copy from */ public static void mergeUseFirst(out Value dest, Value src) { GValue* outdest = sliceNew!GValue(); gst_tag_merge_use_first(outdest, (src is null) ? null : src.getValueStruct()); dest = ObjectG.getDObject!(Value)(outdest, true); } /** * Registers a new tag type for the use with GStreamer's type system. If a type * with that name is already registered, that one is used. * The old registration may have used a different type however. So don't rely * on your supplied values. * * Important: if you do not supply a merge function the implication will be * that there can only be one single value for this tag in a tag list and * any additional values will silently be discarded when being added (unless * #GST_TAG_MERGE_REPLACE, #GST_TAG_MERGE_REPLACE_ALL, or * #GST_TAG_MERGE_PREPEND is used as merge mode, in which case the new * value will replace the old one in the list). * * The merge function will be called from gst_tag_list_copy_value() when * it is required that one or more values for a tag be condensed into * one single value. This may happen from gst_tag_list_get_string(), * gst_tag_list_get_int(), gst_tag_list_get_double() etc. What will happen * exactly in that case depends on how the tag was registered and if a * merge function was supplied and if so which one. * * Two default merge functions are provided: gst_tag_merge_use_first() and * gst_tag_merge_strings_with_comma(). * * Params: * name = the name or identifier string * flag = a flag describing the type of tag info * type = the type this data is in * nick = human-readable name * blurb = a human-readable description about this tag * func = function for merging multiple values of this tag, or %NULL */ public static void register(string name, GstTagFlag flag, GType type, string nick, string blurb, GstTagMergeFunc func) { gst_tag_register(Str.toStringz(name), flag, type, Str.toStringz(nick), Str.toStringz(blurb), func); } /** * Registers a new tag type for the use with GStreamer's type system. * * Same as gst_tag_register(), but @name, @nick, and @blurb must be * static strings or inlined strings, as they will not be copied. (GStreamer * plugins will be made resident once loaded, so this function can be used * even from dynamically loaded plugins.) * * Params: * name = the name or identifier string (string constant) * flag = a flag describing the type of tag info * type = the type this data is in * nick = human-readable name or short description (string constant) * blurb = a human-readable description for this tag (string constant) * func = function for merging multiple values of this tag, or %NULL */ public static void registerStatic(string name, GstTagFlag flag, GType type, string nick, string blurb, GstTagMergeFunc func) { gst_tag_register_static(Str.toStringz(name), flag, type, Str.toStringz(nick), Str.toStringz(blurb), func); } } GtkD-3.7.5/generated/gstreamer/gstreamer/TagSetterIF.d000066400000000000000000000126161324604450400225750ustar00rootroot00000000000000/* * 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 gstreamer.TagSetterIF; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.TagList; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Element interface that allows setting of media metadata. * * Elements that support changing a stream's metadata will implement this * interface. Examples of such elements are 'vorbisenc', 'theoraenc' and * 'id3v2mux'. * * If you just want to retrieve metadata in your application then all you * need to do is watch for tag messages on your pipeline's bus. This * interface is only for setting metadata, not for extracting it. To set tags * from the application, find tagsetter elements and set tags using e.g. * gst_tag_setter_merge_tags() or gst_tag_setter_add_tags(). Also consider * setting the #GstTagMergeMode that is used for tag events that arrive at the * tagsetter element (default mode is to keep existing tags). * The application should do that before the element goes to %GST_STATE_PAUSED. * * Elements implementing the #GstTagSetter interface often have to merge * any tags received from upstream and the tags set by the application via * the interface. This can be done like this: * * |[ * GstTagMergeMode merge_mode; * const GstTagList *application_tags; * const GstTagList *event_tags; * GstTagSetter *tagsetter; * GstTagList *result; * * tagsetter = GST_TAG_SETTER (element); * * merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter); * application_tags = gst_tag_setter_get_tag_list (tagsetter); * event_tags = (const GstTagList *) element->event_tags; * * GST_LOG_OBJECT (tagsetter, "merging tags, merge mode = %d", merge_mode); * GST_LOG_OBJECT (tagsetter, "event tags: %" GST_PTR_FORMAT, event_tags); * GST_LOG_OBJECT (tagsetter, "set tags: %" GST_PTR_FORMAT, application_tags); * * result = gst_tag_list_merge (application_tags, event_tags, merge_mode); * * GST_LOG_OBJECT (tagsetter, "final tags: %" GST_PTR_FORMAT, result); * ]| */ public interface TagSetterIF{ /** Get the main Gtk struct */ public GstTagSetter* getTagSetterStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gst_tag_setter_get_type(); } /** * Adds the given tag / value pairs on the setter using the given merge mode. * The list must be terminated with %NULL. * * Params: * mode = the mode to use * tag = tag to set * varArgs = tag / value pairs to set */ public void addTagValist(GstTagMergeMode mode, string tag, void* varArgs); /** * Adds the given tag / GValue pairs on the setter using the given merge mode. * The list must be terminated with %NULL. * * Params: * mode = the mode to use * tag = tag to set * varArgs = tag / GValue pairs to set */ public void addTagValistValues(GstTagMergeMode mode, string tag, void* varArgs); /** * Adds the given tag / GValue pair on the setter using the given merge mode. * * Params: * mode = the mode to use * tag = tag to set * value = GValue to set for the tag */ public void addTagValue(GstTagMergeMode mode, string tag, Value value); /** * Returns the current list of tags the setter uses. The list should not be * modified or freed. * * This function is not thread-safe. * * Returns: a current snapshot of the * taglist used in the setter or %NULL if none is used. */ public TagList getTagList(); /** * Queries the mode by which tags inside the setter are overwritten by tags * from events * * Returns: the merge mode used inside the element. */ public GstTagMergeMode getTagMergeMode(); /** * Merges the given list into the setter's list using the given mode. * * Params: * list = a tag list to merge from * mode = the mode to merge with */ public void mergeTags(TagList list, GstTagMergeMode mode); /** * Reset the internal taglist. Elements should call this from within the * state-change handler. */ public void resetTags(); /** * Sets the given merge mode that is used for adding tags from events to tags * specified by this interface. The default is #GST_TAG_MERGE_KEEP, which keeps * the tags set with this interface and discards tags from events. * * Params: * mode = The mode with which tags are added */ public void setTagMergeMode(GstTagMergeMode mode); } GtkD-3.7.5/generated/gstreamer/gstreamer/TagSetterT.d000066400000000000000000000142011324604450400224720ustar00rootroot00000000000000/* * 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 gstreamer.TagSetterT; public import glib.Str; public import gobject.ObjectG; public import gobject.Value; public import gstreamer.TagList; public import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Element interface that allows setting of media metadata. * * Elements that support changing a stream's metadata will implement this * interface. Examples of such elements are 'vorbisenc', 'theoraenc' and * 'id3v2mux'. * * If you just want to retrieve metadata in your application then all you * need to do is watch for tag messages on your pipeline's bus. This * interface is only for setting metadata, not for extracting it. To set tags * from the application, find tagsetter elements and set tags using e.g. * gst_tag_setter_merge_tags() or gst_tag_setter_add_tags(). Also consider * setting the #GstTagMergeMode that is used for tag events that arrive at the * tagsetter element (default mode is to keep existing tags). * The application should do that before the element goes to %GST_STATE_PAUSED. * * Elements implementing the #GstTagSetter interface often have to merge * any tags received from upstream and the tags set by the application via * the interface. This can be done like this: * * |[ * GstTagMergeMode merge_mode; * const GstTagList *application_tags; * const GstTagList *event_tags; * GstTagSetter *tagsetter; * GstTagList *result; * * tagsetter = GST_TAG_SETTER (element); * * merge_mode = gst_tag_setter_get_tag_merge_mode (tagsetter); * application_tags = gst_tag_setter_get_tag_list (tagsetter); * event_tags = (const GstTagList *) element->event_tags; * * GST_LOG_OBJECT (tagsetter, "merging tags, merge mode = %d", merge_mode); * GST_LOG_OBJECT (tagsetter, "event tags: %" GST_PTR_FORMAT, event_tags); * GST_LOG_OBJECT (tagsetter, "set tags: %" GST_PTR_FORMAT, application_tags); * * result = gst_tag_list_merge (application_tags, event_tags, merge_mode); * * GST_LOG_OBJECT (tagsetter, "final tags: %" GST_PTR_FORMAT, result); * ]| */ public template TagSetterT(TStruct) { /** Get the main Gtk struct */ public GstTagSetter* getTagSetterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GstTagSetter*)getStruct(); } /** * Adds the given tag / value pairs on the setter using the given merge mode. * The list must be terminated with %NULL. * * Params: * mode = the mode to use * tag = tag to set * varArgs = tag / value pairs to set */ public void addTagValist(GstTagMergeMode mode, string tag, void* varArgs) { gst_tag_setter_add_tag_valist(getTagSetterStruct(), mode, Str.toStringz(tag), varArgs); } /** * Adds the given tag / GValue pairs on the setter using the given merge mode. * The list must be terminated with %NULL. * * Params: * mode = the mode to use * tag = tag to set * varArgs = tag / GValue pairs to set */ public void addTagValistValues(GstTagMergeMode mode, string tag, void* varArgs) { gst_tag_setter_add_tag_valist_values(getTagSetterStruct(), mode, Str.toStringz(tag), varArgs); } /** * Adds the given tag / GValue pair on the setter using the given merge mode. * * Params: * mode = the mode to use * tag = tag to set * value = GValue to set for the tag */ public void addTagValue(GstTagMergeMode mode, string tag, Value value) { gst_tag_setter_add_tag_value(getTagSetterStruct(), mode, Str.toStringz(tag), (value is null) ? null : value.getValueStruct()); } /** * Returns the current list of tags the setter uses. The list should not be * modified or freed. * * This function is not thread-safe. * * Returns: a current snapshot of the * taglist used in the setter or %NULL if none is used. */ public TagList getTagList() { auto p = gst_tag_setter_get_tag_list(getTagSetterStruct()); if(p is null) { return null; } return ObjectG.getDObject!(TagList)(cast(GstTagList*) p); } /** * Queries the mode by which tags inside the setter are overwritten by tags * from events * * Returns: the merge mode used inside the element. */ public GstTagMergeMode getTagMergeMode() { return gst_tag_setter_get_tag_merge_mode(getTagSetterStruct()); } /** * Merges the given list into the setter's list using the given mode. * * Params: * list = a tag list to merge from * mode = the mode to merge with */ public void mergeTags(TagList list, GstTagMergeMode mode) { gst_tag_setter_merge_tags(getTagSetterStruct(), (list is null) ? null : list.getTagListStruct(), mode); } /** * Reset the internal taglist. Elements should call this from within the * state-change handler. */ public void resetTags() { gst_tag_setter_reset_tags(getTagSetterStruct()); } /** * Sets the given merge mode that is used for adding tags from events to tags * specified by this interface. The default is #GST_TAG_MERGE_KEEP, which keeps * the tags set with this interface and discards tags from events. * * Params: * mode = The mode with which tags are added */ public void setTagMergeMode(GstTagMergeMode mode) { gst_tag_setter_set_tag_merge_mode(getTagSetterStruct(), mode); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Task.d000066400000000000000000000230341324604450400213520ustar00rootroot00000000000000/* * 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 gstreamer.Task; private import glib.ConstructionException; private import glib.RecMutex; private import gobject.ObjectG; private import gstreamer.ObjectGst; private import gstreamer.TaskPool; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * #GstTask is used by #GstElement and #GstPad to provide the data passing * threads in a #GstPipeline. * * A #GstPad will typically start a #GstTask to push or pull data to/from the * peer pads. Most source elements start a #GstTask to push data. In some cases * a demuxer element can start a #GstTask to pull data from a peer element. This * is typically done when the demuxer can perform random access on the upstream * peer element for improved performance. * * Although convenience functions exist on #GstPad to start/pause/stop tasks, it * might sometimes be needed to create a #GstTask manually if it is not related to * a #GstPad. * * Before the #GstTask can be run, it needs a #GRecMutex that can be set with * gst_task_set_lock(). * * The task can be started, paused and stopped with gst_task_start(), gst_task_pause() * and gst_task_stop() respectively or with the gst_task_set_state() function. * * A #GstTask will repeatedly call the #GstTaskFunction with the user data * that was provided when creating the task with gst_task_new(). While calling * the function it will acquire the provided lock. The provided lock is released * when the task pauses or stops. * * Stopping a task with gst_task_stop() will not immediately make sure the task is * not running anymore. Use gst_task_join() to make sure the task is completely * stopped and the thread is stopped. * * After creating a #GstTask, use gst_object_unref() to free its resources. This can * only be done when the task is not running anymore. * * Task functions can send a #GstMessage to send out-of-band data to the * application. The application can receive messages from the #GstBus in its * mainloop. * * For debugging purposes, the task will configure its object name as the thread * name on Linux. Please note that the object name should be configured before the * task is started; changing the object name after the task has been started, has * no effect on the thread name. */ public class Task : ObjectGst { /** the main Gtk struct */ protected GstTask* gstTask; /** Get the main Gtk struct */ public GstTask* getTaskStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstTask; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstTask; } protected override void setStruct(GObject* obj) { gstTask = cast(GstTask*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstTask* gstTask, bool ownedRef = false) { this.gstTask = gstTask; super(cast(GstObject*)gstTask, ownedRef); } /** */ public static GType getType() { return gst_task_get_type(); } /** * Create a new Task that will repeatedly call the provided @func * with @user_data as a parameter. Typically the task will run in * a new thread. * * The function cannot be changed after the task has been created. You * must create a new #GstTask to change the function. * * This function will not yet create and start a thread. Use gst_task_start() or * gst_task_pause() to create and start the GThread. * * Before the task can be used, a #GRecMutex must be configured using the * gst_task_set_lock() function. This lock will always be acquired while * @func is called. * * Params: * func = The #GstTaskFunction to use * userData = User data to pass to @func * notify = the function to call when @user_data is no longer needed. * * Returns: A new #GstTask. * * MT safe. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstTaskFunction func, void* userData, GDestroyNotify notify) { auto p = gst_task_new(func, userData, notify); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstTask*) p, true); } /** * Wait for all tasks to be stopped. This is mainly used internally * to ensure proper cleanup of internal data structures in test suites. * * MT safe. */ public static void cleanupAll() { gst_task_cleanup_all(); } /** * Get the #GstTaskPool that this task will use for its streaming * threads. * * MT safe. * * Returns: the #GstTaskPool used by @task. gst_object_unref() * after usage. */ public TaskPool getPool() { auto p = gst_task_get_pool(gstTask); if(p is null) { return null; } return ObjectG.getDObject!(TaskPool)(cast(GstTaskPool*) p, true); } /** * Get the current state of the task. * * Returns: The #GstTaskState of the task * * MT safe. */ public GstTaskState getState() { return gst_task_get_state(gstTask); } /** * Joins @task. After this call, it is safe to unref the task * and clean up the lock set with gst_task_set_lock(). * * The task will automatically be stopped with this call. * * This function cannot be called from within a task function as this * would cause a deadlock. The function will detect this and print a * g_warning. * * Returns: %TRUE if the task could be joined. * * MT safe. */ public bool join() { return gst_task_join(gstTask) != 0; } /** * Pauses @task. This method can also be called on a task in the * stopped state, in which case a thread will be started and will remain * in the paused state. This function does not wait for the task to complete * the paused state. * * Returns: %TRUE if the task could be paused. * * MT safe. */ public bool pause() { return gst_task_pause(gstTask) != 0; } /** * Call @enter_func when the task function of @task is entered. @user_data will * be passed to @enter_func and @notify will be called when @user_data is no * longer referenced. * * Params: * enterFunc = a #GstTaskThreadFunc * userData = user data passed to @enter_func * notify = called when @user_data is no longer referenced */ public void setEnterCallback(GstTaskThreadFunc enterFunc, void* userData, GDestroyNotify notify) { gst_task_set_enter_callback(gstTask, enterFunc, userData, notify); } /** * Call @leave_func when the task function of @task is left. @user_data will * be passed to @leave_func and @notify will be called when @user_data is no * longer referenced. * * Params: * leaveFunc = a #GstTaskThreadFunc * userData = user data passed to @leave_func * notify = called when @user_data is no longer referenced */ public void setLeaveCallback(GstTaskThreadFunc leaveFunc, void* userData, GDestroyNotify notify) { gst_task_set_leave_callback(gstTask, leaveFunc, userData, notify); } /** * Set the mutex used by the task. The mutex will be acquired before * calling the #GstTaskFunction. * * This function has to be called before calling gst_task_pause() or * gst_task_start(). * * MT safe. * * Params: * mutex = The #GRecMutex to use */ public void setLock(RecMutex mutex) { gst_task_set_lock(gstTask, (mutex is null) ? null : mutex.getRecMutexStruct()); } /** * Set @pool as the new GstTaskPool for @task. Any new streaming threads that * will be created by @task will now use @pool. * * MT safe. * * Params: * pool = a #GstTaskPool */ public void setPool(TaskPool pool) { gst_task_set_pool(gstTask, (pool is null) ? null : pool.getTaskPoolStruct()); } /** * Sets the state of @task to @state. * * The @task must have a lock associated with it using * gst_task_set_lock() when going to GST_TASK_STARTED or GST_TASK_PAUSED or * this function will return %FALSE. * * MT safe. * * Params: * state = the new task state * * Returns: %TRUE if the state could be changed. */ public bool setState(GstTaskState state) { return gst_task_set_state(gstTask, state) != 0; } /** * Starts @task. The @task must have a lock associated with it using * gst_task_set_lock() or this function will return %FALSE. * * Returns: %TRUE if the task could be started. * * MT safe. */ public bool start() { return gst_task_start(gstTask) != 0; } /** * Stops @task. This method merely schedules the task to stop and * will not wait for the task to have completely stopped. Use * gst_task_join() to stop and wait for completion. * * Returns: %TRUE if the task could be stopped. * * MT safe. */ public bool stop() { return gst_task_stop(gstTask) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/TaskPool.d000066400000000000000000000100011324604450400221720ustar00rootroot00000000000000/* * 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 gstreamer.TaskPool; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * This object provides an abstraction for creating threads. The default * implementation uses a regular GThreadPool to start tasks. * * Subclasses can be made to create custom threads. */ public class TaskPool : ObjectGst { /** the main Gtk struct */ protected GstTaskPool* gstTaskPool; /** Get the main Gtk struct */ public GstTaskPool* getTaskPoolStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstTaskPool; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstTaskPool; } protected override void setStruct(GObject* obj) { gstTaskPool = cast(GstTaskPool*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstTaskPool* gstTaskPool, bool ownedRef = false) { this.gstTaskPool = gstTaskPool; super(cast(GstObject*)gstTaskPool, ownedRef); } /** */ public static GType getType() { return gst_task_pool_get_type(); } /** * Create a new default task pool. The default task pool will use a regular * GThreadPool for threads. * * Returns: a new #GstTaskPool. gst_object_unref() after usage. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gst_task_pool_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstTaskPool*) p, true); } /** * Wait for all tasks to be stopped. This is mainly used internally * to ensure proper cleanup of internal data structures in test suites. * * MT safe. */ public void cleanup() { gst_task_pool_cleanup(gstTaskPool); } /** * Join a task and/or return it to the pool. @id is the id obtained from * gst_task_pool_push(). * * Params: * id = the id */ public void join(void* id) { gst_task_pool_join(gstTaskPool, id); } /** * Prepare the taskpool for accepting gst_task_pool_push() operations. * * MT safe. * * Throws: GException on failure. */ public void prepare() { GError* err = null; gst_task_pool_prepare(gstTaskPool, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } } /** * Start the execution of a new thread from @pool. * * Params: * func = the function to call * userData = data to pass to @func * * Returns: a pointer that should be used * for the gst_task_pool_join function. This pointer can be %NULL, you * must check @error to detect errors. * * Throws: GException on failure. */ public void* push(GstTaskPoolFunction func, void* userData) { GError* err = null; auto p = gst_task_pool_push(gstTaskPool, func, userData, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gstreamer/gstreamer/Toc.d000066400000000000000000000156711324604450400212050ustar00rootroot00000000000000/* * 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 gstreamer.Toc; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.TagList; private import gstreamer.TocEntry; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * #GstToc functions are used to create/free #GstToc and #GstTocEntry structures. * Also they are used to convert #GstToc into #GstStructure and vice versa. * * #GstToc lets you to inform other elements in pipeline or application that playing * source has some kind of table of contents (TOC). These may be chapters, editions, * angles or other types. For example: DVD chapters, Matroska chapters or cue sheet * TOC. Such TOC will be useful for applications to display instead of just a * playlist. * * Using TOC is very easy. Firstly, create #GstToc structure which represents root * contents of the source. You can also attach TOC-specific tags to it. Then fill * it with #GstTocEntry entries by appending them to the #GstToc using * gst_toc_append_entry(), and appending subentries to a #GstTocEntry using * gst_toc_entry_append_sub_entry(). * * Note that root level of the TOC can contain only either editions or chapters. You * should not mix them together at the same level. Otherwise you will get serialization * /deserialization errors. Make sure that no one of the entries has negative start and * stop values. * * Use gst_event_new_toc() to create a new TOC #GstEvent, and gst_event_parse_toc() to * parse received TOC event. Use gst_event_new_toc_select() to create a new TOC select #GstEvent, * and gst_event_parse_toc_select() to parse received TOC select event. The same rule for * the #GstMessage: gst_message_new_toc() to create new TOC #GstMessage, and * gst_message_parse_toc() to parse received TOC message. * * TOCs can have global scope or current scope. Global scope TOCs contain * all entries that can possibly be selected using a toc select event, and * are what an application is usually interested in. TOCs with current scope * only contain the parts of the TOC relevant to the currently selected/playing * stream; the current scope TOC is used by downstream elements such as muxers * to write correct TOC entries when transcoding files, for example. When * playing a DVD, the global TOC would contain a hierarchy of all titles, * chapters and angles, for example, while the current TOC would only contain * the chapters for the currently playing title if playback of a specific * title was requested. * * Applications and plugins should not rely on TOCs having a certain kind of * structure, but should allow for different alternatives. For example, a * simple CUE sheet embedded in a file may be presented as a flat list of * track entries, or could have a top-level edition node (or some other * alternative type entry) with track entries underneath that node; or even * multiple top-level edition nodes (or some other alternative type entries) * each with track entries underneath, in case the source file has extracted * a track listing from different sources). */ public class Toc { /** the main Gtk struct */ protected GstToc* gstToc; protected bool ownedRef; /** Get the main Gtk struct */ public GstToc* getTocStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstToc; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstToc; } /** * Sets our main struct and passes it to the parent class. */ public this (GstToc* gstToc, bool ownedRef = false) { this.gstToc = gstToc; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_toc_get_type(); } /** * Create a new #GstToc structure. * * Params: * scop = scope of this TOC * * Returns: newly allocated #GstToc structure, free it * with gst_toc_unref(). * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstTocScope scop) { auto p = gst_toc_new(scop); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstToc*) p); } /** * Appends the #GstTocEntry @entry to @toc. * * Params: * entry = A #GstTocEntry */ public void appendEntry(TocEntry entry) { gst_toc_append_entry(gstToc, (entry is null) ? null : entry.getTocEntryStruct()); } /** */ public void dump() { gst_toc_dump(gstToc); } /** * Find #GstTocEntry with given @uid in the @toc. * * Params: * uid = UID to find #GstTocEntry with. * * Returns: #GstTocEntry with specified * @uid from the @toc, or %NULL if not found. */ public TocEntry findEntry(string uid) { auto p = gst_toc_find_entry(gstToc, Str.toStringz(uid)); if(p is null) { return null; } return ObjectG.getDObject!(TocEntry)(cast(GstTocEntry*) p); } /** * Gets the list of #GstTocEntry of @toc. * * Returns: A #GList of #GstTocEntry for @entry */ public ListG getEntries() { auto p = gst_toc_get_entries(gstToc); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Returns: scope of @toc */ public GstTocScope getScope() { return gst_toc_get_scope(gstToc); } /** * Gets the tags for @toc. * * Returns: A #GstTagList for @entry */ public TagList getTags() { auto p = gst_toc_get_tags(gstToc); if(p is null) { return null; } return ObjectG.getDObject!(TagList)(cast(GstTagList*) p); } /** * Merge @tags into the existing tags of @toc using @mode. * * Params: * tags = A #GstTagList or %NULL * mode = A #GstTagMergeMode */ public void mergeTags(TagList tags, GstTagMergeMode mode) { gst_toc_merge_tags(gstToc, (tags is null) ? null : tags.getTagListStruct(), mode); } /** * Set a #GstTagList with tags for the complete @toc. * * Params: * tags = A #GstTagList or %NULL */ public void setTags(TagList tags) { gst_toc_set_tags(gstToc, (tags is null) ? null : tags.getTagListStruct()); } } GtkD-3.7.5/generated/gstreamer/gstreamer/TocEntry.d000066400000000000000000000156521324604450400222260ustar00rootroot00000000000000/* * 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 gstreamer.TocEntry; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.TagList; private import gstreamer.Toc; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class TocEntry { /** the main Gtk struct */ protected GstTocEntry* gstTocEntry; protected bool ownedRef; /** Get the main Gtk struct */ public GstTocEntry* getTocEntryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstTocEntry; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstTocEntry; } /** * Sets our main struct and passes it to the parent class. */ public this (GstTocEntry* gstTocEntry, bool ownedRef = false) { this.gstTocEntry = gstTocEntry; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_toc_entry_get_type(); } /** * Create new #GstTocEntry structure. * * Params: * type = entry type. * uid = unique ID (UID) in the whole TOC. * * Returns: newly allocated #GstTocEntry structure, free it with gst_toc_entry_unref(). * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GstTocEntryType type, string uid) { auto p = gst_toc_entry_new(type, Str.toStringz(uid)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstTocEntry*) p); } /** * Appends the #GstTocEntry @subentry to @entry. * * Params: * subentry = A #GstTocEntry */ public void appendSubEntry(TocEntry subentry) { gst_toc_entry_append_sub_entry(gstTocEntry, (subentry is null) ? null : subentry.getTocEntryStruct()); } /** * Returns: @entry's entry type */ public GstTocEntryType getEntryType() { return gst_toc_entry_get_entry_type(gstTocEntry); } /** * Get @loop_type and @repeat_count values from the @entry and write them into * appropriate storages. Loops are e.g. used by sampled instruments. GStreamer * is not automatically applying the loop. The application can process this * meta data and use it e.g. to send a seek-event to loop a section. * * Params: * loopType = the storage for the loop_type * value, leave %NULL if not need. * repeatCount = the storage for the repeat_count * value, leave %NULL if not need. * * Returns: %TRUE if all non-%NULL storage pointers were filled with appropriate * values, %FALSE otherwise. * * Since: 1.4 */ public bool getLoop(out GstTocLoopType loopType, out int repeatCount) { return gst_toc_entry_get_loop(gstTocEntry, &loopType, &repeatCount) != 0; } /** * Gets the parent #GstTocEntry of @entry. * * Returns: The parent #GstTocEntry of @entry */ public TocEntry getParent() { auto p = gst_toc_entry_get_parent(gstTocEntry); if(p is null) { return null; } return ObjectG.getDObject!(TocEntry)(cast(GstTocEntry*) p); } /** * Get @start and @stop values from the @entry and write them into appropriate * storages. * * Params: * start = the storage for the start value, leave * %NULL if not need. * stop = the storage for the stop value, leave * %NULL if not need. * * Returns: %TRUE if all non-%NULL storage pointers were filled with appropriate * values, %FALSE otherwise. */ public bool getStartStopTimes(out long start, out long stop) { return gst_toc_entry_get_start_stop_times(gstTocEntry, &start, &stop) != 0; } /** * Gets the sub-entries of @entry. * * Returns: A #GList of #GstTocEntry of @entry */ public ListG getSubEntries() { auto p = gst_toc_entry_get_sub_entries(gstTocEntry); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the tags for @entry. * * Returns: A #GstTagList for @entry */ public TagList getTags() { auto p = gst_toc_entry_get_tags(gstTocEntry); if(p is null) { return null; } return ObjectG.getDObject!(TagList)(cast(GstTagList*) p); } /** * Gets the parent #GstToc of @entry. * * Returns: The parent #GstToc of @entry */ public Toc getToc() { auto p = gst_toc_entry_get_toc(gstTocEntry); if(p is null) { return null; } return ObjectG.getDObject!(Toc)(cast(GstToc*) p); } /** * Gets the UID of @entry. * * Returns: The UID of @entry */ public string getUid() { return Str.toString(gst_toc_entry_get_uid(gstTocEntry)); } /** * Returns: %TRUE if @entry's type is an alternative type, otherwise %FALSE */ public bool isAlternative() { return gst_toc_entry_is_alternative(gstTocEntry) != 0; } /** * Returns: %TRUE if @entry's type is a sequence type, otherwise %FALSE */ public bool isSequence() { return gst_toc_entry_is_sequence(gstTocEntry) != 0; } /** * Merge @tags into the existing tags of @entry using @mode. * * Params: * tags = A #GstTagList or %NULL * mode = A #GstTagMergeMode */ public void mergeTags(TagList tags, GstTagMergeMode mode) { gst_toc_entry_merge_tags(gstTocEntry, (tags is null) ? null : tags.getTagListStruct(), mode); } /** * Set @loop_type and @repeat_count values for the @entry. * * Params: * loopType = loop_type value to set. * repeatCount = repeat_count value to set. * * Since: 1.4 */ public void setLoop(GstTocLoopType loopType, int repeatCount) { gst_toc_entry_set_loop(gstTocEntry, loopType, repeatCount); } /** * Set @start and @stop values for the @entry. * * Params: * start = start value to set. * stop = stop value to set. */ public void setStartStopTimes(long start, long stop) { gst_toc_entry_set_start_stop_times(gstTocEntry, start, stop); } /** * Set a #GstTagList with tags for the complete @entry. * * Params: * tags = A #GstTagList or %NULL */ public void setTags(TagList tags) { gst_toc_entry_set_tags(gstTocEntry, (tags is null) ? null : tags.getTagListStruct()); } } GtkD-3.7.5/generated/gstreamer/gstreamer/TocSetterIF.d000066400000000000000000000053421324604450400226050ustar00rootroot00000000000000/* * 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 gstreamer.TocSetterIF; private import gobject.ObjectG; private import gstreamer.Toc; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Element interface that allows setting of the TOC. * * Elements that support some kind of chapters or editions (or tracks like in * the FLAC cue sheet) will implement this interface. * * If you just want to retrieve the TOC in your application then all you * need to do is watch for TOC messages on your pipeline's bus (or you can * perform TOC query). This interface is only for setting TOC data, not for * extracting it. To set TOC from the application, find proper tocsetter element * and set TOC using gst_toc_setter_set_toc(). * * Elements implementing the #GstTocSetter interface can extend existing TOC * by getting extend UID for that (you can use gst_toc_find_entry() to retrieve it) * with any TOC entries received from downstream. */ public interface TocSetterIF{ /** Get the main Gtk struct */ public GstTocSetter* getTocSetterStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gst_toc_setter_get_type(); } /** * Return current TOC the setter uses. The TOC should not be * modified without making it writable first. * * Returns: TOC set, or %NULL. Unref with * gst_toc_unref() when no longer needed */ public Toc getToc(); /** * Reset the internal TOC. Elements should call this from within the * state-change handler. */ public void reset(); /** * Set the given TOC on the setter. Previously set TOC will be * unreffed before setting a new one. * * Params: * toc = a #GstToc to set. */ public void setToc(Toc toc); } GtkD-3.7.5/generated/gstreamer/gstreamer/TocSetterT.d000066400000000000000000000057421324604450400225160ustar00rootroot00000000000000/* * 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 gstreamer.TocSetterT; public import gobject.ObjectG; public import gstreamer.Toc; public import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Element interface that allows setting of the TOC. * * Elements that support some kind of chapters or editions (or tracks like in * the FLAC cue sheet) will implement this interface. * * If you just want to retrieve the TOC in your application then all you * need to do is watch for TOC messages on your pipeline's bus (or you can * perform TOC query). This interface is only for setting TOC data, not for * extracting it. To set TOC from the application, find proper tocsetter element * and set TOC using gst_toc_setter_set_toc(). * * Elements implementing the #GstTocSetter interface can extend existing TOC * by getting extend UID for that (you can use gst_toc_find_entry() to retrieve it) * with any TOC entries received from downstream. */ public template TocSetterT(TStruct) { /** Get the main Gtk struct */ public GstTocSetter* getTocSetterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GstTocSetter*)getStruct(); } /** * Return current TOC the setter uses. The TOC should not be * modified without making it writable first. * * Returns: TOC set, or %NULL. Unref with * gst_toc_unref() when no longer needed */ public Toc getToc() { auto p = gst_toc_setter_get_toc(getTocSetterStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Toc)(cast(GstToc*) p, true); } /** * Reset the internal TOC. Elements should call this from within the * state-change handler. */ public void reset() { gst_toc_setter_reset(getTocSetterStruct()); } /** * Set the given TOC on the setter. Previously set TOC will be * unreffed before setting a new one. * * Params: * toc = a #GstToc to set. */ public void setToc(Toc toc) { gst_toc_setter_set_toc(getTocSetterStruct(), (toc is null) ? null : toc.getTocStruct()); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Tracer.d000066400000000000000000000042251324604450400216710ustar00rootroot00000000000000/* * 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 gstreamer.Tracer; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Tracing modules will subclass #GstTracer and register through * gst_tracing_register(). Modules can attach to various hook-types - see * gst_tracing_register_hook(). When invoked they receive hook specific * contextual data, which they must not modify. */ public class Tracer : ObjectGst { /** the main Gtk struct */ protected GstTracer* gstTracer; /** Get the main Gtk struct */ public GstTracer* getTracerStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstTracer; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstTracer; } protected override void setStruct(GObject* obj) { gstTracer = cast(GstTracer*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstTracer* gstTracer, bool ownedRef = false) { this.gstTracer = gstTracer; super(cast(GstObject*)gstTracer, ownedRef); } /** */ public static GType getType() { return gst_tracer_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/TracerFactory.d000066400000000000000000000052121324604450400232160ustar00rootroot00000000000000/* * 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 gstreamer.TracerFactory; private import glib.ListG; private import gstreamer.PluginFeature; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Use gst_tracer_factory_get_list() to get a list of tracer factories known to * GStreamer. * * Since: 1.8 */ public class TracerFactory : PluginFeature { /** the main Gtk struct */ protected GstTracerFactory* gstTracerFactory; /** Get the main Gtk struct */ public GstTracerFactory* getTracerFactoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstTracerFactory; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstTracerFactory; } protected override void setStruct(GObject* obj) { gstTracerFactory = cast(GstTracerFactory*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstTracerFactory* gstTracerFactory, bool ownedRef = false) { this.gstTracerFactory = gstTracerFactory; super(cast(GstPluginFeature*)gstTracerFactory, ownedRef); } /** */ public static GType getType() { return gst_tracer_factory_get_type(); } /** * Gets the list of all registered tracer factories. You must free the * list using gst_plugin_feature_list_free(). * * The returned factories are sorted by factory name. * * Free-function: gst_plugin_feature_list_free * * Returns: the list of all * registered #GstTracerFactory. * * Since: 1.8 */ public static ListG getList() { auto p = gst_tracer_factory_get_list(); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } } GtkD-3.7.5/generated/gstreamer/gstreamer/TracerRecord.d000066400000000000000000000041541324604450400230310ustar00rootroot00000000000000/* * 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 gstreamer.TracerRecord; private import gstreamer.ObjectGst; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * Tracing modules will create instances of this class to announce the data they * will log and create a log formatter. */ public class TracerRecord : ObjectGst { /** the main Gtk struct */ protected GstTracerRecord* gstTracerRecord; /** Get the main Gtk struct */ public GstTracerRecord* getTracerRecordStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstTracerRecord; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstTracerRecord; } protected override void setStruct(GObject* obj) { gstTracerRecord = cast(GstTracerRecord*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstTracerRecord* gstTracerRecord, bool ownedRef = false) { this.gstTracerRecord = gstTracerRecord; super(cast(GstObject*)gstTracerRecord, ownedRef); } /** */ public static GType getType() { return gst_tracer_record_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/TypeFind.d000066400000000000000000000112531324604450400221720ustar00rootroot00000000000000/* * 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 gstreamer.TypeFind; private import glib.Str; private import gstreamer.Caps; private import gstreamer.Plugin; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * The following functions allow you to detect the media type of an unknown * stream. */ public class TypeFind { /** the main Gtk struct */ protected GstTypeFind* gstTypeFind; protected bool ownedRef; /** Get the main Gtk struct */ public GstTypeFind* getTypeFindStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstTypeFind; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstTypeFind; } /** * Sets our main struct and passes it to the parent class. */ public this (GstTypeFind* gstTypeFind, bool ownedRef = false) { this.gstTypeFind = gstTypeFind; this.ownedRef = ownedRef; } /** * Returns the size bytes of the stream to identify beginning at offset. If * offset is a positive number, the offset is relative to the beginning of the * stream, if offset is a negative number the offset is relative to the end of * the stream. The returned memory is valid until the typefinding function * returns and must not be freed. * Params: * offset = The offset * size = The number of bytes to return * Returns: the requested data, or NULL if that data is not available. */ public ubyte[] peek(long offset, uint size) { ubyte* buff = gst_type_find_peek(gstTypeFind, offset, size); return buff[0 .. size]; } /** */ /** * Get the length of the data stream. * * Returns: The length of the data stream, or 0 if it is not available. */ public ulong getLength() { return gst_type_find_get_length(gstTypeFind); } /** * If a #GstTypeFindFunction calls this function it suggests the caps with the * given probability. A #GstTypeFindFunction may supply different suggestions * in one call. * It is up to the caller of the #GstTypeFindFunction to interpret these values. * * Params: * probability = The probability in percent that the suggestion is right * caps = The fixed #GstCaps to suggest */ public void suggest(uint probability, Caps caps) { gst_type_find_suggest(gstTypeFind, probability, (caps is null) ? null : caps.getCapsStruct()); } /** * Registers a new typefind function to be used for typefinding. After * registering this function will be available for typefinding. * This function is typically called during an element's plugin initialization. * * Params: * plugin = A #GstPlugin, or %NULL for a static typefind function * name = The name for registering * rank = The rank (or importance) of this typefind function * func = The #GstTypeFindFunction to use * extensions = Optional comma-separated list of extensions * that could belong to this type * possibleCaps = Optionally the caps that could be returned when typefinding * succeeds * data = Optional user data. This user data must be available until the plugin * is unloaded. * dataNotify = a #GDestroyNotify that will be called on @data when the plugin * is unloaded. * * Returns: %TRUE on success, %FALSE otherwise */ public static bool register(Plugin plugin, string name, uint rank, GstTypeFindFunction func, string extensions, Caps possibleCaps, void* data, GDestroyNotify dataNotify) { return gst_type_find_register((plugin is null) ? null : plugin.getPluginStruct(), Str.toStringz(name), rank, func, Str.toStringz(extensions), (possibleCaps is null) ? null : possibleCaps.getCapsStruct(), data, dataNotify) != 0; } /** */ public static GType typeFindGetType() { return gst_type_find_get_type(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/TypeFindFactory.d000066400000000000000000000134101324604450400235170ustar00rootroot00000000000000/* * 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 gstreamer.TypeFindFactory; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.Caps; private import gstreamer.PluginFeature; private import gstreamer.TypeFind; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * These functions allow querying informations about registered typefind * functions. How to create and register these functions is described in * the section * "Writing typefind functions". * * The following example shows how to write a very simple typefinder that * identifies the given data. You can get quite a bit more complicated than * that though. * |[ * typedef struct { * guint8 *data; * guint size; * guint probability; * GstCaps *data; * } MyTypeFind; * static void * my_peek (gpointer data, gint64 offset, guint size) * { * MyTypeFind *find = (MyTypeFind *) data; * if (offset >= 0 && offset + size <= find->size) { * return find->data + offset; * } * return NULL; * } * static void * my_suggest (gpointer data, guint probability, GstCaps *caps) * { * MyTypeFind *find = (MyTypeFind *) data; * if (probability > find->probability) { * find->probability = probability; * gst_caps_replace (&find->caps, caps); * } * } * static GstCaps * * find_type (guint8 *data, guint size) * { * GList *walk, *type_list; * MyTypeFind find = {data, size, 0, NULL}; * GstTypeFind gst_find = {my_peek, my_suggest, &find, }; * walk = type_list = gst_type_find_factory_get_list (); * while (walk) { * GstTypeFindFactory *factory = GST_TYPE_FIND_FACTORY (walk->data); * walk = g_list_next (walk) * gst_type_find_factory_call_function (factory, &gst_find); * } * g_list_free (type_list); * return find.caps; * }; * ]| */ public class TypeFindFactory : PluginFeature { /** the main Gtk struct */ protected GstTypeFindFactory* gstTypeFindFactory; /** Get the main Gtk struct */ public GstTypeFindFactory* getTypeFindFactoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstTypeFindFactory; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gstTypeFindFactory; } protected override void setStruct(GObject* obj) { gstTypeFindFactory = cast(GstTypeFindFactory*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GstTypeFindFactory* gstTypeFindFactory, bool ownedRef = false) { this.gstTypeFindFactory = gstTypeFindFactory; super(cast(GstPluginFeature*)gstTypeFindFactory, ownedRef); } /** */ public static GType getType() { return gst_type_find_factory_get_type(); } /** * Gets the list of all registered typefind factories. You must free the * list using gst_plugin_feature_list_free(). * * The returned factories are sorted by highest rank first, and then by * factory name. * * Free-function: gst_plugin_feature_list_free * * Returns: the list of all * registered #GstTypeFindFactory. */ public static ListG getList() { auto p = gst_type_find_factory_get_list(); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Calls the #GstTypeFindFunction associated with this factory. * * Params: * find = a properly setup #GstTypeFind entry. The get_data * and suggest_type members must be set. */ public void callFunction(TypeFind find) { gst_type_find_factory_call_function(gstTypeFindFactory, (find is null) ? null : find.getTypeFindStruct()); } /** * Gets the #GstCaps associated with a typefind factory. * * Returns: the #GstCaps associated with this factory */ public Caps getCaps() { auto p = gst_type_find_factory_get_caps(gstTypeFindFactory); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p); } /** * Gets the extensions associated with a #GstTypeFindFactory. The returned * array should not be changed. If you need to change stuff in it, you should * copy it using g_strdupv(). This function may return %NULL to indicate * a 0-length list. * * Returns: a %NULL-terminated array of extensions associated with this factory */ public string[] getExtensions() { return Str.toStringArray(gst_type_find_factory_get_extensions(gstTypeFindFactory)); } /** * Check whether the factory has a typefind function. Typefind factories * without typefind functions are a last-effort fallback mechanism to * e.g. assume a certain media type based on the file extension. * * Returns: %TRUE if the factory has a typefind functions set, otherwise %FALSE */ public bool hasFunction() { return gst_type_find_factory_has_function(gstTypeFindFactory) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/URIHandlerIF.d000066400000000000000000000055311324604450400226260ustar00rootroot00000000000000/* * 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 gstreamer.URIHandlerIF; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * The #GstURIHandler is an interface that is implemented by Source and Sink * #GstElement to unify handling of URI. * * An application can use the following functions to quickly get an element * that handles the given URI for reading or writing * (gst_element_make_from_uri()). * * Source and Sink plugins should implement this interface when possible. */ public interface URIHandlerIF{ /** Get the main Gtk struct */ public GstURIHandler* getURIHandlerStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gst_uri_handler_get_type(); } /** * Gets the list of protocols supported by @handler. This list may not be * modified. * * Returns: the * supported protocols. Returns %NULL if the @handler isn't * implemented properly, or the @handler doesn't support any * protocols. */ public string[] getProtocols(); /** * Gets the currently handled URI. * * Returns: the URI currently handled by * the @handler. Returns %NULL if there are no URI currently * handled. The returned string must be freed with g_free() when no * longer needed. */ public string getUri(); /** * Gets the type of the given URI handler * * Returns: the #GstURIType of the URI handler. * Returns #GST_URI_UNKNOWN if the @handler isn't implemented correctly. */ public GstURIType getUriType(); /** * Tries to set the URI of the given handler. * * Params: * uri = URI to set * * Returns: %TRUE if the URI was set successfully, else %FALSE. * * Throws: GException on failure. */ public bool setUri(string uri); } GtkD-3.7.5/generated/gstreamer/gstreamer/URIHandlerT.d000066400000000000000000000064251324604450400225360ustar00rootroot00000000000000/* * 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 gstreamer.URIHandlerT; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * The #GstURIHandler is an interface that is implemented by Source and Sink * #GstElement to unify handling of URI. * * An application can use the following functions to quickly get an element * that handles the given URI for reading or writing * (gst_element_make_from_uri()). * * Source and Sink plugins should implement this interface when possible. */ public template URIHandlerT(TStruct) { /** Get the main Gtk struct */ public GstURIHandler* getURIHandlerStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GstURIHandler*)getStruct(); } /** * Gets the list of protocols supported by @handler. This list may not be * modified. * * Returns: the * supported protocols. Returns %NULL if the @handler isn't * implemented properly, or the @handler doesn't support any * protocols. */ public string[] getProtocols() { return Str.toStringArray(gst_uri_handler_get_protocols(getURIHandlerStruct())); } /** * Gets the currently handled URI. * * Returns: the URI currently handled by * the @handler. Returns %NULL if there are no URI currently * handled. The returned string must be freed with g_free() when no * longer needed. */ public string getUri() { auto retStr = gst_uri_handler_get_uri(getURIHandlerStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the type of the given URI handler * * Returns: the #GstURIType of the URI handler. * Returns #GST_URI_UNKNOWN if the @handler isn't implemented correctly. */ public GstURIType getUriType() { return gst_uri_handler_get_uri_type(getURIHandlerStruct()); } /** * Tries to set the URI of the given handler. * * Params: * uri = URI to set * * Returns: %TRUE if the URI was set successfully, else %FALSE. * * Throws: GException on failure. */ public bool setUri(string uri) { GError* err = null; auto p = gst_uri_handler_set_uri(getURIHandlerStruct(), Str.toStringz(uri), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gstreamer/gstreamer/Uri.d000066400000000000000000000606641324604450400212210ustar00rootroot00000000000000/* * 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 gstreamer.Uri; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.HashTable; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** * A #GstUri object can be used to parse and split a URI string into its * constituant parts. Two #GstUri objects can be joined to make a new #GstUri * using the algorithm described in RFC3986. */ public class Uri { /** the main Gtk struct */ protected GstUri* gstUri; protected bool ownedRef; /** Get the main Gtk struct */ public GstUri* getUriStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstUri; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstUri; } /** * Sets our main struct and passes it to the parent class. */ public this (GstUri* gstUri, bool ownedRef = false) { this.gstUri = gstUri; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_uri_get_type(); } /** * Creates a new #GstUri object with the given URI parts. The path and query * strings will be broken down into their elements. All strings should not be * escaped except where indicated. * * Params: * scheme = The scheme for the new URI. * userinfo = The user-info for the new URI. * host = The host name for the new URI. * port = The port number for the new URI or %GST_URI_NO_PORT. * path = The path for the new URI with '/' separating path * elements. * query = The query string for the new URI with '&' separating * query elements. Elements containing '&' characters * should encode them as "%26". * fragment = The fragment name for the new URI. * * Returns: A new #GstUri object. * * Since: 1.6 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string scheme, string userinfo, string host, uint port, string path, string query, string fragment) { auto p = gst_uri_new(Str.toStringz(scheme), Str.toStringz(userinfo), Str.toStringz(host), port, Str.toStringz(path), Str.toStringz(query), Str.toStringz(fragment)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GstUri*) p); } /** * Append a path onto the end of the path in the URI. The path is not * normalized, call #gst_uri_normalize() to normalize the path. * * Params: * relativePath = Relative path to append to the end of the current path. * * Returns: %TRUE if the path was appended successfully. * * Since: 1.6 */ public bool appendPath(string relativePath) { return gst_uri_append_path(gstUri, Str.toStringz(relativePath)) != 0; } /** * Append a single path segment onto the end of the URI path. * * Params: * pathSegment = The path segment string to append to the URI path. * * Returns: %TRUE if the path was appended successfully. * * Since: 1.6 */ public bool appendPathSegment(string pathSegment) { return gst_uri_append_path_segment(gstUri, Str.toStringz(pathSegment)) != 0; } /** * Compares two #GstUri objects to see if they represent the same normalized * URI. * * Params: * second = Second #GstUri to compare. * * Returns: %TRUE if the normalized versions of the two URI's would be equal. * * Since: 1.6 */ public bool equal(Uri second) { return gst_uri_equal(gstUri, (second is null) ? null : second.getUriStruct()) != 0; } /** * Like gst_uri_from_string() but also joins with a base URI. * * Params: * uri = The URI string to parse. * * Returns: A new #GstUri object. * * Since: 1.6 */ public Uri fromStringWithBase(string uri) { auto p = gst_uri_from_string_with_base(gstUri, Str.toStringz(uri)); if(p is null) { return null; } return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); } /** * Get the fragment name from the URI or %NULL if it doesn't exist. * If @uri is %NULL then returns %NULL. * * Returns: The host name from the #GstUri object or %NULL. * * Since: 1.6 */ public string getFragment() { return Str.toString(gst_uri_get_fragment(gstUri)); } /** * Get the host name from the URI or %NULL if it doesn't exist. * If @uri is %NULL then returns %NULL. * * Returns: The host name from the #GstUri object or %NULL. * * Since: 1.6 */ public string getHost() { return Str.toString(gst_uri_get_host(gstUri)); } /** * Get the media fragment table from the URI, as defined by "Media Fragments URI 1.0". * Hash table returned by this API is a list of "key-value" pairs, and the each * pair is generated by splitting "URI fragment" per "&" sub-delims, then "key" * and "value" are splitted by "=" sub-delims. The "key" returned by this API may * be undefined keyword by standard. * A value may be %NULL to indicate that the key should appear in the fragment * string in the URI, but does not have a value. Free the returned #GHashTable * with #g_hash_table_unref() when it is no longer required. * Modifying this hash table does not affect the fragment in the URI. * * See more about Media Fragments URI 1.0 (W3C) at https://www.w3.org/TR/media-frags/ * * Returns: The fragment hash table * from the URI. * * Since: 1.12 */ public HashTable getMediaFragmentTable() { auto p = gst_uri_get_media_fragment_table(gstUri); if(p is null) { return null; } return new HashTable(cast(GHashTable*) p, true); } /** * Extract the path string from the URI object. * * Returns: The path from the URI. Once finished with the * string should be g_free()'d. * * Since: 1.6 */ public string getPath() { auto retStr = gst_uri_get_path(gstUri); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Get a list of path segments from the URI. * * Returns: A #GList of path segment * strings or %NULL if no path segments are available. Free the list * when no longer needed with g_list_free_full(list, g_free). * * Since: 1.6 */ public ListG getPathSegments() { auto p = gst_uri_get_path_segments(gstUri); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Extract the path string from the URI object as a percent encoded URI path. * * Returns: The path from the URI. Once finished with the * string should be g_free()'d. * * Since: 1.6 */ public string getPathString() { auto retStr = gst_uri_get_path_string(gstUri); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Get the port number from the URI or %GST_URI_NO_PORT if it doesn't exist. * If @uri is %NULL then returns %GST_URI_NO_PORT. * * Returns: The port number from the #GstUri object or %GST_URI_NO_PORT. * * Since: 1.6 */ public uint getPort() { return gst_uri_get_port(gstUri); } /** * Get a list of the query keys from the URI. * * Returns: A list of keys from * the URI query. Free the list with g_list_free(). * * Since: 1.6 */ public ListG getQueryKeys() { auto p = gst_uri_get_query_keys(gstUri); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Get a percent encoded URI query string from the @uri. * * Returns: A percent encoded query string. Use g_free() when * no longer needed. * * Since: 1.6 */ public string getQueryString() { auto retStr = gst_uri_get_query_string(gstUri); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Get the query table from the URI. Keys and values in the table are freed * with g_free when they are deleted. A value may be %NULL to indicate that * the key should appear in the query string in the URI, but does not have a * value. Free the returned #GHashTable with #g_hash_table_unref() when it is * no longer required. Modifying this hash table will modify the query in the * URI. * * Returns: The query hash table * from the URI. * * Since: 1.6 */ public HashTable getQueryTable() { auto p = gst_uri_get_query_table(gstUri); if(p is null) { return null; } return new HashTable(cast(GHashTable*) p, true); } /** * Get the value associated with the @query_key key. Will return %NULL if the * key has no value or if the key does not exist in the URI query table. Because * %NULL is returned for both missing keys and keys with no value, you should * use gst_uri_query_has_key() to determine if a key is present in the URI * query. * * Params: * queryKey = The key to lookup. * * Returns: The value for the given key, or %NULL if not found. * * Since: 1.6 */ public string getQueryValue(string queryKey) { return Str.toString(gst_uri_get_query_value(gstUri, Str.toStringz(queryKey))); } /** * Get the scheme name from the URI or %NULL if it doesn't exist. * If @uri is %NULL then returns %NULL. * * Returns: The scheme from the #GstUri object or %NULL. */ public string getScheme() { return Str.toString(gst_uri_get_scheme(gstUri)); } /** * Get the userinfo (usually in the form "username:password") from the URI * or %NULL if it doesn't exist. If @uri is %NULL then returns %NULL. * * Returns: The userinfo from the #GstUri object or %NULL. * * Since: 1.6 */ public string getUserinfo() { return Str.toString(gst_uri_get_userinfo(gstUri)); } /** * Tests the @uri to see if it is normalized. A %NULL @uri is considered to be * normalized. * * Returns: TRUE if the URI is normalized or is %NULL. * * Since: 1.6 */ public bool isNormalized() { return gst_uri_is_normalized(gstUri) != 0; } /** * Check if it is safe to write to this #GstUri. * * Check if the refcount of @uri is exactly 1, meaning that no other * reference exists to the #GstUri and that the #GstUri is therefore writable. * * Modification of a #GstUri should only be done after verifying that it is * writable. * * Returns: %TRUE if it is safe to write to the object. * * Since: 1.6 */ public bool isWritable() { return gst_uri_is_writable(gstUri) != 0; } /** * Join a reference URI onto a base URI using the method from RFC 3986. * If either URI is %NULL then the other URI will be returned with the ref count * increased. * * Params: * refUri = The reference URI to join onto the * base URI. * * Returns: A #GstUri which represents the base with the * reference URI joined on. * * Since: 1.6 */ public Uri join(Uri refUri) { auto p = gst_uri_join(gstUri, (refUri is null) ? null : refUri.getUriStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); } /** * Make the #GstUri writable. * * Checks if @uri is writable, and if so the original object is returned. If * not, then a writable copy is made and returned. This gives away the * reference to @uri and returns a reference to the new #GstUri. * If @uri is %NULL then %NULL is returned. * * Returns: A writable version of @uri. * * Since: 1.6 */ public Uri makeWritable() { auto p = gst_uri_make_writable(gstUri); if(p is null) { return null; } return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); } /** * Like gst_uri_new(), but joins the new URI onto a base URI. * * Params: * scheme = The scheme for the new URI. * userinfo = The user-info for the new URI. * host = The host name for the new URI. * port = The port number for the new URI or %GST_URI_NO_PORT. * path = The path for the new URI with '/' separating path * elements. * query = The query string for the new URI with '&' separating * query elements. Elements containing '&' characters * should encode them as "%26". * fragment = The fragment name for the new URI. * * Returns: The new URI joined onto @base. * * Since: 1.6 */ public Uri newWithBase(string scheme, string userinfo, string host, uint port, string path, string query, string fragment) { auto p = gst_uri_new_with_base(gstUri, Str.toStringz(scheme), Str.toStringz(userinfo), Str.toStringz(host), port, Str.toStringz(path), Str.toStringz(query), Str.toStringz(fragment)); if(p is null) { return null; } return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); } /** * Normalization will remove extra path segments ("." and "..") from the URI. It * will also convert the scheme and host name to lower case and any * percent-encoded values to uppercase. * * The #GstUri object must be writable. Check with gst_uri_is_writable() or use * gst_uri_make_writable() first. * * Returns: TRUE if the URI was modified. * * Since: 1.6 */ public bool normalize() { return gst_uri_normalize(gstUri) != 0; } /** * Check if there is a query table entry for the @query_key key. * * Params: * queryKey = The key to lookup. * * Returns: %TRUE if @query_key exists in the URI query table. * * Since: 1.6 */ public bool queryHasKey(string queryKey) { return gst_uri_query_has_key(gstUri, Str.toStringz(queryKey)) != 0; } /** * Remove an entry from the query table by key. * * Params: * queryKey = The key to remove. * * Returns: %TRUE if the key existed in the table and was removed. * * Since: 1.6 */ public bool removeQueryKey(string queryKey) { return gst_uri_remove_query_key(gstUri, Str.toStringz(queryKey)) != 0; } /** * Sets the fragment string in the URI. Use a value of %NULL in @fragment to * unset the fragment string. * * Params: * fragment = The fragment string to set. * * Returns: %TRUE if the fragment was set/unset successfully. * * Since: 1.6 */ public bool setFragment(string fragment) { return gst_uri_set_fragment(gstUri, Str.toStringz(fragment)) != 0; } /** * Set or unset the host for the URI. * * Params: * host = The new host string to set or %NULL to unset. * * Returns: %TRUE if the host was set/unset successfully. * * Since: 1.6 */ public bool setHost(string host) { return gst_uri_set_host(gstUri, Str.toStringz(host)) != 0; } /** * Sets or unsets the path in the URI. * * Params: * path = The new path to set with path segments separated by '/', or use %NULL * to unset the path. * * Returns: %TRUE if the path was set successfully. * * Since: 1.6 */ public bool setPath(string path) { return gst_uri_set_path(gstUri, Str.toStringz(path)) != 0; } /** * Replace the path segments list in the URI. * * Params: * pathSegments = The new * path list to set. * * Returns: %TRUE if the path segments were set successfully. * * Since: 1.6 */ public bool setPathSegments(ListG pathSegments) { return gst_uri_set_path_segments(gstUri, (pathSegments is null) ? null : pathSegments.getListGStruct()) != 0; } /** * Sets or unsets the path in the URI. * * Params: * path = The new percent encoded path to set with path segments separated by * '/', or use %NULL to unset the path. * * Returns: %TRUE if the path was set successfully. * * Since: 1.6 */ public bool setPathString(string path) { return gst_uri_set_path_string(gstUri, Str.toStringz(path)) != 0; } /** * Set or unset the port number for the URI. * * Params: * port = The new port number to set or %GST_URI_NO_PORT to unset. * * Returns: %TRUE if the port number was set/unset successfully. * * Since: 1.6 */ public bool setPort(uint port) { return gst_uri_set_port(gstUri, port) != 0; } /** * Sets or unsets the query table in the URI. * * Params: * query = The new percent encoded query string to use to populate the query * table, or use %NULL to unset the query table. * * Returns: %TRUE if the query table was set successfully. * * Since: 1.6 */ public bool setQueryString(string query) { return gst_uri_set_query_string(gstUri, Str.toStringz(query)) != 0; } /** * Set the query table to use in the URI. The old table is unreferenced and a * reference to the new one is used instead. A value if %NULL for @query_table * will remove the query string from the URI. * * Params: * queryTable = The new * query table to use. * * Returns: %TRUE if the new table was sucessfully used for the query table. * * Since: 1.6 */ public bool setQueryTable(HashTable queryTable) { return gst_uri_set_query_table(gstUri, (queryTable is null) ? null : queryTable.getHashTableStruct()) != 0; } /** * This inserts or replaces a key in the query table. A @query_value of %NULL * indicates that the key has no associated value, but will still be present in * the query string. * * Params: * queryKey = The key for the query entry. * queryValue = The value for the key. * * Returns: %TRUE if the query table was sucessfully updated. * * Since: 1.6 */ public bool setQueryValue(string queryKey, string queryValue) { return gst_uri_set_query_value(gstUri, Str.toStringz(queryKey), Str.toStringz(queryValue)) != 0; } /** * Set or unset the scheme for the URI. * * Params: * scheme = The new scheme to set or %NULL to unset the scheme. * * Returns: %TRUE if the scheme was set/unset successfully. * * Since: 1.6 */ public bool setScheme(string scheme) { return gst_uri_set_scheme(gstUri, Str.toStringz(scheme)) != 0; } /** * Set or unset the user information for the URI. * * Params: * userinfo = The new user-information string to set or %NULL to unset. * * Returns: %TRUE if the user information was set/unset successfully. * * Since: 1.6 */ public bool setUserinfo(string userinfo) { return gst_uri_set_userinfo(gstUri, Str.toStringz(userinfo)) != 0; } /** * Convert the URI to a string. * * Returns the URI as held in this object as a #gchar* nul-terminated string. * The caller should g_free() the string once they are finished with it. * The string is put together as described in RFC 3986. * * Returns: The string version of the URI. * * Since: 1.6 */ public override string toString() { auto retStr = gst_uri_to_string(gstUri); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Constructs a URI for a given valid protocol and location. * * Free-function: g_free * * Params: * protocol = Protocol for URI * location = Location for URI * * Returns: a new string for this URI. Returns %NULL if the * given URI protocol is not valid, or the given location is %NULL. */ public static string construct(string protocol, string location) { auto retStr = gst_uri_construct(Str.toStringz(protocol), Str.toStringz(location)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Parses a URI string into a new #GstUri object. Will return NULL if the URI * cannot be parsed. * * Params: * uri = The URI string to parse. * * Returns: A new #GstUri object, or NULL. * * Since: 1.6 */ public static Uri fromString(string uri) { auto p = gst_uri_from_string(Str.toStringz(uri)); if(p is null) { return null; } return ObjectG.getDObject!(Uri)(cast(GstUri*) p, true); } /** * Extracts the location out of a given valid URI, ie. the protocol and "://" * are stripped from the URI, which means that the location returned includes * the hostname if one is specified. The returned string must be freed using * g_free(). * * Free-function: g_free * * Params: * uri = A URI string * * Returns: the location for this URI. Returns %NULL if the * URI isn't valid. If the URI does not contain a location, an empty * string is returned. */ public static string getLocation(string uri) { auto retStr = gst_uri_get_location(Str.toStringz(uri)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Extracts the protocol out of a given valid URI. The returned string must be * freed using g_free(). * * Params: * uri = A URI string * * Returns: The protocol for this URI. */ public static string getProtocol(string uri) { auto retStr = gst_uri_get_protocol(Str.toStringz(uri)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Checks if the protocol of a given valid URI matches @protocol. * * Params: * uri = a URI string * protocol = a protocol string (e.g. "http") * * Returns: %TRUE if the protocol matches. */ public static bool hasProtocol(string uri, string protocol) { return gst_uri_has_protocol(Str.toStringz(uri), Str.toStringz(protocol)) != 0; } /** * Tests if the given string is a valid URI identifier. URIs start with a valid * scheme followed by ":" and maybe a string identifying the location. * * Params: * uri = A URI string * * Returns: %TRUE if the string is a valid URI */ public static bool isValid(string uri) { return gst_uri_is_valid(Str.toStringz(uri)) != 0; } /** * This is a convenience function to join two URI strings and return the result. * The returned string should be g_free()'d after use. * * Params: * baseUri = The percent-encoded base URI. * refUri = The percent-encoded reference URI to join to the @base_uri. * * Returns: A string representing the percent-encoded join of * the two URIs. * * Since: 1.6 */ public static string joinStrings(string baseUri, string refUri) { auto retStr = gst_uri_join_strings(Str.toStringz(baseUri), Str.toStringz(refUri)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Checks if an element exists that supports the given URI protocol. Note * that a positive return value does not imply that a subsequent call to * gst_element_make_from_uri() is guaranteed to work. * * Params: * type = Whether to check for a source or a sink * protocol = Protocol that should be checked for (e.g. "http" or "smb") * * Returns: %TRUE */ public static bool protocolIsSupported(GstURIType type, string protocol) { return gst_uri_protocol_is_supported(type, Str.toStringz(protocol)) != 0; } /** * Tests if the given string is a valid protocol identifier. Protocols * must consist of alphanumeric characters, '+', '-' and '.' and must * start with a alphabetic character. See RFC 3986 Section 3.1. * * Params: * protocol = A string * * Returns: %TRUE if the string is a valid protocol identifier, %FALSE otherwise. */ public static bool protocolIsValid(string protocol) { return gst_uri_protocol_is_valid(Str.toStringz(protocol)) != 0; } /** * Similar to g_filename_to_uri(), but attempts to handle relative file paths * as well. Before converting @filename into an URI, it will be prefixed by * the current working directory if it is a relative path, and then the path * will be canonicalised so that it doesn't contain any './' or '../' segments. * * On Windows #filename should be in UTF-8 encoding. * * Params: * filename = absolute or relative file name path * * Returns: newly-allocated URI string, or NULL on error. The caller must * free the URI string with g_free() when no longer needed. * * Throws: GException on failure. */ public static string filenameToUri(string filename) { GError* err = null; auto retStr = gst_filename_to_uri(Str.toStringz(filename), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** */ public static GQuark uriErrorQuark() { return gst_uri_error_quark(); } } GtkD-3.7.5/generated/gstreamer/gstreamer/Utils.d000066400000000000000000000423461324604450400215570ustar00rootroot00000000000000/* * 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 gstreamer.Utils; private import glib.MemorySlice; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; private import gobject.ValueArray; private import gstreamer.Plugin; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public struct Utils { /** * Searches inside @array for @search_data by using the comparison function * @search_func. @array must be sorted ascending. * * As @search_data is always passed as second argument to @search_func it's * not required that @search_data has the same type as the array elements. * * The complexity of this search function is O(log (num_elements)). * * Params: * array = the sorted input array * numElements = number of elements in the array * elementSize = size of every element in bytes * searchFunc = function to compare two elements, @search_data will always be passed as second argument * mode = search mode that should be used * searchData = element that should be found * userData = data to pass to @search_func * * Returns: The address of the found * element or %NULL if nothing was found */ public static void* arrayBinarySearch(void* array, uint numElements, size_t elementSize, GCompareDataFunc searchFunc, GstSearchMode mode, void* searchData, void* userData) { return gst_util_array_binary_search(array, numElements, elementSize, searchFunc, mode, searchData, userData); } /** * Transforms a #gdouble to a fraction and simplifies * the result. * * Params: * src = #gdouble to transform * destN = pointer to a #gint to hold the result numerator * destD = pointer to a #gint to hold the result denominator */ public static void doubleToFraction(double src, out int destN, out int destD) { gst_util_double_to_fraction(src, &destN, &destD); } /** * Dumps the memory block into a hex representation. Useful for debugging. * * Params: * mem = a pointer to the memory to dump * size = the size of the memory block to dump */ public static void dumpMem(char* mem, uint size) { gst_util_dump_mem(mem, size); } /** * Adds the fractions @a_n/@a_d and @b_n/@b_d and stores * the result in @res_n and @res_d. * * Params: * aN = Numerator of first value * aD = Denominator of first value * bN = Numerator of second value * bD = Denominator of second value * resN = Pointer to #gint to hold the result numerator * resD = Pointer to #gint to hold the result denominator * * Returns: %FALSE on overflow, %TRUE otherwise. */ public static bool fractionAdd(int aN, int aD, int bN, int bD, out int resN, out int resD) { return gst_util_fraction_add(aN, aD, bN, bD, &resN, &resD) != 0; } /** * Compares the fractions @a_n/@a_d and @b_n/@b_d and returns * -1 if a < b, 0 if a = b and 1 if a > b. * * Params: * aN = Numerator of first value * aD = Denominator of first value * bN = Numerator of second value * bD = Denominator of second value * * Returns: -1 if a < b; 0 if a = b; 1 if a > b. */ public static int fractionCompare(int aN, int aD, int bN, int bD) { return gst_util_fraction_compare(aN, aD, bN, bD); } /** * Multiplies the fractions @a_n/@a_d and @b_n/@b_d and stores * the result in @res_n and @res_d. * * Params: * aN = Numerator of first value * aD = Denominator of first value * bN = Numerator of second value * bD = Denominator of second value * resN = Pointer to #gint to hold the result numerator * resD = Pointer to #gint to hold the result denominator * * Returns: %FALSE on overflow, %TRUE otherwise. */ public static bool fractionMultiply(int aN, int aD, int bN, int bD, out int resN, out int resD) { return gst_util_fraction_multiply(aN, aD, bN, bD, &resN, &resD) != 0; } /** * Transforms a fraction to a #gdouble. * * Params: * srcN = Fraction numerator as #gint * srcD = Fraction denominator #gint * dest = pointer to a #gdouble for the result */ public static void fractionToDouble(int srcN, int srcD, out double dest) { gst_util_fraction_to_double(srcN, srcD, &dest); } /** */ public static ulong gdoubleToGuint64(double value) { return gst_util_gdouble_to_guint64(value); } /** * Get a timestamp as GstClockTime to be used for interval measurements. * The timestamp should not be interpreted in any other way. * * Returns: the timestamp */ public static GstClockTime getTimestamp() { return gst_util_get_timestamp(); } /** * Calculates the greatest common divisor of @a * and @b. * * Params: * a = First value as #gint * b = Second value as #gint * * Returns: Greatest common divisor of @a and @b */ public static int greatestCommonDivisor(int a, int b) { return gst_util_greatest_common_divisor(a, b); } /** * Calculates the greatest common divisor of @a * and @b. * * Params: * a = First value as #gint64 * b = Second value as #gint64 * * Returns: Greatest common divisor of @a and @b */ public static long greatestCommonDivisorInt64(long a, long b) { return gst_util_greatest_common_divisor_int64(a, b); } /** * Return a constantly incrementing group id. * * This function is used to generate a new group-id for the * stream-start event. * * Returns: A constantly incrementing unsigned integer, which might * overflow back to 0 at some point. */ public static uint groupIdNext() { return gst_util_group_id_next(); } /** */ public static double guint64ToGdouble(ulong value) { return gst_util_guint64_to_gdouble(value); } /** * Compare two sequence numbers, handling wraparound. * * The current implementation just returns (gint32)(@s1 - @s2). * * Params: * s1 = A sequence number. * s2 = Another sequence number. * * Returns: A negative number if @s1 is before @s2, 0 if they are equal, or a * positive number if @s1 is after @s2. */ public static int seqnumCompare(uint s1, uint s2) { return gst_util_seqnum_compare(s1, s2); } /** * Return a constantly incrementing sequence number. * * This function is used internally to GStreamer to be able to determine which * events and messages are "the same". For example, elements may set the seqnum * on a segment-done message to be the same as that of the last seek event, to * indicate that event and the message correspond to the same segment. * * Returns: A constantly incrementing 32-bit unsigned integer, which might * overflow back to 0 at some point. Use gst_util_seqnum_compare() to make sure * you handle wraparound correctly. */ public static uint seqnumNext() { return gst_util_seqnum_next(); } /** * Converts the string value to the type of the objects argument and * sets the argument with it. * * Note that this function silently returns if @object has no property named * @name or when @value cannot be converted to the type of the property. * * Params: * object = the object to set the argument of * name = the name of the argument to set * value = the string value to set */ public static void setObjectArg(ObjectG object, string name, string value) { gst_util_set_object_arg((object is null) ? null : object.getObjectGStruct(), Str.toStringz(name), Str.toStringz(value)); } /** * Converts the string to the type of the value and * sets the value with it. * * Note that this function is dangerous as it does not return any indication * if the conversion worked or not. * * Params: * value = the value to set * valueStr = the string to get the value from */ public static void setValueFromString(out Value value, string valueStr) { GValue* outvalue = sliceNew!GValue(); gst_util_set_value_from_string(outvalue, Str.toStringz(valueStr)); value = ObjectG.getDObject!(Value)(outvalue, true); } /** * Scale @val by the rational number @num / @denom, avoiding overflows and * underflows and without loss of precision. * * This function can potentially be very slow if val and num are both * greater than G_MAXUINT32. * * Params: * val = the number to scale * num = the numerator of the scale ratio * denom = the denominator of the scale ratio * * Returns: @val * @num / @denom. In the case of an overflow, this * function returns G_MAXUINT64. If the result is not exactly * representable as an integer it is truncated. See also * gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil(), * gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), * gst_util_uint64_scale_int_ceil(). */ public static ulong uint64Scale(ulong val, ulong num, ulong denom) { return gst_util_uint64_scale(val, num, denom); } /** * Scale @val by the rational number @num / @denom, avoiding overflows and * underflows and without loss of precision. * * This function can potentially be very slow if val and num are both * greater than G_MAXUINT32. * * Params: * val = the number to scale * num = the numerator of the scale ratio * denom = the denominator of the scale ratio * * Returns: @val * @num / @denom. In the case of an overflow, this * function returns G_MAXUINT64. If the result is not exactly * representable as an integer, it is rounded up. See also * gst_util_uint64_scale(), gst_util_uint64_scale_round(), * gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), * gst_util_uint64_scale_int_ceil(). */ public static ulong uint64ScaleCeil(ulong val, ulong num, ulong denom) { return gst_util_uint64_scale_ceil(val, num, denom); } /** * Scale @val by the rational number @num / @denom, avoiding overflows and * underflows and without loss of precision. @num must be non-negative and * @denom must be positive. * * Params: * val = guint64 (such as a #GstClockTime) to scale. * num = numerator of the scale factor. * denom = denominator of the scale factor. * * Returns: @val * @num / @denom. In the case of an overflow, this * function returns G_MAXUINT64. If the result is not exactly * representable as an integer, it is truncated. See also * gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil(), * gst_util_uint64_scale(), gst_util_uint64_scale_round(), * gst_util_uint64_scale_ceil(). */ public static ulong uint64ScaleInt(ulong val, int num, int denom) { return gst_util_uint64_scale_int(val, num, denom); } /** * Scale @val by the rational number @num / @denom, avoiding overflows and * underflows and without loss of precision. @num must be non-negative and * @denom must be positive. * * Params: * val = guint64 (such as a #GstClockTime) to scale. * num = numerator of the scale factor. * denom = denominator of the scale factor. * * Returns: @val * @num / @denom. In the case of an overflow, this * function returns G_MAXUINT64. If the result is not exactly * representable as an integer, it is rounded up. See also * gst_util_uint64_scale_int(), gst_util_uint64_scale_int_round(), * gst_util_uint64_scale(), gst_util_uint64_scale_round(), * gst_util_uint64_scale_ceil(). */ public static ulong uint64ScaleIntCeil(ulong val, int num, int denom) { return gst_util_uint64_scale_int_ceil(val, num, denom); } /** * Scale @val by the rational number @num / @denom, avoiding overflows and * underflows and without loss of precision. @num must be non-negative and * @denom must be positive. * * Params: * val = guint64 (such as a #GstClockTime) to scale. * num = numerator of the scale factor. * denom = denominator of the scale factor. * * Returns: @val * @num / @denom. In the case of an overflow, this * function returns G_MAXUINT64. If the result is not exactly * representable as an integer, it is rounded to the nearest integer * (half-way cases are rounded up). See also gst_util_uint64_scale_int(), * gst_util_uint64_scale_int_ceil(), gst_util_uint64_scale(), * gst_util_uint64_scale_round(), gst_util_uint64_scale_ceil(). */ public static ulong uint64ScaleIntRound(ulong val, int num, int denom) { return gst_util_uint64_scale_int_round(val, num, denom); } /** * Scale @val by the rational number @num / @denom, avoiding overflows and * underflows and without loss of precision. * * This function can potentially be very slow if val and num are both * greater than G_MAXUINT32. * * Params: * val = the number to scale * num = the numerator of the scale ratio * denom = the denominator of the scale ratio * * Returns: @val * @num / @denom. In the case of an overflow, this * function returns G_MAXUINT64. If the result is not exactly * representable as an integer, it is rounded to the nearest integer * (half-way cases are rounded up). See also gst_util_uint64_scale(), * gst_util_uint64_scale_ceil(), gst_util_uint64_scale_int(), * gst_util_uint64_scale_int_round(), gst_util_uint64_scale_int_ceil(). */ public static ulong uint64ScaleRound(ulong val, ulong num, ulong denom) { return gst_util_uint64_scale_round(val, num, denom); } /** * Calculates the linear regression of the values @xy and places the * result in @m_num, @m_denom, @b and @xbase, representing the function * y(x) = m_num/m_denom * (x - xbase) + b * that has the least-square distance from all points @x and @y. * * @r_squared will contain the remaining error. * * If @temp is not %NULL, it will be used as temporary space for the function, * in which case the function works without any allocation at all. If @temp is * %NULL, an allocation will take place. @temp should have at least the same * amount of memory allocated as @xy, i.e. 2*n*sizeof(GstClockTime). * * > This function assumes (x,y) values with reasonable large differences * > between them. It will not calculate the exact results if the differences * > between neighbouring values are too small due to not being able to * > represent sub-integer values during the calculations. * * Params: * xy = Pairs of (x,y) values * temp = Temporary scratch space used by the function * n = number of (x,y) pairs * mNum = numerator of calculated slope * mDenom = denominator of calculated slope * b = Offset at Y-axis * xbase = Offset at X-axis * rSquared = R-squared * * Returns: %TRUE if the linear regression was successfully calculated * * Since: 1.12 */ public static bool calculateLinearRegression(GstClockTime* xy, GstClockTime* temp, uint n, out GstClockTime mNum, out GstClockTime mDenom, out GstClockTime b, out GstClockTime xbase, out double rSquared) { return gst_calculate_linear_regression(xy, temp, n, &mNum, &mDenom, &b, &xbase, &rSquared) != 0; } /** */ public static bool dynamicTypeRegister(Plugin plugin, GType type) { return gst_dynamic_type_register((plugin is null) ? null : plugin.getPluginStruct(), type) != 0; } /** * Get a property of type %GST_TYPE_ARRAY and transform it into a * #GValueArray. This allow language bindings to get GST_TYPE_ARRAY * properties which are otherwise not an accessible type. * * Params: * object = the object to set the array to * name = the name of the property to set * array = a return #GValueArray * * Since: 1.12 */ public static bool getObjectArray(ObjectG object, string name, out ValueArray array) { GValueArray* outarray = null; auto p = gst_util_get_object_array((object is null) ? null : object.getObjectGStruct(), Str.toStringz(name), &outarray) != 0; array = ObjectG.getDObject!(ValueArray)(outarray); return p; } /** * Transfer a #GValueArray to %GST_TYPE_ARRAY and set this value on the * specified property name. This allow language bindings to set GST_TYPE_ARRAY * properties which are otherwise not an accessible type. * * Params: * object = the object to set the array to * name = the name of the property to set * array = a #GValueArray containing the values * * Since: 1.12 */ public static bool setObjectArray(ObjectG object, string name, ValueArray array) { return gst_util_set_object_array((object is null) ? null : object.getObjectGStruct(), Str.toStringz(name), (array is null) ? null : array.getValueArrayStruct()) != 0; } } GtkD-3.7.5/generated/gstreamer/gstreamer/ValueArray.d000066400000000000000000000075221324604450400225270ustar00rootroot00000000000000/* * 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 gstreamer.ValueArray; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class ValueArray { /** the main Gtk struct */ protected GstValueArray* gstValueArray; protected bool ownedRef; /** Get the main Gtk struct */ public GstValueArray* getValueArrayStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gstValueArray; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gstValueArray; } /** * Sets our main struct and passes it to the parent class. */ public this (GstValueArray* gstValueArray, bool ownedRef = false) { this.gstValueArray = gstValueArray; this.ownedRef = ownedRef; } /** */ public static GType getType() { return gst_value_array_get_type(); } /** * Appends @append_value to the GstValueArray in @value. * * Params: * value = a #GValue of type #GST_TYPE_ARRAY * appendValue = the value to append * * Since: 1.2 */ public static void appendAndTakeValue(Value value, Value appendValue) { gst_value_array_append_and_take_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct()); } /** * Appends @append_value to the GstValueArray in @value. * * Params: * value = a #GValue of type #GST_TYPE_ARRAY * appendValue = the value to append */ public static void appendValue(Value value, Value appendValue) { gst_value_array_append_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct()); } /** * Gets the number of values contained in @value. * * Params: * value = a #GValue of type #GST_TYPE_ARRAY * * Returns: the number of values */ public static uint getSize(Value value) { return gst_value_array_get_size((value is null) ? null : value.getValueStruct()); } /** * Gets the value that is a member of the array contained in @value and * has the index @index. * * Params: * value = a #GValue of type #GST_TYPE_ARRAY * index = index of value to get from the array * * Returns: the value at the given index */ public static Value getValue(Value value, uint index) { auto p = gst_value_array_get_value((value is null) ? null : value.getValueStruct(), index); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Prepends @prepend_value to the GstValueArray in @value. * * Params: * value = a #GValue of type #GST_TYPE_ARRAY * prependValue = the value to prepend */ public static void prependValue(Value value, Value prependValue) { gst_value_array_prepend_value((value is null) ? null : value.getValueStruct(), (prependValue is null) ? null : prependValue.getValueStruct()); } } GtkD-3.7.5/generated/gstreamer/gstreamer/ValueGst.d000066400000000000000000000565071324604450400222150ustar00rootroot00000000000000/* * 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 gstreamer.ValueGst; private import glib.MemorySlice; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.Caps; private import gstreamer.CapsFeatures; private import gstreamer.Structure; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public struct ValueGst { /** * Determines if @value1 and @value2 can be compared. * * Params: * value1 = a value to compare * value2 = another value to compare * * Returns: %TRUE if the values can be compared */ public static bool canCompare(Value value1, Value value2) { return gst_value_can_compare((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; } /** * Determines if intersecting two values will produce a valid result. * Two values will produce a valid intersection if they have the same * type. * * Params: * value1 = a value to intersect * value2 = another value to intersect * * Returns: %TRUE if the values can intersect */ public static bool canIntersect(Value value1, Value value2) { return gst_value_can_intersect((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; } /** * Checks if it's possible to subtract @subtrahend from @minuend. * * Params: * minuend = the value to subtract from * subtrahend = the value to subtract * * Returns: %TRUE if a subtraction is possible */ public static bool canSubtract(Value minuend, Value subtrahend) { return gst_value_can_subtract((minuend is null) ? null : minuend.getValueStruct(), (subtrahend is null) ? null : subtrahend.getValueStruct()) != 0; } /** * Determines if @value1 and @value2 can be non-trivially unioned. * Any two values can be trivially unioned by adding both of them * to a GstValueList. However, certain types have the possibility * to be unioned in a simpler way. For example, an integer range * and an integer can be unioned if the integer is a subset of the * integer range. If there is the possibility that two values can * be unioned, this function returns %TRUE. * * Params: * value1 = a value to union * value2 = another value to union * * Returns: %TRUE if there is a function allowing the two values to * be unioned. */ public static bool canUnion(Value value1, Value value2) { return gst_value_can_union((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; } /** * Compares @value1 and @value2. If @value1 and @value2 cannot be * compared, the function returns GST_VALUE_UNORDERED. Otherwise, * if @value1 is greater than @value2, GST_VALUE_GREATER_THAN is returned. * If @value1 is less than @value2, GST_VALUE_LESS_THAN is returned. * If the values are equal, GST_VALUE_EQUAL is returned. * * Params: * value1 = a value to compare * value2 = another value to compare * * Returns: comparison result */ public static int compare(Value value1, Value value2) { return gst_value_compare((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()); } /** * Tries to deserialize a string into the type specified by the given GValue. * If the operation succeeds, %TRUE is returned, %FALSE otherwise. * * Params: * dest = #GValue to fill with contents of * deserialization * src = string to deserialize * * Returns: %TRUE on success */ public static bool deserialize(out Value dest, string src) { GValue* outdest = sliceNew!GValue(); auto p = gst_value_deserialize(outdest, Str.toStringz(src)) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); return p; } /** * Fixate @src into a new value @dest. * For ranges, the first element is taken. For lists and arrays, the * first item is fixated and returned. * If @src is already fixed, this function returns %FALSE. * * Params: * dest = the #GValue destination * src = the #GValue to fixate * * Returns: %TRUE if @dest contains a fixated version of @src. */ public static bool fixate(Value dest, Value src) { return gst_value_fixate((dest is null) ? null : dest.getValueStruct(), (src is null) ? null : src.getValueStruct()) != 0; } /** * Multiplies the two #GValue items containing a #GST_TYPE_FRACTION and sets * @product to the product of the two fractions. * * Params: * product = a GValue initialized to #GST_TYPE_FRACTION * factor1 = a GValue initialized to #GST_TYPE_FRACTION * factor2 = a GValue initialized to #GST_TYPE_FRACTION * * Returns: %FALSE in case of an error (like integer overflow), %TRUE otherwise. */ public static bool fractionMultiply(Value product, Value factor1, Value factor2) { return gst_value_fraction_multiply((product is null) ? null : product.getValueStruct(), (factor1 is null) ? null : factor1.getValueStruct(), (factor2 is null) ? null : factor2.getValueStruct()) != 0; } /** * Subtracts the @subtrahend from the @minuend and sets @dest to the result. * * Params: * dest = a GValue initialized to #GST_TYPE_FRACTION * minuend = a GValue initialized to #GST_TYPE_FRACTION * subtrahend = a GValue initialized to #GST_TYPE_FRACTION * * Returns: %FALSE in case of an error (like integer overflow), %TRUE otherwise. */ public static bool fractionSubtract(Value dest, Value minuend, Value subtrahend) { return gst_value_fraction_subtract((dest is null) ? null : dest.getValueStruct(), (minuend is null) ? null : minuend.getValueStruct(), (subtrahend is null) ? null : subtrahend.getValueStruct()) != 0; } /** * Gets the bitmask specified by @value. * * Params: * value = a GValue initialized to #GST_TYPE_BITMASK * * Returns: the bitmask. */ public static ulong getBitmask(Value value) { return gst_value_get_bitmask((value is null) ? null : value.getValueStruct()); } /** * Gets the contents of @value. The reference count of the returned * #GstCaps will not be modified, therefore the caller must take one * before getting rid of the @value. * * Params: * value = a GValue initialized to GST_TYPE_CAPS * * Returns: the contents of @value */ public static Caps getCaps(Value value) { auto p = gst_value_get_caps((value is null) ? null : value.getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Caps)(cast(GstCaps*) p); } /** * Gets the contents of @value. * * Params: * value = a GValue initialized to GST_TYPE_CAPS_FEATURES * * Returns: the contents of @value */ public static CapsFeatures getCapsFeatures(Value value) { auto p = gst_value_get_caps_features((value is null) ? null : value.getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(CapsFeatures)(cast(GstCapsFeatures*) p); } /** * Gets the maximum of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_DOUBLE_RANGE * * Returns: the maximum of the range */ public static double getDoubleRangeMax(Value value) { return gst_value_get_double_range_max((value is null) ? null : value.getValueStruct()); } /** * Gets the minimum of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_DOUBLE_RANGE * * Returns: the minimum of the range */ public static double getDoubleRangeMin(Value value) { return gst_value_get_double_range_min((value is null) ? null : value.getValueStruct()); } /** * Retrieve the flags field of a GstFlagSet @value. * * Params: * value = a GValue initialized to #GST_TYPE_FLAG_SET * * Returns: the flags field of the flagset instance. * * Since: 1.6 */ public static uint getFlagsetFlags(Value value) { return gst_value_get_flagset_flags((value is null) ? null : value.getValueStruct()); } /** * Retrieve the mask field of a GstFlagSet @value. * * Params: * value = a GValue initialized to #GST_TYPE_FLAG_SET * * Returns: the mask field of the flagset instance. * * Since: 1.6 */ public static uint getFlagsetMask(Value value) { return gst_value_get_flagset_mask((value is null) ? null : value.getValueStruct()); } /** * Sets @value to the flags and mask values provided in @flags and @mask. * The @flags value indicates the values of flags, the @mask represents * which bits in the flag value have been set, and which are "don't care" * * Params: * value = a GValue initialized to %GST_TYPE_FLAG_SET * flags = The value of the flags set or unset * mask = The mask indicate which flags bits must match for comparisons * * Since: 1.6 */ public static void setFlagset(Value value, uint flags, uint mask) { gst_value_set_flagset((value is null) ? null : value.getValueStruct(), flags, mask); } /** * Gets the denominator of the fraction specified by @value. * * Params: * value = a GValue initialized to #GST_TYPE_FRACTION * * Returns: the denominator of the fraction. */ public static int getFractionDenominator(Value value) { return gst_value_get_fraction_denominator((value is null) ? null : value.getValueStruct()); } /** * Gets the numerator of the fraction specified by @value. * * Params: * value = a GValue initialized to #GST_TYPE_FRACTION * * Returns: the numerator of the fraction. */ public static int getFractionNumerator(Value value) { return gst_value_get_fraction_numerator((value is null) ? null : value.getValueStruct()); } /** * Gets the maximum of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_FRACTION_RANGE * * Returns: the maximum of the range */ public static Value getFractionRangeMax(Value value) { auto p = gst_value_get_fraction_range_max((value is null) ? null : value.getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Gets the minimum of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_FRACTION_RANGE * * Returns: the minimum of the range */ public static Value getFractionRangeMin(Value value) { auto p = gst_value_get_fraction_range_min((value is null) ? null : value.getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Gets the maximum of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_INT64_RANGE * * Returns: the maximum of the range */ public static long getInt64RangeMax(Value value) { return gst_value_get_int64_range_max((value is null) ? null : value.getValueStruct()); } /** * Gets the minimum of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_INT64_RANGE * * Returns: the minimum of the range */ public static long getInt64RangeMin(Value value) { return gst_value_get_int64_range_min((value is null) ? null : value.getValueStruct()); } /** * Gets the step of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_INT64_RANGE * * Returns: the step of the range */ public static long getInt64RangeStep(Value value) { return gst_value_get_int64_range_step((value is null) ? null : value.getValueStruct()); } /** * Gets the maximum of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_INT_RANGE * * Returns: the maximum of the range */ public static int getIntRangeMax(Value value) { return gst_value_get_int_range_max((value is null) ? null : value.getValueStruct()); } /** * Gets the minimum of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_INT_RANGE * * Returns: the minimum of the range */ public static int getIntRangeMin(Value value) { return gst_value_get_int_range_min((value is null) ? null : value.getValueStruct()); } /** * Gets the step of the range specified by @value. * * Params: * value = a GValue initialized to GST_TYPE_INT_RANGE * * Returns: the step of the range */ public static int getIntRangeStep(Value value) { return gst_value_get_int_range_step((value is null) ? null : value.getValueStruct()); } /** * Gets the contents of @value. * * Params: * value = a GValue initialized to GST_TYPE_STRUCTURE * * Returns: the contents of @value */ public static Structure getStructure(Value value) { auto p = gst_value_get_structure((value is null) ? null : value.getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Structure)(cast(GstStructure*) p); } /** * Initialises the target value to be of the same type as source and then copies * the contents from source to target. * * Params: * dest = the target value * src = the source value */ public static void initAndCopy(out Value dest, Value src) { GValue* outdest = sliceNew!GValue(); gst_value_init_and_copy(outdest, (src is null) ? null : src.getValueStruct()); dest = ObjectG.getDObject!(Value)(outdest, true); } /** * Calculates the intersection of two values. If the values have * a non-empty intersection, the value representing the intersection * is placed in @dest, unless %NULL. If the intersection is non-empty, * @dest is not modified. * * Params: * dest = a uninitialized #GValue that will hold the calculated * intersection value. May be %NULL if the resulting set if not * needed. * value1 = a value to intersect * value2 = another value to intersect * * Returns: %TRUE if the intersection is non-empty */ public static bool intersect(out Value dest, Value value1, Value value2) { GValue* outdest = sliceNew!GValue(); auto p = gst_value_intersect(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); return p; } /** * Tests if the given GValue, if available in a GstStructure (or any other * container) contains a "fixed" (which means: one value) or an "unfixed" * (which means: multiple possible values, such as data lists or data * ranges) value. * * Params: * value = the #GValue to check * * Returns: true if the value is "fixed". */ public static bool isFixed(Value value) { return gst_value_is_fixed((value is null) ? null : value.getValueStruct()) != 0; } /** * Check that @value1 is a subset of @value2. * * Params: * value1 = a #GValue * value2 = a #GValue * * Returns: %TRUE is @value1 is a subset of @value2 */ public static bool isSubset(Value value1, Value value2) { return gst_value_is_subset((value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; } /** * Registers functions to perform calculations on #GValue items of a given * type. Each type can only be added once. * * Params: * table = structure containing functions to register */ public static void register(GstValueTable* table) { gst_value_register(table); } /** * tries to transform the given @value into a string representation that allows * getting back this string later on using gst_value_deserialize(). * * Free-function: g_free * * Params: * value = a #GValue to serialize * * Returns: the serialization for @value * or %NULL if none exists */ public static string serialize(Value value) { auto retStr = gst_value_serialize((value is null) ? null : value.getValueStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Sets @value to the bitmask specified by @bitmask. * * Params: * value = a GValue initialized to #GST_TYPE_BITMASK * bitmask = the bitmask */ public static void setBitmask(Value value, ulong bitmask) { gst_value_set_bitmask((value is null) ? null : value.getValueStruct(), bitmask); } /** * Sets the contents of @value to @caps. A reference to the * provided @caps will be taken by the @value. * * Params: * value = a GValue initialized to GST_TYPE_CAPS * caps = the caps to set the value to */ public static void setCaps(Value value, Caps caps) { gst_value_set_caps((value is null) ? null : value.getValueStruct(), (caps is null) ? null : caps.getCapsStruct()); } /** * Sets the contents of @value to @features. * * Params: * value = a GValue initialized to GST_TYPE_CAPS_FEATURES * features = the features to set the value to */ public static void setCapsFeatures(Value value, CapsFeatures features) { gst_value_set_caps_features((value is null) ? null : value.getValueStruct(), (features is null) ? null : features.getCapsFeaturesStruct()); } /** * Sets @value to the range specified by @start and @end. * * Params: * value = a GValue initialized to GST_TYPE_DOUBLE_RANGE * start = the start of the range * end = the end of the range */ public static void setDoubleRange(Value value, double start, double end) { gst_value_set_double_range((value is null) ? null : value.getValueStruct(), start, end); } /** * Sets @value to the fraction specified by @numerator over @denominator. * The fraction gets reduced to the smallest numerator and denominator, * and if necessary the sign is moved to the numerator. * * Params: * value = a GValue initialized to #GST_TYPE_FRACTION * numerator = the numerator of the fraction * denominator = the denominator of the fraction */ public static void setFraction(Value value, int numerator, int denominator) { gst_value_set_fraction((value is null) ? null : value.getValueStruct(), numerator, denominator); } /** * Sets @value to the range specified by @start and @end. * * Params: * value = a GValue initialized to GST_TYPE_FRACTION_RANGE * start = the start of the range (a GST_TYPE_FRACTION GValue) * end = the end of the range (a GST_TYPE_FRACTION GValue) */ public static void setFractionRange(Value value, Value start, Value end) { gst_value_set_fraction_range((value is null) ? null : value.getValueStruct(), (start is null) ? null : start.getValueStruct(), (end is null) ? null : end.getValueStruct()); } /** * Sets @value to the range specified by @numerator_start/@denominator_start * and @numerator_end/@denominator_end. * * Params: * value = a GValue initialized to GST_TYPE_FRACTION_RANGE * numeratorStart = the numerator start of the range * denominatorStart = the denominator start of the range * numeratorEnd = the numerator end of the range * denominatorEnd = the denominator end of the range */ public static void setFractionRangeFull(Value value, int numeratorStart, int denominatorStart, int numeratorEnd, int denominatorEnd) { gst_value_set_fraction_range_full((value is null) ? null : value.getValueStruct(), numeratorStart, denominatorStart, numeratorEnd, denominatorEnd); } /** * Sets @value to the range specified by @start and @end. * * Params: * value = a GValue initialized to GST_TYPE_INT64_RANGE * start = the start of the range * end = the end of the range */ public static void setInt64Range(Value value, long start, long end) { gst_value_set_int64_range((value is null) ? null : value.getValueStruct(), start, end); } /** * Sets @value to the range specified by @start, @end and @step. * * Params: * value = a GValue initialized to GST_TYPE_INT64_RANGE * start = the start of the range * end = the end of the range * step = the step of the range */ public static void setInt64RangeStep(Value value, long start, long end, long step) { gst_value_set_int64_range_step((value is null) ? null : value.getValueStruct(), start, end, step); } /** * Sets @value to the range specified by @start and @end. * * Params: * value = a GValue initialized to GST_TYPE_INT_RANGE * start = the start of the range * end = the end of the range */ public static void setIntRange(Value value, int start, int end) { gst_value_set_int_range((value is null) ? null : value.getValueStruct(), start, end); } /** * Sets @value to the range specified by @start, @end and @step. * * Params: * value = a GValue initialized to GST_TYPE_INT_RANGE * start = the start of the range * end = the end of the range * step = the step of the range */ public static void setIntRangeStep(Value value, int start, int end, int step) { gst_value_set_int_range_step((value is null) ? null : value.getValueStruct(), start, end, step); } /** * Sets the contents of @value to @structure. * * Params: * value = a GValue initialized to GST_TYPE_STRUCTURE * structure = the structure to set the value to */ public static void setStructure(Value value, Structure structure) { gst_value_set_structure((value is null) ? null : value.getValueStruct(), (structure is null) ? null : structure.getStructureStruct()); } /** * Subtracts @subtrahend from @minuend and stores the result in @dest. * Note that this means subtraction as in sets, not as in mathematics. * * Params: * dest = the destination value * for the result if the subtraction is not empty. May be %NULL, * in which case the resulting set will not be computed, which can * give a fair speedup. * minuend = the value to subtract from * subtrahend = the value to subtract * * Returns: %TRUE if the subtraction is not empty */ public static bool subtract(out Value dest, Value minuend, Value subtrahend) { GValue* outdest = sliceNew!GValue(); auto p = gst_value_subtract(outdest, (minuend is null) ? null : minuend.getValueStruct(), (subtrahend is null) ? null : subtrahend.getValueStruct()) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); return p; } /** * Creates a GValue corresponding to the union of @value1 and @value2. * * Params: * dest = the destination value * value1 = a value to union * value2 = another value to union * * Returns: %TRUE if the union succeeded. */ public static bool unio(out Value dest, Value value1, Value value2) { GValue* outdest = sliceNew!GValue(); auto p = gst_value_union(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()) != 0; dest = ObjectG.getDObject!(Value)(outdest, true); return p; } } GtkD-3.7.5/generated/gstreamer/gstreamer/ValueList.d000066400000000000000000000112131324604450400223540ustar00rootroot00000000000000/* * 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 gstreamer.ValueList; private import glib.MemorySlice; private import gobject.ObjectG; private import gobject.Value; private import gstreamer.c.functions; public import gstreamer.c.types; public import gstreamerc.gstreamertypes; /** */ public class ValueList { /** */ public static GType getType() { return gst_value_list_get_type(); } /** * Appends @append_value to the GstValueList in @value. * * Params: * value = a #GValue of type #GST_TYPE_LIST * appendValue = the value to append * * Since: 1.2 */ public static void appendAndTakeValue(Value value, Value appendValue) { gst_value_list_append_and_take_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct()); } /** * Appends @append_value to the GstValueList in @value. * * Params: * value = a #GValue of type #GST_TYPE_LIST * appendValue = the value to append */ public static void appendValue(Value value, Value appendValue) { gst_value_list_append_value((value is null) ? null : value.getValueStruct(), (appendValue is null) ? null : appendValue.getValueStruct()); } /** * Concatenates copies of @value1 and @value2 into a list. Values that are not * of type #GST_TYPE_LIST are treated as if they were lists of length 1. * @dest will be initialized to the type #GST_TYPE_LIST. * * Params: * dest = an uninitialized #GValue to take the result * value1 = a #GValue * value2 = a #GValue */ public static void concat(out Value dest, Value value1, Value value2) { GValue* outdest = sliceNew!GValue(); gst_value_list_concat(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()); dest = ObjectG.getDObject!(Value)(outdest, true); } /** * Gets the number of values contained in @value. * * Params: * value = a #GValue of type #GST_TYPE_LIST * * Returns: the number of values */ public static uint getSize(Value value) { return gst_value_list_get_size((value is null) ? null : value.getValueStruct()); } /** * Gets the value that is a member of the list contained in @value and * has the index @index. * * Params: * value = a #GValue of type #GST_TYPE_LIST * index = index of value to get from the list * * Returns: the value at the given index */ public static Value getValue(Value value, uint index) { auto p = gst_value_list_get_value((value is null) ? null : value.getValueStruct(), index); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Merges copies of @value1 and @value2. Values that are not * of type #GST_TYPE_LIST are treated as if they were lists of length 1. * * The result will be put into @dest and will either be a list that will not * contain any duplicates, or a non-list type (if @value1 and @value2 * were equal). * * Params: * dest = an uninitialized #GValue to take the result * value1 = a #GValue * value2 = a #GValue */ public static void merge(out Value dest, Value value1, Value value2) { GValue* outdest = sliceNew!GValue(); gst_value_list_merge(outdest, (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()); dest = ObjectG.getDObject!(Value)(outdest, true); } /** * Prepends @prepend_value to the GstValueList in @value. * * Params: * value = a #GValue of type #GST_TYPE_LIST * prependValue = the value to prepend */ public static void prependValue(Value value, Value prependValue) { gst_value_list_prepend_value((value is null) ? null : value.getValueStruct(), (prependValue is null) ? null : prependValue.getValueStruct()); } } GtkD-3.7.5/generated/gstreamer/gstreamer/c/000077500000000000000000000000001324604450400205235ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gstreamer/c/functions.d000066400000000000000000012535521324604450400227150ustar00rootroot00000000000000/* * 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 gstreamer.c.functions; import std.stdio; import gstreamer.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GSTREAMER = ["libgstreamer-1.0-0.dll"]; else version (OSX) static immutable LIBRARY_GSTREAMER = ["libgstreamer-1.0.0.dylib"]; else static immutable LIBRARY_GSTREAMER = ["libgstreamer-1.0.so.0"]; shared static this() { // gstreamer.AllocationParams Linker.link(gst_allocation_params_get_type, "gst_allocation_params_get_type", LIBRARY_GSTREAMER); Linker.link(gst_allocation_params_copy, "gst_allocation_params_copy", LIBRARY_GSTREAMER); Linker.link(gst_allocation_params_free, "gst_allocation_params_free", LIBRARY_GSTREAMER); Linker.link(gst_allocation_params_init, "gst_allocation_params_init", LIBRARY_GSTREAMER); // gstreamer.Allocator Linker.link(gst_allocator_get_type, "gst_allocator_get_type", LIBRARY_GSTREAMER); Linker.link(gst_allocator_find, "gst_allocator_find", LIBRARY_GSTREAMER); Linker.link(gst_allocator_register, "gst_allocator_register", LIBRARY_GSTREAMER); Linker.link(gst_allocator_alloc, "gst_allocator_alloc", LIBRARY_GSTREAMER); Linker.link(gst_allocator_free, "gst_allocator_free", LIBRARY_GSTREAMER); Linker.link(gst_allocator_set_default, "gst_allocator_set_default", LIBRARY_GSTREAMER); // gstreamer.AtomicQueue Linker.link(gst_atomic_queue_get_type, "gst_atomic_queue_get_type", LIBRARY_GSTREAMER); Linker.link(gst_atomic_queue_new, "gst_atomic_queue_new", LIBRARY_GSTREAMER); Linker.link(gst_atomic_queue_length, "gst_atomic_queue_length", LIBRARY_GSTREAMER); Linker.link(gst_atomic_queue_peek, "gst_atomic_queue_peek", LIBRARY_GSTREAMER); Linker.link(gst_atomic_queue_pop, "gst_atomic_queue_pop", LIBRARY_GSTREAMER); Linker.link(gst_atomic_queue_push, "gst_atomic_queue_push", LIBRARY_GSTREAMER); Linker.link(gst_atomic_queue_ref, "gst_atomic_queue_ref", LIBRARY_GSTREAMER); Linker.link(gst_atomic_queue_unref, "gst_atomic_queue_unref", LIBRARY_GSTREAMER); // gstreamer.Bin Linker.link(gst_bin_get_type, "gst_bin_get_type", LIBRARY_GSTREAMER); Linker.link(gst_bin_new, "gst_bin_new", LIBRARY_GSTREAMER); Linker.link(gst_bin_add, "gst_bin_add", LIBRARY_GSTREAMER); Linker.link(gst_bin_add_many, "gst_bin_add_many", LIBRARY_GSTREAMER); Linker.link(gst_bin_find_unlinked_pad, "gst_bin_find_unlinked_pad", LIBRARY_GSTREAMER); Linker.link(gst_bin_get_by_interface, "gst_bin_get_by_interface", LIBRARY_GSTREAMER); Linker.link(gst_bin_get_by_name, "gst_bin_get_by_name", LIBRARY_GSTREAMER); Linker.link(gst_bin_get_by_name_recurse_up, "gst_bin_get_by_name_recurse_up", LIBRARY_GSTREAMER); Linker.link(gst_bin_get_suppressed_flags, "gst_bin_get_suppressed_flags", LIBRARY_GSTREAMER); Linker.link(gst_bin_iterate_all_by_interface, "gst_bin_iterate_all_by_interface", LIBRARY_GSTREAMER); Linker.link(gst_bin_iterate_elements, "gst_bin_iterate_elements", LIBRARY_GSTREAMER); Linker.link(gst_bin_iterate_recurse, "gst_bin_iterate_recurse", LIBRARY_GSTREAMER); Linker.link(gst_bin_iterate_sinks, "gst_bin_iterate_sinks", LIBRARY_GSTREAMER); Linker.link(gst_bin_iterate_sorted, "gst_bin_iterate_sorted", LIBRARY_GSTREAMER); Linker.link(gst_bin_iterate_sources, "gst_bin_iterate_sources", LIBRARY_GSTREAMER); Linker.link(gst_bin_recalculate_latency, "gst_bin_recalculate_latency", LIBRARY_GSTREAMER); Linker.link(gst_bin_remove, "gst_bin_remove", LIBRARY_GSTREAMER); Linker.link(gst_bin_remove_many, "gst_bin_remove_many", LIBRARY_GSTREAMER); Linker.link(gst_bin_set_suppressed_flags, "gst_bin_set_suppressed_flags", LIBRARY_GSTREAMER); Linker.link(gst_bin_sync_children_states, "gst_bin_sync_children_states", LIBRARY_GSTREAMER); // gstreamer.Bitmask Linker.link(gst_bitmask_get_type, "gst_bitmask_get_type", LIBRARY_GSTREAMER); // gstreamer.Buffer Linker.link(gst_buffer_get_type, "gst_buffer_get_type", LIBRARY_GSTREAMER); Linker.link(gst_buffer_new, "gst_buffer_new", LIBRARY_GSTREAMER); Linker.link(gst_buffer_new_allocate, "gst_buffer_new_allocate", LIBRARY_GSTREAMER); Linker.link(gst_buffer_new_wrapped, "gst_buffer_new_wrapped", LIBRARY_GSTREAMER); Linker.link(gst_buffer_new_wrapped_full, "gst_buffer_new_wrapped_full", LIBRARY_GSTREAMER); Linker.link(gst_buffer_add_meta, "gst_buffer_add_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_add_parent_buffer_meta, "gst_buffer_add_parent_buffer_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_add_protection_meta, "gst_buffer_add_protection_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_append, "gst_buffer_append", LIBRARY_GSTREAMER); Linker.link(gst_buffer_append_memory, "gst_buffer_append_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_append_region, "gst_buffer_append_region", LIBRARY_GSTREAMER); Linker.link(gst_buffer_copy_deep, "gst_buffer_copy_deep", LIBRARY_GSTREAMER); Linker.link(gst_buffer_copy_into, "gst_buffer_copy_into", LIBRARY_GSTREAMER); Linker.link(gst_buffer_copy_region, "gst_buffer_copy_region", LIBRARY_GSTREAMER); Linker.link(gst_buffer_extract, "gst_buffer_extract", LIBRARY_GSTREAMER); Linker.link(gst_buffer_extract_dup, "gst_buffer_extract_dup", LIBRARY_GSTREAMER); Linker.link(gst_buffer_fill, "gst_buffer_fill", LIBRARY_GSTREAMER); Linker.link(gst_buffer_find_memory, "gst_buffer_find_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_foreach_meta, "gst_buffer_foreach_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_all_memory, "gst_buffer_get_all_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_flags, "gst_buffer_get_flags", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_memory, "gst_buffer_get_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_memory_range, "gst_buffer_get_memory_range", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_meta, "gst_buffer_get_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_size, "gst_buffer_get_size", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_sizes, "gst_buffer_get_sizes", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_sizes_range, "gst_buffer_get_sizes_range", LIBRARY_GSTREAMER); Linker.link(gst_buffer_has_flags, "gst_buffer_has_flags", LIBRARY_GSTREAMER); Linker.link(gst_buffer_insert_memory, "gst_buffer_insert_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_is_all_memory_writable, "gst_buffer_is_all_memory_writable", LIBRARY_GSTREAMER); Linker.link(gst_buffer_is_memory_range_writable, "gst_buffer_is_memory_range_writable", LIBRARY_GSTREAMER); Linker.link(gst_buffer_iterate_meta, "gst_buffer_iterate_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_iterate_meta_filtered, "gst_buffer_iterate_meta_filtered", LIBRARY_GSTREAMER); Linker.link(gst_buffer_map, "gst_buffer_map", LIBRARY_GSTREAMER); Linker.link(gst_buffer_map_range, "gst_buffer_map_range", LIBRARY_GSTREAMER); Linker.link(gst_buffer_memcmp, "gst_buffer_memcmp", LIBRARY_GSTREAMER); Linker.link(gst_buffer_memset, "gst_buffer_memset", LIBRARY_GSTREAMER); Linker.link(gst_buffer_n_memory, "gst_buffer_n_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_peek_memory, "gst_buffer_peek_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_prepend_memory, "gst_buffer_prepend_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_remove_all_memory, "gst_buffer_remove_all_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_remove_memory, "gst_buffer_remove_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_remove_memory_range, "gst_buffer_remove_memory_range", LIBRARY_GSTREAMER); Linker.link(gst_buffer_remove_meta, "gst_buffer_remove_meta", LIBRARY_GSTREAMER); Linker.link(gst_buffer_replace_all_memory, "gst_buffer_replace_all_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_replace_memory, "gst_buffer_replace_memory", LIBRARY_GSTREAMER); Linker.link(gst_buffer_replace_memory_range, "gst_buffer_replace_memory_range", LIBRARY_GSTREAMER); Linker.link(gst_buffer_resize, "gst_buffer_resize", LIBRARY_GSTREAMER); Linker.link(gst_buffer_resize_range, "gst_buffer_resize_range", LIBRARY_GSTREAMER); Linker.link(gst_buffer_set_flags, "gst_buffer_set_flags", LIBRARY_GSTREAMER); Linker.link(gst_buffer_set_size, "gst_buffer_set_size", LIBRARY_GSTREAMER); Linker.link(gst_buffer_unmap, "gst_buffer_unmap", LIBRARY_GSTREAMER); Linker.link(gst_buffer_unset_flags, "gst_buffer_unset_flags", LIBRARY_GSTREAMER); Linker.link(gst_buffer_get_max_memory, "gst_buffer_get_max_memory", LIBRARY_GSTREAMER); // gstreamer.BufferList Linker.link(gst_buffer_list_get_type, "gst_buffer_list_get_type", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_new, "gst_buffer_list_new", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_new_sized, "gst_buffer_list_new_sized", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_copy_deep, "gst_buffer_list_copy_deep", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_foreach, "gst_buffer_list_foreach", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_get, "gst_buffer_list_get", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_insert, "gst_buffer_list_insert", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_length, "gst_buffer_list_length", LIBRARY_GSTREAMER); Linker.link(gst_buffer_list_remove, "gst_buffer_list_remove", LIBRARY_GSTREAMER); // gstreamer.BufferPool Linker.link(gst_buffer_pool_get_type, "gst_buffer_pool_get_type", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_new, "gst_buffer_pool_new", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_config_add_option, "gst_buffer_pool_config_add_option", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_config_get_allocator, "gst_buffer_pool_config_get_allocator", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_config_get_option, "gst_buffer_pool_config_get_option", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_config_get_params, "gst_buffer_pool_config_get_params", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_config_has_option, "gst_buffer_pool_config_has_option", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_config_n_options, "gst_buffer_pool_config_n_options", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_config_set_allocator, "gst_buffer_pool_config_set_allocator", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_config_set_params, "gst_buffer_pool_config_set_params", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_config_validate_params, "gst_buffer_pool_config_validate_params", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_acquire_buffer, "gst_buffer_pool_acquire_buffer", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_get_config, "gst_buffer_pool_get_config", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_get_options, "gst_buffer_pool_get_options", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_has_option, "gst_buffer_pool_has_option", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_is_active, "gst_buffer_pool_is_active", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_release_buffer, "gst_buffer_pool_release_buffer", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_set_active, "gst_buffer_pool_set_active", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_set_config, "gst_buffer_pool_set_config", LIBRARY_GSTREAMER); Linker.link(gst_buffer_pool_set_flushing, "gst_buffer_pool_set_flushing", LIBRARY_GSTREAMER); // gstreamer.Bus Linker.link(gst_bus_get_type, "gst_bus_get_type", LIBRARY_GSTREAMER); Linker.link(gst_bus_new, "gst_bus_new", LIBRARY_GSTREAMER); Linker.link(gst_bus_add_signal_watch, "gst_bus_add_signal_watch", LIBRARY_GSTREAMER); Linker.link(gst_bus_add_signal_watch_full, "gst_bus_add_signal_watch_full", LIBRARY_GSTREAMER); Linker.link(gst_bus_add_watch, "gst_bus_add_watch", LIBRARY_GSTREAMER); Linker.link(gst_bus_add_watch_full, "gst_bus_add_watch_full", LIBRARY_GSTREAMER); Linker.link(gst_bus_async_signal_func, "gst_bus_async_signal_func", LIBRARY_GSTREAMER); Linker.link(gst_bus_create_watch, "gst_bus_create_watch", LIBRARY_GSTREAMER); Linker.link(gst_bus_disable_sync_message_emission, "gst_bus_disable_sync_message_emission", LIBRARY_GSTREAMER); Linker.link(gst_bus_enable_sync_message_emission, "gst_bus_enable_sync_message_emission", LIBRARY_GSTREAMER); Linker.link(gst_bus_have_pending, "gst_bus_have_pending", LIBRARY_GSTREAMER); Linker.link(gst_bus_peek, "gst_bus_peek", LIBRARY_GSTREAMER); Linker.link(gst_bus_poll, "gst_bus_poll", LIBRARY_GSTREAMER); Linker.link(gst_bus_pop, "gst_bus_pop", LIBRARY_GSTREAMER); Linker.link(gst_bus_pop_filtered, "gst_bus_pop_filtered", LIBRARY_GSTREAMER); Linker.link(gst_bus_post, "gst_bus_post", LIBRARY_GSTREAMER); Linker.link(gst_bus_remove_signal_watch, "gst_bus_remove_signal_watch", LIBRARY_GSTREAMER); Linker.link(gst_bus_remove_watch, "gst_bus_remove_watch", LIBRARY_GSTREAMER); Linker.link(gst_bus_set_flushing, "gst_bus_set_flushing", LIBRARY_GSTREAMER); Linker.link(gst_bus_set_sync_handler, "gst_bus_set_sync_handler", LIBRARY_GSTREAMER); Linker.link(gst_bus_sync_signal_handler, "gst_bus_sync_signal_handler", LIBRARY_GSTREAMER); Linker.link(gst_bus_timed_pop, "gst_bus_timed_pop", LIBRARY_GSTREAMER); Linker.link(gst_bus_timed_pop_filtered, "gst_bus_timed_pop_filtered", LIBRARY_GSTREAMER); // gstreamer.Caps Linker.link(gst_caps_get_type, "gst_caps_get_type", LIBRARY_GSTREAMER); Linker.link(gst_caps_new_any, "gst_caps_new_any", LIBRARY_GSTREAMER); Linker.link(gst_caps_new_empty, "gst_caps_new_empty", LIBRARY_GSTREAMER); Linker.link(gst_caps_new_empty_simple, "gst_caps_new_empty_simple", LIBRARY_GSTREAMER); Linker.link(gst_caps_new_full, "gst_caps_new_full", LIBRARY_GSTREAMER); Linker.link(gst_caps_new_full_valist, "gst_caps_new_full_valist", LIBRARY_GSTREAMER); Linker.link(gst_caps_new_simple, "gst_caps_new_simple", LIBRARY_GSTREAMER); Linker.link(gst_caps_append, "gst_caps_append", LIBRARY_GSTREAMER); Linker.link(gst_caps_append_structure, "gst_caps_append_structure", LIBRARY_GSTREAMER); Linker.link(gst_caps_append_structure_full, "gst_caps_append_structure_full", LIBRARY_GSTREAMER); Linker.link(gst_caps_can_intersect, "gst_caps_can_intersect", LIBRARY_GSTREAMER); Linker.link(gst_caps_copy_nth, "gst_caps_copy_nth", LIBRARY_GSTREAMER); Linker.link(gst_caps_filter_and_map_in_place, "gst_caps_filter_and_map_in_place", LIBRARY_GSTREAMER); Linker.link(gst_caps_fixate, "gst_caps_fixate", LIBRARY_GSTREAMER); Linker.link(gst_caps_foreach, "gst_caps_foreach", LIBRARY_GSTREAMER); Linker.link(gst_caps_get_features, "gst_caps_get_features", LIBRARY_GSTREAMER); Linker.link(gst_caps_get_size, "gst_caps_get_size", LIBRARY_GSTREAMER); Linker.link(gst_caps_get_structure, "gst_caps_get_structure", LIBRARY_GSTREAMER); Linker.link(gst_caps_intersect, "gst_caps_intersect", LIBRARY_GSTREAMER); Linker.link(gst_caps_intersect_full, "gst_caps_intersect_full", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_always_compatible, "gst_caps_is_always_compatible", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_any, "gst_caps_is_any", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_empty, "gst_caps_is_empty", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_equal, "gst_caps_is_equal", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_equal_fixed, "gst_caps_is_equal_fixed", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_fixed, "gst_caps_is_fixed", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_strictly_equal, "gst_caps_is_strictly_equal", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_subset, "gst_caps_is_subset", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_subset_structure, "gst_caps_is_subset_structure", LIBRARY_GSTREAMER); Linker.link(gst_caps_is_subset_structure_full, "gst_caps_is_subset_structure_full", LIBRARY_GSTREAMER); Linker.link(gst_caps_map_in_place, "gst_caps_map_in_place", LIBRARY_GSTREAMER); Linker.link(gst_caps_merge, "gst_caps_merge", LIBRARY_GSTREAMER); Linker.link(gst_caps_merge_structure, "gst_caps_merge_structure", LIBRARY_GSTREAMER); Linker.link(gst_caps_merge_structure_full, "gst_caps_merge_structure_full", LIBRARY_GSTREAMER); Linker.link(gst_caps_normalize, "gst_caps_normalize", LIBRARY_GSTREAMER); Linker.link(gst_caps_remove_structure, "gst_caps_remove_structure", LIBRARY_GSTREAMER); Linker.link(gst_caps_set_features, "gst_caps_set_features", LIBRARY_GSTREAMER); Linker.link(gst_caps_set_simple, "gst_caps_set_simple", LIBRARY_GSTREAMER); Linker.link(gst_caps_set_simple_valist, "gst_caps_set_simple_valist", LIBRARY_GSTREAMER); Linker.link(gst_caps_set_value, "gst_caps_set_value", LIBRARY_GSTREAMER); Linker.link(gst_caps_simplify, "gst_caps_simplify", LIBRARY_GSTREAMER); Linker.link(gst_caps_steal_structure, "gst_caps_steal_structure", LIBRARY_GSTREAMER); Linker.link(gst_caps_subtract, "gst_caps_subtract", LIBRARY_GSTREAMER); Linker.link(gst_caps_to_string, "gst_caps_to_string", LIBRARY_GSTREAMER); Linker.link(gst_caps_truncate, "gst_caps_truncate", LIBRARY_GSTREAMER); Linker.link(gst_caps_from_string, "gst_caps_from_string", LIBRARY_GSTREAMER); // gstreamer.CapsFeatures Linker.link(gst_caps_features_get_type, "gst_caps_features_get_type", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_new, "gst_caps_features_new", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_new_any, "gst_caps_features_new_any", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_new_empty, "gst_caps_features_new_empty", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_new_id, "gst_caps_features_new_id", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_new_id_valist, "gst_caps_features_new_id_valist", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_new_valist, "gst_caps_features_new_valist", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_add, "gst_caps_features_add", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_add_id, "gst_caps_features_add_id", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_contains, "gst_caps_features_contains", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_contains_id, "gst_caps_features_contains_id", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_copy, "gst_caps_features_copy", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_free, "gst_caps_features_free", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_get_nth, "gst_caps_features_get_nth", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_get_nth_id, "gst_caps_features_get_nth_id", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_get_size, "gst_caps_features_get_size", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_is_any, "gst_caps_features_is_any", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_is_equal, "gst_caps_features_is_equal", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_remove, "gst_caps_features_remove", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_remove_id, "gst_caps_features_remove_id", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_set_parent_refcount, "gst_caps_features_set_parent_refcount", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_to_string, "gst_caps_features_to_string", LIBRARY_GSTREAMER); Linker.link(gst_caps_features_from_string, "gst_caps_features_from_string", LIBRARY_GSTREAMER); // gstreamer.ChildProxy Linker.link(gst_child_proxy_get_type, "gst_child_proxy_get_type", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_child_added, "gst_child_proxy_child_added", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_child_removed, "gst_child_proxy_child_removed", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_get, "gst_child_proxy_get", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_get_child_by_index, "gst_child_proxy_get_child_by_index", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_get_child_by_name, "gst_child_proxy_get_child_by_name", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_get_children_count, "gst_child_proxy_get_children_count", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_get_property, "gst_child_proxy_get_property", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_get_valist, "gst_child_proxy_get_valist", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_lookup, "gst_child_proxy_lookup", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_set, "gst_child_proxy_set", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_set_property, "gst_child_proxy_set_property", LIBRARY_GSTREAMER); Linker.link(gst_child_proxy_set_valist, "gst_child_proxy_set_valist", LIBRARY_GSTREAMER); // gstreamer.Clock Linker.link(gst_clock_get_type, "gst_clock_get_type", LIBRARY_GSTREAMER); Linker.link(gst_clock_id_compare_func, "gst_clock_id_compare_func", LIBRARY_GSTREAMER); Linker.link(gst_clock_id_get_time, "gst_clock_id_get_time", LIBRARY_GSTREAMER); Linker.link(gst_clock_id_ref, "gst_clock_id_ref", LIBRARY_GSTREAMER); Linker.link(gst_clock_id_unref, "gst_clock_id_unref", LIBRARY_GSTREAMER); Linker.link(gst_clock_id_unschedule, "gst_clock_id_unschedule", LIBRARY_GSTREAMER); Linker.link(gst_clock_id_wait, "gst_clock_id_wait", LIBRARY_GSTREAMER); Linker.link(gst_clock_id_wait_async, "gst_clock_id_wait_async", LIBRARY_GSTREAMER); Linker.link(gst_clock_add_observation, "gst_clock_add_observation", LIBRARY_GSTREAMER); Linker.link(gst_clock_add_observation_unapplied, "gst_clock_add_observation_unapplied", LIBRARY_GSTREAMER); Linker.link(gst_clock_adjust_unlocked, "gst_clock_adjust_unlocked", LIBRARY_GSTREAMER); Linker.link(gst_clock_adjust_with_calibration, "gst_clock_adjust_with_calibration", LIBRARY_GSTREAMER); Linker.link(gst_clock_get_calibration, "gst_clock_get_calibration", LIBRARY_GSTREAMER); Linker.link(gst_clock_get_internal_time, "gst_clock_get_internal_time", LIBRARY_GSTREAMER); Linker.link(gst_clock_get_master, "gst_clock_get_master", LIBRARY_GSTREAMER); Linker.link(gst_clock_get_resolution, "gst_clock_get_resolution", LIBRARY_GSTREAMER); Linker.link(gst_clock_get_time, "gst_clock_get_time", LIBRARY_GSTREAMER); Linker.link(gst_clock_get_timeout, "gst_clock_get_timeout", LIBRARY_GSTREAMER); Linker.link(gst_clock_is_synced, "gst_clock_is_synced", LIBRARY_GSTREAMER); Linker.link(gst_clock_new_periodic_id, "gst_clock_new_periodic_id", LIBRARY_GSTREAMER); Linker.link(gst_clock_new_single_shot_id, "gst_clock_new_single_shot_id", LIBRARY_GSTREAMER); Linker.link(gst_clock_periodic_id_reinit, "gst_clock_periodic_id_reinit", LIBRARY_GSTREAMER); Linker.link(gst_clock_set_calibration, "gst_clock_set_calibration", LIBRARY_GSTREAMER); Linker.link(gst_clock_set_master, "gst_clock_set_master", LIBRARY_GSTREAMER); Linker.link(gst_clock_set_resolution, "gst_clock_set_resolution", LIBRARY_GSTREAMER); Linker.link(gst_clock_set_synced, "gst_clock_set_synced", LIBRARY_GSTREAMER); Linker.link(gst_clock_set_timeout, "gst_clock_set_timeout", LIBRARY_GSTREAMER); Linker.link(gst_clock_single_shot_id_reinit, "gst_clock_single_shot_id_reinit", LIBRARY_GSTREAMER); Linker.link(gst_clock_unadjust_unlocked, "gst_clock_unadjust_unlocked", LIBRARY_GSTREAMER); Linker.link(gst_clock_unadjust_with_calibration, "gst_clock_unadjust_with_calibration", LIBRARY_GSTREAMER); Linker.link(gst_clock_wait_for_sync, "gst_clock_wait_for_sync", LIBRARY_GSTREAMER); // gstreamer.Context Linker.link(gst_context_get_type, "gst_context_get_type", LIBRARY_GSTREAMER); Linker.link(gst_context_new, "gst_context_new", LIBRARY_GSTREAMER); Linker.link(gst_context_get_context_type, "gst_context_get_context_type", LIBRARY_GSTREAMER); Linker.link(gst_context_get_structure, "gst_context_get_structure", LIBRARY_GSTREAMER); Linker.link(gst_context_has_context_type, "gst_context_has_context_type", LIBRARY_GSTREAMER); Linker.link(gst_context_is_persistent, "gst_context_is_persistent", LIBRARY_GSTREAMER); Linker.link(gst_context_writable_structure, "gst_context_writable_structure", LIBRARY_GSTREAMER); // gstreamer.ControlBinding Linker.link(gst_control_binding_get_type, "gst_control_binding_get_type", LIBRARY_GSTREAMER); Linker.link(gst_control_binding_get_g_value_array, "gst_control_binding_get_g_value_array", LIBRARY_GSTREAMER); Linker.link(gst_control_binding_get_value, "gst_control_binding_get_value", LIBRARY_GSTREAMER); Linker.link(gst_control_binding_get_value_array, "gst_control_binding_get_value_array", LIBRARY_GSTREAMER); Linker.link(gst_control_binding_is_disabled, "gst_control_binding_is_disabled", LIBRARY_GSTREAMER); Linker.link(gst_control_binding_set_disabled, "gst_control_binding_set_disabled", LIBRARY_GSTREAMER); Linker.link(gst_control_binding_sync_values, "gst_control_binding_sync_values", LIBRARY_GSTREAMER); // gstreamer.ControlSource Linker.link(gst_control_source_get_type, "gst_control_source_get_type", LIBRARY_GSTREAMER); Linker.link(gst_control_source_get_value, "gst_control_source_get_value", LIBRARY_GSTREAMER); Linker.link(gst_control_source_get_value_array, "gst_control_source_get_value_array", LIBRARY_GSTREAMER); // gstreamer.DateTime Linker.link(gst_date_time_get_type, "gst_date_time_get_type", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new, "gst_date_time_new", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_from_g_date_time, "gst_date_time_new_from_g_date_time", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_from_iso8601_string, "gst_date_time_new_from_iso8601_string", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_from_unix_epoch_local_time, "gst_date_time_new_from_unix_epoch_local_time", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_from_unix_epoch_utc, "gst_date_time_new_from_unix_epoch_utc", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_local_time, "gst_date_time_new_local_time", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_now_local_time, "gst_date_time_new_now_local_time", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_now_utc, "gst_date_time_new_now_utc", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_y, "gst_date_time_new_y", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_ym, "gst_date_time_new_ym", LIBRARY_GSTREAMER); Linker.link(gst_date_time_new_ymd, "gst_date_time_new_ymd", LIBRARY_GSTREAMER); Linker.link(gst_date_time_get_day, "gst_date_time_get_day", LIBRARY_GSTREAMER); Linker.link(gst_date_time_get_hour, "gst_date_time_get_hour", LIBRARY_GSTREAMER); Linker.link(gst_date_time_get_microsecond, "gst_date_time_get_microsecond", LIBRARY_GSTREAMER); Linker.link(gst_date_time_get_minute, "gst_date_time_get_minute", LIBRARY_GSTREAMER); Linker.link(gst_date_time_get_month, "gst_date_time_get_month", LIBRARY_GSTREAMER); Linker.link(gst_date_time_get_second, "gst_date_time_get_second", LIBRARY_GSTREAMER); Linker.link(gst_date_time_get_time_zone_offset, "gst_date_time_get_time_zone_offset", LIBRARY_GSTREAMER); Linker.link(gst_date_time_get_year, "gst_date_time_get_year", LIBRARY_GSTREAMER); Linker.link(gst_date_time_has_day, "gst_date_time_has_day", LIBRARY_GSTREAMER); Linker.link(gst_date_time_has_month, "gst_date_time_has_month", LIBRARY_GSTREAMER); Linker.link(gst_date_time_has_second, "gst_date_time_has_second", LIBRARY_GSTREAMER); Linker.link(gst_date_time_has_time, "gst_date_time_has_time", LIBRARY_GSTREAMER); Linker.link(gst_date_time_has_year, "gst_date_time_has_year", LIBRARY_GSTREAMER); Linker.link(gst_date_time_ref, "gst_date_time_ref", LIBRARY_GSTREAMER); Linker.link(gst_date_time_to_g_date_time, "gst_date_time_to_g_date_time", LIBRARY_GSTREAMER); Linker.link(gst_date_time_to_iso8601_string, "gst_date_time_to_iso8601_string", LIBRARY_GSTREAMER); Linker.link(gst_date_time_unref, "gst_date_time_unref", LIBRARY_GSTREAMER); // gstreamer.DebugCategory Linker.link(gst_debug_category_free, "gst_debug_category_free", LIBRARY_GSTREAMER); Linker.link(gst_debug_category_get_color, "gst_debug_category_get_color", LIBRARY_GSTREAMER); Linker.link(gst_debug_category_get_description, "gst_debug_category_get_description", LIBRARY_GSTREAMER); Linker.link(gst_debug_category_get_name, "gst_debug_category_get_name", LIBRARY_GSTREAMER); Linker.link(gst_debug_category_get_threshold, "gst_debug_category_get_threshold", LIBRARY_GSTREAMER); Linker.link(gst_debug_category_reset_threshold, "gst_debug_category_reset_threshold", LIBRARY_GSTREAMER); Linker.link(gst_debug_category_set_threshold, "gst_debug_category_set_threshold", LIBRARY_GSTREAMER); // gstreamer.DebugMessage Linker.link(gst_debug_message_get, "gst_debug_message_get", LIBRARY_GSTREAMER); // gstreamer.Device Linker.link(gst_device_get_type, "gst_device_get_type", LIBRARY_GSTREAMER); Linker.link(gst_device_create_element, "gst_device_create_element", LIBRARY_GSTREAMER); Linker.link(gst_device_get_caps, "gst_device_get_caps", LIBRARY_GSTREAMER); Linker.link(gst_device_get_device_class, "gst_device_get_device_class", LIBRARY_GSTREAMER); Linker.link(gst_device_get_display_name, "gst_device_get_display_name", LIBRARY_GSTREAMER); Linker.link(gst_device_get_properties, "gst_device_get_properties", LIBRARY_GSTREAMER); Linker.link(gst_device_has_classes, "gst_device_has_classes", LIBRARY_GSTREAMER); Linker.link(gst_device_has_classesv, "gst_device_has_classesv", LIBRARY_GSTREAMER); Linker.link(gst_device_reconfigure_element, "gst_device_reconfigure_element", LIBRARY_GSTREAMER); // gstreamer.DeviceMonitor Linker.link(gst_device_monitor_get_type, "gst_device_monitor_get_type", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_new, "gst_device_monitor_new", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_add_filter, "gst_device_monitor_add_filter", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_get_bus, "gst_device_monitor_get_bus", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_get_devices, "gst_device_monitor_get_devices", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_get_providers, "gst_device_monitor_get_providers", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_get_show_all_devices, "gst_device_monitor_get_show_all_devices", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_remove_filter, "gst_device_monitor_remove_filter", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_set_show_all_devices, "gst_device_monitor_set_show_all_devices", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_start, "gst_device_monitor_start", LIBRARY_GSTREAMER); Linker.link(gst_device_monitor_stop, "gst_device_monitor_stop", LIBRARY_GSTREAMER); // gstreamer.DeviceProvider Linker.link(gst_device_provider_get_type, "gst_device_provider_get_type", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_register, "gst_device_provider_register", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_can_monitor, "gst_device_provider_can_monitor", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_device_add, "gst_device_provider_device_add", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_device_remove, "gst_device_provider_device_remove", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_get_bus, "gst_device_provider_get_bus", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_get_devices, "gst_device_provider_get_devices", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_get_factory, "gst_device_provider_get_factory", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_get_hidden_providers, "gst_device_provider_get_hidden_providers", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_hide_provider, "gst_device_provider_hide_provider", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_start, "gst_device_provider_start", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_stop, "gst_device_provider_stop", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_unhide_provider, "gst_device_provider_unhide_provider", LIBRARY_GSTREAMER); // gstreamer.DeviceProviderClass Linker.link(gst_device_provider_class_add_metadata, "gst_device_provider_class_add_metadata", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_class_add_static_metadata, "gst_device_provider_class_add_static_metadata", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_class_get_metadata, "gst_device_provider_class_get_metadata", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_class_set_metadata, "gst_device_provider_class_set_metadata", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_class_set_static_metadata, "gst_device_provider_class_set_static_metadata", LIBRARY_GSTREAMER); // gstreamer.DeviceProviderFactory Linker.link(gst_device_provider_factory_get_type, "gst_device_provider_factory_get_type", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_factory_find, "gst_device_provider_factory_find", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_factory_get_by_name, "gst_device_provider_factory_get_by_name", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_factory_list_get_device_providers, "gst_device_provider_factory_list_get_device_providers", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_factory_get, "gst_device_provider_factory_get", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_factory_get_device_provider_type, "gst_device_provider_factory_get_device_provider_type", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_factory_get_metadata, "gst_device_provider_factory_get_metadata", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_factory_get_metadata_keys, "gst_device_provider_factory_get_metadata_keys", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_factory_has_classes, "gst_device_provider_factory_has_classes", LIBRARY_GSTREAMER); Linker.link(gst_device_provider_factory_has_classesv, "gst_device_provider_factory_has_classesv", LIBRARY_GSTREAMER); // gstreamer.DoubleRange Linker.link(gst_double_range_get_type, "gst_double_range_get_type", LIBRARY_GSTREAMER); // gstreamer.DynamicTypeFactory Linker.link(gst_dynamic_type_factory_get_type, "gst_dynamic_type_factory_get_type", LIBRARY_GSTREAMER); Linker.link(gst_dynamic_type_factory_load, "gst_dynamic_type_factory_load", LIBRARY_GSTREAMER); // gstreamer.Element Linker.link(gst_element_get_type, "gst_element_get_type", LIBRARY_GSTREAMER); Linker.link(gst_element_make_from_uri, "gst_element_make_from_uri", LIBRARY_GSTREAMER); Linker.link(gst_element_register, "gst_element_register", LIBRARY_GSTREAMER); Linker.link(gst_element_state_change_return_get_name, "gst_element_state_change_return_get_name", LIBRARY_GSTREAMER); Linker.link(gst_element_state_get_name, "gst_element_state_get_name", LIBRARY_GSTREAMER); Linker.link(gst_element_abort_state, "gst_element_abort_state", LIBRARY_GSTREAMER); Linker.link(gst_element_add_pad, "gst_element_add_pad", LIBRARY_GSTREAMER); Linker.link(gst_element_add_property_deep_notify_watch, "gst_element_add_property_deep_notify_watch", LIBRARY_GSTREAMER); Linker.link(gst_element_add_property_notify_watch, "gst_element_add_property_notify_watch", LIBRARY_GSTREAMER); Linker.link(gst_element_call_async, "gst_element_call_async", LIBRARY_GSTREAMER); Linker.link(gst_element_change_state, "gst_element_change_state", LIBRARY_GSTREAMER); Linker.link(gst_element_continue_state, "gst_element_continue_state", LIBRARY_GSTREAMER); Linker.link(gst_element_create_all_pads, "gst_element_create_all_pads", LIBRARY_GSTREAMER); Linker.link(gst_element_get_base_time, "gst_element_get_base_time", LIBRARY_GSTREAMER); Linker.link(gst_element_get_bus, "gst_element_get_bus", LIBRARY_GSTREAMER); Linker.link(gst_element_get_clock, "gst_element_get_clock", LIBRARY_GSTREAMER); Linker.link(gst_element_get_compatible_pad, "gst_element_get_compatible_pad", LIBRARY_GSTREAMER); Linker.link(gst_element_get_compatible_pad_template, "gst_element_get_compatible_pad_template", LIBRARY_GSTREAMER); Linker.link(gst_element_get_context, "gst_element_get_context", LIBRARY_GSTREAMER); Linker.link(gst_element_get_context_unlocked, "gst_element_get_context_unlocked", LIBRARY_GSTREAMER); Linker.link(gst_element_get_contexts, "gst_element_get_contexts", LIBRARY_GSTREAMER); Linker.link(gst_element_get_factory, "gst_element_get_factory", LIBRARY_GSTREAMER); Linker.link(gst_element_get_request_pad, "gst_element_get_request_pad", LIBRARY_GSTREAMER); Linker.link(gst_element_get_start_time, "gst_element_get_start_time", LIBRARY_GSTREAMER); Linker.link(gst_element_get_state, "gst_element_get_state", LIBRARY_GSTREAMER); Linker.link(gst_element_get_static_pad, "gst_element_get_static_pad", LIBRARY_GSTREAMER); Linker.link(gst_element_is_locked_state, "gst_element_is_locked_state", LIBRARY_GSTREAMER); Linker.link(gst_element_iterate_pads, "gst_element_iterate_pads", LIBRARY_GSTREAMER); Linker.link(gst_element_iterate_sink_pads, "gst_element_iterate_sink_pads", LIBRARY_GSTREAMER); Linker.link(gst_element_iterate_src_pads, "gst_element_iterate_src_pads", LIBRARY_GSTREAMER); Linker.link(gst_element_link, "gst_element_link", LIBRARY_GSTREAMER); Linker.link(gst_element_link_filtered, "gst_element_link_filtered", LIBRARY_GSTREAMER); Linker.link(gst_element_link_many, "gst_element_link_many", LIBRARY_GSTREAMER); Linker.link(gst_element_link_pads, "gst_element_link_pads", LIBRARY_GSTREAMER); Linker.link(gst_element_link_pads_filtered, "gst_element_link_pads_filtered", LIBRARY_GSTREAMER); Linker.link(gst_element_link_pads_full, "gst_element_link_pads_full", LIBRARY_GSTREAMER); Linker.link(gst_element_lost_state, "gst_element_lost_state", LIBRARY_GSTREAMER); Linker.link(gst_element_message_full, "gst_element_message_full", LIBRARY_GSTREAMER); Linker.link(gst_element_message_full_with_details, "gst_element_message_full_with_details", LIBRARY_GSTREAMER); Linker.link(gst_element_no_more_pads, "gst_element_no_more_pads", LIBRARY_GSTREAMER); Linker.link(gst_element_post_message, "gst_element_post_message", LIBRARY_GSTREAMER); Linker.link(gst_element_provide_clock, "gst_element_provide_clock", LIBRARY_GSTREAMER); Linker.link(gst_element_query, "gst_element_query", LIBRARY_GSTREAMER); Linker.link(gst_element_query_convert, "gst_element_query_convert", LIBRARY_GSTREAMER); Linker.link(gst_element_query_duration, "gst_element_query_duration", LIBRARY_GSTREAMER); Linker.link(gst_element_query_position, "gst_element_query_position", LIBRARY_GSTREAMER); Linker.link(gst_element_release_request_pad, "gst_element_release_request_pad", LIBRARY_GSTREAMER); Linker.link(gst_element_remove_pad, "gst_element_remove_pad", LIBRARY_GSTREAMER); Linker.link(gst_element_remove_property_notify_watch, "gst_element_remove_property_notify_watch", LIBRARY_GSTREAMER); Linker.link(gst_element_request_pad, "gst_element_request_pad", LIBRARY_GSTREAMER); Linker.link(gst_element_seek, "gst_element_seek", LIBRARY_GSTREAMER); Linker.link(gst_element_seek_simple, "gst_element_seek_simple", LIBRARY_GSTREAMER); Linker.link(gst_element_send_event, "gst_element_send_event", LIBRARY_GSTREAMER); Linker.link(gst_element_set_base_time, "gst_element_set_base_time", LIBRARY_GSTREAMER); Linker.link(gst_element_set_bus, "gst_element_set_bus", LIBRARY_GSTREAMER); Linker.link(gst_element_set_clock, "gst_element_set_clock", LIBRARY_GSTREAMER); Linker.link(gst_element_set_context, "gst_element_set_context", LIBRARY_GSTREAMER); Linker.link(gst_element_set_locked_state, "gst_element_set_locked_state", LIBRARY_GSTREAMER); Linker.link(gst_element_set_start_time, "gst_element_set_start_time", LIBRARY_GSTREAMER); Linker.link(gst_element_set_state, "gst_element_set_state", LIBRARY_GSTREAMER); Linker.link(gst_element_sync_state_with_parent, "gst_element_sync_state_with_parent", LIBRARY_GSTREAMER); Linker.link(gst_element_unlink, "gst_element_unlink", LIBRARY_GSTREAMER); Linker.link(gst_element_unlink_many, "gst_element_unlink_many", LIBRARY_GSTREAMER); Linker.link(gst_element_unlink_pads, "gst_element_unlink_pads", LIBRARY_GSTREAMER); // gstreamer.ElementClass Linker.link(gst_element_class_add_metadata, "gst_element_class_add_metadata", LIBRARY_GSTREAMER); Linker.link(gst_element_class_add_pad_template, "gst_element_class_add_pad_template", LIBRARY_GSTREAMER); Linker.link(gst_element_class_add_static_metadata, "gst_element_class_add_static_metadata", LIBRARY_GSTREAMER); Linker.link(gst_element_class_add_static_pad_template, "gst_element_class_add_static_pad_template", LIBRARY_GSTREAMER); Linker.link(gst_element_class_get_metadata, "gst_element_class_get_metadata", LIBRARY_GSTREAMER); Linker.link(gst_element_class_get_pad_template, "gst_element_class_get_pad_template", LIBRARY_GSTREAMER); Linker.link(gst_element_class_get_pad_template_list, "gst_element_class_get_pad_template_list", LIBRARY_GSTREAMER); Linker.link(gst_element_class_set_metadata, "gst_element_class_set_metadata", LIBRARY_GSTREAMER); Linker.link(gst_element_class_set_static_metadata, "gst_element_class_set_static_metadata", LIBRARY_GSTREAMER); // gstreamer.ElementFactory Linker.link(gst_element_factory_get_type, "gst_element_factory_get_type", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_find, "gst_element_factory_find", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_list_filter, "gst_element_factory_list_filter", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_list_get_elements, "gst_element_factory_list_get_elements", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_make, "gst_element_factory_make", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_can_sink_all_caps, "gst_element_factory_can_sink_all_caps", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_can_sink_any_caps, "gst_element_factory_can_sink_any_caps", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_can_src_all_caps, "gst_element_factory_can_src_all_caps", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_can_src_any_caps, "gst_element_factory_can_src_any_caps", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_create, "gst_element_factory_create", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_element_type, "gst_element_factory_get_element_type", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_metadata, "gst_element_factory_get_metadata", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_metadata_keys, "gst_element_factory_get_metadata_keys", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_num_pad_templates, "gst_element_factory_get_num_pad_templates", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_static_pad_templates, "gst_element_factory_get_static_pad_templates", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_uri_protocols, "gst_element_factory_get_uri_protocols", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_get_uri_type, "gst_element_factory_get_uri_type", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_has_interface, "gst_element_factory_has_interface", LIBRARY_GSTREAMER); Linker.link(gst_element_factory_list_is_type, "gst_element_factory_list_is_type", LIBRARY_GSTREAMER); // gstreamer.Event Linker.link(gst_event_get_type, "gst_event_get_type", LIBRARY_GSTREAMER); Linker.link(gst_event_new_buffer_size, "gst_event_new_buffer_size", LIBRARY_GSTREAMER); Linker.link(gst_event_new_caps, "gst_event_new_caps", LIBRARY_GSTREAMER); Linker.link(gst_event_new_custom, "gst_event_new_custom", LIBRARY_GSTREAMER); Linker.link(gst_event_new_eos, "gst_event_new_eos", LIBRARY_GSTREAMER); Linker.link(gst_event_new_flush_start, "gst_event_new_flush_start", LIBRARY_GSTREAMER); Linker.link(gst_event_new_flush_stop, "gst_event_new_flush_stop", LIBRARY_GSTREAMER); Linker.link(gst_event_new_gap, "gst_event_new_gap", LIBRARY_GSTREAMER); Linker.link(gst_event_new_latency, "gst_event_new_latency", LIBRARY_GSTREAMER); Linker.link(gst_event_new_navigation, "gst_event_new_navigation", LIBRARY_GSTREAMER); Linker.link(gst_event_new_protection, "gst_event_new_protection", LIBRARY_GSTREAMER); Linker.link(gst_event_new_qos, "gst_event_new_qos", LIBRARY_GSTREAMER); Linker.link(gst_event_new_reconfigure, "gst_event_new_reconfigure", LIBRARY_GSTREAMER); Linker.link(gst_event_new_seek, "gst_event_new_seek", LIBRARY_GSTREAMER); Linker.link(gst_event_new_segment, "gst_event_new_segment", LIBRARY_GSTREAMER); Linker.link(gst_event_new_segment_done, "gst_event_new_segment_done", LIBRARY_GSTREAMER); Linker.link(gst_event_new_select_streams, "gst_event_new_select_streams", LIBRARY_GSTREAMER); Linker.link(gst_event_new_sink_message, "gst_event_new_sink_message", LIBRARY_GSTREAMER); Linker.link(gst_event_new_step, "gst_event_new_step", LIBRARY_GSTREAMER); Linker.link(gst_event_new_stream_collection, "gst_event_new_stream_collection", LIBRARY_GSTREAMER); Linker.link(gst_event_new_stream_group_done, "gst_event_new_stream_group_done", LIBRARY_GSTREAMER); Linker.link(gst_event_new_stream_start, "gst_event_new_stream_start", LIBRARY_GSTREAMER); Linker.link(gst_event_new_tag, "gst_event_new_tag", LIBRARY_GSTREAMER); Linker.link(gst_event_new_toc, "gst_event_new_toc", LIBRARY_GSTREAMER); Linker.link(gst_event_new_toc_select, "gst_event_new_toc_select", LIBRARY_GSTREAMER); Linker.link(gst_event_copy_segment, "gst_event_copy_segment", LIBRARY_GSTREAMER); Linker.link(gst_event_get_running_time_offset, "gst_event_get_running_time_offset", LIBRARY_GSTREAMER); Linker.link(gst_event_get_seqnum, "gst_event_get_seqnum", LIBRARY_GSTREAMER); Linker.link(gst_event_get_structure, "gst_event_get_structure", LIBRARY_GSTREAMER); Linker.link(gst_event_has_name, "gst_event_has_name", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_buffer_size, "gst_event_parse_buffer_size", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_caps, "gst_event_parse_caps", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_flush_stop, "gst_event_parse_flush_stop", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_gap, "gst_event_parse_gap", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_group_id, "gst_event_parse_group_id", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_latency, "gst_event_parse_latency", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_protection, "gst_event_parse_protection", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_qos, "gst_event_parse_qos", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_seek, "gst_event_parse_seek", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_segment, "gst_event_parse_segment", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_segment_done, "gst_event_parse_segment_done", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_select_streams, "gst_event_parse_select_streams", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_sink_message, "gst_event_parse_sink_message", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_step, "gst_event_parse_step", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_stream, "gst_event_parse_stream", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_stream_collection, "gst_event_parse_stream_collection", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_stream_flags, "gst_event_parse_stream_flags", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_stream_group_done, "gst_event_parse_stream_group_done", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_stream_start, "gst_event_parse_stream_start", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_tag, "gst_event_parse_tag", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_toc, "gst_event_parse_toc", LIBRARY_GSTREAMER); Linker.link(gst_event_parse_toc_select, "gst_event_parse_toc_select", LIBRARY_GSTREAMER); Linker.link(gst_event_set_group_id, "gst_event_set_group_id", LIBRARY_GSTREAMER); Linker.link(gst_event_set_running_time_offset, "gst_event_set_running_time_offset", LIBRARY_GSTREAMER); Linker.link(gst_event_set_seqnum, "gst_event_set_seqnum", LIBRARY_GSTREAMER); Linker.link(gst_event_set_stream, "gst_event_set_stream", LIBRARY_GSTREAMER); Linker.link(gst_event_set_stream_flags, "gst_event_set_stream_flags", LIBRARY_GSTREAMER); Linker.link(gst_event_writable_structure, "gst_event_writable_structure", LIBRARY_GSTREAMER); Linker.link(gst_event_type_get_flags, "gst_event_type_get_flags", LIBRARY_GSTREAMER); Linker.link(gst_event_type_get_name, "gst_event_type_get_name", LIBRARY_GSTREAMER); Linker.link(gst_event_type_to_quark, "gst_event_type_to_quark", LIBRARY_GSTREAMER); // gstreamer.FlagSet Linker.link(gst_flagset_get_type, "gst_flagset_get_type", LIBRARY_GSTREAMER); Linker.link(gst_flagset_register, "gst_flagset_register", LIBRARY_GSTREAMER); // gstreamer.Fraction Linker.link(gst_fraction_get_type, "gst_fraction_get_type", LIBRARY_GSTREAMER); // gstreamer.FractionRange Linker.link(gst_fraction_range_get_type, "gst_fraction_range_get_type", LIBRARY_GSTREAMER); // gstreamer.GhostPad Linker.link(gst_ghost_pad_get_type, "gst_ghost_pad_get_type", LIBRARY_GSTREAMER); Linker.link(gst_ghost_pad_new, "gst_ghost_pad_new", LIBRARY_GSTREAMER); Linker.link(gst_ghost_pad_new_from_template, "gst_ghost_pad_new_from_template", LIBRARY_GSTREAMER); Linker.link(gst_ghost_pad_new_no_target, "gst_ghost_pad_new_no_target", LIBRARY_GSTREAMER); Linker.link(gst_ghost_pad_new_no_target_from_template, "gst_ghost_pad_new_no_target_from_template", LIBRARY_GSTREAMER); Linker.link(gst_ghost_pad_activate_mode_default, "gst_ghost_pad_activate_mode_default", LIBRARY_GSTREAMER); Linker.link(gst_ghost_pad_internal_activate_mode_default, "gst_ghost_pad_internal_activate_mode_default", LIBRARY_GSTREAMER); Linker.link(gst_ghost_pad_construct, "gst_ghost_pad_construct", LIBRARY_GSTREAMER); Linker.link(gst_ghost_pad_get_target, "gst_ghost_pad_get_target", LIBRARY_GSTREAMER); Linker.link(gst_ghost_pad_set_target, "gst_ghost_pad_set_target", LIBRARY_GSTREAMER); // gstreamer.Int64Range Linker.link(gst_int64_range_get_type, "gst_int64_range_get_type", LIBRARY_GSTREAMER); // gstreamer.IntRange Linker.link(gst_int_range_get_type, "gst_int_range_get_type", LIBRARY_GSTREAMER); // gstreamer.Iterator Linker.link(gst_iterator_get_type, "gst_iterator_get_type", LIBRARY_GSTREAMER); Linker.link(gst_iterator_new, "gst_iterator_new", LIBRARY_GSTREAMER); Linker.link(gst_iterator_new_list, "gst_iterator_new_list", LIBRARY_GSTREAMER); Linker.link(gst_iterator_new_single, "gst_iterator_new_single", LIBRARY_GSTREAMER); Linker.link(gst_iterator_copy, "gst_iterator_copy", LIBRARY_GSTREAMER); Linker.link(gst_iterator_filter, "gst_iterator_filter", LIBRARY_GSTREAMER); Linker.link(gst_iterator_find_custom, "gst_iterator_find_custom", LIBRARY_GSTREAMER); Linker.link(gst_iterator_fold, "gst_iterator_fold", LIBRARY_GSTREAMER); Linker.link(gst_iterator_foreach, "gst_iterator_foreach", LIBRARY_GSTREAMER); Linker.link(gst_iterator_free, "gst_iterator_free", LIBRARY_GSTREAMER); Linker.link(gst_iterator_next, "gst_iterator_next", LIBRARY_GSTREAMER); Linker.link(gst_iterator_push, "gst_iterator_push", LIBRARY_GSTREAMER); Linker.link(gst_iterator_resync, "gst_iterator_resync", LIBRARY_GSTREAMER); // gstreamer.Memory Linker.link(gst_memory_get_type, "gst_memory_get_type", LIBRARY_GSTREAMER); Linker.link(gst_memory_new_wrapped, "gst_memory_new_wrapped", LIBRARY_GSTREAMER); Linker.link(gst_memory_copy, "gst_memory_copy", LIBRARY_GSTREAMER); Linker.link(gst_memory_get_sizes, "gst_memory_get_sizes", LIBRARY_GSTREAMER); Linker.link(gst_memory_init, "gst_memory_init", LIBRARY_GSTREAMER); Linker.link(gst_memory_is_span, "gst_memory_is_span", LIBRARY_GSTREAMER); Linker.link(gst_memory_is_type, "gst_memory_is_type", LIBRARY_GSTREAMER); Linker.link(gst_memory_make_mapped, "gst_memory_make_mapped", LIBRARY_GSTREAMER); Linker.link(gst_memory_map, "gst_memory_map", LIBRARY_GSTREAMER); Linker.link(gst_memory_resize, "gst_memory_resize", LIBRARY_GSTREAMER); Linker.link(gst_memory_share, "gst_memory_share", LIBRARY_GSTREAMER); Linker.link(gst_memory_unmap, "gst_memory_unmap", LIBRARY_GSTREAMER); // gstreamer.Message Linker.link(gst_message_get_type, "gst_message_get_type", LIBRARY_GSTREAMER); Linker.link(gst_message_new_application, "gst_message_new_application", LIBRARY_GSTREAMER); Linker.link(gst_message_new_async_done, "gst_message_new_async_done", LIBRARY_GSTREAMER); Linker.link(gst_message_new_async_start, "gst_message_new_async_start", LIBRARY_GSTREAMER); Linker.link(gst_message_new_buffering, "gst_message_new_buffering", LIBRARY_GSTREAMER); Linker.link(gst_message_new_clock_lost, "gst_message_new_clock_lost", LIBRARY_GSTREAMER); Linker.link(gst_message_new_clock_provide, "gst_message_new_clock_provide", LIBRARY_GSTREAMER); Linker.link(gst_message_new_custom, "gst_message_new_custom", LIBRARY_GSTREAMER); Linker.link(gst_message_new_device_added, "gst_message_new_device_added", LIBRARY_GSTREAMER); Linker.link(gst_message_new_device_removed, "gst_message_new_device_removed", LIBRARY_GSTREAMER); Linker.link(gst_message_new_duration_changed, "gst_message_new_duration_changed", LIBRARY_GSTREAMER); Linker.link(gst_message_new_element, "gst_message_new_element", LIBRARY_GSTREAMER); Linker.link(gst_message_new_eos, "gst_message_new_eos", LIBRARY_GSTREAMER); Linker.link(gst_message_new_error, "gst_message_new_error", LIBRARY_GSTREAMER); Linker.link(gst_message_new_error_with_details, "gst_message_new_error_with_details", LIBRARY_GSTREAMER); Linker.link(gst_message_new_have_context, "gst_message_new_have_context", LIBRARY_GSTREAMER); Linker.link(gst_message_new_info, "gst_message_new_info", LIBRARY_GSTREAMER); Linker.link(gst_message_new_info_with_details, "gst_message_new_info_with_details", LIBRARY_GSTREAMER); Linker.link(gst_message_new_latency, "gst_message_new_latency", LIBRARY_GSTREAMER); Linker.link(gst_message_new_need_context, "gst_message_new_need_context", LIBRARY_GSTREAMER); Linker.link(gst_message_new_new_clock, "gst_message_new_new_clock", LIBRARY_GSTREAMER); Linker.link(gst_message_new_progress, "gst_message_new_progress", LIBRARY_GSTREAMER); Linker.link(gst_message_new_property_notify, "gst_message_new_property_notify", LIBRARY_GSTREAMER); Linker.link(gst_message_new_qos, "gst_message_new_qos", LIBRARY_GSTREAMER); Linker.link(gst_message_new_redirect, "gst_message_new_redirect", LIBRARY_GSTREAMER); Linker.link(gst_message_new_request_state, "gst_message_new_request_state", LIBRARY_GSTREAMER); Linker.link(gst_message_new_reset_time, "gst_message_new_reset_time", LIBRARY_GSTREAMER); Linker.link(gst_message_new_segment_done, "gst_message_new_segment_done", LIBRARY_GSTREAMER); Linker.link(gst_message_new_segment_start, "gst_message_new_segment_start", LIBRARY_GSTREAMER); Linker.link(gst_message_new_state_changed, "gst_message_new_state_changed", LIBRARY_GSTREAMER); Linker.link(gst_message_new_state_dirty, "gst_message_new_state_dirty", LIBRARY_GSTREAMER); Linker.link(gst_message_new_step_done, "gst_message_new_step_done", LIBRARY_GSTREAMER); Linker.link(gst_message_new_step_start, "gst_message_new_step_start", LIBRARY_GSTREAMER); Linker.link(gst_message_new_stream_collection, "gst_message_new_stream_collection", LIBRARY_GSTREAMER); Linker.link(gst_message_new_stream_start, "gst_message_new_stream_start", LIBRARY_GSTREAMER); Linker.link(gst_message_new_stream_status, "gst_message_new_stream_status", LIBRARY_GSTREAMER); Linker.link(gst_message_new_streams_selected, "gst_message_new_streams_selected", LIBRARY_GSTREAMER); Linker.link(gst_message_new_structure_change, "gst_message_new_structure_change", LIBRARY_GSTREAMER); Linker.link(gst_message_new_tag, "gst_message_new_tag", LIBRARY_GSTREAMER); Linker.link(gst_message_new_toc, "gst_message_new_toc", LIBRARY_GSTREAMER); Linker.link(gst_message_new_warning, "gst_message_new_warning", LIBRARY_GSTREAMER); Linker.link(gst_message_new_warning_with_details, "gst_message_new_warning_with_details", LIBRARY_GSTREAMER); Linker.link(gst_message_add_redirect_entry, "gst_message_add_redirect_entry", LIBRARY_GSTREAMER); Linker.link(gst_message_get_num_redirect_entries, "gst_message_get_num_redirect_entries", LIBRARY_GSTREAMER); Linker.link(gst_message_get_seqnum, "gst_message_get_seqnum", LIBRARY_GSTREAMER); Linker.link(gst_message_get_stream_status_object, "gst_message_get_stream_status_object", LIBRARY_GSTREAMER); Linker.link(gst_message_get_structure, "gst_message_get_structure", LIBRARY_GSTREAMER); Linker.link(gst_message_has_name, "gst_message_has_name", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_async_done, "gst_message_parse_async_done", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_buffering, "gst_message_parse_buffering", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_buffering_stats, "gst_message_parse_buffering_stats", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_clock_lost, "gst_message_parse_clock_lost", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_clock_provide, "gst_message_parse_clock_provide", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_context_type, "gst_message_parse_context_type", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_device_added, "gst_message_parse_device_added", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_device_removed, "gst_message_parse_device_removed", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_error, "gst_message_parse_error", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_error_details, "gst_message_parse_error_details", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_group_id, "gst_message_parse_group_id", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_have_context, "gst_message_parse_have_context", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_info, "gst_message_parse_info", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_info_details, "gst_message_parse_info_details", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_new_clock, "gst_message_parse_new_clock", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_progress, "gst_message_parse_progress", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_property_notify, "gst_message_parse_property_notify", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_qos, "gst_message_parse_qos", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_qos_stats, "gst_message_parse_qos_stats", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_qos_values, "gst_message_parse_qos_values", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_redirect_entry, "gst_message_parse_redirect_entry", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_request_state, "gst_message_parse_request_state", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_reset_time, "gst_message_parse_reset_time", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_segment_done, "gst_message_parse_segment_done", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_segment_start, "gst_message_parse_segment_start", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_state_changed, "gst_message_parse_state_changed", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_step_done, "gst_message_parse_step_done", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_step_start, "gst_message_parse_step_start", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_stream_collection, "gst_message_parse_stream_collection", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_stream_status, "gst_message_parse_stream_status", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_streams_selected, "gst_message_parse_streams_selected", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_structure_change, "gst_message_parse_structure_change", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_tag, "gst_message_parse_tag", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_toc, "gst_message_parse_toc", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_warning, "gst_message_parse_warning", LIBRARY_GSTREAMER); Linker.link(gst_message_parse_warning_details, "gst_message_parse_warning_details", LIBRARY_GSTREAMER); Linker.link(gst_message_set_buffering_stats, "gst_message_set_buffering_stats", LIBRARY_GSTREAMER); Linker.link(gst_message_set_group_id, "gst_message_set_group_id", LIBRARY_GSTREAMER); Linker.link(gst_message_set_qos_stats, "gst_message_set_qos_stats", LIBRARY_GSTREAMER); Linker.link(gst_message_set_qos_values, "gst_message_set_qos_values", LIBRARY_GSTREAMER); Linker.link(gst_message_set_seqnum, "gst_message_set_seqnum", LIBRARY_GSTREAMER); Linker.link(gst_message_set_stream_status_object, "gst_message_set_stream_status_object", LIBRARY_GSTREAMER); Linker.link(gst_message_streams_selected_add, "gst_message_streams_selected_add", LIBRARY_GSTREAMER); Linker.link(gst_message_streams_selected_get_size, "gst_message_streams_selected_get_size", LIBRARY_GSTREAMER); Linker.link(gst_message_streams_selected_get_stream, "gst_message_streams_selected_get_stream", LIBRARY_GSTREAMER); Linker.link(gst_message_type_get_name, "gst_message_type_get_name", LIBRARY_GSTREAMER); Linker.link(gst_message_type_to_quark, "gst_message_type_to_quark", LIBRARY_GSTREAMER); // gstreamer.Meta Linker.link(gst_meta_api_type_get_tags, "gst_meta_api_type_get_tags", LIBRARY_GSTREAMER); Linker.link(gst_meta_api_type_has_tag, "gst_meta_api_type_has_tag", LIBRARY_GSTREAMER); Linker.link(gst_meta_api_type_register, "gst_meta_api_type_register", LIBRARY_GSTREAMER); Linker.link(gst_meta_get_info, "gst_meta_get_info", LIBRARY_GSTREAMER); Linker.link(gst_meta_register, "gst_meta_register", LIBRARY_GSTREAMER); // gstreamer.MiniObject Linker.link(gst_mini_object_copy, "gst_mini_object_copy", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_get_qdata, "gst_mini_object_get_qdata", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_init, "gst_mini_object_init", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_is_writable, "gst_mini_object_is_writable", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_lock, "gst_mini_object_lock", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_make_writable, "gst_mini_object_make_writable", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_ref, "gst_mini_object_ref", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_set_qdata, "gst_mini_object_set_qdata", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_steal_qdata, "gst_mini_object_steal_qdata", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_unlock, "gst_mini_object_unlock", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_unref, "gst_mini_object_unref", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_weak_ref, "gst_mini_object_weak_ref", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_weak_unref, "gst_mini_object_weak_unref", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_replace, "gst_mini_object_replace", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_steal, "gst_mini_object_steal", LIBRARY_GSTREAMER); Linker.link(gst_mini_object_take, "gst_mini_object_take", LIBRARY_GSTREAMER); // gstreamer.ObjectGst Linker.link(gst_object_get_type, "gst_object_get_type", LIBRARY_GSTREAMER); Linker.link(gst_object_check_uniqueness, "gst_object_check_uniqueness", LIBRARY_GSTREAMER); Linker.link(gst_object_default_deep_notify, "gst_object_default_deep_notify", LIBRARY_GSTREAMER); Linker.link(gst_object_ref_sink, "gst_object_ref_sink", LIBRARY_GSTREAMER); Linker.link(gst_object_replace, "gst_object_replace", LIBRARY_GSTREAMER); Linker.link(gst_object_add_control_binding, "gst_object_add_control_binding", LIBRARY_GSTREAMER); Linker.link(gst_object_default_error, "gst_object_default_error", LIBRARY_GSTREAMER); Linker.link(gst_object_get_control_binding, "gst_object_get_control_binding", LIBRARY_GSTREAMER); Linker.link(gst_object_get_control_rate, "gst_object_get_control_rate", LIBRARY_GSTREAMER); Linker.link(gst_object_get_g_value_array, "gst_object_get_g_value_array", LIBRARY_GSTREAMER); Linker.link(gst_object_get_name, "gst_object_get_name", LIBRARY_GSTREAMER); Linker.link(gst_object_get_parent, "gst_object_get_parent", LIBRARY_GSTREAMER); Linker.link(gst_object_get_path_string, "gst_object_get_path_string", LIBRARY_GSTREAMER); Linker.link(gst_object_get_value, "gst_object_get_value", LIBRARY_GSTREAMER); Linker.link(gst_object_get_value_array, "gst_object_get_value_array", LIBRARY_GSTREAMER); Linker.link(gst_object_has_active_control_bindings, "gst_object_has_active_control_bindings", LIBRARY_GSTREAMER); Linker.link(gst_object_has_ancestor, "gst_object_has_ancestor", LIBRARY_GSTREAMER); Linker.link(gst_object_has_as_ancestor, "gst_object_has_as_ancestor", LIBRARY_GSTREAMER); Linker.link(gst_object_has_as_parent, "gst_object_has_as_parent", LIBRARY_GSTREAMER); Linker.link(gst_object_ref, "gst_object_ref", LIBRARY_GSTREAMER); Linker.link(gst_object_remove_control_binding, "gst_object_remove_control_binding", LIBRARY_GSTREAMER); Linker.link(gst_object_set_control_binding_disabled, "gst_object_set_control_binding_disabled", LIBRARY_GSTREAMER); Linker.link(gst_object_set_control_bindings_disabled, "gst_object_set_control_bindings_disabled", LIBRARY_GSTREAMER); Linker.link(gst_object_set_control_rate, "gst_object_set_control_rate", LIBRARY_GSTREAMER); Linker.link(gst_object_set_name, "gst_object_set_name", LIBRARY_GSTREAMER); Linker.link(gst_object_set_parent, "gst_object_set_parent", LIBRARY_GSTREAMER); Linker.link(gst_object_suggest_next_sync, "gst_object_suggest_next_sync", LIBRARY_GSTREAMER); Linker.link(gst_object_sync_values, "gst_object_sync_values", LIBRARY_GSTREAMER); Linker.link(gst_object_unparent, "gst_object_unparent", LIBRARY_GSTREAMER); Linker.link(gst_object_unref, "gst_object_unref", LIBRARY_GSTREAMER); // gstreamer.Pad Linker.link(gst_pad_get_type, "gst_pad_get_type", LIBRARY_GSTREAMER); Linker.link(gst_pad_new, "gst_pad_new", LIBRARY_GSTREAMER); Linker.link(gst_pad_new_from_static_template, "gst_pad_new_from_static_template", LIBRARY_GSTREAMER); Linker.link(gst_pad_new_from_template, "gst_pad_new_from_template", LIBRARY_GSTREAMER); Linker.link(gst_pad_link_get_name, "gst_pad_link_get_name", LIBRARY_GSTREAMER); Linker.link(gst_pad_activate_mode, "gst_pad_activate_mode", LIBRARY_GSTREAMER); Linker.link(gst_pad_add_probe, "gst_pad_add_probe", LIBRARY_GSTREAMER); Linker.link(gst_pad_can_link, "gst_pad_can_link", LIBRARY_GSTREAMER); Linker.link(gst_pad_chain, "gst_pad_chain", LIBRARY_GSTREAMER); Linker.link(gst_pad_chain_list, "gst_pad_chain_list", LIBRARY_GSTREAMER); Linker.link(gst_pad_check_reconfigure, "gst_pad_check_reconfigure", LIBRARY_GSTREAMER); Linker.link(gst_pad_create_stream_id, "gst_pad_create_stream_id", LIBRARY_GSTREAMER); Linker.link(gst_pad_create_stream_id_printf, "gst_pad_create_stream_id_printf", LIBRARY_GSTREAMER); Linker.link(gst_pad_create_stream_id_printf_valist, "gst_pad_create_stream_id_printf_valist", LIBRARY_GSTREAMER); Linker.link(gst_pad_event_default, "gst_pad_event_default", LIBRARY_GSTREAMER); Linker.link(gst_pad_forward, "gst_pad_forward", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_allowed_caps, "gst_pad_get_allowed_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_current_caps, "gst_pad_get_current_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_direction, "gst_pad_get_direction", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_element_private, "gst_pad_get_element_private", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_last_flow_return, "gst_pad_get_last_flow_return", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_offset, "gst_pad_get_offset", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_pad_template, "gst_pad_get_pad_template", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_pad_template_caps, "gst_pad_get_pad_template_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_parent_element, "gst_pad_get_parent_element", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_peer, "gst_pad_get_peer", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_range, "gst_pad_get_range", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_sticky_event, "gst_pad_get_sticky_event", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_stream, "gst_pad_get_stream", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_stream_id, "gst_pad_get_stream_id", LIBRARY_GSTREAMER); Linker.link(gst_pad_get_task_state, "gst_pad_get_task_state", LIBRARY_GSTREAMER); Linker.link(gst_pad_has_current_caps, "gst_pad_has_current_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_is_active, "gst_pad_is_active", LIBRARY_GSTREAMER); Linker.link(gst_pad_is_blocked, "gst_pad_is_blocked", LIBRARY_GSTREAMER); Linker.link(gst_pad_is_blocking, "gst_pad_is_blocking", LIBRARY_GSTREAMER); Linker.link(gst_pad_is_linked, "gst_pad_is_linked", LIBRARY_GSTREAMER); Linker.link(gst_pad_iterate_internal_links, "gst_pad_iterate_internal_links", LIBRARY_GSTREAMER); Linker.link(gst_pad_iterate_internal_links_default, "gst_pad_iterate_internal_links_default", LIBRARY_GSTREAMER); Linker.link(gst_pad_link, "gst_pad_link", LIBRARY_GSTREAMER); Linker.link(gst_pad_link_full, "gst_pad_link_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_link_maybe_ghosting, "gst_pad_link_maybe_ghosting", LIBRARY_GSTREAMER); Linker.link(gst_pad_link_maybe_ghosting_full, "gst_pad_link_maybe_ghosting_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_mark_reconfigure, "gst_pad_mark_reconfigure", LIBRARY_GSTREAMER); Linker.link(gst_pad_needs_reconfigure, "gst_pad_needs_reconfigure", LIBRARY_GSTREAMER); Linker.link(gst_pad_pause_task, "gst_pad_pause_task", LIBRARY_GSTREAMER); Linker.link(gst_pad_peer_query, "gst_pad_peer_query", LIBRARY_GSTREAMER); Linker.link(gst_pad_peer_query_accept_caps, "gst_pad_peer_query_accept_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_peer_query_caps, "gst_pad_peer_query_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_peer_query_convert, "gst_pad_peer_query_convert", LIBRARY_GSTREAMER); Linker.link(gst_pad_peer_query_duration, "gst_pad_peer_query_duration", LIBRARY_GSTREAMER); Linker.link(gst_pad_peer_query_position, "gst_pad_peer_query_position", LIBRARY_GSTREAMER); Linker.link(gst_pad_proxy_query_accept_caps, "gst_pad_proxy_query_accept_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_proxy_query_caps, "gst_pad_proxy_query_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_pull_range, "gst_pad_pull_range", LIBRARY_GSTREAMER); Linker.link(gst_pad_push, "gst_pad_push", LIBRARY_GSTREAMER); Linker.link(gst_pad_push_event, "gst_pad_push_event", LIBRARY_GSTREAMER); Linker.link(gst_pad_push_list, "gst_pad_push_list", LIBRARY_GSTREAMER); Linker.link(gst_pad_query, "gst_pad_query", LIBRARY_GSTREAMER); Linker.link(gst_pad_query_accept_caps, "gst_pad_query_accept_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_query_caps, "gst_pad_query_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_query_convert, "gst_pad_query_convert", LIBRARY_GSTREAMER); Linker.link(gst_pad_query_default, "gst_pad_query_default", LIBRARY_GSTREAMER); Linker.link(gst_pad_query_duration, "gst_pad_query_duration", LIBRARY_GSTREAMER); Linker.link(gst_pad_query_position, "gst_pad_query_position", LIBRARY_GSTREAMER); Linker.link(gst_pad_remove_probe, "gst_pad_remove_probe", LIBRARY_GSTREAMER); Linker.link(gst_pad_send_event, "gst_pad_send_event", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_activate_function_full, "gst_pad_set_activate_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_activatemode_function_full, "gst_pad_set_activatemode_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_active, "gst_pad_set_active", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_chain_function_full, "gst_pad_set_chain_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_chain_list_function_full, "gst_pad_set_chain_list_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_element_private, "gst_pad_set_element_private", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_event_full_function_full, "gst_pad_set_event_full_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_event_function_full, "gst_pad_set_event_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_getrange_function_full, "gst_pad_set_getrange_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_iterate_internal_links_function_full, "gst_pad_set_iterate_internal_links_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_link_function_full, "gst_pad_set_link_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_offset, "gst_pad_set_offset", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_query_function_full, "gst_pad_set_query_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_set_unlink_function_full, "gst_pad_set_unlink_function_full", LIBRARY_GSTREAMER); Linker.link(gst_pad_start_task, "gst_pad_start_task", LIBRARY_GSTREAMER); Linker.link(gst_pad_sticky_events_foreach, "gst_pad_sticky_events_foreach", LIBRARY_GSTREAMER); Linker.link(gst_pad_stop_task, "gst_pad_stop_task", LIBRARY_GSTREAMER); Linker.link(gst_pad_store_sticky_event, "gst_pad_store_sticky_event", LIBRARY_GSTREAMER); Linker.link(gst_pad_unlink, "gst_pad_unlink", LIBRARY_GSTREAMER); Linker.link(gst_pad_use_fixed_caps, "gst_pad_use_fixed_caps", LIBRARY_GSTREAMER); Linker.link(gst_flow_get_name, "gst_flow_get_name", LIBRARY_GSTREAMER); Linker.link(gst_flow_to_quark, "gst_flow_to_quark", LIBRARY_GSTREAMER); Linker.link(gst_pad_mode_get_name, "gst_pad_mode_get_name", LIBRARY_GSTREAMER); // gstreamer.PadProbeInfo Linker.link(gst_pad_probe_info_get_buffer, "gst_pad_probe_info_get_buffer", LIBRARY_GSTREAMER); Linker.link(gst_pad_probe_info_get_buffer_list, "gst_pad_probe_info_get_buffer_list", LIBRARY_GSTREAMER); Linker.link(gst_pad_probe_info_get_event, "gst_pad_probe_info_get_event", LIBRARY_GSTREAMER); Linker.link(gst_pad_probe_info_get_query, "gst_pad_probe_info_get_query", LIBRARY_GSTREAMER); // gstreamer.PadTemplate Linker.link(gst_pad_template_get_type, "gst_pad_template_get_type", LIBRARY_GSTREAMER); Linker.link(gst_pad_template_new, "gst_pad_template_new", LIBRARY_GSTREAMER); Linker.link(gst_pad_template_get_caps, "gst_pad_template_get_caps", LIBRARY_GSTREAMER); Linker.link(gst_pad_template_pad_created, "gst_pad_template_pad_created", LIBRARY_GSTREAMER); // gstreamer.ParamArray Linker.link(gst_param_spec_array_get_type, "gst_param_spec_array_get_type", LIBRARY_GSTREAMER); // gstreamer.ParamFraction Linker.link(gst_param_spec_fraction_get_type, "gst_param_spec_fraction_get_type", LIBRARY_GSTREAMER); // gstreamer.ParamSpecFraction Linker.link(gst_param_spec_fraction, "gst_param_spec_fraction", LIBRARY_GSTREAMER); // gstreamer.ParentBufferMeta Linker.link(gst_parent_buffer_meta_get_info, "gst_parent_buffer_meta_get_info", LIBRARY_GSTREAMER); Linker.link(gst_parent_buffer_meta_api_get_type, "gst_parent_buffer_meta_api_get_type", LIBRARY_GSTREAMER); // gstreamer.ParseContext Linker.link(gst_parse_context_get_type, "gst_parse_context_get_type", LIBRARY_GSTREAMER); Linker.link(gst_parse_context_new, "gst_parse_context_new", LIBRARY_GSTREAMER); Linker.link(gst_parse_context_copy, "gst_parse_context_copy", LIBRARY_GSTREAMER); Linker.link(gst_parse_context_free, "gst_parse_context_free", LIBRARY_GSTREAMER); Linker.link(gst_parse_context_get_missing_elements, "gst_parse_context_get_missing_elements", LIBRARY_GSTREAMER); // gstreamer.Pipeline Linker.link(gst_pipeline_get_type, "gst_pipeline_get_type", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_new, "gst_pipeline_new", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_auto_clock, "gst_pipeline_auto_clock", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_get_auto_flush_bus, "gst_pipeline_get_auto_flush_bus", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_get_bus, "gst_pipeline_get_bus", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_get_clock, "gst_pipeline_get_clock", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_get_delay, "gst_pipeline_get_delay", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_get_latency, "gst_pipeline_get_latency", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_get_pipeline_clock, "gst_pipeline_get_pipeline_clock", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_set_auto_flush_bus, "gst_pipeline_set_auto_flush_bus", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_set_clock, "gst_pipeline_set_clock", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_set_delay, "gst_pipeline_set_delay", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_set_latency, "gst_pipeline_set_latency", LIBRARY_GSTREAMER); Linker.link(gst_pipeline_use_clock, "gst_pipeline_use_clock", LIBRARY_GSTREAMER); // gstreamer.Plugin Linker.link(gst_plugin_get_type, "gst_plugin_get_type", LIBRARY_GSTREAMER); Linker.link(gst_plugin_list_free, "gst_plugin_list_free", LIBRARY_GSTREAMER); Linker.link(gst_plugin_load_by_name, "gst_plugin_load_by_name", LIBRARY_GSTREAMER); Linker.link(gst_plugin_load_file, "gst_plugin_load_file", LIBRARY_GSTREAMER); Linker.link(gst_plugin_register_static, "gst_plugin_register_static", LIBRARY_GSTREAMER); Linker.link(gst_plugin_register_static_full, "gst_plugin_register_static_full", LIBRARY_GSTREAMER); Linker.link(gst_plugin_add_dependency, "gst_plugin_add_dependency", LIBRARY_GSTREAMER); Linker.link(gst_plugin_add_dependency_simple, "gst_plugin_add_dependency_simple", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_cache_data, "gst_plugin_get_cache_data", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_description, "gst_plugin_get_description", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_filename, "gst_plugin_get_filename", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_license, "gst_plugin_get_license", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_name, "gst_plugin_get_name", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_origin, "gst_plugin_get_origin", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_package, "gst_plugin_get_package", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_release_date_string, "gst_plugin_get_release_date_string", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_source, "gst_plugin_get_source", LIBRARY_GSTREAMER); Linker.link(gst_plugin_get_version, "gst_plugin_get_version", LIBRARY_GSTREAMER); Linker.link(gst_plugin_is_loaded, "gst_plugin_is_loaded", LIBRARY_GSTREAMER); Linker.link(gst_plugin_load, "gst_plugin_load", LIBRARY_GSTREAMER); Linker.link(gst_plugin_set_cache_data, "gst_plugin_set_cache_data", LIBRARY_GSTREAMER); Linker.link(gst_plugin_error_quark, "gst_plugin_error_quark", LIBRARY_GSTREAMER); // gstreamer.PluginFeature Linker.link(gst_plugin_feature_get_type, "gst_plugin_feature_get_type", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_list_copy, "gst_plugin_feature_list_copy", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_list_debug, "gst_plugin_feature_list_debug", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_list_free, "gst_plugin_feature_list_free", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_rank_compare_func, "gst_plugin_feature_rank_compare_func", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_check_version, "gst_plugin_feature_check_version", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_get_plugin, "gst_plugin_feature_get_plugin", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_get_plugin_name, "gst_plugin_feature_get_plugin_name", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_get_rank, "gst_plugin_feature_get_rank", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_load, "gst_plugin_feature_load", LIBRARY_GSTREAMER); Linker.link(gst_plugin_feature_set_rank, "gst_plugin_feature_set_rank", LIBRARY_GSTREAMER); // gstreamer.Poll Linker.link(gst_poll_add_fd, "gst_poll_add_fd", LIBRARY_GSTREAMER); Linker.link(gst_poll_fd_can_read, "gst_poll_fd_can_read", LIBRARY_GSTREAMER); Linker.link(gst_poll_fd_can_write, "gst_poll_fd_can_write", LIBRARY_GSTREAMER); Linker.link(gst_poll_fd_ctl_read, "gst_poll_fd_ctl_read", LIBRARY_GSTREAMER); Linker.link(gst_poll_fd_ctl_write, "gst_poll_fd_ctl_write", LIBRARY_GSTREAMER); Linker.link(gst_poll_fd_has_closed, "gst_poll_fd_has_closed", LIBRARY_GSTREAMER); Linker.link(gst_poll_fd_has_error, "gst_poll_fd_has_error", LIBRARY_GSTREAMER); Linker.link(gst_poll_fd_ignored, "gst_poll_fd_ignored", LIBRARY_GSTREAMER); Linker.link(gst_poll_free, "gst_poll_free", LIBRARY_GSTREAMER); Linker.link(gst_poll_get_read_gpollfd, "gst_poll_get_read_gpollfd", LIBRARY_GSTREAMER); Linker.link(gst_poll_read_control, "gst_poll_read_control", LIBRARY_GSTREAMER); Linker.link(gst_poll_remove_fd, "gst_poll_remove_fd", LIBRARY_GSTREAMER); Linker.link(gst_poll_restart, "gst_poll_restart", LIBRARY_GSTREAMER); Linker.link(gst_poll_set_controllable, "gst_poll_set_controllable", LIBRARY_GSTREAMER); Linker.link(gst_poll_set_flushing, "gst_poll_set_flushing", LIBRARY_GSTREAMER); Linker.link(gst_poll_wait, "gst_poll_wait", LIBRARY_GSTREAMER); Linker.link(gst_poll_write_control, "gst_poll_write_control", LIBRARY_GSTREAMER); Linker.link(gst_poll_new, "gst_poll_new", LIBRARY_GSTREAMER); Linker.link(gst_poll_new_timer, "gst_poll_new_timer", LIBRARY_GSTREAMER); // gstreamer.PollFD Linker.link(gst_poll_fd_init, "gst_poll_fd_init", LIBRARY_GSTREAMER); // gstreamer.Preset Linker.link(gst_preset_get_type, "gst_preset_get_type", LIBRARY_GSTREAMER); Linker.link(gst_preset_get_app_dir, "gst_preset_get_app_dir", LIBRARY_GSTREAMER); Linker.link(gst_preset_set_app_dir, "gst_preset_set_app_dir", LIBRARY_GSTREAMER); Linker.link(gst_preset_delete_preset, "gst_preset_delete_preset", LIBRARY_GSTREAMER); Linker.link(gst_preset_get_meta, "gst_preset_get_meta", LIBRARY_GSTREAMER); Linker.link(gst_preset_get_preset_names, "gst_preset_get_preset_names", LIBRARY_GSTREAMER); Linker.link(gst_preset_get_property_names, "gst_preset_get_property_names", LIBRARY_GSTREAMER); Linker.link(gst_preset_is_editable, "gst_preset_is_editable", LIBRARY_GSTREAMER); Linker.link(gst_preset_load_preset, "gst_preset_load_preset", LIBRARY_GSTREAMER); Linker.link(gst_preset_rename_preset, "gst_preset_rename_preset", LIBRARY_GSTREAMER); Linker.link(gst_preset_save_preset, "gst_preset_save_preset", LIBRARY_GSTREAMER); Linker.link(gst_preset_set_meta, "gst_preset_set_meta", LIBRARY_GSTREAMER); // gstreamer.ProtectionMeta Linker.link(gst_protection_meta_get_info, "gst_protection_meta_get_info", LIBRARY_GSTREAMER); Linker.link(gst_protection_meta_api_get_type, "gst_protection_meta_api_get_type", LIBRARY_GSTREAMER); Linker.link(gst_protection_select_system, "gst_protection_select_system", LIBRARY_GSTREAMER); // gstreamer.ProxyPad Linker.link(gst_proxy_pad_get_type, "gst_proxy_pad_get_type", LIBRARY_GSTREAMER); Linker.link(gst_proxy_pad_chain_default, "gst_proxy_pad_chain_default", LIBRARY_GSTREAMER); Linker.link(gst_proxy_pad_chain_list_default, "gst_proxy_pad_chain_list_default", LIBRARY_GSTREAMER); Linker.link(gst_proxy_pad_getrange_default, "gst_proxy_pad_getrange_default", LIBRARY_GSTREAMER); Linker.link(gst_proxy_pad_iterate_internal_links_default, "gst_proxy_pad_iterate_internal_links_default", LIBRARY_GSTREAMER); Linker.link(gst_proxy_pad_get_internal, "gst_proxy_pad_get_internal", LIBRARY_GSTREAMER); // gstreamer.Query Linker.link(gst_query_get_type, "gst_query_get_type", LIBRARY_GSTREAMER); Linker.link(gst_query_new_accept_caps, "gst_query_new_accept_caps", LIBRARY_GSTREAMER); Linker.link(gst_query_new_allocation, "gst_query_new_allocation", LIBRARY_GSTREAMER); Linker.link(gst_query_new_buffering, "gst_query_new_buffering", LIBRARY_GSTREAMER); Linker.link(gst_query_new_caps, "gst_query_new_caps", LIBRARY_GSTREAMER); Linker.link(gst_query_new_context, "gst_query_new_context", LIBRARY_GSTREAMER); Linker.link(gst_query_new_convert, "gst_query_new_convert", LIBRARY_GSTREAMER); Linker.link(gst_query_new_custom, "gst_query_new_custom", LIBRARY_GSTREAMER); Linker.link(gst_query_new_drain, "gst_query_new_drain", LIBRARY_GSTREAMER); Linker.link(gst_query_new_duration, "gst_query_new_duration", LIBRARY_GSTREAMER); Linker.link(gst_query_new_formats, "gst_query_new_formats", LIBRARY_GSTREAMER); Linker.link(gst_query_new_latency, "gst_query_new_latency", LIBRARY_GSTREAMER); Linker.link(gst_query_new_position, "gst_query_new_position", LIBRARY_GSTREAMER); Linker.link(gst_query_new_scheduling, "gst_query_new_scheduling", LIBRARY_GSTREAMER); Linker.link(gst_query_new_seeking, "gst_query_new_seeking", LIBRARY_GSTREAMER); Linker.link(gst_query_new_segment, "gst_query_new_segment", LIBRARY_GSTREAMER); Linker.link(gst_query_new_uri, "gst_query_new_uri", LIBRARY_GSTREAMER); Linker.link(gst_query_add_allocation_meta, "gst_query_add_allocation_meta", LIBRARY_GSTREAMER); Linker.link(gst_query_add_allocation_param, "gst_query_add_allocation_param", LIBRARY_GSTREAMER); Linker.link(gst_query_add_allocation_pool, "gst_query_add_allocation_pool", LIBRARY_GSTREAMER); Linker.link(gst_query_add_buffering_range, "gst_query_add_buffering_range", LIBRARY_GSTREAMER); Linker.link(gst_query_add_scheduling_mode, "gst_query_add_scheduling_mode", LIBRARY_GSTREAMER); Linker.link(gst_query_find_allocation_meta, "gst_query_find_allocation_meta", LIBRARY_GSTREAMER); Linker.link(gst_query_get_n_allocation_metas, "gst_query_get_n_allocation_metas", LIBRARY_GSTREAMER); Linker.link(gst_query_get_n_allocation_params, "gst_query_get_n_allocation_params", LIBRARY_GSTREAMER); Linker.link(gst_query_get_n_allocation_pools, "gst_query_get_n_allocation_pools", LIBRARY_GSTREAMER); Linker.link(gst_query_get_n_buffering_ranges, "gst_query_get_n_buffering_ranges", LIBRARY_GSTREAMER); Linker.link(gst_query_get_n_scheduling_modes, "gst_query_get_n_scheduling_modes", LIBRARY_GSTREAMER); Linker.link(gst_query_get_structure, "gst_query_get_structure", LIBRARY_GSTREAMER); Linker.link(gst_query_has_scheduling_mode, "gst_query_has_scheduling_mode", LIBRARY_GSTREAMER); Linker.link(gst_query_has_scheduling_mode_with_flags, "gst_query_has_scheduling_mode_with_flags", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_accept_caps, "gst_query_parse_accept_caps", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_accept_caps_result, "gst_query_parse_accept_caps_result", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_allocation, "gst_query_parse_allocation", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_buffering_percent, "gst_query_parse_buffering_percent", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_buffering_range, "gst_query_parse_buffering_range", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_buffering_stats, "gst_query_parse_buffering_stats", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_caps, "gst_query_parse_caps", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_caps_result, "gst_query_parse_caps_result", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_context, "gst_query_parse_context", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_context_type, "gst_query_parse_context_type", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_convert, "gst_query_parse_convert", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_duration, "gst_query_parse_duration", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_latency, "gst_query_parse_latency", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_n_formats, "gst_query_parse_n_formats", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_nth_allocation_meta, "gst_query_parse_nth_allocation_meta", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_nth_allocation_param, "gst_query_parse_nth_allocation_param", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_nth_allocation_pool, "gst_query_parse_nth_allocation_pool", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_nth_buffering_range, "gst_query_parse_nth_buffering_range", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_nth_format, "gst_query_parse_nth_format", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_nth_scheduling_mode, "gst_query_parse_nth_scheduling_mode", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_position, "gst_query_parse_position", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_scheduling, "gst_query_parse_scheduling", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_seeking, "gst_query_parse_seeking", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_segment, "gst_query_parse_segment", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_uri, "gst_query_parse_uri", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_uri_redirection, "gst_query_parse_uri_redirection", LIBRARY_GSTREAMER); Linker.link(gst_query_parse_uri_redirection_permanent, "gst_query_parse_uri_redirection_permanent", LIBRARY_GSTREAMER); Linker.link(gst_query_remove_nth_allocation_meta, "gst_query_remove_nth_allocation_meta", LIBRARY_GSTREAMER); Linker.link(gst_query_remove_nth_allocation_param, "gst_query_remove_nth_allocation_param", LIBRARY_GSTREAMER); Linker.link(gst_query_remove_nth_allocation_pool, "gst_query_remove_nth_allocation_pool", LIBRARY_GSTREAMER); Linker.link(gst_query_set_accept_caps_result, "gst_query_set_accept_caps_result", LIBRARY_GSTREAMER); Linker.link(gst_query_set_buffering_percent, "gst_query_set_buffering_percent", LIBRARY_GSTREAMER); Linker.link(gst_query_set_buffering_range, "gst_query_set_buffering_range", LIBRARY_GSTREAMER); Linker.link(gst_query_set_buffering_stats, "gst_query_set_buffering_stats", LIBRARY_GSTREAMER); Linker.link(gst_query_set_caps_result, "gst_query_set_caps_result", LIBRARY_GSTREAMER); Linker.link(gst_query_set_context, "gst_query_set_context", LIBRARY_GSTREAMER); Linker.link(gst_query_set_convert, "gst_query_set_convert", LIBRARY_GSTREAMER); Linker.link(gst_query_set_duration, "gst_query_set_duration", LIBRARY_GSTREAMER); Linker.link(gst_query_set_formats, "gst_query_set_formats", LIBRARY_GSTREAMER); Linker.link(gst_query_set_formatsv, "gst_query_set_formatsv", LIBRARY_GSTREAMER); Linker.link(gst_query_set_latency, "gst_query_set_latency", LIBRARY_GSTREAMER); Linker.link(gst_query_set_nth_allocation_param, "gst_query_set_nth_allocation_param", LIBRARY_GSTREAMER); Linker.link(gst_query_set_nth_allocation_pool, "gst_query_set_nth_allocation_pool", LIBRARY_GSTREAMER); Linker.link(gst_query_set_position, "gst_query_set_position", LIBRARY_GSTREAMER); Linker.link(gst_query_set_scheduling, "gst_query_set_scheduling", LIBRARY_GSTREAMER); Linker.link(gst_query_set_seeking, "gst_query_set_seeking", LIBRARY_GSTREAMER); Linker.link(gst_query_set_segment, "gst_query_set_segment", LIBRARY_GSTREAMER); Linker.link(gst_query_set_uri, "gst_query_set_uri", LIBRARY_GSTREAMER); Linker.link(gst_query_set_uri_redirection, "gst_query_set_uri_redirection", LIBRARY_GSTREAMER); Linker.link(gst_query_set_uri_redirection_permanent, "gst_query_set_uri_redirection_permanent", LIBRARY_GSTREAMER); Linker.link(gst_query_writable_structure, "gst_query_writable_structure", LIBRARY_GSTREAMER); Linker.link(gst_query_type_get_flags, "gst_query_type_get_flags", LIBRARY_GSTREAMER); Linker.link(gst_query_type_get_name, "gst_query_type_get_name", LIBRARY_GSTREAMER); Linker.link(gst_query_type_to_quark, "gst_query_type_to_quark", LIBRARY_GSTREAMER); // gstreamer.Registry Linker.link(gst_registry_get_type, "gst_registry_get_type", LIBRARY_GSTREAMER); Linker.link(gst_registry_fork_is_enabled, "gst_registry_fork_is_enabled", LIBRARY_GSTREAMER); Linker.link(gst_registry_fork_set_enabled, "gst_registry_fork_set_enabled", LIBRARY_GSTREAMER); Linker.link(gst_registry_get, "gst_registry_get", LIBRARY_GSTREAMER); Linker.link(gst_registry_add_feature, "gst_registry_add_feature", LIBRARY_GSTREAMER); Linker.link(gst_registry_add_plugin, "gst_registry_add_plugin", LIBRARY_GSTREAMER); Linker.link(gst_registry_check_feature_version, "gst_registry_check_feature_version", LIBRARY_GSTREAMER); Linker.link(gst_registry_feature_filter, "gst_registry_feature_filter", LIBRARY_GSTREAMER); Linker.link(gst_registry_find_feature, "gst_registry_find_feature", LIBRARY_GSTREAMER); Linker.link(gst_registry_find_plugin, "gst_registry_find_plugin", LIBRARY_GSTREAMER); Linker.link(gst_registry_get_feature_list, "gst_registry_get_feature_list", LIBRARY_GSTREAMER); Linker.link(gst_registry_get_feature_list_by_plugin, "gst_registry_get_feature_list_by_plugin", LIBRARY_GSTREAMER); Linker.link(gst_registry_get_feature_list_cookie, "gst_registry_get_feature_list_cookie", LIBRARY_GSTREAMER); Linker.link(gst_registry_get_plugin_list, "gst_registry_get_plugin_list", LIBRARY_GSTREAMER); Linker.link(gst_registry_lookup, "gst_registry_lookup", LIBRARY_GSTREAMER); Linker.link(gst_registry_lookup_feature, "gst_registry_lookup_feature", LIBRARY_GSTREAMER); Linker.link(gst_registry_plugin_filter, "gst_registry_plugin_filter", LIBRARY_GSTREAMER); Linker.link(gst_registry_remove_feature, "gst_registry_remove_feature", LIBRARY_GSTREAMER); Linker.link(gst_registry_remove_plugin, "gst_registry_remove_plugin", LIBRARY_GSTREAMER); Linker.link(gst_registry_scan_path, "gst_registry_scan_path", LIBRARY_GSTREAMER); // gstreamer.Sample Linker.link(gst_sample_get_type, "gst_sample_get_type", LIBRARY_GSTREAMER); Linker.link(gst_sample_new, "gst_sample_new", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_buffer, "gst_sample_get_buffer", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_buffer_list, "gst_sample_get_buffer_list", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_caps, "gst_sample_get_caps", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_info, "gst_sample_get_info", LIBRARY_GSTREAMER); Linker.link(gst_sample_get_segment, "gst_sample_get_segment", LIBRARY_GSTREAMER); Linker.link(gst_sample_set_buffer_list, "gst_sample_set_buffer_list", LIBRARY_GSTREAMER); // gstreamer.Segment Linker.link(gst_segment_get_type, "gst_segment_get_type", LIBRARY_GSTREAMER); Linker.link(gst_segment_new, "gst_segment_new", LIBRARY_GSTREAMER); Linker.link(gst_segment_clip, "gst_segment_clip", LIBRARY_GSTREAMER); Linker.link(gst_segment_copy, "gst_segment_copy", LIBRARY_GSTREAMER); Linker.link(gst_segment_copy_into, "gst_segment_copy_into", LIBRARY_GSTREAMER); Linker.link(gst_segment_do_seek, "gst_segment_do_seek", LIBRARY_GSTREAMER); Linker.link(gst_segment_free, "gst_segment_free", LIBRARY_GSTREAMER); Linker.link(gst_segment_init, "gst_segment_init", LIBRARY_GSTREAMER); Linker.link(gst_segment_is_equal, "gst_segment_is_equal", LIBRARY_GSTREAMER); Linker.link(gst_segment_offset_running_time, "gst_segment_offset_running_time", LIBRARY_GSTREAMER); Linker.link(gst_segment_position_from_running_time, "gst_segment_position_from_running_time", LIBRARY_GSTREAMER); Linker.link(gst_segment_position_from_running_time_full, "gst_segment_position_from_running_time_full", LIBRARY_GSTREAMER); Linker.link(gst_segment_position_from_stream_time, "gst_segment_position_from_stream_time", LIBRARY_GSTREAMER); Linker.link(gst_segment_position_from_stream_time_full, "gst_segment_position_from_stream_time_full", LIBRARY_GSTREAMER); Linker.link(gst_segment_set_running_time, "gst_segment_set_running_time", LIBRARY_GSTREAMER); Linker.link(gst_segment_to_position, "gst_segment_to_position", LIBRARY_GSTREAMER); Linker.link(gst_segment_to_running_time, "gst_segment_to_running_time", LIBRARY_GSTREAMER); Linker.link(gst_segment_to_running_time_full, "gst_segment_to_running_time_full", LIBRARY_GSTREAMER); Linker.link(gst_segment_to_stream_time, "gst_segment_to_stream_time", LIBRARY_GSTREAMER); Linker.link(gst_segment_to_stream_time_full, "gst_segment_to_stream_time_full", LIBRARY_GSTREAMER); // gstreamer.StaticCaps Linker.link(gst_static_caps_cleanup, "gst_static_caps_cleanup", LIBRARY_GSTREAMER); Linker.link(gst_static_caps_get, "gst_static_caps_get", LIBRARY_GSTREAMER); // gstreamer.StaticPadTemplate Linker.link(gst_static_pad_template_get, "gst_static_pad_template_get", LIBRARY_GSTREAMER); Linker.link(gst_static_pad_template_get_caps, "gst_static_pad_template_get_caps", LIBRARY_GSTREAMER); // gstreamer.Stream Linker.link(gst_stream_get_type, "gst_stream_get_type", LIBRARY_GSTREAMER); Linker.link(gst_stream_new, "gst_stream_new", LIBRARY_GSTREAMER); Linker.link(gst_stream_get_caps, "gst_stream_get_caps", LIBRARY_GSTREAMER); Linker.link(gst_stream_get_stream_flags, "gst_stream_get_stream_flags", LIBRARY_GSTREAMER); Linker.link(gst_stream_get_stream_id, "gst_stream_get_stream_id", LIBRARY_GSTREAMER); Linker.link(gst_stream_get_stream_type, "gst_stream_get_stream_type", LIBRARY_GSTREAMER); Linker.link(gst_stream_get_tags, "gst_stream_get_tags", LIBRARY_GSTREAMER); Linker.link(gst_stream_set_caps, "gst_stream_set_caps", LIBRARY_GSTREAMER); Linker.link(gst_stream_set_stream_flags, "gst_stream_set_stream_flags", LIBRARY_GSTREAMER); Linker.link(gst_stream_set_stream_type, "gst_stream_set_stream_type", LIBRARY_GSTREAMER); Linker.link(gst_stream_set_tags, "gst_stream_set_tags", LIBRARY_GSTREAMER); // gstreamer.StreamCollection Linker.link(gst_stream_collection_get_type, "gst_stream_collection_get_type", LIBRARY_GSTREAMER); Linker.link(gst_stream_collection_new, "gst_stream_collection_new", LIBRARY_GSTREAMER); Linker.link(gst_stream_collection_add_stream, "gst_stream_collection_add_stream", LIBRARY_GSTREAMER); Linker.link(gst_stream_collection_get_size, "gst_stream_collection_get_size", LIBRARY_GSTREAMER); Linker.link(gst_stream_collection_get_stream, "gst_stream_collection_get_stream", LIBRARY_GSTREAMER); Linker.link(gst_stream_collection_get_upstream_id, "gst_stream_collection_get_upstream_id", LIBRARY_GSTREAMER); // gstreamer.Structure Linker.link(gst_structure_get_type, "gst_structure_get_type", LIBRARY_GSTREAMER); Linker.link(gst_structure_new, "gst_structure_new", LIBRARY_GSTREAMER); Linker.link(gst_structure_new_empty, "gst_structure_new_empty", LIBRARY_GSTREAMER); Linker.link(gst_structure_new_from_string, "gst_structure_new_from_string", LIBRARY_GSTREAMER); Linker.link(gst_structure_new_id, "gst_structure_new_id", LIBRARY_GSTREAMER); Linker.link(gst_structure_new_id_empty, "gst_structure_new_id_empty", LIBRARY_GSTREAMER); Linker.link(gst_structure_new_valist, "gst_structure_new_valist", LIBRARY_GSTREAMER); Linker.link(gst_structure_can_intersect, "gst_structure_can_intersect", LIBRARY_GSTREAMER); Linker.link(gst_structure_copy, "gst_structure_copy", LIBRARY_GSTREAMER); Linker.link(gst_structure_filter_and_map_in_place, "gst_structure_filter_and_map_in_place", LIBRARY_GSTREAMER); Linker.link(gst_structure_fixate, "gst_structure_fixate", LIBRARY_GSTREAMER); Linker.link(gst_structure_fixate_field, "gst_structure_fixate_field", LIBRARY_GSTREAMER); Linker.link(gst_structure_fixate_field_boolean, "gst_structure_fixate_field_boolean", LIBRARY_GSTREAMER); Linker.link(gst_structure_fixate_field_nearest_double, "gst_structure_fixate_field_nearest_double", LIBRARY_GSTREAMER); Linker.link(gst_structure_fixate_field_nearest_fraction, "gst_structure_fixate_field_nearest_fraction", LIBRARY_GSTREAMER); Linker.link(gst_structure_fixate_field_nearest_int, "gst_structure_fixate_field_nearest_int", LIBRARY_GSTREAMER); Linker.link(gst_structure_fixate_field_string, "gst_structure_fixate_field_string", LIBRARY_GSTREAMER); Linker.link(gst_structure_foreach, "gst_structure_foreach", LIBRARY_GSTREAMER); Linker.link(gst_structure_free, "gst_structure_free", LIBRARY_GSTREAMER); Linker.link(gst_structure_get, "gst_structure_get", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_array, "gst_structure_get_array", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_boolean, "gst_structure_get_boolean", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_clock_time, "gst_structure_get_clock_time", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_date, "gst_structure_get_date", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_date_time, "gst_structure_get_date_time", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_double, "gst_structure_get_double", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_enum, "gst_structure_get_enum", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_field_type, "gst_structure_get_field_type", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_flagset, "gst_structure_get_flagset", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_fraction, "gst_structure_get_fraction", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_int, "gst_structure_get_int", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_int64, "gst_structure_get_int64", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_list, "gst_structure_get_list", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_name, "gst_structure_get_name", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_name_id, "gst_structure_get_name_id", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_string, "gst_structure_get_string", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_uint, "gst_structure_get_uint", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_uint64, "gst_structure_get_uint64", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_valist, "gst_structure_get_valist", LIBRARY_GSTREAMER); Linker.link(gst_structure_get_value, "gst_structure_get_value", LIBRARY_GSTREAMER); Linker.link(gst_structure_has_field, "gst_structure_has_field", LIBRARY_GSTREAMER); Linker.link(gst_structure_has_field_typed, "gst_structure_has_field_typed", LIBRARY_GSTREAMER); Linker.link(gst_structure_has_name, "gst_structure_has_name", LIBRARY_GSTREAMER); Linker.link(gst_structure_id_get, "gst_structure_id_get", LIBRARY_GSTREAMER); Linker.link(gst_structure_id_get_valist, "gst_structure_id_get_valist", LIBRARY_GSTREAMER); Linker.link(gst_structure_id_get_value, "gst_structure_id_get_value", LIBRARY_GSTREAMER); Linker.link(gst_structure_id_has_field, "gst_structure_id_has_field", LIBRARY_GSTREAMER); Linker.link(gst_structure_id_has_field_typed, "gst_structure_id_has_field_typed", LIBRARY_GSTREAMER); Linker.link(gst_structure_id_set, "gst_structure_id_set", LIBRARY_GSTREAMER); Linker.link(gst_structure_id_set_valist, "gst_structure_id_set_valist", LIBRARY_GSTREAMER); Linker.link(gst_structure_id_set_value, "gst_structure_id_set_value", LIBRARY_GSTREAMER); Linker.link(gst_structure_id_take_value, "gst_structure_id_take_value", LIBRARY_GSTREAMER); Linker.link(gst_structure_intersect, "gst_structure_intersect", LIBRARY_GSTREAMER); Linker.link(gst_structure_is_equal, "gst_structure_is_equal", LIBRARY_GSTREAMER); Linker.link(gst_structure_is_subset, "gst_structure_is_subset", LIBRARY_GSTREAMER); Linker.link(gst_structure_map_in_place, "gst_structure_map_in_place", LIBRARY_GSTREAMER); Linker.link(gst_structure_n_fields, "gst_structure_n_fields", LIBRARY_GSTREAMER); Linker.link(gst_structure_nth_field_name, "gst_structure_nth_field_name", LIBRARY_GSTREAMER); Linker.link(gst_structure_remove_all_fields, "gst_structure_remove_all_fields", LIBRARY_GSTREAMER); Linker.link(gst_structure_remove_field, "gst_structure_remove_field", LIBRARY_GSTREAMER); Linker.link(gst_structure_remove_fields, "gst_structure_remove_fields", LIBRARY_GSTREAMER); Linker.link(gst_structure_remove_fields_valist, "gst_structure_remove_fields_valist", LIBRARY_GSTREAMER); Linker.link(gst_structure_set, "gst_structure_set", LIBRARY_GSTREAMER); Linker.link(gst_structure_set_array, "gst_structure_set_array", LIBRARY_GSTREAMER); Linker.link(gst_structure_set_list, "gst_structure_set_list", LIBRARY_GSTREAMER); Linker.link(gst_structure_set_name, "gst_structure_set_name", LIBRARY_GSTREAMER); Linker.link(gst_structure_set_parent_refcount, "gst_structure_set_parent_refcount", LIBRARY_GSTREAMER); Linker.link(gst_structure_set_valist, "gst_structure_set_valist", LIBRARY_GSTREAMER); Linker.link(gst_structure_set_value, "gst_structure_set_value", LIBRARY_GSTREAMER); Linker.link(gst_structure_take_value, "gst_structure_take_value", LIBRARY_GSTREAMER); Linker.link(gst_structure_to_string, "gst_structure_to_string", LIBRARY_GSTREAMER); Linker.link(gst_structure_from_string, "gst_structure_from_string", LIBRARY_GSTREAMER); // gstreamer.SystemClock Linker.link(gst_system_clock_get_type, "gst_system_clock_get_type", LIBRARY_GSTREAMER); Linker.link(gst_system_clock_obtain, "gst_system_clock_obtain", LIBRARY_GSTREAMER); Linker.link(gst_system_clock_set_default, "gst_system_clock_set_default", LIBRARY_GSTREAMER); // gstreamer.TagList Linker.link(gst_tag_get_type, "gst_tag_get_type", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_new, "gst_tag_list_new", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_new_empty, "gst_tag_list_new_empty", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_new_from_string, "gst_tag_list_new_from_string", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_new_valist, "gst_tag_list_new_valist", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_add, "gst_tag_list_add", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_add_valist, "gst_tag_list_add_valist", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_add_valist_values, "gst_tag_list_add_valist_values", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_add_value, "gst_tag_list_add_value", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_add_values, "gst_tag_list_add_values", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_foreach, "gst_tag_list_foreach", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_boolean, "gst_tag_list_get_boolean", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_boolean_index, "gst_tag_list_get_boolean_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_date, "gst_tag_list_get_date", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_date_index, "gst_tag_list_get_date_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_date_time, "gst_tag_list_get_date_time", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_date_time_index, "gst_tag_list_get_date_time_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_double, "gst_tag_list_get_double", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_double_index, "gst_tag_list_get_double_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_float, "gst_tag_list_get_float", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_float_index, "gst_tag_list_get_float_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_int, "gst_tag_list_get_int", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_int64, "gst_tag_list_get_int64", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_int64_index, "gst_tag_list_get_int64_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_int_index, "gst_tag_list_get_int_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_pointer, "gst_tag_list_get_pointer", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_pointer_index, "gst_tag_list_get_pointer_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_sample, "gst_tag_list_get_sample", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_sample_index, "gst_tag_list_get_sample_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_scope, "gst_tag_list_get_scope", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_string, "gst_tag_list_get_string", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_string_index, "gst_tag_list_get_string_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_tag_size, "gst_tag_list_get_tag_size", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_uint, "gst_tag_list_get_uint", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_uint64, "gst_tag_list_get_uint64", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_uint64_index, "gst_tag_list_get_uint64_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_uint_index, "gst_tag_list_get_uint_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_get_value_index, "gst_tag_list_get_value_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_insert, "gst_tag_list_insert", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_is_empty, "gst_tag_list_is_empty", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_is_equal, "gst_tag_list_is_equal", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_merge, "gst_tag_list_merge", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_n_tags, "gst_tag_list_n_tags", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_nth_tag_name, "gst_tag_list_nth_tag_name", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_peek_string_index, "gst_tag_list_peek_string_index", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_remove_tag, "gst_tag_list_remove_tag", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_set_scope, "gst_tag_list_set_scope", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_to_string, "gst_tag_list_to_string", LIBRARY_GSTREAMER); Linker.link(gst_tag_list_copy_value, "gst_tag_list_copy_value", LIBRARY_GSTREAMER); Linker.link(gst_tag_exists, "gst_tag_exists", LIBRARY_GSTREAMER); Linker.link(gst_tag_get_description, "gst_tag_get_description", LIBRARY_GSTREAMER); Linker.link(gst_tag_get_flag, "gst_tag_get_flag", LIBRARY_GSTREAMER); Linker.link(gst_tag_get_nick, "gst_tag_get_nick", LIBRARY_GSTREAMER); Linker.link(gst_tag_is_fixed, "gst_tag_is_fixed", LIBRARY_GSTREAMER); Linker.link(gst_tag_merge_strings_with_comma, "gst_tag_merge_strings_with_comma", LIBRARY_GSTREAMER); Linker.link(gst_tag_merge_use_first, "gst_tag_merge_use_first", LIBRARY_GSTREAMER); Linker.link(gst_tag_register, "gst_tag_register", LIBRARY_GSTREAMER); Linker.link(gst_tag_register_static, "gst_tag_register_static", LIBRARY_GSTREAMER); // gstreamer.TagSetter Linker.link(gst_tag_setter_get_type, "gst_tag_setter_get_type", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_add_tag_valist, "gst_tag_setter_add_tag_valist", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_add_tag_valist_values, "gst_tag_setter_add_tag_valist_values", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_add_tag_value, "gst_tag_setter_add_tag_value", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_add_tag_values, "gst_tag_setter_add_tag_values", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_add_tags, "gst_tag_setter_add_tags", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_get_tag_list, "gst_tag_setter_get_tag_list", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_get_tag_merge_mode, "gst_tag_setter_get_tag_merge_mode", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_merge_tags, "gst_tag_setter_merge_tags", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_reset_tags, "gst_tag_setter_reset_tags", LIBRARY_GSTREAMER); Linker.link(gst_tag_setter_set_tag_merge_mode, "gst_tag_setter_set_tag_merge_mode", LIBRARY_GSTREAMER); // gstreamer.Task Linker.link(gst_task_get_type, "gst_task_get_type", LIBRARY_GSTREAMER); Linker.link(gst_task_new, "gst_task_new", LIBRARY_GSTREAMER); Linker.link(gst_task_cleanup_all, "gst_task_cleanup_all", LIBRARY_GSTREAMER); Linker.link(gst_task_get_pool, "gst_task_get_pool", LIBRARY_GSTREAMER); Linker.link(gst_task_get_state, "gst_task_get_state", LIBRARY_GSTREAMER); Linker.link(gst_task_join, "gst_task_join", LIBRARY_GSTREAMER); Linker.link(gst_task_pause, "gst_task_pause", LIBRARY_GSTREAMER); Linker.link(gst_task_set_enter_callback, "gst_task_set_enter_callback", LIBRARY_GSTREAMER); Linker.link(gst_task_set_leave_callback, "gst_task_set_leave_callback", LIBRARY_GSTREAMER); Linker.link(gst_task_set_lock, "gst_task_set_lock", LIBRARY_GSTREAMER); Linker.link(gst_task_set_pool, "gst_task_set_pool", LIBRARY_GSTREAMER); Linker.link(gst_task_set_state, "gst_task_set_state", LIBRARY_GSTREAMER); Linker.link(gst_task_start, "gst_task_start", LIBRARY_GSTREAMER); Linker.link(gst_task_stop, "gst_task_stop", LIBRARY_GSTREAMER); // gstreamer.TaskPool Linker.link(gst_task_pool_get_type, "gst_task_pool_get_type", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_new, "gst_task_pool_new", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_cleanup, "gst_task_pool_cleanup", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_join, "gst_task_pool_join", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_prepare, "gst_task_pool_prepare", LIBRARY_GSTREAMER); Linker.link(gst_task_pool_push, "gst_task_pool_push", LIBRARY_GSTREAMER); // gstreamer.Toc Linker.link(gst_toc_get_type, "gst_toc_get_type", LIBRARY_GSTREAMER); Linker.link(gst_toc_new, "gst_toc_new", LIBRARY_GSTREAMER); Linker.link(gst_toc_append_entry, "gst_toc_append_entry", LIBRARY_GSTREAMER); Linker.link(gst_toc_dump, "gst_toc_dump", LIBRARY_GSTREAMER); Linker.link(gst_toc_find_entry, "gst_toc_find_entry", LIBRARY_GSTREAMER); Linker.link(gst_toc_get_entries, "gst_toc_get_entries", LIBRARY_GSTREAMER); Linker.link(gst_toc_get_scope, "gst_toc_get_scope", LIBRARY_GSTREAMER); Linker.link(gst_toc_get_tags, "gst_toc_get_tags", LIBRARY_GSTREAMER); Linker.link(gst_toc_merge_tags, "gst_toc_merge_tags", LIBRARY_GSTREAMER); Linker.link(gst_toc_set_tags, "gst_toc_set_tags", LIBRARY_GSTREAMER); // gstreamer.TocEntry Linker.link(gst_toc_entry_get_type, "gst_toc_entry_get_type", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_new, "gst_toc_entry_new", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_append_sub_entry, "gst_toc_entry_append_sub_entry", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_get_entry_type, "gst_toc_entry_get_entry_type", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_get_loop, "gst_toc_entry_get_loop", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_get_parent, "gst_toc_entry_get_parent", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_get_start_stop_times, "gst_toc_entry_get_start_stop_times", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_get_sub_entries, "gst_toc_entry_get_sub_entries", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_get_tags, "gst_toc_entry_get_tags", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_get_toc, "gst_toc_entry_get_toc", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_get_uid, "gst_toc_entry_get_uid", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_is_alternative, "gst_toc_entry_is_alternative", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_is_sequence, "gst_toc_entry_is_sequence", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_merge_tags, "gst_toc_entry_merge_tags", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_set_loop, "gst_toc_entry_set_loop", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_set_start_stop_times, "gst_toc_entry_set_start_stop_times", LIBRARY_GSTREAMER); Linker.link(gst_toc_entry_set_tags, "gst_toc_entry_set_tags", LIBRARY_GSTREAMER); // gstreamer.TocSetter Linker.link(gst_toc_setter_get_type, "gst_toc_setter_get_type", LIBRARY_GSTREAMER); Linker.link(gst_toc_setter_get_toc, "gst_toc_setter_get_toc", LIBRARY_GSTREAMER); Linker.link(gst_toc_setter_reset, "gst_toc_setter_reset", LIBRARY_GSTREAMER); Linker.link(gst_toc_setter_set_toc, "gst_toc_setter_set_toc", LIBRARY_GSTREAMER); // gstreamer.Tracer Linker.link(gst_tracer_get_type, "gst_tracer_get_type", LIBRARY_GSTREAMER); // gstreamer.TracerFactory Linker.link(gst_tracer_factory_get_type, "gst_tracer_factory_get_type", LIBRARY_GSTREAMER); Linker.link(gst_tracer_factory_get_list, "gst_tracer_factory_get_list", LIBRARY_GSTREAMER); // gstreamer.TracerRecord Linker.link(gst_tracer_record_get_type, "gst_tracer_record_get_type", LIBRARY_GSTREAMER); // gstreamer.TypeFind Linker.link(gst_type_find_get_length, "gst_type_find_get_length", LIBRARY_GSTREAMER); Linker.link(gst_type_find_peek, "gst_type_find_peek", LIBRARY_GSTREAMER); Linker.link(gst_type_find_suggest, "gst_type_find_suggest", LIBRARY_GSTREAMER); Linker.link(gst_type_find_suggest_simple, "gst_type_find_suggest_simple", LIBRARY_GSTREAMER); Linker.link(gst_type_find_register, "gst_type_find_register", LIBRARY_GSTREAMER); Linker.link(gst_type_find_get_type, "gst_type_find_get_type", LIBRARY_GSTREAMER); // gstreamer.TypeFindFactory Linker.link(gst_type_find_factory_get_type, "gst_type_find_factory_get_type", LIBRARY_GSTREAMER); Linker.link(gst_type_find_factory_get_list, "gst_type_find_factory_get_list", LIBRARY_GSTREAMER); Linker.link(gst_type_find_factory_call_function, "gst_type_find_factory_call_function", LIBRARY_GSTREAMER); Linker.link(gst_type_find_factory_get_caps, "gst_type_find_factory_get_caps", LIBRARY_GSTREAMER); Linker.link(gst_type_find_factory_get_extensions, "gst_type_find_factory_get_extensions", LIBRARY_GSTREAMER); Linker.link(gst_type_find_factory_has_function, "gst_type_find_factory_has_function", LIBRARY_GSTREAMER); // gstreamer.URIHandler Linker.link(gst_uri_handler_get_type, "gst_uri_handler_get_type", LIBRARY_GSTREAMER); Linker.link(gst_uri_handler_get_protocols, "gst_uri_handler_get_protocols", LIBRARY_GSTREAMER); Linker.link(gst_uri_handler_get_uri, "gst_uri_handler_get_uri", LIBRARY_GSTREAMER); Linker.link(gst_uri_handler_get_uri_type, "gst_uri_handler_get_uri_type", LIBRARY_GSTREAMER); Linker.link(gst_uri_handler_set_uri, "gst_uri_handler_set_uri", LIBRARY_GSTREAMER); // gstreamer.Uri Linker.link(gst_uri_get_type, "gst_uri_get_type", LIBRARY_GSTREAMER); Linker.link(gst_uri_new, "gst_uri_new", LIBRARY_GSTREAMER); Linker.link(gst_uri_append_path, "gst_uri_append_path", LIBRARY_GSTREAMER); Linker.link(gst_uri_append_path_segment, "gst_uri_append_path_segment", LIBRARY_GSTREAMER); Linker.link(gst_uri_equal, "gst_uri_equal", LIBRARY_GSTREAMER); Linker.link(gst_uri_from_string_with_base, "gst_uri_from_string_with_base", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_fragment, "gst_uri_get_fragment", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_host, "gst_uri_get_host", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_media_fragment_table, "gst_uri_get_media_fragment_table", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_path, "gst_uri_get_path", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_path_segments, "gst_uri_get_path_segments", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_path_string, "gst_uri_get_path_string", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_port, "gst_uri_get_port", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_query_keys, "gst_uri_get_query_keys", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_query_string, "gst_uri_get_query_string", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_query_table, "gst_uri_get_query_table", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_query_value, "gst_uri_get_query_value", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_scheme, "gst_uri_get_scheme", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_userinfo, "gst_uri_get_userinfo", LIBRARY_GSTREAMER); Linker.link(gst_uri_is_normalized, "gst_uri_is_normalized", LIBRARY_GSTREAMER); Linker.link(gst_uri_is_writable, "gst_uri_is_writable", LIBRARY_GSTREAMER); Linker.link(gst_uri_join, "gst_uri_join", LIBRARY_GSTREAMER); Linker.link(gst_uri_make_writable, "gst_uri_make_writable", LIBRARY_GSTREAMER); Linker.link(gst_uri_new_with_base, "gst_uri_new_with_base", LIBRARY_GSTREAMER); Linker.link(gst_uri_normalize, "gst_uri_normalize", LIBRARY_GSTREAMER); Linker.link(gst_uri_query_has_key, "gst_uri_query_has_key", LIBRARY_GSTREAMER); Linker.link(gst_uri_remove_query_key, "gst_uri_remove_query_key", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_fragment, "gst_uri_set_fragment", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_host, "gst_uri_set_host", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_path, "gst_uri_set_path", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_path_segments, "gst_uri_set_path_segments", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_path_string, "gst_uri_set_path_string", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_port, "gst_uri_set_port", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_query_string, "gst_uri_set_query_string", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_query_table, "gst_uri_set_query_table", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_query_value, "gst_uri_set_query_value", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_scheme, "gst_uri_set_scheme", LIBRARY_GSTREAMER); Linker.link(gst_uri_set_userinfo, "gst_uri_set_userinfo", LIBRARY_GSTREAMER); Linker.link(gst_uri_to_string, "gst_uri_to_string", LIBRARY_GSTREAMER); Linker.link(gst_uri_construct, "gst_uri_construct", LIBRARY_GSTREAMER); Linker.link(gst_uri_from_string, "gst_uri_from_string", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_location, "gst_uri_get_location", LIBRARY_GSTREAMER); Linker.link(gst_uri_get_protocol, "gst_uri_get_protocol", LIBRARY_GSTREAMER); Linker.link(gst_uri_has_protocol, "gst_uri_has_protocol", LIBRARY_GSTREAMER); Linker.link(gst_uri_is_valid, "gst_uri_is_valid", LIBRARY_GSTREAMER); Linker.link(gst_uri_join_strings, "gst_uri_join_strings", LIBRARY_GSTREAMER); Linker.link(gst_uri_protocol_is_supported, "gst_uri_protocol_is_supported", LIBRARY_GSTREAMER); Linker.link(gst_uri_protocol_is_valid, "gst_uri_protocol_is_valid", LIBRARY_GSTREAMER); Linker.link(gst_filename_to_uri, "gst_filename_to_uri", LIBRARY_GSTREAMER); Linker.link(gst_uri_error_quark, "gst_uri_error_quark", LIBRARY_GSTREAMER); // gstreamer.ValueArray Linker.link(gst_value_array_get_type, "gst_value_array_get_type", LIBRARY_GSTREAMER); Linker.link(gst_value_array_append_and_take_value, "gst_value_array_append_and_take_value", LIBRARY_GSTREAMER); Linker.link(gst_value_array_append_value, "gst_value_array_append_value", LIBRARY_GSTREAMER); Linker.link(gst_value_array_get_size, "gst_value_array_get_size", LIBRARY_GSTREAMER); Linker.link(gst_value_array_get_value, "gst_value_array_get_value", LIBRARY_GSTREAMER); Linker.link(gst_value_array_prepend_value, "gst_value_array_prepend_value", LIBRARY_GSTREAMER); // gstreamer.ValueList Linker.link(gst_value_list_get_type, "gst_value_list_get_type", LIBRARY_GSTREAMER); Linker.link(gst_value_list_append_and_take_value, "gst_value_list_append_and_take_value", LIBRARY_GSTREAMER); Linker.link(gst_value_list_append_value, "gst_value_list_append_value", LIBRARY_GSTREAMER); Linker.link(gst_value_list_concat, "gst_value_list_concat", LIBRARY_GSTREAMER); Linker.link(gst_value_list_get_size, "gst_value_list_get_size", LIBRARY_GSTREAMER); Linker.link(gst_value_list_get_value, "gst_value_list_get_value", LIBRARY_GSTREAMER); Linker.link(gst_value_list_merge, "gst_value_list_merge", LIBRARY_GSTREAMER); Linker.link(gst_value_list_prepend_value, "gst_value_list_prepend_value", LIBRARY_GSTREAMER); // gstreamer.Debug Linker.link(gst_debug_add_log_function, "gst_debug_add_log_function", LIBRARY_GSTREAMER); Linker.link(gst_debug_bin_to_dot_data, "gst_debug_bin_to_dot_data", LIBRARY_GSTREAMER); Linker.link(gst_debug_bin_to_dot_file, "gst_debug_bin_to_dot_file", LIBRARY_GSTREAMER); Linker.link(gst_debug_bin_to_dot_file_with_ts, "gst_debug_bin_to_dot_file_with_ts", LIBRARY_GSTREAMER); Linker.link(gst_debug_construct_term_color, "gst_debug_construct_term_color", LIBRARY_GSTREAMER); Linker.link(gst_debug_construct_win_color, "gst_debug_construct_win_color", LIBRARY_GSTREAMER); Linker.link(gst_debug_get_all_categories, "gst_debug_get_all_categories", LIBRARY_GSTREAMER); Linker.link(gst_debug_get_color_mode, "gst_debug_get_color_mode", LIBRARY_GSTREAMER); Linker.link(gst_debug_get_default_threshold, "gst_debug_get_default_threshold", LIBRARY_GSTREAMER); Linker.link(gst_debug_is_active, "gst_debug_is_active", LIBRARY_GSTREAMER); Linker.link(gst_debug_is_colored, "gst_debug_is_colored", LIBRARY_GSTREAMER); Linker.link(gst_debug_level_get_name, "gst_debug_level_get_name", LIBRARY_GSTREAMER); Linker.link(gst_debug_log, "gst_debug_log", LIBRARY_GSTREAMER); Linker.link(gst_debug_log_default, "gst_debug_log_default", LIBRARY_GSTREAMER); Linker.link(gst_debug_log_valist, "gst_debug_log_valist", LIBRARY_GSTREAMER); Linker.link(gst_debug_print_stack_trace, "gst_debug_print_stack_trace", LIBRARY_GSTREAMER); Linker.link(gst_debug_remove_log_function, "gst_debug_remove_log_function", LIBRARY_GSTREAMER); Linker.link(gst_debug_remove_log_function_by_data, "gst_debug_remove_log_function_by_data", LIBRARY_GSTREAMER); Linker.link(gst_debug_set_active, "gst_debug_set_active", LIBRARY_GSTREAMER); Linker.link(gst_debug_set_color_mode, "gst_debug_set_color_mode", LIBRARY_GSTREAMER); Linker.link(gst_debug_set_color_mode_from_string, "gst_debug_set_color_mode_from_string", LIBRARY_GSTREAMER); Linker.link(gst_debug_set_colored, "gst_debug_set_colored", LIBRARY_GSTREAMER); Linker.link(gst_debug_set_default_threshold, "gst_debug_set_default_threshold", LIBRARY_GSTREAMER); Linker.link(gst_debug_set_threshold_for_name, "gst_debug_set_threshold_for_name", LIBRARY_GSTREAMER); Linker.link(gst_debug_set_threshold_from_string, "gst_debug_set_threshold_from_string", LIBRARY_GSTREAMER); Linker.link(gst_debug_unset_threshold_for_name, "gst_debug_unset_threshold_for_name", LIBRARY_GSTREAMER); // gstreamer.GError Linker.link(gst_error_get_message, "gst_error_get_message", LIBRARY_GSTREAMER); // gstreamer.Format Linker.link(gst_format_get_by_nick, "gst_format_get_by_nick", LIBRARY_GSTREAMER); Linker.link(gst_format_get_details, "gst_format_get_details", LIBRARY_GSTREAMER); Linker.link(gst_format_get_name, "gst_format_get_name", LIBRARY_GSTREAMER); Linker.link(gst_format_iterate_definitions, "gst_format_iterate_definitions", LIBRARY_GSTREAMER); Linker.link(gst_format_register, "gst_format_register", LIBRARY_GSTREAMER); Linker.link(gst_format_to_quark, "gst_format_to_quark", LIBRARY_GSTREAMER); Linker.link(gst_formats_contains, "gst_formats_contains", LIBRARY_GSTREAMER); // gstreamer.GStreamer Linker.link(gst_deinit, "gst_deinit", LIBRARY_GSTREAMER); Linker.link(gst_init, "gst_init", LIBRARY_GSTREAMER); Linker.link(gst_init_check, "gst_init_check", LIBRARY_GSTREAMER); Linker.link(gst_init_get_option_group, "gst_init_get_option_group", LIBRARY_GSTREAMER); Linker.link(gst_is_initialized, "gst_is_initialized", LIBRARY_GSTREAMER); Linker.link(gst_segtrap_is_enabled, "gst_segtrap_is_enabled", LIBRARY_GSTREAMER); Linker.link(gst_segtrap_set_enabled, "gst_segtrap_set_enabled", LIBRARY_GSTREAMER); Linker.link(gst_update_registry, "gst_update_registry", LIBRARY_GSTREAMER); Linker.link(gst_version, "gst_version", LIBRARY_GSTREAMER); Linker.link(gst_version_string, "gst_version_string", LIBRARY_GSTREAMER); // gstreamer.Parse Linker.link(gst_parse_bin_from_description, "gst_parse_bin_from_description", LIBRARY_GSTREAMER); Linker.link(gst_parse_bin_from_description_full, "gst_parse_bin_from_description_full", LIBRARY_GSTREAMER); Linker.link(gst_parse_error_quark, "gst_parse_error_quark", LIBRARY_GSTREAMER); Linker.link(gst_parse_launch, "gst_parse_launch", LIBRARY_GSTREAMER); Linker.link(gst_parse_launch_full, "gst_parse_launch_full", LIBRARY_GSTREAMER); Linker.link(gst_parse_launchv, "gst_parse_launchv", LIBRARY_GSTREAMER); Linker.link(gst_parse_launchv_full, "gst_parse_launchv_full", LIBRARY_GSTREAMER); // gstreamer.Utils Linker.link(gst_util_array_binary_search, "gst_util_array_binary_search", LIBRARY_GSTREAMER); Linker.link(gst_util_double_to_fraction, "gst_util_double_to_fraction", LIBRARY_GSTREAMER); Linker.link(gst_util_dump_mem, "gst_util_dump_mem", LIBRARY_GSTREAMER); Linker.link(gst_util_fraction_add, "gst_util_fraction_add", LIBRARY_GSTREAMER); Linker.link(gst_util_fraction_compare, "gst_util_fraction_compare", LIBRARY_GSTREAMER); Linker.link(gst_util_fraction_multiply, "gst_util_fraction_multiply", LIBRARY_GSTREAMER); Linker.link(gst_util_fraction_to_double, "gst_util_fraction_to_double", LIBRARY_GSTREAMER); Linker.link(gst_util_gdouble_to_guint64, "gst_util_gdouble_to_guint64", LIBRARY_GSTREAMER); Linker.link(gst_util_get_timestamp, "gst_util_get_timestamp", LIBRARY_GSTREAMER); Linker.link(gst_util_greatest_common_divisor, "gst_util_greatest_common_divisor", LIBRARY_GSTREAMER); Linker.link(gst_util_greatest_common_divisor_int64, "gst_util_greatest_common_divisor_int64", LIBRARY_GSTREAMER); Linker.link(gst_util_group_id_next, "gst_util_group_id_next", LIBRARY_GSTREAMER); Linker.link(gst_util_guint64_to_gdouble, "gst_util_guint64_to_gdouble", LIBRARY_GSTREAMER); Linker.link(gst_util_seqnum_compare, "gst_util_seqnum_compare", LIBRARY_GSTREAMER); Linker.link(gst_util_seqnum_next, "gst_util_seqnum_next", LIBRARY_GSTREAMER); Linker.link(gst_util_set_object_arg, "gst_util_set_object_arg", LIBRARY_GSTREAMER); Linker.link(gst_util_set_value_from_string, "gst_util_set_value_from_string", LIBRARY_GSTREAMER); Linker.link(gst_util_uint64_scale, "gst_util_uint64_scale", LIBRARY_GSTREAMER); Linker.link(gst_util_uint64_scale_ceil, "gst_util_uint64_scale_ceil", LIBRARY_GSTREAMER); Linker.link(gst_util_uint64_scale_int, "gst_util_uint64_scale_int", LIBRARY_GSTREAMER); Linker.link(gst_util_uint64_scale_int_ceil, "gst_util_uint64_scale_int_ceil", LIBRARY_GSTREAMER); Linker.link(gst_util_uint64_scale_int_round, "gst_util_uint64_scale_int_round", LIBRARY_GSTREAMER); Linker.link(gst_util_uint64_scale_round, "gst_util_uint64_scale_round", LIBRARY_GSTREAMER); Linker.link(gst_calculate_linear_regression, "gst_calculate_linear_regression", LIBRARY_GSTREAMER); Linker.link(gst_dynamic_type_register, "gst_dynamic_type_register", LIBRARY_GSTREAMER); Linker.link(gst_util_get_object_array, "gst_util_get_object_array", LIBRARY_GSTREAMER); Linker.link(gst_util_set_object_array, "gst_util_set_object_array", LIBRARY_GSTREAMER); // gstreamer.ValueGst Linker.link(gst_value_can_compare, "gst_value_can_compare", LIBRARY_GSTREAMER); Linker.link(gst_value_can_intersect, "gst_value_can_intersect", LIBRARY_GSTREAMER); Linker.link(gst_value_can_subtract, "gst_value_can_subtract", LIBRARY_GSTREAMER); Linker.link(gst_value_can_union, "gst_value_can_union", LIBRARY_GSTREAMER); Linker.link(gst_value_compare, "gst_value_compare", LIBRARY_GSTREAMER); Linker.link(gst_value_deserialize, "gst_value_deserialize", LIBRARY_GSTREAMER); Linker.link(gst_value_fixate, "gst_value_fixate", LIBRARY_GSTREAMER); Linker.link(gst_value_fraction_multiply, "gst_value_fraction_multiply", LIBRARY_GSTREAMER); Linker.link(gst_value_fraction_subtract, "gst_value_fraction_subtract", LIBRARY_GSTREAMER); Linker.link(gst_value_get_bitmask, "gst_value_get_bitmask", LIBRARY_GSTREAMER); Linker.link(gst_value_get_caps, "gst_value_get_caps", LIBRARY_GSTREAMER); Linker.link(gst_value_get_caps_features, "gst_value_get_caps_features", LIBRARY_GSTREAMER); Linker.link(gst_value_get_double_range_max, "gst_value_get_double_range_max", LIBRARY_GSTREAMER); Linker.link(gst_value_get_double_range_min, "gst_value_get_double_range_min", LIBRARY_GSTREAMER); Linker.link(gst_value_get_flagset_flags, "gst_value_get_flagset_flags", LIBRARY_GSTREAMER); Linker.link(gst_value_get_flagset_mask, "gst_value_get_flagset_mask", LIBRARY_GSTREAMER); Linker.link(gst_value_set_flagset, "gst_value_set_flagset", LIBRARY_GSTREAMER); Linker.link(gst_value_get_fraction_denominator, "gst_value_get_fraction_denominator", LIBRARY_GSTREAMER); Linker.link(gst_value_get_fraction_numerator, "gst_value_get_fraction_numerator", LIBRARY_GSTREAMER); Linker.link(gst_value_get_fraction_range_max, "gst_value_get_fraction_range_max", LIBRARY_GSTREAMER); Linker.link(gst_value_get_fraction_range_min, "gst_value_get_fraction_range_min", LIBRARY_GSTREAMER); Linker.link(gst_value_get_int64_range_max, "gst_value_get_int64_range_max", LIBRARY_GSTREAMER); Linker.link(gst_value_get_int64_range_min, "gst_value_get_int64_range_min", LIBRARY_GSTREAMER); Linker.link(gst_value_get_int64_range_step, "gst_value_get_int64_range_step", LIBRARY_GSTREAMER); Linker.link(gst_value_get_int_range_max, "gst_value_get_int_range_max", LIBRARY_GSTREAMER); Linker.link(gst_value_get_int_range_min, "gst_value_get_int_range_min", LIBRARY_GSTREAMER); Linker.link(gst_value_get_int_range_step, "gst_value_get_int_range_step", LIBRARY_GSTREAMER); Linker.link(gst_value_get_structure, "gst_value_get_structure", LIBRARY_GSTREAMER); Linker.link(gst_value_init_and_copy, "gst_value_init_and_copy", LIBRARY_GSTREAMER); Linker.link(gst_value_intersect, "gst_value_intersect", LIBRARY_GSTREAMER); Linker.link(gst_value_is_fixed, "gst_value_is_fixed", LIBRARY_GSTREAMER); Linker.link(gst_value_is_subset, "gst_value_is_subset", LIBRARY_GSTREAMER); Linker.link(gst_value_register, "gst_value_register", LIBRARY_GSTREAMER); Linker.link(gst_value_serialize, "gst_value_serialize", LIBRARY_GSTREAMER); Linker.link(gst_value_set_bitmask, "gst_value_set_bitmask", LIBRARY_GSTREAMER); Linker.link(gst_value_set_caps, "gst_value_set_caps", LIBRARY_GSTREAMER); Linker.link(gst_value_set_caps_features, "gst_value_set_caps_features", LIBRARY_GSTREAMER); Linker.link(gst_value_set_double_range, "gst_value_set_double_range", LIBRARY_GSTREAMER); Linker.link(gst_value_set_fraction, "gst_value_set_fraction", LIBRARY_GSTREAMER); Linker.link(gst_value_set_fraction_range, "gst_value_set_fraction_range", LIBRARY_GSTREAMER); Linker.link(gst_value_set_fraction_range_full, "gst_value_set_fraction_range_full", LIBRARY_GSTREAMER); Linker.link(gst_value_set_int64_range, "gst_value_set_int64_range", LIBRARY_GSTREAMER); Linker.link(gst_value_set_int64_range_step, "gst_value_set_int64_range_step", LIBRARY_GSTREAMER); Linker.link(gst_value_set_int_range, "gst_value_set_int_range", LIBRARY_GSTREAMER); Linker.link(gst_value_set_int_range_step, "gst_value_set_int_range_step", LIBRARY_GSTREAMER); Linker.link(gst_value_set_structure, "gst_value_set_structure", LIBRARY_GSTREAMER); Linker.link(gst_value_subtract, "gst_value_subtract", LIBRARY_GSTREAMER); Linker.link(gst_value_union, "gst_value_union", LIBRARY_GSTREAMER); } __gshared extern(C) { // gstreamer.AllocationParams GType function() c_gst_allocation_params_get_type; GstAllocationParams* function(GstAllocationParams* params) c_gst_allocation_params_copy; void function(GstAllocationParams* params) c_gst_allocation_params_free; void function(GstAllocationParams* params) c_gst_allocation_params_init; // gstreamer.Allocator GType function() c_gst_allocator_get_type; GstAllocator* function(const(char)* name) c_gst_allocator_find; void function(const(char)* name, GstAllocator* allocator) c_gst_allocator_register; GstMemory* function(GstAllocator* allocator, size_t size, GstAllocationParams* params) c_gst_allocator_alloc; void function(GstAllocator* allocator, GstMemory* memory) c_gst_allocator_free; void function(GstAllocator* allocator) c_gst_allocator_set_default; // gstreamer.AtomicQueue GType function() c_gst_atomic_queue_get_type; GstAtomicQueue* function(uint initialSize) c_gst_atomic_queue_new; uint function(GstAtomicQueue* queue) c_gst_atomic_queue_length; void* function(GstAtomicQueue* queue) c_gst_atomic_queue_peek; void* function(GstAtomicQueue* queue) c_gst_atomic_queue_pop; void function(GstAtomicQueue* queue, void* data) c_gst_atomic_queue_push; void function(GstAtomicQueue* queue) c_gst_atomic_queue_ref; void function(GstAtomicQueue* queue) c_gst_atomic_queue_unref; // gstreamer.Bin GType function() c_gst_bin_get_type; GstElement* function(const(char)* name) c_gst_bin_new; int function(GstBin* bin, GstElement* element) c_gst_bin_add; void function(GstBin* bin, GstElement* element1, ... ) c_gst_bin_add_many; GstPad* function(GstBin* bin, GstPadDirection direction) c_gst_bin_find_unlinked_pad; GstElement* function(GstBin* bin, GType iface) c_gst_bin_get_by_interface; GstElement* function(GstBin* bin, const(char)* name) c_gst_bin_get_by_name; GstElement* function(GstBin* bin, const(char)* name) c_gst_bin_get_by_name_recurse_up; GstElementFlags function(GstBin* bin) c_gst_bin_get_suppressed_flags; GstIterator* function(GstBin* bin, GType iface) c_gst_bin_iterate_all_by_interface; GstIterator* function(GstBin* bin) c_gst_bin_iterate_elements; GstIterator* function(GstBin* bin) c_gst_bin_iterate_recurse; GstIterator* function(GstBin* bin) c_gst_bin_iterate_sinks; GstIterator* function(GstBin* bin) c_gst_bin_iterate_sorted; GstIterator* function(GstBin* bin) c_gst_bin_iterate_sources; int function(GstBin* bin) c_gst_bin_recalculate_latency; int function(GstBin* bin, GstElement* element) c_gst_bin_remove; void function(GstBin* bin, GstElement* element1, ... ) c_gst_bin_remove_many; void function(GstBin* bin, GstElementFlags flags) c_gst_bin_set_suppressed_flags; int function(GstBin* bin) c_gst_bin_sync_children_states; // gstreamer.Bitmask GType function() c_gst_bitmask_get_type; // gstreamer.Buffer GType function() c_gst_buffer_get_type; GstBuffer* function() c_gst_buffer_new; GstBuffer* function(GstAllocator* allocator, size_t size, GstAllocationParams* params) c_gst_buffer_new_allocate; GstBuffer* function(void* data, size_t size) c_gst_buffer_new_wrapped; GstBuffer* function(GstMemoryFlags flags, void* data, size_t maxsize, size_t offset, size_t size, void* userData, GDestroyNotify notify) c_gst_buffer_new_wrapped_full; GstMeta* function(GstBuffer* buffer, GstMetaInfo* info, void* params) c_gst_buffer_add_meta; GstParentBufferMeta* function(GstBuffer* buffer, GstBuffer* doref) c_gst_buffer_add_parent_buffer_meta; GstProtectionMeta* function(GstBuffer* buffer, GstStructure* info) c_gst_buffer_add_protection_meta; GstBuffer* function(GstBuffer* buf1, GstBuffer* buf2) c_gst_buffer_append; void function(GstBuffer* buffer, GstMemory* mem) c_gst_buffer_append_memory; GstBuffer* function(GstBuffer* buf1, GstBuffer* buf2, ptrdiff_t offset, ptrdiff_t size) c_gst_buffer_append_region; GstBuffer* function(GstBuffer* buf) c_gst_buffer_copy_deep; int function(GstBuffer* dest, GstBuffer* src, GstBufferCopyFlags flags, size_t offset, size_t size) c_gst_buffer_copy_into; GstBuffer* function(GstBuffer* parent, GstBufferCopyFlags flags, size_t offset, size_t size) c_gst_buffer_copy_region; size_t function(GstBuffer* buffer, size_t offset, void* dest, size_t size) c_gst_buffer_extract; void function(GstBuffer* buffer, size_t offset, size_t size, void** dest, size_t* destSize) c_gst_buffer_extract_dup; size_t function(GstBuffer* buffer, size_t offset, void* src, size_t size) c_gst_buffer_fill; int function(GstBuffer* buffer, size_t offset, size_t size, uint* idx, uint* length, size_t* skip) c_gst_buffer_find_memory; int function(GstBuffer* buffer, GstBufferForeachMetaFunc func, void* userData) c_gst_buffer_foreach_meta; GstMemory* function(GstBuffer* buffer) c_gst_buffer_get_all_memory; GstBufferFlags function(GstBuffer* buffer) c_gst_buffer_get_flags; GstMemory* function(GstBuffer* buffer, uint idx) c_gst_buffer_get_memory; GstMemory* function(GstBuffer* buffer, uint idx, int length) c_gst_buffer_get_memory_range; GstMeta* function(GstBuffer* buffer, GType api) c_gst_buffer_get_meta; size_t function(GstBuffer* buffer) c_gst_buffer_get_size; size_t function(GstBuffer* buffer, size_t* offset, size_t* maxsize) c_gst_buffer_get_sizes; size_t function(GstBuffer* buffer, uint idx, int length, size_t* offset, size_t* maxsize) c_gst_buffer_get_sizes_range; int function(GstBuffer* buffer, GstBufferFlags flags) c_gst_buffer_has_flags; void function(GstBuffer* buffer, int idx, GstMemory* mem) c_gst_buffer_insert_memory; int function(GstBuffer* buffer) c_gst_buffer_is_all_memory_writable; int function(GstBuffer* buffer, uint idx, int length) c_gst_buffer_is_memory_range_writable; GstMeta* function(GstBuffer* buffer, void** state) c_gst_buffer_iterate_meta; GstMeta* function(GstBuffer* buffer, void** state, GType metaApiType) c_gst_buffer_iterate_meta_filtered; int function(GstBuffer* buffer, GstMapInfo* info, GstMapFlags flags) c_gst_buffer_map; int function(GstBuffer* buffer, uint idx, int length, GstMapInfo* info, GstMapFlags flags) c_gst_buffer_map_range; int function(GstBuffer* buffer, size_t offset, void* mem, size_t size) c_gst_buffer_memcmp; size_t function(GstBuffer* buffer, size_t offset, ubyte val, size_t size) c_gst_buffer_memset; uint function(GstBuffer* buffer) c_gst_buffer_n_memory; GstMemory* function(GstBuffer* buffer, uint idx) c_gst_buffer_peek_memory; void function(GstBuffer* buffer, GstMemory* mem) c_gst_buffer_prepend_memory; void function(GstBuffer* buffer) c_gst_buffer_remove_all_memory; void function(GstBuffer* buffer, uint idx) c_gst_buffer_remove_memory; void function(GstBuffer* buffer, uint idx, int length) c_gst_buffer_remove_memory_range; int function(GstBuffer* buffer, GstMeta* meta) c_gst_buffer_remove_meta; void function(GstBuffer* buffer, GstMemory* mem) c_gst_buffer_replace_all_memory; void function(GstBuffer* buffer, uint idx, GstMemory* mem) c_gst_buffer_replace_memory; void function(GstBuffer* buffer, uint idx, int length, GstMemory* mem) c_gst_buffer_replace_memory_range; void function(GstBuffer* buffer, ptrdiff_t offset, ptrdiff_t size) c_gst_buffer_resize; int function(GstBuffer* buffer, uint idx, int length, ptrdiff_t offset, ptrdiff_t size) c_gst_buffer_resize_range; int function(GstBuffer* buffer, GstBufferFlags flags) c_gst_buffer_set_flags; void function(GstBuffer* buffer, ptrdiff_t size) c_gst_buffer_set_size; void function(GstBuffer* buffer, GstMapInfo* info) c_gst_buffer_unmap; int function(GstBuffer* buffer, GstBufferFlags flags) c_gst_buffer_unset_flags; uint function() c_gst_buffer_get_max_memory; // gstreamer.BufferList GType function() c_gst_buffer_list_get_type; GstBufferList* function() c_gst_buffer_list_new; GstBufferList* function(uint size) c_gst_buffer_list_new_sized; GstBufferList* function(GstBufferList* list) c_gst_buffer_list_copy_deep; int function(GstBufferList* list, GstBufferListFunc func, void* userData) c_gst_buffer_list_foreach; GstBuffer* function(GstBufferList* list, uint idx) c_gst_buffer_list_get; void function(GstBufferList* list, int idx, GstBuffer* buffer) c_gst_buffer_list_insert; uint function(GstBufferList* list) c_gst_buffer_list_length; void function(GstBufferList* list, uint idx, uint length) c_gst_buffer_list_remove; // gstreamer.BufferPool GType function() c_gst_buffer_pool_get_type; GstBufferPool* function() c_gst_buffer_pool_new; void function(GstStructure* config, const(char)* option) c_gst_buffer_pool_config_add_option; int function(GstStructure* config, GstAllocator** allocator, GstAllocationParams* params) c_gst_buffer_pool_config_get_allocator; const(char)* function(GstStructure* config, uint index) c_gst_buffer_pool_config_get_option; int function(GstStructure* config, GstCaps** caps, uint* size, uint* minBuffers, uint* maxBuffers) c_gst_buffer_pool_config_get_params; int function(GstStructure* config, const(char)* option) c_gst_buffer_pool_config_has_option; uint function(GstStructure* config) c_gst_buffer_pool_config_n_options; void function(GstStructure* config, GstAllocator* allocator, GstAllocationParams* params) c_gst_buffer_pool_config_set_allocator; void function(GstStructure* config, GstCaps* caps, uint size, uint minBuffers, uint maxBuffers) c_gst_buffer_pool_config_set_params; int function(GstStructure* config, GstCaps* caps, uint size, uint minBuffers, uint maxBuffers) c_gst_buffer_pool_config_validate_params; GstFlowReturn function(GstBufferPool* pool, GstBuffer** buffer, GstBufferPoolAcquireParams* params) c_gst_buffer_pool_acquire_buffer; GstStructure* function(GstBufferPool* pool) c_gst_buffer_pool_get_config; char** function(GstBufferPool* pool) c_gst_buffer_pool_get_options; int function(GstBufferPool* pool, const(char)* option) c_gst_buffer_pool_has_option; int function(GstBufferPool* pool) c_gst_buffer_pool_is_active; void function(GstBufferPool* pool, GstBuffer* buffer) c_gst_buffer_pool_release_buffer; int function(GstBufferPool* pool, int active) c_gst_buffer_pool_set_active; int function(GstBufferPool* pool, GstStructure* config) c_gst_buffer_pool_set_config; void function(GstBufferPool* pool, int flushing) c_gst_buffer_pool_set_flushing; // gstreamer.Bus GType function() c_gst_bus_get_type; GstBus* function() c_gst_bus_new; void function(GstBus* bus) c_gst_bus_add_signal_watch; void function(GstBus* bus, int priority) c_gst_bus_add_signal_watch_full; uint function(GstBus* bus, GstBusFunc func, void* userData) c_gst_bus_add_watch; uint function(GstBus* bus, int priority, GstBusFunc func, void* userData, GDestroyNotify notify) c_gst_bus_add_watch_full; int function(GstBus* bus, GstMessage* message, void* data) c_gst_bus_async_signal_func; GSource* function(GstBus* bus) c_gst_bus_create_watch; void function(GstBus* bus) c_gst_bus_disable_sync_message_emission; void function(GstBus* bus) c_gst_bus_enable_sync_message_emission; int function(GstBus* bus) c_gst_bus_have_pending; GstMessage* function(GstBus* bus) c_gst_bus_peek; GstMessage* function(GstBus* bus, GstMessageType events, GstClockTime timeout) c_gst_bus_poll; GstMessage* function(GstBus* bus) c_gst_bus_pop; GstMessage* function(GstBus* bus, GstMessageType types) c_gst_bus_pop_filtered; int function(GstBus* bus, GstMessage* message) c_gst_bus_post; void function(GstBus* bus) c_gst_bus_remove_signal_watch; int function(GstBus* bus) c_gst_bus_remove_watch; void function(GstBus* bus, int flushing) c_gst_bus_set_flushing; void function(GstBus* bus, GstBusSyncHandler func, void* userData, GDestroyNotify notify) c_gst_bus_set_sync_handler; GstBusSyncReply function(GstBus* bus, GstMessage* message, void* data) c_gst_bus_sync_signal_handler; GstMessage* function(GstBus* bus, GstClockTime timeout) c_gst_bus_timed_pop; GstMessage* function(GstBus* bus, GstClockTime timeout, GstMessageType types) c_gst_bus_timed_pop_filtered; // gstreamer.Caps GType function() c_gst_caps_get_type; GstCaps* function() c_gst_caps_new_any; GstCaps* function() c_gst_caps_new_empty; GstCaps* function(const(char)* mediaType) c_gst_caps_new_empty_simple; GstCaps* function(GstStructure* struct1, ... ) c_gst_caps_new_full; GstCaps* function(GstStructure* structure, void* varArgs) c_gst_caps_new_full_valist; GstCaps* function(const(char)* mediaType, const(char)* fieldname, ... ) c_gst_caps_new_simple; void function(GstCaps* caps1, GstCaps* caps2) c_gst_caps_append; void function(GstCaps* caps, GstStructure* structure) c_gst_caps_append_structure; void function(GstCaps* caps, GstStructure* structure, GstCapsFeatures* features) c_gst_caps_append_structure_full; int function(GstCaps* caps1, GstCaps* caps2) c_gst_caps_can_intersect; GstCaps* function(GstCaps* caps, uint nth) c_gst_caps_copy_nth; void function(GstCaps* caps, GstCapsFilterMapFunc func, void* userData) c_gst_caps_filter_and_map_in_place; GstCaps* function(GstCaps* caps) c_gst_caps_fixate; int function(GstCaps* caps, GstCapsForeachFunc func, void* userData) c_gst_caps_foreach; GstCapsFeatures* function(GstCaps* caps, uint index) c_gst_caps_get_features; uint function(GstCaps* caps) c_gst_caps_get_size; GstStructure* function(GstCaps* caps, uint index) c_gst_caps_get_structure; GstCaps* function(GstCaps* caps1, GstCaps* caps2) c_gst_caps_intersect; GstCaps* function(GstCaps* caps1, GstCaps* caps2, GstCapsIntersectMode mode) c_gst_caps_intersect_full; int function(GstCaps* caps1, GstCaps* caps2) c_gst_caps_is_always_compatible; int function(GstCaps* caps) c_gst_caps_is_any; int function(GstCaps* caps) c_gst_caps_is_empty; int function(GstCaps* caps1, GstCaps* caps2) c_gst_caps_is_equal; int function(GstCaps* caps1, GstCaps* caps2) c_gst_caps_is_equal_fixed; int function(GstCaps* caps) c_gst_caps_is_fixed; int function(GstCaps* caps1, GstCaps* caps2) c_gst_caps_is_strictly_equal; int function(GstCaps* subset, GstCaps* superset) c_gst_caps_is_subset; int function(GstCaps* caps, GstStructure* structure) c_gst_caps_is_subset_structure; int function(GstCaps* caps, GstStructure* structure, GstCapsFeatures* features) c_gst_caps_is_subset_structure_full; int function(GstCaps* caps, GstCapsMapFunc func, void* userData) c_gst_caps_map_in_place; GstCaps* function(GstCaps* caps1, GstCaps* caps2) c_gst_caps_merge; GstCaps* function(GstCaps* caps, GstStructure* structure) c_gst_caps_merge_structure; GstCaps* function(GstCaps* caps, GstStructure* structure, GstCapsFeatures* features) c_gst_caps_merge_structure_full; GstCaps* function(GstCaps* caps) c_gst_caps_normalize; void function(GstCaps* caps, uint idx) c_gst_caps_remove_structure; void function(GstCaps* caps, uint index, GstCapsFeatures* features) c_gst_caps_set_features; void function(GstCaps* caps, const(char)* field, ... ) c_gst_caps_set_simple; void function(GstCaps* caps, const(char)* field, void* varargs) c_gst_caps_set_simple_valist; void function(GstCaps* caps, const(char)* field, GValue* value) c_gst_caps_set_value; GstCaps* function(GstCaps* caps) c_gst_caps_simplify; GstStructure* function(GstCaps* caps, uint index) c_gst_caps_steal_structure; GstCaps* function(GstCaps* minuend, GstCaps* subtrahend) c_gst_caps_subtract; char* function(GstCaps* caps) c_gst_caps_to_string; GstCaps* function(GstCaps* caps) c_gst_caps_truncate; GstCaps* function(const(char)* str) c_gst_caps_from_string; // gstreamer.CapsFeatures GType function() c_gst_caps_features_get_type; GstCapsFeatures* function(const(char)* feature1, ... ) c_gst_caps_features_new; GstCapsFeatures* function() c_gst_caps_features_new_any; GstCapsFeatures* function() c_gst_caps_features_new_empty; GstCapsFeatures* function(GQuark feature1, ... ) c_gst_caps_features_new_id; GstCapsFeatures* function(GQuark feature1, void* varargs) c_gst_caps_features_new_id_valist; GstCapsFeatures* function(const(char)* feature1, void* varargs) c_gst_caps_features_new_valist; void function(GstCapsFeatures* features, const(char)* feature) c_gst_caps_features_add; void function(GstCapsFeatures* features, GQuark feature) c_gst_caps_features_add_id; int function(GstCapsFeatures* features, const(char)* feature) c_gst_caps_features_contains; int function(GstCapsFeatures* features, GQuark feature) c_gst_caps_features_contains_id; GstCapsFeatures* function(GstCapsFeatures* features) c_gst_caps_features_copy; void function(GstCapsFeatures* features) c_gst_caps_features_free; const(char)* function(GstCapsFeatures* features, uint i) c_gst_caps_features_get_nth; GQuark function(GstCapsFeatures* features, uint i) c_gst_caps_features_get_nth_id; uint function(GstCapsFeatures* features) c_gst_caps_features_get_size; int function(GstCapsFeatures* features) c_gst_caps_features_is_any; int function(GstCapsFeatures* features1, GstCapsFeatures* features2) c_gst_caps_features_is_equal; void function(GstCapsFeatures* features, const(char)* feature) c_gst_caps_features_remove; void function(GstCapsFeatures* features, GQuark feature) c_gst_caps_features_remove_id; int function(GstCapsFeatures* features, int* refcount) c_gst_caps_features_set_parent_refcount; char* function(GstCapsFeatures* features) c_gst_caps_features_to_string; GstCapsFeatures* function(const(char)* features) c_gst_caps_features_from_string; // gstreamer.ChildProxy GType function() c_gst_child_proxy_get_type; void function(GstChildProxy* parent, GObject* child, const(char)* name) c_gst_child_proxy_child_added; void function(GstChildProxy* parent, GObject* child, const(char)* name) c_gst_child_proxy_child_removed; void function(GstChildProxy* object, const(char)* firstPropertyName, ... ) c_gst_child_proxy_get; GObject* function(GstChildProxy* parent, uint index) c_gst_child_proxy_get_child_by_index; GObject* function(GstChildProxy* parent, const(char)* name) c_gst_child_proxy_get_child_by_name; uint function(GstChildProxy* parent) c_gst_child_proxy_get_children_count; void function(GstChildProxy* object, const(char)* name, GValue* value) c_gst_child_proxy_get_property; void function(GstChildProxy* object, const(char)* firstPropertyName, void* varArgs) c_gst_child_proxy_get_valist; int function(GstChildProxy* object, const(char)* name, GObject** target, GParamSpec** pspec) c_gst_child_proxy_lookup; void function(GstChildProxy* object, const(char)* firstPropertyName, ... ) c_gst_child_proxy_set; void function(GstChildProxy* object, const(char)* name, GValue* value) c_gst_child_proxy_set_property; void function(GstChildProxy* object, const(char)* firstPropertyName, void* varArgs) c_gst_child_proxy_set_valist; // gstreamer.Clock GType function() c_gst_clock_get_type; int function(void* id1, void* id2) c_gst_clock_id_compare_func; GstClockTime function(GstClockID id) c_gst_clock_id_get_time; GstClockID function(GstClockID id) c_gst_clock_id_ref; void function(GstClockID id) c_gst_clock_id_unref; void function(GstClockID id) c_gst_clock_id_unschedule; GstClockReturn function(GstClockID id, GstClockTimeDiff* jitter) c_gst_clock_id_wait; GstClockReturn function(GstClockID id, GstClockCallback func, void* userData, GDestroyNotify destroyData) c_gst_clock_id_wait_async; int function(GstClock* clock, GstClockTime slave, GstClockTime master, double* rSquared) c_gst_clock_add_observation; int function(GstClock* clock, GstClockTime slave, GstClockTime master, double* rSquared, GstClockTime* internal, GstClockTime* external, GstClockTime* rateNum, GstClockTime* rateDenom) c_gst_clock_add_observation_unapplied; GstClockTime function(GstClock* clock, GstClockTime internal) c_gst_clock_adjust_unlocked; GstClockTime function(GstClock* clock, GstClockTime internalTarget, GstClockTime cinternal, GstClockTime cexternal, GstClockTime cnum, GstClockTime cdenom) c_gst_clock_adjust_with_calibration; void function(GstClock* clock, GstClockTime* internal, GstClockTime* external, GstClockTime* rateNum, GstClockTime* rateDenom) c_gst_clock_get_calibration; GstClockTime function(GstClock* clock) c_gst_clock_get_internal_time; GstClock* function(GstClock* clock) c_gst_clock_get_master; GstClockTime function(GstClock* clock) c_gst_clock_get_resolution; GstClockTime function(GstClock* clock) c_gst_clock_get_time; GstClockTime function(GstClock* clock) c_gst_clock_get_timeout; int function(GstClock* clock) c_gst_clock_is_synced; GstClockID function(GstClock* clock, GstClockTime startTime, GstClockTime interval) c_gst_clock_new_periodic_id; GstClockID function(GstClock* clock, GstClockTime time) c_gst_clock_new_single_shot_id; int function(GstClock* clock, GstClockID id, GstClockTime startTime, GstClockTime interval) c_gst_clock_periodic_id_reinit; void function(GstClock* clock, GstClockTime internal, GstClockTime external, GstClockTime rateNum, GstClockTime rateDenom) c_gst_clock_set_calibration; int function(GstClock* clock, GstClock* master) c_gst_clock_set_master; GstClockTime function(GstClock* clock, GstClockTime resolution) c_gst_clock_set_resolution; void function(GstClock* clock, int synced) c_gst_clock_set_synced; void function(GstClock* clock, GstClockTime timeout) c_gst_clock_set_timeout; int function(GstClock* clock, GstClockID id, GstClockTime time) c_gst_clock_single_shot_id_reinit; GstClockTime function(GstClock* clock, GstClockTime external) c_gst_clock_unadjust_unlocked; GstClockTime function(GstClock* clock, GstClockTime externalTarget, GstClockTime cinternal, GstClockTime cexternal, GstClockTime cnum, GstClockTime cdenom) c_gst_clock_unadjust_with_calibration; int function(GstClock* clock, GstClockTime timeout) c_gst_clock_wait_for_sync; // gstreamer.Context GType function() c_gst_context_get_type; GstContext* function(const(char)* contextType, int persistent) c_gst_context_new; const(char)* function(GstContext* context) c_gst_context_get_context_type; GstStructure* function(GstContext* context) c_gst_context_get_structure; int function(GstContext* context, const(char)* contextType) c_gst_context_has_context_type; int function(GstContext* context) c_gst_context_is_persistent; GstStructure* function(GstContext* context) c_gst_context_writable_structure; // gstreamer.ControlBinding GType function() c_gst_control_binding_get_type; int function(GstControlBinding* binding, GstClockTime timestamp, GstClockTime interval, uint nValues, GValue* values) c_gst_control_binding_get_g_value_array; GValue* function(GstControlBinding* binding, GstClockTime timestamp) c_gst_control_binding_get_value; int function(GstControlBinding* binding, GstClockTime timestamp, GstClockTime interval, uint nValues, void* values) c_gst_control_binding_get_value_array; int function(GstControlBinding* binding) c_gst_control_binding_is_disabled; void function(GstControlBinding* binding, int disabled) c_gst_control_binding_set_disabled; int function(GstControlBinding* binding, GstObject* object, GstClockTime timestamp, GstClockTime lastSync) c_gst_control_binding_sync_values; // gstreamer.ControlSource GType function() c_gst_control_source_get_type; int function(GstControlSource* self, GstClockTime timestamp, double* value) c_gst_control_source_get_value; int function(GstControlSource* self, GstClockTime timestamp, GstClockTime interval, uint nValues, double* values) c_gst_control_source_get_value_array; // gstreamer.DateTime GType function() c_gst_date_time_get_type; GstDateTime* function(float tzoffset, int year, int month, int day, int hour, int minute, double seconds) c_gst_date_time_new; GstDateTime* function(GDateTime* dt) c_gst_date_time_new_from_g_date_time; GstDateTime* function(const(char)* str) c_gst_date_time_new_from_iso8601_string; GstDateTime* function(long secs) c_gst_date_time_new_from_unix_epoch_local_time; GstDateTime* function(long secs) c_gst_date_time_new_from_unix_epoch_utc; GstDateTime* function(int year, int month, int day, int hour, int minute, double seconds) c_gst_date_time_new_local_time; GstDateTime* function() c_gst_date_time_new_now_local_time; GstDateTime* function() c_gst_date_time_new_now_utc; GstDateTime* function(int year) c_gst_date_time_new_y; GstDateTime* function(int year, int month) c_gst_date_time_new_ym; GstDateTime* function(int year, int month, int day) c_gst_date_time_new_ymd; int function(GstDateTime* datetime) c_gst_date_time_get_day; int function(GstDateTime* datetime) c_gst_date_time_get_hour; int function(GstDateTime* datetime) c_gst_date_time_get_microsecond; int function(GstDateTime* datetime) c_gst_date_time_get_minute; int function(GstDateTime* datetime) c_gst_date_time_get_month; int function(GstDateTime* datetime) c_gst_date_time_get_second; float function(GstDateTime* datetime) c_gst_date_time_get_time_zone_offset; int function(GstDateTime* datetime) c_gst_date_time_get_year; int function(GstDateTime* datetime) c_gst_date_time_has_day; int function(GstDateTime* datetime) c_gst_date_time_has_month; int function(GstDateTime* datetime) c_gst_date_time_has_second; int function(GstDateTime* datetime) c_gst_date_time_has_time; int function(GstDateTime* datetime) c_gst_date_time_has_year; GstDateTime* function(GstDateTime* datetime) c_gst_date_time_ref; GDateTime* function(GstDateTime* datetime) c_gst_date_time_to_g_date_time; char* function(GstDateTime* datetime) c_gst_date_time_to_iso8601_string; void function(GstDateTime* datetime) c_gst_date_time_unref; // gstreamer.DebugCategory void function(GstDebugCategory* category) c_gst_debug_category_free; uint function(GstDebugCategory* category) c_gst_debug_category_get_color; const(char)* function(GstDebugCategory* category) c_gst_debug_category_get_description; const(char)* function(GstDebugCategory* category) c_gst_debug_category_get_name; GstDebugLevel function(GstDebugCategory* category) c_gst_debug_category_get_threshold; void function(GstDebugCategory* category) c_gst_debug_category_reset_threshold; void function(GstDebugCategory* category, GstDebugLevel level) c_gst_debug_category_set_threshold; // gstreamer.DebugMessage const(char)* function(GstDebugMessage* message) c_gst_debug_message_get; // gstreamer.Device GType function() c_gst_device_get_type; GstElement* function(GstDevice* device, const(char)* name) c_gst_device_create_element; GstCaps* function(GstDevice* device) c_gst_device_get_caps; char* function(GstDevice* device) c_gst_device_get_device_class; char* function(GstDevice* device) c_gst_device_get_display_name; GstStructure* function(GstDevice* device) c_gst_device_get_properties; int function(GstDevice* device, const(char)* classes) c_gst_device_has_classes; int function(GstDevice* device, char** classes) c_gst_device_has_classesv; int function(GstDevice* device, GstElement* element) c_gst_device_reconfigure_element; // gstreamer.DeviceMonitor GType function() c_gst_device_monitor_get_type; GstDeviceMonitor* function() c_gst_device_monitor_new; uint function(GstDeviceMonitor* monitor, const(char)* classes, GstCaps* caps) c_gst_device_monitor_add_filter; GstBus* function(GstDeviceMonitor* monitor) c_gst_device_monitor_get_bus; GList* function(GstDeviceMonitor* monitor) c_gst_device_monitor_get_devices; char** function(GstDeviceMonitor* monitor) c_gst_device_monitor_get_providers; int function(GstDeviceMonitor* monitor) c_gst_device_monitor_get_show_all_devices; int function(GstDeviceMonitor* monitor, uint filterId) c_gst_device_monitor_remove_filter; void function(GstDeviceMonitor* monitor, int showAll) c_gst_device_monitor_set_show_all_devices; int function(GstDeviceMonitor* monitor) c_gst_device_monitor_start; void function(GstDeviceMonitor* monitor) c_gst_device_monitor_stop; // gstreamer.DeviceProvider GType function() c_gst_device_provider_get_type; int function(GstPlugin* plugin, const(char)* name, uint rank, GType type) c_gst_device_provider_register; int function(GstDeviceProvider* provider) c_gst_device_provider_can_monitor; void function(GstDeviceProvider* provider, GstDevice* device) c_gst_device_provider_device_add; void function(GstDeviceProvider* provider, GstDevice* device) c_gst_device_provider_device_remove; GstBus* function(GstDeviceProvider* provider) c_gst_device_provider_get_bus; GList* function(GstDeviceProvider* provider) c_gst_device_provider_get_devices; GstDeviceProviderFactory* function(GstDeviceProvider* provider) c_gst_device_provider_get_factory; char** function(GstDeviceProvider* provider) c_gst_device_provider_get_hidden_providers; void function(GstDeviceProvider* provider, const(char)* name) c_gst_device_provider_hide_provider; int function(GstDeviceProvider* provider) c_gst_device_provider_start; void function(GstDeviceProvider* provider) c_gst_device_provider_stop; void function(GstDeviceProvider* provider, const(char)* name) c_gst_device_provider_unhide_provider; // gstreamer.DeviceProviderClass void function(GstDeviceProviderClass* klass, const(char)* key, const(char)* value) c_gst_device_provider_class_add_metadata; void function(GstDeviceProviderClass* klass, const(char)* key, const(char)* value) c_gst_device_provider_class_add_static_metadata; const(char)* function(GstDeviceProviderClass* klass, const(char)* key) c_gst_device_provider_class_get_metadata; void function(GstDeviceProviderClass* klass, const(char)* longname, const(char)* classification, const(char)* description, const(char)* author) c_gst_device_provider_class_set_metadata; void function(GstDeviceProviderClass* klass, const(char)* longname, const(char)* classification, const(char)* description, const(char)* author) c_gst_device_provider_class_set_static_metadata; // gstreamer.DeviceProviderFactory GType function() c_gst_device_provider_factory_get_type; GstDeviceProviderFactory* function(const(char)* name) c_gst_device_provider_factory_find; GstDeviceProvider* function(const(char)* factoryname) c_gst_device_provider_factory_get_by_name; GList* function(GstRank minrank) c_gst_device_provider_factory_list_get_device_providers; GstDeviceProvider* function(GstDeviceProviderFactory* factory) c_gst_device_provider_factory_get; GType function(GstDeviceProviderFactory* factory) c_gst_device_provider_factory_get_device_provider_type; const(char)* function(GstDeviceProviderFactory* factory, const(char)* key) c_gst_device_provider_factory_get_metadata; char** function(GstDeviceProviderFactory* factory) c_gst_device_provider_factory_get_metadata_keys; int function(GstDeviceProviderFactory* factory, const(char)* classes) c_gst_device_provider_factory_has_classes; int function(GstDeviceProviderFactory* factory, char** classes) c_gst_device_provider_factory_has_classesv; // gstreamer.DoubleRange GType function() c_gst_double_range_get_type; // gstreamer.DynamicTypeFactory GType function() c_gst_dynamic_type_factory_get_type; GType function(const(char)* factoryname) c_gst_dynamic_type_factory_load; // gstreamer.Element GType function() c_gst_element_get_type; GstElement* function(GstURIType type, const(char)* uri, const(char)* elementname, GError** err) c_gst_element_make_from_uri; int function(GstPlugin* plugin, const(char)* name, uint rank, GType type) c_gst_element_register; const(char)* function(GstStateChangeReturn stateRet) c_gst_element_state_change_return_get_name; const(char)* function(GstState state) c_gst_element_state_get_name; void function(GstElement* element) c_gst_element_abort_state; int function(GstElement* element, GstPad* pad) c_gst_element_add_pad; gulong function(GstElement* element, const(char)* propertyName, int includeValue) c_gst_element_add_property_deep_notify_watch; gulong function(GstElement* element, const(char)* propertyName, int includeValue) c_gst_element_add_property_notify_watch; void function(GstElement* element, GstElementCallAsyncFunc func, void* userData, GDestroyNotify destroyNotify) c_gst_element_call_async; GstStateChangeReturn function(GstElement* element, GstStateChange transition) c_gst_element_change_state; GstStateChangeReturn function(GstElement* element, GstStateChangeReturn ret) c_gst_element_continue_state; void function(GstElement* element) c_gst_element_create_all_pads; GstClockTime function(GstElement* element) c_gst_element_get_base_time; GstBus* function(GstElement* element) c_gst_element_get_bus; GstClock* function(GstElement* element) c_gst_element_get_clock; GstPad* function(GstElement* element, GstPad* pad, GstCaps* caps) c_gst_element_get_compatible_pad; GstPadTemplate* function(GstElement* element, GstPadTemplate* compattempl) c_gst_element_get_compatible_pad_template; GstContext* function(GstElement* element, const(char)* contextType) c_gst_element_get_context; GstContext* function(GstElement* element, const(char)* contextType) c_gst_element_get_context_unlocked; GList* function(GstElement* element) c_gst_element_get_contexts; GstElementFactory* function(GstElement* element) c_gst_element_get_factory; GstPad* function(GstElement* element, const(char)* name) c_gst_element_get_request_pad; GstClockTime function(GstElement* element) c_gst_element_get_start_time; GstStateChangeReturn function(GstElement* element, GstState* state, GstState* pending, GstClockTime timeout) c_gst_element_get_state; GstPad* function(GstElement* element, const(char)* name) c_gst_element_get_static_pad; int function(GstElement* element) c_gst_element_is_locked_state; GstIterator* function(GstElement* element) c_gst_element_iterate_pads; GstIterator* function(GstElement* element) c_gst_element_iterate_sink_pads; GstIterator* function(GstElement* element) c_gst_element_iterate_src_pads; int function(GstElement* src, GstElement* dest) c_gst_element_link; int function(GstElement* src, GstElement* dest, GstCaps* filter) c_gst_element_link_filtered; int function(GstElement* element1, GstElement* element2, ... ) c_gst_element_link_many; int function(GstElement* src, const(char)* srcpadname, GstElement* dest, const(char)* destpadname) c_gst_element_link_pads; int function(GstElement* src, const(char)* srcpadname, GstElement* dest, const(char)* destpadname, GstCaps* filter) c_gst_element_link_pads_filtered; int function(GstElement* src, const(char)* srcpadname, GstElement* dest, const(char)* destpadname, GstPadLinkCheck flags) c_gst_element_link_pads_full; void function(GstElement* element) c_gst_element_lost_state; void function(GstElement* element, GstMessageType type, GQuark domain, int code, char* text, char* dbg, const(char)* file, const(char)* funct, int line) c_gst_element_message_full; void function(GstElement* element, GstMessageType type, GQuark domain, int code, char* text, char* dbg, const(char)* file, const(char)* funct, int line, GstStructure* structure) c_gst_element_message_full_with_details; void function(GstElement* element) c_gst_element_no_more_pads; int function(GstElement* element, GstMessage* message) c_gst_element_post_message; GstClock* function(GstElement* element) c_gst_element_provide_clock; int function(GstElement* element, GstQuery* query) c_gst_element_query; int function(GstElement* element, GstFormat srcFormat, long srcVal, GstFormat destFormat, long* destVal) c_gst_element_query_convert; int function(GstElement* element, GstFormat format, long* duration) c_gst_element_query_duration; int function(GstElement* element, GstFormat format, long* cur) c_gst_element_query_position; void function(GstElement* element, GstPad* pad) c_gst_element_release_request_pad; int function(GstElement* element, GstPad* pad) c_gst_element_remove_pad; void function(GstElement* element, gulong watchId) c_gst_element_remove_property_notify_watch; GstPad* function(GstElement* element, GstPadTemplate* templ, const(char)* name, GstCaps* caps) c_gst_element_request_pad; int function(GstElement* element, double rate, GstFormat format, GstSeekFlags flags, GstSeekType startType, long start, GstSeekType stopType, long stop) c_gst_element_seek; int function(GstElement* element, GstFormat format, GstSeekFlags seekFlags, long seekPos) c_gst_element_seek_simple; int function(GstElement* element, GstEvent* event) c_gst_element_send_event; void function(GstElement* element, GstClockTime time) c_gst_element_set_base_time; void function(GstElement* element, GstBus* bus) c_gst_element_set_bus; int function(GstElement* element, GstClock* clock) c_gst_element_set_clock; void function(GstElement* element, GstContext* context) c_gst_element_set_context; int function(GstElement* element, int lockedState) c_gst_element_set_locked_state; void function(GstElement* element, GstClockTime time) c_gst_element_set_start_time; GstStateChangeReturn function(GstElement* element, GstState state) c_gst_element_set_state; int function(GstElement* element) c_gst_element_sync_state_with_parent; void function(GstElement* src, GstElement* dest) c_gst_element_unlink; void function(GstElement* element1, GstElement* element2, ... ) c_gst_element_unlink_many; void function(GstElement* src, const(char)* srcpadname, GstElement* dest, const(char)* destpadname) c_gst_element_unlink_pads; // gstreamer.ElementClass void function(GstElementClass* klass, const(char)* key, const(char)* value) c_gst_element_class_add_metadata; void function(GstElementClass* klass, GstPadTemplate* templ) c_gst_element_class_add_pad_template; void function(GstElementClass* klass, const(char)* key, const(char)* value) c_gst_element_class_add_static_metadata; void function(GstElementClass* klass, GstStaticPadTemplate* staticTempl) c_gst_element_class_add_static_pad_template; const(char)* function(GstElementClass* klass, const(char)* key) c_gst_element_class_get_metadata; GstPadTemplate* function(GstElementClass* elementClass, const(char)* name) c_gst_element_class_get_pad_template; GList* function(GstElementClass* elementClass) c_gst_element_class_get_pad_template_list; void function(GstElementClass* klass, const(char)* longname, const(char)* classification, const(char)* description, const(char)* author) c_gst_element_class_set_metadata; void function(GstElementClass* klass, const(char)* longname, const(char)* classification, const(char)* description, const(char)* author) c_gst_element_class_set_static_metadata; // gstreamer.ElementFactory GType function() c_gst_element_factory_get_type; GstElementFactory* function(const(char)* name) c_gst_element_factory_find; GList* function(GList* list, GstCaps* caps, GstPadDirection direction, int subsetonly) c_gst_element_factory_list_filter; GList* function(GstElementFactoryListType type, GstRank minrank) c_gst_element_factory_list_get_elements; GstElement* function(const(char)* factoryname, const(char)* name) c_gst_element_factory_make; int function(GstElementFactory* factory, GstCaps* caps) c_gst_element_factory_can_sink_all_caps; int function(GstElementFactory* factory, GstCaps* caps) c_gst_element_factory_can_sink_any_caps; int function(GstElementFactory* factory, GstCaps* caps) c_gst_element_factory_can_src_all_caps; int function(GstElementFactory* factory, GstCaps* caps) c_gst_element_factory_can_src_any_caps; GstElement* function(GstElementFactory* factory, const(char)* name) c_gst_element_factory_create; GType function(GstElementFactory* factory) c_gst_element_factory_get_element_type; const(char)* function(GstElementFactory* factory, const(char)* key) c_gst_element_factory_get_metadata; char** function(GstElementFactory* factory) c_gst_element_factory_get_metadata_keys; uint function(GstElementFactory* factory) c_gst_element_factory_get_num_pad_templates; GList* function(GstElementFactory* factory) c_gst_element_factory_get_static_pad_templates; char** function(GstElementFactory* factory) c_gst_element_factory_get_uri_protocols; GstURIType function(GstElementFactory* factory) c_gst_element_factory_get_uri_type; int function(GstElementFactory* factory, const(char)* interfacename) c_gst_element_factory_has_interface; int function(GstElementFactory* factory, GstElementFactoryListType type) c_gst_element_factory_list_is_type; // gstreamer.Event GType function() c_gst_event_get_type; GstEvent* function(GstFormat format, long minsize, long maxsize, int async) c_gst_event_new_buffer_size; GstEvent* function(GstCaps* caps) c_gst_event_new_caps; GstEvent* function(GstEventType type, GstStructure* structure) c_gst_event_new_custom; GstEvent* function() c_gst_event_new_eos; GstEvent* function() c_gst_event_new_flush_start; GstEvent* function(int resetTime) c_gst_event_new_flush_stop; GstEvent* function(GstClockTime timestamp, GstClockTime duration) c_gst_event_new_gap; GstEvent* function(GstClockTime latency) c_gst_event_new_latency; GstEvent* function(GstStructure* structure) c_gst_event_new_navigation; GstEvent* function(const(char)* systemId, GstBuffer* data, const(char)* origin) c_gst_event_new_protection; GstEvent* function(GstQOSType type, double proportion, GstClockTimeDiff diff, GstClockTime timestamp) c_gst_event_new_qos; GstEvent* function() c_gst_event_new_reconfigure; GstEvent* function(double rate, GstFormat format, GstSeekFlags flags, GstSeekType startType, long start, GstSeekType stopType, long stop) c_gst_event_new_seek; GstEvent* function(GstSegment* segment) c_gst_event_new_segment; GstEvent* function(GstFormat format, long position) c_gst_event_new_segment_done; GstEvent* function(GList* streams) c_gst_event_new_select_streams; GstEvent* function(const(char)* name, GstMessage* msg) c_gst_event_new_sink_message; GstEvent* function(GstFormat format, ulong amount, double rate, int flush, int intermediate) c_gst_event_new_step; GstEvent* function(GstStreamCollection* collection) c_gst_event_new_stream_collection; GstEvent* function(uint groupId) c_gst_event_new_stream_group_done; GstEvent* function(const(char)* streamId) c_gst_event_new_stream_start; GstEvent* function(GstTagList* taglist) c_gst_event_new_tag; GstEvent* function(GstToc* toc, int updated) c_gst_event_new_toc; GstEvent* function(const(char)* uid) c_gst_event_new_toc_select; void function(GstEvent* event, GstSegment* segment) c_gst_event_copy_segment; long function(GstEvent* event) c_gst_event_get_running_time_offset; uint function(GstEvent* event) c_gst_event_get_seqnum; GstStructure* function(GstEvent* event) c_gst_event_get_structure; int function(GstEvent* event, const(char)* name) c_gst_event_has_name; void function(GstEvent* event, GstFormat* format, long* minsize, long* maxsize, int* async) c_gst_event_parse_buffer_size; void function(GstEvent* event, GstCaps** caps) c_gst_event_parse_caps; void function(GstEvent* event, int* resetTime) c_gst_event_parse_flush_stop; void function(GstEvent* event, GstClockTime* timestamp, GstClockTime* duration) c_gst_event_parse_gap; int function(GstEvent* event, uint* groupId) c_gst_event_parse_group_id; void function(GstEvent* event, GstClockTime* latency) c_gst_event_parse_latency; void function(GstEvent* event, char** systemId, GstBuffer** data, char** origin) c_gst_event_parse_protection; void function(GstEvent* event, GstQOSType* type, double* proportion, GstClockTimeDiff* diff, GstClockTime* timestamp) c_gst_event_parse_qos; void function(GstEvent* event, double* rate, GstFormat* format, GstSeekFlags* flags, GstSeekType* startType, long* start, GstSeekType* stopType, long* stop) c_gst_event_parse_seek; void function(GstEvent* event, GstSegment** segment) c_gst_event_parse_segment; void function(GstEvent* event, GstFormat* format, long* position) c_gst_event_parse_segment_done; void function(GstEvent* event, GList** streams) c_gst_event_parse_select_streams; void function(GstEvent* event, GstMessage** msg) c_gst_event_parse_sink_message; void function(GstEvent* event, GstFormat* format, ulong* amount, double* rate, int* flush, int* intermediate) c_gst_event_parse_step; void function(GstEvent* event, GstStream** stream) c_gst_event_parse_stream; void function(GstEvent* event, GstStreamCollection** collection) c_gst_event_parse_stream_collection; void function(GstEvent* event, GstStreamFlags* flags) c_gst_event_parse_stream_flags; void function(GstEvent* event, uint* groupId) c_gst_event_parse_stream_group_done; void function(GstEvent* event, char** streamId) c_gst_event_parse_stream_start; void function(GstEvent* event, GstTagList** taglist) c_gst_event_parse_tag; void function(GstEvent* event, GstToc** toc, int* updated) c_gst_event_parse_toc; void function(GstEvent* event, char** uid) c_gst_event_parse_toc_select; void function(GstEvent* event, uint groupId) c_gst_event_set_group_id; void function(GstEvent* event, long offset) c_gst_event_set_running_time_offset; void function(GstEvent* event, uint seqnum) c_gst_event_set_seqnum; void function(GstEvent* event, GstStream* stream) c_gst_event_set_stream; void function(GstEvent* event, GstStreamFlags flags) c_gst_event_set_stream_flags; GstStructure* function(GstEvent* event) c_gst_event_writable_structure; GstEventTypeFlags function(GstEventType type) c_gst_event_type_get_flags; const(char)* function(GstEventType type) c_gst_event_type_get_name; GQuark function(GstEventType type) c_gst_event_type_to_quark; // gstreamer.FlagSet GType function() c_gst_flagset_get_type; GType function(GType flagsType) c_gst_flagset_register; // gstreamer.Fraction GType function() c_gst_fraction_get_type; // gstreamer.FractionRange GType function() c_gst_fraction_range_get_type; // gstreamer.GhostPad GType function() c_gst_ghost_pad_get_type; GstPad* function(const(char)* name, GstPad* target) c_gst_ghost_pad_new; GstPad* function(const(char)* name, GstPad* target, GstPadTemplate* templ) c_gst_ghost_pad_new_from_template; GstPad* function(const(char)* name, GstPadDirection dir) c_gst_ghost_pad_new_no_target; GstPad* function(const(char)* name, GstPadTemplate* templ) c_gst_ghost_pad_new_no_target_from_template; int function(GstPad* pad, GstObject* parent, GstPadMode mode, int active) c_gst_ghost_pad_activate_mode_default; int function(GstPad* pad, GstObject* parent, GstPadMode mode, int active) c_gst_ghost_pad_internal_activate_mode_default; int function(GstGhostPad* gpad) c_gst_ghost_pad_construct; GstPad* function(GstGhostPad* gpad) c_gst_ghost_pad_get_target; int function(GstGhostPad* gpad, GstPad* newtarget) c_gst_ghost_pad_set_target; // gstreamer.Int64Range GType function() c_gst_int64_range_get_type; // gstreamer.IntRange GType function() c_gst_int_range_get_type; // gstreamer.Iterator GType function() c_gst_iterator_get_type; GstIterator* function(uint size, GType type, GMutex* lock, uint* masterCookie, GstIteratorCopyFunction copy, GstIteratorNextFunction next, GstIteratorItemFunction item, GstIteratorResyncFunction resync, GstIteratorFreeFunction free) c_gst_iterator_new; GstIterator* function(GType type, GMutex* lock, uint* masterCookie, GList** list, GObject* owner, GstIteratorItemFunction item) c_gst_iterator_new_list; GstIterator* function(GType type, GValue* object) c_gst_iterator_new_single; GstIterator* function(GstIterator* it) c_gst_iterator_copy; GstIterator* function(GstIterator* it, GCompareFunc func, GValue* userData) c_gst_iterator_filter; int function(GstIterator* it, GCompareFunc func, GValue* elem, void* userData) c_gst_iterator_find_custom; GstIteratorResult function(GstIterator* it, GstIteratorFoldFunction func, GValue* ret, void* userData) c_gst_iterator_fold; GstIteratorResult function(GstIterator* it, GstIteratorForeachFunction func, void* userData) c_gst_iterator_foreach; void function(GstIterator* it) c_gst_iterator_free; GstIteratorResult function(GstIterator* it, GValue* elem) c_gst_iterator_next; void function(GstIterator* it, GstIterator* other) c_gst_iterator_push; void function(GstIterator* it) c_gst_iterator_resync; // gstreamer.Memory GType function() c_gst_memory_get_type; GstMemory* function(GstMemoryFlags flags, void* data, size_t maxsize, size_t offset, size_t size, void* userData, GDestroyNotify notify) c_gst_memory_new_wrapped; GstMemory* function(GstMemory* mem, ptrdiff_t offset, ptrdiff_t size) c_gst_memory_copy; size_t function(GstMemory* mem, size_t* offset, size_t* maxsize) c_gst_memory_get_sizes; void function(GstMemory* mem, GstMemoryFlags flags, GstAllocator* allocator, GstMemory* parent, size_t maxsize, size_t alig, size_t offset, size_t size) c_gst_memory_init; int function(GstMemory* mem1, GstMemory* mem2, size_t* offset) c_gst_memory_is_span; int function(GstMemory* mem, const(char)* memType) c_gst_memory_is_type; GstMemory* function(GstMemory* mem, GstMapInfo* info, GstMapFlags flags) c_gst_memory_make_mapped; int function(GstMemory* mem, GstMapInfo* info, GstMapFlags flags) c_gst_memory_map; void function(GstMemory* mem, ptrdiff_t offset, size_t size) c_gst_memory_resize; GstMemory* function(GstMemory* mem, ptrdiff_t offset, ptrdiff_t size) c_gst_memory_share; void function(GstMemory* mem, GstMapInfo* info) c_gst_memory_unmap; // gstreamer.Message GType function() c_gst_message_get_type; GstMessage* function(GstObject* src, GstStructure* structure) c_gst_message_new_application; GstMessage* function(GstObject* src, GstClockTime runningTime) c_gst_message_new_async_done; GstMessage* function(GstObject* src) c_gst_message_new_async_start; GstMessage* function(GstObject* src, int percent) c_gst_message_new_buffering; GstMessage* function(GstObject* src, GstClock* clock) c_gst_message_new_clock_lost; GstMessage* function(GstObject* src, GstClock* clock, int ready) c_gst_message_new_clock_provide; GstMessage* function(GstMessageType type, GstObject* src, GstStructure* structure) c_gst_message_new_custom; GstMessage* function(GstObject* src, GstDevice* device) c_gst_message_new_device_added; GstMessage* function(GstObject* src, GstDevice* device) c_gst_message_new_device_removed; GstMessage* function(GstObject* src) c_gst_message_new_duration_changed; GstMessage* function(GstObject* src, GstStructure* structure) c_gst_message_new_element; GstMessage* function(GstObject* src) c_gst_message_new_eos; GstMessage* function(GstObject* src, GError* error, const(char)* dbg) c_gst_message_new_error; GstMessage* function(GstObject* src, GError* error, const(char)* dbg, GstStructure* details) c_gst_message_new_error_with_details; GstMessage* function(GstObject* src, GstContext* context) c_gst_message_new_have_context; GstMessage* function(GstObject* src, GError* error, const(char)* dbg) c_gst_message_new_info; GstMessage* function(GstObject* src, GError* error, const(char)* dbg, GstStructure* details) c_gst_message_new_info_with_details; GstMessage* function(GstObject* src) c_gst_message_new_latency; GstMessage* function(GstObject* src, const(char)* contextType) c_gst_message_new_need_context; GstMessage* function(GstObject* src, GstClock* clock) c_gst_message_new_new_clock; GstMessage* function(GstObject* src, GstProgressType type, const(char)* code, const(char)* text) c_gst_message_new_progress; GstMessage* function(GstObject* src, const(char)* propertyName, GValue* val) c_gst_message_new_property_notify; GstMessage* function(GstObject* src, int live, ulong runningTime, ulong streamTime, ulong timestamp, ulong duration) c_gst_message_new_qos; GstMessage* function(GstObject* src, const(char)* location, GstTagList* tagList, GstStructure* entryStruct) c_gst_message_new_redirect; GstMessage* function(GstObject* src, GstState state) c_gst_message_new_request_state; GstMessage* function(GstObject* src, GstClockTime runningTime) c_gst_message_new_reset_time; GstMessage* function(GstObject* src, GstFormat format, long position) c_gst_message_new_segment_done; GstMessage* function(GstObject* src, GstFormat format, long position) c_gst_message_new_segment_start; GstMessage* function(GstObject* src, GstState oldstate, GstState newstate, GstState pending) c_gst_message_new_state_changed; GstMessage* function(GstObject* src) c_gst_message_new_state_dirty; GstMessage* function(GstObject* src, GstFormat format, ulong amount, double rate, int flush, int intermediate, ulong duration, int eos) c_gst_message_new_step_done; GstMessage* function(GstObject* src, int active, GstFormat format, ulong amount, double rate, int flush, int intermediate) c_gst_message_new_step_start; GstMessage* function(GstObject* src, GstStreamCollection* collection) c_gst_message_new_stream_collection; GstMessage* function(GstObject* src) c_gst_message_new_stream_start; GstMessage* function(GstObject* src, GstStreamStatusType type, GstElement* owner) c_gst_message_new_stream_status; GstMessage* function(GstObject* src, GstStreamCollection* collection) c_gst_message_new_streams_selected; GstMessage* function(GstObject* src, GstStructureChangeType type, GstElement* owner, int busy) c_gst_message_new_structure_change; GstMessage* function(GstObject* src, GstTagList* tagList) c_gst_message_new_tag; GstMessage* function(GstObject* src, GstToc* toc, int updated) c_gst_message_new_toc; GstMessage* function(GstObject* src, GError* error, const(char)* dbg) c_gst_message_new_warning; GstMessage* function(GstObject* src, GError* error, const(char)* dbg, GstStructure* details) c_gst_message_new_warning_with_details; void function(GstMessage* message, const(char)* location, GstTagList* tagList, GstStructure* entryStruct) c_gst_message_add_redirect_entry; size_t function(GstMessage* message) c_gst_message_get_num_redirect_entries; uint function(GstMessage* message) c_gst_message_get_seqnum; GValue* function(GstMessage* message) c_gst_message_get_stream_status_object; GstStructure* function(GstMessage* message) c_gst_message_get_structure; int function(GstMessage* message, const(char)* name) c_gst_message_has_name; void function(GstMessage* message, GstClockTime* runningTime) c_gst_message_parse_async_done; void function(GstMessage* message, int* percent) c_gst_message_parse_buffering; void function(GstMessage* message, GstBufferingMode* mode, int* avgIn, int* avgOut, long* bufferingLeft) c_gst_message_parse_buffering_stats; void function(GstMessage* message, GstClock** clock) c_gst_message_parse_clock_lost; void function(GstMessage* message, GstClock** clock, int* ready) c_gst_message_parse_clock_provide; int function(GstMessage* message, char** contextType) c_gst_message_parse_context_type; void function(GstMessage* message, GstDevice** device) c_gst_message_parse_device_added; void function(GstMessage* message, GstDevice** device) c_gst_message_parse_device_removed; void function(GstMessage* message, GError** gerror, char** dbg) c_gst_message_parse_error; void function(GstMessage* message, GstStructure** structure) c_gst_message_parse_error_details; int function(GstMessage* message, uint* groupId) c_gst_message_parse_group_id; void function(GstMessage* message, GstContext** context) c_gst_message_parse_have_context; void function(GstMessage* message, GError** gerror, char** dbg) c_gst_message_parse_info; void function(GstMessage* message, GstStructure** structure) c_gst_message_parse_info_details; void function(GstMessage* message, GstClock** clock) c_gst_message_parse_new_clock; void function(GstMessage* message, GstProgressType* type, char** code, char** text) c_gst_message_parse_progress; void function(GstMessage* message, GstObject** object, char** propertyName, GValue** propertyValue) c_gst_message_parse_property_notify; void function(GstMessage* message, int* live, ulong* runningTime, ulong* streamTime, ulong* timestamp, ulong* duration) c_gst_message_parse_qos; void function(GstMessage* message, GstFormat* format, ulong* processed, ulong* dropped) c_gst_message_parse_qos_stats; void function(GstMessage* message, long* jitter, double* proportion, int* quality) c_gst_message_parse_qos_values; void function(GstMessage* message, size_t entryIndex, char** location, GstTagList** tagList, GstStructure** entryStruct) c_gst_message_parse_redirect_entry; void function(GstMessage* message, GstState* state) c_gst_message_parse_request_state; void function(GstMessage* message, GstClockTime* runningTime) c_gst_message_parse_reset_time; void function(GstMessage* message, GstFormat* format, long* position) c_gst_message_parse_segment_done; void function(GstMessage* message, GstFormat* format, long* position) c_gst_message_parse_segment_start; void function(GstMessage* message, GstState* oldstate, GstState* newstate, GstState* pending) c_gst_message_parse_state_changed; void function(GstMessage* message, GstFormat* format, ulong* amount, double* rate, int* flush, int* intermediate, ulong* duration, int* eos) c_gst_message_parse_step_done; void function(GstMessage* message, int* active, GstFormat* format, ulong* amount, double* rate, int* flush, int* intermediate) c_gst_message_parse_step_start; void function(GstMessage* message, GstStreamCollection** collection) c_gst_message_parse_stream_collection; void function(GstMessage* message, GstStreamStatusType* type, GstElement** owner) c_gst_message_parse_stream_status; void function(GstMessage* message, GstStreamCollection** collection) c_gst_message_parse_streams_selected; void function(GstMessage* message, GstStructureChangeType* type, GstElement** owner, int* busy) c_gst_message_parse_structure_change; void function(GstMessage* message, GstTagList** tagList) c_gst_message_parse_tag; void function(GstMessage* message, GstToc** toc, int* updated) c_gst_message_parse_toc; void function(GstMessage* message, GError** gerror, char** dbg) c_gst_message_parse_warning; void function(GstMessage* message, GstStructure** structure) c_gst_message_parse_warning_details; void function(GstMessage* message, GstBufferingMode mode, int avgIn, int avgOut, long bufferingLeft) c_gst_message_set_buffering_stats; void function(GstMessage* message, uint groupId) c_gst_message_set_group_id; void function(GstMessage* message, GstFormat format, ulong processed, ulong dropped) c_gst_message_set_qos_stats; void function(GstMessage* message, long jitter, double proportion, int quality) c_gst_message_set_qos_values; void function(GstMessage* message, uint seqnum) c_gst_message_set_seqnum; void function(GstMessage* message, GValue* object) c_gst_message_set_stream_status_object; void function(GstMessage* message, GstStream* stream) c_gst_message_streams_selected_add; uint function(GstMessage* message) c_gst_message_streams_selected_get_size; GstStream* function(GstMessage* message, uint idx) c_gst_message_streams_selected_get_stream; const(char)* function(GstMessageType type) c_gst_message_type_get_name; GQuark function(GstMessageType type) c_gst_message_type_to_quark; // gstreamer.Meta char** function(GType api) c_gst_meta_api_type_get_tags; int function(GType api, GQuark tag) c_gst_meta_api_type_has_tag; GType function(const(char)* api, char** tags) c_gst_meta_api_type_register; GstMetaInfo* function(const(char)* impl) c_gst_meta_get_info; GstMetaInfo* function(GType api, const(char)* impl, size_t size, GstMetaInitFunction initFunc, GstMetaFreeFunction freeFunc, GstMetaTransformFunction transformFunc) c_gst_meta_register; // gstreamer.MiniObject GstMiniObject* function(GstMiniObject* miniObject) c_gst_mini_object_copy; void* function(GstMiniObject* object, GQuark quark) c_gst_mini_object_get_qdata; void function(GstMiniObject* miniObject, uint flags, GType type, GstMiniObjectCopyFunction copyFunc, GstMiniObjectDisposeFunction disposeFunc, GstMiniObjectFreeFunction freeFunc) c_gst_mini_object_init; int function(GstMiniObject* miniObject) c_gst_mini_object_is_writable; int function(GstMiniObject* object, GstLockFlags flags) c_gst_mini_object_lock; GstMiniObject* function(GstMiniObject* miniObject) c_gst_mini_object_make_writable; GstMiniObject* function(GstMiniObject* miniObject) c_gst_mini_object_ref; void function(GstMiniObject* object, GQuark quark, void* data, GDestroyNotify destroy) c_gst_mini_object_set_qdata; void* function(GstMiniObject* object, GQuark quark) c_gst_mini_object_steal_qdata; void function(GstMiniObject* object, GstLockFlags flags) c_gst_mini_object_unlock; void function(GstMiniObject* miniObject) c_gst_mini_object_unref; void function(GstMiniObject* object, GstMiniObjectNotify notify, void* data) c_gst_mini_object_weak_ref; void function(GstMiniObject* object, GstMiniObjectNotify notify, void* data) c_gst_mini_object_weak_unref; int function(GstMiniObject** olddata, GstMiniObject* newdata) c_gst_mini_object_replace; GstMiniObject* function(GstMiniObject** olddata) c_gst_mini_object_steal; int function(GstMiniObject** olddata, GstMiniObject* newdata) c_gst_mini_object_take; // gstreamer.ObjectGst GType function() c_gst_object_get_type; int function(GList* list, const(char)* name) c_gst_object_check_uniqueness; void function(GObject* object, GstObject* orig, GParamSpec* pspec, char** excludedProps) c_gst_object_default_deep_notify; void* function(void* object) c_gst_object_ref_sink; int function(GstObject** oldobj, GstObject* newobj) c_gst_object_replace; int function(GstObject* object, GstControlBinding* binding) c_gst_object_add_control_binding; void function(GstObject* source, GError* error, const(char)* dbg) c_gst_object_default_error; GstControlBinding* function(GstObject* object, const(char)* propertyName) c_gst_object_get_control_binding; GstClockTime function(GstObject* object) c_gst_object_get_control_rate; int function(GstObject* object, const(char)* propertyName, GstClockTime timestamp, GstClockTime interval, uint nValues, GValue* values) c_gst_object_get_g_value_array; char* function(GstObject* object) c_gst_object_get_name; GstObject* function(GstObject* object) c_gst_object_get_parent; char* function(GstObject* object) c_gst_object_get_path_string; GValue* function(GstObject* object, const(char)* propertyName, GstClockTime timestamp) c_gst_object_get_value; int function(GstObject* object, const(char)* propertyName, GstClockTime timestamp, GstClockTime interval, uint nValues, void* values) c_gst_object_get_value_array; int function(GstObject* object) c_gst_object_has_active_control_bindings; int function(GstObject* object, GstObject* ancestor) c_gst_object_has_ancestor; int function(GstObject* object, GstObject* ancestor) c_gst_object_has_as_ancestor; int function(GstObject* object, GstObject* parent) c_gst_object_has_as_parent; void* function(void* object) c_gst_object_ref; int function(GstObject* object, GstControlBinding* binding) c_gst_object_remove_control_binding; void function(GstObject* object, const(char)* propertyName, int disabled) c_gst_object_set_control_binding_disabled; void function(GstObject* object, int disabled) c_gst_object_set_control_bindings_disabled; void function(GstObject* object, GstClockTime controlRate) c_gst_object_set_control_rate; int function(GstObject* object, const(char)* name) c_gst_object_set_name; int function(GstObject* object, GstObject* parent) c_gst_object_set_parent; GstClockTime function(GstObject* object) c_gst_object_suggest_next_sync; int function(GstObject* object, GstClockTime timestamp) c_gst_object_sync_values; void function(GstObject* object) c_gst_object_unparent; void function(void* object) c_gst_object_unref; // gstreamer.Pad GType function() c_gst_pad_get_type; GstPad* function(const(char)* name, GstPadDirection direction) c_gst_pad_new; GstPad* function(GstStaticPadTemplate* templ, const(char)* name) c_gst_pad_new_from_static_template; GstPad* function(GstPadTemplate* templ, const(char)* name) c_gst_pad_new_from_template; const(char)* function(GstPadLinkReturn ret) c_gst_pad_link_get_name; int function(GstPad* pad, GstPadMode mode, int active) c_gst_pad_activate_mode; gulong function(GstPad* pad, GstPadProbeType mask, GstPadProbeCallback callback, void* userData, GDestroyNotify destroyData) c_gst_pad_add_probe; int function(GstPad* srcpad, GstPad* sinkpad) c_gst_pad_can_link; GstFlowReturn function(GstPad* pad, GstBuffer* buffer) c_gst_pad_chain; GstFlowReturn function(GstPad* pad, GstBufferList* list) c_gst_pad_chain_list; int function(GstPad* pad) c_gst_pad_check_reconfigure; char* function(GstPad* pad, GstElement* parent, const(char)* streamId) c_gst_pad_create_stream_id; char* function(GstPad* pad, GstElement* parent, const(char)* streamId, ... ) c_gst_pad_create_stream_id_printf; char* function(GstPad* pad, GstElement* parent, const(char)* streamId, void* varArgs) c_gst_pad_create_stream_id_printf_valist; int function(GstPad* pad, GstObject* parent, GstEvent* event) c_gst_pad_event_default; int function(GstPad* pad, GstPadForwardFunction forward, void* userData) c_gst_pad_forward; GstCaps* function(GstPad* pad) c_gst_pad_get_allowed_caps; GstCaps* function(GstPad* pad) c_gst_pad_get_current_caps; GstPadDirection function(GstPad* pad) c_gst_pad_get_direction; void* function(GstPad* pad) c_gst_pad_get_element_private; GstFlowReturn function(GstPad* pad) c_gst_pad_get_last_flow_return; long function(GstPad* pad) c_gst_pad_get_offset; GstPadTemplate* function(GstPad* pad) c_gst_pad_get_pad_template; GstCaps* function(GstPad* pad) c_gst_pad_get_pad_template_caps; GstElement* function(GstPad* pad) c_gst_pad_get_parent_element; GstPad* function(GstPad* pad) c_gst_pad_get_peer; GstFlowReturn function(GstPad* pad, ulong offset, uint size, GstBuffer** buffer) c_gst_pad_get_range; GstEvent* function(GstPad* pad, GstEventType eventType, uint idx) c_gst_pad_get_sticky_event; GstStream* function(GstPad* pad) c_gst_pad_get_stream; char* function(GstPad* pad) c_gst_pad_get_stream_id; GstTaskState function(GstPad* pad) c_gst_pad_get_task_state; int function(GstPad* pad) c_gst_pad_has_current_caps; int function(GstPad* pad) c_gst_pad_is_active; int function(GstPad* pad) c_gst_pad_is_blocked; int function(GstPad* pad) c_gst_pad_is_blocking; int function(GstPad* pad) c_gst_pad_is_linked; GstIterator* function(GstPad* pad) c_gst_pad_iterate_internal_links; GstIterator* function(GstPad* pad, GstObject* parent) c_gst_pad_iterate_internal_links_default; GstPadLinkReturn function(GstPad* srcpad, GstPad* sinkpad) c_gst_pad_link; GstPadLinkReturn function(GstPad* srcpad, GstPad* sinkpad, GstPadLinkCheck flags) c_gst_pad_link_full; int function(GstPad* src, GstPad* sink) c_gst_pad_link_maybe_ghosting; int function(GstPad* src, GstPad* sink, GstPadLinkCheck flags) c_gst_pad_link_maybe_ghosting_full; void function(GstPad* pad) c_gst_pad_mark_reconfigure; int function(GstPad* pad) c_gst_pad_needs_reconfigure; int function(GstPad* pad) c_gst_pad_pause_task; int function(GstPad* pad, GstQuery* query) c_gst_pad_peer_query; int function(GstPad* pad, GstCaps* caps) c_gst_pad_peer_query_accept_caps; GstCaps* function(GstPad* pad, GstCaps* filter) c_gst_pad_peer_query_caps; int function(GstPad* pad, GstFormat srcFormat, long srcVal, GstFormat destFormat, long* destVal) c_gst_pad_peer_query_convert; int function(GstPad* pad, GstFormat format, long* duration) c_gst_pad_peer_query_duration; int function(GstPad* pad, GstFormat format, long* cur) c_gst_pad_peer_query_position; int function(GstPad* pad, GstQuery* query) c_gst_pad_proxy_query_accept_caps; int function(GstPad* pad, GstQuery* query) c_gst_pad_proxy_query_caps; GstFlowReturn function(GstPad* pad, ulong offset, uint size, GstBuffer** buffer) c_gst_pad_pull_range; GstFlowReturn function(GstPad* pad, GstBuffer* buffer) c_gst_pad_push; int function(GstPad* pad, GstEvent* event) c_gst_pad_push_event; GstFlowReturn function(GstPad* pad, GstBufferList* list) c_gst_pad_push_list; int function(GstPad* pad, GstQuery* query) c_gst_pad_query; int function(GstPad* pad, GstCaps* caps) c_gst_pad_query_accept_caps; GstCaps* function(GstPad* pad, GstCaps* filter) c_gst_pad_query_caps; int function(GstPad* pad, GstFormat srcFormat, long srcVal, GstFormat destFormat, long* destVal) c_gst_pad_query_convert; int function(GstPad* pad, GstObject* parent, GstQuery* query) c_gst_pad_query_default; int function(GstPad* pad, GstFormat format, long* duration) c_gst_pad_query_duration; int function(GstPad* pad, GstFormat format, long* cur) c_gst_pad_query_position; void function(GstPad* pad, gulong id) c_gst_pad_remove_probe; int function(GstPad* pad, GstEvent* event) c_gst_pad_send_event; void function(GstPad* pad, GstPadActivateFunction activate, void* userData, GDestroyNotify notify) c_gst_pad_set_activate_function_full; void function(GstPad* pad, GstPadActivateModeFunction activatemode, void* userData, GDestroyNotify notify) c_gst_pad_set_activatemode_function_full; int function(GstPad* pad, int active) c_gst_pad_set_active; void function(GstPad* pad, GstPadChainFunction chain, void* userData, GDestroyNotify notify) c_gst_pad_set_chain_function_full; void function(GstPad* pad, GstPadChainListFunction chainlist, void* userData, GDestroyNotify notify) c_gst_pad_set_chain_list_function_full; void function(GstPad* pad, void* priv) c_gst_pad_set_element_private; void function(GstPad* pad, GstPadEventFullFunction event, void* userData, GDestroyNotify notify) c_gst_pad_set_event_full_function_full; void function(GstPad* pad, GstPadEventFunction event, void* userData, GDestroyNotify notify) c_gst_pad_set_event_function_full; void function(GstPad* pad, GstPadGetRangeFunction get, void* userData, GDestroyNotify notify) c_gst_pad_set_getrange_function_full; void function(GstPad* pad, GstPadIterIntLinkFunction iterintlink, void* userData, GDestroyNotify notify) c_gst_pad_set_iterate_internal_links_function_full; void function(GstPad* pad, GstPadLinkFunction link, void* userData, GDestroyNotify notify) c_gst_pad_set_link_function_full; void function(GstPad* pad, long offset) c_gst_pad_set_offset; void function(GstPad* pad, GstPadQueryFunction query, void* userData, GDestroyNotify notify) c_gst_pad_set_query_function_full; void function(GstPad* pad, GstPadUnlinkFunction unlink, void* userData, GDestroyNotify notify) c_gst_pad_set_unlink_function_full; int function(GstPad* pad, GstTaskFunction func, void* userData, GDestroyNotify notify) c_gst_pad_start_task; void function(GstPad* pad, GstPadStickyEventsForeachFunction foreachFunc, void* userData) c_gst_pad_sticky_events_foreach; int function(GstPad* pad) c_gst_pad_stop_task; GstFlowReturn function(GstPad* pad, GstEvent* event) c_gst_pad_store_sticky_event; int function(GstPad* srcpad, GstPad* sinkpad) c_gst_pad_unlink; void function(GstPad* pad) c_gst_pad_use_fixed_caps; const(char)* function(GstFlowReturn ret) c_gst_flow_get_name; GQuark function(GstFlowReturn ret) c_gst_flow_to_quark; const(char)* function(GstPadMode mode) c_gst_pad_mode_get_name; // gstreamer.PadProbeInfo GstBuffer* function(GstPadProbeInfo* info) c_gst_pad_probe_info_get_buffer; GstBufferList* function(GstPadProbeInfo* info) c_gst_pad_probe_info_get_buffer_list; GstEvent* function(GstPadProbeInfo* info) c_gst_pad_probe_info_get_event; GstQuery* function(GstPadProbeInfo* info) c_gst_pad_probe_info_get_query; // gstreamer.PadTemplate GType function() c_gst_pad_template_get_type; GstPadTemplate* function(const(char)* nameTemplate, GstPadDirection direction, GstPadPresence presence, GstCaps* caps) c_gst_pad_template_new; GstCaps* function(GstPadTemplate* templ) c_gst_pad_template_get_caps; void function(GstPadTemplate* templ, GstPad* pad) c_gst_pad_template_pad_created; // gstreamer.ParamArray GType function() c_gst_param_spec_array_get_type; // gstreamer.ParamFraction GType function() c_gst_param_spec_fraction_get_type; // gstreamer.ParamSpecFraction GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, int minNum, int minDenom, int maxNum, int maxDenom, int defaultNum, int defaultDenom, GParamFlags flags) c_gst_param_spec_fraction; // gstreamer.ParentBufferMeta GstMetaInfo* function() c_gst_parent_buffer_meta_get_info; GType function() c_gst_parent_buffer_meta_api_get_type; // gstreamer.ParseContext GType function() c_gst_parse_context_get_type; GstParseContext* function() c_gst_parse_context_new; GstParseContext* function(GstParseContext* context) c_gst_parse_context_copy; void function(GstParseContext* context) c_gst_parse_context_free; char** function(GstParseContext* context) c_gst_parse_context_get_missing_elements; // gstreamer.Pipeline GType function() c_gst_pipeline_get_type; GstElement* function(const(char)* name) c_gst_pipeline_new; void function(GstPipeline* pipeline) c_gst_pipeline_auto_clock; int function(GstPipeline* pipeline) c_gst_pipeline_get_auto_flush_bus; GstBus* function(GstPipeline* pipeline) c_gst_pipeline_get_bus; GstClock* function(GstPipeline* pipeline) c_gst_pipeline_get_clock; GstClockTime function(GstPipeline* pipeline) c_gst_pipeline_get_delay; GstClockTime function(GstPipeline* pipeline) c_gst_pipeline_get_latency; GstClock* function(GstPipeline* pipeline) c_gst_pipeline_get_pipeline_clock; void function(GstPipeline* pipeline, int autoFlush) c_gst_pipeline_set_auto_flush_bus; int function(GstPipeline* pipeline, GstClock* clock) c_gst_pipeline_set_clock; void function(GstPipeline* pipeline, GstClockTime delay) c_gst_pipeline_set_delay; void function(GstPipeline* pipeline, GstClockTime latency) c_gst_pipeline_set_latency; void function(GstPipeline* pipeline, GstClock* clock) c_gst_pipeline_use_clock; // gstreamer.Plugin GType function() c_gst_plugin_get_type; void function(GList* list) c_gst_plugin_list_free; GstPlugin* function(const(char)* name) c_gst_plugin_load_by_name; GstPlugin* function(const(char)* filename, GError** err) c_gst_plugin_load_file; int function(int majorVersion, int minorVersion, const(char)* name, const(char)* description, GstPluginInitFunc initFunc, const(char)* versio, const(char)* license, const(char)* source, const(char)* p, const(char)* origin) c_gst_plugin_register_static; int function(int majorVersion, int minorVersion, const(char)* name, const(char)* description, GstPluginInitFullFunc initFullFunc, const(char)* versio, const(char)* license, const(char)* source, const(char)* p, const(char)* origin, void* userData) c_gst_plugin_register_static_full; void function(GstPlugin* plugin, char** envVars, char** paths, char** names, GstPluginDependencyFlags flags) c_gst_plugin_add_dependency; void function(GstPlugin* plugin, const(char)* envVars, const(char)* paths, const(char)* names, GstPluginDependencyFlags flags) c_gst_plugin_add_dependency_simple; GstStructure* function(GstPlugin* plugin) c_gst_plugin_get_cache_data; const(char)* function(GstPlugin* plugin) c_gst_plugin_get_description; const(char)* function(GstPlugin* plugin) c_gst_plugin_get_filename; const(char)* function(GstPlugin* plugin) c_gst_plugin_get_license; const(char)* function(GstPlugin* plugin) c_gst_plugin_get_name; const(char)* function(GstPlugin* plugin) c_gst_plugin_get_origin; const(char)* function(GstPlugin* plugin) c_gst_plugin_get_package; const(char)* function(GstPlugin* plugin) c_gst_plugin_get_release_date_string; const(char)* function(GstPlugin* plugin) c_gst_plugin_get_source; const(char)* function(GstPlugin* plugin) c_gst_plugin_get_version; int function(GstPlugin* plugin) c_gst_plugin_is_loaded; GstPlugin* function(GstPlugin* plugin) c_gst_plugin_load; void function(GstPlugin* plugin, GstStructure* cacheData) c_gst_plugin_set_cache_data; GQuark function() c_gst_plugin_error_quark; // gstreamer.PluginFeature GType function() c_gst_plugin_feature_get_type; GList* function(GList* list) c_gst_plugin_feature_list_copy; void function(GList* list) c_gst_plugin_feature_list_debug; void function(GList* list) c_gst_plugin_feature_list_free; int function(void* p1, void* p2) c_gst_plugin_feature_rank_compare_func; int function(GstPluginFeature* feature, uint minMajor, uint minMinor, uint minMicro) c_gst_plugin_feature_check_version; GstPlugin* function(GstPluginFeature* feature) c_gst_plugin_feature_get_plugin; const(char)* function(GstPluginFeature* feature) c_gst_plugin_feature_get_plugin_name; uint function(GstPluginFeature* feature) c_gst_plugin_feature_get_rank; GstPluginFeature* function(GstPluginFeature* feature) c_gst_plugin_feature_load; void function(GstPluginFeature* feature, uint rank) c_gst_plugin_feature_set_rank; // gstreamer.Poll int function(GstPoll* set, GstPollFD* fd) c_gst_poll_add_fd; int function(GstPoll* set, GstPollFD* fd) c_gst_poll_fd_can_read; int function(GstPoll* set, GstPollFD* fd) c_gst_poll_fd_can_write; int function(GstPoll* set, GstPollFD* fd, int active) c_gst_poll_fd_ctl_read; int function(GstPoll* set, GstPollFD* fd, int active) c_gst_poll_fd_ctl_write; int function(GstPoll* set, GstPollFD* fd) c_gst_poll_fd_has_closed; int function(GstPoll* set, GstPollFD* fd) c_gst_poll_fd_has_error; void function(GstPoll* set, GstPollFD* fd) c_gst_poll_fd_ignored; void function(GstPoll* set) c_gst_poll_free; void function(GstPoll* set, GPollFD* fd) c_gst_poll_get_read_gpollfd; int function(GstPoll* set) c_gst_poll_read_control; int function(GstPoll* set, GstPollFD* fd) c_gst_poll_remove_fd; void function(GstPoll* set) c_gst_poll_restart; int function(GstPoll* set, int controllable) c_gst_poll_set_controllable; void function(GstPoll* set, int flushing) c_gst_poll_set_flushing; int function(GstPoll* set, GstClockTime timeout) c_gst_poll_wait; int function(GstPoll* set) c_gst_poll_write_control; GstPoll* function(int controllable) c_gst_poll_new; GstPoll* function() c_gst_poll_new_timer; // gstreamer.PollFD void function(GstPollFD* fd) c_gst_poll_fd_init; // gstreamer.Preset GType function() c_gst_preset_get_type; const(char)* function() c_gst_preset_get_app_dir; int function(const(char)* appDir) c_gst_preset_set_app_dir; int function(GstPreset* preset, const(char)* name) c_gst_preset_delete_preset; int function(GstPreset* preset, const(char)* name, const(char)* tag, char** value) c_gst_preset_get_meta; char** function(GstPreset* preset) c_gst_preset_get_preset_names; char** function(GstPreset* preset) c_gst_preset_get_property_names; int function(GstPreset* preset) c_gst_preset_is_editable; int function(GstPreset* preset, const(char)* name) c_gst_preset_load_preset; int function(GstPreset* preset, const(char)* oldName, const(char)* newName) c_gst_preset_rename_preset; int function(GstPreset* preset, const(char)* name) c_gst_preset_save_preset; int function(GstPreset* preset, const(char)* name, const(char)* tag, const(char)* value) c_gst_preset_set_meta; // gstreamer.ProtectionMeta GstMetaInfo* function() c_gst_protection_meta_get_info; GType function() c_gst_protection_meta_api_get_type; const(char)* function(char** systemIdentifiers) c_gst_protection_select_system; // gstreamer.ProxyPad GType function() c_gst_proxy_pad_get_type; GstFlowReturn function(GstPad* pad, GstObject* parent, GstBuffer* buffer) c_gst_proxy_pad_chain_default; GstFlowReturn function(GstPad* pad, GstObject* parent, GstBufferList* list) c_gst_proxy_pad_chain_list_default; GstFlowReturn function(GstPad* pad, GstObject* parent, ulong offset, uint size, GstBuffer** buffer) c_gst_proxy_pad_getrange_default; GstIterator* function(GstPad* pad, GstObject* parent) c_gst_proxy_pad_iterate_internal_links_default; GstProxyPad* function(GstProxyPad* pad) c_gst_proxy_pad_get_internal; // gstreamer.Query GType function() c_gst_query_get_type; GstQuery* function(GstCaps* caps) c_gst_query_new_accept_caps; GstQuery* function(GstCaps* caps, int needPool) c_gst_query_new_allocation; GstQuery* function(GstFormat format) c_gst_query_new_buffering; GstQuery* function(GstCaps* filter) c_gst_query_new_caps; GstQuery* function(const(char)* contextType) c_gst_query_new_context; GstQuery* function(GstFormat srcFormat, long value, GstFormat destFormat) c_gst_query_new_convert; GstQuery* function(GstQueryType type, GstStructure* structure) c_gst_query_new_custom; GstQuery* function() c_gst_query_new_drain; GstQuery* function(GstFormat format) c_gst_query_new_duration; GstQuery* function() c_gst_query_new_formats; GstQuery* function() c_gst_query_new_latency; GstQuery* function(GstFormat format) c_gst_query_new_position; GstQuery* function() c_gst_query_new_scheduling; GstQuery* function(GstFormat format) c_gst_query_new_seeking; GstQuery* function(GstFormat format) c_gst_query_new_segment; GstQuery* function() c_gst_query_new_uri; void function(GstQuery* query, GType api, GstStructure* params) c_gst_query_add_allocation_meta; void function(GstQuery* query, GstAllocator* allocator, GstAllocationParams* params) c_gst_query_add_allocation_param; void function(GstQuery* query, GstBufferPool* pool, uint size, uint minBuffers, uint maxBuffers) c_gst_query_add_allocation_pool; int function(GstQuery* query, long start, long stop) c_gst_query_add_buffering_range; void function(GstQuery* query, GstPadMode mode) c_gst_query_add_scheduling_mode; int function(GstQuery* query, GType api, uint* index) c_gst_query_find_allocation_meta; uint function(GstQuery* query) c_gst_query_get_n_allocation_metas; uint function(GstQuery* query) c_gst_query_get_n_allocation_params; uint function(GstQuery* query) c_gst_query_get_n_allocation_pools; uint function(GstQuery* query) c_gst_query_get_n_buffering_ranges; uint function(GstQuery* query) c_gst_query_get_n_scheduling_modes; GstStructure* function(GstQuery* query) c_gst_query_get_structure; int function(GstQuery* query, GstPadMode mode) c_gst_query_has_scheduling_mode; int function(GstQuery* query, GstPadMode mode, GstSchedulingFlags flags) c_gst_query_has_scheduling_mode_with_flags; void function(GstQuery* query, GstCaps** caps) c_gst_query_parse_accept_caps; void function(GstQuery* query, int* result) c_gst_query_parse_accept_caps_result; void function(GstQuery* query, GstCaps** caps, int* needPool) c_gst_query_parse_allocation; void function(GstQuery* query, int* busy, int* percent) c_gst_query_parse_buffering_percent; void function(GstQuery* query, GstFormat* format, long* start, long* stop, long* estimatedTotal) c_gst_query_parse_buffering_range; void function(GstQuery* query, GstBufferingMode* mode, int* avgIn, int* avgOut, long* bufferingLeft) c_gst_query_parse_buffering_stats; void function(GstQuery* query, GstCaps** filter) c_gst_query_parse_caps; void function(GstQuery* query, GstCaps** caps) c_gst_query_parse_caps_result; void function(GstQuery* query, GstContext** context) c_gst_query_parse_context; int function(GstQuery* query, char** contextType) c_gst_query_parse_context_type; void function(GstQuery* query, GstFormat* srcFormat, long* srcValue, GstFormat* destFormat, long* destValue) c_gst_query_parse_convert; void function(GstQuery* query, GstFormat* format, long* duration) c_gst_query_parse_duration; void function(GstQuery* query, int* live, GstClockTime* minLatency, GstClockTime* maxLatency) c_gst_query_parse_latency; void function(GstQuery* query, uint* nFormats) c_gst_query_parse_n_formats; GType function(GstQuery* query, uint index, GstStructure** params) c_gst_query_parse_nth_allocation_meta; void function(GstQuery* query, uint index, GstAllocator** allocator, GstAllocationParams* params) c_gst_query_parse_nth_allocation_param; void function(GstQuery* query, uint index, GstBufferPool** pool, uint* size, uint* minBuffers, uint* maxBuffers) c_gst_query_parse_nth_allocation_pool; int function(GstQuery* query, uint index, long* start, long* stop) c_gst_query_parse_nth_buffering_range; void function(GstQuery* query, uint nth, GstFormat* format) c_gst_query_parse_nth_format; GstPadMode function(GstQuery* query, uint index) c_gst_query_parse_nth_scheduling_mode; void function(GstQuery* query, GstFormat* format, long* cur) c_gst_query_parse_position; void function(GstQuery* query, GstSchedulingFlags* flags, int* minsize, int* maxsize, int* alig) c_gst_query_parse_scheduling; void function(GstQuery* query, GstFormat* format, int* seekable, long* segmentStart, long* segmentEnd) c_gst_query_parse_seeking; void function(GstQuery* query, double* rate, GstFormat* format, long* startValue, long* stopValue) c_gst_query_parse_segment; void function(GstQuery* query, char** uri) c_gst_query_parse_uri; void function(GstQuery* query, char** uri) c_gst_query_parse_uri_redirection; void function(GstQuery* query, int* permanent) c_gst_query_parse_uri_redirection_permanent; void function(GstQuery* query, uint index) c_gst_query_remove_nth_allocation_meta; void function(GstQuery* query, uint index) c_gst_query_remove_nth_allocation_param; void function(GstQuery* query, uint index) c_gst_query_remove_nth_allocation_pool; void function(GstQuery* query, int result) c_gst_query_set_accept_caps_result; void function(GstQuery* query, int busy, int percent) c_gst_query_set_buffering_percent; void function(GstQuery* query, GstFormat format, long start, long stop, long estimatedTotal) c_gst_query_set_buffering_range; void function(GstQuery* query, GstBufferingMode mode, int avgIn, int avgOut, long bufferingLeft) c_gst_query_set_buffering_stats; void function(GstQuery* query, GstCaps* caps) c_gst_query_set_caps_result; void function(GstQuery* query, GstContext* context) c_gst_query_set_context; void function(GstQuery* query, GstFormat srcFormat, long srcValue, GstFormat destFormat, long destValue) c_gst_query_set_convert; void function(GstQuery* query, GstFormat format, long duration) c_gst_query_set_duration; void function(GstQuery* query, int nFormats, ... ) c_gst_query_set_formats; void function(GstQuery* query, int nFormats, GstFormat* formats) c_gst_query_set_formatsv; void function(GstQuery* query, int live, GstClockTime minLatency, GstClockTime maxLatency) c_gst_query_set_latency; void function(GstQuery* query, uint index, GstAllocator* allocator, GstAllocationParams* params) c_gst_query_set_nth_allocation_param; void function(GstQuery* query, uint index, GstBufferPool* pool, uint size, uint minBuffers, uint maxBuffers) c_gst_query_set_nth_allocation_pool; void function(GstQuery* query, GstFormat format, long cur) c_gst_query_set_position; void function(GstQuery* query, GstSchedulingFlags flags, int minsize, int maxsize, int alig) c_gst_query_set_scheduling; void function(GstQuery* query, GstFormat format, int seekable, long segmentStart, long segmentEnd) c_gst_query_set_seeking; void function(GstQuery* query, double rate, GstFormat format, long startValue, long stopValue) c_gst_query_set_segment; void function(GstQuery* query, const(char)* uri) c_gst_query_set_uri; void function(GstQuery* query, const(char)* uri) c_gst_query_set_uri_redirection; void function(GstQuery* query, int permanent) c_gst_query_set_uri_redirection_permanent; GstStructure* function(GstQuery* query) c_gst_query_writable_structure; GstQueryTypeFlags function(GstQueryType type) c_gst_query_type_get_flags; const(char)* function(GstQueryType type) c_gst_query_type_get_name; GQuark function(GstQueryType type) c_gst_query_type_to_quark; // gstreamer.Registry GType function() c_gst_registry_get_type; int function() c_gst_registry_fork_is_enabled; void function(int enabled) c_gst_registry_fork_set_enabled; GstRegistry* function() c_gst_registry_get; int function(GstRegistry* registry, GstPluginFeature* feature) c_gst_registry_add_feature; int function(GstRegistry* registry, GstPlugin* plugin) c_gst_registry_add_plugin; int function(GstRegistry* registry, const(char)* featureName, uint minMajor, uint minMinor, uint minMicro) c_gst_registry_check_feature_version; GList* function(GstRegistry* registry, GstPluginFeatureFilter filter, int first, void* userData) c_gst_registry_feature_filter; GstPluginFeature* function(GstRegistry* registry, const(char)* name, GType type) c_gst_registry_find_feature; GstPlugin* function(GstRegistry* registry, const(char)* name) c_gst_registry_find_plugin; GList* function(GstRegistry* registry, GType type) c_gst_registry_get_feature_list; GList* function(GstRegistry* registry, const(char)* name) c_gst_registry_get_feature_list_by_plugin; uint function(GstRegistry* registry) c_gst_registry_get_feature_list_cookie; GList* function(GstRegistry* registry) c_gst_registry_get_plugin_list; GstPlugin* function(GstRegistry* registry, const(char)* filename) c_gst_registry_lookup; GstPluginFeature* function(GstRegistry* registry, const(char)* name) c_gst_registry_lookup_feature; GList* function(GstRegistry* registry, GstPluginFilter filter, int first, void* userData) c_gst_registry_plugin_filter; void function(GstRegistry* registry, GstPluginFeature* feature) c_gst_registry_remove_feature; void function(GstRegistry* registry, GstPlugin* plugin) c_gst_registry_remove_plugin; int function(GstRegistry* registry, const(char)* path) c_gst_registry_scan_path; // gstreamer.Sample GType function() c_gst_sample_get_type; GstSample* function(GstBuffer* buffer, GstCaps* caps, GstSegment* segment, GstStructure* info) c_gst_sample_new; GstBuffer* function(GstSample* sample) c_gst_sample_get_buffer; GstBufferList* function(GstSample* sample) c_gst_sample_get_buffer_list; GstCaps* function(GstSample* sample) c_gst_sample_get_caps; GstStructure* function(GstSample* sample) c_gst_sample_get_info; GstSegment* function(GstSample* sample) c_gst_sample_get_segment; void function(GstSample* sample, GstBufferList* bufferList) c_gst_sample_set_buffer_list; // gstreamer.Segment GType function() c_gst_segment_get_type; GstSegment* function() c_gst_segment_new; int function(GstSegment* segment, GstFormat format, ulong start, ulong stop, ulong* clipStart, ulong* clipStop) c_gst_segment_clip; GstSegment* function(GstSegment* segment) c_gst_segment_copy; void function(GstSegment* src, GstSegment* dest) c_gst_segment_copy_into; int function(GstSegment* segment, double rate, GstFormat format, GstSeekFlags flags, GstSeekType startType, ulong start, GstSeekType stopType, ulong stop, int* update) c_gst_segment_do_seek; void function(GstSegment* segment) c_gst_segment_free; void function(GstSegment* segment, GstFormat format) c_gst_segment_init; int function(GstSegment* s0, GstSegment* s1) c_gst_segment_is_equal; int function(GstSegment* segment, GstFormat format, long offset) c_gst_segment_offset_running_time; ulong function(GstSegment* segment, GstFormat format, ulong runningTime) c_gst_segment_position_from_running_time; int function(GstSegment* segment, GstFormat format, ulong runningTime, ulong* position) c_gst_segment_position_from_running_time_full; ulong function(GstSegment* segment, GstFormat format, ulong streamTime) c_gst_segment_position_from_stream_time; int function(GstSegment* segment, GstFormat format, ulong streamTime, ulong* position) c_gst_segment_position_from_stream_time_full; int function(GstSegment* segment, GstFormat format, ulong runningTime) c_gst_segment_set_running_time; ulong function(GstSegment* segment, GstFormat format, ulong runningTime) c_gst_segment_to_position; ulong function(GstSegment* segment, GstFormat format, ulong position) c_gst_segment_to_running_time; int function(GstSegment* segment, GstFormat format, ulong position, ulong* runningTime) c_gst_segment_to_running_time_full; ulong function(GstSegment* segment, GstFormat format, ulong position) c_gst_segment_to_stream_time; int function(GstSegment* segment, GstFormat format, ulong position, ulong* streamTime) c_gst_segment_to_stream_time_full; // gstreamer.StaticCaps void function(GstStaticCaps* staticCaps) c_gst_static_caps_cleanup; GstCaps* function(GstStaticCaps* staticCaps) c_gst_static_caps_get; // gstreamer.StaticPadTemplate GstPadTemplate* function(GstStaticPadTemplate* padTemplate) c_gst_static_pad_template_get; GstCaps* function(GstStaticPadTemplate* templ) c_gst_static_pad_template_get_caps; // gstreamer.Stream GType function() c_gst_stream_get_type; GstStream* function(const(char)* streamId, GstCaps* caps, GstStreamType type, GstStreamFlags flags) c_gst_stream_new; GstCaps* function(GstStream* stream) c_gst_stream_get_caps; GstStreamFlags function(GstStream* stream) c_gst_stream_get_stream_flags; const(char)* function(GstStream* stream) c_gst_stream_get_stream_id; GstStreamType function(GstStream* stream) c_gst_stream_get_stream_type; GstTagList* function(GstStream* stream) c_gst_stream_get_tags; void function(GstStream* stream, GstCaps* caps) c_gst_stream_set_caps; void function(GstStream* stream, GstStreamFlags flags) c_gst_stream_set_stream_flags; void function(GstStream* stream, GstStreamType streamType) c_gst_stream_set_stream_type; void function(GstStream* stream, GstTagList* tags) c_gst_stream_set_tags; // gstreamer.StreamCollection GType function() c_gst_stream_collection_get_type; GstStreamCollection* function(const(char)* upstreamId) c_gst_stream_collection_new; int function(GstStreamCollection* collection, GstStream* stream) c_gst_stream_collection_add_stream; uint function(GstStreamCollection* collection) c_gst_stream_collection_get_size; GstStream* function(GstStreamCollection* collection, uint index) c_gst_stream_collection_get_stream; const(char)* function(GstStreamCollection* collection) c_gst_stream_collection_get_upstream_id; // gstreamer.Structure GType function() c_gst_structure_get_type; GstStructure* function(const(char)* name, const(char)* firstfield, ... ) c_gst_structure_new; GstStructure* function(const(char)* name) c_gst_structure_new_empty; GstStructure* function(const(char)* str) c_gst_structure_new_from_string; GstStructure* function(GQuark nameQuark, GQuark fieldQuark, ... ) c_gst_structure_new_id; GstStructure* function(GQuark quark) c_gst_structure_new_id_empty; GstStructure* function(const(char)* name, const(char)* firstfield, void* varargs) c_gst_structure_new_valist; int function(GstStructure* struct1, GstStructure* struct2) c_gst_structure_can_intersect; GstStructure* function(GstStructure* structure) c_gst_structure_copy; void function(GstStructure* structure, GstStructureFilterMapFunc func, void* userData) c_gst_structure_filter_and_map_in_place; void function(GstStructure* structure) c_gst_structure_fixate; int function(GstStructure* structure, const(char)* fieldName) c_gst_structure_fixate_field; int function(GstStructure* structure, const(char)* fieldName, int target) c_gst_structure_fixate_field_boolean; int function(GstStructure* structure, const(char)* fieldName, double target) c_gst_structure_fixate_field_nearest_double; int function(GstStructure* structure, const(char)* fieldName, int targetNumerator, int targetDenominator) c_gst_structure_fixate_field_nearest_fraction; int function(GstStructure* structure, const(char)* fieldName, int target) c_gst_structure_fixate_field_nearest_int; int function(GstStructure* structure, const(char)* fieldName, const(char)* target) c_gst_structure_fixate_field_string; int function(GstStructure* structure, GstStructureForeachFunc func, void* userData) c_gst_structure_foreach; void function(GstStructure* structure) c_gst_structure_free; int function(GstStructure* structure, const(char)* firstFieldname, ... ) c_gst_structure_get; int function(GstStructure* structure, const(char)* fieldname, GValueArray** array) c_gst_structure_get_array; int function(GstStructure* structure, const(char)* fieldname, int* value) c_gst_structure_get_boolean; int function(GstStructure* structure, const(char)* fieldname, GstClockTime* value) c_gst_structure_get_clock_time; int function(GstStructure* structure, const(char)* fieldname, GDate** value) c_gst_structure_get_date; int function(GstStructure* structure, const(char)* fieldname, GstDateTime** value) c_gst_structure_get_date_time; int function(GstStructure* structure, const(char)* fieldname, double* value) c_gst_structure_get_double; int function(GstStructure* structure, const(char)* fieldname, GType enumtype, int* value) c_gst_structure_get_enum; GType function(GstStructure* structure, const(char)* fieldname) c_gst_structure_get_field_type; int function(GstStructure* structure, const(char)* fieldname, uint* valueFlags, uint* valueMask) c_gst_structure_get_flagset; int function(GstStructure* structure, const(char)* fieldname, int* valueNumerator, int* valueDenominator) c_gst_structure_get_fraction; int function(GstStructure* structure, const(char)* fieldname, int* value) c_gst_structure_get_int; int function(GstStructure* structure, const(char)* fieldname, long* value) c_gst_structure_get_int64; int function(GstStructure* structure, const(char)* fieldname, GValueArray** array) c_gst_structure_get_list; const(char)* function(GstStructure* structure) c_gst_structure_get_name; GQuark function(GstStructure* structure) c_gst_structure_get_name_id; const(char)* function(GstStructure* structure, const(char)* fieldname) c_gst_structure_get_string; int function(GstStructure* structure, const(char)* fieldname, uint* value) c_gst_structure_get_uint; int function(GstStructure* structure, const(char)* fieldname, ulong* value) c_gst_structure_get_uint64; int function(GstStructure* structure, const(char)* firstFieldname, void* args) c_gst_structure_get_valist; GValue* function(GstStructure* structure, const(char)* fieldname) c_gst_structure_get_value; int function(GstStructure* structure, const(char)* fieldname) c_gst_structure_has_field; int function(GstStructure* structure, const(char)* fieldname, GType type) c_gst_structure_has_field_typed; int function(GstStructure* structure, const(char)* name) c_gst_structure_has_name; int function(GstStructure* structure, GQuark firstFieldId, ... ) c_gst_structure_id_get; int function(GstStructure* structure, GQuark firstFieldId, void* args) c_gst_structure_id_get_valist; GValue* function(GstStructure* structure, GQuark field) c_gst_structure_id_get_value; int function(GstStructure* structure, GQuark field) c_gst_structure_id_has_field; int function(GstStructure* structure, GQuark field, GType type) c_gst_structure_id_has_field_typed; void function(GstStructure* structure, GQuark fieldname, ... ) c_gst_structure_id_set; void function(GstStructure* structure, GQuark fieldname, void* varargs) c_gst_structure_id_set_valist; void function(GstStructure* structure, GQuark field, GValue* value) c_gst_structure_id_set_value; void function(GstStructure* structure, GQuark field, GValue* value) c_gst_structure_id_take_value; GstStructure* function(GstStructure* struct1, GstStructure* struct2) c_gst_structure_intersect; int function(GstStructure* structure1, GstStructure* structure2) c_gst_structure_is_equal; int function(GstStructure* subset, GstStructure* superset) c_gst_structure_is_subset; int function(GstStructure* structure, GstStructureMapFunc func, void* userData) c_gst_structure_map_in_place; int function(GstStructure* structure) c_gst_structure_n_fields; const(char)* function(GstStructure* structure, uint index) c_gst_structure_nth_field_name; void function(GstStructure* structure) c_gst_structure_remove_all_fields; void function(GstStructure* structure, const(char)* fieldname) c_gst_structure_remove_field; void function(GstStructure* structure, const(char)* fieldname, ... ) c_gst_structure_remove_fields; void function(GstStructure* structure, const(char)* fieldname, void* varargs) c_gst_structure_remove_fields_valist; void function(GstStructure* structure, const(char)* fieldname, ... ) c_gst_structure_set; void function(GstStructure* structure, const(char)* fieldname, GValueArray* array) c_gst_structure_set_array; void function(GstStructure* structure, const(char)* fieldname, GValueArray* array) c_gst_structure_set_list; void function(GstStructure* structure, const(char)* name) c_gst_structure_set_name; int function(GstStructure* structure, int* refcount) c_gst_structure_set_parent_refcount; void function(GstStructure* structure, const(char)* fieldname, void* varargs) c_gst_structure_set_valist; void function(GstStructure* structure, const(char)* fieldname, GValue* value) c_gst_structure_set_value; void function(GstStructure* structure, const(char)* fieldname, GValue* value) c_gst_structure_take_value; char* function(GstStructure* structure) c_gst_structure_to_string; GstStructure* function(const(char)* str, char** end) c_gst_structure_from_string; // gstreamer.SystemClock GType function() c_gst_system_clock_get_type; GstClock* function() c_gst_system_clock_obtain; void function(GstClock* newClock) c_gst_system_clock_set_default; // gstreamer.TagList GType function(const(char)* tag) c_gst_tag_get_type; GstTagList* function(const(char)* tag, ... ) c_gst_tag_list_new; GstTagList* function() c_gst_tag_list_new_empty; GstTagList* function(const(char)* str) c_gst_tag_list_new_from_string; GstTagList* function(void* varArgs) c_gst_tag_list_new_valist; void function(GstTagList* list, GstTagMergeMode mode, const(char)* tag, ... ) c_gst_tag_list_add; void function(GstTagList* list, GstTagMergeMode mode, const(char)* tag, void* varArgs) c_gst_tag_list_add_valist; void function(GstTagList* list, GstTagMergeMode mode, const(char)* tag, void* varArgs) c_gst_tag_list_add_valist_values; void function(GstTagList* list, GstTagMergeMode mode, const(char)* tag, GValue* value) c_gst_tag_list_add_value; void function(GstTagList* list, GstTagMergeMode mode, const(char)* tag, ... ) c_gst_tag_list_add_values; void function(GstTagList* list, GstTagForeachFunc func, void* userData) c_gst_tag_list_foreach; int function(GstTagList* list, const(char)* tag, int* value) c_gst_tag_list_get_boolean; int function(GstTagList* list, const(char)* tag, uint index, int* value) c_gst_tag_list_get_boolean_index; int function(GstTagList* list, const(char)* tag, GDate** value) c_gst_tag_list_get_date; int function(GstTagList* list, const(char)* tag, uint index, GDate** value) c_gst_tag_list_get_date_index; int function(GstTagList* list, const(char)* tag, GstDateTime** value) c_gst_tag_list_get_date_time; int function(GstTagList* list, const(char)* tag, uint index, GstDateTime** value) c_gst_tag_list_get_date_time_index; int function(GstTagList* list, const(char)* tag, double* value) c_gst_tag_list_get_double; int function(GstTagList* list, const(char)* tag, uint index, double* value) c_gst_tag_list_get_double_index; int function(GstTagList* list, const(char)* tag, float* value) c_gst_tag_list_get_float; int function(GstTagList* list, const(char)* tag, uint index, float* value) c_gst_tag_list_get_float_index; int function(GstTagList* list, const(char)* tag, int* value) c_gst_tag_list_get_int; int function(GstTagList* list, const(char)* tag, long* value) c_gst_tag_list_get_int64; int function(GstTagList* list, const(char)* tag, uint index, long* value) c_gst_tag_list_get_int64_index; int function(GstTagList* list, const(char)* tag, uint index, int* value) c_gst_tag_list_get_int_index; int function(GstTagList* list, const(char)* tag, void** value) c_gst_tag_list_get_pointer; int function(GstTagList* list, const(char)* tag, uint index, void** value) c_gst_tag_list_get_pointer_index; int function(GstTagList* list, const(char)* tag, GstSample** sample) c_gst_tag_list_get_sample; int function(GstTagList* list, const(char)* tag, uint index, GstSample** sample) c_gst_tag_list_get_sample_index; GstTagScope function(GstTagList* list) c_gst_tag_list_get_scope; int function(GstTagList* list, const(char)* tag, char** value) c_gst_tag_list_get_string; int function(GstTagList* list, const(char)* tag, uint index, char** value) c_gst_tag_list_get_string_index; uint function(GstTagList* list, const(char)* tag) c_gst_tag_list_get_tag_size; int function(GstTagList* list, const(char)* tag, uint* value) c_gst_tag_list_get_uint; int function(GstTagList* list, const(char)* tag, ulong* value) c_gst_tag_list_get_uint64; int function(GstTagList* list, const(char)* tag, uint index, ulong* value) c_gst_tag_list_get_uint64_index; int function(GstTagList* list, const(char)* tag, uint index, uint* value) c_gst_tag_list_get_uint_index; GValue* function(GstTagList* list, const(char)* tag, uint index) c_gst_tag_list_get_value_index; void function(GstTagList* into, GstTagList* from, GstTagMergeMode mode) c_gst_tag_list_insert; int function(GstTagList* list) c_gst_tag_list_is_empty; int function(GstTagList* list1, GstTagList* list2) c_gst_tag_list_is_equal; GstTagList* function(GstTagList* list1, GstTagList* list2, GstTagMergeMode mode) c_gst_tag_list_merge; int function(GstTagList* list) c_gst_tag_list_n_tags; const(char)* function(GstTagList* list, uint index) c_gst_tag_list_nth_tag_name; int function(GstTagList* list, const(char)* tag, uint index, char** value) c_gst_tag_list_peek_string_index; void function(GstTagList* list, const(char)* tag) c_gst_tag_list_remove_tag; void function(GstTagList* list, GstTagScope scop) c_gst_tag_list_set_scope; char* function(GstTagList* list) c_gst_tag_list_to_string; int function(GValue* dest, GstTagList* list, const(char)* tag) c_gst_tag_list_copy_value; int function(const(char)* tag) c_gst_tag_exists; const(char)* function(const(char)* tag) c_gst_tag_get_description; GstTagFlag function(const(char)* tag) c_gst_tag_get_flag; const(char)* function(const(char)* tag) c_gst_tag_get_nick; int function(const(char)* tag) c_gst_tag_is_fixed; void function(GValue* dest, GValue* src) c_gst_tag_merge_strings_with_comma; void function(GValue* dest, GValue* src) c_gst_tag_merge_use_first; void function(const(char)* name, GstTagFlag flag, GType type, const(char)* nick, const(char)* blurb, GstTagMergeFunc func) c_gst_tag_register; void function(const(char)* name, GstTagFlag flag, GType type, const(char)* nick, const(char)* blurb, GstTagMergeFunc func) c_gst_tag_register_static; // gstreamer.TagSetter GType function() c_gst_tag_setter_get_type; void function(GstTagSetter* setter, GstTagMergeMode mode, const(char)* tag, void* varArgs) c_gst_tag_setter_add_tag_valist; void function(GstTagSetter* setter, GstTagMergeMode mode, const(char)* tag, void* varArgs) c_gst_tag_setter_add_tag_valist_values; void function(GstTagSetter* setter, GstTagMergeMode mode, const(char)* tag, GValue* value) c_gst_tag_setter_add_tag_value; void function(GstTagSetter* setter, GstTagMergeMode mode, const(char)* tag, ... ) c_gst_tag_setter_add_tag_values; void function(GstTagSetter* setter, GstTagMergeMode mode, const(char)* tag, ... ) c_gst_tag_setter_add_tags; GstTagList* function(GstTagSetter* setter) c_gst_tag_setter_get_tag_list; GstTagMergeMode function(GstTagSetter* setter) c_gst_tag_setter_get_tag_merge_mode; void function(GstTagSetter* setter, GstTagList* list, GstTagMergeMode mode) c_gst_tag_setter_merge_tags; void function(GstTagSetter* setter) c_gst_tag_setter_reset_tags; void function(GstTagSetter* setter, GstTagMergeMode mode) c_gst_tag_setter_set_tag_merge_mode; // gstreamer.Task GType function() c_gst_task_get_type; GstTask* function(GstTaskFunction func, void* userData, GDestroyNotify notify) c_gst_task_new; void function() c_gst_task_cleanup_all; GstTaskPool* function(GstTask* task) c_gst_task_get_pool; GstTaskState function(GstTask* task) c_gst_task_get_state; int function(GstTask* task) c_gst_task_join; int function(GstTask* task) c_gst_task_pause; void function(GstTask* task, GstTaskThreadFunc enterFunc, void* userData, GDestroyNotify notify) c_gst_task_set_enter_callback; void function(GstTask* task, GstTaskThreadFunc leaveFunc, void* userData, GDestroyNotify notify) c_gst_task_set_leave_callback; void function(GstTask* task, GRecMutex* mutex) c_gst_task_set_lock; void function(GstTask* task, GstTaskPool* pool) c_gst_task_set_pool; int function(GstTask* task, GstTaskState state) c_gst_task_set_state; int function(GstTask* task) c_gst_task_start; int function(GstTask* task) c_gst_task_stop; // gstreamer.TaskPool GType function() c_gst_task_pool_get_type; GstTaskPool* function() c_gst_task_pool_new; void function(GstTaskPool* pool) c_gst_task_pool_cleanup; void function(GstTaskPool* pool, void* id) c_gst_task_pool_join; void function(GstTaskPool* pool, GError** err) c_gst_task_pool_prepare; void* function(GstTaskPool* pool, GstTaskPoolFunction func, void* userData, GError** err) c_gst_task_pool_push; // gstreamer.Toc GType function() c_gst_toc_get_type; GstToc* function(GstTocScope scop) c_gst_toc_new; void function(GstToc* toc, GstTocEntry* entry) c_gst_toc_append_entry; void function(GstToc* toc) c_gst_toc_dump; GstTocEntry* function(GstToc* toc, const(char)* uid) c_gst_toc_find_entry; GList* function(GstToc* toc) c_gst_toc_get_entries; GstTocScope function(GstToc* toc) c_gst_toc_get_scope; GstTagList* function(GstToc* toc) c_gst_toc_get_tags; void function(GstToc* toc, GstTagList* tags, GstTagMergeMode mode) c_gst_toc_merge_tags; void function(GstToc* toc, GstTagList* tags) c_gst_toc_set_tags; // gstreamer.TocEntry GType function() c_gst_toc_entry_get_type; GstTocEntry* function(GstTocEntryType type, const(char)* uid) c_gst_toc_entry_new; void function(GstTocEntry* entry, GstTocEntry* subentry) c_gst_toc_entry_append_sub_entry; GstTocEntryType function(GstTocEntry* entry) c_gst_toc_entry_get_entry_type; int function(GstTocEntry* entry, GstTocLoopType* loopType, int* repeatCount) c_gst_toc_entry_get_loop; GstTocEntry* function(GstTocEntry* entry) c_gst_toc_entry_get_parent; int function(GstTocEntry* entry, long* start, long* stop) c_gst_toc_entry_get_start_stop_times; GList* function(GstTocEntry* entry) c_gst_toc_entry_get_sub_entries; GstTagList* function(GstTocEntry* entry) c_gst_toc_entry_get_tags; GstToc* function(GstTocEntry* entry) c_gst_toc_entry_get_toc; const(char)* function(GstTocEntry* entry) c_gst_toc_entry_get_uid; int function(GstTocEntry* entry) c_gst_toc_entry_is_alternative; int function(GstTocEntry* entry) c_gst_toc_entry_is_sequence; void function(GstTocEntry* entry, GstTagList* tags, GstTagMergeMode mode) c_gst_toc_entry_merge_tags; void function(GstTocEntry* entry, GstTocLoopType loopType, int repeatCount) c_gst_toc_entry_set_loop; void function(GstTocEntry* entry, long start, long stop) c_gst_toc_entry_set_start_stop_times; void function(GstTocEntry* entry, GstTagList* tags) c_gst_toc_entry_set_tags; // gstreamer.TocSetter GType function() c_gst_toc_setter_get_type; GstToc* function(GstTocSetter* setter) c_gst_toc_setter_get_toc; void function(GstTocSetter* setter) c_gst_toc_setter_reset; void function(GstTocSetter* setter, GstToc* toc) c_gst_toc_setter_set_toc; // gstreamer.Tracer GType function() c_gst_tracer_get_type; // gstreamer.TracerFactory GType function() c_gst_tracer_factory_get_type; GList* function() c_gst_tracer_factory_get_list; // gstreamer.TracerRecord GType function() c_gst_tracer_record_get_type; // gstreamer.TypeFind ulong function(GstTypeFind* find) c_gst_type_find_get_length; ubyte* function(GstTypeFind* find, long offset, uint size) c_gst_type_find_peek; void function(GstTypeFind* find, uint probability, GstCaps* caps) c_gst_type_find_suggest; void function(GstTypeFind* find, uint probability, const(char)* mediaType, const(char)* fieldname, ... ) c_gst_type_find_suggest_simple; int function(GstPlugin* plugin, const(char)* name, uint rank, GstTypeFindFunction func, const(char)* extensions, GstCaps* possibleCaps, void* data, GDestroyNotify dataNotify) c_gst_type_find_register; GType function() c_gst_type_find_get_type; // gstreamer.TypeFindFactory GType function() c_gst_type_find_factory_get_type; GList* function() c_gst_type_find_factory_get_list; void function(GstTypeFindFactory* factory, GstTypeFind* find) c_gst_type_find_factory_call_function; GstCaps* function(GstTypeFindFactory* factory) c_gst_type_find_factory_get_caps; char** function(GstTypeFindFactory* factory) c_gst_type_find_factory_get_extensions; int function(GstTypeFindFactory* factory) c_gst_type_find_factory_has_function; // gstreamer.URIHandler GType function() c_gst_uri_handler_get_type; char** function(GstURIHandler* handler) c_gst_uri_handler_get_protocols; char* function(GstURIHandler* handler) c_gst_uri_handler_get_uri; GstURIType function(GstURIHandler* handler) c_gst_uri_handler_get_uri_type; int function(GstURIHandler* handler, const(char)* uri, GError** err) c_gst_uri_handler_set_uri; // gstreamer.Uri GType function() c_gst_uri_get_type; GstUri* function(const(char)* scheme, const(char)* userinfo, const(char)* host, uint port, const(char)* path, const(char)* query, const(char)* fragment) c_gst_uri_new; int function(GstUri* uri, const(char)* relativePath) c_gst_uri_append_path; int function(GstUri* uri, const(char)* pathSegment) c_gst_uri_append_path_segment; int function(GstUri* first, GstUri* second) c_gst_uri_equal; GstUri* function(GstUri* base, const(char)* uri) c_gst_uri_from_string_with_base; const(char)* function(GstUri* uri) c_gst_uri_get_fragment; const(char)* function(GstUri* uri) c_gst_uri_get_host; GHashTable* function(GstUri* uri) c_gst_uri_get_media_fragment_table; char* function(GstUri* uri) c_gst_uri_get_path; GList* function(GstUri* uri) c_gst_uri_get_path_segments; char* function(GstUri* uri) c_gst_uri_get_path_string; uint function(GstUri* uri) c_gst_uri_get_port; GList* function(GstUri* uri) c_gst_uri_get_query_keys; char* function(GstUri* uri) c_gst_uri_get_query_string; GHashTable* function(GstUri* uri) c_gst_uri_get_query_table; const(char)* function(GstUri* uri, const(char)* queryKey) c_gst_uri_get_query_value; const(char)* function(GstUri* uri) c_gst_uri_get_scheme; const(char)* function(GstUri* uri) c_gst_uri_get_userinfo; int function(GstUri* uri) c_gst_uri_is_normalized; int function(GstUri* uri) c_gst_uri_is_writable; GstUri* function(GstUri* baseUri, GstUri* refUri) c_gst_uri_join; GstUri* function(GstUri* uri) c_gst_uri_make_writable; GstUri* function(GstUri* base, const(char)* scheme, const(char)* userinfo, const(char)* host, uint port, const(char)* path, const(char)* query, const(char)* fragment) c_gst_uri_new_with_base; int function(GstUri* uri) c_gst_uri_normalize; int function(GstUri* uri, const(char)* queryKey) c_gst_uri_query_has_key; int function(GstUri* uri, const(char)* queryKey) c_gst_uri_remove_query_key; int function(GstUri* uri, const(char)* fragment) c_gst_uri_set_fragment; int function(GstUri* uri, const(char)* host) c_gst_uri_set_host; int function(GstUri* uri, const(char)* path) c_gst_uri_set_path; int function(GstUri* uri, GList* pathSegments) c_gst_uri_set_path_segments; int function(GstUri* uri, const(char)* path) c_gst_uri_set_path_string; int function(GstUri* uri, uint port) c_gst_uri_set_port; int function(GstUri* uri, const(char)* query) c_gst_uri_set_query_string; int function(GstUri* uri, GHashTable* queryTable) c_gst_uri_set_query_table; int function(GstUri* uri, const(char)* queryKey, const(char)* queryValue) c_gst_uri_set_query_value; int function(GstUri* uri, const(char)* scheme) c_gst_uri_set_scheme; int function(GstUri* uri, const(char)* userinfo) c_gst_uri_set_userinfo; char* function(GstUri* uri) c_gst_uri_to_string; char* function(const(char)* protocol, const(char)* location) c_gst_uri_construct; GstUri* function(const(char)* uri) c_gst_uri_from_string; char* function(const(char)* uri) c_gst_uri_get_location; char* function(const(char)* uri) c_gst_uri_get_protocol; int function(const(char)* uri, const(char)* protocol) c_gst_uri_has_protocol; int function(const(char)* uri) c_gst_uri_is_valid; char* function(const(char)* baseUri, const(char)* refUri) c_gst_uri_join_strings; int function(GstURIType type, const(char)* protocol) c_gst_uri_protocol_is_supported; int function(const(char)* protocol) c_gst_uri_protocol_is_valid; char* function(const(char)* filename, GError** err) c_gst_filename_to_uri; GQuark function() c_gst_uri_error_quark; // gstreamer.ValueArray GType function() c_gst_value_array_get_type; void function(GValue* value, GValue* appendValue) c_gst_value_array_append_and_take_value; void function(GValue* value, GValue* appendValue) c_gst_value_array_append_value; uint function(GValue* value) c_gst_value_array_get_size; GValue* function(GValue* value, uint index) c_gst_value_array_get_value; void function(GValue* value, GValue* prependValue) c_gst_value_array_prepend_value; // gstreamer.ValueList GType function() c_gst_value_list_get_type; void function(GValue* value, GValue* appendValue) c_gst_value_list_append_and_take_value; void function(GValue* value, GValue* appendValue) c_gst_value_list_append_value; void function(GValue* dest, GValue* value1, GValue* value2) c_gst_value_list_concat; uint function(GValue* value) c_gst_value_list_get_size; GValue* function(GValue* value, uint index) c_gst_value_list_get_value; void function(GValue* dest, GValue* value1, GValue* value2) c_gst_value_list_merge; void function(GValue* value, GValue* prependValue) c_gst_value_list_prepend_value; // gstreamer.Debug void function(GstLogFunction func, void* userData, GDestroyNotify notify) c_gst_debug_add_log_function; char* function(GstBin* bin, GstDebugGraphDetails details) c_gst_debug_bin_to_dot_data; void function(GstBin* bin, GstDebugGraphDetails details, const(char)* fileName) c_gst_debug_bin_to_dot_file; void function(GstBin* bin, GstDebugGraphDetails details, const(char)* fileName) c_gst_debug_bin_to_dot_file_with_ts; char* function(uint colorinfo) c_gst_debug_construct_term_color; int function(uint colorinfo) c_gst_debug_construct_win_color; GSList* function() c_gst_debug_get_all_categories; GstDebugColorMode function() c_gst_debug_get_color_mode; GstDebugLevel function() c_gst_debug_get_default_threshold; int function() c_gst_debug_is_active; int function() c_gst_debug_is_colored; const(char)* function(GstDebugLevel level) c_gst_debug_level_get_name; void function(GstDebugCategory* category, GstDebugLevel level, const(char)* file, const(char)* funct, int line, GObject* object, const(char)* format, ... ) c_gst_debug_log; void function(GstDebugCategory* category, GstDebugLevel level, const(char)* file, const(char)* funct, int line, GObject* object, GstDebugMessage* message, void* userData) c_gst_debug_log_default; void function(GstDebugCategory* category, GstDebugLevel level, const(char)* file, const(char)* funct, int line, GObject* object, const(char)* format, void* args) c_gst_debug_log_valist; void function() c_gst_debug_print_stack_trace; uint function(GstLogFunction func) c_gst_debug_remove_log_function; uint function(void* data) c_gst_debug_remove_log_function_by_data; void function(int active) c_gst_debug_set_active; void function(GstDebugColorMode mode) c_gst_debug_set_color_mode; void function(const(char)* mode) c_gst_debug_set_color_mode_from_string; void function(int colored) c_gst_debug_set_colored; void function(GstDebugLevel level) c_gst_debug_set_default_threshold; void function(const(char)* name, GstDebugLevel level) c_gst_debug_set_threshold_for_name; void function(const(char)* list, int reset) c_gst_debug_set_threshold_from_string; void function(const(char)* name) c_gst_debug_unset_threshold_for_name; // gstreamer.GError char* function(GQuark domain, int code) c_gst_error_get_message; // gstreamer.Format GstFormat function(const(char)* nick) c_gst_format_get_by_nick; GstFormatDefinition* function(GstFormat format) c_gst_format_get_details; const(char)* function(GstFormat format) c_gst_format_get_name; GstIterator* function() c_gst_format_iterate_definitions; GstFormat function(const(char)* nick, const(char)* description) c_gst_format_register; GQuark function(GstFormat format) c_gst_format_to_quark; int function(GstFormat* formats, GstFormat format) c_gst_formats_contains; // gstreamer.GStreamer void function() c_gst_deinit; void function(int* argc, char*** argv) c_gst_init; int function(int* argc, char*** argv, GError** err) c_gst_init_check; GOptionGroup* function() c_gst_init_get_option_group; int function() c_gst_is_initialized; int function() c_gst_segtrap_is_enabled; void function(int enabled) c_gst_segtrap_set_enabled; int function() c_gst_update_registry; void function(uint* major, uint* minor, uint* micro, uint* nano) c_gst_version; char* function() c_gst_version_string; // gstreamer.Parse GstElement* function(const(char)* binDescription, int ghostUnlinkedPads, GError** err) c_gst_parse_bin_from_description; GstElement* function(const(char)* binDescription, int ghostUnlinkedPads, GstParseContext* context, GstParseFlags flags, GError** err) c_gst_parse_bin_from_description_full; GQuark function() c_gst_parse_error_quark; GstElement* function(const(char)* pipelineDescription, GError** err) c_gst_parse_launch; GstElement* function(const(char)* pipelineDescription, GstParseContext* context, GstParseFlags flags, GError** err) c_gst_parse_launch_full; GstElement* function(char** argv, GError** err) c_gst_parse_launchv; GstElement* function(char** argv, GstParseContext* context, GstParseFlags flags, GError** err) c_gst_parse_launchv_full; // gstreamer.Utils void* function(void* array, uint numElements, size_t elementSize, GCompareDataFunc searchFunc, GstSearchMode mode, void* searchData, void* userData) c_gst_util_array_binary_search; void function(double src, int* destN, int* destD) c_gst_util_double_to_fraction; void function(char* mem, uint size) c_gst_util_dump_mem; int function(int aN, int aD, int bN, int bD, int* resN, int* resD) c_gst_util_fraction_add; int function(int aN, int aD, int bN, int bD) c_gst_util_fraction_compare; int function(int aN, int aD, int bN, int bD, int* resN, int* resD) c_gst_util_fraction_multiply; void function(int srcN, int srcD, double* dest) c_gst_util_fraction_to_double; ulong function(double value) c_gst_util_gdouble_to_guint64; GstClockTime function() c_gst_util_get_timestamp; int function(int a, int b) c_gst_util_greatest_common_divisor; long function(long a, long b) c_gst_util_greatest_common_divisor_int64; uint function() c_gst_util_group_id_next; double function(ulong value) c_gst_util_guint64_to_gdouble; int function(uint s1, uint s2) c_gst_util_seqnum_compare; uint function() c_gst_util_seqnum_next; void function(GObject* object, const(char)* name, const(char)* value) c_gst_util_set_object_arg; void function(GValue* value, const(char)* valueStr) c_gst_util_set_value_from_string; ulong function(ulong val, ulong num, ulong denom) c_gst_util_uint64_scale; ulong function(ulong val, ulong num, ulong denom) c_gst_util_uint64_scale_ceil; ulong function(ulong val, int num, int denom) c_gst_util_uint64_scale_int; ulong function(ulong val, int num, int denom) c_gst_util_uint64_scale_int_ceil; ulong function(ulong val, int num, int denom) c_gst_util_uint64_scale_int_round; ulong function(ulong val, ulong num, ulong denom) c_gst_util_uint64_scale_round; int function(GstClockTime* xy, GstClockTime* temp, uint n, GstClockTime* mNum, GstClockTime* mDenom, GstClockTime* b, GstClockTime* xbase, double* rSquared) c_gst_calculate_linear_regression; int function(GstPlugin* plugin, GType type) c_gst_dynamic_type_register; int function(GObject* object, const(char)* name, GValueArray** array) c_gst_util_get_object_array; int function(GObject* object, const(char)* name, GValueArray* array) c_gst_util_set_object_array; // gstreamer.ValueGst int function(GValue* value1, GValue* value2) c_gst_value_can_compare; int function(GValue* value1, GValue* value2) c_gst_value_can_intersect; int function(GValue* minuend, GValue* subtrahend) c_gst_value_can_subtract; int function(GValue* value1, GValue* value2) c_gst_value_can_union; int function(GValue* value1, GValue* value2) c_gst_value_compare; int function(GValue* dest, const(char)* src) c_gst_value_deserialize; int function(GValue* dest, GValue* src) c_gst_value_fixate; int function(GValue* product, GValue* factor1, GValue* factor2) c_gst_value_fraction_multiply; int function(GValue* dest, GValue* minuend, GValue* subtrahend) c_gst_value_fraction_subtract; ulong function(GValue* value) c_gst_value_get_bitmask; GstCaps* function(GValue* value) c_gst_value_get_caps; GstCapsFeatures* function(GValue* value) c_gst_value_get_caps_features; double function(GValue* value) c_gst_value_get_double_range_max; double function(GValue* value) c_gst_value_get_double_range_min; uint function(GValue* value) c_gst_value_get_flagset_flags; uint function(GValue* value) c_gst_value_get_flagset_mask; void function(GValue* value, uint flags, uint mask) c_gst_value_set_flagset; int function(GValue* value) c_gst_value_get_fraction_denominator; int function(GValue* value) c_gst_value_get_fraction_numerator; GValue* function(GValue* value) c_gst_value_get_fraction_range_max; GValue* function(GValue* value) c_gst_value_get_fraction_range_min; long function(GValue* value) c_gst_value_get_int64_range_max; long function(GValue* value) c_gst_value_get_int64_range_min; long function(GValue* value) c_gst_value_get_int64_range_step; int function(GValue* value) c_gst_value_get_int_range_max; int function(GValue* value) c_gst_value_get_int_range_min; int function(GValue* value) c_gst_value_get_int_range_step; GstStructure* function(GValue* value) c_gst_value_get_structure; void function(GValue* dest, GValue* src) c_gst_value_init_and_copy; int function(GValue* dest, GValue* value1, GValue* value2) c_gst_value_intersect; int function(GValue* value) c_gst_value_is_fixed; int function(GValue* value1, GValue* value2) c_gst_value_is_subset; void function(GstValueTable* table) c_gst_value_register; char* function(GValue* value) c_gst_value_serialize; void function(GValue* value, ulong bitmask) c_gst_value_set_bitmask; void function(GValue* value, GstCaps* caps) c_gst_value_set_caps; void function(GValue* value, GstCapsFeatures* features) c_gst_value_set_caps_features; void function(GValue* value, double start, double end) c_gst_value_set_double_range; void function(GValue* value, int numerator, int denominator) c_gst_value_set_fraction; void function(GValue* value, GValue* start, GValue* end) c_gst_value_set_fraction_range; void function(GValue* value, int numeratorStart, int denominatorStart, int numeratorEnd, int denominatorEnd) c_gst_value_set_fraction_range_full; void function(GValue* value, long start, long end) c_gst_value_set_int64_range; void function(GValue* value, long start, long end, long step) c_gst_value_set_int64_range_step; void function(GValue* value, int start, int end) c_gst_value_set_int_range; void function(GValue* value, int start, int end, int step) c_gst_value_set_int_range_step; void function(GValue* value, GstStructure* structure) c_gst_value_set_structure; int function(GValue* dest, GValue* minuend, GValue* subtrahend) c_gst_value_subtract; int function(GValue* dest, GValue* value1, GValue* value2) c_gst_value_union; } // gstreamer.AllocationParams alias c_gst_allocation_params_get_type gst_allocation_params_get_type; alias c_gst_allocation_params_copy gst_allocation_params_copy; alias c_gst_allocation_params_free gst_allocation_params_free; alias c_gst_allocation_params_init gst_allocation_params_init; // gstreamer.Allocator alias c_gst_allocator_get_type gst_allocator_get_type; alias c_gst_allocator_find gst_allocator_find; alias c_gst_allocator_register gst_allocator_register; alias c_gst_allocator_alloc gst_allocator_alloc; alias c_gst_allocator_free gst_allocator_free; alias c_gst_allocator_set_default gst_allocator_set_default; // gstreamer.AtomicQueue alias c_gst_atomic_queue_get_type gst_atomic_queue_get_type; alias c_gst_atomic_queue_new gst_atomic_queue_new; alias c_gst_atomic_queue_length gst_atomic_queue_length; alias c_gst_atomic_queue_peek gst_atomic_queue_peek; alias c_gst_atomic_queue_pop gst_atomic_queue_pop; alias c_gst_atomic_queue_push gst_atomic_queue_push; alias c_gst_atomic_queue_ref gst_atomic_queue_ref; alias c_gst_atomic_queue_unref gst_atomic_queue_unref; // gstreamer.Bin alias c_gst_bin_get_type gst_bin_get_type; alias c_gst_bin_new gst_bin_new; alias c_gst_bin_add gst_bin_add; alias c_gst_bin_add_many gst_bin_add_many; alias c_gst_bin_find_unlinked_pad gst_bin_find_unlinked_pad; alias c_gst_bin_get_by_interface gst_bin_get_by_interface; alias c_gst_bin_get_by_name gst_bin_get_by_name; alias c_gst_bin_get_by_name_recurse_up gst_bin_get_by_name_recurse_up; alias c_gst_bin_get_suppressed_flags gst_bin_get_suppressed_flags; alias c_gst_bin_iterate_all_by_interface gst_bin_iterate_all_by_interface; alias c_gst_bin_iterate_elements gst_bin_iterate_elements; alias c_gst_bin_iterate_recurse gst_bin_iterate_recurse; alias c_gst_bin_iterate_sinks gst_bin_iterate_sinks; alias c_gst_bin_iterate_sorted gst_bin_iterate_sorted; alias c_gst_bin_iterate_sources gst_bin_iterate_sources; alias c_gst_bin_recalculate_latency gst_bin_recalculate_latency; alias c_gst_bin_remove gst_bin_remove; alias c_gst_bin_remove_many gst_bin_remove_many; alias c_gst_bin_set_suppressed_flags gst_bin_set_suppressed_flags; alias c_gst_bin_sync_children_states gst_bin_sync_children_states; // gstreamer.Bitmask alias c_gst_bitmask_get_type gst_bitmask_get_type; // gstreamer.Buffer alias c_gst_buffer_get_type gst_buffer_get_type; alias c_gst_buffer_new gst_buffer_new; alias c_gst_buffer_new_allocate gst_buffer_new_allocate; alias c_gst_buffer_new_wrapped gst_buffer_new_wrapped; alias c_gst_buffer_new_wrapped_full gst_buffer_new_wrapped_full; alias c_gst_buffer_add_meta gst_buffer_add_meta; alias c_gst_buffer_add_parent_buffer_meta gst_buffer_add_parent_buffer_meta; alias c_gst_buffer_add_protection_meta gst_buffer_add_protection_meta; alias c_gst_buffer_append gst_buffer_append; alias c_gst_buffer_append_memory gst_buffer_append_memory; alias c_gst_buffer_append_region gst_buffer_append_region; alias c_gst_buffer_copy_deep gst_buffer_copy_deep; alias c_gst_buffer_copy_into gst_buffer_copy_into; alias c_gst_buffer_copy_region gst_buffer_copy_region; alias c_gst_buffer_extract gst_buffer_extract; alias c_gst_buffer_extract_dup gst_buffer_extract_dup; alias c_gst_buffer_fill gst_buffer_fill; alias c_gst_buffer_find_memory gst_buffer_find_memory; alias c_gst_buffer_foreach_meta gst_buffer_foreach_meta; alias c_gst_buffer_get_all_memory gst_buffer_get_all_memory; alias c_gst_buffer_get_flags gst_buffer_get_flags; alias c_gst_buffer_get_memory gst_buffer_get_memory; alias c_gst_buffer_get_memory_range gst_buffer_get_memory_range; alias c_gst_buffer_get_meta gst_buffer_get_meta; alias c_gst_buffer_get_size gst_buffer_get_size; alias c_gst_buffer_get_sizes gst_buffer_get_sizes; alias c_gst_buffer_get_sizes_range gst_buffer_get_sizes_range; alias c_gst_buffer_has_flags gst_buffer_has_flags; alias c_gst_buffer_insert_memory gst_buffer_insert_memory; alias c_gst_buffer_is_all_memory_writable gst_buffer_is_all_memory_writable; alias c_gst_buffer_is_memory_range_writable gst_buffer_is_memory_range_writable; alias c_gst_buffer_iterate_meta gst_buffer_iterate_meta; alias c_gst_buffer_iterate_meta_filtered gst_buffer_iterate_meta_filtered; alias c_gst_buffer_map gst_buffer_map; alias c_gst_buffer_map_range gst_buffer_map_range; alias c_gst_buffer_memcmp gst_buffer_memcmp; alias c_gst_buffer_memset gst_buffer_memset; alias c_gst_buffer_n_memory gst_buffer_n_memory; alias c_gst_buffer_peek_memory gst_buffer_peek_memory; alias c_gst_buffer_prepend_memory gst_buffer_prepend_memory; alias c_gst_buffer_remove_all_memory gst_buffer_remove_all_memory; alias c_gst_buffer_remove_memory gst_buffer_remove_memory; alias c_gst_buffer_remove_memory_range gst_buffer_remove_memory_range; alias c_gst_buffer_remove_meta gst_buffer_remove_meta; alias c_gst_buffer_replace_all_memory gst_buffer_replace_all_memory; alias c_gst_buffer_replace_memory gst_buffer_replace_memory; alias c_gst_buffer_replace_memory_range gst_buffer_replace_memory_range; alias c_gst_buffer_resize gst_buffer_resize; alias c_gst_buffer_resize_range gst_buffer_resize_range; alias c_gst_buffer_set_flags gst_buffer_set_flags; alias c_gst_buffer_set_size gst_buffer_set_size; alias c_gst_buffer_unmap gst_buffer_unmap; alias c_gst_buffer_unset_flags gst_buffer_unset_flags; alias c_gst_buffer_get_max_memory gst_buffer_get_max_memory; // gstreamer.BufferList alias c_gst_buffer_list_get_type gst_buffer_list_get_type; alias c_gst_buffer_list_new gst_buffer_list_new; alias c_gst_buffer_list_new_sized gst_buffer_list_new_sized; alias c_gst_buffer_list_copy_deep gst_buffer_list_copy_deep; alias c_gst_buffer_list_foreach gst_buffer_list_foreach; alias c_gst_buffer_list_get gst_buffer_list_get; alias c_gst_buffer_list_insert gst_buffer_list_insert; alias c_gst_buffer_list_length gst_buffer_list_length; alias c_gst_buffer_list_remove gst_buffer_list_remove; // gstreamer.BufferPool alias c_gst_buffer_pool_get_type gst_buffer_pool_get_type; alias c_gst_buffer_pool_new gst_buffer_pool_new; alias c_gst_buffer_pool_config_add_option gst_buffer_pool_config_add_option; alias c_gst_buffer_pool_config_get_allocator gst_buffer_pool_config_get_allocator; alias c_gst_buffer_pool_config_get_option gst_buffer_pool_config_get_option; alias c_gst_buffer_pool_config_get_params gst_buffer_pool_config_get_params; alias c_gst_buffer_pool_config_has_option gst_buffer_pool_config_has_option; alias c_gst_buffer_pool_config_n_options gst_buffer_pool_config_n_options; alias c_gst_buffer_pool_config_set_allocator gst_buffer_pool_config_set_allocator; alias c_gst_buffer_pool_config_set_params gst_buffer_pool_config_set_params; alias c_gst_buffer_pool_config_validate_params gst_buffer_pool_config_validate_params; alias c_gst_buffer_pool_acquire_buffer gst_buffer_pool_acquire_buffer; alias c_gst_buffer_pool_get_config gst_buffer_pool_get_config; alias c_gst_buffer_pool_get_options gst_buffer_pool_get_options; alias c_gst_buffer_pool_has_option gst_buffer_pool_has_option; alias c_gst_buffer_pool_is_active gst_buffer_pool_is_active; alias c_gst_buffer_pool_release_buffer gst_buffer_pool_release_buffer; alias c_gst_buffer_pool_set_active gst_buffer_pool_set_active; alias c_gst_buffer_pool_set_config gst_buffer_pool_set_config; alias c_gst_buffer_pool_set_flushing gst_buffer_pool_set_flushing; // gstreamer.Bus alias c_gst_bus_get_type gst_bus_get_type; alias c_gst_bus_new gst_bus_new; alias c_gst_bus_add_signal_watch gst_bus_add_signal_watch; alias c_gst_bus_add_signal_watch_full gst_bus_add_signal_watch_full; alias c_gst_bus_add_watch gst_bus_add_watch; alias c_gst_bus_add_watch_full gst_bus_add_watch_full; alias c_gst_bus_async_signal_func gst_bus_async_signal_func; alias c_gst_bus_create_watch gst_bus_create_watch; alias c_gst_bus_disable_sync_message_emission gst_bus_disable_sync_message_emission; alias c_gst_bus_enable_sync_message_emission gst_bus_enable_sync_message_emission; alias c_gst_bus_have_pending gst_bus_have_pending; alias c_gst_bus_peek gst_bus_peek; alias c_gst_bus_poll gst_bus_poll; alias c_gst_bus_pop gst_bus_pop; alias c_gst_bus_pop_filtered gst_bus_pop_filtered; alias c_gst_bus_post gst_bus_post; alias c_gst_bus_remove_signal_watch gst_bus_remove_signal_watch; alias c_gst_bus_remove_watch gst_bus_remove_watch; alias c_gst_bus_set_flushing gst_bus_set_flushing; alias c_gst_bus_set_sync_handler gst_bus_set_sync_handler; alias c_gst_bus_sync_signal_handler gst_bus_sync_signal_handler; alias c_gst_bus_timed_pop gst_bus_timed_pop; alias c_gst_bus_timed_pop_filtered gst_bus_timed_pop_filtered; // gstreamer.Caps alias c_gst_caps_get_type gst_caps_get_type; alias c_gst_caps_new_any gst_caps_new_any; alias c_gst_caps_new_empty gst_caps_new_empty; alias c_gst_caps_new_empty_simple gst_caps_new_empty_simple; alias c_gst_caps_new_full gst_caps_new_full; alias c_gst_caps_new_full_valist gst_caps_new_full_valist; alias c_gst_caps_new_simple gst_caps_new_simple; alias c_gst_caps_append gst_caps_append; alias c_gst_caps_append_structure gst_caps_append_structure; alias c_gst_caps_append_structure_full gst_caps_append_structure_full; alias c_gst_caps_can_intersect gst_caps_can_intersect; alias c_gst_caps_copy_nth gst_caps_copy_nth; alias c_gst_caps_filter_and_map_in_place gst_caps_filter_and_map_in_place; alias c_gst_caps_fixate gst_caps_fixate; alias c_gst_caps_foreach gst_caps_foreach; alias c_gst_caps_get_features gst_caps_get_features; alias c_gst_caps_get_size gst_caps_get_size; alias c_gst_caps_get_structure gst_caps_get_structure; alias c_gst_caps_intersect gst_caps_intersect; alias c_gst_caps_intersect_full gst_caps_intersect_full; alias c_gst_caps_is_always_compatible gst_caps_is_always_compatible; alias c_gst_caps_is_any gst_caps_is_any; alias c_gst_caps_is_empty gst_caps_is_empty; alias c_gst_caps_is_equal gst_caps_is_equal; alias c_gst_caps_is_equal_fixed gst_caps_is_equal_fixed; alias c_gst_caps_is_fixed gst_caps_is_fixed; alias c_gst_caps_is_strictly_equal gst_caps_is_strictly_equal; alias c_gst_caps_is_subset gst_caps_is_subset; alias c_gst_caps_is_subset_structure gst_caps_is_subset_structure; alias c_gst_caps_is_subset_structure_full gst_caps_is_subset_structure_full; alias c_gst_caps_map_in_place gst_caps_map_in_place; alias c_gst_caps_merge gst_caps_merge; alias c_gst_caps_merge_structure gst_caps_merge_structure; alias c_gst_caps_merge_structure_full gst_caps_merge_structure_full; alias c_gst_caps_normalize gst_caps_normalize; alias c_gst_caps_remove_structure gst_caps_remove_structure; alias c_gst_caps_set_features gst_caps_set_features; alias c_gst_caps_set_simple gst_caps_set_simple; alias c_gst_caps_set_simple_valist gst_caps_set_simple_valist; alias c_gst_caps_set_value gst_caps_set_value; alias c_gst_caps_simplify gst_caps_simplify; alias c_gst_caps_steal_structure gst_caps_steal_structure; alias c_gst_caps_subtract gst_caps_subtract; alias c_gst_caps_to_string gst_caps_to_string; alias c_gst_caps_truncate gst_caps_truncate; alias c_gst_caps_from_string gst_caps_from_string; // gstreamer.CapsFeatures alias c_gst_caps_features_get_type gst_caps_features_get_type; alias c_gst_caps_features_new gst_caps_features_new; alias c_gst_caps_features_new_any gst_caps_features_new_any; alias c_gst_caps_features_new_empty gst_caps_features_new_empty; alias c_gst_caps_features_new_id gst_caps_features_new_id; alias c_gst_caps_features_new_id_valist gst_caps_features_new_id_valist; alias c_gst_caps_features_new_valist gst_caps_features_new_valist; alias c_gst_caps_features_add gst_caps_features_add; alias c_gst_caps_features_add_id gst_caps_features_add_id; alias c_gst_caps_features_contains gst_caps_features_contains; alias c_gst_caps_features_contains_id gst_caps_features_contains_id; alias c_gst_caps_features_copy gst_caps_features_copy; alias c_gst_caps_features_free gst_caps_features_free; alias c_gst_caps_features_get_nth gst_caps_features_get_nth; alias c_gst_caps_features_get_nth_id gst_caps_features_get_nth_id; alias c_gst_caps_features_get_size gst_caps_features_get_size; alias c_gst_caps_features_is_any gst_caps_features_is_any; alias c_gst_caps_features_is_equal gst_caps_features_is_equal; alias c_gst_caps_features_remove gst_caps_features_remove; alias c_gst_caps_features_remove_id gst_caps_features_remove_id; alias c_gst_caps_features_set_parent_refcount gst_caps_features_set_parent_refcount; alias c_gst_caps_features_to_string gst_caps_features_to_string; alias c_gst_caps_features_from_string gst_caps_features_from_string; // gstreamer.ChildProxy alias c_gst_child_proxy_get_type gst_child_proxy_get_type; alias c_gst_child_proxy_child_added gst_child_proxy_child_added; alias c_gst_child_proxy_child_removed gst_child_proxy_child_removed; alias c_gst_child_proxy_get gst_child_proxy_get; alias c_gst_child_proxy_get_child_by_index gst_child_proxy_get_child_by_index; alias c_gst_child_proxy_get_child_by_name gst_child_proxy_get_child_by_name; alias c_gst_child_proxy_get_children_count gst_child_proxy_get_children_count; alias c_gst_child_proxy_get_property gst_child_proxy_get_property; alias c_gst_child_proxy_get_valist gst_child_proxy_get_valist; alias c_gst_child_proxy_lookup gst_child_proxy_lookup; alias c_gst_child_proxy_set gst_child_proxy_set; alias c_gst_child_proxy_set_property gst_child_proxy_set_property; alias c_gst_child_proxy_set_valist gst_child_proxy_set_valist; // gstreamer.Clock alias c_gst_clock_get_type gst_clock_get_type; alias c_gst_clock_id_compare_func gst_clock_id_compare_func; alias c_gst_clock_id_get_time gst_clock_id_get_time; alias c_gst_clock_id_ref gst_clock_id_ref; alias c_gst_clock_id_unref gst_clock_id_unref; alias c_gst_clock_id_unschedule gst_clock_id_unschedule; alias c_gst_clock_id_wait gst_clock_id_wait; alias c_gst_clock_id_wait_async gst_clock_id_wait_async; alias c_gst_clock_add_observation gst_clock_add_observation; alias c_gst_clock_add_observation_unapplied gst_clock_add_observation_unapplied; alias c_gst_clock_adjust_unlocked gst_clock_adjust_unlocked; alias c_gst_clock_adjust_with_calibration gst_clock_adjust_with_calibration; alias c_gst_clock_get_calibration gst_clock_get_calibration; alias c_gst_clock_get_internal_time gst_clock_get_internal_time; alias c_gst_clock_get_master gst_clock_get_master; alias c_gst_clock_get_resolution gst_clock_get_resolution; alias c_gst_clock_get_time gst_clock_get_time; alias c_gst_clock_get_timeout gst_clock_get_timeout; alias c_gst_clock_is_synced gst_clock_is_synced; alias c_gst_clock_new_periodic_id gst_clock_new_periodic_id; alias c_gst_clock_new_single_shot_id gst_clock_new_single_shot_id; alias c_gst_clock_periodic_id_reinit gst_clock_periodic_id_reinit; alias c_gst_clock_set_calibration gst_clock_set_calibration; alias c_gst_clock_set_master gst_clock_set_master; alias c_gst_clock_set_resolution gst_clock_set_resolution; alias c_gst_clock_set_synced gst_clock_set_synced; alias c_gst_clock_set_timeout gst_clock_set_timeout; alias c_gst_clock_single_shot_id_reinit gst_clock_single_shot_id_reinit; alias c_gst_clock_unadjust_unlocked gst_clock_unadjust_unlocked; alias c_gst_clock_unadjust_with_calibration gst_clock_unadjust_with_calibration; alias c_gst_clock_wait_for_sync gst_clock_wait_for_sync; // gstreamer.Context alias c_gst_context_get_type gst_context_get_type; alias c_gst_context_new gst_context_new; alias c_gst_context_get_context_type gst_context_get_context_type; alias c_gst_context_get_structure gst_context_get_structure; alias c_gst_context_has_context_type gst_context_has_context_type; alias c_gst_context_is_persistent gst_context_is_persistent; alias c_gst_context_writable_structure gst_context_writable_structure; // gstreamer.ControlBinding alias c_gst_control_binding_get_type gst_control_binding_get_type; alias c_gst_control_binding_get_g_value_array gst_control_binding_get_g_value_array; alias c_gst_control_binding_get_value gst_control_binding_get_value; alias c_gst_control_binding_get_value_array gst_control_binding_get_value_array; alias c_gst_control_binding_is_disabled gst_control_binding_is_disabled; alias c_gst_control_binding_set_disabled gst_control_binding_set_disabled; alias c_gst_control_binding_sync_values gst_control_binding_sync_values; // gstreamer.ControlSource alias c_gst_control_source_get_type gst_control_source_get_type; alias c_gst_control_source_get_value gst_control_source_get_value; alias c_gst_control_source_get_value_array gst_control_source_get_value_array; // gstreamer.DateTime alias c_gst_date_time_get_type gst_date_time_get_type; alias c_gst_date_time_new gst_date_time_new; alias c_gst_date_time_new_from_g_date_time gst_date_time_new_from_g_date_time; alias c_gst_date_time_new_from_iso8601_string gst_date_time_new_from_iso8601_string; alias c_gst_date_time_new_from_unix_epoch_local_time gst_date_time_new_from_unix_epoch_local_time; alias c_gst_date_time_new_from_unix_epoch_utc gst_date_time_new_from_unix_epoch_utc; alias c_gst_date_time_new_local_time gst_date_time_new_local_time; alias c_gst_date_time_new_now_local_time gst_date_time_new_now_local_time; alias c_gst_date_time_new_now_utc gst_date_time_new_now_utc; alias c_gst_date_time_new_y gst_date_time_new_y; alias c_gst_date_time_new_ym gst_date_time_new_ym; alias c_gst_date_time_new_ymd gst_date_time_new_ymd; alias c_gst_date_time_get_day gst_date_time_get_day; alias c_gst_date_time_get_hour gst_date_time_get_hour; alias c_gst_date_time_get_microsecond gst_date_time_get_microsecond; alias c_gst_date_time_get_minute gst_date_time_get_minute; alias c_gst_date_time_get_month gst_date_time_get_month; alias c_gst_date_time_get_second gst_date_time_get_second; alias c_gst_date_time_get_time_zone_offset gst_date_time_get_time_zone_offset; alias c_gst_date_time_get_year gst_date_time_get_year; alias c_gst_date_time_has_day gst_date_time_has_day; alias c_gst_date_time_has_month gst_date_time_has_month; alias c_gst_date_time_has_second gst_date_time_has_second; alias c_gst_date_time_has_time gst_date_time_has_time; alias c_gst_date_time_has_year gst_date_time_has_year; alias c_gst_date_time_ref gst_date_time_ref; alias c_gst_date_time_to_g_date_time gst_date_time_to_g_date_time; alias c_gst_date_time_to_iso8601_string gst_date_time_to_iso8601_string; alias c_gst_date_time_unref gst_date_time_unref; // gstreamer.DebugCategory alias c_gst_debug_category_free gst_debug_category_free; alias c_gst_debug_category_get_color gst_debug_category_get_color; alias c_gst_debug_category_get_description gst_debug_category_get_description; alias c_gst_debug_category_get_name gst_debug_category_get_name; alias c_gst_debug_category_get_threshold gst_debug_category_get_threshold; alias c_gst_debug_category_reset_threshold gst_debug_category_reset_threshold; alias c_gst_debug_category_set_threshold gst_debug_category_set_threshold; // gstreamer.DebugMessage alias c_gst_debug_message_get gst_debug_message_get; // gstreamer.Device alias c_gst_device_get_type gst_device_get_type; alias c_gst_device_create_element gst_device_create_element; alias c_gst_device_get_caps gst_device_get_caps; alias c_gst_device_get_device_class gst_device_get_device_class; alias c_gst_device_get_display_name gst_device_get_display_name; alias c_gst_device_get_properties gst_device_get_properties; alias c_gst_device_has_classes gst_device_has_classes; alias c_gst_device_has_classesv gst_device_has_classesv; alias c_gst_device_reconfigure_element gst_device_reconfigure_element; // gstreamer.DeviceMonitor alias c_gst_device_monitor_get_type gst_device_monitor_get_type; alias c_gst_device_monitor_new gst_device_monitor_new; alias c_gst_device_monitor_add_filter gst_device_monitor_add_filter; alias c_gst_device_monitor_get_bus gst_device_monitor_get_bus; alias c_gst_device_monitor_get_devices gst_device_monitor_get_devices; alias c_gst_device_monitor_get_providers gst_device_monitor_get_providers; alias c_gst_device_monitor_get_show_all_devices gst_device_monitor_get_show_all_devices; alias c_gst_device_monitor_remove_filter gst_device_monitor_remove_filter; alias c_gst_device_monitor_set_show_all_devices gst_device_monitor_set_show_all_devices; alias c_gst_device_monitor_start gst_device_monitor_start; alias c_gst_device_monitor_stop gst_device_monitor_stop; // gstreamer.DeviceProvider alias c_gst_device_provider_get_type gst_device_provider_get_type; alias c_gst_device_provider_register gst_device_provider_register; alias c_gst_device_provider_can_monitor gst_device_provider_can_monitor; alias c_gst_device_provider_device_add gst_device_provider_device_add; alias c_gst_device_provider_device_remove gst_device_provider_device_remove; alias c_gst_device_provider_get_bus gst_device_provider_get_bus; alias c_gst_device_provider_get_devices gst_device_provider_get_devices; alias c_gst_device_provider_get_factory gst_device_provider_get_factory; alias c_gst_device_provider_get_hidden_providers gst_device_provider_get_hidden_providers; alias c_gst_device_provider_hide_provider gst_device_provider_hide_provider; alias c_gst_device_provider_start gst_device_provider_start; alias c_gst_device_provider_stop gst_device_provider_stop; alias c_gst_device_provider_unhide_provider gst_device_provider_unhide_provider; // gstreamer.DeviceProviderClass alias c_gst_device_provider_class_add_metadata gst_device_provider_class_add_metadata; alias c_gst_device_provider_class_add_static_metadata gst_device_provider_class_add_static_metadata; alias c_gst_device_provider_class_get_metadata gst_device_provider_class_get_metadata; alias c_gst_device_provider_class_set_metadata gst_device_provider_class_set_metadata; alias c_gst_device_provider_class_set_static_metadata gst_device_provider_class_set_static_metadata; // gstreamer.DeviceProviderFactory alias c_gst_device_provider_factory_get_type gst_device_provider_factory_get_type; alias c_gst_device_provider_factory_find gst_device_provider_factory_find; alias c_gst_device_provider_factory_get_by_name gst_device_provider_factory_get_by_name; alias c_gst_device_provider_factory_list_get_device_providers gst_device_provider_factory_list_get_device_providers; alias c_gst_device_provider_factory_get gst_device_provider_factory_get; alias c_gst_device_provider_factory_get_device_provider_type gst_device_provider_factory_get_device_provider_type; alias c_gst_device_provider_factory_get_metadata gst_device_provider_factory_get_metadata; alias c_gst_device_provider_factory_get_metadata_keys gst_device_provider_factory_get_metadata_keys; alias c_gst_device_provider_factory_has_classes gst_device_provider_factory_has_classes; alias c_gst_device_provider_factory_has_classesv gst_device_provider_factory_has_classesv; // gstreamer.DoubleRange alias c_gst_double_range_get_type gst_double_range_get_type; // gstreamer.DynamicTypeFactory alias c_gst_dynamic_type_factory_get_type gst_dynamic_type_factory_get_type; alias c_gst_dynamic_type_factory_load gst_dynamic_type_factory_load; // gstreamer.Element alias c_gst_element_get_type gst_element_get_type; alias c_gst_element_make_from_uri gst_element_make_from_uri; alias c_gst_element_register gst_element_register; alias c_gst_element_state_change_return_get_name gst_element_state_change_return_get_name; alias c_gst_element_state_get_name gst_element_state_get_name; alias c_gst_element_abort_state gst_element_abort_state; alias c_gst_element_add_pad gst_element_add_pad; alias c_gst_element_add_property_deep_notify_watch gst_element_add_property_deep_notify_watch; alias c_gst_element_add_property_notify_watch gst_element_add_property_notify_watch; alias c_gst_element_call_async gst_element_call_async; alias c_gst_element_change_state gst_element_change_state; alias c_gst_element_continue_state gst_element_continue_state; alias c_gst_element_create_all_pads gst_element_create_all_pads; alias c_gst_element_get_base_time gst_element_get_base_time; alias c_gst_element_get_bus gst_element_get_bus; alias c_gst_element_get_clock gst_element_get_clock; alias c_gst_element_get_compatible_pad gst_element_get_compatible_pad; alias c_gst_element_get_compatible_pad_template gst_element_get_compatible_pad_template; alias c_gst_element_get_context gst_element_get_context; alias c_gst_element_get_context_unlocked gst_element_get_context_unlocked; alias c_gst_element_get_contexts gst_element_get_contexts; alias c_gst_element_get_factory gst_element_get_factory; alias c_gst_element_get_request_pad gst_element_get_request_pad; alias c_gst_element_get_start_time gst_element_get_start_time; alias c_gst_element_get_state gst_element_get_state; alias c_gst_element_get_static_pad gst_element_get_static_pad; alias c_gst_element_is_locked_state gst_element_is_locked_state; alias c_gst_element_iterate_pads gst_element_iterate_pads; alias c_gst_element_iterate_sink_pads gst_element_iterate_sink_pads; alias c_gst_element_iterate_src_pads gst_element_iterate_src_pads; alias c_gst_element_link gst_element_link; alias c_gst_element_link_filtered gst_element_link_filtered; alias c_gst_element_link_many gst_element_link_many; alias c_gst_element_link_pads gst_element_link_pads; alias c_gst_element_link_pads_filtered gst_element_link_pads_filtered; alias c_gst_element_link_pads_full gst_element_link_pads_full; alias c_gst_element_lost_state gst_element_lost_state; alias c_gst_element_message_full gst_element_message_full; alias c_gst_element_message_full_with_details gst_element_message_full_with_details; alias c_gst_element_no_more_pads gst_element_no_more_pads; alias c_gst_element_post_message gst_element_post_message; alias c_gst_element_provide_clock gst_element_provide_clock; alias c_gst_element_query gst_element_query; alias c_gst_element_query_convert gst_element_query_convert; alias c_gst_element_query_duration gst_element_query_duration; alias c_gst_element_query_position gst_element_query_position; alias c_gst_element_release_request_pad gst_element_release_request_pad; alias c_gst_element_remove_pad gst_element_remove_pad; alias c_gst_element_remove_property_notify_watch gst_element_remove_property_notify_watch; alias c_gst_element_request_pad gst_element_request_pad; alias c_gst_element_seek gst_element_seek; alias c_gst_element_seek_simple gst_element_seek_simple; alias c_gst_element_send_event gst_element_send_event; alias c_gst_element_set_base_time gst_element_set_base_time; alias c_gst_element_set_bus gst_element_set_bus; alias c_gst_element_set_clock gst_element_set_clock; alias c_gst_element_set_context gst_element_set_context; alias c_gst_element_set_locked_state gst_element_set_locked_state; alias c_gst_element_set_start_time gst_element_set_start_time; alias c_gst_element_set_state gst_element_set_state; alias c_gst_element_sync_state_with_parent gst_element_sync_state_with_parent; alias c_gst_element_unlink gst_element_unlink; alias c_gst_element_unlink_many gst_element_unlink_many; alias c_gst_element_unlink_pads gst_element_unlink_pads; // gstreamer.ElementClass alias c_gst_element_class_add_metadata gst_element_class_add_metadata; alias c_gst_element_class_add_pad_template gst_element_class_add_pad_template; alias c_gst_element_class_add_static_metadata gst_element_class_add_static_metadata; alias c_gst_element_class_add_static_pad_template gst_element_class_add_static_pad_template; alias c_gst_element_class_get_metadata gst_element_class_get_metadata; alias c_gst_element_class_get_pad_template gst_element_class_get_pad_template; alias c_gst_element_class_get_pad_template_list gst_element_class_get_pad_template_list; alias c_gst_element_class_set_metadata gst_element_class_set_metadata; alias c_gst_element_class_set_static_metadata gst_element_class_set_static_metadata; // gstreamer.ElementFactory alias c_gst_element_factory_get_type gst_element_factory_get_type; alias c_gst_element_factory_find gst_element_factory_find; alias c_gst_element_factory_list_filter gst_element_factory_list_filter; alias c_gst_element_factory_list_get_elements gst_element_factory_list_get_elements; alias c_gst_element_factory_make gst_element_factory_make; alias c_gst_element_factory_can_sink_all_caps gst_element_factory_can_sink_all_caps; alias c_gst_element_factory_can_sink_any_caps gst_element_factory_can_sink_any_caps; alias c_gst_element_factory_can_src_all_caps gst_element_factory_can_src_all_caps; alias c_gst_element_factory_can_src_any_caps gst_element_factory_can_src_any_caps; alias c_gst_element_factory_create gst_element_factory_create; alias c_gst_element_factory_get_element_type gst_element_factory_get_element_type; alias c_gst_element_factory_get_metadata gst_element_factory_get_metadata; alias c_gst_element_factory_get_metadata_keys gst_element_factory_get_metadata_keys; alias c_gst_element_factory_get_num_pad_templates gst_element_factory_get_num_pad_templates; alias c_gst_element_factory_get_static_pad_templates gst_element_factory_get_static_pad_templates; alias c_gst_element_factory_get_uri_protocols gst_element_factory_get_uri_protocols; alias c_gst_element_factory_get_uri_type gst_element_factory_get_uri_type; alias c_gst_element_factory_has_interface gst_element_factory_has_interface; alias c_gst_element_factory_list_is_type gst_element_factory_list_is_type; // gstreamer.Event alias c_gst_event_get_type gst_event_get_type; alias c_gst_event_new_buffer_size gst_event_new_buffer_size; alias c_gst_event_new_caps gst_event_new_caps; alias c_gst_event_new_custom gst_event_new_custom; alias c_gst_event_new_eos gst_event_new_eos; alias c_gst_event_new_flush_start gst_event_new_flush_start; alias c_gst_event_new_flush_stop gst_event_new_flush_stop; alias c_gst_event_new_gap gst_event_new_gap; alias c_gst_event_new_latency gst_event_new_latency; alias c_gst_event_new_navigation gst_event_new_navigation; alias c_gst_event_new_protection gst_event_new_protection; alias c_gst_event_new_qos gst_event_new_qos; alias c_gst_event_new_reconfigure gst_event_new_reconfigure; alias c_gst_event_new_seek gst_event_new_seek; alias c_gst_event_new_segment gst_event_new_segment; alias c_gst_event_new_segment_done gst_event_new_segment_done; alias c_gst_event_new_select_streams gst_event_new_select_streams; alias c_gst_event_new_sink_message gst_event_new_sink_message; alias c_gst_event_new_step gst_event_new_step; alias c_gst_event_new_stream_collection gst_event_new_stream_collection; alias c_gst_event_new_stream_group_done gst_event_new_stream_group_done; alias c_gst_event_new_stream_start gst_event_new_stream_start; alias c_gst_event_new_tag gst_event_new_tag; alias c_gst_event_new_toc gst_event_new_toc; alias c_gst_event_new_toc_select gst_event_new_toc_select; alias c_gst_event_copy_segment gst_event_copy_segment; alias c_gst_event_get_running_time_offset gst_event_get_running_time_offset; alias c_gst_event_get_seqnum gst_event_get_seqnum; alias c_gst_event_get_structure gst_event_get_structure; alias c_gst_event_has_name gst_event_has_name; alias c_gst_event_parse_buffer_size gst_event_parse_buffer_size; alias c_gst_event_parse_caps gst_event_parse_caps; alias c_gst_event_parse_flush_stop gst_event_parse_flush_stop; alias c_gst_event_parse_gap gst_event_parse_gap; alias c_gst_event_parse_group_id gst_event_parse_group_id; alias c_gst_event_parse_latency gst_event_parse_latency; alias c_gst_event_parse_protection gst_event_parse_protection; alias c_gst_event_parse_qos gst_event_parse_qos; alias c_gst_event_parse_seek gst_event_parse_seek; alias c_gst_event_parse_segment gst_event_parse_segment; alias c_gst_event_parse_segment_done gst_event_parse_segment_done; alias c_gst_event_parse_select_streams gst_event_parse_select_streams; alias c_gst_event_parse_sink_message gst_event_parse_sink_message; alias c_gst_event_parse_step gst_event_parse_step; alias c_gst_event_parse_stream gst_event_parse_stream; alias c_gst_event_parse_stream_collection gst_event_parse_stream_collection; alias c_gst_event_parse_stream_flags gst_event_parse_stream_flags; alias c_gst_event_parse_stream_group_done gst_event_parse_stream_group_done; alias c_gst_event_parse_stream_start gst_event_parse_stream_start; alias c_gst_event_parse_tag gst_event_parse_tag; alias c_gst_event_parse_toc gst_event_parse_toc; alias c_gst_event_parse_toc_select gst_event_parse_toc_select; alias c_gst_event_set_group_id gst_event_set_group_id; alias c_gst_event_set_running_time_offset gst_event_set_running_time_offset; alias c_gst_event_set_seqnum gst_event_set_seqnum; alias c_gst_event_set_stream gst_event_set_stream; alias c_gst_event_set_stream_flags gst_event_set_stream_flags; alias c_gst_event_writable_structure gst_event_writable_structure; alias c_gst_event_type_get_flags gst_event_type_get_flags; alias c_gst_event_type_get_name gst_event_type_get_name; alias c_gst_event_type_to_quark gst_event_type_to_quark; // gstreamer.FlagSet alias c_gst_flagset_get_type gst_flagset_get_type; alias c_gst_flagset_register gst_flagset_register; // gstreamer.Fraction alias c_gst_fraction_get_type gst_fraction_get_type; // gstreamer.FractionRange alias c_gst_fraction_range_get_type gst_fraction_range_get_type; // gstreamer.GhostPad alias c_gst_ghost_pad_get_type gst_ghost_pad_get_type; alias c_gst_ghost_pad_new gst_ghost_pad_new; alias c_gst_ghost_pad_new_from_template gst_ghost_pad_new_from_template; alias c_gst_ghost_pad_new_no_target gst_ghost_pad_new_no_target; alias c_gst_ghost_pad_new_no_target_from_template gst_ghost_pad_new_no_target_from_template; alias c_gst_ghost_pad_activate_mode_default gst_ghost_pad_activate_mode_default; alias c_gst_ghost_pad_internal_activate_mode_default gst_ghost_pad_internal_activate_mode_default; alias c_gst_ghost_pad_construct gst_ghost_pad_construct; alias c_gst_ghost_pad_get_target gst_ghost_pad_get_target; alias c_gst_ghost_pad_set_target gst_ghost_pad_set_target; // gstreamer.Int64Range alias c_gst_int64_range_get_type gst_int64_range_get_type; // gstreamer.IntRange alias c_gst_int_range_get_type gst_int_range_get_type; // gstreamer.Iterator alias c_gst_iterator_get_type gst_iterator_get_type; alias c_gst_iterator_new gst_iterator_new; alias c_gst_iterator_new_list gst_iterator_new_list; alias c_gst_iterator_new_single gst_iterator_new_single; alias c_gst_iterator_copy gst_iterator_copy; alias c_gst_iterator_filter gst_iterator_filter; alias c_gst_iterator_find_custom gst_iterator_find_custom; alias c_gst_iterator_fold gst_iterator_fold; alias c_gst_iterator_foreach gst_iterator_foreach; alias c_gst_iterator_free gst_iterator_free; alias c_gst_iterator_next gst_iterator_next; alias c_gst_iterator_push gst_iterator_push; alias c_gst_iterator_resync gst_iterator_resync; // gstreamer.Memory alias c_gst_memory_get_type gst_memory_get_type; alias c_gst_memory_new_wrapped gst_memory_new_wrapped; alias c_gst_memory_copy gst_memory_copy; alias c_gst_memory_get_sizes gst_memory_get_sizes; alias c_gst_memory_init gst_memory_init; alias c_gst_memory_is_span gst_memory_is_span; alias c_gst_memory_is_type gst_memory_is_type; alias c_gst_memory_make_mapped gst_memory_make_mapped; alias c_gst_memory_map gst_memory_map; alias c_gst_memory_resize gst_memory_resize; alias c_gst_memory_share gst_memory_share; alias c_gst_memory_unmap gst_memory_unmap; // gstreamer.Message alias c_gst_message_get_type gst_message_get_type; alias c_gst_message_new_application gst_message_new_application; alias c_gst_message_new_async_done gst_message_new_async_done; alias c_gst_message_new_async_start gst_message_new_async_start; alias c_gst_message_new_buffering gst_message_new_buffering; alias c_gst_message_new_clock_lost gst_message_new_clock_lost; alias c_gst_message_new_clock_provide gst_message_new_clock_provide; alias c_gst_message_new_custom gst_message_new_custom; alias c_gst_message_new_device_added gst_message_new_device_added; alias c_gst_message_new_device_removed gst_message_new_device_removed; alias c_gst_message_new_duration_changed gst_message_new_duration_changed; alias c_gst_message_new_element gst_message_new_element; alias c_gst_message_new_eos gst_message_new_eos; alias c_gst_message_new_error gst_message_new_error; alias c_gst_message_new_error_with_details gst_message_new_error_with_details; alias c_gst_message_new_have_context gst_message_new_have_context; alias c_gst_message_new_info gst_message_new_info; alias c_gst_message_new_info_with_details gst_message_new_info_with_details; alias c_gst_message_new_latency gst_message_new_latency; alias c_gst_message_new_need_context gst_message_new_need_context; alias c_gst_message_new_new_clock gst_message_new_new_clock; alias c_gst_message_new_progress gst_message_new_progress; alias c_gst_message_new_property_notify gst_message_new_property_notify; alias c_gst_message_new_qos gst_message_new_qos; alias c_gst_message_new_redirect gst_message_new_redirect; alias c_gst_message_new_request_state gst_message_new_request_state; alias c_gst_message_new_reset_time gst_message_new_reset_time; alias c_gst_message_new_segment_done gst_message_new_segment_done; alias c_gst_message_new_segment_start gst_message_new_segment_start; alias c_gst_message_new_state_changed gst_message_new_state_changed; alias c_gst_message_new_state_dirty gst_message_new_state_dirty; alias c_gst_message_new_step_done gst_message_new_step_done; alias c_gst_message_new_step_start gst_message_new_step_start; alias c_gst_message_new_stream_collection gst_message_new_stream_collection; alias c_gst_message_new_stream_start gst_message_new_stream_start; alias c_gst_message_new_stream_status gst_message_new_stream_status; alias c_gst_message_new_streams_selected gst_message_new_streams_selected; alias c_gst_message_new_structure_change gst_message_new_structure_change; alias c_gst_message_new_tag gst_message_new_tag; alias c_gst_message_new_toc gst_message_new_toc; alias c_gst_message_new_warning gst_message_new_warning; alias c_gst_message_new_warning_with_details gst_message_new_warning_with_details; alias c_gst_message_add_redirect_entry gst_message_add_redirect_entry; alias c_gst_message_get_num_redirect_entries gst_message_get_num_redirect_entries; alias c_gst_message_get_seqnum gst_message_get_seqnum; alias c_gst_message_get_stream_status_object gst_message_get_stream_status_object; alias c_gst_message_get_structure gst_message_get_structure; alias c_gst_message_has_name gst_message_has_name; alias c_gst_message_parse_async_done gst_message_parse_async_done; alias c_gst_message_parse_buffering gst_message_parse_buffering; alias c_gst_message_parse_buffering_stats gst_message_parse_buffering_stats; alias c_gst_message_parse_clock_lost gst_message_parse_clock_lost; alias c_gst_message_parse_clock_provide gst_message_parse_clock_provide; alias c_gst_message_parse_context_type gst_message_parse_context_type; alias c_gst_message_parse_device_added gst_message_parse_device_added; alias c_gst_message_parse_device_removed gst_message_parse_device_removed; alias c_gst_message_parse_error gst_message_parse_error; alias c_gst_message_parse_error_details gst_message_parse_error_details; alias c_gst_message_parse_group_id gst_message_parse_group_id; alias c_gst_message_parse_have_context gst_message_parse_have_context; alias c_gst_message_parse_info gst_message_parse_info; alias c_gst_message_parse_info_details gst_message_parse_info_details; alias c_gst_message_parse_new_clock gst_message_parse_new_clock; alias c_gst_message_parse_progress gst_message_parse_progress; alias c_gst_message_parse_property_notify gst_message_parse_property_notify; alias c_gst_message_parse_qos gst_message_parse_qos; alias c_gst_message_parse_qos_stats gst_message_parse_qos_stats; alias c_gst_message_parse_qos_values gst_message_parse_qos_values; alias c_gst_message_parse_redirect_entry gst_message_parse_redirect_entry; alias c_gst_message_parse_request_state gst_message_parse_request_state; alias c_gst_message_parse_reset_time gst_message_parse_reset_time; alias c_gst_message_parse_segment_done gst_message_parse_segment_done; alias c_gst_message_parse_segment_start gst_message_parse_segment_start; alias c_gst_message_parse_state_changed gst_message_parse_state_changed; alias c_gst_message_parse_step_done gst_message_parse_step_done; alias c_gst_message_parse_step_start gst_message_parse_step_start; alias c_gst_message_parse_stream_collection gst_message_parse_stream_collection; alias c_gst_message_parse_stream_status gst_message_parse_stream_status; alias c_gst_message_parse_streams_selected gst_message_parse_streams_selected; alias c_gst_message_parse_structure_change gst_message_parse_structure_change; alias c_gst_message_parse_tag gst_message_parse_tag; alias c_gst_message_parse_toc gst_message_parse_toc; alias c_gst_message_parse_warning gst_message_parse_warning; alias c_gst_message_parse_warning_details gst_message_parse_warning_details; alias c_gst_message_set_buffering_stats gst_message_set_buffering_stats; alias c_gst_message_set_group_id gst_message_set_group_id; alias c_gst_message_set_qos_stats gst_message_set_qos_stats; alias c_gst_message_set_qos_values gst_message_set_qos_values; alias c_gst_message_set_seqnum gst_message_set_seqnum; alias c_gst_message_set_stream_status_object gst_message_set_stream_status_object; alias c_gst_message_streams_selected_add gst_message_streams_selected_add; alias c_gst_message_streams_selected_get_size gst_message_streams_selected_get_size; alias c_gst_message_streams_selected_get_stream gst_message_streams_selected_get_stream; alias c_gst_message_type_get_name gst_message_type_get_name; alias c_gst_message_type_to_quark gst_message_type_to_quark; // gstreamer.Meta alias c_gst_meta_api_type_get_tags gst_meta_api_type_get_tags; alias c_gst_meta_api_type_has_tag gst_meta_api_type_has_tag; alias c_gst_meta_api_type_register gst_meta_api_type_register; alias c_gst_meta_get_info gst_meta_get_info; alias c_gst_meta_register gst_meta_register; // gstreamer.MiniObject alias c_gst_mini_object_copy gst_mini_object_copy; alias c_gst_mini_object_get_qdata gst_mini_object_get_qdata; alias c_gst_mini_object_init gst_mini_object_init; alias c_gst_mini_object_is_writable gst_mini_object_is_writable; alias c_gst_mini_object_lock gst_mini_object_lock; alias c_gst_mini_object_make_writable gst_mini_object_make_writable; alias c_gst_mini_object_ref gst_mini_object_ref; alias c_gst_mini_object_set_qdata gst_mini_object_set_qdata; alias c_gst_mini_object_steal_qdata gst_mini_object_steal_qdata; alias c_gst_mini_object_unlock gst_mini_object_unlock; alias c_gst_mini_object_unref gst_mini_object_unref; alias c_gst_mini_object_weak_ref gst_mini_object_weak_ref; alias c_gst_mini_object_weak_unref gst_mini_object_weak_unref; alias c_gst_mini_object_replace gst_mini_object_replace; alias c_gst_mini_object_steal gst_mini_object_steal; alias c_gst_mini_object_take gst_mini_object_take; // gstreamer.ObjectGst alias c_gst_object_get_type gst_object_get_type; alias c_gst_object_check_uniqueness gst_object_check_uniqueness; alias c_gst_object_default_deep_notify gst_object_default_deep_notify; alias c_gst_object_ref_sink gst_object_ref_sink; alias c_gst_object_replace gst_object_replace; alias c_gst_object_add_control_binding gst_object_add_control_binding; alias c_gst_object_default_error gst_object_default_error; alias c_gst_object_get_control_binding gst_object_get_control_binding; alias c_gst_object_get_control_rate gst_object_get_control_rate; alias c_gst_object_get_g_value_array gst_object_get_g_value_array; alias c_gst_object_get_name gst_object_get_name; alias c_gst_object_get_parent gst_object_get_parent; alias c_gst_object_get_path_string gst_object_get_path_string; alias c_gst_object_get_value gst_object_get_value; alias c_gst_object_get_value_array gst_object_get_value_array; alias c_gst_object_has_active_control_bindings gst_object_has_active_control_bindings; alias c_gst_object_has_ancestor gst_object_has_ancestor; alias c_gst_object_has_as_ancestor gst_object_has_as_ancestor; alias c_gst_object_has_as_parent gst_object_has_as_parent; alias c_gst_object_ref gst_object_ref; alias c_gst_object_remove_control_binding gst_object_remove_control_binding; alias c_gst_object_set_control_binding_disabled gst_object_set_control_binding_disabled; alias c_gst_object_set_control_bindings_disabled gst_object_set_control_bindings_disabled; alias c_gst_object_set_control_rate gst_object_set_control_rate; alias c_gst_object_set_name gst_object_set_name; alias c_gst_object_set_parent gst_object_set_parent; alias c_gst_object_suggest_next_sync gst_object_suggest_next_sync; alias c_gst_object_sync_values gst_object_sync_values; alias c_gst_object_unparent gst_object_unparent; alias c_gst_object_unref gst_object_unref; // gstreamer.Pad alias c_gst_pad_get_type gst_pad_get_type; alias c_gst_pad_new gst_pad_new; alias c_gst_pad_new_from_static_template gst_pad_new_from_static_template; alias c_gst_pad_new_from_template gst_pad_new_from_template; alias c_gst_pad_link_get_name gst_pad_link_get_name; alias c_gst_pad_activate_mode gst_pad_activate_mode; alias c_gst_pad_add_probe gst_pad_add_probe; alias c_gst_pad_can_link gst_pad_can_link; alias c_gst_pad_chain gst_pad_chain; alias c_gst_pad_chain_list gst_pad_chain_list; alias c_gst_pad_check_reconfigure gst_pad_check_reconfigure; alias c_gst_pad_create_stream_id gst_pad_create_stream_id; alias c_gst_pad_create_stream_id_printf gst_pad_create_stream_id_printf; alias c_gst_pad_create_stream_id_printf_valist gst_pad_create_stream_id_printf_valist; alias c_gst_pad_event_default gst_pad_event_default; alias c_gst_pad_forward gst_pad_forward; alias c_gst_pad_get_allowed_caps gst_pad_get_allowed_caps; alias c_gst_pad_get_current_caps gst_pad_get_current_caps; alias c_gst_pad_get_direction gst_pad_get_direction; alias c_gst_pad_get_element_private gst_pad_get_element_private; alias c_gst_pad_get_last_flow_return gst_pad_get_last_flow_return; alias c_gst_pad_get_offset gst_pad_get_offset; alias c_gst_pad_get_pad_template gst_pad_get_pad_template; alias c_gst_pad_get_pad_template_caps gst_pad_get_pad_template_caps; alias c_gst_pad_get_parent_element gst_pad_get_parent_element; alias c_gst_pad_get_peer gst_pad_get_peer; alias c_gst_pad_get_range gst_pad_get_range; alias c_gst_pad_get_sticky_event gst_pad_get_sticky_event; alias c_gst_pad_get_stream gst_pad_get_stream; alias c_gst_pad_get_stream_id gst_pad_get_stream_id; alias c_gst_pad_get_task_state gst_pad_get_task_state; alias c_gst_pad_has_current_caps gst_pad_has_current_caps; alias c_gst_pad_is_active gst_pad_is_active; alias c_gst_pad_is_blocked gst_pad_is_blocked; alias c_gst_pad_is_blocking gst_pad_is_blocking; alias c_gst_pad_is_linked gst_pad_is_linked; alias c_gst_pad_iterate_internal_links gst_pad_iterate_internal_links; alias c_gst_pad_iterate_internal_links_default gst_pad_iterate_internal_links_default; alias c_gst_pad_link gst_pad_link; alias c_gst_pad_link_full gst_pad_link_full; alias c_gst_pad_link_maybe_ghosting gst_pad_link_maybe_ghosting; alias c_gst_pad_link_maybe_ghosting_full gst_pad_link_maybe_ghosting_full; alias c_gst_pad_mark_reconfigure gst_pad_mark_reconfigure; alias c_gst_pad_needs_reconfigure gst_pad_needs_reconfigure; alias c_gst_pad_pause_task gst_pad_pause_task; alias c_gst_pad_peer_query gst_pad_peer_query; alias c_gst_pad_peer_query_accept_caps gst_pad_peer_query_accept_caps; alias c_gst_pad_peer_query_caps gst_pad_peer_query_caps; alias c_gst_pad_peer_query_convert gst_pad_peer_query_convert; alias c_gst_pad_peer_query_duration gst_pad_peer_query_duration; alias c_gst_pad_peer_query_position gst_pad_peer_query_position; alias c_gst_pad_proxy_query_accept_caps gst_pad_proxy_query_accept_caps; alias c_gst_pad_proxy_query_caps gst_pad_proxy_query_caps; alias c_gst_pad_pull_range gst_pad_pull_range; alias c_gst_pad_push gst_pad_push; alias c_gst_pad_push_event gst_pad_push_event; alias c_gst_pad_push_list gst_pad_push_list; alias c_gst_pad_query gst_pad_query; alias c_gst_pad_query_accept_caps gst_pad_query_accept_caps; alias c_gst_pad_query_caps gst_pad_query_caps; alias c_gst_pad_query_convert gst_pad_query_convert; alias c_gst_pad_query_default gst_pad_query_default; alias c_gst_pad_query_duration gst_pad_query_duration; alias c_gst_pad_query_position gst_pad_query_position; alias c_gst_pad_remove_probe gst_pad_remove_probe; alias c_gst_pad_send_event gst_pad_send_event; alias c_gst_pad_set_activate_function_full gst_pad_set_activate_function_full; alias c_gst_pad_set_activatemode_function_full gst_pad_set_activatemode_function_full; alias c_gst_pad_set_active gst_pad_set_active; alias c_gst_pad_set_chain_function_full gst_pad_set_chain_function_full; alias c_gst_pad_set_chain_list_function_full gst_pad_set_chain_list_function_full; alias c_gst_pad_set_element_private gst_pad_set_element_private; alias c_gst_pad_set_event_full_function_full gst_pad_set_event_full_function_full; alias c_gst_pad_set_event_function_full gst_pad_set_event_function_full; alias c_gst_pad_set_getrange_function_full gst_pad_set_getrange_function_full; alias c_gst_pad_set_iterate_internal_links_function_full gst_pad_set_iterate_internal_links_function_full; alias c_gst_pad_set_link_function_full gst_pad_set_link_function_full; alias c_gst_pad_set_offset gst_pad_set_offset; alias c_gst_pad_set_query_function_full gst_pad_set_query_function_full; alias c_gst_pad_set_unlink_function_full gst_pad_set_unlink_function_full; alias c_gst_pad_start_task gst_pad_start_task; alias c_gst_pad_sticky_events_foreach gst_pad_sticky_events_foreach; alias c_gst_pad_stop_task gst_pad_stop_task; alias c_gst_pad_store_sticky_event gst_pad_store_sticky_event; alias c_gst_pad_unlink gst_pad_unlink; alias c_gst_pad_use_fixed_caps gst_pad_use_fixed_caps; alias c_gst_flow_get_name gst_flow_get_name; alias c_gst_flow_to_quark gst_flow_to_quark; alias c_gst_pad_mode_get_name gst_pad_mode_get_name; // gstreamer.PadProbeInfo alias c_gst_pad_probe_info_get_buffer gst_pad_probe_info_get_buffer; alias c_gst_pad_probe_info_get_buffer_list gst_pad_probe_info_get_buffer_list; alias c_gst_pad_probe_info_get_event gst_pad_probe_info_get_event; alias c_gst_pad_probe_info_get_query gst_pad_probe_info_get_query; // gstreamer.PadTemplate alias c_gst_pad_template_get_type gst_pad_template_get_type; alias c_gst_pad_template_new gst_pad_template_new; alias c_gst_pad_template_get_caps gst_pad_template_get_caps; alias c_gst_pad_template_pad_created gst_pad_template_pad_created; // gstreamer.ParamArray alias c_gst_param_spec_array_get_type gst_param_spec_array_get_type; // gstreamer.ParamFraction alias c_gst_param_spec_fraction_get_type gst_param_spec_fraction_get_type; // gstreamer.ParamSpecFraction alias c_gst_param_spec_fraction gst_param_spec_fraction; // gstreamer.ParentBufferMeta alias c_gst_parent_buffer_meta_get_info gst_parent_buffer_meta_get_info; alias c_gst_parent_buffer_meta_api_get_type gst_parent_buffer_meta_api_get_type; // gstreamer.ParseContext alias c_gst_parse_context_get_type gst_parse_context_get_type; alias c_gst_parse_context_new gst_parse_context_new; alias c_gst_parse_context_copy gst_parse_context_copy; alias c_gst_parse_context_free gst_parse_context_free; alias c_gst_parse_context_get_missing_elements gst_parse_context_get_missing_elements; // gstreamer.Pipeline alias c_gst_pipeline_get_type gst_pipeline_get_type; alias c_gst_pipeline_new gst_pipeline_new; alias c_gst_pipeline_auto_clock gst_pipeline_auto_clock; alias c_gst_pipeline_get_auto_flush_bus gst_pipeline_get_auto_flush_bus; alias c_gst_pipeline_get_bus gst_pipeline_get_bus; alias c_gst_pipeline_get_clock gst_pipeline_get_clock; alias c_gst_pipeline_get_delay gst_pipeline_get_delay; alias c_gst_pipeline_get_latency gst_pipeline_get_latency; alias c_gst_pipeline_get_pipeline_clock gst_pipeline_get_pipeline_clock; alias c_gst_pipeline_set_auto_flush_bus gst_pipeline_set_auto_flush_bus; alias c_gst_pipeline_set_clock gst_pipeline_set_clock; alias c_gst_pipeline_set_delay gst_pipeline_set_delay; alias c_gst_pipeline_set_latency gst_pipeline_set_latency; alias c_gst_pipeline_use_clock gst_pipeline_use_clock; // gstreamer.Plugin alias c_gst_plugin_get_type gst_plugin_get_type; alias c_gst_plugin_list_free gst_plugin_list_free; alias c_gst_plugin_load_by_name gst_plugin_load_by_name; alias c_gst_plugin_load_file gst_plugin_load_file; alias c_gst_plugin_register_static gst_plugin_register_static; alias c_gst_plugin_register_static_full gst_plugin_register_static_full; alias c_gst_plugin_add_dependency gst_plugin_add_dependency; alias c_gst_plugin_add_dependency_simple gst_plugin_add_dependency_simple; alias c_gst_plugin_get_cache_data gst_plugin_get_cache_data; alias c_gst_plugin_get_description gst_plugin_get_description; alias c_gst_plugin_get_filename gst_plugin_get_filename; alias c_gst_plugin_get_license gst_plugin_get_license; alias c_gst_plugin_get_name gst_plugin_get_name; alias c_gst_plugin_get_origin gst_plugin_get_origin; alias c_gst_plugin_get_package gst_plugin_get_package; alias c_gst_plugin_get_release_date_string gst_plugin_get_release_date_string; alias c_gst_plugin_get_source gst_plugin_get_source; alias c_gst_plugin_get_version gst_plugin_get_version; alias c_gst_plugin_is_loaded gst_plugin_is_loaded; alias c_gst_plugin_load gst_plugin_load; alias c_gst_plugin_set_cache_data gst_plugin_set_cache_data; alias c_gst_plugin_error_quark gst_plugin_error_quark; // gstreamer.PluginFeature alias c_gst_plugin_feature_get_type gst_plugin_feature_get_type; alias c_gst_plugin_feature_list_copy gst_plugin_feature_list_copy; alias c_gst_plugin_feature_list_debug gst_plugin_feature_list_debug; alias c_gst_plugin_feature_list_free gst_plugin_feature_list_free; alias c_gst_plugin_feature_rank_compare_func gst_plugin_feature_rank_compare_func; alias c_gst_plugin_feature_check_version gst_plugin_feature_check_version; alias c_gst_plugin_feature_get_plugin gst_plugin_feature_get_plugin; alias c_gst_plugin_feature_get_plugin_name gst_plugin_feature_get_plugin_name; alias c_gst_plugin_feature_get_rank gst_plugin_feature_get_rank; alias c_gst_plugin_feature_load gst_plugin_feature_load; alias c_gst_plugin_feature_set_rank gst_plugin_feature_set_rank; // gstreamer.Poll alias c_gst_poll_add_fd gst_poll_add_fd; alias c_gst_poll_fd_can_read gst_poll_fd_can_read; alias c_gst_poll_fd_can_write gst_poll_fd_can_write; alias c_gst_poll_fd_ctl_read gst_poll_fd_ctl_read; alias c_gst_poll_fd_ctl_write gst_poll_fd_ctl_write; alias c_gst_poll_fd_has_closed gst_poll_fd_has_closed; alias c_gst_poll_fd_has_error gst_poll_fd_has_error; alias c_gst_poll_fd_ignored gst_poll_fd_ignored; alias c_gst_poll_free gst_poll_free; alias c_gst_poll_get_read_gpollfd gst_poll_get_read_gpollfd; alias c_gst_poll_read_control gst_poll_read_control; alias c_gst_poll_remove_fd gst_poll_remove_fd; alias c_gst_poll_restart gst_poll_restart; alias c_gst_poll_set_controllable gst_poll_set_controllable; alias c_gst_poll_set_flushing gst_poll_set_flushing; alias c_gst_poll_wait gst_poll_wait; alias c_gst_poll_write_control gst_poll_write_control; alias c_gst_poll_new gst_poll_new; alias c_gst_poll_new_timer gst_poll_new_timer; // gstreamer.PollFD alias c_gst_poll_fd_init gst_poll_fd_init; // gstreamer.Preset alias c_gst_preset_get_type gst_preset_get_type; alias c_gst_preset_get_app_dir gst_preset_get_app_dir; alias c_gst_preset_set_app_dir gst_preset_set_app_dir; alias c_gst_preset_delete_preset gst_preset_delete_preset; alias c_gst_preset_get_meta gst_preset_get_meta; alias c_gst_preset_get_preset_names gst_preset_get_preset_names; alias c_gst_preset_get_property_names gst_preset_get_property_names; alias c_gst_preset_is_editable gst_preset_is_editable; alias c_gst_preset_load_preset gst_preset_load_preset; alias c_gst_preset_rename_preset gst_preset_rename_preset; alias c_gst_preset_save_preset gst_preset_save_preset; alias c_gst_preset_set_meta gst_preset_set_meta; // gstreamer.ProtectionMeta alias c_gst_protection_meta_get_info gst_protection_meta_get_info; alias c_gst_protection_meta_api_get_type gst_protection_meta_api_get_type; alias c_gst_protection_select_system gst_protection_select_system; // gstreamer.ProxyPad alias c_gst_proxy_pad_get_type gst_proxy_pad_get_type; alias c_gst_proxy_pad_chain_default gst_proxy_pad_chain_default; alias c_gst_proxy_pad_chain_list_default gst_proxy_pad_chain_list_default; alias c_gst_proxy_pad_getrange_default gst_proxy_pad_getrange_default; alias c_gst_proxy_pad_iterate_internal_links_default gst_proxy_pad_iterate_internal_links_default; alias c_gst_proxy_pad_get_internal gst_proxy_pad_get_internal; // gstreamer.Query alias c_gst_query_get_type gst_query_get_type; alias c_gst_query_new_accept_caps gst_query_new_accept_caps; alias c_gst_query_new_allocation gst_query_new_allocation; alias c_gst_query_new_buffering gst_query_new_buffering; alias c_gst_query_new_caps gst_query_new_caps; alias c_gst_query_new_context gst_query_new_context; alias c_gst_query_new_convert gst_query_new_convert; alias c_gst_query_new_custom gst_query_new_custom; alias c_gst_query_new_drain gst_query_new_drain; alias c_gst_query_new_duration gst_query_new_duration; alias c_gst_query_new_formats gst_query_new_formats; alias c_gst_query_new_latency gst_query_new_latency; alias c_gst_query_new_position gst_query_new_position; alias c_gst_query_new_scheduling gst_query_new_scheduling; alias c_gst_query_new_seeking gst_query_new_seeking; alias c_gst_query_new_segment gst_query_new_segment; alias c_gst_query_new_uri gst_query_new_uri; alias c_gst_query_add_allocation_meta gst_query_add_allocation_meta; alias c_gst_query_add_allocation_param gst_query_add_allocation_param; alias c_gst_query_add_allocation_pool gst_query_add_allocation_pool; alias c_gst_query_add_buffering_range gst_query_add_buffering_range; alias c_gst_query_add_scheduling_mode gst_query_add_scheduling_mode; alias c_gst_query_find_allocation_meta gst_query_find_allocation_meta; alias c_gst_query_get_n_allocation_metas gst_query_get_n_allocation_metas; alias c_gst_query_get_n_allocation_params gst_query_get_n_allocation_params; alias c_gst_query_get_n_allocation_pools gst_query_get_n_allocation_pools; alias c_gst_query_get_n_buffering_ranges gst_query_get_n_buffering_ranges; alias c_gst_query_get_n_scheduling_modes gst_query_get_n_scheduling_modes; alias c_gst_query_get_structure gst_query_get_structure; alias c_gst_query_has_scheduling_mode gst_query_has_scheduling_mode; alias c_gst_query_has_scheduling_mode_with_flags gst_query_has_scheduling_mode_with_flags; alias c_gst_query_parse_accept_caps gst_query_parse_accept_caps; alias c_gst_query_parse_accept_caps_result gst_query_parse_accept_caps_result; alias c_gst_query_parse_allocation gst_query_parse_allocation; alias c_gst_query_parse_buffering_percent gst_query_parse_buffering_percent; alias c_gst_query_parse_buffering_range gst_query_parse_buffering_range; alias c_gst_query_parse_buffering_stats gst_query_parse_buffering_stats; alias c_gst_query_parse_caps gst_query_parse_caps; alias c_gst_query_parse_caps_result gst_query_parse_caps_result; alias c_gst_query_parse_context gst_query_parse_context; alias c_gst_query_parse_context_type gst_query_parse_context_type; alias c_gst_query_parse_convert gst_query_parse_convert; alias c_gst_query_parse_duration gst_query_parse_duration; alias c_gst_query_parse_latency gst_query_parse_latency; alias c_gst_query_parse_n_formats gst_query_parse_n_formats; alias c_gst_query_parse_nth_allocation_meta gst_query_parse_nth_allocation_meta; alias c_gst_query_parse_nth_allocation_param gst_query_parse_nth_allocation_param; alias c_gst_query_parse_nth_allocation_pool gst_query_parse_nth_allocation_pool; alias c_gst_query_parse_nth_buffering_range gst_query_parse_nth_buffering_range; alias c_gst_query_parse_nth_format gst_query_parse_nth_format; alias c_gst_query_parse_nth_scheduling_mode gst_query_parse_nth_scheduling_mode; alias c_gst_query_parse_position gst_query_parse_position; alias c_gst_query_parse_scheduling gst_query_parse_scheduling; alias c_gst_query_parse_seeking gst_query_parse_seeking; alias c_gst_query_parse_segment gst_query_parse_segment; alias c_gst_query_parse_uri gst_query_parse_uri; alias c_gst_query_parse_uri_redirection gst_query_parse_uri_redirection; alias c_gst_query_parse_uri_redirection_permanent gst_query_parse_uri_redirection_permanent; alias c_gst_query_remove_nth_allocation_meta gst_query_remove_nth_allocation_meta; alias c_gst_query_remove_nth_allocation_param gst_query_remove_nth_allocation_param; alias c_gst_query_remove_nth_allocation_pool gst_query_remove_nth_allocation_pool; alias c_gst_query_set_accept_caps_result gst_query_set_accept_caps_result; alias c_gst_query_set_buffering_percent gst_query_set_buffering_percent; alias c_gst_query_set_buffering_range gst_query_set_buffering_range; alias c_gst_query_set_buffering_stats gst_query_set_buffering_stats; alias c_gst_query_set_caps_result gst_query_set_caps_result; alias c_gst_query_set_context gst_query_set_context; alias c_gst_query_set_convert gst_query_set_convert; alias c_gst_query_set_duration gst_query_set_duration; alias c_gst_query_set_formats gst_query_set_formats; alias c_gst_query_set_formatsv gst_query_set_formatsv; alias c_gst_query_set_latency gst_query_set_latency; alias c_gst_query_set_nth_allocation_param gst_query_set_nth_allocation_param; alias c_gst_query_set_nth_allocation_pool gst_query_set_nth_allocation_pool; alias c_gst_query_set_position gst_query_set_position; alias c_gst_query_set_scheduling gst_query_set_scheduling; alias c_gst_query_set_seeking gst_query_set_seeking; alias c_gst_query_set_segment gst_query_set_segment; alias c_gst_query_set_uri gst_query_set_uri; alias c_gst_query_set_uri_redirection gst_query_set_uri_redirection; alias c_gst_query_set_uri_redirection_permanent gst_query_set_uri_redirection_permanent; alias c_gst_query_writable_structure gst_query_writable_structure; alias c_gst_query_type_get_flags gst_query_type_get_flags; alias c_gst_query_type_get_name gst_query_type_get_name; alias c_gst_query_type_to_quark gst_query_type_to_quark; // gstreamer.Registry alias c_gst_registry_get_type gst_registry_get_type; alias c_gst_registry_fork_is_enabled gst_registry_fork_is_enabled; alias c_gst_registry_fork_set_enabled gst_registry_fork_set_enabled; alias c_gst_registry_get gst_registry_get; alias c_gst_registry_add_feature gst_registry_add_feature; alias c_gst_registry_add_plugin gst_registry_add_plugin; alias c_gst_registry_check_feature_version gst_registry_check_feature_version; alias c_gst_registry_feature_filter gst_registry_feature_filter; alias c_gst_registry_find_feature gst_registry_find_feature; alias c_gst_registry_find_plugin gst_registry_find_plugin; alias c_gst_registry_get_feature_list gst_registry_get_feature_list; alias c_gst_registry_get_feature_list_by_plugin gst_registry_get_feature_list_by_plugin; alias c_gst_registry_get_feature_list_cookie gst_registry_get_feature_list_cookie; alias c_gst_registry_get_plugin_list gst_registry_get_plugin_list; alias c_gst_registry_lookup gst_registry_lookup; alias c_gst_registry_lookup_feature gst_registry_lookup_feature; alias c_gst_registry_plugin_filter gst_registry_plugin_filter; alias c_gst_registry_remove_feature gst_registry_remove_feature; alias c_gst_registry_remove_plugin gst_registry_remove_plugin; alias c_gst_registry_scan_path gst_registry_scan_path; // gstreamer.Sample alias c_gst_sample_get_type gst_sample_get_type; alias c_gst_sample_new gst_sample_new; alias c_gst_sample_get_buffer gst_sample_get_buffer; alias c_gst_sample_get_buffer_list gst_sample_get_buffer_list; alias c_gst_sample_get_caps gst_sample_get_caps; alias c_gst_sample_get_info gst_sample_get_info; alias c_gst_sample_get_segment gst_sample_get_segment; alias c_gst_sample_set_buffer_list gst_sample_set_buffer_list; // gstreamer.Segment alias c_gst_segment_get_type gst_segment_get_type; alias c_gst_segment_new gst_segment_new; alias c_gst_segment_clip gst_segment_clip; alias c_gst_segment_copy gst_segment_copy; alias c_gst_segment_copy_into gst_segment_copy_into; alias c_gst_segment_do_seek gst_segment_do_seek; alias c_gst_segment_free gst_segment_free; alias c_gst_segment_init gst_segment_init; alias c_gst_segment_is_equal gst_segment_is_equal; alias c_gst_segment_offset_running_time gst_segment_offset_running_time; alias c_gst_segment_position_from_running_time gst_segment_position_from_running_time; alias c_gst_segment_position_from_running_time_full gst_segment_position_from_running_time_full; alias c_gst_segment_position_from_stream_time gst_segment_position_from_stream_time; alias c_gst_segment_position_from_stream_time_full gst_segment_position_from_stream_time_full; alias c_gst_segment_set_running_time gst_segment_set_running_time; alias c_gst_segment_to_position gst_segment_to_position; alias c_gst_segment_to_running_time gst_segment_to_running_time; alias c_gst_segment_to_running_time_full gst_segment_to_running_time_full; alias c_gst_segment_to_stream_time gst_segment_to_stream_time; alias c_gst_segment_to_stream_time_full gst_segment_to_stream_time_full; // gstreamer.StaticCaps alias c_gst_static_caps_cleanup gst_static_caps_cleanup; alias c_gst_static_caps_get gst_static_caps_get; // gstreamer.StaticPadTemplate alias c_gst_static_pad_template_get gst_static_pad_template_get; alias c_gst_static_pad_template_get_caps gst_static_pad_template_get_caps; // gstreamer.Stream alias c_gst_stream_get_type gst_stream_get_type; alias c_gst_stream_new gst_stream_new; alias c_gst_stream_get_caps gst_stream_get_caps; alias c_gst_stream_get_stream_flags gst_stream_get_stream_flags; alias c_gst_stream_get_stream_id gst_stream_get_stream_id; alias c_gst_stream_get_stream_type gst_stream_get_stream_type; alias c_gst_stream_get_tags gst_stream_get_tags; alias c_gst_stream_set_caps gst_stream_set_caps; alias c_gst_stream_set_stream_flags gst_stream_set_stream_flags; alias c_gst_stream_set_stream_type gst_stream_set_stream_type; alias c_gst_stream_set_tags gst_stream_set_tags; // gstreamer.StreamCollection alias c_gst_stream_collection_get_type gst_stream_collection_get_type; alias c_gst_stream_collection_new gst_stream_collection_new; alias c_gst_stream_collection_add_stream gst_stream_collection_add_stream; alias c_gst_stream_collection_get_size gst_stream_collection_get_size; alias c_gst_stream_collection_get_stream gst_stream_collection_get_stream; alias c_gst_stream_collection_get_upstream_id gst_stream_collection_get_upstream_id; // gstreamer.Structure alias c_gst_structure_get_type gst_structure_get_type; alias c_gst_structure_new gst_structure_new; alias c_gst_structure_new_empty gst_structure_new_empty; alias c_gst_structure_new_from_string gst_structure_new_from_string; alias c_gst_structure_new_id gst_structure_new_id; alias c_gst_structure_new_id_empty gst_structure_new_id_empty; alias c_gst_structure_new_valist gst_structure_new_valist; alias c_gst_structure_can_intersect gst_structure_can_intersect; alias c_gst_structure_copy gst_structure_copy; alias c_gst_structure_filter_and_map_in_place gst_structure_filter_and_map_in_place; alias c_gst_structure_fixate gst_structure_fixate; alias c_gst_structure_fixate_field gst_structure_fixate_field; alias c_gst_structure_fixate_field_boolean gst_structure_fixate_field_boolean; alias c_gst_structure_fixate_field_nearest_double gst_structure_fixate_field_nearest_double; alias c_gst_structure_fixate_field_nearest_fraction gst_structure_fixate_field_nearest_fraction; alias c_gst_structure_fixate_field_nearest_int gst_structure_fixate_field_nearest_int; alias c_gst_structure_fixate_field_string gst_structure_fixate_field_string; alias c_gst_structure_foreach gst_structure_foreach; alias c_gst_structure_free gst_structure_free; alias c_gst_structure_get gst_structure_get; alias c_gst_structure_get_array gst_structure_get_array; alias c_gst_structure_get_boolean gst_structure_get_boolean; alias c_gst_structure_get_clock_time gst_structure_get_clock_time; alias c_gst_structure_get_date gst_structure_get_date; alias c_gst_structure_get_date_time gst_structure_get_date_time; alias c_gst_structure_get_double gst_structure_get_double; alias c_gst_structure_get_enum gst_structure_get_enum; alias c_gst_structure_get_field_type gst_structure_get_field_type; alias c_gst_structure_get_flagset gst_structure_get_flagset; alias c_gst_structure_get_fraction gst_structure_get_fraction; alias c_gst_structure_get_int gst_structure_get_int; alias c_gst_structure_get_int64 gst_structure_get_int64; alias c_gst_structure_get_list gst_structure_get_list; alias c_gst_structure_get_name gst_structure_get_name; alias c_gst_structure_get_name_id gst_structure_get_name_id; alias c_gst_structure_get_string gst_structure_get_string; alias c_gst_structure_get_uint gst_structure_get_uint; alias c_gst_structure_get_uint64 gst_structure_get_uint64; alias c_gst_structure_get_valist gst_structure_get_valist; alias c_gst_structure_get_value gst_structure_get_value; alias c_gst_structure_has_field gst_structure_has_field; alias c_gst_structure_has_field_typed gst_structure_has_field_typed; alias c_gst_structure_has_name gst_structure_has_name; alias c_gst_structure_id_get gst_structure_id_get; alias c_gst_structure_id_get_valist gst_structure_id_get_valist; alias c_gst_structure_id_get_value gst_structure_id_get_value; alias c_gst_structure_id_has_field gst_structure_id_has_field; alias c_gst_structure_id_has_field_typed gst_structure_id_has_field_typed; alias c_gst_structure_id_set gst_structure_id_set; alias c_gst_structure_id_set_valist gst_structure_id_set_valist; alias c_gst_structure_id_set_value gst_structure_id_set_value; alias c_gst_structure_id_take_value gst_structure_id_take_value; alias c_gst_structure_intersect gst_structure_intersect; alias c_gst_structure_is_equal gst_structure_is_equal; alias c_gst_structure_is_subset gst_structure_is_subset; alias c_gst_structure_map_in_place gst_structure_map_in_place; alias c_gst_structure_n_fields gst_structure_n_fields; alias c_gst_structure_nth_field_name gst_structure_nth_field_name; alias c_gst_structure_remove_all_fields gst_structure_remove_all_fields; alias c_gst_structure_remove_field gst_structure_remove_field; alias c_gst_structure_remove_fields gst_structure_remove_fields; alias c_gst_structure_remove_fields_valist gst_structure_remove_fields_valist; alias c_gst_structure_set gst_structure_set; alias c_gst_structure_set_array gst_structure_set_array; alias c_gst_structure_set_list gst_structure_set_list; alias c_gst_structure_set_name gst_structure_set_name; alias c_gst_structure_set_parent_refcount gst_structure_set_parent_refcount; alias c_gst_structure_set_valist gst_structure_set_valist; alias c_gst_structure_set_value gst_structure_set_value; alias c_gst_structure_take_value gst_structure_take_value; alias c_gst_structure_to_string gst_structure_to_string; alias c_gst_structure_from_string gst_structure_from_string; // gstreamer.SystemClock alias c_gst_system_clock_get_type gst_system_clock_get_type; alias c_gst_system_clock_obtain gst_system_clock_obtain; alias c_gst_system_clock_set_default gst_system_clock_set_default; // gstreamer.TagList alias c_gst_tag_get_type gst_tag_get_type; alias c_gst_tag_list_new gst_tag_list_new; alias c_gst_tag_list_new_empty gst_tag_list_new_empty; alias c_gst_tag_list_new_from_string gst_tag_list_new_from_string; alias c_gst_tag_list_new_valist gst_tag_list_new_valist; alias c_gst_tag_list_add gst_tag_list_add; alias c_gst_tag_list_add_valist gst_tag_list_add_valist; alias c_gst_tag_list_add_valist_values gst_tag_list_add_valist_values; alias c_gst_tag_list_add_value gst_tag_list_add_value; alias c_gst_tag_list_add_values gst_tag_list_add_values; alias c_gst_tag_list_foreach gst_tag_list_foreach; alias c_gst_tag_list_get_boolean gst_tag_list_get_boolean; alias c_gst_tag_list_get_boolean_index gst_tag_list_get_boolean_index; alias c_gst_tag_list_get_date gst_tag_list_get_date; alias c_gst_tag_list_get_date_index gst_tag_list_get_date_index; alias c_gst_tag_list_get_date_time gst_tag_list_get_date_time; alias c_gst_tag_list_get_date_time_index gst_tag_list_get_date_time_index; alias c_gst_tag_list_get_double gst_tag_list_get_double; alias c_gst_tag_list_get_double_index gst_tag_list_get_double_index; alias c_gst_tag_list_get_float gst_tag_list_get_float; alias c_gst_tag_list_get_float_index gst_tag_list_get_float_index; alias c_gst_tag_list_get_int gst_tag_list_get_int; alias c_gst_tag_list_get_int64 gst_tag_list_get_int64; alias c_gst_tag_list_get_int64_index gst_tag_list_get_int64_index; alias c_gst_tag_list_get_int_index gst_tag_list_get_int_index; alias c_gst_tag_list_get_pointer gst_tag_list_get_pointer; alias c_gst_tag_list_get_pointer_index gst_tag_list_get_pointer_index; alias c_gst_tag_list_get_sample gst_tag_list_get_sample; alias c_gst_tag_list_get_sample_index gst_tag_list_get_sample_index; alias c_gst_tag_list_get_scope gst_tag_list_get_scope; alias c_gst_tag_list_get_string gst_tag_list_get_string; alias c_gst_tag_list_get_string_index gst_tag_list_get_string_index; alias c_gst_tag_list_get_tag_size gst_tag_list_get_tag_size; alias c_gst_tag_list_get_uint gst_tag_list_get_uint; alias c_gst_tag_list_get_uint64 gst_tag_list_get_uint64; alias c_gst_tag_list_get_uint64_index gst_tag_list_get_uint64_index; alias c_gst_tag_list_get_uint_index gst_tag_list_get_uint_index; alias c_gst_tag_list_get_value_index gst_tag_list_get_value_index; alias c_gst_tag_list_insert gst_tag_list_insert; alias c_gst_tag_list_is_empty gst_tag_list_is_empty; alias c_gst_tag_list_is_equal gst_tag_list_is_equal; alias c_gst_tag_list_merge gst_tag_list_merge; alias c_gst_tag_list_n_tags gst_tag_list_n_tags; alias c_gst_tag_list_nth_tag_name gst_tag_list_nth_tag_name; alias c_gst_tag_list_peek_string_index gst_tag_list_peek_string_index; alias c_gst_tag_list_remove_tag gst_tag_list_remove_tag; alias c_gst_tag_list_set_scope gst_tag_list_set_scope; alias c_gst_tag_list_to_string gst_tag_list_to_string; alias c_gst_tag_list_copy_value gst_tag_list_copy_value; alias c_gst_tag_exists gst_tag_exists; alias c_gst_tag_get_description gst_tag_get_description; alias c_gst_tag_get_flag gst_tag_get_flag; alias c_gst_tag_get_nick gst_tag_get_nick; alias c_gst_tag_is_fixed gst_tag_is_fixed; alias c_gst_tag_merge_strings_with_comma gst_tag_merge_strings_with_comma; alias c_gst_tag_merge_use_first gst_tag_merge_use_first; alias c_gst_tag_register gst_tag_register; alias c_gst_tag_register_static gst_tag_register_static; // gstreamer.TagSetter alias c_gst_tag_setter_get_type gst_tag_setter_get_type; alias c_gst_tag_setter_add_tag_valist gst_tag_setter_add_tag_valist; alias c_gst_tag_setter_add_tag_valist_values gst_tag_setter_add_tag_valist_values; alias c_gst_tag_setter_add_tag_value gst_tag_setter_add_tag_value; alias c_gst_tag_setter_add_tag_values gst_tag_setter_add_tag_values; alias c_gst_tag_setter_add_tags gst_tag_setter_add_tags; alias c_gst_tag_setter_get_tag_list gst_tag_setter_get_tag_list; alias c_gst_tag_setter_get_tag_merge_mode gst_tag_setter_get_tag_merge_mode; alias c_gst_tag_setter_merge_tags gst_tag_setter_merge_tags; alias c_gst_tag_setter_reset_tags gst_tag_setter_reset_tags; alias c_gst_tag_setter_set_tag_merge_mode gst_tag_setter_set_tag_merge_mode; // gstreamer.Task alias c_gst_task_get_type gst_task_get_type; alias c_gst_task_new gst_task_new; alias c_gst_task_cleanup_all gst_task_cleanup_all; alias c_gst_task_get_pool gst_task_get_pool; alias c_gst_task_get_state gst_task_get_state; alias c_gst_task_join gst_task_join; alias c_gst_task_pause gst_task_pause; alias c_gst_task_set_enter_callback gst_task_set_enter_callback; alias c_gst_task_set_leave_callback gst_task_set_leave_callback; alias c_gst_task_set_lock gst_task_set_lock; alias c_gst_task_set_pool gst_task_set_pool; alias c_gst_task_set_state gst_task_set_state; alias c_gst_task_start gst_task_start; alias c_gst_task_stop gst_task_stop; // gstreamer.TaskPool alias c_gst_task_pool_get_type gst_task_pool_get_type; alias c_gst_task_pool_new gst_task_pool_new; alias c_gst_task_pool_cleanup gst_task_pool_cleanup; alias c_gst_task_pool_join gst_task_pool_join; alias c_gst_task_pool_prepare gst_task_pool_prepare; alias c_gst_task_pool_push gst_task_pool_push; // gstreamer.Toc alias c_gst_toc_get_type gst_toc_get_type; alias c_gst_toc_new gst_toc_new; alias c_gst_toc_append_entry gst_toc_append_entry; alias c_gst_toc_dump gst_toc_dump; alias c_gst_toc_find_entry gst_toc_find_entry; alias c_gst_toc_get_entries gst_toc_get_entries; alias c_gst_toc_get_scope gst_toc_get_scope; alias c_gst_toc_get_tags gst_toc_get_tags; alias c_gst_toc_merge_tags gst_toc_merge_tags; alias c_gst_toc_set_tags gst_toc_set_tags; // gstreamer.TocEntry alias c_gst_toc_entry_get_type gst_toc_entry_get_type; alias c_gst_toc_entry_new gst_toc_entry_new; alias c_gst_toc_entry_append_sub_entry gst_toc_entry_append_sub_entry; alias c_gst_toc_entry_get_entry_type gst_toc_entry_get_entry_type; alias c_gst_toc_entry_get_loop gst_toc_entry_get_loop; alias c_gst_toc_entry_get_parent gst_toc_entry_get_parent; alias c_gst_toc_entry_get_start_stop_times gst_toc_entry_get_start_stop_times; alias c_gst_toc_entry_get_sub_entries gst_toc_entry_get_sub_entries; alias c_gst_toc_entry_get_tags gst_toc_entry_get_tags; alias c_gst_toc_entry_get_toc gst_toc_entry_get_toc; alias c_gst_toc_entry_get_uid gst_toc_entry_get_uid; alias c_gst_toc_entry_is_alternative gst_toc_entry_is_alternative; alias c_gst_toc_entry_is_sequence gst_toc_entry_is_sequence; alias c_gst_toc_entry_merge_tags gst_toc_entry_merge_tags; alias c_gst_toc_entry_set_loop gst_toc_entry_set_loop; alias c_gst_toc_entry_set_start_stop_times gst_toc_entry_set_start_stop_times; alias c_gst_toc_entry_set_tags gst_toc_entry_set_tags; // gstreamer.TocSetter alias c_gst_toc_setter_get_type gst_toc_setter_get_type; alias c_gst_toc_setter_get_toc gst_toc_setter_get_toc; alias c_gst_toc_setter_reset gst_toc_setter_reset; alias c_gst_toc_setter_set_toc gst_toc_setter_set_toc; // gstreamer.Tracer alias c_gst_tracer_get_type gst_tracer_get_type; // gstreamer.TracerFactory alias c_gst_tracer_factory_get_type gst_tracer_factory_get_type; alias c_gst_tracer_factory_get_list gst_tracer_factory_get_list; // gstreamer.TracerRecord alias c_gst_tracer_record_get_type gst_tracer_record_get_type; // gstreamer.TypeFind alias c_gst_type_find_get_length gst_type_find_get_length; alias c_gst_type_find_peek gst_type_find_peek; alias c_gst_type_find_suggest gst_type_find_suggest; alias c_gst_type_find_suggest_simple gst_type_find_suggest_simple; alias c_gst_type_find_register gst_type_find_register; alias c_gst_type_find_get_type gst_type_find_get_type; // gstreamer.TypeFindFactory alias c_gst_type_find_factory_get_type gst_type_find_factory_get_type; alias c_gst_type_find_factory_get_list gst_type_find_factory_get_list; alias c_gst_type_find_factory_call_function gst_type_find_factory_call_function; alias c_gst_type_find_factory_get_caps gst_type_find_factory_get_caps; alias c_gst_type_find_factory_get_extensions gst_type_find_factory_get_extensions; alias c_gst_type_find_factory_has_function gst_type_find_factory_has_function; // gstreamer.URIHandler alias c_gst_uri_handler_get_type gst_uri_handler_get_type; alias c_gst_uri_handler_get_protocols gst_uri_handler_get_protocols; alias c_gst_uri_handler_get_uri gst_uri_handler_get_uri; alias c_gst_uri_handler_get_uri_type gst_uri_handler_get_uri_type; alias c_gst_uri_handler_set_uri gst_uri_handler_set_uri; // gstreamer.Uri alias c_gst_uri_get_type gst_uri_get_type; alias c_gst_uri_new gst_uri_new; alias c_gst_uri_append_path gst_uri_append_path; alias c_gst_uri_append_path_segment gst_uri_append_path_segment; alias c_gst_uri_equal gst_uri_equal; alias c_gst_uri_from_string_with_base gst_uri_from_string_with_base; alias c_gst_uri_get_fragment gst_uri_get_fragment; alias c_gst_uri_get_host gst_uri_get_host; alias c_gst_uri_get_media_fragment_table gst_uri_get_media_fragment_table; alias c_gst_uri_get_path gst_uri_get_path; alias c_gst_uri_get_path_segments gst_uri_get_path_segments; alias c_gst_uri_get_path_string gst_uri_get_path_string; alias c_gst_uri_get_port gst_uri_get_port; alias c_gst_uri_get_query_keys gst_uri_get_query_keys; alias c_gst_uri_get_query_string gst_uri_get_query_string; alias c_gst_uri_get_query_table gst_uri_get_query_table; alias c_gst_uri_get_query_value gst_uri_get_query_value; alias c_gst_uri_get_scheme gst_uri_get_scheme; alias c_gst_uri_get_userinfo gst_uri_get_userinfo; alias c_gst_uri_is_normalized gst_uri_is_normalized; alias c_gst_uri_is_writable gst_uri_is_writable; alias c_gst_uri_join gst_uri_join; alias c_gst_uri_make_writable gst_uri_make_writable; alias c_gst_uri_new_with_base gst_uri_new_with_base; alias c_gst_uri_normalize gst_uri_normalize; alias c_gst_uri_query_has_key gst_uri_query_has_key; alias c_gst_uri_remove_query_key gst_uri_remove_query_key; alias c_gst_uri_set_fragment gst_uri_set_fragment; alias c_gst_uri_set_host gst_uri_set_host; alias c_gst_uri_set_path gst_uri_set_path; alias c_gst_uri_set_path_segments gst_uri_set_path_segments; alias c_gst_uri_set_path_string gst_uri_set_path_string; alias c_gst_uri_set_port gst_uri_set_port; alias c_gst_uri_set_query_string gst_uri_set_query_string; alias c_gst_uri_set_query_table gst_uri_set_query_table; alias c_gst_uri_set_query_value gst_uri_set_query_value; alias c_gst_uri_set_scheme gst_uri_set_scheme; alias c_gst_uri_set_userinfo gst_uri_set_userinfo; alias c_gst_uri_to_string gst_uri_to_string; alias c_gst_uri_construct gst_uri_construct; alias c_gst_uri_from_string gst_uri_from_string; alias c_gst_uri_get_location gst_uri_get_location; alias c_gst_uri_get_protocol gst_uri_get_protocol; alias c_gst_uri_has_protocol gst_uri_has_protocol; alias c_gst_uri_is_valid gst_uri_is_valid; alias c_gst_uri_join_strings gst_uri_join_strings; alias c_gst_uri_protocol_is_supported gst_uri_protocol_is_supported; alias c_gst_uri_protocol_is_valid gst_uri_protocol_is_valid; alias c_gst_filename_to_uri gst_filename_to_uri; alias c_gst_uri_error_quark gst_uri_error_quark; // gstreamer.ValueArray alias c_gst_value_array_get_type gst_value_array_get_type; alias c_gst_value_array_append_and_take_value gst_value_array_append_and_take_value; alias c_gst_value_array_append_value gst_value_array_append_value; alias c_gst_value_array_get_size gst_value_array_get_size; alias c_gst_value_array_get_value gst_value_array_get_value; alias c_gst_value_array_prepend_value gst_value_array_prepend_value; // gstreamer.ValueList alias c_gst_value_list_get_type gst_value_list_get_type; alias c_gst_value_list_append_and_take_value gst_value_list_append_and_take_value; alias c_gst_value_list_append_value gst_value_list_append_value; alias c_gst_value_list_concat gst_value_list_concat; alias c_gst_value_list_get_size gst_value_list_get_size; alias c_gst_value_list_get_value gst_value_list_get_value; alias c_gst_value_list_merge gst_value_list_merge; alias c_gst_value_list_prepend_value gst_value_list_prepend_value; // gstreamer.Debug alias c_gst_debug_add_log_function gst_debug_add_log_function; alias c_gst_debug_bin_to_dot_data gst_debug_bin_to_dot_data; alias c_gst_debug_bin_to_dot_file gst_debug_bin_to_dot_file; alias c_gst_debug_bin_to_dot_file_with_ts gst_debug_bin_to_dot_file_with_ts; alias c_gst_debug_construct_term_color gst_debug_construct_term_color; alias c_gst_debug_construct_win_color gst_debug_construct_win_color; alias c_gst_debug_get_all_categories gst_debug_get_all_categories; alias c_gst_debug_get_color_mode gst_debug_get_color_mode; alias c_gst_debug_get_default_threshold gst_debug_get_default_threshold; alias c_gst_debug_is_active gst_debug_is_active; alias c_gst_debug_is_colored gst_debug_is_colored; alias c_gst_debug_level_get_name gst_debug_level_get_name; alias c_gst_debug_log gst_debug_log; alias c_gst_debug_log_default gst_debug_log_default; alias c_gst_debug_log_valist gst_debug_log_valist; alias c_gst_debug_print_stack_trace gst_debug_print_stack_trace; alias c_gst_debug_remove_log_function gst_debug_remove_log_function; alias c_gst_debug_remove_log_function_by_data gst_debug_remove_log_function_by_data; alias c_gst_debug_set_active gst_debug_set_active; alias c_gst_debug_set_color_mode gst_debug_set_color_mode; alias c_gst_debug_set_color_mode_from_string gst_debug_set_color_mode_from_string; alias c_gst_debug_set_colored gst_debug_set_colored; alias c_gst_debug_set_default_threshold gst_debug_set_default_threshold; alias c_gst_debug_set_threshold_for_name gst_debug_set_threshold_for_name; alias c_gst_debug_set_threshold_from_string gst_debug_set_threshold_from_string; alias c_gst_debug_unset_threshold_for_name gst_debug_unset_threshold_for_name; // gstreamer.GError alias c_gst_error_get_message gst_error_get_message; // gstreamer.Format alias c_gst_format_get_by_nick gst_format_get_by_nick; alias c_gst_format_get_details gst_format_get_details; alias c_gst_format_get_name gst_format_get_name; alias c_gst_format_iterate_definitions gst_format_iterate_definitions; alias c_gst_format_register gst_format_register; alias c_gst_format_to_quark gst_format_to_quark; alias c_gst_formats_contains gst_formats_contains; // gstreamer.GStreamer alias c_gst_deinit gst_deinit; alias c_gst_init gst_init; alias c_gst_init_check gst_init_check; alias c_gst_init_get_option_group gst_init_get_option_group; alias c_gst_is_initialized gst_is_initialized; alias c_gst_segtrap_is_enabled gst_segtrap_is_enabled; alias c_gst_segtrap_set_enabled gst_segtrap_set_enabled; alias c_gst_update_registry gst_update_registry; alias c_gst_version gst_version; alias c_gst_version_string gst_version_string; // gstreamer.Parse alias c_gst_parse_bin_from_description gst_parse_bin_from_description; alias c_gst_parse_bin_from_description_full gst_parse_bin_from_description_full; alias c_gst_parse_error_quark gst_parse_error_quark; alias c_gst_parse_launch gst_parse_launch; alias c_gst_parse_launch_full gst_parse_launch_full; alias c_gst_parse_launchv gst_parse_launchv; alias c_gst_parse_launchv_full gst_parse_launchv_full; // gstreamer.Utils alias c_gst_util_array_binary_search gst_util_array_binary_search; alias c_gst_util_double_to_fraction gst_util_double_to_fraction; alias c_gst_util_dump_mem gst_util_dump_mem; alias c_gst_util_fraction_add gst_util_fraction_add; alias c_gst_util_fraction_compare gst_util_fraction_compare; alias c_gst_util_fraction_multiply gst_util_fraction_multiply; alias c_gst_util_fraction_to_double gst_util_fraction_to_double; alias c_gst_util_gdouble_to_guint64 gst_util_gdouble_to_guint64; alias c_gst_util_get_timestamp gst_util_get_timestamp; alias c_gst_util_greatest_common_divisor gst_util_greatest_common_divisor; alias c_gst_util_greatest_common_divisor_int64 gst_util_greatest_common_divisor_int64; alias c_gst_util_group_id_next gst_util_group_id_next; alias c_gst_util_guint64_to_gdouble gst_util_guint64_to_gdouble; alias c_gst_util_seqnum_compare gst_util_seqnum_compare; alias c_gst_util_seqnum_next gst_util_seqnum_next; alias c_gst_util_set_object_arg gst_util_set_object_arg; alias c_gst_util_set_value_from_string gst_util_set_value_from_string; alias c_gst_util_uint64_scale gst_util_uint64_scale; alias c_gst_util_uint64_scale_ceil gst_util_uint64_scale_ceil; alias c_gst_util_uint64_scale_int gst_util_uint64_scale_int; alias c_gst_util_uint64_scale_int_ceil gst_util_uint64_scale_int_ceil; alias c_gst_util_uint64_scale_int_round gst_util_uint64_scale_int_round; alias c_gst_util_uint64_scale_round gst_util_uint64_scale_round; alias c_gst_calculate_linear_regression gst_calculate_linear_regression; alias c_gst_dynamic_type_register gst_dynamic_type_register; alias c_gst_util_get_object_array gst_util_get_object_array; alias c_gst_util_set_object_array gst_util_set_object_array; // gstreamer.ValueGst alias c_gst_value_can_compare gst_value_can_compare; alias c_gst_value_can_intersect gst_value_can_intersect; alias c_gst_value_can_subtract gst_value_can_subtract; alias c_gst_value_can_union gst_value_can_union; alias c_gst_value_compare gst_value_compare; alias c_gst_value_deserialize gst_value_deserialize; alias c_gst_value_fixate gst_value_fixate; alias c_gst_value_fraction_multiply gst_value_fraction_multiply; alias c_gst_value_fraction_subtract gst_value_fraction_subtract; alias c_gst_value_get_bitmask gst_value_get_bitmask; alias c_gst_value_get_caps gst_value_get_caps; alias c_gst_value_get_caps_features gst_value_get_caps_features; alias c_gst_value_get_double_range_max gst_value_get_double_range_max; alias c_gst_value_get_double_range_min gst_value_get_double_range_min; alias c_gst_value_get_flagset_flags gst_value_get_flagset_flags; alias c_gst_value_get_flagset_mask gst_value_get_flagset_mask; alias c_gst_value_set_flagset gst_value_set_flagset; alias c_gst_value_get_fraction_denominator gst_value_get_fraction_denominator; alias c_gst_value_get_fraction_numerator gst_value_get_fraction_numerator; alias c_gst_value_get_fraction_range_max gst_value_get_fraction_range_max; alias c_gst_value_get_fraction_range_min gst_value_get_fraction_range_min; alias c_gst_value_get_int64_range_max gst_value_get_int64_range_max; alias c_gst_value_get_int64_range_min gst_value_get_int64_range_min; alias c_gst_value_get_int64_range_step gst_value_get_int64_range_step; alias c_gst_value_get_int_range_max gst_value_get_int_range_max; alias c_gst_value_get_int_range_min gst_value_get_int_range_min; alias c_gst_value_get_int_range_step gst_value_get_int_range_step; alias c_gst_value_get_structure gst_value_get_structure; alias c_gst_value_init_and_copy gst_value_init_and_copy; alias c_gst_value_intersect gst_value_intersect; alias c_gst_value_is_fixed gst_value_is_fixed; alias c_gst_value_is_subset gst_value_is_subset; alias c_gst_value_register gst_value_register; alias c_gst_value_serialize gst_value_serialize; alias c_gst_value_set_bitmask gst_value_set_bitmask; alias c_gst_value_set_caps gst_value_set_caps; alias c_gst_value_set_caps_features gst_value_set_caps_features; alias c_gst_value_set_double_range gst_value_set_double_range; alias c_gst_value_set_fraction gst_value_set_fraction; alias c_gst_value_set_fraction_range gst_value_set_fraction_range; alias c_gst_value_set_fraction_range_full gst_value_set_fraction_range_full; alias c_gst_value_set_int64_range gst_value_set_int64_range; alias c_gst_value_set_int64_range_step gst_value_set_int64_range_step; alias c_gst_value_set_int_range gst_value_set_int_range; alias c_gst_value_set_int_range_step gst_value_set_int_range_step; alias c_gst_value_set_structure gst_value_set_structure; alias c_gst_value_subtract gst_value_subtract; alias c_gst_value_union gst_value_union; GtkD-3.7.5/generated/gstreamer/gstreamer/c/types.d000066400000000000000000005456651324604450400220610ustar00rootroot00000000000000/* * 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 gstreamer.c.types; public import glib.c.types; public import gobject.c.types; /** * A datatype to hold the handle to an outstanding sync or async clock callback. */ public alias void* GstClockID; /** * A datatype to hold a time, measured in nanoseconds. */ public alias ulong GstClockTime; /** * A datatype to hold a time difference, measured in nanoseconds. */ public alias long GstClockTimeDiff; public alias ulong GstElementFactoryListType; /** * Flags for allocators. */ public enum GstAllocatorFlags { /** * The allocator has a custom alloc function. */ CUSTOM_ALLOC = 16, /** * first flag that can be used for custom purposes */ LAST = 1048576, } alias GstAllocatorFlags AllocatorFlags; /** * GstBinFlags are a set of flags specific to bins. Most are set/used * internally. They can be checked using the GST_OBJECT_FLAG_IS_SET () macro, * and (un)set using GST_OBJECT_FLAG_SET () and GST_OBJECT_FLAG_UNSET (). */ public enum GstBinFlags { /** * don't resync a state change when elements are * added or linked in the bin (Since 1.0.5) */ NO_RESYNC = 16384, /** * Indicates whether the bin can handle elements * that add/remove source pads at any point in time without * first posting a no-more-pads signal (Since 1.10) */ STREAMS_AWARE = 32768, /** * the last enum in the series of flags for bins. * Derived classes can use this as first value in a list of flags. */ LAST = 524288, } alias GstBinFlags BinFlags; /** * A set of flags that can be provided to the gst_buffer_copy_into() * function to specify which items should be copied. */ public enum GstBufferCopyFlags { /** * copy nothing */ NONE = 0, /** * flag indicating that buffer flags should be copied */ FLAGS = 1, /** * flag indicating that buffer pts, dts, * duration, offset and offset_end should be copied */ TIMESTAMPS = 2, /** * flag indicating that buffer meta should be * copied */ META = 4, /** * flag indicating that buffer memory should be reffed * and appended to already existing memory. Unless the memory is marked as * NO_SHARE, no actual copy of the memory is made but it is simply reffed. * Add @GST_BUFFER_COPY_DEEP to force a real copy. */ MEMORY = 8, /** * flag indicating that buffer memory should be * merged */ MERGE = 16, /** * flag indicating that memory should always be * copied instead of reffed (Since 1.2) */ DEEP = 32, } alias GstBufferCopyFlags BufferCopyFlags; /** * A set of buffer flags used to describe properties of a #GstBuffer. */ public enum GstBufferFlags { /** * the buffer is live data and should be discarded in * the PAUSED state. */ LIVE = 16, /** * the buffer contains data that should be dropped * because it will be clipped against the segment * boundaries or because it does not contain data * that should be shown to the user. */ DECODE_ONLY = 32, /** * the buffer marks a data discontinuity in the stream. * This typically occurs after a seek or a dropped buffer * from a live or network source. */ DISCONT = 64, /** * the buffer timestamps might have a discontinuity * and this buffer is a good point to resynchronize. */ RESYNC = 128, /** * the buffer data is corrupted. */ CORRUPTED = 256, /** * the buffer contains a media specific marker. for * video this is typically the end of a frame boundary, for audio * this is usually the start of a talkspurt. */ MARKER = 512, /** * the buffer contains header information that is * needed to decode the following data. */ HEADER = 1024, /** * the buffer has been created to fill a gap in the * stream and contains media neutral data (elements can * switch to optimized code path that ignores the buffer * content). */ GAP = 2048, /** * the buffer can be dropped without breaking the * stream, for example to reduce bandwidth. */ DROPPABLE = 4096, /** * this unit cannot be decoded independently. */ DELTA_UNIT = 8192, /** * this flag is set when memory of the buffer * is added/removed */ TAG_MEMORY = 16384, /** * Elements which write to disk or permanent * storage should ensure the data is synced after * writing the contents of this buffer. (Since 1.6) */ SYNC_AFTER = 32768, /** * additional media specific flags can be added starting from * this flag. */ LAST = 1048576, } alias GstBufferFlags BufferFlags; /** * Additional flags to control the allocation of a buffer */ public enum GstBufferPoolAcquireFlags { /** * no flags */ NONE = 0, /** * buffer is keyframe */ KEY_UNIT = 1, /** * when the bufferpool is empty, acquire_buffer * will by default block until a buffer is released into the pool again. Setting * this flag makes acquire_buffer return #GST_FLOW_EOS instead of blocking. */ DONTWAIT = 2, /** * buffer is discont */ DISCONT = 4, /** * last flag, subclasses can use private flags * starting from this value. */ LAST = 65536, } alias GstBufferPoolAcquireFlags BufferPoolAcquireFlags; /** * The different types of buffering methods. */ public enum GstBufferingMode { /** * a small amount of data is buffered */ STREAM = 0, /** * the stream is being downloaded */ DOWNLOAD = 1, /** * the stream is being downloaded in a ringbuffer */ TIMESHIFT = 2, /** * the stream is a live stream */ LIVE = 3, } alias GstBufferingMode BufferingMode; /** * The standard flags that a bus may have. */ public enum GstBusFlags { /** * The bus is currently dropping all messages */ FLUSHING = 16, /** * offset to define more flags */ FLAG_LAST = 32, } alias GstBusFlags BusFlags; /** * The result values for a GstBusSyncHandler. */ public enum GstBusSyncReply { /** * drop the message */ DROP = 0, /** * pass the message to the async queue */ PASS = 1, /** * pass message to async queue, continue if message is handled */ ASYNC = 2, } alias GstBusSyncReply BusSyncReply; /** * Extra flags for a caps. */ public enum GstCapsFlags { /** * Caps has no specific content, but can contain * anything. */ ANY = 16, } alias GstCapsFlags CapsFlags; /** * Modes of caps intersection * * @GST_CAPS_INTERSECT_ZIG_ZAG tries to preserve overall order of both caps * by iterating on the caps' structures as the following matrix shows: * |[ * caps1 * +------------- * | 1 2 4 7 * caps2 | 3 5 8 10 * | 6 9 11 12 * ]| * Used when there is no explicit precedence of one caps over the other. e.g. * tee's sink pad getcaps function, it will probe its src pad peers' for their * caps and intersect them with this mode. * * @GST_CAPS_INTERSECT_FIRST is useful when an element wants to preserve * another element's caps priority order when intersecting with its own caps. * Example: If caps1 is [A, B, C] and caps2 is [E, B, D, A], the result * would be [A, B], maintaining the first caps priority on the intersection. */ public enum GstCapsIntersectMode { /** * Zig-zags over both caps. */ ZIG_ZAG = 0, /** * Keeps the first caps order. */ FIRST = 1, } alias GstCapsIntersectMode CapsIntersectMode; /** * The type of the clock entry */ public enum GstClockEntryType { /** * a single shot timeout */ SINGLE = 0, /** * a periodic timeout request */ PERIODIC = 1, } alias GstClockEntryType ClockEntryType; /** * The capabilities of this clock */ public enum GstClockFlags { /** * clock can do a single sync timeout request */ CAN_DO_SINGLE_SYNC = 16, /** * clock can do a single async timeout request */ CAN_DO_SINGLE_ASYNC = 32, /** * clock can do sync periodic timeout requests */ CAN_DO_PERIODIC_SYNC = 64, /** * clock can do async periodic timeout callbacks */ CAN_DO_PERIODIC_ASYNC = 128, /** * clock's resolution can be changed */ CAN_SET_RESOLUTION = 256, /** * clock can be slaved to a master clock */ CAN_SET_MASTER = 512, /** * clock needs to be synced before it can be used * (Since 1.6) */ NEEDS_STARTUP_SYNC = 1024, /** * subclasses can add additional flags starting from this flag */ LAST = 4096, } alias GstClockFlags ClockFlags; /** * The return value of a clock operation. */ public enum GstClockReturn { /** * The operation succeeded. */ OK = 0, /** * The operation was scheduled too late. */ EARLY = 1, /** * The clockID was unscheduled */ UNSCHEDULED = 2, /** * The ClockID is busy */ BUSY = 3, /** * A bad time was provided to a function. */ BADTIME = 4, /** * An error occurred */ ERROR = 5, /** * Operation is not supported */ UNSUPPORTED = 6, /** * The ClockID is done waiting */ DONE = 7, } alias GstClockReturn ClockReturn; /** * The different kind of clocks. */ public enum GstClockType { /** * time since Epoch */ REALTIME = 0, /** * monotonic time since some unspecified starting * point */ MONOTONIC = 1, /** * some other time source is used (Since 1.0.5) */ OTHER = 2, } alias GstClockType ClockType; /** * Core errors are errors inside the core GStreamer library. */ public enum GstCoreError { /** * a general error which doesn't fit in any other * category. Make sure you add a custom message to the error call. */ FAILED = 1, /** * do not use this except as a placeholder for * deciding where to go while developing code. */ TOO_LAZY = 2, /** * use this when you do not want to implement * this functionality yet. */ NOT_IMPLEMENTED = 3, /** * used for state change errors. */ STATE_CHANGE = 4, /** * used for pad-related errors. */ PAD = 5, /** * used for thread-related errors. */ THREAD = 6, /** * used for negotiation-related errors. */ NEGOTIATION = 7, /** * used for event-related errors. */ EVENT = 8, /** * used for seek-related errors. */ SEEK = 9, /** * used for caps-related errors. */ CAPS = 10, /** * used for negotiation-related errors. */ TAG = 11, /** * used if a plugin is missing. */ MISSING_PLUGIN = 12, /** * used for clock related errors. */ CLOCK = 13, /** * used if functionality has been disabled at * compile time. */ DISABLED = 14, /** * the number of core error types. */ NUM_ERRORS = 15, } alias GstCoreError CoreError; /** * These are some terminal style flags you can use when creating your * debugging categories to make them stand out in debugging output. */ public enum GstDebugColorFlags { /** * Use black as foreground color. */ FG_BLACK = 0, /** * Use red as foreground color. */ FG_RED = 1, /** * Use green as foreground color. */ FG_GREEN = 2, /** * Use yellow as foreground color. */ FG_YELLOW = 3, /** * Use blue as foreground color. */ FG_BLUE = 4, /** * Use magenta as foreground color. */ FG_MAGENTA = 5, /** * Use cyan as foreground color. */ FG_CYAN = 6, /** * Use white as foreground color. */ FG_WHITE = 7, /** * Use black as background color. */ BG_BLACK = 0, /** * Use red as background color. */ BG_RED = 16, /** * Use green as background color. */ BG_GREEN = 32, /** * Use yellow as background color. */ BG_YELLOW = 48, /** * Use blue as background color. */ BG_BLUE = 64, /** * Use magenta as background color. */ BG_MAGENTA = 80, /** * Use cyan as background color. */ BG_CYAN = 96, /** * Use white as background color. */ BG_WHITE = 112, /** * Make the output bold. */ BOLD = 256, /** * Underline the output. */ UNDERLINE = 512, } alias GstDebugColorFlags DebugColorFlags; public enum GstDebugColorMode { /** * Do not use colors in logs. */ OFF = 0, /** * Paint logs in a platform-specific way. */ ON = 1, /** * Paint logs with UNIX terminal color codes * no matter what platform GStreamer is running on. */ UNIX = 2, } alias GstDebugColorMode DebugColorMode; /** * Available details for pipeline graphs produced by GST_DEBUG_BIN_TO_DOT_FILE() * and GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(). */ public enum GstDebugGraphDetails { /** * show caps-name on edges */ MEDIA_TYPE = 1, /** * show caps-details on edges */ CAPS_DETAILS = 2, /** * show modified parameters on * elements */ NON_DEFAULT_PARAMS = 4, /** * show element states */ STATES = 8, /** * show full element parameter values even * if they are very long */ FULL_PARAMS = 16, /** * show all the typical details that one might want */ ALL = 15, /** * show all details regardless of how large or * verbose they make the resulting output */ VERBOSE = -1, } alias GstDebugGraphDetails DebugGraphDetails; /** * The level defines the importance of a debugging message. The more important a * message is, the greater the probability that the debugging system outputs it. */ public enum GstDebugLevel { /** * No debugging level specified or desired. Used to deactivate * debugging output. */ NONE = 0, /** * Error messages are to be used only when an error occurred * that stops the application from keeping working correctly. * An examples is gst_element_error, which outputs a message with this priority. * It does not mean that the application is terminating as with g_error. */ ERROR = 1, /** * Warning messages are to inform about abnormal behaviour * that could lead to problems or weird behaviour later on. An example of this * would be clocking issues ("your computer is pretty slow") or broken input * data ("Can't synchronize to stream.") */ WARNING = 2, /** * Fixme messages are messages that indicate that something * in the executed code path is not fully implemented or handled yet. Note * that this does not replace proper error handling in any way, the purpose * of this message is to make it easier to spot incomplete/unfinished pieces * of code when reading the debug log. */ FIXME = 3, /** * Informational messages should be used to keep the developer * updated about what is happening. * Examples where this should be used are when a typefind function has * successfully determined the type of the stream or when an mp3 plugin detects * the format to be used. ("This file has mono sound.") */ INFO = 4, /** * Debugging messages should be used when something common * happens that is not the expected default behavior, or something that's * useful to know but doesn't happen all the time (ie. per loop iteration or * buffer processed or event handled). * An example would be notifications about state changes or receiving/sending * of events. */ DEBUG = 5, /** * Log messages are messages that are very common but might be * useful to know. As a rule of thumb a pipeline that is running as expected * should never output anything else but LOG messages whilst processing data. * Use this log level to log recurring information in chain functions and * loop functions, for example. */ LOG = 6, /** * Tracing-related messages. * Examples for this are referencing/dereferencing of objects. */ TRACE = 7, /** * memory dump messages are used to log (small) chunks of * data as memory dumps in the log. They will be displayed as hexdump with * ASCII characters. */ MEMDUMP = 9, /** * The number of defined debugging levels. */ COUNT = 10, } alias GstDebugLevel DebugLevel; /** * The standard flags that an element may have. */ public enum GstElementFlags { /** * ignore state changes from parent */ LOCKED_STATE = 16, /** * the element is a sink */ SINK = 32, /** * the element is a source. */ SOURCE = 64, /** * the element can provide a clock */ PROVIDE_CLOCK = 128, /** * the element requires a clock */ REQUIRE_CLOCK = 256, /** * the element can use an index */ INDEXABLE = 512, /** * offset to define more flags */ LAST = 16384, } alias GstElementFlags ElementFlags; /** * #GstEventType lists the standard event types that can be sent in a pipeline. * * The custom event types can be used for private messages between elements * that can't be expressed using normal * GStreamer buffer passing semantics. Custom events carry an arbitrary * #GstStructure. * Specific custom events are distinguished by the name of the structure. */ public enum GstEventType { /** * unknown event. */ UNKNOWN = 0, /** * Start a flush operation. This event clears all data * from the pipeline and unblock all streaming threads. */ FLUSH_START = 2563, /** * Stop a flush operation. This event resets the * running-time of the pipeline. */ FLUSH_STOP = 5127, /** * Event to mark the start of a new stream. Sent before any * other serialized event and only sent at the start of a new stream, * not after flushing seeks. */ STREAM_START = 10254, /** * #GstCaps event. Notify the pad of a new media type. */ CAPS = 12814, /** * A new media segment follows in the dataflow. The * segment events contains information for clipping buffers and * converting buffer timestamps to running-time and * stream-time. */ SEGMENT = 17934, /** * A new #GstStreamCollection is available (Since 1.10) */ STREAM_COLLECTION = 19230, /** * A new set of metadata tags has been found in the stream. */ TAG = 20510, /** * Notification of buffering requirements. Currently not * used yet. */ BUFFERSIZE = 23054, /** * An event that sinks turn into a message. Used to * send messages that should be emitted in sync with * rendering. */ SINK_MESSAGE = 25630, /** * Indicates that there is no more data for * the stream group ID in the message. Sent before EOS * in some instances and should be handled mostly the same. (Since 1.10) */ STREAM_GROUP_DONE = 26894, /** * End-Of-Stream. No more data is to be expected to follow * without either a STREAM_START event, or a FLUSH_STOP and a SEGMENT * event. */ EOS = 28174, /** * An event which indicates that a new table of contents (TOC) * was found or updated. */ TOC = 30750, /** * An event which indicates that new or updated * encryption information has been found in the stream. */ PROTECTION = 33310, /** * Marks the end of a segment playback. */ SEGMENT_DONE = 38406, /** * Marks a gap in the datastream. */ GAP = 40966, /** * A quality message. Used to indicate to upstream elements * that the downstream elements should adjust their processing * rate. */ QOS = 48641, /** * A request for a new playback position and rate. */ SEEK = 51201, /** * Navigation events are usually used for communicating * user requests, such as mouse or keyboard movements, * to upstream elements. */ NAVIGATION = 53761, /** * Notification of new latency adjustment. Sinks will use * the latency information to adjust their synchronisation. */ LATENCY = 56321, /** * A request for stepping through the media. Sinks will usually * execute the step operation. */ STEP = 58881, /** * A request for upstream renegotiating caps and reconfiguring. */ RECONFIGURE = 61441, /** * A request for a new playback position based on TOC * entry's UID. */ TOC_SELECT = 64001, /** * A request to select one or more streams (Since 1.10) */ SELECT_STREAMS = 66561, /** * Upstream custom event */ CUSTOM_UPSTREAM = 69121, /** * Downstream custom event that travels in the * data flow. */ CUSTOM_DOWNSTREAM = 71686, /** * Custom out-of-band downstream event. */ CUSTOM_DOWNSTREAM_OOB = 74242, /** * Custom sticky downstream event. */ CUSTOM_DOWNSTREAM_STICKY = 76830, /** * Custom upstream or downstream event. * In-band when travelling downstream. */ CUSTOM_BOTH = 79367, /** * Custom upstream or downstream out-of-band event. */ CUSTOM_BOTH_OOB = 81923, } alias GstEventType EventType; /** * #GstEventTypeFlags indicate the aspects of the different #GstEventType * values. You can get the type flags of a #GstEventType with the * gst_event_type_get_flags() function. */ public enum GstEventTypeFlags { /** * Set if the event can travel upstream. */ UPSTREAM = 1, /** * Set if the event can travel downstream. */ DOWNSTREAM = 2, /** * Set if the event should be serialized with data * flow. */ SERIALIZED = 4, /** * Set if the event is sticky on the pads. */ STICKY = 8, /** * Multiple sticky events can be on a pad, each * identified by the event name. */ STICKY_MULTI = 16, } alias GstEventTypeFlags EventTypeFlags; /** * The result of passing data to a pad. * * Note that the custom return values should not be exposed outside of the * element scope. */ public enum GstFlowReturn { /** * Pre-defined custom success code. */ CUSTOM_SUCCESS_2 = 102, /** * Pre-defined custom success code (define your * custom success code to this to avoid compiler * warnings). */ CUSTOM_SUCCESS_1 = 101, /** * Elements can use values starting from * this (and higher) to define custom success * codes. */ CUSTOM_SUCCESS = 100, /** * Data passing was ok. */ OK = 0, /** * Pad is not linked. */ NOT_LINKED = -1, /** * Pad is flushing. */ FLUSHING = -2, /** * Pad is EOS. */ EOS = -3, /** * Pad is not negotiated. */ NOT_NEGOTIATED = -4, /** * Some (fatal) error occurred. Element generating * this error should post an error message with more * details. */ ERROR = -5, /** * This operation is not supported. */ NOT_SUPPORTED = -6, /** * Elements can use values starting from * this (and lower) to define custom error codes. */ CUSTOM_ERROR = -100, /** * Pre-defined custom error code (define your * custom error code to this to avoid compiler * warnings). */ CUSTOM_ERROR_1 = -101, /** * Pre-defined custom error code. */ CUSTOM_ERROR_2 = -102, } alias GstFlowReturn FlowReturn; /** * Standard predefined formats */ public enum GstFormat { /** * undefined format */ UNDEFINED = 0, /** * the default format of the pad/element. This can be * samples for raw audio, frames/fields for raw video (some, but not all, * elements support this; use @GST_FORMAT_TIME if you don't have a good * reason to query for samples/frames) */ DEFAULT = 1, /** * bytes */ BYTES = 2, /** * time in nanoseconds */ TIME = 3, /** * buffers (few, if any, elements implement this as of * May 2009) */ BUFFERS = 4, /** * percentage of stream (few, if any, elements implement * this as of May 2009) */ PERCENT = 5, } alias GstFormat Format; /** * The result of a #GstIteratorItemFunction. */ public enum GstIteratorItem { /** * Skip this item */ SKIP = 0, /** * Return item */ PASS = 1, /** * Stop after this item. */ END = 2, } alias GstIteratorItem IteratorItem; /** * The result of gst_iterator_next(). */ public enum GstIteratorResult { /** * No more items in the iterator */ DONE = 0, /** * An item was retrieved */ OK = 1, /** * Datastructure changed while iterating */ RESYNC = 2, /** * An error happened */ ERROR = 3, } alias GstIteratorResult IteratorResult; /** * Library errors are for errors from the library being used by elements * (initializing, finalizing, settings, ...) */ public enum GstLibraryError { /** * a general error which doesn't fit in any other * category. Make sure you add a custom message to the error call. */ FAILED = 1, /** * do not use this except as a placeholder for * deciding where to go while developing code. */ TOO_LAZY = 2, /** * used when the library could not be opened. */ INIT = 3, /** * used when the library could not be closed. */ SHUTDOWN = 4, /** * used when the library doesn't accept settings. */ SETTINGS = 5, /** * used when the library generated an encoding error. */ ENCODE = 6, /** * the number of library error types. */ NUM_ERRORS = 7, } alias GstLibraryError LibraryError; /** * Flags used when locking miniobjects */ public enum GstLockFlags { /** * lock for read access */ READ = 1, /** * lock for write access */ WRITE = 2, /** * lock for exclusive access */ EXCLUSIVE = 4, /** * first flag that can be used for custom purposes */ LAST = 256, } alias GstLockFlags LockFlags; /** * Flags used when mapping memory */ public enum GstMapFlags { /** * map for read access */ READ = 1, /** * map for write access */ WRITE = 2, /** * first flag that can be used for custom purposes */ FLAG_LAST = 65536, } alias GstMapFlags MapFlags; /** * Flags for wrapped memory. */ public enum GstMemoryFlags { /** * memory is readonly. It is not allowed to map the * memory with #GST_MAP_WRITE. */ READONLY = 2, /** * memory must not be shared. Copies will have to be * made when this memory needs to be shared between buffers. */ NO_SHARE = 16, /** * the memory prefix is filled with 0 bytes */ ZERO_PREFIXED = 32, /** * the memory padding is filled with 0 bytes */ ZERO_PADDED = 64, /** * the memory is physically contiguous. (Since 1.2) */ PHYSICALLY_CONTIGUOUS = 128, /** * the memory can't be mapped via gst_memory_map() without any preconditions. (Since 1.2) */ NOT_MAPPABLE = 256, /** * first flag that can be used for custom purposes */ LAST = 1048576, } alias GstMemoryFlags MemoryFlags; /** * The different message types that are available. */ public enum GstMessageType : uint { /** * an undefined message */ UNKNOWN = 0, /** * end-of-stream reached in a pipeline. The application will * only receive this message in the PLAYING state and every time it sets a * pipeline to PLAYING that is in the EOS state. The application can perform a * flushing seek in the pipeline, which will undo the EOS state again. */ EOS = 1, /** * an error occurred. When the application receives an error * message it should stop playback of the pipeline and not assume that more * data will be played. */ ERROR = 2, /** * a warning occurred. */ WARNING = 4, /** * an info message occurred */ INFO = 8, /** * a tag was found. */ TAG = 16, /** * the pipeline is buffering. When the application * receives a buffering message in the PLAYING state for a non-live pipeline it * must PAUSE the pipeline until the buffering completes, when the percentage * field in the message is 100%. For live pipelines, no action must be * performed and the buffering percentage can be used to inform the user about * the progress. */ BUFFERING = 32, /** * a state change happened */ STATE_CHANGED = 64, /** * an element changed state in a streaming thread. * This message is deprecated. */ STATE_DIRTY = 128, /** * a stepping operation finished. */ STEP_DONE = 256, /** * an element notifies its capability of providing * a clock. This message is used internally and * never forwarded to the application. */ CLOCK_PROVIDE = 512, /** * The current clock as selected by the pipeline became * unusable. The pipeline will select a new clock on * the next PLAYING state change. The application * should set the pipeline to PAUSED and back to * PLAYING when this message is received. */ CLOCK_LOST = 1024, /** * a new clock was selected in the pipeline. */ NEW_CLOCK = 2048, /** * the structure of the pipeline changed. This * message is used internally and never forwarded to the application. */ STRUCTURE_CHANGE = 4096, /** * status about a stream, emitted when it starts, * stops, errors, etc.. */ STREAM_STATUS = 8192, /** * message posted by the application, possibly * via an application-specific element. */ APPLICATION = 16384, /** * element-specific message, see the specific element's * documentation */ ELEMENT = 32768, /** * pipeline started playback of a segment. This * message is used internally and never forwarded to the application. */ SEGMENT_START = 65536, /** * pipeline completed playback of a segment. This * message is forwarded to the application after all elements that posted * @GST_MESSAGE_SEGMENT_START posted a GST_MESSAGE_SEGMENT_DONE message. */ SEGMENT_DONE = 131072, /** * The duration of a pipeline changed. The * application can get the new duration with a duration query. */ DURATION_CHANGED = 262144, /** * Posted by elements when their latency changes. The * application should recalculate and distribute a new latency. */ LATENCY = 524288, /** * Posted by elements when they start an ASYNC * #GstStateChange. This message is not forwarded to the application but is used * internally. */ ASYNC_START = 1048576, /** * Posted by elements when they complete an ASYNC * #GstStateChange. The application will only receive this message from the toplevel * pipeline. */ ASYNC_DONE = 2097152, /** * Posted by elements when they want the pipeline to * change state. This message is a suggestion to the application which can * decide to perform the state change on (part of) the pipeline. */ REQUEST_STATE = 4194304, /** * A stepping operation was started. */ STEP_START = 8388608, /** * A buffer was dropped or an element changed its processing * strategy for Quality of Service reasons. */ QOS = 16777216, /** * A progress message. */ PROGRESS = 33554432, /** * A new table of contents (TOC) was found or previously found TOC * was updated. */ TOC = 67108864, /** * Message to request resetting the pipeline's * running time from the pipeline. This is an internal message which * applications will likely never receive. */ RESET_TIME = 134217728, /** * Message indicating start of a new stream. Useful * e.g. when using playbin in gapless playback mode, to get notified when * the next title actually starts playing (which will be some time after * the URI for the next title has been set). */ STREAM_START = 268435456, /** * Message indicating that an element wants a specific context (Since 1.2) */ NEED_CONTEXT = 536870912, /** * Message indicating that an element created a context (Since 1.2) */ HAVE_CONTEXT = 1073741824, /** * Message is an extended message type (see below). * These extended message IDs can't be used directly with mask-based API * like gst_bus_poll() or gst_bus_timed_pop_filtered(), but you can still * filter for GST_MESSAGE_EXTENDED and then check the result for the * specific type. (Since 1.4) */ EXTENDED = 2147483648, /** * Message indicating a #GstDevice was added to * a #GstDeviceProvider (Since 1.4) */ DEVICE_ADDED = 2147483649, /** * Message indicating a #GstDevice was removed * from a #GstDeviceProvider (Since 1.4) */ DEVICE_REMOVED = 2147483650, /** * Message indicating a #GObject property has * changed (Since 1.10) */ PROPERTY_NOTIFY = 2147483651, /** * Message indicating a new #GstStreamCollection * is available (Since 1.10) */ STREAM_COLLECTION = 2147483652, /** * Message indicating the active selection of * #GstStreams has changed (Since 1.10) */ STREAMS_SELECTED = 2147483653, /** * Message indicating to request the application to * try to play the given URL(s). Useful if for example a HTTP 302/303 * response is received with a non-HTTP URL inside. (Since 1.10) */ REDIRECT = 2147483654, /** * mask for all of the above messages. */ ANY = 4294967295, } alias GstMessageType MessageType; /** * Extra metadata flags. */ public enum GstMetaFlags { /** * no flags */ NONE = 0, /** * metadata should not be modified */ READONLY = 1, /** * metadata is managed by a bufferpool */ POOLED = 2, /** * metadata should not be removed */ LOCKED = 4, /** * additional flags can be added starting from this flag. */ LAST = 65536, } alias GstMetaFlags MetaFlags; /** * Flags for the mini object */ public enum GstMiniObjectFlags { /** * the object can be locked and unlocked with * gst_mini_object_lock() and gst_mini_object_unlock(). */ LOCKABLE = 1, /** * the object is permanently locked in * READONLY mode. Only read locks can be performed on the object. */ LOCK_READONLY = 2, /** * the object is expected to stay alive * even after gst_deinit() has been called and so should be ignored by leak * detection tools. (Since 1.10) */ MAY_BE_LEAKED = 4, /** * first flag that can be used by subclasses. */ LAST = 16, } alias GstMiniObjectFlags MiniObjectFlags; /** * The standard flags that an gstobject may have. */ public enum GstObjectFlags { /** * the object is expected to stay alive even * after gst_deinit() has been called and so should be ignored by leak * detection tools. (Since 1.10) */ MAY_BE_LEAKED = 1, /** * subclasses can add additional flags starting from this flag */ LAST = 16, } alias GstObjectFlags ObjectFlags; /** * The direction of a pad. */ public enum GstPadDirection { /** * direction is unknown. */ UNKNOWN = 0, /** * the pad is a source pad. */ SRC = 1, /** * the pad is a sink pad. */ SINK = 2, } alias GstPadDirection PadDirection; /** * Pad state flags */ public enum GstPadFlags { /** * is dataflow on a pad blocked */ BLOCKED = 16, /** * is pad flushing */ FLUSHING = 32, /** * is pad in EOS state */ EOS = 64, /** * is pad currently blocking on a buffer or event */ BLOCKING = 128, /** * ensure that there is a parent object before calling * into the pad callbacks. */ NEED_PARENT = 256, /** * the pad should be reconfigured/renegotiated. * The flag has to be unset manually after * reconfiguration happened. */ NEED_RECONFIGURE = 512, /** * the pad has pending events */ PENDING_EVENTS = 1024, /** * the pad is using fixed caps. This means that * once the caps are set on the pad, the default caps query function * will only return those caps. */ FIXED_CAPS = 2048, /** * the default event and query handler will forward * all events and queries to the internally linked pads * instead of discarding them. */ PROXY_CAPS = 4096, /** * the default query handler will forward * allocation queries to the internally linked pads * instead of discarding them. */ PROXY_ALLOCATION = 8192, /** * the default query handler will forward * scheduling queries to the internally linked pads * instead of discarding them. */ PROXY_SCHEDULING = 16384, /** * the default accept-caps handler will check * it the caps intersect the query-caps result instead * of checking for a subset. This is interesting for * parsers that can accept incompletely specified caps. */ ACCEPT_INTERSECT = 32768, /** * the default accept-caps handler will use * the template pad caps instead of query caps to * compare with the accept caps. Use this in combination * with %GST_PAD_FLAG_ACCEPT_INTERSECT. (Since 1.6) */ ACCEPT_TEMPLATE = 65536, /** * offset to define more flags */ LAST = 1048576, } alias GstPadFlags PadFlags; /** * The amount of checking to be done when linking pads. @GST_PAD_LINK_CHECK_CAPS * and @GST_PAD_LINK_CHECK_TEMPLATE_CAPS are mutually exclusive. If both are * specified, expensive but safe @GST_PAD_LINK_CHECK_CAPS are performed. * * > Only disable some of the checks if you are 100% certain you know the link * > will not fail because of hierarchy/caps compatibility failures. If uncertain, * > use the default checks (%GST_PAD_LINK_CHECK_DEFAULT) or the regular methods * > for linking the pads. */ public enum GstPadLinkCheck { /** * Don't check hierarchy or caps compatibility. */ NOTHING = 0, /** * Check the pads have same parents/grandparents. * Could be omitted if it is already known that the two elements that own the * pads are in the same bin. */ HIERARCHY = 1, /** * Check if the pads are compatible by using * their template caps. This is much faster than @GST_PAD_LINK_CHECK_CAPS, but * would be unsafe e.g. if one pad has %GST_CAPS_ANY. */ TEMPLATE_CAPS = 2, /** * Check if the pads are compatible by comparing the * caps returned by gst_pad_query_caps(). */ CAPS = 4, /** * Disables pushing a reconfigure event when pads are * linked. */ NO_RECONFIGURE = 8, /** * The default checks done when linking * pads (i.e. the ones used by gst_pad_link()). */ DEFAULT = 5, } alias GstPadLinkCheck PadLinkCheck; /** * Result values from gst_pad_link and friends. */ public enum GstPadLinkReturn { /** * link succeeded */ OK = 0, /** * pads have no common grandparent */ WRONG_HIERARCHY = -1, /** * pad was already linked */ WAS_LINKED = -2, /** * pads have wrong direction */ WRONG_DIRECTION = -3, /** * pads do not have common format */ NOFORMAT = -4, /** * pads cannot cooperate in scheduling */ NOSCHED = -5, /** * refused for some reason */ REFUSED = -6, } alias GstPadLinkReturn PadLinkReturn; /** * The status of a GstPad. After activating a pad, which usually happens when the * parent element goes from READY to PAUSED, the GstPadMode defines if the * pad operates in push or pull mode. */ public enum GstPadMode { /** * Pad will not handle dataflow */ NONE = 0, /** * Pad handles dataflow in downstream push mode */ PUSH = 1, /** * Pad handles dataflow in upstream pull mode */ PULL = 2, } alias GstPadMode PadMode; /** * Indicates when this pad will become available. */ public enum GstPadPresence { /** * the pad is always available */ ALWAYS = 0, /** * the pad will become available depending on the media stream */ SOMETIMES = 1, /** * the pad is only available on request with * gst_element_request_pad(). */ REQUEST = 2, } alias GstPadPresence PadPresence; /** * Different return values for the #GstPadProbeCallback. */ public enum GstPadProbeReturn { /** * drop data in data probes. For push mode this means that * the data item is not sent downstream. For pull mode, it means that * the data item is not passed upstream. In both cases, no other probes * are called for this item and %GST_FLOW_OK or %TRUE is returned to the * caller. */ DROP = 0, /** * normal probe return value. This leaves the probe in * place, and defers decisions about dropping or passing data to other * probes, if any. If there are no other probes, the default behaviour * for the probe type applies ('block' for blocking probes, * and 'pass' for non-blocking probes). */ OK = 1, /** * remove this probe. */ REMOVE = 2, /** * pass the data item in the block probe and block on the * next item. */ PASS = 3, /** * Data has been handled in the probe and will not be * forwarded further. For events and buffers this is the same behaviour as * %GST_PAD_PROBE_DROP (except that in this case you need to unref the buffer * or event yourself). For queries it will also return %TRUE to the caller. * The probe can also modify the #GstFlowReturn value by using the * #GST_PAD_PROBE_INFO_FLOW_RETURN() accessor. * Note that the resulting query must contain valid entries. * Since: 1.6 */ HANDLED = 4, } alias GstPadProbeReturn PadProbeReturn; /** * The different probing types that can occur. When either one of * @GST_PAD_PROBE_TYPE_IDLE or @GST_PAD_PROBE_TYPE_BLOCK is used, the probe will be a * blocking probe. */ public enum GstPadProbeType { /** * invalid probe type */ INVALID = 0, /** * probe idle pads and block while the callback is called */ IDLE = 1, /** * probe and block pads */ BLOCK = 2, /** * probe buffers */ BUFFER = 16, /** * probe buffer lists */ BUFFER_LIST = 32, /** * probe downstream events */ EVENT_DOWNSTREAM = 64, /** * probe upstream events */ EVENT_UPSTREAM = 128, /** * probe flush events. This probe has to be * explicitly enabled and is not included in the * @@GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM or * @@GST_PAD_PROBE_TYPE_EVENT_UPSTREAM probe types. */ EVENT_FLUSH = 256, /** * probe downstream queries */ QUERY_DOWNSTREAM = 512, /** * probe upstream queries */ QUERY_UPSTREAM = 1024, /** * probe push */ PUSH = 4096, /** * probe pull */ PULL = 8192, /** * probe and block at the next opportunity, at data flow or when idle */ BLOCKING = 3, /** * probe downstream data (buffers, buffer lists, and events) */ DATA_DOWNSTREAM = 112, /** * probe upstream data (events) */ DATA_UPSTREAM = 128, /** * probe upstream and downstream data (buffers, buffer lists, and events) */ DATA_BOTH = 240, /** * probe and block downstream data (buffers, buffer lists, and events) */ BLOCK_DOWNSTREAM = 114, /** * probe and block upstream data (events) */ BLOCK_UPSTREAM = 130, /** * probe upstream and downstream events */ EVENT_BOTH = 192, /** * probe upstream and downstream queries */ QUERY_BOTH = 1536, /** * probe upstream events and queries and downstream buffers, buffer lists, events and queries */ ALL_BOTH = 1776, /** * probe push and pull */ SCHEDULING = 12288, } alias GstPadProbeType PadProbeType; /** * Flags for the padtemplate */ public enum GstPadTemplateFlags { /** * first flag that can be used by subclasses. */ LAST = 256, } alias GstPadTemplateFlags PadTemplateFlags; /** * The different parsing errors that can occur. */ public enum GstParseError { /** * A syntax error occurred. */ SYNTAX = 0, /** * The description contained an unknown element */ NO_SUCH_ELEMENT = 1, /** * An element did not have a specified property */ NO_SUCH_PROPERTY = 2, /** * There was an error linking two pads. */ LINK = 3, /** * There was an error setting a property */ COULD_NOT_SET_PROPERTY = 4, /** * An empty bin was specified. */ EMPTY_BIN = 5, /** * An empty description was specified */ EMPTY = 6, /** * A delayed link did not get resolved. */ DELAYED_LINK = 7, } alias GstParseError ParseError; /** * Parsing options. */ public enum GstParseFlags { /** * Do not use any special parsing options. */ NONE = 0, /** * Always return %NULL when an error occurs * (default behaviour is to return partially constructed bins or elements * in some cases) */ FATAL_ERRORS = 1, /** * If a bin only has a single element, * just return the element. */ NO_SINGLE_ELEMENT_BINS = 2, /** * If more than one toplevel element is described * by the pipeline description string, put them in a #GstBin instead of a * #GstPipeline. (Since 1.10) */ PLACE_IN_BIN = 4, } alias GstParseFlags ParseFlags; /** * Pipeline flags */ public enum GstPipelineFlags { /** * this pipeline works with a fixed clock */ FIXED_CLOCK = 524288, /** * offset to define more flags */ LAST = 8388608, } alias GstPipelineFlags PipelineFlags; /** * Flags used in connection with gst_plugin_add_dependency(). */ public enum GstPluginDependencyFlags { /** * no special flags */ NONE = 0, /** * recurse into subdirectories */ RECURSE = 1, /** * use paths * argument only if none of the environment variables is set */ PATHS_ARE_DEFAULT_ONLY = 2, /** * interpret * filename argument as filter suffix and check all matching files in * the directory */ FILE_NAME_IS_SUFFIX = 4, /** * interpret * filename argument as filter prefix and check all matching files in * the directory. Since 1.8. */ FILE_NAME_IS_PREFIX = 8, } alias GstPluginDependencyFlags PluginDependencyFlags; /** * The plugin loading errors */ public enum GstPluginError { /** * The plugin could not be loaded */ MODULE = 0, /** * The plugin has unresolved dependencies */ DEPENDENCIES = 1, /** * The plugin has already be loaded from a different file */ NAME_MISMATCH = 2, } alias GstPluginError PluginError; /** * The plugin loading state */ public enum GstPluginFlags { /** * Temporarily loaded plugins */ CACHED = 16, /** * The plugin won't be scanned (again) */ BLACKLISTED = 32, } alias GstPluginFlags PluginFlags; /** * The type of a %GST_MESSAGE_PROGRESS. The progress messages inform the * application of the status of asynchronous tasks. */ public enum GstProgressType { /** * A new task started. */ START = 0, /** * A task completed and a new one continues. */ CONTINUE = 1, /** * A task completed. */ COMPLETE = 2, /** * A task was canceled. */ CANCELED = 3, /** * A task caused an error. An error message is also * posted on the bus. */ ERROR = 4, } alias GstProgressType ProgressType; /** * The different types of QoS events that can be given to the * gst_event_new_qos() method. */ public enum GstQOSType { /** * The QoS event type that is produced when upstream * elements are producing data too quickly and the element can't keep up * processing the data. Upstream should reduce their production rate. This * type is also used when buffers arrive early or in time. */ OVERFLOW = 0, /** * The QoS event type that is produced when upstream * elements are producing data too slowly and need to speed up their * production rate. */ UNDERFLOW = 1, /** * The QoS event type that is produced when the * application enabled throttling to limit the data rate. */ THROTTLE = 2, } alias GstQOSType QOSType; /** * Standard predefined Query types */ public enum GstQueryType { /** * unknown query type */ UNKNOWN = 0, /** * current position in stream */ POSITION = 2563, /** * total duration of the stream */ DURATION = 5123, /** * latency of stream */ LATENCY = 7683, /** * current jitter of stream */ JITTER = 10243, /** * current rate of the stream */ RATE = 12803, /** * seeking capabilities */ SEEKING = 15363, /** * segment start/stop positions */ SEGMENT = 17923, /** * convert values between formats */ CONVERT = 20483, /** * query supported formats for convert */ FORMATS = 23043, /** * query available media for efficient seeking. */ BUFFERING = 28163, /** * a custom application or element defined query. */ CUSTOM = 30723, /** * query the URI of the source or sink. */ URI = 33283, /** * the buffer allocation properties */ ALLOCATION = 35846, /** * the scheduling properties */ SCHEDULING = 38401, /** * the accept caps query */ ACCEPT_CAPS = 40963, /** * the caps query */ CAPS = 43523, /** * wait till all serialized data is consumed downstream */ DRAIN = 46086, /** * query the pipeline-local context from * downstream or upstream (since 1.2) */ CONTEXT = 48643, } alias GstQueryType QueryType; /** * #GstQueryTypeFlags indicate the aspects of the different #GstQueryType * values. You can get the type flags of a #GstQueryType with the * gst_query_type_get_flags() function. */ public enum GstQueryTypeFlags { /** * Set if the query can travel upstream. */ UPSTREAM = 1, /** * Set if the query can travel downstream. */ DOWNSTREAM = 2, /** * Set if the query should be serialized with data * flow. */ SERIALIZED = 4, } alias GstQueryTypeFlags QueryTypeFlags; /** * Element priority ranks. Defines the order in which the autoplugger (or * similar rank-picking mechanisms, such as e.g. gst_element_make_from_uri()) * will choose this element over an alternative one with the same function. * * These constants serve as a rough guidance for defining the rank of a * #GstPluginFeature. Any value is valid, including values bigger than * @GST_RANK_PRIMARY. */ public enum GstRank { /** * will be chosen last or not at all */ NONE = 0, /** * unlikely to be chosen */ MARGINAL = 64, /** * likely to be chosen */ SECONDARY = 128, /** * will be chosen first */ PRIMARY = 256, } alias GstRank Rank; /** * Resource errors are for any resource used by an element: * memory, files, network connections, process space, ... * They're typically used by source and sink elements. */ public enum GstResourceError { /** * a general error which doesn't fit in any other * category. Make sure you add a custom message to the error call. */ FAILED = 1, /** * do not use this except as a placeholder for * deciding where to go while developing code. */ TOO_LAZY = 2, /** * used when the resource could not be found. */ NOT_FOUND = 3, /** * used when resource is busy. */ BUSY = 4, /** * used when resource fails to open for reading. */ OPEN_READ = 5, /** * used when resource fails to open for writing. */ OPEN_WRITE = 6, /** * used when resource cannot be opened for * both reading and writing, or either (but unspecified which). */ OPEN_READ_WRITE = 7, /** * used when the resource can't be closed. */ CLOSE = 8, /** * used when the resource can't be read from. */ READ = 9, /** * used when the resource can't be written to. */ WRITE = 10, /** * used when a seek on the resource fails. */ SEEK = 11, /** * used when a synchronize on the resource fails. */ SYNC = 12, /** * used when settings can't be manipulated on. */ SETTINGS = 13, /** * used when the resource has no space left. */ NO_SPACE_LEFT = 14, /** * used when the resource can't be opened * due to missing authorization. * (Since 1.2.4) */ NOT_AUTHORIZED = 15, /** * the number of resource error types. */ NUM_ERRORS = 16, } alias GstResourceError ResourceError; /** * The different scheduling flags. */ public enum GstSchedulingFlags { /** * if seeking is possible */ SEEKABLE = 1, /** * if sequential access is recommended */ SEQUENTIAL = 2, /** * if bandwidth is limited and buffering possible (since 1.2) */ BANDWIDTH_LIMITED = 4, } alias GstSchedulingFlags SchedulingFlags; /** * The different search modes. */ public enum GstSearchMode { /** * Only search for exact matches. */ EXACT = 0, /** * Search for an exact match or the element just before. */ BEFORE = 1, /** * Search for an exact match or the element just after. */ AFTER = 2, } alias GstSearchMode SearchMode; /** * Flags to be used with gst_element_seek() or gst_event_new_seek(). All flags * can be used together. * * A non flushing seek might take some time to perform as the currently * playing data in the pipeline will not be cleared. * * An accurate seek might be slower for formats that don't have any indexes * or timestamp markers in the stream. Specifying this flag might require a * complete scan of the file in those cases. * * When performing a segment seek: after the playback of the segment completes, * no EOS will be emitted by the element that performed the seek, but a * %GST_MESSAGE_SEGMENT_DONE message will be posted on the bus by the element. * When this message is posted, it is possible to send a new seek event to * continue playback. With this seek method it is possible to perform seamless * looping or simple linear editing. * * When doing fast forward (rate > 1.0) or fast reverse (rate < -1.0) trickmode * playback, the %GST_SEEK_FLAG_TRICKMODE flag can be used to instruct decoders * and demuxers to adjust the playback rate by skipping frames. This can improve * performance and decrease CPU usage because not all frames need to be decoded. * * Beyond that, the %GST_SEEK_FLAG_TRICKMODE_KEY_UNITS flag can be used to * request that decoders skip all frames except key units, and * %GST_SEEK_FLAG_TRICKMODE_NO_AUDIO flags can be used to request that audio * decoders do no decoding at all, and simple output silence. * * The %GST_SEEK_FLAG_SNAP_BEFORE flag can be used to snap to the previous * relevant location, and the %GST_SEEK_FLAG_SNAP_AFTER flag can be used to * select the next relevant location. If %GST_SEEK_FLAG_KEY_UNIT is specified, * the relevant location is a keyframe. If both flags are specified, the nearest * of these locations will be selected. If none are specified, the implementation is * free to select whichever it wants. * * The before and after here are in running time, so when playing backwards, * the next location refers to the one that will played in next, and not the * one that is located after in the actual source stream. * * Also see part-seeking.txt in the GStreamer design documentation for more * details on the meaning of these flags and the behaviour expected of * elements that handle them. */ public enum GstSeekFlags { /** * no flag */ NONE = 0, /** * flush pipeline */ FLUSH = 1, /** * accurate position is requested, this might * be considerably slower for some formats. */ ACCURATE = 2, /** * seek to the nearest keyframe. This might be * faster but less accurate. */ KEY_UNIT = 4, /** * perform a segment seek. */ SEGMENT = 8, /** * when doing fast forward or fast reverse playback, allow * elements to skip frames instead of generating all * frames. (Since 1.6) */ TRICKMODE = 16, /** * Deprecated backward compatibility flag, replaced * by %GST_SEEK_FLAG_TRICKMODE */ SKIP = 16, /** * go to a location before the requested position, * if %GST_SEEK_FLAG_KEY_UNIT this means the keyframe at or before * the requested position the one at or before the seek target. */ SNAP_BEFORE = 32, /** * go to a location after the requested position, * if %GST_SEEK_FLAG_KEY_UNIT this means the keyframe at of after the * requested position. */ SNAP_AFTER = 64, /** * go to a position near the requested position, * if %GST_SEEK_FLAG_KEY_UNIT this means the keyframe closest * to the requested position, if both keyframes are at an equal * distance, behaves like %GST_SEEK_FLAG_SNAP_BEFORE. */ SNAP_NEAREST = 96, /** * when doing fast forward or fast reverse * playback, request that elements only decode keyframes * and skip all other content, for formats that have * keyframes. (Since 1.6) */ TRICKMODE_KEY_UNITS = 128, /** * when doing fast forward or fast reverse * playback, request that audio decoder elements skip * decoding and output only gap events or silence. (Since 1.6) */ TRICKMODE_NO_AUDIO = 256, } alias GstSeekFlags SeekFlags; /** * The different types of seek events. When constructing a seek event with * gst_event_new_seek() or when doing gst_segment_do_seek (). */ public enum GstSeekType { /** * no change in position is required */ NONE = 0, /** * absolute position is requested */ SET = 1, /** * relative position to duration is requested */ END = 2, } alias GstSeekType SeekType; /** * Flags for the GstSegment structure. Currently mapped to the corresponding * values of the seek flags. */ public enum GstSegmentFlags { /** * no flags */ NONE = 0, /** * reset the pipeline running_time to the segment * running_time */ RESET = 1, /** * perform skip playback (Since 1.6) */ TRICKMODE = 16, /** * Deprecated backward compatibility flag, replaced * by @GST_SEGMENT_FLAG_TRICKMODE */ SKIP = 16, /** * send SEGMENT_DONE instead of EOS */ SEGMENT = 8, /** * Decode only keyframes, where * possible (Since 1.6) */ TRICKMODE_KEY_UNITS = 128, /** * Do not decode any audio, where * possible (Since 1.6) */ TRICKMODE_NO_AUDIO = 256, } alias GstSegmentFlags SegmentFlags; public enum GstStackTraceFlags { /** * Try to retrieve as much information as * possible when getting the stack trace */ FULL = 1, } alias GstStackTraceFlags StackTraceFlags; /** * The possible states an element can be in. States can be changed using * gst_element_set_state() and checked using gst_element_get_state(). */ public enum GstState { /** * no pending state. */ VOID_PENDING = 0, /** * the NULL state or initial state of an element. */ NULL = 1, /** * the element is ready to go to PAUSED. */ READY = 2, /** * the element is PAUSED, it is ready to accept and * process data. Sink elements however only accept one * buffer and then block. */ PAUSED = 3, /** * the element is PLAYING, the #GstClock is running and * the data is flowing. */ PLAYING = 4, } alias GstState State; /** * These are the different state changes an element goes through. * %GST_STATE_NULL ⇒ %GST_STATE_PLAYING is called an upwards state change * and %GST_STATE_PLAYING ⇒ %GST_STATE_NULL a downwards state change. */ public enum GstStateChange { /** * state change from NULL to READY. * * The element must check if the resources it needs are available. Device * sinks and -sources typically try to probe the device to constrain their * caps. * * The element opens the device (in case feature need to be probed). */ NULL_TO_READY = 10, /** * state change from READY to PAUSED. * * The element pads are activated in order to receive data in PAUSED. * Streaming threads are started. * * Some elements might need to return %GST_STATE_CHANGE_ASYNC and complete * the state change when they have enough information. It is a requirement * for sinks to return %GST_STATE_CHANGE_ASYNC and complete the state change * when they receive the first buffer or %GST_EVENT_EOS (preroll). * Sinks also block the dataflow when in PAUSED. * * A pipeline resets the running_time to 0. * * Live sources return %GST_STATE_CHANGE_NO_PREROLL and don't generate data. */ READY_TO_PAUSED = 19, /** * state change from PAUSED to PLAYING. * * Most elements ignore this state change. * * The pipeline selects a #GstClock and distributes this to all the children * before setting them to PLAYING. This means that it is only allowed to * synchronize on the #GstClock in the PLAYING state. * * The pipeline uses the #GstClock and the running_time to calculate the * base_time. The base_time is distributed to all children when performing * the state change. * * Sink elements stop blocking on the preroll buffer or event and start * rendering the data. * * Sinks can post %GST_MESSAGE_EOS in the PLAYING state. It is not allowed * to post %GST_MESSAGE_EOS when not in the PLAYING state. * * While streaming in PAUSED or PLAYING elements can create and remove * sometimes pads. * * Live sources start generating data and return %GST_STATE_CHANGE_SUCCESS. */ PAUSED_TO_PLAYING = 28, /** * state change from PLAYING to PAUSED. * * Most elements ignore this state change. * * The pipeline calculates the running_time based on the last selected * #GstClock and the base_time. It stores this information to continue * playback when going back to the PLAYING state. * * Sinks unblock any #GstClock wait calls. * * When a sink does not have a pending buffer to play, it returns * #GST_STATE_CHANGE_ASYNC from this state change and completes the state * change when it receives a new buffer or an %GST_EVENT_EOS. * * Any queued %GST_MESSAGE_EOS items are removed since they will be reposted * when going back to the PLAYING state. The EOS messages are queued in * #GstBin containers. * * Live sources stop generating data and return %GST_STATE_CHANGE_NO_PREROLL. */ PLAYING_TO_PAUSED = 35, /** * state change from PAUSED to READY. * * Sinks unblock any waits in the preroll. * * Elements unblock any waits on devices * * Chain or get_range functions return %GST_FLOW_FLUSHING. * * The element pads are deactivated so that streaming becomes impossible and * all streaming threads are stopped. * * The sink forgets all negotiated formats * * Elements remove all sometimes pads */ PAUSED_TO_READY = 26, /** * state change from READY to NULL. * * Elements close devices * * Elements reset any internal state. */ READY_TO_NULL = 17, } alias GstStateChange StateChange; /** * The possible return values from a state change function such as * gst_element_set_state(). Only @GST_STATE_CHANGE_FAILURE is a real failure. */ public enum GstStateChangeReturn { /** * the state change failed */ FAILURE = 0, /** * the state change succeeded */ SUCCESS = 1, /** * the state change will happen asynchronously */ ASYNC = 2, /** * the state change succeeded but the element * cannot produce data in %GST_STATE_PAUSED. * This typically happens with live sources. */ NO_PREROLL = 3, } alias GstStateChangeReturn StateChangeReturn; /** * Stream errors are for anything related to the stream being processed: * format errors, media type errors, ... * They're typically used by decoders, demuxers, converters, ... */ public enum GstStreamError { /** * a general error which doesn't fit in any other * category. Make sure you add a custom message to the error call. */ FAILED = 1, /** * do not use this except as a placeholder for * deciding where to go while developing code. */ TOO_LAZY = 2, /** * use this when you do not want to implement * this functionality yet. */ NOT_IMPLEMENTED = 3, /** * used when the element doesn't know the * stream's type. */ TYPE_NOT_FOUND = 4, /** * used when the element doesn't handle this type * of stream. */ WRONG_TYPE = 5, /** * used when there's no codec to handle the * stream's type. */ CODEC_NOT_FOUND = 6, /** * used when decoding fails. */ DECODE = 7, /** * used when encoding fails. */ ENCODE = 8, /** * used when demuxing fails. */ DEMUX = 9, /** * used when muxing fails. */ MUX = 10, /** * used when the stream is of the wrong format * (for example, wrong caps). */ FORMAT = 11, /** * used when the stream is encrypted and can't be * decrypted because this is not supported by the element. */ DECRYPT = 12, /** * used when the stream is encrypted and * can't be decrypted because no suitable key is available. */ DECRYPT_NOKEY = 13, /** * the number of stream error types. */ NUM_ERRORS = 14, } alias GstStreamError StreamError; public enum GstStreamFlags { /** * This stream has no special attributes */ NONE = 0, /** * This stream is a sparse stream (e.g. a subtitle * stream), data may flow only in irregular intervals with large gaps in * between. */ SPARSE = 1, /** * This stream should be selected by default. This * flag may be used by demuxers to signal that a stream should be selected * by default in a playback scenario. */ SELECT = 2, /** * This stream should not be selected by default. * This flag may be used by demuxers to signal that a stream should not * be selected by default in a playback scenario, but only if explicitly * selected by the user (e.g. an audio track for the hard of hearing or * a director's commentary track). */ UNSELECT = 4, } alias GstStreamFlags StreamFlags; /** * The type of a %GST_MESSAGE_STREAM_STATUS. The stream status messages inform the * application of new streaming threads and their status. */ public enum GstStreamStatusType { /** * A new thread need to be created. */ CREATE = 0, /** * a thread entered its loop function */ ENTER = 1, /** * a thread left its loop function */ LEAVE = 2, /** * a thread is destroyed */ DESTROY = 3, /** * a thread is started */ START = 8, /** * a thread is paused */ PAUSE = 9, /** * a thread is stopped */ STOP = 10, } alias GstStreamStatusType StreamStatusType; /** * #GstStreamType describes a high level classification set for * flows of data in #GstStream objects. * * Note that this is a flag, and therefore users should not assume it * will be a single value. Do not use the equality operator for checking * whether a stream is of a certain type. */ public enum GstStreamType { /** * The stream is of unknown (unclassified) type. */ UNKNOWN = 1, /** * The stream is of audio data */ AUDIO = 2, /** * The stream carries video data */ VIDEO = 4, /** * The stream is a muxed container type */ CONTAINER = 8, /** * The stream contains subtitle / subpicture data. */ TEXT = 16, } alias GstStreamType StreamType; /** * The type of a %GST_MESSAGE_STRUCTURE_CHANGE. */ public enum GstStructureChangeType { /** * Pad linking is starting or done. */ LINK = 0, /** * Pad unlinking is starting or done. */ UNLINK = 1, } alias GstStructureChangeType StructureChangeType; /** * Extra tag flags used when registering tags. */ public enum GstTagFlag { /** * undefined flag */ UNDEFINED = 0, /** * tag is meta data */ META = 1, /** * tag is encoded */ ENCODED = 2, /** * tag is decoded */ DECODED = 3, /** * number of tag flags */ COUNT = 4, } alias GstTagFlag TagFlag; /** * The different tag merging modes are basically replace, overwrite and append, * but they can be seen from two directions. Given two taglists: (A) the tags * already in the element and (B) the ones that are supplied to the element ( * e.g. via gst_tag_setter_merge_tags() / gst_tag_setter_add_tags() or a * %GST_EVENT_TAG), how are these tags merged? * In the table below this is shown for the cases that a tag exists in the list * (A) or does not exists (!A) and combinations thereof. * * * merge mode * * * * merge mode * A + B * A + !B * !A + B * !A + !B * * * * * REPLACE_ALL * B * - * B * - * * * REPLACE * B * A * B * - * * * APPEND * A, B * A * B * - * * * PREPEND * B, A * A * B * - * * * KEEP * A * A * B * - * * * KEEP_ALL * A * A * - * - * * * *
    */ public enum GstTagMergeMode { /** * undefined merge mode */ UNDEFINED = 0, /** * replace all tags (clear list and append) */ REPLACE_ALL = 1, /** * replace tags */ REPLACE = 2, /** * append tags */ APPEND = 3, /** * prepend tags */ PREPEND = 4, /** * keep existing tags */ KEEP = 5, /** * keep all existing tags */ KEEP_ALL = 6, /** * the number of merge modes */ COUNT = 7, } alias GstTagMergeMode TagMergeMode; /** * GstTagScope specifies if a taglist applies to the complete * medium or only to one single stream. */ public enum GstTagScope { /** * tags specific to this single stream */ STREAM = 0, /** * global tags for the complete medium */ GLOBAL = 1, } alias GstTagScope TagScope; /** * The different states a task can be in */ public enum GstTaskState { /** * the task is started and running */ STARTED = 0, /** * the task is stopped */ STOPPED = 1, /** * the task is paused */ PAUSED = 2, } alias GstTaskState TaskState; /** * The different types of TOC entries (see #GstTocEntry). * * There are two types of TOC entries: alternatives or parts in a sequence. */ public enum GstTocEntryType { /** * entry is an angle (i.e. an alternative) */ ANGLE = -3, /** * entry is a version (i.e. alternative) */ VERSION = -2, /** * entry is an edition (i.e. alternative) */ EDITION = -1, /** * invalid entry type value */ INVALID = 0, /** * entry is a title (i.e. a part of a sequence) */ TITLE = 1, /** * entry is a track (i.e. a part of a sequence) */ TRACK = 2, /** * entry is a chapter (i.e. a part of a sequence) */ CHAPTER = 3, } alias GstTocEntryType TocEntryType; /** * How a #GstTocEntry should be repeated. By default, entries are played a * single time. * * Since: 1.4 */ public enum GstTocLoopType { /** * single forward playback */ NONE = 0, /** * repeat forward */ FORWARD = 1, /** * repeat backward */ REVERSE = 2, /** * repeat forward and backward */ PING_PONG = 3, } alias GstTocLoopType TocLoopType; /** * The scope of a TOC. */ public enum GstTocScope { /** * global TOC representing all selectable options * (this is what applications are usually interested in) */ GLOBAL = 1, /** * TOC for the currently active/selected stream * (this is a TOC representing the current stream from start to EOS, * and is what a TOC writer / muxer is usually interested in; it will * usually be a subset of the global TOC, e.g. just the chapters of * the current title, or the chapters selected for playback from the * current title) */ CURRENT = 2, } alias GstTocScope TocScope; /** * Flag that describe the value. These flags help applications processing the * logs to understand the values. */ public enum GstTracerValueFlags { /** * no flags */ NONE = 0, /** * the value is optional. When using this flag * one need to have an additional boolean arg before this value in the * var-args list passed to gst_tracer_record_log(). */ OPTIONAL = 1, /** * the value is a combined figure, since the * start of tracing. Examples are averages or timestamps. */ AGGREGATED = 2, } alias GstTracerValueFlags TracerValueFlags; /** * Tracing record will contain fields that contain a meassured value or extra * meta-data. One such meta data are values that tell where a measurement was * taken. This enumerating declares to which scope such a meta data field * relates to. If it is e.g. %GST_TRACER_VALUE_SCOPE_PAD, then each of the log * events may contain values for different #GstPads. * * Since: 1.8 */ public enum GstTracerValueScope { /** * the value is related to the process */ PROCESS = 0, /** * the value is related to a thread */ THREAD = 1, /** * the value is related to an #GstElement */ ELEMENT = 2, /** * the value is related to a #GstPad */ PAD = 3, } alias GstTracerValueScope TracerValueScope; /** * The probability of the typefind function. Higher values have more certainty * in doing a reliable typefind. */ public enum GstTypeFindProbability { /** * type undetected. */ NONE = 0, /** * unlikely typefind. */ MINIMUM = 1, /** * possible type detected. */ POSSIBLE = 50, /** * likely a type was detected. */ LIKELY = 80, /** * nearly certain that a type was detected. */ NEARLY_CERTAIN = 99, /** * very certain a type was detected. */ MAXIMUM = 100, } alias GstTypeFindProbability TypeFindProbability; /** * Different URI-related errors that can occur. */ public enum GstURIError { /** * The protocol is not supported */ UNSUPPORTED_PROTOCOL = 0, /** * There was a problem with the URI */ BAD_URI = 1, /** * Could not set or change the URI because the * URI handler was in a state where that is not possible or not permitted */ BAD_STATE = 2, /** * There was a problem with the entity that * the URI references */ BAD_REFERENCE = 3, } alias GstURIError URIError; /** * The different types of URI direction. */ public enum GstURIType { /** * The URI direction is unknown */ UNKNOWN = 0, /** * The URI is a consumer. */ SINK = 1, /** * The URI is a producer. */ SRC = 2, } alias GstURIType URIType; struct GstAllocationParams { /** * flags to control allocation */ GstMemoryFlags flags; /** * the desired alignment of the memory */ size_t alig; /** * the desired prefix */ size_t prefix; /** * the desired padding */ size_t padding; void*[4] GstReserved; } struct GstAllocator { GstObject object; const(char)* memType; /** * the implementation of the GstMemoryMapFunction */ GstMemoryMapFunction memMap; /** * the implementation of the GstMemoryUnmapFunction */ GstMemoryUnmapFunction memUnmap; /** * the implementation of the GstMemoryCopyFunction */ GstMemoryCopyFunction memCopy; /** * the implementation of the GstMemoryShareFunction */ GstMemoryShareFunction memShare; /** * the implementation of the GstMemoryIsSpanFunction */ GstMemoryIsSpanFunction memIsSpan; /** * the implementation of the GstMemoryMapFullFunction. * Will be used instead of @mem_map if present. (Since 1.6) */ GstMemoryMapFullFunction memMapFull; /** * the implementation of the GstMemoryUnmapFullFunction. * Will be used instead of @mem_unmap if present. (Since 1.6) */ GstMemoryUnmapFullFunction memUnmapFull; void*[2] GstReserved; GstAllocatorPrivate* priv; } /** * The #GstAllocator is used to create new memory. */ struct GstAllocatorClass { /** * Object parent class */ GstObjectClass objectClass; /** * * Params: * allocator = a #GstAllocator to use * size = size of the visible memory area * params = optional parameters * Returns: a new #GstMemory. */ extern(C) GstMemory* function(GstAllocator* allocator, size_t size, GstAllocationParams* params) alloc; /** */ extern(C) void function(GstAllocator* allocator, GstMemory* memory) free; void*[4] GstReserved; } struct GstAllocatorPrivate; struct GstAtomicQueue; struct GstBin { GstElement element; /** * the number of children in this bin */ int numchildren; /** * the list of children in this bin */ GList* children; /** * updated whenever @children changes */ uint childrenCookie; /** * internal bus for handling child messages */ GstBus* childBus; /** * queued and cached messages */ GList* messages; /** * the bin is currently calculating its state */ bool polling; /** * the bin needs to recalculate its state (deprecated) */ bool stateDirty; /** * the bin needs to select a new clock */ bool clockDirty; /** * the last clock selected */ GstClock* providedClock; /** * the element that provided @provided_clock */ GstElement* clockProvider; GstBinPrivate* priv; void*[4] GstReserved; } /** * Subclasses can override the @add_element and @remove_element to * update the list of children in the bin. * * The @handle_message method can be overridden to implement custom * message handling. @handle_message takes ownership of the message, just like * #gst_element_post_message. * * The @deep_element_added vfunc will be called when a new element has been * added to any bin inside this bin, so it will also be called if a new child * was added to a sub-bin of this bin. #GstBin implementations that override * this message should chain up to the parent class implementation so the * element-added-deep signal is emitted on all parents. */ struct GstBinClass { /** * bin parent class */ GstElementClass parentClass; GThreadPool* pool; /** */ extern(C) void function(GstBin* bin, GstElement* child) elementAdded; /** */ extern(C) void function(GstBin* bin, GstElement* child) elementRemoved; /** */ extern(C) int function(GstBin* bin, GstElement* element) addElement; /** */ extern(C) int function(GstBin* bin, GstElement* element) removeElement; /** */ extern(C) void function(GstBin* bin, GstMessage* message) handleMessage; /** */ extern(C) int function(GstBin* bin) doLatency; /** */ extern(C) void function(GstBin* bin, GstBin* subBin, GstElement* child) deepElementAdded; /** */ extern(C) void function(GstBin* bin, GstBin* subBin, GstElement* child) deepElementRemoved; void*[2] GstReserved; } struct GstBinPrivate; struct GstBuffer { /** * the parent structure */ GstMiniObject miniObject; /** * pointer to the pool owner of the buffer */ GstBufferPool* pool; /** * presentation timestamp of the buffer, can be #GST_CLOCK_TIME_NONE when the * pts is not known or relevant. The pts contains the timestamp when the * media should be presented to the user. */ GstClockTime pts; /** * decoding timestamp of the buffer, can be #GST_CLOCK_TIME_NONE when the * dts is not known or relevant. The dts contains the timestamp when the * media should be processed. */ GstClockTime dts; /** * duration in time of the buffer data, can be #GST_CLOCK_TIME_NONE * when the duration is not known or relevant. */ GstClockTime duration; /** * a media specific offset for the buffer data. * For video frames, this is the frame number of this buffer. * For audio samples, this is the offset of the first sample in this buffer. * For file data or compressed data this is the byte offset of the first * byte in this buffer. */ ulong offset; /** * the last offset contained in this buffer. It has the same * format as @offset. */ ulong offsetEnd; } struct GstBufferList; struct GstBufferPool { GstObject object; int flushing; GstBufferPoolPrivate* priv; void*[4] GstReserved; } /** * Parameters passed to the gst_buffer_pool_acquire_buffer() function to control the * allocation of the buffer. * * The default implementation ignores the @start and @stop members but other * implementations can use this extra information to decide what buffer to * return. */ struct GstBufferPoolAcquireParams { /** * the format of @start and @stop */ GstFormat format; /** * the start position */ long start; /** * the stop position */ long stop; /** * additional flags */ GstBufferPoolAcquireFlags flags; void*[4] GstReserved; } /** * The GstBufferPool class. */ struct GstBufferPoolClass { /** * Object parent class */ GstObjectClass objectClass; /** * * Params: * pool = a #GstBufferPool * Returns: a %NULL terminated array * of strings. */ extern(C) char** function(GstBufferPool* pool) getOptions; /** * * Params: * pool = a #GstBufferPool * config = a #GstStructure * Returns: %TRUE when the configuration could be set. */ extern(C) int function(GstBufferPool* pool, GstStructure* config) setConfig; /** */ extern(C) int function(GstBufferPool* pool) start; /** */ extern(C) int function(GstBufferPool* pool) stop; /** * * Params: * pool = a #GstBufferPool * buffer = a location for a #GstBuffer * params = parameters. * Returns: a #GstFlowReturn such as %GST_FLOW_FLUSHING when the pool is * inactive. */ extern(C) GstFlowReturn function(GstBufferPool* pool, GstBuffer** buffer, GstBufferPoolAcquireParams* params) acquireBuffer; /** */ extern(C) GstFlowReturn function(GstBufferPool* pool, GstBuffer** buffer, GstBufferPoolAcquireParams* params) allocBuffer; /** */ extern(C) void function(GstBufferPool* pool, GstBuffer* buffer) resetBuffer; /** */ extern(C) void function(GstBufferPool* pool, GstBuffer* buffer) releaseBuffer; /** */ extern(C) void function(GstBufferPool* pool, GstBuffer* buffer) freeBuffer; /** */ extern(C) void function(GstBufferPool* pool) flushStart; /** */ extern(C) void function(GstBufferPool* pool) flushStop; void*[2] GstReserved; } struct GstBufferPoolPrivate; struct GstBus { GstObject object; GstBusPrivate* priv; void*[4] GstReserved; } struct GstBusClass { GstObjectClass parentClass; /** */ extern(C) void function(GstBus* bus, GstMessage* message) message; /** */ extern(C) void function(GstBus* bus, GstMessage* message) syncMessage; void*[4] GstReserved; } struct GstBusPrivate; struct GstCaps { /** * the parent type */ GstMiniObject miniObject; } struct GstCapsFeatures; struct GstChildProxy; /** * #GstChildProxy interface. */ struct GstChildProxyInterface { /** * parent interface type. */ GTypeInterface parent; /** * * Params: * parent = the parent object to get the child from * name = the child's name * Returns: the child object or %NULL if * not found. Unref after usage. * * MT safe. */ extern(C) GObject* function(GstChildProxy* parent, const(char)* name) getChildByName; /** * * Params: * parent = the parent object to get the child from * index = the child's position in the child list * Returns: the child object or %NULL if * not found (index too high). Unref after usage. * * MT safe. */ extern(C) GObject* function(GstChildProxy* parent, uint index) getChildByIndex; /** * * Params: * parent = the parent object * Returns: the number of child objects * * MT safe. */ extern(C) uint function(GstChildProxy* parent) getChildrenCount; /** */ extern(C) void function(GstChildProxy* parent, GObject* child, const(char)* name) childAdded; /** */ extern(C) void function(GstChildProxy* parent, GObject* child, const(char)* name) childRemoved; void*[4] GstReserved; } struct GstClock { GstObject object; GstClockPrivate* priv; void*[4] GstReserved; } /** * GStreamer clock class. Override the vmethods to implement the clock * functionality. */ struct GstClockClass { /** * the parent class structure */ GstObjectClass parentClass; /** */ extern(C) GstClockTime function(GstClock* clock, GstClockTime oldResolution, GstClockTime newResolution) changeResolution; /** * * Params: * clock = a #GstClock * Returns: the resolution of the clock in units of #GstClockTime. * * MT safe. */ extern(C) GstClockTime function(GstClock* clock) getResolution; /** * * Params: * clock = a #GstClock to query * Returns: the internal time of the clock. Or GST_CLOCK_TIME_NONE when * given invalid input. * * MT safe. */ extern(C) GstClockTime function(GstClock* clock) getInternalTime; /** */ extern(C) GstClockReturn function(GstClock* clock, GstClockEntry* entry, GstClockTimeDiff* jitter) wait; /** */ extern(C) GstClockReturn function(GstClock* clock, GstClockEntry* entry) waitAsync; /** */ extern(C) void function(GstClock* clock, GstClockEntry* entry) unschedule; void*[4] GstReserved; } /** * All pending timeouts or periodic notifies are converted into * an entry. * Note that GstClockEntry should be treated as an opaque structure. It must * not be extended or allocated using a custom allocator. */ struct GstClockEntry { /** * reference counter (read-only) */ int refcount; GstClock* clock; GstClockEntryType type; GstClockTime time; GstClockTime interval; GstClockReturn status; GstClockCallback func; void* userData; GDestroyNotify destroyData; bool unscheduled; bool wokenUp; void*[4] GstReserved; } struct GstClockPrivate; struct GstContext; struct GstControlBinding { GstObject parent; /** * name of the property of this binding */ char* name; /** * #GParamSpec for this property */ GParamSpec* pspec; GstObject* object; bool disabled; union ABI { struct Abi { GstControlBindingPrivate* priv; } Abi abi; void*[4] GstReserved; } ABI abi; } /** * The class structure of #GstControlBinding. */ struct GstControlBindingClass { /** * Parent class */ GstObjectClass parentClass; /** * * Params: * binding = the control binding * object = the object that has controlled properties * timestamp = the time that should be processed * lastSync = the last time this was called * Returns: %TRUE if the controller value could be applied to the object * property, %FALSE otherwise */ extern(C) int function(GstControlBinding* binding, GstObject* object, GstClockTime timestamp, GstClockTime lastSync) syncValues; /** * * Params: * binding = the control binding * timestamp = the time the control-change should be read from * Returns: the GValue of the property at the given time, * or %NULL if the property isn't controlled. */ extern(C) GValue* function(GstControlBinding* binding, GstClockTime timestamp) getValue; /** * * Params: * binding = the control binding * timestamp = the time that should be processed * interval = the time spacing between subsequent values * nValues = the number of values * values = array to put control-values in * Returns: %TRUE if the given array could be filled, %FALSE otherwise */ extern(C) int function(GstControlBinding* binding, GstClockTime timestamp, GstClockTime interval, uint nValues, void* values) getValueArray; /** * * Params: * binding = the control binding * timestamp = the time that should be processed * interval = the time spacing between subsequent values * nValues = the number of values * values = array to put control-values in * Returns: %TRUE if the given array could be filled, %FALSE otherwise */ extern(C) int function(GstControlBinding* binding, GstClockTime timestamp, GstClockTime interval, uint nValues, GValue* values) getGValueArray; void*[4] GstReserved; } struct GstControlBindingPrivate; struct GstControlSource { GstObject parent; /** * Function for returning a value for a given timestamp */ GstControlSourceGetValue getValue; /** * Function for returning a values array for a given timestamp */ GstControlSourceGetValueArray getValueArray; void*[4] GstReserved; } /** * The class structure of #GstControlSource. */ struct GstControlSourceClass { /** * Parent class */ GstObjectClass parentClass; void*[4] GstReserved; } struct GstDateTime; struct GstDebugCategory { int threshold; uint color; const(char)* name; const(char)* description; } struct GstDebugMessage; struct GstDevice { /** * The parent #GstObject strucuture. */ GstObject parent; GstDevicePrivate* priv; void*[4] GstReserved; } /** * The class structure for a #GstDevice object. * * Since: 1.4 */ struct GstDeviceClass { /** * The parent #GstObjectClass strucuture. */ GstObjectClass parentClass; /** * * Params: * device = a #GstDevice * name = name of new element, or %NULL to automatically * create a unique name. * Returns: a new #GstElement configured to use this device */ extern(C) GstElement* function(GstDevice* device, const(char)* name) createElement; /** * * Params: * device = a #GstDevice * element = a #GstElement * Returns: %TRUE if the element could be reconfigured to use this device, * %FALSE otherwise. */ extern(C) int function(GstDevice* device, GstElement* element) reconfigureElement; void*[4] GstReserved; } struct GstDeviceMonitor { /** * the parent #GstObject structure */ GstObject parent; GstDeviceMonitorPrivate* priv; void*[4] GstReserved; } /** * Opaque device monitor class structure. * * Since: 1.4 */ struct GstDeviceMonitorClass { /** * the parent #GstObjectClass structure */ GstObjectClass parentClass; void*[4] GstReserved; } struct GstDeviceMonitorPrivate; struct GstDevicePrivate; struct GstDeviceProvider { /** * The parent #GstObject */ GstObject parent; /** * a #GList of the #GstDevice objects */ GList* devices; GstDeviceProviderPrivate* priv; void*[4] GstReserved; } struct GstDeviceProviderClass { /** * the parent #GstObjectClass structure */ GstObjectClass parentClass; /** * a pointer to the #GstDeviceProviderFactory that creates this * provider */ GstDeviceProviderFactory* factory; /** */ extern(C) GList* function(GstDeviceProvider* provider) probe; /** * * Params: * provider = A #GstDeviceProvider * Returns: %TRUE if the device providering could be started */ extern(C) int function(GstDeviceProvider* provider) start; /** */ extern(C) void function(GstDeviceProvider* provider) stop; void* metadata; void*[4] GstReserved; } struct GstDeviceProviderFactory; /** * The opaque #GstDeviceProviderFactoryClass data structure. * * Since: 1.4 */ struct GstDeviceProviderFactoryClass; struct GstDeviceProviderPrivate; struct GstDynamicTypeFactory; struct GstDynamicTypeFactoryClass; struct GstElement { GstObject object; /** * Used to serialize execution of gst_element_set_state() */ GRecMutex stateLock; /** * Used to signal completion of a state change */ GCond stateCond; /** * Used to detect concurrent execution of * gst_element_set_state() and gst_element_get_state() */ uint stateCookie; /** * the target state of an element as set by the application */ GstState targetState; /** * the current state of an element */ GstState currentState; /** * the next state of an element, can be #GST_STATE_VOID_PENDING if * the element is in the correct state. */ GstState nextState; /** * the final state the element should go to, can be * #GST_STATE_VOID_PENDING if the element is in the correct state */ GstState pendingState; /** * the last return value of an element state change */ GstStateChangeReturn lastReturn; /** * the bus of the element. This bus is provided to the element by the * parent element or the application. A #GstPipeline has a bus of its own. */ GstBus* bus; /** * the clock of the element. This clock is usually provided to the * element by the toplevel #GstPipeline. */ GstClock* clock; /** * the time of the clock right before the element is set to * PLAYING. Subtracting @base_time from the current clock time in the PLAYING * state will yield the running_time against the clock. */ GstClockTimeDiff baseTime; /** * the running_time of the last PAUSED state */ GstClockTime startTime; /** * number of pads of the element, includes both source and sink pads. */ ushort numpads; /** * list of pads */ GList* pads; /** * number of source pads of the element. */ ushort numsrcpads; /** * list of source pads */ GList* srcpads; /** * number of sink pads of the element. */ ushort numsinkpads; /** * list of sink pads */ GList* sinkpads; /** * updated whenever the a pad is added or removed */ uint padsCookie; /** * list of contexts */ GList* contexts; void*[3] GstReserved; } struct GstElementClass { /** * the parent class structure */ GstObjectClass parentClass; /** * metadata for elements of this class */ void* metadata; /** * the #GstElementFactory that creates these elements */ GstElementFactory* elementfactory; /** * a #GList of #GstPadTemplate */ GList* padtemplates; /** * the number of padtemplates */ int numpadtemplates; /** * changed whenever the padtemplates change */ uint padTemplCookie; /** */ extern(C) void function(GstElement* element, GstPad* pad) padAdded; /** */ extern(C) void function(GstElement* element, GstPad* pad) padRemoved; /** */ extern(C) void function(GstElement* element) noMorePads; /** * * Params: * element = a #GstElement to find a request pad of. * templ = a #GstPadTemplate of which we want a pad of. * name = the name of the request #GstPad * to retrieve. Can be %NULL. * caps = the caps of the pad we want to * request. Can be %NULL. * Returns: requested #GstPad if found, * otherwise %NULL. Release after usage. */ extern(C) GstPad* function(GstElement* element, GstPadTemplate* templ, const(char)* name, GstCaps* caps) requestNewPad; /** */ extern(C) void function(GstElement* element, GstPad* pad) releasePad; /** * * Params: * element = a #GstElement to get the state of. * state = a pointer to #GstState to hold the state. * Can be %NULL. * pending = a pointer to #GstState to hold the pending * state. Can be %NULL. * timeout = a #GstClockTime to specify the timeout for an async * state change or %GST_CLOCK_TIME_NONE for infinite timeout. * Returns: %GST_STATE_CHANGE_SUCCESS if the element has no more pending state * and the last state change succeeded, %GST_STATE_CHANGE_ASYNC if the * element is still performing a state change or * %GST_STATE_CHANGE_FAILURE if the last state change failed. * * MT safe. */ extern(C) GstStateChangeReturn function(GstElement* element, GstState* state, GstState* pending, GstClockTime timeout) getState; /** * * Params: * element = a #GstElement to change state of. * state = the element's new #GstState. * Returns: Result of the state change using #GstStateChangeReturn. * * MT safe. */ extern(C) GstStateChangeReturn function(GstElement* element, GstState state) setState; /** * * Params: * element = a #GstElement * transition = the requested transition * Returns: the #GstStateChangeReturn of the state transition. */ extern(C) GstStateChangeReturn function(GstElement* element, GstStateChange transition) changeState; /** */ extern(C) void function(GstElement* element, GstState oldstate, GstState newstate, GstState pending) stateChanged; /** */ extern(C) void function(GstElement* element, GstBus* bus) setBus; /** * * Params: * element = a #GstElement to query * Returns: the GstClock provided by the * element or %NULL if no clock could be provided. Unref after usage. * * MT safe. */ extern(C) GstClock* function(GstElement* element) provideClock; /** * * Params: * element = a #GstElement to set the clock for. * clock = the #GstClock to set for the element. * Returns: %TRUE if the element accepted the clock. An element can refuse a * clock when it, for example, is not able to slave its internal clock to the * @clock or when it requires a specific clock to operate. * * MT safe. */ extern(C) int function(GstElement* element, GstClock* clock) setClock; /** * * Params: * element = a #GstElement to send the event to. * event = the #GstEvent to send to the element. * Returns: %TRUE if the event was handled. Events that trigger a preroll (such * as flushing seeks and steps) will emit %GST_MESSAGE_ASYNC_DONE. */ extern(C) int function(GstElement* element, GstEvent* event) sendEvent; /** * * Params: * element = a #GstElement to perform the query on. * query = the #GstQuery. * Returns: %TRUE if the query could be performed. * * MT safe. */ extern(C) int function(GstElement* element, GstQuery* query) query; /** * * Params: * element = a #GstElement posting the message * message = a #GstMessage to post * Returns: %TRUE if the message was successfully posted. The function returns * %FALSE if the element did not have a bus. * * MT safe. */ extern(C) int function(GstElement* element, GstMessage* message) postMessage; /** */ extern(C) void function(GstElement* element, GstContext* context) setContext; void*[18] GstReserved; } struct GstElementFactory; struct GstElementFactoryClass; struct GstEvent { /** * the parent structure */ GstMiniObject miniObject; /** * the #GstEventType of the event */ GstEventType type; /** * the timestamp of the event */ ulong timestamp; /** * the sequence number of the event */ uint seqnum; } /** * A format definition */ struct GstFormatDefinition { /** * The unique id of this format */ GstFormat value; /** * A short nick of the format */ const(char)* nick; /** * A longer description of the format */ const(char)* description; /** * A quark for the nick */ GQuark quark; } struct GstGhostPad { GstProxyPad pad; GstGhostPadPrivate* priv; } struct GstGhostPadClass { GstProxyPadClass parentClass; void*[4] GstReserved; } struct GstGhostPadPrivate; struct GstIterator { /** * The function to copy the iterator */ GstIteratorCopyFunction copy; /** * The function to get the next item in the iterator */ GstIteratorNextFunction next; /** * The function to be called for each item retrieved */ GstIteratorItemFunction item; /** * The function to call when a resync is needed. */ GstIteratorResyncFunction resync; /** * The function to call when the iterator is freed */ GstIteratorFreeFunction free; /** * The iterator that is currently pushed with gst_iterator_push() */ GstIterator* pushed; /** * The type of the object that this iterator will return */ GType type; /** * The lock protecting the data structure and the cookie. */ GMutex* lock; /** * The cookie; the value of the master_cookie when this iterator was * created. */ uint cookie; /** * A pointer to the master cookie. */ uint* masterCookie; /** * the size of the iterator */ uint size; void*[4] GstReserved; } /** * A structure containing the result of a map operation such as * gst_memory_map(). It contains the data and size. */ struct GstMapInfo { /** * a pointer to the mapped memory */ GstMemory* memory; /** * flags used when mapping the memory */ GstMapFlags flags; /** * a pointer to the mapped data */ ubyte* data; /** * the valid size in @data */ size_t size; /** * the maximum bytes in @data */ size_t maxsize; /** * extra private user_data that the implementation of the memory * can use to store extra info. */ void*[4] userData; void*[4] GstReserved; } struct GstMemory { /** * parent structure */ GstMiniObject miniObject; /** * pointer to the #GstAllocator */ GstAllocator* allocator; /** * parent memory block */ GstMemory* parent; /** * the maximum size allocated */ size_t maxsize; /** * the alignment of the memory */ size_t alig; /** * the offset where valid data starts */ size_t offset; /** * the size of valid data */ size_t size; } struct GstMessage { /** * the parent structure */ GstMiniObject miniObject; /** * the #GstMessageType of the message */ GstMessageType type; /** * the timestamp of the message */ ulong timestamp; /** * the src of the message */ GstObject* src; /** * the sequence number of the message */ uint seqnum; GMutex lock; GCond cond; } /** * The #GstMeta structure should be included as the first member of a #GstBuffer * metadata structure. The structure defines the API of the metadata and should * be accessible to all elements using the metadata. * * A metadata API is registered with gst_meta_api_type_register() which takes a * name for the metadata API and some tags associated with the metadata. * With gst_meta_api_type_has_tag() one can check if a certain metadata API * contains a given tag. * * Multiple implementations of a metadata API can be registered. * To implement a metadata API, gst_meta_register() should be used. This * function takes all parameters needed to create, free and transform metadata * along with the size of the metadata. The function returns a #GstMetaInfo * structure that contains the information for the implementation of the API. * * A specific implementation can be retrieved by name with gst_meta_get_info(). * * See #GstBuffer for how the metadata can be added, retrieved and removed from * buffers. */ struct GstMeta { /** * extra flags for the metadata */ GstMetaFlags flags; /** * pointer to the #GstMetaInfo */ GstMetaInfo* info; } /** * The #GstMetaInfo provides information about a specific metadata * structure. */ struct GstMetaInfo { /** * tag identifying the metadata structure and api */ GType api; /** * type identifying the implementor of the api */ GType type; /** * size of the metadata */ size_t size; /** * function for initializing the metadata */ GstMetaInitFunction initFunc; /** * function for freeing the metadata */ GstMetaFreeFunction freeFunc; /** * function for transforming the metadata */ GstMetaTransformFunction transformFunc; } /** * Extra data passed to a "gst-copy" transform #GstMetaTransformFunction. */ struct GstMetaTransformCopy { /** * %TRUE if only region is copied */ bool region; /** * the offset to copy, 0 if @region is %FALSE, otherwise > 0 */ size_t offset; /** * the size to copy, -1 or the buffer size when @region is %FALSE */ size_t size; } struct GstMiniObject { /** * the GType of the object */ GType type; /** * atomic refcount */ int refcount; /** * atomic state of the locks */ int lockstate; /** * extra flags. */ uint flags; /** * a copy function */ GstMiniObjectCopyFunction copy; /** * a dispose function */ GstMiniObjectDisposeFunction dispose; /** * the free function */ GstMiniObjectFreeFunction free; uint nQdata; void* qdata; } struct GstObject { GObject object; /** * object LOCK */ GMutex lock; /** * The name of the object */ char* name; /** * this object's parent, weak ref */ GstObject* parent; /** * flags for this object */ uint flags; GList* controlBindings; ulong controlRate; ulong lastSync; void* GstReserved; } /** * GStreamer base object class. */ struct GstObjectClass { /** * parent */ GObjectClass parentClass; /** * separator used by gst_object_get_path_string() */ const(char)* pathStringSeparator; /** */ extern(C) void function(GstObject* object, GstObject* orig, GParamSpec* pspec) deepNotify; void*[4] GstReserved; } struct GstPad { GstObject object; /** * private data owned by the parent element */ void* elementPrivate; /** * padtemplate for this pad */ GstPadTemplate* padtemplate; /** * the direction of the pad, cannot change after creating * the pad. */ GstPadDirection direction; GRecMutex streamRecLock; GstTask* task; GCond blockCond; GHookList probes; GstPadMode mode; GstPadActivateFunction activatefunc; void* activatedata; GDestroyNotify activatenotify; GstPadActivateModeFunction activatemodefunc; void* activatemodedata; GDestroyNotify activatemodenotify; GstPad* peer; GstPadLinkFunction linkfunc; void* linkdata; GDestroyNotify linknotify; GstPadUnlinkFunction unlinkfunc; void* unlinkdata; GDestroyNotify unlinknotify; GstPadChainFunction chainfunc; void* chaindata; GDestroyNotify chainnotify; GstPadChainListFunction chainlistfunc; void* chainlistdata; GDestroyNotify chainlistnotify; GstPadGetRangeFunction getrangefunc; void* getrangedata; GDestroyNotify getrangenotify; GstPadEventFunction eventfunc; void* eventdata; GDestroyNotify eventnotify; long offset; GstPadQueryFunction queryfunc; void* querydata; GDestroyNotify querynotify; GstPadIterIntLinkFunction iterintlinkfunc; void* iterintlinkdata; GDestroyNotify iterintlinknotify; int numProbes; int numBlocked; GstPadPrivate* priv; union ABI { void*[4] GstReserved; struct Abi { GstFlowReturn lastFlowret; GstPadEventFullFunction eventfullfunc; } Abi abi; } ABI abi; } struct GstPadClass { GstObjectClass parentClass; /** */ extern(C) void function(GstPad* pad, GstPad* peer) linked; /** */ extern(C) void function(GstPad* pad, GstPad* peer) unlinked; void*[4] GstReserved; } struct GstPadPrivate; struct GstPadProbeInfo { /** * the current probe type */ GstPadProbeType type; /** * the id of the probe */ gulong id; /** * type specific data, check the @type field to know the * datatype. This field can be %NULL. */ void* data; /** * offset of pull probe, this field is valid when @type contains * #GST_PAD_PROBE_TYPE_PULL */ ulong offset; /** * size of pull probe, this field is valid when @type contains * #GST_PAD_PROBE_TYPE_PULL */ uint size; union ABI { void*[4] GstReserved; struct Abi { GstFlowReturn flowRet; } Abi abi; } ABI abi; } struct GstPadTemplate { GstObject object; char* nameTemplate; GstPadDirection direction; GstPadPresence presence; GstCaps* caps; void*[4] GstReserved; } struct GstPadTemplateClass { GstObjectClass parentClass; /** */ extern(C) void function(GstPadTemplate* templ, GstPad* pad) padCreated; void*[4] GstReserved; } /** * A GParamSpec derived structure that contains the meta data for fractional * properties. */ struct GstParamSpecArray { /** * super class */ GParamSpec parentInstance; GParamSpec* elementSpec; } /** * A GParamSpec derived structure that contains the meta data for fractional * properties. */ struct GstParamSpecFraction { /** * super class */ GParamSpec parentInstance; /** * minimal numerator */ int minNum; /** * minimal denominator */ int minDen; /** * maximal numerator */ int maxNum; /** * maximal denominator */ int maxDen; /** * default numerator */ int defNum; /** * default denominator */ int defDen; } /** * The #GstParentBufferMeta is a #GstMeta which can be attached to a #GstBuffer * to hold a reference to another buffer that is only released when the child * #GstBuffer is released. * * Typically, #GstParentBufferMeta is used when the child buffer is directly * using the #GstMemory of the parent buffer, and wants to prevent the parent * buffer from being returned to a buffer pool until the #GstMemory is available * for re-use. * * Since: 1.6 */ struct GstParentBufferMeta { /** * the parent #GstMeta structure */ GstMeta parent; /** * the #GstBuffer on which a reference is being held. */ GstBuffer* buffer; } struct GstParseContext; struct GstPipeline { GstBin bin; /** * The fixed clock of the pipeline, used when * GST_PIPELINE_FLAG_FIXED_CLOCK is set. */ GstClock* fixedClock; /** * The stream time of the pipeline. A better name for this * property would be the running_time, the total time spent in the * PLAYING state without being flushed. (deprecated, use the start_time * on GstElement). */ GstClockTime streamTime; /** * Extra delay added to base_time to compensate for computing delays * when setting elements to PLAYING. */ GstClockTime delay; GstPipelinePrivate* priv; void*[4] GstReserved; } struct GstPipelineClass { GstBinClass parentClass; void*[4] GstReserved; } struct GstPipelinePrivate; struct GstPlugin; struct GstPluginClass; /** * A plugin should export a variable of this type called plugin_desc. The plugin * loader will use the data provided there to initialize the plugin. * * The @licence parameter must be one of: LGPL, GPL, QPL, GPL/QPL, MPL, * BSD, MIT/X11, Proprietary, unknown. */ struct GstPluginDesc { /** * the major version number of core that plugin was compiled for */ int majorVersion; /** * the minor version number of core that plugin was compiled for */ int minorVersion; /** * a unique name of the plugin */ const(char)* name; /** * description of plugin */ const(char)* description; /** * pointer to the init function of this plugin. */ GstPluginInitFunc pluginInit; /** * version of the plugin */ const(char)* versio; /** * effective license of plugin */ const(char)* license; /** * source module plugin belongs to */ const(char)* source; /** * shipped package plugin belongs to */ const(char)* p; /** * URL to provider of plugin */ const(char)* origin; /** * date time string in ISO 8601 * format (or rather, a subset thereof), or %NULL. Allowed are the * following formats: "YYYY-MM-DD" and "YYY-MM-DDTHH:MMZ" (with * 'T' a separator and 'Z' indicating UTC/Zulu time). This field * should be set via the GST_PACKAGE_RELEASE_DATETIME * preprocessor macro. */ const(char)* releaseDatetime; void*[4] GstReserved; } struct GstPluginFeature; struct GstPluginFeatureClass; struct GstPoll; struct GstPollFD { /** * a file descriptor */ int fd; int idx; } struct GstPreset; /** * #GstPreset interface. */ struct GstPresetInterface { /** * parent interface type. */ GTypeInterface parent; /** * * Params: * preset = a #GObject that implements #GstPreset * Returns: list with names, use g_strfreev() after usage. */ extern(C) char** function(GstPreset* preset) getPresetNames; /** * * Params: * preset = a #GObject that implements #GstPreset * Returns: an * array of property names which should be freed with g_strfreev() after use. */ extern(C) char** function(GstPreset* preset) getPropertyNames; /** * * Params: * preset = a #GObject that implements #GstPreset * name = preset name to load * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name */ extern(C) int function(GstPreset* preset, const(char)* name) loadPreset; /** * * Params: * preset = a #GObject that implements #GstPreset * name = preset name to save * Returns: %TRUE for success, %FALSE */ extern(C) int function(GstPreset* preset, const(char)* name) savePreset; /** * * Params: * preset = a #GObject that implements #GstPreset * oldName = current preset name * newName = new preset name * Returns: %TRUE for success, %FALSE if e.g. there is no preset with @old_name */ extern(C) int function(GstPreset* preset, const(char)* oldName, const(char)* newName) renamePreset; /** * * Params: * preset = a #GObject that implements #GstPreset * name = preset name to remove * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name */ extern(C) int function(GstPreset* preset, const(char)* name) deletePreset; /** * * Params: * preset = a #GObject that implements #GstPreset * name = preset name * tag = meta data item name * value = new value * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name */ extern(C) int function(GstPreset* preset, const(char)* name, const(char)* tag, const(char)* value) setMeta; /** * * Params: * preset = a #GObject that implements #GstPreset * name = preset name * tag = meta data item name * value = value * Returns: %TRUE for success, %FALSE if e.g. there is no preset with that @name * or no value for the given @tag */ extern(C) int function(GstPreset* preset, const(char)* name, const(char)* tag, char** value) getMeta; void*[4] GstReserved; } /** * Metadata type that holds information about a sample from a protection-protected * track, including the information needed to decrypt it (if it is encrypted). * * Since: 1.6 */ struct GstProtectionMeta { /** * the parent #GstMeta. */ GstMeta meta; /** * the cryptographic information needed to decrypt the sample. */ GstStructure* info; } struct GstProxyPad { GstPad pad; GstProxyPadPrivate* priv; } struct GstProxyPadClass { GstPadClass parentClass; void*[1] GstReserved; } struct GstProxyPadPrivate; struct GstQuery { /** * The parent #GstMiniObject type */ GstMiniObject miniObject; /** * the #GstQueryType */ GstQueryType type; } struct GstRegistry { GstObject object; GstRegistryPrivate* priv; } struct GstRegistryClass { GstObjectClass parentClass; } struct GstRegistryPrivate; struct GstSample; struct GstSegment { /** * flags for this segment */ GstSegmentFlags flags; /** * the playback rate of the segment */ double rate; /** * the already applied rate to the segment */ double appliedRate; /** * the format of the segment values */ GstFormat format; /** * the running time (plus elapsed time, see offset) of the segment start */ ulong base; /** * the amount (in buffer timestamps) that has already been elapsed in * the segment */ ulong offset; /** * the start of the segment in buffer timestamp time (PTS) */ ulong start; /** * the stop of the segment in buffer timestamp time (PTS) */ ulong stop; /** * the stream time of the segment start */ ulong time; /** * the buffer timestamp position in the segment (used internally by * elements such as sources, demuxers or parsers to track progress) */ ulong position; /** * the duration of the segment */ ulong duration; void*[4] GstReserved; } struct GstStaticCaps { /** * the cached #GstCaps */ GstCaps* caps; /** * a string describing a caps */ const(char)* str; void*[4] GstReserved; } struct GstStaticPadTemplate { /** * the name of the template */ const(char)* nameTemplate; /** * the direction of the template */ GstPadDirection direction; /** * the presence of the template */ GstPadPresence presence; /** * the caps of the template. */ GstStaticCaps staticCaps; } struct GstStream { GstObject object; /** * The Stream Identifier for this #GstStream */ const(char)* streamId; GstStreamPrivate* priv; void*[4] GstReserved; } /** * GstStream class structure */ struct GstStreamClass { /** * the parent class structure */ GstObjectClass parentClass; void*[4] GstReserved; } struct GstStreamCollection { GstObject object; char* upstreamId; GstStreamCollectionPrivate* priv; void*[4] GstReserved; } /** * GstStreamCollection class structure */ struct GstStreamCollectionClass { /** * the parent class structure */ GstObjectClass parentClass; /** */ extern(C) void function(GstStreamCollection* collection, GstStream* stream, GParamSpec* pspec) streamNotify; void*[4] GstReserved; } struct GstStreamCollectionPrivate; struct GstStreamPrivate; struct GstStructure { /** * the GType of a structure */ GType type; GQuark name; } struct GstSystemClock { GstClock clock; GstSystemClockPrivate* priv; void*[4] GstReserved; } struct GstSystemClockClass { GstClockClass parentClass; void*[4] GstReserved; } struct GstSystemClockPrivate; struct GstTagList { /** * the parent type */ GstMiniObject miniObject; } struct GstTagSetter; /** * #GstTagSetterInterface interface. */ struct GstTagSetterInterface { /** * parent interface type. */ GTypeInterface gIface; } struct GstTask { GstObject object; /** * the state of the task */ GstTaskState state; /** * used to pause/resume the task */ GCond cond; /** * The lock taken when iterating the task function */ GRecMutex* lock; /** * the function executed by this task */ GstTaskFunction func; /** * user_data passed to the task function */ void* userData; /** * GDestroyNotify for @user_data */ GDestroyNotify notify; /** * a flag indicating that the task is running */ bool running; GThread* thread; GstTaskPrivate* priv; void*[4] GstReserved; } struct GstTaskClass { GstObjectClass parentClass; GstTaskPool* pool; void*[4] GstReserved; } struct GstTaskPool { GstObject object; GThreadPool* pool; void*[4] GstReserved; } /** * The #GstTaskPoolClass object. */ struct GstTaskPoolClass { /** * the parent class structure */ GstObjectClass parentClass; /** */ extern(C) void function(GstTaskPool* pool, GError** err) prepare; /** */ extern(C) void function(GstTaskPool* pool) cleanup; /** * * Params: * pool = a #GstTaskPool * func = the function to call * userData = data to pass to @func * Returns: a pointer that should be used * for the gst_task_pool_join function. This pointer can be %NULL, you * must check @error to detect errors. * * Throws: GException on failure. */ extern(C) void* function(GstTaskPool* pool, GstTaskPoolFunction func, void* userData, GError** err) push; /** */ extern(C) void function(GstTaskPool* pool, void* id) join; void*[4] GstReserved; } struct GstTaskPrivate; /** * Structure for saving a timestamp and a value. */ struct GstTimedValue { /** * timestamp of the value change */ GstClockTime timestamp; /** * the corresponding value */ double value; } struct GstToc; struct GstTocEntry; struct GstTocSetter; /** * #GstTocSetterInterface interface. */ struct GstTocSetterInterface { /** * parent interface type. */ GTypeInterface gIface; } struct GstTracer { GstObject parent; GstTracerPrivate* priv; void*[4] GstReserved; } struct GstTracerClass { GstObjectClass parentClass; void*[4] GstReserved; } struct GstTracerFactory; struct GstTracerFactoryClass; struct GstTracerPrivate; struct GstTracerRecord; struct GstTracerRecordClass; struct GstTypeFind { /** */ extern(C) ubyte* function(void* data, long offset, uint size) peek; /** */ extern(C) void function(void* data, uint probability, GstCaps* caps) suggest; /** * The data used by the caller of the typefinding function. */ void* data; /** */ extern(C) ulong function(void* data) getLength; void*[4] GstReserved; } struct GstTypeFindFactory; struct GstTypeFindFactoryClass; struct GstURIHandler; /** * Any #GstElement using this interface should implement these methods. */ struct GstURIHandlerInterface { /** * The parent interface type */ GTypeInterface parent; /** */ extern(C) GstURIType function(GType type) getType; /** */ extern(C) char** function(GType type) getProtocols; /** * * Params: * handler = A #GstURIHandler * Returns: the URI currently handled by * the @handler. Returns %NULL if there are no URI currently * handled. The returned string must be freed with g_free() when no * longer needed. */ extern(C) char* function(GstURIHandler* handler) getUri; /** * * Params: * handler = A #GstURIHandler * uri = URI to set * Returns: %TRUE if the URI was set successfully, else %FALSE. * * Throws: GException on failure. */ extern(C) int function(GstURIHandler* handler, const(char)* uri, GError** err) setUri; } struct GstUri; struct GstValueArray; /** * VTable for the #GValue @type. */ struct GstValueTable { /** * a #GType */ GType type; /** * a #GstValueCompareFunc */ GstValueCompareFunc compare; /** * a #GstValueSerializeFunc */ GstValueSerializeFunc serialize; /** * a #GstValueDeserializeFunc */ GstValueDeserializeFunc deserialize; void*[4] GstReserved; } /** * A function that will be called from gst_buffer_foreach_meta(). The @meta * field will point to a the reference of the meta. * * @buffer should not be modified from this callback. * * When this function returns %TRUE, the next meta will be * returned. When %FALSE is returned, gst_buffer_foreach_meta() will return. * * When @meta is set to %NULL, the item will be removed from the buffer. * * Params: * buffer = a #GstBuffer * meta = a pointer to a #GstMeta * userData = user data passed to gst_buffer_foreach_meta() * * Returns: %FALSE when gst_buffer_foreach_meta() should stop */ public alias extern(C) int function(GstBuffer* buffer, GstMeta** meta, void* userData) GstBufferForeachMetaFunc; /** * A function that will be called from gst_buffer_list_foreach(). The @buffer * field will point to a the reference of the buffer at @idx. * * When this function returns %TRUE, the next buffer will be * returned. When %FALSE is returned, gst_buffer_list_foreach() will return. * * When @buffer is set to %NULL, the item will be removed from the bufferlist. * When @buffer has been made writable, the new buffer reference can be assigned * to @buffer. This function is responsible for unreffing the old buffer when * removing or modifying. * * Params: * buffer = pointer the buffer * idx = the index of @buffer * userData = user data passed to gst_buffer_list_foreach() * * Returns: %FALSE when gst_buffer_list_foreach() should stop */ public alias extern(C) int function(GstBuffer** buffer, uint idx, void* userData) GstBufferListFunc; /** * Specifies the type of function passed to gst_bus_add_watch() or * gst_bus_add_watch_full(), which is called from the mainloop when a message * is available on the bus. * * The message passed to the function will be unreffed after execution of this * function so it should not be freed in the function. * * Note that this function is used as a GSourceFunc which means that returning * %FALSE will remove the GSource from the mainloop. * * Params: * bus = the #GstBus that sent the message * message = the #GstMessage * userData = user data that has been given, when registering the handler * * Returns: %FALSE if the event source should be removed. */ public alias extern(C) int function(GstBus* bus, GstMessage* message, void* userData) GstBusFunc; /** * Handler will be invoked synchronously, when a new message has been injected * into the bus. This function is mostly used internally. Only one sync handler * can be attached to a given bus. * * If the handler returns GST_BUS_DROP, it should unref the message, else the * message should not be unreffed by the sync handler. * * Params: * bus = the #GstBus that sent the message * message = the #GstMessage * userData = user data that has been given, when registering the handler * * Returns: #GstBusSyncReply stating what to do with the message */ public alias extern(C) GstBusSyncReply function(GstBus* bus, GstMessage* message, void* userData) GstBusSyncHandler; /** * A function that will be called in gst_caps_filter_and_map_in_place(). * The function may modify @features and @structure, and both will be * removed from the caps if %FALSE is returned. * * Params: * features = the #GstCapsFeatures * structure = the #GstStructure * userData = user data * * Returns: %TRUE if the features and structure should be preserved, * %FALSE if it should be removed. */ public alias extern(C) int function(GstCapsFeatures* features, GstStructure* structure, void* userData) GstCapsFilterMapFunc; /** * A function that will be called in gst_caps_foreach(). The function may * not modify @features or @structure. * * Params: * features = the #GstCapsFeatures * structure = the #GstStructure * userData = user data * * Returns: %TRUE if the foreach operation should continue, %FALSE if * the foreach operation should stop with %FALSE. * * Since: 1.6 */ public alias extern(C) int function(GstCapsFeatures* features, GstStructure* structure, void* userData) GstCapsForeachFunc; /** * A function that will be called in gst_caps_map_in_place(). The function * may modify @features and @structure. * * Params: * features = the #GstCapsFeatures * structure = the #GstStructure * userData = user data * * Returns: %TRUE if the map operation should continue, %FALSE if * the map operation should stop with %FALSE. */ public alias extern(C) int function(GstCapsFeatures* features, GstStructure* structure, void* userData) GstCapsMapFunc; /** * The function prototype of the callback. * * Params: * clock = The clock that triggered the callback * time = The time it was triggered * id = The #GstClockID that expired * userData = user data passed in the gst_clock_id_wait_async() function * * Returns: %TRUE or %FALSE (currently unused) */ public alias extern(C) int function(GstClock* clock, GstClockTime time, GstClockID id, void* userData) GstClockCallback; /** */ public alias extern(C) void function(GstControlBinding* binding, double srcValue, GValue* destValue) GstControlBindingConvert; /** * Function for returning a value for a given timestamp. * * Params: * self = the #GstControlSource instance * timestamp = timestamp for which a value should be calculated * value = a value which will be set to the result. * * Returns: %TRUE if the value was successfully calculated. */ public alias extern(C) int function(GstControlSource* self, GstClockTime timestamp, double* value) GstControlSourceGetValue; /** * Function for returning an array of values for starting at a given timestamp. * * Params: * self = the #GstControlSource instance * timestamp = timestamp for which a value should be calculated * interval = the time spacing between subsequent values * nValues = the number of values * values = array to put control-values in * * Returns: %TRUE if the values were successfully calculated. */ public alias extern(C) int function(GstControlSource* self, GstClockTime timestamp, GstClockTime interval, uint nValues, double* values) GstControlSourceGetValueArray; /** */ public alias extern(C) void function() GstDebugFuncPtr; /** */ public alias extern(C) void function(GstElement* element, void* userData) GstElementCallAsyncFunc; /** * This function will be called when creating a copy of @it and should * create a copy of all custom iterator fields or increase their * reference counts. * * Params: * it = The original iterator * copy = The copied iterator */ public alias extern(C) void function(GstIterator* it, GstIterator* copy) GstIteratorCopyFunction; /** * A function to be passed to gst_iterator_fold(). * * Params: * item = the item to fold * ret = a #GValue collecting the result * userData = data passed to gst_iterator_fold() * * Returns: %TRUE if the fold should continue, %FALSE if it should stop. */ public alias extern(C) int function(GValue* item, GValue* ret, void* userData) GstIteratorFoldFunction; /** * A function that is called by gst_iterator_foreach() for every element. * * Params: * item = The item * userData = User data */ public alias extern(C) void function(GValue* item, void* userData) GstIteratorForeachFunction; /** * This function will be called when the iterator is freed. * * Implementors of a #GstIterator should implement this * function and pass it to the constructor of the custom iterator. * The function will be called with the iterator lock held. * * Params: * it = the iterator */ public alias extern(C) void function(GstIterator* it) GstIteratorFreeFunction; /** * The function that will be called after the next item of the iterator * has been retrieved. This function can be used to skip items or stop * the iterator. * * The function will be called with the iterator lock held. * * Params: * it = the iterator * item = the item being retrieved. * * Returns: the result of the operation. */ public alias extern(C) GstIteratorItem function(GstIterator* it, GValue* item) GstIteratorItemFunction; /** * The function that will be called when the next element of the iterator * should be retrieved. * * Implementors of a #GstIterator should implement this * function and pass it to the constructor of the custom iterator. * The function will be called with the iterator lock held. * * Params: * it = the iterator * result = a pointer to hold the next item * * Returns: the result of the operation. */ public alias extern(C) GstIteratorResult function(GstIterator* it, GValue* result) GstIteratorNextFunction; /** * This function will be called whenever a concurrent update happened * to the iterated datastructure. The implementor of the iterator should * restart the iterator from the beginning and clean up any state it might * have. * * Implementors of a #GstIterator should implement this * function and pass it to the constructor of the custom iterator. * The function will be called with the iterator lock held. * * Params: * it = the iterator */ public alias extern(C) void function(GstIterator* it) GstIteratorResyncFunction; /** * Function prototype for a logging function that can be registered with * gst_debug_add_log_function(). * Use G_GNUC_NO_INSTRUMENT on that function. * * Params: * category = a #GstDebugCategory * level = a #GstDebugLevel * file = file name * funct = function name * line = line number * object = a #GObject * message = the message * userData = user data for the log function */ public alias extern(C) void function(GstDebugCategory* category, GstDebugLevel level, const(char)* file, const(char)* funct, int line, GObject* object, GstDebugMessage* message, void* userData) GstLogFunction; /** * Copy @size bytes from @mem starting at @offset and return them wrapped in a * new GstMemory object. * If @size is set to -1, all bytes starting at @offset are copied. * * Params: * mem = a #GstMemory * offset = an offset * size = a size or -1 * * Returns: a new #GstMemory object wrapping a copy of the requested region in * @mem. */ public alias extern(C) GstMemory* function(GstMemory* mem, ptrdiff_t offset, ptrdiff_t size) GstMemoryCopyFunction; /** * Check if @mem1 and @mem2 occupy contiguous memory and return the offset of * @mem1 in the parent buffer in @offset. * * Params: * mem1 = a #GstMemory * mem2 = a #GstMemory * offset = a result offset * * Returns: %TRUE if @mem1 and @mem2 are in contiguous memory. */ public alias extern(C) int function(GstMemory* mem1, GstMemory* mem2, size_t* offset) GstMemoryIsSpanFunction; /** * Get the memory of @mem that can be accessed according to the mode specified * in @info's flags. The function should return a pointer that contains at least * @maxsize bytes. * * Params: * mem = a #GstMemory * info = the #GstMapInfo to map with * maxsize = size to map * * Returns: a pointer to memory of which at least @maxsize bytes can be * accessed according to the access pattern in @info's flags. */ public alias extern(C) void* function(GstMemory* mem, GstMapInfo* info, size_t maxsize) GstMemoryMapFullFunction; /** * Get the memory of @mem that can be accessed according to the mode specified * in @flags. The function should return a pointer that contains at least * @maxsize bytes. * * Params: * mem = a #GstMemory * maxsize = size to map * flags = access mode for the memory * * Returns: a pointer to memory of which at least @maxsize bytes can be * accessed according to the access pattern in @flags. */ public alias extern(C) void* function(GstMemory* mem, size_t maxsize, GstMapFlags flags) GstMemoryMapFunction; /** * Share @size bytes from @mem starting at @offset and return them wrapped in a * new GstMemory object. If @size is set to -1, all bytes starting at @offset are * shared. This function does not make a copy of the bytes in @mem. * * Params: * mem = a #GstMemory * offset = an offset * size = a size or -1 * * Returns: a new #GstMemory object sharing the requested region in @mem. */ public alias extern(C) GstMemory* function(GstMemory* mem, ptrdiff_t offset, ptrdiff_t size) GstMemoryShareFunction; /** * Return the pointer previously retrieved with gst_memory_map() with @info. * * Params: * mem = a #GstMemory * info = a #GstMapInfo */ public alias extern(C) void function(GstMemory* mem, GstMapInfo* info) GstMemoryUnmapFullFunction; /** * Return the pointer previously retrieved with gst_memory_map(). * * Params: * mem = a #GstMemory */ public alias extern(C) void function(GstMemory* mem) GstMemoryUnmapFunction; /** * Function called when @meta is freed in @buffer. * * Params: * meta = a #GstMeta * buffer = a #GstBuffer */ public alias extern(C) void function(GstMeta* meta, GstBuffer* buffer) GstMetaFreeFunction; /** * Function called when @meta is initialized in @buffer. * * Params: * meta = a #GstMeta * params = parameters passed to the init function * buffer = a #GstBuffer */ public alias extern(C) int function(GstMeta* meta, void* params, GstBuffer* buffer) GstMetaInitFunction; /** * Function called for each @meta in @buffer as a result of performing a * transformation on @transbuf. Additional @type specific transform data * is passed to the function as @data. * * Implementations should check the @type of the transform and parse * additional type specific fields in @data that should be used to update * the metadata on @transbuf. * * Params: * transbuf = a #GstBuffer * meta = a #GstMeta * buffer = a #GstBuffer * type = the transform type * data = transform specific data. * * Returns: %TRUE if the transform could be performed */ public alias extern(C) int function(GstBuffer* transbuf, GstMeta* meta, GstBuffer* buffer, GQuark type, void* data) GstMetaTransformFunction; /** * Function prototype for methods to create copies of instances. * * Params: * obj = MiniObject to copy * * Returns: reference to cloned instance. */ public alias extern(C) GstMiniObject* function(GstMiniObject* obj) GstMiniObjectCopyFunction; /** * Function prototype for when a miniobject has lost its last refcount. * Implementation of the mini object are allowed to revive the * passed object by doing a gst_mini_object_ref(). If the object is not * revived after the dispose function, the function should return %TRUE * and the memory associated with the object is freed. * * Params: * obj = MiniObject to dispose * * Returns: %TRUE if the object should be cleaned up. */ public alias extern(C) int function(GstMiniObject* obj) GstMiniObjectDisposeFunction; /** * Virtual function prototype for methods to free resources used by * mini-objects. * * Params: * obj = MiniObject to free */ public alias extern(C) void function(GstMiniObject* obj) GstMiniObjectFreeFunction; /** * A #GstMiniObjectNotify function can be added to a mini object as a * callback that gets triggered when gst_mini_object_unref() drops the * last ref and @obj is about to be freed. * * Params: * userData = data that was provided when the notify was added * obj = the mini object */ public alias extern(C) void function(void* userData, GstMiniObject* obj) GstMiniObjectNotify; /** * This function is called when the pad is activated during the element * READY to PAUSED state change. By default this function will call the * activate function that puts the pad in push mode but elements can * override this function to activate the pad in pull mode if they wish. * * Params: * pad = a #GstPad * parent = the parent of @pad * * Returns: %TRUE if the pad could be activated. */ public alias extern(C) int function(GstPad* pad, GstObject* parent) GstPadActivateFunction; /** * The prototype of the push and pull activate functions. * * Params: * pad = a #GstPad * parent = the parent of @pad * mode = the requested activation mode of @pad * active = activate or deactivate the pad. * * Returns: %TRUE if the pad could be activated or deactivated. */ public alias extern(C) int function(GstPad* pad, GstObject* parent, GstPadMode mode, int active) GstPadActivateModeFunction; /** * A function that will be called on sinkpads when chaining buffers. * The function typically processes the data contained in the buffer and * either consumes the data or passes it on to the internally linked pad(s). * * The implementer of this function receives a refcount to @buffer and should * gst_buffer_unref() when the buffer is no longer needed. * * When a chain function detects an error in the data stream, it must post an * error on the bus and return an appropriate #GstFlowReturn value. * * Params: * pad = the sink #GstPad that performed the chain. * parent = the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT * flag is set, @parent is guaranteed to be not-%NULL and remain valid * during the execution of this function. * buffer = the #GstBuffer that is chained, not %NULL. * * Returns: #GST_FLOW_OK for success */ public alias extern(C) GstFlowReturn function(GstPad* pad, GstObject* parent, GstBuffer* buffer) GstPadChainFunction; /** * A function that will be called on sinkpads when chaining buffer lists. * The function typically processes the data contained in the buffer list and * either consumes the data or passes it on to the internally linked pad(s). * * The implementer of this function receives a refcount to @list and * should gst_buffer_list_unref() when the list is no longer needed. * * When a chainlist function detects an error in the data stream, it must * post an error on the bus and return an appropriate #GstFlowReturn value. * * Params: * pad = the sink #GstPad that performed the chain. * parent = the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT * flag is set, @parent is guaranteed to be not-%NULL and remain valid * during the execution of this function. * list = the #GstBufferList that is chained, not %NULL. * * Returns: #GST_FLOW_OK for success */ public alias extern(C) GstFlowReturn function(GstPad* pad, GstObject* parent, GstBufferList* list) GstPadChainListFunction; /** * Function signature to handle an event for the pad. * * This variant is for specific elements that will take into account the * last downstream flow return (from a pad push), in which case they can * return it. * * Params: * pad = the #GstPad to handle the event. * parent = the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT * flag is set, @parent is guaranteed to be not-%NULL and remain valid * during the execution of this function. * event = the #GstEvent to handle. * * Returns: %GST_FLOW_OK if the event was handled properly, or any other * #GstFlowReturn dependent on downstream state. * * Since: 1.8 */ public alias extern(C) GstFlowReturn function(GstPad* pad, GstObject* parent, GstEvent* event) GstPadEventFullFunction; /** * Function signature to handle an event for the pad. * * Params: * pad = the #GstPad to handle the event. * parent = the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT * flag is set, @parent is guaranteed to be not-%NULL and remain valid * during the execution of this function. * event = the #GstEvent to handle. * * Returns: %TRUE if the pad could handle the event. */ public alias extern(C) int function(GstPad* pad, GstObject* parent, GstEvent* event) GstPadEventFunction; /** * A forward function is called for all internally linked pads, see * gst_pad_forward(). * * Params: * pad = the #GstPad that is forwarded. * userData = the gpointer to optional user data. * * Returns: %TRUE if the dispatching procedure has to be stopped. */ public alias extern(C) int function(GstPad* pad, void* userData) GstPadForwardFunction; /** * This function will be called on source pads when a peer element * request a buffer at the specified @offset and @length. If this function * returns #GST_FLOW_OK, the result buffer will be stored in @buffer. The * contents of @buffer is invalid for any other return value. * * This function is installed on a source pad with * gst_pad_set_getrange_function() and can only be called on source pads after * they are successfully activated with gst_pad_activate_mode() with the * #GST_PAD_MODE_PULL. * * @offset and @length are always given in byte units. @offset must normally be a value * between 0 and the length in bytes of the data available on @pad. The * length (duration in bytes) can be retrieved with a #GST_QUERY_DURATION or with a * #GST_QUERY_SEEKING. * * Any @offset larger or equal than the length will make the function return * #GST_FLOW_EOS, which corresponds to EOS. In this case @buffer does not * contain a valid buffer. * * The buffer size of @buffer will only be smaller than @length when @offset is * near the end of the stream. In all other cases, the size of @buffer must be * exactly the requested size. * * It is allowed to call this function with a 0 @length and valid @offset, in * which case @buffer will contain a 0-sized buffer and the function returns * #GST_FLOW_OK. * * When this function is called with a -1 @offset, the sequentially next buffer * of length @length in the stream is returned. * * When this function is called with a -1 @length, a buffer with a default * optimal length is returned in @buffer. The length might depend on the value * of @offset. * * Params: * pad = the src #GstPad to perform the getrange on. * parent = the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT * flag is set, @parent is guaranteed to be not-%NULL and remain valid * during the execution of this function. * offset = the offset of the range * length = the length of the range * buffer = a memory location to hold the result buffer, cannot be %NULL. * * Returns: #GST_FLOW_OK for success and a valid buffer in @buffer. Any other * return value leaves @buffer undefined. */ public alias extern(C) GstFlowReturn function(GstPad* pad, GstObject* parent, ulong offset, uint length, GstBuffer** buffer) GstPadGetRangeFunction; /** * The signature of the internal pad link iterator function. * * Params: * pad = The #GstPad to query. * parent = the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT * flag is set, @parent is guaranteed to be not-%NULL and remain valid * during the execution of this function. * * Returns: a new #GstIterator that will iterate over all pads that are * linked to the given pad on the inside of the parent element. * * the caller must call gst_iterator_free() after usage. */ public alias extern(C) GstIterator* function(GstPad* pad, GstObject* parent) GstPadIterIntLinkFunction; /** * Function signature to handle a new link on the pad. * * Params: * pad = the #GstPad that is linked. * parent = the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT * flag is set, @parent is guaranteed to be not-%NULL and remain valid * during the execution of this function. * peer = the peer #GstPad of the link * * Returns: the result of the link with the specified peer. */ public alias extern(C) GstPadLinkReturn function(GstPad* pad, GstObject* parent, GstPad* peer) GstPadLinkFunction; /** * Callback used by gst_pad_add_probe(). Gets called to notify about the current * blocking type. * * The callback is allowed to modify the data pointer in @info. * * Params: * pad = the #GstPad that is blocked * info = #GstPadProbeInfo * userData = the gpointer to optional user data. * * Returns: a #GstPadProbeReturn */ public alias extern(C) GstPadProbeReturn function(GstPad* pad, GstPadProbeInfo* info, void* userData) GstPadProbeCallback; /** * The signature of the query function. * * Params: * pad = the #GstPad to query. * parent = the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT * flag is set, @parent is guaranteed to be not-%NULL and remain valid * during the execution of this function. * query = the #GstQuery object to execute * * Returns: %TRUE if the query could be performed. */ public alias extern(C) int function(GstPad* pad, GstObject* parent, GstQuery* query) GstPadQueryFunction; /** * Callback used by gst_pad_sticky_events_foreach(). * * When this function returns %TRUE, the next event will be * returned. When %FALSE is returned, gst_pad_sticky_events_foreach() will return. * * When @event is set to %NULL, the item will be removed from the list of sticky events. * @event can be replaced by assigning a new reference to it. * This function is responsible for unreffing the old event when * removing or modifying. * * Params: * pad = the #GstPad. * event = a sticky #GstEvent. * userData = the #gpointer to optional user data. * * Returns: %TRUE if the iteration should continue */ public alias extern(C) int function(GstPad* pad, GstEvent** event, void* userData) GstPadStickyEventsForeachFunction; /** * Function signature to handle a unlinking the pad prom its peer. * * Params: * pad = the #GstPad that is linked. * parent = the parent of @pad. If the #GST_PAD_FLAG_NEED_PARENT * flag is set, @parent is guaranteed to be not-%NULL and remain valid * during the execution of this function. */ public alias extern(C) void function(GstPad* pad, GstObject* parent) GstPadUnlinkFunction; /** * A function that can be used with e.g. gst_registry_feature_filter() * to get a list of pluginfeature that match certain criteria. * * Params: * feature = the pluginfeature to check * userData = the user_data that has been passed on e.g. * gst_registry_feature_filter() * * Returns: %TRUE for a positive match, %FALSE otherwise */ public alias extern(C) int function(GstPluginFeature* feature, void* userData) GstPluginFeatureFilter; /** * A function that can be used with e.g. gst_registry_plugin_filter() * to get a list of plugins that match certain criteria. * * Params: * plugin = the plugin to check * userData = the user_data that has been passed on e.g. gst_registry_plugin_filter() * * Returns: %TRUE for a positive match, %FALSE otherwise */ public alias extern(C) int function(GstPlugin* plugin, void* userData) GstPluginFilter; /** * A plugin should provide a pointer to a function of either #GstPluginInitFunc * or this type in the plugin_desc struct. * The function will be called by the loader at startup. One would then * register each #GstPluginFeature. This version allows * user data to be passed to init function (useful for bindings). * * Params: * plugin = The plugin object * userData = extra data * * Returns: %TRUE if plugin initialised successfully */ public alias extern(C) int function(GstPlugin* plugin, void* userData) GstPluginInitFullFunc; /** * A plugin should provide a pointer to a function of this type in the * plugin_desc struct. * This function will be called by the loader at startup. One would then * register each #GstPluginFeature. * * Params: * plugin = The plugin object * * Returns: %TRUE if plugin initialised successfully */ public alias extern(C) int function(GstPlugin* plugin) GstPluginInitFunc; /** * A function that will be called in gst_structure_filter_and_map_in_place(). * The function may modify @value, and the value will be removed from * the structure if %FALSE is returned. * * Params: * fieldId = the #GQuark of the field name * value = the #GValue of the field * userData = user data * * Returns: %TRUE if the field should be preserved, %FALSE if it * should be removed. */ public alias extern(C) int function(GQuark fieldId, GValue* value, void* userData) GstStructureFilterMapFunc; /** * A function that will be called in gst_structure_foreach(). The function may * not modify @value. * * Params: * fieldId = the #GQuark of the field name * value = the #GValue of the field * userData = user data * * Returns: %TRUE if the foreach operation should continue, %FALSE if * the foreach operation should stop with %FALSE. */ public alias extern(C) int function(GQuark fieldId, GValue* value, void* userData) GstStructureForeachFunc; /** * A function that will be called in gst_structure_map_in_place(). The function * may modify @value. * * Params: * fieldId = the #GQuark of the field name * value = the #GValue of the field * userData = user data * * Returns: %TRUE if the map operation should continue, %FALSE if * the map operation should stop with %FALSE. */ public alias extern(C) int function(GQuark fieldId, GValue* value, void* userData) GstStructureMapFunc; /** * A function that will be called in gst_tag_list_foreach(). The function may * not modify the tag list. * * Params: * list = the #GstTagList * tag = a name of a tag in @list * userData = user data */ public alias extern(C) void function(GstTagList* list, const(char)* tag, void* userData) GstTagForeachFunc; /** * A function for merging multiple values of a tag used when registering * tags. * * Params: * dest = the destination #GValue * src = the source #GValue */ public alias extern(C) void function(GValue* dest, GValue* src) GstTagMergeFunc; /** * A function that will repeatedly be called in the thread created by * a #GstTask. * * Params: * userData = user data passed to the function */ public alias extern(C) void function(void* userData) GstTaskFunction; /** * Task function, see gst_task_pool_push(). * * Params: * userData = user data for the task function */ public alias extern(C) void function(void* userData) GstTaskPoolFunction; /** * Custom GstTask thread callback functions that can be installed. * * Params: * task = The #GstTask * thread = The #GThread * userData = user data */ public alias extern(C) void function(GstTask* task, GThread* thread, void* userData) GstTaskThreadFunc; /** * A function that will be called by typefinding. * * Params: * find = A #GstTypeFind structure * userData = optional data to pass to the function */ public alias extern(C) void function(GstTypeFind* find, void* userData) GstTypeFindFunction; /** * Used together with gst_value_compare() to compare #GValue items. * * Params: * value1 = first value for comparison * value2 = second value for comparison * * Returns: one of GST_VALUE_LESS_THAN, GST_VALUE_EQUAL, GST_VALUE_GREATER_THAN * or GST_VALUE_UNORDERED */ public alias extern(C) int function(GValue* value1, GValue* value2) GstValueCompareFunc; /** * Used by gst_value_deserialize() to parse a non-binary form into the #GValue. * * Params: * dest = a #GValue * s = a string * * Returns: %TRUE for success */ public alias extern(C) int function(GValue* dest, const(char)* s) GstValueDeserializeFunc; /** * Used by gst_value_serialize() to obtain a non-binary form of the #GValue. * * Free-function: g_free * * Params: * value1 = a #GValue * * Returns: the string representation of the value */ public alias extern(C) char* function(GValue* value1) GstValueSerializeFunc; /** * The allocator name for the default system memory allocator */ enum ALLOCATOR_SYSMEM = "SystemMemory"; alias GST_ALLOCATOR_SYSMEM = ALLOCATOR_SYSMEM; /** * Combination of all possible fields that can be copied with * gst_buffer_copy_into(). */ enum BUFFER_COPY_ALL = 15; alias GST_BUFFER_COPY_ALL = BUFFER_COPY_ALL; /** * Combination of all possible metadata fields that can be copied with * gst_buffer_copy_into(). */ enum BUFFER_COPY_METADATA = 7; alias GST_BUFFER_COPY_METADATA = BUFFER_COPY_METADATA; /** * Constant for no-offset return results. */ enum BUFFER_OFFSET_NONE = 18446744073709551615UL; alias GST_BUFFER_OFFSET_NONE = BUFFER_OFFSET_NONE; enum CAN_INLINE = 1; alias GST_CAN_INLINE = CAN_INLINE; enum CAPS_FEATURE_MEMORY_SYSTEM_MEMORY = "memory:SystemMemory"; alias GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY = CAPS_FEATURE_MEMORY_SYSTEM_MEMORY; /** * Constant to define an undefined clock time. */ enum CLOCK_TIME_NONE = 18446744073709551615UL; alias GST_CLOCK_TIME_NONE = CLOCK_TIME_NONE; enum DEBUG_BG_MASK = 240; alias GST_DEBUG_BG_MASK = DEBUG_BG_MASK; enum DEBUG_FG_MASK = 15; alias GST_DEBUG_FG_MASK = DEBUG_FG_MASK; enum DEBUG_FORMAT_MASK = 65280; alias GST_DEBUG_FORMAT_MASK = DEBUG_FORMAT_MASK; enum ELEMENT_FACTORY_KLASS_DECODER = "Decoder"; alias GST_ELEMENT_FACTORY_KLASS_DECODER = ELEMENT_FACTORY_KLASS_DECODER; enum ELEMENT_FACTORY_KLASS_DECRYPTOR = "Decryptor"; alias GST_ELEMENT_FACTORY_KLASS_DECRYPTOR = ELEMENT_FACTORY_KLASS_DECRYPTOR; enum ELEMENT_FACTORY_KLASS_DEMUXER = "Demuxer"; alias GST_ELEMENT_FACTORY_KLASS_DEMUXER = ELEMENT_FACTORY_KLASS_DEMUXER; enum ELEMENT_FACTORY_KLASS_DEPAYLOADER = "Depayloader"; alias GST_ELEMENT_FACTORY_KLASS_DEPAYLOADER = ELEMENT_FACTORY_KLASS_DEPAYLOADER; enum ELEMENT_FACTORY_KLASS_ENCODER = "Encoder"; alias GST_ELEMENT_FACTORY_KLASS_ENCODER = ELEMENT_FACTORY_KLASS_ENCODER; enum ELEMENT_FACTORY_KLASS_ENCRYPTOR = "Encryptor"; alias GST_ELEMENT_FACTORY_KLASS_ENCRYPTOR = ELEMENT_FACTORY_KLASS_ENCRYPTOR; enum ELEMENT_FACTORY_KLASS_FORMATTER = "Formatter"; alias GST_ELEMENT_FACTORY_KLASS_FORMATTER = ELEMENT_FACTORY_KLASS_FORMATTER; enum ELEMENT_FACTORY_KLASS_MEDIA_AUDIO = "Audio"; alias GST_ELEMENT_FACTORY_KLASS_MEDIA_AUDIO = ELEMENT_FACTORY_KLASS_MEDIA_AUDIO; enum ELEMENT_FACTORY_KLASS_MEDIA_IMAGE = "Image"; alias GST_ELEMENT_FACTORY_KLASS_MEDIA_IMAGE = ELEMENT_FACTORY_KLASS_MEDIA_IMAGE; enum ELEMENT_FACTORY_KLASS_MEDIA_METADATA = "Metadata"; alias GST_ELEMENT_FACTORY_KLASS_MEDIA_METADATA = ELEMENT_FACTORY_KLASS_MEDIA_METADATA; enum ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE = "Subtitle"; alias GST_ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE = ELEMENT_FACTORY_KLASS_MEDIA_SUBTITLE; enum ELEMENT_FACTORY_KLASS_MEDIA_VIDEO = "Video"; alias GST_ELEMENT_FACTORY_KLASS_MEDIA_VIDEO = ELEMENT_FACTORY_KLASS_MEDIA_VIDEO; enum ELEMENT_FACTORY_KLASS_MUXER = "Muxer"; alias GST_ELEMENT_FACTORY_KLASS_MUXER = ELEMENT_FACTORY_KLASS_MUXER; enum ELEMENT_FACTORY_KLASS_PARSER = "Parser"; alias GST_ELEMENT_FACTORY_KLASS_PARSER = ELEMENT_FACTORY_KLASS_PARSER; enum ELEMENT_FACTORY_KLASS_PAYLOADER = "Payloader"; alias GST_ELEMENT_FACTORY_KLASS_PAYLOADER = ELEMENT_FACTORY_KLASS_PAYLOADER; enum ELEMENT_FACTORY_KLASS_SINK = "Sink"; alias GST_ELEMENT_FACTORY_KLASS_SINK = ELEMENT_FACTORY_KLASS_SINK; enum ELEMENT_FACTORY_KLASS_SRC = "Source"; alias GST_ELEMENT_FACTORY_KLASS_SRC = ELEMENT_FACTORY_KLASS_SRC; /** * Elements of any of the defined GST_ELEMENT_FACTORY_LIST types */ enum ELEMENT_FACTORY_TYPE_ANY = 562949953421311UL; alias GST_ELEMENT_FACTORY_TYPE_ANY = ELEMENT_FACTORY_TYPE_ANY; /** * All sinks handling audio, video or image media types */ enum ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS = 3940649673949188UL; alias GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS = ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS; /** * All encoders handling audio media types */ enum ELEMENT_FACTORY_TYPE_AUDIO_ENCODER = 1125899906842626UL; alias GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER = ELEMENT_FACTORY_TYPE_AUDIO_ENCODER; /** * All elements used to 'decode' streams (decoders, demuxers, parsers, depayloaders) */ enum ELEMENT_FACTORY_TYPE_DECODABLE = 353UL; alias GST_ELEMENT_FACTORY_TYPE_DECODABLE = ELEMENT_FACTORY_TYPE_DECODABLE; enum ELEMENT_FACTORY_TYPE_DECODER = 1UL; alias GST_ELEMENT_FACTORY_TYPE_DECODER = ELEMENT_FACTORY_TYPE_DECODER; enum ELEMENT_FACTORY_TYPE_DECRYPTOR = 1024UL; alias GST_ELEMENT_FACTORY_TYPE_DECRYPTOR = ELEMENT_FACTORY_TYPE_DECRYPTOR; enum ELEMENT_FACTORY_TYPE_DEMUXER = 32UL; alias GST_ELEMENT_FACTORY_TYPE_DEMUXER = ELEMENT_FACTORY_TYPE_DEMUXER; enum ELEMENT_FACTORY_TYPE_DEPAYLOADER = 256UL; alias GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER = ELEMENT_FACTORY_TYPE_DEPAYLOADER; enum ELEMENT_FACTORY_TYPE_ENCODER = 2UL; alias GST_ELEMENT_FACTORY_TYPE_ENCODER = ELEMENT_FACTORY_TYPE_ENCODER; enum ELEMENT_FACTORY_TYPE_ENCRYPTOR = 2048UL; alias GST_ELEMENT_FACTORY_TYPE_ENCRYPTOR = ELEMENT_FACTORY_TYPE_ENCRYPTOR; enum ELEMENT_FACTORY_TYPE_FORMATTER = 512UL; alias GST_ELEMENT_FACTORY_TYPE_FORMATTER = ELEMENT_FACTORY_TYPE_FORMATTER; enum ELEMENT_FACTORY_TYPE_MAX_ELEMENTS = 281474976710656UL; alias GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS = ELEMENT_FACTORY_TYPE_MAX_ELEMENTS; /** * Elements matching any of the defined GST_ELEMENT_FACTORY_TYPE_MEDIA types * * Note: Do not use this if you wish to not filter against any of the defined * media types. If you wish to do this, simply don't specify any * GST_ELEMENT_FACTORY_TYPE_MEDIA flag. */ enum ELEMENT_FACTORY_TYPE_MEDIA_ANY = 18446462598732840960UL; alias GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY = ELEMENT_FACTORY_TYPE_MEDIA_ANY; enum ELEMENT_FACTORY_TYPE_MEDIA_AUDIO = 1125899906842624UL; alias GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO = ELEMENT_FACTORY_TYPE_MEDIA_AUDIO; enum ELEMENT_FACTORY_TYPE_MEDIA_IMAGE = 2251799813685248UL; alias GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE = ELEMENT_FACTORY_TYPE_MEDIA_IMAGE; enum ELEMENT_FACTORY_TYPE_MEDIA_METADATA = 9007199254740992UL; alias GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA = ELEMENT_FACTORY_TYPE_MEDIA_METADATA; enum ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE = 4503599627370496UL; alias GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE = ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE; enum ELEMENT_FACTORY_TYPE_MEDIA_VIDEO = 562949953421312UL; alias GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO = ELEMENT_FACTORY_TYPE_MEDIA_VIDEO; enum ELEMENT_FACTORY_TYPE_MUXER = 16UL; alias GST_ELEMENT_FACTORY_TYPE_MUXER = ELEMENT_FACTORY_TYPE_MUXER; enum ELEMENT_FACTORY_TYPE_PARSER = 64UL; alias GST_ELEMENT_FACTORY_TYPE_PARSER = ELEMENT_FACTORY_TYPE_PARSER; enum ELEMENT_FACTORY_TYPE_PAYLOADER = 128UL; alias GST_ELEMENT_FACTORY_TYPE_PAYLOADER = ELEMENT_FACTORY_TYPE_PAYLOADER; enum ELEMENT_FACTORY_TYPE_SINK = 4UL; alias GST_ELEMENT_FACTORY_TYPE_SINK = ELEMENT_FACTORY_TYPE_SINK; enum ELEMENT_FACTORY_TYPE_SRC = 8UL; alias GST_ELEMENT_FACTORY_TYPE_SRC = ELEMENT_FACTORY_TYPE_SRC; /** * All encoders handling video or image media types */ enum ELEMENT_FACTORY_TYPE_VIDEO_ENCODER = 2814749767106562UL; alias GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER = ELEMENT_FACTORY_TYPE_VIDEO_ENCODER; /** * Name and contact details of the author(s). Use \n to separate * multiple author details. * E.g: "Joe Bloggs <joe.blogs at foo.com>" */ enum ELEMENT_METADATA_AUTHOR = "author"; alias GST_ELEMENT_METADATA_AUTHOR = ELEMENT_METADATA_AUTHOR; /** * Sentence describing the purpose of the element. * E.g: "Write stream to a file" */ enum ELEMENT_METADATA_DESCRIPTION = "description"; alias GST_ELEMENT_METADATA_DESCRIPTION = ELEMENT_METADATA_DESCRIPTION; /** * Set uri pointing to user documentation. Applications can use this to show * help for e.g. effects to users. */ enum ELEMENT_METADATA_DOC_URI = "doc-uri"; alias GST_ELEMENT_METADATA_DOC_URI = ELEMENT_METADATA_DOC_URI; /** * Elements that bridge to certain other products can include an icon of that * used product. Application can show the icon in menus/selectors to help * identifying specific elements. */ enum ELEMENT_METADATA_ICON_NAME = "icon-name"; alias GST_ELEMENT_METADATA_ICON_NAME = ELEMENT_METADATA_ICON_NAME; /** * String describing the type of element, as an unordered list * separated with slashes ('/'). See draft-klass.txt of the design docs * for more details and common types. E.g: "Sink/File" */ enum ELEMENT_METADATA_KLASS = "klass"; alias GST_ELEMENT_METADATA_KLASS = ELEMENT_METADATA_KLASS; /** * The long English name of the element. E.g. "File Sink" */ enum ELEMENT_METADATA_LONGNAME = "long-name"; alias GST_ELEMENT_METADATA_LONGNAME = ELEMENT_METADATA_LONGNAME; /** * Builds a string using errno describing the previously failed system * call. To be used as the debug argument in #GST_ELEMENT_ERROR. */ enum ERROR_SYSTEM = "system error: %s"; alias GST_ERROR_SYSTEM = ERROR_SYSTEM; enum EVENT_NUM_SHIFT = 8; alias GST_EVENT_NUM_SHIFT = EVENT_NUM_SHIFT; /** * The same thing as #GST_EVENT_TYPE_UPSTREAM | #GST_EVENT_TYPE_DOWNSTREAM. */ enum EVENT_TYPE_BOTH = 3; alias GST_EVENT_TYPE_BOTH = EVENT_TYPE_BOTH; /** * A mask value with all bits set, for use as a * #GstFlagSet mask where all flag bits must match * exactly */ enum FLAG_SET_MASK_EXACT = 4294967295; alias GST_FLAG_SET_MASK_EXACT = FLAG_SET_MASK_EXACT; /** * The PERCENT format is between 0 and this value */ enum FORMAT_PERCENT_MAX = 1000000UL; alias GST_FORMAT_PERCENT_MAX = FORMAT_PERCENT_MAX; /** * The value used to scale down the reported PERCENT format value to * its real value. */ enum FORMAT_PERCENT_SCALE = 10000UL; alias GST_FORMAT_PERCENT_SCALE = FORMAT_PERCENT_SCALE; /** * Can be used together with #GST_FOURCC_ARGS to properly output a * #guint32 fourcc value in a printf()-style text message. * * |[ * printf ("fourcc: %" GST_FOURCC_FORMAT "\n", GST_FOURCC_ARGS (fcc)); * ]| */ enum FOURCC_FORMAT = "c%c%c%c"; alias GST_FOURCC_FORMAT = FOURCC_FORMAT; /** * To be used in GST_PLUGIN_DEFINE if unsure about the licence. */ enum LICENSE_UNKNOWN = "unknown"; alias GST_LICENSE_UNKNOWN = LICENSE_UNKNOWN; /** * GstLockFlags value alias for GST_LOCK_FLAG_READ | GST_LOCK_FLAG_WRITE */ enum LOCK_FLAG_READWRITE = 3; alias GST_LOCK_FLAG_READWRITE = LOCK_FLAG_READWRITE; /** * GstMapFlags value alias for GST_MAP_READ | GST_MAP_WRITE */ enum MAP_READWRITE = 3; alias GST_MAP_READWRITE = MAP_READWRITE; /** * This metadata stays relevant as long as memory layout is unchanged. */ enum META_TAG_MEMORY_STR = "memory"; alias GST_META_TAG_MEMORY_STR = META_TAG_MEMORY_STR; /** * Constant that defines one GStreamer millisecond. */ enum MSECOND = 1000000UL; alias GST_MSECOND = MSECOND; /** * Constant that defines one GStreamer nanosecond */ enum NSECOND = 1UL; alias GST_NSECOND = NSECOND; /** * Use this flag on GObject properties to signal they can make sense to be. * controlled over time. This hint is used by the GstController. */ enum PARAM_CONTROLLABLE = 2; alias GST_PARAM_CONTROLLABLE = PARAM_CONTROLLABLE; /** * Use this flag on GObject properties of GstElements to indicate that * they can be changed when the element is in the PAUSED or lower state. * This flag implies GST_PARAM_MUTABLE_READY. */ enum PARAM_MUTABLE_PAUSED = 8; alias GST_PARAM_MUTABLE_PAUSED = PARAM_MUTABLE_PAUSED; /** * Use this flag on GObject properties of GstElements to indicate that * they can be changed when the element is in the PLAYING or lower state. * This flag implies GST_PARAM_MUTABLE_PAUSED. */ enum PARAM_MUTABLE_PLAYING = 16; alias GST_PARAM_MUTABLE_PLAYING = PARAM_MUTABLE_PLAYING; /** * Use this flag on GObject properties of GstElements to indicate that * they can be changed when the element is in the READY or lower state. */ enum PARAM_MUTABLE_READY = 4; alias GST_PARAM_MUTABLE_READY = PARAM_MUTABLE_READY; /** * Bits based on GST_PARAM_USER_SHIFT can be used by 3rd party applications. */ enum PARAM_USER_SHIFT = 256; alias GST_PARAM_USER_SHIFT = PARAM_USER_SHIFT; /** * The field name in a GstCaps that is used to signal the UUID of the protection * system. */ enum PROTECTION_SYSTEM_ID_CAPS_FIELD = "protection-system"; alias GST_PROTECTION_SYSTEM_ID_CAPS_FIELD = PROTECTION_SYSTEM_ID_CAPS_FIELD; /** * printf format type used to debug GStreamer types. You can use this in * combination with GStreamer's debug logging system as well as the functions * gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() * to pretty-print the following types: #GstCaps, #GstStructure, * #GstCapsFeatures, #GstTagList, #GstDateTime, #GstBuffer, #GstBufferList, * #GstMessage, #GstEvent, #GstQuery, #GstContext, #GstPad, #GstObject. All * #GObject types will be printed as typename plus pointer, and everything * else will simply be printed as pointer address. * * This can only be used on types whose size is >= sizeof(gpointer). */ enum PTR_FORMAT = "paA"; alias GST_PTR_FORMAT = PTR_FORMAT; enum QUERY_NUM_SHIFT = 8; alias GST_QUERY_NUM_SHIFT = QUERY_NUM_SHIFT; /** * The same thing as #GST_QUERY_TYPE_UPSTREAM | #GST_QUERY_TYPE_DOWNSTREAM. */ enum QUERY_TYPE_BOTH = 3; alias GST_QUERY_TYPE_BOTH = QUERY_TYPE_BOTH; /** * Constant that defines one GStreamer second. */ enum SECOND = 1000000000UL; alias GST_SECOND = SECOND; /** * printf format type used to debug GStreamer segments. You can use this in * combination with GStreamer's debug logging system as well as the functions * gst_info_vasprintf(), gst_info_strdup_vprintf() and gst_info_strdup_printf() * to pretty-print #GstSegment structures. * This can only be used on pointers to GstSegment structures. */ enum SEGMENT_FORMAT = "paB"; alias GST_SEGMENT_FORMAT = SEGMENT_FORMAT; /** * A string that can be used in printf-like format strings to display a signed * #GstClockTimeDiff or #gint64 value in h:m:s format. Use GST_TIME_ARGS() to * construct the matching arguments. * * Example: * |[ * printf("%" GST_STIME_FORMAT "\n", GST_STIME_ARGS(ts)); * ]| */ enum STIME_FORMAT = "c%"; alias GST_STIME_FORMAT = STIME_FORMAT; /** * album containing this data (string) * * The album name as it should be displayed, e.g. 'The Jazz Guitar' */ enum TAG_ALBUM = "album"; alias GST_TAG_ALBUM = TAG_ALBUM; /** * The artist of the entire album, as it should be displayed. */ enum TAG_ALBUM_ARTIST = "album-artist"; alias GST_TAG_ALBUM_ARTIST = TAG_ALBUM_ARTIST; /** * The artist of the entire album, as it should be sorted. */ enum TAG_ALBUM_ARTIST_SORTNAME = "album-artist-sortname"; alias GST_TAG_ALBUM_ARTIST_SORTNAME = TAG_ALBUM_ARTIST_SORTNAME; /** * album gain in db (double) */ enum TAG_ALBUM_GAIN = "replaygain-album-gain"; alias GST_TAG_ALBUM_GAIN = TAG_ALBUM_GAIN; /** * peak of the album (double) */ enum TAG_ALBUM_PEAK = "replaygain-album-peak"; alias GST_TAG_ALBUM_PEAK = TAG_ALBUM_PEAK; /** * album containing this data, as used for sorting (string) * * The album name as it should be sorted, e.g. 'Jazz Guitar, The' */ enum TAG_ALBUM_SORTNAME = "album-sortname"; alias GST_TAG_ALBUM_SORTNAME = TAG_ALBUM_SORTNAME; /** * count of discs inside collection this disc belongs to (unsigned integer) */ enum TAG_ALBUM_VOLUME_COUNT = "album-disc-count"; alias GST_TAG_ALBUM_VOLUME_COUNT = TAG_ALBUM_VOLUME_COUNT; /** * disc number inside a collection (unsigned integer) */ enum TAG_ALBUM_VOLUME_NUMBER = "album-disc-number"; alias GST_TAG_ALBUM_VOLUME_NUMBER = TAG_ALBUM_VOLUME_NUMBER; /** * Arbitrary application data (sample) * * Some formats allow applications to add their own arbitrary data * into files. This data is application dependent. */ enum TAG_APPLICATION_DATA = "application-data"; alias GST_TAG_APPLICATION_DATA = TAG_APPLICATION_DATA; /** * Name of the application used to create the media (string) */ enum TAG_APPLICATION_NAME = "application-name"; alias GST_TAG_APPLICATION_NAME = TAG_APPLICATION_NAME; /** * person(s) responsible for the recording (string) * * The artist name as it should be displayed, e.g. 'Jimi Hendrix' or * 'The Guitar Heroes' */ enum TAG_ARTIST = "artist"; alias GST_TAG_ARTIST = TAG_ARTIST; /** * person(s) responsible for the recording, as used for sorting (string) * * The artist name as it should be sorted, e.g. 'Hendrix, Jimi' or * 'Guitar Heroes, The' */ enum TAG_ARTIST_SORTNAME = "artist-sortname"; alias GST_TAG_ARTIST_SORTNAME = TAG_ARTIST_SORTNAME; /** * generic file attachment (sample) (sample taglist should specify the content * type and if possible set "filename" to the file name of the * attachment) */ enum TAG_ATTACHMENT = "attachment"; alias GST_TAG_ATTACHMENT = TAG_ATTACHMENT; /** * codec the audio data is stored in (string) */ enum TAG_AUDIO_CODEC = "audio-codec"; alias GST_TAG_AUDIO_CODEC = TAG_AUDIO_CODEC; /** * number of beats per minute in audio (double) */ enum TAG_BEATS_PER_MINUTE = "beats-per-minute"; alias GST_TAG_BEATS_PER_MINUTE = TAG_BEATS_PER_MINUTE; /** * exact or average bitrate in bits/s (unsigned integer) */ enum TAG_BITRATE = "bitrate"; alias GST_TAG_BITRATE = TAG_BITRATE; /** * codec the data is stored in (string) */ enum TAG_CODEC = "codec"; alias GST_TAG_CODEC = TAG_CODEC; /** * free text commenting the data (string) */ enum TAG_COMMENT = "comment"; alias GST_TAG_COMMENT = TAG_COMMENT; /** * person(s) who composed the recording (string) */ enum TAG_COMPOSER = "composer"; alias GST_TAG_COMPOSER = TAG_COMPOSER; /** * The composer's name, used for sorting (string) */ enum TAG_COMPOSER_SORTNAME = "composer-sortname"; alias GST_TAG_COMPOSER_SORTNAME = TAG_COMPOSER_SORTNAME; /** * conductor/performer refinement (string) */ enum TAG_CONDUCTOR = "conductor"; alias GST_TAG_CONDUCTOR = TAG_CONDUCTOR; /** * contact information (string) */ enum TAG_CONTACT = "contact"; alias GST_TAG_CONTACT = TAG_CONTACT; /** * container format the data is stored in (string) */ enum TAG_CONTAINER_FORMAT = "container-format"; alias GST_TAG_CONTAINER_FORMAT = TAG_CONTAINER_FORMAT; /** * copyright notice of the data (string) */ enum TAG_COPYRIGHT = "copyright"; alias GST_TAG_COPYRIGHT = TAG_COPYRIGHT; /** * URI to location where copyright details can be found (string) */ enum TAG_COPYRIGHT_URI = "copyright-uri"; alias GST_TAG_COPYRIGHT_URI = TAG_COPYRIGHT_URI; /** * date the data was created (#GDate structure) */ enum TAG_DATE = "date"; alias GST_TAG_DATE = TAG_DATE; /** * date and time the data was created (#GstDateTime structure) */ enum TAG_DATE_TIME = "datetime"; alias GST_TAG_DATE_TIME = TAG_DATE_TIME; /** * short text describing the content of the data (string) */ enum TAG_DESCRIPTION = "description"; alias GST_TAG_DESCRIPTION = TAG_DESCRIPTION; /** * Manufacturer of the device used to create the media (string) */ enum TAG_DEVICE_MANUFACTURER = "device-manufacturer"; alias GST_TAG_DEVICE_MANUFACTURER = TAG_DEVICE_MANUFACTURER; /** * Model of the device used to create the media (string) */ enum TAG_DEVICE_MODEL = "device-model"; alias GST_TAG_DEVICE_MODEL = TAG_DEVICE_MODEL; /** * length in GStreamer time units (nanoseconds) (unsigned 64-bit integer) */ enum TAG_DURATION = "duration"; alias GST_TAG_DURATION = TAG_DURATION; /** * name of the person or organisation that encoded the file. May contain a * copyright message if the person or organisation also holds the copyright * (string) * * Note: do not use this field to describe the encoding application. Use * #GST_TAG_APPLICATION_NAME or #GST_TAG_COMMENT for that. */ enum TAG_ENCODED_BY = "encoded-by"; alias GST_TAG_ENCODED_BY = TAG_ENCODED_BY; /** * encoder used to encode this stream (string) */ enum TAG_ENCODER = "encoder"; alias GST_TAG_ENCODER = TAG_ENCODER; /** * version of the encoder used to encode this stream (unsigned integer) */ enum TAG_ENCODER_VERSION = "encoder-version"; alias GST_TAG_ENCODER_VERSION = TAG_ENCODER_VERSION; /** * key/value text commenting the data (string) * * Must be in the form of 'key=comment' or * 'key[lc]=comment' where 'lc' is an ISO-639 * language code. * * This tag is used for unknown Vorbis comment tags, * unknown APE tags and certain ID3v2 comment fields. */ enum TAG_EXTENDED_COMMENT = "extended-comment"; alias GST_TAG_EXTENDED_COMMENT = TAG_EXTENDED_COMMENT; /** * genre this data belongs to (string) */ enum TAG_GENRE = "genre"; alias GST_TAG_GENRE = TAG_GENRE; /** * Indicates the direction the device is pointing to when capturing * a media. It is represented as degrees in floating point representation, * 0 means the geographic north, and increases clockwise (double from 0 to 360) * * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION */ enum TAG_GEO_LOCATION_CAPTURE_DIRECTION = "geo-location-capture-direction"; alias GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION = TAG_GEO_LOCATION_CAPTURE_DIRECTION; /** * The city (english name) where the media has been produced (string). */ enum TAG_GEO_LOCATION_CITY = "geo-location-city"; alias GST_TAG_GEO_LOCATION_CITY = TAG_GEO_LOCATION_CITY; /** * The country (english name) where the media has been produced (string). */ enum TAG_GEO_LOCATION_COUNTRY = "geo-location-country"; alias GST_TAG_GEO_LOCATION_COUNTRY = TAG_GEO_LOCATION_COUNTRY; /** * geo elevation of where the media has been recorded or produced in meters * according to WGS84 (zero is average sea level) (double). */ enum TAG_GEO_LOCATION_ELEVATION = "geo-location-elevation"; alias GST_TAG_GEO_LOCATION_ELEVATION = TAG_GEO_LOCATION_ELEVATION; /** * Represents the expected error on the horizontal positioning in * meters (double). */ enum TAG_GEO_LOCATION_HORIZONTAL_ERROR = "geo-location-horizontal-error"; alias GST_TAG_GEO_LOCATION_HORIZONTAL_ERROR = TAG_GEO_LOCATION_HORIZONTAL_ERROR; /** * geo latitude location of where the media has been recorded or produced in * degrees according to WGS84 (zero at the equator, negative values for southern * latitudes) (double). */ enum TAG_GEO_LOCATION_LATITUDE = "geo-location-latitude"; alias GST_TAG_GEO_LOCATION_LATITUDE = TAG_GEO_LOCATION_LATITUDE; /** * geo longitude location of where the media has been recorded or produced in * degrees according to WGS84 (zero at the prime meridian in Greenwich/UK, * negative values for western longitudes). (double). */ enum TAG_GEO_LOCATION_LONGITUDE = "geo-location-longitude"; alias GST_TAG_GEO_LOCATION_LONGITUDE = TAG_GEO_LOCATION_LONGITUDE; /** * Indicates the movement direction of the device performing the capture * of a media. It is represented as degrees in floating point representation, * 0 means the geographic north, and increases clockwise (double from 0 to 360) * * See also #GST_TAG_GEO_LOCATION_CAPTURE_DIRECTION */ enum TAG_GEO_LOCATION_MOVEMENT_DIRECTION = "geo-location-movement-direction"; alias GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION = TAG_GEO_LOCATION_MOVEMENT_DIRECTION; /** * Speed of the capturing device when performing the capture. * Represented in m/s. (double) * * See also #GST_TAG_GEO_LOCATION_MOVEMENT_DIRECTION */ enum TAG_GEO_LOCATION_MOVEMENT_SPEED = "geo-location-movement-speed"; alias GST_TAG_GEO_LOCATION_MOVEMENT_SPEED = TAG_GEO_LOCATION_MOVEMENT_SPEED; /** * human readable descriptive location of where the media has been recorded or * produced. (string). */ enum TAG_GEO_LOCATION_NAME = "geo-location-name"; alias GST_TAG_GEO_LOCATION_NAME = TAG_GEO_LOCATION_NAME; /** * A location 'smaller' than GST_TAG_GEO_LOCATION_CITY that specifies better * where the media has been produced. (e.g. the neighborhood) (string). * * This tag has been added as this is how it is handled/named in XMP's * Iptc4xmpcore schema. */ enum TAG_GEO_LOCATION_SUBLOCATION = "geo-location-sublocation"; alias GST_TAG_GEO_LOCATION_SUBLOCATION = TAG_GEO_LOCATION_SUBLOCATION; /** * Groups together media that are related and spans multiple tracks. An * example are multiple pieces of a concerto. (string) */ enum TAG_GROUPING = "grouping"; alias GST_TAG_GROUPING = TAG_GROUPING; /** * Homepage for this media (i.e. artist or movie homepage) (string) */ enum TAG_HOMEPAGE = "homepage"; alias GST_TAG_HOMEPAGE = TAG_HOMEPAGE; /** * image (sample) (sample taglist should specify the content type and preferably * also set "image-type" field as #GstTagImageType) */ enum TAG_IMAGE = "image"; alias GST_TAG_IMAGE = TAG_IMAGE; /** * Represents the 'Orientation' tag from EXIF. Defines how the image * should be rotated and mirrored for display. (string) * * This tag has a predefined set of allowed values: * "rotate-0" * "rotate-90" * "rotate-180" * "rotate-270" * "flip-rotate-0" * "flip-rotate-90" * "flip-rotate-180" * "flip-rotate-270" * * The naming is adopted according to a possible transformation to perform * on the image to fix its orientation, obviously equivalent operations will * yield the same result. * * Rotations indicated by the values are in clockwise direction and * 'flip' means an horizontal mirroring. */ enum TAG_IMAGE_ORIENTATION = "image-orientation"; alias GST_TAG_IMAGE_ORIENTATION = TAG_IMAGE_ORIENTATION; /** * Information about the people behind a remix and similar * interpretations of another existing piece (string) */ enum TAG_INTERPRETED_BY = "interpreted-by"; alias GST_TAG_INTERPRETED_BY = TAG_INTERPRETED_BY; /** * International Standard Recording Code - see http://www.ifpi.org/isrc/ (string) */ enum TAG_ISRC = "isrc"; alias GST_TAG_ISRC = TAG_ISRC; /** * comma separated keywords describing the content (string). */ enum TAG_KEYWORDS = "keywords"; alias GST_TAG_KEYWORDS = TAG_KEYWORDS; /** * ISO-639-2 or ISO-639-1 code for the language the content is in (string) * * There is utility API in libgsttag in gst-plugins-base to obtain a translated * language name from the language code: gst_tag_get_language_name() */ enum TAG_LANGUAGE_CODE = "language-code"; alias GST_TAG_LANGUAGE_CODE = TAG_LANGUAGE_CODE; /** * Name of the language the content is in (string) * * Free-form name of the language the content is in, if a language code * is not available. This tag should not be set in addition to a language * code. It is undefined what language or locale the language name is in. */ enum TAG_LANGUAGE_NAME = "language-name"; alias GST_TAG_LANGUAGE_NAME = TAG_LANGUAGE_NAME; /** * license of data (string) */ enum TAG_LICENSE = "license"; alias GST_TAG_LICENSE = TAG_LICENSE; /** * URI to location where license details can be found (string) */ enum TAG_LICENSE_URI = "license-uri"; alias GST_TAG_LICENSE_URI = TAG_LICENSE_URI; /** * Origin of media as a URI (location, where the original of the file or stream * is hosted) (string) */ enum TAG_LOCATION = "location"; alias GST_TAG_LOCATION = TAG_LOCATION; /** * The lyrics of the media (string) */ enum TAG_LYRICS = "lyrics"; alias GST_TAG_LYRICS = TAG_LYRICS; /** * maximum bitrate in bits/s (unsigned integer) */ enum TAG_MAXIMUM_BITRATE = "maximum-bitrate"; alias GST_TAG_MAXIMUM_BITRATE = TAG_MAXIMUM_BITRATE; /** * Midi note number * of the audio track. This is useful for sample instruments and in particular * for multi-samples. */ enum TAG_MIDI_BASE_NOTE = "midi-base-note"; alias GST_TAG_MIDI_BASE_NOTE = TAG_MIDI_BASE_NOTE; /** * minimum bitrate in bits/s (unsigned integer) */ enum TAG_MINIMUM_BITRATE = "minimum-bitrate"; alias GST_TAG_MINIMUM_BITRATE = TAG_MINIMUM_BITRATE; /** * nominal bitrate in bits/s (unsigned integer). The actual bitrate might be * different from this target bitrate. */ enum TAG_NOMINAL_BITRATE = "nominal-bitrate"; alias GST_TAG_NOMINAL_BITRATE = TAG_NOMINAL_BITRATE; /** * organization (string) */ enum TAG_ORGANIZATION = "organization"; alias GST_TAG_ORGANIZATION = TAG_ORGANIZATION; /** * person(s) performing (string) */ enum TAG_PERFORMER = "performer"; alias GST_TAG_PERFORMER = TAG_PERFORMER; /** * image that is meant for preview purposes, e.g. small icon-sized version * (sample) (sample taglist should specify the content type) */ enum TAG_PREVIEW_IMAGE = "preview-image"; alias GST_TAG_PREVIEW_IMAGE = TAG_PREVIEW_IMAGE; /** * Any private data that may be contained in tags (sample). * * It is represented by #GstSample in which #GstBuffer contains the * binary data and the sample's info #GstStructure may contain any * extra information that identifies the origin or meaning of the data. * * Private frames in ID3v2 tags ('PRIV' frames) will be represented * using this tag, in which case the GstStructure will be named * "ID3PrivateFrame" and contain a field named "owner" of type string * which contains the owner-identification string from the tag. */ enum TAG_PRIVATE_DATA = "private-data"; alias GST_TAG_PRIVATE_DATA = TAG_PRIVATE_DATA; /** * Name of the label or publisher (string) */ enum TAG_PUBLISHER = "publisher"; alias GST_TAG_PUBLISHER = TAG_PUBLISHER; /** * reference level of track and album gain values (double) */ enum TAG_REFERENCE_LEVEL = "replaygain-reference-level"; alias GST_TAG_REFERENCE_LEVEL = TAG_REFERENCE_LEVEL; /** * serial number of track (unsigned integer) */ enum TAG_SERIAL = "serial"; alias GST_TAG_SERIAL = TAG_SERIAL; /** * Number of the episode within a season/show (unsigned integer) */ enum TAG_SHOW_EPISODE_NUMBER = "show-episode-number"; alias GST_TAG_SHOW_EPISODE_NUMBER = TAG_SHOW_EPISODE_NUMBER; /** * Name of the show, used for displaying (string) */ enum TAG_SHOW_NAME = "show-name"; alias GST_TAG_SHOW_NAME = TAG_SHOW_NAME; /** * Number of the season of a show/series (unsigned integer) */ enum TAG_SHOW_SEASON_NUMBER = "show-season-number"; alias GST_TAG_SHOW_SEASON_NUMBER = TAG_SHOW_SEASON_NUMBER; /** * Name of the show, used for sorting (string) */ enum TAG_SHOW_SORTNAME = "show-sortname"; alias GST_TAG_SHOW_SORTNAME = TAG_SHOW_SORTNAME; /** * codec/format the subtitle data is stored in (string) */ enum TAG_SUBTITLE_CODEC = "subtitle-codec"; alias GST_TAG_SUBTITLE_CODEC = TAG_SUBTITLE_CODEC; /** * commonly used title (string) * * The title as it should be displayed, e.g. 'The Doll House' */ enum TAG_TITLE = "title"; alias GST_TAG_TITLE = TAG_TITLE; /** * commonly used title, as used for sorting (string) * * The title as it should be sorted, e.g. 'Doll House, The' */ enum TAG_TITLE_SORTNAME = "title-sortname"; alias GST_TAG_TITLE_SORTNAME = TAG_TITLE_SORTNAME; /** * count of tracks inside collection this track belongs to (unsigned integer) */ enum TAG_TRACK_COUNT = "track-count"; alias GST_TAG_TRACK_COUNT = TAG_TRACK_COUNT; /** * track gain in db (double) */ enum TAG_TRACK_GAIN = "replaygain-track-gain"; alias GST_TAG_TRACK_GAIN = TAG_TRACK_GAIN; /** * track number inside a collection (unsigned integer) */ enum TAG_TRACK_NUMBER = "track-number"; alias GST_TAG_TRACK_NUMBER = TAG_TRACK_NUMBER; /** * peak of the track (double) */ enum TAG_TRACK_PEAK = "replaygain-track-peak"; alias GST_TAG_TRACK_PEAK = TAG_TRACK_PEAK; /** * Rating attributed by a person (likely the application user). * The higher the value, the more the user likes this media * (unsigned int from 0 to 100) */ enum TAG_USER_RATING = "user-rating"; alias GST_TAG_USER_RATING = TAG_USER_RATING; /** * version of this data (string) */ enum TAG_VERSION = "version"; alias GST_TAG_VERSION = TAG_VERSION; /** * codec the video data is stored in (string) */ enum TAG_VIDEO_CODEC = "video-codec"; alias GST_TAG_VIDEO_CODEC = TAG_VIDEO_CODEC; /** * A string that can be used in printf-like format strings to display a * #GstClockTime value in h:m:s format. Use GST_TIME_ARGS() to construct * the matching arguments. * * Example: * |[ * printf("%" GST_TIME_FORMAT "\n", GST_TIME_ARGS(ts)); * ]| */ enum TIME_FORMAT = "u:%02u:%02u.%09u"; alias GST_TIME_FORMAT = TIME_FORMAT; /** * Special value for the repeat_count set in gst_toc_entry_set_loop() or * returned by gst_toc_entry_set_loop() to indicate infinite looping. */ enum TOC_REPEAT_COUNT_INFINITE = -1; alias GST_TOC_REPEAT_COUNT_INFINITE = TOC_REPEAT_COUNT_INFINITE; /** * Value for #GstUri.port to indicate no port number. */ enum URI_NO_PORT = 0; alias GST_URI_NO_PORT = URI_NO_PORT; /** * Constant that defines one GStreamer microsecond. */ enum USECOND = 1000UL; alias GST_USECOND = USECOND; /** * Indicates that the first value provided to a comparison function * (gst_value_compare()) is equal to the second one. */ enum VALUE_EQUAL = 0; alias GST_VALUE_EQUAL = VALUE_EQUAL; /** * Indicates that the first value provided to a comparison function * (gst_value_compare()) is greater than the second one. */ enum VALUE_GREATER_THAN = 1; alias GST_VALUE_GREATER_THAN = VALUE_GREATER_THAN; /** * Indicates that the first value provided to a comparison function * (gst_value_compare()) is lesser than the second one. */ enum VALUE_LESS_THAN = -1; alias GST_VALUE_LESS_THAN = VALUE_LESS_THAN; /** * Indicates that the comparison function (gst_value_compare()) can not * determine a order for the two provided values. */ enum VALUE_UNORDERED = 2; alias GST_VALUE_UNORDERED = VALUE_UNORDERED; /** * The major version of GStreamer at compile time: */ enum VERSION_MAJOR = 1; alias GST_VERSION_MAJOR = VERSION_MAJOR; /** * The micro version of GStreamer at compile time: */ enum VERSION_MICRO = 3; alias GST_VERSION_MICRO = VERSION_MICRO; /** * The minor version of GStreamer at compile time: */ enum VERSION_MINOR = 12; alias GST_VERSION_MINOR = VERSION_MINOR; /** * The nano version of GStreamer at compile time: * Actual releases have 0, GIT versions have 1, prerelease versions have 2-... */ enum VERSION_NANO = 0; alias GST_VERSION_NANO = VERSION_NANO; GtkD-3.7.5/generated/gstreamer/gstreamerc/000077500000000000000000000000001324604450400204445ustar00rootroot00000000000000GtkD-3.7.5/generated/gstreamer/gstreamerc/gstinterfaces.d000066400000000000000000000015541324604450400234570ustar00rootroot00000000000000/* * 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 gstreamerc.gstinterfaces; public import gstinterfaces.c.functions; GtkD-3.7.5/generated/gstreamer/gstreamerc/gstinterfacestypes.d000066400000000000000000000015551324604450400245450ustar00rootroot00000000000000/* * 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 gstreamerc.gstinterfacestypes; public import gstinterfaces.c.types; GtkD-3.7.5/generated/gstreamer/gstreamerc/gstreamer.d000066400000000000000000000015441324604450400226060ustar00rootroot00000000000000/* * 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 gstreamerc.gstreamer; public import gstreamer.c.functions; GtkD-3.7.5/generated/gstreamer/gstreamerc/gstreamertypes.d000066400000000000000000000015451324604450400236740ustar00rootroot00000000000000/* * 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 gstreamerc.gstreamertypes; public import gstreamer.c.types; GtkD-3.7.5/generated/gtkd/000077500000000000000000000000001324604450400152505ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/atk/000077500000000000000000000000001324604450400160275ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/atk/ActionIF.d000066400000000000000000000145371324604450400176420ustar00rootroot00000000000000/* * 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 atk.ActionIF; private import atk.c.functions; public import atk.c.types; private import glib.Str; public import gtkc.atktypes; /** * #AtkAction should be implemented by instances of #AtkObject classes * with which the user can interact directly, i.e. buttons, * checkboxes, scrollbars, e.g. components which are not "passive" * providers of UI information. * * Exceptions: when the user interaction is already covered by another * appropriate interface such as #AtkEditableText (insert/delete text, * etc.) or #AtkValue (set value) then these actions should not be * exposed by #AtkAction as well. * * Though most UI interactions on components should be invocable via * keyboard as well as mouse, there will generally be a close mapping * between "mouse actions" that are possible on a component and the * AtkActions. Where mouse and keyboard actions are redundant in * effect, #AtkAction should expose only one action rather than * exposing redundant actions if possible. By convention we have been * using "mouse centric" terminology for #AtkAction names. */ public interface ActionIF{ /** Get the main Gtk struct */ public AtkAction* getActionStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_action_get_type(); } /** * Perform the specified action on the object. * * Params: * i = the action index corresponding to the action to be performed * * Returns: %TRUE if success, %FALSE otherwise */ public bool doAction(int i); /** * Returns a description of the specified action of the object. * * Params: * i = the action index corresponding to the action to be performed * * Returns: a description string, or %NULL if @action does * not implement this interface. */ public string getDescription(int i); /** * Gets the keybinding which can be used to activate this action, if one * exists. The string returned should contain localized, human-readable, * key sequences as they would appear when displayed on screen. It must * be in the format "mnemonic;sequence;shortcut". * * - The mnemonic key activates the object if it is presently enabled onscreen. * This typically corresponds to the underlined letter within the widget. * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for * a button. * - The sequence is the full list of keys which invoke the action even if the * relevant element is not currently shown on screen. For instance, for a menu * item the sequence is the keybindings used to open the parent menus before * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a * traditional "New..." menu item. * - The shortcut, if it exists, will invoke the same action without showing * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a * traditional "New..." menu item. * * Example: For a traditional "New..." menu item, the expected return value * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N" * for the German locale. If, hypothetically, this menu item lacked a mnemonic, * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively. * * Params: * i = the action index corresponding to the action to be performed * * Returns: the keybinding which can be used to activate * this action, or %NULL if there is no keybinding for this action. */ public string getKeybinding(int i); /** * Returns the localized name of the specified action of the object. * * Params: * i = the action index corresponding to the action to be performed * * Returns: a name string, or %NULL if @action does not * implement this interface. */ public string getLocalizedName(int i); /** * Gets the number of accessible actions available on the object. * If there are more than one, the first one is considered the * "default" action of the object. * * Returns: a the number of actions, or 0 if @action does not * implement this interface. */ public int getNActions(); /** * Returns a non-localized string naming the specified action of the * object. This name is generally not descriptive of the end result * of the action, but instead names the 'interaction type' which the * object supports. By convention, the above strings should be used to * represent the actions which correspond to the common point-and-click * interaction techniques of the same name: i.e. * "click", "press", "release", "drag", "drop", "popup", etc. * The "popup" action should be used to pop up a context menu for the * object, if one exists. * * For technical reasons, some toolkits cannot guarantee that the * reported action is actually 'bound' to a nontrivial user event; * i.e. the result of some actions via atk_action_do_action() may be * NIL. * * Params: * i = the action index corresponding to the action to be performed * * Returns: a name string, or %NULL if @action does not * implement this interface. */ public string getName(int i); /** * Sets a description of the specified action of the object. * * Params: * i = the action index corresponding to the action to be performed * desc = the description to be assigned to this action * * Returns: a gboolean representing if the description was successfully set; */ public bool setDescription(int i, string desc); } GtkD-3.7.5/generated/gtkd/atk/ActionT.d000066400000000000000000000154621324604450400175450ustar00rootroot00000000000000/* * 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 atk.ActionT; public import atk.c.functions; public import atk.c.types; public import glib.Str; public import gtkc.atktypes; /** * #AtkAction should be implemented by instances of #AtkObject classes * with which the user can interact directly, i.e. buttons, * checkboxes, scrollbars, e.g. components which are not "passive" * providers of UI information. * * Exceptions: when the user interaction is already covered by another * appropriate interface such as #AtkEditableText (insert/delete text, * etc.) or #AtkValue (set value) then these actions should not be * exposed by #AtkAction as well. * * Though most UI interactions on components should be invocable via * keyboard as well as mouse, there will generally be a close mapping * between "mouse actions" that are possible on a component and the * AtkActions. Where mouse and keyboard actions are redundant in * effect, #AtkAction should expose only one action rather than * exposing redundant actions if possible. By convention we have been * using "mouse centric" terminology for #AtkAction names. */ public template ActionT(TStruct) { /** Get the main Gtk struct */ public AtkAction* getActionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkAction*)getStruct(); } /** * Perform the specified action on the object. * * Params: * i = the action index corresponding to the action to be performed * * Returns: %TRUE if success, %FALSE otherwise */ public bool doAction(int i) { return atk_action_do_action(getActionStruct(), i) != 0; } /** * Returns a description of the specified action of the object. * * Params: * i = the action index corresponding to the action to be performed * * Returns: a description string, or %NULL if @action does * not implement this interface. */ public string getDescription(int i) { return Str.toString(atk_action_get_description(getActionStruct(), i)); } /** * Gets the keybinding which can be used to activate this action, if one * exists. The string returned should contain localized, human-readable, * key sequences as they would appear when displayed on screen. It must * be in the format "mnemonic;sequence;shortcut". * * - The mnemonic key activates the object if it is presently enabled onscreen. * This typically corresponds to the underlined letter within the widget. * Example: "n" in a traditional "New..." menu item or the "a" in "Apply" for * a button. * - The sequence is the full list of keys which invoke the action even if the * relevant element is not currently shown on screen. For instance, for a menu * item the sequence is the keybindings used to open the parent menus before * invoking. The sequence string is colon-delimited. Example: "Alt+F:N" in a * traditional "New..." menu item. * - The shortcut, if it exists, will invoke the same action without showing * the component or its enclosing menus or dialogs. Example: "Ctrl+N" in a * traditional "New..." menu item. * * Example: For a traditional "New..." menu item, the expected return value * would be: "N;Alt+F:N;Ctrl+N" for the English locale and "N;Alt+D:N;Strg+N" * for the German locale. If, hypothetically, this menu item lacked a mnemonic, * it would be represented by ";;Ctrl+N" and ";;Strg+N" respectively. * * Params: * i = the action index corresponding to the action to be performed * * Returns: the keybinding which can be used to activate * this action, or %NULL if there is no keybinding for this action. */ public string getKeybinding(int i) { return Str.toString(atk_action_get_keybinding(getActionStruct(), i)); } /** * Returns the localized name of the specified action of the object. * * Params: * i = the action index corresponding to the action to be performed * * Returns: a name string, or %NULL if @action does not * implement this interface. */ public string getLocalizedName(int i) { return Str.toString(atk_action_get_localized_name(getActionStruct(), i)); } /** * Gets the number of accessible actions available on the object. * If there are more than one, the first one is considered the * "default" action of the object. * * Returns: a the number of actions, or 0 if @action does not * implement this interface. */ public int getNActions() { return atk_action_get_n_actions(getActionStruct()); } /** * Returns a non-localized string naming the specified action of the * object. This name is generally not descriptive of the end result * of the action, but instead names the 'interaction type' which the * object supports. By convention, the above strings should be used to * represent the actions which correspond to the common point-and-click * interaction techniques of the same name: i.e. * "click", "press", "release", "drag", "drop", "popup", etc. * The "popup" action should be used to pop up a context menu for the * object, if one exists. * * For technical reasons, some toolkits cannot guarantee that the * reported action is actually 'bound' to a nontrivial user event; * i.e. the result of some actions via atk_action_do_action() may be * NIL. * * Params: * i = the action index corresponding to the action to be performed * * Returns: a name string, or %NULL if @action does not * implement this interface. */ public string getName(int i) { return Str.toString(atk_action_get_name(getActionStruct(), i)); } /** * Sets a description of the specified action of the object. * * Params: * i = the action index corresponding to the action to be performed * desc = the description to be assigned to this action * * Returns: a gboolean representing if the description was successfully set; */ public bool setDescription(int i, string desc) { return atk_action_set_description(getActionStruct(), i, Str.toStringz(desc)) != 0; } } GtkD-3.7.5/generated/gtkd/atk/ComponentIF.d000066400000000000000000000175751324604450400203740ustar00rootroot00000000000000/* * 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 atk.ComponentIF; private import atk.ObjectAtk; private import atk.Rectangle; private import atk.c.functions; public import atk.c.types; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; /** * #AtkComponent should be implemented by most if not all UI elements * with an actual on-screen presence, i.e. components which can be * said to have a screen-coordinate bounding box. Virtually all * widgets will need to have #AtkComponent implementations provided * for their corresponding #AtkObject class. In short, only UI * elements which are *not* GUI elements will omit this ATK interface. * * A possible exception might be textual information with a * transparent background, in which case text glyph bounding box * information is provided by #AtkText. */ public interface ComponentIF{ /** Get the main Gtk struct */ public AtkComponent* getComponentStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_component_get_type(); } /** * Add the specified handler to the set of functions to be called * when this object receives focus events (in or out). If the handler is * already added it is not added again * * Deprecated: If you need to track when an object gains or * lose the focus, use the #AtkObject::state-change "focused" notification instead. * * Params: * handler = The #AtkFocusHandler to be attached to @component * * Returns: a handler id which can be used in atk_component_remove_focus_handler() * or zero if the handler was already added. */ public uint addFocusHandler(AtkFocusHandler handler); /** * Checks whether the specified point is within the extent of the @component. * * Toolkit implementor note: ATK provides a default implementation for * this virtual method. In general there are little reason to * re-implement it. * * Params: * x = x coordinate * y = y coordinate * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * * Returns: %TRUE or %FALSE indicating whether the specified point is within * the extent of the @component or not */ public bool contains(int x, int y, AtkCoordType coordType); /** * Returns the alpha value (i.e. the opacity) for this * @component, on a scale from 0 (fully transparent) to 1.0 * (fully opaque). * * Returns: An alpha value from 0 to 1.0, inclusive. * * Since: 1.12 */ public double getAlpha(); /** * Gets the rectangle which gives the extent of the @component. * * Params: * x = address of #gint to put x coordinate * y = address of #gint to put y coordinate * width = address of #gint to put width * height = address of #gint to put height * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window */ public void getExtents(out int x, out int y, out int width, out int height, AtkCoordType coordType); /** * Gets the layer of the component. * * Returns: an #AtkLayer which is the layer of the component */ public AtkLayer getLayer(); /** * Gets the zorder of the component. The value G_MININT will be returned * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW. * * Returns: a gint which is the zorder of the component, i.e. the depth at * which the component is shown in relation to other components in the same * container. */ public int getMdiZorder(); /** * Gets the position of @component in the form of * a point specifying @component's top-left corner. * * Deprecated: Since 2.12. Use atk_component_get_extents() instead. * * Params: * x = address of #gint to put x coordinate position * y = address of #gint to put y coordinate position * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window */ public void getPosition(out int x, out int y, AtkCoordType coordType); /** * Gets the size of the @component in terms of width and height. * * Deprecated: Since 2.12. Use atk_component_get_extents() instead. * * Params: * width = address of #gint to put width of @component * height = address of #gint to put height of @component */ public void getSize(out int width, out int height); /** * Grabs focus for this @component. * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool grabFocus(); /** * Gets a reference to the accessible child, if one exists, at the * coordinate point specified by @x and @y. * * Params: * x = x coordinate * y = y coordinate * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * * Returns: a reference to the accessible * child, if one exists */ public ObjectAtk refAccessibleAtPoint(int x, int y, AtkCoordType coordType); /** * Remove the handler specified by @handler_id from the list of * functions to be executed when this object receives focus events * (in or out). * * Deprecated: If you need to track when an object gains or * lose the focus, use the #AtkObject::state-change "focused" notification instead. * * Params: * handlerId = the handler id of the focus handler to be removed * from @component */ public void removeFocusHandler(uint handlerId); /** * Sets the extents of @component. * * Params: * x = x coordinate * y = y coordinate * width = width to set for @component * height = height to set for @component * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * * Returns: %TRUE or %FALSE whether the extents were set or not */ public bool setExtents(int x, int y, int width, int height, AtkCoordType coordType); /** * Sets the postition of @component. * * Params: * x = x coordinate * y = y coordinate * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * * Returns: %TRUE or %FALSE whether or not the position was set or not */ public bool setPosition(int x, int y, AtkCoordType coordType); /** * Set the size of the @component in terms of width and height. * * Params: * width = width to set for @component * height = height to set for @component * * Returns: %TRUE or %FALSE whether the size was set or not */ public bool setSize(int width, int height); /** * The 'bounds-changed" signal is emitted when the bposition or * size of the component changes. * * Params: * arg1 = The AtkRectangle giving the new position and size. */ gulong addOnBoundsChanged(void delegate(Rectangle, ComponentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/atk/ComponentT.d000066400000000000000000000244111324604450400202640ustar00rootroot00000000000000/* * 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 atk.ComponentT; public import atk.ObjectAtk; public import atk.Rectangle; public import atk.c.functions; public import atk.c.types; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.atktypes; public import std.algorithm; /** * #AtkComponent should be implemented by most if not all UI elements * with an actual on-screen presence, i.e. components which can be * said to have a screen-coordinate bounding box. Virtually all * widgets will need to have #AtkComponent implementations provided * for their corresponding #AtkObject class. In short, only UI * elements which are *not* GUI elements will omit this ATK interface. * * A possible exception might be textual information with a * transparent background, in which case text glyph bounding box * information is provided by #AtkText. */ public template ComponentT(TStruct) { /** Get the main Gtk struct */ public AtkComponent* getComponentStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkComponent*)getStruct(); } /** * Add the specified handler to the set of functions to be called * when this object receives focus events (in or out). If the handler is * already added it is not added again * * Deprecated: If you need to track when an object gains or * lose the focus, use the #AtkObject::state-change "focused" notification instead. * * Params: * handler = The #AtkFocusHandler to be attached to @component * * Returns: a handler id which can be used in atk_component_remove_focus_handler() * or zero if the handler was already added. */ public uint addFocusHandler(AtkFocusHandler handler) { return atk_component_add_focus_handler(getComponentStruct(), handler); } /** * Checks whether the specified point is within the extent of the @component. * * Toolkit implementor note: ATK provides a default implementation for * this virtual method. In general there are little reason to * re-implement it. * * Params: * x = x coordinate * y = y coordinate * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * * Returns: %TRUE or %FALSE indicating whether the specified point is within * the extent of the @component or not */ public bool contains(int x, int y, AtkCoordType coordType) { return atk_component_contains(getComponentStruct(), x, y, coordType) != 0; } /** * Returns the alpha value (i.e. the opacity) for this * @component, on a scale from 0 (fully transparent) to 1.0 * (fully opaque). * * Returns: An alpha value from 0 to 1.0, inclusive. * * Since: 1.12 */ public double getAlpha() { return atk_component_get_alpha(getComponentStruct()); } /** * Gets the rectangle which gives the extent of the @component. * * Params: * x = address of #gint to put x coordinate * y = address of #gint to put y coordinate * width = address of #gint to put width * height = address of #gint to put height * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window */ public void getExtents(out int x, out int y, out int width, out int height, AtkCoordType coordType) { atk_component_get_extents(getComponentStruct(), &x, &y, &width, &height, coordType); } /** * Gets the layer of the component. * * Returns: an #AtkLayer which is the layer of the component */ public override AtkLayer getLayer() { return atk_component_get_layer(getComponentStruct()); } /** * Gets the zorder of the component. The value G_MININT will be returned * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW. * * Returns: a gint which is the zorder of the component, i.e. the depth at * which the component is shown in relation to other components in the same * container. */ public override int getMdiZorder() { return atk_component_get_mdi_zorder(getComponentStruct()); } /** * Gets the position of @component in the form of * a point specifying @component's top-left corner. * * Deprecated: Since 2.12. Use atk_component_get_extents() instead. * * Params: * x = address of #gint to put x coordinate position * y = address of #gint to put y coordinate position * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window */ public void getPosition(out int x, out int y, AtkCoordType coordType) { atk_component_get_position(getComponentStruct(), &x, &y, coordType); } /** * Gets the size of the @component in terms of width and height. * * Deprecated: Since 2.12. Use atk_component_get_extents() instead. * * Params: * width = address of #gint to put width of @component * height = address of #gint to put height of @component */ public void getSize(out int width, out int height) { atk_component_get_size(getComponentStruct(), &width, &height); } /** * Grabs focus for this @component. * * Returns: %TRUE if successful, %FALSE otherwise. */ public bool grabFocus() { return atk_component_grab_focus(getComponentStruct()) != 0; } /** * Gets a reference to the accessible child, if one exists, at the * coordinate point specified by @x and @y. * * Params: * x = x coordinate * y = y coordinate * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * * Returns: a reference to the accessible * child, if one exists */ public ObjectAtk refAccessibleAtPoint(int x, int y, AtkCoordType coordType) { auto p = atk_component_ref_accessible_at_point(getComponentStruct(), x, y, coordType); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true); } /** * Remove the handler specified by @handler_id from the list of * functions to be executed when this object receives focus events * (in or out). * * Deprecated: If you need to track when an object gains or * lose the focus, use the #AtkObject::state-change "focused" notification instead. * * Params: * handlerId = the handler id of the focus handler to be removed * from @component */ public void removeFocusHandler(uint handlerId) { atk_component_remove_focus_handler(getComponentStruct(), handlerId); } /** * Sets the extents of @component. * * Params: * x = x coordinate * y = y coordinate * width = width to set for @component * height = height to set for @component * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * * Returns: %TRUE or %FALSE whether the extents were set or not */ public bool setExtents(int x, int y, int width, int height, AtkCoordType coordType) { return atk_component_set_extents(getComponentStruct(), x, y, width, height, coordType) != 0; } /** * Sets the postition of @component. * * Params: * x = x coordinate * y = y coordinate * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * * Returns: %TRUE or %FALSE whether or not the position was set or not */ public bool setPosition(int x, int y, AtkCoordType coordType) { return atk_component_set_position(getComponentStruct(), x, y, coordType) != 0; } /** * Set the size of the @component in terms of width and height. * * Params: * width = width to set for @component * height = height to set for @component * * Returns: %TRUE or %FALSE whether the size was set or not */ public bool setSize(int width, int height) { return atk_component_set_size(getComponentStruct(), width, height) != 0; } protected class OnBoundsChangedDelegateWrapper { void delegate(Rectangle, ComponentIF) dlg; gulong handlerId; this(void delegate(Rectangle, ComponentIF) dlg) { this.dlg = dlg; onBoundsChangedListeners ~= this; } void remove(OnBoundsChangedDelegateWrapper source) { foreach(index, wrapper; onBoundsChangedListeners) { if (wrapper.handlerId == source.handlerId) { onBoundsChangedListeners[index] = null; onBoundsChangedListeners = std.algorithm.remove(onBoundsChangedListeners, index); break; } } } } OnBoundsChangedDelegateWrapper[] onBoundsChangedListeners; /** * The 'bounds-changed" signal is emitted when the bposition or * size of the component changes. * * Params: * arg1 = The AtkRectangle giving the new position and size. */ gulong addOnBoundsChanged(void delegate(Rectangle, ComponentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnBoundsChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "bounds-changed", cast(GCallback)&callBackBoundsChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackBoundsChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackBoundsChanged(AtkComponent* componentStruct, AtkRectangle* arg1, OnBoundsChangedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Rectangle)(arg1), wrapper.outer); } extern(C) static void callBackBoundsChangedDestroy(OnBoundsChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/atk/DocumentIF.d000066400000000000000000000151111324604450400201700ustar00rootroot00000000000000/* * 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 atk.DocumentIF; private import atk.c.functions; public import atk.c.types; private import glib.Str; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; /** * The AtkDocument interface should be supported by any object whose * content is a representation or view of a document. The AtkDocument * interface should appear on the toplevel container for the document * content; however AtkDocument instances may be nested (i.e. an * AtkDocument may be a descendant of another AtkDocument) in those * cases where one document contains "embedded content" which can * reasonably be considered a document in its own right. */ public interface DocumentIF{ /** Get the main Gtk struct */ public AtkDocument* getDocumentStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_document_get_type(); } /** * * Params: * attributeName = a character string representing the name of the attribute * whose value is being queried. * Returns: a string value associated with the named * attribute for this document, or NULL if a value for * #attribute_name has not been specified for this document. * * Since: 1.12 */ public string getAttributeValue(string attributeName); /** * Gets an AtkAttributeSet which describes document-wide * attributes as name-value pairs. * * Returns: An AtkAttributeSet containing the explicitly * set name-value-pair attributes associated with this document * as a whole. * * Since: 1.12 */ public AtkAttributeSet* getAttributes(); /** * Returns: current page number inside @document. -1 if not * implemented, not know by the implementor or irrelevant. * * Since: 2.12 */ public int getCurrentPageNumber(); /** * Gets a %gpointer that points to an instance of the DOM. It is * up to the caller to check atk_document_get_type to determine * how to cast this pointer. * * Deprecated: Since 2.12. @document is already a representation of * the document. Use it directly, or one of its children, as an * instance of the DOM. * * Returns: a %gpointer that points to an instance of the DOM. */ public void* getDocument(); /** * Gets a string indicating the document type. * * Deprecated: Since 2.12. Please use atk_document_get_attributes() to * ask for the document type if it applies. * * Returns: a string indicating the document type */ public string getDocumentType(); /** * Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale * of the content of this document instance. Individual * text substrings or images within this document may have * a different locale, see atk_text_get_attributes and * atk_image_get_image_locale. * * Deprecated: Please use atk_object_get_object_locale() instead. * * Returns: a UTF-8 string indicating the POSIX-style LC_MESSAGES * locale of the document content as a whole, or NULL if * the document content does not specify a locale. */ public string getLocale(); /** * Returns: total page count of @document. -1 if not implemented, not * know by the implementor or irrelevant. * * Since: 2.12 */ public int getPageCount(); /** * * Params: * attributeName = a character string representing the name of the attribute * whose value is being set. * attributeValue = a string value to be associated with #attribute_name. * Returns: TRUE if #value is successfully associated with #attribute_name * for this document, FALSE otherwise (e.g. if the document does not * allow the attribute to be modified). * * Since: 1.12 */ public bool setAttributeValue(string attributeName, string attributeValue); /** * The 'load-complete' signal is emitted when a pending load of * a static document has completed. This signal is to be * expected by ATK clients if and when AtkDocument implementors * expose ATK_STATE_BUSY. If the state of an AtkObject which * implements AtkDocument does not include ATK_STATE_BUSY, it * should be safe for clients to assume that the AtkDocument's * static contents are fully loaded into the container. * (Dynamic document contents should be exposed via other * signals.) */ gulong addOnLoadComplete(void delegate(DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The 'load-stopped' signal is emitted when a pending load of * document contents is cancelled, paused, or otherwise * interrupted by the user or application logic. It should not * however be emitted while waiting for a resource (for instance * while blocking on a file or network read) unless a * user-significant timeout has occurred. */ gulong addOnLoadStopped(void delegate(DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The 'page-changed' signal is emitted when the current page of * a document changes, e.g. pressing page up/down in a document * viewer. * * Params: * pageNumber = the new page number. If this value is unknown * or not applicable, -1 should be provided. * * Since: 2.12 */ gulong addOnPageChanged(void delegate(int, DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The 'reload' signal is emitted when the contents of a * document is refreshed from its source. Once 'reload' has * been emitted, a matching 'load-complete' or 'load-stopped' * signal should follow, which clients may await before * interrogating ATK for the latest document content. */ gulong addOnReload(void delegate(DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/atk/DocumentT.d000066400000000000000000000273011324604450400201010ustar00rootroot00000000000000/* * 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 atk.DocumentT; public import atk.c.functions; public import atk.c.types; public import glib.Str; public import gobject.Signals; public import gtkc.atktypes; public import std.algorithm; /** * The AtkDocument interface should be supported by any object whose * content is a representation or view of a document. The AtkDocument * interface should appear on the toplevel container for the document * content; however AtkDocument instances may be nested (i.e. an * AtkDocument may be a descendant of another AtkDocument) in those * cases where one document contains "embedded content" which can * reasonably be considered a document in its own right. */ public template DocumentT(TStruct) { /** Get the main Gtk struct */ public AtkDocument* getDocumentStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkDocument*)getStruct(); } /** * * Params: * attributeName = a character string representing the name of the attribute * whose value is being queried. * Returns: a string value associated with the named * attribute for this document, or NULL if a value for * #attribute_name has not been specified for this document. * * Since: 1.12 */ public string getAttributeValue(string attributeName) { return Str.toString(atk_document_get_attribute_value(getDocumentStruct(), Str.toStringz(attributeName))); } /** * Gets an AtkAttributeSet which describes document-wide * attributes as name-value pairs. * * Returns: An AtkAttributeSet containing the explicitly * set name-value-pair attributes associated with this document * as a whole. * * Since: 1.12 */ public override AtkAttributeSet* getAttributes() { return atk_document_get_attributes(getDocumentStruct()); } /** * Returns: current page number inside @document. -1 if not * implemented, not know by the implementor or irrelevant. * * Since: 2.12 */ public int getCurrentPageNumber() { return atk_document_get_current_page_number(getDocumentStruct()); } /** * Gets a %gpointer that points to an instance of the DOM. It is * up to the caller to check atk_document_get_type to determine * how to cast this pointer. * * Deprecated: Since 2.12. @document is already a representation of * the document. Use it directly, or one of its children, as an * instance of the DOM. * * Returns: a %gpointer that points to an instance of the DOM. */ public void* getDocument() { return atk_document_get_document(getDocumentStruct()); } /** * Gets a string indicating the document type. * * Deprecated: Since 2.12. Please use atk_document_get_attributes() to * ask for the document type if it applies. * * Returns: a string indicating the document type */ public string getDocumentType() { return Str.toString(atk_document_get_document_type(getDocumentStruct())); } /** * Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale * of the content of this document instance. Individual * text substrings or images within this document may have * a different locale, see atk_text_get_attributes and * atk_image_get_image_locale. * * Deprecated: Please use atk_object_get_object_locale() instead. * * Returns: a UTF-8 string indicating the POSIX-style LC_MESSAGES * locale of the document content as a whole, or NULL if * the document content does not specify a locale. */ public string getLocale() { return Str.toString(atk_document_get_locale(getDocumentStruct())); } /** * Returns: total page count of @document. -1 if not implemented, not * know by the implementor or irrelevant. * * Since: 2.12 */ public int getPageCount() { return atk_document_get_page_count(getDocumentStruct()); } /** * * Params: * attributeName = a character string representing the name of the attribute * whose value is being set. * attributeValue = a string value to be associated with #attribute_name. * Returns: TRUE if #value is successfully associated with #attribute_name * for this document, FALSE otherwise (e.g. if the document does not * allow the attribute to be modified). * * Since: 1.12 */ public bool setAttributeValue(string attributeName, string attributeValue) { return atk_document_set_attribute_value(getDocumentStruct(), Str.toStringz(attributeName), Str.toStringz(attributeValue)) != 0; } protected class OnLoadCompleteDelegateWrapper { void delegate(DocumentIF) dlg; gulong handlerId; this(void delegate(DocumentIF) dlg) { this.dlg = dlg; onLoadCompleteListeners ~= this; } void remove(OnLoadCompleteDelegateWrapper source) { foreach(index, wrapper; onLoadCompleteListeners) { if (wrapper.handlerId == source.handlerId) { onLoadCompleteListeners[index] = null; onLoadCompleteListeners = std.algorithm.remove(onLoadCompleteListeners, index); break; } } } } OnLoadCompleteDelegateWrapper[] onLoadCompleteListeners; /** * The 'load-complete' signal is emitted when a pending load of * a static document has completed. This signal is to be * expected by ATK clients if and when AtkDocument implementors * expose ATK_STATE_BUSY. If the state of an AtkObject which * implements AtkDocument does not include ATK_STATE_BUSY, it * should be safe for clients to assume that the AtkDocument's * static contents are fully loaded into the container. * (Dynamic document contents should be exposed via other * signals.) */ gulong addOnLoadComplete(void delegate(DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnLoadCompleteDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "load-complete", cast(GCallback)&callBackLoadComplete, cast(void*)wrapper, cast(GClosureNotify)&callBackLoadCompleteDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackLoadComplete(AtkDocument* documentStruct, OnLoadCompleteDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackLoadCompleteDestroy(OnLoadCompleteDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnLoadStoppedDelegateWrapper { void delegate(DocumentIF) dlg; gulong handlerId; this(void delegate(DocumentIF) dlg) { this.dlg = dlg; onLoadStoppedListeners ~= this; } void remove(OnLoadStoppedDelegateWrapper source) { foreach(index, wrapper; onLoadStoppedListeners) { if (wrapper.handlerId == source.handlerId) { onLoadStoppedListeners[index] = null; onLoadStoppedListeners = std.algorithm.remove(onLoadStoppedListeners, index); break; } } } } OnLoadStoppedDelegateWrapper[] onLoadStoppedListeners; /** * The 'load-stopped' signal is emitted when a pending load of * document contents is cancelled, paused, or otherwise * interrupted by the user or application logic. It should not * however be emitted while waiting for a resource (for instance * while blocking on a file or network read) unless a * user-significant timeout has occurred. */ gulong addOnLoadStopped(void delegate(DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnLoadStoppedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "load-stopped", cast(GCallback)&callBackLoadStopped, cast(void*)wrapper, cast(GClosureNotify)&callBackLoadStoppedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackLoadStopped(AtkDocument* documentStruct, OnLoadStoppedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackLoadStoppedDestroy(OnLoadStoppedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPageChangedDelegateWrapper { void delegate(int, DocumentIF) dlg; gulong handlerId; this(void delegate(int, DocumentIF) dlg) { this.dlg = dlg; onPageChangedListeners ~= this; } void remove(OnPageChangedDelegateWrapper source) { foreach(index, wrapper; onPageChangedListeners) { if (wrapper.handlerId == source.handlerId) { onPageChangedListeners[index] = null; onPageChangedListeners = std.algorithm.remove(onPageChangedListeners, index); break; } } } } OnPageChangedDelegateWrapper[] onPageChangedListeners; /** * The 'page-changed' signal is emitted when the current page of * a document changes, e.g. pressing page up/down in a document * viewer. * * Params: * pageNumber = the new page number. If this value is unknown * or not applicable, -1 should be provided. * * Since: 2.12 */ gulong addOnPageChanged(void delegate(int, DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPageChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "page-changed", cast(GCallback)&callBackPageChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackPageChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPageChanged(AtkDocument* documentStruct, int pageNumber, OnPageChangedDelegateWrapper wrapper) { wrapper.dlg(pageNumber, wrapper.outer); } extern(C) static void callBackPageChangedDestroy(OnPageChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnReloadDelegateWrapper { void delegate(DocumentIF) dlg; gulong handlerId; this(void delegate(DocumentIF) dlg) { this.dlg = dlg; onReloadListeners ~= this; } void remove(OnReloadDelegateWrapper source) { foreach(index, wrapper; onReloadListeners) { if (wrapper.handlerId == source.handlerId) { onReloadListeners[index] = null; onReloadListeners = std.algorithm.remove(onReloadListeners, index); break; } } } } OnReloadDelegateWrapper[] onReloadListeners; /** * The 'reload' signal is emitted when the contents of a * document is refreshed from its source. Once 'reload' has * been emitted, a matching 'load-complete' or 'load-stopped' * signal should follow, which clients may await before * interrogating ATK for the latest document content. */ gulong addOnReload(void delegate(DocumentIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnReloadDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "reload", cast(GCallback)&callBackReload, cast(void*)wrapper, cast(GClosureNotify)&callBackReloadDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackReload(AtkDocument* documentStruct, OnReloadDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackReloadDestroy(OnReloadDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/atk/EditableTextIF.d000066400000000000000000000074321324604450400207770ustar00rootroot00000000000000/* * 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 atk.EditableTextIF; private import atk.c.functions; public import atk.c.types; private import glib.Str; public import gtkc.atktypes; /** * #AtkEditableText should be implemented by UI components which * contain text which the user can edit, via the #AtkObject * corresponding to that component (see #AtkObject). * * #AtkEditableText is a subclass of #AtkText, and as such, an object * which implements #AtkEditableText is by definition an #AtkText * implementor as well. * * See also: #AtkText */ public interface EditableTextIF{ /** Get the main Gtk struct */ public AtkEditableText* getEditableTextStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_editable_text_get_type(); } /** * Copy text from @start_pos up to, but not including @end_pos * to the clipboard. * * Params: * startPos = start position * endPos = end position */ public void copyText(int startPos, int endPos); /** * Copy text from @start_pos up to, but not including @end_pos * to the clipboard and then delete from the widget. * * Params: * startPos = start position * endPos = end position */ public void cutText(int startPos, int endPos); /** * Delete text @start_pos up to, but not including @end_pos. * * Params: * startPos = start position * endPos = end position */ public void deleteText(int startPos, int endPos); /** * Insert text at a given position. * * Params: * str = the text to insert * length = the length of text to insert, in bytes * position = The caller initializes this to * the position at which to insert the text. After the call it * points at the position after the newly inserted text. */ public void insertText(string str, int length, int* position); /** * Paste text from clipboard to specified @position. * * Params: * position = position to paste */ public void pasteText(int position); /** * Sets the attributes for a specified range. See the ATK_ATTRIBUTE * macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes * that can be set. Note that other attributes that do not have corresponding * ATK_ATTRIBUTE macros may also be set for certain text widgets. * * Params: * attribSet = an #AtkAttributeSet * startOffset = start of range in which to set attributes * endOffset = end of range in which to set attributes * * Returns: %TRUE if attributes successfully set for the specified * range, otherwise %FALSE */ public bool setRunAttributes(AtkAttributeSet* attribSet, int startOffset, int endOffset); /** * Set text contents of @text. * * Params: * str = string to set for text contents of @text */ public void setTextContents(string str); } GtkD-3.7.5/generated/gtkd/atk/EditableTextT.d000066400000000000000000000105161324604450400207010ustar00rootroot00000000000000/* * 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 atk.EditableTextT; public import atk.c.functions; public import atk.c.types; public import glib.Str; public import gtkc.atktypes; /** * #AtkEditableText should be implemented by UI components which * contain text which the user can edit, via the #AtkObject * corresponding to that component (see #AtkObject). * * #AtkEditableText is a subclass of #AtkText, and as such, an object * which implements #AtkEditableText is by definition an #AtkText * implementor as well. * * See also: #AtkText */ public template EditableTextT(TStruct) { /** Get the main Gtk struct */ public AtkEditableText* getEditableTextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkEditableText*)getStruct(); } /** * Copy text from @start_pos up to, but not including @end_pos * to the clipboard. * * Params: * startPos = start position * endPos = end position */ public void copyText(int startPos, int endPos) { atk_editable_text_copy_text(getEditableTextStruct(), startPos, endPos); } /** * Copy text from @start_pos up to, but not including @end_pos * to the clipboard and then delete from the widget. * * Params: * startPos = start position * endPos = end position */ public void cutText(int startPos, int endPos) { atk_editable_text_cut_text(getEditableTextStruct(), startPos, endPos); } /** * Delete text @start_pos up to, but not including @end_pos. * * Params: * startPos = start position * endPos = end position */ public void deleteText(int startPos, int endPos) { atk_editable_text_delete_text(getEditableTextStruct(), startPos, endPos); } /** * Insert text at a given position. * * Params: * str = the text to insert * length = the length of text to insert, in bytes * position = The caller initializes this to * the position at which to insert the text. After the call it * points at the position after the newly inserted text. */ public void insertText(string str, int length, int* position) { atk_editable_text_insert_text(getEditableTextStruct(), Str.toStringz(str), length, position); } /** * Paste text from clipboard to specified @position. * * Params: * position = position to paste */ public void pasteText(int position) { atk_editable_text_paste_text(getEditableTextStruct(), position); } /** * Sets the attributes for a specified range. See the ATK_ATTRIBUTE * macros (such as #ATK_ATTRIBUTE_LEFT_MARGIN) for examples of attributes * that can be set. Note that other attributes that do not have corresponding * ATK_ATTRIBUTE macros may also be set for certain text widgets. * * Params: * attribSet = an #AtkAttributeSet * startOffset = start of range in which to set attributes * endOffset = end of range in which to set attributes * * Returns: %TRUE if attributes successfully set for the specified * range, otherwise %FALSE */ public bool setRunAttributes(AtkAttributeSet* attribSet, int startOffset, int endOffset) { return atk_editable_text_set_run_attributes(getEditableTextStruct(), attribSet, startOffset, endOffset) != 0; } /** * Set text contents of @text. * * Params: * str = string to set for text contents of @text */ public void setTextContents(string str) { atk_editable_text_set_text_contents(getEditableTextStruct(), Str.toStringz(str)); } } GtkD-3.7.5/generated/gtkd/atk/GObjectAccessible.d000066400000000000000000000061671324604450400215010ustar00rootroot00000000000000/* * 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 atk.GObjectAccessible; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import gobject.ObjectG; public import gtkc.atktypes; /** * This object class is derived from AtkObject. It can be used as a * basis for implementing accessible objects for GObjects which are * not derived from GtkWidget. One example of its use is in providing * an accessible object for GnomeCanvasItem in the GAIL library. */ public class GObjectAccessible : ObjectAtk { /** the main Gtk struct */ protected AtkGObjectAccessible* atkGObjectAccessible; /** Get the main Gtk struct */ public AtkGObjectAccessible* getGObjectAccessibleStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkGObjectAccessible; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkGObjectAccessible; } protected override void setStruct(GObject* obj) { atkGObjectAccessible = cast(AtkGObjectAccessible*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkGObjectAccessible* atkGObjectAccessible, bool ownedRef = false) { this.atkGObjectAccessible = atkGObjectAccessible; super(cast(AtkObject*)atkGObjectAccessible, ownedRef); } /** */ public static GType getType() { return atk_gobject_accessible_get_type(); } /** * Gets the accessible object for the specified @obj. * * Params: * obj = a #GObject * * Returns: a #AtkObject which is the accessible object for * the @obj */ public static ObjectAtk forObject(ObjectG obj) { auto p = atk_gobject_accessible_for_object((obj is null) ? null : obj.getObjectGStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); } /** * Gets the GObject for which @obj is the accessible object. * * Returns: a #GObject which is the object for which @obj is * the accessible object */ public ObjectG getObject() { auto p = atk_gobject_accessible_get_object(atkGObjectAccessible); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); } } GtkD-3.7.5/generated/gtkd/atk/Hyperlink.d000066400000000000000000000152731324604450400201510ustar00rootroot00000000000000/* * 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 atk.Hyperlink; private import atk.ActionIF; private import atk.ActionT; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; /** * An ATK object which encapsulates a link or set of links (for * instance in the case of client-side image maps) in a hypertext * document. It may implement the AtkAction interface. AtkHyperlink * may also be used to refer to inline embedded content, since it * allows specification of a start and end offset within the host * AtkHypertext object. */ public class Hyperlink : ObjectG, ActionIF { /** the main Gtk struct */ protected AtkHyperlink* atkHyperlink; /** Get the main Gtk struct */ public AtkHyperlink* getHyperlinkStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkHyperlink; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkHyperlink; } protected override void setStruct(GObject* obj) { atkHyperlink = cast(AtkHyperlink*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkHyperlink* atkHyperlink, bool ownedRef = false) { this.atkHyperlink = atkHyperlink; super(cast(GObject*)atkHyperlink, ownedRef); } // add the Action capabilities mixin ActionT!(AtkHyperlink); /** */ public static GType getType() { return atk_hyperlink_get_type(); } /** * Gets the index with the hypertext document at which this link ends. * * Returns: the index with the hypertext document at which this link ends */ public int getEndIndex() { return atk_hyperlink_get_end_index(atkHyperlink); } /** * Gets the number of anchors associated with this hyperlink. * * Returns: the number of anchors associated with this hyperlink */ public int getNAnchors() { return atk_hyperlink_get_n_anchors(atkHyperlink); } /** * Returns the item associated with this hyperlinks nth anchor. * For instance, the returned #AtkObject will implement #AtkText * if @link_ is a text hyperlink, #AtkImage if @link_ is an image * hyperlink etc. * * Multiple anchors are primarily used by client-side image maps. * * Params: * i = a (zero-index) integer specifying the desired anchor * * Returns: an #AtkObject associated with this hyperlinks * i-th anchor */ public ObjectAtk getObject(int i) { auto p = atk_hyperlink_get_object(atkHyperlink, i); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); } /** * Gets the index with the hypertext document at which this link begins. * * Returns: the index with the hypertext document at which this link begins */ public int getStartIndex() { return atk_hyperlink_get_start_index(atkHyperlink); } /** * Get a the URI associated with the anchor specified * by @i of @link_. * * Multiple anchors are primarily used by client-side image maps. * * Params: * i = a (zero-index) integer specifying the desired anchor * * Returns: a string specifying the URI */ public string getUri(int i) { auto retStr = atk_hyperlink_get_uri(atkHyperlink, i); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Indicates whether the link currently displays some or all of its * content inline. Ordinary HTML links will usually return * %FALSE, but an inline <src> HTML element will return * %TRUE. * * Returns: whether or not this link displays its content inline. */ public bool isInline() { return atk_hyperlink_is_inline(atkHyperlink) != 0; } /** * Determines whether this AtkHyperlink is selected * * Deprecated: Please use ATK_STATE_FOCUSABLE for all links, * and ATK_STATE_FOCUSED for focused links. * * Returns: True if the AtkHyperlink is selected, False otherwise * * Since: 1.4 */ public bool isSelectedLink() { return atk_hyperlink_is_selected_link(atkHyperlink) != 0; } /** * Since the document that a link is associated with may have changed * this method returns %TRUE if the link is still valid (with * respect to the document it references) and %FALSE otherwise. * * Returns: whether or not this link is still valid */ public bool isValid() { return atk_hyperlink_is_valid(atkHyperlink) != 0; } protected class OnLinkActivatedDelegateWrapper { void delegate(Hyperlink) dlg; gulong handlerId; this(void delegate(Hyperlink) dlg) { this.dlg = dlg; onLinkActivatedListeners ~= this; } void remove(OnLinkActivatedDelegateWrapper source) { foreach(index, wrapper; onLinkActivatedListeners) { if (wrapper.handlerId == source.handlerId) { onLinkActivatedListeners[index] = null; onLinkActivatedListeners = std.algorithm.remove(onLinkActivatedListeners, index); break; } } } } OnLinkActivatedDelegateWrapper[] onLinkActivatedListeners; /** * The signal link-activated is emitted when a link is activated. */ gulong addOnLinkActivated(void delegate(Hyperlink) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnLinkActivatedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "link-activated", cast(GCallback)&callBackLinkActivated, cast(void*)wrapper, cast(GClosureNotify)&callBackLinkActivatedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackLinkActivated(AtkHyperlink* hyperlinkStruct, OnLinkActivatedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackLinkActivatedDestroy(OnLinkActivatedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/atk/HyperlinkImplIF.d000066400000000000000000000063741324604450400212140ustar00rootroot00000000000000/* * 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 atk.HyperlinkImplIF; private import atk.Hyperlink; private import atk.c.functions; public import atk.c.types; private import gobject.ObjectG; public import gtkc.atktypes; /** * AtkHyperlinkImpl allows AtkObjects to refer to their associated * AtkHyperlink instance, if one exists. AtkHyperlinkImpl differs * from AtkHyperlink in that AtkHyperlinkImpl is an interface, whereas * AtkHyperlink is a object type. The AtkHyperlinkImpl interface * allows a client to query an AtkObject for the availability of an * associated AtkHyperlink instance, and obtain that instance. It is * thus particularly useful in cases where embedded content or inline * content within a text object is present, since the embedding text * object implements AtkHypertext and the inline/embedded objects are * exposed as children which implement AtkHyperlinkImpl, in addition * to their being obtainable via AtkHypertext:getLink followed by * AtkHyperlink:getObject. * * The AtkHyperlinkImpl interface should be supported by objects * exposed within the hierarchy as children of an AtkHypertext * container which correspond to "links" or embedded content within * the text. HTML anchors are not, for instance, normally exposed * this way, but embedded images and components which appear inline in * the content of a text object are. The AtkHyperlinkIface interface * allows a means of determining which children are hyperlinks in this * sense of the word, and for obtaining their corresponding * AtkHyperlink object, from which the embedding range, URI, etc. can * be obtained. * * To some extent this interface exists because, for historical * reasons, AtkHyperlink was defined as an object type, not an * interface. Thus, in order to interact with AtkObjects via * AtkHyperlink semantics, a new interface was required. */ public interface HyperlinkImplIF{ /** Get the main Gtk struct */ public AtkHyperlinkImpl* getHyperlinkImplStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_hyperlink_impl_get_type(); } /** * Gets the hyperlink associated with this object. * * Returns: an AtkHyperlink object which points to this * implementing AtkObject. * * Since: 1.12 */ public Hyperlink getHyperlink(); } GtkD-3.7.5/generated/gtkd/atk/HyperlinkImplT.d000066400000000000000000000066031324604450400211140ustar00rootroot00000000000000/* * 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 atk.HyperlinkImplT; public import atk.Hyperlink; public import atk.c.functions; public import atk.c.types; public import gobject.ObjectG; public import gtkc.atktypes; /** * AtkHyperlinkImpl allows AtkObjects to refer to their associated * AtkHyperlink instance, if one exists. AtkHyperlinkImpl differs * from AtkHyperlink in that AtkHyperlinkImpl is an interface, whereas * AtkHyperlink is a object type. The AtkHyperlinkImpl interface * allows a client to query an AtkObject for the availability of an * associated AtkHyperlink instance, and obtain that instance. It is * thus particularly useful in cases where embedded content or inline * content within a text object is present, since the embedding text * object implements AtkHypertext and the inline/embedded objects are * exposed as children which implement AtkHyperlinkImpl, in addition * to their being obtainable via AtkHypertext:getLink followed by * AtkHyperlink:getObject. * * The AtkHyperlinkImpl interface should be supported by objects * exposed within the hierarchy as children of an AtkHypertext * container which correspond to "links" or embedded content within * the text. HTML anchors are not, for instance, normally exposed * this way, but embedded images and components which appear inline in * the content of a text object are. The AtkHyperlinkIface interface * allows a means of determining which children are hyperlinks in this * sense of the word, and for obtaining their corresponding * AtkHyperlink object, from which the embedding range, URI, etc. can * be obtained. * * To some extent this interface exists because, for historical * reasons, AtkHyperlink was defined as an object type, not an * interface. Thus, in order to interact with AtkObjects via * AtkHyperlink semantics, a new interface was required. */ public template HyperlinkImplT(TStruct) { /** Get the main Gtk struct */ public AtkHyperlinkImpl* getHyperlinkImplStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkHyperlinkImpl*)getStruct(); } /** * Gets the hyperlink associated with this object. * * Returns: an AtkHyperlink object which points to this * implementing AtkObject. * * Since: 1.12 */ public Hyperlink getHyperlink() { auto p = atk_hyperlink_impl_get_hyperlink(getHyperlinkImplStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Hyperlink)(cast(AtkHyperlink*) p, true); } } GtkD-3.7.5/generated/gtkd/atk/HypertextIF.d000066400000000000000000000061501324604450400204110ustar00rootroot00000000000000/* * 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 atk.HypertextIF; private import atk.Hyperlink; private import atk.c.functions; public import atk.c.types; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; /** * An interface used for objects which implement linking between * multiple resource or content locations, or multiple 'markers' * within a single document. A Hypertext instance is associated with * one or more Hyperlinks, which are associated with particular * offsets within the Hypertext's included content. While this * interface is derived from Text, there is no requirement that * Hypertext instances have textual content; they may implement Image * as well, and Hyperlinks need not have non-zero text offsets. */ public interface HypertextIF{ /** Get the main Gtk struct */ public AtkHypertext* getHypertextStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_hypertext_get_type(); } /** * Gets the link in this hypertext document at index * @link_index * * Params: * linkIndex = an integer specifying the desired link * * Returns: the link in this hypertext document at * index @link_index */ public Hyperlink getLink(int linkIndex); /** * Gets the index into the array of hyperlinks that is associated with * the character specified by @char_index. * * Params: * charIndex = a character index * * Returns: an index into the array of hyperlinks in @hypertext, * or -1 if there is no hyperlink associated with this character. */ public int getLinkIndex(int charIndex); /** * Gets the number of links within this hypertext document. * * Returns: the number of links within this hypertext document */ public int getNLinks(); /** * The "link-selected" signal is emitted by an AtkHyperText * object when one of the hyperlinks associated with the object * is selected. * * Params: * arg1 = the index of the hyperlink which is selected */ gulong addOnLinkSelected(void delegate(int, HypertextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/atk/HypertextT.d000066400000000000000000000110541324604450400203150ustar00rootroot00000000000000/* * 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 atk.HypertextT; public import atk.Hyperlink; public import atk.c.functions; public import atk.c.types; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.atktypes; public import std.algorithm; /** * An interface used for objects which implement linking between * multiple resource or content locations, or multiple 'markers' * within a single document. A Hypertext instance is associated with * one or more Hyperlinks, which are associated with particular * offsets within the Hypertext's included content. While this * interface is derived from Text, there is no requirement that * Hypertext instances have textual content; they may implement Image * as well, and Hyperlinks need not have non-zero text offsets. */ public template HypertextT(TStruct) { /** Get the main Gtk struct */ public AtkHypertext* getHypertextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkHypertext*)getStruct(); } /** * Gets the link in this hypertext document at index * @link_index * * Params: * linkIndex = an integer specifying the desired link * * Returns: the link in this hypertext document at * index @link_index */ public Hyperlink getLink(int linkIndex) { auto p = atk_hypertext_get_link(getHypertextStruct(), linkIndex); if(p is null) { return null; } return ObjectG.getDObject!(Hyperlink)(cast(AtkHyperlink*) p); } /** * Gets the index into the array of hyperlinks that is associated with * the character specified by @char_index. * * Params: * charIndex = a character index * * Returns: an index into the array of hyperlinks in @hypertext, * or -1 if there is no hyperlink associated with this character. */ public int getLinkIndex(int charIndex) { return atk_hypertext_get_link_index(getHypertextStruct(), charIndex); } /** * Gets the number of links within this hypertext document. * * Returns: the number of links within this hypertext document */ public int getNLinks() { return atk_hypertext_get_n_links(getHypertextStruct()); } protected class OnLinkSelectedDelegateWrapper { void delegate(int, HypertextIF) dlg; gulong handlerId; this(void delegate(int, HypertextIF) dlg) { this.dlg = dlg; onLinkSelectedListeners ~= this; } void remove(OnLinkSelectedDelegateWrapper source) { foreach(index, wrapper; onLinkSelectedListeners) { if (wrapper.handlerId == source.handlerId) { onLinkSelectedListeners[index] = null; onLinkSelectedListeners = std.algorithm.remove(onLinkSelectedListeners, index); break; } } } } OnLinkSelectedDelegateWrapper[] onLinkSelectedListeners; /** * The "link-selected" signal is emitted by an AtkHyperText * object when one of the hyperlinks associated with the object * is selected. * * Params: * arg1 = the index of the hyperlink which is selected */ gulong addOnLinkSelected(void delegate(int, HypertextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnLinkSelectedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "link-selected", cast(GCallback)&callBackLinkSelected, cast(void*)wrapper, cast(GClosureNotify)&callBackLinkSelectedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackLinkSelected(AtkHypertext* hypertextStruct, int arg1, OnLinkSelectedDelegateWrapper wrapper) { wrapper.dlg(arg1, wrapper.outer); } extern(C) static void callBackLinkSelectedDestroy(OnLinkSelectedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/atk/ImageIF.d000066400000000000000000000072531324604450400174440ustar00rootroot00000000000000/* * 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 atk.ImageIF; private import atk.c.functions; public import atk.c.types; private import glib.Str; public import gtkc.atktypes; /** * #AtkImage should be implemented by #AtkObject subtypes on behalf of * components which display image/pixmap information onscreen, and * which provide information (other than just widget borders, etc.) * via that image content. For instance, icons, buttons with icons, * toolbar elements, and image viewing panes typically should * implement #AtkImage. * * #AtkImage primarily provides two types of information: coordinate * information (useful for screen review mode of screenreaders, and * for use by onscreen magnifiers), and descriptive information. The * descriptive information is provided for alternative, text-only * presentation of the most significant information present in the * image. */ public interface ImageIF{ /** Get the main Gtk struct */ public AtkImage* getImageStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_image_get_type(); } /** * Get a textual description of this image. * * Returns: a string representing the image description */ public string getImageDescription(); /** * Returns: a string corresponding to the POSIX * LC_MESSAGES locale used by the image description, or %NULL if the * image does not specify a locale. * * Since: 1.12 */ public string getImageLocale(); /** * Gets the position of the image in the form of a point specifying the * images top-left corner. * * Params: * x = address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained. * y = address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained. * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window */ public void getImagePosition(out int x, out int y, AtkCoordType coordType); /** * Get the width and height in pixels for the specified image. * The values of @width and @height are returned as -1 if the * values cannot be obtained (for instance, if the object is not onscreen). * * Params: * width = filled with the image width, or -1 if the value cannot be obtained. * height = filled with the image height, or -1 if the value cannot be obtained. */ public void getImageSize(out int width, out int height); /** * Sets the textual description for this image. * * Params: * description = a string description to set for @image * * Returns: boolean TRUE, or FALSE if operation could * not be completed. */ public bool setImageDescription(string description); } GtkD-3.7.5/generated/gtkd/atk/ImageT.d000066400000000000000000000100001324604450400173310ustar00rootroot00000000000000/* * 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 atk.ImageT; public import atk.c.functions; public import atk.c.types; public import glib.Str; public import gtkc.atktypes; /** * #AtkImage should be implemented by #AtkObject subtypes on behalf of * components which display image/pixmap information onscreen, and * which provide information (other than just widget borders, etc.) * via that image content. For instance, icons, buttons with icons, * toolbar elements, and image viewing panes typically should * implement #AtkImage. * * #AtkImage primarily provides two types of information: coordinate * information (useful for screen review mode of screenreaders, and * for use by onscreen magnifiers), and descriptive information. The * descriptive information is provided for alternative, text-only * presentation of the most significant information present in the * image. */ public template ImageT(TStruct) { /** Get the main Gtk struct */ public AtkImage* getImageStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkImage*)getStruct(); } /** * Get a textual description of this image. * * Returns: a string representing the image description */ public string getImageDescription() { return Str.toString(atk_image_get_image_description(getImageStruct())); } /** * Returns: a string corresponding to the POSIX * LC_MESSAGES locale used by the image description, or %NULL if the * image does not specify a locale. * * Since: 1.12 */ public string getImageLocale() { return Str.toString(atk_image_get_image_locale(getImageStruct())); } /** * Gets the position of the image in the form of a point specifying the * images top-left corner. * * Params: * x = address of #gint to put x coordinate position; otherwise, -1 if value cannot be obtained. * y = address of #gint to put y coordinate position; otherwise, -1 if value cannot be obtained. * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window */ public void getImagePosition(out int x, out int y, AtkCoordType coordType) { atk_image_get_image_position(getImageStruct(), &x, &y, coordType); } /** * Get the width and height in pixels for the specified image. * The values of @width and @height are returned as -1 if the * values cannot be obtained (for instance, if the object is not onscreen). * * Params: * width = filled with the image width, or -1 if the value cannot be obtained. * height = filled with the image height, or -1 if the value cannot be obtained. */ public void getImageSize(out int width, out int height) { atk_image_get_image_size(getImageStruct(), &width, &height); } /** * Sets the textual description for this image. * * Params: * description = a string description to set for @image * * Returns: boolean TRUE, or FALSE if operation could * not be completed. */ public bool setImageDescription(string description) { return atk_image_set_image_description(getImageStruct(), Str.toStringz(description)) != 0; } } GtkD-3.7.5/generated/gtkd/atk/ImplementorIF.d000066400000000000000000000032201324604450400207030ustar00rootroot00000000000000/* * 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 atk.ImplementorIF; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import gobject.ObjectG; public import gtkc.atktypes; /** */ public interface ImplementorIF{ /** Get the main Gtk struct */ public AtkImplementor* getImplementorStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** * Gets a reference to an object's #AtkObject implementation, if * the object implements #AtkObjectIface * * Returns: a reference to an object's #AtkObject * implementation */ public ObjectAtk refAccessible(); /** */ public static GType getType() { return atk_implementor_get_type(); } } GtkD-3.7.5/generated/gtkd/atk/ImplementorT.d000066400000000000000000000034211324604450400206130ustar00rootroot00000000000000/* * 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 atk.ImplementorT; public import atk.ObjectAtk; public import atk.c.functions; public import atk.c.types; public import gobject.ObjectG; public import gtkc.atktypes; /** */ public template ImplementorT(TStruct) { /** Get the main Gtk struct */ public AtkImplementor* getImplementorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkImplementor*)getStruct(); } /** * Gets a reference to an object's #AtkObject implementation, if * the object implements #AtkObjectIface * * Returns: a reference to an object's #AtkObject * implementation */ public ObjectAtk refAccessible() { auto p = atk_implementor_ref_accessible(getImplementorStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true); } } GtkD-3.7.5/generated/gtkd/atk/Misc.d000066400000000000000000000065611324604450400170770ustar00rootroot00000000000000/* * 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 atk.Misc; private import atk.c.functions; public import atk.c.types; private import gobject.ObjectG; public import gtkc.atktypes; /** * A set of utility functions for thread locking. This interface and * all his related methods are deprecated since 2.12. */ public class Misc : ObjectG { /** the main Gtk struct */ protected AtkMisc* atkMisc; /** Get the main Gtk struct */ public AtkMisc* getMiscStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkMisc; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkMisc; } protected override void setStruct(GObject* obj) { atkMisc = cast(AtkMisc*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkMisc* atkMisc, bool ownedRef = false) { this.atkMisc = atkMisc; super(cast(GObject*)atkMisc, ownedRef); } /** */ public static GType getType() { return atk_misc_get_type(); } /** * Obtain the singleton instance of AtkMisc for this application. * * Deprecated: Since 2.12. * * Returns: The singleton instance of AtkMisc for this application. * * Since: 1.13 */ public static Misc getInstance() { auto p = atk_misc_get_instance(); if(p is null) { return null; } return ObjectG.getDObject!(Misc)(cast(AtkMisc*) p); } /** * Take the thread mutex for the GUI toolkit, * if one exists. * (This method is implemented by the toolkit ATK implementation layer; * for instance, for GTK+, GAIL implements this via GDK_THREADS_ENTER). * * Deprecated: Since 2.12. * * Since: 1.13 */ public void threadsEnter() { atk_misc_threads_enter(atkMisc); } /** * Release the thread mutex for the GUI toolkit, * if one exists. This method, and atk_misc_threads_enter, * are needed in some situations by threaded application code which * services ATK requests, since fulfilling ATK requests often * requires calling into the GUI toolkit. If a long-running or * potentially blocking call takes place inside such a block, it should * be bracketed by atk_misc_threads_leave/atk_misc_threads_enter calls. * (This method is implemented by the toolkit ATK implementation layer; * for instance, for GTK+, GAIL implements this via GDK_THREADS_LEAVE). * * Deprecated: Since 2.12. * * Since: 1.13 */ public void threadsLeave() { atk_misc_threads_leave(atkMisc); } } GtkD-3.7.5/generated/gtkd/atk/NoOpObject.d000066400000000000000000000114131324604450400201760ustar00rootroot00000000000000/* * 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 atk.NoOpObject; private import atk.ActionIF; private import atk.ActionT; private import atk.ComponentIF; private import atk.ComponentT; private import atk.DocumentIF; private import atk.DocumentT; private import atk.EditableTextIF; private import atk.EditableTextT; private import atk.HypertextIF; private import atk.HypertextT; private import atk.ImageIF; private import atk.ImageT; private import atk.ObjectAtk; private import atk.SelectionIF; private import atk.SelectionT; private import atk.TableCellIF; private import atk.TableCellT; private import atk.TableIF; private import atk.TableT; private import atk.TextIF; private import atk.TextT; private import atk.ValueIF; private import atk.ValueT; private import atk.WindowIF; private import atk.WindowT; private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.atktypes; /** * An AtkNoOpObject is an AtkObject which purports to implement all * ATK interfaces. It is the type of AtkObject which is created if an * accessible object is requested for an object type for which no * factory type is specified. */ public class NoOpObject : ObjectAtk, ActionIF, ComponentIF, DocumentIF, EditableTextIF, HypertextIF, ImageIF, SelectionIF, TableIF, TableCellIF, TextIF, ValueIF, WindowIF { /** the main Gtk struct */ protected AtkNoOpObject* atkNoOpObject; /** Get the main Gtk struct */ public AtkNoOpObject* getNoOpObjectStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkNoOpObject; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkNoOpObject; } protected override void setStruct(GObject* obj) { atkNoOpObject = cast(AtkNoOpObject*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkNoOpObject* atkNoOpObject, bool ownedRef = false) { this.atkNoOpObject = atkNoOpObject; super(cast(AtkObject*)atkNoOpObject, ownedRef); } // add the Action capabilities mixin ActionT!(AtkNoOpObject); // add the Component capabilities mixin ComponentT!(AtkNoOpObject); // add the Document capabilities mixin DocumentT!(AtkNoOpObject); // add the EditableText capabilities mixin EditableTextT!(AtkNoOpObject); // add the Hypertext capabilities mixin HypertextT!(AtkNoOpObject); // add the Image capabilities mixin ImageT!(AtkNoOpObject); // add the Selection capabilities mixin SelectionT!(AtkNoOpObject); // add the Table capabilities mixin TableT!(AtkNoOpObject); // add the TableCell capabilities mixin TableCellT!(AtkNoOpObject); // add the Text capabilities mixin TextT!(AtkNoOpObject); // add the Value capabilities mixin ValueT!(AtkNoOpObject); // add the Window capabilities mixin WindowT!(AtkNoOpObject); /** * Removes the specified child of the object from the object's selection. * * Params: * i = a #gint specifying the index in the selection set. (e.g. the * ith selection as opposed to the ith child). * * Return: TRUE if success, FALSE otherwise. */ public bool removeSelection(int i) { return atk_selection_remove_selection(getSelectionStruct(), i) != 0; } /** */ /** */ public static GType getType() { return atk_no_op_object_get_type(); } /** * Provides a default (non-functioning stub) #AtkObject. * Application maintainers should not use this method. * * Params: * obj = a #GObject * * Returns: a default (non-functioning stub) #AtkObject * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectG obj) { auto p = atk_no_op_object_new((obj is null) ? null : obj.getObjectGStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(AtkNoOpObject*) p, true); } } GtkD-3.7.5/generated/gtkd/atk/NoOpObjectFactory.d000066400000000000000000000054001324604450400215250ustar00rootroot00000000000000/* * 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 atk.NoOpObjectFactory; private import atk.ObjectFactory; private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.atktypes; /** * The AtkObjectFactory which creates an AtkNoOpObject. An instance of * this is created by an AtkRegistry if no factory type has not been * specified to create an accessible object of a particular type. */ public class NoOpObjectFactory : ObjectFactory { /** the main Gtk struct */ protected AtkNoOpObjectFactory* atkNoOpObjectFactory; /** Get the main Gtk struct */ public AtkNoOpObjectFactory* getNoOpObjectFactoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkNoOpObjectFactory; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkNoOpObjectFactory; } protected override void setStruct(GObject* obj) { atkNoOpObjectFactory = cast(AtkNoOpObjectFactory*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkNoOpObjectFactory* atkNoOpObjectFactory, bool ownedRef = false) { this.atkNoOpObjectFactory = atkNoOpObjectFactory; super(cast(AtkObjectFactory*)atkNoOpObjectFactory, ownedRef); } /** */ public static GType getType() { return atk_no_op_object_factory_get_type(); } /** * Creates an instance of an #AtkObjectFactory which generates primitive * (non-functioning) #AtkObjects. * * Returns: an instance of an #AtkObjectFactory * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = atk_no_op_object_factory_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(AtkNoOpObjectFactory*) p, true); } } GtkD-3.7.5/generated/gtkd/atk/ObjectAtk.d000066400000000000000000000617741324604450400200610ustar00rootroot00000000000000/* * 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 atk.ObjectAtk; private import atk.RelationSet; private import atk.StateSet; private import atk.c.functions; public import atk.c.types; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; /** * This class is the primary class for accessibility support via the * Accessibility ToolKit (ATK). Objects which are instances of * #AtkObject (or instances of AtkObject-derived types) are queried * for properties which relate basic (and generic) properties of a UI * component such as name and description. Instances of #AtkObject * may also be queried as to whether they implement other ATK * interfaces (e.g. #AtkAction, #AtkComponent, etc.), as appropriate * to the role which a given UI component plays in a user interface. * * All UI components in an application which provide useful * information or services to the user must provide corresponding * #AtkObject instances on request (in GTK+, for instance, usually on * a call to #gtk_widget_get_accessible ()), either via ATK support * built into the toolkit for the widget class or ancestor class, or * in the case of custom widgets, if the inherited #AtkObject * implementation is insufficient, via instances of a new #AtkObject * subclass. * * See also: #AtkObjectFactory, #AtkRegistry. (GTK+ users see also * #GtkAccessible). */ public class ObjectAtk : ObjectG { /** the main Gtk struct */ protected AtkObject* atkObject; /** Get the main Gtk struct */ public AtkObject* getObjectAtkStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkObject; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkObject; } protected override void setStruct(GObject* obj) { atkObject = cast(AtkObject*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkObject* atkObject, bool ownedRef = false) { this.atkObject = atkObject; super(cast(GObject*)atkObject, ownedRef); } /** */ public static GType getType() { return atk_object_get_type(); } /** * Adds a relationship of the specified type with the specified target. * * Params: * relationship = The #AtkRelationType of the relation * target = The #AtkObject which is to be the target of the relation. * * Returns: TRUE if the relationship is added. */ public bool addRelationship(AtkRelationType relationship, ObjectAtk target) { return atk_object_add_relationship(atkObject, relationship, (target is null) ? null : target.getObjectAtkStruct()) != 0; } /** * * * Deprecated: Since 2.12. Connect directly to property-change or * notify signals. * * Params: * handler = a function to be called when a property changes its value * * Returns: a #guint which is the handler id used in * atk_object_remove_property_change_handler() */ public uint connectPropertyChangeHandler(AtkPropertyChangeHandler* handler) { return atk_object_connect_property_change_handler(atkObject, handler); } /** * Get a list of properties applied to this object as a whole, as an #AtkAttributeSet consisting of * name-value pairs. As such these attributes may be considered weakly-typed properties or annotations, * as distinct from strongly-typed object data available via other get/set methods. * Not all objects have explicit "name-value pair" #AtkAttributeSet properties. * * Returns: an #AtkAttributeSet consisting of all * explicit properties/annotations applied to the object, or an empty * set if the object has no name-value pair attributes assigned to * it. This #atkattributeset should be freed by a call to * atk_attribute_set_free(). * * Since: 1.12 */ public AtkAttributeSet* getAttributes() { return atk_object_get_attributes(atkObject); } /** * Gets the accessible description of the accessible. * * Returns: a character string representing the accessible description * of the accessible. */ public string getDescription() { return Str.toString(atk_object_get_description(atkObject)); } /** * Gets the 0-based index of this accessible in its parent; returns -1 if the * accessible does not have an accessible parent. * * Returns: an integer which is the index of the accessible in its parent */ public int getIndexInParent() { return atk_object_get_index_in_parent(atkObject); } /** * Gets the layer of the accessible. * * Deprecated: Use atk_component_get_layer instead. * * Returns: an #AtkLayer which is the layer of the accessible */ public AtkLayer getLayer() { return atk_object_get_layer(atkObject); } /** * Gets the zorder of the accessible. The value G_MININT will be returned * if the layer of the accessible is not ATK_LAYER_MDI. * * Deprecated: Use atk_component_get_mdi_zorder instead. * * Returns: a gint which is the zorder of the accessible, i.e. the depth at * which the component is shown in relation to other components in the same * container. */ public int getMdiZorder() { return atk_object_get_mdi_zorder(atkObject); } /** * Gets the number of accessible children of the accessible. * * Returns: an integer representing the number of accessible children * of the accessible. */ public int getNAccessibleChildren() { return atk_object_get_n_accessible_children(atkObject); } /** * Gets the accessible name of the accessible. * * Returns: a character string representing the accessible name of the object. */ public string getName() { return Str.toString(atk_object_get_name(atkObject)); } /** * Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale * of @accessible. * * Returns: a UTF-8 string indicating the POSIX-style LC_MESSAGES * locale of @accessible. * * Since: 2.8 */ public string getObjectLocale() { return Str.toString(atk_object_get_object_locale(atkObject)); } /** * Gets the accessible parent of the accessible. By default this is * the one assigned with atk_object_set_parent(), but it is assumed * that ATK implementors have ways to get the parent of the object * without the need of assigning it manually with * atk_object_set_parent(), and will return it with this method. * * If you are only interested on the parent assigned with * atk_object_set_parent(), use atk_object_peek_parent(). * * Returns: an #AtkObject representing the accessible * parent of the accessible */ public ObjectAtk getParent() { auto p = atk_object_get_parent(atkObject); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); } /** * Gets the role of the accessible. * * Returns: an #AtkRole which is the role of the accessible */ public AtkRole getRole() { return atk_object_get_role(atkObject); } /** * This function is called when implementing subclasses of #AtkObject. * It does initialization required for the new object. It is intended * that this function should called only in the ..._new() functions used * to create an instance of a subclass of #AtkObject * * Params: * data = a #gpointer which identifies the object for which the AtkObject was created. */ public void initialize(void* data) { atk_object_initialize(atkObject, data); } /** * Emits a state-change signal for the specified state. * * Note that as a general rule when the state of an existing object changes, * emitting a notification is expected. * * Params: * state = an #AtkState whose state is changed * value = a gboolean which indicates whether the state is being set on or off */ public void notifyStateChange(AtkState state, bool value) { atk_object_notify_state_change(atkObject, state, value); } /** * Gets the accessible parent of the accessible, if it has been * manually assigned with atk_object_set_parent. Otherwise, this * function returns %NULL. * * This method is intended as an utility for ATK implementors, and not * to be exposed to accessible tools. See atk_object_get_parent() for * further reference. * * Returns: an #AtkObject representing the accessible * parent of the accessible if assigned */ public ObjectAtk peekParent() { auto p = atk_object_peek_parent(atkObject); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); } /** * Gets a reference to the specified accessible child of the object. * The accessible children are 0-based so the first accessible child is * at index 0, the second at index 1 and so on. * * Params: * i = a gint representing the position of the child, starting from 0 * * Returns: an #AtkObject representing the specified * accessible child of the accessible. */ public ObjectAtk refAccessibleChild(int i) { auto p = atk_object_ref_accessible_child(atkObject, i); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true); } /** * Gets the #AtkRelationSet associated with the object. * * Returns: an #AtkRelationSet representing the relation set * of the object. */ public RelationSet refRelationSet() { auto p = atk_object_ref_relation_set(atkObject); if(p is null) { return null; } return ObjectG.getDObject!(RelationSet)(cast(AtkRelationSet*) p, true); } /** * Gets a reference to the state set of the accessible; the caller must * unreference it when it is no longer needed. * * Returns: a reference to an #AtkStateSet which is the state * set of the accessible */ public StateSet refStateSet() { auto p = atk_object_ref_state_set(atkObject); if(p is null) { return null; } return ObjectG.getDObject!(StateSet)(cast(AtkStateSet*) p, true); } /** * * * Deprecated: Since 2.12. * * Removes a property change handler. * * Params: * handlerId = a guint which identifies the handler to be removed. */ public void removePropertyChangeHandler(uint handlerId) { atk_object_remove_property_change_handler(atkObject, handlerId); } /** * Removes a relationship of the specified type with the specified target. * * Params: * relationship = The #AtkRelationType of the relation * target = The #AtkObject which is the target of the relation to be removed. * * Returns: TRUE if the relationship is removed. */ public bool removeRelationship(AtkRelationType relationship, ObjectAtk target) { return atk_object_remove_relationship(atkObject, relationship, (target is null) ? null : target.getObjectAtkStruct()) != 0; } /** * Sets the accessible description of the accessible. You can't set * the description to NULL. This is reserved for the initial value. In * this aspect NULL is similar to ATK_ROLE_UNKNOWN. If you want to set * the name to a empty value you can use "". * * Params: * description = a character string to be set as the accessible description */ public void setDescription(string description) { atk_object_set_description(atkObject, Str.toStringz(description)); } /** * Sets the accessible name of the accessible. You can't set the name * to NULL. This is reserved for the initial value. In this aspect * NULL is similar to ATK_ROLE_UNKNOWN. If you want to set the name to * a empty value you can use "". * * Params: * name = a character string to be set as the accessible name */ public void setName(string name) { atk_object_set_name(atkObject, Str.toStringz(name)); } /** * Sets the accessible parent of the accessible. @parent can be NULL. * * Params: * parent = an #AtkObject to be set as the accessible parent */ public void setParent(ObjectAtk parent) { atk_object_set_parent(atkObject, (parent is null) ? null : parent.getObjectAtkStruct()); } /** * Sets the role of the accessible. * * Params: * role = an #AtkRole to be set as the role */ public void setRole(AtkRole role) { atk_object_set_role(atkObject, role); } protected class OnActiveDescendantChangedDelegateWrapper { void delegate(void*, ObjectAtk) dlg; gulong handlerId; this(void delegate(void*, ObjectAtk) dlg) { this.dlg = dlg; onActiveDescendantChangedListeners ~= this; } void remove(OnActiveDescendantChangedDelegateWrapper source) { foreach(index, wrapper; onActiveDescendantChangedListeners) { if (wrapper.handlerId == source.handlerId) { onActiveDescendantChangedListeners[index] = null; onActiveDescendantChangedListeners = std.algorithm.remove(onActiveDescendantChangedListeners, index); break; } } } } OnActiveDescendantChangedDelegateWrapper[] onActiveDescendantChangedListeners; /** * The "active-descendant-changed" signal is emitted by an object * which has the state ATK_STATE_MANAGES_DESCENDANTS when the focus * object in the object changes. For instance, a table will emit the * signal when the cell in the table which has focus changes. * * Params: * arg1 = the newly focused object. */ gulong addOnActiveDescendantChanged(void delegate(void*, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActiveDescendantChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "active-descendant-changed", cast(GCallback)&callBackActiveDescendantChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackActiveDescendantChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActiveDescendantChanged(AtkObject* objectatkStruct, void* arg1, OnActiveDescendantChangedDelegateWrapper wrapper) { wrapper.dlg(arg1, wrapper.outer); } extern(C) static void callBackActiveDescendantChangedDestroy(OnActiveDescendantChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnChildrenChangedDelegateWrapper { void delegate(uint, void*, ObjectAtk) dlg; gulong handlerId; this(void delegate(uint, void*, ObjectAtk) dlg) { this.dlg = dlg; onChildrenChangedListeners ~= this; } void remove(OnChildrenChangedDelegateWrapper source) { foreach(index, wrapper; onChildrenChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChildrenChangedListeners[index] = null; onChildrenChangedListeners = std.algorithm.remove(onChildrenChangedListeners, index); break; } } } } OnChildrenChangedDelegateWrapper[] onChildrenChangedListeners; /** * The signal "children-changed" is emitted when a child is added or * removed form an object. It supports two details: "add" and * "remove" * * Params: * arg1 = The index of the added or removed child. The value can be * -1. This is used if the value is not known by the implementor * when the child is added/removed or irrelevant. * arg2 = A gpointer to the child AtkObject which was added or * removed. If the child was removed, it is possible that it is not * available for the implementor. In that case this pointer can be * NULL. */ gulong addOnChildrenChanged(void delegate(uint, void*, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChildrenChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "children-changed", cast(GCallback)&callBackChildrenChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChildrenChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChildrenChanged(AtkObject* objectatkStruct, uint arg1, void* arg2, OnChildrenChangedDelegateWrapper wrapper) { wrapper.dlg(arg1, arg2, wrapper.outer); } extern(C) static void callBackChildrenChangedDestroy(OnChildrenChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnFocusDelegateWrapper { void delegate(bool, ObjectAtk) dlg; gulong handlerId; this(void delegate(bool, ObjectAtk) dlg) { this.dlg = dlg; onFocusListeners ~= this; } void remove(OnFocusDelegateWrapper source) { foreach(index, wrapper; onFocusListeners) { if (wrapper.handlerId == source.handlerId) { onFocusListeners[index] = null; onFocusListeners = std.algorithm.remove(onFocusListeners, index); break; } } } } OnFocusDelegateWrapper[] onFocusListeners; /** * The signal "focus-event" is emitted when an object gained or lost * focus. * * Deprecated: Use the #AtkObject::state-change signal instead. * * Params: * arg1 = a boolean value which indicates whether the object gained * or lost focus. */ gulong addOnFocus(void delegate(bool, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnFocusDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "focus-event", cast(GCallback)&callBackFocus, cast(void*)wrapper, cast(GClosureNotify)&callBackFocusDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackFocus(AtkObject* objectatkStruct, bool arg1, OnFocusDelegateWrapper wrapper) { wrapper.dlg(arg1, wrapper.outer); } extern(C) static void callBackFocusDestroy(OnFocusDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPropertyChangeDelegateWrapper { void delegate(void*, ObjectAtk) dlg; gulong handlerId; this(void delegate(void*, ObjectAtk) dlg) { this.dlg = dlg; onPropertyChangeListeners ~= this; } void remove(OnPropertyChangeDelegateWrapper source) { foreach(index, wrapper; onPropertyChangeListeners) { if (wrapper.handlerId == source.handlerId) { onPropertyChangeListeners[index] = null; onPropertyChangeListeners = std.algorithm.remove(onPropertyChangeListeners, index); break; } } } } OnPropertyChangeDelegateWrapper[] onPropertyChangeListeners; /** * The signal "property-change" is emitted when an object's property * value changes. @arg1 contains an #AtkPropertyValues with the name * and the new value of the property whose value has changed. Note * that, as with GObject notify, getting this signal does not * guarantee that the value of the property has actually changed; it * may also be emitted when the setter of the property is called to * reinstate the previous value. * * Toolkit implementor note: ATK implementors should use * g_object_notify() to emit property-changed * notifications. #AtkObject::property-changed is needed by the * implementation of atk_add_global_event_listener() because GObject * notify doesn't support emission hooks. * * Params: * arg1 = an #AtkPropertyValues containing the new value of the * property which changed. */ gulong addOnPropertyChange(void delegate(void*, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPropertyChangeDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "property-change", cast(GCallback)&callBackPropertyChange, cast(void*)wrapper, cast(GClosureNotify)&callBackPropertyChangeDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPropertyChange(AtkObject* objectatkStruct, void* arg1, OnPropertyChangeDelegateWrapper wrapper) { wrapper.dlg(arg1, wrapper.outer); } extern(C) static void callBackPropertyChangeDestroy(OnPropertyChangeDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnStateChangeDelegateWrapper { void delegate(string, bool, ObjectAtk) dlg; gulong handlerId; this(void delegate(string, bool, ObjectAtk) dlg) { this.dlg = dlg; onStateChangeListeners ~= this; } void remove(OnStateChangeDelegateWrapper source) { foreach(index, wrapper; onStateChangeListeners) { if (wrapper.handlerId == source.handlerId) { onStateChangeListeners[index] = null; onStateChangeListeners = std.algorithm.remove(onStateChangeListeners, index); break; } } } } OnStateChangeDelegateWrapper[] onStateChangeListeners; /** * The "state-change" signal is emitted when an object's state * changes. The detail value identifies the state type which has * changed. * * Params: * arg1 = The name of the state which has changed * arg2 = A boolean which indicates whether the state has been set or unset. */ gulong addOnStateChange(void delegate(string, bool, ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnStateChangeDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "state-change", cast(GCallback)&callBackStateChange, cast(void*)wrapper, cast(GClosureNotify)&callBackStateChangeDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackStateChange(AtkObject* objectatkStruct, char* arg1, bool arg2, OnStateChangeDelegateWrapper wrapper) { wrapper.dlg(Str.toString(arg1), arg2, wrapper.outer); } extern(C) static void callBackStateChangeDestroy(OnStateChangeDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnVisibleDataChangedDelegateWrapper { void delegate(ObjectAtk) dlg; gulong handlerId; this(void delegate(ObjectAtk) dlg) { this.dlg = dlg; onVisibleDataChangedListeners ~= this; } void remove(OnVisibleDataChangedDelegateWrapper source) { foreach(index, wrapper; onVisibleDataChangedListeners) { if (wrapper.handlerId == source.handlerId) { onVisibleDataChangedListeners[index] = null; onVisibleDataChangedListeners = std.algorithm.remove(onVisibleDataChangedListeners, index); break; } } } } OnVisibleDataChangedDelegateWrapper[] onVisibleDataChangedListeners; /** * The "visible-data-changed" signal is emitted when the visual * appearance of the object changed. */ gulong addOnVisibleDataChanged(void delegate(ObjectAtk) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnVisibleDataChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "visible-data-changed", cast(GCallback)&callBackVisibleDataChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackVisibleDataChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackVisibleDataChanged(AtkObject* objectatkStruct, OnVisibleDataChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackVisibleDataChangedDestroy(OnVisibleDataChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** * Get the #AtkRole type corresponding to a rolew name. * * Params: * name = a string which is the (non-localized) name of an ATK role. * * Returns: the #AtkRole enumerated type corresponding to the specified name, * or #ATK_ROLE_INVALID if no matching role is found. */ public static AtkRole roleForName(string name) { return atk_role_for_name(Str.toStringz(name)); } /** * Gets the localized description string describing the #AtkRole @role. * * Params: * role = The #AtkRole whose localized name is required * * Returns: the localized string describing the AtkRole */ public static string roleGetLocalizedName(AtkRole role) { return Str.toString(atk_role_get_localized_name(role)); } /** * Gets the description string describing the #AtkRole @role. * * Params: * role = The #AtkRole whose name is required * * Returns: the string describing the AtkRole */ public static string roleGetName(AtkRole role) { return Str.toString(atk_role_get_name(role)); } /** * Registers the role specified by @name. @name must be a meaningful * name. So it should not be empty, or consisting on whitespaces. * * Deprecated: Since 2.12. If your application/toolkit doesn't find a * suitable role for a specific object defined at #AtkRole, please * submit a bug in order to add a new role to the specification. * * Params: * name = a character string describing the new role. * * Returns: an #AtkRole for the new role if added * properly. ATK_ROLE_INVALID in case of error. */ public static AtkRole roleRegister(string name) { return atk_role_register(Str.toStringz(name)); } } GtkD-3.7.5/generated/gtkd/atk/ObjectFactory.d000066400000000000000000000067611324604450400207440ustar00rootroot00000000000000/* * 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 atk.ObjectFactory; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import gobject.ObjectG; public import gtkc.atktypes; /** * This class is the base object class for a factory used to create an * accessible object for a specific GType. The function * atk_registry_set_factory_type() is normally called to store in the * registry the factory type to be used to create an accessible of a * particular GType. */ public class ObjectFactory : ObjectG { /** the main Gtk struct */ protected AtkObjectFactory* atkObjectFactory; /** Get the main Gtk struct */ public AtkObjectFactory* getObjectFactoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkObjectFactory; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkObjectFactory; } protected override void setStruct(GObject* obj) { atkObjectFactory = cast(AtkObjectFactory*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkObjectFactory* atkObjectFactory, bool ownedRef = false) { this.atkObjectFactory = atkObjectFactory; super(cast(GObject*)atkObjectFactory, ownedRef); } /** */ public static GType getType() { return atk_object_factory_get_type(); } /** * Provides an #AtkObject that implements an accessibility interface * on behalf of @obj * * Params: * obj = a #GObject * * Returns: an #AtkObject that implements an accessibility * interface on behalf of @obj */ public ObjectAtk createAccessible(ObjectG obj) { auto p = atk_object_factory_create_accessible(atkObjectFactory, (obj is null) ? null : obj.getObjectGStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true); } /** * Gets the GType of the accessible which is created by the factory. * * Returns: the type of the accessible which is created by the @factory. * The value G_TYPE_INVALID is returned if no type if found. */ public GType getAccessibleType() { return atk_object_factory_get_accessible_type(atkObjectFactory); } /** * Inform @factory that it is no longer being used to create * accessibles. When called, @factory may need to inform * #AtkObjects which it has created that they need to be re-instantiated. * Note: primarily used for runtime replacement of #AtkObjectFactorys * in object registries. */ public void invalidate() { atk_object_factory_invalidate(atkObjectFactory); } } GtkD-3.7.5/generated/gtkd/atk/Plug.d000066400000000000000000000056211324604450400171070ustar00rootroot00000000000000/* * 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 atk.Plug; private import atk.ComponentIF; private import atk.ComponentT; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.atktypes; /** * See #AtkSocket */ public class Plug : ObjectAtk, ComponentIF { /** the main Gtk struct */ protected AtkPlug* atkPlug; /** Get the main Gtk struct */ public AtkPlug* getPlugStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkPlug; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkPlug; } protected override void setStruct(GObject* obj) { atkPlug = cast(AtkPlug*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkPlug* atkPlug, bool ownedRef = false) { this.atkPlug = atkPlug; super(cast(AtkObject*)atkPlug, ownedRef); } // add the Component capabilities mixin ComponentT!(AtkPlug); /** */ public static GType getType() { return atk_plug_get_type(); } /** */ public this() { auto p = atk_plug_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(AtkPlug*) p, true); } /** * Gets the unique ID of an #AtkPlug object, which can be used to * embed inside of an #AtkSocket using atk_socket_embed(). * * Internally, this calls a class function that should be registered * by the IPC layer (usually at-spi2-atk). The implementor of an * #AtkPlug object should call this function (after atk-bridge is * loaded) and pass the value to the process implementing the * #AtkSocket, so it could embed the plug. * * Returns: the unique ID for the plug * * Since: 1.30 */ public string getId() { auto retStr = atk_plug_get_id(atkPlug); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/atk/Range.d000066400000000000000000000074751324604450400172450ustar00rootroot00000000000000/* * 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 atk.Range; private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.atktypes; private import gtkd.Loader; /** * #AtkRange are used on #AtkValue, in order to represent the full * range of a given component (for example an slider or a range * control), or to define each individual subrange this full range is * splitted if available. See #AtkValue documentation for further * details. */ public class Range { /** the main Gtk struct */ protected AtkRange* atkRange; protected bool ownedRef; /** Get the main Gtk struct */ public AtkRange* getRangeStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkRange; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)atkRange; } /** * Sets our main struct and passes it to the parent class. */ public this (AtkRange* atkRange, bool ownedRef = false) { this.atkRange = atkRange; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_ATK) && ownedRef ) atk_range_free(atkRange); } /** */ public static GType getType() { return atk_range_get_type(); } /** * Creates a new #AtkRange. * * Params: * lowerLimit = inferior limit for this range * upperLimit = superior limit for this range * description = human readable description of this range. * * Returns: a new #AtkRange * * Since: 2.12 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(double lowerLimit, double upperLimit, string description) { auto p = atk_range_new(lowerLimit, upperLimit, Str.toStringz(description)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(AtkRange*) p); } /** * Returns a new #AtkRange that is a exact copy of @src * * Returns: a new #AtkRange copy of @src * * Since: 2.12 */ public Range copy() { auto p = atk_range_copy(atkRange); if(p is null) { return null; } return ObjectG.getDObject!(Range)(cast(AtkRange*) p, true); } /** * Free @range * * Since: 2.12 */ public void free() { atk_range_free(atkRange); ownedRef = false; } /** * Returns the human readable description of @range * * Returns: the human-readable description of @range * * Since: 2.12 */ public string getDescription() { return Str.toString(atk_range_get_description(atkRange)); } /** * Returns the lower limit of @range * * Returns: the lower limit of @range * * Since: 2.12 */ public double getLowerLimit() { return atk_range_get_lower_limit(atkRange); } /** * Returns the upper limit of @range * * Returns: the upper limit of @range * * Since: 2.12 */ public double getUpperLimit() { return atk_range_get_upper_limit(atkRange); } } GtkD-3.7.5/generated/gtkd/atk/Rectangle.d000066400000000000000000000054501324604450400201040ustar00rootroot00000000000000/* * 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 atk.Rectangle; private import atk.c.functions; public import atk.c.types; private import glib.c.functions; public import gtkc.atktypes; private import gtkd.Loader; /** * A data structure for holding a rectangle. Those coordinates are * relative to the component top-level parent. */ public final class Rectangle { /** the main Gtk struct */ protected AtkRectangle* atkRectangle; protected bool ownedRef; /** Get the main Gtk struct */ public AtkRectangle* getRectangleStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkRectangle; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)atkRectangle; } /** * Sets our main struct and passes it to the parent class. */ public this (AtkRectangle* atkRectangle, bool ownedRef = false) { this.atkRectangle = atkRectangle; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_ATK) && ownedRef ) g_free(atkRectangle); } /** * X coordinate of the left side of the rectangle. */ public @property int x() { return atkRectangle.x; } /** Ditto */ public @property void x(int value) { atkRectangle.x = value; } /** * Y coordinate of the top side of the rectangle. */ public @property int y() { return atkRectangle.y; } /** Ditto */ public @property void y(int value) { atkRectangle.y = value; } /** * width of the rectangle. */ public @property int width() { return atkRectangle.width; } /** Ditto */ public @property void width(int value) { atkRectangle.width = value; } /** * height of the rectangle. */ public @property int height() { return atkRectangle.height; } /** Ditto */ public @property void height(int value) { atkRectangle.height = value; } /** */ public static GType getType() { return atk_rectangle_get_type(); } } GtkD-3.7.5/generated/gtkd/atk/Registry.d000066400000000000000000000106441324604450400200110ustar00rootroot00000000000000/* * 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 atk.Registry; private import atk.ObjectFactory; private import atk.c.functions; public import atk.c.types; private import gobject.ObjectG; public import gtkc.atktypes; /** * The AtkRegistry is normally used to create appropriate ATK "peers" * for user interface components. Application developers usually need * only interact with the AtkRegistry by associating appropriate ATK * implementation classes with GObject classes via the * atk_registry_set_factory_type call, passing the appropriate GType * for application custom widget classes. */ public class Registry : ObjectG { /** the main Gtk struct */ protected AtkRegistry* atkRegistry; /** Get the main Gtk struct */ public AtkRegistry* getRegistryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkRegistry; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkRegistry; } protected override void setStruct(GObject* obj) { atkRegistry = cast(AtkRegistry*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkRegistry* atkRegistry, bool ownedRef = false) { this.atkRegistry = atkRegistry; super(cast(GObject*)atkRegistry, ownedRef); } /** */ public static GType getType() { return atk_registry_get_type(); } /** * Gets an #AtkObjectFactory appropriate for creating #AtkObjects * appropriate for @type. * * Params: * type = a #GType with which to look up the associated #AtkObjectFactory * * Returns: an #AtkObjectFactory appropriate for creating * #AtkObjects appropriate for @type. */ public ObjectFactory getFactory(GType type) { auto p = atk_registry_get_factory(atkRegistry, type); if(p is null) { return null; } return ObjectG.getDObject!(ObjectFactory)(cast(AtkObjectFactory*) p); } /** * Provides a #GType indicating the #AtkObjectFactory subclass * associated with @type. * * Params: * type = a #GType with which to look up the associated #AtkObjectFactory * subclass * * Returns: a #GType associated with type @type */ public GType getFactoryType(GType type) { return atk_registry_get_factory_type(atkRegistry, type); } /** * Associate an #AtkObjectFactory subclass with a #GType. Note: * The associated @factory_type will thereafter be responsible for * the creation of new #AtkObject implementations for instances * appropriate for @type. * * Params: * type = an #AtkObject type * factoryType = an #AtkObjectFactory type to associate with @type. Must * implement AtkObject appropriate for @type. */ public void setFactoryType(GType type, GType factoryType) { atk_registry_set_factory_type(atkRegistry, type, factoryType); } /** * Gets a default implementation of the #AtkObjectFactory/type * registry. * Note: For most toolkit maintainers, this will be the correct * registry for registering new #AtkObject factories. Following * a call to this function, maintainers may call atk_registry_set_factory_type() * to associate an #AtkObjectFactory subclass with the GType of objects * for whom accessibility information will be provided. * * Returns: a default implementation of the * #AtkObjectFactory/type registry */ public static Registry getDefaultRegistry() { auto p = atk_get_default_registry(); if(p is null) { return null; } return ObjectG.getDObject!(Registry)(cast(AtkRegistry*) p, true); } } GtkD-3.7.5/generated/gtkd/atk/Relation.d000066400000000000000000000124161324604450400177550ustar00rootroot00000000000000/* * 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 atk.Relation; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import glib.PtrArray; private import glib.Str; private import gobject.ObjectG; public import gtkc.atktypes; /** * An AtkRelation describes a relation between an object and one or * more other objects. The actual relations that an object has with * other objects are defined as an AtkRelationSet, which is a set of * AtkRelations. */ public class Relation : ObjectG { /** the main Gtk struct */ protected AtkRelation* atkRelation; /** Get the main Gtk struct */ public AtkRelation* getRelationStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkRelation; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkRelation; } protected override void setStruct(GObject* obj) { atkRelation = cast(AtkRelation*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkRelation* atkRelation, bool ownedRef = false) { this.atkRelation = atkRelation; super(cast(GObject*)atkRelation, ownedRef); } /** */ public static GType getType() { return atk_relation_get_type(); } /** * Create a new relation for the specified key and the specified list * of targets. See also atk_object_add_relationship(). * * Params: * targets = an array of pointers to * #AtkObjects * relationship = an #AtkRelationType with which to create the new * #AtkRelation * * Returns: a pointer to a new #AtkRelation * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectAtk[] targets, AtkRelationType relationship) { AtkObject*[] targetsArray = new AtkObject*[targets.length]; for ( int i = 0; i < targets.length; i++ ) { targetsArray[i] = targets[i].getObjectAtkStruct(); } auto p = atk_relation_new(targetsArray.ptr, cast(int)targets.length, relationship); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(AtkRelation*) p, true); } /** * Adds the specified AtkObject to the target for the relation, if it is * not already present. See also atk_object_add_relationship(). * * Params: * target = an #AtkObject * * Since: 1.9 */ public void addTarget(ObjectAtk target) { atk_relation_add_target(atkRelation, (target is null) ? null : target.getObjectAtkStruct()); } /** * Gets the type of @relation * * Returns: the type of @relation */ public AtkRelationType getRelationType() { return atk_relation_get_relation_type(atkRelation); } /** * Gets the target list of @relation * * Returns: the target list of @relation */ public PtrArray getTarget() { auto p = atk_relation_get_target(atkRelation); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p); } /** * Remove the specified AtkObject from the target for the relation. * * Params: * target = an #AtkObject * * Returns: TRUE if the removal is successful. */ public bool removeTarget(ObjectAtk target) { return atk_relation_remove_target(atkRelation, (target is null) ? null : target.getObjectAtkStruct()) != 0; } /** * Get the #AtkRelationType type corresponding to a relation name. * * Params: * name = a string which is the (non-localized) name of an ATK relation type. * * Returns: the #AtkRelationType enumerated type corresponding to the specified name, * or #ATK_RELATION_NULL if no matching relation type is found. */ public static AtkRelationType typeForName(string name) { return atk_relation_type_for_name(Str.toStringz(name)); } /** * Gets the description string describing the #AtkRelationType @type. * * Params: * type = The #AtkRelationType whose name is required * * Returns: the string describing the AtkRelationType */ public static string typeGetName(AtkRelationType type) { return Str.toString(atk_relation_type_get_name(type)); } /** * Associate @name with a new #AtkRelationType * * Params: * name = a name string * * Returns: an #AtkRelationType associated with @name */ public static AtkRelationType typeRegister(string name) { return atk_relation_type_register(Str.toStringz(name)); } } GtkD-3.7.5/generated/gtkd/atk/RelationSet.d000066400000000000000000000145401324604450400204310ustar00rootroot00000000000000/* * 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 atk.RelationSet; private import atk.ObjectAtk; private import atk.Relation; private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.atktypes; /** * The AtkRelationSet held by an object establishes its relationships * with objects beyond the normal "parent/child" hierarchical * relationships that all user interface objects have. * AtkRelationSets establish whether objects are labelled or * controlled by other components, share group membership with other * components (for instance within a radio-button group), or share * content which "flows" between them, among other types of possible * relationships. */ public class RelationSet : ObjectG { /** the main Gtk struct */ protected AtkRelationSet* atkRelationSet; /** Get the main Gtk struct */ public AtkRelationSet* getRelationSetStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkRelationSet; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkRelationSet; } protected override void setStruct(GObject* obj) { atkRelationSet = cast(AtkRelationSet*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkRelationSet* atkRelationSet, bool ownedRef = false) { this.atkRelationSet = atkRelationSet; super(cast(GObject*)atkRelationSet, ownedRef); } /** */ public static GType getType() { return atk_relation_set_get_type(); } /** * Creates a new empty relation set. * * Returns: a new #AtkRelationSet * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = atk_relation_set_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(AtkRelationSet*) p, true); } /** * Add a new relation to the current relation set if it is not already * present. * This function ref's the AtkRelation so the caller of this function * should unref it to ensure that it will be destroyed when the AtkRelationSet * is destroyed. * * Params: * relation = an #AtkRelation */ public void add(Relation relation) { atk_relation_set_add(atkRelationSet, (relation is null) ? null : relation.getRelationStruct()); } /** * Add a new relation of the specified type with the specified target to * the current relation set if the relation set does not contain a relation * of that type. If it is does contain a relation of that typea the target * is added to the relation. * * Params: * relationship = an #AtkRelationType * target = an #AtkObject * * Since: 1.9 */ public void addRelationByType(AtkRelationType relationship, ObjectAtk target) { atk_relation_set_add_relation_by_type(atkRelationSet, relationship, (target is null) ? null : target.getObjectAtkStruct()); } /** * Determines whether the relation set contains a relation that matches the * specified type. * * Params: * relationship = an #AtkRelationType * * Returns: %TRUE if @relationship is the relationship type of a relation * in @set, %FALSE otherwise */ public bool contains(AtkRelationType relationship) { return atk_relation_set_contains(atkRelationSet, relationship) != 0; } /** * Determines whether the relation set contains a relation that * matches the specified pair formed by type @relationship and object * @target. * * Params: * relationship = an #AtkRelationType * target = an #AtkObject * * Returns: %TRUE if @set contains a relation with the relationship * type @relationship with an object @target, %FALSE otherwise */ public bool containsTarget(AtkRelationType relationship, ObjectAtk target) { return atk_relation_set_contains_target(atkRelationSet, relationship, (target is null) ? null : target.getObjectAtkStruct()) != 0; } /** * Determines the number of relations in a relation set. * * Returns: an integer representing the number of relations in the set. */ public int getNRelations() { return atk_relation_set_get_n_relations(atkRelationSet); } /** * Determines the relation at the specified position in the relation set. * * Params: * i = a gint representing a position in the set, starting from 0. * * Returns: a #AtkRelation, which is the relation at * position i in the set. */ public Relation getRelation(int i) { auto p = atk_relation_set_get_relation(atkRelationSet, i); if(p is null) { return null; } return ObjectG.getDObject!(Relation)(cast(AtkRelation*) p); } /** * Finds a relation that matches the specified type. * * Params: * relationship = an #AtkRelationType * * Returns: an #AtkRelation, which is a relation matching the * specified type. */ public Relation getRelationByType(AtkRelationType relationship) { auto p = atk_relation_set_get_relation_by_type(atkRelationSet, relationship); if(p is null) { return null; } return ObjectG.getDObject!(Relation)(cast(AtkRelation*) p); } /** * Removes a relation from the relation set. * This function unref's the #AtkRelation so it will be deleted unless there * is another reference to it. * * Params: * relation = an #AtkRelation */ public void remove(Relation relation) { atk_relation_set_remove(atkRelationSet, (relation is null) ? null : relation.getRelationStruct()); } } GtkD-3.7.5/generated/gtkd/atk/SelectionIF.d000066400000000000000000000115231324604450400203420ustar00rootroot00000000000000/* * 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 atk.SelectionIF; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; /** * #AtkSelection should be implemented by UI components with children * which are exposed by #atk_object_ref_child and * #atk_object_get_n_children, if the use of the parent UI component * ordinarily involves selection of one or more of the objects * corresponding to those #AtkObject children - for example, * selectable lists. * * Note that other types of "selection" (for instance text selection) * are accomplished a other ATK interfaces - #AtkSelection is limited * to the selection/deselection of children. */ public interface SelectionIF{ /** Get the main Gtk struct */ public AtkSelection* getSelectionStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_selection_get_type(); } /** * Adds the specified accessible child of the object to the * object's selection. * * Params: * i = a #gint specifying the child index. * * Returns: TRUE if success, FALSE otherwise. */ public bool addSelection(int i); /** * Clears the selection in the object so that no children in the object * are selected. * * Returns: TRUE if success, FALSE otherwise. */ public bool clearSelection(); /** * Gets the number of accessible children currently selected. * Note: callers should not rely on %NULL or on a zero value for * indication of whether AtkSelectionIface is implemented, they should * use type checking/interface checking macros or the * atk_get_accessible_value() convenience method. * * Returns: a gint representing the number of items selected, or 0 * if @selection does not implement this interface. */ public int getSelectionCount(); /** * Determines if the current child of this object is selected * Note: callers should not rely on %NULL or on a zero value for * indication of whether AtkSelectionIface is implemented, they should * use type checking/interface checking macros or the * atk_get_accessible_value() convenience method. * * Params: * i = a #gint specifying the child index. * * Returns: a gboolean representing the specified child is selected, or 0 * if @selection does not implement this interface. */ public bool isChildSelected(int i); /** * Gets a reference to the accessible object representing the specified * selected child of the object. * Note: callers should not rely on %NULL or on a zero value for * indication of whether AtkSelectionIface is implemented, they should * use type checking/interface checking macros or the * atk_get_accessible_value() convenience method. * * Params: * i = a #gint specifying the index in the selection set. (e.g. the * ith selection as opposed to the ith child). * * Returns: an #AtkObject representing the * selected accessible, or %NULL if @selection does not implement this * interface. */ public ObjectAtk refSelection(int i); /** * Removes the specified child of the object from the object's selection. * * Params: * i = a #gint specifying the index in the selection set. (e.g. the * ith selection as opposed to the ith child). * * Returns: TRUE if success, FALSE otherwise. */ public bool removeSelection(int i); /** * Causes every child of the object to be selected if the object * supports multiple selections. * * Returns: TRUE if success, FALSE otherwise. */ public bool selectAllSelection(); /** * The "selection-changed" signal is emitted by an object which * implements AtkSelection interface when the selection changes. */ gulong addOnSelectionChanged(void delegate(SelectionIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/atk/SelectionT.d000066400000000000000000000151631324604450400202530ustar00rootroot00000000000000/* * 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 atk.SelectionT; public import atk.ObjectAtk; public import atk.c.functions; public import atk.c.types; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.atktypes; public import std.algorithm; /** * #AtkSelection should be implemented by UI components with children * which are exposed by #atk_object_ref_child and * #atk_object_get_n_children, if the use of the parent UI component * ordinarily involves selection of one or more of the objects * corresponding to those #AtkObject children - for example, * selectable lists. * * Note that other types of "selection" (for instance text selection) * are accomplished a other ATK interfaces - #AtkSelection is limited * to the selection/deselection of children. */ public template SelectionT(TStruct) { /** Get the main Gtk struct */ public AtkSelection* getSelectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkSelection*)getStruct(); } /** * Adds the specified accessible child of the object to the * object's selection. * * Params: * i = a #gint specifying the child index. * * Returns: TRUE if success, FALSE otherwise. */ public bool addSelection(int i) { return atk_selection_add_selection(getSelectionStruct(), i) != 0; } /** * Clears the selection in the object so that no children in the object * are selected. * * Returns: TRUE if success, FALSE otherwise. */ public bool clearSelection() { return atk_selection_clear_selection(getSelectionStruct()) != 0; } /** * Gets the number of accessible children currently selected. * Note: callers should not rely on %NULL or on a zero value for * indication of whether AtkSelectionIface is implemented, they should * use type checking/interface checking macros or the * atk_get_accessible_value() convenience method. * * Returns: a gint representing the number of items selected, or 0 * if @selection does not implement this interface. */ public int getSelectionCount() { return atk_selection_get_selection_count(getSelectionStruct()); } /** * Determines if the current child of this object is selected * Note: callers should not rely on %NULL or on a zero value for * indication of whether AtkSelectionIface is implemented, they should * use type checking/interface checking macros or the * atk_get_accessible_value() convenience method. * * Params: * i = a #gint specifying the child index. * * Returns: a gboolean representing the specified child is selected, or 0 * if @selection does not implement this interface. */ public bool isChildSelected(int i) { return atk_selection_is_child_selected(getSelectionStruct(), i) != 0; } /** * Gets a reference to the accessible object representing the specified * selected child of the object. * Note: callers should not rely on %NULL or on a zero value for * indication of whether AtkSelectionIface is implemented, they should * use type checking/interface checking macros or the * atk_get_accessible_value() convenience method. * * Params: * i = a #gint specifying the index in the selection set. (e.g. the * ith selection as opposed to the ith child). * * Returns: an #AtkObject representing the * selected accessible, or %NULL if @selection does not implement this * interface. */ public ObjectAtk refSelection(int i) { auto p = atk_selection_ref_selection(getSelectionStruct(), i); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true); } /** * Removes the specified child of the object from the object's selection. * * Params: * i = a #gint specifying the index in the selection set. (e.g. the * ith selection as opposed to the ith child). * * Returns: TRUE if success, FALSE otherwise. */ public bool removeSelection(int i) { return atk_selection_remove_selection(getSelectionStruct(), i) != 0; } /** * Causes every child of the object to be selected if the object * supports multiple selections. * * Returns: TRUE if success, FALSE otherwise. */ public bool selectAllSelection() { return atk_selection_select_all_selection(getSelectionStruct()) != 0; } protected class OnSelectionChangedDelegateWrapper { void delegate(SelectionIF) dlg; gulong handlerId; this(void delegate(SelectionIF) dlg) { this.dlg = dlg; onSelectionChangedListeners ~= this; } void remove(OnSelectionChangedDelegateWrapper source) { foreach(index, wrapper; onSelectionChangedListeners) { if (wrapper.handlerId == source.handlerId) { onSelectionChangedListeners[index] = null; onSelectionChangedListeners = std.algorithm.remove(onSelectionChangedListeners, index); break; } } } } OnSelectionChangedDelegateWrapper[] onSelectionChangedListeners; /** * The "selection-changed" signal is emitted by an object which * implements AtkSelection interface when the selection changes. */ gulong addOnSelectionChanged(void delegate(SelectionIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnSelectionChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "selection-changed", cast(GCallback)&callBackSelectionChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackSelectionChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackSelectionChanged(AtkSelection* selectionStruct, OnSelectionChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackSelectionChangedDestroy(OnSelectionChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/atk/Socket.d000066400000000000000000000106511324604450400174270ustar00rootroot00000000000000/* * 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 atk.Socket; private import atk.ComponentIF; private import atk.ComponentT; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.atktypes; /** * Together with #AtkPlug, #AtkSocket provides the ability to embed * accessibles from one process into another in a fashion that is * transparent to assistive technologies. #AtkSocket works as the * container of #AtkPlug, embedding it using the method * atk_socket_embed(). Any accessible contained in the #AtkPlug will * appear to the assistive technologies as being inside the * application that created the #AtkSocket. * * The communication between a #AtkSocket and a #AtkPlug is done by * the IPC layer of the accessibility framework, normally implemented * by the D-Bus based implementation of AT-SPI (at-spi2). If that is * the case, at-spi-atk2 is the responsible to implement the abstract * methods atk_plug_get_id() and atk_socket_embed(), so an ATK * implementor shouldn't reimplement them. The process that contains * the #AtkPlug is responsible to send the ID returned by * atk_plug_id() to the process that contains the #AtkSocket, so it * could call the method atk_socket_embed() in order to embed it. * * For the same reasons, an implementor doesn't need to implement * atk_object_get_n_accessible_children() and * atk_object_ref_accessible_child(). All the logic related to those * functions will be implemented by the IPC layer. */ public class Socket : ObjectAtk, ComponentIF { /** the main Gtk struct */ protected AtkSocket* atkSocket; /** Get the main Gtk struct */ public AtkSocket* getSocketStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkSocket; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkSocket; } protected override void setStruct(GObject* obj) { atkSocket = cast(AtkSocket*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkSocket* atkSocket, bool ownedRef = false) { this.atkSocket = atkSocket; super(cast(AtkObject*)atkSocket, ownedRef); } // add the Component capabilities mixin ComponentT!(AtkSocket); /** */ public static GType getType() { return atk_socket_get_type(); } /** */ public this() { auto p = atk_socket_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(AtkSocket*) p, true); } /** * Embeds the children of an #AtkPlug as the children of the * #AtkSocket. The plug may be in the same process or in a different * process. * * The class item used by this function should be filled in by the IPC * layer (usually at-spi2-atk). The implementor of the AtkSocket * should call this function and pass the id for the plug as returned * by atk_plug_get_id(). It is the responsibility of the application * to pass the plug id on to the process implementing the #AtkSocket * as needed. * * Params: * plugId = the ID of an #AtkPlug * * Since: 1.30 */ public void embed(string plugId) { atk_socket_embed(atkSocket, Str.toStringz(plugId)); } /** * Determines whether or not the socket has an embedded plug. * * Returns: TRUE if a plug is embedded in the socket * * Since: 1.30 */ public bool isOccupied() { return atk_socket_is_occupied(atkSocket) != 0; } } GtkD-3.7.5/generated/gtkd/atk/State.d000066400000000000000000000040101324604450400172470ustar00rootroot00000000000000/* * 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 atk.State; private import atk.c.functions; public import atk.c.types; private import glib.Str; public import gtkc.atktypes; /** */ public struct State { /** * Gets the #AtkStateType corresponding to the description string @name. * * Params: * name = a character string state name * * Returns: an #AtkStateType corresponding to @name */ public static AtkStateType typeForName(string name) { return atk_state_type_for_name(Str.toStringz(name)); } /** * Gets the description string describing the #AtkStateType @type. * * Params: * type = The #AtkStateType whose name is required * * Returns: the string describing the AtkStateType */ public static string typeGetName(AtkStateType type) { return Str.toString(atk_state_type_get_name(type)); } /** * Register a new object state. * * Params: * name = a character string describing the new state. * * Returns: an #AtkState value for the new state. */ public static AtkStateType typeRegister(string name) { return atk_state_type_register(Str.toStringz(name)); } } GtkD-3.7.5/generated/gtkd/atk/StateSet.d000066400000000000000000000155331324604450400177370ustar00rootroot00000000000000/* * 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 atk.StateSet; private import atk.c.functions; public import atk.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.atktypes; /** * An AtkStateSet is a read-only representation of the full set of #AtkStates * that apply to an object at a given time. This set is not meant to be * modified, but rather created when #atk_object_ref_state_set() is called. */ public class StateSet : ObjectG { /** the main Gtk struct */ protected AtkStateSet* atkStateSet; /** Get the main Gtk struct */ public AtkStateSet* getStateSetStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkStateSet; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)atkStateSet; } protected override void setStruct(GObject* obj) { atkStateSet = cast(AtkStateSet*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (AtkStateSet* atkStateSet, bool ownedRef = false) { this.atkStateSet = atkStateSet; super(cast(GObject*)atkStateSet, ownedRef); } /** */ public static GType getType() { return atk_state_set_get_type(); } /** * Creates a new empty state set. * * Returns: a new #AtkStateSet * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = atk_state_set_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(AtkStateSet*) p, true); } /** * Adds the state of the specified type to the state set if it is not already * present. * * Note that because an #AtkStateSet is a read-only object, this method should * be used to add a state to a newly-created set which will then be returned by * #atk_object_ref_state_set. It should not be used to modify the existing state * of an object. See also #atk_object_notify_state_change. * * Params: * type = an #AtkStateType * * Returns: %TRUE if the state for @type is not already in @set. */ public bool addState(AtkStateType type) { return atk_state_set_add_state(atkStateSet, type) != 0; } /** * Adds the states of the specified types to the state set. * * Note that because an #AtkStateSet is a read-only object, this method should * be used to add states to a newly-created set which will then be returned by * #atk_object_ref_state_set. It should not be used to modify the existing state * of an object. See also #atk_object_notify_state_change. * * Params: * types = an array of #AtkStateType */ public void addStates(AtkStateType[] types) { atk_state_set_add_states(atkStateSet, types.ptr, cast(int)types.length); } /** * Constructs the intersection of the two sets, returning %NULL if the * intersection is empty. * * Params: * compareSet = another #AtkStateSet * * Returns: a new #AtkStateSet which is the intersection of * the two sets. */ public StateSet andSets(StateSet compareSet) { auto p = atk_state_set_and_sets(atkStateSet, (compareSet is null) ? null : compareSet.getStateSetStruct()); if(p is null) { return null; } return ObjectG.getDObject!(StateSet)(cast(AtkStateSet*) p, true); } /** * Removes all states from the state set. */ public void clearStates() { atk_state_set_clear_states(atkStateSet); } /** * Checks whether the state for the specified type is in the specified set. * * Params: * type = an #AtkStateType * * Returns: %TRUE if @type is the state type is in @set. */ public bool containsState(AtkStateType type) { return atk_state_set_contains_state(atkStateSet, type) != 0; } /** * Checks whether the states for all the specified types are in the * specified set. * * Params: * types = an array of #AtkStateType * * Returns: %TRUE if all the states for @type are in @set. */ public bool containsStates(AtkStateType[] types) { return atk_state_set_contains_states(atkStateSet, types.ptr, cast(int)types.length) != 0; } /** * Checks whether the state set is empty, i.e. has no states set. * * Returns: %TRUE if @set has no states set, otherwise %FALSE */ public bool isEmpty() { return atk_state_set_is_empty(atkStateSet) != 0; } /** * Constructs the union of the two sets. * * Params: * compareSet = another #AtkStateSet * * Returns: a new #AtkStateSet which is * the union of the two sets, returning %NULL is empty. */ public StateSet orSets(StateSet compareSet) { auto p = atk_state_set_or_sets(atkStateSet, (compareSet is null) ? null : compareSet.getStateSetStruct()); if(p is null) { return null; } return ObjectG.getDObject!(StateSet)(cast(AtkStateSet*) p, true); } /** * Removes the state for the specified type from the state set. * * Note that because an #AtkStateSet is a read-only object, this method should * be used to remove a state to a newly-created set which will then be returned * by #atk_object_ref_state_set. It should not be used to modify the existing * state of an object. See also #atk_object_notify_state_change. * * Params: * type = an #AtkType * * Returns: %TRUE if @type was the state type is in @set. */ public bool removeState(AtkStateType type) { return atk_state_set_remove_state(atkStateSet, type) != 0; } /** * Constructs the exclusive-or of the two sets, returning %NULL is empty. * The set returned by this operation contains the states in exactly * one of the two sets. * * Params: * compareSet = another #AtkStateSet * * Returns: a new #AtkStateSet which contains the states * which are in exactly one of the two sets. */ public StateSet xorSets(StateSet compareSet) { auto p = atk_state_set_xor_sets(atkStateSet, (compareSet is null) ? null : compareSet.getStateSetStruct()); if(p is null) { return null; } return ObjectG.getDObject!(StateSet)(cast(AtkStateSet*) p, true); } } GtkD-3.7.5/generated/gtkd/atk/StreamableContentIF.d000066400000000000000000000076721324604450400220410ustar00rootroot00000000000000/* * 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 atk.StreamableContentIF; private import atk.c.functions; public import atk.c.types; private import glib.IOChannel; private import glib.Str; public import gtkc.atktypes; /** * An interface whereby an object allows its backing content to be * streamed to clients. Typical implementors would be images or * icons, HTML content, or multimedia display/rendering widgets. * * Negotiation of content type is allowed. Clients may examine the * backing data and transform, convert, or parse the content in order * to present it in an alternate form to end-users. * * The AtkStreamableContent interface is particularly useful for * saving, printing, or post-processing entire documents, or for * persisting alternate views of a document. If document content * itself is being serialized, stored, or converted, then use of the * AtkStreamableContent interface can help address performance * issues. Unlike most ATK interfaces, this interface is not strongly * tied to the current user-agent view of the a particular document, * but may in some cases give access to the underlying model data. */ public interface StreamableContentIF{ /** Get the main Gtk struct */ public AtkStreamableContent* getStreamableContentStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_streamable_content_get_type(); } /** * Gets the character string of the specified mime type. The first mime * type is at position 0, the second at position 1, and so on. * * Params: * i = a gint representing the position of the mime type starting from 0 * * Returns: a gchar* representing the specified mime type; the caller * should not free the character string. */ public string getMimeType(int i); /** * Gets the number of mime types supported by this object. * * Returns: a gint which is the number of mime types supported by the object. */ public int getNMimeTypes(); /** * Gets the content in the specified mime type. * * Params: * mimeType = a gchar* representing the mime type * * Returns: A #GIOChannel which contains the content in the * specified mime type. */ public IOChannel getStream(string mimeType); /** * Get a string representing a URI in IETF standard format * (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content * may be streamed in the specified mime-type, if one is available. * If mime_type is NULL, the URI for the default (and possibly only) mime-type is * returned. * * Note that it is possible for get_uri to return NULL but for * get_stream to work nonetheless, since not all GIOChannels connect to URIs. * * Params: * mimeType = a gchar* representing the mime type, or NULL to request a URI * for the default mime type. * * Returns: Returns a string representing a URI, or %NULL * if no corresponding URI can be constructed. * * Since: 1.12 */ public string getUri(string mimeType); } GtkD-3.7.5/generated/gtkd/atk/StreamableContentT.d000066400000000000000000000105671324604450400217430ustar00rootroot00000000000000/* * 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 atk.StreamableContentT; public import atk.c.functions; public import atk.c.types; public import glib.IOChannel; public import glib.Str; public import gtkc.atktypes; /** * An interface whereby an object allows its backing content to be * streamed to clients. Typical implementors would be images or * icons, HTML content, or multimedia display/rendering widgets. * * Negotiation of content type is allowed. Clients may examine the * backing data and transform, convert, or parse the content in order * to present it in an alternate form to end-users. * * The AtkStreamableContent interface is particularly useful for * saving, printing, or post-processing entire documents, or for * persisting alternate views of a document. If document content * itself is being serialized, stored, or converted, then use of the * AtkStreamableContent interface can help address performance * issues. Unlike most ATK interfaces, this interface is not strongly * tied to the current user-agent view of the a particular document, * but may in some cases give access to the underlying model data. */ public template StreamableContentT(TStruct) { /** Get the main Gtk struct */ public AtkStreamableContent* getStreamableContentStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkStreamableContent*)getStruct(); } /** * Gets the character string of the specified mime type. The first mime * type is at position 0, the second at position 1, and so on. * * Params: * i = a gint representing the position of the mime type starting from 0 * * Returns: a gchar* representing the specified mime type; the caller * should not free the character string. */ public string getMimeType(int i) { return Str.toString(atk_streamable_content_get_mime_type(getStreamableContentStruct(), i)); } /** * Gets the number of mime types supported by this object. * * Returns: a gint which is the number of mime types supported by the object. */ public int getNMimeTypes() { return atk_streamable_content_get_n_mime_types(getStreamableContentStruct()); } /** * Gets the content in the specified mime type. * * Params: * mimeType = a gchar* representing the mime type * * Returns: A #GIOChannel which contains the content in the * specified mime type. */ public IOChannel getStream(string mimeType) { auto p = atk_streamable_content_get_stream(getStreamableContentStruct(), Str.toStringz(mimeType)); if(p is null) { return null; } return new IOChannel(cast(GIOChannel*) p, true); } /** * Get a string representing a URI in IETF standard format * (see http://www.ietf.org/rfc/rfc2396.txt) from which the object's content * may be streamed in the specified mime-type, if one is available. * If mime_type is NULL, the URI for the default (and possibly only) mime-type is * returned. * * Note that it is possible for get_uri to return NULL but for * get_stream to work nonetheless, since not all GIOChannels connect to URIs. * * Params: * mimeType = a gchar* representing the mime type, or NULL to request a URI * for the default mime type. * * Returns: Returns a string representing a URI, or %NULL * if no corresponding URI can be constructed. * * Since: 1.12 */ public string getUri(string mimeType) { return Str.toString(atk_streamable_content_get_uri(getStreamableContentStruct(), Str.toStringz(mimeType))); } } GtkD-3.7.5/generated/gtkd/atk/TableCellIF.d000066400000000000000000000073271324604450400202530ustar00rootroot00000000000000/* * 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 atk.TableCellIF; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.PtrArray; private import gobject.ObjectG; public import gtkc.atktypes; /** * Being #AtkTable a component which present elements ordered via rows * and columns, an #AtkTableCell is the interface which each of those * elements, so "cells" should implement. * * See also #AtkTable. */ public interface TableCellIF{ /** Get the main Gtk struct */ public AtkTableCell* getTableCellStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_table_cell_get_type(); } /** * Returns the column headers as an array of cell accessibles. * * Returns: a GPtrArray of AtkObjects * representing the column header cells. * * Since: 2.12 */ public PtrArray getColumnHeaderCells(); /** * Returns the number of columns occupied by this cell accessible. * * Returns: a gint representing the number of columns occupied by this cell, * or 0 if the cell does not implement this method. * * Since: 2.12 */ public int getColumnSpan(); /** * Retrieves the tabular position of this cell. * * Params: * row = the row of the given cell. * column = the column of the given cell. * * Returns: TRUE if successful; FALSE otherwise. * * Since: 2.12 */ public bool getPosition(out int row, out int column); /** * Gets the row and column indexes and span of this cell accessible. * * Note: If the object does not implement this function, then, by default, atk * will implement this function by calling get_row_span and get_column_span * on the object. * * Params: * row = the row index of the given cell. * column = the column index of the given cell. * rowSpan = the number of rows occupied by this cell. * columnSpan = the number of columns occupied by this cell. * * Returns: TRUE if successful; FALSE otherwise. * * Since: 2.12 */ public bool getRowColumnSpan(out int row, out int column, out int rowSpan, out int columnSpan); /** * Returns the row headers as an array of cell accessibles. * * Returns: a GPtrArray of AtkObjects * representing the row header cells. * * Since: 2.12 */ public PtrArray getRowHeaderCells(); /** * Returns the number of rows occupied by this cell accessible. * * Returns: a gint representing the number of rows occupied by this cell, * or 0 if the cell does not implement this method. * * Since: 2.12 */ public int getRowSpan(); /** * Returns a reference to the accessible of the containing table. * * Returns: the atk object for the containing table. * * Since: 2.12 */ public ObjectAtk getTable(); } GtkD-3.7.5/generated/gtkd/atk/TableCellT.d000066400000000000000000000107531324604450400201550ustar00rootroot00000000000000/* * 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 atk.TableCellT; public import atk.ObjectAtk; public import atk.c.functions; public import atk.c.types; public import glib.PtrArray; public import gobject.ObjectG; public import gtkc.atktypes; /** * Being #AtkTable a component which present elements ordered via rows * and columns, an #AtkTableCell is the interface which each of those * elements, so "cells" should implement. * * See also #AtkTable. */ public template TableCellT(TStruct) { /** Get the main Gtk struct */ public AtkTableCell* getTableCellStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkTableCell*)getStruct(); } /** * Returns the column headers as an array of cell accessibles. * * Returns: a GPtrArray of AtkObjects * representing the column header cells. * * Since: 2.12 */ public PtrArray getColumnHeaderCells() { auto p = atk_table_cell_get_column_header_cells(getTableCellStruct()); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p, true); } /** * Returns the number of columns occupied by this cell accessible. * * Returns: a gint representing the number of columns occupied by this cell, * or 0 if the cell does not implement this method. * * Since: 2.12 */ public int getColumnSpan() { return atk_table_cell_get_column_span(getTableCellStruct()); } /** * Retrieves the tabular position of this cell. * * Params: * row = the row of the given cell. * column = the column of the given cell. * * Returns: TRUE if successful; FALSE otherwise. * * Since: 2.12 */ public bool getPosition(out int row, out int column) { return atk_table_cell_get_position(getTableCellStruct(), &row, &column) != 0; } /** * Gets the row and column indexes and span of this cell accessible. * * Note: If the object does not implement this function, then, by default, atk * will implement this function by calling get_row_span and get_column_span * on the object. * * Params: * row = the row index of the given cell. * column = the column index of the given cell. * rowSpan = the number of rows occupied by this cell. * columnSpan = the number of columns occupied by this cell. * * Returns: TRUE if successful; FALSE otherwise. * * Since: 2.12 */ public bool getRowColumnSpan(out int row, out int column, out int rowSpan, out int columnSpan) { return atk_table_cell_get_row_column_span(getTableCellStruct(), &row, &column, &rowSpan, &columnSpan) != 0; } /** * Returns the row headers as an array of cell accessibles. * * Returns: a GPtrArray of AtkObjects * representing the row header cells. * * Since: 2.12 */ public PtrArray getRowHeaderCells() { auto p = atk_table_cell_get_row_header_cells(getTableCellStruct()); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p, true); } /** * Returns the number of rows occupied by this cell accessible. * * Returns: a gint representing the number of rows occupied by this cell, * or 0 if the cell does not implement this method. * * Since: 2.12 */ public int getRowSpan() { return atk_table_cell_get_row_span(getTableCellStruct()); } /** * Returns a reference to the accessible of the containing table. * * Returns: the atk object for the containing table. * * Since: 2.12 */ public ObjectAtk getTable() { auto p = atk_table_cell_get_table(getTableCellStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true); } } GtkD-3.7.5/generated/gtkd/atk/TableIF.d000066400000000000000000000344631324604450400174540ustar00rootroot00000000000000/* * 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 atk.TableIF; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; /** * #AtkTable should be implemented by components which present * elements ordered via rows and columns. It may also be used to * present tree-structured information if the nodes of the trees can * be said to contain multiple "columns". Individual elements of an * #AtkTable are typically referred to as "cells". Those cells should * implement the interface #AtkTableCell, but #Atk doesn't require * them to be direct children of the current #AtkTable. They can be * grand-children, grand-grand-children etc. #AtkTable provides the * API needed to get a individual cell based on the row and column * numbers. * * Children of #AtkTable are frequently "lightweight" objects, that * is, they may not have backing widgets in the host UI toolkit. They * are therefore often transient. * * Since tables are often very complex, #AtkTable includes provision * for offering simplified summary information, as well as row and * column headers and captions. Headers and captions are #AtkObjects * which may implement other interfaces (#AtkText, #AtkImage, etc.) as * appropriate. #AtkTable summaries may themselves be (simplified) * #AtkTables, etc. * * Note for implementors: in the past, #AtkTable required that all the * cells should be direct children of #AtkTable, and provided some * index based methods to request the cells. The practice showed that * that forcing made #AtkTable implementation complex, and hard to * expose other kind of children, like rows or captions. Right now, * index-based methods are deprecated. */ public interface TableIF{ /** Get the main Gtk struct */ public AtkTable* getTableStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_table_get_type(); } /** * Adds the specified @column to the selection. * * Params: * column = a #gint representing a column in @table * * Returns: a gboolean representing if the column was successfully added to * the selection, or 0 if value does not implement this interface. */ public bool addColumnSelection(int column); /** * Adds the specified @row to the selection. * * Params: * row = a #gint representing a row in @table * * Returns: a gboolean representing if row was successfully added to selection, * or 0 if value does not implement this interface. */ public bool addRowSelection(int row); /** * Gets the caption for the @table. * * Returns: a AtkObject* representing the * table caption, or %NULL if value does not implement this interface. */ public ObjectAtk getCaption(); /** * Gets a #gint representing the column at the specified @index_. * * Deprecated: Since 2.12. * * Params: * index = a #gint representing an index in @table * * Returns: a gint representing the column at the specified index, * or -1 if the table does not implement this method. */ public int getColumnAtIndex(int index); /** * Gets the description text of the specified @column in the table * * Params: * column = a #gint representing a column in @table * * Returns: a gchar* representing the column description, or %NULL * if value does not implement this interface. */ public string getColumnDescription(int column); /** * Gets the number of columns occupied by the accessible object * at the specified @row and @column in the @table. * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: a gint representing the column extent at specified position, or 0 * if value does not implement this interface. */ public int getColumnExtentAt(int row, int column); /** * Gets the column header of a specified column in an accessible table. * * Params: * column = a #gint representing a column in the table * * Returns: a AtkObject* representing the * specified column header, or %NULL if value does not implement this * interface. */ public ObjectAtk getColumnHeader(int column); /** * Gets a #gint representing the index at the specified @row and * @column. * * Deprecated: Since 2.12. Use atk_table_ref_at() in order to get the * accessible that represents the cell at (@row, @column) * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: a #gint representing the index at specified position. * The value -1 is returned if the object at row,column is not a child * of table or table does not implement this interface. */ public int getIndexAt(int row, int column); /** * Gets the number of columns in the table. * * Returns: a gint representing the number of columns, or 0 * if value does not implement this interface. */ public int getNColumns(); /** * Gets the number of rows in the table. * * Returns: a gint representing the number of rows, or 0 * if value does not implement this interface. */ public int getNRows(); /** * Gets a #gint representing the row at the specified @index_. * * Deprecated: since 2.12. * * Params: * index = a #gint representing an index in @table * * Returns: a gint representing the row at the specified index, * or -1 if the table does not implement this method. */ public int getRowAtIndex(int index); /** * Gets the description text of the specified row in the table * * Params: * row = a #gint representing a row in @table * * Returns: a gchar* representing the row description, or * %NULL if value does not implement this interface. */ public string getRowDescription(int row); /** * Gets the number of rows occupied by the accessible object * at a specified @row and @column in the @table. * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: a gint representing the row extent at specified position, or 0 * if value does not implement this interface. */ public int getRowExtentAt(int row, int column); /** * Gets the row header of a specified row in an accessible table. * * Params: * row = a #gint representing a row in the table * * Returns: a AtkObject* representing the * specified row header, or %NULL if value does not implement this * interface. */ public ObjectAtk getRowHeader(int row); /** * Gets the selected columns of the table by initializing **selected with * the selected column numbers. This array should be freed by the caller. * * Params: * selected = a #gint** that is to contain the selected columns numbers * * Returns: a gint representing the number of selected columns, * or %0 if value does not implement this interface. */ public int getSelectedColumns(int** selected); /** * Gets the selected rows of the table by initializing **selected with * the selected row numbers. This array should be freed by the caller. * * Params: * selected = a #gint** that is to contain the selected row numbers * * Returns: a gint representing the number of selected rows, * or zero if value does not implement this interface. */ public int getSelectedRows(int** selected); /** * Gets the summary description of the table. * * Returns: a AtkObject* representing a summary description * of the table, or zero if value does not implement this interface. */ public ObjectAtk getSummary(); /** * Gets a boolean value indicating whether the specified @column * is selected * * Params: * column = a #gint representing a column in @table * * Returns: a gboolean representing if the column is selected, or 0 * if value does not implement this interface. */ public bool isColumnSelected(int column); /** * Gets a boolean value indicating whether the specified @row * is selected * * Params: * row = a #gint representing a row in @table * * Returns: a gboolean representing if the row is selected, or 0 * if value does not implement this interface. */ public bool isRowSelected(int row); /** * Gets a boolean value indicating whether the accessible object * at the specified @row and @column is selected * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: a gboolean representing if the cell is selected, or 0 * if value does not implement this interface. */ public bool isSelected(int row, int column); /** * Get a reference to the table cell at @row, @column. This cell * should implement the interface #AtkTableCell * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: an #AtkObject representing the referred * to accessible */ public ObjectAtk refAt(int row, int column); /** * Adds the specified @column to the selection. * * Params: * column = a #gint representing a column in @table * * Returns: a gboolean representing if the column was successfully removed from * the selection, or 0 if value does not implement this interface. */ public bool removeColumnSelection(int column); /** * Removes the specified @row from the selection. * * Params: * row = a #gint representing a row in @table * * Returns: a gboolean representing if the row was successfully removed from * the selection, or 0 if value does not implement this interface. */ public bool removeRowSelection(int row); /** * Sets the caption for the table. * * Params: * caption = a #AtkObject representing the caption to set for @table */ public void setCaption(ObjectAtk caption); /** * Sets the description text for the specified @column of the @table. * * Params: * column = a #gint representing a column in @table * description = a #gchar representing the description text * to set for the specified @column of the @table */ public void setColumnDescription(int column, string description); /** * Sets the specified column header to @header. * * Params: * column = a #gint representing a column in @table * header = an #AtkTable */ public void setColumnHeader(int column, ObjectAtk header); /** * Sets the description text for the specified @row of @table. * * Params: * row = a #gint representing a row in @table * description = a #gchar representing the description text * to set for the specified @row of @table */ public void setRowDescription(int row, string description); /** * Sets the specified row header to @header. * * Params: * row = a #gint representing a row in @table * header = an #AtkTable */ public void setRowHeader(int row, ObjectAtk header); /** * Sets the summary description of the table. * * Params: * accessible = an #AtkObject representing the summary description * to set for @table */ public void setSummary(ObjectAtk accessible); /** * The "column-deleted" signal is emitted by an object which * implements the AtkTable interface when a column is deleted. * * Params: * arg1 = The index of the first column deleted. * arg2 = The number of columns deleted. */ gulong addOnColumnDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "column-inserted" signal is emitted by an object which * implements the AtkTable interface when a column is inserted. * * Params: * arg1 = The index of the column inserted. * arg2 = The number of colums inserted. */ gulong addOnColumnInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "column-reordered" signal is emitted by an object which * implements the AtkTable interface when the columns are * reordered. */ gulong addOnColumnReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "model-changed" signal is emitted by an object which * implements the AtkTable interface when the model displayed by * the table changes. */ gulong addOnModelChanged(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "row-deleted" signal is emitted by an object which * implements the AtkTable interface when a row is deleted. * * Params: * arg1 = The index of the first row deleted. * arg2 = The number of rows deleted. */ gulong addOnRowDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "row-inserted" signal is emitted by an object which * implements the AtkTable interface when a row is inserted. * * Params: * arg1 = The index of the first row inserted. * arg2 = The number of rows inserted. */ gulong addOnRowInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "row-reordered" signal is emitted by an object which * implements the AtkTable interface when the rows are * reordered. */ gulong addOnRowReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/atk/TableT.d000066400000000000000000000622771324604450400173650ustar00rootroot00000000000000/* * 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 atk.TableT; public import atk.ObjectAtk; public import atk.c.functions; public import atk.c.types; public import glib.Str; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.atktypes; public import std.algorithm; /** * #AtkTable should be implemented by components which present * elements ordered via rows and columns. It may also be used to * present tree-structured information if the nodes of the trees can * be said to contain multiple "columns". Individual elements of an * #AtkTable are typically referred to as "cells". Those cells should * implement the interface #AtkTableCell, but #Atk doesn't require * them to be direct children of the current #AtkTable. They can be * grand-children, grand-grand-children etc. #AtkTable provides the * API needed to get a individual cell based on the row and column * numbers. * * Children of #AtkTable are frequently "lightweight" objects, that * is, they may not have backing widgets in the host UI toolkit. They * are therefore often transient. * * Since tables are often very complex, #AtkTable includes provision * for offering simplified summary information, as well as row and * column headers and captions. Headers and captions are #AtkObjects * which may implement other interfaces (#AtkText, #AtkImage, etc.) as * appropriate. #AtkTable summaries may themselves be (simplified) * #AtkTables, etc. * * Note for implementors: in the past, #AtkTable required that all the * cells should be direct children of #AtkTable, and provided some * index based methods to request the cells. The practice showed that * that forcing made #AtkTable implementation complex, and hard to * expose other kind of children, like rows or captions. Right now, * index-based methods are deprecated. */ public template TableT(TStruct) { /** Get the main Gtk struct */ public AtkTable* getTableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkTable*)getStruct(); } /** * Adds the specified @column to the selection. * * Params: * column = a #gint representing a column in @table * * Returns: a gboolean representing if the column was successfully added to * the selection, or 0 if value does not implement this interface. */ public bool addColumnSelection(int column) { return atk_table_add_column_selection(getTableStruct(), column) != 0; } /** * Adds the specified @row to the selection. * * Params: * row = a #gint representing a row in @table * * Returns: a gboolean representing if row was successfully added to selection, * or 0 if value does not implement this interface. */ public bool addRowSelection(int row) { return atk_table_add_row_selection(getTableStruct(), row) != 0; } /** * Gets the caption for the @table. * * Returns: a AtkObject* representing the * table caption, or %NULL if value does not implement this interface. */ public ObjectAtk getCaption() { auto p = atk_table_get_caption(getTableStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); } /** * Gets a #gint representing the column at the specified @index_. * * Deprecated: Since 2.12. * * Params: * index = a #gint representing an index in @table * * Returns: a gint representing the column at the specified index, * or -1 if the table does not implement this method. */ public int getColumnAtIndex(int index) { return atk_table_get_column_at_index(getTableStruct(), index); } /** * Gets the description text of the specified @column in the table * * Params: * column = a #gint representing a column in @table * * Returns: a gchar* representing the column description, or %NULL * if value does not implement this interface. */ public string getColumnDescription(int column) { return Str.toString(atk_table_get_column_description(getTableStruct(), column)); } /** * Gets the number of columns occupied by the accessible object * at the specified @row and @column in the @table. * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: a gint representing the column extent at specified position, or 0 * if value does not implement this interface. */ public int getColumnExtentAt(int row, int column) { return atk_table_get_column_extent_at(getTableStruct(), row, column); } /** * Gets the column header of a specified column in an accessible table. * * Params: * column = a #gint representing a column in the table * * Returns: a AtkObject* representing the * specified column header, or %NULL if value does not implement this * interface. */ public ObjectAtk getColumnHeader(int column) { auto p = atk_table_get_column_header(getTableStruct(), column); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); } /** * Gets a #gint representing the index at the specified @row and * @column. * * Deprecated: Since 2.12. Use atk_table_ref_at() in order to get the * accessible that represents the cell at (@row, @column) * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: a #gint representing the index at specified position. * The value -1 is returned if the object at row,column is not a child * of table or table does not implement this interface. */ public int getIndexAt(int row, int column) { return atk_table_get_index_at(getTableStruct(), row, column); } /** * Gets the number of columns in the table. * * Returns: a gint representing the number of columns, or 0 * if value does not implement this interface. */ public int getNColumns() { return atk_table_get_n_columns(getTableStruct()); } /** * Gets the number of rows in the table. * * Returns: a gint representing the number of rows, or 0 * if value does not implement this interface. */ public int getNRows() { return atk_table_get_n_rows(getTableStruct()); } /** * Gets a #gint representing the row at the specified @index_. * * Deprecated: since 2.12. * * Params: * index = a #gint representing an index in @table * * Returns: a gint representing the row at the specified index, * or -1 if the table does not implement this method. */ public int getRowAtIndex(int index) { return atk_table_get_row_at_index(getTableStruct(), index); } /** * Gets the description text of the specified row in the table * * Params: * row = a #gint representing a row in @table * * Returns: a gchar* representing the row description, or * %NULL if value does not implement this interface. */ public string getRowDescription(int row) { return Str.toString(atk_table_get_row_description(getTableStruct(), row)); } /** * Gets the number of rows occupied by the accessible object * at a specified @row and @column in the @table. * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: a gint representing the row extent at specified position, or 0 * if value does not implement this interface. */ public int getRowExtentAt(int row, int column) { return atk_table_get_row_extent_at(getTableStruct(), row, column); } /** * Gets the row header of a specified row in an accessible table. * * Params: * row = a #gint representing a row in the table * * Returns: a AtkObject* representing the * specified row header, or %NULL if value does not implement this * interface. */ public ObjectAtk getRowHeader(int row) { auto p = atk_table_get_row_header(getTableStruct(), row); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); } /** * Gets the selected columns of the table by initializing **selected with * the selected column numbers. This array should be freed by the caller. * * Params: * selected = a #gint** that is to contain the selected columns numbers * * Returns: a gint representing the number of selected columns, * or %0 if value does not implement this interface. */ public int getSelectedColumns(int** selected) { return atk_table_get_selected_columns(getTableStruct(), selected); } /** * Gets the selected rows of the table by initializing **selected with * the selected row numbers. This array should be freed by the caller. * * Params: * selected = a #gint** that is to contain the selected row numbers * * Returns: a gint representing the number of selected rows, * or zero if value does not implement this interface. */ public int getSelectedRows(int** selected) { return atk_table_get_selected_rows(getTableStruct(), selected); } /** * Gets the summary description of the table. * * Returns: a AtkObject* representing a summary description * of the table, or zero if value does not implement this interface. */ public ObjectAtk getSummary() { auto p = atk_table_get_summary(getTableStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true); } /** * Gets a boolean value indicating whether the specified @column * is selected * * Params: * column = a #gint representing a column in @table * * Returns: a gboolean representing if the column is selected, or 0 * if value does not implement this interface. */ public bool isColumnSelected(int column) { return atk_table_is_column_selected(getTableStruct(), column) != 0; } /** * Gets a boolean value indicating whether the specified @row * is selected * * Params: * row = a #gint representing a row in @table * * Returns: a gboolean representing if the row is selected, or 0 * if value does not implement this interface. */ public bool isRowSelected(int row) { return atk_table_is_row_selected(getTableStruct(), row) != 0; } /** * Gets a boolean value indicating whether the accessible object * at the specified @row and @column is selected * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: a gboolean representing if the cell is selected, or 0 * if value does not implement this interface. */ public bool isSelected(int row, int column) { return atk_table_is_selected(getTableStruct(), row, column) != 0; } /** * Get a reference to the table cell at @row, @column. This cell * should implement the interface #AtkTableCell * * Params: * row = a #gint representing a row in @table * column = a #gint representing a column in @table * * Returns: an #AtkObject representing the referred * to accessible */ public ObjectAtk refAt(int row, int column) { auto p = atk_table_ref_at(getTableStruct(), row, column); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p, true); } /** * Adds the specified @column to the selection. * * Params: * column = a #gint representing a column in @table * * Returns: a gboolean representing if the column was successfully removed from * the selection, or 0 if value does not implement this interface. */ public bool removeColumnSelection(int column) { return atk_table_remove_column_selection(getTableStruct(), column) != 0; } /** * Removes the specified @row from the selection. * * Params: * row = a #gint representing a row in @table * * Returns: a gboolean representing if the row was successfully removed from * the selection, or 0 if value does not implement this interface. */ public bool removeRowSelection(int row) { return atk_table_remove_row_selection(getTableStruct(), row) != 0; } /** * Sets the caption for the table. * * Params: * caption = a #AtkObject representing the caption to set for @table */ public void setCaption(ObjectAtk caption) { atk_table_set_caption(getTableStruct(), (caption is null) ? null : caption.getObjectAtkStruct()); } /** * Sets the description text for the specified @column of the @table. * * Params: * column = a #gint representing a column in @table * description = a #gchar representing the description text * to set for the specified @column of the @table */ public void setColumnDescription(int column, string description) { atk_table_set_column_description(getTableStruct(), column, Str.toStringz(description)); } /** * Sets the specified column header to @header. * * Params: * column = a #gint representing a column in @table * header = an #AtkTable */ public void setColumnHeader(int column, ObjectAtk header) { atk_table_set_column_header(getTableStruct(), column, (header is null) ? null : header.getObjectAtkStruct()); } /** * Sets the description text for the specified @row of @table. * * Params: * row = a #gint representing a row in @table * description = a #gchar representing the description text * to set for the specified @row of @table */ public void setRowDescription(int row, string description) { atk_table_set_row_description(getTableStruct(), row, Str.toStringz(description)); } /** * Sets the specified row header to @header. * * Params: * row = a #gint representing a row in @table * header = an #AtkTable */ public void setRowHeader(int row, ObjectAtk header) { atk_table_set_row_header(getTableStruct(), row, (header is null) ? null : header.getObjectAtkStruct()); } /** * Sets the summary description of the table. * * Params: * accessible = an #AtkObject representing the summary description * to set for @table */ public void setSummary(ObjectAtk accessible) { atk_table_set_summary(getTableStruct(), (accessible is null) ? null : accessible.getObjectAtkStruct()); } protected class OnColumnDeletedDelegateWrapper { void delegate(int, int, TableIF) dlg; gulong handlerId; this(void delegate(int, int, TableIF) dlg) { this.dlg = dlg; onColumnDeletedListeners ~= this; } void remove(OnColumnDeletedDelegateWrapper source) { foreach(index, wrapper; onColumnDeletedListeners) { if (wrapper.handlerId == source.handlerId) { onColumnDeletedListeners[index] = null; onColumnDeletedListeners = std.algorithm.remove(onColumnDeletedListeners, index); break; } } } } OnColumnDeletedDelegateWrapper[] onColumnDeletedListeners; /** * The "column-deleted" signal is emitted by an object which * implements the AtkTable interface when a column is deleted. * * Params: * arg1 = The index of the first column deleted. * arg2 = The number of columns deleted. */ gulong addOnColumnDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnColumnDeletedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "column-deleted", cast(GCallback)&callBackColumnDeleted, cast(void*)wrapper, cast(GClosureNotify)&callBackColumnDeletedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackColumnDeleted(AtkTable* tableStruct, int arg1, int arg2, OnColumnDeletedDelegateWrapper wrapper) { wrapper.dlg(arg1, arg2, wrapper.outer); } extern(C) static void callBackColumnDeletedDestroy(OnColumnDeletedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnColumnInsertedDelegateWrapper { void delegate(int, int, TableIF) dlg; gulong handlerId; this(void delegate(int, int, TableIF) dlg) { this.dlg = dlg; onColumnInsertedListeners ~= this; } void remove(OnColumnInsertedDelegateWrapper source) { foreach(index, wrapper; onColumnInsertedListeners) { if (wrapper.handlerId == source.handlerId) { onColumnInsertedListeners[index] = null; onColumnInsertedListeners = std.algorithm.remove(onColumnInsertedListeners, index); break; } } } } OnColumnInsertedDelegateWrapper[] onColumnInsertedListeners; /** * The "column-inserted" signal is emitted by an object which * implements the AtkTable interface when a column is inserted. * * Params: * arg1 = The index of the column inserted. * arg2 = The number of colums inserted. */ gulong addOnColumnInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnColumnInsertedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "column-inserted", cast(GCallback)&callBackColumnInserted, cast(void*)wrapper, cast(GClosureNotify)&callBackColumnInsertedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackColumnInserted(AtkTable* tableStruct, int arg1, int arg2, OnColumnInsertedDelegateWrapper wrapper) { wrapper.dlg(arg1, arg2, wrapper.outer); } extern(C) static void callBackColumnInsertedDestroy(OnColumnInsertedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnColumnReorderedDelegateWrapper { void delegate(TableIF) dlg; gulong handlerId; this(void delegate(TableIF) dlg) { this.dlg = dlg; onColumnReorderedListeners ~= this; } void remove(OnColumnReorderedDelegateWrapper source) { foreach(index, wrapper; onColumnReorderedListeners) { if (wrapper.handlerId == source.handlerId) { onColumnReorderedListeners[index] = null; onColumnReorderedListeners = std.algorithm.remove(onColumnReorderedListeners, index); break; } } } } OnColumnReorderedDelegateWrapper[] onColumnReorderedListeners; /** * The "column-reordered" signal is emitted by an object which * implements the AtkTable interface when the columns are * reordered. */ gulong addOnColumnReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnColumnReorderedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "column-reordered", cast(GCallback)&callBackColumnReordered, cast(void*)wrapper, cast(GClosureNotify)&callBackColumnReorderedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackColumnReordered(AtkTable* tableStruct, OnColumnReorderedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackColumnReorderedDestroy(OnColumnReorderedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnModelChangedDelegateWrapper { void delegate(TableIF) dlg; gulong handlerId; this(void delegate(TableIF) dlg) { this.dlg = dlg; onModelChangedListeners ~= this; } void remove(OnModelChangedDelegateWrapper source) { foreach(index, wrapper; onModelChangedListeners) { if (wrapper.handlerId == source.handlerId) { onModelChangedListeners[index] = null; onModelChangedListeners = std.algorithm.remove(onModelChangedListeners, index); break; } } } } OnModelChangedDelegateWrapper[] onModelChangedListeners; /** * The "model-changed" signal is emitted by an object which * implements the AtkTable interface when the model displayed by * the table changes. */ gulong addOnModelChanged(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnModelChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "model-changed", cast(GCallback)&callBackModelChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackModelChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackModelChanged(AtkTable* tableStruct, OnModelChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackModelChangedDestroy(OnModelChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnRowDeletedDelegateWrapper { void delegate(int, int, TableIF) dlg; gulong handlerId; this(void delegate(int, int, TableIF) dlg) { this.dlg = dlg; onRowDeletedListeners ~= this; } void remove(OnRowDeletedDelegateWrapper source) { foreach(index, wrapper; onRowDeletedListeners) { if (wrapper.handlerId == source.handlerId) { onRowDeletedListeners[index] = null; onRowDeletedListeners = std.algorithm.remove(onRowDeletedListeners, index); break; } } } } OnRowDeletedDelegateWrapper[] onRowDeletedListeners; /** * The "row-deleted" signal is emitted by an object which * implements the AtkTable interface when a row is deleted. * * Params: * arg1 = The index of the first row deleted. * arg2 = The number of rows deleted. */ gulong addOnRowDeleted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnRowDeletedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "row-deleted", cast(GCallback)&callBackRowDeleted, cast(void*)wrapper, cast(GClosureNotify)&callBackRowDeletedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackRowDeleted(AtkTable* tableStruct, int arg1, int arg2, OnRowDeletedDelegateWrapper wrapper) { wrapper.dlg(arg1, arg2, wrapper.outer); } extern(C) static void callBackRowDeletedDestroy(OnRowDeletedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnRowInsertedDelegateWrapper { void delegate(int, int, TableIF) dlg; gulong handlerId; this(void delegate(int, int, TableIF) dlg) { this.dlg = dlg; onRowInsertedListeners ~= this; } void remove(OnRowInsertedDelegateWrapper source) { foreach(index, wrapper; onRowInsertedListeners) { if (wrapper.handlerId == source.handlerId) { onRowInsertedListeners[index] = null; onRowInsertedListeners = std.algorithm.remove(onRowInsertedListeners, index); break; } } } } OnRowInsertedDelegateWrapper[] onRowInsertedListeners; /** * The "row-inserted" signal is emitted by an object which * implements the AtkTable interface when a row is inserted. * * Params: * arg1 = The index of the first row inserted. * arg2 = The number of rows inserted. */ gulong addOnRowInserted(void delegate(int, int, TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnRowInsertedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "row-inserted", cast(GCallback)&callBackRowInserted, cast(void*)wrapper, cast(GClosureNotify)&callBackRowInsertedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackRowInserted(AtkTable* tableStruct, int arg1, int arg2, OnRowInsertedDelegateWrapper wrapper) { wrapper.dlg(arg1, arg2, wrapper.outer); } extern(C) static void callBackRowInsertedDestroy(OnRowInsertedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnRowReorderedDelegateWrapper { void delegate(TableIF) dlg; gulong handlerId; this(void delegate(TableIF) dlg) { this.dlg = dlg; onRowReorderedListeners ~= this; } void remove(OnRowReorderedDelegateWrapper source) { foreach(index, wrapper; onRowReorderedListeners) { if (wrapper.handlerId == source.handlerId) { onRowReorderedListeners[index] = null; onRowReorderedListeners = std.algorithm.remove(onRowReorderedListeners, index); break; } } } } OnRowReorderedDelegateWrapper[] onRowReorderedListeners; /** * The "row-reordered" signal is emitted by an object which * implements the AtkTable interface when the rows are * reordered. */ gulong addOnRowReordered(void delegate(TableIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnRowReorderedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "row-reordered", cast(GCallback)&callBackRowReordered, cast(void*)wrapper, cast(GClosureNotify)&callBackRowReorderedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackRowReordered(AtkTable* tableStruct, OnRowReorderedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackRowReorderedDestroy(OnRowReorderedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/atk/TextIF.d000066400000000000000000000501641324604450400173450ustar00rootroot00000000000000/* * 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 atk.TextIF; private import atk.TextRange; private import atk.c.functions; public import atk.c.types; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; /** * #AtkText should be implemented by #AtkObjects on behalf of widgets * that have text content which is either attributed or otherwise * non-trivial. #AtkObjects whose text content is simple, * unattributed, and very brief may expose that content via * #atk_object_get_name instead; however if the text is editable, * multi-line, typically longer than three or four words, attributed, * selectable, or if the object already uses the 'name' ATK property * for other information, the #AtkText interface should be used to * expose the text content. In the case of editable text content, * #AtkEditableText (a subtype of the #AtkText interface) should be * implemented instead. * * #AtkText provides not only traversal facilities and change * notification for text content, but also caret tracking and glyph * bounding box calculations. Note that the text strings are exposed * as UTF-8, and are therefore potentially multi-byte, and * caret-to-byte offset mapping makes no assumptions about the * character length; also bounding box glyph-to-offset mapping may be * complex for languages which use ligatures. */ public interface TextIF{ /** Get the main Gtk struct */ public AtkText* getTextStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_text_get_type(); } /** * Frees the memory associated with an array of AtkTextRange. It is assumed * that the array was returned by the function atk_text_get_bounded_ranges * and is NULL terminated. * * Params: * ranges = A pointer to an array of #AtkTextRange which is * to be freed. * * Since: 1.3 */ public static void freeRanges(TextRange[] ranges) { AtkTextRange*[] rangesArray = new AtkTextRange*[ranges.length]; for ( int i = 0; i < ranges.length; i++ ) { rangesArray[i] = ranges[i].getTextRangeStruct(); } atk_text_free_ranges(rangesArray.ptr); } /** * Adds a selection bounded by the specified offsets. * * Params: * startOffset = the start position of the selected region * endOffset = the offset of the first character after the selected region. * * Returns: %TRUE if success, %FALSE otherwise */ public bool addSelection(int startOffset, int endOffset); /** * Get the ranges of text in the specified bounding box. * * Params: * rect = An AtkTextRectangle giving the dimensions of the bounding box. * coordType = Specify whether coordinates are relative to the screen or widget window. * xClipType = Specify the horizontal clip type. * yClipType = Specify the vertical clip type. * * Returns: Array of AtkTextRange. The last * element of the array returned by this function will be NULL. * * Since: 1.3 */ public TextRange[] getBoundedRanges(AtkTextRectangle* rect, AtkCoordType coordType, AtkTextClipType xClipType, AtkTextClipType yClipType); /** * Gets the offset position of the caret (cursor). * * Returns: the offset position of the caret (cursor). */ public int getCaretOffset(); /** * Gets the specified text. * * Params: * offset = position * * Returns: the character at @offset. */ public dchar getCharacterAtOffset(int offset); /** * Gets the character count. * * Returns: the number of characters. */ public int getCharacterCount(); /** * Get the bounding box containing the glyph representing the character at * a particular text offset. * * Params: * offset = The offset of the text character for which bounding information is required. * x = Pointer for the x cordinate of the bounding box * y = Pointer for the y cordinate of the bounding box * width = Pointer for the width of the bounding box * height = Pointer for the height of the bounding box * coords = specify whether coordinates are relative to the screen or widget window */ public void getCharacterExtents(int offset, out int x, out int y, out int width, out int height, AtkCoordType coords); /** * Creates an #AtkAttributeSet which consists of the default values of * attributes for the text. See the enum AtkTextAttribute for types of text * attributes that can be returned. Note that other attributes may also be * returned. * * Returns: an #AtkAttributeSet which contains the default * values of attributes. at @offset. this #atkattributeset should be freed by * a call to atk_attribute_set_free(). */ public AtkAttributeSet* getDefaultAttributes(); /** * Gets the number of selected regions. * * Returns: The number of selected regions, or -1 if a failure * occurred. */ public int getNSelections(); /** * Gets the offset of the character located at coordinates @x and @y. @x and @y * are interpreted as being relative to the screen or this widget's window * depending on @coords. * * Params: * x = screen x-position of character * y = screen y-position of character * coords = specify whether coordinates are relative to the screen or * widget window * * Returns: the offset to the character which is located at * the specified @x and @y coordinates. */ public int getOffsetAtPoint(int x, int y, AtkCoordType coords); /** * Get the bounding box for text within the specified range. * * Params: * startOffset = The offset of the first text character for which boundary * information is required. * endOffset = The offset of the text character after the last character * for which boundary information is required. * coordType = Specify whether coordinates are relative to the screen or widget window. * rect = A pointer to a AtkTextRectangle which is filled in by this function. * * Since: 1.3 */ public void getRangeExtents(int startOffset, int endOffset, AtkCoordType coordType, out AtkTextRectangle rect); /** * Creates an #AtkAttributeSet which consists of the attributes explicitly * set at the position @offset in the text. @start_offset and @end_offset are * set to the start and end of the range around @offset where the attributes are * invariant. Note that @end_offset is the offset of the first character * after the range. See the enum AtkTextAttribute for types of text * attributes that can be returned. Note that other attributes may also be * returned. * * Params: * offset = the offset at which to get the attributes, -1 means the offset of * the character to be inserted at the caret location. * startOffset = the address to put the start offset of the range * endOffset = the address to put the end offset of the range * * Returns: an #AtkAttributeSet which contains the attributes * explicitly set at @offset. This #AtkAttributeSet should be freed by a call * to atk_attribute_set_free(). */ public AtkAttributeSet* getRunAttributes(int offset, out int startOffset, out int endOffset); /** * Gets the text from the specified selection. * * Params: * selectionNum = The selection number. The selected regions are * assigned numbers that correspond to how far the region is from the * start of the text. The selected region closest to the beginning * of the text region is assigned the number 0, etc. Note that adding, * moving or deleting a selected region can change the numbering. * startOffset = passes back the start position of the selected region * endOffset = passes back the end position of (e.g. offset immediately past) * the selected region * * Returns: a newly allocated string containing the selected text. Use g_free() * to free the returned string. */ public string getSelection(int selectionNum, out int startOffset, out int endOffset); /** * Gets a portion of the text exposed through an #AtkText according to a given @offset * and a specific @granularity, along with the start and end offsets defining the * boundaries of such a portion of text. * * If @granularity is ATK_TEXT_GRANULARITY_CHAR the character at the * offset is returned. * * If @granularity is ATK_TEXT_GRANULARITY_WORD the returned string * is from the word start at or before the offset to the word start after * the offset. * * The returned string will contain the word at the offset if the offset * is inside a word and will contain the word before the offset if the * offset is not inside a word. * * If @granularity is ATK_TEXT_GRANULARITY_SENTENCE the returned string * is from the sentence start at or before the offset to the sentence * start after the offset. * * The returned string will contain the sentence at the offset if the offset * is inside a sentence and will contain the sentence before the offset * if the offset is not inside a sentence. * * If @granularity is ATK_TEXT_GRANULARITY_LINE the returned string * is from the line start at or before the offset to the line * start after the offset. * * If @granularity is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string * is from the start of the paragraph at or before the offset to the start * of the following paragraph after the offset. * * Params: * offset = position * granularity = An #AtkTextGranularity * startOffset = the start offset of the returned string, or -1 * if an error has occurred (e.g. invalid offset, not implemented) * endOffset = the offset of the first character after the returned string, * or -1 if an error has occurred (e.g. invalid offset, not implemented) * * Returns: a newly allocated string containing the text * at the @offset bounded by the specified @granularity. Use * g_free() to free the returned string. Returns %NULL if the * offset is invalid or no implementation is available. * * Since: 2.10 */ public string getStringAtOffset(int offset, AtkTextGranularity granularity, out int startOffset, out int endOffset); /** * Gets the specified text. * * Params: * startOffset = start position * endOffset = end position, or -1 for the end of the string. * * Returns: a newly allocated string containing the text from @start_offset up * to, but not including @end_offset. Use g_free() to free the returned string. */ public string getText(int startOffset, int endOffset); /** * Gets the specified text. * * Deprecated: Please use atk_text_get_string_at_offset() instead. * * Params: * offset = position * boundaryType = An #AtkTextBoundary * startOffset = the start offset of the returned string * endOffset = the offset of the first character after the * returned substring * * Returns: a newly allocated string containing the text after @offset bounded * by the specified @boundary_type. Use g_free() to free the returned string. */ public string getTextAfterOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset); /** * Gets the specified text. * * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the * offset is returned. * * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string * is from the word start at or before the offset to the word start after * the offset. * * The returned string will contain the word at the offset if the offset * is inside a word and will contain the word before the offset if the * offset is not inside a word. * * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned * string is from the sentence start at or before the offset to the sentence * start after the offset. * * The returned string will contain the sentence at the offset if the offset * is inside a sentence and will contain the sentence before the offset * if the offset is not inside a sentence. * * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned * string is from the line start at or before the offset to the line * start after the offset. * * Deprecated: This method is deprecated since ATK version * 2.9.4. Please use atk_text_get_string_at_offset() instead. * * Params: * offset = position * boundaryType = An #AtkTextBoundary * startOffset = the start offset of the returned string * endOffset = the offset of the first character after the * returned substring * * Returns: a newly allocated string containing the text at @offset bounded by * the specified @boundary_type. Use g_free() to free the returned string. */ public string getTextAtOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset); /** * Gets the specified text. * * Deprecated: Please use atk_text_get_string_at_offset() instead. * * Params: * offset = position * boundaryType = An #AtkTextBoundary * startOffset = the start offset of the returned string * endOffset = the offset of the first character after the * returned substring * * Returns: a newly allocated string containing the text before @offset bounded * by the specified @boundary_type. Use g_free() to free the returned string. */ public string getTextBeforeOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset); /** * Removes the specified selection. * * Params: * selectionNum = The selection number. The selected regions are * assigned numbers that correspond to how far the region is from the * start of the text. The selected region closest to the beginning * of the text region is assigned the number 0, etc. Note that adding, * moving or deleting a selected region can change the numbering. * * Returns: %TRUE if success, %FALSE otherwise */ public bool removeSelection(int selectionNum); /** * Sets the caret (cursor) position to the specified @offset. * * Params: * offset = position * * Returns: %TRUE if success, %FALSE otherwise. */ public bool setCaretOffset(int offset); /** * Changes the start and end offset of the specified selection. * * Params: * selectionNum = The selection number. The selected regions are * assigned numbers that correspond to how far the region is from the * start of the text. The selected region closest to the beginning * of the text region is assigned the number 0, etc. Note that adding, * moving or deleting a selected region can change the numbering. * startOffset = the new start position of the selection * endOffset = the new end position of (e.g. offset immediately past) * the selection * * Returns: %TRUE if success, %FALSE otherwise */ public bool setSelection(int selectionNum, int startOffset, int endOffset); /** * The "text-attributes-changed" signal is emitted when the text * attributes of the text of an object which implements AtkText * changes. */ gulong addOnTextAttributesChanged(void delegate(TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "text-caret-moved" signal is emitted when the caret * position of the text of an object which implements AtkText * changes. * * Params: * arg1 = The new position of the text caret. */ gulong addOnTextCaretMoved(void delegate(int, TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "text-changed" signal is emitted when the text of the * object which implements the AtkText interface changes, This * signal will have a detail which is either "insert" or * "delete" which identifies whether the text change was an * insertion or a deletion. * * Deprecated: Use #AtkObject::text-insert or * #AtkObject::text-remove instead. * * Params: * arg1 = The position (character offset) of the insertion or deletion. * arg2 = The length (in characters) of text inserted or deleted. */ gulong addOnTextChanged(void delegate(int, int, TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "text-insert" signal is emitted when a new text is * inserted. If the signal was not triggered by the user * (e.g. typing or pasting text), the "system" detail should be * included. * * Params: * arg1 = The position (character offset) of the insertion. * arg2 = The length (in characters) of text inserted. * arg3 = The new text inserted */ gulong addOnTextInsert(void delegate(int, int, string, TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "text-remove" signal is emitted when a new text is * removed. If the signal was not triggered by the user * (e.g. typing or pasting text), the "system" detail should be * included. * * Params: * arg1 = The position (character offset) of the removal. * arg2 = The length (in characters) of text removed. * arg3 = The old text removed */ gulong addOnTextRemove(void delegate(int, int, string, TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The "text-selection-changed" signal is emitted when the * selected text of an object which implements AtkText changes. */ gulong addOnTextSelectionChanged(void delegate(TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Frees the memory used by an #AtkAttributeSet, including all its * #AtkAttributes. * * Params: * attribSet = The #AtkAttributeSet to free */ public static void attributeSetFree(AtkAttributeSet* attribSet) { atk_attribute_set_free(attribSet); } /** * Get the #AtkTextAttribute type corresponding to a text attribute name. * * Params: * name = a string which is the (non-localized) name of an ATK text attribute. * * Returns: the #AtkTextAttribute enumerated type corresponding to the specified * name, * or #ATK_TEXT_ATTRIBUTE_INVALID if no matching text attribute is found. */ public static AtkTextAttribute attributeForName(string name) { return atk_text_attribute_for_name(Str.toStringz(name)); } /** * Gets the name corresponding to the #AtkTextAttribute * * Params: * attr = The #AtkTextAttribute whose name is required * * Returns: a string containing the name; this string should not be freed */ public static string attributeGetName(AtkTextAttribute attr) { return Str.toString(atk_text_attribute_get_name(attr)); } /** * Gets the value for the index of the #AtkTextAttribute * * Params: * attr = The #AtkTextAttribute for which a value is required * index = The index of the required value * * Returns: a string containing the value; this string * should not be freed; %NULL is returned if there are no values * maintained for the attr value. */ public static string attributeGetValue(AtkTextAttribute attr, int index) { return Str.toString(atk_text_attribute_get_value(attr, index)); } /** * Associate @name with a new #AtkTextAttribute * * Params: * name = a name string * * Returns: an #AtkTextAttribute associated with @name */ public static AtkTextAttribute attributeRegister(string name) { return atk_text_attribute_register(Str.toStringz(name)); } } GtkD-3.7.5/generated/gtkd/atk/TextRange.d000066400000000000000000000056121324604450400201010ustar00rootroot00000000000000/* * 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 atk.TextRange; private import atk.c.functions; public import atk.c.types; private import glib.Str; private import glib.c.functions; public import gtkc.atktypes; private import gtkd.Loader; /** * A structure used to describe a text range. */ public final class TextRange { /** the main Gtk struct */ protected AtkTextRange* atkTextRange; protected bool ownedRef; /** Get the main Gtk struct */ public AtkTextRange* getTextRangeStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return atkTextRange; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)atkTextRange; } /** * Sets our main struct and passes it to the parent class. */ public this (AtkTextRange* atkTextRange, bool ownedRef = false) { this.atkTextRange = atkTextRange; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_ATK) && ownedRef ) g_free(atkTextRange); } /** * A rectangle giving the bounds of the text range */ public @property AtkTextRectangle bounds() { return atkTextRange.bounds; } /** Ditto */ public @property void bounds(AtkTextRectangle value) { atkTextRange.bounds = value; } /** * The start offset of a AtkTextRange */ public @property int startOffset() { return atkTextRange.startOffset; } /** Ditto */ public @property void startOffset(int value) { atkTextRange.startOffset = value; } /** * The end offset of a AtkTextRange */ public @property int endOffset() { return atkTextRange.endOffset; } /** Ditto */ public @property void endOffset(int value) { atkTextRange.endOffset = value; } /** * The text in the text range */ public @property string content() { return Str.toString(atkTextRange.content); } /** Ditto */ public @property void content(string value) { atkTextRange.content = Str.toStringz(value); } /** */ public static GType getType() { return atk_text_range_get_type(); } } GtkD-3.7.5/generated/gtkd/atk/TextT.d000066400000000000000000000664501324604450400172570ustar00rootroot00000000000000/* * 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 atk.TextT; public import atk.TextRange; public import atk.c.functions; public import atk.c.types; public import glib.Str; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.atktypes; public import std.algorithm; /** * #AtkText should be implemented by #AtkObjects on behalf of widgets * that have text content which is either attributed or otherwise * non-trivial. #AtkObjects whose text content is simple, * unattributed, and very brief may expose that content via * #atk_object_get_name instead; however if the text is editable, * multi-line, typically longer than three or four words, attributed, * selectable, or if the object already uses the 'name' ATK property * for other information, the #AtkText interface should be used to * expose the text content. In the case of editable text content, * #AtkEditableText (a subtype of the #AtkText interface) should be * implemented instead. * * #AtkText provides not only traversal facilities and change * notification for text content, but also caret tracking and glyph * bounding box calculations. Note that the text strings are exposed * as UTF-8, and are therefore potentially multi-byte, and * caret-to-byte offset mapping makes no assumptions about the * character length; also bounding box glyph-to-offset mapping may be * complex for languages which use ligatures. */ public template TextT(TStruct) { /** Get the main Gtk struct */ public AtkText* getTextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkText*)getStruct(); } /** * Adds a selection bounded by the specified offsets. * * Params: * startOffset = the start position of the selected region * endOffset = the offset of the first character after the selected region. * * Returns: %TRUE if success, %FALSE otherwise */ public bool addSelection(int startOffset, int endOffset) { return atk_text_add_selection(getTextStruct(), startOffset, endOffset) != 0; } /** * Get the ranges of text in the specified bounding box. * * Params: * rect = An AtkTextRectangle giving the dimensions of the bounding box. * coordType = Specify whether coordinates are relative to the screen or widget window. * xClipType = Specify the horizontal clip type. * yClipType = Specify the vertical clip type. * * Returns: Array of AtkTextRange. The last * element of the array returned by this function will be NULL. * * Since: 1.3 */ public TextRange[] getBoundedRanges(AtkTextRectangle* rect, AtkCoordType coordType, AtkTextClipType xClipType, AtkTextClipType yClipType) { auto p = atk_text_get_bounded_ranges(getTextStruct(), rect, coordType, xClipType, yClipType); if(p is null) { return null; } TextRange[] arr = new TextRange[getArrayLength(p)]; for(int i = 0; i < getArrayLength(p); i++) { arr[i] = ObjectG.getDObject!(TextRange)(cast(AtkTextRange*) p[i]); } return arr; } /** * Gets the offset position of the caret (cursor). * * Returns: the offset position of the caret (cursor). */ public int getCaretOffset() { return atk_text_get_caret_offset(getTextStruct()); } /** * Gets the specified text. * * Params: * offset = position * * Returns: the character at @offset. */ public dchar getCharacterAtOffset(int offset) { return atk_text_get_character_at_offset(getTextStruct(), offset); } /** * Gets the character count. * * Returns: the number of characters. */ public int getCharacterCount() { return atk_text_get_character_count(getTextStruct()); } /** * Get the bounding box containing the glyph representing the character at * a particular text offset. * * Params: * offset = The offset of the text character for which bounding information is required. * x = Pointer for the x cordinate of the bounding box * y = Pointer for the y cordinate of the bounding box * width = Pointer for the width of the bounding box * height = Pointer for the height of the bounding box * coords = specify whether coordinates are relative to the screen or widget window */ public void getCharacterExtents(int offset, out int x, out int y, out int width, out int height, AtkCoordType coords) { atk_text_get_character_extents(getTextStruct(), offset, &x, &y, &width, &height, coords); } /** * Creates an #AtkAttributeSet which consists of the default values of * attributes for the text. See the enum AtkTextAttribute for types of text * attributes that can be returned. Note that other attributes may also be * returned. * * Returns: an #AtkAttributeSet which contains the default * values of attributes. at @offset. this #atkattributeset should be freed by * a call to atk_attribute_set_free(). */ public AtkAttributeSet* getDefaultAttributes() { return atk_text_get_default_attributes(getTextStruct()); } /** * Gets the number of selected regions. * * Returns: The number of selected regions, or -1 if a failure * occurred. */ public int getNSelections() { return atk_text_get_n_selections(getTextStruct()); } /** * Gets the offset of the character located at coordinates @x and @y. @x and @y * are interpreted as being relative to the screen or this widget's window * depending on @coords. * * Params: * x = screen x-position of character * y = screen y-position of character * coords = specify whether coordinates are relative to the screen or * widget window * * Returns: the offset to the character which is located at * the specified @x and @y coordinates. */ public int getOffsetAtPoint(int x, int y, AtkCoordType coords) { return atk_text_get_offset_at_point(getTextStruct(), x, y, coords); } /** * Get the bounding box for text within the specified range. * * Params: * startOffset = The offset of the first text character for which boundary * information is required. * endOffset = The offset of the text character after the last character * for which boundary information is required. * coordType = Specify whether coordinates are relative to the screen or widget window. * rect = A pointer to a AtkTextRectangle which is filled in by this function. * * Since: 1.3 */ public void getRangeExtents(int startOffset, int endOffset, AtkCoordType coordType, out AtkTextRectangle rect) { atk_text_get_range_extents(getTextStruct(), startOffset, endOffset, coordType, &rect); } /** * Creates an #AtkAttributeSet which consists of the attributes explicitly * set at the position @offset in the text. @start_offset and @end_offset are * set to the start and end of the range around @offset where the attributes are * invariant. Note that @end_offset is the offset of the first character * after the range. See the enum AtkTextAttribute for types of text * attributes that can be returned. Note that other attributes may also be * returned. * * Params: * offset = the offset at which to get the attributes, -1 means the offset of * the character to be inserted at the caret location. * startOffset = the address to put the start offset of the range * endOffset = the address to put the end offset of the range * * Returns: an #AtkAttributeSet which contains the attributes * explicitly set at @offset. This #AtkAttributeSet should be freed by a call * to atk_attribute_set_free(). */ public AtkAttributeSet* getRunAttributes(int offset, out int startOffset, out int endOffset) { return atk_text_get_run_attributes(getTextStruct(), offset, &startOffset, &endOffset); } /** * Gets the text from the specified selection. * * Params: * selectionNum = The selection number. The selected regions are * assigned numbers that correspond to how far the region is from the * start of the text. The selected region closest to the beginning * of the text region is assigned the number 0, etc. Note that adding, * moving or deleting a selected region can change the numbering. * startOffset = passes back the start position of the selected region * endOffset = passes back the end position of (e.g. offset immediately past) * the selected region * * Returns: a newly allocated string containing the selected text. Use g_free() * to free the returned string. */ public string getSelection(int selectionNum, out int startOffset, out int endOffset) { auto retStr = atk_text_get_selection(getTextStruct(), selectionNum, &startOffset, &endOffset); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets a portion of the text exposed through an #AtkText according to a given @offset * and a specific @granularity, along with the start and end offsets defining the * boundaries of such a portion of text. * * If @granularity is ATK_TEXT_GRANULARITY_CHAR the character at the * offset is returned. * * If @granularity is ATK_TEXT_GRANULARITY_WORD the returned string * is from the word start at or before the offset to the word start after * the offset. * * The returned string will contain the word at the offset if the offset * is inside a word and will contain the word before the offset if the * offset is not inside a word. * * If @granularity is ATK_TEXT_GRANULARITY_SENTENCE the returned string * is from the sentence start at or before the offset to the sentence * start after the offset. * * The returned string will contain the sentence at the offset if the offset * is inside a sentence and will contain the sentence before the offset * if the offset is not inside a sentence. * * If @granularity is ATK_TEXT_GRANULARITY_LINE the returned string * is from the line start at or before the offset to the line * start after the offset. * * If @granularity is ATK_TEXT_GRANULARITY_PARAGRAPH the returned string * is from the start of the paragraph at or before the offset to the start * of the following paragraph after the offset. * * Params: * offset = position * granularity = An #AtkTextGranularity * startOffset = the start offset of the returned string, or -1 * if an error has occurred (e.g. invalid offset, not implemented) * endOffset = the offset of the first character after the returned string, * or -1 if an error has occurred (e.g. invalid offset, not implemented) * * Returns: a newly allocated string containing the text * at the @offset bounded by the specified @granularity. Use * g_free() to free the returned string. Returns %NULL if the * offset is invalid or no implementation is available. * * Since: 2.10 */ public string getStringAtOffset(int offset, AtkTextGranularity granularity, out int startOffset, out int endOffset) { auto retStr = atk_text_get_string_at_offset(getTextStruct(), offset, granularity, &startOffset, &endOffset); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the specified text. * * Params: * startOffset = start position * endOffset = end position, or -1 for the end of the string. * * Returns: a newly allocated string containing the text from @start_offset up * to, but not including @end_offset. Use g_free() to free the returned string. */ public string getText(int startOffset, int endOffset) { auto retStr = atk_text_get_text(getTextStruct(), startOffset, endOffset); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the specified text. * * Deprecated: Please use atk_text_get_string_at_offset() instead. * * Params: * offset = position * boundaryType = An #AtkTextBoundary * startOffset = the start offset of the returned string * endOffset = the offset of the first character after the * returned substring * * Returns: a newly allocated string containing the text after @offset bounded * by the specified @boundary_type. Use g_free() to free the returned string. */ public string getTextAfterOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset) { auto retStr = atk_text_get_text_after_offset(getTextStruct(), offset, boundaryType, &startOffset, &endOffset); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the specified text. * * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the * offset is returned. * * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string * is from the word start at or before the offset to the word start after * the offset. * * The returned string will contain the word at the offset if the offset * is inside a word and will contain the word before the offset if the * offset is not inside a word. * * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned * string is from the sentence start at or before the offset to the sentence * start after the offset. * * The returned string will contain the sentence at the offset if the offset * is inside a sentence and will contain the sentence before the offset * if the offset is not inside a sentence. * * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned * string is from the line start at or before the offset to the line * start after the offset. * * Deprecated: This method is deprecated since ATK version * 2.9.4. Please use atk_text_get_string_at_offset() instead. * * Params: * offset = position * boundaryType = An #AtkTextBoundary * startOffset = the start offset of the returned string * endOffset = the offset of the first character after the * returned substring * * Returns: a newly allocated string containing the text at @offset bounded by * the specified @boundary_type. Use g_free() to free the returned string. */ public string getTextAtOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset) { auto retStr = atk_text_get_text_at_offset(getTextStruct(), offset, boundaryType, &startOffset, &endOffset); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the specified text. * * Deprecated: Please use atk_text_get_string_at_offset() instead. * * Params: * offset = position * boundaryType = An #AtkTextBoundary * startOffset = the start offset of the returned string * endOffset = the offset of the first character after the * returned substring * * Returns: a newly allocated string containing the text before @offset bounded * by the specified @boundary_type. Use g_free() to free the returned string. */ public string getTextBeforeOffset(int offset, AtkTextBoundary boundaryType, out int startOffset, out int endOffset) { auto retStr = atk_text_get_text_before_offset(getTextStruct(), offset, boundaryType, &startOffset, &endOffset); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Removes the specified selection. * * Params: * selectionNum = The selection number. The selected regions are * assigned numbers that correspond to how far the region is from the * start of the text. The selected region closest to the beginning * of the text region is assigned the number 0, etc. Note that adding, * moving or deleting a selected region can change the numbering. * * Returns: %TRUE if success, %FALSE otherwise */ public bool removeSelection(int selectionNum) { return atk_text_remove_selection(getTextStruct(), selectionNum) != 0; } /** * Sets the caret (cursor) position to the specified @offset. * * Params: * offset = position * * Returns: %TRUE if success, %FALSE otherwise. */ public bool setCaretOffset(int offset) { return atk_text_set_caret_offset(getTextStruct(), offset) != 0; } /** * Changes the start and end offset of the specified selection. * * Params: * selectionNum = The selection number. The selected regions are * assigned numbers that correspond to how far the region is from the * start of the text. The selected region closest to the beginning * of the text region is assigned the number 0, etc. Note that adding, * moving or deleting a selected region can change the numbering. * startOffset = the new start position of the selection * endOffset = the new end position of (e.g. offset immediately past) * the selection * * Returns: %TRUE if success, %FALSE otherwise */ public bool setSelection(int selectionNum, int startOffset, int endOffset) { return atk_text_set_selection(getTextStruct(), selectionNum, startOffset, endOffset) != 0; } protected class OnTextAttributesChangedDelegateWrapper { void delegate(TextIF) dlg; gulong handlerId; this(void delegate(TextIF) dlg) { this.dlg = dlg; onTextAttributesChangedListeners ~= this; } void remove(OnTextAttributesChangedDelegateWrapper source) { foreach(index, wrapper; onTextAttributesChangedListeners) { if (wrapper.handlerId == source.handlerId) { onTextAttributesChangedListeners[index] = null; onTextAttributesChangedListeners = std.algorithm.remove(onTextAttributesChangedListeners, index); break; } } } } OnTextAttributesChangedDelegateWrapper[] onTextAttributesChangedListeners; /** * The "text-attributes-changed" signal is emitted when the text * attributes of the text of an object which implements AtkText * changes. */ gulong addOnTextAttributesChanged(void delegate(TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnTextAttributesChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "text-attributes-changed", cast(GCallback)&callBackTextAttributesChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackTextAttributesChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackTextAttributesChanged(AtkText* textStruct, OnTextAttributesChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackTextAttributesChangedDestroy(OnTextAttributesChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnTextCaretMovedDelegateWrapper { void delegate(int, TextIF) dlg; gulong handlerId; this(void delegate(int, TextIF) dlg) { this.dlg = dlg; onTextCaretMovedListeners ~= this; } void remove(OnTextCaretMovedDelegateWrapper source) { foreach(index, wrapper; onTextCaretMovedListeners) { if (wrapper.handlerId == source.handlerId) { onTextCaretMovedListeners[index] = null; onTextCaretMovedListeners = std.algorithm.remove(onTextCaretMovedListeners, index); break; } } } } OnTextCaretMovedDelegateWrapper[] onTextCaretMovedListeners; /** * The "text-caret-moved" signal is emitted when the caret * position of the text of an object which implements AtkText * changes. * * Params: * arg1 = The new position of the text caret. */ gulong addOnTextCaretMoved(void delegate(int, TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnTextCaretMovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "text-caret-moved", cast(GCallback)&callBackTextCaretMoved, cast(void*)wrapper, cast(GClosureNotify)&callBackTextCaretMovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackTextCaretMoved(AtkText* textStruct, int arg1, OnTextCaretMovedDelegateWrapper wrapper) { wrapper.dlg(arg1, wrapper.outer); } extern(C) static void callBackTextCaretMovedDestroy(OnTextCaretMovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnTextChangedDelegateWrapper { void delegate(int, int, TextIF) dlg; gulong handlerId; this(void delegate(int, int, TextIF) dlg) { this.dlg = dlg; onTextChangedListeners ~= this; } void remove(OnTextChangedDelegateWrapper source) { foreach(index, wrapper; onTextChangedListeners) { if (wrapper.handlerId == source.handlerId) { onTextChangedListeners[index] = null; onTextChangedListeners = std.algorithm.remove(onTextChangedListeners, index); break; } } } } OnTextChangedDelegateWrapper[] onTextChangedListeners; /** * The "text-changed" signal is emitted when the text of the * object which implements the AtkText interface changes, This * signal will have a detail which is either "insert" or * "delete" which identifies whether the text change was an * insertion or a deletion. * * Deprecated: Use #AtkObject::text-insert or * #AtkObject::text-remove instead. * * Params: * arg1 = The position (character offset) of the insertion or deletion. * arg2 = The length (in characters) of text inserted or deleted. */ gulong addOnTextChanged(void delegate(int, int, TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnTextChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "text-changed", cast(GCallback)&callBackTextChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackTextChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackTextChanged(AtkText* textStruct, int arg1, int arg2, OnTextChangedDelegateWrapper wrapper) { wrapper.dlg(arg1, arg2, wrapper.outer); } extern(C) static void callBackTextChangedDestroy(OnTextChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnTextInsertDelegateWrapper { void delegate(int, int, string, TextIF) dlg; gulong handlerId; this(void delegate(int, int, string, TextIF) dlg) { this.dlg = dlg; onTextInsertListeners ~= this; } void remove(OnTextInsertDelegateWrapper source) { foreach(index, wrapper; onTextInsertListeners) { if (wrapper.handlerId == source.handlerId) { onTextInsertListeners[index] = null; onTextInsertListeners = std.algorithm.remove(onTextInsertListeners, index); break; } } } } OnTextInsertDelegateWrapper[] onTextInsertListeners; /** * The "text-insert" signal is emitted when a new text is * inserted. If the signal was not triggered by the user * (e.g. typing or pasting text), the "system" detail should be * included. * * Params: * arg1 = The position (character offset) of the insertion. * arg2 = The length (in characters) of text inserted. * arg3 = The new text inserted */ gulong addOnTextInsert(void delegate(int, int, string, TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnTextInsertDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "text-insert", cast(GCallback)&callBackTextInsert, cast(void*)wrapper, cast(GClosureNotify)&callBackTextInsertDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackTextInsert(AtkText* textStruct, int arg1, int arg2, char* arg3, OnTextInsertDelegateWrapper wrapper) { wrapper.dlg(arg1, arg2, Str.toString(arg3), wrapper.outer); } extern(C) static void callBackTextInsertDestroy(OnTextInsertDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnTextRemoveDelegateWrapper { void delegate(int, int, string, TextIF) dlg; gulong handlerId; this(void delegate(int, int, string, TextIF) dlg) { this.dlg = dlg; onTextRemoveListeners ~= this; } void remove(OnTextRemoveDelegateWrapper source) { foreach(index, wrapper; onTextRemoveListeners) { if (wrapper.handlerId == source.handlerId) { onTextRemoveListeners[index] = null; onTextRemoveListeners = std.algorithm.remove(onTextRemoveListeners, index); break; } } } } OnTextRemoveDelegateWrapper[] onTextRemoveListeners; /** * The "text-remove" signal is emitted when a new text is * removed. If the signal was not triggered by the user * (e.g. typing or pasting text), the "system" detail should be * included. * * Params: * arg1 = The position (character offset) of the removal. * arg2 = The length (in characters) of text removed. * arg3 = The old text removed */ gulong addOnTextRemove(void delegate(int, int, string, TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnTextRemoveDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "text-remove", cast(GCallback)&callBackTextRemove, cast(void*)wrapper, cast(GClosureNotify)&callBackTextRemoveDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackTextRemove(AtkText* textStruct, int arg1, int arg2, char* arg3, OnTextRemoveDelegateWrapper wrapper) { wrapper.dlg(arg1, arg2, Str.toString(arg3), wrapper.outer); } extern(C) static void callBackTextRemoveDestroy(OnTextRemoveDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnTextSelectionChangedDelegateWrapper { void delegate(TextIF) dlg; gulong handlerId; this(void delegate(TextIF) dlg) { this.dlg = dlg; onTextSelectionChangedListeners ~= this; } void remove(OnTextSelectionChangedDelegateWrapper source) { foreach(index, wrapper; onTextSelectionChangedListeners) { if (wrapper.handlerId == source.handlerId) { onTextSelectionChangedListeners[index] = null; onTextSelectionChangedListeners = std.algorithm.remove(onTextSelectionChangedListeners, index); break; } } } } OnTextSelectionChangedDelegateWrapper[] onTextSelectionChangedListeners; /** * The "text-selection-changed" signal is emitted when the * selected text of an object which implements AtkText changes. */ gulong addOnTextSelectionChanged(void delegate(TextIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnTextSelectionChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "text-selection-changed", cast(GCallback)&callBackTextSelectionChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackTextSelectionChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackTextSelectionChanged(AtkText* textStruct, OnTextSelectionChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackTextSelectionChangedDestroy(OnTextSelectionChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/atk/Util.d000066400000000000000000000201401324604450400171060ustar00rootroot00000000000000/* * 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 atk.Util; private import atk.ObjectAtk; private import atk.c.functions; public import atk.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.atktypes; /** * A set of ATK utility functions which are used to support event * registration of various types, and obtaining the 'root' accessible * of a process and information about the current ATK implementation * and toolkit version. */ public struct Util { /** */ public static GType getType() { return atk_util_get_type(); } /** * Adds the specified function to the list of functions to be called * when an object receives focus. * * Deprecated: Focus tracking has been dropped as a feature * to be implemented by ATK itself. If you need focus tracking on your * implementation, subscribe to the #AtkObject::state-change "focused" signal. * * Params: * focusTracker = Function to be added to the list of functions to be called * when an object receives focus. * * Returns: added focus tracker id, or 0 on failure. */ public static uint addFocusTracker(AtkEventListener focusTracker) { return atk_add_focus_tracker(focusTracker); } /** * Adds the specified function to the list of functions to be called * when an ATK event of type event_type occurs. * * The format of event_type is the following: * "ATK:<atk_type>:<atk_event>:<atk_event_detail> * * Where "ATK" works as the namespace, <atk_interface> is the name of * the ATK type (interface or object), <atk_event> is the name of the * signal defined on that interface and <atk_event_detail> is the * gsignal detail of that signal. You can find more info about gsignal * details here: * http://developer.gnome.org/gobject/stable/gobject-Signals.html * * The first three parameters are mandatory. The last one is optional. * * For example: * ATK:AtkObject:state-change * ATK:AtkText:text-selection-changed * ATK:AtkText:text-insert:system * * Toolkit implementor note: ATK provides a default implementation for * this virtual method. ATK implementors are discouraged from * reimplementing this method. * * Toolkit implementor note: this method is not intended to be used by * ATK implementors but by ATK consumers. * * ATK consumers note: as this method adds a listener for a given ATK * type, that type should be already registered on the GType system * before calling this method. A simple way to do that is creating an * instance of #AtkNoOpObject. This class implements all ATK * interfaces, so creating the instance will register all ATK types as * a collateral effect. * * Params: * listener = the listener to notify * eventType = the type of event for which notification is requested * * Returns: added event listener id, or 0 on failure. */ public static uint addGlobalEventListener(GSignalEmissionHook listener, string eventType) { return atk_add_global_event_listener(listener, Str.toStringz(eventType)); } /** * Adds the specified function to the list of functions to be called * when a key event occurs. The @data element will be passed to the * #AtkKeySnoopFunc (@listener) as the @func_data param, on notification. * * Params: * listener = the listener to notify * data = a #gpointer that points to a block of data that should be sent to the registered listeners, * along with the event notification, when it occurs. * * Returns: added event listener id, or 0 on failure. */ public static uint addKeyEventListener(AtkKeySnoopFunc listener, void* data) { return atk_add_key_event_listener(listener, data); } /** * Specifies the function to be called for focus tracker initialization. * This function should be called by an implementation of the * ATK interface if any specific work needs to be done to enable * focus tracking. * * Deprecated: Focus tracking has been dropped as a feature * to be implemented by ATK itself. * * Params: * init = Function to be called for focus tracker initialization */ public static void focusTrackerInit(AtkEventListenerInit init) { atk_focus_tracker_init(init); } /** * Cause the focus tracker functions which have been specified to be * executed for the object. * * Deprecated: Focus tracking has been dropped as a feature * to be implemented by ATK itself. As #AtkObject::focus-event was * deprecated in favor of a #AtkObject::state-change signal, in order * to notify a focus change on your implementation, you can use * atk_object_notify_state_change() instead. * * Params: * object = an #AtkObject */ public static void focusTrackerNotify(ObjectAtk object) { atk_focus_tracker_notify((object is null) ? null : object.getObjectAtkStruct()); } /** * Gets the currently focused object. * * Returns: the currently focused object for the current * application * * Since: 1.6 */ public static ObjectAtk getFocusObject() { auto p = atk_get_focus_object(); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); } /** * Gets the root accessible container for the current application. * * Returns: the root accessible container for the current * application */ public static ObjectAtk getRoot() { auto p = atk_get_root(); if(p is null) { return null; } return ObjectG.getDObject!(ObjectAtk)(cast(AtkObject*) p); } /** * Gets name string for the GUI toolkit implementing ATK for this application. * * Returns: name string for the GUI toolkit implementing ATK for this application */ public static string getToolkitName() { return Str.toString(atk_get_toolkit_name()); } /** * * * Deprecated: Focus tracking has been dropped as a feature * to be implemented by ATK itself. If you need focus tracking on your * implementation, subscribe to the #AtkObject::state-change "focused" signal. * * Removes the specified focus tracker from the list of functions * to be called when any object receives focus. * * Params: * trackerId = the id of the focus tracker to remove */ public static void removeFocusTracker(uint trackerId) { atk_remove_focus_tracker(trackerId); } /** * @listener_id is the value returned by #atk_add_global_event_listener * when you registered that event listener. * * Toolkit implementor note: ATK provides a default implementation for * this virtual method. ATK implementors are discouraged from * reimplementing this method. * * Toolkit implementor note: this method is not intended to be used by * ATK implementors but by ATK consumers. * * Removes the specified event listener * * Params: * listenerId = the id of the event listener to remove */ public static void removeGlobalEventListener(uint listenerId) { atk_remove_global_event_listener(listenerId); } /** * @listener_id is the value returned by #atk_add_key_event_listener * when you registered that event listener. * * Removes the specified event listener. * * Params: * listenerId = the id of the event listener to remove */ public static void removeKeyEventListener(uint listenerId) { atk_remove_key_event_listener(listenerId); } } GtkD-3.7.5/generated/gtkd/atk/ValueIF.d000066400000000000000000000301371324604450400174730ustar00rootroot00000000000000/* * 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 atk.ValueIF; private import atk.Range; private import atk.c.functions; public import atk.c.types; private import glib.ListSG; private import glib.MemorySlice; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gobject.Value; public import gtkc.atktypes; private import std.algorithm; /** * #AtkValue should be implemented for components which either display * a value from a bounded range, or which allow the user to specify a * value from a bounded range, or both. For instance, most sliders and * range controls, as well as dials, should have #AtkObject * representations which implement #AtkValue on the component's * behalf. #AtKValues may be read-only, in which case attempts to * alter the value return would fail. * * * On the subject of current value text * * In addition to providing the current value, implementors can * optionally provide an end-user-consumable textual description * associated with this value. This description should be included * when the numeric value fails to convey the full, on-screen * representation seen by users. * * * * Password strength * A password strength meter whose value changes as the user types * their new password. Red is used for values less than 4.0, yellow * for values between 4.0 and 7.0, and green for values greater than * 7.0. In this instance, value text should be provided by the * implementor. Appropriate value text would be "weak", "acceptable," * and "strong" respectively. * * * A level bar whose value changes to reflect the battery charge. The * color remains the same regardless of the charge and there is no * on-screen text reflecting the fullness of the battery. In this * case, because the position within the bar is the only indication * the user has of the current charge, value text should not be * provided by the implementor. * * * Implementor Notes * * Implementors should bear in mind that assistive technologies will * likely prefer the value text provided over the numeric value when * presenting a widget's value. As a result, strings not intended for * end users should not be exposed in the value text, and strings * which are exposed should be localized. In the case of widgets which * display value text on screen, for instance through a separate label * in close proximity to the value-displaying widget, it is still * expected that implementors will expose the value text using the * above API. * * * * #AtkValue should NOT be implemented for widgets whose displayed * value is not reflective of a meaningful amount. For instance, a * progress pulse indicator whose value alternates between 0.0 and 1.0 * to indicate that some process is still taking place should not * implement #AtkValue because the current value does not reflect * progress towards completion. * * * * * * On the subject of ranges * * In addition to providing the minimum and maximum values, * implementors can optionally provide details about subranges * associated with the widget. These details should be provided by the * implementor when both of the following are communicated visually to * the end user: * * * The existence of distinct ranges such as "weak", * "acceptable", and "strong" indicated by color, bar tick marks, * and/or on-screen text. * Where the current value stands within a given subrange, * for instance illustrating progression from very "weak" towards * nearly "acceptable" through changes in shade and/or position on * the bar within the "weak" subrange. * * * If both of the above do not apply to the widget, it should be * sufficient to expose the numeric value, along with the value text * if appropriate, to make the widget accessible. * * * * Implementor Notes * * If providing subrange details is deemed necessary, all possible * values of the widget are expected to fall within one of the * subranges defined by the implementor. * * * * * * On the subject of localization of end-user-consumable text * values * * Because value text and subrange descriptors are human-consumable, * implementors are expected to provide localized strings which can be * directly presented to end users via their assistive technology. In * order to simplify this for implementors, implementors can use * atk_value_type_get_localized_name() with the following * already-localized constants for commonly-needed values can be used: * * * * ATK_VALUE_VERY_WEAK * ATK_VALUE_WEAK * ATK_VALUE_ACCEPTABLE * ATK_VALUE_STRONG * ATK_VALUE_VERY_STRONG * ATK_VALUE_VERY_LOW * ATK_VALUE_LOW * ATK_VALUE_MEDIUM * ATK_VALUE_HIGH * ATK_VALUE_VERY_HIGH * ATK_VALUE_VERY_BAD * ATK_VALUE_BAD * ATK_VALUE_GOOD * ATK_VALUE_VERY_GOOD * ATK_VALUE_BEST * ATK_VALUE_SUBSUBOPTIMAL * ATK_VALUE_SUBOPTIMAL * ATK_VALUE_OPTIMAL * * * Proposals for additional constants, along with their use cases, * should be submitted to the GNOME Accessibility Team. * * * * * On the subject of changes * * Note that if there is a textual description associated with the new * numeric value, that description should be included regardless of * whether or not it has also changed. * * */ public interface ValueIF{ /** Get the main Gtk struct */ public AtkValue* getValueStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_value_get_type(); } /** * Gets the value of this object. * * Deprecated: Since 2.12. Use atk_value_get_value_and_text() * instead. * * Params: * value = a #GValue representing the current accessible value */ public void getCurrentValue(out Value value); /** * Gets the minimum increment by which the value of this object may be * changed. If zero, the minimum increment is undefined, which may * mean that it is limited only by the floating point precision of the * platform. * * Returns: the minimum increment by which the value of this * object may be changed. zero if undefined. * * Since: 2.12 */ public double getIncrement(); /** * Gets the maximum value of this object. * * Deprecated: Since 2.12. Use atk_value_get_range() instead. * * Params: * value = a #GValue representing the maximum accessible value */ public void getMaximumValue(out Value value); /** * Gets the minimum increment by which the value of this object may be changed. If zero, * the minimum increment is undefined, which may mean that it is limited only by the * floating point precision of the platform. * * Deprecated: Since 2.12. Use atk_value_get_increment() instead. * * Params: * value = a #GValue representing the minimum increment by which the accessible value may be changed * * Since: 1.12 */ public void getMinimumIncrement(out Value value); /** * Gets the minimum value of this object. * * Deprecated: Since 2.12. Use atk_value_get_range() instead. * * Params: * value = a #GValue representing the minimum accessible value */ public void getMinimumValue(out Value value); /** * Gets the range of this object. * * Returns: a newly allocated #AtkRange * that represents the minimum, maximum and descriptor (if available) * of @obj. NULL if that range is not defined. * * Since: 2.12 */ public Range getRange(); /** * Gets the list of subranges defined for this object. See #AtkValue * introduction for examples of subranges and when to expose them. * * Returns: an #GSList of * #AtkRange which each of the subranges defined for this object. Free * the returns list with g_slist_free(). * * Since: 2.12 */ public ListSG getSubRanges(); /** * Gets the current value and the human readable text alternative of * @obj. @text is a newly created string, that must be freed by the * caller. Can be NULL if no descriptor is available. * * Params: * value = address of #gdouble to put the current value of @obj * text = address of #gchar to put the human * readable text alternative for @value * * Since: 2.12 */ public void getValueAndText(out double value, out string text); /** * Sets the value of this object. * * Deprecated: Since 2.12. Use atk_value_set_value() instead. * * Params: * value = a #GValue which is the desired new accessible value. * * Returns: %TRUE if new value is successfully set, %FALSE otherwise. */ public bool setCurrentValue(Value value); /** * Sets the value of this object. * * This method is intended to provide a way to change the value of the * object. In any case, it is possible that the value can't be * modified (ie: a read-only component). If the value changes due this * call, it is possible that the text could change, and will trigger * an #AtkValue::value-changed signal emission. * * Note for implementors: the deprecated atk_value_set_current_value() * method returned TRUE or FALSE depending if the value was assigned * or not. In the practice several implementors were not able to * decide it, and returned TRUE in any case. For that reason it is not * required anymore to return if the value was properly assigned or * not. * * Params: * newValue = a double which is the desired new accessible value. * * Since: 2.12 */ public void setValue(double newValue); /** * The 'value-changed' signal is emitted when the current value * that represent the object changes. @value is the numerical * representation of this new value. @text is the human * readable text alternative of @value, and can be NULL if it is * not available. Note that if there is a textual description * associated with the new numeric value, that description * should be included regardless of whether or not it has also * changed. * * Example: a password meter whose value changes as the user * types their new password. Appropiate value text would be * "weak", "acceptable" and "strong". * * Params: * value = the new value in a numerical form. * text = human readable text alternative (also called * description) of this object. NULL if not available. * * Since: 2.12 */ gulong addOnValueChanged(void delegate(double, string, ValueIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/atk/ValueT.d000066400000000000000000000350531324604450400174020ustar00rootroot00000000000000/* * 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 atk.ValueT; public import atk.Range; public import atk.c.functions; public import atk.c.types; public import glib.ListSG; public import glib.MemorySlice; public import glib.Str; public import gobject.ObjectG; public import gobject.Signals; public import gobject.Value; public import gtkc.atktypes; public import std.algorithm; /** * #AtkValue should be implemented for components which either display * a value from a bounded range, or which allow the user to specify a * value from a bounded range, or both. For instance, most sliders and * range controls, as well as dials, should have #AtkObject * representations which implement #AtkValue on the component's * behalf. #AtKValues may be read-only, in which case attempts to * alter the value return would fail. * * * On the subject of current value text * * In addition to providing the current value, implementors can * optionally provide an end-user-consumable textual description * associated with this value. This description should be included * when the numeric value fails to convey the full, on-screen * representation seen by users. * * * * Password strength * A password strength meter whose value changes as the user types * their new password. Red is used for values less than 4.0, yellow * for values between 4.0 and 7.0, and green for values greater than * 7.0. In this instance, value text should be provided by the * implementor. Appropriate value text would be "weak", "acceptable," * and "strong" respectively. * * * A level bar whose value changes to reflect the battery charge. The * color remains the same regardless of the charge and there is no * on-screen text reflecting the fullness of the battery. In this * case, because the position within the bar is the only indication * the user has of the current charge, value text should not be * provided by the implementor. * * * Implementor Notes * * Implementors should bear in mind that assistive technologies will * likely prefer the value text provided over the numeric value when * presenting a widget's value. As a result, strings not intended for * end users should not be exposed in the value text, and strings * which are exposed should be localized. In the case of widgets which * display value text on screen, for instance through a separate label * in close proximity to the value-displaying widget, it is still * expected that implementors will expose the value text using the * above API. * * * * #AtkValue should NOT be implemented for widgets whose displayed * value is not reflective of a meaningful amount. For instance, a * progress pulse indicator whose value alternates between 0.0 and 1.0 * to indicate that some process is still taking place should not * implement #AtkValue because the current value does not reflect * progress towards completion. * * * * * * On the subject of ranges * * In addition to providing the minimum and maximum values, * implementors can optionally provide details about subranges * associated with the widget. These details should be provided by the * implementor when both of the following are communicated visually to * the end user: * * * The existence of distinct ranges such as "weak", * "acceptable", and "strong" indicated by color, bar tick marks, * and/or on-screen text. * Where the current value stands within a given subrange, * for instance illustrating progression from very "weak" towards * nearly "acceptable" through changes in shade and/or position on * the bar within the "weak" subrange. * * * If both of the above do not apply to the widget, it should be * sufficient to expose the numeric value, along with the value text * if appropriate, to make the widget accessible. * * * * Implementor Notes * * If providing subrange details is deemed necessary, all possible * values of the widget are expected to fall within one of the * subranges defined by the implementor. * * * * * * On the subject of localization of end-user-consumable text * values * * Because value text and subrange descriptors are human-consumable, * implementors are expected to provide localized strings which can be * directly presented to end users via their assistive technology. In * order to simplify this for implementors, implementors can use * atk_value_type_get_localized_name() with the following * already-localized constants for commonly-needed values can be used: * * * * ATK_VALUE_VERY_WEAK * ATK_VALUE_WEAK * ATK_VALUE_ACCEPTABLE * ATK_VALUE_STRONG * ATK_VALUE_VERY_STRONG * ATK_VALUE_VERY_LOW * ATK_VALUE_LOW * ATK_VALUE_MEDIUM * ATK_VALUE_HIGH * ATK_VALUE_VERY_HIGH * ATK_VALUE_VERY_BAD * ATK_VALUE_BAD * ATK_VALUE_GOOD * ATK_VALUE_VERY_GOOD * ATK_VALUE_BEST * ATK_VALUE_SUBSUBOPTIMAL * ATK_VALUE_SUBOPTIMAL * ATK_VALUE_OPTIMAL * * * Proposals for additional constants, along with their use cases, * should be submitted to the GNOME Accessibility Team. * * * * * On the subject of changes * * Note that if there is a textual description associated with the new * numeric value, that description should be included regardless of * whether or not it has also changed. * * */ public template ValueT(TStruct) { /** Get the main Gtk struct */ public AtkValue* getValueStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkValue*)getStruct(); } /** * Gets the value of this object. * * Deprecated: Since 2.12. Use atk_value_get_value_and_text() * instead. * * Params: * value = a #GValue representing the current accessible value */ public void getCurrentValue(out Value value) { GValue* outvalue = sliceNew!GValue(); atk_value_get_current_value(getValueStruct(), outvalue); value = ObjectG.getDObject!(Value)(outvalue, true); } /** * Gets the minimum increment by which the value of this object may be * changed. If zero, the minimum increment is undefined, which may * mean that it is limited only by the floating point precision of the * platform. * * Returns: the minimum increment by which the value of this * object may be changed. zero if undefined. * * Since: 2.12 */ public double getIncrement() { return atk_value_get_increment(getValueStruct()); } /** * Gets the maximum value of this object. * * Deprecated: Since 2.12. Use atk_value_get_range() instead. * * Params: * value = a #GValue representing the maximum accessible value */ public void getMaximumValue(out Value value) { GValue* outvalue = sliceNew!GValue(); atk_value_get_maximum_value(getValueStruct(), outvalue); value = ObjectG.getDObject!(Value)(outvalue, true); } /** * Gets the minimum increment by which the value of this object may be changed. If zero, * the minimum increment is undefined, which may mean that it is limited only by the * floating point precision of the platform. * * Deprecated: Since 2.12. Use atk_value_get_increment() instead. * * Params: * value = a #GValue representing the minimum increment by which the accessible value may be changed * * Since: 1.12 */ public void getMinimumIncrement(out Value value) { GValue* outvalue = sliceNew!GValue(); atk_value_get_minimum_increment(getValueStruct(), outvalue); value = ObjectG.getDObject!(Value)(outvalue, true); } /** * Gets the minimum value of this object. * * Deprecated: Since 2.12. Use atk_value_get_range() instead. * * Params: * value = a #GValue representing the minimum accessible value */ public void getMinimumValue(out Value value) { GValue* outvalue = sliceNew!GValue(); atk_value_get_minimum_value(getValueStruct(), outvalue); value = ObjectG.getDObject!(Value)(outvalue, true); } /** * Gets the range of this object. * * Returns: a newly allocated #AtkRange * that represents the minimum, maximum and descriptor (if available) * of @obj. NULL if that range is not defined. * * Since: 2.12 */ public Range getRange() { auto p = atk_value_get_range(getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Range)(cast(AtkRange*) p, true); } /** * Gets the list of subranges defined for this object. See #AtkValue * introduction for examples of subranges and when to expose them. * * Returns: an #GSList of * #AtkRange which each of the subranges defined for this object. Free * the returns list with g_slist_free(). * * Since: 2.12 */ public ListSG getSubRanges() { auto p = atk_value_get_sub_ranges(getValueStruct()); if(p is null) { return null; } return new ListSG(cast(GSList*) p, true); } /** * Gets the current value and the human readable text alternative of * @obj. @text is a newly created string, that must be freed by the * caller. Can be NULL if no descriptor is available. * * Params: * value = address of #gdouble to put the current value of @obj * text = address of #gchar to put the human * readable text alternative for @value * * Since: 2.12 */ public void getValueAndText(out double value, out string text) { char* outtext = null; atk_value_get_value_and_text(getValueStruct(), &value, &outtext); text = Str.toString(outtext); } /** * Sets the value of this object. * * Deprecated: Since 2.12. Use atk_value_set_value() instead. * * Params: * value = a #GValue which is the desired new accessible value. * * Returns: %TRUE if new value is successfully set, %FALSE otherwise. */ public bool setCurrentValue(Value value) { return atk_value_set_current_value(getValueStruct(), (value is null) ? null : value.getValueStruct()) != 0; } /** * Sets the value of this object. * * This method is intended to provide a way to change the value of the * object. In any case, it is possible that the value can't be * modified (ie: a read-only component). If the value changes due this * call, it is possible that the text could change, and will trigger * an #AtkValue::value-changed signal emission. * * Note for implementors: the deprecated atk_value_set_current_value() * method returned TRUE or FALSE depending if the value was assigned * or not. In the practice several implementors were not able to * decide it, and returned TRUE in any case. For that reason it is not * required anymore to return if the value was properly assigned or * not. * * Params: * newValue = a double which is the desired new accessible value. * * Since: 2.12 */ public void setValue(double newValue) { atk_value_set_value(getValueStruct(), newValue); } protected class OnValueChangedDelegateWrapper { void delegate(double, string, ValueIF) dlg; gulong handlerId; this(void delegate(double, string, ValueIF) dlg) { this.dlg = dlg; onValueChangedListeners ~= this; } void remove(OnValueChangedDelegateWrapper source) { foreach(index, wrapper; onValueChangedListeners) { if (wrapper.handlerId == source.handlerId) { onValueChangedListeners[index] = null; onValueChangedListeners = std.algorithm.remove(onValueChangedListeners, index); break; } } } } OnValueChangedDelegateWrapper[] onValueChangedListeners; /** * The 'value-changed' signal is emitted when the current value * that represent the object changes. @value is the numerical * representation of this new value. @text is the human * readable text alternative of @value, and can be NULL if it is * not available. Note that if there is a textual description * associated with the new numeric value, that description * should be included regardless of whether or not it has also * changed. * * Example: a password meter whose value changes as the user * types their new password. Appropiate value text would be * "weak", "acceptable" and "strong". * * Params: * value = the new value in a numerical form. * text = human readable text alternative (also called * description) of this object. NULL if not available. * * Since: 2.12 */ gulong addOnValueChanged(void delegate(double, string, ValueIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnValueChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "value-changed", cast(GCallback)&callBackValueChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackValueChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackValueChanged(AtkValue* valueStruct, double value, char* text, OnValueChangedDelegateWrapper wrapper) { wrapper.dlg(value, Str.toString(text), wrapper.outer); } extern(C) static void callBackValueChangedDestroy(OnValueChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/atk/Version.d000066400000000000000000000072111324604450400176220ustar00rootroot00000000000000/* * 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 atk.Version; private import atk.c.functions; public import atk.c.types; private import glib.Str; public import gtkc.atktypes; /** */ public struct Version { /** * Returns the binary age as passed to libtool when building the ATK * library the process is running against. * * Returns: the binary age of the ATK library * * Since: 2.8 */ public static uint getBinaryAge() { return atk_get_binary_age(); } /** * Returns the interface age as passed to libtool when building the * ATK library the process is running against. * * Returns: the interface age of the ATK library * * Since: 2.8 */ public static uint getInterfaceAge() { return atk_get_interface_age(); } /** * Returns the major version number of the ATK library. (e.g. in ATK * version 2.7.4 this is 2.) * * This function is in the library, so it represents the ATK library * your code is running against. In contrast, the #ATK_MAJOR_VERSION * macro represents the major version of the ATK headers you have * included when compiling your code. * * Returns: the major version number of the ATK library * * Since: 2.8 */ public static uint getMajorVersion() { return atk_get_major_version(); } /** * Returns the micro version number of the ATK library. (e.g. in ATK * version 2.7.4 this is 4.) * * This function is in the library, so it represents the ATK library * your code is are running against. In contrast, the * #ATK_MICRO_VERSION macro represents the micro version of the ATK * headers you have included when compiling your code. * * Returns: the micro version number of the ATK library * * Since: 2.8 */ public static uint getMicroVersion() { return atk_get_micro_version(); } /** * Returns the minor version number of the ATK library. (e.g. in ATK * version 2.7.4 this is 7.) * * This function is in the library, so it represents the ATK library * your code is are running against. In contrast, the * #ATK_MINOR_VERSION macro represents the minor version of the ATK * headers you have included when compiling your code. * * Returns: the minor version number of the ATK library * * Since: 2.8 */ public static uint getMinorVersion() { return atk_get_minor_version(); } /** * Gets version string for the GUI toolkit implementing ATK for this application. * * Returns: version string for the GUI toolkit implementing ATK for this application */ public static string getToolkitVersion() { return Str.toString(atk_get_toolkit_version()); } /** * Gets the current version for ATK. * * Returns: version string for ATK * * Since: 1.20 */ public static string getVersion() { return Str.toString(atk_get_version()); } } GtkD-3.7.5/generated/gtkd/atk/WindowIF.d000066400000000000000000000066731324604450400176760ustar00rootroot00000000000000/* * 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 atk.WindowIF; private import atk.c.functions; public import atk.c.types; private import gobject.Signals; public import gtkc.atktypes; private import std.algorithm; /** * #AtkWindow should be implemented by the UI elements that represent * a top-level window, such as the main window of an application or * dialog. */ public interface WindowIF{ /** Get the main Gtk struct */ public AtkWindow* getWindowStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return atk_window_get_type(); } /** * The signal #AtkWindow::activate is emitted when a window * becomes the active window of the application or session. * * Since: 2.2 */ gulong addOnActivate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The signal #AtkWindow::create is emitted when a new window * is created. * * Since: 2.2 */ gulong addOnCreate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The signal #AtkWindow::deactivate is emitted when a window is * no longer the active window of the application or session. * * Since: 2.2 */ gulong addOnDeactivate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The signal #AtkWindow::destroy is emitted when a window is * destroyed. * * Since: 2.2 */ gulong addOnDestroy(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The signal #AtkWindow::maximize is emitted when a window * is maximized. * * Since: 2.2 */ gulong addOnMaximize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The signal #AtkWindow::minimize is emitted when a window * is minimized. * * Since: 2.2 */ gulong addOnMinimize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The signal #AtkWindow::move is emitted when a window * is moved. * * Since: 2.2 */ gulong addOnMove(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The signal #AtkWindow::resize is emitted when a window * is resized. * * Since: 2.2 */ gulong addOnResize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * The signal #AtkWindow::restore is emitted when a window * is restored. * * Since: 2.2 */ gulong addOnRestore(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/atk/WindowT.d000066400000000000000000000316751324604450400176030ustar00rootroot00000000000000/* * 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 atk.WindowT; public import atk.c.functions; public import atk.c.types; public import gobject.Signals; public import gtkc.atktypes; public import std.algorithm; /** * #AtkWindow should be implemented by the UI elements that represent * a top-level window, such as the main window of an application or * dialog. */ public template WindowT(TStruct) { /** Get the main Gtk struct */ public AtkWindow* getWindowStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(AtkWindow*)getStruct(); } protected class OnActivateDelegateWrapper { void delegate(WindowIF) dlg; gulong handlerId; this(void delegate(WindowIF) dlg) { this.dlg = dlg; onActivateListeners ~= this; } void remove(OnActivateDelegateWrapper source) { foreach(index, wrapper; onActivateListeners) { if (wrapper.handlerId == source.handlerId) { onActivateListeners[index] = null; onActivateListeners = std.algorithm.remove(onActivateListeners, index); break; } } } } OnActivateDelegateWrapper[] onActivateListeners; /** * The signal #AtkWindow::activate is emitted when a window * becomes the active window of the application or session. * * Since: 2.2 */ gulong addOnActivate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActivateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "activate", cast(GCallback)&callBackActivate, cast(void*)wrapper, cast(GClosureNotify)&callBackActivateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActivate(AtkWindow* windowStruct, OnActivateDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackActivateDestroy(OnActivateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnCreateDelegateWrapper { void delegate(WindowIF) dlg; gulong handlerId; this(void delegate(WindowIF) dlg) { this.dlg = dlg; onCreateListeners ~= this; } void remove(OnCreateDelegateWrapper source) { foreach(index, wrapper; onCreateListeners) { if (wrapper.handlerId == source.handlerId) { onCreateListeners[index] = null; onCreateListeners = std.algorithm.remove(onCreateListeners, index); break; } } } } OnCreateDelegateWrapper[] onCreateListeners; /** * The signal #AtkWindow::create is emitted when a new window * is created. * * Since: 2.2 */ gulong addOnCreate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnCreateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "create", cast(GCallback)&callBackCreate, cast(void*)wrapper, cast(GClosureNotify)&callBackCreateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackCreate(AtkWindow* windowStruct, OnCreateDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackCreateDestroy(OnCreateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDeactivateDelegateWrapper { void delegate(WindowIF) dlg; gulong handlerId; this(void delegate(WindowIF) dlg) { this.dlg = dlg; onDeactivateListeners ~= this; } void remove(OnDeactivateDelegateWrapper source) { foreach(index, wrapper; onDeactivateListeners) { if (wrapper.handlerId == source.handlerId) { onDeactivateListeners[index] = null; onDeactivateListeners = std.algorithm.remove(onDeactivateListeners, index); break; } } } } OnDeactivateDelegateWrapper[] onDeactivateListeners; /** * The signal #AtkWindow::deactivate is emitted when a window is * no longer the active window of the application or session. * * Since: 2.2 */ gulong addOnDeactivate(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDeactivateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "deactivate", cast(GCallback)&callBackDeactivate, cast(void*)wrapper, cast(GClosureNotify)&callBackDeactivateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDeactivate(AtkWindow* windowStruct, OnDeactivateDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackDeactivateDestroy(OnDeactivateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDestroyDelegateWrapper { void delegate(WindowIF) dlg; gulong handlerId; this(void delegate(WindowIF) dlg) { this.dlg = dlg; onDestroyListeners ~= this; } void remove(OnDestroyDelegateWrapper source) { foreach(index, wrapper; onDestroyListeners) { if (wrapper.handlerId == source.handlerId) { onDestroyListeners[index] = null; onDestroyListeners = std.algorithm.remove(onDestroyListeners, index); break; } } } } OnDestroyDelegateWrapper[] onDestroyListeners; /** * The signal #AtkWindow::destroy is emitted when a window is * destroyed. * * Since: 2.2 */ gulong addOnDestroy(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDestroyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "destroy", cast(GCallback)&callBackDestroy, cast(void*)wrapper, cast(GClosureNotify)&callBackDestroyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDestroy(AtkWindow* windowStruct, OnDestroyDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackDestroyDestroy(OnDestroyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMaximizeDelegateWrapper { void delegate(WindowIF) dlg; gulong handlerId; this(void delegate(WindowIF) dlg) { this.dlg = dlg; onMaximizeListeners ~= this; } void remove(OnMaximizeDelegateWrapper source) { foreach(index, wrapper; onMaximizeListeners) { if (wrapper.handlerId == source.handlerId) { onMaximizeListeners[index] = null; onMaximizeListeners = std.algorithm.remove(onMaximizeListeners, index); break; } } } } OnMaximizeDelegateWrapper[] onMaximizeListeners; /** * The signal #AtkWindow::maximize is emitted when a window * is maximized. * * Since: 2.2 */ gulong addOnMaximize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMaximizeDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "maximize", cast(GCallback)&callBackMaximize, cast(void*)wrapper, cast(GClosureNotify)&callBackMaximizeDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMaximize(AtkWindow* windowStruct, OnMaximizeDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackMaximizeDestroy(OnMaximizeDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMinimizeDelegateWrapper { void delegate(WindowIF) dlg; gulong handlerId; this(void delegate(WindowIF) dlg) { this.dlg = dlg; onMinimizeListeners ~= this; } void remove(OnMinimizeDelegateWrapper source) { foreach(index, wrapper; onMinimizeListeners) { if (wrapper.handlerId == source.handlerId) { onMinimizeListeners[index] = null; onMinimizeListeners = std.algorithm.remove(onMinimizeListeners, index); break; } } } } OnMinimizeDelegateWrapper[] onMinimizeListeners; /** * The signal #AtkWindow::minimize is emitted when a window * is minimized. * * Since: 2.2 */ gulong addOnMinimize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMinimizeDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "minimize", cast(GCallback)&callBackMinimize, cast(void*)wrapper, cast(GClosureNotify)&callBackMinimizeDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMinimize(AtkWindow* windowStruct, OnMinimizeDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackMinimizeDestroy(OnMinimizeDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMoveDelegateWrapper { void delegate(WindowIF) dlg; gulong handlerId; this(void delegate(WindowIF) dlg) { this.dlg = dlg; onMoveListeners ~= this; } void remove(OnMoveDelegateWrapper source) { foreach(index, wrapper; onMoveListeners) { if (wrapper.handlerId == source.handlerId) { onMoveListeners[index] = null; onMoveListeners = std.algorithm.remove(onMoveListeners, index); break; } } } } OnMoveDelegateWrapper[] onMoveListeners; /** * The signal #AtkWindow::move is emitted when a window * is moved. * * Since: 2.2 */ gulong addOnMove(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMoveDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "move", cast(GCallback)&callBackMove, cast(void*)wrapper, cast(GClosureNotify)&callBackMoveDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMove(AtkWindow* windowStruct, OnMoveDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackMoveDestroy(OnMoveDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnResizeDelegateWrapper { void delegate(WindowIF) dlg; gulong handlerId; this(void delegate(WindowIF) dlg) { this.dlg = dlg; onResizeListeners ~= this; } void remove(OnResizeDelegateWrapper source) { foreach(index, wrapper; onResizeListeners) { if (wrapper.handlerId == source.handlerId) { onResizeListeners[index] = null; onResizeListeners = std.algorithm.remove(onResizeListeners, index); break; } } } } OnResizeDelegateWrapper[] onResizeListeners; /** * The signal #AtkWindow::resize is emitted when a window * is resized. * * Since: 2.2 */ gulong addOnResize(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnResizeDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "resize", cast(GCallback)&callBackResize, cast(void*)wrapper, cast(GClosureNotify)&callBackResizeDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackResize(AtkWindow* windowStruct, OnResizeDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackResizeDestroy(OnResizeDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnRestoreDelegateWrapper { void delegate(WindowIF) dlg; gulong handlerId; this(void delegate(WindowIF) dlg) { this.dlg = dlg; onRestoreListeners ~= this; } void remove(OnRestoreDelegateWrapper source) { foreach(index, wrapper; onRestoreListeners) { if (wrapper.handlerId == source.handlerId) { onRestoreListeners[index] = null; onRestoreListeners = std.algorithm.remove(onRestoreListeners, index); break; } } } } OnRestoreDelegateWrapper[] onRestoreListeners; /** * The signal #AtkWindow::restore is emitted when a window * is restored. * * Since: 2.2 */ gulong addOnRestore(void delegate(WindowIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnRestoreDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "restore", cast(GCallback)&callBackRestore, cast(void*)wrapper, cast(GClosureNotify)&callBackRestoreDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackRestore(AtkWindow* windowStruct, OnRestoreDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackRestoreDestroy(OnRestoreDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/atk/c/000077500000000000000000000000001324604450400162515ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/atk/c/functions.d000066400000000000000000001735611324604450400204430ustar00rootroot00000000000000/* * 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 atk.c.functions; import std.stdio; import atk.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_ATK = ["libatk-1.0-0.dll"]; else version (OSX) static immutable LIBRARY_ATK = ["libatk-1.0.0.dylib"]; else static immutable LIBRARY_ATK = ["libatk-1.0.so.0"]; shared static this() { // atk.Action Linker.link(atk_action_get_type, "atk_action_get_type", LIBRARY_ATK); Linker.link(atk_action_do_action, "atk_action_do_action", LIBRARY_ATK); Linker.link(atk_action_get_description, "atk_action_get_description", LIBRARY_ATK); Linker.link(atk_action_get_keybinding, "atk_action_get_keybinding", LIBRARY_ATK); Linker.link(atk_action_get_localized_name, "atk_action_get_localized_name", LIBRARY_ATK); Linker.link(atk_action_get_n_actions, "atk_action_get_n_actions", LIBRARY_ATK); Linker.link(atk_action_get_name, "atk_action_get_name", LIBRARY_ATK); Linker.link(atk_action_set_description, "atk_action_set_description", LIBRARY_ATK); // atk.Component Linker.link(atk_component_get_type, "atk_component_get_type", LIBRARY_ATK); Linker.link(atk_component_add_focus_handler, "atk_component_add_focus_handler", LIBRARY_ATK); Linker.link(atk_component_contains, "atk_component_contains", LIBRARY_ATK); Linker.link(atk_component_get_alpha, "atk_component_get_alpha", LIBRARY_ATK); Linker.link(atk_component_get_extents, "atk_component_get_extents", LIBRARY_ATK); Linker.link(atk_component_get_layer, "atk_component_get_layer", LIBRARY_ATK); Linker.link(atk_component_get_mdi_zorder, "atk_component_get_mdi_zorder", LIBRARY_ATK); Linker.link(atk_component_get_position, "atk_component_get_position", LIBRARY_ATK); Linker.link(atk_component_get_size, "atk_component_get_size", LIBRARY_ATK); Linker.link(atk_component_grab_focus, "atk_component_grab_focus", LIBRARY_ATK); Linker.link(atk_component_ref_accessible_at_point, "atk_component_ref_accessible_at_point", LIBRARY_ATK); Linker.link(atk_component_remove_focus_handler, "atk_component_remove_focus_handler", LIBRARY_ATK); Linker.link(atk_component_set_extents, "atk_component_set_extents", LIBRARY_ATK); Linker.link(atk_component_set_position, "atk_component_set_position", LIBRARY_ATK); Linker.link(atk_component_set_size, "atk_component_set_size", LIBRARY_ATK); // atk.Document Linker.link(atk_document_get_type, "atk_document_get_type", LIBRARY_ATK); Linker.link(atk_document_get_attribute_value, "atk_document_get_attribute_value", LIBRARY_ATK); Linker.link(atk_document_get_attributes, "atk_document_get_attributes", LIBRARY_ATK); Linker.link(atk_document_get_current_page_number, "atk_document_get_current_page_number", LIBRARY_ATK); Linker.link(atk_document_get_document, "atk_document_get_document", LIBRARY_ATK); Linker.link(atk_document_get_document_type, "atk_document_get_document_type", LIBRARY_ATK); Linker.link(atk_document_get_locale, "atk_document_get_locale", LIBRARY_ATK); Linker.link(atk_document_get_page_count, "atk_document_get_page_count", LIBRARY_ATK); Linker.link(atk_document_set_attribute_value, "atk_document_set_attribute_value", LIBRARY_ATK); // atk.EditableText Linker.link(atk_editable_text_get_type, "atk_editable_text_get_type", LIBRARY_ATK); Linker.link(atk_editable_text_copy_text, "atk_editable_text_copy_text", LIBRARY_ATK); Linker.link(atk_editable_text_cut_text, "atk_editable_text_cut_text", LIBRARY_ATK); Linker.link(atk_editable_text_delete_text, "atk_editable_text_delete_text", LIBRARY_ATK); Linker.link(atk_editable_text_insert_text, "atk_editable_text_insert_text", LIBRARY_ATK); Linker.link(atk_editable_text_paste_text, "atk_editable_text_paste_text", LIBRARY_ATK); Linker.link(atk_editable_text_set_run_attributes, "atk_editable_text_set_run_attributes", LIBRARY_ATK); Linker.link(atk_editable_text_set_text_contents, "atk_editable_text_set_text_contents", LIBRARY_ATK); // atk.GObjectAccessible Linker.link(atk_gobject_accessible_get_type, "atk_gobject_accessible_get_type", LIBRARY_ATK); Linker.link(atk_gobject_accessible_for_object, "atk_gobject_accessible_for_object", LIBRARY_ATK); Linker.link(atk_gobject_accessible_get_object, "atk_gobject_accessible_get_object", LIBRARY_ATK); // atk.Hyperlink Linker.link(atk_hyperlink_get_type, "atk_hyperlink_get_type", LIBRARY_ATK); Linker.link(atk_hyperlink_get_end_index, "atk_hyperlink_get_end_index", LIBRARY_ATK); Linker.link(atk_hyperlink_get_n_anchors, "atk_hyperlink_get_n_anchors", LIBRARY_ATK); Linker.link(atk_hyperlink_get_object, "atk_hyperlink_get_object", LIBRARY_ATK); Linker.link(atk_hyperlink_get_start_index, "atk_hyperlink_get_start_index", LIBRARY_ATK); Linker.link(atk_hyperlink_get_uri, "atk_hyperlink_get_uri", LIBRARY_ATK); Linker.link(atk_hyperlink_is_inline, "atk_hyperlink_is_inline", LIBRARY_ATK); Linker.link(atk_hyperlink_is_selected_link, "atk_hyperlink_is_selected_link", LIBRARY_ATK); Linker.link(atk_hyperlink_is_valid, "atk_hyperlink_is_valid", LIBRARY_ATK); // atk.HyperlinkImpl Linker.link(atk_hyperlink_impl_get_type, "atk_hyperlink_impl_get_type", LIBRARY_ATK); Linker.link(atk_hyperlink_impl_get_hyperlink, "atk_hyperlink_impl_get_hyperlink", LIBRARY_ATK); // atk.Hypertext Linker.link(atk_hypertext_get_type, "atk_hypertext_get_type", LIBRARY_ATK); Linker.link(atk_hypertext_get_link, "atk_hypertext_get_link", LIBRARY_ATK); Linker.link(atk_hypertext_get_link_index, "atk_hypertext_get_link_index", LIBRARY_ATK); Linker.link(atk_hypertext_get_n_links, "atk_hypertext_get_n_links", LIBRARY_ATK); // atk.Image Linker.link(atk_image_get_type, "atk_image_get_type", LIBRARY_ATK); Linker.link(atk_image_get_image_description, "atk_image_get_image_description", LIBRARY_ATK); Linker.link(atk_image_get_image_locale, "atk_image_get_image_locale", LIBRARY_ATK); Linker.link(atk_image_get_image_position, "atk_image_get_image_position", LIBRARY_ATK); Linker.link(atk_image_get_image_size, "atk_image_get_image_size", LIBRARY_ATK); Linker.link(atk_image_set_image_description, "atk_image_set_image_description", LIBRARY_ATK); // atk.Implementor Linker.link(atk_implementor_ref_accessible, "atk_implementor_ref_accessible", LIBRARY_ATK); Linker.link(atk_implementor_get_type, "atk_implementor_get_type", LIBRARY_ATK); // atk.Misc Linker.link(atk_misc_get_type, "atk_misc_get_type", LIBRARY_ATK); Linker.link(atk_misc_get_instance, "atk_misc_get_instance", LIBRARY_ATK); Linker.link(atk_misc_threads_enter, "atk_misc_threads_enter", LIBRARY_ATK); Linker.link(atk_misc_threads_leave, "atk_misc_threads_leave", LIBRARY_ATK); // atk.NoOpObject Linker.link(atk_no_op_object_get_type, "atk_no_op_object_get_type", LIBRARY_ATK); Linker.link(atk_no_op_object_new, "atk_no_op_object_new", LIBRARY_ATK); // atk.NoOpObjectFactory Linker.link(atk_no_op_object_factory_get_type, "atk_no_op_object_factory_get_type", LIBRARY_ATK); Linker.link(atk_no_op_object_factory_new, "atk_no_op_object_factory_new", LIBRARY_ATK); // atk.ObjectAtk Linker.link(atk_object_get_type, "atk_object_get_type", LIBRARY_ATK); Linker.link(atk_object_add_relationship, "atk_object_add_relationship", LIBRARY_ATK); Linker.link(atk_object_connect_property_change_handler, "atk_object_connect_property_change_handler", LIBRARY_ATK); Linker.link(atk_object_get_attributes, "atk_object_get_attributes", LIBRARY_ATK); Linker.link(atk_object_get_description, "atk_object_get_description", LIBRARY_ATK); Linker.link(atk_object_get_index_in_parent, "atk_object_get_index_in_parent", LIBRARY_ATK); Linker.link(atk_object_get_layer, "atk_object_get_layer", LIBRARY_ATK); Linker.link(atk_object_get_mdi_zorder, "atk_object_get_mdi_zorder", LIBRARY_ATK); Linker.link(atk_object_get_n_accessible_children, "atk_object_get_n_accessible_children", LIBRARY_ATK); Linker.link(atk_object_get_name, "atk_object_get_name", LIBRARY_ATK); Linker.link(atk_object_get_object_locale, "atk_object_get_object_locale", LIBRARY_ATK); Linker.link(atk_object_get_parent, "atk_object_get_parent", LIBRARY_ATK); Linker.link(atk_object_get_role, "atk_object_get_role", LIBRARY_ATK); Linker.link(atk_object_initialize, "atk_object_initialize", LIBRARY_ATK); Linker.link(atk_object_notify_state_change, "atk_object_notify_state_change", LIBRARY_ATK); Linker.link(atk_object_peek_parent, "atk_object_peek_parent", LIBRARY_ATK); Linker.link(atk_object_ref_accessible_child, "atk_object_ref_accessible_child", LIBRARY_ATK); Linker.link(atk_object_ref_relation_set, "atk_object_ref_relation_set", LIBRARY_ATK); Linker.link(atk_object_ref_state_set, "atk_object_ref_state_set", LIBRARY_ATK); Linker.link(atk_object_remove_property_change_handler, "atk_object_remove_property_change_handler", LIBRARY_ATK); Linker.link(atk_object_remove_relationship, "atk_object_remove_relationship", LIBRARY_ATK); Linker.link(atk_object_set_description, "atk_object_set_description", LIBRARY_ATK); Linker.link(atk_object_set_name, "atk_object_set_name", LIBRARY_ATK); Linker.link(atk_object_set_parent, "atk_object_set_parent", LIBRARY_ATK); Linker.link(atk_object_set_role, "atk_object_set_role", LIBRARY_ATK); Linker.link(atk_role_for_name, "atk_role_for_name", LIBRARY_ATK); Linker.link(atk_role_get_localized_name, "atk_role_get_localized_name", LIBRARY_ATK); Linker.link(atk_role_get_name, "atk_role_get_name", LIBRARY_ATK); Linker.link(atk_role_register, "atk_role_register", LIBRARY_ATK); // atk.ObjectFactory Linker.link(atk_object_factory_get_type, "atk_object_factory_get_type", LIBRARY_ATK); Linker.link(atk_object_factory_create_accessible, "atk_object_factory_create_accessible", LIBRARY_ATK); Linker.link(atk_object_factory_get_accessible_type, "atk_object_factory_get_accessible_type", LIBRARY_ATK); Linker.link(atk_object_factory_invalidate, "atk_object_factory_invalidate", LIBRARY_ATK); // atk.Plug Linker.link(atk_plug_get_type, "atk_plug_get_type", LIBRARY_ATK); Linker.link(atk_plug_new, "atk_plug_new", LIBRARY_ATK); Linker.link(atk_plug_get_id, "atk_plug_get_id", LIBRARY_ATK); // atk.Range Linker.link(atk_range_get_type, "atk_range_get_type", LIBRARY_ATK); Linker.link(atk_range_new, "atk_range_new", LIBRARY_ATK); Linker.link(atk_range_copy, "atk_range_copy", LIBRARY_ATK); Linker.link(atk_range_free, "atk_range_free", LIBRARY_ATK); Linker.link(atk_range_get_description, "atk_range_get_description", LIBRARY_ATK); Linker.link(atk_range_get_lower_limit, "atk_range_get_lower_limit", LIBRARY_ATK); Linker.link(atk_range_get_upper_limit, "atk_range_get_upper_limit", LIBRARY_ATK); // atk.Rectangle Linker.link(atk_rectangle_get_type, "atk_rectangle_get_type", LIBRARY_ATK); // atk.Registry Linker.link(atk_registry_get_type, "atk_registry_get_type", LIBRARY_ATK); Linker.link(atk_registry_get_factory, "atk_registry_get_factory", LIBRARY_ATK); Linker.link(atk_registry_get_factory_type, "atk_registry_get_factory_type", LIBRARY_ATK); Linker.link(atk_registry_set_factory_type, "atk_registry_set_factory_type", LIBRARY_ATK); Linker.link(atk_get_default_registry, "atk_get_default_registry", LIBRARY_ATK); // atk.Relation Linker.link(atk_relation_get_type, "atk_relation_get_type", LIBRARY_ATK); Linker.link(atk_relation_new, "atk_relation_new", LIBRARY_ATK); Linker.link(atk_relation_add_target, "atk_relation_add_target", LIBRARY_ATK); Linker.link(atk_relation_get_relation_type, "atk_relation_get_relation_type", LIBRARY_ATK); Linker.link(atk_relation_get_target, "atk_relation_get_target", LIBRARY_ATK); Linker.link(atk_relation_remove_target, "atk_relation_remove_target", LIBRARY_ATK); Linker.link(atk_relation_type_for_name, "atk_relation_type_for_name", LIBRARY_ATK); Linker.link(atk_relation_type_get_name, "atk_relation_type_get_name", LIBRARY_ATK); Linker.link(atk_relation_type_register, "atk_relation_type_register", LIBRARY_ATK); // atk.RelationSet Linker.link(atk_relation_set_get_type, "atk_relation_set_get_type", LIBRARY_ATK); Linker.link(atk_relation_set_new, "atk_relation_set_new", LIBRARY_ATK); Linker.link(atk_relation_set_add, "atk_relation_set_add", LIBRARY_ATK); Linker.link(atk_relation_set_add_relation_by_type, "atk_relation_set_add_relation_by_type", LIBRARY_ATK); Linker.link(atk_relation_set_contains, "atk_relation_set_contains", LIBRARY_ATK); Linker.link(atk_relation_set_contains_target, "atk_relation_set_contains_target", LIBRARY_ATK); Linker.link(atk_relation_set_get_n_relations, "atk_relation_set_get_n_relations", LIBRARY_ATK); Linker.link(atk_relation_set_get_relation, "atk_relation_set_get_relation", LIBRARY_ATK); Linker.link(atk_relation_set_get_relation_by_type, "atk_relation_set_get_relation_by_type", LIBRARY_ATK); Linker.link(atk_relation_set_remove, "atk_relation_set_remove", LIBRARY_ATK); // atk.Selection Linker.link(atk_selection_get_type, "atk_selection_get_type", LIBRARY_ATK); Linker.link(atk_selection_add_selection, "atk_selection_add_selection", LIBRARY_ATK); Linker.link(atk_selection_clear_selection, "atk_selection_clear_selection", LIBRARY_ATK); Linker.link(atk_selection_get_selection_count, "atk_selection_get_selection_count", LIBRARY_ATK); Linker.link(atk_selection_is_child_selected, "atk_selection_is_child_selected", LIBRARY_ATK); Linker.link(atk_selection_ref_selection, "atk_selection_ref_selection", LIBRARY_ATK); Linker.link(atk_selection_remove_selection, "atk_selection_remove_selection", LIBRARY_ATK); Linker.link(atk_selection_select_all_selection, "atk_selection_select_all_selection", LIBRARY_ATK); // atk.Socket Linker.link(atk_socket_get_type, "atk_socket_get_type", LIBRARY_ATK); Linker.link(atk_socket_new, "atk_socket_new", LIBRARY_ATK); Linker.link(atk_socket_embed, "atk_socket_embed", LIBRARY_ATK); Linker.link(atk_socket_is_occupied, "atk_socket_is_occupied", LIBRARY_ATK); // atk.StateSet Linker.link(atk_state_set_get_type, "atk_state_set_get_type", LIBRARY_ATK); Linker.link(atk_state_set_new, "atk_state_set_new", LIBRARY_ATK); Linker.link(atk_state_set_add_state, "atk_state_set_add_state", LIBRARY_ATK); Linker.link(atk_state_set_add_states, "atk_state_set_add_states", LIBRARY_ATK); Linker.link(atk_state_set_and_sets, "atk_state_set_and_sets", LIBRARY_ATK); Linker.link(atk_state_set_clear_states, "atk_state_set_clear_states", LIBRARY_ATK); Linker.link(atk_state_set_contains_state, "atk_state_set_contains_state", LIBRARY_ATK); Linker.link(atk_state_set_contains_states, "atk_state_set_contains_states", LIBRARY_ATK); Linker.link(atk_state_set_is_empty, "atk_state_set_is_empty", LIBRARY_ATK); Linker.link(atk_state_set_or_sets, "atk_state_set_or_sets", LIBRARY_ATK); Linker.link(atk_state_set_remove_state, "atk_state_set_remove_state", LIBRARY_ATK); Linker.link(atk_state_set_xor_sets, "atk_state_set_xor_sets", LIBRARY_ATK); // atk.StreamableContent Linker.link(atk_streamable_content_get_type, "atk_streamable_content_get_type", LIBRARY_ATK); Linker.link(atk_streamable_content_get_mime_type, "atk_streamable_content_get_mime_type", LIBRARY_ATK); Linker.link(atk_streamable_content_get_n_mime_types, "atk_streamable_content_get_n_mime_types", LIBRARY_ATK); Linker.link(atk_streamable_content_get_stream, "atk_streamable_content_get_stream", LIBRARY_ATK); Linker.link(atk_streamable_content_get_uri, "atk_streamable_content_get_uri", LIBRARY_ATK); // atk.Table Linker.link(atk_table_get_type, "atk_table_get_type", LIBRARY_ATK); Linker.link(atk_table_add_column_selection, "atk_table_add_column_selection", LIBRARY_ATK); Linker.link(atk_table_add_row_selection, "atk_table_add_row_selection", LIBRARY_ATK); Linker.link(atk_table_get_caption, "atk_table_get_caption", LIBRARY_ATK); Linker.link(atk_table_get_column_at_index, "atk_table_get_column_at_index", LIBRARY_ATK); Linker.link(atk_table_get_column_description, "atk_table_get_column_description", LIBRARY_ATK); Linker.link(atk_table_get_column_extent_at, "atk_table_get_column_extent_at", LIBRARY_ATK); Linker.link(atk_table_get_column_header, "atk_table_get_column_header", LIBRARY_ATK); Linker.link(atk_table_get_index_at, "atk_table_get_index_at", LIBRARY_ATK); Linker.link(atk_table_get_n_columns, "atk_table_get_n_columns", LIBRARY_ATK); Linker.link(atk_table_get_n_rows, "atk_table_get_n_rows", LIBRARY_ATK); Linker.link(atk_table_get_row_at_index, "atk_table_get_row_at_index", LIBRARY_ATK); Linker.link(atk_table_get_row_description, "atk_table_get_row_description", LIBRARY_ATK); Linker.link(atk_table_get_row_extent_at, "atk_table_get_row_extent_at", LIBRARY_ATK); Linker.link(atk_table_get_row_header, "atk_table_get_row_header", LIBRARY_ATK); Linker.link(atk_table_get_selected_columns, "atk_table_get_selected_columns", LIBRARY_ATK); Linker.link(atk_table_get_selected_rows, "atk_table_get_selected_rows", LIBRARY_ATK); Linker.link(atk_table_get_summary, "atk_table_get_summary", LIBRARY_ATK); Linker.link(atk_table_is_column_selected, "atk_table_is_column_selected", LIBRARY_ATK); Linker.link(atk_table_is_row_selected, "atk_table_is_row_selected", LIBRARY_ATK); Linker.link(atk_table_is_selected, "atk_table_is_selected", LIBRARY_ATK); Linker.link(atk_table_ref_at, "atk_table_ref_at", LIBRARY_ATK); Linker.link(atk_table_remove_column_selection, "atk_table_remove_column_selection", LIBRARY_ATK); Linker.link(atk_table_remove_row_selection, "atk_table_remove_row_selection", LIBRARY_ATK); Linker.link(atk_table_set_caption, "atk_table_set_caption", LIBRARY_ATK); Linker.link(atk_table_set_column_description, "atk_table_set_column_description", LIBRARY_ATK); Linker.link(atk_table_set_column_header, "atk_table_set_column_header", LIBRARY_ATK); Linker.link(atk_table_set_row_description, "atk_table_set_row_description", LIBRARY_ATK); Linker.link(atk_table_set_row_header, "atk_table_set_row_header", LIBRARY_ATK); Linker.link(atk_table_set_summary, "atk_table_set_summary", LIBRARY_ATK); // atk.TableCell Linker.link(atk_table_cell_get_type, "atk_table_cell_get_type", LIBRARY_ATK); Linker.link(atk_table_cell_get_column_header_cells, "atk_table_cell_get_column_header_cells", LIBRARY_ATK); Linker.link(atk_table_cell_get_column_span, "atk_table_cell_get_column_span", LIBRARY_ATK); Linker.link(atk_table_cell_get_position, "atk_table_cell_get_position", LIBRARY_ATK); Linker.link(atk_table_cell_get_row_column_span, "atk_table_cell_get_row_column_span", LIBRARY_ATK); Linker.link(atk_table_cell_get_row_header_cells, "atk_table_cell_get_row_header_cells", LIBRARY_ATK); Linker.link(atk_table_cell_get_row_span, "atk_table_cell_get_row_span", LIBRARY_ATK); Linker.link(atk_table_cell_get_table, "atk_table_cell_get_table", LIBRARY_ATK); // atk.Text Linker.link(atk_text_get_type, "atk_text_get_type", LIBRARY_ATK); Linker.link(atk_text_free_ranges, "atk_text_free_ranges", LIBRARY_ATK); Linker.link(atk_text_add_selection, "atk_text_add_selection", LIBRARY_ATK); Linker.link(atk_text_get_bounded_ranges, "atk_text_get_bounded_ranges", LIBRARY_ATK); Linker.link(atk_text_get_caret_offset, "atk_text_get_caret_offset", LIBRARY_ATK); Linker.link(atk_text_get_character_at_offset, "atk_text_get_character_at_offset", LIBRARY_ATK); Linker.link(atk_text_get_character_count, "atk_text_get_character_count", LIBRARY_ATK); Linker.link(atk_text_get_character_extents, "atk_text_get_character_extents", LIBRARY_ATK); Linker.link(atk_text_get_default_attributes, "atk_text_get_default_attributes", LIBRARY_ATK); Linker.link(atk_text_get_n_selections, "atk_text_get_n_selections", LIBRARY_ATK); Linker.link(atk_text_get_offset_at_point, "atk_text_get_offset_at_point", LIBRARY_ATK); Linker.link(atk_text_get_range_extents, "atk_text_get_range_extents", LIBRARY_ATK); Linker.link(atk_text_get_run_attributes, "atk_text_get_run_attributes", LIBRARY_ATK); Linker.link(atk_text_get_selection, "atk_text_get_selection", LIBRARY_ATK); Linker.link(atk_text_get_string_at_offset, "atk_text_get_string_at_offset", LIBRARY_ATK); Linker.link(atk_text_get_text, "atk_text_get_text", LIBRARY_ATK); Linker.link(atk_text_get_text_after_offset, "atk_text_get_text_after_offset", LIBRARY_ATK); Linker.link(atk_text_get_text_at_offset, "atk_text_get_text_at_offset", LIBRARY_ATK); Linker.link(atk_text_get_text_before_offset, "atk_text_get_text_before_offset", LIBRARY_ATK); Linker.link(atk_text_remove_selection, "atk_text_remove_selection", LIBRARY_ATK); Linker.link(atk_text_set_caret_offset, "atk_text_set_caret_offset", LIBRARY_ATK); Linker.link(atk_text_set_selection, "atk_text_set_selection", LIBRARY_ATK); Linker.link(atk_attribute_set_free, "atk_attribute_set_free", LIBRARY_ATK); Linker.link(atk_text_attribute_for_name, "atk_text_attribute_for_name", LIBRARY_ATK); Linker.link(atk_text_attribute_get_name, "atk_text_attribute_get_name", LIBRARY_ATK); Linker.link(atk_text_attribute_get_value, "atk_text_attribute_get_value", LIBRARY_ATK); Linker.link(atk_text_attribute_register, "atk_text_attribute_register", LIBRARY_ATK); // atk.TextRange Linker.link(atk_text_range_get_type, "atk_text_range_get_type", LIBRARY_ATK); // atk.Util Linker.link(atk_util_get_type, "atk_util_get_type", LIBRARY_ATK); Linker.link(atk_add_focus_tracker, "atk_add_focus_tracker", LIBRARY_ATK); Linker.link(atk_add_global_event_listener, "atk_add_global_event_listener", LIBRARY_ATK); Linker.link(atk_add_key_event_listener, "atk_add_key_event_listener", LIBRARY_ATK); Linker.link(atk_focus_tracker_init, "atk_focus_tracker_init", LIBRARY_ATK); Linker.link(atk_focus_tracker_notify, "atk_focus_tracker_notify", LIBRARY_ATK); Linker.link(atk_get_focus_object, "atk_get_focus_object", LIBRARY_ATK); Linker.link(atk_get_root, "atk_get_root", LIBRARY_ATK); Linker.link(atk_get_toolkit_name, "atk_get_toolkit_name", LIBRARY_ATK); Linker.link(atk_remove_focus_tracker, "atk_remove_focus_tracker", LIBRARY_ATK); Linker.link(atk_remove_global_event_listener, "atk_remove_global_event_listener", LIBRARY_ATK); Linker.link(atk_remove_key_event_listener, "atk_remove_key_event_listener", LIBRARY_ATK); // atk.Value Linker.link(atk_value_get_type, "atk_value_get_type", LIBRARY_ATK); Linker.link(atk_value_get_current_value, "atk_value_get_current_value", LIBRARY_ATK); Linker.link(atk_value_get_increment, "atk_value_get_increment", LIBRARY_ATK); Linker.link(atk_value_get_maximum_value, "atk_value_get_maximum_value", LIBRARY_ATK); Linker.link(atk_value_get_minimum_increment, "atk_value_get_minimum_increment", LIBRARY_ATK); Linker.link(atk_value_get_minimum_value, "atk_value_get_minimum_value", LIBRARY_ATK); Linker.link(atk_value_get_range, "atk_value_get_range", LIBRARY_ATK); Linker.link(atk_value_get_sub_ranges, "atk_value_get_sub_ranges", LIBRARY_ATK); Linker.link(atk_value_get_value_and_text, "atk_value_get_value_and_text", LIBRARY_ATK); Linker.link(atk_value_set_current_value, "atk_value_set_current_value", LIBRARY_ATK); Linker.link(atk_value_set_value, "atk_value_set_value", LIBRARY_ATK); // atk.Window Linker.link(atk_window_get_type, "atk_window_get_type", LIBRARY_ATK); // atk.Version Linker.link(atk_get_binary_age, "atk_get_binary_age", LIBRARY_ATK); Linker.link(atk_get_interface_age, "atk_get_interface_age", LIBRARY_ATK); Linker.link(atk_get_major_version, "atk_get_major_version", LIBRARY_ATK); Linker.link(atk_get_micro_version, "atk_get_micro_version", LIBRARY_ATK); Linker.link(atk_get_minor_version, "atk_get_minor_version", LIBRARY_ATK); Linker.link(atk_get_toolkit_version, "atk_get_toolkit_version", LIBRARY_ATK); Linker.link(atk_get_version, "atk_get_version", LIBRARY_ATK); // atk.State Linker.link(atk_state_type_for_name, "atk_state_type_for_name", LIBRARY_ATK); Linker.link(atk_state_type_get_name, "atk_state_type_get_name", LIBRARY_ATK); Linker.link(atk_state_type_register, "atk_state_type_register", LIBRARY_ATK); } __gshared extern(C) { // atk.Action GType function() c_atk_action_get_type; int function(AtkAction* action, int i) c_atk_action_do_action; const(char)* function(AtkAction* action, int i) c_atk_action_get_description; const(char)* function(AtkAction* action, int i) c_atk_action_get_keybinding; const(char)* function(AtkAction* action, int i) c_atk_action_get_localized_name; int function(AtkAction* action) c_atk_action_get_n_actions; const(char)* function(AtkAction* action, int i) c_atk_action_get_name; int function(AtkAction* action, int i, const(char)* desc) c_atk_action_set_description; // atk.Component GType function() c_atk_component_get_type; uint function(AtkComponent* component, AtkFocusHandler handler) c_atk_component_add_focus_handler; int function(AtkComponent* component, int x, int y, AtkCoordType coordType) c_atk_component_contains; double function(AtkComponent* component) c_atk_component_get_alpha; void function(AtkComponent* component, int* x, int* y, int* width, int* height, AtkCoordType coordType) c_atk_component_get_extents; AtkLayer function(AtkComponent* component) c_atk_component_get_layer; int function(AtkComponent* component) c_atk_component_get_mdi_zorder; void function(AtkComponent* component, int* x, int* y, AtkCoordType coordType) c_atk_component_get_position; void function(AtkComponent* component, int* width, int* height) c_atk_component_get_size; int function(AtkComponent* component) c_atk_component_grab_focus; AtkObject* function(AtkComponent* component, int x, int y, AtkCoordType coordType) c_atk_component_ref_accessible_at_point; void function(AtkComponent* component, uint handlerId) c_atk_component_remove_focus_handler; int function(AtkComponent* component, int x, int y, int width, int height, AtkCoordType coordType) c_atk_component_set_extents; int function(AtkComponent* component, int x, int y, AtkCoordType coordType) c_atk_component_set_position; int function(AtkComponent* component, int width, int height) c_atk_component_set_size; // atk.Document GType function() c_atk_document_get_type; const(char)* function(AtkDocument* document, const(char)* attributeName) c_atk_document_get_attribute_value; AtkAttributeSet* function(AtkDocument* document) c_atk_document_get_attributes; int function(AtkDocument* document) c_atk_document_get_current_page_number; void* function(AtkDocument* document) c_atk_document_get_document; const(char)* function(AtkDocument* document) c_atk_document_get_document_type; const(char)* function(AtkDocument* document) c_atk_document_get_locale; int function(AtkDocument* document) c_atk_document_get_page_count; int function(AtkDocument* document, const(char)* attributeName, const(char)* attributeValue) c_atk_document_set_attribute_value; // atk.EditableText GType function() c_atk_editable_text_get_type; void function(AtkEditableText* text, int startPos, int endPos) c_atk_editable_text_copy_text; void function(AtkEditableText* text, int startPos, int endPos) c_atk_editable_text_cut_text; void function(AtkEditableText* text, int startPos, int endPos) c_atk_editable_text_delete_text; void function(AtkEditableText* text, const(char)* str, int length, int* position) c_atk_editable_text_insert_text; void function(AtkEditableText* text, int position) c_atk_editable_text_paste_text; int function(AtkEditableText* text, AtkAttributeSet* attribSet, int startOffset, int endOffset) c_atk_editable_text_set_run_attributes; void function(AtkEditableText* text, const(char)* str) c_atk_editable_text_set_text_contents; // atk.GObjectAccessible GType function() c_atk_gobject_accessible_get_type; AtkObject* function(GObject* obj) c_atk_gobject_accessible_for_object; GObject* function(AtkGObjectAccessible* obj) c_atk_gobject_accessible_get_object; // atk.Hyperlink GType function() c_atk_hyperlink_get_type; int function(AtkHyperlink* link) c_atk_hyperlink_get_end_index; int function(AtkHyperlink* link) c_atk_hyperlink_get_n_anchors; AtkObject* function(AtkHyperlink* link, int i) c_atk_hyperlink_get_object; int function(AtkHyperlink* link) c_atk_hyperlink_get_start_index; char* function(AtkHyperlink* link, int i) c_atk_hyperlink_get_uri; int function(AtkHyperlink* link) c_atk_hyperlink_is_inline; int function(AtkHyperlink* link) c_atk_hyperlink_is_selected_link; int function(AtkHyperlink* link) c_atk_hyperlink_is_valid; // atk.HyperlinkImpl GType function() c_atk_hyperlink_impl_get_type; AtkHyperlink* function(AtkHyperlinkImpl* impl) c_atk_hyperlink_impl_get_hyperlink; // atk.Hypertext GType function() c_atk_hypertext_get_type; AtkHyperlink* function(AtkHypertext* hypertext, int linkIndex) c_atk_hypertext_get_link; int function(AtkHypertext* hypertext, int charIndex) c_atk_hypertext_get_link_index; int function(AtkHypertext* hypertext) c_atk_hypertext_get_n_links; // atk.Image GType function() c_atk_image_get_type; const(char)* function(AtkImage* image) c_atk_image_get_image_description; const(char)* function(AtkImage* image) c_atk_image_get_image_locale; void function(AtkImage* image, int* x, int* y, AtkCoordType coordType) c_atk_image_get_image_position; void function(AtkImage* image, int* width, int* height) c_atk_image_get_image_size; int function(AtkImage* image, const(char)* description) c_atk_image_set_image_description; // atk.Implementor AtkObject* function(AtkImplementor* implementor) c_atk_implementor_ref_accessible; GType function() c_atk_implementor_get_type; // atk.Misc GType function() c_atk_misc_get_type; AtkMisc* function() c_atk_misc_get_instance; void function(AtkMisc* misc) c_atk_misc_threads_enter; void function(AtkMisc* misc) c_atk_misc_threads_leave; // atk.NoOpObject GType function() c_atk_no_op_object_get_type; AtkObject* function(GObject* obj) c_atk_no_op_object_new; // atk.NoOpObjectFactory GType function() c_atk_no_op_object_factory_get_type; AtkObjectFactory* function() c_atk_no_op_object_factory_new; // atk.ObjectAtk GType function() c_atk_object_get_type; int function(AtkObject* object, AtkRelationType relationship, AtkObject* target) c_atk_object_add_relationship; uint function(AtkObject* accessible, AtkPropertyChangeHandler* handler) c_atk_object_connect_property_change_handler; AtkAttributeSet* function(AtkObject* accessible) c_atk_object_get_attributes; const(char)* function(AtkObject* accessible) c_atk_object_get_description; int function(AtkObject* accessible) c_atk_object_get_index_in_parent; AtkLayer function(AtkObject* accessible) c_atk_object_get_layer; int function(AtkObject* accessible) c_atk_object_get_mdi_zorder; int function(AtkObject* accessible) c_atk_object_get_n_accessible_children; const(char)* function(AtkObject* accessible) c_atk_object_get_name; const(char)* function(AtkObject* accessible) c_atk_object_get_object_locale; AtkObject* function(AtkObject* accessible) c_atk_object_get_parent; AtkRole function(AtkObject* accessible) c_atk_object_get_role; void function(AtkObject* accessible, void* data) c_atk_object_initialize; void function(AtkObject* accessible, AtkState state, int value) c_atk_object_notify_state_change; AtkObject* function(AtkObject* accessible) c_atk_object_peek_parent; AtkObject* function(AtkObject* accessible, int i) c_atk_object_ref_accessible_child; AtkRelationSet* function(AtkObject* accessible) c_atk_object_ref_relation_set; AtkStateSet* function(AtkObject* accessible) c_atk_object_ref_state_set; void function(AtkObject* accessible, uint handlerId) c_atk_object_remove_property_change_handler; int function(AtkObject* object, AtkRelationType relationship, AtkObject* target) c_atk_object_remove_relationship; void function(AtkObject* accessible, const(char)* description) c_atk_object_set_description; void function(AtkObject* accessible, const(char)* name) c_atk_object_set_name; void function(AtkObject* accessible, AtkObject* parent) c_atk_object_set_parent; void function(AtkObject* accessible, AtkRole role) c_atk_object_set_role; AtkRole function(const(char)* name) c_atk_role_for_name; const(char)* function(AtkRole role) c_atk_role_get_localized_name; const(char)* function(AtkRole role) c_atk_role_get_name; AtkRole function(const(char)* name) c_atk_role_register; // atk.ObjectFactory GType function() c_atk_object_factory_get_type; AtkObject* function(AtkObjectFactory* factory, GObject* obj) c_atk_object_factory_create_accessible; GType function(AtkObjectFactory* factory) c_atk_object_factory_get_accessible_type; void function(AtkObjectFactory* factory) c_atk_object_factory_invalidate; // atk.Plug GType function() c_atk_plug_get_type; AtkObject* function() c_atk_plug_new; char* function(AtkPlug* plug) c_atk_plug_get_id; // atk.Range GType function() c_atk_range_get_type; AtkRange* function(double lowerLimit, double upperLimit, const(char)* description) c_atk_range_new; AtkRange* function(AtkRange* src) c_atk_range_copy; void function(AtkRange* range) c_atk_range_free; const(char)* function(AtkRange* range) c_atk_range_get_description; double function(AtkRange* range) c_atk_range_get_lower_limit; double function(AtkRange* range) c_atk_range_get_upper_limit; // atk.Rectangle GType function() c_atk_rectangle_get_type; // atk.Registry GType function() c_atk_registry_get_type; AtkObjectFactory* function(AtkRegistry* registry, GType type) c_atk_registry_get_factory; GType function(AtkRegistry* registry, GType type) c_atk_registry_get_factory_type; void function(AtkRegistry* registry, GType type, GType factoryType) c_atk_registry_set_factory_type; AtkRegistry* function() c_atk_get_default_registry; // atk.Relation GType function() c_atk_relation_get_type; AtkRelation* function(AtkObject** targets, int nTargets, AtkRelationType relationship) c_atk_relation_new; void function(AtkRelation* relation, AtkObject* target) c_atk_relation_add_target; AtkRelationType function(AtkRelation* relation) c_atk_relation_get_relation_type; GPtrArray* function(AtkRelation* relation) c_atk_relation_get_target; int function(AtkRelation* relation, AtkObject* target) c_atk_relation_remove_target; AtkRelationType function(const(char)* name) c_atk_relation_type_for_name; const(char)* function(AtkRelationType type) c_atk_relation_type_get_name; AtkRelationType function(const(char)* name) c_atk_relation_type_register; // atk.RelationSet GType function() c_atk_relation_set_get_type; AtkRelationSet* function() c_atk_relation_set_new; void function(AtkRelationSet* set, AtkRelation* relation) c_atk_relation_set_add; void function(AtkRelationSet* set, AtkRelationType relationship, AtkObject* target) c_atk_relation_set_add_relation_by_type; int function(AtkRelationSet* set, AtkRelationType relationship) c_atk_relation_set_contains; int function(AtkRelationSet* set, AtkRelationType relationship, AtkObject* target) c_atk_relation_set_contains_target; int function(AtkRelationSet* set) c_atk_relation_set_get_n_relations; AtkRelation* function(AtkRelationSet* set, int i) c_atk_relation_set_get_relation; AtkRelation* function(AtkRelationSet* set, AtkRelationType relationship) c_atk_relation_set_get_relation_by_type; void function(AtkRelationSet* set, AtkRelation* relation) c_atk_relation_set_remove; // atk.Selection GType function() c_atk_selection_get_type; int function(AtkSelection* selection, int i) c_atk_selection_add_selection; int function(AtkSelection* selection) c_atk_selection_clear_selection; int function(AtkSelection* selection) c_atk_selection_get_selection_count; int function(AtkSelection* selection, int i) c_atk_selection_is_child_selected; AtkObject* function(AtkSelection* selection, int i) c_atk_selection_ref_selection; int function(AtkSelection* selection, int i) c_atk_selection_remove_selection; int function(AtkSelection* selection) c_atk_selection_select_all_selection; // atk.Socket GType function() c_atk_socket_get_type; AtkObject* function() c_atk_socket_new; void function(AtkSocket* obj, char* plugId) c_atk_socket_embed; int function(AtkSocket* obj) c_atk_socket_is_occupied; // atk.StateSet GType function() c_atk_state_set_get_type; AtkStateSet* function() c_atk_state_set_new; int function(AtkStateSet* set, AtkStateType type) c_atk_state_set_add_state; void function(AtkStateSet* set, AtkStateType* types, int nTypes) c_atk_state_set_add_states; AtkStateSet* function(AtkStateSet* set, AtkStateSet* compareSet) c_atk_state_set_and_sets; void function(AtkStateSet* set) c_atk_state_set_clear_states; int function(AtkStateSet* set, AtkStateType type) c_atk_state_set_contains_state; int function(AtkStateSet* set, AtkStateType* types, int nTypes) c_atk_state_set_contains_states; int function(AtkStateSet* set) c_atk_state_set_is_empty; AtkStateSet* function(AtkStateSet* set, AtkStateSet* compareSet) c_atk_state_set_or_sets; int function(AtkStateSet* set, AtkStateType type) c_atk_state_set_remove_state; AtkStateSet* function(AtkStateSet* set, AtkStateSet* compareSet) c_atk_state_set_xor_sets; // atk.StreamableContent GType function() c_atk_streamable_content_get_type; const(char)* function(AtkStreamableContent* streamable, int i) c_atk_streamable_content_get_mime_type; int function(AtkStreamableContent* streamable) c_atk_streamable_content_get_n_mime_types; GIOChannel* function(AtkStreamableContent* streamable, const(char)* mimeType) c_atk_streamable_content_get_stream; const(char)* function(AtkStreamableContent* streamable, const(char)* mimeType) c_atk_streamable_content_get_uri; // atk.Table GType function() c_atk_table_get_type; int function(AtkTable* table, int column) c_atk_table_add_column_selection; int function(AtkTable* table, int row) c_atk_table_add_row_selection; AtkObject* function(AtkTable* table) c_atk_table_get_caption; int function(AtkTable* table, int index) c_atk_table_get_column_at_index; const(char)* function(AtkTable* table, int column) c_atk_table_get_column_description; int function(AtkTable* table, int row, int column) c_atk_table_get_column_extent_at; AtkObject* function(AtkTable* table, int column) c_atk_table_get_column_header; int function(AtkTable* table, int row, int column) c_atk_table_get_index_at; int function(AtkTable* table) c_atk_table_get_n_columns; int function(AtkTable* table) c_atk_table_get_n_rows; int function(AtkTable* table, int index) c_atk_table_get_row_at_index; const(char)* function(AtkTable* table, int row) c_atk_table_get_row_description; int function(AtkTable* table, int row, int column) c_atk_table_get_row_extent_at; AtkObject* function(AtkTable* table, int row) c_atk_table_get_row_header; int function(AtkTable* table, int** selected) c_atk_table_get_selected_columns; int function(AtkTable* table, int** selected) c_atk_table_get_selected_rows; AtkObject* function(AtkTable* table) c_atk_table_get_summary; int function(AtkTable* table, int column) c_atk_table_is_column_selected; int function(AtkTable* table, int row) c_atk_table_is_row_selected; int function(AtkTable* table, int row, int column) c_atk_table_is_selected; AtkObject* function(AtkTable* table, int row, int column) c_atk_table_ref_at; int function(AtkTable* table, int column) c_atk_table_remove_column_selection; int function(AtkTable* table, int row) c_atk_table_remove_row_selection; void function(AtkTable* table, AtkObject* caption) c_atk_table_set_caption; void function(AtkTable* table, int column, const(char)* description) c_atk_table_set_column_description; void function(AtkTable* table, int column, AtkObject* header) c_atk_table_set_column_header; void function(AtkTable* table, int row, const(char)* description) c_atk_table_set_row_description; void function(AtkTable* table, int row, AtkObject* header) c_atk_table_set_row_header; void function(AtkTable* table, AtkObject* accessible) c_atk_table_set_summary; // atk.TableCell GType function() c_atk_table_cell_get_type; GPtrArray* function(AtkTableCell* cell) c_atk_table_cell_get_column_header_cells; int function(AtkTableCell* cell) c_atk_table_cell_get_column_span; int function(AtkTableCell* cell, int* row, int* column) c_atk_table_cell_get_position; int function(AtkTableCell* cell, int* row, int* column, int* rowSpan, int* columnSpan) c_atk_table_cell_get_row_column_span; GPtrArray* function(AtkTableCell* cell) c_atk_table_cell_get_row_header_cells; int function(AtkTableCell* cell) c_atk_table_cell_get_row_span; AtkObject* function(AtkTableCell* cell) c_atk_table_cell_get_table; // atk.Text GType function() c_atk_text_get_type; void function(AtkTextRange** ranges) c_atk_text_free_ranges; int function(AtkText* text, int startOffset, int endOffset) c_atk_text_add_selection; AtkTextRange** function(AtkText* text, AtkTextRectangle* rect, AtkCoordType coordType, AtkTextClipType xClipType, AtkTextClipType yClipType) c_atk_text_get_bounded_ranges; int function(AtkText* text) c_atk_text_get_caret_offset; dchar function(AtkText* text, int offset) c_atk_text_get_character_at_offset; int function(AtkText* text) c_atk_text_get_character_count; void function(AtkText* text, int offset, int* x, int* y, int* width, int* height, AtkCoordType coords) c_atk_text_get_character_extents; AtkAttributeSet* function(AtkText* text) c_atk_text_get_default_attributes; int function(AtkText* text) c_atk_text_get_n_selections; int function(AtkText* text, int x, int y, AtkCoordType coords) c_atk_text_get_offset_at_point; void function(AtkText* text, int startOffset, int endOffset, AtkCoordType coordType, AtkTextRectangle* rect) c_atk_text_get_range_extents; AtkAttributeSet* function(AtkText* text, int offset, int* startOffset, int* endOffset) c_atk_text_get_run_attributes; char* function(AtkText* text, int selectionNum, int* startOffset, int* endOffset) c_atk_text_get_selection; char* function(AtkText* text, int offset, AtkTextGranularity granularity, int* startOffset, int* endOffset) c_atk_text_get_string_at_offset; char* function(AtkText* text, int startOffset, int endOffset) c_atk_text_get_text; char* function(AtkText* text, int offset, AtkTextBoundary boundaryType, int* startOffset, int* endOffset) c_atk_text_get_text_after_offset; char* function(AtkText* text, int offset, AtkTextBoundary boundaryType, int* startOffset, int* endOffset) c_atk_text_get_text_at_offset; char* function(AtkText* text, int offset, AtkTextBoundary boundaryType, int* startOffset, int* endOffset) c_atk_text_get_text_before_offset; int function(AtkText* text, int selectionNum) c_atk_text_remove_selection; int function(AtkText* text, int offset) c_atk_text_set_caret_offset; int function(AtkText* text, int selectionNum, int startOffset, int endOffset) c_atk_text_set_selection; void function(AtkAttributeSet* attribSet) c_atk_attribute_set_free; AtkTextAttribute function(const(char)* name) c_atk_text_attribute_for_name; const(char)* function(AtkTextAttribute attr) c_atk_text_attribute_get_name; const(char)* function(AtkTextAttribute attr, int index) c_atk_text_attribute_get_value; AtkTextAttribute function(const(char)* name) c_atk_text_attribute_register; // atk.TextRange GType function() c_atk_text_range_get_type; // atk.Util GType function() c_atk_util_get_type; uint function(AtkEventListener focusTracker) c_atk_add_focus_tracker; uint function(GSignalEmissionHook listener, const(char)* eventType) c_atk_add_global_event_listener; uint function(AtkKeySnoopFunc listener, void* data) c_atk_add_key_event_listener; void function(AtkEventListenerInit init) c_atk_focus_tracker_init; void function(AtkObject* object) c_atk_focus_tracker_notify; AtkObject* function() c_atk_get_focus_object; AtkObject* function() c_atk_get_root; const(char)* function() c_atk_get_toolkit_name; void function(uint trackerId) c_atk_remove_focus_tracker; void function(uint listenerId) c_atk_remove_global_event_listener; void function(uint listenerId) c_atk_remove_key_event_listener; // atk.Value GType function() c_atk_value_get_type; void function(AtkValue* obj, GValue* value) c_atk_value_get_current_value; double function(AtkValue* obj) c_atk_value_get_increment; void function(AtkValue* obj, GValue* value) c_atk_value_get_maximum_value; void function(AtkValue* obj, GValue* value) c_atk_value_get_minimum_increment; void function(AtkValue* obj, GValue* value) c_atk_value_get_minimum_value; AtkRange* function(AtkValue* obj) c_atk_value_get_range; GSList* function(AtkValue* obj) c_atk_value_get_sub_ranges; void function(AtkValue* obj, double* value, char** text) c_atk_value_get_value_and_text; int function(AtkValue* obj, GValue* value) c_atk_value_set_current_value; void function(AtkValue* obj, double newValue) c_atk_value_set_value; // atk.Window GType function() c_atk_window_get_type; // atk.Version uint function() c_atk_get_binary_age; uint function() c_atk_get_interface_age; uint function() c_atk_get_major_version; uint function() c_atk_get_micro_version; uint function() c_atk_get_minor_version; const(char)* function() c_atk_get_toolkit_version; const(char)* function() c_atk_get_version; // atk.State AtkStateType function(const(char)* name) c_atk_state_type_for_name; const(char)* function(AtkStateType type) c_atk_state_type_get_name; AtkStateType function(const(char)* name) c_atk_state_type_register; } // atk.Action alias c_atk_action_get_type atk_action_get_type; alias c_atk_action_do_action atk_action_do_action; alias c_atk_action_get_description atk_action_get_description; alias c_atk_action_get_keybinding atk_action_get_keybinding; alias c_atk_action_get_localized_name atk_action_get_localized_name; alias c_atk_action_get_n_actions atk_action_get_n_actions; alias c_atk_action_get_name atk_action_get_name; alias c_atk_action_set_description atk_action_set_description; // atk.Component alias c_atk_component_get_type atk_component_get_type; alias c_atk_component_add_focus_handler atk_component_add_focus_handler; alias c_atk_component_contains atk_component_contains; alias c_atk_component_get_alpha atk_component_get_alpha; alias c_atk_component_get_extents atk_component_get_extents; alias c_atk_component_get_layer atk_component_get_layer; alias c_atk_component_get_mdi_zorder atk_component_get_mdi_zorder; alias c_atk_component_get_position atk_component_get_position; alias c_atk_component_get_size atk_component_get_size; alias c_atk_component_grab_focus atk_component_grab_focus; alias c_atk_component_ref_accessible_at_point atk_component_ref_accessible_at_point; alias c_atk_component_remove_focus_handler atk_component_remove_focus_handler; alias c_atk_component_set_extents atk_component_set_extents; alias c_atk_component_set_position atk_component_set_position; alias c_atk_component_set_size atk_component_set_size; // atk.Document alias c_atk_document_get_type atk_document_get_type; alias c_atk_document_get_attribute_value atk_document_get_attribute_value; alias c_atk_document_get_attributes atk_document_get_attributes; alias c_atk_document_get_current_page_number atk_document_get_current_page_number; alias c_atk_document_get_document atk_document_get_document; alias c_atk_document_get_document_type atk_document_get_document_type; alias c_atk_document_get_locale atk_document_get_locale; alias c_atk_document_get_page_count atk_document_get_page_count; alias c_atk_document_set_attribute_value atk_document_set_attribute_value; // atk.EditableText alias c_atk_editable_text_get_type atk_editable_text_get_type; alias c_atk_editable_text_copy_text atk_editable_text_copy_text; alias c_atk_editable_text_cut_text atk_editable_text_cut_text; alias c_atk_editable_text_delete_text atk_editable_text_delete_text; alias c_atk_editable_text_insert_text atk_editable_text_insert_text; alias c_atk_editable_text_paste_text atk_editable_text_paste_text; alias c_atk_editable_text_set_run_attributes atk_editable_text_set_run_attributes; alias c_atk_editable_text_set_text_contents atk_editable_text_set_text_contents; // atk.GObjectAccessible alias c_atk_gobject_accessible_get_type atk_gobject_accessible_get_type; alias c_atk_gobject_accessible_for_object atk_gobject_accessible_for_object; alias c_atk_gobject_accessible_get_object atk_gobject_accessible_get_object; // atk.Hyperlink alias c_atk_hyperlink_get_type atk_hyperlink_get_type; alias c_atk_hyperlink_get_end_index atk_hyperlink_get_end_index; alias c_atk_hyperlink_get_n_anchors atk_hyperlink_get_n_anchors; alias c_atk_hyperlink_get_object atk_hyperlink_get_object; alias c_atk_hyperlink_get_start_index atk_hyperlink_get_start_index; alias c_atk_hyperlink_get_uri atk_hyperlink_get_uri; alias c_atk_hyperlink_is_inline atk_hyperlink_is_inline; alias c_atk_hyperlink_is_selected_link atk_hyperlink_is_selected_link; alias c_atk_hyperlink_is_valid atk_hyperlink_is_valid; // atk.HyperlinkImpl alias c_atk_hyperlink_impl_get_type atk_hyperlink_impl_get_type; alias c_atk_hyperlink_impl_get_hyperlink atk_hyperlink_impl_get_hyperlink; // atk.Hypertext alias c_atk_hypertext_get_type atk_hypertext_get_type; alias c_atk_hypertext_get_link atk_hypertext_get_link; alias c_atk_hypertext_get_link_index atk_hypertext_get_link_index; alias c_atk_hypertext_get_n_links atk_hypertext_get_n_links; // atk.Image alias c_atk_image_get_type atk_image_get_type; alias c_atk_image_get_image_description atk_image_get_image_description; alias c_atk_image_get_image_locale atk_image_get_image_locale; alias c_atk_image_get_image_position atk_image_get_image_position; alias c_atk_image_get_image_size atk_image_get_image_size; alias c_atk_image_set_image_description atk_image_set_image_description; // atk.Implementor alias c_atk_implementor_ref_accessible atk_implementor_ref_accessible; alias c_atk_implementor_get_type atk_implementor_get_type; // atk.Misc alias c_atk_misc_get_type atk_misc_get_type; alias c_atk_misc_get_instance atk_misc_get_instance; alias c_atk_misc_threads_enter atk_misc_threads_enter; alias c_atk_misc_threads_leave atk_misc_threads_leave; // atk.NoOpObject alias c_atk_no_op_object_get_type atk_no_op_object_get_type; alias c_atk_no_op_object_new atk_no_op_object_new; // atk.NoOpObjectFactory alias c_atk_no_op_object_factory_get_type atk_no_op_object_factory_get_type; alias c_atk_no_op_object_factory_new atk_no_op_object_factory_new; // atk.ObjectAtk alias c_atk_object_get_type atk_object_get_type; alias c_atk_object_add_relationship atk_object_add_relationship; alias c_atk_object_connect_property_change_handler atk_object_connect_property_change_handler; alias c_atk_object_get_attributes atk_object_get_attributes; alias c_atk_object_get_description atk_object_get_description; alias c_atk_object_get_index_in_parent atk_object_get_index_in_parent; alias c_atk_object_get_layer atk_object_get_layer; alias c_atk_object_get_mdi_zorder atk_object_get_mdi_zorder; alias c_atk_object_get_n_accessible_children atk_object_get_n_accessible_children; alias c_atk_object_get_name atk_object_get_name; alias c_atk_object_get_object_locale atk_object_get_object_locale; alias c_atk_object_get_parent atk_object_get_parent; alias c_atk_object_get_role atk_object_get_role; alias c_atk_object_initialize atk_object_initialize; alias c_atk_object_notify_state_change atk_object_notify_state_change; alias c_atk_object_peek_parent atk_object_peek_parent; alias c_atk_object_ref_accessible_child atk_object_ref_accessible_child; alias c_atk_object_ref_relation_set atk_object_ref_relation_set; alias c_atk_object_ref_state_set atk_object_ref_state_set; alias c_atk_object_remove_property_change_handler atk_object_remove_property_change_handler; alias c_atk_object_remove_relationship atk_object_remove_relationship; alias c_atk_object_set_description atk_object_set_description; alias c_atk_object_set_name atk_object_set_name; alias c_atk_object_set_parent atk_object_set_parent; alias c_atk_object_set_role atk_object_set_role; alias c_atk_role_for_name atk_role_for_name; alias c_atk_role_get_localized_name atk_role_get_localized_name; alias c_atk_role_get_name atk_role_get_name; alias c_atk_role_register atk_role_register; // atk.ObjectFactory alias c_atk_object_factory_get_type atk_object_factory_get_type; alias c_atk_object_factory_create_accessible atk_object_factory_create_accessible; alias c_atk_object_factory_get_accessible_type atk_object_factory_get_accessible_type; alias c_atk_object_factory_invalidate atk_object_factory_invalidate; // atk.Plug alias c_atk_plug_get_type atk_plug_get_type; alias c_atk_plug_new atk_plug_new; alias c_atk_plug_get_id atk_plug_get_id; // atk.Range alias c_atk_range_get_type atk_range_get_type; alias c_atk_range_new atk_range_new; alias c_atk_range_copy atk_range_copy; alias c_atk_range_free atk_range_free; alias c_atk_range_get_description atk_range_get_description; alias c_atk_range_get_lower_limit atk_range_get_lower_limit; alias c_atk_range_get_upper_limit atk_range_get_upper_limit; // atk.Rectangle alias c_atk_rectangle_get_type atk_rectangle_get_type; // atk.Registry alias c_atk_registry_get_type atk_registry_get_type; alias c_atk_registry_get_factory atk_registry_get_factory; alias c_atk_registry_get_factory_type atk_registry_get_factory_type; alias c_atk_registry_set_factory_type atk_registry_set_factory_type; alias c_atk_get_default_registry atk_get_default_registry; // atk.Relation alias c_atk_relation_get_type atk_relation_get_type; alias c_atk_relation_new atk_relation_new; alias c_atk_relation_add_target atk_relation_add_target; alias c_atk_relation_get_relation_type atk_relation_get_relation_type; alias c_atk_relation_get_target atk_relation_get_target; alias c_atk_relation_remove_target atk_relation_remove_target; alias c_atk_relation_type_for_name atk_relation_type_for_name; alias c_atk_relation_type_get_name atk_relation_type_get_name; alias c_atk_relation_type_register atk_relation_type_register; // atk.RelationSet alias c_atk_relation_set_get_type atk_relation_set_get_type; alias c_atk_relation_set_new atk_relation_set_new; alias c_atk_relation_set_add atk_relation_set_add; alias c_atk_relation_set_add_relation_by_type atk_relation_set_add_relation_by_type; alias c_atk_relation_set_contains atk_relation_set_contains; alias c_atk_relation_set_contains_target atk_relation_set_contains_target; alias c_atk_relation_set_get_n_relations atk_relation_set_get_n_relations; alias c_atk_relation_set_get_relation atk_relation_set_get_relation; alias c_atk_relation_set_get_relation_by_type atk_relation_set_get_relation_by_type; alias c_atk_relation_set_remove atk_relation_set_remove; // atk.Selection alias c_atk_selection_get_type atk_selection_get_type; alias c_atk_selection_add_selection atk_selection_add_selection; alias c_atk_selection_clear_selection atk_selection_clear_selection; alias c_atk_selection_get_selection_count atk_selection_get_selection_count; alias c_atk_selection_is_child_selected atk_selection_is_child_selected; alias c_atk_selection_ref_selection atk_selection_ref_selection; alias c_atk_selection_remove_selection atk_selection_remove_selection; alias c_atk_selection_select_all_selection atk_selection_select_all_selection; // atk.Socket alias c_atk_socket_get_type atk_socket_get_type; alias c_atk_socket_new atk_socket_new; alias c_atk_socket_embed atk_socket_embed; alias c_atk_socket_is_occupied atk_socket_is_occupied; // atk.StateSet alias c_atk_state_set_get_type atk_state_set_get_type; alias c_atk_state_set_new atk_state_set_new; alias c_atk_state_set_add_state atk_state_set_add_state; alias c_atk_state_set_add_states atk_state_set_add_states; alias c_atk_state_set_and_sets atk_state_set_and_sets; alias c_atk_state_set_clear_states atk_state_set_clear_states; alias c_atk_state_set_contains_state atk_state_set_contains_state; alias c_atk_state_set_contains_states atk_state_set_contains_states; alias c_atk_state_set_is_empty atk_state_set_is_empty; alias c_atk_state_set_or_sets atk_state_set_or_sets; alias c_atk_state_set_remove_state atk_state_set_remove_state; alias c_atk_state_set_xor_sets atk_state_set_xor_sets; // atk.StreamableContent alias c_atk_streamable_content_get_type atk_streamable_content_get_type; alias c_atk_streamable_content_get_mime_type atk_streamable_content_get_mime_type; alias c_atk_streamable_content_get_n_mime_types atk_streamable_content_get_n_mime_types; alias c_atk_streamable_content_get_stream atk_streamable_content_get_stream; alias c_atk_streamable_content_get_uri atk_streamable_content_get_uri; // atk.Table alias c_atk_table_get_type atk_table_get_type; alias c_atk_table_add_column_selection atk_table_add_column_selection; alias c_atk_table_add_row_selection atk_table_add_row_selection; alias c_atk_table_get_caption atk_table_get_caption; alias c_atk_table_get_column_at_index atk_table_get_column_at_index; alias c_atk_table_get_column_description atk_table_get_column_description; alias c_atk_table_get_column_extent_at atk_table_get_column_extent_at; alias c_atk_table_get_column_header atk_table_get_column_header; alias c_atk_table_get_index_at atk_table_get_index_at; alias c_atk_table_get_n_columns atk_table_get_n_columns; alias c_atk_table_get_n_rows atk_table_get_n_rows; alias c_atk_table_get_row_at_index atk_table_get_row_at_index; alias c_atk_table_get_row_description atk_table_get_row_description; alias c_atk_table_get_row_extent_at atk_table_get_row_extent_at; alias c_atk_table_get_row_header atk_table_get_row_header; alias c_atk_table_get_selected_columns atk_table_get_selected_columns; alias c_atk_table_get_selected_rows atk_table_get_selected_rows; alias c_atk_table_get_summary atk_table_get_summary; alias c_atk_table_is_column_selected atk_table_is_column_selected; alias c_atk_table_is_row_selected atk_table_is_row_selected; alias c_atk_table_is_selected atk_table_is_selected; alias c_atk_table_ref_at atk_table_ref_at; alias c_atk_table_remove_column_selection atk_table_remove_column_selection; alias c_atk_table_remove_row_selection atk_table_remove_row_selection; alias c_atk_table_set_caption atk_table_set_caption; alias c_atk_table_set_column_description atk_table_set_column_description; alias c_atk_table_set_column_header atk_table_set_column_header; alias c_atk_table_set_row_description atk_table_set_row_description; alias c_atk_table_set_row_header atk_table_set_row_header; alias c_atk_table_set_summary atk_table_set_summary; // atk.TableCell alias c_atk_table_cell_get_type atk_table_cell_get_type; alias c_atk_table_cell_get_column_header_cells atk_table_cell_get_column_header_cells; alias c_atk_table_cell_get_column_span atk_table_cell_get_column_span; alias c_atk_table_cell_get_position atk_table_cell_get_position; alias c_atk_table_cell_get_row_column_span atk_table_cell_get_row_column_span; alias c_atk_table_cell_get_row_header_cells atk_table_cell_get_row_header_cells; alias c_atk_table_cell_get_row_span atk_table_cell_get_row_span; alias c_atk_table_cell_get_table atk_table_cell_get_table; // atk.Text alias c_atk_text_get_type atk_text_get_type; alias c_atk_text_free_ranges atk_text_free_ranges; alias c_atk_text_add_selection atk_text_add_selection; alias c_atk_text_get_bounded_ranges atk_text_get_bounded_ranges; alias c_atk_text_get_caret_offset atk_text_get_caret_offset; alias c_atk_text_get_character_at_offset atk_text_get_character_at_offset; alias c_atk_text_get_character_count atk_text_get_character_count; alias c_atk_text_get_character_extents atk_text_get_character_extents; alias c_atk_text_get_default_attributes atk_text_get_default_attributes; alias c_atk_text_get_n_selections atk_text_get_n_selections; alias c_atk_text_get_offset_at_point atk_text_get_offset_at_point; alias c_atk_text_get_range_extents atk_text_get_range_extents; alias c_atk_text_get_run_attributes atk_text_get_run_attributes; alias c_atk_text_get_selection atk_text_get_selection; alias c_atk_text_get_string_at_offset atk_text_get_string_at_offset; alias c_atk_text_get_text atk_text_get_text; alias c_atk_text_get_text_after_offset atk_text_get_text_after_offset; alias c_atk_text_get_text_at_offset atk_text_get_text_at_offset; alias c_atk_text_get_text_before_offset atk_text_get_text_before_offset; alias c_atk_text_remove_selection atk_text_remove_selection; alias c_atk_text_set_caret_offset atk_text_set_caret_offset; alias c_atk_text_set_selection atk_text_set_selection; alias c_atk_attribute_set_free atk_attribute_set_free; alias c_atk_text_attribute_for_name atk_text_attribute_for_name; alias c_atk_text_attribute_get_name atk_text_attribute_get_name; alias c_atk_text_attribute_get_value atk_text_attribute_get_value; alias c_atk_text_attribute_register atk_text_attribute_register; // atk.TextRange alias c_atk_text_range_get_type atk_text_range_get_type; // atk.Util alias c_atk_util_get_type atk_util_get_type; alias c_atk_add_focus_tracker atk_add_focus_tracker; alias c_atk_add_global_event_listener atk_add_global_event_listener; alias c_atk_add_key_event_listener atk_add_key_event_listener; alias c_atk_focus_tracker_init atk_focus_tracker_init; alias c_atk_focus_tracker_notify atk_focus_tracker_notify; alias c_atk_get_focus_object atk_get_focus_object; alias c_atk_get_root atk_get_root; alias c_atk_get_toolkit_name atk_get_toolkit_name; alias c_atk_remove_focus_tracker atk_remove_focus_tracker; alias c_atk_remove_global_event_listener atk_remove_global_event_listener; alias c_atk_remove_key_event_listener atk_remove_key_event_listener; // atk.Value alias c_atk_value_get_type atk_value_get_type; alias c_atk_value_get_current_value atk_value_get_current_value; alias c_atk_value_get_increment atk_value_get_increment; alias c_atk_value_get_maximum_value atk_value_get_maximum_value; alias c_atk_value_get_minimum_increment atk_value_get_minimum_increment; alias c_atk_value_get_minimum_value atk_value_get_minimum_value; alias c_atk_value_get_range atk_value_get_range; alias c_atk_value_get_sub_ranges atk_value_get_sub_ranges; alias c_atk_value_get_value_and_text atk_value_get_value_and_text; alias c_atk_value_set_current_value atk_value_set_current_value; alias c_atk_value_set_value atk_value_set_value; // atk.Window alias c_atk_window_get_type atk_window_get_type; // atk.Version alias c_atk_get_binary_age atk_get_binary_age; alias c_atk_get_interface_age atk_get_interface_age; alias c_atk_get_major_version atk_get_major_version; alias c_atk_get_micro_version atk_get_micro_version; alias c_atk_get_minor_version atk_get_minor_version; alias c_atk_get_toolkit_version atk_get_toolkit_version; alias c_atk_get_version atk_get_version; // atk.State alias c_atk_state_type_for_name atk_state_type_for_name; alias c_atk_state_type_get_name atk_state_type_get_name; alias c_atk_state_type_register atk_state_type_register; GtkD-3.7.5/generated/gtkd/atk/c/types.d000066400000000000000000002771051324604450400175760ustar00rootroot00000000000000/* * 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 atk.c.types; public import glib.c.types; public import gobject.c.types; /** * This is a singly-linked list (a #GSList) of #AtkAttribute. It is * used by atk_text_get_run_attributes(), * atk_text_get_default_attributes(), * atk_editable_text_set_run_attributes(), * atk_document_get_attributes() and atk_object_get_attributes() */ public alias GSList AtkAttributeSet; public alias ulong AtkState; /** * Specifies how xy coordinates are to be interpreted. Used by functions such * as atk_component_get_position() and atk_text_get_character_extents() */ public enum AtkCoordType { /** * specifies xy coordinates relative to the screen */ SCREEN = 0, /** * specifies xy coordinates relative to the widget's * top-level window */ WINDOW = 1, } alias AtkCoordType CoordType; /** * Describes the type of link */ public enum AtkHyperlinkStateFlags { /** * Link is inline */ INLINE = 1, } alias AtkHyperlinkStateFlags HyperlinkStateFlags; /** * Specifies the type of a keyboard evemt. */ public enum AtkKeyEventType { /** * specifies a key press event */ PRESS = 0, /** * specifies a key release event */ RELEASE = 1, /** * Not a valid value; specifies end of enumeration */ LAST_DEFINED = 2, } alias AtkKeyEventType KeyEventType; /** * Describes the layer of a component * * These enumerated "layer values" are used when determining which UI * rendering layer a component is drawn into, which can help in making * determinations of when components occlude one another. */ public enum AtkLayer { /** * The object does not have a layer */ INVALID = 0, /** * This layer is reserved for the desktop background */ BACKGROUND = 1, /** * This layer is used for Canvas components */ CANVAS = 2, /** * This layer is normally used for components */ WIDGET = 3, /** * This layer is used for layered components */ MDI = 4, /** * This layer is used for popup components, such as menus */ POPUP = 5, /** * This layer is reserved for future use. */ OVERLAY = 6, /** * This layer is used for toplevel windows. */ WINDOW = 7, } alias AtkLayer Layer; /** * Describes the type of the relation */ public enum AtkRelationType { /** * Not used, represens "no relationship" or an error condition. */ NULL = 0, /** * Indicates an object controlled by one or more target objects. */ CONTROLLED_BY = 1, /** * Indicates an object is an controller for one or more target objects. */ CONTROLLER_FOR = 2, /** * Indicates an object is a label for one or more target objects. */ LABEL_FOR = 3, /** * Indicates an object is labelled by one or more target objects. */ LABELLED_BY = 4, /** * Indicates an object is a member of a group of one or more target objects. */ MEMBER_OF = 5, /** * Indicates an object is a cell in a treetable which is displayed because a cell in the same column is expanded and identifies that cell. */ NODE_CHILD_OF = 6, /** * Indicates that the object has content that flows logically to another * AtkObject in a sequential way, (for instance text-flow). */ FLOWS_TO = 7, /** * Indicates that the object has content that flows logically from * another AtkObject in a sequential way, (for instance text-flow). */ FLOWS_FROM = 8, /** * Indicates a subwindow attached to a component but otherwise has no connection in the UI heirarchy to that component. */ SUBWINDOW_OF = 9, /** * Indicates that the object visually embeds * another object's content, i.e. this object's content flows around * another's content. */ EMBEDS = 10, /** * Reciprocal of %ATK_RELATION_EMBEDS, indicates that * this object's content is visualy embedded in another object. */ EMBEDDED_BY = 11, /** * Indicates that an object is a popup for another object. */ POPUP_FOR = 12, /** * Indicates that an object is a parent window of another object. */ PARENT_WINDOW_OF = 13, /** * Reciprocal of %ATK_RELATION_DESCRIPTION_FOR. Indicates that one * or more target objects provide descriptive information about this object. This relation * type is most appropriate for information that is not essential as its presentation may * be user-configurable and/or limited to an on-demand mechanism such as an assistive * technology command. For brief, essential information such as can be found in a widget's * on-screen label, use %ATK_RELATION_LABELLED_BY. For an on-screen error message, use * %ATK_RELATION_ERROR_MESSAGE. For lengthy extended descriptive information contained in * an on-screen object, consider using %ATK_RELATION_DETAILS as assistive technologies may * provide a means for the user to navigate to objects containing detailed descriptions so * that their content can be more closely reviewed. */ DESCRIBED_BY = 14, /** * Reciprocal of %ATK_RELATION_DESCRIBED_BY. Indicates that this * object provides descriptive information about the target object(s). See also * %ATK_RELATION_DETAILS_FOR and %ATK_RELATION_ERROR_FOR. */ DESCRIPTION_FOR = 15, /** * Indicates an object is a cell in a treetable and is expanded to display other cells in the same column. */ NODE_PARENT_OF = 16, /** * Reciprocal of %ATK_RELATION_DETAILS_FOR. Indicates that this object * has a detailed or extended description, the contents of which can be found in the target * object(s). This relation type is most appropriate for information that is sufficiently * lengthy as to make navigation to the container of that information desirable. For less * verbose information suitable for announcement only, see %ATK_RELATION_DESCRIBED_BY. If * the detailed information describes an error condition, %ATK_RELATION_ERROR_FOR should be * used instead. @Since: ATK-2.26. */ DETAILS = 17, /** * Reciprocal of %ATK_RELATION_DETAILS. Indicates that this object * provides a detailed or extended description about the target object(s). See also * %ATK_RELATION_DESCRIPTION_FOR and %ATK_RELATION_ERROR_FOR. @Since: ATK-2.26. */ DETAILS_FOR = 18, /** * Reciprocal of %ATK_RELATION_ERROR_FOR. Indicates that this object * has one or more errors, the nature of which is described in the contents of the target * object(s). Objects that have this relation type should also contain %ATK_STATE_INVALID_ENTRY * in their #AtkStateSet. @Since: ATK-2.26. */ ERROR_MESSAGE = 19, /** * Reciprocal of %ATK_RELATION_ERROR_MESSAGE. Indicates that this object * contains an error message describing an invalid condition in the target object(s). @Since: * ATK_2.26. */ ERROR_FOR = 20, /** * Not used, this value indicates the end of the enumeration. */ LAST_DEFINED = 21, } alias AtkRelationType RelationType; /** * Describes the role of an object * * These are the built-in enumerated roles that UI components can have in * ATK. Other roles may be added at runtime, so an AtkRole >= * ATK_ROLE_LAST_DEFINED is not necessarily an error. */ public enum AtkRole { /** * Invalid role */ INVALID = 0, /** * A label which represents an accelerator */ ACCELERATOR_LABEL = 1, /** * An object which is an alert to the user. Assistive Technologies typically respond to ATK_ROLE_ALERT by reading the entire onscreen contents of containers advertising this role. Should be used for warning dialogs, etc. */ ALERT = 2, /** * An object which is an animated image */ ANIMATION = 3, /** * An arrow in one of the four cardinal directions */ ARROW = 4, /** * An object that displays a calendar and allows the user to select a date */ CALENDAR = 5, /** * An object that can be drawn into and is used to trap events */ CANVAS = 6, /** * A choice that can be checked or unchecked and provides a separate indicator for the current state */ CHECK_BOX = 7, /** * A menu item with a check box */ CHECK_MENU_ITEM = 8, /** * A specialized dialog that lets the user choose a color */ COLOR_CHOOSER = 9, /** * The header for a column of data */ COLUMN_HEADER = 10, /** * A collapsible list of choices the user can select from */ COMBO_BOX = 11, /** * An object whose purpose is to allow a user to edit a date */ DATE_EDITOR = 12, /** * An inconifed internal frame within a DESKTOP_PANE */ DESKTOP_ICON = 13, /** * A pane that supports internal frames and iconified versions of those internal frames */ DESKTOP_FRAME = 14, /** * An object whose purpose is to allow a user to set a value */ DIAL = 15, /** * A top level window with title bar and a border */ DIALOG = 16, /** * A pane that allows the user to navigate through and select the contents of a directory */ DIRECTORY_PANE = 17, /** * An object used for drawing custom user interface elements */ DRAWING_AREA = 18, /** * A specialized dialog that lets the user choose a file */ FILE_CHOOSER = 19, /** * A object that fills up space in a user interface */ FILLER = 20, /** * A specialized dialog that lets the user choose a font */ FONT_CHOOSER = 21, /** * A top level window with a title bar, border, menubar, etc. */ FRAME = 22, /** * A pane that is guaranteed to be painted on top of all panes beneath it */ GLASS_PANE = 23, /** * A document container for HTML, whose children represent the document content */ HTML_CONTAINER = 24, /** * A small fixed size picture, typically used to decorate components */ ICON = 25, /** * An object whose primary purpose is to display an image */ IMAGE = 26, /** * A frame-like object that is clipped by a desktop pane */ INTERNAL_FRAME = 27, /** * An object used to present an icon or short string in an interface */ LABEL = 28, /** * A specialized pane that allows its children to be drawn in layers, providing a form of stacking order */ LAYERED_PANE = 29, /** * An object that presents a list of objects to the user and allows the user to select one or more of them */ LIST = 30, /** * An object that represents an element of a list */ LIST_ITEM = 31, /** * An object usually found inside a menu bar that contains a list of actions the user can choose from */ MENU = 32, /** * An object usually drawn at the top of the primary dialog box of an application that contains a list of menus the user can choose from */ MENU_BAR = 33, /** * An object usually contained in a menu that presents an action the user can choose */ MENU_ITEM = 34, /** * A specialized pane whose primary use is inside a DIALOG */ OPTION_PANE = 35, /** * An object that is a child of a page tab list */ PAGE_TAB = 36, /** * An object that presents a series of panels (or page tabs), one at a time, through some mechanism provided by the object */ PAGE_TAB_LIST = 37, /** * A generic container that is often used to group objects */ PANEL = 38, /** * A text object uses for passwords, or other places where the text content is not shown visibly to the user */ PASSWORD_TEXT = 39, /** * A temporary window that is usually used to offer the user a list of choices, and then hides when the user selects one of those choices */ POPUP_MENU = 40, /** * An object used to indicate how much of a task has been completed */ PROGRESS_BAR = 41, /** * An object the user can manipulate to tell the application to do something */ PUSH_BUTTON = 42, /** * A specialized check box that will cause other radio buttons in the same group to become unchecked when this one is checked */ RADIO_BUTTON = 43, /** * A check menu item which belongs to a group. At each instant exactly one of the radio menu items from a group is selected */ RADIO_MENU_ITEM = 44, /** * A specialized pane that has a glass pane and a layered pane as its children */ ROOT_PANE = 45, /** * The header for a row of data */ ROW_HEADER = 46, /** * An object usually used to allow a user to incrementally view a large amount of data. */ SCROLL_BAR = 47, /** * An object that allows a user to incrementally view a large amount of information */ SCROLL_PANE = 48, /** * An object usually contained in a menu to provide a visible and logical separation of the contents in a menu */ SEPARATOR = 49, /** * An object that allows the user to select from a bounded range */ SLIDER = 50, /** * A specialized panel that presents two other panels at the same time */ SPLIT_PANE = 51, /** * An object used to get an integer or floating point number from the user */ SPIN_BUTTON = 52, /** * An object which reports messages of minor importance to the user */ STATUSBAR = 53, /** * An object used to represent information in terms of rows and columns */ TABLE = 54, /** * A cell in a table */ TABLE_CELL = 55, /** * The header for a column of a table */ TABLE_COLUMN_HEADER = 56, /** * The header for a row of a table */ TABLE_ROW_HEADER = 57, /** * A menu item used to tear off and reattach its menu */ TEAR_OFF_MENU_ITEM = 58, /** * An object that represents an accessible terminal. @Since: ATK-0.6 */ TERMINAL = 59, /** * An interactive widget that supports multiple lines of text and * optionally accepts user input, but whose purpose is not to solicit user input. * Thus ATK_ROLE_TEXT is appropriate for the text view in a plain text editor * but inappropriate for an input field in a dialog box or web form. For widgets * whose purpose is to solicit input from the user, see ATK_ROLE_ENTRY and * ATK_ROLE_PASSWORD_TEXT. For generic objects which display a brief amount of * textual information, see ATK_ROLE_STATIC. */ TEXT = 60, /** * A specialized push button that can be checked or unchecked, but does not provide a separate indicator for the current state */ TOGGLE_BUTTON = 61, /** * A bar or palette usually composed of push buttons or toggle buttons */ TOOL_BAR = 62, /** * An object that provides information about another object */ TOOL_TIP = 63, /** * An object used to represent hierarchical information to the user */ TREE = 64, /** * An object capable of expanding and collapsing rows as well as showing multiple columns of data. @Since: ATK-0.7 */ TREE_TABLE = 65, /** * The object contains some Accessible information, but its role is not known */ UNKNOWN = 66, /** * An object usually used in a scroll pane */ VIEWPORT = 67, /** * A top level window with no title or border. */ WINDOW = 68, /** * An object that serves as a document header. @Since: ATK-1.1.1 */ HEADER = 69, /** * An object that serves as a document footer. @Since: ATK-1.1.1 */ FOOTER = 70, /** * An object which is contains a paragraph of text content. @Since: ATK-1.1.1 */ PARAGRAPH = 71, /** * An object which describes margins and tab stops, etc. for text objects which it controls (should have CONTROLLER_FOR relation to such). @Since: ATK-1.1.1 */ RULER = 72, /** * The object is an application object, which may contain @ATK_ROLE_FRAME objects or other types of accessibles. The root accessible of any application's ATK hierarchy should have ATK_ROLE_APPLICATION. @Since: ATK-1.1.4 */ APPLICATION = 73, /** * The object is a dialog or list containing items for insertion into an entry widget, for instance a list of words for completion of a text entry. @Since: ATK-1.3 */ AUTOCOMPLETE = 74, /** * The object is an editable text object in a toolbar. @Since: ATK-1.5 */ EDIT_BAR = 75, /** * The object is an embedded container within a document or panel. This role is a grouping "hint" indicating that the contained objects share a context. @Since: ATK-1.7.2 */ EMBEDDED = 76, /** * The object is a component whose textual content may be entered or modified by the user, provided @ATK_STATE_EDITABLE is present. @Since: ATK-1.11 */ ENTRY = 77, /** * The object is a graphical depiction of quantitative data. It may contain multiple subelements whose attributes and/or description may be queried to obtain both the quantitative data and information about how the data is being presented. The LABELLED_BY relation is particularly important in interpreting objects of this type, as is the accessible-description property. @Since: ATK-1.11 */ CHART = 78, /** * The object contains descriptive information, usually textual, about another user interface element such as a table, chart, or image. @Since: ATK-1.11 */ CAPTION = 79, /** * The object is a visual frame or container which contains a view of document content. Document frames may occur within another Document instance, in which case the second document may be said to be embedded in the containing instance. HTML frames are often ROLE_DOCUMENT_FRAME. Either this object, or a singleton descendant, should implement the Document interface. @Since: ATK-1.11 */ DOCUMENT_FRAME = 80, /** * The object serves as a heading for content which follows it in a document. The 'heading level' of the heading, if availabe, may be obtained by querying the object's attributes. */ HEADING = 81, /** * The object is a containing instance which encapsulates a page of information. @ATK_ROLE_PAGE is used in documents and content which support a paginated navigation model. @Since: ATK-1.11 */ PAGE = 82, /** * The object is a containing instance of document content which constitutes a particular 'logical' section of the document. The type of content within a section, and the nature of the section division itself, may be obtained by querying the object's attributes. Sections may be nested. @Since: ATK-1.11 */ SECTION = 83, /** * The object is redundant with another object in the hierarchy, and is exposed for purely technical reasons. Objects of this role should normally be ignored by clients. @Since: ATK-1.11 */ REDUNDANT_OBJECT = 84, /** * The object is a container for form controls, for instance as part of a * web form or user-input form within a document. This role is primarily a tag/convenience for * clients when navigating complex documents, it is not expected that ordinary GUI containers will * always have ATK_ROLE_FORM. @Since: ATK-1.12.0 */ FORM = 85, /** * The object is a hypertext anchor, i.e. a "link" in a * hypertext document. Such objects are distinct from 'inline' * content which may also use the Hypertext/Hyperlink interfaces * to indicate the range/location within a text object where * an inline or embedded object lies. @Since: ATK-1.12.1 */ LINK = 86, /** * The object is a window or similar viewport * which is used to allow composition or input of a 'complex character', * in other words it is an "input method window." @Since: ATK-1.12.1 */ INPUT_METHOD_WINDOW = 87, /** * A row in a table. @Since: ATK-2.1.0 */ TABLE_ROW = 88, /** * An object that represents an element of a tree. @Since: ATK-2.1.0 */ TREE_ITEM = 89, /** * A document frame which contains a spreadsheet. @Since: ATK-2.1.0 */ DOCUMENT_SPREADSHEET = 90, /** * A document frame which contains a presentation or slide content. @Since: ATK-2.1.0 */ DOCUMENT_PRESENTATION = 91, /** * A document frame which contains textual content, such as found in a word processing application. @Since: ATK-2.1.0 */ DOCUMENT_TEXT = 92, /** * A document frame which contains HTML or other markup suitable for display in a web browser. @Since: ATK-2.1.0 */ DOCUMENT_WEB = 93, /** * A document frame which contains email content to be displayed or composed either in plain text or HTML. @Since: ATK-2.1.0 */ DOCUMENT_EMAIL = 94, /** * An object found within a document and designed to present a comment, note, or other annotation. In some cases, this object might not be visible until activated. @Since: ATK-2.1.0 */ COMMENT = 95, /** * A non-collapsible list of choices the user can select from. @Since: ATK-2.1.0 */ LIST_BOX = 96, /** * A group of related widgets. This group typically has a label. @Since: ATK-2.1.0 */ GROUPING = 97, /** * An image map object. Usually a graphic with multiple hotspots, where each hotspot can be activated resulting in the loading of another document or section of a document. @Since: ATK-2.1.0 */ IMAGE_MAP = 98, /** * A transitory object designed to present a message to the user, typically at the desktop level rather than inside a particular application. @Since: ATK-2.1.0 */ NOTIFICATION = 99, /** * An object designed to present a message to the user within an existing window. @Since: ATK-2.1.0 */ INFO_BAR = 100, /** * A bar that serves as a level indicator to, for instance, show the strength of a password or the state of a battery. @Since: ATK-2.7.3 */ LEVEL_BAR = 101, /** * A bar that serves as the title of a window or a * dialog. @Since: ATK-2.12 */ TITLE_BAR = 102, /** * An object which contains a text section * that is quoted from another source. @Since: ATK-2.12 */ BLOCK_QUOTE = 103, /** * An object which represents an audio element. @Since: ATK-2.12 */ AUDIO = 104, /** * An object which represents a video element. @Since: ATK-2.12 */ VIDEO = 105, /** * A definition of a term or concept. @Since: ATK-2.12 */ DEFINITION = 106, /** * A section of a page that consists of a * composition that forms an independent part of a document, page, or * site. Examples: A blog entry, a news story, a forum post. @Since: * ATK-2.12 */ ARTICLE = 107, /** * A region of a web page intended as a * navigational landmark. This is designed to allow Assistive * Technologies to provide quick navigation among key regions within a * document. @Since: ATK-2.12 */ LANDMARK = 108, /** * A text widget or container holding log content, such * as chat history and error logs. In this role there is a * relationship between the arrival of new items in the log and the * reading order. The log contains a meaningful sequence and new * information is added only to the end of the log, not at arbitrary * points. @Since: ATK-2.12 */ LOG = 109, /** * A container where non-essential information * changes frequently. Common usages of marquee include stock tickers * and ad banners. The primary difference between a marquee and a log * is that logs usually have a meaningful order or sequence of * important content changes. @Since: ATK-2.12 */ MARQUEE = 110, /** * A text widget or container that holds a mathematical * expression. @Since: ATK-2.12 */ MATH = 111, /** * A widget whose purpose is to display a rating, * such as the number of stars associated with a song in a media * player. Objects of this role should also implement * AtkValue. @Since: ATK-2.12 */ RATING = 112, /** * An object containing a numerical counter which * indicates an amount of elapsed time from a start point, or the time * remaining until an end point. @Since: ATK-2.12 */ TIMER = 113, /** * An object that represents a list of * term-value groups. A term-value group represents a individual * description and consist of one or more names * (ATK_ROLE_DESCRIPTION_TERM) followed by one or more values * (ATK_ROLE_DESCRIPTION_VALUE). For each list, there should not be * more than one group with the same term name. @Since: ATK-2.12 */ DESCRIPTION_LIST = 114, /** * An object that represents the term, or * name, part of a term-description group in a description * list. @Since: ATK-2.12 */ DESCRIPTION_TERM = 115, /** * An object that represents the * description, definition or value of a term-description group in a * description list. The values within a group are alternatives, * meaning that you can have several ATK_ROLE_DESCRIPTION_VALUE for a * given ATK_ROLE_DESCRIPTION_TERM. @Since: ATK-2.12 */ DESCRIPTION_VALUE = 116, /** * A generic non-container object whose purpose is to display a * brief amount of information to the user and whose role is known by the * implementor but lacks semantic value for the user. Examples in which * ATK_ROLE_STATIC is appropriate include the message displayed in a message box * and an image used as an alternative means to display text. ATK_ROLE_STATIC * should not be applied to widgets which are traditionally interactive, objects * which display a significant amount of content, or any object which has an * accessible relation pointing to another object. Implementors should expose the * displayed information through the accessible name of the object. If doing so seems * inappropriate, it may indicate that a different role should be used. For * labels which describe another widget, see ATK_ROLE_LABEL. For text views, see * ATK_ROLE_TEXT. For generic containers, see ATK_ROLE_PANEL. For objects whose * role is not known by the implementor, see ATK_ROLE_UNKNOWN. @Since: ATK-2.16. */ STATIC = 117, /** * An object that represents a mathematical fraction. */ MATH_FRACTION = 118, /** * An object that represents a mathematical expression * displayed with a radical. @Since: ATK-2.16. */ MATH_ROOT = 119, /** * An object that contains text that is displayed as a * subscript. @Since: ATK-2.16. */ SUBSCRIPT = 120, /** * An object that contains text that is displayed as a * superscript. @Since: ATK-2.16. */ SUPERSCRIPT = 121, /** * An object that contains the text of a footnote. @Since: ATK-2.26. */ FOOTNOTE = 122, /** * not a valid role, used for finding end of the enumeration */ LAST_DEFINED = 123, } alias AtkRole Role; /** * The possible types of states of an object */ public enum AtkStateType { /** * Indicates an invalid state - probably an error condition. */ INVALID = 0, /** * Indicates a window is currently the active window, or an object is the active subelement within a container or table. ATK_STATE_ACTIVE should not be used for objects which have ATK_STATE_FOCUSABLE or ATK_STATE_SELECTABLE: Those objects should use ATK_STATE_FOCUSED and ATK_STATE_SELECTED respectively. ATK_STATE_ACTIVE is a means to indicate that an object which is not focusable and not selectable is the currently-active item within its parent container. */ ACTIVE = 1, /** * Indicates that the object is 'armed', i.e. will be activated by if a pointer button-release event occurs within its bounds. Buttons often enter this state when a pointer click occurs within their bounds, as a precursor to activation. ATK_STATE_ARMED has been deprecated since ATK-2.16 and should not be used in newly-written code. */ ARMED = 2, /** * Indicates the current object is busy, i.e. onscreen representation is in the process of changing, or the object is temporarily unavailable for interaction due to activity already in progress. This state may be used by implementors of Document to indicate that content loading is underway. It also may indicate other 'pending' conditions; clients may wish to interrogate this object when the ATK_STATE_BUSY flag is removed. */ BUSY = 3, /** * Indicates this object is currently checked, for instance a checkbox is 'non-empty'. */ CHECKED = 4, /** * Indicates that this object no longer has a valid backing widget (for instance, if its peer object has been destroyed) */ DEFUNCT = 5, /** * Indicates that this object can contain text, and that the * user can change the textual contents of this object by editing those contents * directly. For an object which is expected to be editable due to its type, but * which cannot be edited due to the application or platform preventing the user * from doing so, that object's #AtkStateSet should lack ATK_STATE_EDITABLE and * should contain ATK_STATE_READ_ONLY. */ EDITABLE = 6, /** * Indicates that this object is enabled, i.e. that it currently reflects some application state. Objects that are "greyed out" may lack this state, and may lack the STATE_SENSITIVE if direct user interaction cannot cause them to acquire STATE_ENABLED. See also: ATK_STATE_SENSITIVE */ ENABLED = 7, /** * Indicates this object allows progressive disclosure of its children */ EXPANDABLE = 8, /** * Indicates this object its expanded - see ATK_STATE_EXPANDABLE above */ EXPANDED = 9, /** * Indicates this object can accept keyboard focus, which means all events resulting from typing on the keyboard will normally be passed to it when it has focus */ FOCUSABLE = 10, /** * Indicates this object currently has the keyboard focus */ FOCUSED = 11, /** * Indicates the orientation of this object is horizontal; used, for instance, by objects of ATK_ROLE_SCROLL_BAR. For objects where vertical/horizontal orientation is especially meaningful. */ HORIZONTAL = 12, /** * Indicates this object is minimized and is represented only by an icon */ ICONIFIED = 13, /** * Indicates something must be done with this object before the user can interact with an object in a different window */ MODAL = 14, /** * Indicates this (text) object can contain multiple lines of text */ MULTI_LINE = 15, /** * Indicates this object allows more than one of its children to be selected at the same time, or in the case of text objects, that the object supports non-contiguous text selections. */ MULTISELECTABLE = 16, /** * Indicates this object paints every pixel within its rectangular region. */ OPAQUE = 17, /** * Indicates this object is currently pressed. */ PRESSED = 18, /** * Indicates the size of this object is not fixed */ RESIZABLE = 19, /** * Indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that can be selected */ SELECTABLE = 20, /** * Indicates this object is the child of an object that allows its children to be selected and that this child is one of those children that has been selected */ SELECTED = 21, /** * Indicates this object is sensitive, e.g. to user interaction. * STATE_SENSITIVE usually accompanies STATE_ENABLED for user-actionable controls, * but may be found in the absence of STATE_ENABLED if the current visible state of the * control is "disconnected" from the application state. In such cases, direct user interaction * can often result in the object gaining STATE_SENSITIVE, for instance if a user makes * an explicit selection using an object whose current state is ambiguous or undefined. * @see STATE_ENABLED, STATE_INDETERMINATE. */ SENSITIVE = 22, /** * Indicates this object, the object's parent, the object's parent's parent, and so on, * are all 'shown' to the end-user, i.e. subject to "exposure" if blocking or obscuring objects do not interpose * between this object and the top of the window stack. */ SHOWING = 23, /** * Indicates this (text) object can contain only a single line of text */ SINGLE_LINE = 24, /** * Indicates that the information returned for this object may no longer be * synchronized with the application state. This is implied if the object has STATE_TRANSIENT, * and can also occur towards the end of the object peer's lifecycle. It can also be used to indicate that * the index associated with this object has changed since the user accessed the object (in lieu of * "index-in-parent-changed" events). */ STALE = 25, /** * Indicates this object is transient, i.e. a snapshot which may not emit events when its * state changes. Data from objects with ATK_STATE_TRANSIENT should not be cached, since there may be no * notification given when the cached data becomes obsolete. */ TRANSIENT = 26, /** * Indicates the orientation of this object is vertical */ VERTICAL = 27, /** * Indicates this object is visible, e.g. has been explicitly marked for exposure to the user. */ VISIBLE = 28, /** * Indicates that "active-descendant-changed" event * is sent when children become 'active' (i.e. are selected or navigated to onscreen). * Used to prevent need to enumerate all children in very large containers, like tables. * The presence of STATE_MANAGES_DESCENDANTS is an indication to the client. * that the children should not, and need not, be enumerated by the client. * Objects implementing this state are expected to provide relevant state * notifications to listening clients, for instance notifications of visibility * changes and activation of their contained child objects, without the client * having previously requested references to those children. */ MANAGES_DESCENDANTS = 29, /** * Indicates that the value, or some other quantifiable * property, of this AtkObject cannot be fully determined. In the case of a large * data set in which the total number of items in that set is unknown (e.g. 1 of * 999+), implementors should expose the currently-known set size (999) along * with this state. In the case of a check box, this state should be used to * indicate that the check box is a tri-state check box which is currently * neither checked nor unchecked. */ INDETERMINATE = 30, /** * Indicates that an object is truncated, e.g. a text value in a speradsheet cell. */ TRUNCATED = 31, /** * Indicates that explicit user interaction with an object is required by the user interface, e.g. a required field in a "web-form" interface. */ REQUIRED = 32, /** * Indicates that the object has encountered an error condition due to failure of input validation. For instance, a form control may acquire this state in response to invalid or malformed user input. */ INVALID_ENTRY = 33, /** * Indicates that the object in question implements some form of ¨typeahead¨ or * pre-selection behavior whereby entering the first character of one or more sub-elements * causes those elements to scroll into view or become selected. Subsequent character input * may narrow the selection further as long as one or more sub-elements match the string. * This state is normally only useful and encountered on objects that implement Selection. * In some cases the typeahead behavior may result in full or partial ¨completion¨ of * the data in the input field, in which case these input events may trigger text-changed * events from the AtkText interface. This state supplants @ATK_ROLE_AUTOCOMPLETE. */ SUPPORTS_AUTOCOMPLETION = 34, /** * Indicates that the object in question supports text selection. It should only be exposed on objects which implement the Text interface, in order to distinguish this state from @ATK_STATE_SELECTABLE, which infers that the object in question is a selectable child of an object which implements Selection. While similar, text selection and subelement selection are distinct operations. */ SELECTABLE_TEXT = 35, /** * Indicates that the object is the "default" active component, i.e. the object which is activated by an end-user press of the "Enter" or "Return" key. Typically a "close" or "submit" button. */ DEFAULT = 36, /** * Indicates that the object changes its appearance dynamically as an inherent part of its presentation. This state may come and go if an object is only temporarily animated on the way to a 'final' onscreen presentation. * @note some applications, notably content viewers, may not be able to detect * all kinds of animated content. Therefore the absence of this state should not * be taken as definitive evidence that the object's visual representation is * static; this state is advisory. */ ANIMATED = 37, /** * Indicates that the object (typically a hyperlink) has already been 'activated', and/or its backing data has already been downloaded, rendered, or otherwise "visited". */ VISITED = 38, /** * Indicates this object has the potential to be * checked, such as a checkbox or toggle-able table cell. @Since: * ATK-2.12 */ CHECKABLE = 39, /** * Indicates that the object has a popup context * menu or sub-level menu which may or may not be showing. This means * that activation renders conditional content. Note that ordinary * tooltips are not considered popups in this context. @Since: ATK-2.12 */ HAS_POPUP = 40, /** * Indicates this object has a tooltip. @Since: ATK-2.16 */ HAS_TOOLTIP = 41, /** * Indicates that a widget which is ENABLED and SENSITIVE * has a value which can be read, but not modified, by the user. Note that this * state should only be applied to widget types whose value is normally directly * user modifiable, such as check boxes, radio buttons, spin buttons, text input * fields, and combo boxes, as a means to convey that the expected interaction * with that widget is not possible. When the expected interaction with a * widget does not include modification by the user, as is the case with * labels and containers, ATK_STATE_READ_ONLY should not be applied. See also * ATK_STATE_EDITABLE. @Since: ATK-2-16 */ READ_ONLY = 42, /** * Not a valid state, used for finding end of enumeration */ LAST_DEFINED = 43, } alias AtkStateType StateType; /** * Describes the text attributes supported */ public enum AtkTextAttribute { /** * Invalid attribute, like bad spelling or grammar. */ INVALID = 0, /** * The pixel width of the left margin */ LEFT_MARGIN = 1, /** * The pixel width of the right margin */ RIGHT_MARGIN = 2, /** * The number of pixels that the text is indented */ INDENT = 3, /** * Either "true" or "false" indicating whether text is visible or not */ INVISIBLE = 4, /** * Either "true" or "false" indicating whether text is editable or not */ EDITABLE = 5, /** * Pixels of blank space to leave above each newline-terminated line. */ PIXELS_ABOVE_LINES = 6, /** * Pixels of blank space to leave below each newline-terminated line. */ PIXELS_BELOW_LINES = 7, /** * Pixels of blank space to leave between wrapped lines inside the same newline-terminated line (paragraph). */ PIXELS_INSIDE_WRAP = 8, /** * "true" or "false" whether to make the background color for each character the height of the highest font used on the current line, or the height of the font used for the current character. */ BG_FULL_HEIGHT = 9, /** * Number of pixels that the characters are risen above the baseline */ RISE = 10, /** * "none", "single", "double", "low", or "error" */ UNDERLINE = 11, /** * "true" or "false" whether the text is strikethrough */ STRIKETHROUGH = 12, /** * The size of the characters in points. eg: 10 */ SIZE = 13, /** * The scale of the characters. The value is a string representation of a double */ SCALE = 14, /** * The weight of the characters. */ WEIGHT = 15, /** * The language used */ LANGUAGE = 16, /** * The font family name */ FAMILY_NAME = 17, /** * The background color. The value is an RGB value of the format "%u,%u,%u" */ BG_COLOR = 18, /** * The foreground color. The value is an RGB value of the format "%u,%u,%u" */ FG_COLOR = 19, /** * "true" if a #GdkBitmap is set for stippling the background color. */ BG_STIPPLE = 20, /** * "true" if a #GdkBitmap is set for stippling the foreground color. */ FG_STIPPLE = 21, /** * The wrap mode of the text, if any. Values are "none", "char", "word", or "word_char". */ WRAP_MODE = 22, /** * The direction of the text, if set. Values are "none", "ltr" or "rtl" */ DIRECTION = 23, /** * The justification of the text, if set. Values are "left", "right", "center" or "fill" */ JUSTIFICATION = 24, /** * The stretch of the text, if set. Values are "ultra_condensed", "extra_condensed", "condensed", "semi_condensed", "normal", "semi_expanded", "expanded", "extra_expanded" or "ultra_expanded" */ STRETCH = 25, /** * The capitalization variant of the text, if set. Values are "normal" or "small_caps" */ VARIANT = 26, /** * The slant style of the text, if set. Values are "normal", "oblique" or "italic" */ STYLE = 27, /** * not a valid text attribute, used for finding end of enumeration */ LAST_DEFINED = 28, } alias AtkTextAttribute TextAttribute; /** * Text boundary types used for specifying boundaries for regions of text. * This enumeration is deprecated since 2.9.4 and should not be used. Use * AtkTextGranularity with #atk_text_get_string_at_offset instead. */ public enum AtkTextBoundary { /** * Boundary is the boundary between characters * (including non-printing characters) */ CHAR = 0, /** * Boundary is the start (i.e. first character) of a word. */ WORD_START = 1, /** * Boundary is the end (i.e. last * character) of a word. */ WORD_END = 2, /** * Boundary is the first character in a sentence. */ SENTENCE_START = 3, /** * Boundary is the last (terminal) * character in a sentence; in languages which use "sentence stop" * punctuation such as English, the boundary is thus the '.', '?', or * similar terminal punctuation character. */ SENTENCE_END = 4, /** * Boundary is the initial character of the content or a * character immediately following a newline, linefeed, or return character. */ LINE_START = 5, /** * Boundary is the linefeed, or return * character. */ LINE_END = 6, } alias AtkTextBoundary TextBoundary; /** * Describes the type of clipping required. */ public enum AtkTextClipType { /** * No clipping to be done */ NONE = 0, /** * Text clipped by min coordinate is omitted */ MIN = 1, /** * Text clipped by max coordinate is omitted */ MAX = 2, /** * Only text fully within mix/max bound is retained */ BOTH = 3, } alias AtkTextClipType TextClipType; /** * Text granularity types used for specifying the granularity of the region of * text we are interested in. */ public enum AtkTextGranularity { /** * Granularity is defined by the boundaries between characters * (including non-printing characters) */ CHAR = 0, /** * Granularity is defined by the boundaries of a word, * starting at the beginning of the current word and finishing at the beginning of * the following one, if present. */ WORD = 1, /** * Granularity is defined by the boundaries of a sentence, * starting at the beginning of the current sentence and finishing at the beginning of * the following one, if present. */ SENTENCE = 2, /** * Granularity is defined by the boundaries of a line, * starting at the beginning of the current line and finishing at the beginning of * the following one, if present. */ LINE = 3, /** * Granularity is defined by the boundaries of a paragraph, * starting at the beginning of the current paragraph and finishing at the beginning of * the following one, if present. */ PARAGRAPH = 4, } alias AtkTextGranularity TextGranularity; /** * Default types for a given value. Those are defined in order to * easily get localized strings to describe a given value or a given * subrange, using atk_value_type_get_localized_name(). */ public enum AtkValueType { VERY_WEAK = 0, WEAK = 1, ACCEPTABLE = 2, STRONG = 3, VERY_STRONG = 4, VERY_LOW = 5, LOW = 6, MEDIUM = 7, HIGH = 8, VERY_HIGH = 9, VERY_BAD = 10, BAD = 11, GOOD = 12, VERY_GOOD = 13, BEST = 14, LAST_DEFINED = 15, } alias AtkValueType ValueType; struct AtkAction; struct AtkActionIface { GTypeInterface parent; /** * * Params: * action = a #GObject instance that implements AtkActionIface * i = the action index corresponding to the action to be performed * Returns: %TRUE if success, %FALSE otherwise */ extern(C) int function(AtkAction* action, int i) doAction; /** * * Params: * action = a #GObject instance that implements AtkActionIface * Returns: a the number of actions, or 0 if @action does not * implement this interface. */ extern(C) int function(AtkAction* action) getNActions; /** * * Params: * action = a #GObject instance that implements AtkActionIface * i = the action index corresponding to the action to be performed * Returns: a description string, or %NULL if @action does * not implement this interface. */ extern(C) const(char)* function(AtkAction* action, int i) getDescription; /** * * Params: * action = a #GObject instance that implements AtkActionIface * i = the action index corresponding to the action to be performed * Returns: a name string, or %NULL if @action does not * implement this interface. */ extern(C) const(char)* function(AtkAction* action, int i) getName; /** * * Params: * action = a #GObject instance that implements AtkActionIface * i = the action index corresponding to the action to be performed * Returns: the keybinding which can be used to activate * this action, or %NULL if there is no keybinding for this action. */ extern(C) const(char)* function(AtkAction* action, int i) getKeybinding; /** * * Params: * action = a #GObject instance that implements AtkActionIface * i = the action index corresponding to the action to be performed * desc = the description to be assigned to this action * Returns: a gboolean representing if the description was successfully set; */ extern(C) int function(AtkAction* action, int i, const(char)* desc) setDescription; /** * * Params: * action = a #GObject instance that implements AtkActionIface * i = the action index corresponding to the action to be performed * Returns: a name string, or %NULL if @action does not * implement this interface. */ extern(C) const(char)* function(AtkAction* action, int i) getLocalizedName; } struct AtkComponent; struct AtkComponentIface { GTypeInterface parent; /** * * Params: * component = The #AtkComponent to attach the @handler to * handler = The #AtkFocusHandler to be attached to @component * Returns: a handler id which can be used in atk_component_remove_focus_handler() * or zero if the handler was already added. */ extern(C) uint function(AtkComponent* component, AtkFocusHandler handler) addFocusHandler; /** * * Params: * component = the #AtkComponent * x = x coordinate * y = y coordinate * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * Returns: %TRUE or %FALSE indicating whether the specified point is within * the extent of the @component or not */ extern(C) int function(AtkComponent* component, int x, int y, AtkCoordType coordType) contains; /** * * Params: * component = the #AtkComponent * x = x coordinate * y = y coordinate * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * Returns: a reference to the accessible * child, if one exists */ extern(C) AtkObject* function(AtkComponent* component, int x, int y, AtkCoordType coordType) refAccessibleAtPoint; /** */ extern(C) void function(AtkComponent* component, int* x, int* y, int* width, int* height, AtkCoordType coordType) getExtents; /** */ extern(C) void function(AtkComponent* component, int* x, int* y, AtkCoordType coordType) getPosition; /** */ extern(C) void function(AtkComponent* component, int* width, int* height) getSize; /** * * Params: * component = an #AtkComponent * Returns: %TRUE if successful, %FALSE otherwise. */ extern(C) int function(AtkComponent* component) grabFocus; /** */ extern(C) void function(AtkComponent* component, uint handlerId) removeFocusHandler; /** * * Params: * component = an #AtkComponent * x = x coordinate * y = y coordinate * width = width to set for @component * height = height to set for @component * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * Returns: %TRUE or %FALSE whether the extents were set or not */ extern(C) int function(AtkComponent* component, int x, int y, int width, int height, AtkCoordType coordType) setExtents; /** * * Params: * component = an #AtkComponent * x = x coordinate * y = y coordinate * coordType = specifies whether the coordinates are relative to the screen * or to the components top level window * Returns: %TRUE or %FALSE whether or not the position was set or not */ extern(C) int function(AtkComponent* component, int x, int y, AtkCoordType coordType) setPosition; /** * * Params: * component = an #AtkComponent * width = width to set for @component * height = height to set for @component * Returns: %TRUE or %FALSE whether the size was set or not */ extern(C) int function(AtkComponent* component, int width, int height) setSize; /** * * Params: * component = an #AtkComponent * Returns: an #AtkLayer which is the layer of the component */ extern(C) AtkLayer function(AtkComponent* component) getLayer; /** * * Params: * component = an #AtkComponent * Returns: a gint which is the zorder of the component, i.e. the depth at * which the component is shown in relation to other components in the same * container. */ extern(C) int function(AtkComponent* component) getMdiZorder; /** */ extern(C) void function(AtkComponent* component, AtkRectangle* bounds) boundsChanged; /** * * Params: * component = an #AtkComponent * Returns: An alpha value from 0 to 1.0, inclusive. */ extern(C) double function(AtkComponent* component) getAlpha; } struct AtkDocument; struct AtkDocumentIface { GTypeInterface parent; /** * * Params: * document = a #GObject instance that implements AtkDocumentIface * Returns: a string indicating the document type */ extern(C) const(char)* function(AtkDocument* document) getDocumentType; /** * * Params: * document = a #GObject instance that implements AtkDocumentIface * Returns: a %gpointer that points to an instance of the DOM. */ extern(C) void* function(AtkDocument* document) getDocument; /** */ extern(C) const(char)* function(AtkDocument* document) getDocumentLocale; /** */ extern(C) AtkAttributeSet* function(AtkDocument* document) getDocumentAttributes; /** */ extern(C) const(char)* function(AtkDocument* document, const(char)* attributeName) getDocumentAttributeValue; /** */ extern(C) int function(AtkDocument* document, const(char)* attributeName, const(char)* attributeValue) setDocumentAttribute; /** * * Params: * document = the #AtkDocument * Returns: current page number inside @document. -1 if not * implemented, not know by the implementor or irrelevant. */ extern(C) int function(AtkDocument* document) getCurrentPageNumber; /** * * Params: * document = the #AtkDocument * Returns: total page count of @document. -1 if not implemented, not * know by the implementor or irrelevant. */ extern(C) int function(AtkDocument* document) getPageCount; } struct AtkEditableText; struct AtkEditableTextIface { GTypeInterface parentInterface; /** * * Params: * text = an #AtkEditableText * attribSet = an #AtkAttributeSet * startOffset = start of range in which to set attributes * endOffset = end of range in which to set attributes * Returns: %TRUE if attributes successfully set for the specified * range, otherwise %FALSE */ extern(C) int function(AtkEditableText* text, AtkAttributeSet* attribSet, int startOffset, int endOffset) setRunAttributes; /** */ extern(C) void function(AtkEditableText* text, const(char)* str) setTextContents; /** */ extern(C) void function(AtkEditableText* text, const(char)* str, int length, int* position) insertText; /** */ extern(C) void function(AtkEditableText* text, int startPos, int endPos) copyText; /** */ extern(C) void function(AtkEditableText* text, int startPos, int endPos) cutText; /** */ extern(C) void function(AtkEditableText* text, int startPos, int endPos) deleteText; /** */ extern(C) void function(AtkEditableText* text, int position) pasteText; } struct AtkGObjectAccessible { AtkObject parent; } struct AtkGObjectAccessibleClass { AtkObjectClass parentClass; AtkFunction pad1; AtkFunction pad2; } struct AtkHyperlink { GObject parent; } struct AtkHyperlinkClass { GObjectClass parent; /** * * Params: * link = an #AtkHyperlink * i = a (zero-index) integer specifying the desired anchor * Returns: a string specifying the URI */ extern(C) char* function(AtkHyperlink* link, int i) getUri; /** * * Params: * link = an #AtkHyperlink * i = a (zero-index) integer specifying the desired anchor * Returns: an #AtkObject associated with this hyperlinks * i-th anchor */ extern(C) AtkObject* function(AtkHyperlink* link, int i) getObject; /** * * Params: * link = an #AtkHyperlink * Returns: the index with the hypertext document at which this link ends */ extern(C) int function(AtkHyperlink* link) getEndIndex; /** * * Params: * link = an #AtkHyperlink * Returns: the index with the hypertext document at which this link begins */ extern(C) int function(AtkHyperlink* link) getStartIndex; /** * * Params: * link = an #AtkHyperlink * Returns: whether or not this link is still valid */ extern(C) int function(AtkHyperlink* link) isValid; /** * * Params: * link = an #AtkHyperlink * Returns: the number of anchors associated with this hyperlink */ extern(C) int function(AtkHyperlink* link) getNAnchors; /** */ extern(C) uint function(AtkHyperlink* link) linkState; /** * * Params: * link = an #AtkHyperlink * Returns: True if the AtkHyperlink is selected, False otherwise */ extern(C) int function(AtkHyperlink* link) isSelectedLink; /** */ extern(C) void function(AtkHyperlink* link) linkActivated; AtkFunction pad1; } struct AtkHyperlinkImpl; struct AtkHyperlinkImplIface { GTypeInterface parent; /** * * Params: * impl = a #GObject instance that implements AtkHyperlinkImplIface * Returns: an AtkHyperlink object which points to this * implementing AtkObject. */ extern(C) AtkHyperlink* function(AtkHyperlinkImpl* impl) getHyperlink; } struct AtkHypertext; struct AtkHypertextIface { GTypeInterface parent; /** * * Params: * hypertext = an #AtkHypertext * linkIndex = an integer specifying the desired link * Returns: the link in this hypertext document at * index @link_index */ extern(C) AtkHyperlink* function(AtkHypertext* hypertext, int linkIndex) getLink; /** * * Params: * hypertext = an #AtkHypertext * Returns: the number of links within this hypertext document */ extern(C) int function(AtkHypertext* hypertext) getNLinks; /** * * Params: * hypertext = an #AtkHypertext * charIndex = a character index * Returns: an index into the array of hyperlinks in @hypertext, * or -1 if there is no hyperlink associated with this character. */ extern(C) int function(AtkHypertext* hypertext, int charIndex) getLinkIndex; /** */ extern(C) void function(AtkHypertext* hypertext, int linkIndex) linkSelected; } struct AtkImage; struct AtkImageIface { GTypeInterface parent; /** */ extern(C) void function(AtkImage* image, int* x, int* y, AtkCoordType coordType) getImagePosition; /** * * Params: * image = a #GObject instance that implements AtkImageIface * Returns: a string representing the image description */ extern(C) const(char)* function(AtkImage* image) getImageDescription; /** */ extern(C) void function(AtkImage* image, int* width, int* height) getImageSize; /** * * Params: * image = a #GObject instance that implements AtkImageIface * description = a string description to set for @image * Returns: boolean TRUE, or FALSE if operation could * not be completed. */ extern(C) int function(AtkImage* image, const(char)* description) setImageDescription; /** * * Params: * image = An #AtkImage * Returns: a string corresponding to the POSIX * LC_MESSAGES locale used by the image description, or %NULL if the * image does not specify a locale. */ extern(C) const(char)* function(AtkImage* image) getImageLocale; } struct AtkImplementor; /** * Encapsulates information about a key event. */ struct AtkKeyEventStruct { /** * An AtkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE */ int type; /** * A bitmask representing the state of the modifier keys immediately after the event takes place. * The meaning of the bits is currently defined to match the bitmask used by GDK in * GdkEventType.state, see * http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html#GdkEventKey */ uint state; /** * A guint representing a keysym value corresponding to those used by GDK and X11: see * /usr/X11/include/keysymdef.h. */ uint keyval; /** * The length of member #string. */ int length; /** * A string containing one of the following: either a string approximating the text that would * result from this keypress, if the key is a control or graphic character, or a symbolic name for this keypress. * Alphanumeric and printable keys will have the symbolic key name in this string member, for instance "A". "0", * "semicolon", "aacute". Keypad keys have the prefix "KP". */ char* str; /** * The raw hardware code that generated the key event. This field is raraly useful. */ ushort keycode; /** * A timestamp in milliseconds indicating when the event occurred. * These timestamps are relative to a starting point which should be considered arbitrary, * and only used to compare the dispatch times of events to one another. */ uint timestamp; } struct AtkMisc { GObject parent; } /** * Usage of AtkMisc is deprecated since 2.12 and heavily discouraged. */ struct AtkMiscClass { GObjectClass parent; /** */ extern(C) void function(AtkMisc* misc) threadsEnter; /** */ extern(C) void function(AtkMisc* misc) threadsLeave; void*[32] vfuncs; } struct AtkNoOpObject { AtkObject parent; } struct AtkNoOpObjectClass { AtkObjectClass parentClass; } struct AtkNoOpObjectFactory { AtkObjectFactory parent; } struct AtkNoOpObjectFactoryClass { AtkObjectFactoryClass parentClass; } struct AtkObject { GObject parent; char* description; char* name; AtkObject* accessibleParent; AtkRole role; AtkRelationSet* relationSet; AtkLayer layer; } struct AtkObjectClass { GObjectClass parent; /** * * Params: * accessible = an #AtkObject * Returns: a character string representing the accessible name of the object. */ extern(C) const(char)* function(AtkObject* accessible) getName; /** * * Params: * accessible = an #AtkObject * Returns: a character string representing the accessible description * of the accessible. */ extern(C) const(char)* function(AtkObject* accessible) getDescription; /** * * Params: * accessible = an #AtkObject * Returns: an #AtkObject representing the accessible * parent of the accessible */ extern(C) AtkObject* function(AtkObject* accessible) getParent; /** */ extern(C) int function(AtkObject* accessible) getNChildren; /** */ extern(C) AtkObject* function(AtkObject* accessible, int i) refChild; /** * * Params: * accessible = an #AtkObject * Returns: an integer which is the index of the accessible in its parent */ extern(C) int function(AtkObject* accessible) getIndexInParent; /** * * Params: * accessible = an #AtkObject * Returns: an #AtkRelationSet representing the relation set * of the object. */ extern(C) AtkRelationSet* function(AtkObject* accessible) refRelationSet; /** * * Params: * accessible = an #AtkObject * Returns: an #AtkRole which is the role of the accessible */ extern(C) AtkRole function(AtkObject* accessible) getRole; /** * * Params: * accessible = an #AtkObject * Returns: an #AtkLayer which is the layer of the accessible */ extern(C) AtkLayer function(AtkObject* accessible) getLayer; /** * * Params: * accessible = an #AtkObject * Returns: a gint which is the zorder of the accessible, i.e. the depth at * which the component is shown in relation to other components in the same * container. */ extern(C) int function(AtkObject* accessible) getMdiZorder; /** * * Params: * accessible = an #AtkObject * Returns: a reference to an #AtkStateSet which is the state * set of the accessible */ extern(C) AtkStateSet* function(AtkObject* accessible) refStateSet; /** */ extern(C) void function(AtkObject* accessible, const(char)* name) setName; /** */ extern(C) void function(AtkObject* accessible, const(char)* description) setDescription; /** */ extern(C) void function(AtkObject* accessible, AtkObject* parent) setParent; /** */ extern(C) void function(AtkObject* accessible, AtkRole role) setRole; /** * * Params: * accessible = an #AtkObject * handler = a function to be called when a property changes its value * Returns: a #guint which is the handler id used in * atk_object_remove_property_change_handler() */ extern(C) uint function(AtkObject* accessible, AtkPropertyChangeHandler* handler) connectPropertyChangeHandler; /** */ extern(C) void function(AtkObject* accessible, uint handlerId) removePropertyChangeHandler; /** */ extern(C) void function(AtkObject* accessible, void* data) initialize; /** */ extern(C) void function(AtkObject* accessible, uint changeIndex, void* changedChild) childrenChanged; /** */ extern(C) void function(AtkObject* accessible, int focusIn) focusEvent; /** */ extern(C) void function(AtkObject* accessible, AtkPropertyValues* values) propertyChange; /** */ extern(C) void function(AtkObject* accessible, const(char)* name, int stateSet) stateChange; /** */ extern(C) void function(AtkObject* accessible) visibleDataChanged; /** */ extern(C) void function(AtkObject* accessible, void** child) activeDescendantChanged; /** * * Params: * accessible = An #AtkObject. * Returns: an #AtkAttributeSet consisting of all * explicit properties/annotations applied to the object, or an empty * set if the object has no name-value pair attributes assigned to * it. This #atkattributeset should be freed by a call to * atk_attribute_set_free(). */ extern(C) AtkAttributeSet* function(AtkObject* accessible) getAttributes; /** * * Params: * accessible = an #AtkObject * Returns: a UTF-8 string indicating the POSIX-style LC_MESSAGES * locale of @accessible. */ extern(C) const(char)* function(AtkObject* accessible) getObjectLocale; AtkFunction pad1; } struct AtkObjectFactory { GObject parent; } struct AtkObjectFactoryClass { GObjectClass parentClass; /** */ extern(C) AtkObject* function(GObject* obj) createAccessible; /** */ extern(C) void function(AtkObjectFactory* factory) invalidate; /** */ extern(C) GType function() getAccessibleType; AtkFunction pad1; AtkFunction pad2; } struct AtkPlug { AtkObject parent; } struct AtkPlugClass { AtkObjectClass parentClass; /** */ extern(C) char* function(AtkPlug* obj) getObjectId; } /** * Note: @old_value field of #AtkPropertyValues will not contain a * valid value. This is a field defined with the purpose of contain * the previous value of the property, but is not used anymore. */ struct AtkPropertyValues { /** * The name of the ATK property which has changed. */ const(char)* propertyName; /** * NULL. This field is not used anymore. */ GValue oldValue; /** * The new value of the named property. */ GValue newValue; } struct AtkRange; /** * A data structure for holding a rectangle. Those coordinates are * relative to the component top-level parent. */ struct AtkRectangle { /** * X coordinate of the left side of the rectangle. */ int x; /** * Y coordinate of the top side of the rectangle. */ int y; /** * width of the rectangle. */ int width; /** * height of the rectangle. */ int height; } struct AtkRegistry { GObject parent; GHashTable* factoryTypeRegistry; GHashTable* factorySingletonCache; } struct AtkRegistryClass { GObjectClass parentClass; } struct AtkRelation { GObject parent; GPtrArray* target; AtkRelationType relationship; } struct AtkRelationClass { GObjectClass parent; } struct AtkRelationSet { GObject parent; GPtrArray* relations; } struct AtkRelationSetClass { GObjectClass parent; AtkFunction pad1; AtkFunction pad2; } struct AtkSelection; struct AtkSelectionIface { GTypeInterface parent; /** * * Params: * selection = a #GObject instance that implements AtkSelectionIface * i = a #gint specifying the child index. * Returns: TRUE if success, FALSE otherwise. */ extern(C) int function(AtkSelection* selection, int i) addSelection; /** * * Params: * selection = a #GObject instance that implements AtkSelectionIface * Returns: TRUE if success, FALSE otherwise. */ extern(C) int function(AtkSelection* selection) clearSelection; /** * * Params: * selection = a #GObject instance that implements AtkSelectionIface * i = a #gint specifying the index in the selection set. (e.g. the * ith selection as opposed to the ith child). * Returns: an #AtkObject representing the * selected accessible, or %NULL if @selection does not implement this * interface. */ extern(C) AtkObject* function(AtkSelection* selection, int i) refSelection; /** * * Params: * selection = a #GObject instance that implements AtkSelectionIface * Returns: a gint representing the number of items selected, or 0 * if @selection does not implement this interface. */ extern(C) int function(AtkSelection* selection) getSelectionCount; /** * * Params: * selection = a #GObject instance that implements AtkSelectionIface * i = a #gint specifying the child index. * Returns: a gboolean representing the specified child is selected, or 0 * if @selection does not implement this interface. */ extern(C) int function(AtkSelection* selection, int i) isChildSelected; /** * * Params: * selection = a #GObject instance that implements AtkSelectionIface * i = a #gint specifying the index in the selection set. (e.g. the * ith selection as opposed to the ith child). * Returns: TRUE if success, FALSE otherwise. */ extern(C) int function(AtkSelection* selection, int i) removeSelection; /** * * Params: * selection = a #GObject instance that implements AtkSelectionIface * Returns: TRUE if success, FALSE otherwise. */ extern(C) int function(AtkSelection* selection) selectAllSelection; /** */ extern(C) void function(AtkSelection* selection) selectionChanged; } struct AtkSocket { AtkObject parent; char* embeddedPlugId; } struct AtkSocketClass { AtkObjectClass parentClass; /** */ extern(C) void function(AtkSocket* obj, char* plugId) embed; } struct AtkStateSet { GObject parent; } struct AtkStateSetClass { GObjectClass parent; } struct AtkStreamableContent; struct AtkStreamableContentIface { GTypeInterface parent; /** * * Params: * streamable = a GObject instance that implements AtkStreamableContentIface * Returns: a gint which is the number of mime types supported by the object. */ extern(C) int function(AtkStreamableContent* streamable) getNMimeTypes; /** * * Params: * streamable = a GObject instance that implements AtkStreamableContent * i = a gint representing the position of the mime type starting from 0 * Returns: a gchar* representing the specified mime type; the caller * should not free the character string. */ extern(C) const(char)* function(AtkStreamableContent* streamable, int i) getMimeType; /** * * Params: * streamable = a GObject instance that implements AtkStreamableContentIface * mimeType = a gchar* representing the mime type * Returns: A #GIOChannel which contains the content in the * specified mime type. */ extern(C) GIOChannel* function(AtkStreamableContent* streamable, const(char)* mimeType) getStream; /** * * Params: * streamable = a GObject instance that implements AtkStreamableContentIface * mimeType = a gchar* representing the mime type, or NULL to request a URI * for the default mime type. * Returns: Returns a string representing a URI, or %NULL * if no corresponding URI can be constructed. */ extern(C) const(char)* function(AtkStreamableContent* streamable, const(char)* mimeType) getUri; AtkFunction pad1; AtkFunction pad2; AtkFunction pad3; } struct AtkTable; struct AtkTableCell; struct AtkTableCellIface { GTypeInterface parent; /** * * Params: * cell = a GObject instance that implements AtkTableCellIface * Returns: a gint representing the number of columns occupied by this cell, * or 0 if the cell does not implement this method. */ extern(C) int function(AtkTableCell* cell) getColumnSpan; /** * * Params: * cell = a GObject instance that implements AtkTableCellIface * Returns: a GPtrArray of AtkObjects * representing the column header cells. */ extern(C) GPtrArray* function(AtkTableCell* cell) getColumnHeaderCells; /** * * Params: * cell = a GObject instance that implements AtkTableCellIface * row = the row of the given cell. * column = the column of the given cell. * Returns: TRUE if successful; FALSE otherwise. */ extern(C) int function(AtkTableCell* cell, int* row, int* column) getPosition; /** * * Params: * cell = a GObject instance that implements AtkTableCellIface * Returns: a gint representing the number of rows occupied by this cell, * or 0 if the cell does not implement this method. */ extern(C) int function(AtkTableCell* cell) getRowSpan; /** * * Params: * cell = a GObject instance that implements AtkTableCellIface * Returns: a GPtrArray of AtkObjects * representing the row header cells. */ extern(C) GPtrArray* function(AtkTableCell* cell) getRowHeaderCells; /** * * Params: * cell = a GObject instance that implements AtkTableCellIface * row = the row index of the given cell. * column = the column index of the given cell. * rowSpan = the number of rows occupied by this cell. * columnSpan = the number of columns occupied by this cell. * Returns: TRUE if successful; FALSE otherwise. */ extern(C) int function(AtkTableCell* cell, int* row, int* column, int* rowSpan, int* columnSpan) getRowColumnSpan; /** * * Params: * cell = a GObject instance that implements AtkTableCellIface * Returns: the atk object for the containing table. */ extern(C) AtkObject* function(AtkTableCell* cell) getTable; } struct AtkTableIface { GTypeInterface parent; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in @table * column = a #gint representing a column in @table * Returns: an #AtkObject representing the referred * to accessible */ extern(C) AtkObject* function(AtkTable* table, int row, int column) refAt; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in @table * column = a #gint representing a column in @table * Returns: a #gint representing the index at specified position. * The value -1 is returned if the object at row,column is not a child * of table or table does not implement this interface. */ extern(C) int function(AtkTable* table, int row, int column) getIndexAt; /** * * Params: * table = a GObject instance that implements AtkTableInterface * index = a #gint representing an index in @table * Returns: a gint representing the column at the specified index, * or -1 if the table does not implement this method. */ extern(C) int function(AtkTable* table, int index) getColumnAtIndex; /** * * Params: * table = a GObject instance that implements AtkTableInterface * index = a #gint representing an index in @table * Returns: a gint representing the row at the specified index, * or -1 if the table does not implement this method. */ extern(C) int function(AtkTable* table, int index) getRowAtIndex; /** * * Params: * table = a GObject instance that implements AtkTableIface * Returns: a gint representing the number of columns, or 0 * if value does not implement this interface. */ extern(C) int function(AtkTable* table) getNColumns; /** * * Params: * table = a GObject instance that implements AtkTableIface * Returns: a gint representing the number of rows, or 0 * if value does not implement this interface. */ extern(C) int function(AtkTable* table) getNRows; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in @table * column = a #gint representing a column in @table * Returns: a gint representing the column extent at specified position, or 0 * if value does not implement this interface. */ extern(C) int function(AtkTable* table, int row, int column) getColumnExtentAt; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in @table * column = a #gint representing a column in @table * Returns: a gint representing the row extent at specified position, or 0 * if value does not implement this interface. */ extern(C) int function(AtkTable* table, int row, int column) getRowExtentAt; /** * * Params: * table = a GObject instance that implements AtkTableInterface * Returns: a AtkObject* representing the * table caption, or %NULL if value does not implement this interface. */ extern(C) AtkObject* function(AtkTable* table) getCaption; /** * * Params: * table = a GObject instance that implements AtkTableIface * column = a #gint representing a column in @table * Returns: a gchar* representing the column description, or %NULL * if value does not implement this interface. */ extern(C) const(char)* function(AtkTable* table, int column) getColumnDescription; /** * * Params: * table = a GObject instance that implements AtkTableIface * column = a #gint representing a column in the table * Returns: a AtkObject* representing the * specified column header, or %NULL if value does not implement this * interface. */ extern(C) AtkObject* function(AtkTable* table, int column) getColumnHeader; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in @table * Returns: a gchar* representing the row description, or * %NULL if value does not implement this interface. */ extern(C) const(char)* function(AtkTable* table, int row) getRowDescription; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in the table * Returns: a AtkObject* representing the * specified row header, or %NULL if value does not implement this * interface. */ extern(C) AtkObject* function(AtkTable* table, int row) getRowHeader; /** * * Params: * table = a GObject instance that implements AtkTableIface * Returns: a AtkObject* representing a summary description * of the table, or zero if value does not implement this interface. */ extern(C) AtkObject* function(AtkTable* table) getSummary; /** */ extern(C) void function(AtkTable* table, AtkObject* caption) setCaption; /** */ extern(C) void function(AtkTable* table, int column, const(char)* description) setColumnDescription; /** */ extern(C) void function(AtkTable* table, int column, AtkObject* header) setColumnHeader; /** */ extern(C) void function(AtkTable* table, int row, const(char)* description) setRowDescription; /** */ extern(C) void function(AtkTable* table, int row, AtkObject* header) setRowHeader; /** */ extern(C) void function(AtkTable* table, AtkObject* accessible) setSummary; /** * * Params: * table = a GObject instance that implements AtkTableIface * selected = a #gint** that is to contain the selected columns numbers * Returns: a gint representing the number of selected columns, * or %0 if value does not implement this interface. */ extern(C) int function(AtkTable* table, int** selected) getSelectedColumns; /** * * Params: * table = a GObject instance that implements AtkTableIface * selected = a #gint** that is to contain the selected row numbers * Returns: a gint representing the number of selected rows, * or zero if value does not implement this interface. */ extern(C) int function(AtkTable* table, int** selected) getSelectedRows; /** * * Params: * table = a GObject instance that implements AtkTableIface * column = a #gint representing a column in @table * Returns: a gboolean representing if the column is selected, or 0 * if value does not implement this interface. */ extern(C) int function(AtkTable* table, int column) isColumnSelected; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in @table * Returns: a gboolean representing if the row is selected, or 0 * if value does not implement this interface. */ extern(C) int function(AtkTable* table, int row) isRowSelected; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in @table * column = a #gint representing a column in @table * Returns: a gboolean representing if the cell is selected, or 0 * if value does not implement this interface. */ extern(C) int function(AtkTable* table, int row, int column) isSelected; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in @table * Returns: a gboolean representing if row was successfully added to selection, * or 0 if value does not implement this interface. */ extern(C) int function(AtkTable* table, int row) addRowSelection; /** * * Params: * table = a GObject instance that implements AtkTableIface * row = a #gint representing a row in @table * Returns: a gboolean representing if the row was successfully removed from * the selection, or 0 if value does not implement this interface. */ extern(C) int function(AtkTable* table, int row) removeRowSelection; /** * * Params: * table = a GObject instance that implements AtkTableIface * column = a #gint representing a column in @table * Returns: a gboolean representing if the column was successfully added to * the selection, or 0 if value does not implement this interface. */ extern(C) int function(AtkTable* table, int column) addColumnSelection; /** * * Params: * table = a GObject instance that implements AtkTableIface * column = a #gint representing a column in @table * Returns: a gboolean representing if the column was successfully removed from * the selection, or 0 if value does not implement this interface. */ extern(C) int function(AtkTable* table, int column) removeColumnSelection; /** */ extern(C) void function(AtkTable* table, int row, int numInserted) rowInserted; /** */ extern(C) void function(AtkTable* table, int column, int numInserted) columnInserted; /** */ extern(C) void function(AtkTable* table, int row, int numDeleted) rowDeleted; /** */ extern(C) void function(AtkTable* table, int column, int numDeleted) columnDeleted; /** */ extern(C) void function(AtkTable* table) rowReordered; /** */ extern(C) void function(AtkTable* table) columnReordered; /** */ extern(C) void function(AtkTable* table) modelChanged; } struct AtkText; struct AtkTextIface { GTypeInterface parent; /** * * Params: * text = an #AtkText * startOffset = start position * endOffset = end position, or -1 for the end of the string. * Returns: a newly allocated string containing the text from @start_offset up * to, but not including @end_offset. Use g_free() to free the returned string. */ extern(C) char* function(AtkText* text, int startOffset, int endOffset) getText; /** * * Params: * text = an #AtkText * offset = position * boundaryType = An #AtkTextBoundary * startOffset = the start offset of the returned string * endOffset = the offset of the first character after the * returned substring * Returns: a newly allocated string containing the text after @offset bounded * by the specified @boundary_type. Use g_free() to free the returned string. */ extern(C) char* function(AtkText* text, int offset, AtkTextBoundary boundaryType, int* startOffset, int* endOffset) getTextAfterOffset; /** * * Params: * text = an #AtkText * offset = position * boundaryType = An #AtkTextBoundary * startOffset = the start offset of the returned string * endOffset = the offset of the first character after the * returned substring * Returns: a newly allocated string containing the text at @offset bounded by * the specified @boundary_type. Use g_free() to free the returned string. */ extern(C) char* function(AtkText* text, int offset, AtkTextBoundary boundaryType, int* startOffset, int* endOffset) getTextAtOffset; /** * * Params: * text = an #AtkText * offset = position * Returns: the character at @offset. */ extern(C) dchar function(AtkText* text, int offset) getCharacterAtOffset; /** * * Params: * text = an #AtkText * offset = position * boundaryType = An #AtkTextBoundary * startOffset = the start offset of the returned string * endOffset = the offset of the first character after the * returned substring * Returns: a newly allocated string containing the text before @offset bounded * by the specified @boundary_type. Use g_free() to free the returned string. */ extern(C) char* function(AtkText* text, int offset, AtkTextBoundary boundaryType, int* startOffset, int* endOffset) getTextBeforeOffset; /** * * Params: * text = an #AtkText * Returns: the offset position of the caret (cursor). */ extern(C) int function(AtkText* text) getCaretOffset; /** * * Params: * text = an #AtkText * offset = the offset at which to get the attributes, -1 means the offset of * the character to be inserted at the caret location. * startOffset = the address to put the start offset of the range * endOffset = the address to put the end offset of the range * Returns: an #AtkAttributeSet which contains the attributes * explicitly set at @offset. This #AtkAttributeSet should be freed by a call * to atk_attribute_set_free(). */ extern(C) AtkAttributeSet* function(AtkText* text, int offset, int* startOffset, int* endOffset) getRunAttributes; /** * * Params: * text = an #AtkText * Returns: an #AtkAttributeSet which contains the default * values of attributes. at @offset. this #atkattributeset should be freed by * a call to atk_attribute_set_free(). */ extern(C) AtkAttributeSet* function(AtkText* text) getDefaultAttributes; /** */ extern(C) void function(AtkText* text, int offset, int* x, int* y, int* width, int* height, AtkCoordType coords) getCharacterExtents; /** * * Params: * text = an #AtkText * Returns: the number of characters. */ extern(C) int function(AtkText* text) getCharacterCount; /** * * Params: * text = an #AtkText * x = screen x-position of character * y = screen y-position of character * coords = specify whether coordinates are relative to the screen or * widget window * Returns: the offset to the character which is located at * the specified @x and @y coordinates. */ extern(C) int function(AtkText* text, int x, int y, AtkCoordType coords) getOffsetAtPoint; /** * * Params: * text = an #AtkText * Returns: The number of selected regions, or -1 if a failure * occurred. */ extern(C) int function(AtkText* text) getNSelections; /** * * Params: * text = an #AtkText * selectionNum = The selection number. The selected regions are * assigned numbers that correspond to how far the region is from the * start of the text. The selected region closest to the beginning * of the text region is assigned the number 0, etc. Note that adding, * moving or deleting a selected region can change the numbering. * startOffset = passes back the start position of the selected region * endOffset = passes back the end position of (e.g. offset immediately past) * the selected region * Returns: a newly allocated string containing the selected text. Use g_free() * to free the returned string. */ extern(C) char* function(AtkText* text, int selectionNum, int* startOffset, int* endOffset) getSelection; /** * * Params: * text = an #AtkText * startOffset = the start position of the selected region * endOffset = the offset of the first character after the selected region. * Returns: %TRUE if success, %FALSE otherwise */ extern(C) int function(AtkText* text, int startOffset, int endOffset) addSelection; /** * * Params: * text = an #AtkText * selectionNum = The selection number. The selected regions are * assigned numbers that correspond to how far the region is from the * start of the text. The selected region closest to the beginning * of the text region is assigned the number 0, etc. Note that adding, * moving or deleting a selected region can change the numbering. * Returns: %TRUE if success, %FALSE otherwise */ extern(C) int function(AtkText* text, int selectionNum) removeSelection; /** * * Params: * text = an #AtkText * selectionNum = The selection number. The selected regions are * assigned numbers that correspond to how far the region is from the * start of the text. The selected region closest to the beginning * of the text region is assigned the number 0, etc. Note that adding, * moving or deleting a selected region can change the numbering. * startOffset = the new start position of the selection * endOffset = the new end position of (e.g. offset immediately past) * the selection * Returns: %TRUE if success, %FALSE otherwise */ extern(C) int function(AtkText* text, int selectionNum, int startOffset, int endOffset) setSelection; /** * * Params: * text = an #AtkText * offset = position * Returns: %TRUE if success, %FALSE otherwise. */ extern(C) int function(AtkText* text, int offset) setCaretOffset; /** */ extern(C) void function(AtkText* text, int position, int length) textChanged; /** */ extern(C) void function(AtkText* text, int location) textCaretMoved; /** */ extern(C) void function(AtkText* text) textSelectionChanged; /** */ extern(C) void function(AtkText* text) textAttributesChanged; /** */ extern(C) void function(AtkText* text, int startOffset, int endOffset, AtkCoordType coordType, AtkTextRectangle* rect) getRangeExtents; /** */ extern(C) AtkTextRange** function(AtkText* text, AtkTextRectangle* rect, AtkCoordType coordType, AtkTextClipType xClipType, AtkTextClipType yClipType) getBoundedRanges; /** * * Params: * text = an #AtkText * offset = position * granularity = An #AtkTextGranularity * startOffset = the start offset of the returned string, or -1 * if an error has occurred (e.g. invalid offset, not implemented) * endOffset = the offset of the first character after the returned string, * or -1 if an error has occurred (e.g. invalid offset, not implemented) * Returns: a newly allocated string containing the text * at the @offset bounded by the specified @granularity. Use * g_free() to free the returned string. Returns %NULL if the * offset is invalid or no implementation is available. */ extern(C) char* function(AtkText* text, int offset, AtkTextGranularity granularity, int* startOffset, int* endOffset) getStringAtOffset; } /** * A structure used to describe a text range. */ struct AtkTextRange { /** * A rectangle giving the bounds of the text range */ AtkTextRectangle bounds; /** * The start offset of a AtkTextRange */ int startOffset; /** * The end offset of a AtkTextRange */ int endOffset; /** * The text in the text range */ char* content; } /** * A structure used to store a rectangle used by AtkText. */ struct AtkTextRectangle { /** * The horizontal coordinate of a rectangle */ int x; /** * The vertical coordinate of a rectangle */ int y; /** * The width of a rectangle */ int width; /** * The height of a rectangle */ int height; } /** * A set of ATK utility functions which are used to support event * registration of various types, and obtaining the 'root' accessible * of a process and information about the current ATK implementation * and toolkit version. */ struct AtkUtil { GObject parent; } struct AtkUtilClass { GObjectClass parent; /** */ extern(C) uint function(GSignalEmissionHook listener, const(char)* eventType) addGlobalEventListener; /** */ extern(C) void function(uint listenerId) removeGlobalEventListener; /** */ extern(C) uint function(AtkKeySnoopFunc listener, void* data) addKeyEventListener; /** */ extern(C) void function(uint listenerId) removeKeyEventListener; /** */ extern(C) AtkObject* function() getRoot; /** */ extern(C) const(char)* function() getToolkitName; /** */ extern(C) const(char)* function() getToolkitVersion; } struct AtkValue; struct AtkValueIface { GTypeInterface parent; /** */ extern(C) void function(AtkValue* obj, GValue* value) getCurrentValue; /** */ extern(C) void function(AtkValue* obj, GValue* value) getMaximumValue; /** */ extern(C) void function(AtkValue* obj, GValue* value) getMinimumValue; /** * * Params: * obj = a GObject instance that implements AtkValueIface * value = a #GValue which is the desired new accessible value. * Returns: %TRUE if new value is successfully set, %FALSE otherwise. */ extern(C) int function(AtkValue* obj, GValue* value) setCurrentValue; /** */ extern(C) void function(AtkValue* obj, GValue* value) getMinimumIncrement; /** */ extern(C) void function(AtkValue* obj, double* value, char** text) getValueAndText; /** * * Params: * obj = a GObject instance that implements AtkValueIface * Returns: a newly allocated #AtkRange * that represents the minimum, maximum and descriptor (if available) * of @obj. NULL if that range is not defined. */ extern(C) AtkRange* function(AtkValue* obj) getRange; /** * * Params: * obj = a GObject instance that implements AtkValueIface * Returns: the minimum increment by which the value of this * object may be changed. zero if undefined. */ extern(C) double function(AtkValue* obj) getIncrement; /** * * Params: * obj = a GObject instance that implements AtkValueIface * Returns: an #GSList of * #AtkRange which each of the subranges defined for this object. Free * the returns list with g_slist_free(). */ extern(C) GSList* function(AtkValue* obj) getSubRanges; /** */ extern(C) void function(AtkValue* obj, double newValue) setValue; } struct AtkWindow; struct AtkWindowIface { GTypeInterface parent; } /** * A function which is called when an object emits a matching event, * as used in #atk_add_focus_tracker. * Currently the only events for which object-specific handlers are * supported are events of type "focus:". Most clients of ATK will prefer to * attach signal handlers for the various ATK signals instead. * * see atk_add_focus_tracker. * * Params: * obj = An #AtkObject instance for whom the callback will be called when * the specified event (e.g. 'focus:') takes place. */ public alias extern(C) void function(AtkObject* obj) AtkEventListener; /** * An #AtkEventListenerInit function is a special function that is * called in order to initialize the per-object event registration system * used by #AtkEventListener, if any preparation is required. * * see atk_focus_tracker_init. */ public alias extern(C) void function() AtkEventListenerInit; /** * The type of callback function used for * atk_component_add_focus_handler() and * atk_component_remove_focus_handler() * * Deprecated: Deprecated with atk_component_add_focus_handler() * and atk_component_remove_focus_handler(). See those * methods for more information. * * Params: * object = the #AtkObject that receives/lose the focus * focusIn = TRUE if the object receives the focus */ public alias extern(C) void function(AtkObject* object, int focusIn) AtkFocusHandler; /** * An AtkFunction is a function definition used for padding which has * been added to class and interface structures to allow for expansion * in the future. * * Params: * userData = custom data defined by the user * * Returns: not used */ public alias extern(C) int function(void* userData) AtkFunction; /** * An #AtkKeySnoopFunc is a type of callback which is called whenever a key event occurs, * if registered via atk_add_key_event_listener. It allows for pre-emptive * interception of key events via the return code as described below. * * Params: * event = an AtkKeyEventStruct containing information about the key event for which * notification is being given. * userData = a block of data which will be passed to the event listener, on notification. * * Returns: TRUE (nonzero) if the event emission should be stopped and the event * discarded without being passed to the normal GUI recipient; FALSE (zero) if the * event dispatch to the client application should proceed as normal. * * see atk_add_key_event_listener. */ public alias extern(C) int function(AtkKeyEventStruct* event, void* userData) AtkKeySnoopFunc; /** * An AtkPropertyChangeHandler is a function which is executed when an * AtkObject's property changes value. It is specified in a call to * atk_object_connect_property_change_handler(). * * Deprecated: Since 2.12. * * Params: * obj = atkobject which property changes * vals = values changed */ public alias extern(C) void function(AtkObject* obj, AtkPropertyValues* vals) AtkPropertyChangeHandler; /** * Like atk_get_binary_age(), but from the headers used at * application compile time, rather than from the library linked * against at application run time. */ enum BINARY_AGE = 22611; alias ATK_BINARY_AGE = BINARY_AGE; /** * Like atk_get_interface_age(), but from the headers used at * application compile time, rather than from the library linked * against at application run time. */ enum INTERFACE_AGE = 1; alias ATK_INTERFACE_AGE = INTERFACE_AGE; /** * Like atk_get_major_version(), but from the headers used at * application compile time, rather than from the library linked * against at application run time. */ enum MAJOR_VERSION = 2; alias ATK_MAJOR_VERSION = MAJOR_VERSION; /** * Like atk_get_micro_version(), but from the headers used at * application compile time, rather than from the library linked * against at application run time. */ enum MICRO_VERSION = 1; alias ATK_MICRO_VERSION = MICRO_VERSION; /** * Like atk_get_minor_version(), but from the headers used at * application compile time, rather than from the library linked * against at application run time. */ enum MINOR_VERSION = 26; alias ATK_MINOR_VERSION = MINOR_VERSION; /** * A macro that should be defined by the user prior to including * the atk/atk.h header. * The definition should be one of the predefined ATK version * macros: %ATK_VERSION_2_12, %ATK_VERSION_2_14,... * * This macro defines the earliest version of ATK that the package is * required to be able to compile against. * * If the compiler is configured to warn about the use of deprecated * functions, then using functions that were deprecated in version * %ATK_VERSION_MIN_REQUIRED or earlier will cause warnings (but * using functions deprecated in later releases will not). */ enum VERSION_MIN_REQUIRED = 2; alias ATK_VERSION_MIN_REQUIRED = VERSION_MIN_REQUIRED; GtkD-3.7.5/generated/gtkd/cairo/000077500000000000000000000000001324604450400163455ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/cairo/Context.d000066400000000000000000002523141324604450400201450ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-cairo-t.html * outPack = cairo * outFile = Context * strct = cairo_t * realStrct= * ctorStrct= * clss = Context * interf = * class Code: Yes * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_ * omit structs: * omit prefixes: * omit code: * - cairo_destroy * - cairo_create * omit signals: * imports: * - cairo.FontFace * - cairo.FontOption * - cairo.Matrix * - cairo.ScaledFont * - cairo.Surface * - cairo.Pattern * - glib.Str * - gtkd.paths; * - gtkd.Loader; * structWrap: * - cairo_font_face_t* -> FontFace * - cairo_font_options_t* -> FontOption * - cairo_matrix_t* -> Matrix * - cairo_pattern_t* -> Pattern * - cairo_scaled_font_t* -> ScaledFont * - cairo_surface_t* -> Surface * - cairo_t* -> Context * module aliases: * local aliases: * overrides: */ module cairo.Context; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import cairo.FontFace; private import cairo.FontOption; private import cairo.Matrix; private import cairo.ScaledFont; private import cairo.Surface; private import cairo.Pattern; private import glib.Str; private import gtkd.Loader; private import std.traits; /** * cairo_t is the main object used when drawing with cairo. To * draw with cairo, you create a cairo_t, set the target surface, * and drawing options for the cairo_t, create shapes with * functions like cairo_move_to() and cairo_line_to(), and then * draw shapes with cairo_stroke() or cairo_fill(). * * cairo_t's can be pushed to a stack via cairo_save(). * They may then safely be changed, without losing the current state. * Use cairo_restore() to restore to the saved state. */ public class Context { /** the main Gtk struct */ protected cairo_t* cairo; /** Get the main Gtk struct */ public cairo_t* getContextStruct() { return cairo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_t* cairo, bool ownedRef = false) { this.cairo = cairo; if ( !ownedRef ) { cairo_reference(this.cairo); } } ~this () { static if ( isPointer!(typeof(cairo_get_reference_count)) ) bool libLoaded = Linker.isLoaded(LIBRARY_CAIRO); else enum libLoaded = true; if ( libLoaded && cairo !is null && cairo_get_reference_count(cairo) > 0 ) { cairo_destroy(cairo); } } /** * Allocates an array of cairo_glyph_t's. * This function is only useful in implementations of * cairo_user_scaled_font_text_to_glyphs_func_t where the user * needs to allocate an array of glyphs that cairo will free. * For all other uses, user can use their own allocation method * for glyphs. * This function returns NULL if num_glyphs is not positive, * or if out of memory. That means, the NULL return value * signals out-of-memory only if num_glyphs was positive. * Since 1.8 * Params: * numGlyphs = number of glyphs to allocate * Returns: the newly allocated array of glyphs that should be freed using cairo_glyph_free() */ public static cairo_glyph_t[] glyphAllocate(int numGlyphs) { // cairo_glyph_t* cairo_glyph_allocate (int num_glyphs); return cairo_glyph_allocate(numGlyphs)[0 .. numGlyphs]; } /** * Allocates an array of cairo_text_cluster_t's. * This function is only useful in implementations of * cairo_user_scaled_font_text_to_glyphs_func_t where the user * needs to allocate an array of text clusters that cairo will free. * For all other uses, user can use their own allocation method * for text clusters. * This function returns NULL if num_clusters is not positive, * or if out of memory. That means, the NULL return value * signals out-of-memory only if num_clusters was positive. * Since 1.8 * Params: * numClusters = number of text_clusters to allocate * Returns: the newly allocated array of text clusters that should be freed using cairo_text_cluster_free() */ public static cairo_text_cluster_t[] textClusterAllocate(int numClusters) { // cairo_text_cluster_t* cairo_text_cluster_allocate (int num_clusters); return cairo_text_cluster_allocate(numClusters)[0 .. numClusters]; } /** * Decreases the reference count on cr by one. If the result * is zero, then cr and all associated resources are freed. * See cairo_reference(). */ public void destroy() { uint refCount = cairo_get_reference_count(cairo); // void cairo_destroy (cairo_t *cr); cairo_destroy(cairo); //if refCount is 1 the actual refCount after cairo_destroy is 0. if ( refCount == 1 ) cairo = null; } /** * Creates a new context with all graphics state parameters set to * default values and with target as a target surface. * * Since 1.0 * Params: * target = target surface for the context * * Returns: * a newly allocated context. This function never returns null. * If memory cannot be allocated, a special context will be returned * on which status() returns CairoStatus.NO_MEMORY. * If you attempt to target a surface which does not support writing * (such as cairo_mime_surface_t) then a CairoStatus.WRITE_ERROR will * be raised. You can use this object normally, but no drawing will * be done. */ public static Context create(Surface target) { // cairo_t * cairo_create (cairo_surface_t *target); auto p = cairo_create((target is null) ? null : target.getSurfaceStruct()); if(p is null) { return null; } return new Context(cast(cairo_t*) p, true); } /** * Paths are the most basic drawing tools and are primarily used to implicitly * generate simple masks. */ /** * The current transformation matrix, ctm, is a * two-dimensional affine transformation that maps all coordinates and other * drawing instruments from the user space into the * surface's canonical coordinate system, also known as the device * space. */ /** * The functions with text in their name form cairo's * toy text API. The toy API takes UTF-8 encoded * text and is limited in its functionality to rendering simple * left-to-right text with no advanced features. That means for example * that most complex scripts like Hebrew, Arabic, and Indic scripts are * out of question. No kerning or correct positioning of diacritical marks * either. The font selection is pretty limited too and doesn't handle the * case that the selected font does not cover the characters in the text. * This set of functions are really that, a toy text API, for testing and * demonstration purposes. Any serious application should avoid them. * * The functions with glyphs in their name form cairo's * low-level text API. The low-level API relies on * the user to convert text to a set of glyph indexes and positions. This * is a very hard problem and is best handled by external libraries, like * the pangocairo that is part of the Pango text layout and rendering library. * Pango is available from http://www.pango.org/. */ /** * Increases the reference count on cr by one. This prevents * cr from being destroyed until a matching call to cairo_destroy() * is made. * The number of references to a cairo_t can be get using * cairo_get_reference_count(). * Since 1.0 * Returns: the referenced cairo_t. */ public Context reference() { // cairo_t * cairo_reference (cairo_t *cr); auto p = cairo_reference(cairo); if(p is null) { return null; } return new Context(cast(cairo_t*) p); } /** * Checks whether an error has previously occurred for this context. * Since 1.0 * Returns: the current status of this context, see cairo_status_t */ public cairo_status_t status() { // cairo_status_t cairo_status (cairo_t *cr); return cairo_status(cairo); } /** * Makes a copy of the current state of cr and saves it * on an internal stack of saved states for cr. When * cairo_restore() is called, cr will be restored to * the saved state. Multiple calls to cairo_save() and * cairo_restore() can be nested; each call to cairo_restore() * restores the state from the matching paired cairo_save(). * It isn't necessary to clear all saved states before * a cairo_t is freed. If the reference count of a cairo_t * drops to zero in response to a call to cairo_destroy(), * any saved states will be freed along with the cairo_t. * Since 1.0 */ public void save() { // void cairo_save (cairo_t *cr); cairo_save(cairo); } /** * Restores cr to the state saved by a preceding call to * cairo_save() and removes that state from the stack of * saved states. * Since 1.0 */ public void restore() { // void cairo_restore (cairo_t *cr); cairo_restore(cairo); } /** * Gets the target surface for the cairo context as passed to * cairo_create(). * This function will always return a valid pointer, but the result * can be a "nil" surface if cr is already in an error state, * (ie. cairo_status() != CAIRO_STATUS_SUCCESS). * A nil surface is indicated by cairo_surface_status() * != CAIRO_STATUS_SUCCESS. * Since 1.0 * Returns: the target surface. This object is owned by cairo. To keep a reference to it, you must call cairo_surface_reference(). */ public Surface getTarget() { // cairo_surface_t * cairo_get_target (cairo_t *cr); auto p = cairo_get_target(cairo); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Temporarily redirects drawing to an intermediate surface known as a * group. The redirection lasts until the group is completed by a call * to cairo_pop_group() or cairo_pop_group_to_source(). These calls * provide the result of any drawing to the group as a pattern, * (either as an explicit object, or set as the source pattern). * This group functionality can be convenient for performing * intermediate compositing. One common use of a group is to render * objects as opaque within the group, (so that they occlude each * other), and then blend the result with translucence onto the * destination. * Groups can be nested arbitrarily deep by making balanced calls to * cairo_push_group()/cairo_pop_group(). Each call pushes/pops the new * target group onto/from a stack. * The cairo_push_group() function calls cairo_save() so that any * changes to the graphics state will not be visible outside the * group, (the pop_group functions call cairo_restore()). * By default the intermediate group will have a content type of * CAIRO_CONTENT_COLOR_ALPHA. Other content types can be chosen for * the group by using cairo_push_group_with_content() instead. * As an example, here is how one might fill and stroke a path with * translucence, but without any portion of the fill being visible * Since 1.2 */ public void pushGroup() { // void cairo_push_group (cairo_t *cr); cairo_push_group(cairo); } /** * Temporarily redirects drawing to an intermediate surface known as a * group. The redirection lasts until the group is completed by a call * to cairo_pop_group() or cairo_pop_group_to_source(). These calls * provide the result of any drawing to the group as a pattern, * (either as an explicit object, or set as the source pattern). * The group will have a content type of content. The ability to * control this content type is the only distinction between this * function and cairo_push_group() which you should see for a more * detailed description of group rendering. * Since 1.2 * Params: * content = a cairo_content_t indicating the type of group that * will be created */ public void pushGroupWithContent(cairo_content_t content) { // void cairo_push_group_with_content (cairo_t *cr, cairo_content_t content); cairo_push_group_with_content(cairo, content); } /** * Terminates the redirection begun by a call to cairo_push_group() or * cairo_push_group_with_content() and returns a new pattern * containing the results of all drawing operations performed to the * group. * The cairo_pop_group() function calls cairo_restore(), (balancing a * call to cairo_save() by the push_group function), so that any * changes to the graphics state will not be visible outside the * group. * Since 1.2 * Returns: a newly created (surface) pattern containing the results of all drawing operations performed to the group. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. */ public Pattern popGroup() { // cairo_pattern_t * cairo_pop_group (cairo_t *cr); auto p = cairo_pop_group(cairo); if(p is null) { return null; } return new Pattern(cast(cairo_pattern_t*) p); } /** * Terminates the redirection begun by a call to cairo_push_group() or * cairo_push_group_with_content() and installs the resulting pattern * as the source pattern in the given cairo context. * The behavior of this function is equivalent to the sequence of * Since 1.2 */ public void popGroupToSource() { // void cairo_pop_group_to_source (cairo_t *cr); cairo_pop_group_to_source(cairo); } /** * Gets the current destination surface for the context. This is either * the original target surface as passed to cairo_create() or the target * surface for the current group as started by the most recent call to * cairo_push_group() or cairo_push_group_with_content(). * This function will always return a valid pointer, but the result * can be a "nil" surface if cr is already in an error state, * (ie. cairo_status() != CAIRO_STATUS_SUCCESS). * A nil surface is indicated by cairo_surface_status() * != CAIRO_STATUS_SUCCESS. * Since 1.2 * Returns: the target surface. This object is owned by cairo. To keep a reference to it, you must call cairo_surface_reference(). */ public Surface getGroupTarget() { // cairo_surface_t * cairo_get_group_target (cairo_t *cr); auto p = cairo_get_group_target(cairo); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Sets the source pattern within cr to an opaque color. This opaque * color will then be used for any subsequent drawing operation until * a new source pattern is set. * The color components are floating point numbers in the range 0 to * 1. If the values passed in are outside that range, they will be * clamped. * The default source pattern is opaque black, (that is, it is * equivalent to cairo_set_source_rgb(cr, 0.0, 0.0, 0.0)). * Since 1.0 * Params: * red = red component of color * green = green component of color * blue = blue component of color */ public void setSourceRgb(double red, double green, double blue) { // void cairo_set_source_rgb (cairo_t *cr, double red, double green, double blue); cairo_set_source_rgb(cairo, red, green, blue); } /** * Sets the source pattern within cr to a translucent color. This * color will then be used for any subsequent drawing operation until * a new source pattern is set. * The color and alpha components are floating point numbers in the * range 0 to 1. If the values passed in are outside that range, they * will be clamped. * The default source pattern is opaque black, (that is, it is * equivalent to cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 1.0)). * Since 1.0 * Params: * red = red component of color * green = green component of color * blue = blue component of color * alpha = alpha component of color */ public void setSourceRgba(double red, double green, double blue, double alpha) { // void cairo_set_source_rgba (cairo_t *cr, double red, double green, double blue, double alpha); cairo_set_source_rgba(cairo, red, green, blue, alpha); } /** * Sets the source pattern within cr to source. This pattern * will then be used for any subsequent drawing operation until a new * source pattern is set. * Note: The pattern's transformation matrix will be locked to the * user space in effect at the time of cairo_set_source(). This means * that further modifications of the current transformation matrix * will not affect the source pattern. See cairo_pattern_set_matrix(). * The default source pattern is a solid pattern that is opaque black, * (that is, it is equivalent to cairo_set_source_rgb(cr, 0.0, 0.0, * 0.0)). * Since 1.0 * Params: * source = a cairo_pattern_t to be used as the source for * subsequent drawing operations. */ public void setSource(Pattern source) { // void cairo_set_source (cairo_t *cr, cairo_pattern_t *source); cairo_set_source(cairo, (source is null) ? null : source.getPatternStruct()); } /** * This is a convenience function for creating a pattern from surface * and setting it as the source in cr with cairo_set_source(). * The x and y parameters give the user-space coordinate at which * the surface origin should appear. (The surface origin is its * upper-left corner before any transformation has been applied.) The * x and y parameters are negated and then set as translation values * in the pattern matrix. * Other than the initial translation pattern matrix, as described * above, all other pattern attributes, (such as its extend mode), are * set to the default values as in cairo_pattern_create_for_surface(). * The resulting pattern can be queried with cairo_get_source() so * that these attributes can be modified if desired, (eg. to create a * repeating pattern with cairo_pattern_set_extend()). * Since 1.0 * Params: * surface = a surface to be used to set the source pattern * x = User-space X coordinate for surface origin * y = User-space Y coordinate for surface origin */ public void setSourceSurface(Surface surface, double x, double y) { // void cairo_set_source_surface (cairo_t *cr, cairo_surface_t *surface, double x, double y); cairo_set_source_surface(cairo, (surface is null) ? null : surface.getSurfaceStruct(), x, y); } /** * Gets the current source pattern for cr. * Since 1.0 * Returns: the current source pattern. This object is owned by cairo. To keep a reference to it, you must call cairo_pattern_reference(). */ public Pattern getSource() { // cairo_pattern_t * cairo_get_source (cairo_t *cr); auto p = cairo_get_source(cairo); if(p is null) { return null; } return new Pattern(cast(cairo_pattern_t*) p); } /** * Set the antialiasing mode of the rasterizer used for drawing shapes. * This value is a hint, and a particular backend may or may not support * a particular value. At the current time, no backend supports * CAIRO_ANTIALIAS_SUBPIXEL when drawing shapes. * Note that this option does not affect text rendering, instead see * cairo_font_options_set_antialias(). * Since 1.0 * Params: * antialias = the new antialiasing mode */ public void setAntialias(cairo_antialias_t antialias) { // void cairo_set_antialias (cairo_t *cr, cairo_antialias_t antialias); cairo_set_antialias(cairo, antialias); } /** * Gets the current shape antialiasing mode, as set by * cairo_set_antialias(). * Since 1.0 * Returns: the current shape antialiasing mode. */ public cairo_antialias_t getAntialias() { // cairo_antialias_t cairo_get_antialias (cairo_t *cr); return cairo_get_antialias(cairo); } /** * Sets the dash pattern to be used by cairo_stroke(). A dash pattern * is specified by dashes, an array of positive values. Each value * provides the length of alternate "on" and "off" portions of the * stroke. The offset specifies an offset into the pattern at which * the stroke begins. * Each "on" segment will have caps applied as if the segment were a * separate sub-path. In particular, it is valid to use an "on" length * of 0.0 with CAIRO_LINE_CAP_ROUND or CAIRO_LINE_CAP_SQUARE in order * to distributed dots or squares along a path. * Note: The length values are in user-space units as evaluated at the * time of stroking. This is not necessarily the same as the user * space at the time of cairo_set_dash(). * If num_dashes is 0 dashing is disabled. * If num_dashes is 1 a symmetric pattern is assumed with alternating * on and off portions of the size specified by the single value in * dashes. * If any value in dashes is negative, or if all values are 0, then * cr will be put into an error state with a status of * CAIRO_STATUS_INVALID_DASH. * Since 1.0 * Params: * dashes = an array specifying alternate lengths of on and off stroke portions * offset = an offset into the dash pattern at which the stroke should start */ public void setDash(double[] dashes, double offset) { // void cairo_set_dash (cairo_t *cr, const double *dashes, int num_dashes, double offset); cairo_set_dash(cairo, dashes.ptr, cast(int) dashes.length, offset); } /** * This function returns the length of the dash array in cr (0 if dashing * is not currently in effect). * See also cairo_set_dash() and cairo_get_dash(). * Since 1.4 * Returns: the length of the dash array, or 0 if no dash array set. */ public int getDashCount() { // int cairo_get_dash_count (cairo_t *cr); return cairo_get_dash_count(cairo); } /** * Gets the current dash array. If not NULL, dashes should be big * enough to hold at least the number of values returned by * cairo_get_dash_count(). * Since 1.4 * Params: * dashes = return value for the dash array, or NULL * offset = return value for the current dash offset, or NULL */ public void getDash(double* dashes, double* offset) { // void cairo_get_dash (cairo_t *cr, double *dashes, double *offset); cairo_get_dash(cairo, dashes, offset); } /** * Set the current fill rule within the cairo context. The fill rule * is used to determine which regions are inside or outside a complex * (potentially self-intersecting) path. The current fill rule affects * both cairo_fill() and cairo_clip(). See cairo_fill_rule_t for details * on the semantics of each available fill rule. * The default fill rule is CAIRO_FILL_RULE_WINDING. * Since 1.0 * Params: * fillRule = a fill rule, specified as a cairo_fill_rule_t */ public void setFillRule(cairo_fill_rule_t fillRule) { // void cairo_set_fill_rule (cairo_t *cr, cairo_fill_rule_t fill_rule); cairo_set_fill_rule(cairo, fillRule); } /** * Gets the current fill rule, as set by cairo_set_fill_rule(). * Since 1.0 * Returns: the current fill rule. */ public cairo_fill_rule_t getFillRule() { // cairo_fill_rule_t cairo_get_fill_rule (cairo_t *cr); return cairo_get_fill_rule(cairo); } /** * Sets the current line cap style within the cairo context. See * cairo_line_cap_t for details about how the available line cap * styles are drawn. * As with the other stroke parameters, the current line cap style is * examined by cairo_stroke(), cairo_stroke_extents(), and * cairo_stroke_to_path(), but does not have any effect during path * construction. * The default line cap style is CAIRO_LINE_CAP_BUTT. * Since 1.0 * Params: * lineCap = a line cap style */ public void setLineCap(cairo_line_cap_t lineCap) { // void cairo_set_line_cap (cairo_t *cr, cairo_line_cap_t line_cap); cairo_set_line_cap(cairo, lineCap); } /** * Gets the current line cap style, as set by cairo_set_line_cap(). * Since 1.0 * Returns: the current line cap style. */ public cairo_line_cap_t getLineCap() { // cairo_line_cap_t cairo_get_line_cap (cairo_t *cr); return cairo_get_line_cap(cairo); } /** * Sets the current line join style within the cairo context. See * cairo_line_join_t for details about how the available line join * styles are drawn. * As with the other stroke parameters, the current line join style is * examined by cairo_stroke(), cairo_stroke_extents(), and * cairo_stroke_to_path(), but does not have any effect during path * construction. * The default line join style is CAIRO_LINE_JOIN_MITER. * Since 1.0 * Params: * lineJoin = a line join style */ public void setLineJoin(cairo_line_join_t lineJoin) { // void cairo_set_line_join (cairo_t *cr, cairo_line_join_t line_join); cairo_set_line_join(cairo, lineJoin); } /** * Gets the current line join style, as set by cairo_set_line_join(). * Since 1.0 * Returns: the current line join style. */ public cairo_line_join_t getLineJoin() { // cairo_line_join_t cairo_get_line_join (cairo_t *cr); return cairo_get_line_join(cairo); } /** * Sets the current line width within the cairo context. The line * width value specifies the diameter of a pen that is circular in * user space, (though device-space pen may be an ellipse in general * due to scaling/shear/rotation of the CTM). * Note: When the description above refers to user space and CTM it * refers to the user space and CTM in effect at the time of the * stroking operation, not the user space and CTM in effect at the * time of the call to cairo_set_line_width(). The simplest usage * makes both of these spaces identical. That is, if there is no * change to the CTM between a call to cairo_set_line_width() and the * stroking operation, then one can just pass user-space values to * cairo_set_line_width() and ignore this note. * As with the other stroke parameters, the current line width is * examined by cairo_stroke(), cairo_stroke_extents(), and * cairo_stroke_to_path(), but does not have any effect during path * construction. * The default line width value is 2.0. * Since 1.0 * Params: * width = a line width */ public void setLineWidth(double width) { // void cairo_set_line_width (cairo_t *cr, double width); cairo_set_line_width(cairo, width); } /** * This function returns the current line width value exactly as set by * cairo_set_line_width(). Note that the value is unchanged even if * the CTM has changed between the calls to cairo_set_line_width() and * cairo_get_line_width(). * Since 1.0 * Returns: the current line width. */ public double getLineWidth() { // double cairo_get_line_width (cairo_t *cr); return cairo_get_line_width(cairo); } /** * Sets the current miter limit within the cairo context. * If the current line join style is set to CAIRO_LINE_JOIN_MITER * (see cairo_set_line_join()), the miter limit is used to determine * whether the lines should be joined with a bevel instead of a miter. * Cairo divides the length of the miter by the line width. * If the result is greater than the miter limit, the style is * converted to a bevel. * As with the other stroke parameters, the current line miter limit is * examined by cairo_stroke(), cairo_stroke_extents(), and * cairo_stroke_to_path(), but does not have any effect during path * construction. * The default miter limit value is 10.0, which will convert joins * with interior angles less than 11 degrees to bevels instead of * miters. For reference, a miter limit of 2.0 makes the miter cutoff * at 60 degrees, and a miter limit of 1.414 makes the cutoff at 90 * degrees. * A miter limit for a desired angle can be computed as: miter limit = * 1/sin(angle/2) * Since 1.0 * Params: * limit = miter limit to set */ public void setMiterLimit(double limit) { // void cairo_set_miter_limit (cairo_t *cr, double limit); cairo_set_miter_limit(cairo, limit); } /** * Gets the current miter limit, as set by cairo_set_miter_limit(). * Since 1.0 * Returns: the current miter limit. */ public double getMiterLimit() { // double cairo_get_miter_limit (cairo_t *cr); return cairo_get_miter_limit(cairo); } /** * Sets the compositing operator to be used for all drawing * operations. See cairo_operator_t for details on the semantics of * each available compositing operator. * The default operator is CAIRO_OPERATOR_OVER. * Since 1.0 * Params: * op = a compositing operator, specified as a cairo_operator_t */ public void setOperator(cairo_operator_t op) { // void cairo_set_operator (cairo_t *cr, cairo_operator_t op); cairo_set_operator(cairo, op); } /** * Gets the current compositing operator for a cairo context. * Since 1.0 * Returns: the current compositing operator. */ public cairo_operator_t getOperator() { // cairo_operator_t cairo_get_operator (cairo_t *cr); return cairo_get_operator(cairo); } /** * Sets the tolerance used when converting paths into trapezoids. * Curved segments of the path will be subdivided until the maximum * deviation between the original path and the polygonal approximation * is less than tolerance. The default value is 0.1. A larger * value will give better performance, a smaller value, better * appearance. (Reducing the value from the default value of 0.1 * is unlikely to improve appearance significantly.) The accuracy of paths * within Cairo is limited by the precision of its internal arithmetic, and * the prescribed tolerance is restricted to the smallest * representable internal value. * Since 1.0 * Params: * tolerance = the tolerance, in device units (typically pixels) */ public void setTolerance(double tolerance) { // void cairo_set_tolerance (cairo_t *cr, double tolerance); cairo_set_tolerance(cairo, tolerance); } /** * Gets the current tolerance value, as set by cairo_set_tolerance(). * Since 1.0 * Returns: the current tolerance value. */ public double getTolerance() { // double cairo_get_tolerance (cairo_t *cr); return cairo_get_tolerance(cairo); } /** * Establishes a new clip region by intersecting the current clip * region with the current path as it would be filled by cairo_fill() * and according to the current fill rule (see cairo_set_fill_rule()). * After cairo_clip(), the current path will be cleared from the cairo * context. * The current clip region affects all drawing operations by * effectively masking out any changes to the surface that are outside * the current clip region. * Calling cairo_clip() can only make the clip region smaller, never * larger. But the current clip is part of the graphics state, so a * temporary restriction of the clip region can be achieved by * calling cairo_clip() within a cairo_save()/cairo_restore() * pair. The only other means of increasing the size of the clip * region is cairo_reset_clip(). * Since 1.0 */ public void clip() { // void cairo_clip (cairo_t *cr); cairo_clip(cairo); } /** * Establishes a new clip region by intersecting the current clip * region with the current path as it would be filled by cairo_fill() * and according to the current fill rule (see cairo_set_fill_rule()). * Unlike cairo_clip(), cairo_clip_preserve() preserves the path within * the cairo context. * The current clip region affects all drawing operations by * effectively masking out any changes to the surface that are outside * the current clip region. * Calling cairo_clip_preserve() can only make the clip region smaller, never * larger. But the current clip is part of the graphics state, so a * temporary restriction of the clip region can be achieved by * calling cairo_clip_preserve() within a cairo_save()/cairo_restore() * pair. The only other means of increasing the size of the clip * region is cairo_reset_clip(). * Since 1.0 */ public void clipPreserve() { // void cairo_clip_preserve (cairo_t *cr); cairo_clip_preserve(cairo); } /** * Computes a bounding box in user coordinates covering the area inside the * current clip. * Since 1.4 * Params: * x1 = left of the resulting extents * y1 = top of the resulting extents * x2 = right of the resulting extents * y2 = bottom of the resulting extents */ public void clipExtents(out double x1, out double y1, out double x2, out double y2) { // void cairo_clip_extents (cairo_t *cr, double *x1, double *y1, double *x2, double *y2); cairo_clip_extents(cairo, &x1, &y1, &x2, &y2); } /** * Tests whether the given point is inside the area that would be * visible through the current clip, i.e. the area that would be filled by * a cairo_paint() operation. * See cairo_clip(), and cairo_clip_preserve(). * Since 1.10 * Params: * x = X coordinate of the point to test * y = Y coordinate of the point to test * Returns: A non-zero value if the point is inside, or zero if outside. */ public cairo_bool_t inClip(double x, double y) { // cairo_bool_t cairo_in_clip (cairo_t *cr, double x, double y); return cairo_in_clip(cairo, x, y); } /** * Reset the current clip region to its original, unrestricted * state. That is, set the clip region to an infinitely large shape * containing the target surface. Equivalently, if infinity is too * hard to grasp, one can imagine the clip region being reset to the * exact bounds of the target surface. * Note that code meant to be reusable should not call * cairo_reset_clip() as it will cause results unexpected by * higher-level code which calls cairo_clip(). Consider using * cairo_save() and cairo_restore() around cairo_clip() as a more * robust means of temporarily restricting the clip region. * Since 1.0 */ public void resetClip() { // void cairo_reset_clip (cairo_t *cr); cairo_reset_clip(cairo); } /** * Unconditionally frees rectangle_list and all associated * references. After this call, the rectangle_list pointer must not * be dereferenced. * Since 1.4 * Params: * rectangleList = a rectangle list, as obtained from cairo_copy_clip_rectangle_list() */ public static void rectangleListDestroy(cairo_rectangle_list_t* rectangleList) { // void cairo_rectangle_list_destroy (cairo_rectangle_list_t *rectangle_list); cairo_rectangle_list_destroy(rectangleList); } /** * Gets the current clip region as a list of rectangles in user coordinates. * Never returns NULL. * The status in the list may be CAIRO_STATUS_CLIP_NOT_REPRESENTABLE to * indicate that the clip region cannot be represented as a list of * user-space rectangles. The status may have other values to indicate * other errors. * Since 1.4 * Returns: the current clip region as a list of rectangles in user coordinates, which should be destroyed using cairo_rectangle_list_destroy(). */ public cairo_rectangle_list_t* copyClipRectangleList() { // cairo_rectangle_list_t * cairo_copy_clip_rectangle_list (cairo_t *cr); return cairo_copy_clip_rectangle_list(cairo); } /** * A drawing operator that fills the current path according to the * current fill rule, (each sub-path is implicitly closed before being * filled). After cairo_fill(), the current path will be cleared from * the cairo context. See cairo_set_fill_rule() and * cairo_fill_preserve(). * Since 1.0 */ public void fill() { // void cairo_fill (cairo_t *cr); cairo_fill(cairo); } /** * A drawing operator that fills the current path according to the * current fill rule, (each sub-path is implicitly closed before being * filled). Unlike cairo_fill(), cairo_fill_preserve() preserves the * path within the cairo context. * See cairo_set_fill_rule() and cairo_fill(). * Since 1.0 */ public void fillPreserve() { // void cairo_fill_preserve (cairo_t *cr); cairo_fill_preserve(cairo); } /** * Computes a bounding box in user coordinates covering the area that * would be affected, (the "inked" area), by a cairo_fill() operation * given the current path and fill parameters. If the current path is * empty, returns an empty rectangle ((0,0), (0,0)). Surface * dimensions and clipping are not taken into account. * Contrast with cairo_path_extents(), which is similar, but returns * non-zero extents for some paths with no inked area, (such as a * simple line segment). * Note that cairo_fill_extents() must necessarily do more work to * compute the precise inked areas in light of the fill rule, so * cairo_path_extents() may be more desirable for sake of performance * if the non-inked path extents are desired. * See cairo_fill(), cairo_set_fill_rule() and cairo_fill_preserve(). * Since 1.0 * Params: * x1 = left of the resulting extents * y1 = top of the resulting extents * x2 = right of the resulting extents * y2 = bottom of the resulting extents */ public void fillExtents(out double x1, out double y1, out double x2, out double y2) { // void cairo_fill_extents (cairo_t *cr, double *x1, double *y1, double *x2, double *y2); cairo_fill_extents(cairo, &x1, &y1, &x2, &y2); } /** * Tests whether the given point is inside the area that would be * affected by a cairo_fill() operation given the current path and * filling parameters. Surface dimensions and clipping are not taken * into account. * See cairo_fill(), cairo_set_fill_rule() and cairo_fill_preserve(). * Since 1.0 * Params: * x = X coordinate of the point to test * y = Y coordinate of the point to test * Returns: A non-zero value if the point is inside, or zero if outside. */ public cairo_bool_t inFill(double x, double y) { // cairo_bool_t cairo_in_fill (cairo_t *cr, double x, double y); return cairo_in_fill(cairo, x, y); } /** * A drawing operator that paints the current source * using the alpha channel of pattern as a mask. (Opaque * areas of pattern are painted with the source, transparent * areas are not painted.) * Since 1.0 * Params: * pattern = a cairo_pattern_t */ public void mask(Pattern pattern) { // void cairo_mask (cairo_t *cr, cairo_pattern_t *pattern); cairo_mask(cairo, (pattern is null) ? null : pattern.getPatternStruct()); } /** * A drawing operator that paints the current source * using the alpha channel of surface as a mask. (Opaque * areas of surface are painted with the source, transparent * areas are not painted.) * Since 1.0 * Params: * surface = a cairo_surface_t * surfaceX = X coordinate at which to place the origin of surface * surfaceY = Y coordinate at which to place the origin of surface */ public void maskSurface(Surface surface, double surfaceX, double surfaceY) { // void cairo_mask_surface (cairo_t *cr, cairo_surface_t *surface, double surface_x, double surface_y); cairo_mask_surface(cairo, (surface is null) ? null : surface.getSurfaceStruct(), surfaceX, surfaceY); } /** * A drawing operator that paints the current source everywhere within * the current clip region. * Since 1.0 */ public void paint() { // void cairo_paint (cairo_t *cr); cairo_paint(cairo); } /** * A drawing operator that paints the current source everywhere within * the current clip region using a mask of constant alpha value * alpha. The effect is similar to cairo_paint(), but the drawing * is faded out using the alpha value. * Since 1.0 * Params: * alpha = alpha value, between 0 (transparent) and 1 (opaque) */ public void paintWithAlpha(double alpha) { // void cairo_paint_with_alpha (cairo_t *cr, double alpha); cairo_paint_with_alpha(cairo, alpha); } /** * A drawing operator that strokes the current path according to the * current line width, line join, line cap, and dash settings. After * cairo_stroke(), the current path will be cleared from the cairo * context. See cairo_set_line_width(), cairo_set_line_join(), * cairo_set_line_cap(), cairo_set_dash(), and * cairo_stroke_preserve(). * Note: Degenerate segments and sub-paths are treated specially and * provide a useful result. These can result in two different * Since 1.0 */ public void stroke() { // void cairo_stroke (cairo_t *cr); cairo_stroke(cairo); } /** * A drawing operator that strokes the current path according to the * current line width, line join, line cap, and dash settings. Unlike * cairo_stroke(), cairo_stroke_preserve() preserves the path within the * cairo context. * See cairo_set_line_width(), cairo_set_line_join(), * cairo_set_line_cap(), cairo_set_dash(), and * cairo_stroke_preserve(). * Since 1.0 */ public void strokePreserve() { // void cairo_stroke_preserve (cairo_t *cr); cairo_stroke_preserve(cairo); } /** * Computes a bounding box in user coordinates covering the area that * would be affected, (the "inked" area), by a cairo_stroke() * operation given the current path and stroke parameters. * If the current path is empty, returns an empty rectangle ((0,0), (0,0)). * Surface dimensions and clipping are not taken into account. * Note that if the line width is set to exactly zero, then * cairo_stroke_extents() will return an empty rectangle. Contrast with * cairo_path_extents() which can be used to compute the non-empty * bounds as the line width approaches zero. * Note that cairo_stroke_extents() must necessarily do more work to * compute the precise inked areas in light of the stroke parameters, * so cairo_path_extents() may be more desirable for sake of * performance if non-inked path extents are desired. * See cairo_stroke(), cairo_set_line_width(), cairo_set_line_join(), * cairo_set_line_cap(), cairo_set_dash(), and * cairo_stroke_preserve(). * Since 1.0 * Params: * x1 = left of the resulting extents * y1 = top of the resulting extents * x2 = right of the resulting extents * y2 = bottom of the resulting extents */ public void strokeExtents(out double x1, out double y1, out double x2, out double y2) { // void cairo_stroke_extents (cairo_t *cr, double *x1, double *y1, double *x2, double *y2); cairo_stroke_extents(cairo, &x1, &y1, &x2, &y2); } /** * Tests whether the given point is inside the area that would be * affected by a cairo_stroke() operation given the current path and * stroking parameters. Surface dimensions and clipping are not taken * into account. * See cairo_stroke(), cairo_set_line_width(), cairo_set_line_join(), * cairo_set_line_cap(), cairo_set_dash(), and * cairo_stroke_preserve(). * Since 1.0 * Params: * x = X coordinate of the point to test * y = Y coordinate of the point to test * Returns: A non-zero value if the point is inside, or zero if outside. */ public cairo_bool_t inStroke(double x, double y) { // cairo_bool_t cairo_in_stroke (cairo_t *cr, double x, double y); return cairo_in_stroke(cairo, x, y); } /** * Emits the current page for backends that support multiple pages, but * doesn't clear it, so, the contents of the current page will be retained * for the next page too. Use cairo_show_page() if you want to get an * empty page after the emission. * This is a convenience function that simply calls * cairo_surface_copy_page() on cr's target. * Since 1.0 */ public void copyPage() { // void cairo_copy_page (cairo_t *cr); cairo_copy_page(cairo); } /** * Emits and clears the current page for backends that support multiple * pages. Use cairo_copy_page() if you don't want to clear the page. * This is a convenience function that simply calls * cairo_surface_show_page() on cr's target. * Since 1.0 */ public void showPage() { // void cairo_show_page (cairo_t *cr); cairo_show_page(cairo); } /** * Returns the current reference count of cr. * Since 1.4 * Returns: the current reference count of cr. If the object is a nil object, 0 will be returned. */ public uint getReferenceCount() { // unsigned int cairo_get_reference_count (cairo_t *cr); return cairo_get_reference_count(cairo); } /** * Attach user data to cr. To remove user data from a surface, * call this function with the key that was used to set it and NULL * for data. * Since 1.4 * Params: * key = the address of a cairo_user_data_key_t to attach the user data to * userData = the user data to attach to the cairo_t * destroy = a cairo_destroy_func_t which will be called when the * cairo_t is destroyed or when new user data is attached using the * same key. * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data. */ public cairo_status_t setUserData(cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) { // cairo_status_t cairo_set_user_data (cairo_t *cr, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy); return cairo_set_user_data(cairo, key, userData, destroy); } /** * Return user data previously attached to cr using the specified * key. If no user data has been attached with the given key this * function returns NULL. * Since 1.4 * Params: * key = the address of the cairo_user_data_key_t the user data was * attached to * Returns: the user data previously attached or NULL. */ public void* getUserData(cairo_user_data_key_t* key) { // void * cairo_get_user_data (cairo_t *cr, const cairo_user_data_key_t *key); return cairo_get_user_data(cairo, key); } /** * Creates a copy of the current path and returns it to the user as a * cairo_path_t. See cairo_path_data_t for hints on how to iterate * over the returned data structure. * This function will always return a valid pointer, but the result * will have no data (data==NULL and * num_data==0), if either of the following * Since 1.0 * Returns: the copy of the current path. The caller owns the returned object and should call cairo_path_destroy() when finished with it. */ public cairo_path_t* copyPath() { // cairo_path_t * cairo_copy_path (cairo_t *cr); return cairo_copy_path(cairo); } /** * Gets a flattened copy of the current path and returns it to the * user as a cairo_path_t. See cairo_path_data_t for hints on * how to iterate over the returned data structure. * This function is like cairo_copy_path() except that any curves * in the path will be approximated with piecewise-linear * approximations, (accurate to within the current tolerance * value). That is, the result is guaranteed to not have any elements * of type CAIRO_PATH_CURVE_TO which will instead be replaced by a * series of CAIRO_PATH_LINE_TO elements. * This function will always return a valid pointer, but the result * will have no data (data==NULL and * num_data==0), if either of the following * Since 1.0 * Returns: the copy of the current path. The caller owns the returned object and should call cairo_path_destroy() when finished with it. */ public cairo_path_t* copyPathFlat() { // cairo_path_t * cairo_copy_path_flat (cairo_t *cr); return cairo_copy_path_flat(cairo); } /** * Immediately releases all memory associated with path. After a call * to cairo_path_destroy() the path pointer is no longer valid and * should not be used further. * Note: cairo_path_destroy() should only be called with a * pointer to a cairo_path_t returned by a cairo function. Any path * that is created manually (ie. outside of cairo) should be destroyed * manually as well. * Since 1.0 * Params: * path = a path previously returned by either cairo_copy_path() or * cairo_copy_path_flat(). */ public static void pathDestroy(cairo_path_t* path) { // void cairo_path_destroy (cairo_path_t *path); cairo_path_destroy(path); } /** * Append the path onto the current path. The path may be either the * return value from one of cairo_copy_path() or * cairo_copy_path_flat() or it may be constructed manually. See * cairo_path_t for details on how the path data structure should be * initialized, and note that path->status must be * initialized to CAIRO_STATUS_SUCCESS. * Since 1.0 * Params: * path = path to be appended */ public void appendPath(cairo_path_t* path) { // void cairo_append_path (cairo_t *cr, const cairo_path_t *path); cairo_append_path(cairo, path); } /** * Returns whether a current point is defined on the current path. * See cairo_get_current_point() for details on the current point. * Since 1.6 * Returns: whether a current point is defined. */ public cairo_bool_t hasCurrentPoint() { // cairo_bool_t cairo_has_current_point (cairo_t *cr); return cairo_has_current_point(cairo); } /** * Gets the current point of the current path, which is * conceptually the final point reached by the path so far. * The current point is returned in the user-space coordinate * system. If there is no defined current point or if cr is in an * error status, x and y will both be set to 0.0. It is possible to * check this in advance with cairo_has_current_point(). * Most path construction functions alter the current point. See the * Since 1.0 * Params: * x = return value for X coordinate of the current point * y = return value for Y coordinate of the current point */ public void getCurrentPoint(out double x, out double y) { // void cairo_get_current_point (cairo_t *cr, double *x, double *y); cairo_get_current_point(cairo, &x, &y); } /** * Clears the current path. After this call there will be no path and * no current point. * Since 1.0 */ public void newPath() { // void cairo_new_path (cairo_t *cr); cairo_new_path(cairo); } /** * Begin a new sub-path. Note that the existing path is not * affected. After this call there will be no current point. * In many cases, this call is not needed since new sub-paths are * frequently started with cairo_move_to(). * A call to cairo_new_sub_path() is particularly useful when * beginning a new sub-path with one of the cairo_arc() calls. This * makes things easier as it is no longer necessary to manually * compute the arc's initial coordinates for a call to * cairo_move_to(). * Since 1.2 */ public void newSubPath() { // void cairo_new_sub_path (cairo_t *cr); cairo_new_sub_path(cairo); } /** * Adds a line segment to the path from the current point to the * beginning of the current sub-path, (the most recent point passed to * cairo_move_to()), and closes this sub-path. After this call the * current point will be at the joined endpoint of the sub-path. * The behavior of cairo_close_path() is distinct from simply calling * cairo_line_to() with the equivalent coordinate in the case of * stroking. When a closed sub-path is stroked, there are no caps on * the ends of the sub-path. Instead, there is a line join connecting * the final and initial segments of the sub-path. * If there is no current point before the call to cairo_close_path(), * this function will have no effect. * Note: As of cairo version 1.2.4 any call to cairo_close_path() will * place an explicit MOVE_TO element into the path immediately after * the CLOSE_PATH element, (which can be seen in cairo_copy_path() for * example). This can simplify path processing in some cases as it may * not be necessary to save the "last move_to point" during processing * as the MOVE_TO immediately after the CLOSE_PATH will provide that * point. * Since 1.0 */ public void closePath() { // void cairo_close_path (cairo_t *cr); cairo_close_path(cairo); } /** * Adds a circular arc of the given radius to the current path. The * arc is centered at (xc, yc), begins at angle1 and proceeds in * the direction of increasing angles to end at angle2. If angle2 is * less than angle1 it will be progressively increased by * 2*M_PI until it is greater than angle1. * If there is a current point, an initial line segment will be added * to the path to connect the current point to the beginning of the * arc. If this initial line is undesired, it can be avoided by * calling cairo_new_sub_path() before calling cairo_arc(). * Angles are measured in radians. An angle of 0.0 is in the direction * of the positive X axis (in user space). An angle of * M_PI/2.0 radians (90 degrees) is in the * direction of the positive Y axis (in user space). Angles increase * in the direction from the positive X axis toward the positive Y * axis. So with the default transformation matrix, angles increase in * a clockwise direction. * (To convert from degrees to radians, use degrees * (M_PI / * 180.).) * This function gives the arc in the direction of increasing angles; * see cairo_arc_negative() to get the arc in the direction of * decreasing angles. * The arc is circular in user space. To achieve an elliptical arc, * you can scale the current transformation matrix by different * amounts in the X and Y directions. For example, to draw an ellipse * Since 1.0 * Params: * xc = X position of the center of the arc * yc = Y position of the center of the arc * radius = the radius of the arc * angle1 = the start angle, in radians * angle2 = the end angle, in radians */ public void arc(double xc, double yc, double radius, double angle1, double angle2) { // void cairo_arc (cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2); cairo_arc(cairo, xc, yc, radius, angle1, angle2); } /** * Adds a circular arc of the given radius to the current path. The * arc is centered at (xc, yc), begins at angle1 and proceeds in * the direction of decreasing angles to end at angle2. If angle2 is * greater than angle1 it will be progressively decreased by * 2*M_PI until it is less than angle1. * See cairo_arc() for more details. This function differs only in the * direction of the arc between the two angles. * Since 1.0 * Params: * xc = X position of the center of the arc * yc = Y position of the center of the arc * radius = the radius of the arc * angle1 = the start angle, in radians * angle2 = the end angle, in radians */ public void arcNegative(double xc, double yc, double radius, double angle1, double angle2) { // void cairo_arc_negative (cairo_t *cr, double xc, double yc, double radius, double angle1, double angle2); cairo_arc_negative(cairo, xc, yc, radius, angle1, angle2); } /** * Adds a cubic Bézier spline to the path from the current point to * position (x3, y3) in user-space coordinates, using (x1, y1) and * (x2, y2) as the control points. After this call the current point * will be (x3, y3). * If there is no current point before the call to cairo_curve_to() * this function will behave as if preceded by a call to * cairo_move_to(cr, x1, y1). * Since 1.0 * Params: * x1 = the X coordinate of the first control point * y1 = the Y coordinate of the first control point * x2 = the X coordinate of the second control point * y2 = the Y coordinate of the second control point * x3 = the X coordinate of the end of the curve * y3 = the Y coordinate of the end of the curve */ public void curveTo(double x1, double y1, double x2, double y2, double x3, double y3) { // void cairo_curve_to (cairo_t *cr, double x1, double y1, double x2, double y2, double x3, double y3); cairo_curve_to(cairo, x1, y1, x2, y2, x3, y3); } /** * Adds a line to the path from the current point to position (x, y) * in user-space coordinates. After this call the current point * will be (x, y). * If there is no current point before the call to cairo_line_to() * this function will behave as cairo_move_to(cr, x, y). * Since 1.0 * Params: * x = the X coordinate of the end of the new line * y = the Y coordinate of the end of the new line */ public void lineTo(double x, double y) { // void cairo_line_to (cairo_t *cr, double x, double y); cairo_line_to(cairo, x, y); } /** * Begin a new sub-path. After this call the current point will be (x, * y). * Since 1.0 * Params: * x = the X coordinate of the new position * y = the Y coordinate of the new position */ public void moveTo(double x, double y) { // void cairo_move_to (cairo_t *cr, double x, double y); cairo_move_to(cairo, x, y); } /** * Adds a closed sub-path rectangle of the given size to the current * path at position (x, y) in user-space coordinates. * Since 1.0 * Params: * x = the X coordinate of the top left corner of the rectangle * y = the Y coordinate to the top left corner of the rectangle * width = the width of the rectangle * height = the height of the rectangle */ public void rectangle(double x, double y, double width, double height) { // void cairo_rectangle (cairo_t *cr, double x, double y, double width, double height); cairo_rectangle(cairo, x, y, width, height); } /** * Adds closed paths for the glyphs to the current path. The generated * path if filled, achieves an effect similar to that of * cairo_show_glyphs(). * Since 1.0 * Params: * glyphs = array of glyphs to show * numGlyphs = number of glyphs to show */ public void glyphPath(cairo_glyph_t* glyphs, int numGlyphs) { // void cairo_glyph_path (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs); cairo_glyph_path(cairo, glyphs, numGlyphs); } /** * Adds closed paths for text to the current path. The generated * path if filled, achieves an effect similar to that of * cairo_show_text(). * Text conversion and positioning is done similar to cairo_show_text(). * Like cairo_show_text(), After this call the current point is * moved to the origin of where the next glyph would be placed in * this same progression. That is, the current point will be at * the origin of the final glyph offset by its advance values. * This allows for chaining multiple calls to to cairo_text_path() * without having to set current point in between. * Note: The cairo_text_path() function call is part of what the cairo * designers call the "toy" text API. It is convenient for short demos * and simple programs, but it is not expected to be adequate for * serious text-using applications. See cairo_glyph_path() for the * "real" text path API in cairo. * Since 1.0 * Params: * utf8 = a NUL-terminated string of text encoded in UTF-8, or NULL */ public void textPath(string utf8) { // void cairo_text_path (cairo_t *cr, const char *utf8); cairo_text_path(cairo, Str.toStringz(utf8)); } /** * Relative-coordinate version of cairo_curve_to(). All offsets are * relative to the current point. Adds a cubic Bézier spline to the * path from the current point to a point offset from the current * point by (dx3, dy3), using points offset by (dx1, dy1) and * (dx2, dy2) as the control points. After this call the current * point will be offset by (dx3, dy3). * Given a current point of (x, y), cairo_rel_curve_to(cr, dx1, * dy1, dx2, dy2, dx3, dy3) is logically equivalent to * cairo_curve_to(cr, x+dx1, y+dy1, x+dx2, y+dy2, x+dx3, y+dy3). * It is an error to call this function with no current point. Doing * so will cause cr to shutdown with a status of * CAIRO_STATUS_NO_CURRENT_POINT. * Since 1.0 * Params: * dx1 = the X offset to the first control point * dy1 = the Y offset to the first control point * dx2 = the X offset to the second control point * dy2 = the Y offset to the second control point * dx3 = the X offset to the end of the curve * dy3 = the Y offset to the end of the curve */ public void relCurveTo(double dx1, double dy1, double dx2, double dy2, double dx3, double dy3) { // void cairo_rel_curve_to (cairo_t *cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3); cairo_rel_curve_to(cairo, dx1, dy1, dx2, dy2, dx3, dy3); } /** * Relative-coordinate version of cairo_line_to(). Adds a line to the * path from the current point to a point that is offset from the * current point by (dx, dy) in user space. After this call the * current point will be offset by (dx, dy). * Given a current point of (x, y), cairo_rel_line_to(cr, dx, dy) * is logically equivalent to cairo_line_to(cr, x + dx, y + dy). * It is an error to call this function with no current point. Doing * so will cause cr to shutdown with a status of * CAIRO_STATUS_NO_CURRENT_POINT. * Since 1.0 * Params: * dx = the X offset to the end of the new line * dy = the Y offset to the end of the new line */ public void relLineTo(double dx, double dy) { // void cairo_rel_line_to (cairo_t *cr, double dx, double dy); cairo_rel_line_to(cairo, dx, dy); } /** * Begin a new sub-path. After this call the current point will offset * by (x, y). * Given a current point of (x, y), cairo_rel_move_to(cr, dx, dy) * is logically equivalent to cairo_move_to(cr, x + dx, y + dy). * It is an error to call this function with no current point. Doing * so will cause cr to shutdown with a status of * CAIRO_STATUS_NO_CURRENT_POINT. * Since 1.0 * Params: * dx = the X offset * dy = the Y offset */ public void relMoveTo(double dx, double dy) { // void cairo_rel_move_to (cairo_t *cr, double dx, double dy); cairo_rel_move_to(cairo, dx, dy); } /** * Computes a bounding box in user-space coordinates covering the * points on the current path. If the current path is empty, returns * an empty rectangle ((0,0), (0,0)). Stroke parameters, fill rule, * surface dimensions and clipping are not taken into account. * Contrast with cairo_fill_extents() and cairo_stroke_extents() which * return the extents of only the area that would be "inked" by * the corresponding drawing operations. * The result of cairo_path_extents() is defined as equivalent to the * limit of cairo_stroke_extents() with CAIRO_LINE_CAP_ROUND as the * line width approaches 0.0, (but never reaching the empty-rectangle * returned by cairo_stroke_extents() for a line width of 0.0). * Specifically, this means that zero-area sub-paths such as * cairo_move_to();cairo_line_to() segments, (even degenerate cases * where the coordinates to both calls are identical), will be * considered as contributing to the extents. However, a lone * cairo_move_to() will not contribute to the results of * cairo_path_extents(). * Since 1.6 * Params: * x1 = left of the resulting extents * y1 = top of the resulting extents * x2 = right of the resulting extents * y2 = bottom of the resulting extents */ public void pathExtents(out double x1, out double y1, out double x2, out double y2) { // void cairo_path_extents (cairo_t *cr, double *x1, double *y1, double *x2, double *y2); cairo_path_extents(cairo, &x1, &y1, &x2, &y2); } /** * Modifies the current transformation matrix (CTM) by translating the * user-space origin by (tx, ty). This offset is interpreted as a * user-space coordinate according to the CTM in place before the new * call to cairo_translate(). In other words, the translation of the * user-space origin takes place after any existing transformation. * Since 1.0 * Params: * tx = amount to translate in the X direction * ty = amount to translate in the Y direction */ public void translate(double tx, double ty) { // void cairo_translate (cairo_t *cr, double tx, double ty); cairo_translate(cairo, tx, ty); } /** * Modifies the current transformation matrix (CTM) by scaling the X * and Y user-space axes by sx and sy respectively. The scaling of * the axes takes place after any existing transformation of user * space. * Since 1.0 * Params: * sx = scale factor for the X dimension * sy = scale factor for the Y dimension */ public void scale(double sx, double sy) { // void cairo_scale (cairo_t *cr, double sx, double sy); cairo_scale(cairo, sx, sy); } /** * Modifies the current transformation matrix (CTM) by rotating the * user-space axes by angle radians. The rotation of the axes takes * places after any existing transformation of user space. The * rotation direction for positive angles is from the positive X axis * toward the positive Y axis. * Since 1.0 * Params: * angle = angle (in radians) by which the user-space axes will be * rotated */ public void rotate(double angle) { // void cairo_rotate (cairo_t *cr, double angle); cairo_rotate(cairo, angle); } /** * Modifies the current transformation matrix (CTM) by applying * matrix as an additional transformation. The new transformation of * user space takes place after any existing transformation. * Since 1.0 * Params: * matrix = a transformation to be applied to the user-space axes */ public void transform(Matrix matrix) { // void cairo_transform (cairo_t *cr, const cairo_matrix_t *matrix); cairo_transform(cairo, (matrix is null) ? null : matrix.getMatrixStruct()); } /** * Modifies the current transformation matrix (CTM) by setting it * equal to matrix. * Since 1.0 * Params: * matrix = a transformation matrix from user space to device space */ public void setMatrix(Matrix matrix) { // void cairo_set_matrix (cairo_t *cr, const cairo_matrix_t *matrix); cairo_set_matrix(cairo, (matrix is null) ? null : matrix.getMatrixStruct()); } /** * Stores the current transformation matrix (CTM) into matrix. * Since 1.0 * Params: * matrix = return value for the matrix */ public void getMatrix(Matrix matrix) { // void cairo_get_matrix (cairo_t *cr, cairo_matrix_t *matrix); cairo_get_matrix(cairo, (matrix is null) ? null : matrix.getMatrixStruct()); } /** * Resets the current transformation matrix (CTM) by setting it equal * to the identity matrix. That is, the user-space and device-space * axes will be aligned and one user-space unit will transform to one * device-space unit. * Since 1.0 */ public void identityMatrix() { // void cairo_identity_matrix (cairo_t *cr); cairo_identity_matrix(cairo); } /** * Transform a coordinate from user space to device space by * multiplying the given point by the current transformation matrix * (CTM). * Since 1.0 * Params: * x = X value of coordinate (in/out parameter) * y = Y value of coordinate (in/out parameter) */ public void userToDevice(ref double x, ref double y) { // void cairo_user_to_device (cairo_t *cr, double *x, double *y); cairo_user_to_device(cairo, &x, &y); } /** * Transform a distance vector from user space to device space. This * function is similar to cairo_user_to_device() except that the * translation components of the CTM will be ignored when transforming * (dx,dy). * Since 1.0 * Params: * dx = X component of a distance vector (in/out parameter) * dy = Y component of a distance vector (in/out parameter) */ public void userToDeviceDistance(ref double dx, ref double dy) { // void cairo_user_to_device_distance (cairo_t *cr, double *dx, double *dy); cairo_user_to_device_distance(cairo, &dx, &dy); } /** * Transform a coordinate from device space to user space by * multiplying the given point by the inverse of the current * transformation matrix (CTM). * Since 1.0 * Params: * x = X value of coordinate (in/out parameter) * y = Y value of coordinate (in/out parameter) */ public void deviceToUser(ref double x, ref double y) { // void cairo_device_to_user (cairo_t *cr, double *x, double *y); cairo_device_to_user(cairo, &x, &y); } /** * Transform a distance vector from device space to user space. This * function is similar to cairo_device_to_user() except that the * translation components of the inverse CTM will be ignored when * transforming (dx,dy). * Since 1.0 * Params: * dx = X component of a distance vector (in/out parameter) * dy = Y component of a distance vector (in/out parameter) */ public void deviceToUserDistance(ref double dx, ref double dy) { // void cairo_device_to_user_distance (cairo_t *cr, double *dx, double *dy); cairo_device_to_user_distance(cairo, &dx, &dy); } /** * Note: The cairo_select_font_face() function call is part of what * the cairo designers call the "toy" text API. It is convenient for * short demos and simple programs, but it is not expected to be * adequate for serious text-using applications. * Selects a family and style of font from a simplified description as * a family name, slant and weight. Cairo provides no operation to * list available family names on the system (this is a "toy", * remember), but the standard CSS2 generic family names, ("serif", * "sans-serif", "cursive", "fantasy", "monospace"), are likely to * work as expected. * If family starts with the string "cairo:", or if no native font * backends are compiled in, cairo will use an internal font family. * The internal font family recognizes many modifiers in the family * string, most notably, it recognizes the string "monospace". That is, * the family name "cairo:monospace" will use the monospace version of * the internal font family. * For "real" font selection, see the font-backend-specific * font_face_create functions for the font backend you are using. (For * example, if you are using the freetype-based cairo-ft font backend, * see cairo_ft_font_face_create_for_ft_face() or * cairo_ft_font_face_create_for_pattern().) The resulting font face * could then be used with cairo_scaled_font_create() and * cairo_set_scaled_font(). * Similarly, when using the "real" font support, you can call * directly into the underlying font system, (such as fontconfig or * freetype), for operations such as listing available fonts, etc. * It is expected that most applications will need to use a more * comprehensive font handling and text layout library, (for example, * pango), in conjunction with cairo. * If text is drawn without a call to cairo_select_font_face(), (nor * cairo_set_font_face() nor cairo_set_scaled_font()), the default * family is platform-specific, but is essentially "sans-serif". * Default slant is CAIRO_FONT_SLANT_NORMAL, and default weight is * CAIRO_FONT_WEIGHT_NORMAL. * This function is equivalent to a call to cairo_toy_font_face_create() * followed by cairo_set_font_face(). * Since 1.0 * Params: * family = a font family name, encoded in UTF-8 * slant = the slant for the font * weight = the weight for the font */ public void selectFontFace(string family, cairo_font_slant_t slant, cairo_font_weight_t weight) { // void cairo_select_font_face (cairo_t *cr, const char *family, cairo_font_slant_t slant, cairo_font_weight_t weight); cairo_select_font_face(cairo, Str.toStringz(family), slant, weight); } /** * Sets the current font matrix to a scale by a factor of size, replacing * any font matrix previously set with cairo_set_font_size() or * cairo_set_font_matrix(). This results in a font size of size user space * units. (More precisely, this matrix will result in the font's * em-square being a size by size square in user space.) * If text is drawn without a call to cairo_set_font_size(), (nor * cairo_set_font_matrix() nor cairo_set_scaled_font()), the default * font size is 10.0. * Since 1.0 * Params: * size = the new font size, in user space units */ public void setFontSize(double size) { // void cairo_set_font_size (cairo_t *cr, double size); cairo_set_font_size(cairo, size); } /** * Sets the current font matrix to matrix. The font matrix gives a * transformation from the design space of the font (in this space, * the em-square is 1 unit by 1 unit) to user space. Normally, a * simple scale is used (see cairo_set_font_size()), but a more * complex font matrix can be used to shear the font * or stretch it unequally along the two axes * Since 1.0 * Params: * matrix = a cairo_matrix_t describing a transform to be applied to * the current font. */ public void setFontMatrix(Matrix matrix) { // void cairo_set_font_matrix (cairo_t *cr, const cairo_matrix_t *matrix); cairo_set_font_matrix(cairo, (matrix is null) ? null : matrix.getMatrixStruct()); } /** * Stores the current font matrix into matrix. See * cairo_set_font_matrix(). * Since 1.0 * Params: * matrix = return value for the matrix */ public void getFontMatrix(Matrix matrix) { // void cairo_get_font_matrix (cairo_t *cr, cairo_matrix_t *matrix); cairo_get_font_matrix(cairo, (matrix is null) ? null : matrix.getMatrixStruct()); } /** * Sets a set of custom font rendering options for the cairo_t. * Rendering options are derived by merging these options with the * options derived from underlying surface; if the value in options * has a default value (like CAIRO_ANTIALIAS_DEFAULT), then the value * from the surface is used. * Since 1.0 * Params: * options = font options to use */ public void setFontOptions(FontOption options) { // void cairo_set_font_options (cairo_t *cr, const cairo_font_options_t *options); cairo_set_font_options(cairo, (options is null) ? null : options.getFontOptionStruct()); } /** * Retrieves font rendering options set via cairo_set_font_options. * Note that the returned options do not include any options derived * from the underlying surface; they are literally the options * passed to cairo_set_font_options(). * Since 1.0 * Params: * options = a cairo_font_options_t object into which to store * the retrieved options. All existing values are overwritten */ public void getFontOptions(FontOption options) { // void cairo_get_font_options (cairo_t *cr, cairo_font_options_t *options); cairo_get_font_options(cairo, (options is null) ? null : options.getFontOptionStruct()); } /** * Replaces the current cairo_font_face_t object in the cairo_t with * font_face. The replaced font face in the cairo_t will be * destroyed if there are no other references to it. * Since 1.0 * Params: * fontFace = a cairo_font_face_t, or NULL to restore to the default font */ public void setFontFace(FontFace fontFace) { // void cairo_set_font_face (cairo_t *cr, cairo_font_face_t *font_face); cairo_set_font_face(cairo, (fontFace is null) ? null : fontFace.getFontFaceStruct()); } /** * Gets the current font face for a cairo_t. * Since 1.0 * Returns: the current font face. This object is owned by cairo. To keep a reference to it, you must call cairo_font_face_reference(). This function never returns NULL. If memory cannot be allocated, a special "nil" cairo_font_face_t object will be returned on which cairo_font_face_status() returns CAIRO_STATUS_NO_MEMORY. Using this nil object will cause its error state to propagate to other objects it is passed to, (for example, calling cairo_set_font_face() with a nil font will trigger an error that will shutdown the cairo_t object). */ public FontFace getFontFace() { // cairo_font_face_t * cairo_get_font_face (cairo_t *cr); auto p = cairo_get_font_face(cairo); if(p is null) { return null; } return new FontFace(cast(cairo_font_face_t*) p); } /** * Replaces the current font face, font matrix, and font options in * the cairo_t with those of the cairo_scaled_font_t. Except for * some translation, the current CTM of the cairo_t should be the * same as that of the cairo_scaled_font_t, which can be accessed * using cairo_scaled_font_get_ctm(). * Since 1.2 * Params: * scaledFont = a cairo_scaled_font_t */ public void setScaledFont(ScaledFont scaledFont) { // void cairo_set_scaled_font (cairo_t *cr, const cairo_scaled_font_t *scaled_font); cairo_set_scaled_font(cairo, (scaledFont is null) ? null : scaledFont.getScaledFontStruct()); } /** * Gets the current scaled font for a cairo_t. * Since 1.4 * Returns: the current scaled font. This object is owned by cairo. To keep a reference to it, you must call cairo_scaled_font_reference(). This function never returns NULL. If memory cannot be allocated, a special "nil" cairo_scaled_font_t object will be returned on which cairo_scaled_font_status() returns CAIRO_STATUS_NO_MEMORY. Using this nil object will cause its error state to propagate to other objects it is passed to, (for example, calling cairo_set_scaled_font() with a nil font will trigger an error that will shutdown the cairo_t object). */ public ScaledFont getScaledFont() { // cairo_scaled_font_t * cairo_get_scaled_font (cairo_t *cr); auto p = cairo_get_scaled_font(cairo); if(p is null) { return null; } return new ScaledFont(cast(cairo_scaled_font_t*) p); } /** * A drawing operator that generates the shape from a string of UTF-8 * characters, rendered according to the current font_face, font_size * (font_matrix), and font_options. * This function first computes a set of glyphs for the string of * text. The first glyph is placed so that its origin is at the * current point. The origin of each subsequent glyph is offset from * that of the previous glyph by the advance values of the previous * glyph. * After this call the current point is moved to the origin of where * the next glyph would be placed in this same progression. That is, * the current point will be at the origin of the final glyph offset * by its advance values. This allows for easy display of a single * logical string with multiple calls to cairo_show_text(). * Note: The cairo_show_text() function call is part of what the cairo * designers call the "toy" text API. It is convenient for short demos * and simple programs, but it is not expected to be adequate for * serious text-using applications. See cairo_show_glyphs() for the * "real" text display API in cairo. * Since 1.0 * Params: * utf8 = a NUL-terminated string of text encoded in UTF-8, or NULL */ public void showText(string utf8) { // void cairo_show_text (cairo_t *cr, const char *utf8); cairo_show_text(cairo, Str.toStringz(utf8)); } /** * A drawing operator that generates the shape from an array of glyphs, * rendered according to the current font face, font size * (font matrix), and font options. * Since 1.0 * Params: * glyphs = array of glyphs to show */ public void showGlyphs(cairo_glyph_t[] glyphs) { // void cairo_show_glyphs (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs); cairo_show_glyphs(cairo, glyphs.ptr, cast(int) glyphs.length); } /** * This operation has rendering effects similar to cairo_show_glyphs() * but, if the target surface supports it, uses the provided text and * cluster mapping to embed the text for the glyphs shown in the output. * If the target does not support the extended attributes, this function * acts like the basic cairo_show_glyphs() as if it had been passed * glyphs and num_glyphs. * The mapping between utf8 and glyphs is provided by an array of * clusters. Each cluster covers a number of * text bytes and glyphs, and neighboring clusters cover neighboring * areas of utf8 and glyphs. The clusters should collectively cover utf8 * and glyphs in entirety. * The first cluster always covers bytes from the beginning of utf8. * If cluster_flags do not have the CAIRO_TEXT_CLUSTER_FLAG_BACKWARD * set, the first cluster also covers the beginning * of glyphs, otherwise it covers the end of the glyphs array and * following clusters move backward. * See cairo_text_cluster_t for constraints on valid clusters. * Since 1.8 * Params: * utf8 = a string of text encoded in UTF-8 * utf8_Len = length of utf8 in bytes, or -1 if it is NUL-terminated * glyphs = array of glyphs to show * clusters = array of cluster mapping information * clusterFlags = cluster mapping flags */ public void showTextGlyphs(string utf8, int utf8_Len, cairo_glyph_t[] glyphs, cairo_text_cluster_t[] clusters, cairo_text_cluster_flags_t clusterFlags) { // void cairo_show_text_glyphs (cairo_t *cr, const char *utf8, int utf8_len, const cairo_glyph_t *glyphs, int num_glyphs, const cairo_text_cluster_t *clusters, int num_clusters, cairo_text_cluster_flags_t cluster_flags); cairo_show_text_glyphs(cairo, Str.toStringz(utf8), utf8_Len, glyphs.ptr, cast(int) glyphs.length, clusters.ptr, cast(int) clusters.length, clusterFlags); } /** * Gets the font extents for the currently selected font. * Since 1.0 * Params: * extents = a cairo_font_extents_t object into which the results * will be stored. */ public void fontExtents(cairo_font_extents_t* extents) { // void cairo_font_extents (cairo_t *cr, cairo_font_extents_t *extents); cairo_font_extents(cairo, extents); } /** * Gets the extents for a string of text. The extents describe a * user-space rectangle that encloses the "inked" portion of the text, * (as it would be drawn by cairo_show_text()). Additionally, the * x_advance and y_advance values indicate the amount by which the * current point would be advanced by cairo_show_text(). * Note that whitespace characters do not directly contribute to the * size of the rectangle (extents.width and extents.height). They do * contribute indirectly by changing the position of non-whitespace * characters. In particular, trailing whitespace characters are * likely to not affect the size of the rectangle, though they will * affect the x_advance and y_advance values. * Since 1.0 * Params: * utf8 = a NUL-terminated string of text encoded in UTF-8, or NULL * extents = a cairo_text_extents_t object into which the results * will be stored */ public void textExtents(string utf8, cairo_text_extents_t* extents) { // void cairo_text_extents (cairo_t *cr, const char *utf8, cairo_text_extents_t *extents); cairo_text_extents(cairo, Str.toStringz(utf8), extents); } /** * Gets the extents for an array of glyphs. The extents describe a * user-space rectangle that encloses the "inked" portion of the * glyphs, (as they would be drawn by cairo_show_glyphs()). * Additionally, the x_advance and y_advance values indicate the * amount by which the current point would be advanced by * cairo_show_glyphs(). * Note that whitespace glyphs do not contribute to the size of the * rectangle (extents.width and extents.height). * Since 1.0 * Params: * glyphs = an array of cairo_glyph_t objects * extents = a cairo_text_extents_t object into which the results * will be stored */ public void glyphExtents(cairo_glyph_t[] glyphs, cairo_text_extents_t* extents) { // void cairo_glyph_extents (cairo_t *cr, const cairo_glyph_t *glyphs, int num_glyphs, cairo_text_extents_t *extents); cairo_glyph_extents(cairo, glyphs.ptr, cast(int) glyphs.length, extents); } /** * Creates a font face from a triplet of family, slant, and weight. * These font faces are used in implementation of the the cairo_t "toy" * font API. * If family is the zero-length string "", the platform-specific default * family is assumed. The default family then can be queried using * cairo_toy_font_face_get_family(). * The cairo_select_font_face() function uses this to create font faces. * See that function for limitations and other details of toy font faces. * Since 1.8 * Params: * family = a font family name, encoded in UTF-8 * slant = the slant for the font * weight = the weight for the font * Returns: a newly created cairo_font_face_t. Free with cairo_font_face_destroy() when you are done using it. */ public static FontFace toyFontFaceCreate(string family, cairo_font_slant_t slant, cairo_font_weight_t weight) { // cairo_font_face_t * cairo_toy_font_face_create (const char *family, cairo_font_slant_t slant, cairo_font_weight_t weight); auto p = cairo_toy_font_face_create(Str.toStringz(family), slant, weight); if(p is null) { return null; } return new FontFace(cast(cairo_font_face_t*) p); } /** * Gets the familly name of a toy font. * Since 1.8 * Params: * fontFace = A toy font face * Returns: The family name. This string is owned by the font face and remains valid as long as the font face is alive (referenced). */ public static string toyFontFaceGetFamily(FontFace fontFace) { // const char * cairo_toy_font_face_get_family (cairo_font_face_t *font_face); return Str.toString(cairo_toy_font_face_get_family((fontFace is null) ? null : fontFace.getFontFaceStruct())); } /** * Gets the slant a toy font. * Since 1.8 * Params: * fontFace = A toy font face * Returns: The slant value */ public static cairo_font_slant_t toyFontFaceGetSlant(FontFace fontFace) { // cairo_font_slant_t cairo_toy_font_face_get_slant (cairo_font_face_t *font_face); return cairo_toy_font_face_get_slant((fontFace is null) ? null : fontFace.getFontFaceStruct()); } /** * Gets the weight a toy font. * Since 1.8 * Params: * fontFace = A toy font face * Returns: The weight value */ public static cairo_font_weight_t toyFontFaceGetWeight(FontFace fontFace) { // cairo_font_weight_t cairo_toy_font_face_get_weight (cairo_font_face_t *font_face); return cairo_toy_font_face_get_weight((fontFace is null) ? null : fontFace.getFontFaceStruct()); } /** * Frees an array of cairo_glyph_t's allocated using cairo_glyph_allocate(). * This function is only useful to free glyph array returned * by cairo_scaled_font_text_to_glyphs() where cairo returns * an array of glyphs that the user will free. * For all other uses, user can use their own allocation method * for glyphs. * Since 1.8 * Params: * glyphs = array of glyphs to free, or NULL */ public static void glyphFree(cairo_glyph_t[] glyphs) { // void cairo_glyph_free (cairo_glyph_t *glyphs); cairo_glyph_free(glyphs.ptr); } /** * Frees an array of cairo_text_cluster's allocated using cairo_text_cluster_allocate(). * This function is only useful to free text cluster array returned * by cairo_scaled_font_text_to_glyphs() where cairo returns * an array of text clusters that the user will free. * For all other uses, user can use their own allocation method * for text clusters. * Since 1.8 * Params: * clusters = array of text clusters to free, or NULL */ public static void textClusterFree(cairo_text_cluster_t[] clusters) { // void cairo_text_cluster_free (cairo_text_cluster_t *clusters); cairo_text_cluster_free(clusters.ptr); } } GtkD-3.7.5/generated/gtkd/cairo/Device.d000066400000000000000000000227651324604450400177250ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-cairo-device-t.html * outPack = cairo * outFile = Device * strct = cairo_device_t * realStrct= * ctorStrct= * clss = Device * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_device_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * structWrap: * - cairo_device_t* -> Device * module aliases: * local aliases: * overrides: */ module cairo.Device; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; /** * Devices are the abstraction Cairo employs for the rendering system * used by a cairo_surface_t. You can get the device of a surface using * cairo_surface_get_device(). * * Devices are created using custom functions specific to the rendering * system you want to use. See the documentation for the surface types * for those functions. * * An important function that devices fulfill is sharing access to the * rendering system between Cairo and your application. If you want to * access a device directly that you used to draw to with Cairo, you must * first call cairo_device_flush() to ensure that Cairo finishes all * operations on the device and resets it to a clean state. * * Cairo also provides the functions cairo_device_acquire() and * cairo_device_release() to synchronize access to the rendering system * in a multithreaded environment. This is done internally, but can also * be used by applications. * * Putting this all together, a function that works with devices should * look something like this: * * $(DDOC_COMMENT example) * * Note * * Please refer to the documentation of each backend for * additional usage requirements, guarantees provided, and * interactions with existing surface API of the device functions for * surfaces of that type. */ public class Device { /** the main Gtk struct */ protected cairo_device_t* cairo_device; /** Get the main Gtk struct */ public cairo_device_t* getDeviceStruct() { return cairo_device; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo_device; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_device_t* cairo_device) { this.cairo_device = cairo_device; } /** */ /** * Increases the reference count on device by one. This prevents * device from being destroyed until a matching call to * cairo_device_destroy() is made. * The number of references to a cairo_device_t can be get using * cairo_device_get_reference_count(). * Since 1.10 * Returns: the referenced cairo_device_t. */ public Device reference() { // cairo_device_t * cairo_device_reference (cairo_device_t *device); auto p = cairo_device_reference(cairo_device); if(p is null) { return null; } return new Device(cast(cairo_device_t*) p); } /** * Decreases the reference count on device by one. If the result is * zero, then device and all associated resources are freed. See * cairo_device_reference(). * This function may acquire devices if the last reference was dropped. * Since 1.10 */ public void destroy() { // void cairo_device_destroy (cairo_device_t *device); cairo_device_destroy(cairo_device); } /** * Checks whether an error has previously occurred for this * device. * Since 1.10 * Returns: CAIRO_STATUS_SUCCESS on success or an error code if the device is in an error state. */ public cairo_status_t status() { // cairo_status_t cairo_device_status (cairo_device_t *device); return cairo_device_status(cairo_device); } /** * This function finishes the device and drops all references to * external resources. All surfaces, fonts and other objects created * for this device will be finished, too. * Further operations on the device will not affect the device but * will instead trigger a CAIRO_STATUS_DEVICE_FINISHED error. * When the last call to cairo_device_destroy() decreases the * reference count to zero, cairo will call cairo_device_finish() if * it hasn't been called already, before freeing the resources * associated with the device. * This function may acquire devices. * Since 1.10 */ public void finish() { // void cairo_device_finish (cairo_device_t *device); cairo_device_finish(cairo_device); } /** * Finish any pending operations for the device and also restore any * temporary modifications cairo has made to the device's state. * This function must be called before switching from using the * device with Cairo to operating on it directly with native APIs. * If the device doesn't support direct access, then this function * does nothing. * This function may acquire devices. * Since 1.10 */ public void flush() { // void cairo_device_flush (cairo_device_t *device); cairo_device_flush(cairo_device); } /** * This function returns the type of the device. See cairo_device_type_t * for available types. * Since 1.10 * Params: * device = a cairo_device_t * Returns: The type of device. */ public cairo_device_type_t getType() { // cairo_device_type_t cairo_device_get_type (cairo_device_t *device); return cairo_device_get_type(cairo_device); } /** * Returns the current reference count of device. * Since 1.10 * Returns: the current reference count of device. If the object is a nil object, 0 will be returned. */ public uint getReferenceCount() { // unsigned int cairo_device_get_reference_count (cairo_device_t *device); return cairo_device_get_reference_count(cairo_device); } /** * Attach user data to device. To remove user data from a surface, * call this function with the key that was used to set it and NULL * for data. * Since 1.10 * Params: * key = the address of a cairo_user_data_key_t to attach the user data to * userData = the user data to attach to the cairo_device_t * destroy = a cairo_destroy_func_t which will be called when the * cairo_t is destroyed or when new user data is attached using the * same key. * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data. */ public cairo_status_t setUserData(cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) { // cairo_status_t cairo_device_set_user_data (cairo_device_t *device, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy); return cairo_device_set_user_data(cairo_device, key, userData, destroy); } /** * Return user data previously attached to device using the * specified key. If no user data has been attached with the given * key this function returns NULL. * Since 1.10 * Params: * key = the address of the cairo_user_data_key_t the user data was * attached to * Returns: the user data previously attached or NULL. */ public void* getUserData(cairo_user_data_key_t* key) { // void * cairo_device_get_user_data (cairo_device_t *device, const cairo_user_data_key_t *key); return cairo_device_get_user_data(cairo_device, key); } /** * Acquires the device for the current thread. This function will block * until no other thread has acquired the device. * If the return value is CAIRO_STATUS_SUCCESS, you successfully acquired the * device. From now on your thread owns the device and no other thread will be * able to acquire it until a matching call to cairo_device_release(). It is * allowed to recursively acquire the device multiple times from the same * thread. * Note * You must never acquire two different devices at the same time * unless this is explicitly allowed. Otherwise the possibility of deadlocks * exist. * As various Cairo functions can acquire devices when called, these functions * may also cause deadlocks when you call them with an acquired device. So you * must not have a device acquired when calling them. These functions are * marked in the documentation. * Since 1.10 * Returns: CAIRO_STATUS_SUCCESS on success or an error code if the device is in an error state and could not be acquired. After a successful call to cairo_device_acquire(), a matching call to cairo_device_release() is required. */ public cairo_status_t acquire() { // cairo_status_t cairo_device_acquire (cairo_device_t *device); return cairo_device_acquire(cairo_device); } /** * Releases a device previously acquired using cairo_device_acquire(). See * that function for details. * Since 1.10 */ public void release() { // void cairo_device_release (cairo_device_t *device); cairo_device_release(cairo_device); } } GtkD-3.7.5/generated/gtkd/cairo/FontFace.d000066400000000000000000000137671324604450400202150ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-cairo-font-face-t.html * outPack = cairo * outFile = FontFace * strct = cairo_font_face_t * realStrct= * ctorStrct= * clss = FontFace * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_font_face_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * structWrap: * - cairo_font_face_t* -> FontFace * module aliases: * local aliases: * overrides: */ module cairo.FontFace; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; /** * cairo_font_face_t represents a particular font at a particular weight, * slant, and other characteristic but no size, transformation, or size. * * Font faces are created using font-backend-specific * constructors, typically of the form * cairo_backend_font_face_create(), * or implicitly using the toy text API by way of * cairo_select_font_face(). The resulting face can be accessed using * cairo_get_font_face(). */ public class FontFace { /** the main Gtk struct */ protected cairo_font_face_t* cairo_font_face; /** Get the main Gtk struct */ public cairo_font_face_t* getFontFaceStruct() { return cairo_font_face; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo_font_face; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_font_face_t* cairo_font_face) { this.cairo_font_face = cairo_font_face; } /** */ /** * Increases the reference count on font_face by one. This prevents * font_face from being destroyed until a matching call to * cairo_font_face_destroy() is made. * The number of references to a cairo_font_face_t can be get using * cairo_font_face_get_reference_count(). * Since 1.0 * Returns: the referenced cairo_font_face_t. */ public FontFace reference() { // cairo_font_face_t * cairo_font_face_reference (cairo_font_face_t *font_face); auto p = cairo_font_face_reference(cairo_font_face); if(p is null) { return null; } return new FontFace(cast(cairo_font_face_t*) p); } /** * Decreases the reference count on font_face by one. If the result * is zero, then font_face and all associated resources are freed. * See cairo_font_face_reference(). * Since 1.0 */ public void destroy() { // void cairo_font_face_destroy (cairo_font_face_t *font_face); cairo_font_face_destroy(cairo_font_face); } /** * Checks whether an error has previously occurred for this * font face * Since 1.0 * Returns: CAIRO_STATUS_SUCCESS or another error such as CAIRO_STATUS_NO_MEMORY. */ public cairo_status_t status() { // cairo_status_t cairo_font_face_status (cairo_font_face_t *font_face); return cairo_font_face_status(cairo_font_face); } /** * This function returns the type of the backend used to create * a font face. See cairo_font_type_t for available types. * Since 1.2 * Returns: The type of font_face. */ public cairo_font_type_t getType() { // cairo_font_type_t cairo_font_face_get_type (cairo_font_face_t *font_face); return cairo_font_face_get_type(cairo_font_face); } /** * Returns the current reference count of font_face. * Since 1.4 * Returns: the current reference count of font_face. If the object is a nil object, 0 will be returned. */ public uint getReferenceCount() { // unsigned int cairo_font_face_get_reference_count (cairo_font_face_t *font_face); return cairo_font_face_get_reference_count(cairo_font_face); } /** * Attach user data to font_face. To remove user data from a font face, * call this function with the key that was used to set it and NULL * for data. * Since 1.0 * Params: * key = the address of a cairo_user_data_key_t to attach the user data to * userData = the user data to attach to the font face * destroy = a cairo_destroy_func_t which will be called when the * font face is destroyed or when new user data is attached using the * same key. * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data. */ public cairo_status_t setUserData(cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) { // cairo_status_t cairo_font_face_set_user_data (cairo_font_face_t *font_face, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy); return cairo_font_face_set_user_data(cairo_font_face, key, userData, destroy); } /** * Return user data previously attached to font_face using the specified * key. If no user data has been attached with the given key this * function returns NULL. * Since 1.0 * Params: * key = the address of the cairo_user_data_key_t the user data was * attached to * Returns: the user data previously attached or NULL. */ public void* getUserData(cairo_user_data_key_t* key) { // void * cairo_font_face_get_user_data (cairo_font_face_t *font_face, const cairo_user_data_key_t *key); return cairo_font_face_get_user_data(cairo_font_face, key); } } GtkD-3.7.5/generated/gtkd/cairo/FontOption.d000066400000000000000000000233371324604450400206210ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-cairo-font-options-t.html * outPack = cairo * outFile = FontOption * strct = cairo_font_options_t * realStrct= * ctorStrct= * clss = FontOption * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_font_options_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * structWrap: * - cairo_font_options_t* -> FontOption * module aliases: * local aliases: * overrides: */ module cairo.FontOption; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; /** * The font options specify how fonts should be rendered. Most of the * time the font options implied by a surface are just right and do not * need any changes, but for pixel-based targets tweaking font options * may result in superior output on a particular display. */ public class FontOption { /** the main Gtk struct */ protected cairo_font_options_t* cairo_font_options; /** Get the main Gtk struct */ public cairo_font_options_t* getFontOptionStruct() { return cairo_font_options; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo_font_options; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_font_options_t* cairo_font_options) { this.cairo_font_options = cairo_font_options; } /** */ /** * Allocates a new font options object with all options initialized * to default values. * Since 1.0 * Returns: a newly allocated cairo_font_options_t. Free with cairo_font_options_destroy(). This function always returns a valid pointer; if memory cannot be allocated, then a special error object is returned where all operations on the object do nothing. You can check for this with cairo_font_options_status(). */ public static FontOption create() { // cairo_font_options_t * cairo_font_options_create (void); auto p = cairo_font_options_create(); if(p is null) { return null; } return new FontOption(cast(cairo_font_options_t*) p); } /** * Allocates a new font options object copying the option values from * original. * Since 1.0 * Returns: a newly allocated cairo_font_options_t. Free with cairo_font_options_destroy(). This function always returns a valid pointer; if memory cannot be allocated, then a special error object is returned where all operations on the object do nothing. You can check for this with cairo_font_options_status(). */ public FontOption copy() { // cairo_font_options_t * cairo_font_options_copy (const cairo_font_options_t *original); auto p = cairo_font_options_copy(cairo_font_options); if(p is null) { return null; } return new FontOption(cast(cairo_font_options_t*) p); } /** * Destroys a cairo_font_options_t object created with * cairo_font_options_create() or cairo_font_options_copy(). * Since 1.0 */ public void destroy() { // void cairo_font_options_destroy (cairo_font_options_t *options); cairo_font_options_destroy(cairo_font_options); } /** * Checks whether an error has previously occurred for this * font options object * Since 1.0 * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t status() { // cairo_status_t cairo_font_options_status (cairo_font_options_t *options); return cairo_font_options_status(cairo_font_options); } /** * Merges non-default options from other into options, replacing * existing values. This operation can be thought of as somewhat * similar to compositing other onto options with the operation * of CAIRO_OPERATOR_OVER. * Since 1.0 * Params: * other = another cairo_font_options_t */ public void merge(FontOption other) { // void cairo_font_options_merge (cairo_font_options_t *options, const cairo_font_options_t *other); cairo_font_options_merge(cairo_font_options, (other is null) ? null : other.getFontOptionStruct()); } /** * Compute a hash for the font options object; this value will * be useful when storing an object containing a cairo_font_options_t * in a hash table. * Since 1.0 * Returns: the hash value for the font options object. The return value can be cast to a 32-bit type if a 32-bit hash value is needed. */ public ulong hash() { // unsigned long cairo_font_options_hash (const cairo_font_options_t *options); return cairo_font_options_hash(cairo_font_options); } /** * Compares two font options objects for equality. * Since 1.0 * Params: * other = another cairo_font_options_t * Returns: TRUE if all fields of the two font options objects match. Note that this function will return FALSE if either object is in error. */ public cairo_bool_t equal(FontOption other) { // cairo_bool_t cairo_font_options_equal (const cairo_font_options_t *options, const cairo_font_options_t *other); return cairo_font_options_equal(cairo_font_options, (other is null) ? null : other.getFontOptionStruct()); } /** * Sets the antialiasing mode for the font options object. This * specifies the type of antialiasing to do when rendering text. * Since 1.0 * Params: * antialias = the new antialiasing mode */ public void setAntialias(cairo_antialias_t antialias) { // void cairo_font_options_set_antialias (cairo_font_options_t *options, cairo_antialias_t antialias); cairo_font_options_set_antialias(cairo_font_options, antialias); } /** * Gets the antialiasing mode for the font options object. * Since 1.0 * Returns: the antialiasing mode */ public cairo_antialias_t getAntialias() { // cairo_antialias_t cairo_font_options_get_antialias (const cairo_font_options_t *options); return cairo_font_options_get_antialias(cairo_font_options); } /** * Sets the subpixel order for the font options object. The subpixel * order specifies the order of color elements within each pixel on * the display device when rendering with an antialiasing mode of * CAIRO_ANTIALIAS_SUBPIXEL. See the documentation for * cairo_subpixel_order_t for full details. * Since 1.0 * Params: * subpixelOrder = the new subpixel order */ public void setSubpixelOrder(cairo_subpixel_order_t subpixelOrder) { // void cairo_font_options_set_subpixel_order (cairo_font_options_t *options, cairo_subpixel_order_t subpixel_order); cairo_font_options_set_subpixel_order(cairo_font_options, subpixelOrder); } /** * Gets the subpixel order for the font options object. * See the documentation for cairo_subpixel_order_t for full details. * Since 1.0 * Returns: the subpixel order for the font options object */ public cairo_subpixel_order_t getSubpixelOrder() { // cairo_subpixel_order_t cairo_font_options_get_subpixel_order (const cairo_font_options_t *options); return cairo_font_options_get_subpixel_order(cairo_font_options); } /** * Sets the hint style for font outlines for the font options object. * This controls whether to fit font outlines to the pixel grid, * and if so, whether to optimize for fidelity or contrast. * See the documentation for cairo_hint_style_t for full details. * Since 1.0 * Params: * hintStyle = the new hint style */ public void setHintStyle(cairo_hint_style_t hintStyle) { // void cairo_font_options_set_hint_style (cairo_font_options_t *options, cairo_hint_style_t hint_style); cairo_font_options_set_hint_style(cairo_font_options, hintStyle); } /** * Gets the hint style for font outlines for the font options object. * See the documentation for cairo_hint_style_t for full details. * Since 1.0 * Returns: the hint style for the font options object */ public cairo_hint_style_t getHintStyle() { // cairo_hint_style_t cairo_font_options_get_hint_style (const cairo_font_options_t *options); return cairo_font_options_get_hint_style(cairo_font_options); } /** * Sets the metrics hinting mode for the font options object. This * controls whether metrics are quantized to integer values in * device units. * See the documentation for cairo_hint_metrics_t for full details. * Since 1.0 * Params: * hintMetrics = the new metrics hinting mode */ public void setHintMetrics(cairo_hint_metrics_t hintMetrics) { // void cairo_font_options_set_hint_metrics (cairo_font_options_t *options, cairo_hint_metrics_t hint_metrics); cairo_font_options_set_hint_metrics(cairo_font_options, hintMetrics); } /** * Gets the metrics hinting mode for the font options object. * See the documentation for cairo_hint_metrics_t for full details. * Since 1.0 * Returns: the metrics hinting mode for the font options object */ public cairo_hint_metrics_t getHintMetrics() { // cairo_hint_metrics_t cairo_font_options_get_hint_metrics (const cairo_font_options_t *options); return cairo_font_options_get_hint_metrics(cairo_font_options); } } GtkD-3.7.5/generated/gtkd/cairo/ImageSurface.d000066400000000000000000000301321324604450400210440ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-Image-Surfaces.html * outPack = cairo * outFile = ImageSurface * strct = cairo_surface_t * realStrct= * ctorStrct= * clss = ImageSurface * interf = * class Code: No * interface Code: No * template for: * extend = cairo_surface_t * implements: * prefixes: * - cairo_image_surface_ * - cairo_surface_ * - cairo_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - glib.Str * structWrap: * - cairo_surface_t* -> ImageSurface * module aliases: * local aliases: * overrides: */ module cairo.ImageSurface; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import glib.Str; private import cairo.Surface; /** * Image surfaces provide the ability to render to memory buffers * either allocated by cairo or by the calling code. The supported * image formats are those defined in cairo_format_t. */ public class ImageSurface : Surface { /** the main Gtk struct */ protected cairo_surface_t* cairo_surface; /** Get the main Gtk struct */ public cairo_surface_t* getImageSurfaceStruct() { return cairo_surface; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)cairo_surface; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_surface_t* cairo_surface) { super(cast(cairo_surface_t*)cairo_surface); this.cairo_surface = cairo_surface; } /** * The PNG functions allow reading PNG images into image surfaces, and writing * any surface to a PNG file. * * It is a toy API. It only offers very simple support for reading and * writing PNG files, which is sufficient for testing and * demonstration purposes. Applications which need more control over * the generated PNG file should access the pixel data directly, using * cairo_image_surface_get_data() or a backend-specific access * function, and process it with another library, e.g. gdk-pixbuf or * libpng. */ /** * This function provides a stride value that will respect all * alignment requirements of the accelerated image-rendering code * Since 1.6 * Params: * format = A cairo_format_t value * width = The desired width of an image surface to be created. * Returns: the appropriate stride to use given the desired format and width, or -1 if either the format is invalid or the width too large. */ public static int formatStrideForWidth(cairo_format_t format, int width) { // int cairo_format_stride_for_width (cairo_format_t format, int width); return cairo_format_stride_for_width(format, width); } /** * Creates an image surface of the specified format and * dimensions. Initially the surface contents are all * 0. (Specifically, within each pixel, each color or alpha channel * belonging to format will be 0. The contents of bits within a pixel, * but not belonging to the given format are undefined). * Since 1.0 * Params: * format = format of pixels in the surface to create * width = width of the surface, in pixels * height = height of the surface, in pixels * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this. */ public static ImageSurface create(cairo_format_t format, int width, int height) { // cairo_surface_t * cairo_image_surface_create (cairo_format_t format, int width, int height); auto p = cairo_image_surface_create(format, width, height); if(p is null) { return null; } return new ImageSurface(cast(cairo_surface_t*) p); } /** * Creates an image surface for the provided pixel data. The output * buffer must be kept around until the cairo_surface_t is destroyed * or cairo_surface_finish() is called on the surface. The initial * contents of data will be used as the initial image contents; you * must explicitly clear the buffer, using, for example, * cairo_rectangle() and cairo_fill() if you want it cleared. * Note that the stride may be larger than * width*bytes_per_pixel to provide proper alignment for each pixel * and row. This alignment is required to allow high-performance rendering * within cairo. The correct way to obtain a legal stride value is to * call cairo_format_stride_for_width() with the desired format and * maximum image width value, and then use the resulting stride value * to allocate the data and to create the image surface. See * cairo_format_stride_for_width() for example code. * Since 1.0 * Params: * data = a pointer to a buffer supplied by the application in which * to write contents. This pointer must be suitably aligned for any * kind of variable, (for example, a pointer returned by malloc). * format = the format of pixels in the buffer * width = the width of the image to be stored in the buffer * height = the height of the image to be stored in the buffer * stride = the number of bytes between the start of rows in the * buffer as allocated. This value should always be computed by * cairo_format_stride_for_width() before allocating the data * buffer. * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface in the case of an error such as out of memory or an invalid stride value. In case of invalid stride value the error status of the returned surface will be CAIRO_STATUS_INVALID_STRIDE. You can use cairo_surface_status() to check for this. See cairo_surface_set_user_data() for a means of attaching a destroy-notification fallback to the surface if necessary. */ public static ImageSurface createForData(ubyte* data, cairo_format_t format, int width, int height, int stride) { // cairo_surface_t * cairo_image_surface_create_for_data (unsigned char *data, cairo_format_t format, int width, int height, int stride); auto p = cairo_image_surface_create_for_data(data, format, width, height, stride); if(p is null) { return null; } return new ImageSurface(cast(cairo_surface_t*) p); } /** * Get a pointer to the data of the image surface, for direct * inspection or modification. * A call to cairo_surface_flush() is required before accessing the * pixel data to ensure that all pending drawing operations are * finished. A call to cairo_surface_mark_dirty() is required after * the data is modified. * Since 1.2 * Returns: a pointer to the image data of this surface or NULL if surface is not an image surface, or if cairo_surface_finish() has been called. */ public ubyte* getData() { // unsigned char * cairo_image_surface_get_data (cairo_surface_t *surface); return cairo_image_surface_get_data(cairo_surface); } /** * Get the format of the surface. * Since 1.2 * Returns: the format of the surface */ public cairo_format_t getFormat() { // cairo_format_t cairo_image_surface_get_format (cairo_surface_t *surface); return cairo_image_surface_get_format(cairo_surface); } /** * Get the width of the image surface in pixels. * Since 1.0 * Returns: the width of the surface in pixels. */ public int getWidth() { // int cairo_image_surface_get_width (cairo_surface_t *surface); return cairo_image_surface_get_width(cairo_surface); } /** * Get the height of the image surface in pixels. * Since 1.0 * Returns: the height of the surface in pixels. */ public int getHeight() { // int cairo_image_surface_get_height (cairo_surface_t *surface); return cairo_image_surface_get_height(cairo_surface); } /** * Get the stride of the image surface in bytes * Since 1.2 * Returns: the stride of the image surface in bytes (or 0 if surface is not an image surface). The stride is the distance in bytes from the beginning of one row of the image data to the beginning of the next row. */ public int getStride() { // int cairo_image_surface_get_stride (cairo_surface_t *surface); return cairo_image_surface_get_stride(cairo_surface); } /** * Creates a new image surface and initializes the contents to the * given PNG file. * Since 1.0 * Params: * filename = name of PNG file to load * Returns: a new cairo_surface_t initialized with the contents of the PNG file, or a "nil" surface if any error occurred. A nil surface can be checked for with cairo_surface_status(surface) which */ public static ImageSurface createFromPng(string filename) { // cairo_surface_t * cairo_image_surface_create_from_png (const char *filename); auto p = cairo_image_surface_create_from_png(Str.toStringz(filename)); if(p is null) { return null; } return new ImageSurface(cast(cairo_surface_t*) p); } /** * Creates a new image surface from PNG data read incrementally * via the read_func function. * Since 1.0 * Params: * readFunc = function called to read the data of the file * closure = data to pass to read_func. * Returns: a new cairo_surface_t initialized with the contents of the PNG file or a "nil" surface if the data read is not a valid PNG image or memory could not be allocated for the operation. A nil surface can be checked for with cairo_surface_status(surface) which */ public static ImageSurface createFromPngStream(cairo_read_func_t readFunc, void* closure) { // cairo_surface_t * cairo_image_surface_create_from_png_stream (cairo_read_func_t read_func, void *closure); auto p = cairo_image_surface_create_from_png_stream(readFunc, closure); if(p is null) { return null; } return new ImageSurface(cast(cairo_surface_t*) p); } /** * Writes the contents of surface to a new file filename as a PNG * image. * Since 1.0 * Params: * filename = the name of a file to write to * Returns: CAIRO_STATUS_SUCCESS if the PNG file was written successfully. Otherwise, CAIRO_STATUS_NO_MEMORY if memory could not be allocated for the operation or CAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface does not have pixel contents, or CAIRO_STATUS_WRITE_ERROR if an I/O error occurs while attempting to write the file. */ public cairo_status_t writeToPng(string filename) { // cairo_status_t cairo_surface_write_to_png (cairo_surface_t *surface, const char *filename); return cairo_surface_write_to_png(cairo_surface, Str.toStringz(filename)); } /** * Writes the image surface to the write function. * Since 1.0 * Params: * writeFunc = a cairo_write_func_t * closure = closure data for the write function * Returns: CAIRO_STATUS_SUCCESS if the PNG file was written successfully. Otherwise, CAIRO_STATUS_NO_MEMORY is returned if memory could not be allocated for the operation, CAIRO_STATUS_SURFACE_TYPE_MISMATCH if the surface does not have pixel contents. */ public cairo_status_t writeToPngStream(cairo_write_func_t writeFunc, void* closure) { // cairo_status_t cairo_surface_write_to_png_stream (cairo_surface_t *surface, cairo_write_func_t write_func, void *closure); return cairo_surface_write_to_png_stream(cairo_surface, writeFunc, closure); } } GtkD-3.7.5/generated/gtkd/cairo/Matrix.d000066400000000000000000000216441324604450400177650ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-cairo-matrix-t.html * outPack = cairo * outFile = Matrix * strct = cairo_matrix_t * realStrct= * ctorStrct= * clss = Matrix * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_matrix_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - glib.Str * structWrap: * - cairo_matrix_t* -> Matrix * module aliases: * local aliases: * overrides: */ module cairo.Matrix; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import glib.Str; /** * cairo_matrix_t is used throughout cairo to convert between different * coordinate spaces. A cairo_matrix_t holds an affine transformation, * such as a scale, rotation, shear, or a combination of these. * The transformation of a point (x,y) * is given by: * * x_new = xx * x + xy * y + x0; * y_new = yx * x + yy * y + y0; * * The current transformation matrix of a cairo_t, represented as a * cairo_matrix_t, defines the transformation from user-space * coordinates to device-space coordinates. See cairo_get_matrix() and * cairo_set_matrix(). */ public class Matrix { /** the main Gtk struct */ protected cairo_matrix_t* cairo_matrix; /** Get the main Gtk struct */ public cairo_matrix_t* getMatrixStruct() { return cairo_matrix; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo_matrix; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_matrix_t* cairo_matrix, bool ownedRef = false) { this.cairo_matrix = cairo_matrix; } /** */ /** * Sets matrix to be the affine transformation given by * xx, yx, xy, yy, x0, y0. The transformation is given * Since 1.0 * Params: * xx = xx component of the affine transformation * yx = yx component of the affine transformation * xy = xy component of the affine transformation * yy = yy component of the affine transformation * x0 = X translation component of the affine transformation * y0 = Y translation component of the affine transformation */ public void init(double xx, double yx, double xy, double yy, double x0, double y0) { // void cairo_matrix_init (cairo_matrix_t *matrix, double xx, double yx, double xy, double yy, double x0, double y0); cairo_matrix_init(cairo_matrix, xx, yx, xy, yy, x0, y0); } /** * Modifies matrix to be an identity transformation. * Since 1.0 */ public void initIdentity() { // void cairo_matrix_init_identity (cairo_matrix_t *matrix); cairo_matrix_init_identity(cairo_matrix); } /** * Initializes matrix to a transformation that translates by tx and * ty in the X and Y dimensions, respectively. * Since 1.0 * Params: * tx = amount to translate in the X direction * ty = amount to translate in the Y direction */ public void initTranslate(double tx, double ty) { // void cairo_matrix_init_translate (cairo_matrix_t *matrix, double tx, double ty); cairo_matrix_init_translate(cairo_matrix, tx, ty); } /** * Initializes matrix to a transformation that scales by sx and sy * in the X and Y dimensions, respectively. * Since 1.0 * Params: * sx = scale factor in the X direction * sy = scale factor in the Y direction */ public void initScale(double sx, double sy) { // void cairo_matrix_init_scale (cairo_matrix_t *matrix, double sx, double sy); cairo_matrix_init_scale(cairo_matrix, sx, sy); } /** * Initialized matrix to a transformation that rotates by radians. * Since 1.0 * Params: * radians = angle of rotation, in radians. The direction of rotation * is defined such that positive angles rotate in the direction from * the positive X axis toward the positive Y axis. With the default * axis orientation of cairo, positive angles rotate in a clockwise * direction. */ public void initRotate(double radians) { // void cairo_matrix_init_rotate (cairo_matrix_t *matrix, double radians); cairo_matrix_init_rotate(cairo_matrix, radians); } /** * Applies a translation by tx, ty to the transformation in * matrix. The effect of the new transformation is to first translate * the coordinates by tx and ty, then apply the original transformation * to the coordinates. * Since 1.0 * Params: * tx = amount to translate in the X direction * ty = amount to translate in the Y direction */ public void translate(double tx, double ty) { // void cairo_matrix_translate (cairo_matrix_t *matrix, double tx, double ty); cairo_matrix_translate(cairo_matrix, tx, ty); } /** * Applies scaling by sx, sy to the transformation in matrix. The * effect of the new transformation is to first scale the coordinates * by sx and sy, then apply the original transformation to the coordinates. * Since 1.0 * Params: * sx = scale factor in the X direction * sy = scale factor in the Y direction */ public void scale(double sx, double sy) { // void cairo_matrix_scale (cairo_matrix_t *matrix, double sx, double sy); cairo_matrix_scale(cairo_matrix, sx, sy); } /** * Applies rotation by radians to the transformation in * matrix. The effect of the new transformation is to first rotate the * coordinates by radians, then apply the original transformation * to the coordinates. * Since 1.0 * Params: * radians = angle of rotation, in radians. The direction of rotation * is defined such that positive angles rotate in the direction from * the positive X axis toward the positive Y axis. With the default * axis orientation of cairo, positive angles rotate in a clockwise * direction. */ public void rotate(double radians) { // void cairo_matrix_rotate (cairo_matrix_t *matrix, double radians); cairo_matrix_rotate(cairo_matrix, radians); } /** * Changes matrix to be the inverse of its original value. Not * all transformation matrices have inverses; if the matrix * collapses points together (it is degenerate), * then it has no inverse and this function will fail. * Since 1.0 * Returns: If matrix has an inverse, modifies matrix to be the inverse matrix and returns CAIRO_STATUS_SUCCESS. Otherwise, returns CAIRO_STATUS_INVALID_MATRIX. */ public cairo_status_t invert() { // cairo_status_t cairo_matrix_invert (cairo_matrix_t *matrix); return cairo_matrix_invert(cairo_matrix); } /** * Multiplies the affine transformations in a and b together * and stores the result in result. The effect of the resulting * transformation is to first apply the transformation in a to the * coordinates and then apply the transformation in b to the * coordinates. * It is allowable for result to be identical to either a or b. * Since 1.0 * Params: * a = a cairo_matrix_t * b = a cairo_matrix_t */ public void multiply(Matrix a, Matrix b) { // void cairo_matrix_multiply (cairo_matrix_t *result, const cairo_matrix_t *a, const cairo_matrix_t *b); cairo_matrix_multiply(cairo_matrix, (a is null) ? null : a.getMatrixStruct(), (b is null) ? null : b.getMatrixStruct()); } /** * Transforms the distance vector (dx,dy) by matrix. This is * similar to cairo_matrix_transform_point() except that the translation * components of the transformation are ignored. The calculation of * Since 1.0 * Params: * dx = X component of a distance vector. An in/out parameter * dy = Y component of a distance vector. An in/out parameter */ public void transformDistance(ref double dx, ref double dy) { // void cairo_matrix_transform_distance (const cairo_matrix_t *matrix, double *dx, double *dy); cairo_matrix_transform_distance(cairo_matrix, &dx, &dy); } /** * Transforms the point (x, y) by matrix. * Since 1.0 * Params: * x = X position. An in/out parameter * y = Y position. An in/out parameter */ public void transformPoint(ref double x, ref double y) { // void cairo_matrix_transform_point (const cairo_matrix_t *matrix, double *x, double *y); cairo_matrix_transform_point(cairo_matrix, &x, &y); } } GtkD-3.7.5/generated/gtkd/cairo/MeshPattern.d000066400000000000000000000350151324604450400207500ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = * outPack = cairo * outFile = MeshPattern * strct = cairo_pattern_t * realStrct= * ctorStrct= * clss = MeshPattern * interf = * class Code: Yes * interface Code: No * template for: * extend = cairo_pattern_t * implements: * prefixes: * - cairo_mesh_pattern_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * structWrap: * module aliases: * local aliases: * overrides: */ module cairo.MeshPattern; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import cairo.Pattern; /** * cairo_pattern_t is the paint with which cairo draws. * The primary use of patterns is as the source for all cairo drawing * operations, although they can also be used as masks, that is, as the * brush too. * * A cairo pattern is created by using one of the many constructors, * of the form * cairo_pattern_create_type() * or implicitly through * cairo_set_source_type() * functions. */ public class MeshPattern : Pattern { /** the main Gtk struct */ protected cairo_pattern_t* cairo_pattern; /** Get the main Gtk struct */ public cairo_pattern_t* getMeshPatternStruct() { return cairo_pattern; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)cairo_pattern; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_pattern_t* cairo_pattern) { super(cast(cairo_pattern_t*)cairo_pattern); this.cairo_pattern = cairo_pattern; } /** */ public this() { this(cairo_pattern_create_mesh()); } /** */ /** * Begin a patch in a mesh pattern. * After calling this function, the patch shape should be defined with * cairo_mesh_pattern_move_to(), cairo_mesh_pattern_line_to() and * cairo_mesh_pattern_curve_to(). * After defining the patch, cairo_mesh_pattern_end_patch() must be * called before using pattern as a source or mask. * Note: If pattern is not a mesh pattern then pattern will be put * into an error status with a status of * CAIRO_STATUS_PATTERN_TYPE_MISMATCH. If pattern already has a * current patch, it will be put into an error status with a status of * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION. * Since 1.12 */ public void beginPatch() { // void cairo_mesh_pattern_begin_patch (cairo_pattern_t *pattern); cairo_mesh_pattern_begin_patch(cairo_pattern); } /** * Indicates the end of the current patch in a mesh pattern. * If the current patch has less than 4 sides, it is closed with a * straight line from the current point to the first point of the * patch as if cairo_mesh_pattern_line_to() was used. * Note: If pattern is not a mesh pattern then pattern will be put * into an error status with a status of * CAIRO_STATUS_PATTERN_TYPE_MISMATCH. If pattern has no current * patch or the current patch has no current point, pattern will be * put into an error status with a status of * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION. * Since 1.12 */ public void endPatch() { // void cairo_mesh_pattern_end_patch (cairo_pattern_t *pattern); cairo_mesh_pattern_end_patch(cairo_pattern); } /** * Define the first point of the current patch in a mesh pattern. * After this call the current point will be (x, y). * Note: If pattern is not a mesh pattern then pattern will be put * into an error status with a status of * CAIRO_STATUS_PATTERN_TYPE_MISMATCH. If pattern has no current * patch or the current patch already has at least one side, pattern * will be put into an error status with a status of * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION. * Since 1.12 * Params: * x = the X coordinate of the new position * y = the Y coordinate of the new position */ public void moveTo(double x, double y) { // void cairo_mesh_pattern_move_to (cairo_pattern_t *pattern, double x, double y); cairo_mesh_pattern_move_to(cairo_pattern, x, y); } /** * Adds a line to the current patch from the current point to position * (x, y) in pattern-space coordinates. * If there is no current point before the call to * cairo_mesh_pattern_line_to() this function will behave as * cairo_mesh_pattern_move_to(pattern, x, y). * After this call the current point will be (x, y). * Note: If pattern is not a mesh pattern then pattern will be put * into an error status with a status of * CAIRO_STATUS_PATTERN_TYPE_MISMATCH. If pattern has no current * patch or the current patch already has 4 sides, pattern will be * put into an error status with a status of * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION. * Since 1.12 * Params: * x = the X coordinate of the end of the new line * y = the Y coordinate of the end of the new line */ public void lineTo(double x, double y) { // void cairo_mesh_pattern_line_to (cairo_pattern_t *pattern, double x, double y); cairo_mesh_pattern_line_to(cairo_pattern, x, y); } /** * Adds a cubic Bézier spline to the current patch from the current * point to position (x3, y3) in pattern-space coordinates, using * (x1, y1) and (x2, y2) as the control points. * If the current patch has no current point before the call to * cairo_mesh_pattern_curve_to(), this function will behave as if * preceded by a call to cairo_mesh_pattern_move_to(pattern, x1, * y1). * After this call the current point will be (x3, y3). * Note: If pattern is not a mesh pattern then pattern will be put * into an error status with a status of * CAIRO_STATUS_PATTERN_TYPE_MISMATCH. If pattern has no current * patch or the current patch already has 4 sides, pattern will be * put into an error status with a status of * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION. * Since 1.12 * Params: * x1 = the X coordinate of the first control point * y1 = the Y coordinate of the first control point * x2 = the X coordinate of the second control point * y2 = the Y coordinate of the second control point * x3 = the X coordinate of the end of the curve * y3 = the Y coordinate of the end of the curve */ public void curveTo(double x1, double y1, double x2, double y2, double x3, double y3) { // void cairo_mesh_pattern_curve_to (cairo_pattern_t *pattern, double x1, double y1, double x2, double y2, double x3, double y3); cairo_mesh_pattern_curve_to(cairo_pattern, x1, y1, x2, y2, x3, y3); } /** * Set an internal control point of the current patch. * Valid values for point_num are from 0 to 3 and identify the * control points as explained in cairo_pattern_create_mesh(). * Note: If pattern is not a mesh pattern then pattern will be put * into an error status with a status of * CAIRO_STATUS_PATTERN_TYPE_MISMATCH. If point_num is not valid, * pattern will be put into an error status with a status of * CAIRO_STATUS_INVALID_INDEX. If pattern has no current patch, * pattern will be put into an error status with a status of * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION. * Since 1.12 * Params: * pointNum = the control point to set the position for * x = the X coordinate of the control point * y = the Y coordinate of the control point */ public void setControlPoint(uint pointNum, double x, double y) { // void cairo_mesh_pattern_set_control_point (cairo_pattern_t *pattern, unsigned int point_num, double x, double y); cairo_mesh_pattern_set_control_point(cairo_pattern, pointNum, x, y); } /** * Sets the color of a corner of the current patch in a mesh pattern. * The color is specified in the same way as in cairo_set_source_rgb(). * Valid values for corner_num are from 0 to 3 and identify the * corners as explained in cairo_pattern_create_mesh(). * Note: If pattern is not a mesh pattern then pattern will be put * into an error status with a status of * CAIRO_STATUS_PATTERN_TYPE_MISMATCH. If corner_num is not valid, * pattern will be put into an error status with a status of * CAIRO_STATUS_INVALID_INDEX. If pattern has no current patch, * pattern will be put into an error status with a status of * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION. * Since 1.12 * Params: * cornerNum = the corner to set the color for * red = red component of color * green = green component of color * blue = blue component of color */ public void setCornerColorRgb(uint cornerNum, double red, double green, double blue) { // void cairo_mesh_pattern_set_corner_color_rgb (cairo_pattern_t *pattern, unsigned int corner_num, double red, double green, double blue); cairo_mesh_pattern_set_corner_color_rgb(cairo_pattern, cornerNum, red, green, blue); } /** * Sets the color of a corner of the current patch in a mesh pattern. * The color is specified in the same way as in cairo_set_source_rgba(). * Valid values for corner_num are from 0 to 3 and identify the * corners as explained in cairo_pattern_create_mesh(). * Note: If pattern is not a mesh pattern then pattern will be put * into an error status with a status of * CAIRO_STATUS_PATTERN_TYPE_MISMATCH. If corner_num is not valid, * pattern will be put into an error status with a status of * CAIRO_STATUS_INVALID_INDEX. If pattern has no current patch, * pattern will be put into an error status with a status of * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION. * Since 1.12 * Params: * cornerNum = the corner to set the color for * red = red component of color * green = green component of color * blue = blue component of color * alpha = alpha component of color */ public void setCornerColorRgba(uint cornerNum, double red, double green, double blue, double alpha) { // void cairo_mesh_pattern_set_corner_color_rgba (cairo_pattern_t *pattern, unsigned int corner_num, double red, double green, double blue, double alpha); cairo_mesh_pattern_set_corner_color_rgba(cairo_pattern, cornerNum, red, green, blue, alpha); } /** * Gets the number of patches specified in the given mesh pattern. * The number only includes patches which have been finished by * calling cairo_mesh_pattern_end_patch(). For example it will be 0 * during the definition of the first patch. * Since 1.12 * Params: * count = return value for the number patches, or NULL * Returns: CAIRO_STATUS_SUCCESS, or CAIRO_STATUS_PATTERN_TYPE_MISMATCH if pattern is not a mesh pattern. */ public cairo_status_t getPatchCount(out uint count) { // cairo_status_t cairo_mesh_pattern_get_patch_count (cairo_pattern_t *pattern, unsigned int *count); return cairo_mesh_pattern_get_patch_count(cairo_pattern, &count); } /** * Gets path defining the patch patch_num for a mesh * pattern. * patch_num can range 0 to 1 less than the number returned by * cairo_mesh_pattern_get_patch_count(). * Since 1.12 * Params: * patchNum = the patch number to return data for * Returns: the path defining the patch, or a path with status CAIRO_STATUS_INVALID_INDEX if patch_num or point_num is not valid for pattern. If pattern is not a mesh pattern, a path with status CAIRO_STATUS_PATTERN_TYPE_MISMATCH is returned. */ public cairo_path_t* getPath(uint patchNum) { // cairo_path_t * cairo_mesh_pattern_get_path (cairo_pattern_t *pattern, unsigned int patch_num); return cairo_mesh_pattern_get_path(cairo_pattern, patchNum); } /** * Gets the control point point_num of patch patch_num for a mesh * pattern. * patch_num can range 0 to 1 less than the number returned by * cairo_mesh_pattern_get_patch_count(). * Valid values for point_num are from 0 to 3 and identify the * control points as explained in cairo_pattern_create_mesh(). * Since 1.12 * Params: * patchNum = the patch number to return data for * pointNum = the control point number to return data for * x = return value for the x coordinate of the control point, or NULL * y = return value for the y coordinate of the control point, or NULL * Returns: CAIRO_STATUS_SUCCESS, or CAIRO_STATUS_INVALID_INDEX if patch_num or point_num is not valid for pattern. If pattern is not a mesh pattern, CAIRO_STATUS_PATTERN_TYPE_MISMATCH is returned. */ public cairo_status_t getControlPoint(uint patchNum, uint pointNum, out double x, out double y) { // cairo_status_t cairo_mesh_pattern_get_control_point (cairo_pattern_t *pattern, unsigned int patch_num, unsigned int point_num, double *x, double *y); return cairo_mesh_pattern_get_control_point(cairo_pattern, patchNum, pointNum, &x, &y); } /** * Gets the color information in corner corner_num of patch * patch_num for a mesh pattern. * patch_num can range 0 to 1 less than the number returned by * cairo_mesh_pattern_get_patch_count(). * Valid values for corner_num are from 0 to 3 and identify the * corners as explained in cairo_pattern_create_mesh(). * Since 1.12 * Params: * patchNum = the patch number to return data for * cornerNum = the corner number to return data for * red = return value for red component of color, or NULL * green = return value for green component of color, or NULL * blue = return value for blue component of color, or NULL * alpha = return value for alpha component of color, or NULL * Returns: CAIRO_STATUS_SUCCESS, or CAIRO_STATUS_INVALID_INDEX if patch_num or corner_num is not valid for pattern. If pattern is not a mesh pattern, CAIRO_STATUS_PATTERN_TYPE_MISMATCH is returned. */ public cairo_status_t getCornerColorRgba(uint patchNum, uint cornerNum, out double red, out double green, out double blue, out double alpha) { // cairo_status_t cairo_mesh_pattern_get_corner_color_rgba (cairo_pattern_t *pattern, unsigned int patch_num, unsigned int corner_num, double *red, double *green, double *blue, double *alpha); return cairo_mesh_pattern_get_corner_color_rgba(cairo_pattern, patchNum, cornerNum, &red, &green, &blue, &alpha); } } GtkD-3.7.5/generated/gtkd/cairo/Pattern.d000066400000000000000000000565741324604450400201500ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-cairo-pattern-t.html * outPack = cairo * outFile = Pattern * strct = cairo_pattern_t * realStrct= * ctorStrct= * clss = Pattern * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_pattern_ * omit structs: * omit prefixes: * - cairo_mesh_pattern_ * omit code: * - cairo_pattern_create_mesh * omit signals: * imports: * - cairo.Matrix * - cairo.Surface * structWrap: * - cairo_matrix_t* -> Matrix * - cairo_pattern_t* -> Pattern * - cairo_surface_t* -> Surface * module aliases: * local aliases: * overrides: */ module cairo.Pattern; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import cairo.Matrix; private import cairo.Surface; /** * cairo_pattern_t is the paint with which cairo draws. * The primary use of patterns is as the source for all cairo drawing * operations, although they can also be used as masks, that is, as the * brush too. * * A cairo pattern is created by using one of the many constructors, * of the form * cairo_pattern_create_type() * or implicitly through * cairo_set_source_type() * functions. */ public class Pattern { /** the main Gtk struct */ protected cairo_pattern_t* cairo_pattern; /** Get the main Gtk struct */ public cairo_pattern_t* getPatternStruct() { return cairo_pattern; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo_pattern; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_pattern_t* cairo_pattern) { this.cairo_pattern = cairo_pattern; } /** */ /** * Adds an opaque color stop to a gradient pattern. The offset * specifies the location along the gradient's control vector. For * example, a linear gradient's control vector is from (x0,y0) to * (x1,y1) while a radial gradient's control vector is from any point * on the start circle to the corresponding point on the end circle. * The color is specified in the same way as in cairo_set_source_rgb(). * If two (or more) stops are specified with identical offset values, * they will be sorted according to the order in which the stops are * added, (stops added earlier will compare less than stops added * later). This can be useful for reliably making sharp color * transitions instead of the typical blend. * Note: If the pattern is not a gradient pattern, (eg. a linear or * radial pattern), then the pattern will be put into an error status * with a status of CAIRO_STATUS_PATTERN_TYPE_MISMATCH. * Since 1.0 * Params: * offset = an offset in the range [0.0 .. 1.0] * red = red component of color * green = green component of color * blue = blue component of color */ public void addColorStopRgb(double offset, double red, double green, double blue) { // void cairo_pattern_add_color_stop_rgb (cairo_pattern_t *pattern, double offset, double red, double green, double blue); cairo_pattern_add_color_stop_rgb(cairo_pattern, offset, red, green, blue); } /** * Adds a translucent color stop to a gradient pattern. The offset * specifies the location along the gradient's control vector. For * example, a linear gradient's control vector is from (x0,y0) to * (x1,y1) while a radial gradient's control vector is from any point * on the start circle to the corresponding point on the end circle. * The color is specified in the same way as in cairo_set_source_rgba(). * If two (or more) stops are specified with identical offset values, * they will be sorted according to the order in which the stops are * added, (stops added earlier will compare less than stops added * later). This can be useful for reliably making sharp color * transitions instead of the typical blend. * Note: If the pattern is not a gradient pattern, (eg. a linear or * radial pattern), then the pattern will be put into an error status * with a status of CAIRO_STATUS_PATTERN_TYPE_MISMATCH. * Since 1.0 * Params: * offset = an offset in the range [0.0 .. 1.0] * red = red component of color * green = green component of color * blue = blue component of color * alpha = alpha component of color */ public void addColorStopRgba(double offset, double red, double green, double blue, double alpha) { // void cairo_pattern_add_color_stop_rgba (cairo_pattern_t *pattern, double offset, double red, double green, double blue, double alpha); cairo_pattern_add_color_stop_rgba(cairo_pattern, offset, red, green, blue, alpha); } /** * Gets the number of color stops specified in the given gradient * pattern. * Since 1.4 * Params: * count = return value for the number of color stops, or NULL * Returns: CAIRO_STATUS_SUCCESS, or CAIRO_STATUS_PATTERN_TYPE_MISMATCH if pattern is not a gradient pattern. */ public cairo_status_t getColorStopCount(out int count) { // cairo_status_t cairo_pattern_get_color_stop_count (cairo_pattern_t *pattern, int *count); return cairo_pattern_get_color_stop_count(cairo_pattern, &count); } /** * Gets the color and offset information at the given index for a * gradient pattern. Values of index are 0 to 1 less than the number * returned by cairo_pattern_get_color_stop_count(). * Since 1.4 * Params: * index = index of the stop to return data for * offset = return value for the offset of the stop, or NULL * red = return value for red component of color, or NULL * green = return value for green component of color, or NULL * blue = return value for blue component of color, or NULL * alpha = return value for alpha component of color, or NULL * Returns: CAIRO_STATUS_SUCCESS, or CAIRO_STATUS_INVALID_INDEX if index is not valid for the given pattern. If the pattern is not a gradient pattern, CAIRO_STATUS_PATTERN_TYPE_MISMATCH is returned. */ public cairo_status_t getColorStopRgba(int index, out double offset, out double red, out double green, out double blue, out double alpha) { // cairo_status_t cairo_pattern_get_color_stop_rgba (cairo_pattern_t *pattern, int index, double *offset, double *red, double *green, double *blue, double *alpha); return cairo_pattern_get_color_stop_rgba(cairo_pattern, index, &offset, &red, &green, &blue, &alpha); } /** * Creates a new cairo_pattern_t corresponding to an opaque color. The * color components are floating point numbers in the range 0 to 1. * If the values passed in are outside that range, they will be * clamped. * Since 1.0 * Params: * red = red component of the color * green = green component of the color * blue = blue component of the color * Returns: the newly created cairo_pattern_t if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status(). */ public static Pattern createRgb(double red, double green, double blue) { // cairo_pattern_t * cairo_pattern_create_rgb (double red, double green, double blue); auto p = cairo_pattern_create_rgb(red, green, blue); if(p is null) { return null; } return new Pattern(cast(cairo_pattern_t*) p); } /** * Creates a new cairo_pattern_t corresponding to a translucent color. * The color components are floating point numbers in the range 0 to * 1. If the values passed in are outside that range, they will be * clamped. * Since 1.0 * Params: * red = red component of the color * green = green component of the color * blue = blue component of the color * alpha = alpha component of the color * Returns: the newly created cairo_pattern_t if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status(). */ public static Pattern createRgba(double red, double green, double blue, double alpha) { // cairo_pattern_t * cairo_pattern_create_rgba (double red, double green, double blue, double alpha); auto p = cairo_pattern_create_rgba(red, green, blue, alpha); if(p is null) { return null; } return new Pattern(cast(cairo_pattern_t*) p); } /** * Gets the solid color for a solid color pattern. * Since 1.4 * Params: * red = return value for red component of color, or NULL * green = return value for green component of color, or NULL * blue = return value for blue component of color, or NULL * alpha = return value for alpha component of color, or NULL * Returns: CAIRO_STATUS_SUCCESS, or CAIRO_STATUS_PATTERN_TYPE_MISMATCH if the pattern is not a solid color pattern. */ public cairo_status_t getRgba(out double red, out double green, out double blue, out double alpha) { // cairo_status_t cairo_pattern_get_rgba (cairo_pattern_t *pattern, double *red, double *green, double *blue, double *alpha); return cairo_pattern_get_rgba(cairo_pattern, &red, &green, &blue, &alpha); } /** * Create a new cairo_pattern_t for the given surface. * Since 1.0 * Params: * surface = the surface * Returns: the newly created cairo_pattern_t if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status(). */ public static Pattern createForSurface(Surface surface) { // cairo_pattern_t * cairo_pattern_create_for_surface (cairo_surface_t *surface); auto p = cairo_pattern_create_for_surface((surface is null) ? null : surface.getSurfaceStruct()); if(p is null) { return null; } return new Pattern(cast(cairo_pattern_t*) p); } /** * Gets the surface of a surface pattern. The reference returned in * surface is owned by the pattern; the caller should call * cairo_surface_reference() if the surface is to be retained. * Since 1.4 * Params: * surface = return value for surface of pattern, or NULL * Returns: CAIRO_STATUS_SUCCESS, or CAIRO_STATUS_PATTERN_TYPE_MISMATCH if the pattern is not a surface pattern. */ public cairo_status_t getSurface(out Surface surface) { // cairo_status_t cairo_pattern_get_surface (cairo_pattern_t *pattern, cairo_surface_t **surface); cairo_surface_t* outsurface = null; auto p = cairo_pattern_get_surface(cairo_pattern, &outsurface); surface = new Surface(outsurface); return p; } /** * Create a new linear gradient cairo_pattern_t along the line defined * by (x0, y0) and (x1, y1). Before using the gradient pattern, a * number of color stops should be defined using * cairo_pattern_add_color_stop_rgb() or * cairo_pattern_add_color_stop_rgba(). * Note: The coordinates here are in pattern space. For a new pattern, * pattern space is identical to user space, but the relationship * between the spaces can be changed with cairo_pattern_set_matrix(). * Since 1.0 * Params: * x0 = x coordinate of the start point * y0 = y coordinate of the start point * x1 = x coordinate of the end point * y1 = y coordinate of the end point * Returns: the newly created cairo_pattern_t if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status(). */ public static Pattern createLinear(double x0, double y0, double x1, double y1) { // cairo_pattern_t * cairo_pattern_create_linear (double x0, double y0, double x1, double y1); auto p = cairo_pattern_create_linear(x0, y0, x1, y1); if(p is null) { return null; } return new Pattern(cast(cairo_pattern_t*) p); } /** * Gets the gradient endpoints for a linear gradient. * Since 1.4 * Params: * x0 = return value for the x coordinate of the first point, or NULL * y0 = return value for the y coordinate of the first point, or NULL * x1 = return value for the x coordinate of the second point, or NULL * y1 = return value for the y coordinate of the second point, or NULL * Returns: CAIRO_STATUS_SUCCESS, or CAIRO_STATUS_PATTERN_TYPE_MISMATCH if pattern is not a linear gradient pattern. */ public cairo_status_t getLinearPoints(out double x0, out double y0, out double x1, out double y1) { // cairo_status_t cairo_pattern_get_linear_points (cairo_pattern_t *pattern, double *x0, double *y0, double *x1, double *y1); return cairo_pattern_get_linear_points(cairo_pattern, &x0, &y0, &x1, &y1); } /** * Creates a new radial gradient cairo_pattern_t between the two * circles defined by (cx0, cy0, radius0) and (cx1, cy1, radius1). Before using the * gradient pattern, a number of color stops should be defined using * cairo_pattern_add_color_stop_rgb() or * cairo_pattern_add_color_stop_rgba(). * Note: The coordinates here are in pattern space. For a new pattern, * pattern space is identical to user space, but the relationship * between the spaces can be changed with cairo_pattern_set_matrix(). * Since 1.0 * Params: * cx0 = x coordinate for the center of the start circle * cy0 = y coordinate for the center of the start circle * radius0 = radius of the start circle * cx1 = x coordinate for the center of the end circle * cy1 = y coordinate for the center of the end circle * radius1 = radius of the end circle * Returns: the newly created cairo_pattern_t if successful, or an error pattern in case of no memory. The caller owns the returned object and should call cairo_pattern_destroy() when finished with it. This function will always return a valid pointer, but if an error occurred the pattern status will be set to an error. To inspect the status of a pattern use cairo_pattern_status(). */ public static Pattern createRadial(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1) { // cairo_pattern_t * cairo_pattern_create_radial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1); auto p = cairo_pattern_create_radial(cx0, cy0, radius0, cx1, cy1, radius1); if(p is null) { return null; } return new Pattern(cast(cairo_pattern_t*) p); } /** * Gets the gradient endpoint circles for a radial gradient, each * specified as a center coordinate and a radius. * Since 1.4 * Params: * x0 = return value for the x coordinate of the center of the first circle, or NULL * y0 = return value for the y coordinate of the center of the first circle, or NULL * r0 = return value for the radius of the first circle, or NULL * x1 = return value for the x coordinate of the center of the second circle, or NULL * y1 = return value for the y coordinate of the center of the second circle, or NULL * r1 = return value for the radius of the second circle, or NULL * Returns: CAIRO_STATUS_SUCCESS, or CAIRO_STATUS_PATTERN_TYPE_MISMATCH if pattern is not a radial gradient pattern. */ public cairo_status_t getRadialCircles(out double x0, out double y0, out double r0, out double x1, out double y1, out double r1) { // cairo_status_t cairo_pattern_get_radial_circles (cairo_pattern_t *pattern, double *x0, double *y0, double *r0, double *x1, double *y1, double *r1); return cairo_pattern_get_radial_circles(cairo_pattern, &x0, &y0, &r0, &x1, &y1, &r1); } /** * Increases the reference count on pattern by one. This prevents * pattern from being destroyed until a matching call to * cairo_pattern_destroy() is made. * The number of references to a cairo_pattern_t can be get using * cairo_pattern_get_reference_count(). * Since 1.0 * Returns: the referenced cairo_pattern_t. */ public Pattern reference() { // cairo_pattern_t * cairo_pattern_reference (cairo_pattern_t *pattern); auto p = cairo_pattern_reference(cairo_pattern); if(p is null) { return null; } return new Pattern(cast(cairo_pattern_t*) p); } /** * Decreases the reference count on pattern by one. If the result is * zero, then pattern and all associated resources are freed. See * cairo_pattern_reference(). * Since 1.0 */ public void destroy() { // void cairo_pattern_destroy (cairo_pattern_t *pattern); cairo_pattern_destroy(cairo_pattern); } /** * Checks whether an error has previously occurred for this * pattern. * Since 1.0 * Returns: CAIRO_STATUS_SUCCESS, CAIRO_STATUS_NO_MEMORY, CAIRO_STATUS_INVALID_MATRIX, CAIRO_STATUS_PATTERN_TYPE_MISMATCH, or CAIRO_STATUS_INVALID_MESH_CONSTRUCTION. */ public cairo_status_t status() { // cairo_status_t cairo_pattern_status (cairo_pattern_t *pattern); return cairo_pattern_status(cairo_pattern); } /** * Sets the mode to be used for drawing outside the area of a pattern. * See cairo_extend_t for details on the semantics of each extend * strategy. * The default extend mode is CAIRO_EXTEND_NONE for surface patterns * and CAIRO_EXTEND_PAD for gradient patterns. * Since 1.0 * Params: * extend = a cairo_extend_t describing how the area outside of the * pattern will be drawn */ public void setExtend(cairo_extend_t extend) { // void cairo_pattern_set_extend (cairo_pattern_t *pattern, cairo_extend_t extend); cairo_pattern_set_extend(cairo_pattern, extend); } /** * Gets the current extend mode for a pattern. See cairo_extend_t * for details on the semantics of each extend strategy. * Since 1.0 * Returns: the current extend strategy used for drawing the pattern. */ public cairo_extend_t getExtend() { // cairo_extend_t cairo_pattern_get_extend (cairo_pattern_t *pattern); return cairo_pattern_get_extend(cairo_pattern); } /** * Sets the filter to be used for resizing when using this pattern. * See cairo_filter_t for details on each filter. * * Note that you might want to control filtering even when you do not * have an explicit cairo_pattern_t object, (for example when using * cairo_set_source_surface()). In these cases, it is convenient to * use cairo_get_source() to get access to the pattern that cairo * Since 1.0 * Params: * filter = a cairo_filter_t describing the filter to use for resizing * the pattern */ public void setFilter(cairo_filter_t filter) { // void cairo_pattern_set_filter (cairo_pattern_t *pattern, cairo_filter_t filter); cairo_pattern_set_filter(cairo_pattern, filter); } /** * Gets the current filter for a pattern. See cairo_filter_t * for details on each filter. * Since 1.0 * Returns: the current filter used for resizing the pattern. */ public cairo_filter_t getFilter() { // cairo_filter_t cairo_pattern_get_filter (cairo_pattern_t *pattern); return cairo_pattern_get_filter(cairo_pattern); } /** * Sets the pattern's transformation matrix to matrix. This matrix is * a transformation from user space to pattern space. * When a pattern is first created it always has the identity matrix * for its transformation matrix, which means that pattern space is * initially identical to user space. * Important: Please note that the direction of this transformation * matrix is from user space to pattern space. This means that if you * imagine the flow from a pattern to user space (and on to device * space), then coordinates in that flow will be transformed by the * inverse of the pattern matrix. * For example, if you want to make a pattern appear twice as large as * Since 1.0 * Params: * matrix = a cairo_matrix_t */ public void setMatrix(Matrix matrix) { // void cairo_pattern_set_matrix (cairo_pattern_t *pattern, const cairo_matrix_t *matrix); cairo_pattern_set_matrix(cairo_pattern, (matrix is null) ? null : matrix.getMatrixStruct()); } /** * Stores the pattern's transformation matrix into matrix. * Since 1.0 * Params: * matrix = return value for the matrix */ public void getMatrix(Matrix matrix) { // void cairo_pattern_get_matrix (cairo_pattern_t *pattern, cairo_matrix_t *matrix); cairo_pattern_get_matrix(cairo_pattern, (matrix is null) ? null : matrix.getMatrixStruct()); } /** * This function returns the type a pattern. * See cairo_pattern_type_t for available types. * Since 1.2 * Params: * pattern = a cairo_pattern_t * Returns: The type of pattern. */ public cairo_pattern_type_t getType() { // cairo_pattern_type_t cairo_pattern_get_type (cairo_pattern_t *pattern); return cairo_pattern_get_type(cairo_pattern); } /** * Returns the current reference count of pattern. * Since 1.4 * Returns: the current reference count of pattern. If the object is a nil object, 0 will be returned. */ public uint getReferenceCount() { // unsigned int cairo_pattern_get_reference_count (cairo_pattern_t *pattern); return cairo_pattern_get_reference_count(cairo_pattern); } /** * Attach user data to pattern. To remove user data from a surface, * call this function with the key that was used to set it and NULL * for data. * Since 1.4 * Params: * key = the address of a cairo_user_data_key_t to attach the user data to * userData = the user data to attach to the cairo_pattern_t * destroy = a cairo_destroy_func_t which will be called when the * cairo_t is destroyed or when new user data is attached using the * same key. * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data. */ public cairo_status_t setUserData(cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) { // cairo_status_t cairo_pattern_set_user_data (cairo_pattern_t *pattern, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy); return cairo_pattern_set_user_data(cairo_pattern, key, userData, destroy); } /** * Return user data previously attached to pattern using the * specified key. If no user data has been attached with the given * key this function returns NULL. * Since 1.4 * Params: * key = the address of the cairo_user_data_key_t the user data was * attached to * Returns: the user data previously attached or NULL. */ public void* getUserData(cairo_user_data_key_t* key) { // void * cairo_pattern_get_user_data (cairo_pattern_t *pattern, const cairo_user_data_key_t *key); return cairo_pattern_get_user_data(cairo_pattern, key); } } GtkD-3.7.5/generated/gtkd/cairo/PdfSurface.d000066400000000000000000000167401324604450400205440ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-PDF-Surfaces.html * outPack = cairo * outFile = PdfSurface * strct = cairo_surface_t * realStrct= * ctorStrct= * clss = PdfSurface * interf = * class Code: No * interface Code: No * template for: * extend = cairo_surface_t * implements: * prefixes: * - cairo_pdf_surface_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - glib.Str * structWrap: * - cairo_surface_t* -> PdfSurface * module aliases: * local aliases: * overrides: */ module cairo.PdfSurface; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import glib.Str; private import cairo.Surface; /** * The PDF surface is used to render cairo graphics to Adobe * PDF files and is a multi-page vector surface backend. */ public class PdfSurface : Surface { /** the main Gtk struct */ protected cairo_surface_t* cairo_surface; /** Get the main Gtk struct */ public cairo_surface_t* getPdfSurfaceStruct() { return cairo_surface; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)cairo_surface; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_surface_t* cairo_surface) { super(cast(cairo_surface_t*)cairo_surface); this.cairo_surface = cairo_surface; } /** */ /** * Creates a PDF surface of the specified size in points to be written * to filename. * Since 1.2 * Params: * filename = a filename for the PDF output (must be writable), NULL may be * used to specify no output. This will generate a PDF surface that * may be queried and used as a source, without generating a * temporary file. * widthInPoints = width of the surface, in points (1 point == 1/72.0 inch) * heightInPoints = height of the surface, in points (1 point == 1/72.0 inch) * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this. */ public static PdfSurface create(string filename, double widthInPoints, double heightInPoints) { // cairo_surface_t * cairo_pdf_surface_create (const char *filename, double width_in_points, double height_in_points); auto p = cairo_pdf_surface_create(Str.toStringz(filename), widthInPoints, heightInPoints); if(p is null) { return null; } return new PdfSurface(cast(cairo_surface_t*) p); } /** * Creates a PDF surface of the specified size in points to be written * incrementally to the stream represented by write_func and closure. * Since 1.2 * Params: * writeFunc = a cairo_write_func_t to accept the output data, may be NULL * to indicate a no-op write_func. With a no-op write_func, * the surface may be queried or used as a source without * generating any temporary files. * closure = the closure argument for write_func * widthInPoints = width of the surface, in points (1 point == 1/72.0 inch) * heightInPoints = height of the surface, in points (1 point == 1/72.0 inch) * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this. */ public static PdfSurface createForStream(cairo_write_func_t writeFunc, void* closure, double widthInPoints, double heightInPoints) { // cairo_surface_t * cairo_pdf_surface_create_for_stream (cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points); auto p = cairo_pdf_surface_create_for_stream(writeFunc, closure, widthInPoints, heightInPoints); if(p is null) { return null; } return new PdfSurface(cast(cairo_surface_t*) p); } /** * Restricts the generated PDF file to version. See cairo_pdf_get_versions() * for a list of available version values that can be used here. * This function should only be called before any drawing operations * have been performed on the given surface. The simplest way to do * this is to call this function immediately after creating the * surface. * Since 1.10 * Params: * version = PDF version */ public void restrictToVersion(cairo_pdf_version_t versio) { // void cairo_pdf_surface_restrict_to_version (cairo_surface_t *surface, cairo_pdf_version_t version); cairo_pdf_surface_restrict_to_version(cairo_surface, versio); } /** * Used to retrieve the list of supported versions. See * cairo_pdf_surface_restrict_to_version(). * Since 1.10 * Params: * versions = supported version list */ public static void cairoPdfGetVersions(out cairo_pdf_version_t[] versions) { // void cairo_pdf_get_versions (cairo_pdf_version_t const **versions, int *num_versions); cairo_pdf_version_t* outversions = null; int numVersions; cairo_pdf_get_versions(&outversions, &numVersions); versions = outversions[0 .. numVersions]; } /** * Get the string representation of the given version id. This function * will return NULL if version isn't valid. See cairo_pdf_get_versions() * for a way to get the list of valid version ids. * Since 1.10 * Params: * version = a version id * Returns: the string associated to given version. */ public static string cairoPdfVersionToString(cairo_pdf_version_t versio) { // const char * cairo_pdf_version_to_string (cairo_pdf_version_t version); return Str.toString(cairo_pdf_version_to_string(versio)); } /** * Changes the size of a PDF surface for the current (and * subsequent) pages. * This function should only be called before any drawing operations * have been performed on the current page. The simplest way to do * this is to call this function immediately after creating the * surface or immediately after completing a page with either * cairo_show_page() or cairo_copy_page(). * Since 1.2 * Params: * widthInPoints = new surface width, in points (1 point == 1/72.0 inch) * heightInPoints = new surface height, in points (1 point == 1/72.0 inch) */ public void setSize(double widthInPoints, double heightInPoints) { // void cairo_pdf_surface_set_size (cairo_surface_t *surface, double width_in_points, double height_in_points); cairo_pdf_surface_set_size(cairo_surface, widthInPoints, heightInPoints); } } GtkD-3.7.5/generated/gtkd/cairo/PostScriptSurface.d000066400000000000000000000314221324604450400221370ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-PostScript-Surfaces.html * outPack = cairo * outFile = PostScriptSurface * strct = cairo_surface_t * realStrct= * ctorStrct= * clss = PostScriptSurface * interf = * class Code: No * interface Code: No * template for: * extend = cairo_surface_t * implements: * prefixes: * - cairo_ps_surface_ * - cairo_ps_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - glib.Str * structWrap: * - cairo_surface_t* -> PostScriptSurface * module aliases: * local aliases: * overrides: */ module cairo.PostScriptSurface; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import glib.Str; private import cairo.Surface; /** * The PostScript surface is used to render cairo graphics to Adobe * PostScript files and is a multi-page vector surface backend. */ public class PostScriptSurface : Surface { /** the main Gtk struct */ protected cairo_surface_t* cairo_surface; /** Get the main Gtk struct */ public cairo_surface_t* getPostScriptSurfaceStruct() { return cairo_surface; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)cairo_surface; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_surface_t* cairo_surface) { super(cast(cairo_surface_t*)cairo_surface); this.cairo_surface = cairo_surface; } /** */ /** * Creates a PostScript surface of the specified size in points to be * written to filename. See cairo_ps_surface_create_for_stream() for * a more flexible mechanism for handling the PostScript output than * simply writing it to a named file. * Note that the size of individual pages of the PostScript output can * vary. See cairo_ps_surface_set_size(). * Since 1.2 * Params: * filename = a filename for the PS output (must be writable), NULL may be * used to specify no output. This will generate a PS surface that * may be queried and used as a source, without generating a * temporary file. * widthInPoints = width of the surface, in points (1 point == 1/72.0 inch) * heightInPoints = height of the surface, in points (1 point == 1/72.0 inch) * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this. */ public static PostScriptSurface create(string filename, double widthInPoints, double heightInPoints) { // cairo_surface_t * cairo_ps_surface_create (const char *filename, double width_in_points, double height_in_points); auto p = cairo_ps_surface_create(Str.toStringz(filename), widthInPoints, heightInPoints); if(p is null) { return null; } return new PostScriptSurface(cast(cairo_surface_t*) p); } /** * Creates a PostScript surface of the specified size in points to be * written incrementally to the stream represented by write_func and * closure. See cairo_ps_surface_create() for a more convenient way * to simply direct the PostScript output to a named file. * Note that the size of individual pages of the PostScript * output can vary. See cairo_ps_surface_set_size(). * Since 1.2 * Params: * writeFunc = a cairo_write_func_t to accept the output data, may be NULL * to indicate a no-op write_func. With a no-op write_func, * the surface may be queried or used as a source without * generating any temporary files. * closure = the closure argument for write_func * widthInPoints = width of the surface, in points (1 point == 1/72.0 inch) * heightInPoints = height of the surface, in points (1 point == 1/72.0 inch) * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this. */ public static PostScriptSurface createForStream(cairo_write_func_t writeFunc, void* closure, double widthInPoints, double heightInPoints) { // cairo_surface_t * cairo_ps_surface_create_for_stream (cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points); auto p = cairo_ps_surface_create_for_stream(writeFunc, closure, widthInPoints, heightInPoints); if(p is null) { return null; } return new PostScriptSurface(cast(cairo_surface_t*) p); } /** * Restricts the generated PostSript file to level. See * cairo_ps_get_levels() for a list of available level values that * can be used here. * This function should only be called before any drawing operations * have been performed on the given surface. The simplest way to do * this is to call this function immediately after creating the * surface. * Since 1.6 * Params: * level = PostScript level */ public void restrictToLevel(cairo_ps_level_t level) { // void cairo_ps_surface_restrict_to_level (cairo_surface_t *surface, cairo_ps_level_t level); cairo_ps_surface_restrict_to_level(cairo_surface, level); } /** * Used to retrieve the list of supported levels. See * cairo_ps_surface_restrict_to_level(). * Since 1.6 * Params: * levels = supported level list */ public static void getLevels(out cairo_ps_level_t[] levels) { // void cairo_ps_get_levels (cairo_ps_level_t const **levels, int *num_levels); cairo_ps_level_t* outlevels = null; int numLevels; cairo_ps_get_levels(&outlevels, &numLevels); levels = outlevels[0 .. numLevels]; } /** * Get the string representation of the given level id. This function * will return NULL if level id isn't valid. See cairo_ps_get_levels() * for a way to get the list of valid level ids. * Since 1.6 * Params: * level = a level id * Returns: the string associated to given level. */ public static string levelToString(cairo_ps_level_t level) { // const char * cairo_ps_level_to_string (cairo_ps_level_t level); return Str.toString(cairo_ps_level_to_string(level)); } /** * If eps is TRUE, the PostScript surface will output Encapsulated * PostScript. * This function should only be called before any drawing operations * have been performed on the current page. The simplest way to do * this is to call this function immediately after creating the * surface. An Encapsulated PostScript file should never contain more * than one page. * Since 1.6 * Params: * eps = TRUE to output EPS format PostScript */ public void setEps(cairo_bool_t eps) { // void cairo_ps_surface_set_eps (cairo_surface_t *surface, cairo_bool_t eps); cairo_ps_surface_set_eps(cairo_surface, eps); } /** * Check whether the PostScript surface will output Encapsulated PostScript. * Since 1.6 * Returns: TRUE if the surface will output Encapsulated PostScript. */ public cairo_bool_t getEps() { // cairo_bool_t cairo_ps_surface_get_eps (cairo_surface_t *surface); return cairo_ps_surface_get_eps(cairo_surface); } /** * Changes the size of a PostScript surface for the current (and * subsequent) pages. * This function should only be called before any drawing operations * have been performed on the current page. The simplest way to do * this is to call this function immediately after creating the * surface or immediately after completing a page with either * cairo_show_page() or cairo_copy_page(). * Since 1.2 * Params: * widthInPoints = new surface width, in points (1 point == 1/72.0 inch) * heightInPoints = new surface height, in points (1 point == 1/72.0 inch) */ public void setSize(double widthInPoints, double heightInPoints) { // void cairo_ps_surface_set_size (cairo_surface_t *surface, double width_in_points, double height_in_points); cairo_ps_surface_set_size(cairo_surface, widthInPoints, heightInPoints); } /** * This function indicates that subsequent calls to * cairo_ps_surface_dsc_comment() should direct comments to the Setup * section of the PostScript output. * This function should be called at most once per surface, and must * be called before any call to cairo_ps_surface_dsc_begin_page_setup() * and before any drawing is performed to the surface. * See cairo_ps_surface_dsc_comment() for more details. * Since 1.2 */ public void dscBeginSetup() { // void cairo_ps_surface_dsc_begin_setup (cairo_surface_t *surface); cairo_ps_surface_dsc_begin_setup(cairo_surface); } /** * This function indicates that subsequent calls to * cairo_ps_surface_dsc_comment() should direct comments to the * PageSetup section of the PostScript output. * This function call is only needed for the first page of a * surface. It should be called after any call to * cairo_ps_surface_dsc_begin_setup() and before any drawing is * performed to the surface. * See cairo_ps_surface_dsc_comment() for more details. * Since 1.2 */ public void dscBeginPageSetup() { // void cairo_ps_surface_dsc_begin_page_setup (cairo_surface_t *surface); cairo_ps_surface_dsc_begin_page_setup(cairo_surface); } /** * Emit a comment into the PostScript output for the given surface. * The comment is expected to conform to the PostScript Language * Document Structuring Conventions (DSC). Please see that manual for * details on the available comments and their meanings. In * particular, the %%IncludeFeature comment allows a * device-independent means of controlling printer device features. So * the PostScript Printer Description Files Specification will also be * a useful reference. * The comment string must begin with a percent character (%) and the * total length of the string (including any initial percent * characters) must not exceed 255 characters. Violating either of * these conditions will place surface into an error state. But * beyond these two conditions, this function will not enforce * conformance of the comment with any particular specification. * The comment string should not have a trailing newline. * The DSC specifies different sections in which particular comments * can appear. This function provides for comments to be emitted * within three sections: the header, the Setup section, and the * PageSetup section. Comments appearing in the first two sections * apply to the entire document while comments in the BeginPageSetup * section apply only to a single page. * For comments to appear in the header section, this function should * be called after the surface is created, but before a call to * cairo_ps_surface_dsc_begin_setup(). * For comments to appear in the Setup section, this function should * be called after a call to cairo_ps_surface_dsc_begin_setup() but * before a call to cairo_ps_surface_dsc_begin_page_setup(). * For comments to appear in the PageSetup section, this function * should be called after a call to * cairo_ps_surface_dsc_begin_page_setup(). * Note that it is only necessary to call * cairo_ps_surface_dsc_begin_page_setup() for the first page of any * surface. After a call to cairo_show_page() or cairo_copy_page() * comments are unambiguously directed to the PageSetup section of the * current page. But it doesn't hurt to call this function at the * beginning of every page as that consistency may make the calling * code simpler. * As a final note, cairo automatically generates several comments on * its own. As such, applications must not manually generate any of * Since 1.2 * Params: * comment = a comment string to be emitted into the PostScript output */ public void dscComment(string comment) { // void cairo_ps_surface_dsc_comment (cairo_surface_t *surface, const char *comment); cairo_ps_surface_dsc_comment(cairo_surface, Str.toStringz(comment)); } } GtkD-3.7.5/generated/gtkd/cairo/RasterSource.d000066400000000000000000000211661324604450400211410ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-Raster-Sources.html * outPack = cairo * outFile = RasterSource * strct = cairo_pattern_t * realStrct= * ctorStrct= * clss = RasterSource * interf = * class Code: Yes * interface Code: No * template for: * extend = cairo_pattern_t * implements: * prefixes: * - cairo_raster_source_pattern_ * omit structs: * omit prefixes: * omit code: * - cairo_pattern_create_raster_source * omit signals: * imports: * structWrap: * module aliases: * local aliases: * overrides: */ module cairo.RasterSource; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import cairo.Pattern; /** * The raster source provides the ability to supply arbitrary pixel data * whilst rendering. The pixels are queried at the time of rasterisation * by means of user callback functions, allowing for the ultimate * flexibility. For example, in handling compressed image sources, you * may keep a MRU cache of decompressed images and decompress sources on the * fly and discard old ones to conserve memory. * * For the raster source to be effective, you must at least specify * the acquire and release callbacks which are used to retrieve the pixel * data for the region of interest and demark when it can be freed afterwards. * Other callbacks are provided for when the pattern is copied temporarily * during rasterisation, or more permanently as a snapshot in order to keep * the pixel data available for printing. */ public class RasterSource : Pattern { /** the main Gtk struct */ protected cairo_pattern_t* cairo_pattern; /** Get the main Gtk struct */ public cairo_pattern_t* getRasterSourceStruct() { return cairo_pattern; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)cairo_pattern; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_pattern_t* cairo_pattern) { super(cast(cairo_pattern_t*)cairo_pattern); this.cairo_pattern = cairo_pattern; } /** * Creates a new user pattern for providing pixel data. * * Use the setter functions to associate callbacks with the returned * pattern. The only mandatory callback is acquire. * * Since 1.12 * * Params: * userData = the user data to be passed to all callbacks * content = content type for the pixel data that will be returned. * Knowing the content type ahead of time is used for analysing * the operation and picking the appropriate rendering path. * width = maximum size of the sample area * height = maximum size of the sample area */ public this(void* userData, CairoContent content, int width, int height) { // cairo_pattern_t * cairo_pattern_create_raster_source (void *user_data, cairo_content_t content, int width, int height); this(cairo_pattern_create_raster_source(userData, content, width, height)); } /** */ /** * Updates the user data that is provided to all callbacks. * Since 1.12 * Params: * data = the user data to be passed to all callbacks */ public void setCallbackData(void* data) { // void cairo_raster_source_pattern_set_callback_data (cairo_pattern_t *pattern, void *data); cairo_raster_source_pattern_set_callback_data(cairo_pattern, data); } /** * Queries the current user data. * Since 1.12 * Returns: the current user-data passed to each callback */ public void* getCallbackData() { // void * cairo_raster_source_pattern_get_callback_data (cairo_pattern_t *pattern); return cairo_raster_source_pattern_get_callback_data(cairo_pattern); } /** * Specifies the callbacks used to generate the image surface for a rendering * operation (acquire) and the function used to cleanup that surface afterwards. * The acquire callback should create a surface (preferably an image * surface created to match the target using * cairo_surface_create_similar_image()) that defines at least the region * of interest specified by extents. The surface is allowed to be the entire * sample area, but if it does contain a subsection of the sample area, * the surface extents should be provided by setting the device offset (along * with its width and height) using cairo_surface_set_device_offset(). * Since 1.12 * Params: * acquire = acquire callback * release = release callback */ public void setAcquire(cairo_raster_source_acquire_func_t acquire, cairo_raster_source_release_func_t release) { // void cairo_raster_source_pattern_set_acquire (cairo_pattern_t *pattern, cairo_raster_source_acquire_func_t acquire, cairo_raster_source_release_func_t release); cairo_raster_source_pattern_set_acquire(cairo_pattern, acquire, release); } /** * Queries the current acquire and release callbacks. * Since 1.12 * Params: * acquire = return value for the current acquire callback * release = return value for the current release callback */ public void getAcquire(cairo_raster_source_acquire_func_t* acquire, cairo_raster_source_release_func_t* release) { // void cairo_raster_source_pattern_get_acquire (cairo_pattern_t *pattern, cairo_raster_source_acquire_func_t *acquire, cairo_raster_source_release_func_t *release); cairo_raster_source_pattern_get_acquire(cairo_pattern, acquire, release); } /** * Sets the callback that will be used whenever a snapshot is taken of the * pattern, that is whenever the current contents of the pattern should be * preserved for later use. This is typically invoked whilst printing. * Since 1.12 * Params: * snapshot = snapshot callback */ public void setSnapshot(cairo_raster_source_snapshot_func_t snapshot) { // void cairo_raster_source_pattern_set_snapshot (cairo_pattern_t *pattern, cairo_raster_source_snapshot_func_t snapshot); cairo_raster_source_pattern_set_snapshot(cairo_pattern, snapshot); } /** * Queries the current snapshot callback. * Since 1.12 * Returns: the current snapshot callback */ public cairo_raster_source_snapshot_func_t getSnapshot() { // cairo_raster_source_snapshot_func_t cairo_raster_source_pattern_get_snapshot (cairo_pattern_t *pattern); return cairo_raster_source_pattern_get_snapshot(cairo_pattern); } /** * Updates the copy callback which is used whenever a temporary copy of the * pattern is taken. * Since 1.12 * Params: * copy = the copy callback */ public void setCopy(cairo_raster_source_copy_func_t copy) { // void cairo_raster_source_pattern_set_copy (cairo_pattern_t *pattern, cairo_raster_source_copy_func_t copy); cairo_raster_source_pattern_set_copy(cairo_pattern, copy); } /** * Queries the current copy callback. * Since 1.12 * Returns: the current copy callback */ public cairo_raster_source_copy_func_t getCopy() { // cairo_raster_source_copy_func_t cairo_raster_source_pattern_get_copy (cairo_pattern_t *pattern); return cairo_raster_source_pattern_get_copy(cairo_pattern); } /** * Updates the finish callback which is used whenever a pattern (or a copy * thereof) will no longer be used. * Since 1.12 * Params: * finish = the finish callback */ public void setFinish(cairo_raster_source_finish_func_t finish) { // void cairo_raster_source_pattern_set_finish (cairo_pattern_t *pattern, cairo_raster_source_finish_func_t finish); cairo_raster_source_pattern_set_finish(cairo_pattern, finish); } /** * Queries the current finish callback. * Since 1.12 * Returns: the current finish callback */ public cairo_raster_source_finish_func_t getFinish() { // cairo_raster_source_finish_func_t cairo_raster_source_pattern_get_finish (cairo_pattern_t *pattern); return cairo_raster_source_pattern_get_finish(cairo_pattern); } } GtkD-3.7.5/generated/gtkd/cairo/RecordingSurface.d000066400000000000000000000135361324604450400217470ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-Recording-Surfaces.html * outPack = cairo * outFile = RecordingSurface * strct = cairo_surface_t * realStrct= * ctorStrct= * clss = RecordingSurface * interf = * class Code: No * interface Code: No * template for: * extend = cairo_surface_t * implements: * prefixes: * - cairo_recording_surface_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * structWrap: * module aliases: * local aliases: * overrides: */ module cairo.RecordingSurface; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import cairo.Surface; /** * A recording surface is a surface that records all drawing operations at * the highest level of the surface backend interface, (that is, the * level of paint, mask, stroke, fill, and show_text_glyphs). The recording * surface can then be "replayed" against any target surface by using it * as a source surface. * * If you want to replay a surface so that the results in target will be * identical to the results that would have been obtained if the original * operations applied to the recording surface had instead been applied to the * target surface, you can use code like this: * * $(DDOC_COMMENT example) * * A recording surface is logically unbounded, i.e. it has no implicit constraint * on the size of the drawing surface. However, in practice this is rarely * useful as you wish to replay against a particular target surface with * known bounds. For this case, it is more efficient to specify the target * extents to the recording surface upon creation. * * The recording phase of the recording surface is careful to snapshot all * necessary objects (paths, patterns, etc.), in order to achieve * accurate replay. The efficiency of the recording surface could be * improved by improving the implementation of snapshot for the * various objects. For example, it would be nice to have a * copy-on-write implementation for _cairo_surface_snapshot. */ public class RecordingSurface : Surface { /** the main Gtk struct */ protected cairo_surface_t* cairo_surface; /** Get the main Gtk struct */ public cairo_surface_t* getRecordingSurfaceStruct() { return cairo_surface; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)cairo_surface; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_surface_t* cairo_surface) { super(cast(cairo_surface_t*)cairo_surface); this.cairo_surface = cairo_surface; } /** */ /** * Creates a recording-surface which can be used to record all drawing operations * at the highest level (that is, the level of paint, mask, stroke, fill * and show_text_glyphs). The recording surface can then be "replayed" against * any target surface by using it as a source to drawing operations. * The recording phase of the recording surface is careful to snapshot all * necessary objects (paths, patterns, etc.), in order to achieve * accurate replay. * Since 1.10 * Params: * content = the content of the recording surface * extents = the extents to record in pixels, can be NULL to record * unbounded operations. * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. */ public static cairo_surface_t* create(cairo_content_t content, cairo_rectangle_t* extents) { // cairo_surface_t * cairo_recording_surface_create (cairo_content_t content, const cairo_rectangle_t *extents); return cairo_recording_surface_create(content, extents); } /** * Measures the extents of the operations stored within the recording-surface. * This is useful to compute the required size of an image surface (or * equivalent) into which to replay the full sequence of drawing operations. * Since 1.10 * Params: * x0 = the x-coordinate of the top-left of the ink bounding box * y0 = the y-coordinate of the top-left of the ink bounding box * width = the width of the ink bounding box * height = the height of the ink bounding box */ public void inkExtents(double* x0, double* y0, double* width, double* height) { // void cairo_recording_surface_ink_extents (cairo_surface_t *surface, double *x0, double *y0, double *width, double *height); cairo_recording_surface_ink_extents(cairo_surface, x0, y0, width, height); } /** * Get the extents of the recording-surface. * Since 1.12 * Params: * extents = the cairo_rectangle_t to be assigned the extents * Returns: TRUE if the surface is bounded, of recording type, and not in an error state, otherwise FALSE */ public cairo_bool_t getExtents(out cairo_rectangle_t extents) { // cairo_bool_t cairo_recording_surface_get_extents (cairo_surface_t *surface, cairo_rectangle_t *extents); return cairo_recording_surface_get_extents(cairo_surface, &extents); } } GtkD-3.7.5/generated/gtkd/cairo/Region.d000066400000000000000000000323441324604450400177430ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-Regions.html * outPack = cairo * outFile = Region * strct = cairo_region_t * realStrct= * ctorStrct= * clss = Region * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_region_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * structWrap: * - cairo_region_t* -> Region * module aliases: * local aliases: * overrides: */ module cairo.Region; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; /** * Regions are a simple graphical data type representing an area of * integer-aligned rectangles. They are often used on raster surfaces * to track areas of interest, such as change or clip areas. */ public class Region { /** the main Gtk struct */ protected cairo_region_t* cairo_region; /** Get the main Gtk struct */ public cairo_region_t* getRegionStruct() { return cairo_region; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo_region; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_region_t* cairo_region) { this.cairo_region = cairo_region; } /** */ /** * Allocates a new empty region object. * Since 1.10 * Returns: A newly allocated cairo_region_t. Free with cairo_region_destroy(). This function always returns a valid pointer; if memory cannot be allocated, then a special error object is returned where all operations on the object do nothing. You can check for this with cairo_region_status(). */ public static Region create() { // cairo_region_t * cairo_region_create (void); auto p = cairo_region_create(); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Allocates a new region object containing rectangle. * Since 1.10 * Params: * rectangle = a cairo_rectangle_int_t * Returns: A newly allocated cairo_region_t. Free with cairo_region_destroy(). This function always returns a valid pointer; if memory cannot be allocated, then a special error object is returned where all operations on the object do nothing. You can check for this with cairo_region_status(). */ public static Region createRectangle(ref cairo_rectangle_int_t rectangle) { // cairo_region_t * cairo_region_create_rectangle (const cairo_rectangle_int_t *rectangle); auto p = cairo_region_create_rectangle(&rectangle); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Allocates a new region object containing the union of all given rects. * Since 1.10 * Params: * rects = an array of count rectangles * Returns: A newly allocated cairo_region_t. Free with cairo_region_destroy(). This function always returns a valid pointer; if memory cannot be allocated, then a special error object is returned where all operations on the object do nothing. You can check for this with cairo_region_status(). */ public static Region createRectangles(cairo_rectangle_int_t[] rects) { // cairo_region_t * cairo_region_create_rectangles (const cairo_rectangle_int_t *rects, int count); auto p = cairo_region_create_rectangles(rects.ptr, cast(int) rects.length); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Allocates a new region object copying the area from original. * Since 1.10 * Returns: A newly allocated cairo_region_t. Free with cairo_region_destroy(). This function always returns a valid pointer; if memory cannot be allocated, then a special error object is returned where all operations on the object do nothing. You can check for this with cairo_region_status(). */ public Region copy() { // cairo_region_t * cairo_region_copy (const cairo_region_t *original); auto p = cairo_region_copy(cairo_region); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Increases the reference count on region by one. This prevents * region from being destroyed until a matching call to * cairo_region_destroy() is made. * Since 1.10 * Returns: the referenced cairo_region_t. */ public Region reference() { // cairo_region_t * cairo_region_reference (cairo_region_t *region); auto p = cairo_region_reference(cairo_region); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Destroys a cairo_region_t object created with * cairo_region_create(), cairo_region_copy(), or * or cairo_region_create_rectangle(). * Since 1.10 */ public void destroy() { // void cairo_region_destroy (cairo_region_t *region); cairo_region_destroy(cairo_region); } /** * Checks whether an error has previous occurred for this * region object. * Since 1.10 * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t status() { // cairo_status_t cairo_region_status (const cairo_region_t *region); return cairo_region_status(cairo_region); } /** * Gets the bounding rectangle of region as a cairo_rectangle_int_t * Since 1.10 * Params: * extents = rectangle into which to store the extents */ public void getExtents(out cairo_rectangle_int_t extents) { // void cairo_region_get_extents (const cairo_region_t *region, cairo_rectangle_int_t *extents); cairo_region_get_extents(cairo_region, &extents); } /** * Returns the number of rectangles contained in region. * Since 1.10 * Returns: The number of rectangles contained in region. */ public int numRectangles() { // int cairo_region_num_rectangles (const cairo_region_t *region); return cairo_region_num_rectangles(cairo_region); } /** * Stores the nth rectangle from the region in rectangle. * Since 1.10 * Params: * nth = a number indicating which rectangle should be returned * rectangle = return location for a cairo_rectangle_int_t */ public void getRectangle(int nth, out cairo_rectangle_int_t rectangle) { // void cairo_region_get_rectangle (const cairo_region_t *region, int nth, cairo_rectangle_int_t *rectangle); cairo_region_get_rectangle(cairo_region, nth, &rectangle); } /** * Checks whether region is empty. * Since 1.10 * Returns: TRUE if region is empty, FALSE if it isn't. */ public cairo_bool_t isEmpty() { // cairo_bool_t cairo_region_is_empty (const cairo_region_t *region); return cairo_region_is_empty(cairo_region); } /** * Checks whether (x, y) is contained in region. * Since 1.10 * Params: * x = the x coordinate of a point * y = the y coordinate of a point * Returns: TRUE if (x, y) is contained in region, FALSE if it is not. */ public cairo_bool_t containsPoint(int x, int y) { // cairo_bool_t cairo_region_contains_point (const cairo_region_t *region, int x, int y); return cairo_region_contains_point(cairo_region, x, y); } /** * Checks whether rectangle is inside, outside or partially contained * in region * Since 1.10 * Params: * region = a cairo_region_t * rectangle = a cairo_rectangle_int_t * Returns: CAIRO_REGION_OVERLAP_IN if rectangle is entirely inside region, CAIRO_REGION_OVERLAP_OUT if rectangle is entirely outside region, or CAIRO_REGION_OVERLAP_PART if rectangle is partially inside and partially outside region. */ public cairo_region_overlap_t containsRectangle(ref cairo_rectangle_int_t rectangle) { // cairo_region_overlap_t cairo_region_contains_rectangle (const cairo_region_t *region, const cairo_rectangle_int_t *rectangle); return cairo_region_contains_rectangle(cairo_region, &rectangle); } /** * Compares whether region_a is equivalent to region_b. NULL as an argument * is equal to itself, but not to any non-NULL region. * Since 1.10 * Params: * a = a cairo_region_t or NULL * b = a cairo_region_t or NULL * Returns: TRUE if both regions contained the same coverage, FALSE if it is not or any region is in an error status. */ public cairo_bool_t equal(Region b) { // cairo_bool_t cairo_region_equal (const cairo_region_t *a, const cairo_region_t *b); return cairo_region_equal(cairo_region, (b is null) ? null : b.getRegionStruct()); } /** * Translates region by (dx, dy). * Since 1.10 * Params: * dx = Amount to translate in the x direction * dy = Amount to translate in the y direction */ public void translate(int dx, int dy) { // void cairo_region_translate (cairo_region_t *region, int dx, int dy); cairo_region_translate(cairo_region, dx, dy); } /** * Computes the intersection of dst with other and places the result in dst * Since 1.10 * Params: * other = another cairo_region_t * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t intersect(Region other) { // cairo_status_t cairo_region_intersect (cairo_region_t *dst, const cairo_region_t *other); return cairo_region_intersect(cairo_region, (other is null) ? null : other.getRegionStruct()); } /** * Computes the intersection of dst with rectangle and places the * result in dst * Since 1.10 * Params: * rectangle = a cairo_rectangle_int_t * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t intersectRectangle(ref cairo_rectangle_int_t rectangle) { // cairo_status_t cairo_region_intersect_rectangle (cairo_region_t *dst, const cairo_rectangle_int_t *rectangle); return cairo_region_intersect_rectangle(cairo_region, &rectangle); } /** * Subtracts other from dst and places the result in dst * Since 1.10 * Params: * other = another cairo_region_t * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t subtract(Region other) { // cairo_status_t cairo_region_subtract (cairo_region_t *dst, const cairo_region_t *other); return cairo_region_subtract(cairo_region, (other is null) ? null : other.getRegionStruct()); } /** * Subtracts rectangle from dst and places the result in dst * Since 1.10 * Params: * rectangle = a cairo_rectangle_int_t * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t subtractRectangle(ref cairo_rectangle_int_t rectangle) { // cairo_status_t cairo_region_subtract_rectangle (cairo_region_t *dst, const cairo_rectangle_int_t *rectangle); return cairo_region_subtract_rectangle(cairo_region, &rectangle); } /** * Computes the union of dst with other and places the result in dst * Since 1.10 * Params: * other = another cairo_region_t * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t unio(Region other) { // cairo_status_t cairo_region_union (cairo_region_t *dst, const cairo_region_t *other); return cairo_region_union(cairo_region, (other is null) ? null : other.getRegionStruct()); } /** * Computes the union of dst with rectangle and places the result in dst. * Since 1.10 * Params: * rectangle = a cairo_rectangle_int_t * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t unionRectangle(ref cairo_rectangle_int_t rectangle) { // cairo_status_t cairo_region_union_rectangle (cairo_region_t *dst, const cairo_rectangle_int_t *rectangle); return cairo_region_union_rectangle(cairo_region, &rectangle); } /** * Computes the exclusive difference of dst with other and places the * result in dst. That is, dst will be set to contain all areas that * are either in dst or in other, but not in both. * Since 1.10 * Params: * other = another cairo_region_t * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t xor(Region other) { // cairo_status_t cairo_region_xor (cairo_region_t *dst, const cairo_region_t *other); return cairo_region_xor(cairo_region, (other is null) ? null : other.getRegionStruct()); } /** * Computes the exclusive difference of dst with rectangle and places the * result in dst. That is, dst will be set to contain all areas that are * either in dst or in rectangle, but not in both. * Since 1.10 * Params: * rectangle = a cairo_rectangle_int_t * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY */ public cairo_status_t xorRectangle(ref cairo_rectangle_int_t rectangle) { // cairo_status_t cairo_region_xor_rectangle (cairo_region_t *dst, const cairo_rectangle_int_t *rectangle); return cairo_region_xor_rectangle(cairo_region, &rectangle); } } GtkD-3.7.5/generated/gtkd/cairo/ScaledFont.d000066400000000000000000000401671324604450400205440ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-cairo-scaled-font-t.html * outPack = cairo * outFile = ScaledFont * strct = cairo_scaled_font_t * realStrct= * ctorStrct= * clss = ScaledFont * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_scaled_font_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - cairo.FontFace * - cairo.FontOption * - cairo.Matrix * - glib.Str * structWrap: * - cairo_font_face_t* -> FontFace * - cairo_font_options_t* -> FontOption * - cairo_matrix_t* -> Matrix * - cairo_scaled_font_t* -> ScaledFont * module aliases: * local aliases: * overrides: */ module cairo.ScaledFont; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import cairo.FontFace; private import cairo.FontOption; private import cairo.Matrix; private import glib.Str; /** * cairo_scaled_font_t represents a realization of a font face at a particular * size and transformation and a certain set of font options. */ public class ScaledFont { /** the main Gtk struct */ protected cairo_scaled_font_t* cairo_scaled_font; /** Get the main Gtk struct */ public cairo_scaled_font_t* getScaledFontStruct() { return cairo_scaled_font; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo_scaled_font; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_scaled_font_t* cairo_scaled_font) { this.cairo_scaled_font = cairo_scaled_font; } /** */ /** * Creates a cairo_scaled_font_t object from a font face and matrices that * describe the size of the font and the environment in which it will * be used. * Since 1.0 * Params: * fontFace = a cairo_font_face_t * fontMatrix = font space to user space transformation matrix for the * font. In the simplest case of a N point font, this matrix is * just a scale by N, but it can also be used to shear the font * or stretch it unequally along the two axes. See * cairo_set_font_matrix(). * ctm = user to device transformation matrix with which the font will * be used. * options = options to use when getting metrics for the font and * rendering with it. * Returns: a newly created cairo_scaled_font_t. Destroy with cairo_scaled_font_destroy() */ public static ScaledFont create(FontFace fontFace, Matrix fontMatrix, Matrix ctm, FontOption options) { // cairo_scaled_font_t * cairo_scaled_font_create (cairo_font_face_t *font_face, const cairo_matrix_t *font_matrix, const cairo_matrix_t *ctm, const cairo_font_options_t *options); auto p = cairo_scaled_font_create((fontFace is null) ? null : fontFace.getFontFaceStruct(), (fontMatrix is null) ? null : fontMatrix.getMatrixStruct(), (ctm is null) ? null : ctm.getMatrixStruct(), (options is null) ? null : options.getFontOptionStruct()); if(p is null) { return null; } return new ScaledFont(cast(cairo_scaled_font_t*) p); } /** * Increases the reference count on scaled_font by one. This prevents * scaled_font from being destroyed until a matching call to * cairo_scaled_font_destroy() is made. * The number of references to a cairo_scaled_font_t can be get using * cairo_scaled_font_get_reference_count(). * Since 1.0 * Returns: the referenced cairo_scaled_font_t */ public ScaledFont reference() { // cairo_scaled_font_t * cairo_scaled_font_reference (cairo_scaled_font_t *scaled_font); auto p = cairo_scaled_font_reference(cairo_scaled_font); if(p is null) { return null; } return new ScaledFont(cast(cairo_scaled_font_t*) p); } /** * Decreases the reference count on font by one. If the result * is zero, then font and all associated resources are freed. * See cairo_scaled_font_reference(). * Since 1.0 */ public void destroy() { // void cairo_scaled_font_destroy (cairo_scaled_font_t *scaled_font); cairo_scaled_font_destroy(cairo_scaled_font); } /** * Checks whether an error has previously occurred for this * scaled_font. * Since 1.0 * Returns: CAIRO_STATUS_SUCCESS or another error such as CAIRO_STATUS_NO_MEMORY. */ public cairo_status_t status() { // cairo_status_t cairo_scaled_font_status (cairo_scaled_font_t *scaled_font); return cairo_scaled_font_status(cairo_scaled_font); } /** * Gets the metrics for a cairo_scaled_font_t. * Since 1.0 * Params: * extents = a cairo_font_extents_t which to store the retrieved extents. */ public void extents(cairo_font_extents_t* extents) { // void cairo_scaled_font_extents (cairo_scaled_font_t *scaled_font, cairo_font_extents_t *extents); cairo_scaled_font_extents(cairo_scaled_font, extents); } /** * Gets the extents for a string of text. The extents describe a * user-space rectangle that encloses the "inked" portion of the text * drawn at the origin (0,0) (as it would be drawn by cairo_show_text() * if the cairo graphics state were set to the same font_face, * font_matrix, ctm, and font_options as scaled_font). Additionally, * the x_advance and y_advance values indicate the amount by which the * current point would be advanced by cairo_show_text(). * Note that whitespace characters do not directly contribute to the * size of the rectangle (extents.width and extents.height). They do * contribute indirectly by changing the position of non-whitespace * characters. In particular, trailing whitespace characters are * likely to not affect the size of the rectangle, though they will * affect the x_advance and y_advance values. * Since 1.2 * Params: * utf8 = a NUL-terminated string of text, encoded in UTF-8 * extents = a cairo_text_extents_t which to store the retrieved extents. */ public void textExtents(string utf8, cairo_text_extents_t* extents) { // void cairo_scaled_font_text_extents (cairo_scaled_font_t *scaled_font, const char *utf8, cairo_text_extents_t *extents); cairo_scaled_font_text_extents(cairo_scaled_font, Str.toStringz(utf8), extents); } /** * Gets the extents for an array of glyphs. The extents describe a * user-space rectangle that encloses the "inked" portion of the * glyphs, (as they would be drawn by cairo_show_glyphs() if the cairo * graphics state were set to the same font_face, font_matrix, ctm, * and font_options as scaled_font). Additionally, the x_advance and * y_advance values indicate the amount by which the current point * would be advanced by cairo_show_glyphs(). * Note that whitespace glyphs do not contribute to the size of the * rectangle (extents.width and extents.height). * Since 1.0 * Params: * glyphs = an array of glyph IDs with X and Y offsets. * numGlyphs = the number of glyphs in the glyphs array * extents = a cairo_text_extents_t which to store the retrieved extents. */ public void glyphExtents(cairo_glyph_t* glyphs, int numGlyphs, cairo_text_extents_t* extents) { // void cairo_scaled_font_glyph_extents (cairo_scaled_font_t *scaled_font, const cairo_glyph_t *glyphs, int num_glyphs, cairo_text_extents_t *extents); cairo_scaled_font_glyph_extents(cairo_scaled_font, glyphs, numGlyphs, extents); } /** * Converts UTF-8 text to an array of glyphs, optionally with cluster * mapping, that can be used to render later using scaled_font. * If glyphs initially points to a non-NULL value, that array is used * as a glyph buffer, and num_glyphs should point to the number of glyph * entries available there. If the provided glyph array is too short for * the conversion, a new glyph array is allocated using cairo_glyph_allocate() * and placed in glyphs. Upon return, num_glyphs always contains the * number of generated glyphs. If the value glyphs points to has changed * after the call, the user is responsible for freeing the allocated glyph * array using cairo_glyph_free(). This may happen even if the provided * array was large enough. * If clusters is not NULL, num_clusters and cluster_flags should not be NULL, * and cluster mapping will be computed. * The semantics of how cluster array allocation works is similar to the glyph * array. That is, * if clusters initially points to a non-NULL value, that array is used * as a cluster buffer, and num_clusters should point to the number of cluster * entries available there. If the provided cluster array is too short for * the conversion, a new cluster array is allocated using cairo_text_cluster_allocate() * and placed in clusters. Upon return, num_clusters always contains the * number of generated clusters. If the value clusters points at has changed * after the call, the user is responsible for freeing the allocated cluster * array using cairo_text_cluster_free(). This may happen even if the provided * array was large enough. * In the simplest case, glyphs and clusters can point to NULL initially * Since 1.8 * Params: * x = X position to place first glyph * y = Y position to place first glyph * utf8 = a string of text encoded in UTF-8 * utf8_Len = length of utf8 in bytes, or -1 if it is NUL-terminated * glyphs = pointer to array of glyphs to fill * clusters = pointer to array of cluster mapping information to fill, or NULL * clusterFlags = pointer to location to store cluster flags corresponding to the * output clusters, or NULL * Returns: CAIRO_STATUS_SUCCESS upon success, or an error status if the input values are wrong or if conversion failed. If the input values are correct but the conversion failed, the error status is also set on scaled_font. */ public cairo_status_t textToGlyphs(double x, double y, string utf8, int utf8_Len, out cairo_glyph_t[] glyphs, out cairo_text_cluster_t[] clusters, out cairo_text_cluster_flags_t clusterFlags) { // cairo_status_t cairo_scaled_font_text_to_glyphs (cairo_scaled_font_t *scaled_font, double x, double y, const char *utf8, int utf8_len, cairo_glyph_t **glyphs, int *num_glyphs, cairo_text_cluster_t **clusters, int *num_clusters, cairo_text_cluster_flags_t *cluster_flags); cairo_glyph_t* outglyphs = null; int numGlyphs; cairo_text_cluster_t* outclusters = null; int numClusters; auto p = cairo_scaled_font_text_to_glyphs(cairo_scaled_font, x, y, Str.toStringz(utf8), utf8_Len, &outglyphs, &numGlyphs, &outclusters, &numClusters, &clusterFlags); glyphs = outglyphs[0 .. numGlyphs]; clusters = outclusters[0 .. numClusters]; return p; } /** * Gets the font face that this scaled font uses. This might be the * font face passed to cairo_scaled_font_create(), but this does not * hold true for all possible cases. * Since 1.2 * Returns: The cairo_font_face_t with which scaled_font was created. */ public FontFace getFontFace() { // cairo_font_face_t * cairo_scaled_font_get_font_face (cairo_scaled_font_t *scaled_font); auto p = cairo_scaled_font_get_font_face(cairo_scaled_font); if(p is null) { return null; } return new FontFace(cast(cairo_font_face_t*) p); } /** * Stores the font options with which scaled_font was created into * options. * Since 1.2 * Params: * options = return value for the font options */ public void getFontOptions(FontOption options) { // void cairo_scaled_font_get_font_options (cairo_scaled_font_t *scaled_font, cairo_font_options_t *options); cairo_scaled_font_get_font_options(cairo_scaled_font, (options is null) ? null : options.getFontOptionStruct()); } /** * Stores the font matrix with which scaled_font was created into * matrix. * Since 1.2 * Params: * fontMatrix = return value for the matrix */ public void getFontMatrix(Matrix fontMatrix) { // void cairo_scaled_font_get_font_matrix (cairo_scaled_font_t *scaled_font, cairo_matrix_t *font_matrix); cairo_scaled_font_get_font_matrix(cairo_scaled_font, (fontMatrix is null) ? null : fontMatrix.getMatrixStruct()); } /** * Stores the CTM with which scaled_font was created into ctm. * Note that the translation offsets (x0, y0) of the CTM are ignored * by cairo_scaled_font_create(). So, the matrix this * function returns always has 0,0 as x0,y0. * Since 1.2 * Params: * ctm = return value for the CTM */ public void getCtm(Matrix ctm) { // void cairo_scaled_font_get_ctm (cairo_scaled_font_t *scaled_font, cairo_matrix_t *ctm); cairo_scaled_font_get_ctm(cairo_scaled_font, (ctm is null) ? null : ctm.getMatrixStruct()); } /** * Stores the scale matrix of scaled_font into matrix. * The scale matrix is product of the font matrix and the ctm * associated with the scaled font, and hence is the matrix mapping from * font space to device space. * Since 1.8 * Params: * scaleMatrix = return value for the matrix */ public void getScaleMatrix(Matrix scaleMatrix) { // void cairo_scaled_font_get_scale_matrix (cairo_scaled_font_t *scaled_font, cairo_matrix_t *scale_matrix); cairo_scaled_font_get_scale_matrix(cairo_scaled_font, (scaleMatrix is null) ? null : scaleMatrix.getMatrixStruct()); } /** * This function returns the type of the backend used to create * a scaled font. See cairo_font_type_t for available types. * However, this function never returns CAIRO_FONT_TYPE_TOY. * Since 1.2 * Returns: The type of scaled_font. */ public cairo_font_type_t getType() { // cairo_font_type_t cairo_scaled_font_get_type (cairo_scaled_font_t *scaled_font); return cairo_scaled_font_get_type(cairo_scaled_font); } /** * Returns the current reference count of scaled_font. * Since 1.4 * Returns: the current reference count of scaled_font. If the object is a nil object, 0 will be returned. */ public uint getReferenceCount() { // unsigned int cairo_scaled_font_get_reference_count (cairo_scaled_font_t *scaled_font); return cairo_scaled_font_get_reference_count(cairo_scaled_font); } /** * Attach user data to scaled_font. To remove user data from a surface, * call this function with the key that was used to set it and NULL * for data. * Since 1.4 * Params: * key = the address of a cairo_user_data_key_t to attach the user data to * userData = the user data to attach to the cairo_scaled_font_t * destroy = a cairo_destroy_func_t which will be called when the * cairo_t is destroyed or when new user data is attached using the * same key. * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data. */ public cairo_status_t setUserData(cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) { // cairo_status_t cairo_scaled_font_set_user_data (cairo_scaled_font_t *scaled_font, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy); return cairo_scaled_font_set_user_data(cairo_scaled_font, key, userData, destroy); } /** * Return user data previously attached to scaled_font using the * specified key. If no user data has been attached with the given * key this function returns NULL. * Since 1.4 * Params: * key = the address of the cairo_user_data_key_t the user data was * attached to * Returns: the user data previously attached or NULL. */ public void* getUserData(cairo_user_data_key_t* key) { // void * cairo_scaled_font_get_user_data (cairo_scaled_font_t *scaled_font, const cairo_user_data_key_t *key); return cairo_scaled_font_get_user_data(cairo_scaled_font, key); } } GtkD-3.7.5/generated/gtkd/cairo/Script.d000066400000000000000000000135611324604450400177640ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-Script-Surfaces.html * outPack = cairo * outFile = Script * strct = cairo_device_t * realStrct= * ctorStrct= * clss = Script * interf = * class Code: No * interface Code: No * template for: * extend = cairo_device_t * implements: * prefixes: * - cairo_script_ * omit structs: * omit prefixes: * - cairo_script_surface_ * omit code: * omit signals: * imports: * - glib.Str * - cairo.Script * - cairo.RecordingSurface * structWrap: * - cairo_device_t* -> Script * - cairo_surface_t* -> RecordingSurface * module aliases: * local aliases: * overrides: */ module cairo.Script; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import glib.Str; private import cairo.Script; private import cairo.RecordingSurface; private import cairo.Device; /** * The script surface provides the ability to render to a native * script that matches the cairo drawing model. The scripts can * be replayed using tools under the util/cairo-script directoriy, * or with cairo-perf-trace. */ public class Script : Device { /** the main Gtk struct */ protected cairo_device_t* cairo_device; /** Get the main Gtk struct */ public cairo_device_t* getScriptStruct() { return cairo_device; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)cairo_device; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_device_t* cairo_device) { super(cast(cairo_device_t*)cairo_device); this.cairo_device = cairo_device; } /** */ /** * Creates a output device for emitting the script, used when * creating the individual surfaces. * Since 1.12 * Params: * filename = the name (path) of the file to write the script to * Returns: a pointer to the newly created device. The caller owns the surface and should call cairo_device_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" device if an error such as out of memory occurs. You can use cairo_device_status() to check for this. */ public static Script create(string filename) { // cairo_device_t * cairo_script_create (const char *filename); auto p = cairo_script_create(Str.toStringz(filename)); if(p is null) { return null; } return new Script(cast(cairo_device_t*) p); } /** * Creates a output device for emitting the script, used when * creating the individual surfaces. * Since 1.12 * Params: * writeFunc = callback function passed the bytes written to the script * closure = user data to be passed to the callback * Returns: a pointer to the newly created device. The caller owns the surface and should call cairo_device_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" device if an error such as out of memory occurs. You can use cairo_device_status() to check for this. */ public static Script createForStream(cairo_write_func_t writeFunc, void* closure) { // cairo_device_t * cairo_script_create_for_stream (cairo_write_func_t write_func, void *closure); auto p = cairo_script_create_for_stream(writeFunc, closure); if(p is null) { return null; } return new Script(cast(cairo_device_t*) p); } /** * Converts the record operations in recording_surface into a script. * Since 1.12 * Params: * recordingSurface = the recording surface to replay * Returns: CAIRO_STATUS_SUCCESS on successful completion or an error code. */ public cairo_status_t fromRecordingSurface(RecordingSurface recordingSurface) { // cairo_status_t cairo_script_from_recording_surface (cairo_device_t *script, cairo_surface_t *recording_surface); return cairo_script_from_recording_surface(cairo_device, (recordingSurface is null) ? null : recordingSurface.getRecordingSurfaceStruct()); } /** * Queries the script for its current output mode. * Since 1.12 * Params: * script = The script (output device) to query * Returns: the current output mode of the script */ public cairo_script_mode_t getMode() { // cairo_script_mode_t cairo_script_get_mode (cairo_device_t *script); return cairo_script_get_mode(cairo_device); } /** * Change the output mode of the script * Since 1.12 * Params: * script = The script (output device) * mode = the new mode */ public void setMode(cairo_script_mode_t mode) { // void cairo_script_set_mode (cairo_device_t *script, cairo_script_mode_t mode); cairo_script_set_mode(cairo_device, mode); } /** * Emit a string verbatim into the script. * Since 1.12 * Params: * comment = the string to emit */ public void writeComment(string comment) { // void cairo_script_write_comment (cairo_device_t *script, const char *comment, int len); cairo_script_write_comment(cairo_device, cast(char*)comment.ptr, cast(int) comment.length); } } GtkD-3.7.5/generated/gtkd/cairo/ScriptSurface.d000066400000000000000000000107531324604450400212750ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = * outPack = cairo * outFile = ScriptSurface * strct = cairo_surface_t * realStrct= * ctorStrct= * clss = ScriptSurface * interf = * class Code: No * interface Code: No * template for: * extend = cairo_surface_t * implements: * prefixes: * - cairo_script_surface_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - cairo.Device * - cairo.Surface * structWrap: * - cairo_device_t* -> Device * - cairo_surface_t* -> Surface * module aliases: * local aliases: * overrides: */ module cairo.ScriptSurface; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import cairo.Device; private import cairo.Surface; private import cairo.Surface; /** * The script surface provides the ability to render to a native * script that matches the cairo drawing model. The scripts can * be replayed using tools under the util/cairo-script directoriy, * or with cairo-perf-trace. */ public class ScriptSurface : Surface { /** the main Gtk struct */ protected cairo_surface_t* cairo_surface; /** Get the main Gtk struct */ public cairo_surface_t* getScriptSurfaceStruct() { return cairo_surface; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)cairo_surface; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_surface_t* cairo_surface) { super(cast(cairo_surface_t*)cairo_surface); this.cairo_surface = cairo_surface; } /** */ /** * Create a new surface that will emit its rendering through script * Since 1.12 * Params: * script = the script (output device) * content = the content of the surface * width = width in pixels * height = height in pixels * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this. */ public static Surface create(Device script, cairo_content_t content, double width, double height) { // cairo_surface_t * cairo_script_surface_create (cairo_device_t *script, cairo_content_t content, double width, double height); auto p = cairo_script_surface_create((script is null) ? null : script.getDeviceStruct(), content, width, height); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Create a pxoy surface that will render to target and record * the operations to device. * Since 1.12 * Params: * script = the script (output device) * target = a target surface to wrap * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this. */ public static Surface createForTarget(Device script, Surface target) { // cairo_surface_t * cairo_script_surface_create_for_target (cairo_device_t *script, cairo_surface_t *target); auto p = cairo_script_surface_create_for_target((script is null) ? null : script.getDeviceStruct(), (target is null) ? null : target.getSurfaceStruct()); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } } GtkD-3.7.5/generated/gtkd/cairo/Status.d000066400000000000000000000073201324604450400177770ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-Error-handling.html * outPack = cairo * outFile = Status * strct = * realStrct= * ctorStrct= * clss = Status * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_status_t * - cairo_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - glib.Str * structWrap: * module aliases: * local aliases: * overrides: */ module cairo.Status; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import glib.Str; /** * Cairo uses a single status type to represent all kinds of errors. A status * value of CAIRO_STATUS_SUCCESS represents no error and has an integer value * of zero. All other status values represent an error. * * Cairo's error handling is designed to be easy to use and safe. All major * cairo objects retain an error status internally which * can be queried anytime by the users using cairo*_status() calls. In * the mean time, it is safe to call all cairo functions normally even if the * underlying object is in an error status. This means that no error handling * code is required before or after each individual cairo function call. */ public class Status { /** */ /** * Provides a human-readable description of a cairo_status_t. * Since 1.0 * Params: * status = a cairo status * Returns: a string representation of the status */ public static string oString(cairo_status_t status) { // const char * cairo_status_to_string (cairo_status_t status); return Str.toString(cairo_status_to_string(status)); } /** * Resets all static data within cairo to its original state, * (ie. identical to the state at the time of program invocation). For * example, all caches within cairo will be flushed empty. * This function is intended to be useful when using memory-checking * tools such as valgrind. When valgrind's memcheck analyzes a * cairo-using program without a call to cairo_debug_reset_static_data(), * it will report all data reachable via cairo's static objects as * "still reachable". Calling cairo_debug_reset_static_data() just prior * to program termination will make it easier to get squeaky clean * reports from valgrind. * WARNING: It is only safe to call this function when there are no * active cairo objects remaining, (ie. the appropriate destroy * functions have been called as necessary). If there are active cairo * objects, this call is likely to cause a crash, (eg. an assertion * failure due to a hash table being destroyed when non-empty). * Since 1.0 */ public static void debugResetStaticData() { // void cairo_debug_reset_static_data (void); cairo_debug_reset_static_data(); } } GtkD-3.7.5/generated/gtkd/cairo/Surface.d000066400000000000000000000625641324604450400201170ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-cairo-surface-t.html * outPack = cairo * outFile = Surface * strct = cairo_surface_t * realStrct= * ctorStrct= * clss = Surface * interf = * class Code: Yes * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_surface_ * omit structs: * omit prefixes: * omit code: * - cairo_surface_get_mime_data * omit signals: * imports: * - glib.Str * - cairo.Device * - cairo.FontOption * - gdk.Window * - gtkc.gdk * structWrap: * - cairo_device_t* -> Device * - cairo_font_options_t* -> FontOption * - cairo_surface_t* -> Surface * module aliases: * local aliases: * overrides: */ module cairo.Surface; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import glib.Str; private import cairo.Device; private import cairo.FontOption; private import gdk.Window; private import gdk.c.functions; /** * cairo_surface_t is the abstract type representing all different drawing * targets that cairo can render to. The actual drawings are * performed using a cairo context. * * A cairo surface is created by using backend-specific * constructors, typically of the form * cairo_backend_surface_create(). * * Most surface types allow accessing the surface without using Cairo * functions. If you do this, keep in mind that it is mandatory that you call * cairo_surface_flush() before reading from or writing to the surface and that * you must use cairo_surface_mark_dirty() after modifying it. * * $(DDOC_COMMENT example) * * Note that for other surface types it might be necessary to acquire the * surface's device first. See cairo_device_acquire() for a discussion of * devices. */ public class Surface { /** the main Gtk struct */ protected cairo_surface_t* cairo_surface; /** Get the main Gtk struct */ public cairo_surface_t* getSurfaceStruct() { return cairo_surface; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo_surface; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_surface_t* cairo_surface) { this.cairo_surface = cairo_surface; } this(Window window, cairo_content_t content, int width,int height) { this(gdk_window_create_similar_surface(window.getWindowStruct(), content, width, height)); } /** * Return mime data previously attached to surface using the * specified mime type. If no data has been attached with the given * mime type, data is set NULL. * Since 1.10 * Params: * mimeType = the mime type of the image data * data = the image data to attached to the surface */ public void getMimeData(string mimeType, out ubyte[] data) { // void cairo_surface_get_mime_data (cairo_surface_t *surface, const char *mime_type, unsigned char **data, unsigned long *length); uchar* outdata = null; ulong length; cairo_surface_get_mime_data(cairo_surface, Str.toStringz(mimeType), &outdata, &length); data = outdata[0 .. cast(size_t)length]; } /** */ /** * Create a new surface that is as compatible as possible with an * existing surface. For example the new surface will have the same * fallback resolution and font options as other. Generally, the new * surface will also use the same backend as other, unless that is * not possible for some reason. The type of the returned surface may * be examined with cairo_surface_get_type(). * Initially the surface contents are all 0 (transparent if contents * have transparency, black otherwise.) * Use cairo_surface_create_similar_image() if you need an image surface * which can be painted quickly to the target surface. * Since 1.0 * Params: * content = the content for the new surface * width = width of the new surface, (in device-space units) * height = height of the new surface (in device-space units) * Returns: a pointer to the newly allocated surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if other is already in an error state or any other error occurs. */ public Surface createSimilar(cairo_content_t content, int width, int height) { // cairo_surface_t * cairo_surface_create_similar (cairo_surface_t *other, cairo_content_t content, int width, int height); auto p = cairo_surface_create_similar(cairo_surface, content, width, height); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Create a new image surface that is as compatible as possible for uploading * to and the use in conjunction with an existing surface. However, this surface * can still be used like any normal image surface. * Initially the surface contents are all 0 (transparent if contents * have transparency, black otherwise.) * Use cairo_surface_create_similar() if you don't need an image surface. * Since 1.12 * Params: * format = the format for the new surface * width = width of the new surface, (in device-space units) * height = height of the new surface (in device-space units) * Returns: a pointer to the newly allocated image surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if other is already in an error state or any other error occurs. */ public Surface createSimilarImage(cairo_format_t format, int width, int height) { // cairo_surface_t * cairo_surface_create_similar_image (cairo_surface_t *other, cairo_format_t format, int width, int height); auto p = cairo_surface_create_similar_image(cairo_surface, format, width, height); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Create a new surface that is a rectangle within the target surface. * All operations drawn to this surface are then clipped and translated * onto the target surface. Nothing drawn via this sub-surface outside of * its bounds is drawn onto the target surface, making this a useful method * for passing constrained child surfaces to library routines that draw * directly onto the parent surface, i.e. with no further backend allocations, * double buffering or copies. * Note * The semantics of subsurfaces have not been finalized yet * unless the rectangle is in full device units, is contained within * the extents of the target surface, and the target or subsurface's * device transforms are not changed. * Since 1.10 * Params: * x = the x-origin of the sub-surface from the top-left of the target surface (in device-space units) * y = the y-origin of the sub-surface from the top-left of the target surface (in device-space units) * width = width of the sub-surface (in device-space units) * height = height of the sub-surface (in device-space units) * Returns: a pointer to the newly allocated surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if other is already in an error state or any other error occurs. */ public Surface createForRectangle(double x, double y, double width, double height) { // cairo_surface_t * cairo_surface_create_for_rectangle (cairo_surface_t *target, double x, double y, double width, double height); auto p = cairo_surface_create_for_rectangle(cairo_surface, x, y, width, height); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Increases the reference count on surface by one. This prevents * surface from being destroyed until a matching call to * cairo_surface_destroy() is made. * The number of references to a cairo_surface_t can be get using * cairo_surface_get_reference_count(). * Since 1.0 * Returns: the referenced cairo_surface_t. */ public Surface reference() { // cairo_surface_t * cairo_surface_reference (cairo_surface_t *surface); auto p = cairo_surface_reference(cairo_surface); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Decreases the reference count on surface by one. If the result is * zero, then surface and all associated resources are freed. See * cairo_surface_reference(). * Since 1.0 */ public void destroy() { // void cairo_surface_destroy (cairo_surface_t *surface); cairo_surface_destroy(cairo_surface); } /** * Checks whether an error has previously occurred for this * surface. * Since 1.0 * Returns: CAIRO_STATUS_SUCCESS, CAIRO_STATUS_NULL_POINTER, CAIRO_STATUS_NO_MEMORY, CAIRO_STATUS_READ_ERROR, CAIRO_STATUS_INVALID_CONTENT, CAIRO_STATUS_INVALID_FORMAT, or CAIRO_STATUS_INVALID_VISUAL. */ public cairo_status_t status() { // cairo_status_t cairo_surface_status (cairo_surface_t *surface); return cairo_surface_status(cairo_surface); } /** * This function finishes the surface and drops all references to * external resources. For example, for the Xlib backend it means * that cairo will no longer access the drawable, which can be freed. * After calling cairo_surface_finish() the only valid operations on a * surface are getting and setting user, referencing and * destroying, and flushing and finishing it. * Further drawing to the surface will not affect the * surface but will instead trigger a CAIRO_STATUS_SURFACE_FINISHED * error. * When the last call to cairo_surface_destroy() decreases the * reference count to zero, cairo will call cairo_surface_finish() if * it hasn't been called already, before freeing the resources * associated with the surface. * Since 1.0 */ public void finish() { // void cairo_surface_finish (cairo_surface_t *surface); cairo_surface_finish(cairo_surface); } /** * Do any pending drawing for the surface and also restore any * temporary modifications cairo has made to the surface's * state. This function must be called before switching from * drawing on the surface with cairo to drawing on it directly * with native APIs. If the surface doesn't support direct access, * then this function does nothing. * Since 1.0 */ public void flush() { // void cairo_surface_flush (cairo_surface_t *surface); cairo_surface_flush(cairo_surface); } /** * This function returns the device for a surface. * See cairo_device_t. * Since 1.10 * Returns: The device for surface or NULL if the surface does not have an associated device. */ public Device getDevice() { // cairo_device_t * cairo_surface_get_device (cairo_surface_t *surface); auto p = cairo_surface_get_device(cairo_surface); if(p is null) { return null; } return new Device(cast(cairo_device_t*) p); } /** * Retrieves the default font rendering options for the surface. * This allows display surfaces to report the correct subpixel order * for rendering on them, print surfaces to disable hinting of * metrics and so forth. The result can then be used with * cairo_scaled_font_create(). * Since 1.0 * Params: * options = a cairo_font_options_t object into which to store * the retrieved options. All existing values are overwritten */ public void getFontOptions(FontOption options) { // void cairo_surface_get_font_options (cairo_surface_t *surface, cairo_font_options_t *options); cairo_surface_get_font_options(cairo_surface, (options is null) ? null : options.getFontOptionStruct()); } /** * This function returns the content type of surface which indicates * whether the surface contains color and/or alpha information. See * cairo_content_t. * Since 1.2 * Returns: The content type of surface. */ public cairo_content_t getContent() { // cairo_content_t cairo_surface_get_content (cairo_surface_t *surface); return cairo_surface_get_content(cairo_surface); } /** * Tells cairo that drawing has been done to surface using means other * than cairo, and that cairo should reread any cached areas. Note * that you must call cairo_surface_flush() before doing such drawing. * Since 1.0 */ public void markDirty() { // void cairo_surface_mark_dirty (cairo_surface_t *surface); cairo_surface_mark_dirty(cairo_surface); } /** * Like cairo_surface_mark_dirty(), but drawing has been done only to * the specified rectangle, so that cairo can retain cached contents * for other parts of the surface. * Any cached clip set on the surface will be reset by this function, * to make sure that future cairo calls have the clip set that they * expect. * Since 1.0 * Params: * x = X coordinate of dirty rectangle * y = Y coordinate of dirty rectangle * width = width of dirty rectangle * height = height of dirty rectangle */ public void markDirtyRectangle(int x, int y, int width, int height) { // void cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface, int x, int y, int width, int height); cairo_surface_mark_dirty_rectangle(cairo_surface, x, y, width, height); } /** * Sets an offset that is added to the device coordinates determined * by the CTM when drawing to surface. One use case for this function * is when we want to create a cairo_surface_t that redirects drawing * for a portion of an onscreen surface to an offscreen surface in a * way that is completely invisible to the user of the cairo * API. Setting a transformation via cairo_translate() isn't * sufficient to do this, since functions like * cairo_device_to_user() will expose the hidden offset. * Note that the offset affects drawing to the surface as well as * using the surface in a source pattern. * Since 1.0 * Params: * xOffset = the offset in the X direction, in device units * yOffset = the offset in the Y direction, in device units */ public void setDeviceOffset(double xOffset, double yOffset) { // void cairo_surface_set_device_offset (cairo_surface_t *surface, double x_offset, double y_offset); cairo_surface_set_device_offset(cairo_surface, xOffset, yOffset); } /** * This function returns the previous device offset set by * cairo_surface_set_device_offset(). * Since 1.2 * Params: * xOffset = the offset in the X direction, in device units * yOffset = the offset in the Y direction, in device units */ public void getDeviceOffset(out double xOffset, out double yOffset) { // void cairo_surface_get_device_offset (cairo_surface_t *surface, double *x_offset, double *y_offset); cairo_surface_get_device_offset(cairo_surface, &xOffset, &yOffset); } /** * Set the horizontal and vertical resolution for image fallbacks. * When certain operations aren't supported natively by a backend, * cairo will fallback by rendering operations to an image and then * overlaying that image onto the output. For backends that are * natively vector-oriented, this function can be used to set the * resolution used for these image fallbacks, (larger values will * result in more detailed images, but also larger file sizes). * Some examples of natively vector-oriented backends are the ps, pdf, * and svg backends. * For backends that are natively raster-oriented, image fallbacks are * still possible, but they are always performed at the native * device resolution. So this function has no effect on those * backends. * Note: The fallback resolution only takes effect at the time of * completing a page (with cairo_show_page() or cairo_copy_page()) so * there is currently no way to have more than one fallback resolution * in effect on a single page. * The default fallback resoultion is 300 pixels per inch in both * dimensions. * Since 1.2 * Params: * xPixelsPerInch = horizontal setting for pixels per inch * yPixelsPerInch = vertical setting for pixels per inch */ public void setFallbackResolution(double xPixelsPerInch, double yPixelsPerInch) { // void cairo_surface_set_fallback_resolution (cairo_surface_t *surface, double x_pixels_per_inch, double y_pixels_per_inch); cairo_surface_set_fallback_resolution(cairo_surface, xPixelsPerInch, yPixelsPerInch); } /** * This function returns the previous fallback resolution set by * cairo_surface_set_fallback_resolution(), or default fallback * resolution if never set. * Since 1.8 * Params: * xPixelsPerInch = horizontal pixels per inch * yPixelsPerInch = vertical pixels per inch */ public void getFallbackResolution(out double xPixelsPerInch, out double yPixelsPerInch) { // void cairo_surface_get_fallback_resolution (cairo_surface_t *surface, double *x_pixels_per_inch, double *y_pixels_per_inch); cairo_surface_get_fallback_resolution(cairo_surface, &xPixelsPerInch, &yPixelsPerInch); } /** * This function returns the type of the backend used to create * a surface. See cairo_surface_type_t for available types. * Since 1.2 * Params: * surface = a cairo_surface_t * Returns: The type of surface. */ public cairo_surface_type_t getType() { // cairo_surface_type_t cairo_surface_get_type (cairo_surface_t *surface); return cairo_surface_get_type(cairo_surface); } /** * Returns the current reference count of surface. * Since 1.4 * Returns: the current reference count of surface. If the object is a nil object, 0 will be returned. */ public uint getReferenceCount() { // unsigned int cairo_surface_get_reference_count (cairo_surface_t *surface); return cairo_surface_get_reference_count(cairo_surface); } /** * Attach user data to surface. To remove user data from a surface, * call this function with the key that was used to set it and NULL * for data. * Since 1.0 * Params: * key = the address of a cairo_user_data_key_t to attach the user data to * userData = the user data to attach to the surface * destroy = a cairo_destroy_func_t which will be called when the * surface is destroyed or when new user data is attached using the * same key. * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data. */ public cairo_status_t setUserData(cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) { // cairo_status_t cairo_surface_set_user_data (cairo_surface_t *surface, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy); return cairo_surface_set_user_data(cairo_surface, key, userData, destroy); } /** * Return user data previously attached to surface using the specified * key. If no user data has been attached with the given key this * function returns NULL. * Since 1.0 * Params: * key = the address of the cairo_user_data_key_t the user data was * attached to * Returns: the user data previously attached or NULL. */ public void* getUserData(cairo_user_data_key_t* key) { // void * cairo_surface_get_user_data (cairo_surface_t *surface, const cairo_user_data_key_t *key); return cairo_surface_get_user_data(cairo_surface, key); } /** * Emits the current page for backends that support multiple pages, * but doesn't clear it, so that the contents of the current page will * be retained for the next page. Use cairo_surface_show_page() if you * want to get an empty page after the emission. * There is a convenience function for this that takes a cairo_t, * namely cairo_copy_page(). * Since 1.6 */ public void copyPage() { // void cairo_surface_copy_page (cairo_surface_t *surface); cairo_surface_copy_page(cairo_surface); } /** * Emits and clears the current page for backends that support multiple * pages. Use cairo_surface_copy_page() if you don't want to clear the page. * There is a convenience function for this that takes a cairo_t, * namely cairo_show_page(). * Since 1.6 */ public void showPage() { // void cairo_surface_show_page (cairo_surface_t *surface); cairo_surface_show_page(cairo_surface); } /** * Returns whether the surface supports * sophisticated cairo_show_text_glyphs() operations. That is, * whether it actually uses the provided text and cluster data * to a cairo_show_text_glyphs() call. * Note: Even if this function returns FALSE, a * cairo_show_text_glyphs() operation targeted at surface will * still succeed. It just will * act like a cairo_show_glyphs() operation. Users can use this * function to avoid computing UTF-8 text and cluster mapping if the * target surface does not use it. * Since 1.8 * Returns: TRUE if surface supports cairo_show_text_glyphs(), FALSE otherwise */ public cairo_bool_t hasShowTextGlyphs() { // cairo_bool_t cairo_surface_has_show_text_glyphs (cairo_surface_t *surface); return cairo_surface_has_show_text_glyphs(cairo_surface); } /** * Attach an image in the format mime_type to surface. To remove * the data from a surface, call this function with same mime type * and NULL for data. * The attached image (or filename) data can later be used by backends * which support it (currently: PDF, PS, SVG and Win32 Printing * surfaces) to emit this data instead of making a snapshot of the * surface. This approach tends to be faster and requires less * memory and disk space. * The recognized MIME types are the following: CAIRO_MIME_TYPE_JPEG, * CAIRO_MIME_TYPE_PNG, CAIRO_MIME_TYPE_JP2, CAIRO_MIME_TYPE_URI. * See corresponding backend surface docs for details about which MIME * types it can handle. Caution: the associated MIME data will be * discarded if you draw on the surface afterwards. Use this function * with care. * Since 1.10 * Params: * mimeType = the MIME type of the image data * data = the image data to attach to the surface * destroy = a cairo_destroy_func_t which will be called when the * surface is destroyed or when new image data is attached using the * same mime type. * closure = the data to be passed to the destroy notifier * Returns: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data. */ public cairo_status_t setMimeData(string mimeType, ubyte[] data, cairo_destroy_func_t destroy, void* closure) { // cairo_status_t cairo_surface_set_mime_data (cairo_surface_t *surface, const char *mime_type, const unsigned char *data, unsigned long length, cairo_destroy_func_t destroy, void *closure); return cairo_surface_set_mime_data(cairo_surface, Str.toStringz(mimeType), data.ptr, cast(int) data.length, destroy, closure); } /** * Return whether surface supports mime_type. * Since 1.12 * Params: * mimeType = the mime type * Returns: TRUE if surface supports mime_type, FALSE otherwise */ public cairo_bool_t supportsMimeType(string mimeType) { // cairo_bool_t cairo_surface_supports_mime_type (cairo_surface_t *surface, const char *mime_type); return cairo_surface_supports_mime_type(cairo_surface, Str.toStringz(mimeType)); } /** * Returns an image surface that is the most efficient mechanism for * modifying the backing store of the target surface. The region retrieved * may be limited to the extents or NULL for the whole surface * Note, the use of the original surface as a target or source whilst it is * mapped is undefined. The result of mapping the surface multiple times is * undefined. Calling cairo_surface_destroy() or cairo_surface_finish() on the * resulting image surface results in undefined behavior. * Since 1.12 * Params: * extents = limit the extraction to an rectangular region * Returns: a pointer to the newly allocated image surface. The caller must use cairo_surface_unmap_image() to destroy this image surface. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if other is already in an error state or any other error occurs. */ public Surface mapToImage(ref cairo_rectangle_int_t extents) { // cairo_surface_t * cairo_surface_map_to_image (cairo_surface_t *surface, const cairo_rectangle_int_t *extents); auto p = cairo_surface_map_to_image(cairo_surface, &extents); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Unmaps the image surface as returned from #cairo_surface_map_to_image(). * The content of the image will be uploaded to the target surface. * Afterwards, the image is destroyed. * Using an image surface which wasn't returned by cairo_surface_map_to_image() * results in undefined behavior. * Since 1.12 * Params: * image = the currently mapped image */ public void unmapImage(Surface image) { // void cairo_surface_unmap_image (cairo_surface_t *surface, cairo_surface_t *image); cairo_surface_unmap_image(cairo_surface, (image is null) ? null : image.getSurfaceStruct()); } } GtkD-3.7.5/generated/gtkd/cairo/SvgSurface.d000066400000000000000000000154341324604450400205710ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-SVG-Surfaces.html * outPack = cairo * outFile = SvgSurface * strct = cairo_surface_t * realStrct= * ctorStrct= * clss = SvgSurface * interf = * class Code: No * interface Code: No * template for: * extend = cairo_surface_t * implements: * prefixes: * - cairo_svg_surface_ * - cairo_svg_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - glib.Str * structWrap: * - cairo_surface_t* -> SvgSurface * module aliases: * local aliases: * overrides: */ module cairo.SvgSurface; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import glib.Str; private import cairo.Surface; /** * The SVG surface is used to render cairo graphics to * SVG files and is a multi-page vector surface backend. */ public class SvgSurface : Surface { /** the main Gtk struct */ protected cairo_surface_t* cairo_surface; /** Get the main Gtk struct */ public cairo_surface_t* getSvgSurfaceStruct() { return cairo_surface; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)cairo_surface; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_surface_t* cairo_surface) { super(cast(cairo_surface_t*)cairo_surface); this.cairo_surface = cairo_surface; } /** */ /** * Creates a SVG surface of the specified size in points to be written * to filename. * The SVG surface backend recognizes the following MIME types for the * data attached to a surface (see cairo_surface_set_mime_data()) when * Since 1.2 * Params: * filename = a filename for the SVG output (must be writable), NULL may be * used to specify no output. This will generate a SVG surface that * may be queried and used as a source, without generating a * temporary file. * widthInPoints = width of the surface, in points (1 point == 1/72.0 inch) * heightInPoints = height of the surface, in points (1 point == 1/72.0 inch) * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this. */ public static SvgSurface create(string filename, double widthInPoints, double heightInPoints) { // cairo_surface_t * cairo_svg_surface_create (const char *filename, double width_in_points, double height_in_points); auto p = cairo_svg_surface_create(Str.toStringz(filename), widthInPoints, heightInPoints); if(p is null) { return null; } return new SvgSurface(cast(cairo_surface_t*) p); } /** * Creates a SVG surface of the specified size in points to be written * incrementally to the stream represented by write_func and closure. * Since 1.2 * Params: * writeFunc = a cairo_write_func_t to accept the output data, may be NULL * to indicate a no-op write_func. With a no-op write_func, * the surface may be queried or used as a source without * generating any temporary files. * closure = the closure argument for write_func * widthInPoints = width of the surface, in points (1 point == 1/72.0 inch) * heightInPoints = height of the surface, in points (1 point == 1/72.0 inch) * Returns: a pointer to the newly created surface. The caller owns the surface and should call cairo_surface_destroy() when done with it. This function always returns a valid pointer, but it will return a pointer to a "nil" surface if an error such as out of memory occurs. You can use cairo_surface_status() to check for this. */ public static SvgSurface createForStream(cairo_write_func_t writeFunc, void* closure, double widthInPoints, double heightInPoints) { // cairo_surface_t * cairo_svg_surface_create_for_stream (cairo_write_func_t write_func, void *closure, double width_in_points, double height_in_points); auto p = cairo_svg_surface_create_for_stream(writeFunc, closure, widthInPoints, heightInPoints); if(p is null) { return null; } return new SvgSurface(cast(cairo_surface_t*) p); } /** * Restricts the generated SVG file to version. See cairo_svg_get_versions() * for a list of available version values that can be used here. * This function should only be called before any drawing operations * have been performed on the given surface. The simplest way to do * this is to call this function immediately after creating the * surface. * Since 1.2 * Params: * version = SVG version */ public void restrictToVersion(cairo_svg_version_t versio) { // void cairo_svg_surface_restrict_to_version (cairo_surface_t *surface, cairo_svg_version_t version); cairo_svg_surface_restrict_to_version(cairo_surface, versio); } /** * Used to retrieve the list of supported versions. See * cairo_svg_surface_restrict_to_version(). * Since 1.2 * Params: * versions = supported version list */ public static void getVersions(out cairo_svg_version_t[] versions) { // void cairo_svg_get_versions (cairo_svg_version_t const **versions, int *num_versions); cairo_svg_version_t* outversions = null; int numVersions; cairo_svg_get_versions(&outversions, &numVersions); versions = outversions[0 .. numVersions]; } /** * Get the string representation of the given version id. This function * will return NULL if version isn't valid. See cairo_svg_get_versions() * for a way to get the list of valid version ids. * Since 1.2 * Params: * version = a version id * Returns: the string associated to given version. */ public static string versionToString(cairo_svg_version_t versio) { // const char * cairo_svg_version_to_string (cairo_svg_version_t version); return Str.toString(cairo_svg_version_to_string(versio)); } } GtkD-3.7.5/generated/gtkd/cairo/Types.d000066400000000000000000000030021324604450400176110ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-Types.html * outPack = cairo * outFile = Types * strct = * realStrct= * ctorStrct= * clss = * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * omit structs: * omit prefixes: * - cairo_bool_t * omit code: * omit signals: * imports: * structWrap: * module aliases: * local aliases: * overrides: */ module cairo.Types; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; /** */ GtkD-3.7.5/generated/gtkd/cairo/UserFontFace.d000066400000000000000000000201411324604450400210340ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-User-Fonts.html * outPack = cairo * outFile = UserFontFace * strct = cairo_font_face_t * realStrct= * ctorStrct= * clss = UserFontFace * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * - cairo_user_font_face_ * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * structWrap: * - cairo_font_face_t* -> UserFontFace * module aliases: * local aliases: * overrides: */ module cairo.UserFontFace; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; /** * The user-font feature allows the cairo user to provide drawings for glyphs * in a font. This is most useful in implementing fonts in non-standard * formats, like SVG fonts and Flash fonts, but can also be used by games and * other application to draw "funky" fonts. */ public class UserFontFace { /** the main Gtk struct */ protected cairo_font_face_t* cairo_font_face; /** Get the main Gtk struct */ public cairo_font_face_t* getUserFontFaceStruct() { return cairo_font_face; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)cairo_font_face; } /** * Sets our main struct and passes it to the parent class */ public this (cairo_font_face_t* cairo_font_face) { this.cairo_font_face = cairo_font_face; } /** */ /** * Creates a new user font-face. * Use the setter functions to associate callbacks with the returned * user font. The only mandatory callback is render_glyph. * After the font-face is created, the user can attach arbitrary data * (the actual font data) to it using cairo_font_face_set_user_data() * and access it from the user-font callbacks by using * cairo_scaled_font_get_font_face() followed by * cairo_font_face_get_user_data(). * Since 1.8 * Returns: a newly created cairo_font_face_t. Free with cairo_font_face_destroy() when you are done using it. */ public static UserFontFace create() { // cairo_font_face_t * cairo_user_font_face_create (void); auto p = cairo_user_font_face_create(); if(p is null) { return null; } return new UserFontFace(cast(cairo_font_face_t*) p); } /** * Sets the scaled-font initialization function of a user-font. * See cairo_user_scaled_font_init_func_t for details of how the callback * works. * The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE * error will occur. A user font-face is immutable as soon as a scaled-font * is created from it. * Since 1.8 * Params: * initFunc = The init callback, or NULL */ public void setInitFunc(cairo_user_scaled_font_init_func_t initFunc) { // void cairo_user_font_face_set_init_func (cairo_font_face_t *font_face, cairo_user_scaled_font_init_func_t init_func); cairo_user_font_face_set_init_func(cairo_font_face, initFunc); } /** * Gets the scaled-font initialization function of a user-font. * Since 1.8 * Returns: The init callback of font_face or NULL if none set or an error has occurred. */ public cairo_user_scaled_font_init_func_t getInitFunc() { // cairo_user_scaled_font_init_func_t cairo_user_font_face_get_init_func (cairo_font_face_t *font_face); return cairo_user_font_face_get_init_func(cairo_font_face); } /** * Sets the glyph rendering function of a user-font. * See cairo_user_scaled_font_render_glyph_func_t for details of how the callback * works. * The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE * error will occur. A user font-face is immutable as soon as a scaled-font * is created from it. * The render_glyph callback is the only mandatory callback of a user-font. * If the callback is NULL and a glyph is tried to be rendered using * font_face, a CAIRO_STATUS_USER_FONT_ERROR will occur. * Since 1.8 * Params: * renderGlyphFunc = The render_glyph callback, or NULL */ public void setRenderGlyphFunc(cairo_user_scaled_font_render_glyph_func_t renderGlyphFunc) { // void cairo_user_font_face_set_render_glyph_func (cairo_font_face_t *font_face, cairo_user_scaled_font_render_glyph_func_t render_glyph_func); cairo_user_font_face_set_render_glyph_func(cairo_font_face, renderGlyphFunc); } /** * Gets the glyph rendering function of a user-font. * Since 1.8 * Returns: The render_glyph callback of font_face or NULL if none set or an error has occurred. */ public cairo_user_scaled_font_render_glyph_func_t getRenderGlyphFunc() { // cairo_user_scaled_font_render_glyph_func_t cairo_user_font_face_get_render_glyph_func (cairo_font_face_t *font_face); return cairo_user_font_face_get_render_glyph_func(cairo_font_face); } /** * Sets the unicode-to-glyph conversion function of a user-font. * See cairo_user_scaled_font_unicode_to_glyph_func_t for details of how the callback * works. * The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE * error will occur. A user font-face is immutable as soon as a scaled-font * is created from it. * Since 1.8 * Params: * unicodeToGlyphFunc = The unicode_to_glyph callback, or NULL */ public void setUnicodeToGlyphFunc(cairo_user_scaled_font_unicode_to_glyph_func_t unicodeToGlyphFunc) { // void cairo_user_font_face_set_unicode_to_glyph_func (cairo_font_face_t *font_face, cairo_user_scaled_font_unicode_to_glyph_func_t unicode_to_glyph_func); cairo_user_font_face_set_unicode_to_glyph_func(cairo_font_face, unicodeToGlyphFunc); } /** * Gets the unicode-to-glyph conversion function of a user-font. * Since 1.8 * Returns: The unicode_to_glyph callback of font_face or NULL if none set or an error occurred. */ public cairo_user_scaled_font_unicode_to_glyph_func_t getUnicodeToGlyphFunc() { // cairo_user_scaled_font_unicode_to_glyph_func_t cairo_user_font_face_get_unicode_to_glyph_func (cairo_font_face_t *font_face); return cairo_user_font_face_get_unicode_to_glyph_func(cairo_font_face); } /** * Sets th text-to-glyphs conversion function of a user-font. * See cairo_user_scaled_font_text_to_glyphs_func_t for details of how the callback * works. * The font-face should not be immutable or a CAIRO_STATUS_USER_FONT_IMMUTABLE * error will occur. A user font-face is immutable as soon as a scaled-font * is created from it. * Since 1.8 * Params: * textToGlyphsFunc = The text_to_glyphs callback, or NULL */ public void setTextToGlyphsFunc(cairo_user_scaled_font_text_to_glyphs_func_t textToGlyphsFunc) { // void cairo_user_font_face_set_text_to_glyphs_func (cairo_font_face_t *font_face, cairo_user_scaled_font_text_to_glyphs_func_t text_to_glyphs_func); cairo_user_font_face_set_text_to_glyphs_func(cairo_font_face, textToGlyphsFunc); } /** * Gets the text-to-glyphs conversion function of a user-font. * Since 1.8 * Returns: The text_to_glyphs callback of font_face or NULL if none set or an error occurred. */ public cairo_user_scaled_font_text_to_glyphs_func_t getTextToGlyphsFunc() { // cairo_user_scaled_font_text_to_glyphs_func_t cairo_user_font_face_get_text_to_glyphs_func (cairo_font_face_t *font_face); return cairo_user_font_face_get_text_to_glyphs_func(cairo_font_face); } } GtkD-3.7.5/generated/gtkd/cairo/Version.d000066400000000000000000000105211324604450400201360ustar00rootroot00000000000000/* * 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 /* * Conversion parameters: * inFile = cairo-Version-Information.html * outPack = cairo * outFile = Version * strct = * realStrct= * ctorStrct= * clss = Version * interf = * class Code: No * interface Code: No * template for: * extend = * implements: * prefixes: * omit structs: * omit prefixes: * omit code: * omit signals: * imports: * - glib.Str * structWrap: * module aliases: * local aliases: * overrides: */ module cairo.Version; public import cairo.c.types; private import cairo.c.functions; private import glib.ConstructionException; private import glib.Str; /** * Cairo has a three-part version number scheme. In this scheme, we use * even vs. odd numbers to distinguish fixed points in the software * vs. in-progress development, (such as from git instead of a tar file, * or as a "snapshot" tar file as opposed to a "release" tar file). * * $(DDOC_COMMENT example) * * Here are a few examples of versions that one might see. * * $(DDOC_COMMENT example) * * Compatibility * * The API/ABI compatibility guarantees for various versions are as * follows. First, let's assume some cairo-using application code that is * successfully using the API/ABI "from" one version of cairo. Then let's * ask the question whether this same code can be moved "to" the API/ABI * of another version of cairo. * * Moving from a release to any later version (release, snapshot, * development) is always guaranteed to provide compatibility. * * Moving from a snapshot to any later version is not guaranteed to * provide compatibility, since snapshots may introduce new API that ends * up being removed before the next release. * * Moving from an in-development version (odd micro component) to any * later version is not guaranteed to provide compatibility. In fact, * there's not even a guarantee that the code will even continue to work * with the same in-development version number. This is because these * numbers don't correspond to any fixed state of the software, but * rather the many states between snapshots and releases. * *
    * * Examining the version * * Cairo provides the ability to examine the version at either * compile-time or run-time and in both a human-readable form as well as * an encoded form suitable for direct comparison. Cairo also provides the * macro CAIRO_VERSION_ENCODE() to perform the encoding. * * $(DDOC_COMMENT example) * * For example, checking that the cairo version is greater than or equal * to 1.0.0 could be achieved at compile-time or run-time as follows: * * $(DDOC_COMMENT example) */ public class Version { /** */ /** * Returns the version of the cairo library encoded in a single * integer as per CAIRO_VERSION_ENCODE. The encoding ensures that * later versions compare greater than earlier versions. * A run-time comparison to check that cairo's version is greater than * Returns: the encoded version. */ public static int cairoVersion() { // int cairo_version (void); return cairo_version(); } /** * Returns the version of the cairo library as a human-readable string * of the form "X.Y.Z". * See also cairo_version() as well as the compile-time equivalents * CAIRO_VERSION_STRING and CAIRO_VERSION. * Returns: a string containing the version. */ public static string cairoVersionString() { // const char * cairo_version_string (void); return Str.toString(cairo_version_string()); } } GtkD-3.7.5/generated/gtkd/cairo/c/000077500000000000000000000000001324604450400165675ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/cairo/c/functions.d000066400000000000000000002432051324604450400207520ustar00rootroot00000000000000/* * 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 cairo.c.functions; private import std.stdio; private import cairo.c.types; private import gtkd.Loader; version (Windows) static immutable LIBRARY_CAIRO = ["libcairo-2.dll"]; else version (OSX) static immutable LIBRARY_CAIRO = ["libcairo.dylib"]; else static immutable LIBRARY_CAIRO = ["libcairo.so.2"]; shared static this() { // cairo.Context Linker.link(cairo_create, "cairo_create", LIBRARY_CAIRO); Linker.link(cairo_reference, "cairo_reference", LIBRARY_CAIRO); Linker.link(cairo_destroy, "cairo_destroy", LIBRARY_CAIRO); Linker.link(cairo_status, "cairo_status", LIBRARY_CAIRO); Linker.link(cairo_save, "cairo_save", LIBRARY_CAIRO); Linker.link(cairo_restore, "cairo_restore", LIBRARY_CAIRO); Linker.link(cairo_get_target, "cairo_get_target", LIBRARY_CAIRO); Linker.link(cairo_push_group, "cairo_push_group", LIBRARY_CAIRO); Linker.link(cairo_push_group_with_content, "cairo_push_group_with_content", LIBRARY_CAIRO); Linker.link(cairo_pop_group, "cairo_pop_group", LIBRARY_CAIRO); Linker.link(cairo_pop_group_to_source, "cairo_pop_group_to_source", LIBRARY_CAIRO); Linker.link(cairo_get_group_target, "cairo_get_group_target", LIBRARY_CAIRO); Linker.link(cairo_set_source_rgb, "cairo_set_source_rgb", LIBRARY_CAIRO); Linker.link(cairo_set_source_rgba, "cairo_set_source_rgba", LIBRARY_CAIRO); Linker.link(cairo_set_source, "cairo_set_source", LIBRARY_CAIRO); Linker.link(cairo_set_source_surface, "cairo_set_source_surface", LIBRARY_CAIRO); Linker.link(cairo_get_source, "cairo_get_source", LIBRARY_CAIRO); Linker.link(cairo_set_antialias, "cairo_set_antialias", LIBRARY_CAIRO); Linker.link(cairo_get_antialias, "cairo_get_antialias", LIBRARY_CAIRO); Linker.link(cairo_set_dash, "cairo_set_dash", LIBRARY_CAIRO); Linker.link(cairo_get_dash_count, "cairo_get_dash_count", LIBRARY_CAIRO); Linker.link(cairo_get_dash, "cairo_get_dash", LIBRARY_CAIRO); Linker.link(cairo_set_fill_rule, "cairo_set_fill_rule", LIBRARY_CAIRO); Linker.link(cairo_get_fill_rule, "cairo_get_fill_rule", LIBRARY_CAIRO); Linker.link(cairo_set_line_cap, "cairo_set_line_cap", LIBRARY_CAIRO); Linker.link(cairo_get_line_cap, "cairo_get_line_cap", LIBRARY_CAIRO); Linker.link(cairo_set_line_join, "cairo_set_line_join", LIBRARY_CAIRO); Linker.link(cairo_get_line_join, "cairo_get_line_join", LIBRARY_CAIRO); Linker.link(cairo_set_line_width, "cairo_set_line_width", LIBRARY_CAIRO); Linker.link(cairo_get_line_width, "cairo_get_line_width", LIBRARY_CAIRO); Linker.link(cairo_set_miter_limit, "cairo_set_miter_limit", LIBRARY_CAIRO); Linker.link(cairo_get_miter_limit, "cairo_get_miter_limit", LIBRARY_CAIRO); Linker.link(cairo_set_operator, "cairo_set_operator", LIBRARY_CAIRO); Linker.link(cairo_get_operator, "cairo_get_operator", LIBRARY_CAIRO); Linker.link(cairo_set_tolerance, "cairo_set_tolerance", LIBRARY_CAIRO); Linker.link(cairo_get_tolerance, "cairo_get_tolerance", LIBRARY_CAIRO); Linker.link(cairo_clip, "cairo_clip", LIBRARY_CAIRO); Linker.link(cairo_clip_preserve, "cairo_clip_preserve", LIBRARY_CAIRO); Linker.link(cairo_clip_extents, "cairo_clip_extents", LIBRARY_CAIRO); Linker.link(cairo_in_clip, "cairo_in_clip", LIBRARY_CAIRO); Linker.link(cairo_reset_clip, "cairo_reset_clip", LIBRARY_CAIRO); Linker.link(cairo_rectangle_list_destroy, "cairo_rectangle_list_destroy", LIBRARY_CAIRO); Linker.link(cairo_copy_clip_rectangle_list, "cairo_copy_clip_rectangle_list", LIBRARY_CAIRO); Linker.link(cairo_fill, "cairo_fill", LIBRARY_CAIRO); Linker.link(cairo_fill_preserve, "cairo_fill_preserve", LIBRARY_CAIRO); Linker.link(cairo_fill_extents, "cairo_fill_extents", LIBRARY_CAIRO); Linker.link(cairo_in_fill, "cairo_in_fill", LIBRARY_CAIRO); Linker.link(cairo_mask, "cairo_mask", LIBRARY_CAIRO); Linker.link(cairo_mask_surface, "cairo_mask_surface", LIBRARY_CAIRO); Linker.link(cairo_paint, "cairo_paint", LIBRARY_CAIRO); Linker.link(cairo_paint_with_alpha, "cairo_paint_with_alpha", LIBRARY_CAIRO); Linker.link(cairo_stroke, "cairo_stroke", LIBRARY_CAIRO); Linker.link(cairo_stroke_preserve, "cairo_stroke_preserve", LIBRARY_CAIRO); Linker.link(cairo_stroke_extents, "cairo_stroke_extents", LIBRARY_CAIRO); Linker.link(cairo_in_stroke, "cairo_in_stroke", LIBRARY_CAIRO); Linker.link(cairo_copy_page, "cairo_copy_page", LIBRARY_CAIRO); Linker.link(cairo_show_page, "cairo_show_page", LIBRARY_CAIRO); Linker.link(cairo_get_reference_count, "cairo_get_reference_count", LIBRARY_CAIRO); Linker.link(cairo_set_user_data, "cairo_set_user_data", LIBRARY_CAIRO); Linker.link(cairo_get_user_data, "cairo_get_user_data", LIBRARY_CAIRO); Linker.link(cairo_copy_path, "cairo_copy_path", LIBRARY_CAIRO); Linker.link(cairo_copy_path_flat, "cairo_copy_path_flat", LIBRARY_CAIRO); Linker.link(cairo_path_destroy, "cairo_path_destroy", LIBRARY_CAIRO); Linker.link(cairo_append_path, "cairo_append_path", LIBRARY_CAIRO); Linker.link(cairo_has_current_point, "cairo_has_current_point", LIBRARY_CAIRO); Linker.link(cairo_get_current_point, "cairo_get_current_point", LIBRARY_CAIRO); Linker.link(cairo_new_path, "cairo_new_path", LIBRARY_CAIRO); Linker.link(cairo_new_sub_path, "cairo_new_sub_path", LIBRARY_CAIRO); Linker.link(cairo_close_path, "cairo_close_path", LIBRARY_CAIRO); Linker.link(cairo_arc, "cairo_arc", LIBRARY_CAIRO); Linker.link(cairo_arc_negative, "cairo_arc_negative", LIBRARY_CAIRO); Linker.link(cairo_curve_to, "cairo_curve_to", LIBRARY_CAIRO); Linker.link(cairo_line_to, "cairo_line_to", LIBRARY_CAIRO); Linker.link(cairo_move_to, "cairo_move_to", LIBRARY_CAIRO); Linker.link(cairo_rectangle, "cairo_rectangle", LIBRARY_CAIRO); Linker.link(cairo_glyph_path, "cairo_glyph_path", LIBRARY_CAIRO); Linker.link(cairo_text_path, "cairo_text_path", LIBRARY_CAIRO); Linker.link(cairo_rel_curve_to, "cairo_rel_curve_to", LIBRARY_CAIRO); Linker.link(cairo_rel_line_to, "cairo_rel_line_to", LIBRARY_CAIRO); Linker.link(cairo_rel_move_to, "cairo_rel_move_to", LIBRARY_CAIRO); Linker.link(cairo_path_extents, "cairo_path_extents", LIBRARY_CAIRO); Linker.link(cairo_translate, "cairo_translate", LIBRARY_CAIRO); Linker.link(cairo_scale, "cairo_scale", LIBRARY_CAIRO); Linker.link(cairo_rotate, "cairo_rotate", LIBRARY_CAIRO); Linker.link(cairo_transform, "cairo_transform", LIBRARY_CAIRO); Linker.link(cairo_set_matrix, "cairo_set_matrix", LIBRARY_CAIRO); Linker.link(cairo_get_matrix, "cairo_get_matrix", LIBRARY_CAIRO); Linker.link(cairo_identity_matrix, "cairo_identity_matrix", LIBRARY_CAIRO); Linker.link(cairo_user_to_device, "cairo_user_to_device", LIBRARY_CAIRO); Linker.link(cairo_user_to_device_distance, "cairo_user_to_device_distance", LIBRARY_CAIRO); Linker.link(cairo_device_to_user, "cairo_device_to_user", LIBRARY_CAIRO); Linker.link(cairo_device_to_user_distance, "cairo_device_to_user_distance", LIBRARY_CAIRO); Linker.link(cairo_select_font_face, "cairo_select_font_face", LIBRARY_CAIRO); Linker.link(cairo_set_font_size, "cairo_set_font_size", LIBRARY_CAIRO); Linker.link(cairo_set_font_matrix, "cairo_set_font_matrix", LIBRARY_CAIRO); Linker.link(cairo_get_font_matrix, "cairo_get_font_matrix", LIBRARY_CAIRO); Linker.link(cairo_set_font_options, "cairo_set_font_options", LIBRARY_CAIRO); Linker.link(cairo_get_font_options, "cairo_get_font_options", LIBRARY_CAIRO); Linker.link(cairo_set_font_face, "cairo_set_font_face", LIBRARY_CAIRO); Linker.link(cairo_get_font_face, "cairo_get_font_face", LIBRARY_CAIRO); Linker.link(cairo_set_scaled_font, "cairo_set_scaled_font", LIBRARY_CAIRO); Linker.link(cairo_get_scaled_font, "cairo_get_scaled_font", LIBRARY_CAIRO); Linker.link(cairo_show_text, "cairo_show_text", LIBRARY_CAIRO); Linker.link(cairo_show_glyphs, "cairo_show_glyphs", LIBRARY_CAIRO); Linker.link(cairo_show_text_glyphs, "cairo_show_text_glyphs", LIBRARY_CAIRO); Linker.link(cairo_font_extents, "cairo_font_extents", LIBRARY_CAIRO); Linker.link(cairo_text_extents, "cairo_text_extents", LIBRARY_CAIRO); Linker.link(cairo_glyph_extents, "cairo_glyph_extents", LIBRARY_CAIRO); Linker.link(cairo_toy_font_face_create, "cairo_toy_font_face_create", LIBRARY_CAIRO); Linker.link(cairo_toy_font_face_get_family, "cairo_toy_font_face_get_family", LIBRARY_CAIRO); Linker.link(cairo_toy_font_face_get_slant, "cairo_toy_font_face_get_slant", LIBRARY_CAIRO); Linker.link(cairo_toy_font_face_get_weight, "cairo_toy_font_face_get_weight", LIBRARY_CAIRO); Linker.link(cairo_glyph_allocate, "cairo_glyph_allocate", LIBRARY_CAIRO); Linker.link(cairo_glyph_free, "cairo_glyph_free", LIBRARY_CAIRO); Linker.link(cairo_text_cluster_allocate, "cairo_text_cluster_allocate", LIBRARY_CAIRO); Linker.link(cairo_text_cluster_free, "cairo_text_cluster_free", LIBRARY_CAIRO); // cairo.Pattern Linker.link(cairo_pattern_add_color_stop_rgb, "cairo_pattern_add_color_stop_rgb", LIBRARY_CAIRO); Linker.link(cairo_pattern_add_color_stop_rgba, "cairo_pattern_add_color_stop_rgba", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_color_stop_count, "cairo_pattern_get_color_stop_count", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_color_stop_rgba, "cairo_pattern_get_color_stop_rgba", LIBRARY_CAIRO); Linker.link(cairo_pattern_create_rgb, "cairo_pattern_create_rgb", LIBRARY_CAIRO); Linker.link(cairo_pattern_create_rgba, "cairo_pattern_create_rgba", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_rgba, "cairo_pattern_get_rgba", LIBRARY_CAIRO); Linker.link(cairo_pattern_create_for_surface, "cairo_pattern_create_for_surface", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_surface, "cairo_pattern_get_surface", LIBRARY_CAIRO); Linker.link(cairo_pattern_create_linear, "cairo_pattern_create_linear", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_linear_points, "cairo_pattern_get_linear_points", LIBRARY_CAIRO); Linker.link(cairo_pattern_create_radial, "cairo_pattern_create_radial", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_radial_circles, "cairo_pattern_get_radial_circles", LIBRARY_CAIRO); Linker.link(cairo_pattern_create_mesh, "cairo_pattern_create_mesh", LIBRARY_CAIRO); Linker.link(cairo_pattern_reference, "cairo_pattern_reference", LIBRARY_CAIRO); Linker.link(cairo_pattern_destroy, "cairo_pattern_destroy", LIBRARY_CAIRO); Linker.link(cairo_pattern_status, "cairo_pattern_status", LIBRARY_CAIRO); Linker.link(cairo_pattern_set_extend, "cairo_pattern_set_extend", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_extend, "cairo_pattern_get_extend", LIBRARY_CAIRO); Linker.link(cairo_pattern_set_filter, "cairo_pattern_set_filter", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_filter, "cairo_pattern_get_filter", LIBRARY_CAIRO); Linker.link(cairo_pattern_set_matrix, "cairo_pattern_set_matrix", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_matrix, "cairo_pattern_get_matrix", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_type, "cairo_pattern_get_type", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_reference_count, "cairo_pattern_get_reference_count", LIBRARY_CAIRO); Linker.link(cairo_pattern_set_user_data, "cairo_pattern_set_user_data", LIBRARY_CAIRO); Linker.link(cairo_pattern_get_user_data, "cairo_pattern_get_user_data", LIBRARY_CAIRO); // cairo.MeshPattern Linker.link(cairo_mesh_pattern_begin_patch, "cairo_mesh_pattern_begin_patch", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_end_patch, "cairo_mesh_pattern_end_patch", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_move_to, "cairo_mesh_pattern_move_to", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_line_to, "cairo_mesh_pattern_line_to", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_curve_to, "cairo_mesh_pattern_curve_to", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_set_control_point, "cairo_mesh_pattern_set_control_point", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_set_corner_color_rgb, "cairo_mesh_pattern_set_corner_color_rgb", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_set_corner_color_rgba, "cairo_mesh_pattern_set_corner_color_rgba", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_get_patch_count, "cairo_mesh_pattern_get_patch_count", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_get_path, "cairo_mesh_pattern_get_path", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_get_control_point, "cairo_mesh_pattern_get_control_point", LIBRARY_CAIRO); Linker.link(cairo_mesh_pattern_get_corner_color_rgba, "cairo_mesh_pattern_get_corner_color_rgba", LIBRARY_CAIRO); // cairo.Region Linker.link(cairo_region_create, "cairo_region_create", LIBRARY_CAIRO); Linker.link(cairo_region_create_rectangle, "cairo_region_create_rectangle", LIBRARY_CAIRO); Linker.link(cairo_region_create_rectangles, "cairo_region_create_rectangles", LIBRARY_CAIRO); Linker.link(cairo_region_copy, "cairo_region_copy", LIBRARY_CAIRO); Linker.link(cairo_region_reference, "cairo_region_reference", LIBRARY_CAIRO); Linker.link(cairo_region_destroy, "cairo_region_destroy", LIBRARY_CAIRO); Linker.link(cairo_region_status, "cairo_region_status", LIBRARY_CAIRO); Linker.link(cairo_region_get_extents, "cairo_region_get_extents", LIBRARY_CAIRO); Linker.link(cairo_region_num_rectangles, "cairo_region_num_rectangles", LIBRARY_CAIRO); Linker.link(cairo_region_get_rectangle, "cairo_region_get_rectangle", LIBRARY_CAIRO); Linker.link(cairo_region_is_empty, "cairo_region_is_empty", LIBRARY_CAIRO); Linker.link(cairo_region_contains_point, "cairo_region_contains_point", LIBRARY_CAIRO); Linker.link(cairo_region_contains_rectangle, "cairo_region_contains_rectangle", LIBRARY_CAIRO); Linker.link(cairo_region_equal, "cairo_region_equal", LIBRARY_CAIRO); Linker.link(cairo_region_translate, "cairo_region_translate", LIBRARY_CAIRO); Linker.link(cairo_region_intersect, "cairo_region_intersect", LIBRARY_CAIRO); Linker.link(cairo_region_intersect_rectangle, "cairo_region_intersect_rectangle", LIBRARY_CAIRO); Linker.link(cairo_region_subtract, "cairo_region_subtract", LIBRARY_CAIRO); Linker.link(cairo_region_subtract_rectangle, "cairo_region_subtract_rectangle", LIBRARY_CAIRO); Linker.link(cairo_region_union, "cairo_region_union", LIBRARY_CAIRO); Linker.link(cairo_region_union_rectangle, "cairo_region_union_rectangle", LIBRARY_CAIRO); Linker.link(cairo_region_xor, "cairo_region_xor", LIBRARY_CAIRO); Linker.link(cairo_region_xor_rectangle, "cairo_region_xor_rectangle", LIBRARY_CAIRO); // cairo.RasterSource Linker.link(cairo_pattern_create_raster_source, "cairo_pattern_create_raster_source", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_set_callback_data, "cairo_raster_source_pattern_set_callback_data", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_get_callback_data, "cairo_raster_source_pattern_get_callback_data", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_set_acquire, "cairo_raster_source_pattern_set_acquire", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_get_acquire, "cairo_raster_source_pattern_get_acquire", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_set_snapshot, "cairo_raster_source_pattern_set_snapshot", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_get_snapshot, "cairo_raster_source_pattern_get_snapshot", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_set_copy, "cairo_raster_source_pattern_set_copy", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_get_copy, "cairo_raster_source_pattern_get_copy", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_set_finish, "cairo_raster_source_pattern_set_finish", LIBRARY_CAIRO); Linker.link(cairo_raster_source_pattern_get_finish, "cairo_raster_source_pattern_get_finish", LIBRARY_CAIRO); // cairo.FontFace Linker.link(cairo_font_face_reference, "cairo_font_face_reference", LIBRARY_CAIRO); Linker.link(cairo_font_face_destroy, "cairo_font_face_destroy", LIBRARY_CAIRO); Linker.link(cairo_font_face_status, "cairo_font_face_status", LIBRARY_CAIRO); Linker.link(cairo_font_face_get_type, "cairo_font_face_get_type", LIBRARY_CAIRO); Linker.link(cairo_font_face_get_reference_count, "cairo_font_face_get_reference_count", LIBRARY_CAIRO); Linker.link(cairo_font_face_set_user_data, "cairo_font_face_set_user_data", LIBRARY_CAIRO); Linker.link(cairo_font_face_get_user_data, "cairo_font_face_get_user_data", LIBRARY_CAIRO); // cairo.ScaledFont Linker.link(cairo_scaled_font_create, "cairo_scaled_font_create", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_reference, "cairo_scaled_font_reference", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_destroy, "cairo_scaled_font_destroy", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_status, "cairo_scaled_font_status", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_extents, "cairo_scaled_font_extents", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_text_extents, "cairo_scaled_font_text_extents", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_glyph_extents, "cairo_scaled_font_glyph_extents", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_text_to_glyphs, "cairo_scaled_font_text_to_glyphs", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_get_font_face, "cairo_scaled_font_get_font_face", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_get_font_options, "cairo_scaled_font_get_font_options", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_get_font_matrix, "cairo_scaled_font_get_font_matrix", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_get_ctm, "cairo_scaled_font_get_ctm", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_get_scale_matrix, "cairo_scaled_font_get_scale_matrix", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_get_type, "cairo_scaled_font_get_type", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_get_reference_count, "cairo_scaled_font_get_reference_count", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_set_user_data, "cairo_scaled_font_set_user_data", LIBRARY_CAIRO); Linker.link(cairo_scaled_font_get_user_data, "cairo_scaled_font_get_user_data", LIBRARY_CAIRO); // cairo.FontOption Linker.link(cairo_font_options_create, "cairo_font_options_create", LIBRARY_CAIRO); Linker.link(cairo_font_options_copy, "cairo_font_options_copy", LIBRARY_CAIRO); Linker.link(cairo_font_options_destroy, "cairo_font_options_destroy", LIBRARY_CAIRO); Linker.link(cairo_font_options_status, "cairo_font_options_status", LIBRARY_CAIRO); Linker.link(cairo_font_options_merge, "cairo_font_options_merge", LIBRARY_CAIRO); Linker.link(cairo_font_options_hash, "cairo_font_options_hash", LIBRARY_CAIRO); Linker.link(cairo_font_options_equal, "cairo_font_options_equal", LIBRARY_CAIRO); Linker.link(cairo_font_options_set_antialias, "cairo_font_options_set_antialias", LIBRARY_CAIRO); Linker.link(cairo_font_options_get_antialias, "cairo_font_options_get_antialias", LIBRARY_CAIRO); Linker.link(cairo_font_options_set_subpixel_order, "cairo_font_options_set_subpixel_order", LIBRARY_CAIRO); Linker.link(cairo_font_options_get_subpixel_order, "cairo_font_options_get_subpixel_order", LIBRARY_CAIRO); Linker.link(cairo_font_options_set_hint_style, "cairo_font_options_set_hint_style", LIBRARY_CAIRO); Linker.link(cairo_font_options_get_hint_style, "cairo_font_options_get_hint_style", LIBRARY_CAIRO); Linker.link(cairo_font_options_set_hint_metrics, "cairo_font_options_set_hint_metrics", LIBRARY_CAIRO); Linker.link(cairo_font_options_get_hint_metrics, "cairo_font_options_get_hint_metrics", LIBRARY_CAIRO); // cairo.UserFontFace Linker.link(cairo_user_font_face_create, "cairo_user_font_face_create", LIBRARY_CAIRO); Linker.link(cairo_user_font_face_set_init_func, "cairo_user_font_face_set_init_func", LIBRARY_CAIRO); Linker.link(cairo_user_font_face_get_init_func, "cairo_user_font_face_get_init_func", LIBRARY_CAIRO); Linker.link(cairo_user_font_face_set_render_glyph_func, "cairo_user_font_face_set_render_glyph_func", LIBRARY_CAIRO); Linker.link(cairo_user_font_face_get_render_glyph_func, "cairo_user_font_face_get_render_glyph_func", LIBRARY_CAIRO); Linker.link(cairo_user_font_face_set_unicode_to_glyph_func, "cairo_user_font_face_set_unicode_to_glyph_func", LIBRARY_CAIRO); Linker.link(cairo_user_font_face_get_unicode_to_glyph_func, "cairo_user_font_face_get_unicode_to_glyph_func", LIBRARY_CAIRO); Linker.link(cairo_user_font_face_set_text_to_glyphs_func, "cairo_user_font_face_set_text_to_glyphs_func", LIBRARY_CAIRO); Linker.link(cairo_user_font_face_get_text_to_glyphs_func, "cairo_user_font_face_get_text_to_glyphs_func", LIBRARY_CAIRO); // cairo.Device Linker.link(cairo_device_reference, "cairo_device_reference", LIBRARY_CAIRO); Linker.link(cairo_device_destroy, "cairo_device_destroy", LIBRARY_CAIRO); Linker.link(cairo_device_status, "cairo_device_status", LIBRARY_CAIRO); Linker.link(cairo_device_finish, "cairo_device_finish", LIBRARY_CAIRO); Linker.link(cairo_device_flush, "cairo_device_flush", LIBRARY_CAIRO); Linker.link(cairo_device_get_type, "cairo_device_get_type", LIBRARY_CAIRO); Linker.link(cairo_device_get_reference_count, "cairo_device_get_reference_count", LIBRARY_CAIRO); Linker.link(cairo_device_set_user_data, "cairo_device_set_user_data", LIBRARY_CAIRO); Linker.link(cairo_device_get_user_data, "cairo_device_get_user_data", LIBRARY_CAIRO); Linker.link(cairo_device_acquire, "cairo_device_acquire", LIBRARY_CAIRO); Linker.link(cairo_device_release, "cairo_device_release", LIBRARY_CAIRO); // cairo.Surface Linker.link(cairo_surface_create_similar, "cairo_surface_create_similar", LIBRARY_CAIRO); Linker.link(cairo_surface_create_similar_image, "cairo_surface_create_similar_image", LIBRARY_CAIRO); Linker.link(cairo_surface_create_for_rectangle, "cairo_surface_create_for_rectangle", LIBRARY_CAIRO); Linker.link(cairo_surface_reference, "cairo_surface_reference", LIBRARY_CAIRO); Linker.link(cairo_surface_destroy, "cairo_surface_destroy", LIBRARY_CAIRO); Linker.link(cairo_surface_status, "cairo_surface_status", LIBRARY_CAIRO); Linker.link(cairo_surface_finish, "cairo_surface_finish", LIBRARY_CAIRO); Linker.link(cairo_surface_flush, "cairo_surface_flush", LIBRARY_CAIRO); Linker.link(cairo_surface_get_device, "cairo_surface_get_device", LIBRARY_CAIRO); Linker.link(cairo_surface_get_font_options, "cairo_surface_get_font_options", LIBRARY_CAIRO); Linker.link(cairo_surface_get_content, "cairo_surface_get_content", LIBRARY_CAIRO); Linker.link(cairo_surface_mark_dirty, "cairo_surface_mark_dirty", LIBRARY_CAIRO); Linker.link(cairo_surface_mark_dirty_rectangle, "cairo_surface_mark_dirty_rectangle", LIBRARY_CAIRO); Linker.link(cairo_surface_set_device_offset, "cairo_surface_set_device_offset", LIBRARY_CAIRO); Linker.link(cairo_surface_get_device_offset, "cairo_surface_get_device_offset", LIBRARY_CAIRO); Linker.link(cairo_surface_set_fallback_resolution, "cairo_surface_set_fallback_resolution", LIBRARY_CAIRO); Linker.link(cairo_surface_get_fallback_resolution, "cairo_surface_get_fallback_resolution", LIBRARY_CAIRO); Linker.link(cairo_surface_get_type, "cairo_surface_get_type", LIBRARY_CAIRO); Linker.link(cairo_surface_get_reference_count, "cairo_surface_get_reference_count", LIBRARY_CAIRO); Linker.link(cairo_surface_set_user_data, "cairo_surface_set_user_data", LIBRARY_CAIRO); Linker.link(cairo_surface_get_user_data, "cairo_surface_get_user_data", LIBRARY_CAIRO); Linker.link(cairo_surface_copy_page, "cairo_surface_copy_page", LIBRARY_CAIRO); Linker.link(cairo_surface_show_page, "cairo_surface_show_page", LIBRARY_CAIRO); Linker.link(cairo_surface_has_show_text_glyphs, "cairo_surface_has_show_text_glyphs", LIBRARY_CAIRO); Linker.link(cairo_surface_set_mime_data, "cairo_surface_set_mime_data", LIBRARY_CAIRO); Linker.link(cairo_surface_get_mime_data, "cairo_surface_get_mime_data", LIBRARY_CAIRO); Linker.link(cairo_surface_supports_mime_type, "cairo_surface_supports_mime_type", LIBRARY_CAIRO); Linker.link(cairo_surface_map_to_image, "cairo_surface_map_to_image", LIBRARY_CAIRO); Linker.link(cairo_surface_unmap_image, "cairo_surface_unmap_image", LIBRARY_CAIRO); // cairo.ImageSurface Linker.link(cairo_format_stride_for_width, "cairo_format_stride_for_width", LIBRARY_CAIRO); Linker.link(cairo_image_surface_create, "cairo_image_surface_create", LIBRARY_CAIRO); Linker.link(cairo_image_surface_create_for_data, "cairo_image_surface_create_for_data", LIBRARY_CAIRO); Linker.link(cairo_image_surface_get_data, "cairo_image_surface_get_data", LIBRARY_CAIRO); Linker.link(cairo_image_surface_get_format, "cairo_image_surface_get_format", LIBRARY_CAIRO); Linker.link(cairo_image_surface_get_width, "cairo_image_surface_get_width", LIBRARY_CAIRO); Linker.link(cairo_image_surface_get_height, "cairo_image_surface_get_height", LIBRARY_CAIRO); Linker.link(cairo_image_surface_get_stride, "cairo_image_surface_get_stride", LIBRARY_CAIRO); Linker.link(cairo_image_surface_create_from_png, "cairo_image_surface_create_from_png", LIBRARY_CAIRO); Linker.link(cairo_image_surface_create_from_png_stream, "cairo_image_surface_create_from_png_stream", LIBRARY_CAIRO); Linker.link(cairo_surface_write_to_png, "cairo_surface_write_to_png", LIBRARY_CAIRO); Linker.link(cairo_surface_write_to_png_stream, "cairo_surface_write_to_png_stream", LIBRARY_CAIRO); // cairo.PdfSurface Linker.link(cairo_pdf_surface_create, "cairo_pdf_surface_create", LIBRARY_CAIRO); Linker.link(cairo_pdf_surface_create_for_stream, "cairo_pdf_surface_create_for_stream", LIBRARY_CAIRO); Linker.link(cairo_pdf_surface_restrict_to_version, "cairo_pdf_surface_restrict_to_version", LIBRARY_CAIRO); Linker.link(cairo_pdf_get_versions, "cairo_pdf_get_versions", LIBRARY_CAIRO); Linker.link(cairo_pdf_version_to_string, "cairo_pdf_version_to_string", LIBRARY_CAIRO); Linker.link(cairo_pdf_surface_set_size, "cairo_pdf_surface_set_size", LIBRARY_CAIRO); // cairo.PostScriptSurface Linker.link(cairo_ps_surface_create, "cairo_ps_surface_create", LIBRARY_CAIRO); Linker.link(cairo_ps_surface_create_for_stream, "cairo_ps_surface_create_for_stream", LIBRARY_CAIRO); Linker.link(cairo_ps_surface_restrict_to_level, "cairo_ps_surface_restrict_to_level", LIBRARY_CAIRO); Linker.link(cairo_ps_get_levels, "cairo_ps_get_levels", LIBRARY_CAIRO); Linker.link(cairo_ps_level_to_string, "cairo_ps_level_to_string", LIBRARY_CAIRO); Linker.link(cairo_ps_surface_set_eps, "cairo_ps_surface_set_eps", LIBRARY_CAIRO); Linker.link(cairo_ps_surface_get_eps, "cairo_ps_surface_get_eps", LIBRARY_CAIRO); Linker.link(cairo_ps_surface_set_size, "cairo_ps_surface_set_size", LIBRARY_CAIRO); Linker.link(cairo_ps_surface_dsc_begin_setup, "cairo_ps_surface_dsc_begin_setup", LIBRARY_CAIRO); Linker.link(cairo_ps_surface_dsc_begin_page_setup, "cairo_ps_surface_dsc_begin_page_setup", LIBRARY_CAIRO); Linker.link(cairo_ps_surface_dsc_comment, "cairo_ps_surface_dsc_comment", LIBRARY_CAIRO); // cairo.RecordingSurface Linker.link(cairo_recording_surface_create, "cairo_recording_surface_create", LIBRARY_CAIRO); Linker.link(cairo_recording_surface_ink_extents, "cairo_recording_surface_ink_extents", LIBRARY_CAIRO); Linker.link(cairo_recording_surface_get_extents, "cairo_recording_surface_get_extents", LIBRARY_CAIRO); // cairo.SvgSurface Linker.link(cairo_svg_surface_create, "cairo_svg_surface_create", LIBRARY_CAIRO); Linker.link(cairo_svg_surface_create_for_stream, "cairo_svg_surface_create_for_stream", LIBRARY_CAIRO); Linker.link(cairo_svg_surface_restrict_to_version, "cairo_svg_surface_restrict_to_version", LIBRARY_CAIRO); Linker.link(cairo_svg_get_versions, "cairo_svg_get_versions", LIBRARY_CAIRO); Linker.link(cairo_svg_version_to_string, "cairo_svg_version_to_string", LIBRARY_CAIRO); // cairo.Script Linker.link(cairo_script_create, "cairo_script_create", LIBRARY_CAIRO); Linker.link(cairo_script_create_for_stream, "cairo_script_create_for_stream", LIBRARY_CAIRO); Linker.link(cairo_script_from_recording_surface, "cairo_script_from_recording_surface", LIBRARY_CAIRO); Linker.link(cairo_script_get_mode, "cairo_script_get_mode", LIBRARY_CAIRO); Linker.link(cairo_script_set_mode, "cairo_script_set_mode", LIBRARY_CAIRO); Linker.link(cairo_script_write_comment, "cairo_script_write_comment", LIBRARY_CAIRO); // cairo.ScriptSurface Linker.link(cairo_script_surface_create, "cairo_script_surface_create", LIBRARY_CAIRO); Linker.link(cairo_script_surface_create_for_target, "cairo_script_surface_create_for_target", LIBRARY_CAIRO); // cairo.Matrix Linker.link(cairo_matrix_init, "cairo_matrix_init", LIBRARY_CAIRO); Linker.link(cairo_matrix_init_identity, "cairo_matrix_init_identity", LIBRARY_CAIRO); Linker.link(cairo_matrix_init_translate, "cairo_matrix_init_translate", LIBRARY_CAIRO); Linker.link(cairo_matrix_init_scale, "cairo_matrix_init_scale", LIBRARY_CAIRO); Linker.link(cairo_matrix_init_rotate, "cairo_matrix_init_rotate", LIBRARY_CAIRO); Linker.link(cairo_matrix_translate, "cairo_matrix_translate", LIBRARY_CAIRO); Linker.link(cairo_matrix_scale, "cairo_matrix_scale", LIBRARY_CAIRO); Linker.link(cairo_matrix_rotate, "cairo_matrix_rotate", LIBRARY_CAIRO); Linker.link(cairo_matrix_invert, "cairo_matrix_invert", LIBRARY_CAIRO); Linker.link(cairo_matrix_multiply, "cairo_matrix_multiply", LIBRARY_CAIRO); Linker.link(cairo_matrix_transform_distance, "cairo_matrix_transform_distance", LIBRARY_CAIRO); Linker.link(cairo_matrix_transform_point, "cairo_matrix_transform_point", LIBRARY_CAIRO); // cairo.Status Linker.link(cairo_status_to_string, "cairo_status_to_string", LIBRARY_CAIRO); Linker.link(cairo_debug_reset_static_data, "cairo_debug_reset_static_data", LIBRARY_CAIRO); // cairo.Version Linker.link(cairo_version, "cairo_version", LIBRARY_CAIRO); Linker.link(cairo_version_string, "cairo_version_string", LIBRARY_CAIRO); // cairo. } __gshared extern(C) { // cairo.Context cairo_t* function(cairo_surface_t* target) c_cairo_create; cairo_t* function(cairo_t* cr) c_cairo_reference; void function(cairo_t* cr) c_cairo_destroy; cairo_status_t function(cairo_t* cr) c_cairo_status; void function(cairo_t* cr) c_cairo_save; void function(cairo_t* cr) c_cairo_restore; cairo_surface_t* function(cairo_t* cr) c_cairo_get_target; void function(cairo_t* cr) c_cairo_push_group; void function(cairo_t* cr, cairo_content_t content) c_cairo_push_group_with_content; cairo_pattern_t* function(cairo_t* cr) c_cairo_pop_group; void function(cairo_t* cr) c_cairo_pop_group_to_source; cairo_surface_t* function(cairo_t* cr) c_cairo_get_group_target; void function(cairo_t* cr, double red, double green, double blue) c_cairo_set_source_rgb; void function(cairo_t* cr, double red, double green, double blue, double alpha) c_cairo_set_source_rgba; void function(cairo_t* cr, cairo_pattern_t* source) c_cairo_set_source; void function(cairo_t* cr, cairo_surface_t* surface, double x, double y) c_cairo_set_source_surface; cairo_pattern_t* function(cairo_t* cr) c_cairo_get_source; void function(cairo_t* cr, cairo_antialias_t antialias) c_cairo_set_antialias; cairo_antialias_t function(cairo_t* cr) c_cairo_get_antialias; void function(cairo_t* cr, double* dashes, int numDashes, double offset) c_cairo_set_dash; int function(cairo_t* cr) c_cairo_get_dash_count; void function(cairo_t* cr, double* dashes, double* offset) c_cairo_get_dash; void function(cairo_t* cr, cairo_fill_rule_t fillRule) c_cairo_set_fill_rule; cairo_fill_rule_t function(cairo_t* cr) c_cairo_get_fill_rule; void function(cairo_t* cr, cairo_line_cap_t lineCap) c_cairo_set_line_cap; cairo_line_cap_t function(cairo_t* cr) c_cairo_get_line_cap; void function(cairo_t* cr, cairo_line_join_t lineJoin) c_cairo_set_line_join; cairo_line_join_t function(cairo_t* cr) c_cairo_get_line_join; void function(cairo_t* cr, double width) c_cairo_set_line_width; double function(cairo_t* cr) c_cairo_get_line_width; void function(cairo_t* cr, double limit) c_cairo_set_miter_limit; double function(cairo_t* cr) c_cairo_get_miter_limit; void function(cairo_t* cr, cairo_operator_t op) c_cairo_set_operator; cairo_operator_t function(cairo_t* cr) c_cairo_get_operator; void function(cairo_t* cr, double tolerance) c_cairo_set_tolerance; double function(cairo_t* cr) c_cairo_get_tolerance; void function(cairo_t* cr) c_cairo_clip; void function(cairo_t* cr) c_cairo_clip_preserve; void function(cairo_t* cr, double* x1, double* y1, double* x2, double* y2) c_cairo_clip_extents; cairo_bool_t function(cairo_t* cr, double x, double y) c_cairo_in_clip; void function(cairo_t* cr) c_cairo_reset_clip; void function(cairo_rectangle_list_t* rectangleList) c_cairo_rectangle_list_destroy; cairo_rectangle_list_t* function(cairo_t* cr) c_cairo_copy_clip_rectangle_list; void function(cairo_t* cr) c_cairo_fill; void function(cairo_t* cr) c_cairo_fill_preserve; void function(cairo_t* cr, double* x1, double* y1, double* x2, double* y2) c_cairo_fill_extents; cairo_bool_t function(cairo_t* cr, double x, double y) c_cairo_in_fill; void function(cairo_t* cr, cairo_pattern_t* pattern) c_cairo_mask; void function(cairo_t* cr, cairo_surface_t* surface, double surfaceX, double surfaceY) c_cairo_mask_surface; void function(cairo_t* cr) c_cairo_paint; void function(cairo_t* cr, double alpha) c_cairo_paint_with_alpha; void function(cairo_t* cr) c_cairo_stroke; void function(cairo_t* cr) c_cairo_stroke_preserve; void function(cairo_t* cr, double* x1, double* y1, double* x2, double* y2) c_cairo_stroke_extents; cairo_bool_t function(cairo_t* cr, double x, double y) c_cairo_in_stroke; void function(cairo_t* cr) c_cairo_copy_page; void function(cairo_t* cr) c_cairo_show_page; uint function(cairo_t* cr) c_cairo_get_reference_count; cairo_status_t function(cairo_t* cr, cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) c_cairo_set_user_data; void* function(cairo_t* cr, cairo_user_data_key_t* key) c_cairo_get_user_data; cairo_path_t* function(cairo_t* cr) c_cairo_copy_path; cairo_path_t* function(cairo_t* cr) c_cairo_copy_path_flat; void function(cairo_path_t* path) c_cairo_path_destroy; void function(cairo_t* cr, cairo_path_t* path) c_cairo_append_path; cairo_bool_t function(cairo_t* cr) c_cairo_has_current_point; void function(cairo_t* cr, double* x, double* y) c_cairo_get_current_point; void function(cairo_t* cr) c_cairo_new_path; void function(cairo_t* cr) c_cairo_new_sub_path; void function(cairo_t* cr) c_cairo_close_path; void function(cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2) c_cairo_arc; void function(cairo_t* cr, double xc, double yc, double radius, double angle1, double angle2) c_cairo_arc_negative; void function(cairo_t* cr, double x1, double y1, double x2, double y2, double x3, double y3) c_cairo_curve_to; void function(cairo_t* cr, double x, double y) c_cairo_line_to; void function(cairo_t* cr, double x, double y) c_cairo_move_to; void function(cairo_t* cr, double x, double y, double width, double height) c_cairo_rectangle; void function(cairo_t* cr, cairo_glyph_t* glyphs, int numGlyphs) c_cairo_glyph_path; void function(cairo_t* cr, char* utf8) c_cairo_text_path; void function(cairo_t* cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3) c_cairo_rel_curve_to; void function(cairo_t* cr, double dx, double dy) c_cairo_rel_line_to; void function(cairo_t* cr, double dx, double dy) c_cairo_rel_move_to; void function(cairo_t* cr, double* x1, double* y1, double* x2, double* y2) c_cairo_path_extents; void function(cairo_t* cr, double tx, double ty) c_cairo_translate; void function(cairo_t* cr, double sx, double sy) c_cairo_scale; void function(cairo_t* cr, double angle) c_cairo_rotate; void function(cairo_t* cr, cairo_matrix_t* matrix) c_cairo_transform; void function(cairo_t* cr, cairo_matrix_t* matrix) c_cairo_set_matrix; void function(cairo_t* cr, cairo_matrix_t* matrix) c_cairo_get_matrix; void function(cairo_t* cr) c_cairo_identity_matrix; void function(cairo_t* cr, double* x, double* y) c_cairo_user_to_device; void function(cairo_t* cr, double* dx, double* dy) c_cairo_user_to_device_distance; void function(cairo_t* cr, double* x, double* y) c_cairo_device_to_user; void function(cairo_t* cr, double* dx, double* dy) c_cairo_device_to_user_distance; void function(cairo_t* cr, char* family, cairo_font_slant_t slant, cairo_font_weight_t weight) c_cairo_select_font_face; void function(cairo_t* cr, double size) c_cairo_set_font_size; void function(cairo_t* cr, cairo_matrix_t* matrix) c_cairo_set_font_matrix; void function(cairo_t* cr, cairo_matrix_t* matrix) c_cairo_get_font_matrix; void function(cairo_t* cr, cairo_font_options_t* options) c_cairo_set_font_options; void function(cairo_t* cr, cairo_font_options_t* options) c_cairo_get_font_options; void function(cairo_t* cr, cairo_font_face_t* fontFace) c_cairo_set_font_face; cairo_font_face_t* function(cairo_t* cr) c_cairo_get_font_face; void function(cairo_t* cr, cairo_scaled_font_t* scaledFont) c_cairo_set_scaled_font; cairo_scaled_font_t* function(cairo_t* cr) c_cairo_get_scaled_font; void function(cairo_t* cr, char* utf8) c_cairo_show_text; void function(cairo_t* cr, cairo_glyph_t* glyphs, int numGlyphs) c_cairo_show_glyphs; void function(cairo_t* cr, char* utf8, int utf8_Len, cairo_glyph_t* glyphs, int numGlyphs, cairo_text_cluster_t* clusters, int numClusters, cairo_text_cluster_flags_t clusterFlags) c_cairo_show_text_glyphs; void function(cairo_t* cr, cairo_font_extents_t* extents) c_cairo_font_extents; void function(cairo_t* cr, char* utf8, cairo_text_extents_t* extents) c_cairo_text_extents; void function(cairo_t* cr, cairo_glyph_t* glyphs, int numGlyphs, cairo_text_extents_t* extents) c_cairo_glyph_extents; cairo_font_face_t* function(char* family, cairo_font_slant_t slant, cairo_font_weight_t weight) c_cairo_toy_font_face_create; char* function(cairo_font_face_t* fontFace) c_cairo_toy_font_face_get_family; cairo_font_slant_t function(cairo_font_face_t* fontFace) c_cairo_toy_font_face_get_slant; cairo_font_weight_t function(cairo_font_face_t* fontFace) c_cairo_toy_font_face_get_weight; cairo_glyph_t* function(int numGlyphs) c_cairo_glyph_allocate; void function(cairo_glyph_t* glyphs) c_cairo_glyph_free; cairo_text_cluster_t* function(int numClusters) c_cairo_text_cluster_allocate; void function(cairo_text_cluster_t* clusters) c_cairo_text_cluster_free; // cairo.Pattern void function(cairo_pattern_t* pattern, double offset, double red, double green, double blue) c_cairo_pattern_add_color_stop_rgb; void function(cairo_pattern_t* pattern, double offset, double red, double green, double blue, double alpha) c_cairo_pattern_add_color_stop_rgba; cairo_status_t function(cairo_pattern_t* pattern, int* count) c_cairo_pattern_get_color_stop_count; cairo_status_t function(cairo_pattern_t* pattern, int index, double* offset, double* red, double* green, double* blue, double* alpha) c_cairo_pattern_get_color_stop_rgba; cairo_pattern_t* function(double red, double green, double blue) c_cairo_pattern_create_rgb; cairo_pattern_t* function(double red, double green, double blue, double alpha) c_cairo_pattern_create_rgba; cairo_status_t function(cairo_pattern_t* pattern, double* red, double* green, double* blue, double* alpha) c_cairo_pattern_get_rgba; cairo_pattern_t* function(cairo_surface_t* surface) c_cairo_pattern_create_for_surface; cairo_status_t function(cairo_pattern_t* pattern, cairo_surface_t** surface) c_cairo_pattern_get_surface; cairo_pattern_t* function(double x0, double y0, double x1, double y1) c_cairo_pattern_create_linear; cairo_status_t function(cairo_pattern_t* pattern, double* x0, double* y0, double* x1, double* y1) c_cairo_pattern_get_linear_points; cairo_pattern_t* function(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1) c_cairo_pattern_create_radial; cairo_status_t function(cairo_pattern_t* pattern, double* x0, double* y0, double* r0, double* x1, double* y1, double* r1) c_cairo_pattern_get_radial_circles; cairo_pattern_t* function() c_cairo_pattern_create_mesh; cairo_pattern_t* function(cairo_pattern_t* pattern) c_cairo_pattern_reference; void function(cairo_pattern_t* pattern) c_cairo_pattern_destroy; cairo_status_t function(cairo_pattern_t* pattern) c_cairo_pattern_status; void function(cairo_pattern_t* pattern, cairo_extend_t extend) c_cairo_pattern_set_extend; cairo_extend_t function(cairo_pattern_t* pattern) c_cairo_pattern_get_extend; void function(cairo_pattern_t* pattern, cairo_filter_t filter) c_cairo_pattern_set_filter; cairo_filter_t function(cairo_pattern_t* pattern) c_cairo_pattern_get_filter; void function(cairo_pattern_t* pattern, cairo_matrix_t* matrix) c_cairo_pattern_set_matrix; void function(cairo_pattern_t* pattern, cairo_matrix_t* matrix) c_cairo_pattern_get_matrix; cairo_pattern_type_t function(cairo_pattern_t* pattern) c_cairo_pattern_get_type; uint function(cairo_pattern_t* pattern) c_cairo_pattern_get_reference_count; cairo_status_t function(cairo_pattern_t* pattern, cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) c_cairo_pattern_set_user_data; void* function(cairo_pattern_t* pattern, cairo_user_data_key_t* key) c_cairo_pattern_get_user_data; // cairo.MeshPattern void function(cairo_pattern_t* pattern) c_cairo_mesh_pattern_begin_patch; void function(cairo_pattern_t* pattern) c_cairo_mesh_pattern_end_patch; void function(cairo_pattern_t* pattern, double x, double y) c_cairo_mesh_pattern_move_to; void function(cairo_pattern_t* pattern, double x, double y) c_cairo_mesh_pattern_line_to; void function(cairo_pattern_t* pattern, double x1, double y1, double x2, double y2, double x3, double y3) c_cairo_mesh_pattern_curve_to; void function(cairo_pattern_t* pattern, uint pointNum, double x, double y) c_cairo_mesh_pattern_set_control_point; void function(cairo_pattern_t* pattern, uint cornerNum, double red, double green, double blue) c_cairo_mesh_pattern_set_corner_color_rgb; void function(cairo_pattern_t* pattern, uint cornerNum, double red, double green, double blue, double alpha) c_cairo_mesh_pattern_set_corner_color_rgba; cairo_status_t function(cairo_pattern_t* pattern, uint* count) c_cairo_mesh_pattern_get_patch_count; cairo_path_t* function(cairo_pattern_t* pattern, uint patchNum) c_cairo_mesh_pattern_get_path; cairo_status_t function(cairo_pattern_t* pattern, uint patchNum, uint pointNum, double* x, double* y) c_cairo_mesh_pattern_get_control_point; cairo_status_t function(cairo_pattern_t* pattern, uint patchNum, uint cornerNum, double* red, double* green, double* blue, double* alpha) c_cairo_mesh_pattern_get_corner_color_rgba; // cairo.Region cairo_region_t* function() c_cairo_region_create; cairo_region_t* function(cairo_rectangle_int_t* rectangle) c_cairo_region_create_rectangle; cairo_region_t* function(cairo_rectangle_int_t* rects, int count) c_cairo_region_create_rectangles; cairo_region_t* function(cairo_region_t* original) c_cairo_region_copy; cairo_region_t* function(cairo_region_t* region) c_cairo_region_reference; void function(cairo_region_t* region) c_cairo_region_destroy; cairo_status_t function(cairo_region_t* region) c_cairo_region_status; void function(cairo_region_t* region, cairo_rectangle_int_t* extents) c_cairo_region_get_extents; int function(cairo_region_t* region) c_cairo_region_num_rectangles; void function(cairo_region_t* region, int nth, cairo_rectangle_int_t* rectangle) c_cairo_region_get_rectangle; cairo_bool_t function(cairo_region_t* region) c_cairo_region_is_empty; cairo_bool_t function(cairo_region_t* region, int x, int y) c_cairo_region_contains_point; cairo_region_overlap_t function(cairo_region_t* region, cairo_rectangle_int_t* rectangle) c_cairo_region_contains_rectangle; cairo_bool_t function(cairo_region_t* a, cairo_region_t* b) c_cairo_region_equal; void function(cairo_region_t* region, int dx, int dy) c_cairo_region_translate; cairo_status_t function(cairo_region_t* dst, cairo_region_t* other) c_cairo_region_intersect; cairo_status_t function(cairo_region_t* dst, cairo_rectangle_int_t* rectangle) c_cairo_region_intersect_rectangle; cairo_status_t function(cairo_region_t* dst, cairo_region_t* other) c_cairo_region_subtract; cairo_status_t function(cairo_region_t* dst, cairo_rectangle_int_t* rectangle) c_cairo_region_subtract_rectangle; cairo_status_t function(cairo_region_t* dst, cairo_region_t* other) c_cairo_region_union; cairo_status_t function(cairo_region_t* dst, cairo_rectangle_int_t* rectangle) c_cairo_region_union_rectangle; cairo_status_t function(cairo_region_t* dst, cairo_region_t* other) c_cairo_region_xor; cairo_status_t function(cairo_region_t* dst, cairo_rectangle_int_t* rectangle) c_cairo_region_xor_rectangle; // cairo.RasterSource cairo_pattern_t* function(void* userData, cairo_content_t content, int width, int height) c_cairo_pattern_create_raster_source; void function(cairo_pattern_t* pattern, void* data) c_cairo_raster_source_pattern_set_callback_data; void* function(cairo_pattern_t* pattern) c_cairo_raster_source_pattern_get_callback_data; void function(cairo_pattern_t* pattern, cairo_raster_source_acquire_func_t acquire, cairo_raster_source_release_func_t release) c_cairo_raster_source_pattern_set_acquire; void function(cairo_pattern_t* pattern, cairo_raster_source_acquire_func_t* acquire, cairo_raster_source_release_func_t* release) c_cairo_raster_source_pattern_get_acquire; void function(cairo_pattern_t* pattern, cairo_raster_source_snapshot_func_t snapshot) c_cairo_raster_source_pattern_set_snapshot; cairo_raster_source_snapshot_func_t function(cairo_pattern_t* pattern) c_cairo_raster_source_pattern_get_snapshot; void function(cairo_pattern_t* pattern, cairo_raster_source_copy_func_t copy) c_cairo_raster_source_pattern_set_copy; cairo_raster_source_copy_func_t function(cairo_pattern_t* pattern) c_cairo_raster_source_pattern_get_copy; void function(cairo_pattern_t* pattern, cairo_raster_source_finish_func_t finish) c_cairo_raster_source_pattern_set_finish; cairo_raster_source_finish_func_t function(cairo_pattern_t* pattern) c_cairo_raster_source_pattern_get_finish; // cairo.FontFace cairo_font_face_t* function(cairo_font_face_t* fontFace) c_cairo_font_face_reference; void function(cairo_font_face_t* fontFace) c_cairo_font_face_destroy; cairo_status_t function(cairo_font_face_t* fontFace) c_cairo_font_face_status; cairo_font_type_t function(cairo_font_face_t* fontFace) c_cairo_font_face_get_type; uint function(cairo_font_face_t* fontFace) c_cairo_font_face_get_reference_count; cairo_status_t function(cairo_font_face_t* fontFace, cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) c_cairo_font_face_set_user_data; void* function(cairo_font_face_t* fontFace, cairo_user_data_key_t* key) c_cairo_font_face_get_user_data; // cairo.ScaledFont cairo_scaled_font_t* function(cairo_font_face_t* fontFace, cairo_matrix_t* fontMatrix, cairo_matrix_t* ctm, cairo_font_options_t* options) c_cairo_scaled_font_create; cairo_scaled_font_t* function(cairo_scaled_font_t* scaledFont) c_cairo_scaled_font_reference; void function(cairo_scaled_font_t* scaledFont) c_cairo_scaled_font_destroy; cairo_status_t function(cairo_scaled_font_t* scaledFont) c_cairo_scaled_font_status; void function(cairo_scaled_font_t* scaledFont, cairo_font_extents_t* extents) c_cairo_scaled_font_extents; void function(cairo_scaled_font_t* scaledFont, char* utf8, cairo_text_extents_t* extents) c_cairo_scaled_font_text_extents; void function(cairo_scaled_font_t* scaledFont, cairo_glyph_t* glyphs, int numGlyphs, cairo_text_extents_t* extents) c_cairo_scaled_font_glyph_extents; cairo_status_t function(cairo_scaled_font_t* scaledFont, double x, double y, char* utf8, int utf8_Len, cairo_glyph_t** glyphs, int* numGlyphs, cairo_text_cluster_t** clusters, int* numClusters, cairo_text_cluster_flags_t* clusterFlags) c_cairo_scaled_font_text_to_glyphs; cairo_font_face_t* function(cairo_scaled_font_t* scaledFont) c_cairo_scaled_font_get_font_face; void function(cairo_scaled_font_t* scaledFont, cairo_font_options_t* options) c_cairo_scaled_font_get_font_options; void function(cairo_scaled_font_t* scaledFont, cairo_matrix_t* fontMatrix) c_cairo_scaled_font_get_font_matrix; void function(cairo_scaled_font_t* scaledFont, cairo_matrix_t* ctm) c_cairo_scaled_font_get_ctm; void function(cairo_scaled_font_t* scaledFont, cairo_matrix_t* scaleMatrix) c_cairo_scaled_font_get_scale_matrix; cairo_font_type_t function(cairo_scaled_font_t* scaledFont) c_cairo_scaled_font_get_type; uint function(cairo_scaled_font_t* scaledFont) c_cairo_scaled_font_get_reference_count; cairo_status_t function(cairo_scaled_font_t* scaledFont, cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) c_cairo_scaled_font_set_user_data; void* function(cairo_scaled_font_t* scaledFont, cairo_user_data_key_t* key) c_cairo_scaled_font_get_user_data; // cairo.FontOption cairo_font_options_t* function() c_cairo_font_options_create; cairo_font_options_t* function(cairo_font_options_t* original) c_cairo_font_options_copy; void function(cairo_font_options_t* options) c_cairo_font_options_destroy; cairo_status_t function(cairo_font_options_t* options) c_cairo_font_options_status; void function(cairo_font_options_t* options, cairo_font_options_t* other) c_cairo_font_options_merge; ulong function(cairo_font_options_t* options) c_cairo_font_options_hash; cairo_bool_t function(cairo_font_options_t* options, cairo_font_options_t* other) c_cairo_font_options_equal; void function(cairo_font_options_t* options, cairo_antialias_t antialias) c_cairo_font_options_set_antialias; cairo_antialias_t function(cairo_font_options_t* options) c_cairo_font_options_get_antialias; void function(cairo_font_options_t* options, cairo_subpixel_order_t subpixelOrder) c_cairo_font_options_set_subpixel_order; cairo_subpixel_order_t function(cairo_font_options_t* options) c_cairo_font_options_get_subpixel_order; void function(cairo_font_options_t* options, cairo_hint_style_t hintStyle) c_cairo_font_options_set_hint_style; cairo_hint_style_t function(cairo_font_options_t* options) c_cairo_font_options_get_hint_style; void function(cairo_font_options_t* options, cairo_hint_metrics_t hintMetrics) c_cairo_font_options_set_hint_metrics; cairo_hint_metrics_t function(cairo_font_options_t* options) c_cairo_font_options_get_hint_metrics; // cairo.UserFontFace cairo_font_face_t* function() c_cairo_user_font_face_create; void function(cairo_font_face_t* fontFace, cairo_user_scaled_font_init_func_t initFunc) c_cairo_user_font_face_set_init_func; cairo_user_scaled_font_init_func_t function(cairo_font_face_t* fontFace) c_cairo_user_font_face_get_init_func; void function(cairo_font_face_t* fontFace, cairo_user_scaled_font_render_glyph_func_t renderGlyphFunc) c_cairo_user_font_face_set_render_glyph_func; cairo_user_scaled_font_render_glyph_func_t function(cairo_font_face_t* fontFace) c_cairo_user_font_face_get_render_glyph_func; void function(cairo_font_face_t* fontFace, cairo_user_scaled_font_unicode_to_glyph_func_t unicodeToGlyphFunc) c_cairo_user_font_face_set_unicode_to_glyph_func; cairo_user_scaled_font_unicode_to_glyph_func_t function(cairo_font_face_t* fontFace) c_cairo_user_font_face_get_unicode_to_glyph_func; void function(cairo_font_face_t* fontFace, cairo_user_scaled_font_text_to_glyphs_func_t textToGlyphsFunc) c_cairo_user_font_face_set_text_to_glyphs_func; cairo_user_scaled_font_text_to_glyphs_func_t function(cairo_font_face_t* fontFace) c_cairo_user_font_face_get_text_to_glyphs_func; // cairo.Device cairo_device_t* function(cairo_device_t* device) c_cairo_device_reference; void function(cairo_device_t* device) c_cairo_device_destroy; cairo_status_t function(cairo_device_t* device) c_cairo_device_status; void function(cairo_device_t* device) c_cairo_device_finish; void function(cairo_device_t* device) c_cairo_device_flush; cairo_device_type_t function(cairo_device_t* device) c_cairo_device_get_type; uint function(cairo_device_t* device) c_cairo_device_get_reference_count; cairo_status_t function(cairo_device_t* device, cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) c_cairo_device_set_user_data; void* function(cairo_device_t* device, cairo_user_data_key_t* key) c_cairo_device_get_user_data; cairo_status_t function(cairo_device_t* device) c_cairo_device_acquire; void function(cairo_device_t* device) c_cairo_device_release; // cairo.Surface cairo_surface_t* function(cairo_surface_t* other, cairo_content_t content, int width, int height) c_cairo_surface_create_similar; cairo_surface_t* function(cairo_surface_t* other, cairo_format_t format, int width, int height) c_cairo_surface_create_similar_image; cairo_surface_t* function(cairo_surface_t* target, double x, double y, double width, double height) c_cairo_surface_create_for_rectangle; cairo_surface_t* function(cairo_surface_t* surface) c_cairo_surface_reference; void function(cairo_surface_t* surface) c_cairo_surface_destroy; cairo_status_t function(cairo_surface_t* surface) c_cairo_surface_status; void function(cairo_surface_t* surface) c_cairo_surface_finish; void function(cairo_surface_t* surface) c_cairo_surface_flush; cairo_device_t* function(cairo_surface_t* surface) c_cairo_surface_get_device; void function(cairo_surface_t* surface, cairo_font_options_t* options) c_cairo_surface_get_font_options; cairo_content_t function(cairo_surface_t* surface) c_cairo_surface_get_content; void function(cairo_surface_t* surface) c_cairo_surface_mark_dirty; void function(cairo_surface_t* surface, int x, int y, int width, int height) c_cairo_surface_mark_dirty_rectangle; void function(cairo_surface_t* surface, double xOffset, double yOffset) c_cairo_surface_set_device_offset; void function(cairo_surface_t* surface, double* xOffset, double* yOffset) c_cairo_surface_get_device_offset; void function(cairo_surface_t* surface, double xPixelsPerInch, double yPixelsPerInch) c_cairo_surface_set_fallback_resolution; void function(cairo_surface_t* surface, double* xPixelsPerInch, double* yPixelsPerInch) c_cairo_surface_get_fallback_resolution; cairo_surface_type_t function(cairo_surface_t* surface) c_cairo_surface_get_type; uint function(cairo_surface_t* surface) c_cairo_surface_get_reference_count; cairo_status_t function(cairo_surface_t* surface, cairo_user_data_key_t* key, void* userData, cairo_destroy_func_t destroy) c_cairo_surface_set_user_data; void* function(cairo_surface_t* surface, cairo_user_data_key_t* key) c_cairo_surface_get_user_data; void function(cairo_surface_t* surface) c_cairo_surface_copy_page; void function(cairo_surface_t* surface) c_cairo_surface_show_page; cairo_bool_t function(cairo_surface_t* surface) c_cairo_surface_has_show_text_glyphs; cairo_status_t function(cairo_surface_t* surface, char* mimeType, uchar* data, ulong length, cairo_destroy_func_t destroy, void* closure) c_cairo_surface_set_mime_data; void function(cairo_surface_t* surface, char* mimeType, uchar** data, ulong* length) c_cairo_surface_get_mime_data; cairo_bool_t function(cairo_surface_t* surface, char* mimeType) c_cairo_surface_supports_mime_type; cairo_surface_t* function(cairo_surface_t* surface, cairo_rectangle_int_t* extents) c_cairo_surface_map_to_image; void function(cairo_surface_t* surface, cairo_surface_t* image) c_cairo_surface_unmap_image; // cairo.ImageSurface int function(cairo_format_t format, int width) c_cairo_format_stride_for_width; cairo_surface_t* function(cairo_format_t format, int width, int height) c_cairo_image_surface_create; cairo_surface_t* function(uchar* data, cairo_format_t format, int width, int height, int stride) c_cairo_image_surface_create_for_data; uchar* function(cairo_surface_t* surface) c_cairo_image_surface_get_data; cairo_format_t function(cairo_surface_t* surface) c_cairo_image_surface_get_format; int function(cairo_surface_t* surface) c_cairo_image_surface_get_width; int function(cairo_surface_t* surface) c_cairo_image_surface_get_height; int function(cairo_surface_t* surface) c_cairo_image_surface_get_stride; cairo_surface_t* function(char* filename) c_cairo_image_surface_create_from_png; cairo_surface_t* function(cairo_read_func_t readFunc, void* closure) c_cairo_image_surface_create_from_png_stream; cairo_status_t function(cairo_surface_t* surface, char* filename) c_cairo_surface_write_to_png; cairo_status_t function(cairo_surface_t* surface, cairo_write_func_t writeFunc, void* closure) c_cairo_surface_write_to_png_stream; // cairo.PdfSurface cairo_surface_t* function(char* filename, double widthInPoints, double heightInPoints) c_cairo_pdf_surface_create; cairo_surface_t* function(cairo_write_func_t writeFunc, void* closure, double widthInPoints, double heightInPoints) c_cairo_pdf_surface_create_for_stream; void function(cairo_surface_t* surface, cairo_pdf_version_t versio) c_cairo_pdf_surface_restrict_to_version; void function(cairo_pdf_version_t** versions, int* numVersions) c_cairo_pdf_get_versions; char* function(cairo_pdf_version_t versio) c_cairo_pdf_version_to_string; void function(cairo_surface_t* surface, double widthInPoints, double heightInPoints) c_cairo_pdf_surface_set_size; // cairo.PostScriptSurface cairo_surface_t* function(char* filename, double widthInPoints, double heightInPoints) c_cairo_ps_surface_create; cairo_surface_t* function(cairo_write_func_t writeFunc, void* closure, double widthInPoints, double heightInPoints) c_cairo_ps_surface_create_for_stream; void function(cairo_surface_t* surface, cairo_ps_level_t level) c_cairo_ps_surface_restrict_to_level; void function(cairo_ps_level_t** levels, int* numLevels) c_cairo_ps_get_levels; char* function(cairo_ps_level_t level) c_cairo_ps_level_to_string; void function(cairo_surface_t* surface, cairo_bool_t eps) c_cairo_ps_surface_set_eps; cairo_bool_t function(cairo_surface_t* surface) c_cairo_ps_surface_get_eps; void function(cairo_surface_t* surface, double widthInPoints, double heightInPoints) c_cairo_ps_surface_set_size; void function(cairo_surface_t* surface) c_cairo_ps_surface_dsc_begin_setup; void function(cairo_surface_t* surface) c_cairo_ps_surface_dsc_begin_page_setup; void function(cairo_surface_t* surface, char* comment) c_cairo_ps_surface_dsc_comment; // cairo.RecordingSurface cairo_surface_t* function(cairo_content_t content, cairo_rectangle_t* extents) c_cairo_recording_surface_create; void function(cairo_surface_t* surface, double* x0, double* y0, double* width, double* height) c_cairo_recording_surface_ink_extents; cairo_bool_t function(cairo_surface_t* surface, cairo_rectangle_t* extents) c_cairo_recording_surface_get_extents; // cairo.SvgSurface cairo_surface_t* function(char* filename, double widthInPoints, double heightInPoints) c_cairo_svg_surface_create; cairo_surface_t* function(cairo_write_func_t writeFunc, void* closure, double widthInPoints, double heightInPoints) c_cairo_svg_surface_create_for_stream; void function(cairo_surface_t* surface, cairo_svg_version_t versio) c_cairo_svg_surface_restrict_to_version; void function(cairo_svg_version_t** versions, int* numVersions) c_cairo_svg_get_versions; char* function(cairo_svg_version_t versio) c_cairo_svg_version_to_string; // cairo.Script cairo_device_t* function(char* filename) c_cairo_script_create; cairo_device_t* function(cairo_write_func_t writeFunc, void* closure) c_cairo_script_create_for_stream; cairo_status_t function(cairo_device_t* script, cairo_surface_t* recordingSurface) c_cairo_script_from_recording_surface; cairo_script_mode_t function(cairo_device_t* script) c_cairo_script_get_mode; void function(cairo_device_t* script, cairo_script_mode_t mode) c_cairo_script_set_mode; void function(cairo_device_t* script, char* comment, int len) c_cairo_script_write_comment; // cairo.ScriptSurface cairo_surface_t* function(cairo_device_t* script, cairo_content_t content, double width, double height) c_cairo_script_surface_create; cairo_surface_t* function(cairo_device_t* script, cairo_surface_t* target) c_cairo_script_surface_create_for_target; // cairo.Matrix void function(cairo_matrix_t* matrix, double xx, double yx, double xy, double yy, double x0, double y0) c_cairo_matrix_init; void function(cairo_matrix_t* matrix) c_cairo_matrix_init_identity; void function(cairo_matrix_t* matrix, double tx, double ty) c_cairo_matrix_init_translate; void function(cairo_matrix_t* matrix, double sx, double sy) c_cairo_matrix_init_scale; void function(cairo_matrix_t* matrix, double radians) c_cairo_matrix_init_rotate; void function(cairo_matrix_t* matrix, double tx, double ty) c_cairo_matrix_translate; void function(cairo_matrix_t* matrix, double sx, double sy) c_cairo_matrix_scale; void function(cairo_matrix_t* matrix, double radians) c_cairo_matrix_rotate; cairo_status_t function(cairo_matrix_t* matrix) c_cairo_matrix_invert; void function(cairo_matrix_t* result, cairo_matrix_t* a, cairo_matrix_t* b) c_cairo_matrix_multiply; void function(cairo_matrix_t* matrix, double* dx, double* dy) c_cairo_matrix_transform_distance; void function(cairo_matrix_t* matrix, double* x, double* y) c_cairo_matrix_transform_point; // cairo.Status char* function(cairo_status_t status) c_cairo_status_to_string; void function() c_cairo_debug_reset_static_data; // cairo.Version int function() c_cairo_version; char* function() c_cairo_version_string; // cairo. } // cairo.Context alias c_cairo_create cairo_create; alias c_cairo_reference cairo_reference; alias c_cairo_destroy cairo_destroy; alias c_cairo_status cairo_status; alias c_cairo_save cairo_save; alias c_cairo_restore cairo_restore; alias c_cairo_get_target cairo_get_target; alias c_cairo_push_group cairo_push_group; alias c_cairo_push_group_with_content cairo_push_group_with_content; alias c_cairo_pop_group cairo_pop_group; alias c_cairo_pop_group_to_source cairo_pop_group_to_source; alias c_cairo_get_group_target cairo_get_group_target; alias c_cairo_set_source_rgb cairo_set_source_rgb; alias c_cairo_set_source_rgba cairo_set_source_rgba; alias c_cairo_set_source cairo_set_source; alias c_cairo_set_source_surface cairo_set_source_surface; alias c_cairo_get_source cairo_get_source; alias c_cairo_set_antialias cairo_set_antialias; alias c_cairo_get_antialias cairo_get_antialias; alias c_cairo_set_dash cairo_set_dash; alias c_cairo_get_dash_count cairo_get_dash_count; alias c_cairo_get_dash cairo_get_dash; alias c_cairo_set_fill_rule cairo_set_fill_rule; alias c_cairo_get_fill_rule cairo_get_fill_rule; alias c_cairo_set_line_cap cairo_set_line_cap; alias c_cairo_get_line_cap cairo_get_line_cap; alias c_cairo_set_line_join cairo_set_line_join; alias c_cairo_get_line_join cairo_get_line_join; alias c_cairo_set_line_width cairo_set_line_width; alias c_cairo_get_line_width cairo_get_line_width; alias c_cairo_set_miter_limit cairo_set_miter_limit; alias c_cairo_get_miter_limit cairo_get_miter_limit; alias c_cairo_set_operator cairo_set_operator; alias c_cairo_get_operator cairo_get_operator; alias c_cairo_set_tolerance cairo_set_tolerance; alias c_cairo_get_tolerance cairo_get_tolerance; alias c_cairo_clip cairo_clip; alias c_cairo_clip_preserve cairo_clip_preserve; alias c_cairo_clip_extents cairo_clip_extents; alias c_cairo_in_clip cairo_in_clip; alias c_cairo_reset_clip cairo_reset_clip; alias c_cairo_rectangle_list_destroy cairo_rectangle_list_destroy; alias c_cairo_copy_clip_rectangle_list cairo_copy_clip_rectangle_list; alias c_cairo_fill cairo_fill; alias c_cairo_fill_preserve cairo_fill_preserve; alias c_cairo_fill_extents cairo_fill_extents; alias c_cairo_in_fill cairo_in_fill; alias c_cairo_mask cairo_mask; alias c_cairo_mask_surface cairo_mask_surface; alias c_cairo_paint cairo_paint; alias c_cairo_paint_with_alpha cairo_paint_with_alpha; alias c_cairo_stroke cairo_stroke; alias c_cairo_stroke_preserve cairo_stroke_preserve; alias c_cairo_stroke_extents cairo_stroke_extents; alias c_cairo_in_stroke cairo_in_stroke; alias c_cairo_copy_page cairo_copy_page; alias c_cairo_show_page cairo_show_page; alias c_cairo_get_reference_count cairo_get_reference_count; alias c_cairo_set_user_data cairo_set_user_data; alias c_cairo_get_user_data cairo_get_user_data; alias c_cairo_copy_path cairo_copy_path; alias c_cairo_copy_path_flat cairo_copy_path_flat; alias c_cairo_path_destroy cairo_path_destroy; alias c_cairo_append_path cairo_append_path; alias c_cairo_has_current_point cairo_has_current_point; alias c_cairo_get_current_point cairo_get_current_point; alias c_cairo_new_path cairo_new_path; alias c_cairo_new_sub_path cairo_new_sub_path; alias c_cairo_close_path cairo_close_path; alias c_cairo_arc cairo_arc; alias c_cairo_arc_negative cairo_arc_negative; alias c_cairo_curve_to cairo_curve_to; alias c_cairo_line_to cairo_line_to; alias c_cairo_move_to cairo_move_to; alias c_cairo_rectangle cairo_rectangle; alias c_cairo_glyph_path cairo_glyph_path; alias c_cairo_text_path cairo_text_path; alias c_cairo_rel_curve_to cairo_rel_curve_to; alias c_cairo_rel_line_to cairo_rel_line_to; alias c_cairo_rel_move_to cairo_rel_move_to; alias c_cairo_path_extents cairo_path_extents; alias c_cairo_translate cairo_translate; alias c_cairo_scale cairo_scale; alias c_cairo_rotate cairo_rotate; alias c_cairo_transform cairo_transform; alias c_cairo_set_matrix cairo_set_matrix; alias c_cairo_get_matrix cairo_get_matrix; alias c_cairo_identity_matrix cairo_identity_matrix; alias c_cairo_user_to_device cairo_user_to_device; alias c_cairo_user_to_device_distance cairo_user_to_device_distance; alias c_cairo_device_to_user cairo_device_to_user; alias c_cairo_device_to_user_distance cairo_device_to_user_distance; alias c_cairo_select_font_face cairo_select_font_face; alias c_cairo_set_font_size cairo_set_font_size; alias c_cairo_set_font_matrix cairo_set_font_matrix; alias c_cairo_get_font_matrix cairo_get_font_matrix; alias c_cairo_set_font_options cairo_set_font_options; alias c_cairo_get_font_options cairo_get_font_options; alias c_cairo_set_font_face cairo_set_font_face; alias c_cairo_get_font_face cairo_get_font_face; alias c_cairo_set_scaled_font cairo_set_scaled_font; alias c_cairo_get_scaled_font cairo_get_scaled_font; alias c_cairo_show_text cairo_show_text; alias c_cairo_show_glyphs cairo_show_glyphs; alias c_cairo_show_text_glyphs cairo_show_text_glyphs; alias c_cairo_font_extents cairo_font_extents; alias c_cairo_text_extents cairo_text_extents; alias c_cairo_glyph_extents cairo_glyph_extents; alias c_cairo_toy_font_face_create cairo_toy_font_face_create; alias c_cairo_toy_font_face_get_family cairo_toy_font_face_get_family; alias c_cairo_toy_font_face_get_slant cairo_toy_font_face_get_slant; alias c_cairo_toy_font_face_get_weight cairo_toy_font_face_get_weight; alias c_cairo_glyph_allocate cairo_glyph_allocate; alias c_cairo_glyph_free cairo_glyph_free; alias c_cairo_text_cluster_allocate cairo_text_cluster_allocate; alias c_cairo_text_cluster_free cairo_text_cluster_free; // cairo.Pattern alias c_cairo_pattern_add_color_stop_rgb cairo_pattern_add_color_stop_rgb; alias c_cairo_pattern_add_color_stop_rgba cairo_pattern_add_color_stop_rgba; alias c_cairo_pattern_get_color_stop_count cairo_pattern_get_color_stop_count; alias c_cairo_pattern_get_color_stop_rgba cairo_pattern_get_color_stop_rgba; alias c_cairo_pattern_create_rgb cairo_pattern_create_rgb; alias c_cairo_pattern_create_rgba cairo_pattern_create_rgba; alias c_cairo_pattern_get_rgba cairo_pattern_get_rgba; alias c_cairo_pattern_create_for_surface cairo_pattern_create_for_surface; alias c_cairo_pattern_get_surface cairo_pattern_get_surface; alias c_cairo_pattern_create_linear cairo_pattern_create_linear; alias c_cairo_pattern_get_linear_points cairo_pattern_get_linear_points; alias c_cairo_pattern_create_radial cairo_pattern_create_radial; alias c_cairo_pattern_get_radial_circles cairo_pattern_get_radial_circles; alias c_cairo_pattern_create_mesh cairo_pattern_create_mesh; alias c_cairo_pattern_reference cairo_pattern_reference; alias c_cairo_pattern_destroy cairo_pattern_destroy; alias c_cairo_pattern_status cairo_pattern_status; alias c_cairo_pattern_set_extend cairo_pattern_set_extend; alias c_cairo_pattern_get_extend cairo_pattern_get_extend; alias c_cairo_pattern_set_filter cairo_pattern_set_filter; alias c_cairo_pattern_get_filter cairo_pattern_get_filter; alias c_cairo_pattern_set_matrix cairo_pattern_set_matrix; alias c_cairo_pattern_get_matrix cairo_pattern_get_matrix; alias c_cairo_pattern_get_type cairo_pattern_get_type; alias c_cairo_pattern_get_reference_count cairo_pattern_get_reference_count; alias c_cairo_pattern_set_user_data cairo_pattern_set_user_data; alias c_cairo_pattern_get_user_data cairo_pattern_get_user_data; // cairo.MeshPattern alias c_cairo_mesh_pattern_begin_patch cairo_mesh_pattern_begin_patch; alias c_cairo_mesh_pattern_end_patch cairo_mesh_pattern_end_patch; alias c_cairo_mesh_pattern_move_to cairo_mesh_pattern_move_to; alias c_cairo_mesh_pattern_line_to cairo_mesh_pattern_line_to; alias c_cairo_mesh_pattern_curve_to cairo_mesh_pattern_curve_to; alias c_cairo_mesh_pattern_set_control_point cairo_mesh_pattern_set_control_point; alias c_cairo_mesh_pattern_set_corner_color_rgb cairo_mesh_pattern_set_corner_color_rgb; alias c_cairo_mesh_pattern_set_corner_color_rgba cairo_mesh_pattern_set_corner_color_rgba; alias c_cairo_mesh_pattern_get_patch_count cairo_mesh_pattern_get_patch_count; alias c_cairo_mesh_pattern_get_path cairo_mesh_pattern_get_path; alias c_cairo_mesh_pattern_get_control_point cairo_mesh_pattern_get_control_point; alias c_cairo_mesh_pattern_get_corner_color_rgba cairo_mesh_pattern_get_corner_color_rgba; // cairo.Region alias c_cairo_region_create cairo_region_create; alias c_cairo_region_create_rectangle cairo_region_create_rectangle; alias c_cairo_region_create_rectangles cairo_region_create_rectangles; alias c_cairo_region_copy cairo_region_copy; alias c_cairo_region_reference cairo_region_reference; alias c_cairo_region_destroy cairo_region_destroy; alias c_cairo_region_status cairo_region_status; alias c_cairo_region_get_extents cairo_region_get_extents; alias c_cairo_region_num_rectangles cairo_region_num_rectangles; alias c_cairo_region_get_rectangle cairo_region_get_rectangle; alias c_cairo_region_is_empty cairo_region_is_empty; alias c_cairo_region_contains_point cairo_region_contains_point; alias c_cairo_region_contains_rectangle cairo_region_contains_rectangle; alias c_cairo_region_equal cairo_region_equal; alias c_cairo_region_translate cairo_region_translate; alias c_cairo_region_intersect cairo_region_intersect; alias c_cairo_region_intersect_rectangle cairo_region_intersect_rectangle; alias c_cairo_region_subtract cairo_region_subtract; alias c_cairo_region_subtract_rectangle cairo_region_subtract_rectangle; alias c_cairo_region_union cairo_region_union; alias c_cairo_region_union_rectangle cairo_region_union_rectangle; alias c_cairo_region_xor cairo_region_xor; alias c_cairo_region_xor_rectangle cairo_region_xor_rectangle; // cairo.RasterSource alias c_cairo_pattern_create_raster_source cairo_pattern_create_raster_source; alias c_cairo_raster_source_pattern_set_callback_data cairo_raster_source_pattern_set_callback_data; alias c_cairo_raster_source_pattern_get_callback_data cairo_raster_source_pattern_get_callback_data; alias c_cairo_raster_source_pattern_set_acquire cairo_raster_source_pattern_set_acquire; alias c_cairo_raster_source_pattern_get_acquire cairo_raster_source_pattern_get_acquire; alias c_cairo_raster_source_pattern_set_snapshot cairo_raster_source_pattern_set_snapshot; alias c_cairo_raster_source_pattern_get_snapshot cairo_raster_source_pattern_get_snapshot; alias c_cairo_raster_source_pattern_set_copy cairo_raster_source_pattern_set_copy; alias c_cairo_raster_source_pattern_get_copy cairo_raster_source_pattern_get_copy; alias c_cairo_raster_source_pattern_set_finish cairo_raster_source_pattern_set_finish; alias c_cairo_raster_source_pattern_get_finish cairo_raster_source_pattern_get_finish; // cairo.FontFace alias c_cairo_font_face_reference cairo_font_face_reference; alias c_cairo_font_face_destroy cairo_font_face_destroy; alias c_cairo_font_face_status cairo_font_face_status; alias c_cairo_font_face_get_type cairo_font_face_get_type; alias c_cairo_font_face_get_reference_count cairo_font_face_get_reference_count; alias c_cairo_font_face_set_user_data cairo_font_face_set_user_data; alias c_cairo_font_face_get_user_data cairo_font_face_get_user_data; // cairo.ScaledFont alias c_cairo_scaled_font_create cairo_scaled_font_create; alias c_cairo_scaled_font_reference cairo_scaled_font_reference; alias c_cairo_scaled_font_destroy cairo_scaled_font_destroy; alias c_cairo_scaled_font_status cairo_scaled_font_status; alias c_cairo_scaled_font_extents cairo_scaled_font_extents; alias c_cairo_scaled_font_text_extents cairo_scaled_font_text_extents; alias c_cairo_scaled_font_glyph_extents cairo_scaled_font_glyph_extents; alias c_cairo_scaled_font_text_to_glyphs cairo_scaled_font_text_to_glyphs; alias c_cairo_scaled_font_get_font_face cairo_scaled_font_get_font_face; alias c_cairo_scaled_font_get_font_options cairo_scaled_font_get_font_options; alias c_cairo_scaled_font_get_font_matrix cairo_scaled_font_get_font_matrix; alias c_cairo_scaled_font_get_ctm cairo_scaled_font_get_ctm; alias c_cairo_scaled_font_get_scale_matrix cairo_scaled_font_get_scale_matrix; alias c_cairo_scaled_font_get_type cairo_scaled_font_get_type; alias c_cairo_scaled_font_get_reference_count cairo_scaled_font_get_reference_count; alias c_cairo_scaled_font_set_user_data cairo_scaled_font_set_user_data; alias c_cairo_scaled_font_get_user_data cairo_scaled_font_get_user_data; // cairo.FontOption alias c_cairo_font_options_create cairo_font_options_create; alias c_cairo_font_options_copy cairo_font_options_copy; alias c_cairo_font_options_destroy cairo_font_options_destroy; alias c_cairo_font_options_status cairo_font_options_status; alias c_cairo_font_options_merge cairo_font_options_merge; alias c_cairo_font_options_hash cairo_font_options_hash; alias c_cairo_font_options_equal cairo_font_options_equal; alias c_cairo_font_options_set_antialias cairo_font_options_set_antialias; alias c_cairo_font_options_get_antialias cairo_font_options_get_antialias; alias c_cairo_font_options_set_subpixel_order cairo_font_options_set_subpixel_order; alias c_cairo_font_options_get_subpixel_order cairo_font_options_get_subpixel_order; alias c_cairo_font_options_set_hint_style cairo_font_options_set_hint_style; alias c_cairo_font_options_get_hint_style cairo_font_options_get_hint_style; alias c_cairo_font_options_set_hint_metrics cairo_font_options_set_hint_metrics; alias c_cairo_font_options_get_hint_metrics cairo_font_options_get_hint_metrics; // cairo.UserFontFace alias c_cairo_user_font_face_create cairo_user_font_face_create; alias c_cairo_user_font_face_set_init_func cairo_user_font_face_set_init_func; alias c_cairo_user_font_face_get_init_func cairo_user_font_face_get_init_func; alias c_cairo_user_font_face_set_render_glyph_func cairo_user_font_face_set_render_glyph_func; alias c_cairo_user_font_face_get_render_glyph_func cairo_user_font_face_get_render_glyph_func; alias c_cairo_user_font_face_set_unicode_to_glyph_func cairo_user_font_face_set_unicode_to_glyph_func; alias c_cairo_user_font_face_get_unicode_to_glyph_func cairo_user_font_face_get_unicode_to_glyph_func; alias c_cairo_user_font_face_set_text_to_glyphs_func cairo_user_font_face_set_text_to_glyphs_func; alias c_cairo_user_font_face_get_text_to_glyphs_func cairo_user_font_face_get_text_to_glyphs_func; // cairo.Device alias c_cairo_device_reference cairo_device_reference; alias c_cairo_device_destroy cairo_device_destroy; alias c_cairo_device_status cairo_device_status; alias c_cairo_device_finish cairo_device_finish; alias c_cairo_device_flush cairo_device_flush; alias c_cairo_device_get_type cairo_device_get_type; alias c_cairo_device_get_reference_count cairo_device_get_reference_count; alias c_cairo_device_set_user_data cairo_device_set_user_data; alias c_cairo_device_get_user_data cairo_device_get_user_data; alias c_cairo_device_acquire cairo_device_acquire; alias c_cairo_device_release cairo_device_release; // cairo.Surface alias c_cairo_surface_create_similar cairo_surface_create_similar; alias c_cairo_surface_create_similar_image cairo_surface_create_similar_image; alias c_cairo_surface_create_for_rectangle cairo_surface_create_for_rectangle; alias c_cairo_surface_reference cairo_surface_reference; alias c_cairo_surface_destroy cairo_surface_destroy; alias c_cairo_surface_status cairo_surface_status; alias c_cairo_surface_finish cairo_surface_finish; alias c_cairo_surface_flush cairo_surface_flush; alias c_cairo_surface_get_device cairo_surface_get_device; alias c_cairo_surface_get_font_options cairo_surface_get_font_options; alias c_cairo_surface_get_content cairo_surface_get_content; alias c_cairo_surface_mark_dirty cairo_surface_mark_dirty; alias c_cairo_surface_mark_dirty_rectangle cairo_surface_mark_dirty_rectangle; alias c_cairo_surface_set_device_offset cairo_surface_set_device_offset; alias c_cairo_surface_get_device_offset cairo_surface_get_device_offset; alias c_cairo_surface_set_fallback_resolution cairo_surface_set_fallback_resolution; alias c_cairo_surface_get_fallback_resolution cairo_surface_get_fallback_resolution; alias c_cairo_surface_get_type cairo_surface_get_type; alias c_cairo_surface_get_reference_count cairo_surface_get_reference_count; alias c_cairo_surface_set_user_data cairo_surface_set_user_data; alias c_cairo_surface_get_user_data cairo_surface_get_user_data; alias c_cairo_surface_copy_page cairo_surface_copy_page; alias c_cairo_surface_show_page cairo_surface_show_page; alias c_cairo_surface_has_show_text_glyphs cairo_surface_has_show_text_glyphs; alias c_cairo_surface_set_mime_data cairo_surface_set_mime_data; alias c_cairo_surface_get_mime_data cairo_surface_get_mime_data; alias c_cairo_surface_supports_mime_type cairo_surface_supports_mime_type; alias c_cairo_surface_map_to_image cairo_surface_map_to_image; alias c_cairo_surface_unmap_image cairo_surface_unmap_image; // cairo.ImageSurface alias c_cairo_format_stride_for_width cairo_format_stride_for_width; alias c_cairo_image_surface_create cairo_image_surface_create; alias c_cairo_image_surface_create_for_data cairo_image_surface_create_for_data; alias c_cairo_image_surface_get_data cairo_image_surface_get_data; alias c_cairo_image_surface_get_format cairo_image_surface_get_format; alias c_cairo_image_surface_get_width cairo_image_surface_get_width; alias c_cairo_image_surface_get_height cairo_image_surface_get_height; alias c_cairo_image_surface_get_stride cairo_image_surface_get_stride; alias c_cairo_image_surface_create_from_png cairo_image_surface_create_from_png; alias c_cairo_image_surface_create_from_png_stream cairo_image_surface_create_from_png_stream; alias c_cairo_surface_write_to_png cairo_surface_write_to_png; alias c_cairo_surface_write_to_png_stream cairo_surface_write_to_png_stream; // cairo.PdfSurface alias c_cairo_pdf_surface_create cairo_pdf_surface_create; alias c_cairo_pdf_surface_create_for_stream cairo_pdf_surface_create_for_stream; alias c_cairo_pdf_surface_restrict_to_version cairo_pdf_surface_restrict_to_version; alias c_cairo_pdf_get_versions cairo_pdf_get_versions; alias c_cairo_pdf_version_to_string cairo_pdf_version_to_string; alias c_cairo_pdf_surface_set_size cairo_pdf_surface_set_size; // cairo.PostScriptSurface alias c_cairo_ps_surface_create cairo_ps_surface_create; alias c_cairo_ps_surface_create_for_stream cairo_ps_surface_create_for_stream; alias c_cairo_ps_surface_restrict_to_level cairo_ps_surface_restrict_to_level; alias c_cairo_ps_get_levels cairo_ps_get_levels; alias c_cairo_ps_level_to_string cairo_ps_level_to_string; alias c_cairo_ps_surface_set_eps cairo_ps_surface_set_eps; alias c_cairo_ps_surface_get_eps cairo_ps_surface_get_eps; alias c_cairo_ps_surface_set_size cairo_ps_surface_set_size; alias c_cairo_ps_surface_dsc_begin_setup cairo_ps_surface_dsc_begin_setup; alias c_cairo_ps_surface_dsc_begin_page_setup cairo_ps_surface_dsc_begin_page_setup; alias c_cairo_ps_surface_dsc_comment cairo_ps_surface_dsc_comment; // cairo.RecordingSurface alias c_cairo_recording_surface_create cairo_recording_surface_create; alias c_cairo_recording_surface_ink_extents cairo_recording_surface_ink_extents; alias c_cairo_recording_surface_get_extents cairo_recording_surface_get_extents; // cairo.SvgSurface alias c_cairo_svg_surface_create cairo_svg_surface_create; alias c_cairo_svg_surface_create_for_stream cairo_svg_surface_create_for_stream; alias c_cairo_svg_surface_restrict_to_version cairo_svg_surface_restrict_to_version; alias c_cairo_svg_get_versions cairo_svg_get_versions; alias c_cairo_svg_version_to_string cairo_svg_version_to_string; // cairo.Script alias c_cairo_script_create cairo_script_create; alias c_cairo_script_create_for_stream cairo_script_create_for_stream; alias c_cairo_script_from_recording_surface cairo_script_from_recording_surface; alias c_cairo_script_get_mode cairo_script_get_mode; alias c_cairo_script_set_mode cairo_script_set_mode; alias c_cairo_script_write_comment cairo_script_write_comment; // cairo.ScriptSurface alias c_cairo_script_surface_create cairo_script_surface_create; alias c_cairo_script_surface_create_for_target cairo_script_surface_create_for_target; // cairo.Matrix alias c_cairo_matrix_init cairo_matrix_init; alias c_cairo_matrix_init_identity cairo_matrix_init_identity; alias c_cairo_matrix_init_translate cairo_matrix_init_translate; alias c_cairo_matrix_init_scale cairo_matrix_init_scale; alias c_cairo_matrix_init_rotate cairo_matrix_init_rotate; alias c_cairo_matrix_translate cairo_matrix_translate; alias c_cairo_matrix_scale cairo_matrix_scale; alias c_cairo_matrix_rotate cairo_matrix_rotate; alias c_cairo_matrix_invert cairo_matrix_invert; alias c_cairo_matrix_multiply cairo_matrix_multiply; alias c_cairo_matrix_transform_distance cairo_matrix_transform_distance; alias c_cairo_matrix_transform_point cairo_matrix_transform_point; // cairo.Status alias c_cairo_status_to_string cairo_status_to_string; alias c_cairo_debug_reset_static_data cairo_debug_reset_static_data; // cairo.Version alias c_cairo_version cairo_version; alias c_cairo_version_string cairo_version_string; // cairo. GtkD-3.7.5/generated/gtkd/cairo/c/types.d000066400000000000000000001776251324604450400201220ustar00rootroot00000000000000/* * 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 cairo.c.types; public import glib.c.types; //public import std.c.windows.windows; private alias void* HDC; public alias void cairo_path_data_t; alias ubyte uchar; /** * typedef int cairo_bool_t; * cairo_bool_t is used for boolean values. Returns of type * cairo_bool_t will always be either 0 or 1, but testing against * these values explicitly is not encouraged; just use the * value as a boolean condition. * $(DDOC_COMMENT example) * Since 1.0 */ public alias int cairo_bool_t; /** * Specifies the type of antialiasing to do when rendering text or shapes. * As it is not necessarily clear from the above what advantages a particular * antialias method provides, since 1.12, there is also a set of hints: * CAIRO_ANTIALIAS_FAST: Allow the backend to degrade raster quality for speed * CAIRO_ANTIALIAS_GOOD: A balance between speed and quality * CAIRO_ANTIALIAS_BEST: A high-fidelity, but potentially slow, raster mode * These make no guarantee on how the backend will perform its rasterisation * (if it even rasterises!), nor that they have any differing effect other * than to enable some form of antialiasing. In the case of glyph rendering, * CAIRO_ANTIALIAS_FAST and CAIRO_ANTIALIAS_GOOD will be mapped to * CAIRO_ANTIALIAS_GRAY, with CAIRO_ANTALIAS_BEST being equivalent to * CAIRO_ANTIALIAS_SUBPIXEL. * The interpretation of CAIRO_ANTIALIAS_DEFAULT is left entirely up to * the backend, typically this will be similar to CAIRO_ANTIALIAS_GOOD. * CAIRO_ANTIALIAS_DEFAULT * Use the default antialiasing for * the subsystem and target device, since 1.0 * CAIRO_ANTIALIAS_NONE * Use a bilevel alpha mask, since 1.0 * CAIRO_ANTIALIAS_GRAY * Perform single-color antialiasing (using * shades of gray for black text on a white background, for example), since 1.0 * CAIRO_ANTIALIAS_SUBPIXEL * Perform antialiasing by taking * advantage of the order of subpixel elements on devices * such as LCD panels, since 1.0 * CAIRO_ANTIALIAS_FAST * Hint that the backend should perform some * antialiasing but prefer speed over quality, since 1.12 * CAIRO_ANTIALIAS_GOOD * The backend should balance quality against * performance, since 1.12 * CAIRO_ANTIALIAS_BEST * Hint that the backend should render at the highest * quality, sacrificing speed if necessary, since 1.12 * Since 1.0 */ public enum cairo_antialias_t { DEFAULT, /+* method +/ NONE, GRAY, SUBPIXEL, /+* hints +/ FAST, GOOD, BEST } alias cairo_antialias_t CairoAntialias; /** * cairo_fill_rule_t is used to select how paths are filled. For both * fill rules, whether or not a point is included in the fill is * determined by taking a ray from that point to infinity and looking * at intersections with the path. The ray can be in any direction, * as long as it doesn't pass through the end point of a segment * or have a tricky intersection such as intersecting tangent to the path. * (Note that filling is not actually implemented in this way. This * is just a description of the rule that is applied.) * The default fill rule is CAIRO_FILL_RULE_WINDING. * New entries may be added in future versions. * CAIRO_FILL_RULE_WINDING * If the path crosses the ray from * left-to-right, counts +1. If the path crosses the ray * from right to left, counts -1. (Left and right are determined * from the perspective of looking along the ray from the starting * point.) If the total count is non-zero, the point will be filled. (Since 1.0) * CAIRO_FILL_RULE_EVEN_ODD * Counts the total number of * intersections, without regard to the orientation of the contour. If * the total number of intersections is odd, the point will be * filled. (Since 1.0) * Since 1.0 */ public enum cairo_fill_rule_t { WINDING, EVEN_ODD } alias cairo_fill_rule_t CairoFillRule; /** * Specifies how to render the endpoints of the path when stroking. * The default line cap style is CAIRO_LINE_CAP_BUTT. * CAIRO_LINE_CAP_BUTT * start(stop) the line exactly at the start(end) point (Since 1.0) * CAIRO_LINE_CAP_ROUND * use a round ending, the center of the circle is the end point (Since 1.0) * CAIRO_LINE_CAP_SQUARE * use squared ending, the center of the square is the end point (Since 1.0) * Since 1.0 */ public enum cairo_line_cap_t { BUTT, ROUND, SQUARE } alias cairo_line_cap_t CairoLineCap; /** * Specifies how to render the junction of two lines when stroking. * The default line join style is CAIRO_LINE_JOIN_MITER. * CAIRO_LINE_JOIN_MITER * use a sharp (angled) corner, see * cairo_set_miter_limit() (Since 1.0) * CAIRO_LINE_JOIN_ROUND * use a rounded join, the center of the circle is the * joint point (Since 1.0) * CAIRO_LINE_JOIN_BEVEL * use a cut-off join, the join is cut off at half * the line width from the joint point (Since 1.0) * Since 1.0 */ public enum cairo_line_join_t { MITER, ROUND, BEVEL } alias cairo_line_join_t CairoLineJoin; /** * cairo_operator_t is used to set the compositing operator for all cairo * drawing operations. * The default operator is CAIRO_OPERATOR_OVER. * The operators marked as unbounded modify their * destination even outside of the mask layer (that is, their effect is not * bound by the mask layer). However, their effect can still be limited by * way of clipping. * To keep things simple, the operator descriptions here * document the behavior for when both source and destination are either fully * transparent or fully opaque. The actual implementation works for * translucent layers too. * For a more detailed explanation of the effects of each operator, including * the mathematical definitions, see * http://cairographics.org/operators/. * CAIRO_OPERATOR_CLEAR * clear destination layer (bounded) (Since 1.0) * CAIRO_OPERATOR_SOURCE * replace destination layer (bounded) (Since 1.0) * CAIRO_OPERATOR_OVER * draw source layer on top of destination layer * (bounded) (Since 1.0) * CAIRO_OPERATOR_IN * draw source where there was destination content * (unbounded) (Since 1.0) * CAIRO_OPERATOR_OUT * draw source where there was no destination * content (unbounded) (Since 1.0) * CAIRO_OPERATOR_ATOP * draw source on top of destination content and * only there (Since 1.0) * CAIRO_OPERATOR_DEST * ignore the source (Since 1.0) * CAIRO_OPERATOR_DEST_OVER * draw destination on top of source (Since 1.0) * CAIRO_OPERATOR_DEST_IN * leave destination only where there was * source content (unbounded) (Since 1.0) * CAIRO_OPERATOR_DEST_OUT * leave destination only where there was no * source content (Since 1.0) * CAIRO_OPERATOR_DEST_ATOP * leave destination on top of source content * and only there (unbounded) (Since 1.0) * CAIRO_OPERATOR_XOR * source and destination are shown where there is only * one of them (Since 1.0) * CAIRO_OPERATOR_ADD * source and destination layers are accumulated (Since 1.0) * CAIRO_OPERATOR_SATURATE * like over, but assuming source and dest are * disjoint geometries (Since 1.0) * CAIRO_OPERATOR_MULTIPLY * source and destination layers are multiplied. * This causes the result to be at least as dark as the darker inputs. (Since 1.10) * CAIRO_OPERATOR_SCREEN * source and destination are complemented and * multiplied. This causes the result to be at least as light as the lighter * inputs. (Since 1.10) * CAIRO_OPERATOR_OVERLAY * multiplies or screens, depending on the * lightness of the destination color. (Since 1.10) * CAIRO_OPERATOR_DARKEN * replaces the destination with the source if it * is darker, otherwise keeps the source. (Since 1.10) * CAIRO_OPERATOR_LIGHTEN * replaces the destination with the source if it * is lighter, otherwise keeps the source. (Since 1.10) * CAIRO_OPERATOR_COLOR_DODGE * brightens the destination color to reflect * the source color. (Since 1.10) * CAIRO_OPERATOR_COLOR_BURN * darkens the destination color to reflect * the source color. (Since 1.10) * CAIRO_OPERATOR_HARD_LIGHT * Multiplies or screens, dependent on source * color. (Since 1.10) * CAIRO_OPERATOR_SOFT_LIGHT * Darkens or lightens, dependent on source * color. (Since 1.10) * CAIRO_OPERATOR_DIFFERENCE * Takes the difference of the source and * destination color. (Since 1.10) * CAIRO_OPERATOR_EXCLUSION * Produces an effect similar to difference, but * with lower contrast. (Since 1.10) * CAIRO_OPERATOR_HSL_HUE * Creates a color with the hue of the source * and the saturation and luminosity of the target. (Since 1.10) * CAIRO_OPERATOR_HSL_SATURATION * Creates a color with the saturation * of the source and the hue and luminosity of the target. Painting with * this mode onto a gray area produces no change. (Since 1.10) * CAIRO_OPERATOR_HSL_COLOR * Creates a color with the hue and saturation * of the source and the luminosity of the target. This preserves the gray * levels of the target and is useful for coloring monochrome images or * tinting color images. (Since 1.10) * CAIRO_OPERATOR_HSL_LUMINOSITY * Creates a color with the luminosity of * the source and the hue and saturation of the target. This produces an * inverse effect to CAIRO_OPERATOR_HSL_COLOR. (Since 1.10) * Since 1.0 */ public enum cairo_operator_t { CLEAR, SOURCE, OVER, IN, OUT, ATOP, DEST, DEST_OVER, DEST_IN, DEST_OUT, DEST_ATOP, XOR, ADD, SATURATE, MULTIPLY, SCREEN, OVERLAY, DARKEN, LIGHTEN, COLOR_DODGE, COLOR_BURN, HARD_LIGHT, SOFT_LIGHT, DIFFERENCE, EXCLUSION, HSL_HUE, HSL_SATURATION, HSL_COLOR, HSL_LUMINOSITY } alias cairo_operator_t CairoOperator; /** * cairo_path_data_t is used to describe the type of one portion * of a path when represented as a cairo_path_t. * See cairo_path_data_t for details. * CAIRO_PATH_MOVE_TO * A move-to operation, since 1.0 * CAIRO_PATH_LINE_TO * A line-to operation, since 1.0 * CAIRO_PATH_CURVE_TO * A curve-to operation, since 1.0 * CAIRO_PATH_CLOSE_PATH * A close-path operation, since 1.0 * Since 1.0 */ public enum cairo_path_data_type_t { MOVE_TO, LINE_TO, CURVE_TO, CLOSE_PATH } alias cairo_path_data_type_t CairoPathDataType; /** * Specifies variants of a font face based on their slant. * CAIRO_FONT_SLANT_NORMAL * Upright font style, since 1.0 * CAIRO_FONT_SLANT_ITALIC * Italic font style, since 1.0 * CAIRO_FONT_SLANT_OBLIQUE * Oblique font style, since 1.0 * Since 1.0 */ public enum cairo_font_slant_t { NORMAL, ITALIC, OBLIQUE } alias cairo_font_slant_t CairoFontSlant; /** * Specifies variants of a font face based on their weight. * CAIRO_FONT_WEIGHT_NORMAL * Normal font weight, since 1.0 * CAIRO_FONT_WEIGHT_BOLD * Bold font weight, since 1.0 * Since 1.0 */ public enum cairo_font_weight_t { NORMAL, BOLD } alias cairo_font_weight_t CairoFontWeight; /** * Specifies properties of a text cluster mapping. * CAIRO_TEXT_CLUSTER_FLAG_BACKWARD * The clusters in the cluster array * map to glyphs in the glyph array from end to start. (Since 1.8) * Since 1.8 */ public enum cairo_text_cluster_flags_t { BACKWARD = 0x00000001 } alias cairo_text_cluster_flags_t CairoTextClusterFlags; /** * cairo_extend_t is used to describe how pattern color/alpha will be * determined for areas "outside" the pattern's natural area, (for * example, outside the surface bounds or outside the gradient * geometry). * Mesh patterns are not affected by the extend mode. * The default extend mode is CAIRO_EXTEND_NONE for surface patterns * and CAIRO_EXTEND_PAD for gradient patterns. * New entries may be added in future versions. * CAIRO_EXTEND_NONE * pixels outside of the source pattern * are fully transparent (Since 1.0) * CAIRO_EXTEND_REPEAT * the pattern is tiled by repeating (Since 1.0) * CAIRO_EXTEND_REFLECT * the pattern is tiled by reflecting * at the edges (Since 1.0; but only implemented for surface patterns since 1.6) * CAIRO_EXTEND_PAD * pixels outside of the pattern copy * the closest pixel from the source (Since 1.2; but only * implemented for surface patterns since 1.6) * Since 1.0 */ public enum cairo_extend_t { NONE, REPEAT, REFLECT, PAD } alias cairo_extend_t CairoExtend; /** * cairo_filter_t is used to indicate what filtering should be * applied when reading pixel values from patterns. See * cairo_pattern_set_filter() for indicating the desired filter to be * used with a particular pattern. * CAIRO_FILTER_FAST * A high-performance filter, with quality similar * to CAIRO_FILTER_NEAREST (Since 1.0) * CAIRO_FILTER_GOOD * A reasonable-performance filter, with quality * similar to CAIRO_FILTER_BILINEAR (Since 1.0) * CAIRO_FILTER_BEST * The highest-quality available, performance may * not be suitable for interactive use. (Since 1.0) * CAIRO_FILTER_NEAREST * Nearest-neighbor filtering (Since 1.0) * CAIRO_FILTER_BILINEAR * Linear interpolation in two dimensions (Since 1.0) * CAIRO_FILTER_GAUSSIAN * This filter value is currently * unimplemented, and should not be used in current code. (Since 1.0) * Since 1.0 */ public enum cairo_filter_t { FAST, GOOD, BEST, NEAREST, BILINEAR, GAUSSIAN } alias cairo_filter_t CairoFilter; /** * cairo_pattern_type_t is used to describe the type of a given pattern. * The type of a pattern is determined by the function used to create * it. The cairo_pattern_create_rgb() and cairo_pattern_create_rgba() * functions create SOLID patterns. The remaining * cairo_pattern_create functions map to pattern types in obvious * ways. * The pattern type can be queried with cairo_pattern_get_type() * Most cairo_pattern_t functions can be called with a pattern of any * type, (though trying to change the extend or filter for a solid * pattern will have no effect). A notable exception is * cairo_pattern_add_color_stop_rgb() and * cairo_pattern_add_color_stop_rgba() which must only be called with * gradient patterns (either LINEAR or RADIAL). Otherwise the pattern * will be shutdown and put into an error state. * New entries may be added in future versions. * CAIRO_PATTERN_TYPE_SOLID * The pattern is a solid (uniform) * color. It may be opaque or translucent, since 1.2. * CAIRO_PATTERN_TYPE_SURFACE * The pattern is a based on a surface (an image), since 1.2. * CAIRO_PATTERN_TYPE_LINEAR * The pattern is a linear gradient, since 1.2. * CAIRO_PATTERN_TYPE_RADIAL * The pattern is a radial gradient, since 1.2. * CAIRO_PATTERN_TYPE_MESH * The pattern is a mesh, since 1.12. * CAIRO_PATTERN_TYPE_RASTER_SOURCE * The pattern is a user pattern providing raster data, since 1.12. * Since 1.2 */ public enum cairo_pattern_type_t { SOLID, SURFACE, LINEAR, RADIAL, MESH, RASTER_SOURCE } alias cairo_pattern_type_t CairoPatternType; /** * Used as the return value for cairo_region_contains_rectangle(). * CAIRO_REGION_OVERLAP_IN * The contents are entirely inside the region. (Since 1.10) * CAIRO_REGION_OVERLAP_OUT * The contents are entirely outside the region. (Since 1.10) * CAIRO_REGION_OVERLAP_PART * The contents are partially inside and * partially outside the region. (Since 1.10) * Since 1.10 */ public enum cairo_region_overlap_t { IN, /+* completely inside region +/ OUT, /+* completely outside region +/ PART /+* partly inside region +/ } alias cairo_region_overlap_t CairoRegionOverlap; /** * cairo_font_type_t is used to describe the type of a given font * face or scaled font. The font types are also known as "font * backends" within cairo. * The type of a font face is determined by the function used to * create it, which will generally be of the form * cairo_type_font_face_create(). * The font face type can be queried with cairo_font_face_get_type() * The various cairo_font_face_t functions can be used with a font face * of any type. * The type of a scaled font is determined by the type of the font * face passed to cairo_scaled_font_create(). The scaled font type can * be queried with cairo_scaled_font_get_type() * The various cairo_scaled_font_t functions can be used with scaled * fonts of any type, but some font backends also provide * type-specific functions that must only be called with a scaled font * of the appropriate type. These functions have names that begin with * cairo_type_scaled_font() * such as cairo_ft_scaled_font_lock_face(). * The behavior of calling a type-specific function with a scaled font * of the wrong type is undefined. * New entries may be added in future versions. * CAIRO_FONT_TYPE_TOY * The font was created using cairo's toy font api (Since: 1.2) * CAIRO_FONT_TYPE_FT * The font is of type FreeType (Since: 1.2) * CAIRO_FONT_TYPE_WIN32 * The font is of type Win32 (Since: 1.2) * CAIRO_FONT_TYPE_QUARTZ * The font is of type Quartz (Since: 1.6, in 1.2 and * 1.4 it was named CAIRO_FONT_TYPE_ATSUI) * CAIRO_FONT_TYPE_USER * The font was create using cairo's user font api (Since: 1.8) * Since 1.2 */ public enum cairo_font_type_t { TOY, FT, WIN32, QUARTZ, USER } alias cairo_font_type_t CairoFontType; /** * The subpixel order specifies the order of color elements within * each pixel on the display device when rendering with an * antialiasing mode of CAIRO_ANTIALIAS_SUBPIXEL. * CAIRO_SUBPIXEL_ORDER_DEFAULT * Use the default subpixel order for * for the target device, since 1.0 * CAIRO_SUBPIXEL_ORDER_RGB * Subpixel elements are arranged horizontally * with red at the left, since 1.0 * CAIRO_SUBPIXEL_ORDER_BGR * Subpixel elements are arranged horizontally * with blue at the left, since 1.0 * CAIRO_SUBPIXEL_ORDER_VRGB * Subpixel elements are arranged vertically * with red at the top, since 1.0 * CAIRO_SUBPIXEL_ORDER_VBGR * Subpixel elements are arranged vertically * with blue at the top, since 1.0 * Since 1.0 */ public enum cairo_subpixel_order_t { DEFAULT, RGB, BGR, VRGB, VBGR } alias cairo_subpixel_order_t CairoSubpixelOrder; /** * Specifies the type of hinting to do on font outlines. Hinting * is the process of fitting outlines to the pixel grid in order * to improve the appearance of the result. Since hinting outlines * involves distorting them, it also reduces the faithfulness * to the original outline shapes. Not all of the outline hinting * styles are supported by all font backends. * New entries may be added in future versions. * CAIRO_HINT_STYLE_DEFAULT * Use the default hint style for * font backend and target device, since 1.0 * CAIRO_HINT_STYLE_NONE * Do not hint outlines, since 1.0 * CAIRO_HINT_STYLE_SLIGHT * Hint outlines slightly to improve * contrast while retaining good fidelity to the original * shapes, since 1.0 * CAIRO_HINT_STYLE_MEDIUM * Hint outlines with medium strength * giving a compromise between fidelity to the original shapes * and contrast, since 1.0 * CAIRO_HINT_STYLE_FULL * Hint outlines to maximize contrast, since 1.0 * Since 1.0 */ public enum cairo_hint_style_t { DEFAULT, NONE, SLIGHT, MEDIUM, FULL } alias cairo_hint_style_t CairoHintStyle; /** * Specifies whether to hint font metrics; hinting font metrics * means quantizing them so that they are integer values in * device space. Doing this improves the consistency of * letter and line spacing, however it also means that text * will be laid out differently at different zoom factors. * CAIRO_HINT_METRICS_DEFAULT * Hint metrics in the default * manner for the font backend and target device, since 1.0 * CAIRO_HINT_METRICS_OFF * Do not hint font metrics, since 1.0 * CAIRO_HINT_METRICS_ON * Hint font metrics, since 1.0 * Since 1.0 */ public enum cairo_hint_metrics_t { DEFAULT, OFF, ON } alias cairo_hint_metrics_t CairoHintMetrics; /** * cairo_device_type_t is used to describe the type of a given * device. The devices types are also known as "backends" within cairo. * The device type can be queried with cairo_device_get_type() * The various cairo_device_t functions can be used with devices of * any type, but some backends also provide type-specific functions * that must only be called with a device of the appropriate * type. These functions have names that begin with * cairo_type_device such as * cairo_xcb_device_debug_cap_xrender_version(). * The behavior of calling a type-specific function with a device of * the wrong type is undefined. * New entries may be added in future versions. * CAIRO_DEVICE_TYPE_DRM * The device is of type Direct Render Manager, since 1.10 * CAIRO_DEVICE_TYPE_GL * The device is of type OpenGL, since 1.10 * CAIRO_DEVICE_TYPE_SCRIPT * The device is of type script, since 1.10 * CAIRO_DEVICE_TYPE_XCB * The device is of type xcb, since 1.10 * CAIRO_DEVICE_TYPE_XLIB * The device is of type xlib, since 1.10 * CAIRO_DEVICE_TYPE_XML * The device is of type XML, since 1.10 * CAIRO_DEVICE_TYPE_COGL * The device is of type cogl, since 1.12 * CAIRO_DEVICE_TYPE_WIN32 * The device is of type win32, since 1.12 * CAIRO_DEVICE_TYPE_INVALID * The device is invalid, since 1.10 * Since 1.10 */ public enum cairo_device_type_t { DRM, GL, SCRIPT, XCB, XLIB, XML, COGL, WIN32, INVALID = -1 } alias cairo_device_type_t CairoDeviceType; /** * cairo_content_t is used to describe the content that a surface will * contain, whether color information, alpha information (translucence * vs. opacity), or both. * Note: The large values here are designed to keep cairo_content_t * values distinct from cairo_format_t values so that the * implementation can detect the error if users confuse the two types. * CAIRO_CONTENT_COLOR * The surface will hold color content only. (Since 1.0) * CAIRO_CONTENT_ALPHA * The surface will hold alpha content only. (Since 1.0) * CAIRO_CONTENT_COLOR_ALPHA * The surface will hold color and alpha content. (Since 1.0) * Since 1.0 */ public enum cairo_content_t { COLOR = 0x1000, ALPHA = 0x2000, COLOR_ALPHA = 0x3000 } alias cairo_content_t CairoContent; /** * cairo_surface_type_t is used to describe the type of a given * surface. The surface types are also known as "backends" or "surface * backends" within cairo. * The type of a surface is determined by the function used to create * it, which will generally be of the form * cairo_type_surface_create(), * (though see cairo_surface_create_similar() as well). * The surface type can be queried with cairo_surface_get_type() * The various cairo_surface_t functions can be used with surfaces of * any type, but some backends also provide type-specific functions * that must only be called with a surface of the appropriate * type. These functions have names that begin with * cairo_type_surface such as cairo_image_surface_get_width(). * The behavior of calling a type-specific function with a surface of * the wrong type is undefined. * New entries may be added in future versions. * CAIRO_SURFACE_TYPE_IMAGE * The surface is of type image, since 1.2 * CAIRO_SURFACE_TYPE_PDF * The surface is of type pdf, since 1.2 * CAIRO_SURFACE_TYPE_PS * The surface is of type ps, since 1.2 * CAIRO_SURFACE_TYPE_XLIB * The surface is of type xlib, since 1.2 * CAIRO_SURFACE_TYPE_XCB * The surface is of type xcb, since 1.2 * CAIRO_SURFACE_TYPE_GLITZ * The surface is of type glitz, since 1.2 * CAIRO_SURFACE_TYPE_QUARTZ * The surface is of type quartz, since 1.2 * CAIRO_SURFACE_TYPE_WIN32 * The surface is of type win32, since 1.2 * CAIRO_SURFACE_TYPE_BEOS * The surface is of type beos, since 1.2 * CAIRO_SURFACE_TYPE_DIRECTFB * The surface is of type directfb, since 1.2 * CAIRO_SURFACE_TYPE_SVG * The surface is of type svg, since 1.2 * CAIRO_SURFACE_TYPE_OS2 * The surface is of type os2, since 1.4 * CAIRO_SURFACE_TYPE_WIN32_PRINTING * The surface is a win32 printing surface, since 1.6 * CAIRO_SURFACE_TYPE_QUARTZ_IMAGE * The surface is of type quartz_image, since 1.6 * CAIRO_SURFACE_TYPE_SCRIPT * The surface is of type script, since 1.10 * CAIRO_SURFACE_TYPE_QT * The surface is of type Qt, since 1.10 * CAIRO_SURFACE_TYPE_RECORDING * The surface is of type recording, since 1.10 * CAIRO_SURFACE_TYPE_VG * The surface is a OpenVG surface, since 1.10 * CAIRO_SURFACE_TYPE_GL * The surface is of type OpenGL, since 1.10 * CAIRO_SURFACE_TYPE_DRM * The surface is of type Direct Render Manager, since 1.10 * CAIRO_SURFACE_TYPE_TEE * The surface is of type 'tee' (a multiplexing surface), since 1.10 * CAIRO_SURFACE_TYPE_XML * The surface is of type XML (for debugging), since 1.10 * CAIRO_SURFACE_TYPE_SKIA * The surface is of type Skia, since 1.10 * CAIRO_SURFACE_TYPE_SUBSURFACE * The surface is a subsurface created with * cairo_surface_create_for_rectangle(), since 1.10 * CAIRO_SURFACE_TYPE_COGL * This surface is of type Cogl, since 1.12 * Since 1.2 */ public enum cairo_surface_type_t { IMAGE, PDF, PS, XLIB, XCB, GLITZ, QUARTZ, WIN32, BEOS, DIRECTFB, SVG, OS2, WIN32_PRINTING, QUARTZ_IMAGE, SCRIPT, QT, RECORDING, VG, GL, DRM, TEE, XML, SKIA, SUBSURFACE, COGL } alias cairo_surface_type_t CairoSurfaceType; /** * cairo_format_t is used to identify the memory format of * image data. * New entries may be added in future versions. * CAIRO_FORMAT_INVALID * no such format exists or is supported. * CAIRO_FORMAT_ARGB32 * each pixel is a 32-bit quantity, with * alpha in the upper 8 bits, then red, then green, then blue. * The 32-bit quantities are stored native-endian. Pre-multiplied * alpha is used. (That is, 50% transparent red is 0x80800000, * not 0x80ff0000.) (Since 1.0) * CAIRO_FORMAT_RGB24 * each pixel is a 32-bit quantity, with * the upper 8 bits unused. Red, Green, and Blue are stored * in the remaining 24 bits in that order. (Since 1.0) * CAIRO_FORMAT_A8 * each pixel is a 8-bit quantity holding * an alpha value. (Since 1.0) * CAIRO_FORMAT_A1 * each pixel is a 1-bit quantity holding * an alpha value. Pixels are packed together into 32-bit * quantities. The ordering of the bits matches the * endianess of the platform. On a big-endian machine, the * first pixel is in the uppermost bit, on a little-endian * machine the first pixel is in the least-significant bit. (Since 1.0) * CAIRO_FORMAT_RGB16_565 * each pixel is a 16-bit quantity * with red in the upper 5 bits, then green in the middle * 6 bits, and blue in the lower 5 bits. (Since 1.2) * CAIRO_FORMAT_RGB30 * like RGB24 but with 10bpc. (Since 1.12) * Since 1.0 */ public enum cairo_format_t { INVALID = -1, ARGB32 = 0, RGB24 = 1, A8 = 2, A1 = 3, RGB16_565 = 4, RGB30 = 5 } alias cairo_format_t CairoFormat; /** * cairo_pdf_version_t is used to describe the version number of the PDF * specification that a generated PDF file will conform to. * CAIRO_PDF_VERSION_1_4 * The version 1.4 of the PDF specification. (Since 1.10) * CAIRO_PDF_VERSION_1_5 * The version 1.5 of the PDF specification. (Since 1.10) * Since 1.10 */ public enum cairo_pdf_version_t { VERSION_1_4, VERSION_1_5 } alias cairo_pdf_version_t CairoPdfVersion; /** * cairo_ps_level_t is used to describe the language level of the * PostScript Language Reference that a generated PostScript file will * conform to. * CAIRO_PS_LEVEL_2 * The language level 2 of the PostScript specification. (Since 1.6) * CAIRO_PS_LEVEL_3 * The language level 3 of the PostScript specification. (Since 1.6) * Since 1.6 */ public enum cairo_ps_level_t { LEVEL_2, LEVEL_3 } alias cairo_ps_level_t CairoPsLevel; /** * cairo_svg_version_t is used to describe the version number of the SVG * specification that a generated SVG file will conform to. * CAIRO_SVG_VERSION_1_1 * The version 1.1 of the SVG specification. (Since 1.2) * CAIRO_SVG_VERSION_1_2 * The version 1.2 of the SVG specification. (Since 1.2) * Since 1.2 */ public enum cairo_svg_version_t { VERSION_1_1, VERSION_1_2 } alias cairo_svg_version_t CairoSvgVersion; /** * A set of script output variants. * CAIRO_SCRIPT_MODE_ASCII * the output will be in readable text (default). (Since 1.12) * CAIRO_SCRIPT_MODE_BINARY * the output will use byte codes. (Since 1.12) * Since 1.12 */ public enum cairo_script_mode_t { ASCII, BINARY } alias cairo_script_mode_t CairoScriptMode; /** * cairo_status_t is used to indicate errors that can occur when * using Cairo. In some cases it is returned directly by functions. * but when using cairo_t, the last error, if any, is stored in * the context and can be retrieved with cairo_status(). * New entries may be added in future versions. Use cairo_status_to_string() * to get a human-readable representation of an error message. * CAIRO_STATUS_SUCCESS * no error has occurred (Since 1.0) * CAIRO_STATUS_NO_MEMORY * out of memory (Since 1.0) * CAIRO_STATUS_INVALID_RESTORE * cairo_restore() called without matching cairo_save() (Since 1.0) * CAIRO_STATUS_INVALID_POP_GROUP * no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group() (Since 1.0) * CAIRO_STATUS_NO_CURRENT_POINT * no current point defined (Since 1.0) * CAIRO_STATUS_INVALID_MATRIX * invalid matrix (not invertible) (Since 1.0) * CAIRO_STATUS_INVALID_STATUS * invalid value for an input cairo_status_t (Since 1.0) * CAIRO_STATUS_NULL_POINTER * NULL pointer (Since 1.0) * CAIRO_STATUS_INVALID_STRING * input string not valid UTF-8 (Since 1.0) * CAIRO_STATUS_INVALID_PATH_DATA * input path data not valid (Since 1.0) * CAIRO_STATUS_READ_ERROR * error while reading from input stream (Since 1.0) * CAIRO_STATUS_WRITE_ERROR * error while writing to output stream (Since 1.0) * CAIRO_STATUS_SURFACE_FINISHED * target surface has been finished (Since 1.0) * CAIRO_STATUS_SURFACE_TYPE_MISMATCH * the surface type is not appropriate for the operation (Since 1.0) * CAIRO_STATUS_PATTERN_TYPE_MISMATCH * the pattern type is not appropriate for the operation (Since 1.0) * CAIRO_STATUS_INVALID_CONTENT * invalid value for an input cairo_content_t (Since 1.0) * CAIRO_STATUS_INVALID_FORMAT * invalid value for an input cairo_format_t (Since 1.0) * CAIRO_STATUS_INVALID_VISUAL * invalid value for an input Visual* (Since 1.0) * CAIRO_STATUS_FILE_NOT_FOUND * file not found (Since 1.0) * CAIRO_STATUS_INVALID_DASH * invalid value for a dash setting (Since 1.0) * CAIRO_STATUS_INVALID_DSC_COMMENT * invalid value for a DSC comment (Since 1.2) * CAIRO_STATUS_INVALID_INDEX * invalid index passed to getter (Since 1.4) * CAIRO_STATUS_CLIP_NOT_REPRESENTABLE * clip region not representable in desired format (Since 1.4) * CAIRO_STATUS_TEMP_FILE_ERROR * error creating or writing to a temporary file (Since 1.6) * CAIRO_STATUS_INVALID_STRIDE * invalid value for stride (Since 1.6) * CAIRO_STATUS_FONT_TYPE_MISMATCH * the font type is not appropriate for the operation (Since 1.8) * CAIRO_STATUS_USER_FONT_IMMUTABLE * the user-font is immutable (Since 1.8) * CAIRO_STATUS_USER_FONT_ERROR * error occurred in a user-font callback function (Since 1.8) * CAIRO_STATUS_NEGATIVE_COUNT * negative number used where it is not allowed (Since 1.8) * CAIRO_STATUS_INVALID_CLUSTERS * input clusters do not represent the accompanying text and glyph array (Since 1.8) * CAIRO_STATUS_INVALID_SLANT * invalid value for an input cairo_font_slant_t (Since 1.8) * CAIRO_STATUS_INVALID_WEIGHT * invalid value for an input cairo_font_weight_t (Since 1.8) * CAIRO_STATUS_INVALID_SIZE * invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10) * CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED * user-font method not implemented (Since 1.10) * CAIRO_STATUS_DEVICE_TYPE_MISMATCH * the device type is not appropriate for the operation (Since 1.10) * CAIRO_STATUS_DEVICE_ERROR * an operation to the device caused an unspecified error (Since 1.10) * CAIRO_STATUS_INVALID_MESH_CONSTRUCTION * a mesh pattern * construction operation was used outside of a * cairo_mesh_pattern_begin_patch()/cairo_mesh_pattern_end_patch() * pair (Since 1.12) * CAIRO_STATUS_DEVICE_FINISHED * target device has been finished (Since 1.12) * CAIRO_STATUS_LAST_STATUS * this is a special value indicating the number of * status values defined in this enumeration. When using this value, note * that the version of cairo at run-time may have additional status values * defined than the value of this symbol at compile-time. (Since 1.10) * Since 1.0 */ public enum cairo_status_t { SUCCESS = 0, NO_MEMORY, INVALID_RESTORE, INVALID_POP_GROUP, NO_CURRENT_POINT, INVALID_MATRIX, INVALID_STATUS, NULL_POINTER, INVALID_STRING, INVALID_PATH_DATA, READ_ERROR, WRITE_ERROR, SURFACE_FINISHED, SURFACE_TYPE_MISMATCH, PATTERN_TYPE_MISMATCH, INVALID_CONTENT, INVALID_FORMAT, INVALID_VISUAL, FILE_NOT_FOUND, INVALID_DASH, INVALID_DSC_COMMENT, INVALID_INDEX, CLIP_NOT_REPRESENTABLE, TEMP_FILE_ERROR, INVALID_STRIDE, FONT_TYPE_MISMATCH, USER_FONT_IMMUTABLE, USER_FONT_ERROR, NEGATIVE_COUNT, INVALID_CLUSTERS, INVALID_SLANT, INVALID_WEIGHT, INVALID_SIZE, USER_FONT_NOT_IMPLEMENTED, DEVICE_TYPE_MISMATCH, DEVICE_ERROR, INVALID_MESH_CONSTRUCTION, DEVICE_FINISHED, LAST_STATUS } alias cairo_status_t CairoStatus; /** * Main Gtk struct. * A cairo_t contains the current state of the rendering device, * including coordinates of yet to be drawn shapes. * Cairo contexts, as cairo_t objects are named, are central to * cairo and all drawing with cairo is always done to a cairo_t * object. * Memory management of cairo_t is done with * cairo_reference() and cairo_destroy(). * Since 1.0 */ public struct cairo_t{} /** * A data structure for holding a rectangle. * double x; * X coordinate of the left side of the rectangle * double y; * Y coordinate of the the top side of the rectangle * double width; * width of the rectangle * double height; * height of the rectangle * Since 1.4 */ public struct cairo_rectangle_t { double x, y, width, height; } /** * A data structure for holding a dynamically allocated * array of rectangles. * cairo_status_t status; * Error status of the rectangle list * cairo_rectangle_t *rectangles; * Array containing the rectangles * int num_rectangles; * Number of rectangles in this list * Since 1.4 */ public struct cairo_rectangle_list_t { cairo_status_t status; cairo_rectangle_t *rectangles; int numRectangles; } /** * A data structure for holding a path. This data structure serves as * the return value for cairo_copy_path() and * cairo_copy_path_flat() as well the input value for * cairo_append_path(). * See cairo_path_data_t for hints on how to iterate over the * actual data within the path. * The num_data member gives the number of elements in the data * array. This number is larger than the number of independent path * portions (defined in cairo_path_data_type_t), since the data * includes both headers and coordinates for each portion. * cairo_status_t status; * the current error status * cairo_path_data_t *data; * the elements in the path * int num_data; * the number of elements in the data array * Since 1.0 */ public struct cairo_path_t { cairo_status_t status; cairo_path_data_t *data; int numData; } /** * The cairo_glyph_t structure holds information about a single glyph * when drawing or measuring text. A font is (in simple terms) a * collection of shapes used to draw text. A glyph is one of these * shapes. There can be multiple glyphs for a single character * (alternates to be used in different contexts, for example), or a * glyph can be a ligature of multiple * characters. Cairo doesn't expose any way of converting input text * into glyphs, so in order to use the Cairo interfaces that take * arrays of glyphs, you must directly access the appropriate * underlying font system. * Note that the offsets given by x and y are not cumulative. When * drawing or measuring text, each glyph is individually positioned * with respect to the overall origin * unsigned long index; * glyph index in the font. The exact interpretation of the * glyph index depends on the font technology being used. * double x; * the offset in the X direction between the origin used for * drawing or measuring the string and the origin of this glyph. * double y; * the offset in the Y direction between the origin used for * drawing or measuring the string and the origin of this glyph. * Since 1.0 */ public struct cairo_glyph_t { ulong index; double x; double y; } /** * The cairo_text_cluster_t structure holds information about a single * text cluster. A text cluster is a minimal * mapping of some glyphs corresponding to some UTF-8 text. * For a cluster to be valid, both num_bytes and num_glyphs should * be non-negative, and at least one should be non-zero. * Note that clusters with zero glyphs are not as well supported as * normal clusters. For example, PDF rendering applications typically * ignore those clusters when PDF text is being selected. * See cairo_show_text_glyphs() for how clusters are used in advanced * text operations. * int num_bytes; * the number of bytes of UTF-8 text covered by cluster * int num_glyphs; * the number of glyphs covered by cluster * Since 1.8 */ public struct cairo_text_cluster_t { int numBytes; int numGlyphs; } /** * Main Gtk struct. * A cairo_pattern_t represents a source when drawing onto a * surface. There are different subtypes of cairo_pattern_t, * for different types of sources; for example, * cairo_pattern_create_rgb() creates a pattern for a solid * opaque color. * Other than various * cairo_pattern_create_type() * functions, some of the pattern types can be implicitly created using various * cairo_set_source_type() functions; * for example cairo_set_source_rgb(). * The type of a pattern can be queried with cairo_pattern_get_type(). * Memory management of cairo_pattern_t is done with * cairo_pattern_reference() and cairo_pattern_destroy(). * Since 1.0 */ public struct cairo_pattern_t{} /** * Main Gtk struct. * A cairo_region_t represents a set of integer-aligned rectangles. * It allows set-theoretical operations like cairo_region_union() and * cairo_region_intersect() to be performed on them. * Memory management of cairo_region_t is done with * cairo_region_reference() and cairo_region_destroy(). * Since 1.10 */ public struct cairo_region_t{} /** * Main Gtk struct. * A cairo_font_face_t specifies all aspects of a font other * than the size or font matrix (a font matrix is used to distort * a font by sheering it or scaling it unequally in the two * directions) . A font face can be set on a cairo_t by using * cairo_set_font_face(); the size and font matrix are set with * cairo_set_font_size() and cairo_set_font_matrix(). * There are various types of font faces, depending on the * font backend they use. The type of a * font face can be queried using cairo_font_face_get_type(). * Memory management of cairo_font_face_t is done with * cairo_font_face_reference() and cairo_font_face_destroy(). * Since 1.0 */ public struct cairo_font_face_t{} /** * Main Gtk struct. * A cairo_scaled_font_t is a font scaled to a particular size and device * resolution. A cairo_scaled_font_t is most useful for low-level font * usage where a library or application wants to cache a reference * to a scaled font to speed up the computation of metrics. * There are various types of scaled fonts, depending on the * font backend they use. The type of a * scaled font can be queried using cairo_scaled_font_get_type(). * Memory management of cairo_scaled_font_t is done with * cairo_scaled_font_reference() and cairo_scaled_font_destroy(). * Since 1.0 */ public struct cairo_scaled_font_t{} /** * The cairo_font_extents_t structure stores metric information for * a font. Values are given in the current user-space coordinate * system. * Because font metrics are in user-space coordinates, they are * mostly, but not entirely, independent of the current transformation * matrix. If you call cairo_scale(cr, 2.0, 2.0), * text will be drawn twice as big, but the reported text extents will * not be doubled. They will change slightly due to hinting (so you * can't assume that metrics are independent of the transformation * matrix), but otherwise will remain unchanged. * double ascent; * the distance that the font extends above the baseline. * Note that this is not always exactly equal to the maximum * of the extents of all the glyphs in the font, but rather * is picked to express the font designer's intent as to * how the font should align with elements above it. * double descent; * the distance that the font extends below the baseline. * This value is positive for typical fonts that include * portions below the baseline. Note that this is not always * exactly equal to the maximum of the extents of all the * glyphs in the font, but rather is picked to express the * font designer's intent as to how the font should * align with elements below it. * double height; * the recommended vertical distance between baselines when * setting consecutive lines of text with the font. This * is greater than ascent+descent by a * quantity known as the line spacing * or external leading. When space * is at a premium, most fonts can be set with only * a distance of ascent+descent between lines. * double max_x_advance; * the maximum distance in the X direction that * the origin is advanced for any glyph in the font. * double max_y_advance; * the maximum distance in the Y direction that * the origin is advanced for any glyph in the font. * This will be zero for normal fonts used for horizontal * writing. (The scripts of East Asia are sometimes written * vertically.) * Since 1.0 */ public struct cairo_font_extents_t { double ascent; double descent; double height; double maxXAdvance; double maxYAdvance; } /** * The cairo_text_extents_t structure stores the extents of a single * glyph or a string of glyphs in user-space coordinates. Because text * extents are in user-space coordinates, they are mostly, but not * entirely, independent of the current transformation matrix. If you call * cairo_scale(cr, 2.0, 2.0), text will * be drawn twice as big, but the reported text extents will not be * doubled. They will change slightly due to hinting (so you can't * assume that metrics are independent of the transformation matrix), * but otherwise will remain unchanged. * double x_bearing; * the horizontal distance from the origin to the * leftmost part of the glyphs as drawn. Positive if the * glyphs lie entirely to the right of the origin. * double y_bearing; * the vertical distance from the origin to the * topmost part of the glyphs as drawn. Positive only if the * glyphs lie completely below the origin; will usually be * negative. * double width; * width of the glyphs as drawn * double height; * height of the glyphs as drawn * double x_advance; * distance to advance in the X direction * after drawing these glyphs * double y_advance; * distance to advance in the Y direction * after drawing these glyphs. Will typically be zero except * for vertical text layout as found in East-Asian languages. * Since 1.0 */ public struct cairo_text_extents_t { double xBearing; double yBearing; double width; double height; double xAdvance; double yAdvance; } /** * Main Gtk struct. * An opaque structure holding all options that are used when * rendering fonts. * Individual features of a cairo_font_options_t can be set or * accessed using functions named * cairo_font_options_set_feature_name() and * cairo_font_options_get_feature_name(), like * cairo_font_options_set_antialias() and * cairo_font_options_get_antialias(). * New features may be added to a cairo_font_options_t in the * future. For this reason, cairo_font_options_copy(), * cairo_font_options_equal(), cairo_font_options_merge(), and * cairo_font_options_hash() should be used to copy, check * for equality, merge, or compute a hash value of * cairo_font_options_t objects. * Since 1.0 */ public struct cairo_font_options_t{} /** * Main Gtk struct. * A cairo_device_t represents the driver interface for drawing * operations to a cairo_surface_t. There are different subtypes of * cairo_device_t for different drawing backends; for example, * cairo_egl_device_create() creates a device that wraps an EGL display and * context. * The type of a device can be queried with cairo_device_get_type(). * Memory management of cairo_device_t is done with * cairo_device_reference() and cairo_device_destroy(). * Since 1.10 */ public struct cairo_device_t{} /** * Main Gtk struct. * A cairo_surface_t represents an image, either as the destination * of a drawing operation or as source when drawing onto another * surface. To draw to a cairo_surface_t, create a cairo context * with the surface as the target, using cairo_create(). * There are different subtypes of cairo_surface_t for * different drawing backends; for example, cairo_image_surface_create() * creates a bitmap image in memory. * The type of a surface can be queried with cairo_surface_get_type(). * The initial contents of a surface after creation depend upon the manner * of its creation. If cairo creates the surface and backing storage for * the user, it will be initially cleared; for example, * cairo_image_surface_create() and cairo_surface_create_similar(). * Alternatively, if the user passes in a reference to some backing storage * and asks cairo to wrap that in a cairo_surface_t, then the contents are * not modified; for example, cairo_image_surface_create_for_data() and * cairo_xlib_surface_create(). * Memory management of cairo_surface_t is done with * cairo_surface_reference() and cairo_surface_destroy(). * Since 1.0 */ public struct cairo_surface_t{} /** * Main Gtk struct. * A cairo_matrix_t holds an affine transformation, such as a scale, * rotation, shear, or a combination of those. The transformation of * a point (x, y) is given by: */ public struct cairo_matrix_t { double xx; double yx; double xy; double yy; double x0; double y0; } /** * cairo_user_data_key_t is used for attaching user data to cairo * data structures. The actual contents of the struct is never used, * and there is no need to initialize the object; only the unique * address of a cairo_data_key_t object is used. Typically, you * would just use the address of a static cairo_data_key_t object. * int unused; * not used; ignore. * Since 1.0 */ public struct cairo_user_data_key_t { int unused; } /** * A data structure for holding a rectangle with integer coordinates. * int x; * X coordinate of the left side of the rectangle * int y; * Y coordinate of the the top side of the rectangle * int width; * width of the rectangle * int height; * height of the rectangle * Since 1.10 */ public struct cairo_rectangle_int_t { int x, y; int width, height; } /* * This macro encodes the given cairo version into an integer. The numbers * returned by CAIRO_VERSION and cairo_version() are encoded using this macro. * Two encoded version numbers can be compared as integers. The encoding ensures * that later versions compare greater than earlier versions. * Returns: the encoded version. * major : * the major component of the version number * minor : * the minor component of the version number * micro : * the micro component of the version number */ // TODO // #define CAIRO_VERSION_ENCODE(major, minor, micro) /* * This macro encodes the given cairo version into an string. The numbers * returned by CAIRO_VERSION_STRING and cairo_version_string() are encoded using this macro. * The parameters to this macro must expand to numerical literals. * Returns: a string literal containing the version. * Since: 1.8 * major : * the major component of the version number * minor : * the minor component of the version number * micro : * the micro component of the version number */ // TODO // #define CAIRO_VERSION_STRINGIZE(major, minor, micro) /* * cairo_raster_source_acquire_func_t is the type of function which is * called when a pattern is being rendered from. It should create a surface * that provides the pixel data for the region of interest as defined by * extents, though the surface itself does not have to be limited to that * area. For convenience the surface should probably be of image type, * created with cairo_surface_create_similar_image() for the target (which * enables the number of copies to be reduced during transfer to the * device). Another option, might be to return a similar surface to the * target for explicit handling by the application of a set of cached sources * on the device. The region of sample data provided should be defined using * cairo_surface_set_device_offset() to specify the top-left corner of the * sample data (along with width and height of the surface). * pattern : * the pattern being rendered from * callback_data : * the user data supplied during creation * target : * the rendering target surface * extents : * rectangular region of interest in pixels in sample space * Returns : * a cairo_surface_t * Since 1.12 */ // cairo_surface_t (*cairo_raster_source_acquire_func_t) (cairo_pattern_t *pattern, void *callback_data, cairo_surface_t *target, const cairo_rectangle_int_t *extents); public alias extern(C) cairo_surface_t function(cairo_pattern_t* pattern, void* callbackData, cairo_surface_t* target, cairo_rectangle_int_t* extents) cairo_raster_source_acquire_func_t; /* * cairo_raster_source_release_func_t is the type of function which is * called when the pixel data is no longer being access by the pattern * for the rendering operation. Typically this function will simply * destroy the surface created during acquire. * pattern : * the pattern being rendered from * callback_data : * the user data supplied during creation * surface : * the surface created during acquire * Since 1.12 */ // void (*cairo_raster_source_release_func_t) (cairo_pattern_t *pattern, void *callback_data, cairo_surface_t *surface); public alias extern(C) void function(cairo_pattern_t* pattern, void* callbackData, cairo_surface_t* surface) cairo_raster_source_release_func_t; /* * cairo_raster_source_snapshot_func_t is the type of function which is * called when the pixel data needs to be preserved for later use * during printing. This pattern will be accessed again later, and it * is expected to provide the pixel data that was current at the time * of snapshotting. * pattern : * the pattern being rendered from * callback_data : * the user data supplied during creation * Returns : * CAIRO_STATUS_SUCCESS on success, or one of the * cairo_status_t error codes for failure. * Since 1.12 */ // cairo_status_t (*cairo_raster_source_snapshot_func_t) (cairo_pattern_t *pattern, void *callback_data); public alias extern(C) cairo_status_t function(cairo_pattern_t* pattern, void* callbackData) cairo_raster_source_snapshot_func_t; /* * cairo_raster_source_copy_func_t is the type of function which is * called when the pattern gets copied as a normal part of rendering. * pattern : * the cairo_pattern_t that was copied to * callback_data : * the user data supplied during creation * other : * the cairo_pattern_t being used as the source for the copy * Returns : * CAIRO_STATUS_SUCCESS on success, or one of the * cairo_status_t error codes for failure. * Since 1.12 */ // cairo_status_t (*cairo_raster_source_copy_func_t) (cairo_pattern_t *pattern, void *callback_data, const cairo_pattern_t *other); public alias extern(C) cairo_status_t function(cairo_pattern_t* pattern, void* callbackData, cairo_pattern_t* other) cairo_raster_source_copy_func_t; /* * cairo_raster_source_finish_func_t is the type of function which is * called when the pattern (or a copy thereof) is no longer required. * pattern : * the pattern being rendered from * callback_data : * the user data supplied during creation * Since 1.12 * See Also * cairo_pattern_t */ // void (*cairo_raster_source_finish_func_t) (cairo_pattern_t *pattern, void *callback_data); public alias extern(C) void function(cairo_pattern_t* pattern, void* callbackData) cairo_raster_source_finish_func_t; /* * cairo_user_scaled_font_init_func_t is the type of function which is * called when a scaled-font needs to be created for a user font-face. * The cairo context cr is not used by the caller, but is prepared in font * space, similar to what the cairo contexts passed to the render_glyph * method will look like. The callback can use this context for extents * computation for example. After the callback is called, cr is checked * for any error status. * The extents argument is where the user font sets the font extents for * scaled_font. It is in font space, which means that for most cases its * ascent and descent members should add to 1.0. extents is preset to * hold a value of 1.0 for ascent, height, and max_x_advance, and 0.0 for * descent and max_y_advance members. * The callback is optional. If not set, default font extents as described * in the previous paragraph will be used. * Note that scaled_font is not fully initialized at this * point and trying to use it for text operations in the callback will result * in deadlock. * scaled_font : * the scaled-font being created * cr : * a cairo context, in font space * extents : * font extents to fill in, in font space * Returns : * CAIRO_STATUS_SUCCESS upon success, or an error status on error. * Since 1.8 */ // cairo_status_t (*cairo_user_scaled_font_init_func_t) (cairo_scaled_font_t *scaled_font, cairo_t *cr, cairo_font_extents_t *extents); public alias extern(C) cairo_status_t function(cairo_scaled_font_t* scaledFont, cairo_t* cr, cairo_font_extents_t* extents) cairo_user_scaled_font_init_func_t; /* * cairo_user_scaled_font_render_glyph_func_t is the type of function which * is called when a user scaled-font needs to render a glyph. * The callback is mandatory, and expected to draw the glyph with code glyph to * the cairo context cr. cr is prepared such that the glyph drawing is done in * font space. That is, the matrix set on cr is the scale matrix of scaled_font, * The extents argument is where the user font sets the font extents for * scaled_font. However, if user prefers to draw in user space, they can * achieve that by changing the matrix on cr. All cairo rendering operations * to cr are permitted, however, the result is undefined if any source other * than the default source on cr is used. That means, glyph bitmaps should * be rendered using cairo_mask() instead of cairo_paint(). * Other non-default settings on cr include a font size of 1.0 (given that * it is set up to be in font space), and font options corresponding to * scaled_font. * The extents argument is preset to have x_bearing, * width, and y_advance of zero, * y_bearing set to -font_extents.ascent, * height to font_extents.ascent+font_extents.descent, * and x_advance to font_extents.max_x_advance. * The only field user needs to set in majority of cases is * x_advance. * If the width field is zero upon the callback returning * (which is its preset value), the glyph extents are automatically computed * based on the drawings done to cr. This is in most cases exactly what the * desired behavior is. However, if for any reason the callback sets the * extents, it must be ink extents, and include the extents of all drawing * done to cr in the callback. * scaled_font : * user scaled-font * glyph : * glyph code to render * cr : * cairo context to draw to, in font space * extents : * glyph extents to fill in, in font space * Returns : * CAIRO_STATUS_SUCCESS upon success, or * CAIRO_STATUS_USER_FONT_ERROR or any other error status on error. * Since 1.8 */ // cairo_status_t (*cairo_user_scaled_font_render_glyph_func_t) (cairo_scaled_font_t *scaled_font, unsigned long glyph, cairo_t *cr, cairo_text_extents_t *extents); public alias extern(C) cairo_status_t function(cairo_scaled_font_t* scaledFont, ulong glyph, cairo_t* cr, cairo_text_extents_t* extents) cairo_user_scaled_font_render_glyph_func_t; /* * cairo_user_scaled_font_text_to_glyphs_func_t is the type of function which * is called to convert input text to an array of glyphs. This is used by the * cairo_show_text() operation. * Using this callback the user-font has full control on glyphs and their * positions. That means, it allows for features like ligatures and kerning, * as well as complex shaping required for scripts like * Arabic and Indic. * The num_glyphs argument is preset to the number of glyph entries available * in the glyphs buffer. If the glyphs buffer is NULL, the value of * num_glyphs will be zero. If the provided glyph array is too short for * the conversion (or for convenience), a new glyph array may be allocated * using cairo_glyph_allocate() and placed in glyphs. Upon return, * num_glyphs should contain the number of generated glyphs. If the value * glyphs points at has changed after the call, the caller will free the * allocated glyph array using cairo_glyph_free(). The caller will also free * the original value of glyphs, so the callback shouldn't do so. * The callback should populate the glyph indices and positions (in font space) * assuming that the text is to be shown at the origin. * If clusters is not NULL, num_clusters and cluster_flags are also * non-NULL, and cluster mapping should be computed. The semantics of how * cluster array allocation works is similar to the glyph array. That is, * if clusters initially points to a non-NULL value, that array may be used * as a cluster buffer, and num_clusters points to the number of cluster * entries available there. If the provided cluster array is too short for * the conversion (or for convenience), a new cluster array may be allocated * using cairo_text_cluster_allocate() and placed in clusters. In this case, * the original value of clusters will still be freed by the caller. Upon * return, num_clusters should contain the number of generated clusters. * If the value clusters points at has changed after the call, the caller * will free the allocated cluster array using cairo_text_cluster_free(). * The callback is optional. If num_glyphs is negative upon * the callback returning or if the return value * is CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, the unicode_to_glyph callback * is tried. See cairo_user_scaled_font_unicode_to_glyph_func_t. * Note: While cairo does not impose any limitation on glyph indices, * some applications may assume that a glyph index fits in a 16-bit * unsigned integer. As such, it is advised that user-fonts keep their * glyphs in the 0 to 65535 range. Furthermore, some applications may * assume that glyph 0 is a special glyph-not-found glyph. User-fonts * are advised to use glyph 0 for such purposes and do not use that * glyph value for other purposes. * scaled_font : * the scaled-font being created * utf8 : * a string of text encoded in UTF-8 * utf8_len : * length of utf8 in bytes * glyphs : * pointer to array of glyphs to fill, in font space * num_glyphs : * pointer to number of glyphs * clusters : * pointer to array of cluster mapping information to fill, or NULL * num_clusters : * pointer to number of clusters * cluster_flags : * pointer to location to store cluster flags corresponding to the * output clusters * Returns : * CAIRO_STATUS_SUCCESS upon success, * CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried, * or CAIRO_STATUS_USER_FONT_ERROR or any other error status on error. * Since 1.8 */ // cairo_status_t (*cairo_user_scaled_font_text_to_glyphs_func_t) (cairo_scaled_font_t *scaled_font, const char *utf8, int utf8_len, cairo_glyph_t **glyphs, int *num_glyphs, cairo_text_cluster_t **clusters, int *num_clusters, cairo_text_cluster_flags_t *cluster_flags); public alias extern(C) cairo_status_t function(cairo_scaled_font_t* scaledFont, char* utf8, int utf8_Len, cairo_glyph_t** glyphs, int* numGlyphs, cairo_text_cluster_t** clusters, int* numClusters, cairo_text_cluster_flags_t* clusterFlags) cairo_user_scaled_font_text_to_glyphs_func_t; /* * cairo_user_scaled_font_unicode_to_glyph_func_t is the type of function which * is called to convert an input Unicode character to a single glyph. * This is used by the cairo_show_text() operation. * This callback is used to provide the same functionality as the * text_to_glyphs callback does (see cairo_user_scaled_font_text_to_glyphs_func_t) * but has much less control on the output, * in exchange for increased ease of use. The inherent assumption to using * this callback is that each character maps to one glyph, and that the * mapping is context independent. It also assumes that glyphs are positioned * according to their advance width. These mean no ligatures, kerning, or * complex scripts can be implemented using this callback. * The callback is optional, and only used if text_to_glyphs callback is not * set or fails to return glyphs. If this callback is not set or if it returns * CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED, an identity mapping from Unicode * code-points to glyph indices is assumed. * Note: While cairo does not impose any limitation on glyph indices, * some applications may assume that a glyph index fits in a 16-bit * unsigned integer. As such, it is advised that user-fonts keep their * glyphs in the 0 to 65535 range. Furthermore, some applications may * assume that glyph 0 is a special glyph-not-found glyph. User-fonts * are advised to use glyph 0 for such purposes and do not use that * glyph value for other purposes. * scaled_font : * the scaled-font being created * unicode : * input unicode character code-point * glyph_index : * output glyph index * Returns : * CAIRO_STATUS_SUCCESS upon success, * CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED if fallback options should be tried, * or CAIRO_STATUS_USER_FONT_ERROR or any other error status on error. * Since 1.8 */ // cairo_status_t (*cairo_user_scaled_font_unicode_to_glyph_func_t) (cairo_scaled_font_t *scaled_font, unsigned long unicode, unsigned long *glyph_index); public alias extern(C) cairo_status_t function(cairo_scaled_font_t* scaledFont, ulong unicode, ulong* glyphIndex) cairo_user_scaled_font_unicode_to_glyph_func_t; /* * cairo_read_func_t is the type of function which is called when a * backend needs to read data from an input stream. It is passed the * closure which was specified by the user at the time the read * function was registered, the buffer to read the data into and the * length of the data in bytes. The read function should return * CAIRO_STATUS_SUCCESS if all the data was successfully read, * CAIRO_STATUS_READ_ERROR otherwise. * closure : * the input closure * data : * the buffer into which to read the data * length : * the amount of data to read * Returns : * the status code of the read operation * Since 1.0 */ // cairo_status_t (*cairo_read_func_t) (void *closure, unsigned char *data, unsigned int length); public alias extern(C) cairo_status_t function(void* closure, uchar* data, uint length) cairo_read_func_t; /* * cairo_write_func_t is the type of function which is called when a * backend needs to write data to an output stream. It is passed the * closure which was specified by the user at the time the write * function was registered, the data to write and the length of the * data in bytes. The write function should return * CAIRO_STATUS_SUCCESS if all the data was successfully written, * CAIRO_STATUS_WRITE_ERROR otherwise. * closure : * the output closure * data : * the buffer containing the data to write * length : * the amount of data to write * Returns : * the status code of the write operation * Since 1.0 */ // cairo_status_t (*cairo_write_func_t) (void *closure, const unsigned char *data, unsigned int length); public alias extern(C) cairo_status_t function(void* closure, uchar* data, uint length) cairo_write_func_t; /* * cairo_destroy_func_t the type of function which is called when a * data element is destroyed. It is passed the pointer to the data * element and should free any memory and resources allocated for it. * data : * The data element being destroyed. * Since 1.0 */ // void (*cairo_destroy_func_t) (void *data); public alias extern(C) void function(void* data) cairo_destroy_func_t; // skipped union cairo_path_data_t GtkD-3.7.5/generated/gtkd/gdk/000077500000000000000000000000001324604450400160155ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gdk/AppLaunchContext.d000066400000000000000000000151411324604450400214040ustar00rootroot00000000000000/* * 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 gdk.AppLaunchContext; private import gdk.Display; private import gdk.Screen; private import gdk.c.functions; public import gdk.c.types; private import gio.AppLaunchContext : GioAppLaunchContext = AppLaunchContext; private import gio.IconIF; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.gdktypes; /** * GdkAppLaunchContext is an implementation of #GAppLaunchContext that * handles launching an application in a graphical context. It provides * startup notification and allows to launch applications on a specific * screen or workspace. * * ## Launching an application * * |[ * GdkAppLaunchContext *context; * * context = gdk_display_get_app_launch_context (display); * * gdk_app_launch_context_set_screen (screen); * gdk_app_launch_context_set_timestamp (event->time); * * if (!g_app_info_launch_default_for_uri ("http://www.gtk.org", context, &error)) * g_warning ("Launching failed: %s\n", error->message); * * g_object_unref (context); * ]| */ public class AppLaunchContext : GioAppLaunchContext { /** the main Gtk struct */ protected GdkAppLaunchContext* gdkAppLaunchContext; /** Get the main Gtk struct */ public GdkAppLaunchContext* getGdkAppLaunchContextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkAppLaunchContext; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkAppLaunchContext; } protected override void setStruct(GObject* obj) { gdkAppLaunchContext = cast(GdkAppLaunchContext*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkAppLaunchContext* gdkAppLaunchContext, bool ownedRef = false) { this.gdkAppLaunchContext = gdkAppLaunchContext; super(cast(GAppLaunchContext*)gdkAppLaunchContext, ownedRef); } /** */ public static GType getType() { return gdk_app_launch_context_get_type(); } /** * Creates a new #GdkAppLaunchContext. * * Deprecated: Use gdk_display_get_app_launch_context() instead * * Returns: a new #GdkAppLaunchContext * * Since: 2.14 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gdk_app_launch_context_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GdkAppLaunchContext*) p, true); } /** * Sets the workspace on which applications will be launched when * using this context when running under a window manager that * supports multiple workspaces, as described in the * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec). * * When the workspace is not specified or @desktop is set to -1, * it is up to the window manager to pick one, typically it will * be the current workspace. * * Params: * desktop = the number of a workspace, or -1 * * Since: 2.14 */ public void setDesktop(int desktop) { gdk_app_launch_context_set_desktop(gdkAppLaunchContext, desktop); } /** * Sets the display on which applications will be launched when * using this context. See also gdk_app_launch_context_set_screen(). * * Deprecated: Use gdk_display_get_app_launch_context() instead * * Params: * display = a #GdkDisplay * * Since: 2.14 */ public void setDisplay(Display display) { gdk_app_launch_context_set_display(gdkAppLaunchContext, (display is null) ? null : display.getDisplayStruct()); } /** * Sets the icon for applications that are launched with this * context. * * Window Managers can use this information when displaying startup * notification. * * See also gdk_app_launch_context_set_icon_name(). * * Params: * icon = a #GIcon, or %NULL * * Since: 2.14 */ public void setIcon(IconIF icon) { gdk_app_launch_context_set_icon(gdkAppLaunchContext, (icon is null) ? null : icon.getIconStruct()); } /** * Sets the icon for applications that are launched with this context. * The @icon_name will be interpreted in the same way as the Icon field * in desktop files. See also gdk_app_launch_context_set_icon(). * * If both @icon and @icon_name are set, the @icon_name takes priority. * If neither @icon or @icon_name is set, the icon is taken from either * the file that is passed to launched application or from the #GAppInfo * for the launched application itself. * * Params: * iconName = an icon name, or %NULL * * Since: 2.14 */ public void setIconName(string iconName) { gdk_app_launch_context_set_icon_name(gdkAppLaunchContext, Str.toStringz(iconName)); } /** * Sets the screen on which applications will be launched when * using this context. See also gdk_app_launch_context_set_display(). * * If both @screen and @display are set, the @screen takes priority. * If neither @screen or @display are set, the default screen and * display are used. * * Params: * screen = a #GdkScreen * * Since: 2.14 */ public void setScreen(Screen screen) { gdk_app_launch_context_set_screen(gdkAppLaunchContext, (screen is null) ? null : screen.getScreenStruct()); } /** * Sets the timestamp of @context. The timestamp should ideally * be taken from the event that triggered the launch. * * Window managers can use this information to avoid moving the * focus to the newly launched application when the user is busy * typing in another window. This is also known as 'focus stealing * prevention'. * * Params: * timestamp = a timestamp * * Since: 2.14 */ public void setTimestamp(uint timestamp) { gdk_app_launch_context_set_timestamp(gdkAppLaunchContext, timestamp); } } GtkD-3.7.5/generated/gtkd/gdk/Atom.d000066400000000000000000000202251324604450400170630ustar00rootroot00000000000000/* * 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 gdk.Atom; private import gdk.Display; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; public import gtkc.gdktypes; /** * An opaque type representing a string as an index into a table * of strings on the X server. */ /** * Determines the string corresponding to an atom. * * Returns: a newly-allocated string containing the string * corresponding to @atom. When you are done with the * return value, you should free it using g_free(). */ public string name(GdkAtom atom) { auto retStr = gdk_atom_name(atom); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Finds or creates an atom corresponding to a given string. * * Params: * atomName = a string. * onlyIfExists = if %TRUE, GDK is allowed to not create a new atom, but * just return %GDK_NONE if the requested atom doesn’t already * exists. Currently, the flag is ignored, since checking the * existance of an atom is as expensive as creating it. * * Returns: the atom corresponding to @atom_name. */ public GdkAtom intern(string atomName, bool onlyIfExists) { return gdk_atom_intern(Str.toStringz(atomName), onlyIfExists); } /** * Finds or creates an atom corresponding to a given string. * * Note that this function is identical to gdk_atom_intern() except * that if a new #GdkAtom is created the string itself is used rather * than a copy. This saves memory, but can only be used if the string * will always exist. It can be used with statically * allocated strings in the main program, but not with statically * allocated memory in dynamically loaded modules, if you expect to * ever unload the module again (e.g. do not use this function in * GTK+ theme engines). * * Params: * atomName = a static string * * Returns: the atom corresponding to @atom_name * * Since: 2.10 */ public GdkAtom internStaticString(string atomName) { return gdk_atom_intern_static_string(Str.toStringz(atomName)); } /** * Changes the contents of a property on a window. * * Params: * window = a #GdkWindow * property = the property to change * type = the new type for the property. If @mode is * %GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this * must match the existing type or an error will occur. * format = the new format for the property. If @mode is * %GDK_PROP_MODE_PREPEND or %GDK_PROP_MODE_APPEND, then this * must match the existing format or an error will occur. * mode = a value describing how the new data is to be combined * with the current data. * data = the data (a `guchar *` * `gushort *`, or `gulong *`, * depending on @format), cast to a `guchar *`. */ public void propertyChange(Window window, GdkAtom property, GdkAtom type, int format, GdkPropMode mode, char[] data) { gdk_property_change((window is null) ? null : window.getWindowStruct(), property, type, format, mode, data.ptr, cast(int)data.length); } /** * Deletes a property from a window. * * Params: * window = a #GdkWindow * property = the property to delete */ public void propertyDelete(Window window, GdkAtom property) { gdk_property_delete((window is null) ? null : window.getWindowStruct(), property); } /** * Retrieves a portion of the contents of a property. If the * property does not exist, then the function returns %FALSE, * and %GDK_NONE will be stored in @actual_property_type. * * The XGetWindowProperty() function that gdk_property_get() * uses has a very confusing and complicated set of semantics. * Unfortunately, gdk_property_get() makes the situation * worse instead of better (the semantics should be considered * undefined), and also prints warnings to stderr in cases where it * should return a useful error to the program. You are advised to use * XGetWindowProperty() directly until a replacement function for * gdk_property_get() is provided. * * Params: * window = a #GdkWindow * property = the property to retrieve * type = the desired property type, or %GDK_NONE, if any type of data * is acceptable. If this does not match the actual * type, then @actual_format and @actual_length will * be filled in, a warning will be printed to stderr * and no data will be returned. * offset = the offset into the property at which to begin * retrieving data, in 4 byte units. * length = the length of the data to retrieve in bytes. Data is * considered to be retrieved in 4 byte chunks, so @length * will be rounded up to the next highest 4 byte boundary * (so be careful not to pass a value that might overflow * when rounded up). * pdelete = if %TRUE, delete the property after retrieving the * data. * actualPropertyType = location to store the * actual type of the property. * actualFormat = location to store the actual return format of the * data; either 8, 16 or 32 bits. * data = location * to store a pointer to the data. The retrieved data should be * freed with g_free() when you are finished using it. * * Returns: %TRUE if data was successfully received and stored * in @data, otherwise %FALSE. */ public bool propertyGet(Window window, GdkAtom property, GdkAtom type, gulong offset, gulong length, int pdelete, out GdkAtom actualPropertyType, out int actualFormat, out char[] data) { int actualLength; char* outdata = null; auto p = gdk_property_get((window is null) ? null : window.getWindowStruct(), property, type, offset, length, pdelete, &actualPropertyType, &actualFormat, &actualLength, &outdata) != 0; data = outdata[0 .. actualLength]; return p; } /** * Converts a text property in the given encoding to * a list of UTF-8 strings. * * Params: * display = a #GdkDisplay * encoding = an atom representing the encoding of the text * format = the format of the property * text = the text to convert * list = location to store the list * of strings or %NULL. The list should be freed with * g_strfreev(). * * Returns: the number of strings in the resulting list * * Since: 2.2 */ public int textPropertyToUtf8ListForDisplay(Display display, GdkAtom encoding, int format, char[] text, out string[] list) { char** outlist = null; auto p = gdk_text_property_to_utf8_list_for_display((display is null) ? null : display.getDisplayStruct(), encoding, format, text.ptr, cast(int)text.length, &outlist); list = Str.toStringArray(outlist); return p; } /** * Converts an UTF-8 string into the best possible representation * as a STRING. The representation of characters not in STRING * is not specified; it may be as pseudo-escape sequences * \x{ABCD}, or it may be in some other form of approximation. * * Params: * str = a UTF-8 string * * Returns: the newly-allocated string, or %NULL if the * conversion failed. (It should not fail for any properly * formed UTF-8 string unless system limits like memory or * file descriptors are exceeded.) */ public string utf8ToStringTarget(string str) { auto retStr = gdk_utf8_to_string_target(Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } GtkD-3.7.5/generated/gtkd/gdk/Cairo.d000066400000000000000000000222431324604450400172220ustar00rootroot00000000000000/* * 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 gdk.Cairo; private import cairo.Context; private import cairo.Region; private import cairo.Surface; private import gdk.Color; private import gdk.DrawingContext; private import gdk.RGBA; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import gdkpixbuf.Pixbuf; private import gobject.ObjectG; public import gtkc.gdktypes; /** */ /** * Creates a Cairo context for drawing to @window. * * Note that calling cairo_reset_clip() on the resulting #cairo_t will * produce undefined results, so avoid it at all costs. * * Typically, this function is used to draw on a #GdkWindow out of the paint * cycle of the toolkit; this should be avoided, as it breaks various assumptions * and optimizations. * * If you are drawing on a native #GdkWindow in response to a %GDK_EXPOSE event * you should use gdk_window_begin_draw_frame() and gdk_drawing_context_get_cairo_context() * instead. GTK will automatically do this for you when drawing a widget. * * Deprecated: Use gdk_window_begin_draw_frame() and * gdk_drawing_context_get_cairo_context() instead * * Params: * window = a #GdkWindow * * Returns: A newly created Cairo context. Free with * cairo_destroy() when you are done drawing. * * Since: 2.8 */ public Context createContext(Window window) { auto p = gdk_cairo_create((window is null) ? null : window.getWindowStruct()); if(p is null) { return null; } return new Context(cast(cairo_t*) p); } /** * This is the main way to draw GL content in GTK+. It takes a render buffer ID * (@source_type == #GL_RENDERBUFFER) or a texture id (@source_type == #GL_TEXTURE) * and draws it onto @cr with an OVER operation, respecting the current clip. * The top left corner of the rectangle specified by @x, @y, @width and @height * will be drawn at the current (0,0) position of the cairo_t. * * This will work for *all* cairo_t, as long as @window is realized, but the * fallback implementation that reads back the pixels from the buffer may be * used in the general case. In the case of direct drawing to a window with * no special effects applied to @cr it will however use a more efficient * approach. * * For #GL_RENDERBUFFER the code will always fall back to software for buffers * with alpha components, so make sure you use #GL_TEXTURE if using alpha. * * Calling this may change the current GL context. * * Params: * cr = a cairo context * window = The window we're rendering for (not necessarily into) * source = The GL ID of the source buffer * sourceType = The type of the @source * bufferScale = The scale-factor that the @source buffer is allocated for * x = The source x position in @source to start copying from in GL coordinates * y = The source y position in @source to start copying from in GL coordinates * width = The width of the region to draw * height = The height of the region to draw * * Since: 3.16 */ public void drawFromGl(Context cr, Window window, int source, int sourceType, int bufferScale, int x, int y, int width, int height) { gdk_cairo_draw_from_gl((cr is null) ? null : cr.getContextStruct(), (window is null) ? null : window.getWindowStruct(), source, sourceType, bufferScale, x, y, width, height); } /** * This is a convenience function around cairo_clip_extents(). * It rounds the clip extents to integer coordinates and returns * a boolean indicating if a clip area exists. * * Params: * cr = a cairo context * rect = return location for the clip, or %NULL * * Returns: %TRUE if a clip rectangle exists, %FALSE if all of @cr is * clipped and all drawing can be skipped */ public bool getClipRectangle(Context cr, out GdkRectangle rect) { return gdk_cairo_get_clip_rectangle((cr is null) ? null : cr.getContextStruct(), &rect) != 0; } /** * Adds the given rectangle to the current path of @cr. * * Params: * cr = a cairo context * rectangle = a #GdkRectangle * * Since: 2.8 */ public void rectangle(Context cr, GdkRectangle* rectangle) { gdk_cairo_rectangle((cr is null) ? null : cr.getContextStruct(), rectangle); } /** * Adds the given region to the current path of @cr. * * Params: * cr = a cairo context * region = a #cairo_region_t * * Since: 2.8 */ public void region(Context cr, Region region) { gdk_cairo_region((cr is null) ? null : cr.getContextStruct(), (region is null) ? null : region.getRegionStruct()); } /** * Creates region that describes covers the area where the given * @surface is more than 50% opaque. * * This function takes into account device offsets that might be * set with cairo_surface_set_device_offset(). * * Params: * surface = a cairo surface * * Returns: A #cairo_region_t; must be freed with cairo_region_destroy() */ public Region regionCreateFromSurface(Surface surface) { auto p = gdk_cairo_region_create_from_surface((surface is null) ? null : surface.getSurfaceStruct()); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Sets the specified #GdkColor as the source color of @cr. * * Deprecated: Use gdk_cairo_set_source_rgba() instead * * Params: * cr = a cairo context * color = a #GdkColor * * Since: 2.8 */ public void setSourceColor(Context cr, Color color) { gdk_cairo_set_source_color((cr is null) ? null : cr.getContextStruct(), (color is null) ? null : color.getColorStruct()); } /** * Sets the given pixbuf as the source pattern for @cr. * * The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned * so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y. * * Params: * cr = a cairo context * pixbuf = a #GdkPixbuf * pixbufX = X coordinate of location to place upper left corner of @pixbuf * pixbufY = Y coordinate of location to place upper left corner of @pixbuf * * Since: 2.8 */ public void setSourcePixbuf(Context cr, Pixbuf pixbuf, double pixbufX, double pixbufY) { gdk_cairo_set_source_pixbuf((cr is null) ? null : cr.getContextStruct(), (pixbuf is null) ? null : pixbuf.getPixbufStruct(), pixbufX, pixbufY); } /** * Sets the specified #GdkRGBA as the source color of @cr. * * Params: * cr = a cairo context * rgba = a #GdkRGBA * * Since: 3.0 */ public void setSourceRgba(Context cr, RGBA rgba) { gdk_cairo_set_source_rgba((cr is null) ? null : cr.getContextStruct(), (rgba is null) ? null : rgba.getRGBAStruct()); } /** * Sets the given window as the source pattern for @cr. * * The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned * so that the origin of @window is @x, @y. The window contains all its * subwindows when rendering. * * Note that the contents of @window are undefined outside of the * visible part of @window, so use this function with care. * * Params: * cr = a cairo context * window = a #GdkWindow * x = X coordinate of location to place upper left corner of @window * y = Y coordinate of location to place upper left corner of @window * * Since: 2.24 */ public void setSourceWindow(Context cr, Window window, double x, double y) { gdk_cairo_set_source_window((cr is null) ? null : cr.getContextStruct(), (window is null) ? null : window.getWindowStruct(), x, y); } /** * Creates an image surface with the same contents as * the pixbuf. * * Params: * pixbuf = a #GdkPixbuf * scale = the scale of the new surface, or 0 to use same as @window * forWindow = The window this will be drawn to, or %NULL * * Returns: a new cairo surface, must be freed with cairo_surface_destroy() * * Since: 3.10 */ public Surface surfaceCreateFromPixbuf(Pixbuf pixbuf, int scale, Window forWindow) { auto p = gdk_cairo_surface_create_from_pixbuf((pixbuf is null) ? null : pixbuf.getPixbufStruct(), scale, (forWindow is null) ? null : forWindow.getWindowStruct()); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Retrieves the #GdkDrawingContext that created the Cairo * context @cr. * * Params: * cr = a Cairo context * * Returns: a #GdkDrawingContext, if any is set * * Since: 3.22 */ public DrawingContext getDrawingContext(Context cr) { auto p = gdk_cairo_get_drawing_context((cr is null) ? null : cr.getContextStruct()); if(p is null) { return null; } return ObjectG.getDObject!(DrawingContext)(cast(GdkDrawingContext*) p); } GtkD-3.7.5/generated/gtkd/gdk/Color.d000066400000000000000000000142711324604450400172450ustar00rootroot00000000000000/* * 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 gdk.Color; private import gdk.c.functions; public import gdk.c.types; private import glib.MemorySlice; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.gdktypes; private import gtkd.Loader; /** * A #GdkColor is used to describe a color, * similar to the XColor struct used in the X11 drawing API. * * Deprecated: Use #GdkRGBA */ public final class Color { /** the main Gtk struct */ protected GdkColor* gdkColor; protected bool ownedRef; /** Get the main Gtk struct */ public GdkColor* getColorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkColor; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gdkColor; } /** * Sets our main struct and passes it to the parent class. */ public this (GdkColor* gdkColor, bool ownedRef = false) { this.gdkColor = gdkColor; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GDK) && ownedRef ) gdk_color_free(gdkColor); } /** * Creates a new Color */ this() { GdkColor color; this(gdk_color_copy(&color)); } /** ditto */ this(ubyte red, ubyte green, ubyte blue) { GdkColor color; color.red = cast(ushort)(red * 257); color.green = cast(ushort)(green * 257); color.blue = cast(ushort)(blue * 257); this(gdk_color_copy(&color)); } /** ditto */ this(ushort red, ushort green, ushort blue) { GdkColor color; color.red = red; color.green = green; color.blue = blue; this(gdk_color_copy(&color)); } private void updatePixel() { gdkColor.pixel = (gdkColor.red&0xFF00 << 8) | (gdkColor.green&0xFF00) | (gdkColor.blue >> 8) ; } /** */ /** * For allocated colors, the pixel value used to * draw this color on the screen. Not used anymore. */ public @property uint pixel() { return gdkColor.pixel; } /** Ditto */ public @property void pixel(uint value) { gdkColor.pixel = value; } /** * The red component of the color. This is * a value between 0 and 65535, with 65535 indicating * full intensity */ public @property ushort red() { return gdkColor.red; } /** Ditto */ public @property void red(ushort value) { gdkColor.red = value; } /** * The green component of the color */ public @property ushort green() { return gdkColor.green; } /** Ditto */ public @property void green(ushort value) { gdkColor.green = value; } /** * The blue component of the color */ public @property ushort blue() { return gdkColor.blue; } /** Ditto */ public @property void blue(ushort value) { gdkColor.blue = value; } /** */ public static GType getType() { return gdk_color_get_type(); } /** * Makes a copy of a #GdkColor. * * The result must be freed using gdk_color_free(). * * Deprecated: Use #GdkRGBA * * Returns: a copy of @color */ public Color copy() { auto p = gdk_color_copy(gdkColor); if(p is null) { return null; } return ObjectG.getDObject!(Color)(cast(GdkColor*) p, true); } /** * Compares two colors. * * Deprecated: Use #GdkRGBA * * Params: * colorb = another #GdkColor * * Returns: %TRUE if the two colors compare equal */ public bool equal(Color colorb) { return gdk_color_equal(gdkColor, (colorb is null) ? null : colorb.getColorStruct()) != 0; } /** * Frees a #GdkColor created with gdk_color_copy(). * * Deprecated: Use #GdkRGBA */ public void free() { gdk_color_free(gdkColor); ownedRef = false; } /** * A hash function suitable for using for a hash * table that stores #GdkColors. * * Deprecated: Use #GdkRGBA * * Returns: The hash function applied to @color */ public uint hash() { return gdk_color_hash(gdkColor); } /** * Returns a textual specification of @color in the hexadecimal * form “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits * representing the red, green and blue components respectively. * * The returned string can be parsed by gdk_color_parse(). * * Deprecated: Use #GdkRGBA * * Returns: a newly-allocated text string * * Since: 2.12 */ public override string toString() { auto retStr = gdk_color_to_string(gdkColor); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Parses a textual specification of a color and fill in the * @red, @green, and @blue fields of a #GdkColor. * * The string can either one of a large set of standard names * (taken from the X11 `rgb.txt` file), or it can be a hexadecimal * value in the form “\#rgb” “\#rrggbb”, “\#rrrgggbbb” or * “\#rrrrggggbbbb” where “r”, “g” and “b” are hex digits of * the red, green, and blue components of the color, respectively. * (White in the four forms is “\#fff”, “\#ffffff”, “\#fffffffff” * and “\#ffffffffffff”). * * Deprecated: Use #GdkRGBA * * Params: * spec = the string specifying the color * color = the #GdkColor to fill in * * Returns: %TRUE if the parsing succeeded */ public static bool parse(string spec, out Color color) { GdkColor* outcolor = sliceNew!GdkColor(); auto p = gdk_color_parse(Str.toStringz(spec), outcolor) != 0; color = ObjectG.getDObject!(Color)(outcolor, true); return p; } } GtkD-3.7.5/generated/gtkd/gdk/Cursor.d000066400000000000000000000252161324604450400174450ustar00rootroot00000000000000/* * 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 gdk.Cursor; private import cairo.Surface; private import gdk.Display; private import gdk.c.functions; public import gdk.c.types; private import gdkpixbuf.Pixbuf; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.gdktypes; /** * A #GdkCursor represents a cursor. Its contents are private. */ public class Cursor : ObjectG { /** the main Gtk struct */ protected GdkCursor* gdkCursor; /** Get the main Gtk struct */ public GdkCursor* getCursorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkCursor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkCursor; } protected override void setStruct(GObject* obj) { gdkCursor = cast(GdkCursor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkCursor* gdkCursor, bool ownedRef = false) { this.gdkCursor = gdkCursor; super(cast(GObject*)gdkCursor, ownedRef); } /** */ public static GType getType() { return gdk_cursor_get_type(); } /** * Creates a new cursor from the set of builtin cursors for the default display. * See gdk_cursor_new_for_display(). * * To make the cursor invisible, use %GDK_BLANK_CURSOR. * * Deprecated: Use gdk_cursor_new_for_display() instead. * * Params: * cursorType = cursor to create * * Returns: a new #GdkCursor * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GdkCursorType cursorType) { auto p = gdk_cursor_new(cursorType); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GdkCursor*) p, true); } /** * Creates a new cursor from the set of builtin cursors. * * Params: * display = the #GdkDisplay for which the cursor will be created * cursorType = cursor to create * * Returns: a new #GdkCursor * * Since: 2.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Display display, GdkCursorType cursorType) { auto p = gdk_cursor_new_for_display((display is null) ? null : display.getDisplayStruct(), cursorType); if(p is null) { throw new ConstructionException("null returned by new_for_display"); } this(cast(GdkCursor*) p, true); } /** * Creates a new cursor by looking up @name in the current cursor * theme. * * A recommended set of cursor names that will work across different * platforms can be found in the CSS specification: * - "none" * - ![](default_cursor.png) "default" * - ![](help_cursor.png) "help" * - ![](pointer_cursor.png) "pointer" * - ![](context_menu_cursor.png) "context-menu" * - ![](progress_cursor.png) "progress" * - ![](wait_cursor.png) "wait" * - ![](cell_cursor.png) "cell" * - ![](crosshair_cursor.png) "crosshair" * - ![](text_cursor.png) "text" * - ![](vertical_text_cursor.png) "vertical-text" * - ![](alias_cursor.png) "alias" * - ![](copy_cursor.png) "copy" * - ![](no_drop_cursor.png) "no-drop" * - ![](move_cursor.png) "move" * - ![](not_allowed_cursor.png) "not-allowed" * - ![](grab_cursor.png) "grab" * - ![](grabbing_cursor.png) "grabbing" * - ![](all_scroll_cursor.png) "all-scroll" * - ![](col_resize_cursor.png) "col-resize" * - ![](row_resize_cursor.png) "row-resize" * - ![](n_resize_cursor.png) "n-resize" * - ![](e_resize_cursor.png) "e-resize" * - ![](s_resize_cursor.png) "s-resize" * - ![](w_resize_cursor.png) "w-resize" * - ![](ne_resize_cursor.png) "ne-resize" * - ![](nw_resize_cursor.png) "nw-resize" * - ![](sw_resize_cursor.png) "sw-resize" * - ![](se_resize_cursor.png) "se-resize" * - ![](ew_resize_cursor.png) "ew-resize" * - ![](ns_resize_cursor.png) "ns-resize" * - ![](nesw_resize_cursor.png) "nesw-resize" * - ![](nwse_resize_cursor.png) "nwse-resize" * - ![](zoom_in_cursor.png) "zoom-in" * - ![](zoom_out_cursor.png) "zoom-out" * * Params: * display = the #GdkDisplay for which the cursor will be created * name = the name of the cursor * * Returns: a new #GdkCursor, or %NULL if there is no * cursor with the given name * * Since: 2.8 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Display display, string name) { auto p = gdk_cursor_new_from_name((display is null) ? null : display.getDisplayStruct(), Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by new_from_name"); } this(cast(GdkCursor*) p, true); } /** * Creates a new cursor from a pixbuf. * * Not all GDK backends support RGBA cursors. If they are not * supported, a monochrome approximation will be displayed. * The functions gdk_display_supports_cursor_alpha() and * gdk_display_supports_cursor_color() can be used to determine * whether RGBA cursors are supported; * gdk_display_get_default_cursor_size() and * gdk_display_get_maximal_cursor_size() give information about * cursor sizes. * * If @x or @y are `-1`, the pixbuf must have * options named “x_hot” and “y_hot”, resp., containing * integer values between `0` and the width resp. height of * the pixbuf. (Since: 3.0) * * On the X backend, support for RGBA cursors requires a * sufficently new version of the X Render extension. * * Params: * display = the #GdkDisplay for which the cursor will be created * pixbuf = the #GdkPixbuf containing the cursor image * x = the horizontal offset of the “hotspot” of the cursor. * y = the vertical offset of the “hotspot” of the cursor. * * Returns: a new #GdkCursor. * * Since: 2.4 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Display display, Pixbuf pixbuf, int x, int y) { auto p = gdk_cursor_new_from_pixbuf((display is null) ? null : display.getDisplayStruct(), (pixbuf is null) ? null : pixbuf.getPixbufStruct(), x, y); if(p is null) { throw new ConstructionException("null returned by new_from_pixbuf"); } this(cast(GdkCursor*) p, true); } /** * Creates a new cursor from a cairo image surface. * * Not all GDK backends support RGBA cursors. If they are not * supported, a monochrome approximation will be displayed. * The functions gdk_display_supports_cursor_alpha() and * gdk_display_supports_cursor_color() can be used to determine * whether RGBA cursors are supported; * gdk_display_get_default_cursor_size() and * gdk_display_get_maximal_cursor_size() give information about * cursor sizes. * * On the X backend, support for RGBA cursors requires a * sufficently new version of the X Render extension. * * Params: * display = the #GdkDisplay for which the cursor will be created * surface = the cairo image surface containing the cursor pixel data * x = the horizontal offset of the “hotspot” of the cursor * y = the vertical offset of the “hotspot” of the cursor * * Returns: a new #GdkCursor. * * Since: 3.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Display display, Surface surface, double x, double y) { auto p = gdk_cursor_new_from_surface((display is null) ? null : display.getDisplayStruct(), (surface is null) ? null : surface.getSurfaceStruct(), x, y); if(p is null) { throw new ConstructionException("null returned by new_from_surface"); } this(cast(GdkCursor*) p, true); } /** * Returns the cursor type for this cursor. * * Returns: a #GdkCursorType * * Since: 2.22 */ public GdkCursorType getCursorType() { return gdk_cursor_get_cursor_type(gdkCursor); } /** * Returns the display on which the #GdkCursor is defined. * * Returns: the #GdkDisplay associated to @cursor * * Since: 2.2 */ public Display getDisplay() { auto p = gdk_cursor_get_display(gdkCursor); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Returns a #GdkPixbuf with the image used to display the cursor. * * Note that depending on the capabilities of the windowing system and * on the cursor, GDK may not be able to obtain the image data. In this * case, %NULL is returned. * * Returns: a #GdkPixbuf representing * @cursor, or %NULL * * Since: 2.8 */ public Pixbuf getImage() { auto p = gdk_cursor_get_image(gdkCursor); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Returns a cairo image surface with the image used to display the cursor. * * Note that depending on the capabilities of the windowing system and * on the cursor, GDK may not be able to obtain the image data. In this * case, %NULL is returned. * * Params: * xHot = Location to store the hotspot x position, * or %NULL * yHot = Location to store the hotspot y position, * or %NULL * * Returns: a #cairo_surface_t * representing @cursor, or %NULL * * Since: 3.10 */ public Surface getSurface(out double xHot, out double yHot) { auto p = gdk_cursor_get_surface(gdkCursor, &xHot, &yHot); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Adds a reference to @cursor. * * Deprecated: Use g_object_ref() instead * * Returns: Same @cursor that was passed in */ public override Cursor doref() { auto p = gdk_cursor_ref(gdkCursor); if(p is null) { return null; } return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) p, true); } /** * Removes a reference from @cursor, deallocating the cursor * if no references remain. * * Deprecated: Use g_object_unref() instead */ public override void unref() { gdk_cursor_unref(gdkCursor); } } GtkD-3.7.5/generated/gtkd/gdk/Device.d000066400000000000000000000622701324604450400173700ustar00rootroot00000000000000/* * 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 gdk.Device; private import gdk.Cursor; private import gdk.DeviceTool; private import gdk.Display; private import gdk.Screen; private import gdk.Seat; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** * The #GdkDevice object represents a single input device, such * as a keyboard, a mouse, a touchpad, etc. * * See the #GdkDeviceManager documentation for more information * about the various kinds of master and slave devices, and their * relationships. */ public class Device : ObjectG { /** the main Gtk struct */ protected GdkDevice* gdkDevice; /** Get the main Gtk struct */ public GdkDevice* getDeviceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkDevice; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkDevice; } protected override void setStruct(GObject* obj) { gdkDevice = cast(GdkDevice*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkDevice* gdkDevice, bool ownedRef = false) { this.gdkDevice = gdkDevice; super(cast(GObject*)gdkDevice, ownedRef); } /** */ public static GType getType() { return gdk_device_get_type(); } /** * Frees an array of #GdkTimeCoord that was returned by gdk_device_get_history(). * * Params: * events = an array of #GdkTimeCoord. */ public static void freeHistory(GdkTimeCoord*[] events) { gdk_device_free_history(events.ptr, cast(int)events.length); } /** * Determines information about the current keyboard grab. * This is not public API and must not be used by applications. * * Deprecated: The symbol was never meant to be used outside * of GTK+ * * Params: * display = the display for which to get the grab information * device = device to get the grab information from * grabWindow = location to store current grab window * ownerEvents = location to store boolean indicating whether * the @owner_events flag to gdk_keyboard_grab() or * gdk_pointer_grab() was %TRUE. * * Returns: %TRUE if this application currently has the * keyboard grabbed. */ public static bool grabInfoLibgtkOnly(Display display, Device device, out Window grabWindow, out bool ownerEvents) { GdkWindow* outgrabWindow = null; int outownerEvents; auto p = gdk_device_grab_info_libgtk_only((display is null) ? null : display.getDisplayStruct(), (device is null) ? null : device.getDeviceStruct(), &outgrabWindow, &outownerEvents) != 0; grabWindow = ObjectG.getDObject!(Window)(outgrabWindow); ownerEvents = (outownerEvents == 1); return p; } /** * Returns the associated device to @device, if @device is of type * %GDK_DEVICE_TYPE_MASTER, it will return the paired pointer or * keyboard. * * If @device is of type %GDK_DEVICE_TYPE_SLAVE, it will return * the master device to which @device is attached to. * * If @device is of type %GDK_DEVICE_TYPE_FLOATING, %NULL will be * returned, as there is no associated device. * * Returns: The associated device, or * %NULL * * Since: 3.0 */ public Device getAssociatedDevice() { auto p = gdk_device_get_associated_device(gdkDevice); if(p is null) { return null; } return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); } /** * Returns the axes currently available on the device. * * Since: 3.22 */ public GdkAxisFlags getAxes() { return gdk_device_get_axes(gdkDevice); } /** * Interprets an array of double as axis values for a given device, * and locates the value in the array for a given axis use. * * Params: * axes = pointer to an array of axes * use = the use to look for * value = location to store the found value. * * Returns: %TRUE if the given axis use was found, otherwise %FALSE */ public bool getAxis(double[] axes, GdkAxisUse use, out double value) { return gdk_device_get_axis(gdkDevice, axes.ptr, use, &value) != 0; } /** * Returns the axis use for @index_. * * Params: * index = the index of the axis. * * Returns: a #GdkAxisUse specifying how the axis is used. * * Since: 2.20 */ public GdkAxisUse getAxisUse(uint index) { return gdk_device_get_axis_use(gdkDevice, index); } /** * Interprets an array of double as axis values for a given device, * and locates the value in the array for a given axis label, as returned * by gdk_device_list_axes() * * Params: * axes = pointer to an array of axes * axisLabel = #GdkAtom with the axis label. * value = location to store the found value. * * Returns: %TRUE if the given axis use was found, otherwise %FALSE. * * Since: 3.0 */ public bool getAxisValue(double[] axes, GdkAtom axisLabel, out double value) { return gdk_device_get_axis_value(gdkDevice, axes.ptr, axisLabel, &value) != 0; } /** * Returns the device type for @device. * * Returns: the #GdkDeviceType for @device. * * Since: 3.0 */ public GdkDeviceType getDeviceType() { return gdk_device_get_device_type(gdkDevice); } /** * Returns the #GdkDisplay to which @device pertains. * * Returns: a #GdkDisplay. This memory is owned * by GTK+, and must not be freed or unreffed. * * Since: 3.0 */ public Display getDisplay() { auto p = gdk_device_get_display(gdkDevice); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Determines whether the pointer follows device motion. * This is not meaningful for keyboard devices, which don't have a pointer. * * Returns: %TRUE if the pointer follows device motion * * Since: 2.20 */ public bool getHasCursor() { return gdk_device_get_has_cursor(gdkDevice) != 0; } /** * Obtains the motion history for a pointer device; given a starting and * ending timestamp, return all events in the motion history for * the device in the given range of time. Some windowing systems * do not support motion history, in which case, %FALSE will * be returned. (This is not distinguishable from the case where * motion history is supported and no events were found.) * * Note that there is also gdk_window_set_event_compression() to get * more motion events delivered directly, independent of the windowing * system. * * Params: * window = the window with respect to which which the event coordinates will be reported * start = starting timestamp for range of events to return * stop = ending timestamp for the range of events to return * events = location to store a newly-allocated array of #GdkTimeCoord, or * %NULL * * Returns: %TRUE if the windowing system supports motion history and * at least one event was found. */ public bool getHistory(Window window, uint start, uint stop, out GdkTimeCoord*[] events) { GdkTimeCoord** outevents = null; int nEvents; auto p = gdk_device_get_history(gdkDevice, (window is null) ? null : window.getWindowStruct(), start, stop, &outevents, &nEvents) != 0; events = outevents[0 .. nEvents]; return p; } /** * If @index_ has a valid keyval, this function will return %TRUE * and fill in @keyval and @modifiers with the keyval settings. * * Params: * index = the index of the macro button to get. * keyval = return value for the keyval. * modifiers = return value for modifiers. * * Returns: %TRUE if keyval is set for @index. * * Since: 2.20 */ public bool getKey(uint index, out uint keyval, out GdkModifierType modifiers) { return gdk_device_get_key(gdkDevice, index, &keyval, &modifiers) != 0; } /** * Gets information about which window the given pointer device is in, based on events * that have been received so far from the display server. If another application * has a pointer grab, or this application has a grab with owner_events = %FALSE, * %NULL may be returned even if the pointer is physically over one of this * application's windows. * * Returns: the last window the device * * Since: 3.12 */ public Window getLastEventWindow() { auto p = gdk_device_get_last_event_window(gdkDevice); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Determines the mode of the device. * * Returns: a #GdkInputSource * * Since: 2.20 */ public GdkInputMode getMode() { return gdk_device_get_mode(gdkDevice); } /** * Returns the number of axes the device currently has. * * Returns: the number of axes. * * Since: 3.0 */ public int getNAxes() { return gdk_device_get_n_axes(gdkDevice); } /** * Returns the number of keys the device currently has. * * Returns: the number of keys. * * Since: 2.24 */ public int getNKeys() { return gdk_device_get_n_keys(gdkDevice); } /** * Determines the name of the device. * * Returns: a name * * Since: 2.20 */ public string getName() { return Str.toString(gdk_device_get_name(gdkDevice)); } /** * Gets the current location of @device. As a slave device * coordinates are those of its master pointer, This function * may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE, * unless there is an ongoing grab on them, see gdk_device_grab(). * * Params: * screen = location to store the #GdkScreen * the @device is on, or %NULL. * x = location to store root window X coordinate of @device, or %NULL. * y = location to store root window Y coordinate of @device, or %NULL. * * Since: 3.0 */ public void getPosition(out Screen screen, out int x, out int y) { GdkScreen* outscreen = null; gdk_device_get_position(gdkDevice, &outscreen, &x, &y); screen = ObjectG.getDObject!(Screen)(outscreen); } /** * Gets the current location of @device in double precision. As a slave device's * coordinates are those of its master pointer, this function * may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE, * unless there is an ongoing grab on them. See gdk_device_grab(). * * Params: * screen = location to store the #GdkScreen * the @device is on, or %NULL. * x = location to store root window X coordinate of @device, or %NULL. * y = location to store root window Y coordinate of @device, or %NULL. * * Since: 3.10 */ public void getPositionDouble(out Screen screen, out double x, out double y) { GdkScreen* outscreen = null; gdk_device_get_position_double(gdkDevice, &outscreen, &x, &y); screen = ObjectG.getDObject!(Screen)(outscreen); } /** * Returns the product ID of this device, or %NULL if this information couldn't * be obtained. This ID is retrieved from the device, and is thus constant for * it. See gdk_device_get_vendor_id() for more information. * * Returns: the product ID, or %NULL * * Since: 3.16 */ public string getProductId() { return Str.toString(gdk_device_get_product_id(gdkDevice)); } /** * Returns the #GdkSeat the device belongs to. * * Returns: A #GdkSeat. This memory is owned by GTK+ and * must not be freed. * * Since: 3.20 */ public Seat getSeat() { auto p = gdk_device_get_seat(gdkDevice); if(p is null) { return null; } return ObjectG.getDObject!(Seat)(cast(GdkSeat*) p); } /** * Determines the type of the device. * * Returns: a #GdkInputSource * * Since: 2.20 */ public GdkInputSource getSource() { return gdk_device_get_source(gdkDevice); } /** * Gets the current state of a pointer device relative to @window. As a slave * device’s coordinates are those of its master pointer, this * function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE, * unless there is an ongoing grab on them. See gdk_device_grab(). * * Params: * window = a #GdkWindow. * axes = an array of doubles to store the values of * the axes of @device in, or %NULL. * mask = location to store the modifiers, or %NULL. */ public void getState(Window window, double[] axes, out GdkModifierType mask) { gdk_device_get_state(gdkDevice, (window is null) ? null : window.getWindowStruct(), axes.ptr, &mask); } /** * Returns the vendor ID of this device, or %NULL if this information couldn't * be obtained. This ID is retrieved from the device, and is thus constant for * it. * * This function, together with gdk_device_get_product_id(), can be used to eg. * compose #GSettings paths to store settings for this device. * * |[ * static GSettings * * get_device_settings (GdkDevice *device) * { * const gchar *vendor, *product; * GSettings *settings; * GdkDevice *device; * gchar *path; * * vendor = gdk_device_get_vendor_id (device); * product = gdk_device_get_product_id (device); * * path = g_strdup_printf ("/org/example/app/devices/%s:%s/", vendor, product); * settings = g_settings_new_with_path (DEVICE_SCHEMA, path); * g_free (path); * * return settings; * } * ]| * * Returns: the vendor ID, or %NULL * * Since: 3.16 */ public string getVendorId() { return Str.toString(gdk_device_get_vendor_id(gdkDevice)); } /** * Obtains the window underneath @device, returning the location of the device in @win_x and @win_y. Returns * %NULL if the window tree under @device is not known to GDK (for example, belongs to another application). * * As a slave device coordinates are those of its master pointer, This * function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE, * unless there is an ongoing grab on them, see gdk_device_grab(). * * Params: * winX = return location for the X coordinate of the device location, * relative to the window origin, or %NULL. * winY = return location for the Y coordinate of the device location, * relative to the window origin, or %NULL. * * Returns: the #GdkWindow under the * device position, or %NULL. * * Since: 3.0 */ public Window getWindowAtPosition(out int winX, out int winY) { auto p = gdk_device_get_window_at_position(gdkDevice, &winX, &winY); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Obtains the window underneath @device, returning the location of the device in @win_x and @win_y in * double precision. Returns %NULL if the window tree under @device is not known to GDK (for example, * belongs to another application). * * As a slave device coordinates are those of its master pointer, This * function may not be called on devices of type %GDK_DEVICE_TYPE_SLAVE, * unless there is an ongoing grab on them, see gdk_device_grab(). * * Params: * winX = return location for the X coordinate of the device location, * relative to the window origin, or %NULL. * winY = return location for the Y coordinate of the device location, * relative to the window origin, or %NULL. * * Returns: the #GdkWindow under the * device position, or %NULL. * * Since: 3.0 */ public Window getWindowAtPositionDouble(out double winX, out double winY) { auto p = gdk_device_get_window_at_position_double(gdkDevice, &winX, &winY); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Grabs the device so that all events coming from this device are passed to * this application until the device is ungrabbed with gdk_device_ungrab(), * or the window becomes unviewable. This overrides any previous grab on the device * by this client. * * Note that @device and @window need to be on the same display. * * Device grabs are used for operations which need complete control over the * given device events (either pointer or keyboard). For example in GTK+ this * is used for Drag and Drop operations, popup menus and such. * * Note that if the event mask of an X window has selected both button press * and button release events, then a button press event will cause an automatic * pointer grab until the button is released. X does this automatically since * most applications expect to receive button press and release events in pairs. * It is equivalent to a pointer grab on the window with @owner_events set to * %TRUE. * * If you set up anything at the time you take the grab that needs to be * cleaned up when the grab ends, you should handle the #GdkEventGrabBroken * events that are emitted when the grab ends unvoluntarily. * * Deprecated: Use gdk_seat_grab() instead. * * Params: * window = the #GdkWindow which will own the grab (the grab window) * grabOwnership = specifies the grab ownership. * ownerEvents = if %FALSE then all device events are reported with respect to * @window and are only reported if selected by @event_mask. If * %TRUE then pointer events for this application are reported * as normal, but pointer events outside this application are * reported with respect to @window and only if selected by * @event_mask. In either mode, unreported events are discarded. * eventMask = specifies the event mask, which is used in accordance with * @owner_events. * cursor = the cursor to display while the grab is active if the device is * a pointer. If this is %NULL then the normal cursors are used for * @window and its descendants, and the cursor for @window is used * elsewhere. * time = the timestamp of the event which led to this pointer grab. This * usually comes from the #GdkEvent struct, though %GDK_CURRENT_TIME * can be used if the time isn’t known. * * Returns: %GDK_GRAB_SUCCESS if the grab was successful. * * Since: 3.0 */ public GdkGrabStatus grab(Window window, GdkGrabOwnership grabOwnership, bool ownerEvents, GdkEventMask eventMask, Cursor cursor, uint time) { return gdk_device_grab(gdkDevice, (window is null) ? null : window.getWindowStruct(), grabOwnership, ownerEvents, eventMask, (cursor is null) ? null : cursor.getCursorStruct(), time); } /** * Returns a #GList of #GdkAtoms, containing the labels for * the axes that @device currently has. * * Returns: A #GList of #GdkAtoms, free with g_list_free(). * * Since: 3.0 */ public ListG listAxes() { auto p = gdk_device_list_axes(gdkDevice); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * If the device if of type %GDK_DEVICE_TYPE_MASTER, it will return * the list of slave devices attached to it, otherwise it will return * %NULL * * Returns: the list of slave devices, or %NULL. The list must be * freed with g_list_free(), the contents of the list are * owned by GTK+ and should not be freed. */ public ListG listSlaveDevices() { auto p = gdk_device_list_slave_devices(gdkDevice); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Specifies how an axis of a device is used. * * Params: * index = the index of the axis * use = specifies how the axis is used */ public void setAxisUse(uint index, GdkAxisUse use) { gdk_device_set_axis_use(gdkDevice, index, use); } /** * Specifies the X key event to generate when a macro button of a device * is pressed. * * Params: * index = the index of the macro button to set * keyval = the keyval to generate * modifiers = the modifiers to set */ public void setKey(uint index, uint keyval, GdkModifierType modifiers) { gdk_device_set_key(gdkDevice, index, keyval, modifiers); } /** * Sets a the mode of an input device. The mode controls if the * device is active and whether the device’s range is mapped to the * entire screen or to a single window. * * Note: This is only meaningful for floating devices, master devices (and * slaves connected to these) drive the pointer cursor, which is not limited * by the input mode. * * Params: * mode = the input mode. * * Returns: %TRUE if the mode was successfully changed. */ public bool setMode(GdkInputMode mode) { return gdk_device_set_mode(gdkDevice, mode) != 0; } /** * Release any grab on @device. * * Deprecated: Use gdk_seat_ungrab() instead. * * Params: * time = a timestap (e.g. %GDK_CURRENT_TIME). * * Since: 3.0 */ public void ungrab(uint time) { gdk_device_ungrab(gdkDevice, time); } /** * Warps @device in @display to the point @x,@y on * the screen @screen, unless the device is confined * to a window by a grab, in which case it will be moved * as far as allowed by the grab. Warping the pointer * creates events as if the user had moved the mouse * instantaneously to the destination. * * Note that the pointer should normally be under the * control of the user. This function was added to cover * some rare use cases like keyboard navigation support * for the color picker in the #GtkColorSelectionDialog. * * Params: * screen = the screen to warp @device to. * x = the X coordinate of the destination. * y = the Y coordinate of the destination. * * Since: 3.0 */ public void warp(Screen screen, int x, int y) { gdk_device_warp(gdkDevice, (screen is null) ? null : screen.getScreenStruct(), x, y); } protected class OnChangedDelegateWrapper { void delegate(Device) dlg; gulong handlerId; this(void delegate(Device) dlg) { this.dlg = dlg; onChangedListeners ~= this; } void remove(OnChangedDelegateWrapper source) { foreach(index, wrapper; onChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChangedListeners[index] = null; onChangedListeners = std.algorithm.remove(onChangedListeners, index); break; } } } } OnChangedDelegateWrapper[] onChangedListeners; /** * The ::changed signal is emitted either when the #GdkDevice * has changed the number of either axes or keys. For example * In X this will normally happen when the slave device routing * events through the master device changes (for example, user * switches from the USB mouse to a tablet), in that case the * master device will change to reflect the new slave device * axes and keys. */ gulong addOnChanged(void delegate(Device) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "changed", cast(GCallback)&callBackChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChanged(GdkDevice* deviceStruct, OnChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackChangedDestroy(OnChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnToolChangedDelegateWrapper { void delegate(DeviceTool, Device) dlg; gulong handlerId; this(void delegate(DeviceTool, Device) dlg) { this.dlg = dlg; onToolChangedListeners ~= this; } void remove(OnToolChangedDelegateWrapper source) { foreach(index, wrapper; onToolChangedListeners) { if (wrapper.handlerId == source.handlerId) { onToolChangedListeners[index] = null; onToolChangedListeners = std.algorithm.remove(onToolChangedListeners, index); break; } } } } OnToolChangedDelegateWrapper[] onToolChangedListeners; /** * The ::tool-changed signal is emitted on pen/eraser * #GdkDevices whenever tools enter or leave proximity. * * Params: * tool = The new current tool * * Since: 3.22 */ gulong addOnToolChanged(void delegate(DeviceTool, Device) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnToolChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "tool-changed", cast(GCallback)&callBackToolChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackToolChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackToolChanged(GdkDevice* deviceStruct, GdkDeviceTool* tool, OnToolChangedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DeviceTool)(tool), wrapper.outer); } extern(C) static void callBackToolChangedDestroy(OnToolChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gdk/DeviceManager.d000066400000000000000000000400251324604450400206550ustar00rootroot00000000000000/* * 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 gdk.DeviceManager; private import gdk.Device; private import gdk.Display; private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** * In addition to a single pointer and keyboard for user interface input, * GDK contains support for a variety of input devices, including graphics * tablets, touchscreens and multiple pointers/keyboards interacting * simultaneously with the user interface. Such input devices often have * additional features, such as sub-pixel positioning information and * additional device-dependent information. * * In order to query the device hierarchy and be aware of changes in the * device hierarchy (such as virtual devices being created or removed, or * physical devices being plugged or unplugged), GDK provides * #GdkDeviceManager. * * By default, and if the platform supports it, GDK is aware of multiple * keyboard/pointer pairs and multitouch devices. This behavior can be * changed by calling gdk_disable_multidevice() before gdk_display_open(). * There should rarely be a need to do that though, since GDK defaults * to a compatibility mode in which it will emit just one enter/leave * event pair for all devices on a window. To enable per-device * enter/leave events and other multi-pointer interaction features, * gdk_window_set_support_multidevice() must be called on * #GdkWindows (or gtk_widget_set_support_multidevice() on widgets). * window. See the gdk_window_set_support_multidevice() documentation * for more information. * * On X11, multi-device support is implemented through XInput 2. * Unless gdk_disable_multidevice() is called, the XInput 2 * #GdkDeviceManager implementation will be used as the input source. * Otherwise either the core or XInput 1 implementations will be used. * * For simple applications that don’t have any special interest in * input devices, the so-called “client pointer” * provides a reasonable approximation to a simple setup with a single * pointer and keyboard. The device that has been set as the client * pointer can be accessed via gdk_device_manager_get_client_pointer(). * * Conceptually, in multidevice mode there are 2 device types. Virtual * devices (or master devices) are represented by the pointer cursors * and keyboard foci that are seen on the screen. Physical devices (or * slave devices) represent the hardware that is controlling the virtual * devices, and thus have no visible cursor on the screen. * * Virtual devices are always paired, so there is a keyboard device for every * pointer device. Associations between devices may be inspected through * gdk_device_get_associated_device(). * * There may be several virtual devices, and several physical devices could * be controlling each of these virtual devices. Physical devices may also * be “floating”, which means they are not attached to any virtual device. * * # Master and slave devices * * |[ * carlos@sacarino:~$ xinput list * ⎡ Virtual core pointer id=2 [master pointer (3)] * ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] * ⎜ ↳ Wacom ISDv4 E6 Pen stylus id=10 [slave pointer (2)] * ⎜ ↳ Wacom ISDv4 E6 Finger touch id=11 [slave pointer (2)] * ⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)] * ⎜ ↳ TPPS/2 IBM TrackPoint id=14 [slave pointer (2)] * ⎜ ↳ Wacom ISDv4 E6 Pen eraser id=16 [slave pointer (2)] * ⎣ Virtual core keyboard id=3 [master keyboard (2)] * ↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] * ↳ Power Button id=6 [slave keyboard (3)] * ↳ Video Bus id=7 [slave keyboard (3)] * ↳ Sleep Button id=8 [slave keyboard (3)] * ↳ Integrated Camera id=9 [slave keyboard (3)] * ↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)] * ↳ ThinkPad Extra Buttons id=15 [slave keyboard (3)] * ]| * * By default, GDK will automatically listen for events coming from all * master devices, setting the #GdkDevice for all events coming from input * devices. Events containing device information are #GDK_MOTION_NOTIFY, * #GDK_BUTTON_PRESS, #GDK_2BUTTON_PRESS, #GDK_3BUTTON_PRESS, * #GDK_BUTTON_RELEASE, #GDK_SCROLL, #GDK_KEY_PRESS, #GDK_KEY_RELEASE, * #GDK_ENTER_NOTIFY, #GDK_LEAVE_NOTIFY, #GDK_FOCUS_CHANGE, * #GDK_PROXIMITY_IN, #GDK_PROXIMITY_OUT, #GDK_DRAG_ENTER, #GDK_DRAG_LEAVE, * #GDK_DRAG_MOTION, #GDK_DRAG_STATUS, #GDK_DROP_START, #GDK_DROP_FINISHED * and #GDK_GRAB_BROKEN. When dealing with an event on a master device, * it is possible to get the source (slave) device that the event originated * from via gdk_event_get_source_device(). * * On a standard session, all physical devices are connected by default to * the "Virtual Core Pointer/Keyboard" master devices, hence routing all events * through these. This behavior is only modified by device grabs, where the * slave device is temporarily detached for as long as the grab is held, and * more permanently by user modifications to the device hierarchy. * * On certain application specific setups, it may make sense * to detach a physical device from its master pointer, and mapping it to * an specific window. This can be achieved by the combination of * gdk_device_grab() and gdk_device_set_mode(). * * In order to listen for events coming from devices * other than a virtual device, gdk_window_set_device_events() must be * called. Generally, this function can be used to modify the event mask * for any given device. * * Input devices may also provide additional information besides X/Y. * For example, graphics tablets may also provide pressure and X/Y tilt * information. This information is device-dependent, and may be * queried through gdk_device_get_axis(). In multidevice mode, virtual * devices will change axes in order to always represent the physical * device that is routing events through it. Whenever the physical device * changes, the #GdkDevice:n-axes property will be notified, and * gdk_device_list_axes() will return the new device axes. * * Devices may also have associated “keys” or * macro buttons. Such keys can be globally set to map into normal X * keyboard events. The mapping is set using gdk_device_set_key(). * * In GTK+ 3.20, a new #GdkSeat object has been introduced that * supersedes #GdkDeviceManager and should be preferred in newly * written code. */ public class DeviceManager : ObjectG { /** the main Gtk struct */ protected GdkDeviceManager* gdkDeviceManager; /** Get the main Gtk struct */ public GdkDeviceManager* getDeviceManagerStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkDeviceManager; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkDeviceManager; } protected override void setStruct(GObject* obj) { gdkDeviceManager = cast(GdkDeviceManager*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkDeviceManager* gdkDeviceManager, bool ownedRef = false) { this.gdkDeviceManager = gdkDeviceManager; super(cast(GObject*)gdkDeviceManager, ownedRef); } /** */ public static GType getType() { return gdk_device_manager_get_type(); } /** * Returns the client pointer, that is, the master pointer that acts as the core pointer * for this application. In X11, window managers may change this depending on the interaction * pattern under the presence of several pointers. * * You should use this function seldomly, only in code that isn’t triggered by a #GdkEvent * and there aren’t other means to get a meaningful #GdkDevice to operate on. * * Deprecated: Use gdk_seat_get_pointer() instead. * * Returns: The client pointer. This memory is * owned by GDK and must not be freed or unreferenced. * * Since: 3.0 */ public Device getClientPointer() { auto p = gdk_device_manager_get_client_pointer(gdkDeviceManager); if(p is null) { return null; } return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); } /** * Gets the #GdkDisplay associated to @device_manager. * * Returns: the #GdkDisplay to which * @device_manager is associated to, or #NULL. This memory is * owned by GDK and must not be freed or unreferenced. * * Since: 3.0 */ public Display getDisplay() { auto p = gdk_device_manager_get_display(gdkDeviceManager); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Returns the list of devices of type @type currently attached to * @device_manager. * * Deprecated: , use gdk_seat_get_pointer(), gdk_seat_get_keyboard() * and gdk_seat_get_slaves() instead. * * Params: * type = device type to get. * * Returns: a list of * #GdkDevices. The returned list must be * freed with g_list_free (). The list elements are owned by * GTK+ and must not be freed or unreffed. * * Since: 3.0 */ public ListG listDevices(GdkDeviceType type) { auto p = gdk_device_manager_list_devices(gdkDeviceManager, type); if(p is null) { return null; } return new ListG(cast(GList*) p); } protected class OnDeviceAddedDelegateWrapper { void delegate(Device, DeviceManager) dlg; gulong handlerId; this(void delegate(Device, DeviceManager) dlg) { this.dlg = dlg; onDeviceAddedListeners ~= this; } void remove(OnDeviceAddedDelegateWrapper source) { foreach(index, wrapper; onDeviceAddedListeners) { if (wrapper.handlerId == source.handlerId) { onDeviceAddedListeners[index] = null; onDeviceAddedListeners = std.algorithm.remove(onDeviceAddedListeners, index); break; } } } } OnDeviceAddedDelegateWrapper[] onDeviceAddedListeners; /** * The ::device-added signal is emitted either when a new master * pointer is created, or when a slave (Hardware) input device * is plugged in. * * Params: * device = the newly added #GdkDevice. */ gulong addOnDeviceAdded(void delegate(Device, DeviceManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDeviceAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "device-added", cast(GCallback)&callBackDeviceAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackDeviceAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDeviceAdded(GdkDeviceManager* devicemanagerStruct, GdkDevice* device, OnDeviceAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Device)(device), wrapper.outer); } extern(C) static void callBackDeviceAddedDestroy(OnDeviceAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDeviceChangedDelegateWrapper { void delegate(Device, DeviceManager) dlg; gulong handlerId; this(void delegate(Device, DeviceManager) dlg) { this.dlg = dlg; onDeviceChangedListeners ~= this; } void remove(OnDeviceChangedDelegateWrapper source) { foreach(index, wrapper; onDeviceChangedListeners) { if (wrapper.handlerId == source.handlerId) { onDeviceChangedListeners[index] = null; onDeviceChangedListeners = std.algorithm.remove(onDeviceChangedListeners, index); break; } } } } OnDeviceChangedDelegateWrapper[] onDeviceChangedListeners; /** * The ::device-changed signal is emitted whenever a device * has changed in the hierarchy, either slave devices being * disconnected from their master device or connected to * another one, or master devices being added or removed * a slave device. * * If a slave device is detached from all master devices * (gdk_device_get_associated_device() returns %NULL), its * #GdkDeviceType will change to %GDK_DEVICE_TYPE_FLOATING, * if it's attached, it will change to %GDK_DEVICE_TYPE_SLAVE. * * Params: * device = the #GdkDevice that changed. */ gulong addOnDeviceChanged(void delegate(Device, DeviceManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDeviceChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "device-changed", cast(GCallback)&callBackDeviceChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackDeviceChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDeviceChanged(GdkDeviceManager* devicemanagerStruct, GdkDevice* device, OnDeviceChangedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Device)(device), wrapper.outer); } extern(C) static void callBackDeviceChangedDestroy(OnDeviceChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDeviceRemovedDelegateWrapper { void delegate(Device, DeviceManager) dlg; gulong handlerId; this(void delegate(Device, DeviceManager) dlg) { this.dlg = dlg; onDeviceRemovedListeners ~= this; } void remove(OnDeviceRemovedDelegateWrapper source) { foreach(index, wrapper; onDeviceRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onDeviceRemovedListeners[index] = null; onDeviceRemovedListeners = std.algorithm.remove(onDeviceRemovedListeners, index); break; } } } } OnDeviceRemovedDelegateWrapper[] onDeviceRemovedListeners; /** * The ::device-removed signal is emitted either when a master * pointer is removed, or when a slave (Hardware) input device * is unplugged. * * Params: * device = the just removed #GdkDevice. */ gulong addOnDeviceRemoved(void delegate(Device, DeviceManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDeviceRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "device-removed", cast(GCallback)&callBackDeviceRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackDeviceRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDeviceRemoved(GdkDeviceManager* devicemanagerStruct, GdkDevice* device, OnDeviceRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Device)(device), wrapper.outer); } extern(C) static void callBackDeviceRemovedDestroy(OnDeviceRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** * Disables multidevice support in GDK. This call must happen prior * to gdk_display_open(), gtk_init(), gtk_init_with_args() or * gtk_init_check() in order to take effect. * * Most common GTK+ applications won’t ever need to call this. Only * applications that do mixed GDK/Xlib calls could want to disable * multidevice support if such Xlib code deals with input devices in * any way and doesn’t observe the presence of XInput 2. * * Since: 3.0 */ public static void disableMultidevice() { gdk_disable_multidevice(); } } GtkD-3.7.5/generated/gtkd/gdk/DevicePadIF.d000066400000000000000000000070661324604450400202360ustar00rootroot00000000000000/* * 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 gdk.DevicePadIF; private import gdk.c.functions; public import gdk.c.types; public import gtkc.gdktypes; /** * #GdkDevicePad is an interface implemented by devices of type * %GDK_SOURCE_TABLET_PAD, it allows querying the features provided * by the pad device. * * Tablet pads may contain one or more groups, each containing a subset * of the buttons/rings/strips available. gdk_device_pad_get_n_groups() * can be used to obtain the number of groups, gdk_device_pad_get_n_features() * and gdk_device_pad_get_feature_group() can be combined to find out the * number of buttons/rings/strips the device has, and how are they grouped. * * Each of those groups have different modes, which may be used to map * each individual pad feature to multiple actions. Only one mode is * effective (current) for each given group, different groups may have * different current modes. The number of available modes in a group can * be found out through gdk_device_pad_get_group_n_modes(), and the current * mode for a given group will be notified through the #GdkEventPadGroupMode * event. */ public interface DevicePadIF{ /** Get the main Gtk struct */ public GdkDevicePad* getDevicePadStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gdk_device_pad_get_type(); } /** * Returns the group the given @feature and @idx belong to, * or -1 if feature/index do not exist in @pad. * * Params: * feature = the feature type to get the group from * featureIdx = the index of the feature to get the group from * * Returns: The group number of the queried pad feature. * * Since: 3.22 */ public int getFeatureGroup(GdkDevicePadFeature feature, int featureIdx); /** * Returns the number of modes that @group may have. * * Params: * groupIdx = group to get the number of available modes from * * Returns: The number of modes available in @group. * * Since: 3.22 */ public int getGroupNModes(int groupIdx); /** * Returns the number of features a tablet pad has. * * Params: * feature = a pad feature * * Returns: The amount of elements of type @feature that this pad has. * * Since: 3.22 */ public int getNFeatures(GdkDevicePadFeature feature); /** * Returns the number of groups this pad device has. Pads have * at least one group. A pad group is a subcollection of * buttons/strip/rings that is affected collectively by a same * current mode. * * Returns: The number of button/ring/strip groups in the pad. * * Since: 3.22 */ public int getNGroups(); } GtkD-3.7.5/generated/gtkd/gdk/DevicePadT.d000066400000000000000000000074711324604450400201430ustar00rootroot00000000000000/* * 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 gdk.DevicePadT; public import gdk.c.functions; public import gdk.c.types; public import gtkc.gdktypes; /** * #GdkDevicePad is an interface implemented by devices of type * %GDK_SOURCE_TABLET_PAD, it allows querying the features provided * by the pad device. * * Tablet pads may contain one or more groups, each containing a subset * of the buttons/rings/strips available. gdk_device_pad_get_n_groups() * can be used to obtain the number of groups, gdk_device_pad_get_n_features() * and gdk_device_pad_get_feature_group() can be combined to find out the * number of buttons/rings/strips the device has, and how are they grouped. * * Each of those groups have different modes, which may be used to map * each individual pad feature to multiple actions. Only one mode is * effective (current) for each given group, different groups may have * different current modes. The number of available modes in a group can * be found out through gdk_device_pad_get_group_n_modes(), and the current * mode for a given group will be notified through the #GdkEventPadGroupMode * event. */ public template DevicePadT(TStruct) { /** Get the main Gtk struct */ public GdkDevicePad* getDevicePadStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GdkDevicePad*)getStruct(); } /** * Returns the group the given @feature and @idx belong to, * or -1 if feature/index do not exist in @pad. * * Params: * feature = the feature type to get the group from * featureIdx = the index of the feature to get the group from * * Returns: The group number of the queried pad feature. * * Since: 3.22 */ public int getFeatureGroup(GdkDevicePadFeature feature, int featureIdx) { return gdk_device_pad_get_feature_group(getDevicePadStruct(), feature, featureIdx); } /** * Returns the number of modes that @group may have. * * Params: * groupIdx = group to get the number of available modes from * * Returns: The number of modes available in @group. * * Since: 3.22 */ public int getGroupNModes(int groupIdx) { return gdk_device_pad_get_group_n_modes(getDevicePadStruct(), groupIdx); } /** * Returns the number of features a tablet pad has. * * Params: * feature = a pad feature * * Returns: The amount of elements of type @feature that this pad has. * * Since: 3.22 */ public int getNFeatures(GdkDevicePadFeature feature) { return gdk_device_pad_get_n_features(getDevicePadStruct(), feature); } /** * Returns the number of groups this pad device has. Pads have * at least one group. A pad group is a subcollection of * buttons/strip/rings that is affected collectively by a same * current mode. * * Returns: The number of button/ring/strip groups in the pad. * * Since: 3.22 */ public int getNGroups() { return gdk_device_pad_get_n_groups(getDevicePadStruct()); } } GtkD-3.7.5/generated/gtkd/gdk/DeviceTool.d000066400000000000000000000063671324604450400202330ustar00rootroot00000000000000/* * 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 gdk.DeviceTool; private import gdk.c.functions; public import gdk.c.types; private import gobject.ObjectG; public import gtkc.gdktypes; /** */ public class DeviceTool : ObjectG { /** the main Gtk struct */ protected GdkDeviceTool* gdkDeviceTool; /** Get the main Gtk struct */ public GdkDeviceTool* getDeviceToolStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkDeviceTool; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkDeviceTool; } protected override void setStruct(GObject* obj) { gdkDeviceTool = cast(GdkDeviceTool*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkDeviceTool* gdkDeviceTool, bool ownedRef = false) { this.gdkDeviceTool = gdkDeviceTool; super(cast(GObject*)gdkDeviceTool, ownedRef); } /** */ public static GType getType() { return gdk_device_tool_get_type(); } /** * Gets the hardware ID of this tool, or 0 if it's not known. When * non-zero, the identificator is unique for the given tool model, * meaning that two identical tools will share the same @hardware_id, * but will have different serial numbers (see gdk_device_tool_get_serial()). * * This is a more concrete (and device specific) method to identify * a #GdkDeviceTool than gdk_device_tool_get_tool_type(), as a tablet * may support multiple devices with the same #GdkDeviceToolType, * but having different hardware identificators. * * Returns: The hardware identificator of this tool. * * Since: 3.22 */ public ulong getHardwareId() { return gdk_device_tool_get_hardware_id(gdkDeviceTool); } /** * Gets the serial of this tool, this value can be used to identify a * physical tool (eg. a tablet pen) across program executions. * * Returns: The serial ID for this tool * * Since: 3.22 */ public ulong getSerial() { return gdk_device_tool_get_serial(gdkDeviceTool); } /** * Gets the #GdkDeviceToolType of the tool. * * Returns: The physical type for this tool. This can be used to figure out what * sort of pen is being used, such as an airbrush or a pencil. * * Since: 3.22 */ public GdkDeviceToolType getToolType() { return gdk_device_tool_get_tool_type(gdkDeviceTool); } } GtkD-3.7.5/generated/gtkd/gdk/Display.d000066400000000000000000001010171324604450400175670ustar00rootroot00000000000000/* * 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 gdk.Display; private import gdk.AppLaunchContext; private import gdk.Device; private import gdk.DeviceManager; private import gdk.Event; private import gdk.MonitorG; private import gdk.Screen; private import gdk.Seat; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** * #GdkDisplay objects purpose are two fold: * * - To manage and provide information about input devices (pointers and keyboards) * * - To manage and provide information about the available #GdkScreens * * GdkDisplay objects are the GDK representation of an X Display, * which can be described as a workstation consisting of * a keyboard, a pointing device (such as a mouse) and one or more * screens. * It is used to open and keep track of various GdkScreen objects * currently instantiated by the application. It is also used to * access the keyboard(s) and mouse pointer(s) of the display. * * Most of the input device handling has been factored out into * the separate #GdkDeviceManager object. Every display has a * device manager, which you can obtain using * gdk_display_get_device_manager(). */ public class Display : ObjectG { /** the main Gtk struct */ protected GdkDisplay* gdkDisplay; /** Get the main Gtk struct */ public GdkDisplay* getDisplayStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkDisplay; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkDisplay; } protected override void setStruct(GObject* obj) { gdkDisplay = cast(GdkDisplay*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkDisplay* gdkDisplay, bool ownedRef = false) { this.gdkDisplay = gdkDisplay; super(cast(GObject*)gdkDisplay, ownedRef); } /** */ public static GType getType() { return gdk_display_get_type(); } /** * Gets the default #GdkDisplay. This is a convenience * function for: * `gdk_display_manager_get_default_display (gdk_display_manager_get ())`. * * Returns: a #GdkDisplay, or %NULL if * there is no default display. * * Since: 2.2 */ public static Display getDefault() { auto p = gdk_display_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Opens a display. * * Params: * displayName = the name of the display to open * * Returns: a #GdkDisplay, or %NULL if the * display could not be opened * * Since: 2.2 */ public static Display open(string displayName) { auto p = gdk_display_open(Str.toStringz(displayName)); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Opens the default display specified by command line arguments or * environment variables, sets it as the default display, and returns * it. gdk_parse_args() must have been called first. If the default * display has previously been set, simply returns that. An internal * function that should not be used by applications. * * Deprecated: This symbol was never meant to be used outside * of GTK+ * * Returns: the default display, if it * could be opened, otherwise %NULL. */ public static Display openDefaultLibgtkOnly() { auto p = gdk_display_open_default_libgtk_only(); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Emits a short beep on @display * * Since: 2.2 */ public void beep() { gdk_display_beep(gdkDisplay); } /** * Closes the connection to the windowing system for the given display, * and cleans up associated resources. * * Since: 2.2 */ public void close() { gdk_display_close(gdkDisplay); } /** * Returns %TRUE if there is an ongoing grab on @device for @display. * * Params: * device = a #GdkDevice * * Returns: %TRUE if there is a grab in effect for @device. */ public bool deviceIsGrabbed(Device device) { return gdk_display_device_is_grabbed(gdkDisplay, (device is null) ? null : device.getDeviceStruct()) != 0; } /** * Flushes any requests queued for the windowing system; this happens automatically * when the main loop blocks waiting for new events, but if your application * is drawing without returning control to the main loop, you may need * to call this function explicitly. A common case where this function * needs to be called is when an application is executing drawing commands * from a thread other than the thread where the main loop is running. * * This is most useful for X11. On windowing systems where requests are * handled synchronously, this function will do nothing. * * Since: 2.4 */ public void flush() { gdk_display_flush(gdkDisplay); } /** * Returns a #GdkAppLaunchContext suitable for launching * applications on the given display. * * Returns: a new #GdkAppLaunchContext for @display. * Free with g_object_unref() when done * * Since: 3.0 */ public AppLaunchContext getAppLaunchContext() { auto p = gdk_display_get_app_launch_context(gdkDisplay); if(p is null) { return null; } return ObjectG.getDObject!(AppLaunchContext)(cast(GdkAppLaunchContext*) p, true); } /** * Returns the default size to use for cursors on @display. * * Returns: the default cursor size. * * Since: 2.4 */ public uint getDefaultCursorSize() { return gdk_display_get_default_cursor_size(gdkDisplay); } /** * Returns the default group leader window for all toplevel windows * on @display. This window is implicitly created by GDK. * See gdk_window_set_group(). * * Returns: The default group leader window * for @display * * Since: 2.4 */ public Window getDefaultGroup() { auto p = gdk_display_get_default_group(gdkDisplay); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Get the default #GdkScreen for @display. * * Returns: the default #GdkScreen object for @display * * Since: 2.2 */ public Screen getDefaultScreen() { auto p = gdk_display_get_default_screen(gdkDisplay); if(p is null) { return null; } return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); } /** * Returns the default #GdkSeat for this display. * * Returns: the default seat. * * Since: 3.20 */ public Seat getDefaultSeat() { auto p = gdk_display_get_default_seat(gdkDisplay); if(p is null) { return null; } return ObjectG.getDObject!(Seat)(cast(GdkSeat*) p); } /** * Returns the #GdkDeviceManager associated to @display. * * Deprecated: Use gdk_display_get_default_seat() and #GdkSeat operations. * * Returns: A #GdkDeviceManager, or * %NULL. This memory is owned by GDK and must not be freed * or unreferenced. * * Since: 3.0 */ public DeviceManager getDeviceManager() { auto p = gdk_display_get_device_manager(gdkDisplay); if(p is null) { return null; } return ObjectG.getDObject!(DeviceManager)(cast(GdkDeviceManager*) p); } /** * Gets the next #GdkEvent to be processed for @display, fetching events from the * windowing system if necessary. * * Returns: the next #GdkEvent to be processed, or %NULL * if no events are pending. The returned #GdkEvent should be freed * with gdk_event_free(). * * Since: 2.2 */ public Event getEvent() { auto p = gdk_display_get_event(gdkDisplay); if(p is null) { return null; } return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); } /** * Gets the maximal size to use for cursors on @display. * * Params: * width = the return location for the maximal cursor width * height = the return location for the maximal cursor height * * Since: 2.4 */ public void getMaximalCursorSize(out uint width, out uint height) { gdk_display_get_maximal_cursor_size(gdkDisplay, &width, &height); } /** * Gets a monitor associated with this display. * * Params: * monitorNum = number of the monitor * * Returns: the #GdkMonitor, or %NULL if * @monitor_num is not a valid monitor number * * Since: 3.22 */ public MonitorG getMonitor(int monitorNum) { auto p = gdk_display_get_monitor(gdkDisplay, monitorNum); if(p is null) { return null; } return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) p); } /** * Gets the monitor in which the point (@x, @y) is located, * or a nearby monitor if the point is not in any monitor. * * Params: * x = the x coordinate of the point * y = the y coordinate of the point * * Returns: the monitor containing the point * * Since: 3.22 */ public MonitorG getMonitorAtPoint(int x, int y) { auto p = gdk_display_get_monitor_at_point(gdkDisplay, x, y); if(p is null) { return null; } return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) p); } /** * Gets the monitor in which the largest area of @window * resides, or a monitor close to @window if it is outside * of all monitors. * * Params: * window = a #GdkWindow * * Returns: the monitor with the largest overlap with @window * * Since: 3.22 */ public MonitorG getMonitorAtWindow(Window window) { auto p = gdk_display_get_monitor_at_window(gdkDisplay, (window is null) ? null : window.getWindowStruct()); if(p is null) { return null; } return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) p); } /** * Gets the number of monitors that belong to @display. * * The returned number is valid until the next emission of the * #GdkDisplay::monitor-added or #GdkDisplay::monitor-removed signal. * * Returns: the number of monitors * * Since: 3.22 */ public int getNMonitors() { return gdk_display_get_n_monitors(gdkDisplay); } /** * Gets the number of screen managed by the @display. * * Deprecated: The number of screens is always 1. * * Returns: number of screens. * * Since: 2.2 */ public int getNScreens() { return gdk_display_get_n_screens(gdkDisplay); } /** * Gets the name of the display. * * Returns: a string representing the display name. This string is owned * by GDK and should not be modified or freed. * * Since: 2.2 */ public string getName() { return Str.toString(gdk_display_get_name(gdkDisplay)); } /** * Gets the current location of the pointer and the current modifier * mask for a given display. * * Deprecated: Use gdk_device_get_position() instead. * * Params: * screen = location to store the screen that the * cursor is on, or %NULL. * x = location to store root window X coordinate of pointer, or %NULL. * y = location to store root window Y coordinate of pointer, or %NULL. * mask = location to store current modifier mask, or %NULL * * Since: 2.2 */ public void getPointer(out Screen screen, out int x, out int y, out GdkModifierType mask) { GdkScreen* outscreen = null; gdk_display_get_pointer(gdkDisplay, &outscreen, &x, &y, &mask); screen = ObjectG.getDObject!(Screen)(outscreen); } /** * Gets the primary monitor for the display. * * The primary monitor is considered the monitor where the “main desktop” * lives. While normal application windows typically allow the window * manager to place the windows, specialized desktop applications * such as panels should place themselves on the primary monitor. * * Returns: the primary monitor, or %NULL if no primary * monitor is configured by the user * * Since: 3.22 */ public MonitorG getPrimaryMonitor() { auto p = gdk_display_get_primary_monitor(gdkDisplay); if(p is null) { return null; } return ObjectG.getDObject!(MonitorG)(cast(GdkMonitor*) p); } /** * Returns a screen object for one of the screens of the display. * * Deprecated: There is only one screen; use gdk_display_get_default_screen() to get it. * * Params: * screenNum = the screen number * * Returns: the #GdkScreen object * * Since: 2.2 */ public Screen getScreen(int screenNum) { auto p = gdk_display_get_screen(gdkDisplay, screenNum); if(p is null) { return null; } return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); } /** * Obtains the window underneath the mouse pointer, returning the location * of the pointer in that window in @win_x, @win_y for @screen. Returns %NULL * if the window under the mouse pointer is not known to GDK (for example, * belongs to another application). * * Deprecated: Use gdk_device_get_window_at_position() instead. * * Params: * winX = return location for x coordinate of the pointer location relative * to the window origin, or %NULL * winY = return location for y coordinate of the pointer location relative * & to the window origin, or %NULL * * Returns: the window under the mouse * pointer, or %NULL * * Since: 2.2 */ public Window getWindowAtPointer(out int winX, out int winY) { auto p = gdk_display_get_window_at_pointer(gdkDisplay, &winX, &winY); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Returns whether the display has events that are waiting * to be processed. * * Returns: %TRUE if there are events ready to be processed. * * Since: 3.0 */ public bool hasPending() { return gdk_display_has_pending(gdkDisplay) != 0; } /** * Finds out if the display has been closed. * * Returns: %TRUE if the display is closed. * * Since: 2.22 */ public bool isClosed() { return gdk_display_is_closed(gdkDisplay) != 0; } /** * Release any keyboard grab * * Deprecated: Use gdk_device_ungrab(), together with gdk_device_grab() * instead. * * Params: * time = a timestap (e.g #GDK_CURRENT_TIME). * * Since: 2.2 */ public void keyboardUngrab(uint time) { gdk_display_keyboard_ungrab(gdkDisplay, time); } /** * Returns the list of available input devices attached to @display. * The list is statically allocated and should not be freed. * * Deprecated: Use gdk_device_manager_list_devices() instead. * * Returns: a list of #GdkDevice * * Since: 2.2 */ public ListG listDevices() { auto p = gdk_display_list_devices(gdkDisplay); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Returns the list of seats known to @display. * * Returns: the * list of seats known to the #GdkDisplay * * Since: 3.20 */ public ListG listSeats() { auto p = gdk_display_list_seats(gdkDisplay); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Indicates to the GUI environment that the application has * finished loading, using a given identifier. * * GTK+ will call this function automatically for #GtkWindow * with custom startup-notification identifier unless * gtk_window_set_auto_startup_notification() is called to * disable that feature. * * Params: * startupId = a startup-notification identifier, for which * notification process should be completed * * Since: 3.0 */ public void notifyStartupComplete(string startupId) { gdk_display_notify_startup_complete(gdkDisplay, Str.toStringz(startupId)); } /** * Gets a copy of the first #GdkEvent in the @display’s event queue, without * removing the event from the queue. (Note that this function will * not get more events from the windowing system. It only checks the events * that have already been moved to the GDK event queue.) * * Returns: a copy of the first #GdkEvent on the event * queue, or %NULL if no events are in the queue. The returned * #GdkEvent should be freed with gdk_event_free(). * * Since: 2.2 */ public Event peekEvent() { auto p = gdk_display_peek_event(gdkDisplay); if(p is null) { return null; } return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); } /** * Test if the pointer is grabbed. * * Deprecated: Use gdk_display_device_is_grabbed() instead. * * Returns: %TRUE if an active X pointer grab is in effect * * Since: 2.2 */ public bool pointerIsGrabbed() { return gdk_display_pointer_is_grabbed(gdkDisplay) != 0; } /** * Release any pointer grab. * * Deprecated: Use gdk_device_ungrab(), together with gdk_device_grab() * instead. * * Params: * time = a timestap (e.g. %GDK_CURRENT_TIME). * * Since: 2.2 */ public void pointerUngrab(uint time) { gdk_display_pointer_ungrab(gdkDisplay, time); } /** * Appends a copy of the given event onto the front of the event * queue for @display. * * Params: * event = a #GdkEvent. * * Since: 2.2 */ public void putEvent(Event event) { gdk_display_put_event(gdkDisplay, (event is null) ? null : event.getEventStruct()); } /** * Request #GdkEventOwnerChange events for ownership changes * of the selection named by the given atom. * * Params: * selection = the #GdkAtom naming the selection for which * ownership change notification is requested * * Returns: whether #GdkEventOwnerChange events will * be sent. * * Since: 2.6 */ public bool requestSelectionNotification(GdkAtom selection) { return gdk_display_request_selection_notification(gdkDisplay, selection) != 0; } /** * Sets the double click distance (two clicks within this distance * count as a double click and result in a #GDK_2BUTTON_PRESS event). * See also gdk_display_set_double_click_time(). * Applications should not set this, it is a global * user-configured setting. * * Params: * distance = distance in pixels * * Since: 2.4 */ public void setDoubleClickDistance(uint distance) { gdk_display_set_double_click_distance(gdkDisplay, distance); } /** * Sets the double click time (two clicks within this time interval * count as a double click and result in a #GDK_2BUTTON_PRESS event). * Applications should not set this, it is a global * user-configured setting. * * Params: * msec = double click time in milliseconds (thousandths of a second) * * Since: 2.2 */ public void setDoubleClickTime(uint msec) { gdk_display_set_double_click_time(gdkDisplay, msec); } /** * Issues a request to the clipboard manager to store the * clipboard data. On X11, this is a special program that works * according to the * [FreeDesktop Clipboard Specification](http://www.freedesktop.org/Standards/clipboard-manager-spec). * * Params: * clipboardWindow = a #GdkWindow belonging to the clipboard owner * time = a timestamp * targets = an array of targets * that should be saved, or %NULL * if all available targets should be saved. * * Since: 2.6 */ public void storeClipboard(Window clipboardWindow, uint time, GdkAtom[] targets) { gdk_display_store_clipboard(gdkDisplay, (clipboardWindow is null) ? null : clipboardWindow.getWindowStruct(), time, targets.ptr, cast(int)targets.length); } /** * Returns whether the speicifed display supports clipboard * persistance; i.e. if it’s possible to store the clipboard data after an * application has quit. On X11 this checks if a clipboard daemon is * running. * * Returns: %TRUE if the display supports clipboard persistance. * * Since: 2.6 */ public bool supportsClipboardPersistence() { return gdk_display_supports_clipboard_persistence(gdkDisplay) != 0; } /** * Returns %TRUE if gdk_window_set_composited() can be used * to redirect drawing on the window using compositing. * * Currently this only works on X11 with XComposite and * XDamage extensions available. * * Deprecated: Compositing is an outdated technology that * only ever worked on X11. * * Returns: %TRUE if windows may be composited. * * Since: 2.12 */ public bool supportsComposite() { return gdk_display_supports_composite(gdkDisplay) != 0; } /** * Returns %TRUE if cursors can use an 8bit alpha channel * on @display. Otherwise, cursors are restricted to bilevel * alpha (i.e. a mask). * * Returns: whether cursors can have alpha channels. * * Since: 2.4 */ public bool supportsCursorAlpha() { return gdk_display_supports_cursor_alpha(gdkDisplay) != 0; } /** * Returns %TRUE if multicolored cursors are supported * on @display. Otherwise, cursors have only a forground * and a background color. * * Returns: whether cursors can have multiple colors. * * Since: 2.4 */ public bool supportsCursorColor() { return gdk_display_supports_cursor_color(gdkDisplay) != 0; } /** * Returns %TRUE if gdk_window_input_shape_combine_mask() can * be used to modify the input shape of windows on @display. * * Returns: %TRUE if windows with modified input shape are supported * * Since: 2.10 */ public bool supportsInputShapes() { return gdk_display_supports_input_shapes(gdkDisplay) != 0; } /** * Returns whether #GdkEventOwnerChange events will be * sent when the owner of a selection changes. * * Returns: whether #GdkEventOwnerChange events will * be sent. * * Since: 2.6 */ public bool supportsSelectionNotification() { return gdk_display_supports_selection_notification(gdkDisplay) != 0; } /** * Returns %TRUE if gdk_window_shape_combine_mask() can * be used to create shaped windows on @display. * * Returns: %TRUE if shaped windows are supported * * Since: 2.10 */ public bool supportsShapes() { return gdk_display_supports_shapes(gdkDisplay) != 0; } /** * Flushes any requests queued for the windowing system and waits until all * requests have been handled. This is often used for making sure that the * display is synchronized with the current state of the program. Calling * gdk_display_sync() before gdk_error_trap_pop() makes sure that any errors * generated from earlier requests are handled before the error trap is * removed. * * This is most useful for X11. On windowing systems where requests are * handled synchronously, this function will do nothing. * * Since: 2.2 */ public void sync() { gdk_display_sync(gdkDisplay); } /** * Warps the pointer of @display to the point @x,@y on * the screen @screen, unless the pointer is confined * to a window by a grab, in which case it will be moved * as far as allowed by the grab. Warping the pointer * creates events as if the user had moved the mouse * instantaneously to the destination. * * Note that the pointer should normally be under the * control of the user. This function was added to cover * some rare use cases like keyboard navigation support * for the color picker in the #GtkColorSelectionDialog. * * Deprecated: Use gdk_device_warp() instead. * * Params: * screen = the screen of @display to warp the pointer to * x = the x coordinate of the destination * y = the y coordinate of the destination * * Since: 2.8 */ public void warpPointer(Screen screen, int x, int y) { gdk_display_warp_pointer(gdkDisplay, (screen is null) ? null : screen.getScreenStruct(), x, y); } protected class OnClosedDelegateWrapper { void delegate(bool, Display) dlg; gulong handlerId; this(void delegate(bool, Display) dlg) { this.dlg = dlg; onClosedListeners ~= this; } void remove(OnClosedDelegateWrapper source) { foreach(index, wrapper; onClosedListeners) { if (wrapper.handlerId == source.handlerId) { onClosedListeners[index] = null; onClosedListeners = std.algorithm.remove(onClosedListeners, index); break; } } } } OnClosedDelegateWrapper[] onClosedListeners; /** * The ::closed signal is emitted when the connection to the windowing * system for @display is closed. * * Params: * isError = %TRUE if the display was closed due to an error * * Since: 2.2 */ gulong addOnClosed(void delegate(bool, Display) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnClosedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "closed", cast(GCallback)&callBackClosed, cast(void*)wrapper, cast(GClosureNotify)&callBackClosedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackClosed(GdkDisplay* displayStruct, bool isError, OnClosedDelegateWrapper wrapper) { wrapper.dlg(isError, wrapper.outer); } extern(C) static void callBackClosedDestroy(OnClosedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMonitorAddedDelegateWrapper { void delegate(MonitorG, Display) dlg; gulong handlerId; this(void delegate(MonitorG, Display) dlg) { this.dlg = dlg; onMonitorAddedListeners ~= this; } void remove(OnMonitorAddedDelegateWrapper source) { foreach(index, wrapper; onMonitorAddedListeners) { if (wrapper.handlerId == source.handlerId) { onMonitorAddedListeners[index] = null; onMonitorAddedListeners = std.algorithm.remove(onMonitorAddedListeners, index); break; } } } } OnMonitorAddedDelegateWrapper[] onMonitorAddedListeners; /** * The ::monitor-added signal is emitted whenever a monitor is * added. * * Params: * monitor = the monitor that was just added * * Since: 3.22 */ gulong addOnMonitorAdded(void delegate(MonitorG, Display) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMonitorAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "monitor-added", cast(GCallback)&callBackMonitorAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackMonitorAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMonitorAdded(GdkDisplay* displayStruct, GdkMonitor* monitor, OnMonitorAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(MonitorG)(monitor), wrapper.outer); } extern(C) static void callBackMonitorAddedDestroy(OnMonitorAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMonitorRemovedDelegateWrapper { void delegate(MonitorG, Display) dlg; gulong handlerId; this(void delegate(MonitorG, Display) dlg) { this.dlg = dlg; onMonitorRemovedListeners ~= this; } void remove(OnMonitorRemovedDelegateWrapper source) { foreach(index, wrapper; onMonitorRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onMonitorRemovedListeners[index] = null; onMonitorRemovedListeners = std.algorithm.remove(onMonitorRemovedListeners, index); break; } } } } OnMonitorRemovedDelegateWrapper[] onMonitorRemovedListeners; /** * The ::monitor-removed signal is emitted whenever a monitor is * removed. * * Params: * monitor = the monitor that was just removed * * Since: 3.22 */ gulong addOnMonitorRemoved(void delegate(MonitorG, Display) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMonitorRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "monitor-removed", cast(GCallback)&callBackMonitorRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackMonitorRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMonitorRemoved(GdkDisplay* displayStruct, GdkMonitor* monitor, OnMonitorRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(MonitorG)(monitor), wrapper.outer); } extern(C) static void callBackMonitorRemovedDestroy(OnMonitorRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnOpenedDelegateWrapper { void delegate(Display) dlg; gulong handlerId; this(void delegate(Display) dlg) { this.dlg = dlg; onOpenedListeners ~= this; } void remove(OnOpenedDelegateWrapper source) { foreach(index, wrapper; onOpenedListeners) { if (wrapper.handlerId == source.handlerId) { onOpenedListeners[index] = null; onOpenedListeners = std.algorithm.remove(onOpenedListeners, index); break; } } } } OnOpenedDelegateWrapper[] onOpenedListeners; /** * The ::opened signal is emitted when the connection to the windowing * system for @display is opened. */ gulong addOnOpened(void delegate(Display) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnOpenedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "opened", cast(GCallback)&callBackOpened, cast(void*)wrapper, cast(GClosureNotify)&callBackOpenedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackOpened(GdkDisplay* displayStruct, OnOpenedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackOpenedDestroy(OnOpenedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnSeatAddedDelegateWrapper { void delegate(Seat, Display) dlg; gulong handlerId; this(void delegate(Seat, Display) dlg) { this.dlg = dlg; onSeatAddedListeners ~= this; } void remove(OnSeatAddedDelegateWrapper source) { foreach(index, wrapper; onSeatAddedListeners) { if (wrapper.handlerId == source.handlerId) { onSeatAddedListeners[index] = null; onSeatAddedListeners = std.algorithm.remove(onSeatAddedListeners, index); break; } } } } OnSeatAddedDelegateWrapper[] onSeatAddedListeners; /** * The ::seat-added signal is emitted whenever a new seat is made * known to the windowing system. * * Params: * seat = the seat that was just added * * Since: 3.20 */ gulong addOnSeatAdded(void delegate(Seat, Display) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnSeatAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "seat-added", cast(GCallback)&callBackSeatAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackSeatAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackSeatAdded(GdkDisplay* displayStruct, GdkSeat* seat, OnSeatAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Seat)(seat), wrapper.outer); } extern(C) static void callBackSeatAddedDestroy(OnSeatAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnSeatRemovedDelegateWrapper { void delegate(Seat, Display) dlg; gulong handlerId; this(void delegate(Seat, Display) dlg) { this.dlg = dlg; onSeatRemovedListeners ~= this; } void remove(OnSeatRemovedDelegateWrapper source) { foreach(index, wrapper; onSeatRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onSeatRemovedListeners[index] = null; onSeatRemovedListeners = std.algorithm.remove(onSeatRemovedListeners, index); break; } } } } OnSeatRemovedDelegateWrapper[] onSeatRemovedListeners; /** * The ::seat-removed signal is emitted whenever a seat is removed * by the windowing system. * * Params: * seat = the seat that was just removed * * Since: 3.20 */ gulong addOnSeatRemoved(void delegate(Seat, Display) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnSeatRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "seat-removed", cast(GCallback)&callBackSeatRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackSeatRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackSeatRemoved(GdkDisplay* displayStruct, GdkSeat* seat, OnSeatRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Seat)(seat), wrapper.outer); } extern(C) static void callBackSeatRemovedDestroy(OnSeatRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gdk/DisplayManager.d000066400000000000000000000162541324604450400210720ustar00rootroot00000000000000/* * 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 gdk.DisplayManager; private import gdk.Display; private import gdk.c.functions; public import gdk.c.types; private import glib.ListSG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** * The purpose of the #GdkDisplayManager singleton object is to offer * notification when displays appear or disappear or the default display * changes. * * You can use gdk_display_manager_get() to obtain the #GdkDisplayManager * singleton, but that should be rarely necessary. Typically, initializing * GTK+ opens a display that you can work with without ever accessing the * #GdkDisplayManager. * * The GDK library can be built with support for multiple backends. * The #GdkDisplayManager object determines which backend is used * at runtime. * * When writing backend-specific code that is supposed to work with * multiple GDK backends, you have to consider both compile time and * runtime. At compile time, use the #GDK_WINDOWING_X11, #GDK_WINDOWING_WIN32 * macros, etc. to find out which backends are present in the GDK library * you are building your application against. At runtime, use type-check * macros like GDK_IS_X11_DISPLAY() to find out which backend is in use: * * ## Backend-specific code ## {#backend-specific} * * |[ * #ifdef GDK_WINDOWING_X11 * if (GDK_IS_X11_DISPLAY (display)) * { * // make X11-specific calls here * } * else * #endif * #ifdef GDK_WINDOWING_QUARTZ * if (GDK_IS_QUARTZ_DISPLAY (display)) * { * // make Quartz-specific calls here * } * else * #endif * g_error ("Unsupported GDK backend"); * ]| */ public class DisplayManager : ObjectG { /** the main Gtk struct */ protected GdkDisplayManager* gdkDisplayManager; /** Get the main Gtk struct */ public GdkDisplayManager* getDisplayManagerStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkDisplayManager; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkDisplayManager; } protected override void setStruct(GObject* obj) { gdkDisplayManager = cast(GdkDisplayManager*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkDisplayManager* gdkDisplayManager, bool ownedRef = false) { this.gdkDisplayManager = gdkDisplayManager; super(cast(GObject*)gdkDisplayManager, ownedRef); } /** */ public static GType getType() { return gdk_display_manager_get_type(); } /** * Gets the singleton #GdkDisplayManager object. * * When called for the first time, this function consults the * `GDK_BACKEND` environment variable to find out which * of the supported GDK backends to use (in case GDK has been compiled * with multiple backends). Applications can use gdk_set_allowed_backends() * to limit what backends can be used. * * Returns: The global #GdkDisplayManager singleton; * gdk_parse_args(), gdk_init(), or gdk_init_check() must have * been called first. * * Since: 2.2 */ public static DisplayManager get() { auto p = gdk_display_manager_get(); if(p is null) { return null; } return ObjectG.getDObject!(DisplayManager)(cast(GdkDisplayManager*) p); } /** * Gets the default #GdkDisplay. * * Returns: a #GdkDisplay, or %NULL if * there is no default display. * * Since: 2.2 */ public Display getDefaultDisplay() { auto p = gdk_display_manager_get_default_display(gdkDisplayManager); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * List all currently open displays. * * Returns: a newly * allocated #GSList of #GdkDisplay objects. Free with g_slist_free() * when you are done with it. * * Since: 2.2 */ public ListSG listDisplays() { auto p = gdk_display_manager_list_displays(gdkDisplayManager); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Opens a display. * * Params: * name = the name of the display to open * * Returns: a #GdkDisplay, or %NULL if the * display could not be opened * * Since: 3.0 */ public Display openDisplay(string name) { auto p = gdk_display_manager_open_display(gdkDisplayManager, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Sets @display as the default display. * * Params: * display = a #GdkDisplay * * Since: 2.2 */ public void setDefaultDisplay(Display display) { gdk_display_manager_set_default_display(gdkDisplayManager, (display is null) ? null : display.getDisplayStruct()); } protected class OnDisplayOpenedDelegateWrapper { void delegate(Display, DisplayManager) dlg; gulong handlerId; this(void delegate(Display, DisplayManager) dlg) { this.dlg = dlg; onDisplayOpenedListeners ~= this; } void remove(OnDisplayOpenedDelegateWrapper source) { foreach(index, wrapper; onDisplayOpenedListeners) { if (wrapper.handlerId == source.handlerId) { onDisplayOpenedListeners[index] = null; onDisplayOpenedListeners = std.algorithm.remove(onDisplayOpenedListeners, index); break; } } } } OnDisplayOpenedDelegateWrapper[] onDisplayOpenedListeners; /** * The ::display-opened signal is emitted when a display is opened. * * Params: * display = the opened display * * Since: 2.2 */ gulong addOnDisplayOpened(void delegate(Display, DisplayManager) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDisplayOpenedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "display-opened", cast(GCallback)&callBackDisplayOpened, cast(void*)wrapper, cast(GClosureNotify)&callBackDisplayOpenedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDisplayOpened(GdkDisplayManager* displaymanagerStruct, GdkDisplay* display, OnDisplayOpenedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Display)(display), wrapper.outer); } extern(C) static void callBackDisplayOpenedDestroy(OnDisplayOpenedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gdk/DragContext.d000066400000000000000000000546071324604450400204200ustar00rootroot00000000000000/* * 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 gdk.DragContext; private import gdk.Device; private import gdk.Screen; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** */ public class DragContext : ObjectG { /** the main Gtk struct */ protected GdkDragContext* gdkDragContext; /** Get the main Gtk struct */ public GdkDragContext* getDragContextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkDragContext; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkDragContext; } protected override void setStruct(GObject* obj) { gdkDragContext = cast(GdkDragContext*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkDragContext* gdkDragContext, bool ownedRef = false) { this.gdkDragContext = gdkDragContext; super(cast(GObject*)gdkDragContext, ownedRef); } /** */ public static GType getType() { return gdk_drag_context_get_type(); } /** * Determines the bitmask of actions proposed by the source if * gdk_drag_context_get_suggested_action() returns %GDK_ACTION_ASK. * * Returns: the #GdkDragAction flags * * Since: 2.22 */ public GdkDragAction getActions() { return gdk_drag_context_get_actions(gdkDragContext); } /** * Returns the destination windw for the DND operation. * * Returns: a #GdkWindow * * Since: 3.0 */ public Window getDestWindow() { auto p = gdk_drag_context_get_dest_window(gdkDragContext); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Returns the #GdkDevice associated to the drag context. * * Returns: The #GdkDevice associated to @context. */ public Device getDevice() { auto p = gdk_drag_context_get_device(gdkDragContext); if(p is null) { return null; } return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); } /** * Returns the window on which the drag icon should be rendered * during the drag operation. Note that the window may not be * available until the drag operation has begun. GDK will move * the window in accordance with the ongoing drag operation. * The window is owned by @context and will be destroyed when * the drag operation is over. * * Returns: the drag window, or %NULL * * Since: 3.20 */ public Window getDragWindow() { auto p = gdk_drag_context_get_drag_window(gdkDragContext); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Returns the drag protocol thats used by this context. * * Returns: the drag protocol * * Since: 3.0 */ public GdkDragProtocol getProtocol() { return gdk_drag_context_get_protocol(gdkDragContext); } /** * Determines the action chosen by the drag destination. * * Returns: a #GdkDragAction value * * Since: 2.22 */ public GdkDragAction getSelectedAction() { return gdk_drag_context_get_selected_action(gdkDragContext); } /** * Returns the #GdkWindow where the DND operation started. * * Returns: a #GdkWindow * * Since: 2.22 */ public Window getSourceWindow() { auto p = gdk_drag_context_get_source_window(gdkDragContext); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Determines the suggested drag action of the context. * * Returns: a #GdkDragAction value * * Since: 2.22 */ public GdkDragAction getSuggestedAction() { return gdk_drag_context_get_suggested_action(gdkDragContext); } /** * Retrieves the list of targets of the context. * * Returns: a #GList of targets * * Since: 2.22 */ public ListG listTargets() { auto p = gdk_drag_context_list_targets(gdkDragContext); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Requests the drag and drop operation to be managed by @context. * When a drag and drop operation becomes managed, the #GdkDragContext * will internally handle all input and source-side #GdkEventDND events * as required by the windowing system. * * Once the drag and drop operation is managed, the drag context will * emit the following signals: * - The #GdkDragContext::action-changed signal whenever the final action * to be performed by the drag and drop operation changes. * - The #GdkDragContext::drop-performed signal after the user performs * the drag and drop gesture (typically by releasing the mouse button). * - The #GdkDragContext::dnd-finished signal after the drag and drop * operation concludes (after all #GdkSelection transfers happen). * - The #GdkDragContext::cancel signal if the drag and drop operation is * finished but doesn't happen over an accepting destination, or is * cancelled through other means. * * Params: * ipcWindow = Window to use for IPC messaging/events * actions = the actions supported by the drag source * * Returns: #TRUE if the drag and drop operation is managed. * * Since: 3.20 */ public bool manageDnd(Window ipcWindow, GdkDragAction actions) { return gdk_drag_context_manage_dnd(gdkDragContext, (ipcWindow is null) ? null : ipcWindow.getWindowStruct(), actions) != 0; } /** * Associates a #GdkDevice to @context, so all Drag and Drop events * for @context are emitted as if they came from this device. * * Params: * device = a #GdkDevice */ public void setDevice(Device device) { gdk_drag_context_set_device(gdkDragContext, (device is null) ? null : device.getDeviceStruct()); } /** * Sets the position of the drag window that will be kept * under the cursor hotspot. Initially, the hotspot is at the * top left corner of the drag window. * * Params: * hotX = x coordinate of the drag window hotspot * hotY = y coordinate of the drag window hotspot * * Since: 3.20 */ public void setHotspot(int hotX, int hotY) { gdk_drag_context_set_hotspot(gdkDragContext, hotX, hotY); } protected class OnActionChangedDelegateWrapper { void delegate(GdkDragAction, DragContext) dlg; gulong handlerId; this(void delegate(GdkDragAction, DragContext) dlg) { this.dlg = dlg; onActionChangedListeners ~= this; } void remove(OnActionChangedDelegateWrapper source) { foreach(index, wrapper; onActionChangedListeners) { if (wrapper.handlerId == source.handlerId) { onActionChangedListeners[index] = null; onActionChangedListeners = std.algorithm.remove(onActionChangedListeners, index); break; } } } } OnActionChangedDelegateWrapper[] onActionChangedListeners; /** * A new action is being chosen for the drag and drop operation. * * This signal will only be emitted if the #GdkDragContext manages * the drag and drop operation. See gdk_drag_context_manage_dnd() * for more information. * * Params: * action = The action currently chosen * * Since: 3.20 */ gulong addOnActionChanged(void delegate(GdkDragAction, DragContext) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActionChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "action-changed", cast(GCallback)&callBackActionChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackActionChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActionChanged(GdkDragContext* dragcontextStruct, GdkDragAction action, OnActionChangedDelegateWrapper wrapper) { wrapper.dlg(action, wrapper.outer); } extern(C) static void callBackActionChangedDestroy(OnActionChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnCancelDelegateWrapper { void delegate(GdkDragCancelReason, DragContext) dlg; gulong handlerId; this(void delegate(GdkDragCancelReason, DragContext) dlg) { this.dlg = dlg; onCancelListeners ~= this; } void remove(OnCancelDelegateWrapper source) { foreach(index, wrapper; onCancelListeners) { if (wrapper.handlerId == source.handlerId) { onCancelListeners[index] = null; onCancelListeners = std.algorithm.remove(onCancelListeners, index); break; } } } } OnCancelDelegateWrapper[] onCancelListeners; /** * The drag and drop operation was cancelled. * * This signal will only be emitted if the #GdkDragContext manages * the drag and drop operation. See gdk_drag_context_manage_dnd() * for more information. * * Params: * reason = The reason the context was cancelled * * Since: 3.20 */ gulong addOnCancel(void delegate(GdkDragCancelReason, DragContext) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnCancelDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "cancel", cast(GCallback)&callBackCancel, cast(void*)wrapper, cast(GClosureNotify)&callBackCancelDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackCancel(GdkDragContext* dragcontextStruct, GdkDragCancelReason reason, OnCancelDelegateWrapper wrapper) { wrapper.dlg(reason, wrapper.outer); } extern(C) static void callBackCancelDestroy(OnCancelDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDndFinishedDelegateWrapper { void delegate(DragContext) dlg; gulong handlerId; this(void delegate(DragContext) dlg) { this.dlg = dlg; onDndFinishedListeners ~= this; } void remove(OnDndFinishedDelegateWrapper source) { foreach(index, wrapper; onDndFinishedListeners) { if (wrapper.handlerId == source.handlerId) { onDndFinishedListeners[index] = null; onDndFinishedListeners = std.algorithm.remove(onDndFinishedListeners, index); break; } } } } OnDndFinishedDelegateWrapper[] onDndFinishedListeners; /** * The drag and drop operation was finished, the drag destination * finished reading all data. The drag source can now free all * miscellaneous data. * * This signal will only be emitted if the #GdkDragContext manages * the drag and drop operation. See gdk_drag_context_manage_dnd() * for more information. * * Since: 3.20 */ gulong addOnDndFinished(void delegate(DragContext) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDndFinishedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "dnd-finished", cast(GCallback)&callBackDndFinished, cast(void*)wrapper, cast(GClosureNotify)&callBackDndFinishedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDndFinished(GdkDragContext* dragcontextStruct, OnDndFinishedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackDndFinishedDestroy(OnDndFinishedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDropPerformedDelegateWrapper { void delegate(int, DragContext) dlg; gulong handlerId; this(void delegate(int, DragContext) dlg) { this.dlg = dlg; onDropPerformedListeners ~= this; } void remove(OnDropPerformedDelegateWrapper source) { foreach(index, wrapper; onDropPerformedListeners) { if (wrapper.handlerId == source.handlerId) { onDropPerformedListeners[index] = null; onDropPerformedListeners = std.algorithm.remove(onDropPerformedListeners, index); break; } } } } OnDropPerformedDelegateWrapper[] onDropPerformedListeners; /** * The drag and drop operation was performed on an accepting client. * * This signal will only be emitted if the #GdkDragContext manages * the drag and drop operation. See gdk_drag_context_manage_dnd() * for more information. * * Params: * time = the time at which the drop happened. * * Since: 3.20 */ gulong addOnDropPerformed(void delegate(int, DragContext) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDropPerformedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "drop-performed", cast(GCallback)&callBackDropPerformed, cast(void*)wrapper, cast(GClosureNotify)&callBackDropPerformedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDropPerformed(GdkDragContext* dragcontextStruct, int time, OnDropPerformedDelegateWrapper wrapper) { wrapper.dlg(time, wrapper.outer); } extern(C) static void callBackDropPerformedDestroy(OnDropPerformedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** * Aborts a drag without dropping. * * This function is called by the drag source. * * This function does not need to be called in managed drag and drop * operations. See gdk_drag_context_manage_dnd() for more information. * * Params: * context = a #GdkDragContext * time = the timestamp for this operation */ public static void dragAbort(DragContext context, uint time) { gdk_drag_abort((context is null) ? null : context.getDragContextStruct(), time); } /** * Starts a drag and creates a new drag context for it. * This function assumes that the drag is controlled by the * client pointer device, use gdk_drag_begin_for_device() to * begin a drag with a different device. * * This function is called by the drag source. * * Params: * window = the source window for this drag. * targets = the offered targets, * as list of #GdkAtoms * * Returns: a newly created #GdkDragContext */ public static DragContext dragBegin(Window window, ListG targets) { auto p = gdk_drag_begin((window is null) ? null : window.getWindowStruct(), (targets is null) ? null : targets.getListGStruct()); if(p is null) { return null; } return ObjectG.getDObject!(DragContext)(cast(GdkDragContext*) p, true); } /** * Starts a drag and creates a new drag context for it. * * This function is called by the drag source. * * Params: * window = the source window for this drag * device = the device that controls this drag * targets = the offered targets, * as list of #GdkAtoms * * Returns: a newly created #GdkDragContext */ public static DragContext dragBeginForDevice(Window window, Device device, ListG targets) { auto p = gdk_drag_begin_for_device((window is null) ? null : window.getWindowStruct(), (device is null) ? null : device.getDeviceStruct(), (targets is null) ? null : targets.getListGStruct()); if(p is null) { return null; } return ObjectG.getDObject!(DragContext)(cast(GdkDragContext*) p, true); } /** * Starts a drag and creates a new drag context for it. * * This function is called by the drag source. * * Params: * window = the source window for this drag * device = the device that controls this drag * targets = the offered targets, * as list of #GdkAtoms * xRoot = the x coordinate where the drag nominally started * yRoot = the y coordinate where the drag nominally started * * Returns: a newly created #GdkDragContext * * Since: 3.20 */ public static DragContext dragBeginFromPoint(Window window, Device device, ListG targets, int xRoot, int yRoot) { auto p = gdk_drag_begin_from_point((window is null) ? null : window.getWindowStruct(), (device is null) ? null : device.getDeviceStruct(), (targets is null) ? null : targets.getListGStruct(), xRoot, yRoot); if(p is null) { return null; } return ObjectG.getDObject!(DragContext)(cast(GdkDragContext*) p, true); } /** * Drops on the current destination. * * This function is called by the drag source. * * This function does not need to be called in managed drag and drop * operations. See gdk_drag_context_manage_dnd() for more information. * * Params: * context = a #GdkDragContext * time = the timestamp for this operation */ public static void dragDrop(DragContext context, uint time) { gdk_drag_drop((context is null) ? null : context.getDragContextStruct(), time); } /** * Inform GDK if the drop ended successfully. Passing %FALSE * for @success may trigger a drag cancellation animation. * * This function is called by the drag source, and should * be the last call before dropping the reference to the * @context. * * The #GdkDragContext will only take the first gdk_drag_drop_done() * call as effective, if this function is called multiple times, * all subsequent calls will be ignored. * * Params: * context = a #GdkDragContext * success = whether the drag was ultimatively successful * * Since: 3.20 */ public static void dragDropDone(DragContext context, bool success) { gdk_drag_drop_done((context is null) ? null : context.getDragContextStruct(), success); } /** * Returns whether the dropped data has been successfully * transferred. This function is intended to be used while * handling a %GDK_DROP_FINISHED event, its return value is * meaningless at other times. * * Params: * context = a #GdkDragContext * * Returns: %TRUE if the drop was successful. * * Since: 2.6 */ public static bool dragDropSucceeded(DragContext context) { return gdk_drag_drop_succeeded((context is null) ? null : context.getDragContextStruct()) != 0; } /** * Finds the destination window and DND protocol to use at the * given pointer position. * * This function is called by the drag source to obtain the * @dest_window and @protocol parameters for gdk_drag_motion(). * * Params: * context = a #GdkDragContext * dragWindow = a window which may be at the pointer position, but * should be ignored, since it is put up by the drag source as an icon * screen = the screen where the destination window is sought * xRoot = the x position of the pointer in root coordinates * yRoot = the y position of the pointer in root coordinates * destWindow = location to store the destination window in * protocol = location to store the DND protocol in * * Since: 2.2 */ public static void dragFindWindowForScreen(DragContext context, Window dragWindow, Screen screen, int xRoot, int yRoot, out Window destWindow, out GdkDragProtocol protocol) { GdkWindow* outdestWindow = null; gdk_drag_find_window_for_screen((context is null) ? null : context.getDragContextStruct(), (dragWindow is null) ? null : dragWindow.getWindowStruct(), (screen is null) ? null : screen.getScreenStruct(), xRoot, yRoot, &outdestWindow, &protocol); destWindow = ObjectG.getDObject!(Window)(outdestWindow); } /** * Returns the selection atom for the current source window. * * Params: * context = a #GdkDragContext. * * Returns: the selection atom, or %GDK_NONE */ public static GdkAtom dragGetSelection(DragContext context) { return gdk_drag_get_selection((context is null) ? null : context.getDragContextStruct()); } /** * Updates the drag context when the pointer moves or the * set of actions changes. * * This function is called by the drag source. * * This function does not need to be called in managed drag and drop * operations. See gdk_drag_context_manage_dnd() for more information. * * Params: * context = a #GdkDragContext * destWindow = the new destination window, obtained by * gdk_drag_find_window() * protocol = the DND protocol in use, obtained by gdk_drag_find_window() * xRoot = the x position of the pointer in root coordinates * yRoot = the y position of the pointer in root coordinates * suggestedAction = the suggested action * possibleActions = the possible actions * time = the timestamp for this operation */ public static bool dragMotion(DragContext context, Window destWindow, GdkDragProtocol protocol, int xRoot, int yRoot, GdkDragAction suggestedAction, GdkDragAction possibleActions, uint time) { return gdk_drag_motion((context is null) ? null : context.getDragContextStruct(), (destWindow is null) ? null : destWindow.getWindowStruct(), protocol, xRoot, yRoot, suggestedAction, possibleActions, time) != 0; } /** * Selects one of the actions offered by the drag source. * * This function is called by the drag destination in response to * gdk_drag_motion() called by the drag source. * * Params: * context = a #GdkDragContext * action = the selected action which will be taken when a drop happens, * or 0 to indicate that a drop will not be accepted * time = the timestamp for this operation */ public static void dragStatus(DragContext context, GdkDragAction action, uint time) { gdk_drag_status((context is null) ? null : context.getDragContextStruct(), action, time); } /** * Ends the drag operation after a drop. * * This function is called by the drag destination. * * Params: * context = a #GdkDragContext * success = %TRUE if the data was successfully received * time = the timestamp for this operation */ public static void dropFinish(DragContext context, bool success, uint time) { gdk_drop_finish((context is null) ? null : context.getDragContextStruct(), success, time); } /** * Accepts or rejects a drop. * * This function is called by the drag destination in response * to a drop initiated by the drag source. * * Params: * context = a #GdkDragContext * accepted = %TRUE if the drop is accepted * time = the timestamp for this operation */ public static void dropReply(DragContext context, bool accepted, uint time) { gdk_drop_reply((context is null) ? null : context.getDragContextStruct(), accepted, time); } } GtkD-3.7.5/generated/gtkd/gdk/DrawingContext.d000066400000000000000000000100011324604450400211120ustar00rootroot00000000000000/* * 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 gdk.DrawingContext; private import cairo.Context; private import cairo.Region; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import gobject.ObjectG; public import gtkc.gdktypes; /** * #GdkDrawingContext is an object that represents the current drawing * state of a #GdkWindow. * * It's possible to use a #GdkDrawingContext to draw on a #GdkWindow * via rendering API like Cairo or OpenGL. * * A #GdkDrawingContext can only be created by calling gdk_window_begin_draw_frame() * and will be valid until a call to gdk_window_end_draw_frame(). * * #GdkDrawingContext is available since GDK 3.22 */ public class DrawingContext : ObjectG { /** the main Gtk struct */ protected GdkDrawingContext* gdkDrawingContext; /** Get the main Gtk struct */ public GdkDrawingContext* getDrawingContextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkDrawingContext; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkDrawingContext; } protected override void setStruct(GObject* obj) { gdkDrawingContext = cast(GdkDrawingContext*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkDrawingContext* gdkDrawingContext, bool ownedRef = false) { this.gdkDrawingContext = gdkDrawingContext; super(cast(GObject*)gdkDrawingContext, ownedRef); } /** */ public static GType getType() { return gdk_drawing_context_get_type(); } /** * Retrieves a Cairo context to be used to draw on the #GdkWindow * that created the #GdkDrawingContext. * * The returned context is guaranteed to be valid as long as the * #GdkDrawingContext is valid, that is between a call to * gdk_window_begin_draw_frame() and gdk_window_end_draw_frame(). * * Returns: a Cairo context to be used to draw * the contents of the #GdkWindow. The context is owned by the * #GdkDrawingContext and should not be destroyed * * Since: 3.22 */ public Context getCairoContext() { auto p = gdk_drawing_context_get_cairo_context(gdkDrawingContext); if(p is null) { return null; } return new Context(cast(cairo_t*) p); } /** * Retrieves a copy of the clip region used when creating the @context. * * Returns: a Cairo region * * Since: 3.22 */ public Region getClip() { auto p = gdk_drawing_context_get_clip(gdkDrawingContext); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Retrieves the window that created the drawing @context. * * Returns: a #GdkWindow * * Since: 3.22 */ public Window getWindow() { auto p = gdk_drawing_context_get_window(gdkDrawingContext); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Checks whether the given #GdkDrawingContext is valid. * * Returns: %TRUE if the context is valid * * Since: 3.22 */ public bool isValid() { return gdk_drawing_context_is_valid(gdkDrawingContext) != 0; } } GtkD-3.7.5/generated/gtkd/gdk/Event.d000066400000000000000000000560651324604450400172570ustar00rootroot00000000000000/* * 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 gdk.Event; private import gdk.Device; private import gdk.DeviceTool; private import gdk.Screen; private import gdk.Seat; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; public import gtkc.gdktypes; private import gtkd.Loader; /** * A #GdkEvent contains a union of all of the event types, * and allows access to the data fields in a number of ways. * * The event type is always the first field in all of the event types, and * can always be accessed with the following code, no matter what type of * event it is: * |[ * GdkEvent *event; * GdkEventType type; * * type = event->type; * ]| * * To access other fields of the event, the pointer to the event * can be cast to the appropriate event type, or the union member * name can be used. For example if the event type is %GDK_BUTTON_PRESS * then the x coordinate of the button press can be accessed with: * |[ * GdkEvent *event; * gdouble x; * * x = ((GdkEventButton*)event)->x; * ]| * or: * |[ * GdkEvent *event; * gdouble x; * * x = event->button.x; * ]| */ public class Event { /** the main Gtk struct */ protected GdkEvent* gdkEvent; protected bool ownedRef; /** Get the main Gtk struct */ public GdkEvent* getEventStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkEvent; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gdkEvent; } /** * Sets our main struct and passes it to the parent class. */ public this (GdkEvent* gdkEvent, bool ownedRef = false) { this.gdkEvent = gdkEvent; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GDK) && ownedRef ) gdk_event_free(gdkEvent); } /** * Specifies the type of the event. */ public EventType type() { return gdkEvent.type; } /** Get a specific event. */ public GdkEventAny* any() { return cast(GdkEventAny*)gdkEvent; } /** ditto */ public GdkEventExpose* expose() { return cast(GdkEventExpose*)gdkEvent; } /** ditto */ public GdkEventVisibility* visibility() { return cast(GdkEventVisibility*)gdkEvent; } /** ditto */ public GdkEventMotion* motion() { return cast(GdkEventMotion*)gdkEvent; } /** ditto */ public GdkEventButton* button() { return cast(GdkEventButton*)gdkEvent; } /** ditto */ public GdkEventScroll* scroll() { return cast(GdkEventScroll*)gdkEvent; } /** ditto */ public GdkEventKey* key() { return cast(GdkEventKey*)gdkEvent; } /** ditto */ public GdkEventCrossing* crossing() { return cast(GdkEventCrossing*)gdkEvent; } /** ditto */ public GdkEventFocus* focus() { return cast(GdkEventFocus*)gdkEvent; } /** ditto */ public GdkEventConfigure* configure() { return cast(GdkEventConfigure*)gdkEvent; } /** ditto */ public GdkEventProperty* property() { return cast(GdkEventProperty*)gdkEvent; } /** ditto */ public GdkEventSelection* selection() { return cast(GdkEventSelection*)gdkEvent; } /** ditto */ public GdkEventOwnerChange* ownerChange() { return cast(GdkEventOwnerChange*)gdkEvent; } /** ditto */ public GdkEventProximity* proximity() { return cast(GdkEventProximity*)gdkEvent; } /** ditto */ public GdkEventDND* dnd() { return cast(GdkEventDND*)gdkEvent; } /** ditto */ public GdkEventWindowState* windowState() { return cast(GdkEventWindowState*)gdkEvent; } /** ditto */ public GdkEventSetting* setting() { return cast(GdkEventSetting*)gdkEvent; } /** ditto */ public GdkEventGrabBroken* grabBroken() { return cast(GdkEventGrabBroken*)gdkEvent; } /** */ public static bool isDoubleClick(GdkEventButton* eventButton, int buttonNumber=1) { return eventButton.button==buttonNumber && eventButton.type == EventType.DOUBLE_BUTTON_PRESS; } /** */ public static bool isTripleClick(GdkEventButton* eventButton, int buttonNumber=1) { return eventButton.button==buttonNumber && eventButton.type == EventType.TRIPLE_BUTTON_PRESS; } /** */ /** */ public static GType getType() { return gdk_event_get_type(); } /** * Creates a new event of the given type. All fields are set to 0. * * Params: * type = a #GdkEventType * * Returns: a newly-allocated #GdkEvent. The returned #GdkEvent * should be freed with gdk_event_free(). * * Since: 2.2 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GdkEventType type) { auto p = gdk_event_new(type); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GdkEvent*) p); } /** * If both events contain X/Y information, this function will return %TRUE * and return in @angle the relative angle from @event1 to @event2. The rotation * direction for positive angles is from the positive X axis towards the positive * Y axis. * * Params: * event1 = first #GdkEvent * event2 = second #GdkEvent * angle = return location for the relative angle between both events * * Returns: %TRUE if the angle could be calculated. * * Since: 3.0 */ public static bool getAngle(Event event1, Event event2, out double angle) { return gdk_events_get_angle((event1 is null) ? null : event1.getEventStruct(), (event2 is null) ? null : event2.getEventStruct(), &angle) != 0; } /** * If both events contain X/Y information, the center of both coordinates * will be returned in @x and @y. * * Params: * event1 = first #GdkEvent * event2 = second #GdkEvent * x = return location for the X coordinate of the center * y = return location for the Y coordinate of the center * * Returns: %TRUE if the center could be calculated. * * Since: 3.0 */ public static bool getCenter(Event event1, Event event2, out double x, out double y) { return gdk_events_get_center((event1 is null) ? null : event1.getEventStruct(), (event2 is null) ? null : event2.getEventStruct(), &x, &y) != 0; } /** * If both events have X/Y information, the distance between both coordinates * (as in a straight line going from @event1 to @event2) will be returned. * * Params: * event1 = first #GdkEvent * event2 = second #GdkEvent * distance = return location for the distance * * Returns: %TRUE if the distance could be calculated. * * Since: 3.0 */ public static bool getDistance(Event event1, Event event2, out double distance) { return gdk_events_get_distance((event1 is null) ? null : event1.getEventStruct(), (event2 is null) ? null : event2.getEventStruct(), &distance) != 0; } /** * Copies a #GdkEvent, copying or incrementing the reference count of the * resources associated with it (e.g. #GdkWindow’s and strings). * * Returns: a copy of @event. The returned #GdkEvent should be freed with * gdk_event_free(). */ public Event copy() { auto p = gdk_event_copy(gdkEvent); if(p is null) { return null; } return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); } /** * Frees a #GdkEvent, freeing or decrementing any resources associated with it. * Note that this function should only be called with events returned from * functions such as gdk_event_peek(), gdk_event_get(), gdk_event_copy() * and gdk_event_new(). */ public void free() { gdk_event_free(gdkEvent); ownedRef = false; } /** * Extract the axis value for a particular axis use from * an event structure. * * Params: * axisUse = the axis use to look for * value = location to store the value found * * Returns: %TRUE if the specified axis was found, otherwise %FALSE */ public bool getAxis(GdkAxisUse axisUse, out double value) { return gdk_event_get_axis(gdkEvent, axisUse, &value) != 0; } /** * Extract the button number from an event. * * Params: * button = location to store mouse button number * * Returns: %TRUE if the event delivered a button number * * Since: 3.2 */ public bool getButton(out uint button) { return gdk_event_get_button(gdkEvent, &button) != 0; } /** * Extracts the click count from an event. * * Params: * clickCount = location to store click count * * Returns: %TRUE if the event delivered a click count * * Since: 3.2 */ public bool getClickCount(out uint clickCount) { return gdk_event_get_click_count(gdkEvent, &clickCount) != 0; } /** * Extract the event window relative x/y coordinates from an event. * * Params: * xWin = location to put event window x coordinate * yWin = location to put event window y coordinate * * Returns: %TRUE if the event delivered event window coordinates */ public bool getCoords(out double xWin, out double yWin) { return gdk_event_get_coords(gdkEvent, &xWin, &yWin) != 0; } /** * If the event contains a “device” field, this function will return * it, else it will return %NULL. * * Returns: a #GdkDevice, or %NULL. * * Since: 3.0 */ public Device getDevice() { auto p = gdk_event_get_device(gdkEvent); if(p is null) { return null; } return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); } /** * If the event was generated by a device that supports * different tools (eg. a tablet), this function will * return a #GdkDeviceTool representing the tool that * caused the event. Otherwise, %NULL will be returned. * * Note: the #GdkDeviceTools will be constant during * the application lifetime, if settings must be stored * persistently across runs, see gdk_device_tool_get_serial() * * Returns: The current device tool, or %NULL * * Since: 3.22 */ public DeviceTool getDeviceTool() { auto p = gdk_event_get_device_tool(gdkEvent); if(p is null) { return null; } return ObjectG.getDObject!(DeviceTool)(cast(GdkDeviceTool*) p); } /** * If @event if of type %GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE, * %GDK_TOUCH_END or %GDK_TOUCH_CANCEL, returns the #GdkEventSequence * to which the event belongs. Otherwise, return %NULL. * * Returns: the event sequence that the event belongs to * * Since: 3.4 */ public GdkEventSequence* getEventSequence() { return gdk_event_get_event_sequence(gdkEvent); } /** * Retrieves the type of the event. * * Returns: a #GdkEventType * * Since: 3.10 */ public GdkEventType getEventType() { return gdk_event_get_event_type(gdkEvent); } /** * Extracts the hardware keycode from an event. * * Also see gdk_event_get_scancode(). * * Params: * keycode = location to store the keycode * * Returns: %TRUE if the event delivered a hardware keycode * * Since: 3.2 */ public bool getKeycode(out ushort keycode) { return gdk_event_get_keycode(gdkEvent, &keycode) != 0; } /** * Extracts the keyval from an event. * * Params: * keyval = location to store the keyval * * Returns: %TRUE if the event delivered a key symbol * * Since: 3.2 */ public bool getKeyval(out uint keyval) { return gdk_event_get_keyval(gdkEvent, &keyval) != 0; } /** * #event: a #GdkEvent * Returns whether this event is an 'emulated' pointer event (typically * from a touch event), as opposed to a real one. * * Returns: %TRUE if this event is emulated * * Since: 3.22 */ public bool getPointerEmulated() { return gdk_event_get_pointer_emulated(gdkEvent) != 0; } /** * Extract the root window relative x/y coordinates from an event. * * Params: * xRoot = location to put root window x coordinate * yRoot = location to put root window y coordinate * * Returns: %TRUE if the event delivered root window coordinates */ public bool getRootCoords(out double xRoot, out double yRoot) { return gdk_event_get_root_coords(gdkEvent, &xRoot, &yRoot) != 0; } /** * Gets the keyboard low-level scancode of a key event. * * This is usually hardware_keycode. On Windows this is the high * word of WM_KEY{DOWN,UP} lParam which contains the scancode and * some extended flags. * * Returns: The associated keyboard scancode or 0 * * Since: 3.22 */ public int getScancode() { return gdk_event_get_scancode(gdkEvent); } /** * Returns the screen for the event. The screen is * typically the screen for `event->any.window`, but * for events such as mouse events, it is the screen * where the pointer was when the event occurs - * that is, the screen which has the root window * to which `event->motion.x_root` and * `event->motion.y_root` are relative. * * Returns: the screen for the event * * Since: 2.2 */ public Screen getScreen() { auto p = gdk_event_get_screen(gdkEvent); if(p is null) { return null; } return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); } /** * Retrieves the scroll deltas from a #GdkEvent * * Params: * deltaX = return location for X delta * deltaY = return location for Y delta * * Returns: %TRUE if the event contains smooth scroll information * * Since: 3.4 */ public bool getScrollDeltas(out double deltaX, out double deltaY) { return gdk_event_get_scroll_deltas(gdkEvent, &deltaX, &deltaY) != 0; } /** * Extracts the scroll direction from an event. * * Params: * direction = location to store the scroll direction * * Returns: %TRUE if the event delivered a scroll direction * * Since: 3.2 */ public bool getScrollDirection(out GdkScrollDirection direction) { return gdk_event_get_scroll_direction(gdkEvent, &direction) != 0; } /** * Returns the #GdkSeat this event was generated for. * * Returns: The #GdkSeat of this event * * Since: 3.20 */ public Seat getSeat() { auto p = gdk_event_get_seat(gdkEvent); if(p is null) { return null; } return ObjectG.getDObject!(Seat)(cast(GdkSeat*) p); } /** * This function returns the hardware (slave) #GdkDevice that has * triggered the event, falling back to the virtual (master) device * (as in gdk_event_get_device()) if the event wasn’t caused by * interaction with a hardware device. This may happen for example * in synthesized crossing events after a #GdkWindow updates its * geometry or a grab is acquired/released. * * If the event does not contain a device field, this function will * return %NULL. * * Returns: a #GdkDevice, or %NULL. * * Since: 3.0 */ public Device getSourceDevice() { auto p = gdk_event_get_source_device(gdkEvent); if(p is null) { return null; } return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); } /** * If the event contains a “state” field, puts that field in @state. Otherwise * stores an empty state (0). Returns %TRUE if there was a state field * in the event. @event may be %NULL, in which case it’s treated * as if the event had no state field. * * Params: * state = return location for state * * Returns: %TRUE if there was a state field in the event */ public bool getState(out GdkModifierType state) { return gdk_event_get_state(gdkEvent, &state) != 0; } /** * Returns the time stamp from @event, if there is one; otherwise * returns #GDK_CURRENT_TIME. If @event is %NULL, returns #GDK_CURRENT_TIME. * * Returns: time stamp field from @event */ public uint getTime() { return gdk_event_get_time(gdkEvent); } /** * Extracts the #GdkWindow associated with an event. * * Returns: The #GdkWindow associated with the event * * Since: 3.10 */ public Window getWindow() { auto p = gdk_event_get_window(gdkEvent); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Check whether a scroll event is a stop scroll event. Scroll sequences * with smooth scroll information may provide a stop scroll event once the * interaction with the device finishes, e.g. by lifting a finger. This * stop scroll event is the signal that a widget may trigger kinetic * scrolling based on the current velocity. * * Stop scroll events always have a a delta of 0/0. * * Returns: %TRUE if the event is a scroll stop event * * Since: 3.20 */ public bool isScrollStopEvent() { return gdk_event_is_scroll_stop_event(gdkEvent) != 0; } /** * Appends a copy of the given event onto the front of the event * queue for event->any.window’s display, or the default event * queue if event->any.window is %NULL. See gdk_display_put_event(). */ public void put() { gdk_event_put(gdkEvent); } /** * Sets the device for @event to @device. The event must * have been allocated by GTK+, for instance, by * gdk_event_copy(). * * Params: * device = a #GdkDevice * * Since: 3.0 */ public void setDevice(Device device) { gdk_event_set_device(gdkEvent, (device is null) ? null : device.getDeviceStruct()); } /** * Sets the device tool for this event, should be rarely used. * * Params: * tool = tool to set on the event, or %NULL * * Since: 3.22 */ public void setDeviceTool(DeviceTool tool) { gdk_event_set_device_tool(gdkEvent, (tool is null) ? null : tool.getDeviceToolStruct()); } /** * Sets the screen for @event to @screen. The event must * have been allocated by GTK+, for instance, by * gdk_event_copy(). * * Params: * screen = a #GdkScreen * * Since: 2.2 */ public void setScreen(Screen screen) { gdk_event_set_screen(gdkEvent, (screen is null) ? null : screen.getScreenStruct()); } /** * Sets the slave device for @event to @device. * * The event must have been allocated by GTK+, * for instance by gdk_event_copy(). * * Params: * device = a #GdkDevice * * Since: 3.0 */ public void setSourceDevice(Device device) { gdk_event_set_source_device(gdkEvent, (device is null) ? null : device.getDeviceStruct()); } /** * This function returns whether a #GdkEventButton should trigger a * context menu, according to platform conventions. The right mouse * button always triggers context menus. Additionally, if * gdk_keymap_get_modifier_mask() returns a non-0 mask for * %GDK_MODIFIER_INTENT_CONTEXT_MENU, then the left mouse button will * also trigger a context menu if this modifier is pressed. * * This function should always be used instead of simply checking for * event->button == %GDK_BUTTON_SECONDARY. * * Returns: %TRUE if the event should trigger a context menu. * * Since: 3.4 */ public bool triggersContextMenu() { return gdk_event_triggers_context_menu(gdkEvent) != 0; } /** * Checks all open displays for a #GdkEvent to process,to be processed * on, fetching events from the windowing system if necessary. * See gdk_display_get_event(). * * Returns: the next #GdkEvent to be processed, or %NULL * if no events are pending. The returned #GdkEvent should be freed * with gdk_event_free(). */ public static Event get() { auto p = gdk_event_get(); if(p is null) { return null; } return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); } /** * Sets the function to call to handle all events from GDK. * * Note that GTK+ uses this to install its own event handler, so it is * usually not useful for GTK+ applications. (Although an application * can call this function then call gtk_main_do_event() to pass * events to GTK+.) * * Params: * func = the function to call to handle events from GDK. * data = user data to pass to the function. * notify = the function to call when the handler function is removed, i.e. when * gdk_event_handler_set() is called with another event handler. */ public static void handlerSet(GdkEventFunc func, void* data, GDestroyNotify notify) { gdk_event_handler_set(func, data, notify); } /** * If there is an event waiting in the event queue of some open * display, returns a copy of it. See gdk_display_peek_event(). * * Returns: a copy of the first #GdkEvent on some event * queue, or %NULL if no events are in any queues. The returned * #GdkEvent should be freed with gdk_event_free(). */ public static Event peek() { auto p = gdk_event_peek(); if(p is null) { return null; } return ObjectG.getDObject!(Event)(cast(GdkEvent*) p, true); } /** * Request more motion notifies if @event is a motion notify hint event. * * This function should be used instead of gdk_window_get_pointer() to * request further motion notifies, because it also works for extension * events where motion notifies are provided for devices other than the * core pointer. Coordinate extraction, processing and requesting more * motion events from a %GDK_MOTION_NOTIFY event usually works like this: * * |[ * { * // motion_event handler * x = motion_event->x; * y = motion_event->y; * // handle (x,y) motion * gdk_event_request_motions (motion_event); // handles is_hint events * } * ]| * * Params: * event = a valid #GdkEvent * * Since: 2.12 */ public static void requestMotions(GdkEventMotion* event) { gdk_event_request_motions(event); } /** * Checks if any events are ready to be processed for any display. * * Returns: %TRUE if any events are pending. */ public static bool pending() { return gdk_events_pending() != 0; } /** * Gets whether event debugging output is enabled. * * Returns: %TRUE if event debugging output is enabled. */ public static bool getShowEvents() { return gdk_get_show_events() != 0; } /** * Sets whether a trace of received events is output. * Note that GTK+ must be compiled with debugging (that is, * configured using the `--enable-debug` option) * to use this option. * * Params: * showEvents = %TRUE to output event debugging information. */ public static void setShowEvents(bool showEvents) { gdk_set_show_events(showEvents); } /** * Obtains a desktop-wide setting, such as the double-click time, * for the default screen. See gdk_screen_get_setting(). * * Params: * name = the name of the setting. * value = location to store the value of the setting. * * Returns: %TRUE if the setting existed and a value was stored * in @value, %FALSE otherwise. */ public static bool settingGet(string name, Value value) { return gdk_setting_get(Str.toStringz(name), (value is null) ? null : value.getValueStruct()) != 0; } } GtkD-3.7.5/generated/gtkd/gdk/EventSequence.d000066400000000000000000000022661324604450400207420ustar00rootroot00000000000000/* * 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 gdk.EventSequence; private import gdk.c.functions; public import gdk.c.types; public import gtkc.gdktypes; /** */ public struct EventSequence { /** */ public static GType getType() { return gdk_event_sequence_get_type(); } } GtkD-3.7.5/generated/gtkd/gdk/FrameClock.d000066400000000000000000000457361324604450400202070ustar00rootroot00000000000000/* * 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 gdk.FrameClock; private import gdk.FrameTimings; private import gdk.c.functions; public import gdk.c.types; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** * A #GdkFrameClock tells the application when to update and repaint a * window. This may be synced to the vertical refresh rate of the * monitor, for example. Even when the frame clock uses a simple timer * rather than a hardware-based vertical sync, the frame clock helps * because it ensures everything paints at the same time (reducing the * total number of frames). The frame clock can also automatically * stop painting when it knows the frames will not be visible, or * scale back animation framerates. * * #GdkFrameClock is designed to be compatible with an OpenGL-based * implementation or with mozRequestAnimationFrame in Firefox, * for example. * * A frame clock is idle until someone requests a frame with * gdk_frame_clock_request_phase(). At some later point that makes * sense for the synchronization being implemented, the clock will * process a frame and emit signals for each phase that has been * requested. (See the signals of the #GdkFrameClock class for * documentation of the phases. %GDK_FRAME_CLOCK_PHASE_UPDATE and the * #GdkFrameClock::update signal are most interesting for application * writers, and are used to update the animations, using the frame time * given by gdk_frame_clock_get_frame_time(). * * The frame time is reported in microseconds and generally in the same * timescale as g_get_monotonic_time(), however, it is not the same * as g_get_monotonic_time(). The frame time does not advance during * the time a frame is being painted, and outside of a frame, an attempt * is made so that all calls to gdk_frame_clock_get_frame_time() that * are called at a “similar” time get the same value. This means that * if different animations are timed by looking at the difference in * time between an initial value from gdk_frame_clock_get_frame_time() * and the value inside the #GdkFrameClock::update signal of the clock, * they will stay exactly synchronized. */ public class FrameClock : ObjectG { /** the main Gtk struct */ protected GdkFrameClock* gdkFrameClock; /** Get the main Gtk struct */ public GdkFrameClock* getFrameClockStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkFrameClock; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkFrameClock; } protected override void setStruct(GObject* obj) { gdkFrameClock = cast(GdkFrameClock*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkFrameClock* gdkFrameClock, bool ownedRef = false) { this.gdkFrameClock = gdkFrameClock; super(cast(GObject*)gdkFrameClock, ownedRef); } /** */ public static GType getType() { return gdk_frame_clock_get_type(); } /** * Starts updates for an animation. Until a matching call to * gdk_frame_clock_end_updating() is made, the frame clock will continually * request a new frame with the %GDK_FRAME_CLOCK_PHASE_UPDATE phase. * This function may be called multiple times and frames will be * requested until gdk_frame_clock_end_updating() is called the same * number of times. * * Since: 3.8 */ public void beginUpdating() { gdk_frame_clock_begin_updating(gdkFrameClock); } /** * Stops updates for an animation. See the documentation for * gdk_frame_clock_begin_updating(). * * Since: 3.8 */ public void endUpdating() { gdk_frame_clock_end_updating(gdkFrameClock); } /** * Gets the frame timings for the current frame. * * Returns: the #GdkFrameTimings for the frame currently * being processed, or even no frame is being processed, for the * previous frame. Before any frames have been procesed, returns * %NULL. * * Since: 3.8 */ public FrameTimings getCurrentTimings() { auto p = gdk_frame_clock_get_current_timings(gdkFrameClock); if(p is null) { return null; } return ObjectG.getDObject!(FrameTimings)(cast(GdkFrameTimings*) p, true); } /** * A #GdkFrameClock maintains a 64-bit counter that increments for * each frame drawn. * * Returns: inside frame processing, the value of the frame counter * for the current frame. Outside of frame processing, the frame * counter for the last frame. * * Since: 3.8 */ public long getFrameCounter() { return gdk_frame_clock_get_frame_counter(gdkFrameClock); } /** * Gets the time that should currently be used for animations. Inside * the processing of a frame, it’s the time used to compute the * animation position of everything in a frame. Outside of a frame, it's * the time of the conceptual “previous frame,” which may be either * the actual previous frame time, or if that’s too old, an updated * time. * * Returns: a timestamp in microseconds, in the timescale of * of g_get_monotonic_time(). * * Since: 3.8 */ public long getFrameTime() { return gdk_frame_clock_get_frame_time(gdkFrameClock); } /** * #GdkFrameClock internally keeps a history of #GdkFrameTimings * objects for recent frames that can be retrieved with * gdk_frame_clock_get_timings(). The set of stored frames * is the set from the counter values given by * gdk_frame_clock_get_history_start() and * gdk_frame_clock_get_frame_counter(), inclusive. * * Returns: the frame counter value for the oldest frame * that is available in the internal frame history of the * #GdkFrameClock. * * Since: 3.8 */ public long getHistoryStart() { return gdk_frame_clock_get_history_start(gdkFrameClock); } /** * Using the frame history stored in the frame clock, finds the last * known presentation time and refresh interval, and assuming that * presentation times are separated by the refresh interval, * predicts a presentation time that is a multiple of the refresh * interval after the last presentation time, and later than @base_time. * * Params: * baseTime = base time for determining a presentaton time * refreshIntervalReturn = a location to store the determined refresh * interval, or %NULL. A default refresh interval of 1/60th of * a second will be stored if no history is present. * presentationTimeReturn = a location to store the next * candidate presentation time after the given base time. * 0 will be will be stored if no history is present. * * Since: 3.8 */ public void getRefreshInfo(long baseTime, long* refreshIntervalReturn, long* presentationTimeReturn) { gdk_frame_clock_get_refresh_info(gdkFrameClock, baseTime, refreshIntervalReturn, presentationTimeReturn); } /** * Retrieves a #GdkFrameTimings object holding timing information * for the current frame or a recent frame. The #GdkFrameTimings * object may not yet be complete: see gdk_frame_timings_get_complete(). * * Params: * frameCounter = the frame counter value identifying the frame to * be received. * * Returns: the #GdkFrameTimings object for the specified * frame, or %NULL if it is not available. See * gdk_frame_clock_get_history_start(). * * Since: 3.8 */ public FrameTimings getTimings(long frameCounter) { auto p = gdk_frame_clock_get_timings(gdkFrameClock, frameCounter); if(p is null) { return null; } return ObjectG.getDObject!(FrameTimings)(cast(GdkFrameTimings*) p, true); } /** * Asks the frame clock to run a particular phase. The signal * corresponding the requested phase will be emitted the next * time the frame clock processes. Multiple calls to * gdk_frame_clock_request_phase() will be combined together * and only one frame processed. If you are displaying animated * content and want to continually request the * %GDK_FRAME_CLOCK_PHASE_UPDATE phase for a period of time, * you should use gdk_frame_clock_begin_updating() instead, since * this allows GTK+ to adjust system parameters to get maximally * smooth animations. * * Params: * phase = the phase that is requested * * Since: 3.8 */ public void requestPhase(GdkFrameClockPhase phase) { gdk_frame_clock_request_phase(gdkFrameClock, phase); } protected class OnAfterPaintDelegateWrapper { void delegate(FrameClock) dlg; gulong handlerId; this(void delegate(FrameClock) dlg) { this.dlg = dlg; onAfterPaintListeners ~= this; } void remove(OnAfterPaintDelegateWrapper source) { foreach(index, wrapper; onAfterPaintListeners) { if (wrapper.handlerId == source.handlerId) { onAfterPaintListeners[index] = null; onAfterPaintListeners = std.algorithm.remove(onAfterPaintListeners, index); break; } } } } OnAfterPaintDelegateWrapper[] onAfterPaintListeners; /** * This signal ends processing of the frame. Applications * should generally not handle this signal. */ gulong addOnAfterPaint(void delegate(FrameClock) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAfterPaintDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "after-paint", cast(GCallback)&callBackAfterPaint, cast(void*)wrapper, cast(GClosureNotify)&callBackAfterPaintDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackAfterPaint(GdkFrameClock* frameclockStruct, OnAfterPaintDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackAfterPaintDestroy(OnAfterPaintDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnBeforePaintDelegateWrapper { void delegate(FrameClock) dlg; gulong handlerId; this(void delegate(FrameClock) dlg) { this.dlg = dlg; onBeforePaintListeners ~= this; } void remove(OnBeforePaintDelegateWrapper source) { foreach(index, wrapper; onBeforePaintListeners) { if (wrapper.handlerId == source.handlerId) { onBeforePaintListeners[index] = null; onBeforePaintListeners = std.algorithm.remove(onBeforePaintListeners, index); break; } } } } OnBeforePaintDelegateWrapper[] onBeforePaintListeners; /** * This signal begins processing of the frame. Applications * should generally not handle this signal. */ gulong addOnBeforePaint(void delegate(FrameClock) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnBeforePaintDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "before-paint", cast(GCallback)&callBackBeforePaint, cast(void*)wrapper, cast(GClosureNotify)&callBackBeforePaintDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackBeforePaint(GdkFrameClock* frameclockStruct, OnBeforePaintDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackBeforePaintDestroy(OnBeforePaintDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnFlushEventsDelegateWrapper { void delegate(FrameClock) dlg; gulong handlerId; this(void delegate(FrameClock) dlg) { this.dlg = dlg; onFlushEventsListeners ~= this; } void remove(OnFlushEventsDelegateWrapper source) { foreach(index, wrapper; onFlushEventsListeners) { if (wrapper.handlerId == source.handlerId) { onFlushEventsListeners[index] = null; onFlushEventsListeners = std.algorithm.remove(onFlushEventsListeners, index); break; } } } } OnFlushEventsDelegateWrapper[] onFlushEventsListeners; /** * This signal is used to flush pending motion events that * are being batched up and compressed together. Applications * should not handle this signal. */ gulong addOnFlushEvents(void delegate(FrameClock) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnFlushEventsDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "flush-events", cast(GCallback)&callBackFlushEvents, cast(void*)wrapper, cast(GClosureNotify)&callBackFlushEventsDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackFlushEvents(GdkFrameClock* frameclockStruct, OnFlushEventsDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackFlushEventsDestroy(OnFlushEventsDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnLayoutDelegateWrapper { void delegate(FrameClock) dlg; gulong handlerId; this(void delegate(FrameClock) dlg) { this.dlg = dlg; onLayoutListeners ~= this; } void remove(OnLayoutDelegateWrapper source) { foreach(index, wrapper; onLayoutListeners) { if (wrapper.handlerId == source.handlerId) { onLayoutListeners[index] = null; onLayoutListeners = std.algorithm.remove(onLayoutListeners, index); break; } } } } OnLayoutDelegateWrapper[] onLayoutListeners; /** * This signal is emitted as the second step of toolkit and * application processing of the frame. Any work to update * sizes and positions of application elements should be * performed. GTK+ normally handles this internally. */ gulong addOnLayout(void delegate(FrameClock) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnLayoutDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "layout", cast(GCallback)&callBackLayout, cast(void*)wrapper, cast(GClosureNotify)&callBackLayoutDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackLayout(GdkFrameClock* frameclockStruct, OnLayoutDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackLayoutDestroy(OnLayoutDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPaintDelegateWrapper { void delegate(FrameClock) dlg; gulong handlerId; this(void delegate(FrameClock) dlg) { this.dlg = dlg; onPaintListeners ~= this; } void remove(OnPaintDelegateWrapper source) { foreach(index, wrapper; onPaintListeners) { if (wrapper.handlerId == source.handlerId) { onPaintListeners[index] = null; onPaintListeners = std.algorithm.remove(onPaintListeners, index); break; } } } } OnPaintDelegateWrapper[] onPaintListeners; /** * This signal is emitted as the third step of toolkit and * application processing of the frame. The frame is * repainted. GDK normally handles this internally and * produces expose events, which are turned into GTK+ * #GtkWidget::draw signals. */ gulong addOnPaint(void delegate(FrameClock) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPaintDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "paint", cast(GCallback)&callBackPaint, cast(void*)wrapper, cast(GClosureNotify)&callBackPaintDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPaint(GdkFrameClock* frameclockStruct, OnPaintDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackPaintDestroy(OnPaintDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnResumeEventsDelegateWrapper { void delegate(FrameClock) dlg; gulong handlerId; this(void delegate(FrameClock) dlg) { this.dlg = dlg; onResumeEventsListeners ~= this; } void remove(OnResumeEventsDelegateWrapper source) { foreach(index, wrapper; onResumeEventsListeners) { if (wrapper.handlerId == source.handlerId) { onResumeEventsListeners[index] = null; onResumeEventsListeners = std.algorithm.remove(onResumeEventsListeners, index); break; } } } } OnResumeEventsDelegateWrapper[] onResumeEventsListeners; /** * This signal is emitted after processing of the frame is * finished, and is handled internally by GTK+ to resume normal * event processing. Applications should not handle this signal. */ gulong addOnResumeEvents(void delegate(FrameClock) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnResumeEventsDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "resume-events", cast(GCallback)&callBackResumeEvents, cast(void*)wrapper, cast(GClosureNotify)&callBackResumeEventsDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackResumeEvents(GdkFrameClock* frameclockStruct, OnResumeEventsDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackResumeEventsDestroy(OnResumeEventsDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnUpdateDelegateWrapper { void delegate(FrameClock) dlg; gulong handlerId; this(void delegate(FrameClock) dlg) { this.dlg = dlg; onUpdateListeners ~= this; } void remove(OnUpdateDelegateWrapper source) { foreach(index, wrapper; onUpdateListeners) { if (wrapper.handlerId == source.handlerId) { onUpdateListeners[index] = null; onUpdateListeners = std.algorithm.remove(onUpdateListeners, index); break; } } } } OnUpdateDelegateWrapper[] onUpdateListeners; /** * This signal is emitted as the first step of toolkit and * application processing of the frame. Animations should * be updated using gdk_frame_clock_get_frame_time(). * Applications can connect directly to this signal, or * use gtk_widget_add_tick_callback() as a more convenient * interface. */ gulong addOnUpdate(void delegate(FrameClock) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnUpdateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "update", cast(GCallback)&callBackUpdate, cast(void*)wrapper, cast(GClosureNotify)&callBackUpdateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackUpdate(GdkFrameClock* frameclockStruct, OnUpdateDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackUpdateDestroy(OnUpdateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gdk/FrameTimings.d000066400000000000000000000142641324604450400205560ustar00rootroot00000000000000/* * 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 gdk.FrameTimings; private import gdk.c.functions; public import gdk.c.types; private import gobject.ObjectG; public import gtkc.gdktypes; private import gtkd.Loader; /** * A #GdkFrameTimings object holds timing information for a single frame * of the application’s displays. To retrieve #GdkFrameTimings objects, * use gdk_frame_clock_get_timings() or gdk_frame_clock_get_current_timings(). * The information in #GdkFrameTimings is useful for precise synchronization * of video with the event or audio streams, and for measuring * quality metrics for the application’s display, such as latency and jitter. */ public class FrameTimings { /** the main Gtk struct */ protected GdkFrameTimings* gdkFrameTimings; protected bool ownedRef; /** Get the main Gtk struct */ public GdkFrameTimings* getFrameTimingsStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkFrameTimings; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gdkFrameTimings; } /** * Sets our main struct and passes it to the parent class. */ public this (GdkFrameTimings* gdkFrameTimings, bool ownedRef = false) { this.gdkFrameTimings = gdkFrameTimings; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GDK) && ownedRef ) gdk_frame_timings_unref(gdkFrameTimings); } /** */ public static GType getType() { return gdk_frame_timings_get_type(); } /** * The timing information in a #GdkFrameTimings is filled in * incrementally as the frame as drawn and passed off to the * window system for processing and display to the user. The * accessor functions for #GdkFrameTimings can return 0 to * indicate an unavailable value for two reasons: either because * the information is not yet available, or because it isn't * available at all. Once gdk_frame_timings_get_complete() returns * %TRUE for a frame, you can be certain that no further values * will become available and be stored in the #GdkFrameTimings. * * Returns: %TRUE if all information that will be available * for the frame has been filled in. * * Since: 3.8 */ public bool getComplete() { return gdk_frame_timings_get_complete(gdkFrameTimings) != 0; } /** * Gets the frame counter value of the #GdkFrameClock when this * this frame was drawn. * * Returns: the frame counter value for this frame * * Since: 3.8 */ public long getFrameCounter() { return gdk_frame_timings_get_frame_counter(gdkFrameTimings); } /** * Returns the frame time for the frame. This is the time value * that is typically used to time animations for the frame. See * gdk_frame_clock_get_frame_time(). * * Returns: the frame time for the frame, in the timescale * of g_get_monotonic_time() */ public long getFrameTime() { return gdk_frame_timings_get_frame_time(gdkFrameTimings); } /** * Gets the predicted time at which this frame will be displayed. Although * no predicted time may be available, if one is available, it will * be available while the frame is being generated, in contrast to * gdk_frame_timings_get_presentation_time(), which is only available * after the frame has been presented. In general, if you are simply * animating, you should use gdk_frame_clock_get_frame_time() rather * than this function, but this function is useful for applications * that want exact control over latency. For example, a movie player * may want this information for Audio/Video synchronization. * * Returns: The predicted time at which the frame will be presented, * in the timescale of g_get_monotonic_time(), or 0 if no predicted * presentation time is available. * * Since: 3.8 */ public long getPredictedPresentationTime() { return gdk_frame_timings_get_predicted_presentation_time(gdkFrameTimings); } /** * Reurns the presentation time. This is the time at which the frame * became visible to the user. * * Returns: the time the frame was displayed to the user, in the * timescale of g_get_monotonic_time(), or 0 if no presentation * time is available. See gdk_frame_timings_get_complete() * * Since: 3.8 */ public long getPresentationTime() { return gdk_frame_timings_get_presentation_time(gdkFrameTimings); } /** * Gets the natural interval between presentation times for * the display that this frame was displayed on. Frame presentation * usually happens during the “vertical blanking interval”. * * Returns: the refresh interval of the display, in microseconds, * or 0 if the refresh interval is not available. * See gdk_frame_timings_get_complete(). * * Since: 3.8 */ public long getRefreshInterval() { return gdk_frame_timings_get_refresh_interval(gdkFrameTimings); } /** * Increases the reference count of @timings. * * Returns: @timings * * Since: 3.8 */ public FrameTimings doref() { auto p = gdk_frame_timings_ref(gdkFrameTimings); if(p is null) { return null; } return ObjectG.getDObject!(FrameTimings)(cast(GdkFrameTimings*) p, true); } /** * Decreases the reference count of @timings. If @timings * is no longer referenced, it will be freed. * * Since: 3.8 */ public void unref() { gdk_frame_timings_unref(gdkFrameTimings); } } GtkD-3.7.5/generated/gtkd/gdk/GLContext.d000066400000000000000000000263331324604450400200400ustar00rootroot00000000000000/* * 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 gdk.GLContext; private import gdk.Display; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.gdktypes; /** * #GdkGLContext is an object representing the platform-specific * OpenGL drawing context. * * #GdkGLContexts are created for a #GdkWindow using * gdk_window_create_gl_context(), and the context will match * the #GdkVisual of the window. * * A #GdkGLContext is not tied to any particular normal framebuffer. * For instance, it cannot draw to the #GdkWindow back buffer. The GDK * repaint system is in full control of the painting to that. Instead, * you can create render buffers or textures and use gdk_cairo_draw_from_gl() * in the draw function of your widget to draw them. Then GDK will handle * the integration of your rendering with that of other widgets. * * Support for #GdkGLContext is platform-specific, context creation * can fail, returning %NULL context. * * A #GdkGLContext has to be made "current" in order to start using * it, otherwise any OpenGL call will be ignored. * * ## Creating a new OpenGL context ## * * In order to create a new #GdkGLContext instance you need a * #GdkWindow, which you typically get during the realize call * of a widget. * * A #GdkGLContext is not realized until either gdk_gl_context_make_current(), * or until it is realized using gdk_gl_context_realize(). It is possible to * specify details of the GL context like the OpenGL version to be used, or * whether the GL context should have extra state validation enabled after * calling gdk_window_create_gl_context() by calling gdk_gl_context_realize(). * If the realization fails you have the option to change the settings of the * #GdkGLContext and try again. * * ## Using a GdkGLContext ## * * You will need to make the #GdkGLContext the current context * before issuing OpenGL calls; the system sends OpenGL commands to * whichever context is current. It is possible to have multiple * contexts, so you always need to ensure that the one which you * want to draw with is the current one before issuing commands: * * |[ * gdk_gl_context_make_current (context); * ]| * * You can now perform your drawing using OpenGL commands. * * You can check which #GdkGLContext is the current one by using * gdk_gl_context_get_current(); you can also unset any #GdkGLContext * that is currently set by calling gdk_gl_context_clear_current(). */ public class GLContext : ObjectG { /** the main Gtk struct */ protected GdkGLContext* gdkGLContext; /** Get the main Gtk struct */ public GdkGLContext* getGLContextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkGLContext; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkGLContext; } protected override void setStruct(GObject* obj) { gdkGLContext = cast(GdkGLContext*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkGLContext* gdkGLContext, bool ownedRef = false) { this.gdkGLContext = gdkGLContext; super(cast(GObject*)gdkGLContext, ownedRef); } /** */ public static GType getType() { return gdk_gl_context_get_type(); } /** * Clears the current #GdkGLContext. * * Any OpenGL call after this function returns will be ignored * until gdk_gl_context_make_current() is called. * * Since: 3.16 */ public static void clearCurrent() { gdk_gl_context_clear_current(); } /** * Retrieves the current #GdkGLContext. * * Returns: the current #GdkGLContext, or %NULL * * Since: 3.16 */ public static GLContext getCurrent() { auto p = gdk_gl_context_get_current(); if(p is null) { return null; } return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) p); } /** * Retrieves the value set using gdk_gl_context_set_debug_enabled(). * * Returns: %TRUE if debugging is enabled * * Since: 3.16 */ public bool getDebugEnabled() { return gdk_gl_context_get_debug_enabled(gdkGLContext) != 0; } /** * Retrieves the #GdkDisplay the @context is created for * * Returns: a #GdkDisplay or %NULL * * Since: 3.16 */ public Display getDisplay() { auto p = gdk_gl_context_get_display(gdkGLContext); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Retrieves the value set using gdk_gl_context_set_forward_compatible(). * * Returns: %TRUE if the context should be forward compatible * * Since: 3.16 */ public bool getForwardCompatible() { return gdk_gl_context_get_forward_compatible(gdkGLContext) != 0; } /** * Retrieves the major and minor version requested by calling * gdk_gl_context_set_required_version(). * * Params: * major = return location for the major version to request * minor = return location for the minor version to request * * Since: 3.16 */ public void getRequiredVersion(out int major, out int minor) { gdk_gl_context_get_required_version(gdkGLContext, &major, &minor); } /** * Retrieves the #GdkGLContext that this @context share data with. * * Returns: a #GdkGLContext or %NULL * * Since: 3.16 */ public GLContext getSharedContext() { auto p = gdk_gl_context_get_shared_context(gdkGLContext); if(p is null) { return null; } return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) p); } /** * Checks whether the @context is using an OpenGL or OpenGL ES profile. * * Returns: %TRUE if the #GdkGLContext is using an OpenGL ES profile * * Since: 3.22 */ public bool getUseEs() { return gdk_gl_context_get_use_es(gdkGLContext) != 0; } /** * Retrieves the OpenGL version of the @context. * * The @context must be realized prior to calling this function. * * Params: * major = return location for the major version * minor = return location for the minor version * * Since: 3.16 */ public void getVersion(out int major, out int minor) { gdk_gl_context_get_version(gdkGLContext, &major, &minor); } /** * Retrieves the #GdkWindow used by the @context. * * Returns: a #GdkWindow or %NULL * * Since: 3.16 */ public Window getWindow() { auto p = gdk_gl_context_get_window(gdkGLContext); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Whether the #GdkGLContext is in legacy mode or not. * * The #GdkGLContext must be realized before calling this function. * * When realizing a GL context, GDK will try to use the OpenGL 3.2 core * profile; this profile removes all the OpenGL API that was deprecated * prior to the 3.2 version of the specification. If the realization is * successful, this function will return %FALSE. * * If the underlying OpenGL implementation does not support core profiles, * GDK will fall back to a pre-3.2 compatibility profile, and this function * will return %TRUE. * * You can use the value returned by this function to decide which kind * of OpenGL API to use, or whether to do extension discovery, or what * kind of shader programs to load. * * Returns: %TRUE if the GL context is in legacy mode * * Since: 3.20 */ public bool isLegacy() { return gdk_gl_context_is_legacy(gdkGLContext) != 0; } /** * Makes the @context the current one. * * Since: 3.16 */ public void makeCurrent() { gdk_gl_context_make_current(gdkGLContext); } /** * Realizes the given #GdkGLContext. * * It is safe to call this function on a realized #GdkGLContext. * * Returns: %TRUE if the context is realized * * Since: 3.16 * * Throws: GException on failure. */ public bool realize() { GError* err = null; auto p = gdk_gl_context_realize(gdkGLContext, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets whether the #GdkGLContext should perform extra validations and * run time checking. This is useful during development, but has * additional overhead. * * The #GdkGLContext must not be realized or made current prior to * calling this function. * * Params: * enabled = whether to enable debugging in the context * * Since: 3.16 */ public void setDebugEnabled(bool enabled) { gdk_gl_context_set_debug_enabled(gdkGLContext, enabled); } /** * Sets whether the #GdkGLContext should be forward compatible. * * Forward compatibile contexts must not support OpenGL functionality that * has been marked as deprecated in the requested version; non-forward * compatible contexts, on the other hand, must support both deprecated and * non deprecated functionality. * * The #GdkGLContext must not be realized or made current prior to calling * this function. * * Params: * compatible = whether the context should be forward compatible * * Since: 3.16 */ public void setForwardCompatible(bool compatible) { gdk_gl_context_set_forward_compatible(gdkGLContext, compatible); } /** * Sets the major and minor version of OpenGL to request. * * Setting @major and @minor to zero will use the default values. * * The #GdkGLContext must not be realized or made current prior to calling * this function. * * Params: * major = the major version to request * minor = the minor version to request * * Since: 3.16 */ public void setRequiredVersion(int major, int minor) { gdk_gl_context_set_required_version(gdkGLContext, major, minor); } /** * Requests that GDK create a OpenGL ES context instead of an OpenGL one, * if the platform and windowing system allows it. * * The @context must not have been realized. * * By default, GDK will attempt to automatically detect whether the * underlying GL implementation is OpenGL or OpenGL ES once the @context * is realized. * * You should check the return value of gdk_gl_context_get_use_es() after * calling gdk_gl_context_realize() to decide whether to use the OpenGL or * OpenGL ES API, extensions, or shaders. * * Params: * useEs = whether the context should use OpenGL ES instead of OpenGL, * or -1 to allow auto-detection * * Since: 3.22 */ public void setUseEs(int useEs) { gdk_gl_context_set_use_es(gdkGLContext, useEs); } } GtkD-3.7.5/generated/gtkd/gdk/Gdk.d000066400000000000000000000366011324604450400166750ustar00rootroot00000000000000/* * 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 gdk.Gdk; private import gdk.Cursor; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; public import gtkc.gdktypes; /** */ public struct Gdk { /** * Emits a short beep on the default display. */ public static void beep() { gdk_beep(); } /** * Removes an error trap pushed with gdk_error_trap_push(). * May block until an error has been definitively received * or not received from the X server. gdk_error_trap_pop_ignored() * is preferred if you don’t need to know whether an error * occurred, because it never has to block. If you don't * need the return value of gdk_error_trap_pop(), use * gdk_error_trap_pop_ignored(). * * Prior to GDK 3.0, this function would not automatically * sync for you, so you had to gdk_flush() if your last * call to Xlib was not a blocking round trip. * * Returns: X error code or 0 on success */ public static int errorTrapPop() { return gdk_error_trap_pop(); } /** * Removes an error trap pushed with gdk_error_trap_push(), but * without bothering to wait and see whether an error occurred. If an * error arrives later asynchronously that was triggered while the * trap was pushed, that error will be ignored. * * Since: 3.0 */ public static void errorTrapPopIgnored() { gdk_error_trap_pop_ignored(); } /** * This function allows X errors to be trapped instead of the normal * behavior of exiting the application. It should only be used if it * is not possible to avoid the X error in any other way. Errors are * ignored on all #GdkDisplay currently known to the * #GdkDisplayManager. If you don’t care which error happens and just * want to ignore everything, pop with gdk_error_trap_pop_ignored(). * If you need the error code, use gdk_error_trap_pop() which may have * to block and wait for the error to arrive from the X server. * * This API exists on all platforms but only does anything on X. * * You can use gdk_x11_display_error_trap_push() to ignore errors * on only a single display. * * ## Trapping an X error * * |[ * gdk_error_trap_push (); * * // ... Call the X function which may cause an error here ... * * * if (gdk_error_trap_pop ()) * { * // ... Handle the error here ... * } * ]| */ public static void errorTrapPush() { gdk_error_trap_push(); } /** * Flushes the output buffers of all display connections and waits * until all requests have been processed. * This is rarely needed by applications. */ public static void flush() { gdk_flush(); } /** * Gets the name of the display, which usually comes from the * `DISPLAY` environment variable or the * `--display` command line option. * * Deprecated: Call gdk_display_get_name (gdk_display_get_default ())) * instead. * * Returns: the name of the display. */ public static string getDisplay() { auto retStr = gdk_get_display(); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the display name specified in the command line arguments passed * to gdk_init() or gdk_parse_args(), if any. * * Returns: the display name, if specified explicitly, * otherwise %NULL this string is owned by GTK+ and must not be * modified or freed. * * Since: 2.2 */ public static string getDisplayArgName() { return Str.toString(gdk_get_display_arg_name()); } /** * Gets the program class. Unless the program class has explicitly * been set with gdk_set_program_class() or with the `--class` * commandline option, the default value is the program name (determined * with g_get_prgname()) with the first character converted to uppercase. * * Returns: the program class. */ public static string getProgramClass() { return Str.toString(gdk_get_program_class()); } /** * Initializes the GDK library and connects to the windowing system. * If initialization fails, a warning message is output and the application * terminates with a call to `exit(1)`. * * Any arguments used by GDK are removed from the array and @argc and @argv * are updated accordingly. * * GTK+ initializes GDK in gtk_init() and so this function is not usually * needed by GTK+ applications. * * Params: * argv = the array of command line arguments. */ public static void init(ref string[] argv) { int argc = cast(int)argv.length; char** outargv = Str.toStringzArray(argv); gdk_init(&argc, &outargv); argv = Str.toStringArray(outargv, argc); } /** * Initializes the GDK library and connects to the windowing system, * returning %TRUE on success. * * Any arguments used by GDK are removed from the array and @argc and @argv * are updated accordingly. * * GTK+ initializes GDK in gtk_init() and so this function is not usually * needed by GTK+ applications. * * Params: * argv = the array of command line arguments. * * Returns: %TRUE if initialization succeeded. */ public static bool initCheck(ref string[] argv) { int argc = cast(int)argv.length; char** outargv = Str.toStringzArray(argv); auto p = gdk_init_check(&argc, &outargv) != 0; argv = Str.toStringArray(outargv, argc); return p; } /** * Grabs the keyboard so that all events are passed to this * application until the keyboard is ungrabbed with gdk_keyboard_ungrab(). * This overrides any previous keyboard grab by this client. * * If you set up anything at the time you take the grab that needs to be cleaned * up when the grab ends, you should handle the #GdkEventGrabBroken events that * are emitted when the grab ends unvoluntarily. * * Deprecated: Use gdk_device_grab() instead. * * Params: * window = the #GdkWindow which will own the grab (the grab window). * ownerEvents = if %FALSE then all keyboard events are reported with respect to * @window. If %TRUE then keyboard events for this application are * reported as normal, but keyboard events outside this application * are reported with respect to @window. Both key press and key * release events are always reported, independant of the event mask * set by the application. * time = a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is * available. * * Returns: %GDK_GRAB_SUCCESS if the grab was successful. */ public static GdkGrabStatus keyboardGrab(Window window, bool ownerEvents, uint time) { return gdk_keyboard_grab((window is null) ? null : window.getWindowStruct(), ownerEvents, time); } /** * Ungrabs the keyboard on the default display, if it is grabbed by this * application. * * Deprecated: Use gdk_device_ungrab(), together with gdk_device_grab() * instead. * * Params: * time = a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no * timestamp is available. */ public static void keyboardUngrab(uint time) { gdk_keyboard_ungrab(time); } /** * Indicates to the GUI environment that the application has finished * loading. If the applications opens windows, this function is * normally called after opening the application’s initial set of * windows. * * GTK+ will call this function automatically after opening the first * #GtkWindow unless gtk_window_set_auto_startup_notification() is called * to disable that feature. * * Since: 2.2 */ public static void notifyStartupComplete() { gdk_notify_startup_complete(); } /** * Indicates to the GUI environment that the application has * finished loading, using a given identifier. * * GTK+ will call this function automatically for #GtkWindow * with custom startup-notification identifier unless * gtk_window_set_auto_startup_notification() is called to * disable that feature. * * Params: * startupId = a startup-notification identifier, for which * notification process should be completed * * Since: 2.12 */ public static void notifyStartupCompleteWithId(string startupId) { gdk_notify_startup_complete_with_id(Str.toStringz(startupId)); } /** * Parse command line arguments, and store for future * use by calls to gdk_display_open(). * * Any arguments used by GDK are removed from the array and @argc and @argv are * updated accordingly. * * You shouldn’t call this function explicitly if you are using * gtk_init(), gtk_init_check(), gdk_init(), or gdk_init_check(). * * Params: * argv = the array of command line arguments. * * Since: 2.2 */ public static void parseArgs(ref string[] argv) { int argc = cast(int)argv.length; char** outargv = Str.toStringzArray(argv); gdk_parse_args(&argc, &outargv); argv = Str.toStringArray(outargv, argc); } /** * Grabs the pointer (usually a mouse) so that all events are passed to this * application until the pointer is ungrabbed with gdk_pointer_ungrab(), or * the grab window becomes unviewable. * This overrides any previous pointer grab by this client. * * Pointer grabs are used for operations which need complete control over mouse * events, even if the mouse leaves the application. * For example in GTK+ it is used for Drag and Drop, for dragging the handle in * the #GtkHPaned and #GtkVPaned widgets. * * Note that if the event mask of an X window has selected both button press and * button release events, then a button press event will cause an automatic * pointer grab until the button is released. * X does this automatically since most applications expect to receive button * press and release events in pairs. * It is equivalent to a pointer grab on the window with @owner_events set to * %TRUE. * * If you set up anything at the time you take the grab that needs to be cleaned * up when the grab ends, you should handle the #GdkEventGrabBroken events that * are emitted when the grab ends unvoluntarily. * * Deprecated: Use gdk_device_grab() instead. * * Params: * window = the #GdkWindow which will own the grab (the grab window). * ownerEvents = if %FALSE then all pointer events are reported with respect to * @window and are only reported if selected by @event_mask. If %TRUE then pointer * events for this application are reported as normal, but pointer events outside * this application are reported with respect to @window and only if selected by * @event_mask. In either mode, unreported events are discarded. * eventMask = specifies the event mask, which is used in accordance with * @owner_events. Note that only pointer events (i.e. button and motion events) * may be selected. * confineTo = If non-%NULL, the pointer will be confined to this * window during the grab. If the pointer is outside @confine_to, it will * automatically be moved to the closest edge of @confine_to and enter * and leave events will be generated as necessary. * cursor = the cursor to display while the grab is active. If this is %NULL then * the normal cursors are used for @window and its descendants, and the cursor * for @window is used for all other windows. * time = the timestamp of the event which led to this pointer grab. This usually * comes from a #GdkEventButton struct, though %GDK_CURRENT_TIME can be used if * the time isn’t known. * * Returns: %GDK_GRAB_SUCCESS if the grab was successful. */ public static GdkGrabStatus pointerGrab(Window window, bool ownerEvents, GdkEventMask eventMask, Window confineTo, Cursor cursor, uint time) { return gdk_pointer_grab((window is null) ? null : window.getWindowStruct(), ownerEvents, eventMask, (confineTo is null) ? null : confineTo.getWindowStruct(), (cursor is null) ? null : cursor.getCursorStruct(), time); } /** * Returns %TRUE if the pointer on the default display is currently * grabbed by this application. * * Note that this does not take the inmplicit pointer grab on button * presses into account. * * Deprecated: Use gdk_display_device_is_grabbed() instead. * * Returns: %TRUE if the pointer is currently grabbed by this application. */ public static bool pointerIsGrabbed() { return gdk_pointer_is_grabbed() != 0; } /** * Ungrabs the pointer on the default display, if it is grabbed by this * application. * * Deprecated: Use gdk_device_ungrab(), together with gdk_device_grab() * instead. * * Params: * time = a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no * timestamp is available. */ public static void pointerUngrab(uint time) { gdk_pointer_ungrab(time); } /** * Sets a list of backends that GDK should try to use. * * This can be be useful if your application does not * work with certain GDK backends. * * By default, GDK tries all included backends. * * For example, * |[ * gdk_set_allowed_backends ("wayland,quartz,*"); * ]| * instructs GDK to try the Wayland backend first, * followed by the Quartz backend, and then all * others. * * If the `GDK_BACKEND` environment variable * is set, it determines what backends are tried in what * order, while still respecting the set of allowed backends * that are specified by this function. * * The possible backend names are x11, win32, quartz, * broadway, wayland. You can also include a * in the * list to try all remaining backends. * * This call must happen prior to gdk_display_open(), * gtk_init(), gtk_init_with_args() or gtk_init_check() * in order to take effect. * * Params: * backends = a comma-separated list of backends * * Since: 3.10 */ public static void setAllowedBackends(string backends) { gdk_set_allowed_backends(Str.toStringz(backends)); } /** * Set the double click time for the default display. See * gdk_display_set_double_click_time(). * See also gdk_display_set_double_click_distance(). * Applications should not set this, it is a * global user-configured setting. * * Params: * msec = double click time in milliseconds (thousandths of a second) */ public static void setDoubleClickTime(uint msec) { gdk_set_double_click_time(msec); } /** * Sets the program class. The X11 backend uses the program class to set * the class name part of the `WM_CLASS` property on * toplevel windows; see the ICCCM. * * The program class can still be overridden with the --class command * line option. * * Params: * programClass = a string. */ public static void setProgramClass(string programClass) { gdk_set_program_class(Str.toStringz(programClass)); } } GtkD-3.7.5/generated/gtkd/gdk/Keymap.d000066400000000000000000000503221324604450400174120ustar00rootroot00000000000000/* * 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 gdk.Keymap; private import gdk.Display; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** * A #GdkKeymap defines the translation from keyboard state * (including a hardware key, a modifier mask, and active keyboard group) * to a keyval. This translation has two phases. The first phase is * to determine the effective keyboard group and level for the keyboard * state; the second phase is to look up the keycode/group/level triplet * in the keymap and see what keyval it corresponds to. */ public class Keymap : ObjectG { /** the main Gtk struct */ protected GdkKeymap* gdkKeymap; /** Get the main Gtk struct */ public GdkKeymap* getKeymapStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkKeymap; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkKeymap; } protected override void setStruct(GObject* obj) { gdkKeymap = cast(GdkKeymap*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkKeymap* gdkKeymap, bool ownedRef = false) { this.gdkKeymap = gdkKeymap; super(cast(GObject*)gdkKeymap, ownedRef); } /** */ public static GType getType() { return gdk_keymap_get_type(); } /** * Returns the #GdkKeymap attached to the default display. * * Returns: the #GdkKeymap attached to the default display. */ public static Keymap getDefault() { auto p = gdk_keymap_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(Keymap)(cast(GdkKeymap*) p); } /** * Returns the #GdkKeymap attached to @display. * * Params: * display = the #GdkDisplay. * * Returns: the #GdkKeymap attached to @display. * * Since: 2.2 */ public static Keymap getForDisplay(Display display) { auto p = gdk_keymap_get_for_display((display is null) ? null : display.getDisplayStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Keymap)(cast(GdkKeymap*) p); } /** * Maps the non-virtual modifiers (i.e Mod2, Mod3, ...) which are set * in @state to the virtual modifiers (i.e. Super, Hyper and Meta) and * set the corresponding bits in @state. * * GDK already does this before delivering key events, but for * compatibility reasons, it only sets the first virtual modifier * it finds, whereas this function sets all matching virtual modifiers. * * This function is useful when matching key events against * accelerators. * * Params: * state = pointer to the modifier mask to change * * Since: 2.20 */ public void addVirtualModifiers(ref GdkModifierType state) { gdk_keymap_add_virtual_modifiers(gdkKeymap, &state); } /** * Returns whether the Caps Lock modifer is locked. * * Returns: %TRUE if Caps Lock is on * * Since: 2.16 */ public bool getCapsLockState() { return gdk_keymap_get_caps_lock_state(gdkKeymap) != 0; } /** * Returns the direction of effective layout of the keymap. * * Returns: %PANGO_DIRECTION_LTR or %PANGO_DIRECTION_RTL * if it can determine the direction. %PANGO_DIRECTION_NEUTRAL * otherwise. */ public PangoDirection getDirection() { return gdk_keymap_get_direction(gdkKeymap); } /** * Returns the keyvals bound to @hardware_keycode. * The Nth #GdkKeymapKey in @keys is bound to the Nth * keyval in @keyvals. Free the returned arrays with g_free(). * When a keycode is pressed by the user, the keyval from * this list of entries is selected by considering the effective * keyboard group and level. See gdk_keymap_translate_keyboard_state(). * * Params: * hardwareKeycode = a keycode * keys = return * location for array of #GdkKeymapKey, or %NULL * keyvals = return * location for array of keyvals, or %NULL * * Returns: %TRUE if there were any entries */ public bool getEntriesForKeycode(uint hardwareKeycode, out GdkKeymapKey[] keys, out uint[] keyvals) { GdkKeymapKey* outkeys = null; uint* outkeyvals = null; int nEntries; auto p = gdk_keymap_get_entries_for_keycode(gdkKeymap, hardwareKeycode, &outkeys, &outkeyvals, &nEntries) != 0; keys = outkeys[0 .. nEntries]; keyvals = outkeyvals[0 .. nEntries]; return p; } /** * Obtains a list of keycode/group/level combinations that will * generate @keyval. Groups and levels are two kinds of keyboard mode; * in general, the level determines whether the top or bottom symbol * on a key is used, and the group determines whether the left or * right symbol is used. On US keyboards, the shift key changes the * keyboard level, and there are no groups. A group switch key might * convert a keyboard between Hebrew to English modes, for example. * #GdkEventKey contains a %group field that indicates the active * keyboard group. The level is computed from the modifier mask. * The returned array should be freed * with g_free(). * * Params: * keyval = a keyval, such as %GDK_KEY_a, %GDK_KEY_Up, %GDK_KEY_Return, etc. * keys = return location * for an array of #GdkKeymapKey * * Returns: %TRUE if keys were found and returned */ public bool getEntriesForKeyval(uint keyval, out GdkKeymapKey[] keys) { GdkKeymapKey* outkeys = null; int nKeys; auto p = gdk_keymap_get_entries_for_keyval(gdkKeymap, keyval, &outkeys, &nKeys) != 0; keys = outkeys[0 .. nKeys]; return p; } /** * Returns the modifier mask the @keymap’s windowing system backend * uses for a particular purpose. * * Note that this function always returns real hardware modifiers, not * virtual ones (e.g. it will return #GDK_MOD1_MASK rather than * #GDK_META_MASK if the backend maps MOD1 to META), so there are use * cases where the return value of this function has to be transformed * by gdk_keymap_add_virtual_modifiers() in order to contain the * expected result. * * Params: * intent = the use case for the modifier mask * * Returns: the modifier mask used for @intent. * * Since: 3.4 */ public GdkModifierType getModifierMask(GdkModifierIntent intent) { return gdk_keymap_get_modifier_mask(gdkKeymap, intent); } /** * Returns the current modifier state. * * Returns: the current modifier state. * * Since: 3.4 */ public uint getModifierState() { return gdk_keymap_get_modifier_state(gdkKeymap); } /** * Returns whether the Num Lock modifer is locked. * * Returns: %TRUE if Num Lock is on * * Since: 3.0 */ public bool getNumLockState() { return gdk_keymap_get_num_lock_state(gdkKeymap) != 0; } /** * Returns whether the Scroll Lock modifer is locked. * * Returns: %TRUE if Scroll Lock is on * * Since: 3.18 */ public bool getScrollLockState() { return gdk_keymap_get_scroll_lock_state(gdkKeymap) != 0; } /** * Determines if keyboard layouts for both right-to-left and left-to-right * languages are in use. * * Returns: %TRUE if there are layouts in both directions, %FALSE otherwise * * Since: 2.12 */ public bool haveBidiLayouts() { return gdk_keymap_have_bidi_layouts(gdkKeymap) != 0; } /** * Looks up the keyval mapped to a keycode/group/level triplet. * If no keyval is bound to @key, returns 0. For normal user input, * you want to use gdk_keymap_translate_keyboard_state() instead of * this function, since the effective group/level may not be * the same as the current keyboard state. * * Params: * key = a #GdkKeymapKey with keycode, group, and level initialized * * Returns: a keyval, or 0 if none was mapped to the given @key */ public uint lookupKey(GdkKeymapKey* key) { return gdk_keymap_lookup_key(gdkKeymap, key); } /** * Maps the virtual modifiers (i.e. Super, Hyper and Meta) which * are set in @state to their non-virtual counterparts (i.e. Mod2, * Mod3,...) and set the corresponding bits in @state. * * This function is useful when matching key events against * accelerators. * * Params: * state = pointer to the modifier state to map * * Returns: %FALSE if two virtual modifiers were mapped to the * same non-virtual modifier. Note that %FALSE is also returned * if a virtual modifier is mapped to a non-virtual modifier that * was already set in @state. * * Since: 2.20 */ public bool mapVirtualModifiers(ref GdkModifierType state) { return gdk_keymap_map_virtual_modifiers(gdkKeymap, &state) != 0; } /** * Translates the contents of a #GdkEventKey into a keyval, effective * group, and level. Modifiers that affected the translation and * are thus unavailable for application use are returned in * @consumed_modifiers. * See [Groups][key-group-explanation] for an explanation of * groups and levels. The @effective_group is the group that was * actually used for the translation; some keys such as Enter are not * affected by the active keyboard group. The @level is derived from * @state. For convenience, #GdkEventKey already contains the translated * keyval, so this function isn’t as useful as you might think. * * @consumed_modifiers gives modifiers that should be masked outfrom @state * when comparing this key press to a hot key. For instance, on a US keyboard, * the `plus` symbol is shifted, so when comparing a key press to a * `plus` accelerator `` should be masked out. * * |[ * // We want to ignore irrelevant modifiers like ScrollLock * #define ALL_ACCELS_MASK (GDK_CONTROL_MASK | GDK_SHIFT_MASK | GDK_MOD1_MASK) * gdk_keymap_translate_keyboard_state (keymap, event->hardware_keycode, * event->state, event->group, * &keyval, NULL, NULL, &consumed); * if (keyval == GDK_PLUS && * (event->state & ~consumed & ALL_ACCELS_MASK) == GDK_CONTROL_MASK) * // Control was pressed * ]| * * An older interpretation @consumed_modifiers was that it contained * all modifiers that might affect the translation of the key; * this allowed accelerators to be stored with irrelevant consumed * modifiers, by doing: * |[ * // XXX Don’t do this XXX * if (keyval == accel_keyval && * (event->state & ~consumed & ALL_ACCELS_MASK) == (accel_mods & ~consumed)) * // Accelerator was pressed * ]| * * However, this did not work if multi-modifier combinations were * used in the keymap, since, for instance, `` would be * masked out even if only `` was used in the keymap. * To support this usage as well as well as possible, all single * modifier combinations that could affect the key for any combination * of modifiers will be returned in @consumed_modifiers; multi-modifier * combinations are returned only when actually found in @state. When * you store accelerators, you should always store them with consumed * modifiers removed. Store `plus`, not `plus`, * * Params: * hardwareKeycode = a keycode * state = a modifier state * group = active keyboard group * keyval = return location for keyval, or %NULL * effectiveGroup = return location for effective * group, or %NULL * level = return location for level, or %NULL * consumedModifiers = return location for modifiers * that were used to determine the group or level, or %NULL * * Returns: %TRUE if there was a keyval bound to the keycode/state/group */ public bool translateKeyboardState(uint hardwareKeycode, GdkModifierType state, int group, out uint keyval, out int effectiveGroup, out int level, out GdkModifierType consumedModifiers) { return gdk_keymap_translate_keyboard_state(gdkKeymap, hardwareKeycode, state, group, &keyval, &effectiveGroup, &level, &consumedModifiers) != 0; } protected class OnDirectionChangedDelegateWrapper { void delegate(Keymap) dlg; gulong handlerId; this(void delegate(Keymap) dlg) { this.dlg = dlg; onDirectionChangedListeners ~= this; } void remove(OnDirectionChangedDelegateWrapper source) { foreach(index, wrapper; onDirectionChangedListeners) { if (wrapper.handlerId == source.handlerId) { onDirectionChangedListeners[index] = null; onDirectionChangedListeners = std.algorithm.remove(onDirectionChangedListeners, index); break; } } } } OnDirectionChangedDelegateWrapper[] onDirectionChangedListeners; /** * The ::direction-changed signal gets emitted when the direction of * the keymap changes. * * Since: 2.0 */ gulong addOnDirectionChanged(void delegate(Keymap) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDirectionChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "direction-changed", cast(GCallback)&callBackDirectionChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackDirectionChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDirectionChanged(GdkKeymap* keymapStruct, OnDirectionChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackDirectionChangedDestroy(OnDirectionChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnKeysChangedDelegateWrapper { void delegate(Keymap) dlg; gulong handlerId; this(void delegate(Keymap) dlg) { this.dlg = dlg; onKeysChangedListeners ~= this; } void remove(OnKeysChangedDelegateWrapper source) { foreach(index, wrapper; onKeysChangedListeners) { if (wrapper.handlerId == source.handlerId) { onKeysChangedListeners[index] = null; onKeysChangedListeners = std.algorithm.remove(onKeysChangedListeners, index); break; } } } } OnKeysChangedDelegateWrapper[] onKeysChangedListeners; /** * The ::keys-changed signal is emitted when the mapping represented by * @keymap changes. * * Since: 2.2 */ gulong addOnKeysChanged(void delegate(Keymap) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnKeysChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "keys-changed", cast(GCallback)&callBackKeysChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackKeysChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackKeysChanged(GdkKeymap* keymapStruct, OnKeysChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackKeysChangedDestroy(OnKeysChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnStateChangedDelegateWrapper { void delegate(Keymap) dlg; gulong handlerId; this(void delegate(Keymap) dlg) { this.dlg = dlg; onStateChangedListeners ~= this; } void remove(OnStateChangedDelegateWrapper source) { foreach(index, wrapper; onStateChangedListeners) { if (wrapper.handlerId == source.handlerId) { onStateChangedListeners[index] = null; onStateChangedListeners = std.algorithm.remove(onStateChangedListeners, index); break; } } } } OnStateChangedDelegateWrapper[] onStateChangedListeners; /** * The ::state-changed signal is emitted when the state of the * keyboard changes, e.g when Caps Lock is turned on or off. * See gdk_keymap_get_caps_lock_state(). * * Since: 2.16 */ gulong addOnStateChanged(void delegate(Keymap) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnStateChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "state-changed", cast(GCallback)&callBackStateChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackStateChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackStateChanged(GdkKeymap* keymapStruct, OnStateChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackStateChangedDestroy(OnStateChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** * Obtains the upper- and lower-case versions of the keyval @symbol. * Examples of keyvals are #GDK_KEY_a, #GDK_KEY_Enter, #GDK_KEY_F1, etc. * * Params: * symbol = a keyval * lower = return location for lowercase version of @symbol * upper = return location for uppercase version of @symbol */ public static void keyvalConvertCase(uint symbol, out uint lower, out uint upper) { gdk_keyval_convert_case(symbol, &lower, &upper); } /** * Converts a key name to a key value. * * The names are the same as those in the * `gdk/gdkkeysyms.h` header file * but without the leading “GDK_KEY_”. * * Params: * keyvalName = a key name * * Returns: the corresponding key value, or %GDK_KEY_VoidSymbol * if the key name is not a valid key */ public static uint keyvalFromName(string keyvalName) { return gdk_keyval_from_name(Str.toStringz(keyvalName)); } /** * Returns %TRUE if the given key value is in lower case. * * Params: * keyval = a key value. * * Returns: %TRUE if @keyval is in lower case, or if @keyval is not * subject to case conversion. */ public static bool keyvalIsLower(uint keyval) { return gdk_keyval_is_lower(keyval) != 0; } /** * Returns %TRUE if the given key value is in upper case. * * Params: * keyval = a key value. * * Returns: %TRUE if @keyval is in upper case, or if @keyval is not subject to * case conversion. */ public static bool keyvalIsUpper(uint keyval) { return gdk_keyval_is_upper(keyval) != 0; } /** * Converts a key value into a symbolic name. * * The names are the same as those in the * `gdk/gdkkeysyms.h` header file * but without the leading “GDK_KEY_”. * * Params: * keyval = a key value * * Returns: a string containing the name * of the key, or %NULL if @keyval is not a valid key. The string * should not be modified. */ public static string keyvalName(uint keyval) { return Str.toString(gdk_keyval_name(keyval)); } /** * Converts a key value to lower case, if applicable. * * Params: * keyval = a key value. * * Returns: the lower case form of @keyval, or @keyval itself if it is already * in lower case or it is not subject to case conversion. */ public static uint keyvalToLower(uint keyval) { return gdk_keyval_to_lower(keyval); } /** * Convert from a GDK key symbol to the corresponding ISO10646 (Unicode) * character. * * Params: * keyval = a GDK key symbol * * Returns: the corresponding unicode character, or 0 if there * is no corresponding character. */ public static uint keyvalToUnicode(uint keyval) { return gdk_keyval_to_unicode(keyval); } /** * Converts a key value to upper case, if applicable. * * Params: * keyval = a key value. * * Returns: the upper case form of @keyval, or @keyval itself if it is already * in upper case or it is not subject to case conversion. */ public static uint keyvalToUpper(uint keyval) { return gdk_keyval_to_upper(keyval); } /** * Convert from a ISO10646 character to a key symbol. * * Params: * wc = a ISO10646 encoded character * * Returns: the corresponding GDK key symbol, if one exists. * or, if there is no corresponding symbol, * wc | 0x01000000 */ public static uint unicodeToKeyval(uint wc) { return gdk_unicode_to_keyval(wc); } } GtkD-3.7.5/generated/gtkd/gdk/Keysyms.d000066400000000000000000001675531324604450400176470ustar00rootroot00000000000000/* * 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 gdk.Keysyms; /** * GdkKeysyms. */ public enum GdkKeysyms { GDK_0 = 48, GDK_1 = 49, GDK_2 = 50, GDK_3 = 51, GDK_3270_AltCursor = 64784, GDK_3270_Attn = 64782, GDK_3270_BackTab = 64773, GDK_3270_ChangeScreen = 64793, GDK_3270_Copy = 64789, GDK_3270_CursorBlink = 64783, GDK_3270_CursorSelect = 64796, GDK_3270_DeleteWord = 64794, GDK_3270_Duplicate = 64769, GDK_3270_Enter = 64798, GDK_3270_EraseEOF = 64774, GDK_3270_EraseInput = 64775, GDK_3270_ExSelect = 64795, GDK_3270_FieldMark = 64770, GDK_3270_Ident = 64787, GDK_3270_Jump = 64786, GDK_3270_KeyClick = 64785, GDK_3270_Left2 = 64772, GDK_3270_PA1 = 64778, GDK_3270_PA2 = 64779, GDK_3270_PA3 = 64780, GDK_3270_Play = 64790, GDK_3270_PrintScreen = 64797, GDK_3270_Quit = 64777, GDK_3270_Record = 64792, GDK_3270_Reset = 64776, GDK_3270_Right2 = 64771, GDK_3270_Rule = 64788, GDK_3270_Setup = 64791, GDK_3270_Test = 64781, GDK_4 = 52, GDK_5 = 53, GDK_6 = 54, GDK_7 = 55, GDK_8 = 56, GDK_9 = 57, GDK_A = 65, GDK_AE = 198, GDK_Aacute = 193, GDK_Abelowdot = 16785056, GDK_Abreve = 451, GDK_Abreveacute = 16785070, GDK_Abrevebelowdot = 16785078, GDK_Abrevegrave = 16785072, GDK_Abrevehook = 16785074, GDK_Abrevetilde = 16785076, GDK_AccessX_Enable = 65136, GDK_AccessX_Feedback_Enable = 65137, GDK_Acircumflex = 194, GDK_Acircumflexacute = 16785060, GDK_Acircumflexbelowdot = 16785068, GDK_Acircumflexgrave = 16785062, GDK_Acircumflexhook = 16785064, GDK_Acircumflextilde = 16785066, GDK_AddFavorite = 269025081, GDK_Adiaeresis = 196, GDK_Agrave = 192, GDK_Ahook = 16785058, GDK_Alt_L = 65513, GDK_Alt_R = 65514, GDK_Amacron = 960, GDK_Aogonek = 417, GDK_ApplicationLeft = 269025104, GDK_ApplicationRight = 269025105, GDK_Arabic_0 = 16778848, GDK_Arabic_1 = 16778849, GDK_Arabic_2 = 16778850, GDK_Arabic_3 = 16778851, GDK_Arabic_4 = 16778852, GDK_Arabic_5 = 16778853, GDK_Arabic_6 = 16778854, GDK_Arabic_7 = 16778855, GDK_Arabic_8 = 16778856, GDK_Arabic_9 = 16778857, GDK_Arabic_ain = 1497, GDK_Arabic_alef = 1479, GDK_Arabic_alefmaksura = 1513, GDK_Arabic_beh = 1480, GDK_Arabic_comma = 1452, GDK_Arabic_dad = 1494, GDK_Arabic_dal = 1487, GDK_Arabic_damma = 1519, GDK_Arabic_dammatan = 1516, GDK_Arabic_ddal = 16778888, GDK_Arabic_farsi_yeh = 16778956, GDK_Arabic_fatha = 1518, GDK_Arabic_fathatan = 1515, GDK_Arabic_feh = 1505, GDK_Arabic_fullstop = 16778964, GDK_Arabic_gaf = 16778927, GDK_Arabic_ghain = 1498, GDK_Arabic_ha = 1511, GDK_Arabic_hah = 1485, GDK_Arabic_hamza = 1473, GDK_Arabic_hamza_above = 16778836, GDK_Arabic_hamza_below = 16778837, GDK_Arabic_hamzaonalef = 1475, GDK_Arabic_hamzaonwaw = 1476, GDK_Arabic_hamzaonyeh = 1478, GDK_Arabic_hamzaunderalef = 1477, GDK_Arabic_heh = 1511, GDK_Arabic_heh_doachashmee = 16778942, GDK_Arabic_heh_goal = 16778945, GDK_Arabic_jeem = 1484, GDK_Arabic_jeh = 16778904, GDK_Arabic_kaf = 1507, GDK_Arabic_kasra = 1520, GDK_Arabic_kasratan = 1517, GDK_Arabic_keheh = 16778921, GDK_Arabic_khah = 1486, GDK_Arabic_lam = 1508, GDK_Arabic_madda_above = 16778835, GDK_Arabic_maddaonalef = 1474, GDK_Arabic_meem = 1509, GDK_Arabic_noon = 1510, GDK_Arabic_noon_ghunna = 16778938, GDK_Arabic_peh = 16778878, GDK_Arabic_percent = 16778858, GDK_Arabic_qaf = 1506, GDK_Arabic_question_mark = 1471, GDK_Arabic_ra = 1489, GDK_Arabic_rreh = 16778897, GDK_Arabic_sad = 1493, GDK_Arabic_seen = 1491, GDK_Arabic_semicolon = 1467, GDK_Arabic_shadda = 1521, GDK_Arabic_sheen = 1492, GDK_Arabic_sukun = 1522, GDK_Arabic_superscript_alef = 16778864, GDK_Arabic_switch = 65406, GDK_Arabic_tah = 1495, GDK_Arabic_tatweel = 1504, GDK_Arabic_tcheh = 16778886, GDK_Arabic_teh = 1482, GDK_Arabic_tehmarbuta = 1481, GDK_Arabic_thal = 1488, GDK_Arabic_theh = 1483, GDK_Arabic_tteh = 16778873, GDK_Arabic_veh = 16778916, GDK_Arabic_waw = 1512, GDK_Arabic_yeh = 1514, GDK_Arabic_yeh_baree = 16778962, GDK_Arabic_zah = 1496, GDK_Arabic_zain = 1490, GDK_Aring = 197, GDK_Armenian_AT = 16778552, GDK_Armenian_AYB = 16778545, GDK_Armenian_BEN = 16778546, GDK_Armenian_CHA = 16778569, GDK_Armenian_DA = 16778548, GDK_Armenian_DZA = 16778561, GDK_Armenian_E = 16778551, GDK_Armenian_FE = 16778582, GDK_Armenian_GHAT = 16778562, GDK_Armenian_GIM = 16778547, GDK_Armenian_HI = 16778565, GDK_Armenian_HO = 16778560, GDK_Armenian_INI = 16778555, GDK_Armenian_JE = 16778571, GDK_Armenian_KE = 16778580, GDK_Armenian_KEN = 16778559, GDK_Armenian_KHE = 16778557, GDK_Armenian_LYUN = 16778556, GDK_Armenian_MEN = 16778564, GDK_Armenian_NU = 16778566, GDK_Armenian_O = 16778581, GDK_Armenian_PE = 16778570, GDK_Armenian_PYUR = 16778579, GDK_Armenian_RA = 16778572, GDK_Armenian_RE = 16778576, GDK_Armenian_SE = 16778573, GDK_Armenian_SHA = 16778567, GDK_Armenian_TCHE = 16778563, GDK_Armenian_TO = 16778553, GDK_Armenian_TSA = 16778558, GDK_Armenian_TSO = 16778577, GDK_Armenian_TYUN = 16778575, GDK_Armenian_VEV = 16778574, GDK_Armenian_VO = 16778568, GDK_Armenian_VYUN = 16778578, GDK_Armenian_YECH = 16778549, GDK_Armenian_ZA = 16778550, GDK_Armenian_ZHE = 16778554, GDK_Armenian_accent = 16778587, GDK_Armenian_amanak = 16778588, GDK_Armenian_apostrophe = 16778586, GDK_Armenian_at = 16778600, GDK_Armenian_ayb = 16778593, GDK_Armenian_ben = 16778594, GDK_Armenian_but = 16778589, GDK_Armenian_cha = 16778617, GDK_Armenian_da = 16778596, GDK_Armenian_dza = 16778609, GDK_Armenian_e = 16778599, GDK_Armenian_exclam = 16778588, GDK_Armenian_fe = 16778630, GDK_Armenian_full_stop = 16778633, GDK_Armenian_ghat = 16778610, GDK_Armenian_gim = 16778595, GDK_Armenian_hi = 16778613, GDK_Armenian_ho = 16778608, GDK_Armenian_hyphen = 16778634, GDK_Armenian_ini = 16778603, GDK_Armenian_je = 16778619, GDK_Armenian_ke = 16778628, GDK_Armenian_ken = 16778607, GDK_Armenian_khe = 16778605, GDK_Armenian_ligature_ew = 16778631, GDK_Armenian_lyun = 16778604, GDK_Armenian_men = 16778612, GDK_Armenian_nu = 16778614, GDK_Armenian_o = 16778629, GDK_Armenian_paruyk = 16778590, GDK_Armenian_pe = 16778618, GDK_Armenian_pyur = 16778627, GDK_Armenian_question = 16778590, GDK_Armenian_ra = 16778620, GDK_Armenian_re = 16778624, GDK_Armenian_se = 16778621, GDK_Armenian_separation_mark = 16778589, GDK_Armenian_sha = 16778615, GDK_Armenian_shesht = 16778587, GDK_Armenian_tche = 16778611, GDK_Armenian_to = 16778601, GDK_Armenian_tsa = 16778606, GDK_Armenian_tso = 16778625, GDK_Armenian_tyun = 16778623, GDK_Armenian_verjaket = 16778633, GDK_Armenian_vev = 16778622, GDK_Armenian_vo = 16778616, GDK_Armenian_vyun = 16778626, GDK_Armenian_yech = 16778597, GDK_Armenian_yentamna = 16778634, GDK_Armenian_za = 16778598, GDK_Armenian_zhe = 16778602, GDK_Atilde = 195, GDK_AudibleBell_Enable = 65146, GDK_AudioCycleTrack = 269025179, GDK_AudioForward = 269025175, GDK_AudioLowerVolume = 269025041, GDK_AudioMedia = 269025074, GDK_AudioMicMute = 269025202, GDK_AudioMute = 269025042, GDK_AudioNext = 269025047, GDK_AudioPause = 269025073, GDK_AudioPlay = 269025044, GDK_AudioPrev = 269025046, GDK_AudioRaiseVolume = 269025043, GDK_AudioRandomPlay = 269025177, GDK_AudioRecord = 269025052, GDK_AudioRepeat = 269025176, GDK_AudioRewind = 269025086, GDK_AudioStop = 269025045, GDK_Away = 269025165, GDK_B = 66, GDK_Babovedot = 16784898, GDK_Back = 269025062, GDK_BackForward = 269025087, GDK_BackSpace = 65288, GDK_Battery = 269025171, GDK_Begin = 65368, GDK_Blue = 269025190, GDK_Bluetooth = 269025172, GDK_Book = 269025106, GDK_BounceKeys_Enable = 65140, GDK_Break = 65387, GDK_BrightnessAdjust = 269025083, GDK_Byelorussian_SHORTU = 1726, GDK_Byelorussian_shortu = 1710, GDK_C = 67, GDK_CD = 269025107, GDK_CH = 65186, GDK_C_H = 65189, GDK_C_h = 65188, GDK_Cabovedot = 709, GDK_Cacute = 454, GDK_Calculator = 269025053, GDK_Calendar = 269025056, GDK_Cancel = 65385, GDK_Caps_Lock = 65509, GDK_Ccaron = 456, GDK_Ccedilla = 199, GDK_Ccircumflex = 710, GDK_Ch = 65185, GDK_Clear = 65291, GDK_ClearGrab = 269024801, GDK_Close = 269025110, GDK_Codeinput = 65335, GDK_ColonSign = 16785569, GDK_Community = 269025085, GDK_ContrastAdjust = 269025058, GDK_Control_L = 65507, GDK_Control_R = 65508, GDK_Copy = 269025111, GDK_CruzeiroSign = 16785570, GDK_Cut = 269025112, GDK_CycleAngle = 269025180, GDK_Cyrillic_A = 1761, GDK_Cyrillic_BE = 1762, GDK_Cyrillic_CHE = 1790, GDK_Cyrillic_CHE_descender = 16778422, GDK_Cyrillic_CHE_vertstroke = 16778424, GDK_Cyrillic_DE = 1764, GDK_Cyrillic_DZHE = 1727, GDK_Cyrillic_E = 1788, GDK_Cyrillic_EF = 1766, GDK_Cyrillic_EL = 1772, GDK_Cyrillic_EM = 1773, GDK_Cyrillic_EN = 1774, GDK_Cyrillic_EN_descender = 16778402, GDK_Cyrillic_ER = 1778, GDK_Cyrillic_ES = 1779, GDK_Cyrillic_GHE = 1767, GDK_Cyrillic_GHE_bar = 16778386, GDK_Cyrillic_HA = 1768, GDK_Cyrillic_HARDSIGN = 1791, GDK_Cyrillic_HA_descender = 16778418, GDK_Cyrillic_I = 1769, GDK_Cyrillic_IE = 1765, GDK_Cyrillic_IO = 1715, GDK_Cyrillic_I_macron = 16778466, GDK_Cyrillic_JE = 1720, GDK_Cyrillic_KA = 1771, GDK_Cyrillic_KA_descender = 16778394, GDK_Cyrillic_KA_vertstroke = 16778396, GDK_Cyrillic_LJE = 1721, GDK_Cyrillic_NJE = 1722, GDK_Cyrillic_O = 1775, GDK_Cyrillic_O_bar = 16778472, GDK_Cyrillic_PE = 1776, GDK_Cyrillic_SCHWA = 16778456, GDK_Cyrillic_SHA = 1787, GDK_Cyrillic_SHCHA = 1789, GDK_Cyrillic_SHHA = 16778426, GDK_Cyrillic_SHORTI = 1770, GDK_Cyrillic_SOFTSIGN = 1784, GDK_Cyrillic_TE = 1780, GDK_Cyrillic_TSE = 1763, GDK_Cyrillic_U = 1781, GDK_Cyrillic_U_macron = 16778478, GDK_Cyrillic_U_straight = 16778414, GDK_Cyrillic_U_straight_bar = 16778416, GDK_Cyrillic_VE = 1783, GDK_Cyrillic_YA = 1777, GDK_Cyrillic_YERU = 1785, GDK_Cyrillic_YU = 1760, GDK_Cyrillic_ZE = 1786, GDK_Cyrillic_ZHE = 1782, GDK_Cyrillic_ZHE_descender = 16778390, GDK_Cyrillic_a = 1729, GDK_Cyrillic_be = 1730, GDK_Cyrillic_che = 1758, GDK_Cyrillic_che_descender = 16778423, GDK_Cyrillic_che_vertstroke = 16778425, GDK_Cyrillic_de = 1732, GDK_Cyrillic_dzhe = 1711, GDK_Cyrillic_e = 1756, GDK_Cyrillic_ef = 1734, GDK_Cyrillic_el = 1740, GDK_Cyrillic_em = 1741, GDK_Cyrillic_en = 1742, GDK_Cyrillic_en_descender = 16778403, GDK_Cyrillic_er = 1746, GDK_Cyrillic_es = 1747, GDK_Cyrillic_ghe = 1735, GDK_Cyrillic_ghe_bar = 16778387, GDK_Cyrillic_ha = 1736, GDK_Cyrillic_ha_descender = 16778419, GDK_Cyrillic_hardsign = 1759, GDK_Cyrillic_i = 1737, GDK_Cyrillic_i_macron = 16778467, GDK_Cyrillic_ie = 1733, GDK_Cyrillic_io = 1699, GDK_Cyrillic_je = 1704, GDK_Cyrillic_ka = 1739, GDK_Cyrillic_ka_descender = 16778395, GDK_Cyrillic_ka_vertstroke = 16778397, GDK_Cyrillic_lje = 1705, GDK_Cyrillic_nje = 1706, GDK_Cyrillic_o = 1743, GDK_Cyrillic_o_bar = 16778473, GDK_Cyrillic_pe = 1744, GDK_Cyrillic_schwa = 16778457, GDK_Cyrillic_sha = 1755, GDK_Cyrillic_shcha = 1757, GDK_Cyrillic_shha = 16778427, GDK_Cyrillic_shorti = 1738, GDK_Cyrillic_softsign = 1752, GDK_Cyrillic_te = 1748, GDK_Cyrillic_tse = 1731, GDK_Cyrillic_u = 1749, GDK_Cyrillic_u_macron = 16778479, GDK_Cyrillic_u_straight = 16778415, GDK_Cyrillic_u_straight_bar = 16778417, GDK_Cyrillic_ve = 1751, GDK_Cyrillic_ya = 1745, GDK_Cyrillic_yeru = 1753, GDK_Cyrillic_yu = 1728, GDK_Cyrillic_ze = 1754, GDK_Cyrillic_zhe = 1750, GDK_Cyrillic_zhe_descender = 16778391, GDK_D = 68, GDK_DOS = 269025114, GDK_Dabovedot = 16784906, GDK_Dcaron = 463, GDK_Delete = 65535, GDK_Display = 269025113, GDK_Documents = 269025115, GDK_DongSign = 16785579, GDK_Down = 65364, GDK_Dstroke = 464, GDK_E = 69, GDK_ENG = 957, GDK_ETH = 208, GDK_EZH = 16777655, GDK_Eabovedot = 972, GDK_Eacute = 201, GDK_Ebelowdot = 16785080, GDK_Ecaron = 460, GDK_Ecircumflex = 202, GDK_Ecircumflexacute = 16785086, GDK_Ecircumflexbelowdot = 16785094, GDK_Ecircumflexgrave = 16785088, GDK_Ecircumflexhook = 16785090, GDK_Ecircumflextilde = 16785092, GDK_EcuSign = 16785568, GDK_Ediaeresis = 203, GDK_Egrave = 200, GDK_Ehook = 16785082, GDK_Eisu_Shift = 65327, GDK_Eisu_toggle = 65328, GDK_Eject = 269025068, GDK_Emacron = 938, GDK_End = 65367, GDK_Eogonek = 458, GDK_Escape = 65307, GDK_Eth = 208, GDK_Etilde = 16785084, GDK_EuroSign = 8364, GDK_Excel = 269025116, GDK_Execute = 65378, GDK_Explorer = 269025117, GDK_F = 70, GDK_F1 = 65470, GDK_F10 = 65479, GDK_F11 = 65480, GDK_F12 = 65481, GDK_F13 = 65482, GDK_F14 = 65483, GDK_F15 = 65484, GDK_F16 = 65485, GDK_F17 = 65486, GDK_F18 = 65487, GDK_F19 = 65488, GDK_F2 = 65471, GDK_F20 = 65489, GDK_F21 = 65490, GDK_F22 = 65491, GDK_F23 = 65492, GDK_F24 = 65493, GDK_F25 = 65494, GDK_F26 = 65495, GDK_F27 = 65496, GDK_F28 = 65497, GDK_F29 = 65498, GDK_F3 = 65472, GDK_F30 = 65499, GDK_F31 = 65500, GDK_F32 = 65501, GDK_F33 = 65502, GDK_F34 = 65503, GDK_F35 = 65504, GDK_F4 = 65473, GDK_F5 = 65474, GDK_F6 = 65475, GDK_F7 = 65476, GDK_F8 = 65477, GDK_F9 = 65478, GDK_FFrancSign = 16785571, GDK_Fabovedot = 16784926, GDK_Farsi_0 = 16778992, GDK_Farsi_1 = 16778993, GDK_Farsi_2 = 16778994, GDK_Farsi_3 = 16778995, GDK_Farsi_4 = 16778996, GDK_Farsi_5 = 16778997, GDK_Farsi_6 = 16778998, GDK_Farsi_7 = 16778999, GDK_Farsi_8 = 16779000, GDK_Farsi_9 = 16779001, GDK_Farsi_yeh = 16778956, GDK_Favorites = 269025072, GDK_Finance = 269025084, GDK_Find = 65384, GDK_First_Virtual_Screen = 65232, GDK_Forward = 269025063, GDK_FrameBack = 269025181, GDK_FrameForward = 269025182, GDK_G = 71, GDK_Gabovedot = 725, GDK_Game = 269025118, GDK_Gbreve = 683, GDK_Gcaron = 16777702, GDK_Gcedilla = 939, GDK_Gcircumflex = 728, GDK_Georgian_an = 16781520, GDK_Georgian_ban = 16781521, GDK_Georgian_can = 16781546, GDK_Georgian_char = 16781549, GDK_Georgian_chin = 16781545, GDK_Georgian_cil = 16781548, GDK_Georgian_don = 16781523, GDK_Georgian_en = 16781524, GDK_Georgian_fi = 16781558, GDK_Georgian_gan = 16781522, GDK_Georgian_ghan = 16781542, GDK_Georgian_hae = 16781552, GDK_Georgian_har = 16781556, GDK_Georgian_he = 16781553, GDK_Georgian_hie = 16781554, GDK_Georgian_hoe = 16781557, GDK_Georgian_in = 16781528, GDK_Georgian_jhan = 16781551, GDK_Georgian_jil = 16781547, GDK_Georgian_kan = 16781529, GDK_Georgian_khar = 16781541, GDK_Georgian_las = 16781530, GDK_Georgian_man = 16781531, GDK_Georgian_nar = 16781532, GDK_Georgian_on = 16781533, GDK_Georgian_par = 16781534, GDK_Georgian_phar = 16781540, GDK_Georgian_qar = 16781543, GDK_Georgian_rae = 16781536, GDK_Georgian_san = 16781537, GDK_Georgian_shin = 16781544, GDK_Georgian_tan = 16781527, GDK_Georgian_tar = 16781538, GDK_Georgian_un = 16781539, GDK_Georgian_vin = 16781525, GDK_Georgian_we = 16781555, GDK_Georgian_xan = 16781550, GDK_Georgian_zen = 16781526, GDK_Georgian_zhar = 16781535, GDK_Go = 269025119, GDK_Greek_ALPHA = 1985, GDK_Greek_ALPHAaccent = 1953, GDK_Greek_BETA = 1986, GDK_Greek_CHI = 2007, GDK_Greek_DELTA = 1988, GDK_Greek_EPSILON = 1989, GDK_Greek_EPSILONaccent = 1954, GDK_Greek_ETA = 1991, GDK_Greek_ETAaccent = 1955, GDK_Greek_GAMMA = 1987, GDK_Greek_IOTA = 1993, GDK_Greek_IOTAaccent = 1956, GDK_Greek_IOTAdiaeresis = 1957, GDK_Greek_IOTAdieresis = 1957, GDK_Greek_KAPPA = 1994, GDK_Greek_LAMBDA = 1995, GDK_Greek_LAMDA = 1995, GDK_Greek_MU = 1996, GDK_Greek_NU = 1997, GDK_Greek_OMEGA = 2009, GDK_Greek_OMEGAaccent = 1963, GDK_Greek_OMICRON = 1999, GDK_Greek_OMICRONaccent = 1959, GDK_Greek_PHI = 2006, GDK_Greek_PI = 2000, GDK_Greek_PSI = 2008, GDK_Greek_RHO = 2001, GDK_Greek_SIGMA = 2002, GDK_Greek_TAU = 2004, GDK_Greek_THETA = 1992, GDK_Greek_UPSILON = 2005, GDK_Greek_UPSILONaccent = 1960, GDK_Greek_UPSILONdieresis = 1961, GDK_Greek_XI = 1998, GDK_Greek_ZETA = 1990, GDK_Greek_accentdieresis = 1966, GDK_Greek_alpha = 2017, GDK_Greek_alphaaccent = 1969, GDK_Greek_beta = 2018, GDK_Greek_chi = 2039, GDK_Greek_delta = 2020, GDK_Greek_epsilon = 2021, GDK_Greek_epsilonaccent = 1970, GDK_Greek_eta = 2023, GDK_Greek_etaaccent = 1971, GDK_Greek_finalsmallsigma = 2035, GDK_Greek_gamma = 2019, GDK_Greek_horizbar = 1967, GDK_Greek_iota = 2025, GDK_Greek_iotaaccent = 1972, GDK_Greek_iotaaccentdieresis = 1974, GDK_Greek_iotadieresis = 1973, GDK_Greek_kappa = 2026, GDK_Greek_lambda = 2027, GDK_Greek_lamda = 2027, GDK_Greek_mu = 2028, GDK_Greek_nu = 2029, GDK_Greek_omega = 2041, GDK_Greek_omegaaccent = 1979, GDK_Greek_omicron = 2031, GDK_Greek_omicronaccent = 1975, GDK_Greek_phi = 2038, GDK_Greek_pi = 2032, GDK_Greek_psi = 2040, GDK_Greek_rho = 2033, GDK_Greek_sigma = 2034, GDK_Greek_switch = 65406, GDK_Greek_tau = 2036, GDK_Greek_theta = 2024, GDK_Greek_upsilon = 2037, GDK_Greek_upsilonaccent = 1976, GDK_Greek_upsilonaccentdieresis = 1978, GDK_Greek_upsilondieresis = 1977, GDK_Greek_xi = 2030, GDK_Greek_zeta = 2022, GDK_Green = 269025188, GDK_H = 72, GDK_Hangul = 65329, GDK_Hangul_A = 3775, GDK_Hangul_AE = 3776, GDK_Hangul_AraeA = 3830, GDK_Hangul_AraeAE = 3831, GDK_Hangul_Banja = 65337, GDK_Hangul_Cieuc = 3770, GDK_Hangul_Codeinput = 65335, GDK_Hangul_Dikeud = 3751, GDK_Hangul_E = 3780, GDK_Hangul_EO = 3779, GDK_Hangul_EU = 3793, GDK_Hangul_End = 65331, GDK_Hangul_Hanja = 65332, GDK_Hangul_Hieuh = 3774, GDK_Hangul_I = 3795, GDK_Hangul_Ieung = 3767, GDK_Hangul_J_Cieuc = 3818, GDK_Hangul_J_Dikeud = 3802, GDK_Hangul_J_Hieuh = 3822, GDK_Hangul_J_Ieung = 3816, GDK_Hangul_J_Jieuj = 3817, GDK_Hangul_J_Khieuq = 3819, GDK_Hangul_J_Kiyeog = 3796, GDK_Hangul_J_KiyeogSios = 3798, GDK_Hangul_J_KkogjiDalrinIeung = 3833, GDK_Hangul_J_Mieum = 3811, GDK_Hangul_J_Nieun = 3799, GDK_Hangul_J_NieunHieuh = 3801, GDK_Hangul_J_NieunJieuj = 3800, GDK_Hangul_J_PanSios = 3832, GDK_Hangul_J_Phieuf = 3821, GDK_Hangul_J_Pieub = 3812, GDK_Hangul_J_PieubSios = 3813, GDK_Hangul_J_Rieul = 3803, GDK_Hangul_J_RieulHieuh = 3810, GDK_Hangul_J_RieulKiyeog = 3804, GDK_Hangul_J_RieulMieum = 3805, GDK_Hangul_J_RieulPhieuf = 3809, GDK_Hangul_J_RieulPieub = 3806, GDK_Hangul_J_RieulSios = 3807, GDK_Hangul_J_RieulTieut = 3808, GDK_Hangul_J_Sios = 3814, GDK_Hangul_J_SsangKiyeog = 3797, GDK_Hangul_J_SsangSios = 3815, GDK_Hangul_J_Tieut = 3820, GDK_Hangul_J_YeorinHieuh = 3834, GDK_Hangul_Jamo = 65333, GDK_Hangul_Jeonja = 65336, GDK_Hangul_Jieuj = 3768, GDK_Hangul_Khieuq = 3771, GDK_Hangul_Kiyeog = 3745, GDK_Hangul_KiyeogSios = 3747, GDK_Hangul_KkogjiDalrinIeung = 3827, GDK_Hangul_Mieum = 3761, GDK_Hangul_MultipleCandidate = 65341, GDK_Hangul_Nieun = 3748, GDK_Hangul_NieunHieuh = 3750, GDK_Hangul_NieunJieuj = 3749, GDK_Hangul_O = 3783, GDK_Hangul_OE = 3786, GDK_Hangul_PanSios = 3826, GDK_Hangul_Phieuf = 3773, GDK_Hangul_Pieub = 3762, GDK_Hangul_PieubSios = 3764, GDK_Hangul_PostHanja = 65339, GDK_Hangul_PreHanja = 65338, GDK_Hangul_PreviousCandidate = 65342, GDK_Hangul_Rieul = 3753, GDK_Hangul_RieulHieuh = 3760, GDK_Hangul_RieulKiyeog = 3754, GDK_Hangul_RieulMieum = 3755, GDK_Hangul_RieulPhieuf = 3759, GDK_Hangul_RieulPieub = 3756, GDK_Hangul_RieulSios = 3757, GDK_Hangul_RieulTieut = 3758, GDK_Hangul_RieulYeorinHieuh = 3823, GDK_Hangul_Romaja = 65334, GDK_Hangul_SingleCandidate = 65340, GDK_Hangul_Sios = 3765, GDK_Hangul_Special = 65343, GDK_Hangul_SsangDikeud = 3752, GDK_Hangul_SsangJieuj = 3769, GDK_Hangul_SsangKiyeog = 3746, GDK_Hangul_SsangPieub = 3763, GDK_Hangul_SsangSios = 3766, GDK_Hangul_Start = 65330, GDK_Hangul_SunkyeongeumMieum = 3824, GDK_Hangul_SunkyeongeumPhieuf = 3828, GDK_Hangul_SunkyeongeumPieub = 3825, GDK_Hangul_Tieut = 3772, GDK_Hangul_U = 3788, GDK_Hangul_WA = 3784, GDK_Hangul_WAE = 3785, GDK_Hangul_WE = 3790, GDK_Hangul_WEO = 3789, GDK_Hangul_WI = 3791, GDK_Hangul_YA = 3777, GDK_Hangul_YAE = 3778, GDK_Hangul_YE = 3782, GDK_Hangul_YEO = 3781, GDK_Hangul_YI = 3794, GDK_Hangul_YO = 3787, GDK_Hangul_YU = 3792, GDK_Hangul_YeorinHieuh = 3829, GDK_Hangul_switch = 65406, GDK_Hankaku = 65321, GDK_Hcircumflex = 678, GDK_Hebrew_switch = 65406, GDK_Help = 65386, GDK_Henkan = 65315, GDK_Henkan_Mode = 65315, GDK_Hibernate = 269025192, GDK_Hiragana = 65317, GDK_Hiragana_Katakana = 65319, GDK_History = 269025079, GDK_Home = 65360, GDK_HomePage = 269025048, GDK_HotLinks = 269025082, GDK_Hstroke = 673, GDK_Hyper_L = 65517, GDK_Hyper_R = 65518, GDK_I = 73, GDK_ISO_Center_Object = 65075, GDK_ISO_Continuous_Underline = 65072, GDK_ISO_Discontinuous_Underline = 65073, GDK_ISO_Emphasize = 65074, GDK_ISO_Enter = 65076, GDK_ISO_Fast_Cursor_Down = 65071, GDK_ISO_Fast_Cursor_Left = 65068, GDK_ISO_Fast_Cursor_Right = 65069, GDK_ISO_Fast_Cursor_Up = 65070, GDK_ISO_First_Group = 65036, GDK_ISO_First_Group_Lock = 65037, GDK_ISO_Group_Latch = 65030, GDK_ISO_Group_Lock = 65031, GDK_ISO_Group_Shift = 65406, GDK_ISO_Last_Group = 65038, GDK_ISO_Last_Group_Lock = 65039, GDK_ISO_Left_Tab = 65056, GDK_ISO_Level2_Latch = 65026, GDK_ISO_Level3_Latch = 65028, GDK_ISO_Level3_Lock = 65029, GDK_ISO_Level3_Shift = 65027, GDK_ISO_Level5_Latch = 65042, GDK_ISO_Level5_Lock = 65043, GDK_ISO_Level5_Shift = 65041, GDK_ISO_Lock = 65025, GDK_ISO_Move_Line_Down = 65058, GDK_ISO_Move_Line_Up = 65057, GDK_ISO_Next_Group = 65032, GDK_ISO_Next_Group_Lock = 65033, GDK_ISO_Partial_Line_Down = 65060, GDK_ISO_Partial_Line_Up = 65059, GDK_ISO_Partial_Space_Left = 65061, GDK_ISO_Partial_Space_Right = 65062, GDK_ISO_Prev_Group = 65034, GDK_ISO_Prev_Group_Lock = 65035, GDK_ISO_Release_Both_Margins = 65067, GDK_ISO_Release_Margin_Left = 65065, GDK_ISO_Release_Margin_Right = 65066, GDK_ISO_Set_Margin_Left = 65063, GDK_ISO_Set_Margin_Right = 65064, GDK_Iabovedot = 681, GDK_Iacute = 205, GDK_Ibelowdot = 16785098, GDK_Ibreve = 16777516, GDK_Icircumflex = 206, GDK_Idiaeresis = 207, GDK_Igrave = 204, GDK_Ihook = 16785096, GDK_Imacron = 975, GDK_Insert = 65379, GDK_Iogonek = 967, GDK_Itilde = 933, GDK_J = 74, GDK_Jcircumflex = 684, GDK_K = 75, GDK_KP_0 = 65456, GDK_KP_1 = 65457, GDK_KP_2 = 65458, GDK_KP_3 = 65459, GDK_KP_4 = 65460, GDK_KP_5 = 65461, GDK_KP_6 = 65462, GDK_KP_7 = 65463, GDK_KP_8 = 65464, GDK_KP_9 = 65465, GDK_KP_Add = 65451, GDK_KP_Begin = 65437, GDK_KP_Decimal = 65454, GDK_KP_Delete = 65439, GDK_KP_Divide = 65455, GDK_KP_Down = 65433, GDK_KP_End = 65436, GDK_KP_Enter = 65421, GDK_KP_Equal = 65469, GDK_KP_F1 = 65425, GDK_KP_F2 = 65426, GDK_KP_F3 = 65427, GDK_KP_F4 = 65428, GDK_KP_Home = 65429, GDK_KP_Insert = 65438, GDK_KP_Left = 65430, GDK_KP_Multiply = 65450, GDK_KP_Next = 65435, GDK_KP_Page_Down = 65435, GDK_KP_Page_Up = 65434, GDK_KP_Prior = 65434, GDK_KP_Right = 65432, GDK_KP_Separator = 65452, GDK_KP_Space = 65408, GDK_KP_Subtract = 65453, GDK_KP_Tab = 65417, GDK_KP_Up = 65431, GDK_Kana_Lock = 65325, GDK_Kana_Shift = 65326, GDK_Kanji = 65313, GDK_Kanji_Bangou = 65335, GDK_Katakana = 65318, GDK_KbdBrightnessDown = 269025030, GDK_KbdBrightnessUp = 269025029, GDK_KbdLightOnOff = 269025028, GDK_Kcedilla = 979, GDK_Korean_Won = 3839, GDK_L = 76, GDK_L1 = 65480, GDK_L10 = 65489, GDK_L2 = 65481, GDK_L3 = 65482, GDK_L4 = 65483, GDK_L5 = 65484, GDK_L6 = 65485, GDK_L7 = 65486, GDK_L8 = 65487, GDK_L9 = 65488, GDK_Lacute = 453, GDK_Last_Virtual_Screen = 65236, GDK_Launch0 = 269025088, GDK_Launch1 = 269025089, GDK_Launch2 = 269025090, GDK_Launch3 = 269025091, GDK_Launch4 = 269025092, GDK_Launch5 = 269025093, GDK_Launch6 = 269025094, GDK_Launch7 = 269025095, GDK_Launch8 = 269025096, GDK_Launch9 = 269025097, GDK_LaunchA = 269025098, GDK_LaunchB = 269025099, GDK_LaunchC = 269025100, GDK_LaunchD = 269025101, GDK_LaunchE = 269025102, GDK_LaunchF = 269025103, GDK_Lbelowdot = 16784950, GDK_Lcaron = 421, GDK_Lcedilla = 934, GDK_Left = 65361, GDK_LightBulb = 269025077, GDK_Linefeed = 65290, GDK_LiraSign = 16785572, GDK_LogGrabInfo = 269024805, GDK_LogOff = 269025121, GDK_LogWindowTree = 269024804, GDK_Lstroke = 419, GDK_M = 77, GDK_Mabovedot = 16784960, GDK_Macedonia_DSE = 1717, GDK_Macedonia_GJE = 1714, GDK_Macedonia_KJE = 1724, GDK_Macedonia_dse = 1701, GDK_Macedonia_gje = 1698, GDK_Macedonia_kje = 1708, GDK_Mae_Koho = 65342, GDK_Mail = 269025049, GDK_MailForward = 269025168, GDK_Market = 269025122, GDK_Massyo = 65324, GDK_Meeting = 269025123, GDK_Memo = 269025054, GDK_Menu = 65383, GDK_MenuKB = 269025125, GDK_MenuPB = 269025126, GDK_Messenger = 269025166, GDK_Meta_L = 65511, GDK_Meta_R = 65512, GDK_MillSign = 16785573, GDK_ModeLock = 269025025, GDK_Mode_switch = 65406, GDK_MonBrightnessDown = 269025027, GDK_MonBrightnessUp = 269025026, GDK_MouseKeys_Accel_Enable = 65143, GDK_MouseKeys_Enable = 65142, GDK_Muhenkan = 65314, GDK_Multi_key = 65312, GDK_MultipleCandidate = 65341, GDK_Music = 269025170, GDK_MyComputer = 269025075, GDK_MySites = 269025127, GDK_N = 78, GDK_Nacute = 465, GDK_NairaSign = 16785574, GDK_Ncaron = 466, GDK_Ncedilla = 977, GDK_New = 269025128, GDK_NewSheqelSign = 16785578, GDK_News = 269025129, GDK_Next = 65366, GDK_Next_VMode = 269024802, GDK_Next_Virtual_Screen = 65234, GDK_Ntilde = 209, GDK_Num_Lock = 65407, GDK_O = 79, GDK_OE = 5052, GDK_Oacute = 211, GDK_Obarred = 16777631, GDK_Obelowdot = 16785100, GDK_Ocaron = 16777681, GDK_Ocircumflex = 212, GDK_Ocircumflexacute = 16785104, GDK_Ocircumflexbelowdot = 16785112, GDK_Ocircumflexgrave = 16785106, GDK_Ocircumflexhook = 16785108, GDK_Ocircumflextilde = 16785110, GDK_Odiaeresis = 214, GDK_Odoubleacute = 469, GDK_OfficeHome = 269025130, GDK_Ograve = 210, GDK_Ohook = 16785102, GDK_Ohorn = 16777632, GDK_Ohornacute = 16785114, GDK_Ohornbelowdot = 16785122, GDK_Ohorngrave = 16785116, GDK_Ohornhook = 16785118, GDK_Ohorntilde = 16785120, GDK_Omacron = 978, GDK_Ooblique = 216, GDK_Open = 269025131, GDK_OpenURL = 269025080, GDK_Option = 269025132, GDK_Oslash = 216, GDK_Otilde = 213, GDK_Overlay1_Enable = 65144, GDK_Overlay2_Enable = 65145, GDK_P = 80, GDK_Pabovedot = 16784982, GDK_Page_Down = 65366, GDK_Page_Up = 65365, GDK_Paste = 269025133, GDK_Pause = 65299, GDK_PesetaSign = 16785575, GDK_Phone = 269025134, GDK_Pictures = 269025169, GDK_Pointer_Accelerate = 65274, GDK_Pointer_Button1 = 65257, GDK_Pointer_Button2 = 65258, GDK_Pointer_Button3 = 65259, GDK_Pointer_Button4 = 65260, GDK_Pointer_Button5 = 65261, GDK_Pointer_Button_Dflt = 65256, GDK_Pointer_DblClick1 = 65263, GDK_Pointer_DblClick2 = 65264, GDK_Pointer_DblClick3 = 65265, GDK_Pointer_DblClick4 = 65266, GDK_Pointer_DblClick5 = 65267, GDK_Pointer_DblClick_Dflt = 65262, GDK_Pointer_DfltBtnNext = 65275, GDK_Pointer_DfltBtnPrev = 65276, GDK_Pointer_Down = 65251, GDK_Pointer_DownLeft = 65254, GDK_Pointer_DownRight = 65255, GDK_Pointer_Drag1 = 65269, GDK_Pointer_Drag2 = 65270, GDK_Pointer_Drag3 = 65271, GDK_Pointer_Drag4 = 65272, GDK_Pointer_Drag5 = 65277, GDK_Pointer_Drag_Dflt = 65268, GDK_Pointer_EnableKeys = 65273, GDK_Pointer_Left = 65248, GDK_Pointer_Right = 65249, GDK_Pointer_Up = 65250, GDK_Pointer_UpLeft = 65252, GDK_Pointer_UpRight = 65253, GDK_PowerDown = 269025057, GDK_PowerOff = 269025066, GDK_Prev_VMode = 269024803, GDK_Prev_Virtual_Screen = 65233, GDK_PreviousCandidate = 65342, GDK_Print = 65377, GDK_Prior = 65365, GDK_Q = 81, GDK_R = 82, GDK_R1 = 65490, GDK_R10 = 65499, GDK_R11 = 65500, GDK_R12 = 65501, GDK_R13 = 65502, GDK_R14 = 65503, GDK_R15 = 65504, GDK_R2 = 65491, GDK_R3 = 65492, GDK_R4 = 65493, GDK_R5 = 65494, GDK_R6 = 65495, GDK_R7 = 65496, GDK_R8 = 65497, GDK_R9 = 65498, GDK_Racute = 448, GDK_Rcaron = 472, GDK_Rcedilla = 931, GDK_Red = 269025187, GDK_Redo = 65382, GDK_Refresh = 269025065, GDK_Reload = 269025139, GDK_RepeatKeys_Enable = 65138, GDK_Reply = 269025138, GDK_Return = 65293, GDK_Right = 65363, GDK_RockerDown = 269025060, GDK_RockerEnter = 269025061, GDK_RockerUp = 269025059, GDK_Romaji = 65316, GDK_RotateWindows = 269025140, GDK_RotationKB = 269025142, GDK_RotationPB = 269025141, GDK_RupeeSign = 16785576, GDK_S = 83, GDK_SCHWA = 16777615, GDK_Sabovedot = 16784992, GDK_Sacute = 422, GDK_Save = 269025143, GDK_Scaron = 425, GDK_Scedilla = 426, GDK_Scircumflex = 734, GDK_ScreenSaver = 269025069, GDK_ScrollClick = 269025146, GDK_ScrollDown = 269025145, GDK_ScrollUp = 269025144, GDK_Scroll_Lock = 65300, GDK_Search = 269025051, GDK_Select = 65376, GDK_SelectButton = 269025184, GDK_Send = 269025147, GDK_Serbian_DJE = 1713, GDK_Serbian_DZE = 1727, GDK_Serbian_JE = 1720, GDK_Serbian_LJE = 1721, GDK_Serbian_NJE = 1722, GDK_Serbian_TSHE = 1723, GDK_Serbian_dje = 1697, GDK_Serbian_dze = 1711, GDK_Serbian_je = 1704, GDK_Serbian_lje = 1705, GDK_Serbian_nje = 1706, GDK_Serbian_tshe = 1707, GDK_Shift_L = 65505, GDK_Shift_Lock = 65510, GDK_Shift_R = 65506, GDK_Shop = 269025078, GDK_SingleCandidate = 65340, GDK_Sinh_a = 16780677, GDK_Sinh_aa = 16780678, GDK_Sinh_aa2 = 16780751, GDK_Sinh_ae = 16780679, GDK_Sinh_ae2 = 16780752, GDK_Sinh_aee = 16780680, GDK_Sinh_aee2 = 16780753, GDK_Sinh_ai = 16780691, GDK_Sinh_ai2 = 16780763, GDK_Sinh_al = 16780746, GDK_Sinh_au = 16780694, GDK_Sinh_au2 = 16780766, GDK_Sinh_ba = 16780726, GDK_Sinh_bha = 16780727, GDK_Sinh_ca = 16780704, GDK_Sinh_cha = 16780705, GDK_Sinh_dda = 16780713, GDK_Sinh_ddha = 16780714, GDK_Sinh_dha = 16780719, GDK_Sinh_dhha = 16780720, GDK_Sinh_e = 16780689, GDK_Sinh_e2 = 16780761, GDK_Sinh_ee = 16780690, GDK_Sinh_ee2 = 16780762, GDK_Sinh_fa = 16780742, GDK_Sinh_ga = 16780700, GDK_Sinh_gha = 16780701, GDK_Sinh_h2 = 16780675, GDK_Sinh_ha = 16780740, GDK_Sinh_i = 16780681, GDK_Sinh_i2 = 16780754, GDK_Sinh_ii = 16780682, GDK_Sinh_ii2 = 16780755, GDK_Sinh_ja = 16780706, GDK_Sinh_jha = 16780707, GDK_Sinh_jnya = 16780709, GDK_Sinh_ka = 16780698, GDK_Sinh_kha = 16780699, GDK_Sinh_kunddaliya = 16780788, GDK_Sinh_la = 16780733, GDK_Sinh_lla = 16780741, GDK_Sinh_lu = 16780687, GDK_Sinh_lu2 = 16780767, GDK_Sinh_luu = 16780688, GDK_Sinh_luu2 = 16780787, GDK_Sinh_ma = 16780728, GDK_Sinh_mba = 16780729, GDK_Sinh_na = 16780721, GDK_Sinh_ndda = 16780716, GDK_Sinh_ndha = 16780723, GDK_Sinh_ng = 16780674, GDK_Sinh_ng2 = 16780702, GDK_Sinh_nga = 16780703, GDK_Sinh_nja = 16780710, GDK_Sinh_nna = 16780715, GDK_Sinh_nya = 16780708, GDK_Sinh_o = 16780692, GDK_Sinh_o2 = 16780764, GDK_Sinh_oo = 16780693, GDK_Sinh_oo2 = 16780765, GDK_Sinh_pa = 16780724, GDK_Sinh_pha = 16780725, GDK_Sinh_ra = 16780731, GDK_Sinh_ri = 16780685, GDK_Sinh_rii = 16780686, GDK_Sinh_ru2 = 16780760, GDK_Sinh_ruu2 = 16780786, GDK_Sinh_sa = 16780739, GDK_Sinh_sha = 16780737, GDK_Sinh_ssha = 16780738, GDK_Sinh_tha = 16780717, GDK_Sinh_thha = 16780718, GDK_Sinh_tta = 16780711, GDK_Sinh_ttha = 16780712, GDK_Sinh_u = 16780683, GDK_Sinh_u2 = 16780756, GDK_Sinh_uu = 16780684, GDK_Sinh_uu2 = 16780758, GDK_Sinh_va = 16780736, GDK_Sinh_ya = 16780730, GDK_Sleep = 269025071, GDK_SlowKeys_Enable = 65139, GDK_Spell = 269025148, GDK_SplitScreen = 269025149, GDK_Standby = 269025040, GDK_Start = 269025050, GDK_StickyKeys_Enable = 65141, GDK_Stop = 269025064, GDK_Subtitle = 269025178, GDK_Super_L = 65515, GDK_Super_R = 65516, GDK_Support = 269025150, GDK_Suspend = 269025191, GDK_Switch_VT_1 = 269024769, GDK_Switch_VT_10 = 269024778, GDK_Switch_VT_11 = 269024779, GDK_Switch_VT_12 = 269024780, GDK_Switch_VT_2 = 269024770, GDK_Switch_VT_3 = 269024771, GDK_Switch_VT_4 = 269024772, GDK_Switch_VT_5 = 269024773, GDK_Switch_VT_6 = 269024774, GDK_Switch_VT_7 = 269024775, GDK_Switch_VT_8 = 269024776, GDK_Switch_VT_9 = 269024777, GDK_Sys_Req = 65301, GDK_T = 84, GDK_THORN = 222, GDK_Tab = 65289, GDK_Tabovedot = 16785002, GDK_TaskPane = 269025151, GDK_Tcaron = 427, GDK_Tcedilla = 478, GDK_Terminal = 269025152, GDK_Terminate_Server = 65237, GDK_Thai_baht = 3551, GDK_Thai_bobaimai = 3514, GDK_Thai_chochan = 3496, GDK_Thai_chochang = 3498, GDK_Thai_choching = 3497, GDK_Thai_chochoe = 3500, GDK_Thai_dochada = 3502, GDK_Thai_dodek = 3508, GDK_Thai_fofa = 3517, GDK_Thai_fofan = 3519, GDK_Thai_hohip = 3531, GDK_Thai_honokhuk = 3534, GDK_Thai_khokhai = 3490, GDK_Thai_khokhon = 3493, GDK_Thai_khokhuat = 3491, GDK_Thai_khokhwai = 3492, GDK_Thai_khorakhang = 3494, GDK_Thai_kokai = 3489, GDK_Thai_lakkhangyao = 3557, GDK_Thai_lekchet = 3575, GDK_Thai_lekha = 3573, GDK_Thai_lekhok = 3574, GDK_Thai_lekkao = 3577, GDK_Thai_leknung = 3569, GDK_Thai_lekpaet = 3576, GDK_Thai_leksam = 3571, GDK_Thai_leksi = 3572, GDK_Thai_leksong = 3570, GDK_Thai_leksun = 3568, GDK_Thai_lochula = 3532, GDK_Thai_loling = 3525, GDK_Thai_lu = 3526, GDK_Thai_maichattawa = 3563, GDK_Thai_maiek = 3560, GDK_Thai_maihanakat = 3537, GDK_Thai_maihanakat_maitho = 3550, GDK_Thai_maitaikhu = 3559, GDK_Thai_maitho = 3561, GDK_Thai_maitri = 3562, GDK_Thai_maiyamok = 3558, GDK_Thai_moma = 3521, GDK_Thai_ngongu = 3495, GDK_Thai_nikhahit = 3565, GDK_Thai_nonen = 3507, GDK_Thai_nonu = 3513, GDK_Thai_oang = 3533, GDK_Thai_paiyannoi = 3535, GDK_Thai_phinthu = 3546, GDK_Thai_phophan = 3518, GDK_Thai_phophung = 3516, GDK_Thai_phosamphao = 3520, GDK_Thai_popla = 3515, GDK_Thai_rorua = 3523, GDK_Thai_ru = 3524, GDK_Thai_saraa = 3536, GDK_Thai_saraaa = 3538, GDK_Thai_saraae = 3553, GDK_Thai_saraaimaimalai = 3556, GDK_Thai_saraaimaimuan = 3555, GDK_Thai_saraam = 3539, GDK_Thai_sarae = 3552, GDK_Thai_sarai = 3540, GDK_Thai_saraii = 3541, GDK_Thai_sarao = 3554, GDK_Thai_sarau = 3544, GDK_Thai_saraue = 3542, GDK_Thai_sarauee = 3543, GDK_Thai_sarauu = 3545, GDK_Thai_sorusi = 3529, GDK_Thai_sosala = 3528, GDK_Thai_soso = 3499, GDK_Thai_sosua = 3530, GDK_Thai_thanthakhat = 3564, GDK_Thai_thonangmontho = 3505, GDK_Thai_thophuthao = 3506, GDK_Thai_thothahan = 3511, GDK_Thai_thothan = 3504, GDK_Thai_thothong = 3512, GDK_Thai_thothung = 3510, GDK_Thai_topatak = 3503, GDK_Thai_totao = 3509, GDK_Thai_wowaen = 3527, GDK_Thai_yoyak = 3522, GDK_Thai_yoying = 3501, GDK_Thorn = 222, GDK_Time = 269025183, GDK_ToDoList = 269025055, GDK_Tools = 269025153, GDK_TopMenu = 269025186, GDK_TouchpadOff = 269025201, GDK_TouchpadOn = 269025200, GDK_TouchpadToggle = 269025193, GDK_Touroku = 65323, GDK_Travel = 269025154, GDK_Tslash = 940, GDK_U = 85, GDK_UWB = 269025174, GDK_Uacute = 218, GDK_Ubelowdot = 16785124, GDK_Ubreve = 733, GDK_Ucircumflex = 219, GDK_Udiaeresis = 220, GDK_Udoubleacute = 475, GDK_Ugrave = 217, GDK_Uhook = 16785126, GDK_Uhorn = 16777647, GDK_Uhornacute = 16785128, GDK_Uhornbelowdot = 16785136, GDK_Uhorngrave = 16785130, GDK_Uhornhook = 16785132, GDK_Uhorntilde = 16785134, GDK_Ukrainian_GHE_WITH_UPTURN = 1725, GDK_Ukrainian_I = 1718, GDK_Ukrainian_IE = 1716, GDK_Ukrainian_YI = 1719, GDK_Ukrainian_ghe_with_upturn = 1709, GDK_Ukrainian_i = 1702, GDK_Ukrainian_ie = 1700, GDK_Ukrainian_yi = 1703, GDK_Ukranian_I = 1718, GDK_Ukranian_JE = 1716, GDK_Ukranian_YI = 1719, GDK_Ukranian_i = 1702, GDK_Ukranian_je = 1700, GDK_Ukranian_yi = 1703, GDK_Umacron = 990, GDK_Undo = 65381, GDK_Ungrab = 269024800, GDK_Uogonek = 985, GDK_Up = 65362, GDK_Uring = 473, GDK_User1KB = 269025157, GDK_User2KB = 269025158, GDK_UserPB = 269025156, GDK_Utilde = 989, GDK_V = 86, GDK_VendorHome = 269025076, GDK_Video = 269025159, GDK_View = 269025185, GDK_VoidSymbol = 16777215, GDK_W = 87, GDK_WLAN = 269025173, GDK_WWW = 269025070, GDK_Wacute = 16785026, GDK_WakeUp = 269025067, GDK_Wcircumflex = 16777588, GDK_Wdiaeresis = 16785028, GDK_WebCam = 269025167, GDK_Wgrave = 16785024, GDK_WheelButton = 269025160, GDK_WindowClear = 269025109, GDK_WonSign = 16785577, GDK_Word = 269025161, GDK_X = 88, GDK_Xabovedot = 16785034, GDK_Xfer = 269025162, GDK_Y = 89, GDK_Yacute = 221, GDK_Ybelowdot = 16785140, GDK_Ycircumflex = 16777590, GDK_Ydiaeresis = 5054, GDK_Yellow = 269025189, GDK_Ygrave = 16785138, GDK_Yhook = 16785142, GDK_Ytilde = 16785144, GDK_Z = 90, GDK_Zabovedot = 431, GDK_Zacute = 428, GDK_Zcaron = 430, GDK_Zen_Koho = 65341, GDK_Zenkaku = 65320, GDK_Zenkaku_Hankaku = 65322, GDK_ZoomIn = 269025163, GDK_ZoomOut = 269025164, GDK_Zstroke = 16777653, GDK_a = 97, GDK_aacute = 225, GDK_abelowdot = 16785057, GDK_abovedot = 511, GDK_abreve = 483, GDK_abreveacute = 16785071, GDK_abrevebelowdot = 16785079, GDK_abrevegrave = 16785073, GDK_abrevehook = 16785075, GDK_abrevetilde = 16785077, GDK_acircumflex = 226, GDK_acircumflexacute = 16785061, GDK_acircumflexbelowdot = 16785069, GDK_acircumflexgrave = 16785063, GDK_acircumflexhook = 16785065, GDK_acircumflextilde = 16785067, GDK_acute = 180, GDK_adiaeresis = 228, GDK_ae = 230, GDK_agrave = 224, GDK_ahook = 16785059, GDK_amacron = 992, GDK_ampersand = 38, GDK_aogonek = 433, GDK_apostrophe = 39, GDK_approxeq = 16785992, GDK_approximate = 2248, GDK_aring = 229, GDK_asciicircum = 94, GDK_asciitilde = 126, GDK_asterisk = 42, GDK_at = 64, GDK_atilde = 227, GDK_b = 98, GDK_babovedot = 16784899, GDK_backslash = 92, GDK_ballotcross = 2804, GDK_bar = 124, GDK_because = 16785973, GDK_blank = 2527, GDK_botintegral = 2213, GDK_botleftparens = 2220, GDK_botleftsqbracket = 2216, GDK_botleftsummation = 2226, GDK_botrightparens = 2222, GDK_botrightsqbracket = 2218, GDK_botrightsummation = 2230, GDK_bott = 2550, GDK_botvertsummationconnector = 2228, GDK_braceleft = 123, GDK_braceright = 125, GDK_bracketleft = 91, GDK_bracketright = 93, GDK_braille_blank = 16787456, GDK_braille_dot_1 = 65521, GDK_braille_dot_10 = 65530, GDK_braille_dot_2 = 65522, GDK_braille_dot_3 = 65523, GDK_braille_dot_4 = 65524, GDK_braille_dot_5 = 65525, GDK_braille_dot_6 = 65526, GDK_braille_dot_7 = 65527, GDK_braille_dot_8 = 65528, GDK_braille_dot_9 = 65529, GDK_braille_dots_1 = 16787457, GDK_braille_dots_12 = 16787459, GDK_braille_dots_123 = 16787463, GDK_braille_dots_1234 = 16787471, GDK_braille_dots_12345 = 16787487, GDK_braille_dots_123456 = 16787519, GDK_braille_dots_1234567 = 16787583, GDK_braille_dots_12345678 = 16787711, GDK_braille_dots_1234568 = 16787647, GDK_braille_dots_123457 = 16787551, GDK_braille_dots_1234578 = 16787679, GDK_braille_dots_123458 = 16787615, GDK_braille_dots_12346 = 16787503, GDK_braille_dots_123467 = 16787567, GDK_braille_dots_1234678 = 16787695, GDK_braille_dots_123468 = 16787631, GDK_braille_dots_12347 = 16787535, GDK_braille_dots_123478 = 16787663, GDK_braille_dots_12348 = 16787599, GDK_braille_dots_1235 = 16787479, GDK_braille_dots_12356 = 16787511, GDK_braille_dots_123567 = 16787575, GDK_braille_dots_1235678 = 16787703, GDK_braille_dots_123568 = 16787639, GDK_braille_dots_12357 = 16787543, GDK_braille_dots_123578 = 16787671, GDK_braille_dots_12358 = 16787607, GDK_braille_dots_1236 = 16787495, GDK_braille_dots_12367 = 16787559, GDK_braille_dots_123678 = 16787687, GDK_braille_dots_12368 = 16787623, GDK_braille_dots_1237 = 16787527, GDK_braille_dots_12378 = 16787655, GDK_braille_dots_1238 = 16787591, GDK_braille_dots_124 = 16787467, GDK_braille_dots_1245 = 16787483, GDK_braille_dots_12456 = 16787515, GDK_braille_dots_124567 = 16787579, GDK_braille_dots_1245678 = 16787707, GDK_braille_dots_124568 = 16787643, GDK_braille_dots_12457 = 16787547, GDK_braille_dots_124578 = 16787675, GDK_braille_dots_12458 = 16787611, GDK_braille_dots_1246 = 16787499, GDK_braille_dots_12467 = 16787563, GDK_braille_dots_124678 = 16787691, GDK_braille_dots_12468 = 16787627, GDK_braille_dots_1247 = 16787531, GDK_braille_dots_12478 = 16787659, GDK_braille_dots_1248 = 16787595, GDK_braille_dots_125 = 16787475, GDK_braille_dots_1256 = 16787507, GDK_braille_dots_12567 = 16787571, GDK_braille_dots_125678 = 16787699, GDK_braille_dots_12568 = 16787635, GDK_braille_dots_1257 = 16787539, GDK_braille_dots_12578 = 16787667, GDK_braille_dots_1258 = 16787603, GDK_braille_dots_126 = 16787491, GDK_braille_dots_1267 = 16787555, GDK_braille_dots_12678 = 16787683, GDK_braille_dots_1268 = 16787619, GDK_braille_dots_127 = 16787523, GDK_braille_dots_1278 = 16787651, GDK_braille_dots_128 = 16787587, GDK_braille_dots_13 = 16787461, GDK_braille_dots_134 = 16787469, GDK_braille_dots_1345 = 16787485, GDK_braille_dots_13456 = 16787517, GDK_braille_dots_134567 = 16787581, GDK_braille_dots_1345678 = 16787709, GDK_braille_dots_134568 = 16787645, GDK_braille_dots_13457 = 16787549, GDK_braille_dots_134578 = 16787677, GDK_braille_dots_13458 = 16787613, GDK_braille_dots_1346 = 16787501, GDK_braille_dots_13467 = 16787565, GDK_braille_dots_134678 = 16787693, GDK_braille_dots_13468 = 16787629, GDK_braille_dots_1347 = 16787533, GDK_braille_dots_13478 = 16787661, GDK_braille_dots_1348 = 16787597, GDK_braille_dots_135 = 16787477, GDK_braille_dots_1356 = 16787509, GDK_braille_dots_13567 = 16787573, GDK_braille_dots_135678 = 16787701, GDK_braille_dots_13568 = 16787637, GDK_braille_dots_1357 = 16787541, GDK_braille_dots_13578 = 16787669, GDK_braille_dots_1358 = 16787605, GDK_braille_dots_136 = 16787493, GDK_braille_dots_1367 = 16787557, GDK_braille_dots_13678 = 16787685, GDK_braille_dots_1368 = 16787621, GDK_braille_dots_137 = 16787525, GDK_braille_dots_1378 = 16787653, GDK_braille_dots_138 = 16787589, GDK_braille_dots_14 = 16787465, GDK_braille_dots_145 = 16787481, GDK_braille_dots_1456 = 16787513, GDK_braille_dots_14567 = 16787577, GDK_braille_dots_145678 = 16787705, GDK_braille_dots_14568 = 16787641, GDK_braille_dots_1457 = 16787545, GDK_braille_dots_14578 = 16787673, GDK_braille_dots_1458 = 16787609, GDK_braille_dots_146 = 16787497, GDK_braille_dots_1467 = 16787561, GDK_braille_dots_14678 = 16787689, GDK_braille_dots_1468 = 16787625, GDK_braille_dots_147 = 16787529, GDK_braille_dots_1478 = 16787657, GDK_braille_dots_148 = 16787593, GDK_braille_dots_15 = 16787473, GDK_braille_dots_156 = 16787505, GDK_braille_dots_1567 = 16787569, GDK_braille_dots_15678 = 16787697, GDK_braille_dots_1568 = 16787633, GDK_braille_dots_157 = 16787537, GDK_braille_dots_1578 = 16787665, GDK_braille_dots_158 = 16787601, GDK_braille_dots_16 = 16787489, GDK_braille_dots_167 = 16787553, GDK_braille_dots_1678 = 16787681, GDK_braille_dots_168 = 16787617, GDK_braille_dots_17 = 16787521, GDK_braille_dots_178 = 16787649, GDK_braille_dots_18 = 16787585, GDK_braille_dots_2 = 16787458, GDK_braille_dots_23 = 16787462, GDK_braille_dots_234 = 16787470, GDK_braille_dots_2345 = 16787486, GDK_braille_dots_23456 = 16787518, GDK_braille_dots_234567 = 16787582, GDK_braille_dots_2345678 = 16787710, GDK_braille_dots_234568 = 16787646, GDK_braille_dots_23457 = 16787550, GDK_braille_dots_234578 = 16787678, GDK_braille_dots_23458 = 16787614, GDK_braille_dots_2346 = 16787502, GDK_braille_dots_23467 = 16787566, GDK_braille_dots_234678 = 16787694, GDK_braille_dots_23468 = 16787630, GDK_braille_dots_2347 = 16787534, GDK_braille_dots_23478 = 16787662, GDK_braille_dots_2348 = 16787598, GDK_braille_dots_235 = 16787478, GDK_braille_dots_2356 = 16787510, GDK_braille_dots_23567 = 16787574, GDK_braille_dots_235678 = 16787702, GDK_braille_dots_23568 = 16787638, GDK_braille_dots_2357 = 16787542, GDK_braille_dots_23578 = 16787670, GDK_braille_dots_2358 = 16787606, GDK_braille_dots_236 = 16787494, GDK_braille_dots_2367 = 16787558, GDK_braille_dots_23678 = 16787686, GDK_braille_dots_2368 = 16787622, GDK_braille_dots_237 = 16787526, GDK_braille_dots_2378 = 16787654, GDK_braille_dots_238 = 16787590, GDK_braille_dots_24 = 16787466, GDK_braille_dots_245 = 16787482, GDK_braille_dots_2456 = 16787514, GDK_braille_dots_24567 = 16787578, GDK_braille_dots_245678 = 16787706, GDK_braille_dots_24568 = 16787642, GDK_braille_dots_2457 = 16787546, GDK_braille_dots_24578 = 16787674, GDK_braille_dots_2458 = 16787610, GDK_braille_dots_246 = 16787498, GDK_braille_dots_2467 = 16787562, GDK_braille_dots_24678 = 16787690, GDK_braille_dots_2468 = 16787626, GDK_braille_dots_247 = 16787530, GDK_braille_dots_2478 = 16787658, GDK_braille_dots_248 = 16787594, GDK_braille_dots_25 = 16787474, GDK_braille_dots_256 = 16787506, GDK_braille_dots_2567 = 16787570, GDK_braille_dots_25678 = 16787698, GDK_braille_dots_2568 = 16787634, GDK_braille_dots_257 = 16787538, GDK_braille_dots_2578 = 16787666, GDK_braille_dots_258 = 16787602, GDK_braille_dots_26 = 16787490, GDK_braille_dots_267 = 16787554, GDK_braille_dots_2678 = 16787682, GDK_braille_dots_268 = 16787618, GDK_braille_dots_27 = 16787522, GDK_braille_dots_278 = 16787650, GDK_braille_dots_28 = 16787586, GDK_braille_dots_3 = 16787460, GDK_braille_dots_34 = 16787468, GDK_braille_dots_345 = 16787484, GDK_braille_dots_3456 = 16787516, GDK_braille_dots_34567 = 16787580, GDK_braille_dots_345678 = 16787708, GDK_braille_dots_34568 = 16787644, GDK_braille_dots_3457 = 16787548, GDK_braille_dots_34578 = 16787676, GDK_braille_dots_3458 = 16787612, GDK_braille_dots_346 = 16787500, GDK_braille_dots_3467 = 16787564, GDK_braille_dots_34678 = 16787692, GDK_braille_dots_3468 = 16787628, GDK_braille_dots_347 = 16787532, GDK_braille_dots_3478 = 16787660, GDK_braille_dots_348 = 16787596, GDK_braille_dots_35 = 16787476, GDK_braille_dots_356 = 16787508, GDK_braille_dots_3567 = 16787572, GDK_braille_dots_35678 = 16787700, GDK_braille_dots_3568 = 16787636, GDK_braille_dots_357 = 16787540, GDK_braille_dots_3578 = 16787668, GDK_braille_dots_358 = 16787604, GDK_braille_dots_36 = 16787492, GDK_braille_dots_367 = 16787556, GDK_braille_dots_3678 = 16787684, GDK_braille_dots_368 = 16787620, GDK_braille_dots_37 = 16787524, GDK_braille_dots_378 = 16787652, GDK_braille_dots_38 = 16787588, GDK_braille_dots_4 = 16787464, GDK_braille_dots_45 = 16787480, GDK_braille_dots_456 = 16787512, GDK_braille_dots_4567 = 16787576, GDK_braille_dots_45678 = 16787704, GDK_braille_dots_4568 = 16787640, GDK_braille_dots_457 = 16787544, GDK_braille_dots_4578 = 16787672, GDK_braille_dots_458 = 16787608, GDK_braille_dots_46 = 16787496, GDK_braille_dots_467 = 16787560, GDK_braille_dots_4678 = 16787688, GDK_braille_dots_468 = 16787624, GDK_braille_dots_47 = 16787528, GDK_braille_dots_478 = 16787656, GDK_braille_dots_48 = 16787592, GDK_braille_dots_5 = 16787472, GDK_braille_dots_56 = 16787504, GDK_braille_dots_567 = 16787568, GDK_braille_dots_5678 = 16787696, GDK_braille_dots_568 = 16787632, GDK_braille_dots_57 = 16787536, GDK_braille_dots_578 = 16787664, GDK_braille_dots_58 = 16787600, GDK_braille_dots_6 = 16787488, GDK_braille_dots_67 = 16787552, GDK_braille_dots_678 = 16787680, GDK_braille_dots_68 = 16787616, GDK_braille_dots_7 = 16787520, GDK_braille_dots_78 = 16787648, GDK_braille_dots_8 = 16787584, GDK_breve = 418, GDK_brokenbar = 166, GDK_c = 99, GDK_c_h = 65187, GDK_cabovedot = 741, GDK_cacute = 486, GDK_careof = 2744, GDK_caret = 2812, GDK_caron = 439, GDK_ccaron = 488, GDK_ccedilla = 231, GDK_ccircumflex = 742, GDK_cedilla = 184, GDK_cent = 162, GDK_ch = 65184, GDK_checkerboard = 2529, GDK_checkmark = 2803, GDK_circle = 3023, GDK_club = 2796, GDK_colon = 58, GDK_comma = 44, GDK_containsas = 16785931, GDK_copyright = 169, GDK_cr = 2532, GDK_crossinglines = 2542, GDK_cuberoot = 16785947, GDK_currency = 164, GDK_cursor = 2815, GDK_d = 100, GDK_dabovedot = 16784907, GDK_dagger = 2801, GDK_dcaron = 495, GDK_dead_A = 65153, GDK_dead_E = 65155, GDK_dead_I = 65157, GDK_dead_O = 65159, GDK_dead_U = 65161, GDK_dead_a = 65152, GDK_dead_abovecomma = 65124, GDK_dead_abovedot = 65110, GDK_dead_abovereversedcomma = 65125, GDK_dead_abovering = 65112, GDK_dead_acute = 65105, GDK_dead_belowbreve = 65131, GDK_dead_belowcircumflex = 65129, GDK_dead_belowcomma = 65134, GDK_dead_belowdiaeresis = 65132, GDK_dead_belowdot = 65120, GDK_dead_belowmacron = 65128, GDK_dead_belowring = 65127, GDK_dead_belowtilde = 65130, GDK_dead_breve = 65109, GDK_dead_capital_schwa = 65163, GDK_dead_caron = 65114, GDK_dead_cedilla = 65115, GDK_dead_circumflex = 65106, GDK_dead_currency = 65135, GDK_dead_dasia = 65125, GDK_dead_diaeresis = 65111, GDK_dead_doubleacute = 65113, GDK_dead_doublegrave = 65126, GDK_dead_e = 65154, GDK_dead_grave = 65104, GDK_dead_greek = 65164, GDK_dead_hook = 65121, GDK_dead_horn = 65122, GDK_dead_i = 65156, GDK_dead_invertedbreve = 65133, GDK_dead_iota = 65117, GDK_dead_macron = 65108, GDK_dead_o = 65158, GDK_dead_ogonek = 65116, GDK_dead_perispomeni = 65107, GDK_dead_psili = 65124, GDK_dead_semivoiced_sound = 65119, GDK_dead_small_schwa = 65162, GDK_dead_stroke = 65123, GDK_dead_tilde = 65107, GDK_dead_u = 65160, GDK_dead_voiced_sound = 65118, GDK_decimalpoint = 2749, GDK_degree = 176, GDK_diaeresis = 168, GDK_diamond = 2797, GDK_digitspace = 2725, GDK_dintegral = 16785964, GDK_division = 247, GDK_dollar = 36, GDK_doubbaselinedot = 2735, GDK_doubleacute = 445, GDK_doubledagger = 2802, GDK_doublelowquotemark = 2814, GDK_downarrow = 2302, GDK_downcaret = 2984, GDK_downshoe = 3030, GDK_downstile = 3012, GDK_downtack = 3010, GDK_dstroke = 496, GDK_e = 101, GDK_eabovedot = 1004, GDK_eacute = 233, GDK_ebelowdot = 16785081, GDK_ecaron = 492, GDK_ecircumflex = 234, GDK_ecircumflexacute = 16785087, GDK_ecircumflexbelowdot = 16785095, GDK_ecircumflexgrave = 16785089, GDK_ecircumflexhook = 16785091, GDK_ecircumflextilde = 16785093, GDK_ediaeresis = 235, GDK_egrave = 232, GDK_ehook = 16785083, GDK_eightsubscript = 16785544, GDK_eightsuperior = 16785528, GDK_elementof = 16785928, GDK_ellipsis = 2734, GDK_em3space = 2723, GDK_em4space = 2724, GDK_emacron = 954, GDK_emdash = 2729, GDK_emfilledcircle = 2782, GDK_emfilledrect = 2783, GDK_emopencircle = 2766, GDK_emopenrectangle = 2767, GDK_emptyset = 16785925, GDK_emspace = 2721, GDK_endash = 2730, GDK_enfilledcircbullet = 2790, GDK_enfilledsqbullet = 2791, GDK_eng = 959, GDK_enopencircbullet = 2784, GDK_enopensquarebullet = 2785, GDK_enspace = 2722, GDK_eogonek = 490, GDK_equal = 61, GDK_eth = 240, GDK_etilde = 16785085, GDK_exclam = 33, GDK_exclamdown = 161, GDK_ezh = 16777874, GDK_f = 102, GDK_fabovedot = 16784927, GDK_femalesymbol = 2808, GDK_ff = 2531, GDK_figdash = 2747, GDK_filledlefttribullet = 2780, GDK_filledrectbullet = 2779, GDK_filledrighttribullet = 2781, GDK_filledtribulletdown = 2793, GDK_filledtribulletup = 2792, GDK_fiveeighths = 2757, GDK_fivesixths = 2743, GDK_fivesubscript = 16785541, GDK_fivesuperior = 16785525, GDK_fourfifths = 2741, GDK_foursubscript = 16785540, GDK_foursuperior = 16785524, GDK_fourthroot = 16785948, GDK_function = 2294, GDK_g = 103, GDK_gabovedot = 757, GDK_gbreve = 699, GDK_gcaron = 16777703, GDK_gcedilla = 955, GDK_gcircumflex = 760, GDK_grave = 96, GDK_greater = 62, GDK_greaterthanequal = 2238, GDK_guillemotleft = 171, GDK_guillemotright = 187, GDK_h = 104, GDK_hairspace = 2728, GDK_hcircumflex = 694, GDK_heart = 2798, GDK_hebrew_aleph = 3296, GDK_hebrew_ayin = 3314, GDK_hebrew_bet = 3297, GDK_hebrew_beth = 3297, GDK_hebrew_chet = 3303, GDK_hebrew_dalet = 3299, GDK_hebrew_daleth = 3299, GDK_hebrew_doublelowline = 3295, GDK_hebrew_finalkaph = 3306, GDK_hebrew_finalmem = 3309, GDK_hebrew_finalnun = 3311, GDK_hebrew_finalpe = 3315, GDK_hebrew_finalzade = 3317, GDK_hebrew_finalzadi = 3317, GDK_hebrew_gimel = 3298, GDK_hebrew_gimmel = 3298, GDK_hebrew_he = 3300, GDK_hebrew_het = 3303, GDK_hebrew_kaph = 3307, GDK_hebrew_kuf = 3319, GDK_hebrew_lamed = 3308, GDK_hebrew_mem = 3310, GDK_hebrew_nun = 3312, GDK_hebrew_pe = 3316, GDK_hebrew_qoph = 3319, GDK_hebrew_resh = 3320, GDK_hebrew_samech = 3313, GDK_hebrew_samekh = 3313, GDK_hebrew_shin = 3321, GDK_hebrew_taf = 3322, GDK_hebrew_taw = 3322, GDK_hebrew_tet = 3304, GDK_hebrew_teth = 3304, GDK_hebrew_waw = 3301, GDK_hebrew_yod = 3305, GDK_hebrew_zade = 3318, GDK_hebrew_zadi = 3318, GDK_hebrew_zain = 3302, GDK_hebrew_zayin = 3302, GDK_hexagram = 2778, GDK_horizconnector = 2211, GDK_horizlinescan1 = 2543, GDK_horizlinescan3 = 2544, GDK_horizlinescan5 = 2545, GDK_horizlinescan7 = 2546, GDK_horizlinescan9 = 2547, GDK_hstroke = 689, GDK_ht = 2530, GDK_hyphen = 173, GDK_i = 105, GDK_iTouch = 269025120, GDK_iacute = 237, GDK_ibelowdot = 16785099, GDK_ibreve = 16777517, GDK_icircumflex = 238, GDK_identical = 2255, GDK_idiaeresis = 239, GDK_idotless = 697, GDK_ifonlyif = 2253, GDK_igrave = 236, GDK_ihook = 16785097, GDK_imacron = 1007, GDK_implies = 2254, GDK_includedin = 2266, GDK_includes = 2267, GDK_infinity = 2242, GDK_integral = 2239, GDK_intersection = 2268, GDK_iogonek = 999, GDK_itilde = 949, GDK_j = 106, GDK_jcircumflex = 700, GDK_jot = 3018, GDK_k = 107, GDK_kana_A = 1201, GDK_kana_CHI = 1217, GDK_kana_E = 1204, GDK_kana_FU = 1228, GDK_kana_HA = 1226, GDK_kana_HE = 1229, GDK_kana_HI = 1227, GDK_kana_HO = 1230, GDK_kana_HU = 1228, GDK_kana_I = 1202, GDK_kana_KA = 1206, GDK_kana_KE = 1209, GDK_kana_KI = 1207, GDK_kana_KO = 1210, GDK_kana_KU = 1208, GDK_kana_MA = 1231, GDK_kana_ME = 1234, GDK_kana_MI = 1232, GDK_kana_MO = 1235, GDK_kana_MU = 1233, GDK_kana_N = 1245, GDK_kana_NA = 1221, GDK_kana_NE = 1224, GDK_kana_NI = 1222, GDK_kana_NO = 1225, GDK_kana_NU = 1223, GDK_kana_O = 1205, GDK_kana_RA = 1239, GDK_kana_RE = 1242, GDK_kana_RI = 1240, GDK_kana_RO = 1243, GDK_kana_RU = 1241, GDK_kana_SA = 1211, GDK_kana_SE = 1214, GDK_kana_SHI = 1212, GDK_kana_SO = 1215, GDK_kana_SU = 1213, GDK_kana_TA = 1216, GDK_kana_TE = 1219, GDK_kana_TI = 1217, GDK_kana_TO = 1220, GDK_kana_TSU = 1218, GDK_kana_TU = 1218, GDK_kana_U = 1203, GDK_kana_WA = 1244, GDK_kana_WO = 1190, GDK_kana_YA = 1236, GDK_kana_YO = 1238, GDK_kana_YU = 1237, GDK_kana_a = 1191, GDK_kana_closingbracket = 1187, GDK_kana_comma = 1188, GDK_kana_conjunctive = 1189, GDK_kana_e = 1194, GDK_kana_fullstop = 1185, GDK_kana_i = 1192, GDK_kana_middledot = 1189, GDK_kana_o = 1195, GDK_kana_openingbracket = 1186, GDK_kana_switch = 65406, GDK_kana_tsu = 1199, GDK_kana_tu = 1199, GDK_kana_u = 1193, GDK_kana_ya = 1196, GDK_kana_yo = 1198, GDK_kana_yu = 1197, GDK_kappa = 930, GDK_kcedilla = 1011, GDK_kra = 930, GDK_l = 108, GDK_lacute = 485, GDK_latincross = 2777, GDK_lbelowdot = 16784951, GDK_lcaron = 437, GDK_lcedilla = 950, GDK_leftanglebracket = 2748, GDK_leftarrow = 2299, GDK_leftcaret = 2979, GDK_leftdoublequotemark = 2770, GDK_leftmiddlecurlybrace = 2223, GDK_leftopentriangle = 2764, GDK_leftpointer = 2794, GDK_leftradical = 2209, GDK_leftshoe = 3034, GDK_leftsinglequotemark = 2768, GDK_leftt = 2548, GDK_lefttack = 3036, GDK_less = 60, GDK_lessthanequal = 2236, GDK_lf = 2533, GDK_logicaland = 2270, GDK_logicalor = 2271, GDK_lowleftcorner = 2541, GDK_lowrightcorner = 2538, GDK_lstroke = 435, GDK_m = 109, GDK_mabovedot = 16784961, GDK_macron = 175, GDK_malesymbol = 2807, GDK_maltesecross = 2800, GDK_marker = 2751, GDK_masculine = 186, GDK_minus = 45, GDK_minutes = 2774, GDK_mu = 181, GDK_multiply = 215, GDK_musicalflat = 2806, GDK_musicalsharp = 2805, GDK_n = 110, GDK_nabla = 2245, GDK_nacute = 497, GDK_ncaron = 498, GDK_ncedilla = 1009, GDK_ninesubscript = 16785545, GDK_ninesuperior = 16785529, GDK_nl = 2536, GDK_nobreakspace = 160, GDK_notapproxeq = 16785991, GDK_notelementof = 16785929, GDK_notequal = 2237, GDK_notidentical = 16786018, GDK_notsign = 172, GDK_ntilde = 241, GDK_numbersign = 35, GDK_numerosign = 1712, GDK_o = 111, GDK_oacute = 243, GDK_obarred = 16777845, GDK_obelowdot = 16785101, GDK_ocaron = 16777682, GDK_ocircumflex = 244, GDK_ocircumflexacute = 16785105, GDK_ocircumflexbelowdot = 16785113, GDK_ocircumflexgrave = 16785107, GDK_ocircumflexhook = 16785109, GDK_ocircumflextilde = 16785111, GDK_odiaeresis = 246, GDK_odoubleacute = 501, GDK_oe = 5053, GDK_ogonek = 434, GDK_ograve = 242, GDK_ohook = 16785103, GDK_ohorn = 16777633, GDK_ohornacute = 16785115, GDK_ohornbelowdot = 16785123, GDK_ohorngrave = 16785117, GDK_ohornhook = 16785119, GDK_ohorntilde = 16785121, GDK_omacron = 1010, GDK_oneeighth = 2755, GDK_onefifth = 2738, GDK_onehalf = 189, GDK_onequarter = 188, GDK_onesixth = 2742, GDK_onesubscript = 16785537, GDK_onesuperior = 185, GDK_onethird = 2736, GDK_ooblique = 248, GDK_openrectbullet = 2786, GDK_openstar = 2789, GDK_opentribulletdown = 2788, GDK_opentribulletup = 2787, GDK_ordfeminine = 170, GDK_oslash = 248, GDK_otilde = 245, GDK_overbar = 3008, GDK_overline = 1150, GDK_p = 112, GDK_pabovedot = 16784983, GDK_paragraph = 182, GDK_parenleft = 40, GDK_parenright = 41, GDK_partdifferential = 16785922, GDK_partialderivative = 2287, GDK_percent = 37, GDK_period = 46, GDK_periodcentered = 183, GDK_permille = 2773, GDK_phonographcopyright = 2811, GDK_plus = 43, GDK_plusminus = 177, GDK_prescription = 2772, GDK_prolongedsound = 1200, GDK_punctspace = 2726, GDK_q = 113, GDK_quad = 3020, GDK_question = 63, GDK_questiondown = 191, GDK_quotedbl = 34, GDK_quoteleft = 96, GDK_quoteright = 39, GDK_r = 114, GDK_racute = 480, GDK_radical = 2262, GDK_rcaron = 504, GDK_rcedilla = 947, GDK_registered = 174, GDK_rightanglebracket = 2750, GDK_rightarrow = 2301, GDK_rightcaret = 2982, GDK_rightdoublequotemark = 2771, GDK_rightmiddlecurlybrace = 2224, GDK_rightmiddlesummation = 2231, GDK_rightopentriangle = 2765, GDK_rightpointer = 2795, GDK_rightshoe = 3032, GDK_rightsinglequotemark = 2769, GDK_rightt = 2549, GDK_righttack = 3068, GDK_s = 115, GDK_sabovedot = 16784993, GDK_sacute = 438, GDK_scaron = 441, GDK_scedilla = 442, GDK_schwa = 16777817, GDK_scircumflex = 766, GDK_script_switch = 65406, GDK_seconds = 2775, GDK_section = 167, GDK_semicolon = 59, GDK_semivoicedsound = 1247, GDK_seveneighths = 2758, GDK_sevensubscript = 16785543, GDK_sevensuperior = 16785527, GDK_signaturemark = 2762, GDK_signifblank = 2732, GDK_similarequal = 2249, GDK_singlelowquotemark = 2813, GDK_sixsubscript = 16785542, GDK_sixsuperior = 16785526, GDK_slash = 47, GDK_soliddiamond = 2528, GDK_space = 32, GDK_squareroot = 16785946, GDK_ssharp = 223, GDK_sterling = 163, GDK_stricteq = 16786019, GDK_t = 116, GDK_tabovedot = 16785003, GDK_tcaron = 443, GDK_tcedilla = 510, GDK_telephone = 2809, GDK_telephonerecorder = 2810, GDK_therefore = 2240, GDK_thinspace = 2727, GDK_thorn = 254, GDK_threeeighths = 2756, GDK_threefifths = 2740, GDK_threequarters = 190, GDK_threesubscript = 16785539, GDK_threesuperior = 179, GDK_tintegral = 16785965, GDK_topintegral = 2212, GDK_topleftparens = 2219, GDK_topleftradical = 2210, GDK_topleftsqbracket = 2215, GDK_topleftsummation = 2225, GDK_toprightparens = 2221, GDK_toprightsqbracket = 2217, GDK_toprightsummation = 2229, GDK_topt = 2551, GDK_topvertsummationconnector = 2227, GDK_trademark = 2761, GDK_trademarkincircle = 2763, GDK_tslash = 956, GDK_twofifths = 2739, GDK_twosubscript = 16785538, GDK_twosuperior = 178, GDK_twothirds = 2737, GDK_u = 117, GDK_uacute = 250, GDK_ubelowdot = 16785125, GDK_ubreve = 765, GDK_ucircumflex = 251, GDK_udiaeresis = 252, GDK_udoubleacute = 507, GDK_ugrave = 249, GDK_uhook = 16785127, GDK_uhorn = 16777648, GDK_uhornacute = 16785129, GDK_uhornbelowdot = 16785137, GDK_uhorngrave = 16785131, GDK_uhornhook = 16785133, GDK_uhorntilde = 16785135, GDK_umacron = 1022, GDK_underbar = 3014, GDK_underscore = 95, GDK_union = 2269, GDK_uogonek = 1017, GDK_uparrow = 2300, GDK_upcaret = 2985, GDK_upleftcorner = 2540, GDK_uprightcorner = 2539, GDK_upshoe = 3011, GDK_upstile = 3027, GDK_uptack = 3022, GDK_uring = 505, GDK_utilde = 1021, GDK_v = 118, GDK_variation = 2241, GDK_vertbar = 2552, GDK_vertconnector = 2214, GDK_voicedsound = 1246, GDK_vt = 2537, GDK_w = 119, GDK_wacute = 16785027, GDK_wcircumflex = 16777589, GDK_wdiaeresis = 16785029, GDK_wgrave = 16785025, GDK_x = 120, GDK_xabovedot = 16785035, GDK_y = 121, GDK_yacute = 253, GDK_ybelowdot = 16785141, GDK_ycircumflex = 16777591, GDK_ydiaeresis = 255, GDK_yen = 165, GDK_ygrave = 16785139, GDK_yhook = 16785143, GDK_ytilde = 16785145, GDK_z = 122, GDK_zabovedot = 447, GDK_zacute = 444, GDK_zcaron = 446, GDK_zerosubscript = 16785536, GDK_zerosuperior = 16785520, GDK_zstroke = 16777654, } GtkD-3.7.5/generated/gtkd/gdk/MonitorG.d000066400000000000000000000166551324604450400177350ustar00rootroot00000000000000/* * 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 gdk.MonitorG; private import gdk.Display; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** * GdkMonitor objects represent the individual outputs that are * associated with a #GdkDisplay. GdkDisplay has APIs to enumerate * monitors with gdk_display_get_monitors() and to find particular * monitors with gdk_display_get_primary_monitor() or * gdk_display_get_monitor_at_window(). * * GdkMonitor was introduced in GTK+ 3.22 and supersedes earlier * APIs in GdkScreen to obtain monitor-related information. */ public class MonitorG : ObjectG { /** the main Gtk struct */ protected GdkMonitor* gdkMonitor; /** Get the main Gtk struct */ public GdkMonitor* getMonitorGStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkMonitor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkMonitor; } protected override void setStruct(GObject* obj) { gdkMonitor = cast(GdkMonitor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkMonitor* gdkMonitor, bool ownedRef = false) { this.gdkMonitor = gdkMonitor; super(cast(GObject*)gdkMonitor, ownedRef); } /** */ public static GType getType() { return gdk_monitor_get_type(); } /** * Gets the display that this monitor belongs to. * * Returns: the display * * Since: 3.22 */ public Display getDisplay() { auto p = gdk_monitor_get_display(gdkMonitor); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Retrieves the size and position of an individual monitor within the * display coordinate space. The returned geometry is in ”application pixels”, * not in ”device pixels” (see gdk_monitor_get_scale_factor()). * * Params: * geometry = a #GdkRectangle to be filled with the monitor geometry * * Since: 3.22 */ public void getGeometry(out GdkRectangle geometry) { gdk_monitor_get_geometry(gdkMonitor, &geometry); } /** * Gets the height in millimeters of the monitor. * * Returns: the physical height of the monitor * * Since: 3.22 */ public int getHeightMm() { return gdk_monitor_get_height_mm(gdkMonitor); } /** * Gets the name of the monitor's manufacturer, if available. * * Returns: the name of the manufacturer, or %NULL */ public string getManufacturer() { return Str.toString(gdk_monitor_get_manufacturer(gdkMonitor)); } /** * Gets the a string identifying the monitor model, if available. * * Returns: the monitor model, or %NULL */ public string getModel() { return Str.toString(gdk_monitor_get_model(gdkMonitor)); } /** * Gets the refresh rate of the monitor, if available. * * The value is in milli-Hertz, so a refresh rate of 60Hz * is returned as 60000. * * Returns: the refresh rate in milli-Hertz, or 0 * * Since: 3.22 */ public int getRefreshRate() { return gdk_monitor_get_refresh_rate(gdkMonitor); } /** * Gets the internal scale factor that maps from monitor coordinates * to the actual device pixels. On traditional systems this is 1, but * on very high density outputs this can be a higher value (often 2). * * This can be used if you want to create pixel based data for a * particular monitor, but most of the time you’re drawing to a window * where it is better to use gdk_window_get_scale_factor() instead. * * Returns: the scale factor * * Since: 3.22 */ public int getScaleFactor() { return gdk_monitor_get_scale_factor(gdkMonitor); } /** * Gets information about the layout of red, green and blue * primaries for each pixel in this monitor, if available. * * Returns: the subpixel layout * * Since: 3.22 */ public GdkSubpixelLayout getSubpixelLayout() { return gdk_monitor_get_subpixel_layout(gdkMonitor); } /** * Gets the width in millimeters of the monitor. * * Returns: the physical width of the monitor * * Since: 3.22 */ public int getWidthMm() { return gdk_monitor_get_width_mm(gdkMonitor); } /** * Retrieves the size and position of the “work area” on a monitor * within the display coordinate space. The returned geometry is in * ”application pixels”, not in ”device pixels” (see * gdk_monitor_get_scale_factor()). * * The work area should be considered when positioning menus and * similar popups, to avoid placing them below panels, docks or other * desktop components. * * Note that not all backends may have a concept of workarea. This * function will return the monitor geometry if a workarea is not * available, or does not apply. * * Params: * workarea = a #GdkRectangle to be filled with * the monitor workarea * * Since: 3.22 */ public void getWorkarea(out GdkRectangle workarea) { gdk_monitor_get_workarea(gdkMonitor, &workarea); } /** * Gets whether this monitor should be considered primary * (see gdk_display_get_primary_monitor()). * * Returns: %TRUE if @monitor is primary * * Since: 3.22 */ public bool isPrimary() { return gdk_monitor_is_primary(gdkMonitor) != 0; } protected class OnInvalidateDelegateWrapper { void delegate(MonitorG) dlg; gulong handlerId; this(void delegate(MonitorG) dlg) { this.dlg = dlg; onInvalidateListeners ~= this; } void remove(OnInvalidateDelegateWrapper source) { foreach(index, wrapper; onInvalidateListeners) { if (wrapper.handlerId == source.handlerId) { onInvalidateListeners[index] = null; onInvalidateListeners = std.algorithm.remove(onInvalidateListeners, index); break; } } } } OnInvalidateDelegateWrapper[] onInvalidateListeners; /** */ gulong addOnInvalidate(void delegate(MonitorG) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnInvalidateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "invalidate", cast(GCallback)&callBackInvalidate, cast(void*)wrapper, cast(GClosureNotify)&callBackInvalidateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackInvalidate(GdkMonitor* monitorgStruct, OnInvalidateDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackInvalidateDestroy(OnInvalidateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gdk/Pango.d000066400000000000000000000162261324604450400172350ustar00rootroot00000000000000/* * 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 gdk.Pango; private import cairo.Region; private import gdk.Display; private import gdk.Screen; private import gdk.c.functions; public import gdk.c.types; private import gobject.ObjectG; public import gtkc.gdktypes; private import pango.PgContext; private import pango.PgLayout; private import pango.PgLayoutLine; /** */ /** * Creates a #PangoContext for the default GDK screen. * * The context must be freed when you’re finished with it. * * When using GTK+, normally you should use gtk_widget_get_pango_context() * instead of this function, to get the appropriate context for * the widget you intend to render text onto. * * The newly created context will have the default font options (see * #cairo_font_options_t) for the default screen; if these options * change it will not be updated. Using gtk_widget_get_pango_context() * is more convenient if you want to keep a context around and track * changes to the screen’s font rendering settings. * * Returns: a new #PangoContext for the default display */ public PgContext contextGet() { auto p = gdk_pango_context_get(); if(p is null) { return null; } return ObjectG.getDObject!(PgContext)(cast(PangoContext*) p, true); } /** * Creates a #PangoContext for @screen. * * The context must be freed when you’re finished with it. * * When using GTK+, normally you should use gtk_widget_get_pango_context() * instead of this function, to get the appropriate context for * the widget you intend to render text onto. * * The newly created context will have the default font options * (see #cairo_font_options_t) for the screen; if these options * change it will not be updated. Using gtk_widget_get_pango_context() * is more convenient if you want to keep a context around and track * changes to the screen’s font rendering settings. * * Params: * screen = the #GdkScreen for which the context is to be created. * * Returns: a new #PangoContext for @screen * * Since: 2.2 */ public PgContext contextGetForScreen(Screen screen) { auto p = gdk_pango_context_get_for_screen((screen is null) ? null : screen.getScreenStruct()); if(p is null) { return null; } return ObjectG.getDObject!(PgContext)(cast(PangoContext*) p, true); } /** * Obtains a clip region which contains the areas where the given ranges * of text would be drawn. @x_origin and @y_origin are the top left point * to center the layout. @index_ranges should contain * ranges of bytes in the layout’s text. * * Note that the regions returned correspond to logical extents of the text * ranges, not ink extents. So the drawn layout may in fact touch areas out of * the clip region. The clip region is mainly useful for highlightling parts * of text, such as when text is selected. * * Params: * layout = a #PangoLayout * xOrigin = X pixel where you intend to draw the layout with this clip * yOrigin = Y pixel where you intend to draw the layout with this clip * indexRanges = array of byte indexes into the layout, where even members of array are start indexes and odd elements are end indexes * nRanges = number of ranges in @index_ranges, i.e. half the size of @index_ranges * * Returns: a clip region containing the given ranges */ public Region layoutGetClipRegion(PgLayout layout, int xOrigin, int yOrigin, int* indexRanges, int nRanges) { auto p = gdk_pango_layout_get_clip_region((layout is null) ? null : layout.getPgLayoutStruct(), xOrigin, yOrigin, indexRanges, nRanges); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Obtains a clip region which contains the areas where the given * ranges of text would be drawn. @x_origin and @y_origin are the top left * position of the layout. @index_ranges * should contain ranges of bytes in the layout’s text. The clip * region will include space to the left or right of the line (to the * layout bounding box) if you have indexes above or below the indexes * contained inside the line. This is to draw the selection all the way * to the side of the layout. However, the clip region is in line coordinates, * not layout coordinates. * * Note that the regions returned correspond to logical extents of the text * ranges, not ink extents. So the drawn line may in fact touch areas out of * the clip region. The clip region is mainly useful for highlightling parts * of text, such as when text is selected. * * Params: * line = a #PangoLayoutLine * xOrigin = X pixel where you intend to draw the layout line with this clip * yOrigin = baseline pixel where you intend to draw the layout line with this clip * indexRanges = array of byte indexes into the layout, * where even members of array are start indexes and odd elements * are end indexes * nRanges = number of ranges in @index_ranges, i.e. half the size of @index_ranges * * Returns: a clip region containing the given ranges */ public Region layoutLineGetClipRegion(PgLayoutLine line, int xOrigin, int yOrigin, int[] indexRanges, int nRanges) { auto p = gdk_pango_layout_line_get_clip_region((line is null) ? null : line.getPgLayoutLineStruct(), xOrigin, yOrigin, indexRanges.ptr, nRanges); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Creates a #PangoContext for @display. * * The context must be freed when you’re finished with it. * * When using GTK+, normally you should use gtk_widget_get_pango_context() * instead of this function, to get the appropriate context for * the widget you intend to render text onto. * * The newly created context will have the default font options * (see #cairo_font_options_t) for the display; if these options * change it will not be updated. Using gtk_widget_get_pango_context() * is more convenient if you want to keep a context around and track * changes to the font rendering settings. * * Params: * display = the #GdkDisplay for which the context is to be created * * Returns: a new #PangoContext for @display * * Since: 3.22 */ public PgContext contextGetForDisplay(Display display) { auto p = gdk_pango_context_get_for_display((display is null) ? null : display.getDisplayStruct()); if(p is null) { return null; } return ObjectG.getDObject!(PgContext)(cast(PangoContext*) p, true); } GtkD-3.7.5/generated/gtkd/gdk/Pixbuf.d000066400000000000000000000102631324604450400174210ustar00rootroot00000000000000/* * 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 gdk.Pixbuf; private import cairo.Surface; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import gdkpixbuf.Pixbuf; private import gobject.ObjectG; public import gtkc.gdktypes; /** */ public import gdkpixbuf.Pixbuf; /** */ /** * Transfers image data from a #cairo_surface_t and converts it to an RGB(A) * representation inside a #GdkPixbuf. This allows you to efficiently read * individual pixels from cairo surfaces. For #GdkWindows, use * gdk_pixbuf_get_from_window() instead. * * This function will create an RGB pixbuf with 8 bits per channel. * The pixbuf will contain an alpha channel if the @surface contains one. * * Params: * surface = surface to copy from * srcX = Source X coordinate within @surface * srcY = Source Y coordinate within @surface * width = Width in pixels of region to get * height = Height in pixels of region to get * * Returns: A newly-created pixbuf with a * reference count of 1, or %NULL on error */ public Pixbuf getFromSurface(Surface surface, int srcX, int srcY, int width, int height) { auto p = gdk_pixbuf_get_from_surface((surface is null) ? null : surface.getSurfaceStruct(), srcX, srcY, width, height); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Transfers image data from a #GdkWindow and converts it to an RGB(A) * representation inside a #GdkPixbuf. In other words, copies * image data from a server-side drawable to a client-side RGB(A) buffer. * This allows you to efficiently read individual pixels on the client side. * * This function will create an RGB pixbuf with 8 bits per channel with * the size specified by the @width and @height arguments scaled by the * scale factor of @window. The pixbuf will contain an alpha channel if * the @window contains one. * * If the window is off the screen, then there is no image data in the * obscured/offscreen regions to be placed in the pixbuf. The contents of * portions of the pixbuf corresponding to the offscreen region are undefined. * * If the window you’re obtaining data from is partially obscured by * other windows, then the contents of the pixbuf areas corresponding * to the obscured regions are undefined. * * If the window is not mapped (typically because it’s iconified/minimized * or not on the current workspace), then %NULL will be returned. * * If memory can’t be allocated for the return value, %NULL will be returned * instead. * * (In short, there are several ways this function can fail, and if it fails * it returns %NULL; so check the return value.) * * Params: * window = Source window * srcX = Source X coordinate within @window * srcY = Source Y coordinate within @window * width = Width in pixels of region to get * height = Height in pixels of region to get * * Returns: A newly-created pixbuf with a * reference count of 1, or %NULL on error */ public Pixbuf getFromWindow(Window window, int srcX, int srcY, int width, int height) { auto p = gdk_pixbuf_get_from_window((window is null) ? null : window.getWindowStruct(), srcX, srcY, width, height); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } GtkD-3.7.5/generated/gtkd/gdk/RGBA.d000066400000000000000000000142301324604450400166750ustar00rootroot00000000000000/* * 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 gdk.RGBA; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.gdktypes; private import gtkd.Loader; /** * A #GdkRGBA is used to represent a (possibly translucent) * color, in a way that is compatible with cairos notion of color. */ public final class RGBA { /** the main Gtk struct */ protected GdkRGBA* gdkRGBA; protected bool ownedRef; /** Get the main Gtk struct */ public GdkRGBA* getRGBAStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkRGBA; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gdkRGBA; } /** * Sets our main struct and passes it to the parent class. */ public this (GdkRGBA* gdkRGBA, bool ownedRef = false) { this.gdkRGBA = gdkRGBA; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GDK) && ownedRef ) gdk_rgba_free(gdkRGBA); } /** * Creates a new RGBA Color */ this() { GdkRGBA rgba = GdkRGBA(0, 0, 0, 0); this(gdk_rgba_copy(&rgba), true); } /** ditto */ this(double red, double green, double blue, double alpha = 1.0) { GdkRGBA rgba; rgba.red = red; rgba.green = green; rgba.blue = blue; rgba.alpha = alpha; this(gdk_rgba_copy(&rgba), true); } /** */ /** * The intensity of the red channel from 0.0 to 1.0 inclusive */ public @property double red() { return gdkRGBA.red; } /** Ditto */ public @property void red(double value) { gdkRGBA.red = value; } /** * The intensity of the green channel from 0.0 to 1.0 inclusive */ public @property double green() { return gdkRGBA.green; } /** Ditto */ public @property void green(double value) { gdkRGBA.green = value; } /** * The intensity of the blue channel from 0.0 to 1.0 inclusive */ public @property double blue() { return gdkRGBA.blue; } /** Ditto */ public @property void blue(double value) { gdkRGBA.blue = value; } /** * The opacity of the color from 0.0 for completely translucent to * 1.0 for opaque */ public @property double alpha() { return gdkRGBA.alpha; } /** Ditto */ public @property void alpha(double value) { gdkRGBA.alpha = value; } /** */ public static GType getType() { return gdk_rgba_get_type(); } /** * Makes a copy of a #GdkRGBA. * * The result must be freed through gdk_rgba_free(). * * Returns: A newly allocated #GdkRGBA, with the same contents as @rgba * * Since: 3.0 */ public RGBA copy() { auto p = gdk_rgba_copy(gdkRGBA); if(p is null) { return null; } return ObjectG.getDObject!(RGBA)(cast(GdkRGBA*) p, true); } /** * Compares two RGBA colors. * * Params: * p2 = another #GdkRGBA pointer * * Returns: %TRUE if the two colors compare equal * * Since: 3.0 */ public bool equal(RGBA p2) { return gdk_rgba_equal(gdkRGBA, (p2 is null) ? null : p2.getRGBAStruct()) != 0; } /** * Frees a #GdkRGBA created with gdk_rgba_copy() * * Since: 3.0 */ public void free() { gdk_rgba_free(gdkRGBA); ownedRef = false; } /** * A hash function suitable for using for a hash * table that stores #GdkRGBAs. * * Returns: The hash value for @p * * Since: 3.0 */ public uint hash() { return gdk_rgba_hash(gdkRGBA); } /** * Parses a textual representation of a color, filling in * the @red, @green, @blue and @alpha fields of the @rgba #GdkRGBA. * * The string can be either one of: * - A standard name (Taken from the X11 rgb.txt file). * - A hexadecimal value in the form “\#rgb”, “\#rrggbb”, * “\#rrrgggbbb” or ”\#rrrrggggbbbb” * - A RGB color in the form “rgb(r,g,b)” (In this case the color will * have full opacity) * - A RGBA color in the form “rgba(r,g,b,a)” * * Where “r”, “g”, “b” and “a” are respectively the red, green, blue and * alpha color values. In the last two cases, r g and b are either integers * in the range 0 to 255 or percentage values in the range 0% to 100%, and * a is a floating point value in the range 0 to 1. * * Params: * spec = the string specifying the color * * Returns: %TRUE if the parsing succeeded * * Since: 3.0 */ public bool parse(string spec) { return gdk_rgba_parse(gdkRGBA, Str.toStringz(spec)) != 0; } /** * Returns a textual specification of @rgba in the form * `rgb (r, g, b)` or * `rgba (r, g, b, a)`, * where “r”, “g”, “b” and “a” represent the red, green, * blue and alpha values respectively. r, g, and b are * represented as integers in the range 0 to 255, and a * is represented as floating point value in the range 0 to 1. * * These string forms are string forms those supported by * the CSS3 colors module, and can be parsed by gdk_rgba_parse(). * * Note that this string representation may lose some * precision, since r, g and b are represented as 8-bit * integers. If this is a concern, you should use a * different representation. * * Returns: A newly allocated text string * * Since: 3.0 */ public override string toString() { auto retStr = gdk_rgba_to_string(gdkRGBA); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/gdk/Rectangle.d000066400000000000000000000052711324604450400200730ustar00rootroot00000000000000/* * 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 gdk.Rectangle; private import gdk.c.functions; public import gdk.c.types; public import gtkc.gdktypes; /** * Defines the position and size of a rectangle. It is identical to * #cairo_rectangle_int_t. */ /** * Checks if the two given rectangles are equal. * * Params: * rect2 = a #GdkRectangle * * Returns: %TRUE if the rectangles are equal. * * Since: 3.20 */ public bool equal(GdkRectangle* rect1, GdkRectangle* rect2) { return gdk_rectangle_equal(rect1, rect2) != 0; } /** * Calculates the intersection of two rectangles. It is allowed for * @dest to be the same as either @src1 or @src2. If the rectangles * do not intersect, @dest’s width and height is set to 0 and its x * and y values are undefined. If you are only interested in whether * the rectangles intersect, but not in the intersecting area itself, * pass %NULL for @dest. * * Params: * src2 = a #GdkRectangle * dest = return location for the * intersection of @src1 and @src2, or %NULL * * Returns: %TRUE if the rectangles intersect. */ public bool intersect(GdkRectangle* src1, GdkRectangle* src2, out GdkRectangle dest) { return gdk_rectangle_intersect(src1, src2, &dest) != 0; } /** * Calculates the union of two rectangles. * The union of rectangles @src1 and @src2 is the smallest rectangle which * includes both @src1 and @src2 within it. * It is allowed for @dest to be the same as either @src1 or @src2. * * Note that this function does not ignore 'empty' rectangles (ie. with * zero width or height). * * Params: * src2 = a #GdkRectangle * dest = return location for the union of @src1 and @src2 */ public void unio(GdkRectangle* src1, GdkRectangle* src2, out GdkRectangle dest) { gdk_rectangle_union(src1, src2, &dest); } GtkD-3.7.5/generated/gtkd/gdk/Screen.d000066400000000000000000000624571324604450400174170ustar00rootroot00000000000000/* * 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 gdk.Screen; private import cairo.FontOption; private import gdk.Display; private import gdk.Visual; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gobject.Value; public import gtkc.gdktypes; private import std.algorithm; /** * #GdkScreen objects are the GDK representation of the screen on * which windows can be displayed and on which the pointer moves. * X originally identified screens with physical screens, but * nowadays it is more common to have a single #GdkScreen which * combines several physical monitors (see gdk_screen_get_n_monitors()). * * GdkScreen is used throughout GDK and GTK+ to specify which screen * the top level windows are to be displayed on. it is also used to * query the screen specification and default settings such as * the default visual (gdk_screen_get_system_visual()), the dimensions * of the physical monitors (gdk_screen_get_monitor_geometry()), etc. */ public class Screen : ObjectG { /** the main Gtk struct */ protected GdkScreen* gdkScreen; /** Get the main Gtk struct */ public GdkScreen* getScreenStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkScreen; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkScreen; } protected override void setStruct(GObject* obj) { gdkScreen = cast(GdkScreen*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkScreen* gdkScreen, bool ownedRef = false) { this.gdkScreen = gdkScreen; super(cast(GObject*)gdkScreen, ownedRef); } /** */ public static GType getType() { return gdk_screen_get_type(); } /** * Gets the default screen for the default display. (See * gdk_display_get_default ()). * * Returns: a #GdkScreen, or %NULL if * there is no default display. * * Since: 2.2 */ public static Screen getDefault() { auto p = gdk_screen_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); } /** * Gets the height of the default screen in pixels. The returned * size is in ”application pixels”, not in ”device pixels” (see * gdk_screen_get_monitor_scale_factor()). * * Deprecated: Use per-monitor information * * Returns: the height of the default screen in pixels. */ public static int height() { return gdk_screen_height(); } /** * Returns the height of the default screen in millimeters. * Note that on many X servers this value will not be correct. * * Deprecated: Use per-monitor information * * Returns: the height of the default screen in millimeters, * though it is not always correct. */ public static int heightMm() { return gdk_screen_height_mm(); } /** * Gets the width of the default screen in pixels. The returned * size is in ”application pixels”, not in ”device pixels” (see * gdk_screen_get_monitor_scale_factor()). * * Deprecated: Use per-monitor information * * Returns: the width of the default screen in pixels. */ public static int width() { return gdk_screen_width(); } /** * Returns the width of the default screen in millimeters. * Note that on many X servers this value will not be correct. * * Deprecated: Use per-monitor information * * Returns: the width of the default screen in millimeters, * though it is not always correct. */ public static int widthMm() { return gdk_screen_width_mm(); } /** * Returns the screen’s currently active window. * * On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property * on the root window, as described in the * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec). * If there is no currently currently active * window, or the window manager does not support the * _NET_ACTIVE_WINDOW hint, this function returns %NULL. * * On other platforms, this function may return %NULL, depending on whether * it is implementable on that platform. * * The returned window should be unrefed using g_object_unref() when * no longer needed. * * Returns: the currently active window, * or %NULL. * * Since: 2.10 */ public Window getActiveWindow() { auto p = gdk_screen_get_active_window(gdkScreen); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p, true); } /** * Gets the display to which the @screen belongs. * * Returns: the display to which @screen belongs * * Since: 2.2 */ public Display getDisplay() { auto p = gdk_screen_get_display(gdkScreen); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Gets any options previously set with gdk_screen_set_font_options(). * * Returns: the current font options, or %NULL if no * default font options have been set. * * Since: 2.10 */ public FontOption getFontOptions() { auto p = gdk_screen_get_font_options(gdkScreen); if(p is null) { return null; } return new FontOption(cast(cairo_font_options_t*) p); } /** * Gets the height of @screen in pixels. The returned size is in * ”application pixels”, not in ”device pixels” (see * gdk_screen_get_monitor_scale_factor()). * * Deprecated: Use per-monitor information instead * * Returns: the height of @screen in pixels. * * Since: 2.2 */ public int getHeight() { return gdk_screen_get_height(gdkScreen); } /** * Returns the height of @screen in millimeters. * * Note that this value is somewhat ill-defined when the screen * has multiple monitors of different resolution. It is recommended * to use the monitor dimensions instead. * * Deprecated: Use per-monitor information instead * * Returns: the heigth of @screen in millimeters. * * Since: 2.2 */ public int getHeightMm() { return gdk_screen_get_height_mm(gdkScreen); } /** * Returns the monitor number in which the point (@x,@y) is located. * * Deprecated: Use gdk_display_get_monitor_at_point() instead * * Params: * x = the x coordinate in the virtual screen. * y = the y coordinate in the virtual screen. * * Returns: the monitor number in which the point (@x,@y) lies, or * a monitor close to (@x,@y) if the point is not in any monitor. * * Since: 2.2 */ public int getMonitorAtPoint(int x, int y) { return gdk_screen_get_monitor_at_point(gdkScreen, x, y); } /** * Returns the number of the monitor in which the largest area of the * bounding rectangle of @window resides. * * Deprecated: Use gdk_display_get_monitor_at_window() instead * * Params: * window = a #GdkWindow * * Returns: the monitor number in which most of @window is located, * or if @window does not intersect any monitors, a monitor, * close to @window. * * Since: 2.2 */ public int getMonitorAtWindow(Window window) { return gdk_screen_get_monitor_at_window(gdkScreen, (window is null) ? null : window.getWindowStruct()); } /** * Retrieves the #GdkRectangle representing the size and position of * the individual monitor within the entire screen area. The returned * geometry is in ”application pixels”, not in ”device pixels” (see * gdk_screen_get_monitor_scale_factor()). * * Monitor numbers start at 0. To obtain the number of monitors of * @screen, use gdk_screen_get_n_monitors(). * * Note that the size of the entire screen area can be retrieved via * gdk_screen_get_width() and gdk_screen_get_height(). * * Deprecated: Use gdk_monitor_get_geometry() instead * * Params: * monitorNum = the monitor number * dest = a #GdkRectangle to be filled with * the monitor geometry * * Since: 2.2 */ public void getMonitorGeometry(int monitorNum, out GdkRectangle dest) { gdk_screen_get_monitor_geometry(gdkScreen, monitorNum, &dest); } /** * Gets the height in millimeters of the specified monitor. * * Deprecated: Use gdk_monitor_get_height_mm() instead * * Params: * monitorNum = number of the monitor, between 0 and gdk_screen_get_n_monitors (screen) * * Returns: the height of the monitor, or -1 if not available * * Since: 2.14 */ public int getMonitorHeightMm(int monitorNum) { return gdk_screen_get_monitor_height_mm(gdkScreen, monitorNum); } /** * Returns the output name of the specified monitor. * Usually something like VGA, DVI, or TV, not the actual * product name of the display device. * * Deprecated: Use gdk_monitor_get_model() instead * * Params: * monitorNum = number of the monitor, between 0 and gdk_screen_get_n_monitors (screen) * * Returns: a newly-allocated string containing the name * of the monitor, or %NULL if the name cannot be determined * * Since: 2.14 */ public string getMonitorPlugName(int monitorNum) { auto retStr = gdk_screen_get_monitor_plug_name(gdkScreen, monitorNum); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns the internal scale factor that maps from monitor coordinates * to the actual device pixels. On traditional systems this is 1, but * on very high density outputs this can be a higher value (often 2). * * This can be used if you want to create pixel based data for a * particular monitor, but most of the time you’re drawing to a window * where it is better to use gdk_window_get_scale_factor() instead. * * Deprecated: Use gdk_monitor_get_scale_factor() instead * * Params: * monitorNum = number of the monitor, between 0 and gdk_screen_get_n_monitors (screen) * * Returns: the scale factor * * Since: 3.10 */ public int getMonitorScaleFactor(int monitorNum) { return gdk_screen_get_monitor_scale_factor(gdkScreen, monitorNum); } /** * Gets the width in millimeters of the specified monitor, if available. * * Deprecated: Use gdk_monitor_get_width_mm() instead * * Params: * monitorNum = number of the monitor, between 0 and gdk_screen_get_n_monitors (screen) * * Returns: the width of the monitor, or -1 if not available * * Since: 2.14 */ public int getMonitorWidthMm(int monitorNum) { return gdk_screen_get_monitor_width_mm(gdkScreen, monitorNum); } /** * Retrieves the #GdkRectangle representing the size and position of * the “work area” on a monitor within the entire screen area. The returned * geometry is in ”application pixels”, not in ”device pixels” (see * gdk_screen_get_monitor_scale_factor()). * * The work area should be considered when positioning menus and * similar popups, to avoid placing them below panels, docks or other * desktop components. * * Note that not all backends may have a concept of workarea. This * function will return the monitor geometry if a workarea is not * available, or does not apply. * * Monitor numbers start at 0. To obtain the number of monitors of * @screen, use gdk_screen_get_n_monitors(). * * Deprecated: Use gdk_monitor_get_workarea() instead * * Params: * monitorNum = the monitor number * dest = a #GdkRectangle to be filled with * the monitor workarea * * Since: 3.4 */ public void getMonitorWorkarea(int monitorNum, out GdkRectangle dest) { gdk_screen_get_monitor_workarea(gdkScreen, monitorNum, &dest); } /** * Returns the number of monitors which @screen consists of. * * Deprecated: Use gdk_display_get_n_monitors() instead * * Returns: number of monitors which @screen consists of * * Since: 2.2 */ public int getNMonitors() { return gdk_screen_get_n_monitors(gdkScreen); } /** * Gets the index of @screen among the screens in the display * to which it belongs. (See gdk_screen_get_display()) * * Returns: the index * * Since: 2.2 */ public int getNumber() { return gdk_screen_get_number(gdkScreen); } /** * Gets the primary monitor for @screen. The primary monitor * is considered the monitor where the “main desktop” lives. * While normal application windows typically allow the window * manager to place the windows, specialized desktop applications * such as panels should place themselves on the primary monitor. * * If no primary monitor is configured by the user, the return value * will be 0, defaulting to the first monitor. * * Deprecated: Use gdk_display_get_primary_monitor() instead * * Returns: An integer index for the primary monitor, or 0 if none is configured. * * Since: 2.20 */ public int getPrimaryMonitor() { return gdk_screen_get_primary_monitor(gdkScreen); } /** * Gets the resolution for font handling on the screen; see * gdk_screen_set_resolution() for full details. * * Returns: the current resolution, or -1 if no resolution * has been set. * * Since: 2.10 */ public double getResolution() { return gdk_screen_get_resolution(gdkScreen); } /** * Gets a visual to use for creating windows with an alpha channel. * The windowing system on which GTK+ is running * may not support this capability, in which case %NULL will * be returned. Even if a non-%NULL value is returned, its * possible that the window’s alpha channel won’t be honored * when displaying the window on the screen: in particular, for * X an appropriate windowing manager and compositing manager * must be running to provide appropriate display. * * This functionality is not implemented in the Windows backend. * * For setting an overall opacity for a top-level window, see * gdk_window_set_opacity(). * * Returns: a visual to use for windows * with an alpha channel or %NULL if the capability is not * available. * * Since: 2.8 */ public Visual getRgbaVisual() { auto p = gdk_screen_get_rgba_visual(gdkScreen); if(p is null) { return null; } return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); } /** * Gets the root window of @screen. * * Returns: the root window * * Since: 2.2 */ public Window getRootWindow() { auto p = gdk_screen_get_root_window(gdkScreen); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Retrieves a desktop-wide setting such as double-click time * for the #GdkScreen @screen. * * FIXME needs a list of valid settings here, or a link to * more information. * * Params: * name = the name of the setting * value = location to store the value of the setting * * Returns: %TRUE if the setting existed and a value was stored * in @value, %FALSE otherwise. * * Since: 2.2 */ public bool getSetting(string name, Value value) { return gdk_screen_get_setting(gdkScreen, Str.toStringz(name), (value is null) ? null : value.getValueStruct()) != 0; } /** * Get the system’s default visual for @screen. * This is the visual for the root window of the display. * The return value should not be freed. * * Returns: the system visual * * Since: 2.2 */ public Visual getSystemVisual() { auto p = gdk_screen_get_system_visual(gdkScreen); if(p is null) { return null; } return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); } /** * Obtains a list of all toplevel windows known to GDK on the screen @screen. * A toplevel window is a child of the root window (see * gdk_get_default_root_window()). * * The returned list should be freed with g_list_free(), but * its elements need not be freed. * * Returns: list of toplevel windows, free with g_list_free() * * Since: 2.2 */ public ListG getToplevelWindows() { auto p = gdk_screen_get_toplevel_windows(gdkScreen); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the width of @screen in pixels. The returned size is in * ”application pixels”, not in ”device pixels” (see * gdk_screen_get_monitor_scale_factor()). * * Deprecated: Use per-monitor information instead * * Returns: the width of @screen in pixels. * * Since: 2.2 */ public int getWidth() { return gdk_screen_get_width(gdkScreen); } /** * Gets the width of @screen in millimeters. * * Note that this value is somewhat ill-defined when the screen * has multiple monitors of different resolution. It is recommended * to use the monitor dimensions instead. * * Deprecated: Use per-monitor information instead * * Returns: the width of @screen in millimeters. * * Since: 2.2 */ public int getWidthMm() { return gdk_screen_get_width_mm(gdkScreen); } /** * Returns a #GList of #GdkWindows representing the current * window stack. * * On X11, this is done by inspecting the _NET_CLIENT_LIST_STACKING * property on the root window, as described in the * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec). * If the window manager does not support the * _NET_CLIENT_LIST_STACKING hint, this function returns %NULL. * * On other platforms, this function may return %NULL, depending on whether * it is implementable on that platform. * * The returned list is newly allocated and owns references to the * windows it contains, so it should be freed using g_list_free() and * its windows unrefed using g_object_unref() when no longer needed. * * Returns: a * list of #GdkWindows for the current window stack, or %NULL. * * Since: 2.10 */ public ListG getWindowStack() { auto p = gdk_screen_get_window_stack(gdkScreen); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Returns whether windows with an RGBA visual can reasonably * be expected to have their alpha channel drawn correctly on * the screen. * * On X11 this function returns whether a compositing manager is * compositing @screen. * * Returns: Whether windows with RGBA visuals can reasonably be * expected to have their alpha channels drawn correctly on the screen. * * Since: 2.10 */ public bool isComposited() { return gdk_screen_is_composited(gdkScreen) != 0; } /** * Lists the available visuals for the specified @screen. * A visual describes a hardware image data format. * For example, a visual might support 24-bit color, or 8-bit color, * and might expect pixels to be in a certain format. * * Call g_list_free() on the return value when you’re finished with it. * * Returns: a list of visuals; the list must be freed, but not its contents * * Since: 2.2 */ public ListG listVisuals() { auto p = gdk_screen_list_visuals(gdkScreen); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Determines the name to pass to gdk_display_open() to get * a #GdkDisplay with this screen as the default screen. * * Returns: a newly allocated string, free with g_free() * * Since: 2.2 */ public string makeDisplayName() { auto retStr = gdk_screen_make_display_name(gdkScreen); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Sets the default font options for the screen. These * options will be set on any #PangoContext’s newly created * with gdk_pango_context_get_for_screen(). Changing the * default set of font options does not affect contexts that * have already been created. * * Params: * options = a #cairo_font_options_t, or %NULL to unset any * previously set default font options. * * Since: 2.10 */ public void setFontOptions(FontOption options) { gdk_screen_set_font_options(gdkScreen, (options is null) ? null : options.getFontOptionStruct()); } /** * Sets the resolution for font handling on the screen. This is a * scale factor between points specified in a #PangoFontDescription * and cairo units. The default value is 96, meaning that a 10 point * font will be 13 units high. (10 * 96. / 72. = 13.3). * * Params: * dpi = the resolution in “dots per inch”. (Physical inches aren’t actually * involved; the terminology is conventional.) * * Since: 2.10 */ public void setResolution(double dpi) { gdk_screen_set_resolution(gdkScreen, dpi); } protected class OnCompositedChangedDelegateWrapper { void delegate(Screen) dlg; gulong handlerId; this(void delegate(Screen) dlg) { this.dlg = dlg; onCompositedChangedListeners ~= this; } void remove(OnCompositedChangedDelegateWrapper source) { foreach(index, wrapper; onCompositedChangedListeners) { if (wrapper.handlerId == source.handlerId) { onCompositedChangedListeners[index] = null; onCompositedChangedListeners = std.algorithm.remove(onCompositedChangedListeners, index); break; } } } } OnCompositedChangedDelegateWrapper[] onCompositedChangedListeners; /** * The ::composited-changed signal is emitted when the composited * status of the screen changes * * Since: 2.10 */ gulong addOnCompositedChanged(void delegate(Screen) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnCompositedChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "composited-changed", cast(GCallback)&callBackCompositedChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackCompositedChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackCompositedChanged(GdkScreen* screenStruct, OnCompositedChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackCompositedChangedDestroy(OnCompositedChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMonitorsChangedDelegateWrapper { void delegate(Screen) dlg; gulong handlerId; this(void delegate(Screen) dlg) { this.dlg = dlg; onMonitorsChangedListeners ~= this; } void remove(OnMonitorsChangedDelegateWrapper source) { foreach(index, wrapper; onMonitorsChangedListeners) { if (wrapper.handlerId == source.handlerId) { onMonitorsChangedListeners[index] = null; onMonitorsChangedListeners = std.algorithm.remove(onMonitorsChangedListeners, index); break; } } } } OnMonitorsChangedDelegateWrapper[] onMonitorsChangedListeners; /** * The ::monitors-changed signal is emitted when the number, size * or position of the monitors attached to the screen change. * * Only for X11 and OS X for now. A future implementation for Win32 * may be a possibility. * * Since: 2.14 */ gulong addOnMonitorsChanged(void delegate(Screen) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMonitorsChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "monitors-changed", cast(GCallback)&callBackMonitorsChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackMonitorsChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMonitorsChanged(GdkScreen* screenStruct, OnMonitorsChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackMonitorsChangedDestroy(OnMonitorsChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnSizeChangedDelegateWrapper { void delegate(Screen) dlg; gulong handlerId; this(void delegate(Screen) dlg) { this.dlg = dlg; onSizeChangedListeners ~= this; } void remove(OnSizeChangedDelegateWrapper source) { foreach(index, wrapper; onSizeChangedListeners) { if (wrapper.handlerId == source.handlerId) { onSizeChangedListeners[index] = null; onSizeChangedListeners = std.algorithm.remove(onSizeChangedListeners, index); break; } } } } OnSizeChangedDelegateWrapper[] onSizeChangedListeners; /** * The ::size-changed signal is emitted when the pixel width or * height of a screen changes. * * Since: 2.2 */ gulong addOnSizeChanged(void delegate(Screen) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnSizeChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "size-changed", cast(GCallback)&callBackSizeChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackSizeChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackSizeChanged(GdkScreen* screenStruct, OnSizeChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackSizeChangedDestroy(OnSizeChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gdk/Seat.d000066400000000000000000000323241324604450400170620ustar00rootroot00000000000000/* * 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 gdk.Seat; private import gdk.Cursor; private import gdk.Device; private import gdk.DeviceTool; private import gdk.Display; private import gdk.Event; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** * The #GdkSeat object represents a collection of input devices * that belong to a user. */ public class Seat : ObjectG { /** the main Gtk struct */ protected GdkSeat* gdkSeat; /** Get the main Gtk struct */ public GdkSeat* getSeatStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkSeat; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkSeat; } protected override void setStruct(GObject* obj) { gdkSeat = cast(GdkSeat*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkSeat* gdkSeat, bool ownedRef = false) { this.gdkSeat = gdkSeat; super(cast(GObject*)gdkSeat, ownedRef); } /** */ public static GType getType() { return gdk_seat_get_type(); } /** * Returns the capabilities this #GdkSeat currently has. * * Returns: the seat capabilities * * Since: 3.20 */ public GdkSeatCapabilities getCapabilities() { return gdk_seat_get_capabilities(gdkSeat); } /** * Returns the #GdkDisplay this seat belongs to. * * Returns: a #GdkDisplay. This object is owned by GTK+ * and must not be freed. */ public Display getDisplay() { auto p = gdk_seat_get_display(gdkSeat); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Returns the master device that routes keyboard events. * * Returns: a master #GdkDevice with keyboard * capabilities. This object is owned by GTK+ and must not be freed. * * Since: 3.20 */ public Device getKeyboard() { auto p = gdk_seat_get_keyboard(gdkSeat); if(p is null) { return null; } return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); } /** * Returns the master device that routes pointer events. * * Returns: a master #GdkDevice with pointer * capabilities. This object is owned by GTK+ and must not be freed. * * Since: 3.20 */ public Device getPointer() { auto p = gdk_seat_get_pointer(gdkSeat); if(p is null) { return null; } return ObjectG.getDObject!(Device)(cast(GdkDevice*) p); } /** * Returns the slave devices that match the given capabilities. * * Params: * capabilities = capabilities to get devices for * * Returns: A list of #GdkDevices. * The list must be freed with g_list_free(), the elements are owned * by GDK and must not be freed. * * Since: 3.20 */ public ListG getSlaves(GdkSeatCapabilities capabilities) { auto p = gdk_seat_get_slaves(gdkSeat, capabilities); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Grabs the seat so that all events corresponding to the given @capabilities * are passed to this application until the seat is ungrabbed with gdk_seat_ungrab(), * or the window becomes hidden. This overrides any previous grab on the * seat by this client. * * As a rule of thumb, if a grab is desired over %GDK_SEAT_CAPABILITY_POINTER, * all other "pointing" capabilities (eg. %GDK_SEAT_CAPABILITY_TOUCH) should * be grabbed too, so the user is able to interact with all of those while * the grab holds, you should thus use %GDK_SEAT_CAPABILITY_ALL_POINTING most * commonly. * * Grabs are used for operations which need complete control over the * events corresponding to the given capabilities. For example in GTK+ this * is used for Drag and Drop operations, popup menus and such. * * Note that if the event mask of a #GdkWindow has selected both button press * and button release events, or touch begin and touch end, then a press event * will cause an automatic grab until the button is released, equivalent to a * grab on the window with @owner_events set to %TRUE. This is done because most * applications expect to receive paired press and release events. * * If you set up anything at the time you take the grab that needs to be * cleaned up when the grab ends, you should handle the #GdkEventGrabBroken * events that are emitted when the grab ends unvoluntarily. * * Params: * window = the #GdkWindow which will own the grab * capabilities = capabilities that will be grabbed * ownerEvents = if %FALSE then all device events are reported with respect to * @window and are only reported if selected by @event_mask. If * %TRUE then pointer events for this application are reported * as normal, but pointer events outside this application are * reported with respect to @window and only if selected by * @event_mask. In either mode, unreported events are discarded. * cursor = the cursor to display while the grab is active. If * this is %NULL then the normal cursors are used for * @window and its descendants, and the cursor for @window is used * elsewhere. * event = the event that is triggering the grab, or %NULL if none * is available. * prepareFunc = function to * prepare the window to be grabbed, it can be %NULL if @window is * visible before this call. * prepareFuncData = user data to pass to @prepare_func * * Returns: %GDK_GRAB_SUCCESS if the grab was successful. * * Since: 3.20 */ public GdkGrabStatus grab(Window window, GdkSeatCapabilities capabilities, bool ownerEvents, Cursor cursor, Event event, GdkSeatGrabPrepareFunc prepareFunc, void* prepareFuncData) { return gdk_seat_grab(gdkSeat, (window is null) ? null : window.getWindowStruct(), capabilities, ownerEvents, (cursor is null) ? null : cursor.getCursorStruct(), (event is null) ? null : event.getEventStruct(), prepareFunc, prepareFuncData); } /** * Releases a grab added through gdk_seat_grab(). * * Since: 3.20 */ public void ungrab() { gdk_seat_ungrab(gdkSeat); } protected class OnDeviceAddedDelegateWrapper { void delegate(Device, Seat) dlg; gulong handlerId; this(void delegate(Device, Seat) dlg) { this.dlg = dlg; onDeviceAddedListeners ~= this; } void remove(OnDeviceAddedDelegateWrapper source) { foreach(index, wrapper; onDeviceAddedListeners) { if (wrapper.handlerId == source.handlerId) { onDeviceAddedListeners[index] = null; onDeviceAddedListeners = std.algorithm.remove(onDeviceAddedListeners, index); break; } } } } OnDeviceAddedDelegateWrapper[] onDeviceAddedListeners; /** * The ::device-added signal is emitted when a new input * device is related to this seat. * * Params: * device = the newly added #GdkDevice. * * Since: 3.20 */ gulong addOnDeviceAdded(void delegate(Device, Seat) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDeviceAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "device-added", cast(GCallback)&callBackDeviceAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackDeviceAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDeviceAdded(GdkSeat* seatStruct, GdkDevice* device, OnDeviceAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Device)(device), wrapper.outer); } extern(C) static void callBackDeviceAddedDestroy(OnDeviceAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDeviceRemovedDelegateWrapper { void delegate(Device, Seat) dlg; gulong handlerId; this(void delegate(Device, Seat) dlg) { this.dlg = dlg; onDeviceRemovedListeners ~= this; } void remove(OnDeviceRemovedDelegateWrapper source) { foreach(index, wrapper; onDeviceRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onDeviceRemovedListeners[index] = null; onDeviceRemovedListeners = std.algorithm.remove(onDeviceRemovedListeners, index); break; } } } } OnDeviceRemovedDelegateWrapper[] onDeviceRemovedListeners; /** * The ::device-removed signal is emitted when an * input device is removed (e.g. unplugged). * * Params: * device = the just removed #GdkDevice. * * Since: 3.20 */ gulong addOnDeviceRemoved(void delegate(Device, Seat) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDeviceRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "device-removed", cast(GCallback)&callBackDeviceRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackDeviceRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDeviceRemoved(GdkSeat* seatStruct, GdkDevice* device, OnDeviceRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Device)(device), wrapper.outer); } extern(C) static void callBackDeviceRemovedDestroy(OnDeviceRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnToolAddedDelegateWrapper { void delegate(DeviceTool, Seat) dlg; gulong handlerId; this(void delegate(DeviceTool, Seat) dlg) { this.dlg = dlg; onToolAddedListeners ~= this; } void remove(OnToolAddedDelegateWrapper source) { foreach(index, wrapper; onToolAddedListeners) { if (wrapper.handlerId == source.handlerId) { onToolAddedListeners[index] = null; onToolAddedListeners = std.algorithm.remove(onToolAddedListeners, index); break; } } } } OnToolAddedDelegateWrapper[] onToolAddedListeners; /** * The ::tool-added signal is emitted whenever a new tool * is made known to the seat. The tool may later be assigned * to a device (i.e. on proximity with a tablet). The device * will emit the #GdkDevice::tool-changed signal accordingly. * * A same tool may be used by several devices. * * Params: * tool = the new #GdkDeviceTool known to the seat * * Since: 3.22 */ gulong addOnToolAdded(void delegate(DeviceTool, Seat) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnToolAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "tool-added", cast(GCallback)&callBackToolAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackToolAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackToolAdded(GdkSeat* seatStruct, GdkDeviceTool* tool, OnToolAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DeviceTool)(tool), wrapper.outer); } extern(C) static void callBackToolAddedDestroy(OnToolAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnToolRemovedDelegateWrapper { void delegate(DeviceTool, Seat) dlg; gulong handlerId; this(void delegate(DeviceTool, Seat) dlg) { this.dlg = dlg; onToolRemovedListeners ~= this; } void remove(OnToolRemovedDelegateWrapper source) { foreach(index, wrapper; onToolRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onToolRemovedListeners[index] = null; onToolRemovedListeners = std.algorithm.remove(onToolRemovedListeners, index); break; } } } } OnToolRemovedDelegateWrapper[] onToolRemovedListeners; /** * This signal is emitted whenever a tool is no longer known * to this @seat. * * Params: * tool = the just removed #GdkDeviceTool * * Since: 3.22 */ gulong addOnToolRemoved(void delegate(DeviceTool, Seat) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnToolRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "tool-removed", cast(GCallback)&callBackToolRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackToolRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackToolRemoved(GdkSeat* seatStruct, GdkDeviceTool* tool, OnToolRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DeviceTool)(tool), wrapper.outer); } extern(C) static void callBackToolRemovedDestroy(OnToolRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gdk/Selection.d000066400000000000000000000177711324604450400201240ustar00rootroot00000000000000/* * 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 gdk.Selection; private import gdk.Display; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.gdktypes; /** */ public struct Selection { /** * Retrieves the contents of a selection in a given * form. * * Params: * requestor = a #GdkWindow. * selection = an atom identifying the selection to get the * contents of. * target = the form in which to retrieve the selection. * time = the timestamp to use when retrieving the * selection. The selection owner may refuse the * request if it did not own the selection at * the time indicated by the timestamp. */ public static void convert(Window requestor, GdkAtom selection, GdkAtom target, uint time) { gdk_selection_convert((requestor is null) ? null : requestor.getWindowStruct(), selection, target, time); } /** * Determines the owner of the given selection. * * Params: * selection = an atom indentifying a selection. * * Returns: if there is a selection owner * for this window, and it is a window known to the current process, * the #GdkWindow that owns the selection, otherwise %NULL. Note * that the return value may be owned by a different process if a * foreign window was previously created for that window, but a new * foreign window will never be created by this call. */ public static Window ownerGet(GdkAtom selection) { auto p = gdk_selection_owner_get(selection); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Determine the owner of the given selection. * * Note that the return value may be owned by a different * process if a foreign window was previously created for that * window, but a new foreign window will never be created by this call. * * Params: * display = a #GdkDisplay * selection = an atom indentifying a selection * * Returns: if there is a selection owner * for this window, and it is a window known to the current * process, the #GdkWindow that owns the selection, otherwise * %NULL. * * Since: 2.2 */ public static Window ownerGetForDisplay(Display display, GdkAtom selection) { auto p = gdk_selection_owner_get_for_display((display is null) ? null : display.getDisplayStruct(), selection); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Sets the owner of the given selection. * * Params: * owner = a #GdkWindow or %NULL to indicate that the * the owner for the given should be unset. * selection = an atom identifying a selection. * time = timestamp to use when setting the selection. * If this is older than the timestamp given last * time the owner was set for the given selection, the * request will be ignored. * sendEvent = if %TRUE, and the new owner is different * from the current owner, the current owner * will be sent a SelectionClear event. * * Returns: %TRUE if the selection owner was successfully * changed to @owner, otherwise %FALSE. */ public static bool ownerSet(Window owner, GdkAtom selection, uint time, bool sendEvent) { return gdk_selection_owner_set((owner is null) ? null : owner.getWindowStruct(), selection, time, sendEvent) != 0; } /** * Sets the #GdkWindow @owner as the current owner of the selection @selection. * * Params: * display = the #GdkDisplay * owner = a #GdkWindow or %NULL to indicate that the owner for * the given should be unset * selection = an atom identifying a selection * time = timestamp to use when setting the selection * If this is older than the timestamp given last time the owner was * set for the given selection, the request will be ignored * sendEvent = if %TRUE, and the new owner is different from the current * owner, the current owner will be sent a SelectionClear event * * Returns: %TRUE if the selection owner was successfully changed to owner, * otherwise %FALSE. * * Since: 2.2 */ public static bool ownerSetForDisplay(Display display, Window owner, GdkAtom selection, uint time, bool sendEvent) { return gdk_selection_owner_set_for_display((display is null) ? null : display.getDisplayStruct(), (owner is null) ? null : owner.getWindowStruct(), selection, time, sendEvent) != 0; } /** * Retrieves selection data that was stored by the selection * data in response to a call to gdk_selection_convert(). This function * will not be used by applications, who should use the #GtkClipboard * API instead. * * Params: * requestor = the window on which the data is stored * data = location to store a pointer to the retrieved data. * If the retrieval failed, %NULL we be stored here, otherwise, it * will be non-%NULL and the returned data should be freed with g_free() * when you are finished using it. The length of the * allocated memory is one more than the length * of the returned data, and the final byte will always * be zero, to ensure nul-termination of strings * propType = location to store the type of the property * propFormat = location to store the format of the property * * Returns: the length of the retrieved data. */ public static int propertyGet(Window requestor, out char* data, GdkAtom* propType, int* propFormat) { return gdk_selection_property_get((requestor is null) ? null : requestor.getWindowStruct(), &data, propType, propFormat); } /** * Sends a response to SelectionRequest event. * * Params: * requestor = window to which to deliver response. * selection = selection that was requested. * target = target that was selected. * property = property in which the selection owner stored the * data, or %GDK_NONE to indicate that the request * was rejected. * time = timestamp. */ public static void sendNotify(Window requestor, GdkAtom selection, GdkAtom target, GdkAtom property, uint time) { gdk_selection_send_notify((requestor is null) ? null : requestor.getWindowStruct(), selection, target, property, time); } /** * Send a response to SelectionRequest event. * * Params: * display = the #GdkDisplay where @requestor is realized * requestor = window to which to deliver response * selection = selection that was requested * target = target that was selected * property = property in which the selection owner stored the data, * or %GDK_NONE to indicate that the request was rejected * time = timestamp * * Since: 2.2 */ public static void sendNotifyForDisplay(Display display, Window requestor, GdkAtom selection, GdkAtom target, GdkAtom property, uint time) { gdk_selection_send_notify_for_display((display is null) ? null : display.getDisplayStruct(), (requestor is null) ? null : requestor.getWindowStruct(), selection, target, property, time); } } GtkD-3.7.5/generated/gtkd/gdk/Testing.d000066400000000000000000000111641324604450400176020ustar00rootroot00000000000000/* * 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 gdk.Testing; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; public import gtkc.gdktypes; /** */ public struct Testing { /** * Retrieves a pixel from @window to force the windowing * system to carry out any pending rendering commands. * * This function is intended to be used to synchronize with rendering * pipelines, to benchmark windowing system rendering operations. * * Params: * window = a mapped #GdkWindow * * Since: 2.14 */ public static void testRenderSync(Window window) { gdk_test_render_sync((window is null) ? null : window.getWindowStruct()); } /** * This function is intended to be used in GTK+ test programs. * It will warp the mouse pointer to the given (@x,@y) coordinates * within @window and simulate a button press or release event. * Because the mouse pointer needs to be warped to the target * location, use of this function outside of test programs that * run in their own virtual windowing system (e.g. Xvfb) is not * recommended. * * Also, gdk_test_simulate_button() is a fairly low level function, * for most testing purposes, gtk_test_widget_click() is the right * function to call which will generate a button press event followed * by its accompanying button release event. * * Params: * window = a #GdkWindow to simulate a button event for * x = x coordinate within @window for the button event * y = y coordinate within @window for the button event * button = Number of the pointer button for the event, usually 1, 2 or 3 * modifiers = Keyboard modifiers the event is setup with * buttonPressrelease = either %GDK_BUTTON_PRESS or %GDK_BUTTON_RELEASE * * Returns: whether all actions necessary for a button event simulation * were carried out successfully * * Since: 2.14 */ public static bool testSimulateButton(Window window, int x, int y, uint button, GdkModifierType modifiers, GdkEventType buttonPressrelease) { return gdk_test_simulate_button((window is null) ? null : window.getWindowStruct(), x, y, button, modifiers, buttonPressrelease) != 0; } /** * This function is intended to be used in GTK+ test programs. * If (@x,@y) are > (-1,-1), it will warp the mouse pointer to * the given (@x,@y) coordinates within @window and simulate a * key press or release event. * * When the mouse pointer is warped to the target location, use * of this function outside of test programs that run in their * own virtual windowing system (e.g. Xvfb) is not recommended. * If (@x,@y) are passed as (-1,-1), the mouse pointer will not * be warped and @window origin will be used as mouse pointer * location for the event. * * Also, gdk_test_simulate_key() is a fairly low level function, * for most testing purposes, gtk_test_widget_send_key() is the * right function to call which will generate a key press event * followed by its accompanying key release event. * * Params: * window = a #GdkWindow to simulate a key event for * x = x coordinate within @window for the key event * y = y coordinate within @window for the key event * keyval = A GDK keyboard value * modifiers = Keyboard modifiers the event is setup with * keyPressrelease = either %GDK_KEY_PRESS or %GDK_KEY_RELEASE * * Returns: whether all actions necessary for a key event simulation * were carried out successfully * * Since: 2.14 */ public static bool testSimulateKey(Window window, int x, int y, uint keyval, GdkModifierType modifiers, GdkEventType keyPressrelease) { return gdk_test_simulate_key((window is null) ? null : window.getWindowStruct(), x, y, keyval, modifiers, keyPressrelease) != 0; } } GtkD-3.7.5/generated/gtkd/gdk/Threads.d000066400000000000000000000232721324604450400175620ustar00rootroot00000000000000/* * 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 gdk.Threads; private import gdk.c.functions; public import gdk.c.types; public import gtkc.gdktypes; /** */ /** * A wrapper for the common usage of gdk_threads_add_idle_full() * assigning the default priority, #G_PRIORITY_DEFAULT_IDLE. * * See gdk_threads_add_idle_full(). * * Params: * funct = function to call * data = data to pass to @function * * Returns: the ID (greater than 0) of the event source. * * Since: 2.12 */ public uint threadsAddIdle(GSourceFunc funct, void* data) { return gdk_threads_add_idle(funct, data); } /** * Adds a function to be called whenever there are no higher priority * events pending. If the function returns %FALSE it is automatically * removed from the list of event sources and will not be called again. * * This variant of g_idle_add_full() calls @function with the GDK lock * held. It can be thought of a MT-safe version for GTK+ widgets for the * following use case, where you have to worry about idle_callback() * running in thread A and accessing @self after it has been finalized * in thread B: * * |[ * static gboolean * idle_callback (gpointer data) * { * // gdk_threads_enter(); would be needed for g_idle_add() * * SomeWidget *self = data; * // do stuff with self * * self->idle_id = 0; * * // gdk_threads_leave(); would be needed for g_idle_add() * return FALSE; * } * * static void * some_widget_do_stuff_later (SomeWidget *self) * { * self->idle_id = gdk_threads_add_idle (idle_callback, self) * // using g_idle_add() here would require thread protection in the callback * } * * static void * some_widget_finalize (GObject *object) * { * SomeWidget *self = SOME_WIDGET (object); * if (self->idle_id) * g_source_remove (self->idle_id); * G_OBJECT_CLASS (parent_class)->finalize (object); * } * ]| * * Params: * priority = the priority of the idle source. Typically this will be in the * range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE * funct = function to call * data = data to pass to @function * notify = function to call when the idle is removed, or %NULL * * Returns: the ID (greater than 0) of the event source. * * Since: 2.12 */ public uint threadsAddIdleFull(int priority, GSourceFunc funct, void* data, GDestroyNotify notify) { return gdk_threads_add_idle_full(priority, funct, data, notify); } /** * A wrapper for the common usage of gdk_threads_add_timeout_full() * assigning the default priority, #G_PRIORITY_DEFAULT. * * See gdk_threads_add_timeout_full(). * * Params: * interval = the time between calls to the function, in milliseconds * (1/1000ths of a second) * funct = function to call * data = data to pass to @function * * Returns: the ID (greater than 0) of the event source. * * Since: 2.12 */ public uint threadsAddTimeout(uint interval, GSourceFunc funct, void* data) { return gdk_threads_add_timeout(interval, funct, data); } /** * Sets a function to be called at regular intervals holding the GDK lock, * with the given priority. The function is called repeatedly until it * returns %FALSE, at which point the timeout is automatically destroyed * and the function will not be called again. The @notify function is * called when the timeout is destroyed. The first call to the * function will be at the end of the first @interval. * * Note that timeout functions may be delayed, due to the processing of other * event sources. Thus they should not be relied on for precise timing. * After each call to the timeout function, the time of the next * timeout is recalculated based on the current time and the given interval * (it does not try to “catch up” time lost in delays). * * This variant of g_timeout_add_full() can be thought of a MT-safe version * for GTK+ widgets for the following use case: * * |[ * static gboolean timeout_callback (gpointer data) * { * SomeWidget *self = data; * * // do stuff with self * * self->timeout_id = 0; * * return G_SOURCE_REMOVE; * } * * static void some_widget_do_stuff_later (SomeWidget *self) * { * self->timeout_id = g_timeout_add (timeout_callback, self) * } * * static void some_widget_finalize (GObject *object) * { * SomeWidget *self = SOME_WIDGET (object); * * if (self->timeout_id) * g_source_remove (self->timeout_id); * * G_OBJECT_CLASS (parent_class)->finalize (object); * } * ]| * * Params: * priority = the priority of the timeout source. Typically this will be in the * range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. * interval = the time between calls to the function, in milliseconds * (1/1000ths of a second) * funct = function to call * data = data to pass to @function * notify = function to call when the timeout is removed, or %NULL * * Returns: the ID (greater than 0) of the event source. * * Since: 2.12 */ public uint threadsAddTimeoutFull(int priority, uint interval, GSourceFunc funct, void* data, GDestroyNotify notify) { return gdk_threads_add_timeout_full(priority, interval, funct, data, notify); } /** * A wrapper for the common usage of gdk_threads_add_timeout_seconds_full() * assigning the default priority, #G_PRIORITY_DEFAULT. * * For details, see gdk_threads_add_timeout_full(). * * Params: * interval = the time between calls to the function, in seconds * funct = function to call * data = data to pass to @function * * Returns: the ID (greater than 0) of the event source. * * Since: 2.14 */ public uint threadsAddTimeoutSeconds(uint interval, GSourceFunc funct, void* data) { return gdk_threads_add_timeout_seconds(interval, funct, data); } /** * A variant of gdk_threads_add_timeout_full() with second-granularity. * See g_timeout_add_seconds_full() for a discussion of why it is * a good idea to use this function if you don’t need finer granularity. * * Params: * priority = the priority of the timeout source. Typically this will be in the * range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. * interval = the time between calls to the function, in seconds * funct = function to call * data = data to pass to @function * notify = function to call when the timeout is removed, or %NULL * * Returns: the ID (greater than 0) of the event source. * * Since: 2.14 */ public uint threadsAddTimeoutSecondsFull(int priority, uint interval, GSourceFunc funct, void* data, GDestroyNotify notify) { return gdk_threads_add_timeout_seconds_full(priority, interval, funct, data, notify); } /** * This function marks the beginning of a critical section in which * GDK and GTK+ functions can be called safely and without causing race * conditions. Only one thread at a time can be in such a critial * section. * * Deprecated: All GDK and GTK+ calls should be made from the main * thread */ public void threadsEnter() { gdk_threads_enter(); } /** * Initializes GDK so that it can be used from multiple threads * in conjunction with gdk_threads_enter() and gdk_threads_leave(). * * This call must be made before any use of the main loop from * GTK+; to be safe, call it before gtk_init(). * * Deprecated: All GDK and GTK+ calls should be made from the main * thread */ public void threadsInit() { gdk_threads_init(); } /** * Leaves a critical region begun with gdk_threads_enter(). * * Deprecated: All GDK and GTK+ calls should be made from the main * thread */ public void threadsLeave() { gdk_threads_leave(); } /** * Allows the application to replace the standard method that * GDK uses to protect its data structures. Normally, GDK * creates a single #GMutex that is locked by gdk_threads_enter(), * and released by gdk_threads_leave(); using this function an * application provides, instead, a function @enter_fn that is * called by gdk_threads_enter() and a function @leave_fn that is * called by gdk_threads_leave(). * * The functions must provide at least same locking functionality * as the default implementation, but can also do extra application * specific processing. * * As an example, consider an application that has its own recursive * lock that when held, holds the GTK+ lock as well. When GTK+ unlocks * the GTK+ lock when entering a recursive main loop, the application * must temporarily release its lock as well. * * Most threaded GTK+ apps won’t need to use this method. * * This method must be called before gdk_threads_init(), and cannot * be called multiple times. * * Deprecated: All GDK and GTK+ calls should be made from the main * thread * * Params: * enterFn = function called to guard GDK * leaveFn = function called to release the guard * * Since: 2.4 */ public void threadsSetLockFunctions(GCallback enterFn, GCallback leaveFn) { gdk_threads_set_lock_functions(enterFn, leaveFn); } GtkD-3.7.5/generated/gtkd/gdk/Visual.d000066400000000000000000000300501324604450400174230ustar00rootroot00000000000000/* * 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 gdk.Visual; private import gdk.Screen; private import gdk.c.functions; public import gdk.c.types; private import glib.ListG; private import gobject.ObjectG; public import gtkc.gdktypes; /** * A #GdkVisual contains information about * a particular visual. */ public class Visual : ObjectG { /** the main Gtk struct */ protected GdkVisual* gdkVisual; /** Get the main Gtk struct */ public GdkVisual* getVisualStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkVisual; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkVisual; } protected override void setStruct(GObject* obj) { gdkVisual = cast(GdkVisual*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkVisual* gdkVisual, bool ownedRef = false) { this.gdkVisual = gdkVisual; super(cast(GObject*)gdkVisual, ownedRef); } /** */ public static GType getType() { return gdk_visual_get_type(); } /** * Get the visual with the most available colors for the default * GDK screen. The return value should not be freed. * * Deprecated: Visual selection should be done using * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() * * Returns: best visual */ public static Visual getBest() { auto p = gdk_visual_get_best(); if(p is null) { return null; } return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); } /** * Get the best available depth for the default GDK screen. “Best” * means “largest,” i.e. 32 preferred over 24 preferred over 8 bits * per pixel. * * Deprecated: Visual selection should be done using * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() * * Returns: best available depth */ public static int getBestDepth() { return gdk_visual_get_best_depth(); } /** * Return the best available visual type for the default GDK screen. * * Deprecated: Visual selection should be done using * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() * * Returns: best visual type */ public static GdkVisualType getBestType() { return gdk_visual_get_best_type(); } /** * Combines gdk_visual_get_best_with_depth() and * gdk_visual_get_best_with_type(). * * Deprecated: Visual selection should be done using * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() * * Params: * depth = a bit depth * visualType = a visual type * * Returns: best visual with both @depth * and @visual_type, or %NULL if none */ public static Visual getBestWithBoth(int depth, GdkVisualType visualType) { auto p = gdk_visual_get_best_with_both(depth, visualType); if(p is null) { return null; } return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); } /** * Get the best visual with depth @depth for the default GDK screen. * Color visuals and visuals with mutable colormaps are preferred * over grayscale or fixed-colormap visuals. The return value should * not be freed. %NULL may be returned if no visual supports @depth. * * Deprecated: Visual selection should be done using * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() * * Params: * depth = a bit depth * * Returns: best visual for the given depth */ public static Visual getBestWithDepth(int depth) { auto p = gdk_visual_get_best_with_depth(depth); if(p is null) { return null; } return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); } /** * Get the best visual of the given @visual_type for the default GDK screen. * Visuals with higher color depths are considered better. The return value * should not be freed. %NULL may be returned if no visual has type * @visual_type. * * Deprecated: Visual selection should be done using * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() * * Params: * visualType = a visual type * * Returns: best visual of the given type */ public static Visual getBestWithType(GdkVisualType visualType) { auto p = gdk_visual_get_best_with_type(visualType); if(p is null) { return null; } return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); } /** * Get the system’s default visual for the default GDK screen. * This is the visual for the root window of the display. * The return value should not be freed. * * Deprecated: Use gdk_screen_get_system_visual (gdk_screen_get_default ()). * * Returns: system visual */ public static Visual getSystem() { auto p = gdk_visual_get_system(); if(p is null) { return null; } return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); } /** * Returns the number of significant bits per red, green and blue value. * * Not all GDK backend provide a meaningful value for this function. * * Deprecated: Use gdk_visual_get_red_pixel_details() and its variants to * learn about the pixel layout of TrueColor and DirectColor visuals * * Returns: The number of significant bits per color value for @visual. * * Since: 2.22 */ public int getBitsPerRgb() { return gdk_visual_get_bits_per_rgb(gdkVisual); } /** * Obtains values that are needed to calculate blue pixel values in TrueColor * and DirectColor. The “mask” is the significant bits within the pixel. * The “shift” is the number of bits left we must shift a primary for it * to be in position (according to the "mask"). Finally, "precision" refers * to how much precision the pixel value contains for a particular primary. * * Params: * mask = A pointer to a #guint32 to be filled in, or %NULL * shift = A pointer to a #gint to be filled in, or %NULL * precision = A pointer to a #gint to be filled in, or %NULL * * Since: 2.22 */ public void getBluePixelDetails(out uint mask, out int shift, out int precision) { gdk_visual_get_blue_pixel_details(gdkVisual, &mask, &shift, &precision); } /** * Returns the byte order of this visual. * * The information returned by this function is only relevant * when working with XImages, and not all backends return * meaningful information for this. * * Deprecated: This information is not useful * * Returns: A #GdkByteOrder stating the byte order of @visual. * * Since: 2.22 */ public GdkByteOrder getByteOrder() { return gdk_visual_get_byte_order(gdkVisual); } /** * Returns the size of a colormap for this visual. * * You have to use platform-specific APIs to manipulate colormaps. * * Deprecated: This information is not useful, since GDK does not * provide APIs to operate on colormaps. * * Returns: The size of a colormap that is suitable for @visual. * * Since: 2.22 */ public int getColormapSize() { return gdk_visual_get_colormap_size(gdkVisual); } /** * Returns the bit depth of this visual. * * Returns: The bit depth of this visual. * * Since: 2.22 */ public int getDepth() { return gdk_visual_get_depth(gdkVisual); } /** * Obtains values that are needed to calculate green pixel values in TrueColor * and DirectColor. The “mask” is the significant bits within the pixel. * The “shift” is the number of bits left we must shift a primary for it * to be in position (according to the "mask"). Finally, "precision" refers * to how much precision the pixel value contains for a particular primary. * * Params: * mask = A pointer to a #guint32 to be filled in, or %NULL * shift = A pointer to a #gint to be filled in, or %NULL * precision = A pointer to a #gint to be filled in, or %NULL * * Since: 2.22 */ public void getGreenPixelDetails(out uint mask, out int shift, out int precision) { gdk_visual_get_green_pixel_details(gdkVisual, &mask, &shift, &precision); } /** * Obtains values that are needed to calculate red pixel values in TrueColor * and DirectColor. The “mask” is the significant bits within the pixel. * The “shift” is the number of bits left we must shift a primary for it * to be in position (according to the "mask"). Finally, "precision" refers * to how much precision the pixel value contains for a particular primary. * * Params: * mask = A pointer to a #guint32 to be filled in, or %NULL * shift = A pointer to a #gint to be filled in, or %NULL * precision = A pointer to a #gint to be filled in, or %NULL * * Since: 2.22 */ public void getRedPixelDetails(out uint mask, out int shift, out int precision) { gdk_visual_get_red_pixel_details(gdkVisual, &mask, &shift, &precision); } /** * Gets the screen to which this visual belongs * * Returns: the screen to which this visual belongs. * * Since: 2.2 */ public Screen getScreen() { auto p = gdk_visual_get_screen(gdkVisual); if(p is null) { return null; } return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); } /** * Returns the type of visual this is (PseudoColor, TrueColor, etc). * * Returns: A #GdkVisualType stating the type of @visual. * * Since: 2.22 */ public GdkVisualType getVisualType() { return gdk_visual_get_visual_type(gdkVisual); } /** * Lists the available visuals for the default screen. * (See gdk_screen_list_visuals()) * A visual describes a hardware image data format. * For example, a visual might support 24-bit color, or 8-bit color, * and might expect pixels to be in a certain format. * * Call g_list_free() on the return value when you’re finished with it. * * Deprecated: Use gdk_screen_list_visuals (gdk_screen_get_default ()). * * Returns: a list of visuals; the list must be freed, but not its contents */ public static ListG listVisuals() { auto p = gdk_list_visuals(); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * This function returns the available bit depths for the default * screen. It’s equivalent to listing the visuals * (gdk_list_visuals()) and then looking at the depth field in each * visual, removing duplicates. * * The array returned by this function should not be freed. * * Deprecated: Visual selection should be done using * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() * * Params: * depths = return * location for available depths */ public static void queryDepths(out int[] depths) { int* outdepths = null; int count; gdk_query_depths(&outdepths, &count); depths = outdepths[0 .. count]; } /** * This function returns the available visual types for the default * screen. It’s equivalent to listing the visuals * (gdk_list_visuals()) and then looking at the type field in each * visual, removing duplicates. * * The array returned by this function should not be freed. * * Deprecated: Visual selection should be done using * gdk_screen_get_system_visual() and gdk_screen_get_rgba_visual() * * Params: * visualTypes = return * location for the available visual types */ public static void queryVisualTypes(out GdkVisualType[] visualTypes) { GdkVisualType* outvisualTypes = null; int count; gdk_query_visual_types(&outvisualTypes, &count); visualTypes = outvisualTypes[0 .. count]; } } GtkD-3.7.5/generated/gtkd/gdk/Window.d000066400000000000000000003402151324604450400174360ustar00rootroot00000000000000/* * 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 gdk.Window; private import cairo.Context; private import cairo.Pattern; private import cairo.Region; private import cairo.Surface; private import gdk.Color; private import gdk.Cursor; private import gdk.Device; private import gdk.Display; private import gdk.DrawingContext; private import gdk.Event; private import gdk.FrameClock; private import gdk.GLContext; private import gdk.RGBA; private import gdk.Screen; private import gdk.Visual; private import gdk.c.functions; public import gdk.c.types; private import gdkpixbuf.Pixbuf; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdktypes; private import std.algorithm; /** */ public class Window : ObjectG { /** the main Gtk struct */ protected GdkWindow* gdkWindow; /** Get the main Gtk struct */ public GdkWindow* getWindowStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkWindow; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkWindow; } protected override void setStruct(GObject* obj) { gdkWindow = cast(GdkWindow*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkWindow* gdkWindow, bool ownedRef = false) { this.gdkWindow = gdkWindow; super(cast(GObject*)gdkWindow, ownedRef); } /** */ public static GType getType() { return gdk_window_get_type(); } /** * Creates a new #GdkWindow using the attributes from * @attributes. See #GdkWindowAttr and #GdkWindowAttributesType for * more details. Note: to use this on displays other than the default * display, @parent must be specified. * * Params: * parent = a #GdkWindow, or %NULL to create the window as a child of * the default root window for the default display. * attributes = attributes of the new window * attributesMask = mask indicating which * fields in @attributes are valid * * Returns: the new #GdkWindow * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Window parent, GdkWindowAttr* attributes, int attributesMask) { auto p = gdk_window_new((parent is null) ? null : parent.getWindowStruct(), attributes, attributesMask); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GdkWindow*) p, true); } /** * Obtains the window underneath the mouse pointer, returning the * location of that window in @win_x, @win_y. Returns %NULL if the * window under the mouse pointer is not known to GDK (if the window * belongs to another application and a #GdkWindow hasn’t been created * for it with gdk_window_foreign_new()) * * NOTE: For multihead-aware widgets or applications use * gdk_display_get_window_at_pointer() instead. * * Deprecated: Use gdk_device_get_window_at_position() instead. * * Params: * winX = return location for origin of the window under the pointer * winY = return location for origin of the window under the pointer * * Returns: window under the mouse pointer */ public static Window atPointer(out int winX, out int winY) { auto p = gdk_window_at_pointer(&winX, &winY); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Constrains a desired width and height according to a * set of geometry hints (such as minimum and maximum size). * * Params: * geometry = a #GdkGeometry structure * flags = a mask indicating what portions of @geometry are set * width = desired width of window * height = desired height of the window * newWidth = location to store resulting width * newHeight = location to store resulting height */ public static void constrainSize(GdkGeometry* geometry, GdkWindowHints flags, int width, int height, out int newWidth, out int newHeight) { gdk_window_constrain_size(geometry, flags, width, height, &newWidth, &newHeight); } /** * Calls gdk_window_process_updates() for all windows (see #GdkWindow) * in the application. */ public static void processAllUpdates() { gdk_window_process_all_updates(); } /** * With update debugging enabled, calls to * gdk_window_invalidate_region() clear the invalidated region of the * screen to a noticeable color, and GDK pauses for a short time * before sending exposes to windows during * gdk_window_process_updates(). The net effect is that you can see * the invalid region for each window and watch redraws as they * occur. This allows you to diagnose inefficiencies in your application. * * In essence, because the GDK rendering model prevents all flicker, * if you are redrawing the same region 400 times you may never * notice, aside from noticing a speed problem. Enabling update * debugging causes GTK to flicker slowly and noticeably, so you can * see exactly what’s being redrawn when, in what order. * * The --gtk-debug=updates command line option passed to GTK+ programs * enables this debug option at application startup time. That's * usually more useful than calling gdk_window_set_debug_updates() * yourself, though you might want to use this function to enable * updates sometime after application startup time. * * Params: * setting = %TRUE to turn on update debugging */ public static void setDebugUpdates(bool setting) { gdk_window_set_debug_updates(setting); } /** * Adds an event filter to @window, allowing you to intercept events * before they reach GDK. This is a low-level operation and makes it * easy to break GDK and/or GTK+, so you have to know what you're * doing. Pass %NULL for @window to get all events for all windows, * instead of events for a specific window. * * If you are interested in X GenericEvents, bear in mind that * XGetEventData() has been already called on the event, and * XFreeEventData() must not be called within @function. * * Params: * funct = filter callback * data = data to pass to filter callback */ public void addFilter(GdkFilterFunc funct, void* data) { gdk_window_add_filter(gdkWindow, funct, data); } /** * Emits a short beep associated to @window in the appropriate * display, if supported. Otherwise, emits a short beep on * the display just as gdk_display_beep(). * * Since: 2.12 */ public void beep() { gdk_window_beep(gdkWindow); } /** * Indicates that you are beginning the process of redrawing @region * on @window, and provides you with a #GdkDrawingContext. * * If @window is a top level #GdkWindow, backed by a native window * implementation, a backing store (offscreen buffer) large enough to * contain @region will be created. The backing store will be initialized * with the background color or background surface for @window. Then, all * drawing operations performed on @window will be diverted to the * backing store. When you call gdk_window_end_frame(), the contents of * the backing store will be copied to @window, making it visible * on screen. Only the part of @window contained in @region will be * modified; that is, drawing operations are clipped to @region. * * The net result of all this is to remove flicker, because the user * sees the finished product appear all at once when you call * gdk_window_end_draw_frame(). If you draw to @window directly without * calling gdk_window_begin_draw_frame(), the user may see flicker * as individual drawing operations are performed in sequence. * * When using GTK+, the widget system automatically places calls to * gdk_window_begin_draw_frame() and gdk_window_end_draw_frame() around * emissions of the `GtkWidget::draw` signal. That is, if you’re * drawing the contents of the widget yourself, you can assume that the * widget has a cleared background, is already set as the clip region, * and already has a backing store. Therefore in most cases, application * code in GTK does not need to call gdk_window_begin_draw_frame() * explicitly. * * Params: * region = a Cairo region * * Returns: a #GdkDrawingContext context that should be * used to draw the contents of the window; the returned context is owned * by GDK. * * Since: 3.22 */ public DrawingContext beginDrawFrame(Region region) { auto p = gdk_window_begin_draw_frame(gdkWindow, (region is null) ? null : region.getRegionStruct()); if(p is null) { return null; } return ObjectG.getDObject!(DrawingContext)(cast(GdkDrawingContext*) p); } /** * Begins a window move operation (for a toplevel window). * * This function assumes that the drag is controlled by the * client pointer device, use gdk_window_begin_move_drag_for_device() * to begin a drag with a different device. * * Params: * button = the button being used to drag, or 0 for a keyboard-initiated drag * rootX = root window X coordinate of mouse click that began the drag * rootY = root window Y coordinate of mouse click that began the drag * timestamp = timestamp of mouse click that began the drag */ public void beginMoveDrag(int button, int rootX, int rootY, uint timestamp) { gdk_window_begin_move_drag(gdkWindow, button, rootX, rootY, timestamp); } /** * Begins a window move operation (for a toplevel window). * You might use this function to implement a “window move grip,” for * example. The function works best with window managers that support the * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) * but has a fallback implementation for other window managers. * * Params: * device = the device used for the operation * button = the button being used to drag, or 0 for a keyboard-initiated drag * rootX = root window X coordinate of mouse click that began the drag * rootY = root window Y coordinate of mouse click that began the drag * timestamp = timestamp of mouse click that began the drag * * Since: 3.4 */ public void beginMoveDragForDevice(Device device, int button, int rootX, int rootY, uint timestamp) { gdk_window_begin_move_drag_for_device(gdkWindow, (device is null) ? null : device.getDeviceStruct(), button, rootX, rootY, timestamp); } /** * A convenience wrapper around gdk_window_begin_paint_region() which * creates a rectangular region for you. See * gdk_window_begin_paint_region() for details. * * Deprecated: Use gdk_window_begin_draw_frame() instead * * Params: * rectangle = rectangle you intend to draw to */ public void beginPaintRect(GdkRectangle* rectangle) { gdk_window_begin_paint_rect(gdkWindow, rectangle); } /** * Indicates that you are beginning the process of redrawing @region. * A backing store (offscreen buffer) large enough to contain @region * will be created. The backing store will be initialized with the * background color or background surface for @window. Then, all * drawing operations performed on @window will be diverted to the * backing store. When you call gdk_window_end_paint(), the backing * store will be copied to @window, making it visible onscreen. Only * the part of @window contained in @region will be modified; that is, * drawing operations are clipped to @region. * * The net result of all this is to remove flicker, because the user * sees the finished product appear all at once when you call * gdk_window_end_paint(). If you draw to @window directly without * calling gdk_window_begin_paint_region(), the user may see flicker * as individual drawing operations are performed in sequence. The * clipping and background-initializing features of * gdk_window_begin_paint_region() are conveniences for the * programmer, so you can avoid doing that work yourself. * * When using GTK+, the widget system automatically places calls to * gdk_window_begin_paint_region() and gdk_window_end_paint() around * emissions of the expose_event signal. That is, if you’re writing an * expose event handler, you can assume that the exposed area in * #GdkEventExpose has already been cleared to the window background, * is already set as the clip region, and already has a backing store. * Therefore in most cases, application code need not call * gdk_window_begin_paint_region(). (You can disable the automatic * calls around expose events on a widget-by-widget basis by calling * gtk_widget_set_double_buffered().) * * If you call this function multiple times before calling the * matching gdk_window_end_paint(), the backing stores are pushed onto * a stack. gdk_window_end_paint() copies the topmost backing store * onscreen, subtracts the topmost region from all other regions in * the stack, and pops the stack. All drawing operations affect only * the topmost backing store in the stack. One matching call to * gdk_window_end_paint() is required for each call to * gdk_window_begin_paint_region(). * * Deprecated: Use gdk_window_begin_draw_frame() instead * * Params: * region = region you intend to draw to */ public void beginPaintRegion(Region region) { gdk_window_begin_paint_region(gdkWindow, (region is null) ? null : region.getRegionStruct()); } /** * Begins a window resize operation (for a toplevel window). * * This function assumes that the drag is controlled by the * client pointer device, use gdk_window_begin_resize_drag_for_device() * to begin a drag with a different device. * * Params: * edge = the edge or corner from which the drag is started * button = the button being used to drag, or 0 for a keyboard-initiated drag * rootX = root window X coordinate of mouse click that began the drag * rootY = root window Y coordinate of mouse click that began the drag * timestamp = timestamp of mouse click that began the drag (use gdk_event_get_time()) */ public void beginResizeDrag(GdkWindowEdge edge, int button, int rootX, int rootY, uint timestamp) { gdk_window_begin_resize_drag(gdkWindow, edge, button, rootX, rootY, timestamp); } /** * Begins a window resize operation (for a toplevel window). * You might use this function to implement a “window resize grip,” for * example; in fact #GtkStatusbar uses it. The function works best * with window managers that support the * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) * but has a fallback implementation for other window managers. * * Params: * edge = the edge or corner from which the drag is started * device = the device used for the operation * button = the button being used to drag, or 0 for a keyboard-initiated drag * rootX = root window X coordinate of mouse click that began the drag * rootY = root window Y coordinate of mouse click that began the drag * timestamp = timestamp of mouse click that began the drag (use gdk_event_get_time()) * * Since: 3.4 */ public void beginResizeDragForDevice(GdkWindowEdge edge, Device device, int button, int rootX, int rootY, uint timestamp) { gdk_window_begin_resize_drag_for_device(gdkWindow, edge, (device is null) ? null : device.getDeviceStruct(), button, rootX, rootY, timestamp); } /** * Does nothing, present only for compatiblity. * * Deprecated: this function is no longer needed * * Since: 2.6 */ public void configureFinished() { gdk_window_configure_finished(gdkWindow); } /** * Transforms window coordinates from a parent window to a child * window, where the parent window is the normal parent as returned by * gdk_window_get_parent() for normal windows, and the window's * embedder as returned by gdk_offscreen_window_get_embedder() for * offscreen windows. * * For normal windows, calling this function is equivalent to subtracting * the return values of gdk_window_get_position() from the parent coordinates. * For offscreen windows however (which can be arbitrarily transformed), * this function calls the GdkWindow::from-embedder: signal to translate * the coordinates. * * You should always use this function when writing generic code that * walks down a window hierarchy. * * See also: gdk_window_coords_to_parent() * * Params: * parentX = X coordinate in parent’s coordinate system * parentY = Y coordinate in parent’s coordinate system * x = return location for X coordinate in child’s coordinate system * y = return location for Y coordinate in child’s coordinate system * * Since: 2.22 */ public void coordsFromParent(double parentX, double parentY, out double x, out double y) { gdk_window_coords_from_parent(gdkWindow, parentX, parentY, &x, &y); } /** * Transforms window coordinates from a child window to its parent * window, where the parent window is the normal parent as returned by * gdk_window_get_parent() for normal windows, and the window's * embedder as returned by gdk_offscreen_window_get_embedder() for * offscreen windows. * * For normal windows, calling this function is equivalent to adding * the return values of gdk_window_get_position() to the child coordinates. * For offscreen windows however (which can be arbitrarily transformed), * this function calls the GdkWindow::to-embedder: signal to translate * the coordinates. * * You should always use this function when writing generic code that * walks up a window hierarchy. * * See also: gdk_window_coords_from_parent() * * Params: * x = X coordinate in child’s coordinate system * y = Y coordinate in child’s coordinate system * parentX = return location for X coordinate * in parent’s coordinate system, or %NULL * parentY = return location for Y coordinate * in parent’s coordinate system, or %NULL * * Since: 2.22 */ public void coordsToParent(double x, double y, out double parentX, out double parentY) { gdk_window_coords_to_parent(gdkWindow, x, y, &parentX, &parentY); } /** * Creates a new #GdkGLContext matching the * framebuffer format to the visual of the #GdkWindow. The context * is disconnected from any particular window or surface. * * If the creation of the #GdkGLContext failed, @error will be set. * * Before using the returned #GdkGLContext, you will need to * call gdk_gl_context_make_current() or gdk_gl_context_realize(). * * Returns: the newly created #GdkGLContext, or * %NULL on error * * Since: 3.16 * * Throws: GException on failure. */ public GLContext createGlContext() { GError* err = null; auto p = gdk_window_create_gl_context(gdkWindow, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(GLContext)(cast(GdkGLContext*) p, true); } /** * Create a new image surface that is efficient to draw on the * given @window. * * Initially the surface contents are all 0 (transparent if contents * have transparency, black otherwise.) * * The @width and @height of the new surface are not affected by * the scaling factor of the @window, or by the @scale argument; they * are the size of the surface in device pixels. If you wish to create * an image surface capable of holding the contents of @window you can * use: * * |[ * int scale = gdk_window_get_scale_factor (window); * int width = gdk_window_get_width (window) * scale; * int height = gdk_window_get_height (window) * scale; * * // format is set elsewhere * cairo_surface_t *surface = * gdk_window_create_similar_image_surface (window, * format, * width, height, * scale); * ]| * * Note that unlike cairo_surface_create_similar_image(), the new * surface's device scale is set to @scale, or to the scale factor of * @window if @scale is 0. * * Params: * format = the format for the new surface * width = width of the new surface * height = height of the new surface * scale = the scale of the new surface, or 0 to use same as @window * * Returns: a pointer to the newly allocated surface. The caller * owns the surface and should call cairo_surface_destroy() when done * with it. * * This function always returns a valid pointer, but it will return a * pointer to a “nil” surface if @other is already in an error state * or any other error occurs. * * Since: 3.10 */ public Surface createSimilarImageSurface(cairo_format_t format, int width, int height, int scale) { auto p = gdk_window_create_similar_image_surface(gdkWindow, format, width, height, scale); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Create a new surface that is as compatible as possible with the * given @window. For example the new surface will have the same * fallback resolution and font options as @window. Generally, the new * surface will also use the same backend as @window, unless that is * not possible for some reason. The type of the returned surface may * be examined with cairo_surface_get_type(). * * Initially the surface contents are all 0 (transparent if contents * have transparency, black otherwise.) * * Params: * content = the content for the new surface * width = width of the new surface * height = height of the new surface * * Returns: a pointer to the newly allocated surface. The caller * owns the surface and should call cairo_surface_destroy() when done * with it. * * This function always returns a valid pointer, but it will return a * pointer to a “nil” surface if @other is already in an error state * or any other error occurs. * * Since: 2.22 */ public Surface createSimilarSurface(cairo_content_t content, int width, int height) { auto p = gdk_window_create_similar_surface(gdkWindow, content, width, height); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Attempt to deiconify (unminimize) @window. On X11 the window manager may * choose to ignore the request to deiconify. When using GTK+, * use gtk_window_deiconify() instead of the #GdkWindow variant. Or better yet, * you probably want to use gtk_window_present(), which raises the window, focuses it, * unminimizes it, and puts it on the current desktop. */ public void deiconify() { gdk_window_deiconify(gdkWindow); } /** * Destroys the window system resources associated with @window and decrements @window's * reference count. The window system resources for all children of @window are also * destroyed, but the children’s reference counts are not decremented. * * Note that a window will not be destroyed automatically when its reference count * reaches zero. You must call this function yourself before that happens. */ public void destroy() { gdk_window_destroy(gdkWindow); } /** */ public void destroyNotify() { gdk_window_destroy_notify(gdkWindow); } /** * Does nothing, present only for compatiblity. * * Deprecated: this function is no longer needed * * Since: 2.6 */ public void enableSynchronizedConfigure() { gdk_window_enable_synchronized_configure(gdkWindow); } /** * Indicates that the drawing of the contents of @window started with * gdk_window_begin_frame() has been completed. * * This function will take care of destroying the #GdkDrawingContext. * * It is an error to call this function without a matching * gdk_window_begin_frame() first. * * Params: * context = the #GdkDrawingContext created by gdk_window_begin_draw_frame() * * Since: 3.22 */ public void endDrawFrame(DrawingContext context) { gdk_window_end_draw_frame(gdkWindow, (context is null) ? null : context.getDrawingContextStruct()); } /** * Indicates that the backing store created by the most recent call * to gdk_window_begin_paint_region() should be copied onscreen and * deleted, leaving the next-most-recent backing store or no backing * store at all as the active paint region. See * gdk_window_begin_paint_region() for full details. * * It is an error to call this function without a matching * gdk_window_begin_paint_region() first. */ public void endPaint() { gdk_window_end_paint(gdkWindow); } /** * Tries to ensure that there is a window-system native window for this * GdkWindow. This may fail in some situations, returning %FALSE. * * Offscreen window and children of them can never have native windows. * * Some backends may not support native child windows. * * Returns: %TRUE if the window has a native window, %FALSE otherwise * * Since: 2.18 */ public bool ensureNative() { return gdk_window_ensure_native(gdkWindow) != 0; } /** * This function does nothing. * * Since: 2.18 */ public void flush() { gdk_window_flush(gdkWindow); } /** * Sets keyboard focus to @window. In most cases, gtk_window_present() * should be used on a #GtkWindow, rather than calling this function. * * Params: * timestamp = timestamp of the event triggering the window focus */ public void focus(uint timestamp) { gdk_window_focus(gdkWindow, timestamp); } /** * Temporarily freezes a window and all its descendants such that it won't * receive expose events. The window will begin receiving expose events * again when gdk_window_thaw_toplevel_updates_libgtk_only() is called. If * gdk_window_freeze_toplevel_updates_libgtk_only() * has been called more than once, * gdk_window_thaw_toplevel_updates_libgtk_only() must be called * an equal number of times to begin processing exposes. * * This function is not part of the GDK public API and is only * for use by GTK+. * * Deprecated: This symbol was never meant to be used outside of GTK+ */ public void freezeToplevelUpdatesLibgtkOnly() { gdk_window_freeze_toplevel_updates_libgtk_only(gdkWindow); } /** * Temporarily freezes a window such that it won’t receive expose * events. The window will begin receiving expose events again when * gdk_window_thaw_updates() is called. If gdk_window_freeze_updates() * has been called more than once, gdk_window_thaw_updates() must be called * an equal number of times to begin processing exposes. */ public void freezeUpdates() { gdk_window_freeze_updates(gdkWindow); } /** * Moves the window into fullscreen mode. This means the * window covers the entire screen and is above any panels * or task bars. * * If the window was already fullscreen, then this function does nothing. * * On X11, asks the window manager to put @window in a fullscreen * state, if the window manager supports this operation. Not all * window managers support this, and some deliberately ignore it or * don’t have a concept of “fullscreen”; so you can’t rely on the * fullscreenification actually happening. But it will happen with * most standard window managers, and GDK makes a best effort to get * it to happen. * * Since: 2.2 */ public void fullscreen() { gdk_window_fullscreen(gdkWindow); } /** * Moves the window into fullscreen mode on the given monitor. This means * the window covers the entire screen and is above any panels or task bars. * * If the window was already fullscreen, then this function does nothing. * * Params: * monitor = Which monitor to display fullscreen on. */ public void fullscreenOnMonitor(int monitor) { gdk_window_fullscreen_on_monitor(gdkWindow, monitor); } /** * This function informs GDK that the geometry of an embedded * offscreen window has changed. This is necessary for GDK to keep * track of which offscreen window the pointer is in. * * Since: 2.18 */ public void geometryChanged() { gdk_window_geometry_changed(gdkWindow); } /** * Determines whether or not the desktop environment shuld be hinted that * the window does not want to receive input focus. * * Returns: whether or not the window should receive input focus. * * Since: 2.22 */ public bool getAcceptFocus() { return gdk_window_get_accept_focus(gdkWindow) != 0; } /** * Gets the pattern used to clear the background on @window. If @window * does not have its own background and reuses the parent's, %NULL is * returned and you’ll have to query it yourself. * * Deprecated: Don't use this function * * Returns: The pattern to use for the * background or %NULL to use the parent’s background. * * Since: 2.22 */ public Pattern getBackgroundPattern() { auto p = gdk_window_get_background_pattern(gdkWindow); if(p is null) { return null; } return new Pattern(cast(cairo_pattern_t*) p); } /** * Gets the list of children of @window known to GDK. * This function only returns children created via GDK, * so for example it’s useless when used with the root window; * it only returns windows an application created itself. * * The returned list must be freed, but the elements in the * list need not be. * * Returns: list of child windows inside @window */ public ListG getChildren() { auto p = gdk_window_get_children(gdkWindow); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the list of children of @window known to GDK with a * particular @user_data set on it. * * The returned list must be freed, but the elements in the * list need not be. * * The list is returned in (relative) stacking order, i.e. the * lowest window is first. * * Params: * userData = user data to look for * * Returns: list of child windows inside @window * * Since: 3.10 */ public ListG getChildrenWithUserData(void* userData) { auto p = gdk_window_get_children_with_user_data(gdkWindow, userData); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Computes the region of a window that potentially can be written * to by drawing primitives. This region may not take into account * other factors such as if the window is obscured by other windows, * but no area outside of this region will be affected by drawing * primitives. * * Returns: a #cairo_region_t. This must be freed with cairo_region_destroy() * when you are done. */ public Region getClipRegion() { auto p = gdk_window_get_clip_region(gdkWindow); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Determines whether @window is composited. * * See gdk_window_set_composited(). * * Deprecated: Compositing is an outdated technology that * only ever worked on X11. * * Returns: %TRUE if the window is composited. * * Since: 2.22 */ public bool getComposited() { return gdk_window_get_composited(gdkWindow) != 0; } /** * Retrieves a #GdkCursor pointer for the cursor currently set on the * specified #GdkWindow, or %NULL. If the return value is %NULL then * there is no custom cursor set on the specified window, and it is * using the cursor for its parent window. * * Returns: a #GdkCursor, or %NULL. The * returned object is owned by the #GdkWindow and should not be * unreferenced directly. Use gdk_window_set_cursor() to unset the * cursor of the window * * Since: 2.18 */ public Cursor getCursor() { auto p = gdk_window_get_cursor(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) p); } /** * Returns the decorations set on the GdkWindow with * gdk_window_set_decorations(). * * Params: * decorations = The window decorations will be written here * * Returns: %TRUE if the window has decorations set, %FALSE otherwise. */ public bool getDecorations(out GdkWMDecoration decorations) { return gdk_window_get_decorations(gdkWindow, &decorations) != 0; } /** * Retrieves a #GdkCursor pointer for the @device currently set on the * specified #GdkWindow, or %NULL. If the return value is %NULL then * there is no custom cursor set on the specified window, and it is * using the cursor for its parent window. * * Params: * device = a master, pointer #GdkDevice. * * Returns: a #GdkCursor, or %NULL. The * returned object is owned by the #GdkWindow and should not be * unreferenced directly. Use gdk_window_set_cursor() to unset the * cursor of the window * * Since: 3.0 */ public Cursor getDeviceCursor(Device device) { auto p = gdk_window_get_device_cursor(gdkWindow, (device is null) ? null : device.getDeviceStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Cursor)(cast(GdkCursor*) p); } /** * Returns the event mask for @window corresponding to an specific device. * * Params: * device = a #GdkDevice. * * Returns: device event mask for @window * * Since: 3.0 */ public GdkEventMask getDeviceEvents(Device device) { return gdk_window_get_device_events(gdkWindow, (device is null) ? null : device.getDeviceStruct()); } /** * Obtains the current device position and modifier state. * The position is given in coordinates relative to the upper left * corner of @window. * * Use gdk_window_get_device_position_double() if you need subpixel precision. * * Params: * device = pointer #GdkDevice to query to. * x = return location for the X coordinate of @device, or %NULL. * y = return location for the Y coordinate of @device, or %NULL. * mask = return location for the modifier mask, or %NULL. * * Returns: The window underneath @device * (as with gdk_device_get_window_at_position()), or %NULL if the * window is not known to GDK. * * Since: 3.0 */ public Window getDevicePosition(Device device, out int x, out int y, out GdkModifierType mask) { auto p = gdk_window_get_device_position(gdkWindow, (device is null) ? null : device.getDeviceStruct(), &x, &y, &mask); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Obtains the current device position in doubles and modifier state. * The position is given in coordinates relative to the upper left * corner of @window. * * Params: * device = pointer #GdkDevice to query to. * x = return location for the X coordinate of @device, or %NULL. * y = return location for the Y coordinate of @device, or %NULL. * mask = return location for the modifier mask, or %NULL. * * Returns: The window underneath @device * (as with gdk_device_get_window_at_position()), or %NULL if the * window is not known to GDK. * * Since: 3.10 */ public Window getDevicePositionDouble(Device device, out double x, out double y, out GdkModifierType mask) { auto p = gdk_window_get_device_position_double(gdkWindow, (device is null) ? null : device.getDeviceStruct(), &x, &y, &mask); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Gets the #GdkDisplay associated with a #GdkWindow. * * Returns: the #GdkDisplay associated with @window * * Since: 2.24 */ public Display getDisplay() { auto p = gdk_window_get_display(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(Display)(cast(GdkDisplay*) p); } /** * Finds out the DND protocol supported by a window. * * Params: * target = location of the window * where the drop should happen. This may be @window or a proxy window, * or %NULL if @window does not support Drag and Drop. * * Returns: the supported DND protocol. * * Since: 3.0 */ public GdkDragProtocol getDragProtocol(out Window target) { GdkWindow* outtarget = null; auto p = gdk_window_get_drag_protocol(gdkWindow, &outtarget); target = ObjectG.getDObject!(Window)(outtarget); return p; } /** * Obtains the parent of @window, as known to GDK. Works like * gdk_window_get_parent() for normal windows, but returns the * window’s embedder for offscreen windows. * * See also: gdk_offscreen_window_get_embedder() * * Returns: effective parent of @window * * Since: 2.22 */ public Window getEffectiveParent() { auto p = gdk_window_get_effective_parent(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Gets the toplevel window that’s an ancestor of @window. * * Works like gdk_window_get_toplevel(), but treats an offscreen window's * embedder as its parent, using gdk_window_get_effective_parent(). * * See also: gdk_offscreen_window_get_embedder() * * Returns: the effective toplevel window containing @window * * Since: 2.22 */ public Window getEffectiveToplevel() { auto p = gdk_window_get_effective_toplevel(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Get the current event compression setting for this window. * * Returns: %TRUE if motion events will be compressed * * Since: 3.12 */ public bool getEventCompression() { return gdk_window_get_event_compression(gdkWindow) != 0; } /** * Gets the event mask for @window for all master input devices. See * gdk_window_set_events(). * * Returns: event mask for @window */ public GdkEventMask getEvents() { return gdk_window_get_events(gdkWindow); } /** * Determines whether or not the desktop environment should be hinted that the * window does not want to receive input focus when it is mapped. * * Returns: whether or not the window wants to receive input focus when * it is mapped. * * Since: 2.22 */ public bool getFocusOnMap() { return gdk_window_get_focus_on_map(gdkWindow) != 0; } /** * Gets the frame clock for the window. The frame clock for a window * never changes unless the window is reparented to a new toplevel * window. * * Returns: the frame clock * * Since: 3.8 */ public FrameClock getFrameClock() { auto p = gdk_window_get_frame_clock(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(FrameClock)(cast(GdkFrameClock*) p); } /** * Obtains the bounding box of the window, including window manager * titlebar/borders if any. The frame position is given in root window * coordinates. To get the position of the window itself (rather than * the frame) in root window coordinates, use gdk_window_get_origin(). * * Params: * rect = rectangle to fill with bounding box of the window frame */ public void getFrameExtents(out GdkRectangle rect) { gdk_window_get_frame_extents(gdkWindow, &rect); } /** * Obtains the #GdkFullscreenMode of the @window. * * Returns: The #GdkFullscreenMode applied to the window when fullscreen. * * Since: 3.8 */ public GdkFullscreenMode getFullscreenMode() { return gdk_window_get_fullscreen_mode(gdkWindow); } /** * Any of the return location arguments to this function may be %NULL, * if you aren’t interested in getting the value of that field. * * The X and Y coordinates returned are relative to the parent window * of @window, which for toplevels usually means relative to the * window decorations (titlebar, etc.) rather than relative to the * root window (screen-size background window). * * On the X11 platform, the geometry is obtained from the X server, * so reflects the latest position of @window; this may be out-of-sync * with the position of @window delivered in the most-recently-processed * #GdkEventConfigure. gdk_window_get_position() in contrast gets the * position from the most recent configure event. * * Note: If @window is not a toplevel, it is much better * to call gdk_window_get_position(), gdk_window_get_width() and * gdk_window_get_height() instead, because it avoids the roundtrip to * the X server and because these functions support the full 32-bit * coordinate space, whereas gdk_window_get_geometry() is restricted to * the 16-bit coordinates of X11. * * Params: * x = return location for X coordinate of window (relative to its parent) * y = return location for Y coordinate of window (relative to its parent) * width = return location for width of window * height = return location for height of window */ public void getGeometry(out int x, out int y, out int width, out int height) { gdk_window_get_geometry(gdkWindow, &x, &y, &width, &height); } /** * Returns the group leader window for @window. See gdk_window_set_group(). * * Returns: the group leader window for @window * * Since: 2.4 */ public Window getGroup() { auto p = gdk_window_get_group(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Returns the height of the given @window. * * On the X11 platform the returned size is the size reported in the * most-recently-processed configure event, rather than the current * size on the X server. * * Returns: The height of @window * * Since: 2.24 */ public int getHeight() { return gdk_window_get_height(gdkWindow); } /** * Determines whether or not the window manager is hinted that @window * has modal behaviour. * * Returns: whether or not the window has the modal hint set. * * Since: 2.22 */ public bool getModalHint() { return gdk_window_get_modal_hint(gdkWindow) != 0; } /** * Obtains the position of a window in root window coordinates. * (Compare with gdk_window_get_position() and * gdk_window_get_geometry() which return the position of a window * relative to its parent window.) * * Params: * x = return location for X coordinate * y = return location for Y coordinate * * Returns: not meaningful, ignore */ public int getOrigin(out int x, out int y) { return gdk_window_get_origin(gdkWindow, &x, &y); } /** * Obtains the parent of @window, as known to GDK. Does not query the * X server; thus this returns the parent as passed to gdk_window_new(), * not the actual parent. This should never matter unless you’re using * Xlib calls mixed with GDK calls on the X11 platform. It may also * matter for toplevel windows, because the window manager may choose * to reparent them. * * Note that you should use gdk_window_get_effective_parent() when * writing generic code that walks up a window hierarchy, because * gdk_window_get_parent() will most likely not do what you expect if * there are offscreen windows in the hierarchy. * * Returns: parent of @window */ public Window getParent() { auto p = gdk_window_get_parent(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Returns whether input to the window is passed through to the window * below. * * See gdk_window_set_pass_through() for details * * Since: 3.18 */ public bool getPassThrough() { return gdk_window_get_pass_through(gdkWindow) != 0; } /** * Obtains the current pointer position and modifier state. * The position is given in coordinates relative to the upper left * corner of @window. * * Deprecated: Use gdk_window_get_device_position() instead. * * Params: * x = return location for X coordinate of pointer or %NULL to not * return the X coordinate * y = return location for Y coordinate of pointer or %NULL to not * return the Y coordinate * mask = return location for modifier mask or %NULL to not return the * modifier mask * * Returns: the window containing the * pointer (as with gdk_window_at_pointer()), or %NULL if the window * containing the pointer isn’t known to GDK */ public Window getPointer(out int x, out int y, out GdkModifierType mask) { auto p = gdk_window_get_pointer(gdkWindow, &x, &y, &mask); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Obtains the position of the window as reported in the * most-recently-processed #GdkEventConfigure. Contrast with * gdk_window_get_geometry() which queries the X server for the * current window position, regardless of which events have been * received or processed. * * The position coordinates are relative to the window’s parent window. * * Params: * x = X coordinate of window * y = Y coordinate of window */ public void getPosition(out int x, out int y) { gdk_window_get_position(gdkWindow, &x, &y); } /** * Obtains the position of a window position in root * window coordinates. This is similar to * gdk_window_get_origin() but allows you to pass * in any position in the window, not just the origin. * * Params: * x = X coordinate in window * y = Y coordinate in window * rootX = return location for X coordinate * rootY = return location for Y coordinate * * Since: 2.18 */ public void getRootCoords(int x, int y, out int rootX, out int rootY) { gdk_window_get_root_coords(gdkWindow, x, y, &rootX, &rootY); } /** * Obtains the top-left corner of the window manager frame in root * window coordinates. * * Params: * x = return location for X position of window frame * y = return location for Y position of window frame */ public void getRootOrigin(out int x, out int y) { gdk_window_get_root_origin(gdkWindow, &x, &y); } /** * Returns the internal scale factor that maps from window coordiantes * to the actual device pixels. On traditional systems this is 1, but * on very high density outputs this can be a higher value (often 2). * * A higher value means that drawing is automatically scaled up to * a higher resolution, so any code doing drawing will automatically look * nicer. However, if you are supplying pixel-based data the scale * value can be used to determine whether to use a pixel resource * with higher resolution data. * * The scale of a window may change during runtime, if this happens * a configure event will be sent to the toplevel window. * * Returns: the scale factor * * Since: 3.10 */ public int getScaleFactor() { return gdk_window_get_scale_factor(gdkWindow); } /** * Gets the #GdkScreen associated with a #GdkWindow. * * Returns: the #GdkScreen associated with @window * * Since: 2.24 */ public Screen getScreen() { auto p = gdk_window_get_screen(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(Screen)(cast(GdkScreen*) p); } /** * Returns the event mask for @window corresponding to the device class specified * by @source. * * Params: * source = a #GdkInputSource to define the source class. * * Returns: source event mask for @window */ public GdkEventMask getSourceEvents(GdkInputSource source) { return gdk_window_get_source_events(gdkWindow, source); } /** * Gets the bitwise OR of the currently active window state flags, * from the #GdkWindowState enumeration. * * Returns: window state bitfield */ public GdkWindowState getState() { return gdk_window_get_state(gdkWindow); } /** * Returns %TRUE if the window is aware of the existence of multiple * devices. * * Returns: %TRUE if the window handles multidevice features. * * Since: 3.0 */ public bool getSupportMultidevice() { return gdk_window_get_support_multidevice(gdkWindow) != 0; } /** * Gets the toplevel window that’s an ancestor of @window. * * Any window type but %GDK_WINDOW_CHILD is considered a * toplevel window, as is a %GDK_WINDOW_CHILD window that * has a root window as parent. * * Note that you should use gdk_window_get_effective_toplevel() when * you want to get to a window’s toplevel as seen on screen, because * gdk_window_get_toplevel() will most likely not do what you expect * if there are offscreen windows in the hierarchy. * * Returns: the toplevel window containing @window */ public Window getToplevel() { auto p = gdk_window_get_toplevel(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * This function returns the type hint set for a window. * * Returns: The type hint set for @window * * Since: 2.10 */ public GdkWindowTypeHint getTypeHint() { return gdk_window_get_type_hint(gdkWindow); } /** * Transfers ownership of the update area from @window to the caller * of the function. That is, after calling this function, @window will * no longer have an invalid/dirty region; the update area is removed * from @window and handed to you. If a window has no update area, * gdk_window_get_update_area() returns %NULL. You are responsible for * calling cairo_region_destroy() on the returned region if it’s non-%NULL. * * Returns: the update area for @window */ public Region getUpdateArea() { auto p = gdk_window_get_update_area(gdkWindow); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Retrieves the user data for @window, which is normally the widget * that @window belongs to. See gdk_window_set_user_data(). * * Params: * data = return location for user data */ public void getUserData(out void* data) { gdk_window_get_user_data(gdkWindow, &data); } /** * Computes the region of the @window that is potentially visible. * This does not necessarily take into account if the window is * obscured by other windows, but no area outside of this region * is visible. * * Returns: a #cairo_region_t. This must be freed with cairo_region_destroy() * when you are done. */ public Region getVisibleRegion() { auto p = gdk_window_get_visible_region(gdkWindow); if(p is null) { return null; } return new Region(cast(cairo_region_t*) p); } /** * Gets the #GdkVisual describing the pixel format of @window. * * Returns: a #GdkVisual * * Since: 2.24 */ public Visual getVisual() { auto p = gdk_window_get_visual(gdkWindow); if(p is null) { return null; } return ObjectG.getDObject!(Visual)(cast(GdkVisual*) p); } /** * Returns the width of the given @window. * * On the X11 platform the returned size is the size reported in the * most-recently-processed configure event, rather than the current * size on the X server. * * Returns: The width of @window * * Since: 2.24 */ public int getWidth() { return gdk_window_get_width(gdkWindow); } /** * Gets the type of the window. See #GdkWindowType. * * Returns: type of window */ public GdkWindowType getWindowType() { return gdk_window_get_window_type(gdkWindow); } /** * Checks whether the window has a native window or not. Note that * you can use gdk_window_ensure_native() if a native window is needed. * * Returns: %TRUE if the @window has a native window, %FALSE otherwise. * * Since: 2.22 */ public bool hasNative() { return gdk_window_has_native(gdkWindow) != 0; } /** * For toplevel windows, withdraws them, so they will no longer be * known to the window manager; for all windows, unmaps them, so * they won’t be displayed. Normally done automatically as * part of gtk_widget_hide(). */ public void hide() { gdk_window_hide(gdkWindow); } /** * Asks to iconify (minimize) @window. The window manager may choose * to ignore the request, but normally will honor it. Using * gtk_window_iconify() is preferred, if you have a #GtkWindow widget. * * This function only makes sense when @window is a toplevel window. */ public void iconify() { gdk_window_iconify(gdkWindow); } /** * Like gdk_window_shape_combine_region(), but the shape applies * only to event handling. Mouse events which happen while * the pointer position corresponds to an unset bit in the * mask will be passed on the window below @window. * * An input shape is typically used with RGBA windows. * The alpha channel of the window defines which pixels are * invisible and allows for nicely antialiased borders, * and the input shape controls where the window is * “clickable”. * * On the X11 platform, this requires version 1.1 of the * shape extension. * * On the Win32 platform, this functionality is not present and the * function does nothing. * * Params: * shapeRegion = region of window to be non-transparent * offsetX = X position of @shape_region in @window coordinates * offsetY = Y position of @shape_region in @window coordinates * * Since: 2.10 */ public void inputShapeCombineRegion(Region shapeRegion, int offsetX, int offsetY) { gdk_window_input_shape_combine_region(gdkWindow, (shapeRegion is null) ? null : shapeRegion.getRegionStruct(), offsetX, offsetY); } /** * Adds @region to the update area for @window. The update area is the * region that needs to be redrawn, or “dirty region.” The call * gdk_window_process_updates() sends one or more expose events to the * window, which together cover the entire update area. An * application would normally redraw the contents of @window in * response to those expose events. * * GDK will call gdk_window_process_all_updates() on your behalf * whenever your program returns to the main loop and becomes idle, so * normally there’s no need to do that manually, you just need to * invalidate regions that you know should be redrawn. * * The @child_func parameter controls whether the region of * each child window that intersects @region will also be invalidated. * Only children for which @child_func returns #TRUE will have the area * invalidated. * * Params: * region = a #cairo_region_t * childFunc = function to use to decide if to * recurse to a child, %NULL means never recurse. * userData = data passed to @child_func */ public void invalidateMaybeRecurse(Region region, GdkWindowChildFunc childFunc, void* userData) { gdk_window_invalidate_maybe_recurse(gdkWindow, (region is null) ? null : region.getRegionStruct(), childFunc, userData); } /** * A convenience wrapper around gdk_window_invalidate_region() which * invalidates a rectangular region. See * gdk_window_invalidate_region() for details. * * Params: * rect = rectangle to invalidate or %NULL to invalidate the whole * window * invalidateChildren = whether to also invalidate child windows */ public void invalidateRect(GdkRectangle* rect, bool invalidateChildren) { gdk_window_invalidate_rect(gdkWindow, rect, invalidateChildren); } /** * Adds @region to the update area for @window. The update area is the * region that needs to be redrawn, or “dirty region.” The call * gdk_window_process_updates() sends one or more expose events to the * window, which together cover the entire update area. An * application would normally redraw the contents of @window in * response to those expose events. * * GDK will call gdk_window_process_all_updates() on your behalf * whenever your program returns to the main loop and becomes idle, so * normally there’s no need to do that manually, you just need to * invalidate regions that you know should be redrawn. * * The @invalidate_children parameter controls whether the region of * each child window that intersects @region will also be invalidated. * If %FALSE, then the update area for child windows will remain * unaffected. See gdk_window_invalidate_maybe_recurse if you need * fine grained control over which children are invalidated. * * Params: * region = a #cairo_region_t * invalidateChildren = %TRUE to also invalidate child windows */ public void invalidateRegion(Region region, bool invalidateChildren) { gdk_window_invalidate_region(gdkWindow, (region is null) ? null : region.getRegionStruct(), invalidateChildren); } /** * Check to see if a window is destroyed.. * * Returns: %TRUE if the window is destroyed * * Since: 2.18 */ public bool isDestroyed() { return gdk_window_is_destroyed(gdkWindow) != 0; } /** * Determines whether or not the window is an input only window. * * Returns: %TRUE if @window is input only * * Since: 2.22 */ public bool isInputOnly() { return gdk_window_is_input_only(gdkWindow) != 0; } /** * Determines whether or not the window is shaped. * * Returns: %TRUE if @window is shaped * * Since: 2.22 */ public bool isShaped() { return gdk_window_is_shaped(gdkWindow) != 0; } /** * Check if the window and all ancestors of the window are * mapped. (This is not necessarily "viewable" in the X sense, since * we only check as far as we have GDK window parents, not to the root * window.) * * Returns: %TRUE if the window is viewable */ public bool isViewable() { return gdk_window_is_viewable(gdkWindow) != 0; } /** * Checks whether the window has been mapped (with gdk_window_show() or * gdk_window_show_unraised()). * * Returns: %TRUE if the window is mapped */ public bool isVisible() { return gdk_window_is_visible(gdkWindow) != 0; } /** * Lowers @window to the bottom of the Z-order (stacking order), so that * other windows with the same parent window appear above @window. * This is true whether or not the other windows are visible. * * If @window is a toplevel, the window manager may choose to deny the * request to move the window in the Z-order, gdk_window_lower() only * requests the restack, does not guarantee it. * * Note that gdk_window_show() raises the window again, so don’t call this * function before gdk_window_show(). (Try gdk_window_show_unraised().) */ public void lower() { gdk_window_lower(gdkWindow); } /** * If you call this during a paint (e.g. between gdk_window_begin_paint_region() * and gdk_window_end_paint() then GDK will mark the current clip region of the * window as being drawn. This is required when mixing GL rendering via * gdk_cairo_draw_from_gl() and cairo rendering, as otherwise GDK has no way * of knowing when something paints over the GL-drawn regions. * * This is typically called automatically by GTK+ and you don't need * to care about this. * * Params: * cr = a #cairo_t * * Since: 3.16 */ public void markPaintFromClip(Context cr) { gdk_window_mark_paint_from_clip(gdkWindow, (cr is null) ? null : cr.getContextStruct()); } /** * Maximizes the window. If the window was already maximized, then * this function does nothing. * * On X11, asks the window manager to maximize @window, if the window * manager supports this operation. Not all window managers support * this, and some deliberately ignore it or don’t have a concept of * “maximized”; so you can’t rely on the maximization actually * happening. But it will happen with most standard window managers, * and GDK makes a best effort to get it to happen. * * On Windows, reliably maximizes the window. */ public void maximize() { gdk_window_maximize(gdkWindow); } /** * Merges the input shape masks for any child windows into the * input shape mask for @window. i.e. the union of all input masks * for @window and its children will become the new input mask * for @window. See gdk_window_input_shape_combine_region(). * * This function is distinct from gdk_window_set_child_input_shapes() * because it includes @window’s input shape mask in the set of * shapes to be merged. * * Since: 2.10 */ public void mergeChildInputShapes() { gdk_window_merge_child_input_shapes(gdkWindow); } /** * Merges the shape masks for any child windows into the * shape mask for @window. i.e. the union of all masks * for @window and its children will become the new mask * for @window. See gdk_window_shape_combine_region(). * * This function is distinct from gdk_window_set_child_shapes() * because it includes @window’s shape mask in the set of shapes to * be merged. */ public void mergeChildShapes() { gdk_window_merge_child_shapes(gdkWindow); } /** * Repositions a window relative to its parent window. * For toplevel windows, window managers may ignore or modify the move; * you should probably use gtk_window_move() on a #GtkWindow widget * anyway, instead of using GDK functions. For child windows, * the move will reliably succeed. * * If you’re also planning to resize the window, use gdk_window_move_resize() * to both move and resize simultaneously, for a nicer visual effect. * * Params: * x = X coordinate relative to window’s parent * y = Y coordinate relative to window’s parent */ public void move(int x, int y) { gdk_window_move(gdkWindow, x, y); } /** * Move the part of @window indicated by @region by @dy pixels in the Y * direction and @dx pixels in the X direction. The portions of @region * that not covered by the new position of @region are invalidated. * * Child windows are not moved. * * Params: * region = The #cairo_region_t to move * dx = Amount to move in the X direction * dy = Amount to move in the Y direction * * Since: 2.8 */ public void moveRegion(Region region, int dx, int dy) { gdk_window_move_region(gdkWindow, (region is null) ? null : region.getRegionStruct(), dx, dy); } /** * Equivalent to calling gdk_window_move() and gdk_window_resize(), * except that both operations are performed at once, avoiding strange * visual effects. (i.e. the user may be able to see the window first * move, then resize, if you don’t use gdk_window_move_resize().) * * Params: * x = new X position relative to window’s parent * y = new Y position relative to window’s parent * width = new width * height = new height */ public void moveResize(int x, int y, int width, int height) { gdk_window_move_resize(gdkWindow, x, y, width, height); } /** * Like gdk_window_get_children(), but does not copy the list of * children, so the list does not need to be freed. * * Returns: a reference to the list of child windows in @window */ public ListG peekChildren() { auto p = gdk_window_peek_children(gdkWindow); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Sends one or more expose events to @window. The areas in each * expose event will cover the entire update area for the window (see * gdk_window_invalidate_region() for details). Normally GDK calls * gdk_window_process_all_updates() on your behalf, so there’s no * need to call this function unless you want to force expose events * to be delivered immediately and synchronously (vs. the usual * case, where GDK delivers them in an idle handler). Occasionally * this is useful to produce nicer scrolling behavior, for example. * * Params: * updateChildren = whether to also process updates for child windows */ public void processUpdates(bool updateChildren) { gdk_window_process_updates(gdkWindow, updateChildren); } /** * Raises @window to the top of the Z-order (stacking order), so that * other windows with the same parent window appear below @window. * This is true whether or not the windows are visible. * * If @window is a toplevel, the window manager may choose to deny the * request to move the window in the Z-order, gdk_window_raise() only * requests the restack, does not guarantee it. */ public void raise() { gdk_window_raise(gdkWindow); } /** * Registers a window as a potential drop destination. */ public void registerDnd() { gdk_window_register_dnd(gdkWindow); } /** * Remove a filter previously added with gdk_window_add_filter(). * * Params: * funct = previously-added filter function * data = user data for previously-added filter function */ public void removeFilter(GdkFilterFunc funct, void* data) { gdk_window_remove_filter(gdkWindow, funct, data); } /** * Reparents @window into the given @new_parent. The window being * reparented will be unmapped as a side effect. * * Params: * newParent = new parent to move @window into * x = X location inside the new parent * y = Y location inside the new parent */ public void reparent(Window newParent, int x, int y) { gdk_window_reparent(gdkWindow, (newParent is null) ? null : newParent.getWindowStruct(), x, y); } /** * Resizes @window; for toplevel windows, asks the window manager to resize * the window. The window manager may not allow the resize. When using GTK+, * use gtk_window_resize() instead of this low-level GDK function. * * Windows may not be resized below 1x1. * * If you’re also planning to move the window, use gdk_window_move_resize() * to both move and resize simultaneously, for a nicer visual effect. * * Params: * width = new width of the window * height = new height of the window */ public void resize(int width, int height) { gdk_window_resize(gdkWindow, width, height); } /** * Changes the position of @window in the Z-order (stacking order), so that * it is above @sibling (if @above is %TRUE) or below @sibling (if @above is * %FALSE). * * If @sibling is %NULL, then this either raises (if @above is %TRUE) or * lowers the window. * * If @window is a toplevel, the window manager may choose to deny the * request to move the window in the Z-order, gdk_window_restack() only * requests the restack, does not guarantee it. * * Params: * sibling = a #GdkWindow that is a sibling of @window, or %NULL * above = a boolean * * Since: 2.18 */ public void restack(Window sibling, bool above) { gdk_window_restack(gdkWindow, (sibling is null) ? null : sibling.getWindowStruct(), above); } /** * Scroll the contents of @window, both pixels and children, by the * given amount. @window itself does not move. Portions of the window * that the scroll operation brings in from offscreen areas are * invalidated. The invalidated region may be bigger than what would * strictly be necessary. * * For X11, a minimum area will be invalidated if the window has no * subwindows, or if the edges of the window’s parent do not extend * beyond the edges of the window. In other cases, a multi-step process * is used to scroll the window which may produce temporary visual * artifacts and unnecessary invalidations. * * Params: * dx = Amount to scroll in the X direction * dy = Amount to scroll in the Y direction */ public void scroll(int dx, int dy) { gdk_window_scroll(gdkWindow, dx, dy); } /** * Setting @accept_focus to %FALSE hints the desktop environment that the * window doesn’t want to receive input focus. * * On X, it is the responsibility of the window manager to interpret this * hint. ICCCM-compliant window manager usually respect it. * * Params: * acceptFocus = %TRUE if the window should receive input focus * * Since: 2.4 */ public void setAcceptFocus(bool acceptFocus) { gdk_window_set_accept_focus(gdkWindow, acceptFocus); } /** * Sets the background color of @window. * * However, when using GTK+, influence the background of a widget * using a style class or CSS — if you’re an application — or with * gtk_style_context_set_background() — if you're implementing a * custom widget. * * Deprecated: Don't use this function * * Params: * color = a #GdkColor */ public void setBackground(Color color) { gdk_window_set_background(gdkWindow, (color is null) ? null : color.getColorStruct()); } /** * Sets the background of @window. * * A background of %NULL means that the window will inherit its * background from its parent window. * * The windowing system will normally fill a window with its background * when the window is obscured then exposed. * * Deprecated: Don't use this function * * Params: * pattern = a pattern to use, or %NULL */ public void setBackgroundPattern(Pattern pattern) { gdk_window_set_background_pattern(gdkWindow, (pattern is null) ? null : pattern.getPatternStruct()); } /** * Sets the background color of @window. * * See also gdk_window_set_background_pattern(). * * Deprecated: Don't use this function * * Params: * rgba = a #GdkRGBA color */ public void setBackgroundRgba(RGBA rgba) { gdk_window_set_background_rgba(gdkWindow, (rgba is null) ? null : rgba.getRGBAStruct()); } /** * Sets the input shape mask of @window to the union of input shape masks * for all children of @window, ignoring the input shape mask of @window * itself. Contrast with gdk_window_merge_child_input_shapes() which includes * the input shape mask of @window in the masks to be merged. * * Since: 2.10 */ public void setChildInputShapes() { gdk_window_set_child_input_shapes(gdkWindow); } /** * Sets the shape mask of @window to the union of shape masks * for all children of @window, ignoring the shape mask of @window * itself. Contrast with gdk_window_merge_child_shapes() which includes * the shape mask of @window in the masks to be merged. */ public void setChildShapes() { gdk_window_set_child_shapes(gdkWindow); } /** * Sets a #GdkWindow as composited, or unsets it. Composited * windows do not automatically have their contents drawn to * the screen. Drawing is redirected to an offscreen buffer * and an expose event is emitted on the parent of the composited * window. It is the responsibility of the parent’s expose handler * to manually merge the off-screen content onto the screen in * whatever way it sees fit. * * It only makes sense for child windows to be composited; see * gdk_window_set_opacity() if you need translucent toplevel * windows. * * An additional effect of this call is that the area of this * window is no longer clipped from regions marked for * invalidation on its parent. Draws done on the parent * window are also no longer clipped by the child. * * This call is only supported on some systems (currently, * only X11 with new enough Xcomposite and Xdamage extensions). * You must call gdk_display_supports_composite() to check if * setting a window as composited is supported before * attempting to do so. * * Deprecated: Compositing is an outdated technology that * only ever worked on X11. * * Params: * composited = %TRUE to set the window as composited * * Since: 2.12 */ public void setComposited(bool composited) { gdk_window_set_composited(gdkWindow, composited); } /** * Sets the default mouse pointer for a #GdkWindow. * * Note that @cursor must be for the same display as @window. * * Use gdk_cursor_new_for_display() or gdk_cursor_new_from_pixbuf() to * create the cursor. To make the cursor invisible, use %GDK_BLANK_CURSOR. * Passing %NULL for the @cursor argument to gdk_window_set_cursor() means * that @window will use the cursor of its parent window. Most windows * should use this default. * * Params: * cursor = a cursor */ public void setCursor(Cursor cursor) { gdk_window_set_cursor(gdkWindow, (cursor is null) ? null : cursor.getCursorStruct()); } /** * “Decorations” are the features the window manager adds to a toplevel #GdkWindow. * This function sets the traditional Motif window manager hints that tell the * window manager which decorations you would like your window to have. * Usually you should use gtk_window_set_decorated() on a #GtkWindow instead of * using the GDK function directly. * * The @decorations argument is the logical OR of the fields in * the #GdkWMDecoration enumeration. If #GDK_DECOR_ALL is included in the * mask, the other bits indicate which decorations should be turned off. * If #GDK_DECOR_ALL is not included, then the other bits indicate * which decorations should be turned on. * * Most window managers honor a decorations hint of 0 to disable all decorations, * but very few honor all possible combinations of bits. * * Params: * decorations = decoration hint mask */ public void setDecorations(GdkWMDecoration decorations) { gdk_window_set_decorations(gdkWindow, decorations); } /** * Sets a specific #GdkCursor for a given device when it gets inside @window. * Use gdk_cursor_new_for_display() or gdk_cursor_new_from_pixbuf() to create * the cursor. To make the cursor invisible, use %GDK_BLANK_CURSOR. Passing * %NULL for the @cursor argument to gdk_window_set_cursor() means that * @window will use the cursor of its parent window. Most windows should * use this default. * * Params: * device = a master, pointer #GdkDevice * cursor = a #GdkCursor * * Since: 3.0 */ public void setDeviceCursor(Device device, Cursor cursor) { gdk_window_set_device_cursor(gdkWindow, (device is null) ? null : device.getDeviceStruct(), (cursor is null) ? null : cursor.getCursorStruct()); } /** * Sets the event mask for a given device (Normally a floating device, not * attached to any visible pointer) to @window. For example, an event mask * including #GDK_BUTTON_PRESS_MASK means the window should report button * press events. The event mask is the bitwise OR of values from the * #GdkEventMask enumeration. * * See the [input handling overview][event-masks] for details. * * Params: * device = #GdkDevice to enable events for. * eventMask = event mask for @window * * Since: 3.0 */ public void setDeviceEvents(Device device, GdkEventMask eventMask) { gdk_window_set_device_events(gdkWindow, (device is null) ? null : device.getDeviceStruct(), eventMask); } /** * Determines whether or not extra unprocessed motion events in * the event queue can be discarded. If %TRUE only the most recent * event will be delivered. * * Some types of applications, e.g. paint programs, need to see all * motion events and will benefit from turning off event compression. * * By default, event compression is enabled. * * Params: * eventCompression = %TRUE if motion events should be compressed * * Since: 3.12 */ public void setEventCompression(bool eventCompression) { gdk_window_set_event_compression(gdkWindow, eventCompression); } /** * The event mask for a window determines which events will be reported * for that window from all master input devices. For example, an event mask * including #GDK_BUTTON_PRESS_MASK means the window should report button * press events. The event mask is the bitwise OR of values from the * #GdkEventMask enumeration. * * See the [input handling overview][event-masks] for details. * * Params: * eventMask = event mask for @window */ public void setEvents(GdkEventMask eventMask) { gdk_window_set_events(gdkWindow, eventMask); } /** * Setting @focus_on_map to %FALSE hints the desktop environment that the * window doesn’t want to receive input focus when it is mapped. * focus_on_map should be turned off for windows that aren’t triggered * interactively (such as popups from network activity). * * On X, it is the responsibility of the window manager to interpret * this hint. Window managers following the freedesktop.org window * manager extension specification should respect it. * * Params: * focusOnMap = %TRUE if the window should receive input focus when mapped * * Since: 2.6 */ public void setFocusOnMap(bool focusOnMap) { gdk_window_set_focus_on_map(gdkWindow, focusOnMap); } /** * Specifies whether the @window should span over all monitors (in a multi-head * setup) or only the current monitor when in fullscreen mode. * * The @mode argument is from the #GdkFullscreenMode enumeration. * If #GDK_FULLSCREEN_ON_ALL_MONITORS is specified, the fullscreen @window will * span over all monitors from the #GdkScreen. * * On X11, searches through the list of monitors from the #GdkScreen the ones * which delimit the 4 edges of the entire #GdkScreen and will ask the window * manager to span the @window over these monitors. * * If the XINERAMA extension is not available or not usable, this function * has no effect. * * Not all window managers support this, so you can’t rely on the fullscreen * window to span over the multiple monitors when #GDK_FULLSCREEN_ON_ALL_MONITORS * is specified. * * Params: * mode = fullscreen mode * * Since: 3.8 */ public void setFullscreenMode(GdkFullscreenMode mode) { gdk_window_set_fullscreen_mode(gdkWindow, mode); } /** * Sets hints about the window management functions to make available * via buttons on the window frame. * * On the X backend, this function sets the traditional Motif window * manager hint for this purpose. However, few window managers do * anything reliable or interesting with this hint. Many ignore it * entirely. * * The @functions argument is the logical OR of values from the * #GdkWMFunction enumeration. If the bitmask includes #GDK_FUNC_ALL, * then the other bits indicate which functions to disable; if * it doesn’t include #GDK_FUNC_ALL, it indicates which functions to * enable. * * Params: * functions = bitmask of operations to allow on @window */ public void setFunctions(GdkWMFunction functions) { gdk_window_set_functions(gdkWindow, functions); } /** * Sets the geometry hints for @window. Hints flagged in @geom_mask * are set, hints not flagged in @geom_mask are unset. * To unset all hints, use a @geom_mask of 0 and a @geometry of %NULL. * * This function provides hints to the windowing system about * acceptable sizes for a toplevel window. The purpose of * this is to constrain user resizing, but the windowing system * will typically (but is not required to) also constrain the * current size of the window to the provided values and * constrain programatic resizing via gdk_window_resize() or * gdk_window_move_resize(). * * Note that on X11, this effect has no effect on windows * of type %GDK_WINDOW_TEMP or windows where override redirect * has been turned on via gdk_window_set_override_redirect() * since these windows are not resizable by the user. * * Since you can’t count on the windowing system doing the * constraints for programmatic resizes, you should generally * call gdk_window_constrain_size() yourself to determine * appropriate sizes. * * Params: * geometry = geometry hints * geomMask = bitmask indicating fields of @geometry to pay attention to */ public void setGeometryHints(GdkGeometry* geometry, GdkWindowHints geomMask) { gdk_window_set_geometry_hints(gdkWindow, geometry, geomMask); } /** * Sets the group leader window for @window. By default, * GDK sets the group leader for all toplevel windows * to a global window implicitly created by GDK. With this function * you can override this default. * * The group leader window allows the window manager to distinguish * all windows that belong to a single application. It may for example * allow users to minimize/unminimize all windows belonging to an * application at once. You should only set a non-default group window * if your application pretends to be multiple applications. * * Params: * leader = group leader window, or %NULL to restore the default group leader window */ public void setGroup(Window leader) { gdk_window_set_group(gdkWindow, (leader is null) ? null : leader.getWindowStruct()); } /** * Sets a list of icons for the window. One of these will be used * to represent the window when it has been iconified. The icon is * usually shown in an icon box or some sort of task bar. Which icon * size is shown depends on the window manager. The window manager * can scale the icon but setting several size icons can give better * image quality since the window manager may only need to scale the * icon by a small amount or not at all. * * Note that some platforms don't support window icons. * * Params: * pixbufs = A list of pixbufs, of different sizes. */ public void setIconList(ListG pixbufs) { gdk_window_set_icon_list(gdkWindow, (pixbufs is null) ? null : pixbufs.getListGStruct()); } /** * Windows may have a name used while minimized, distinct from the * name they display in their titlebar. Most of the time this is a bad * idea from a user interface standpoint. But you can set such a name * with this function, if you like. * * After calling this with a non-%NULL @name, calls to gdk_window_set_title() * will not update the icon title. * * Using %NULL for @name unsets the icon title; further calls to * gdk_window_set_title() will again update the icon title as well. * * Note that some platforms don't support window icons. * * Params: * name = name of window while iconified (minimized) */ public void setIconName(string name) { gdk_window_set_icon_name(gdkWindow, Str.toStringz(name)); } /** * Registers an invalidate handler for a specific window. This * will get called whenever a region in the window or its children * is invalidated. * * This can be used to record the invalidated region, which is * useful if you are keeping an offscreen copy of some region * and want to keep it up to date. You can also modify the * invalidated region in case you’re doing some effect where * e.g. a child widget appears in multiple places. * * Params: * handler = a #GdkWindowInvalidateHandlerFunc callback function * * Since: 3.10 */ public void setInvalidateHandler(GdkWindowInvalidateHandlerFunc handler) { gdk_window_set_invalidate_handler(gdkWindow, handler); } /** * Set if @window must be kept above other windows. If the * window was already above, then this function does nothing. * * On X11, asks the window manager to keep @window above, if the window * manager supports this operation. Not all window managers support * this, and some deliberately ignore it or don’t have a concept of * “keep above”; so you can’t rely on the window being kept above. * But it will happen with most standard window managers, * and GDK makes a best effort to get it to happen. * * Params: * setting = whether to keep @window above other windows * * Since: 2.4 */ public void setKeepAbove(bool setting) { gdk_window_set_keep_above(gdkWindow, setting); } /** * Set if @window must be kept below other windows. If the * window was already below, then this function does nothing. * * On X11, asks the window manager to keep @window below, if the window * manager supports this operation. Not all window managers support * this, and some deliberately ignore it or don’t have a concept of * “keep below”; so you can’t rely on the window being kept below. * But it will happen with most standard window managers, * and GDK makes a best effort to get it to happen. * * Params: * setting = whether to keep @window below other windows * * Since: 2.4 */ public void setKeepBelow(bool setting) { gdk_window_set_keep_below(gdkWindow, setting); } /** * The application can use this hint to tell the window manager * that a certain window has modal behaviour. The window manager * can use this information to handle modal windows in a special * way. * * You should only use this on windows for which you have * previously called gdk_window_set_transient_for() * * Params: * modal = %TRUE if the window is modal, %FALSE otherwise. */ public void setModalHint(bool modal) { gdk_window_set_modal_hint(gdkWindow, modal); } /** * Set @window to render as partially transparent, * with opacity 0 being fully transparent and 1 fully opaque. (Values * of the opacity parameter are clamped to the [0,1] range.) * * For toplevel windows this depends on support from the windowing system * that may not always be there. For instance, On X11, this works only on * X screens with a compositing manager running. On Wayland, there is no * per-window opacity value that the compositor would apply. Instead, use * `gdk_window_set_opaque_region (window, NULL)` to tell the compositor * that the entire window is (potentially) non-opaque, and draw your content * with alpha, or use gtk_widget_set_opacity() to set an overall opacity * for your widgets. * * For child windows this function only works for non-native windows. * * For setting up per-pixel alpha topelevels, see gdk_screen_get_rgba_visual(), * and for non-toplevels, see gdk_window_set_composited(). * * Support for non-toplevel windows was added in 3.8. * * Params: * opacity = opacity * * Since: 2.12 */ public void setOpacity(double opacity) { gdk_window_set_opacity(gdkWindow, opacity); } /** * For optimisation purposes, compositing window managers may * like to not draw obscured regions of windows, or turn off blending * during for these regions. With RGB windows with no transparency, * this is just the shape of the window, but with ARGB32 windows, the * compositor does not know what regions of the window are transparent * or not. * * This function only works for toplevel windows. * * GTK+ will update this property automatically if * the @window background is opaque, as we know where the opaque regions * are. If your window background is not opaque, please update this * property in your #GtkWidget::style-updated handler. * * Params: * region = a region, or %NULL * * Since: 3.10 */ public void setOpaqueRegion(Region region) { gdk_window_set_opaque_region(gdkWindow, (region is null) ? null : region.getRegionStruct()); } /** * An override redirect window is not under the control of the window manager. * This means it won’t have a titlebar, won’t be minimizable, etc. - it will * be entirely under the control of the application. The window manager * can’t see the override redirect window at all. * * Override redirect should only be used for short-lived temporary * windows, such as popup menus. #GtkMenu uses an override redirect * window in its implementation, for example. * * Params: * overrideRedirect = %TRUE if window should be override redirect */ public void setOverrideRedirect(bool overrideRedirect) { gdk_window_set_override_redirect(gdkWindow, overrideRedirect); } /** * Sets whether input to the window is passed through to the window * below. * * The default value of this is %FALSE, which means that pointer * events that happen inside the window are send first to the window, * but if the event is not selected by the event mask then the event * is sent to the parent window, and so on up the hierarchy. * * If @pass_through is %TRUE then such pointer events happen as if the * window wasn't there at all, and thus will be sent first to any * windows below @window. This is useful if the window is used in a * transparent fashion. In the terminology of the web this would be called * "pointer-events: none". * * Note that a window with @pass_through %TRUE can still have a subwindow * without pass through, so you can get events on a subset of a window. And in * that cases you would get the in-between related events such as the pointer * enter/leave events on its way to the destination window. * * Params: * passThrough = a boolean * * Since: 3.18 */ public void setPassThrough(bool passThrough) { gdk_window_set_pass_through(gdkWindow, passThrough); } /** * When using GTK+, typically you should use gtk_window_set_role() instead * of this low-level function. * * The window manager and session manager use a window’s role to * distinguish it from other kinds of window in the same application. * When an application is restarted after being saved in a previous * session, all windows with the same title and role are treated as * interchangeable. So if you have two windows with the same title * that should be distinguished for session management purposes, you * should set the role on those windows. It doesn’t matter what string * you use for the role, as long as you have a different role for each * non-interchangeable kind of window. * * Params: * role = a string indicating its role */ public void setRole(string role) { gdk_window_set_role(gdkWindow, Str.toStringz(role)); } /** * Newer GTK+ windows using client-side decorations use extra geometry * around their frames for effects like shadows and invisible borders. * Window managers that want to maximize windows or snap to edges need * to know where the extents of the actual frame lie, so that users * don’t feel like windows are snapping against random invisible edges. * * Note that this property is automatically updated by GTK+, so this * function should only be used by applications which do not use GTK+ * to create toplevel windows. * * Params: * left = The left extent * right = The right extent * top = The top extent * bottom = The bottom extent * * Since: 3.12 */ public void setShadowWidth(int left, int right, int top, int bottom) { gdk_window_set_shadow_width(gdkWindow, left, right, top, bottom); } /** * Toggles whether a window should appear in a pager (workspace * switcher, or other desktop utility program that displays a small * thumbnail representation of the windows on the desktop). If a * window’s semantic type as specified with gdk_window_set_type_hint() * already fully describes the window, this function should * not be called in addition, instead you should * allow the window to be treated according to standard policy for * its semantic type. * * Params: * skipsPager = %TRUE to skip the pager * * Since: 2.2 */ public void setSkipPagerHint(bool skipsPager) { gdk_window_set_skip_pager_hint(gdkWindow, skipsPager); } /** * Toggles whether a window should appear in a task list or window * list. If a window’s semantic type as specified with * gdk_window_set_type_hint() already fully describes the window, this * function should not be called in addition, * instead you should allow the window to be treated according to * standard policy for its semantic type. * * Params: * skipsTaskbar = %TRUE to skip the taskbar * * Since: 2.2 */ public void setSkipTaskbarHint(bool skipsTaskbar) { gdk_window_set_skip_taskbar_hint(gdkWindow, skipsTaskbar); } /** * Sets the event mask for any floating device (i.e. not attached to any * visible pointer) that has the source defined as @source. This event * mask will be applied both to currently existing, newly added devices * after this call, and devices being attached/detached. * * Params: * source = a #GdkInputSource to define the source class. * eventMask = event mask for @window * * Since: 3.0 */ public void setSourceEvents(GdkInputSource source, GdkEventMask eventMask) { gdk_window_set_source_events(gdkWindow, source, eventMask); } /** * When using GTK+, typically you should use gtk_window_set_startup_id() * instead of this low-level function. * * Params: * startupId = a string with startup-notification identifier * * Since: 2.12 */ public void setStartupId(string startupId) { gdk_window_set_startup_id(gdkWindow, Str.toStringz(startupId)); } /** * Used to set the bit gravity of the given window to static, and flag * it so all children get static subwindow gravity. This is used if you * are implementing scary features that involve deep knowledge of the * windowing system. Don’t worry about it. * * Deprecated: static gravities haven't worked on anything but X11 * for a long time. * * Params: * useStatic = %TRUE to turn on static gravity * * Returns: %FALSE */ public bool setStaticGravities(bool useStatic) { return gdk_window_set_static_gravities(gdkWindow, useStatic) != 0; } /** * This function will enable multidevice features in @window. * * Multidevice aware windows will need to handle properly multiple, * per device enter/leave events, device grabs and grab ownerships. * * Params: * supportMultidevice = %TRUE to enable multidevice support in @window. * * Since: 3.0 */ public void setSupportMultidevice(bool supportMultidevice) { gdk_window_set_support_multidevice(gdkWindow, supportMultidevice); } /** * Sets the title of a toplevel window, to be displayed in the titlebar. * If you haven’t explicitly set the icon name for the window * (using gdk_window_set_icon_name()), the icon name will be set to * @title as well. @title must be in UTF-8 encoding (as with all * user-readable strings in GDK/GTK+). @title may not be %NULL. * * Params: * title = title of @window */ public void setTitle(string title) { gdk_window_set_title(gdkWindow, Str.toStringz(title)); } /** * Indicates to the window manager that @window is a transient dialog * associated with the application window @parent. This allows the * window manager to do things like center @window on @parent and * keep @window above @parent. * * See gtk_window_set_transient_for() if you’re using #GtkWindow or * #GtkDialog. * * Params: * parent = another toplevel #GdkWindow */ public void setTransientFor(Window parent) { gdk_window_set_transient_for(gdkWindow, (parent is null) ? null : parent.getWindowStruct()); } /** * The application can use this call to provide a hint to the window * manager about the functionality of a window. The window manager * can use this information when determining the decoration and behaviour * of the window. * * The hint must be set before the window is mapped. * * Params: * hint = A hint of the function this window will have */ public void setTypeHint(GdkWindowTypeHint hint) { gdk_window_set_type_hint(gdkWindow, hint); } /** * Toggles whether a window needs the user's * urgent attention. * * Params: * urgent = %TRUE if the window is urgent * * Since: 2.8 */ public void setUrgencyHint(bool urgent) { gdk_window_set_urgency_hint(gdkWindow, urgent); } /** * For most purposes this function is deprecated in favor of * g_object_set_data(). However, for historical reasons GTK+ stores * the #GtkWidget that owns a #GdkWindow as user data on the * #GdkWindow. So, custom widget implementations should use * this function for that. If GTK+ receives an event for a #GdkWindow, * and the user data for the window is non-%NULL, GTK+ will assume the * user data is a #GtkWidget, and forward the event to that widget. * * Params: * userData = user data */ public void setUserData(ObjectG userData) { gdk_window_set_user_data(gdkWindow, (userData is null) ? null : userData.getObjectGStruct()); } /** * Makes pixels in @window outside @shape_region be transparent, * so that the window may be nonrectangular. * * If @shape_region is %NULL, the shape will be unset, so the whole * window will be opaque again. @offset_x and @offset_y are ignored * if @shape_region is %NULL. * * On the X11 platform, this uses an X server extension which is * widely available on most common platforms, but not available on * very old X servers, and occasionally the implementation will be * buggy. On servers without the shape extension, this function * will do nothing. * * This function works on both toplevel and child windows. * * Params: * shapeRegion = region of window to be non-transparent * offsetX = X position of @shape_region in @window coordinates * offsetY = Y position of @shape_region in @window coordinates */ public void shapeCombineRegion(Region shapeRegion, int offsetX, int offsetY) { gdk_window_shape_combine_region(gdkWindow, (shapeRegion is null) ? null : shapeRegion.getRegionStruct(), offsetX, offsetY); } /** * Like gdk_window_show_unraised(), but also raises the window to the * top of the window stack (moves the window to the front of the * Z-order). * * This function maps a window so it’s visible onscreen. Its opposite * is gdk_window_hide(). * * When implementing a #GtkWidget, you should call this function on the widget's * #GdkWindow as part of the “map” method. */ public void show() { gdk_window_show(gdkWindow); } /** * Shows a #GdkWindow onscreen, but does not modify its stacking * order. In contrast, gdk_window_show() will raise the window * to the top of the window stack. * * On the X11 platform, in Xlib terms, this function calls * XMapWindow() (it also updates some internal GDK state, which means * that you can’t really use XMapWindow() directly on a GDK window). */ public void showUnraised() { gdk_window_show_unraised(gdkWindow); } /** * Asks the windowing system to show the window menu. The window menu * is the menu shown when right-clicking the titlebar on traditional * windows managed by the window manager. This is useful for windows * using client-side decorations, activating it with a right-click * on the window decorations. * * Params: * event = a #GdkEvent to show the menu for * * Returns: %TRUE if the window menu was shown and %FALSE otherwise. * * Since: 3.14 */ public bool showWindowMenu(Event event) { return gdk_window_show_window_menu(gdkWindow, (event is null) ? null : event.getEventStruct()) != 0; } /** * “Pins” a window such that it’s on all workspaces and does not scroll * with viewports, for window managers that have scrollable viewports. * (When using #GtkWindow, gtk_window_stick() may be more useful.) * * On the X11 platform, this function depends on window manager * support, so may have no effect with many window managers. However, * GDK will do the best it can to convince the window manager to stick * the window. For window managers that don’t support this operation, * there’s nothing you can do to force it to happen. */ public void stick() { gdk_window_stick(gdkWindow); } /** * Thaws a window frozen with * gdk_window_freeze_toplevel_updates_libgtk_only(). * * This function is not part of the GDK public API and is only * for use by GTK+. * * Deprecated: This symbol was never meant to be used outside of GTK+ */ public void thawToplevelUpdatesLibgtkOnly() { gdk_window_thaw_toplevel_updates_libgtk_only(gdkWindow); } /** * Thaws a window frozen with gdk_window_freeze_updates(). */ public void thawUpdates() { gdk_window_thaw_updates(gdkWindow); } /** * Moves the window out of fullscreen mode. If the window was not * fullscreen, does nothing. * * On X11, asks the window manager to move @window out of the fullscreen * state, if the window manager supports this operation. Not all * window managers support this, and some deliberately ignore it or * don’t have a concept of “fullscreen”; so you can’t rely on the * unfullscreenification actually happening. But it will happen with * most standard window managers, and GDK makes a best effort to get * it to happen. * * Since: 2.2 */ public void unfullscreen() { gdk_window_unfullscreen(gdkWindow); } /** * Unmaximizes the window. If the window wasn’t maximized, then this * function does nothing. * * On X11, asks the window manager to unmaximize @window, if the * window manager supports this operation. Not all window managers * support this, and some deliberately ignore it or don’t have a * concept of “maximized”; so you can’t rely on the unmaximization * actually happening. But it will happen with most standard window * managers, and GDK makes a best effort to get it to happen. * * On Windows, reliably unmaximizes the window. */ public void unmaximize() { gdk_window_unmaximize(gdkWindow); } /** * Reverse operation for gdk_window_stick(); see gdk_window_stick(), * and gtk_window_unstick(). */ public void unstick() { gdk_window_unstick(gdkWindow); } /** * Withdraws a window (unmaps it and asks the window manager to forget about it). * This function is not really useful as gdk_window_hide() automatically * withdraws toplevel windows before hiding them. */ public void withdraw() { gdk_window_withdraw(gdkWindow); } protected class OnCreateSurfaceDelegateWrapper { Surface delegate(int, int, Window) dlg; gulong handlerId; this(Surface delegate(int, int, Window) dlg) { this.dlg = dlg; onCreateSurfaceListeners ~= this; } void remove(OnCreateSurfaceDelegateWrapper source) { foreach(index, wrapper; onCreateSurfaceListeners) { if (wrapper.handlerId == source.handlerId) { onCreateSurfaceListeners[index] = null; onCreateSurfaceListeners = std.algorithm.remove(onCreateSurfaceListeners, index); break; } } } } OnCreateSurfaceDelegateWrapper[] onCreateSurfaceListeners; /** * The ::create-surface signal is emitted when an offscreen window * needs its surface (re)created, which happens either when the * window is first drawn to, or when the window is being * resized. The first signal handler that returns a non-%NULL * surface will stop any further signal emission, and its surface * will be used. * * Note that it is not possible to access the window's previous * surface from within any callback of this signal. Calling * gdk_offscreen_window_get_surface() will lead to a crash. * * Params: * width = the width of the offscreen surface to create * height = the height of the offscreen surface to create * * Returns: the newly created #cairo_surface_t for the offscreen window * * Since: 3.0 */ gulong addOnCreateSurface(Surface delegate(int, int, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnCreateSurfaceDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "create-surface", cast(GCallback)&callBackCreateSurface, cast(void*)wrapper, cast(GClosureNotify)&callBackCreateSurfaceDestroy, connectFlags); return wrapper.handlerId; } extern(C) static cairo_surface_t* callBackCreateSurface(GdkWindow* windowStruct, int width, int height, OnCreateSurfaceDelegateWrapper wrapper) { auto r = wrapper.dlg(width, height, wrapper.outer); return r.getSurfaceStruct(); } extern(C) static void callBackCreateSurfaceDestroy(OnCreateSurfaceDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnFromEmbedderDelegateWrapper { void delegate(double, double, void*, void*, Window) dlg; gulong handlerId; this(void delegate(double, double, void*, void*, Window) dlg) { this.dlg = dlg; onFromEmbedderListeners ~= this; } void remove(OnFromEmbedderDelegateWrapper source) { foreach(index, wrapper; onFromEmbedderListeners) { if (wrapper.handlerId == source.handlerId) { onFromEmbedderListeners[index] = null; onFromEmbedderListeners = std.algorithm.remove(onFromEmbedderListeners, index); break; } } } } OnFromEmbedderDelegateWrapper[] onFromEmbedderListeners; /** * The ::from-embedder signal is emitted to translate coordinates * in the embedder of an offscreen window to the offscreen window. * * See also #GdkWindow::to-embedder. * * Params: * embedderX = x coordinate in the embedder window * embedderY = y coordinate in the embedder window * offscreenX = return location for the x * coordinate in the offscreen window * offscreenY = return location for the y * coordinate in the offscreen window * * Since: 2.18 */ gulong addOnFromEmbedder(void delegate(double, double, void*, void*, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnFromEmbedderDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "from-embedder", cast(GCallback)&callBackFromEmbedder, cast(void*)wrapper, cast(GClosureNotify)&callBackFromEmbedderDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackFromEmbedder(GdkWindow* windowStruct, double embedderX, double embedderY, void* offscreenX, void* offscreenY, OnFromEmbedderDelegateWrapper wrapper) { wrapper.dlg(embedderX, embedderY, offscreenX, offscreenY, wrapper.outer); } extern(C) static void callBackFromEmbedderDestroy(OnFromEmbedderDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMovedToRectDelegateWrapper { void delegate(void*, void*, bool, bool, Window) dlg; gulong handlerId; this(void delegate(void*, void*, bool, bool, Window) dlg) { this.dlg = dlg; onMovedToRectListeners ~= this; } void remove(OnMovedToRectDelegateWrapper source) { foreach(index, wrapper; onMovedToRectListeners) { if (wrapper.handlerId == source.handlerId) { onMovedToRectListeners[index] = null; onMovedToRectListeners = std.algorithm.remove(onMovedToRectListeners, index); break; } } } } OnMovedToRectDelegateWrapper[] onMovedToRectListeners; /** * Emitted when the position of @window is finalized after being moved to a * destination rectangle. * * @window might be flipped over the destination rectangle in order to keep * it on-screen, in which case @flipped_x and @flipped_y will be set to %TRUE * accordingly. * * @flipped_rect is the ideal position of @window after any possible * flipping, but before any possible sliding. @final_rect is @flipped_rect, * but possibly translated in the case that flipping is still ineffective in * keeping @window on-screen. * * Params: * flippedRect = the position of @window after any possible * flipping or %NULL if the backend can't obtain it * finalRect = the final position of @window or %NULL if the * backend can't obtain it * flippedX = %TRUE if the anchors were flipped horizontally * flippedY = %TRUE if the anchors were flipped vertically * * Since: 3.22 */ gulong addOnMovedToRect(void delegate(void*, void*, bool, bool, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMovedToRectDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "moved-to-rect", cast(GCallback)&callBackMovedToRect, cast(void*)wrapper, cast(GClosureNotify)&callBackMovedToRectDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMovedToRect(GdkWindow* windowStruct, void* flippedRect, void* finalRect, bool flippedX, bool flippedY, OnMovedToRectDelegateWrapper wrapper) { wrapper.dlg(flippedRect, finalRect, flippedX, flippedY, wrapper.outer); } extern(C) static void callBackMovedToRectDestroy(OnMovedToRectDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPickEmbeddedChildDelegateWrapper { Window delegate(double, double, Window) dlg; gulong handlerId; this(Window delegate(double, double, Window) dlg) { this.dlg = dlg; onPickEmbeddedChildListeners ~= this; } void remove(OnPickEmbeddedChildDelegateWrapper source) { foreach(index, wrapper; onPickEmbeddedChildListeners) { if (wrapper.handlerId == source.handlerId) { onPickEmbeddedChildListeners[index] = null; onPickEmbeddedChildListeners = std.algorithm.remove(onPickEmbeddedChildListeners, index); break; } } } } OnPickEmbeddedChildDelegateWrapper[] onPickEmbeddedChildListeners; /** * The ::pick-embedded-child signal is emitted to find an embedded * child at the given position. * * Params: * x = x coordinate in the window * y = y coordinate in the window * * Returns: the #GdkWindow of the * embedded child at @x, @y, or %NULL * * Since: 2.18 */ gulong addOnPickEmbeddedChild(Window delegate(double, double, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPickEmbeddedChildDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "pick-embedded-child", cast(GCallback)&callBackPickEmbeddedChild, cast(void*)wrapper, cast(GClosureNotify)&callBackPickEmbeddedChildDestroy, connectFlags); return wrapper.handlerId; } extern(C) static GdkWindow* callBackPickEmbeddedChild(GdkWindow* windowStruct, double x, double y, OnPickEmbeddedChildDelegateWrapper wrapper) { auto r = wrapper.dlg(x, y, wrapper.outer); return r.getWindowStruct(); } extern(C) static void callBackPickEmbeddedChildDestroy(OnPickEmbeddedChildDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnToEmbedderDelegateWrapper { void delegate(double, double, void*, void*, Window) dlg; gulong handlerId; this(void delegate(double, double, void*, void*, Window) dlg) { this.dlg = dlg; onToEmbedderListeners ~= this; } void remove(OnToEmbedderDelegateWrapper source) { foreach(index, wrapper; onToEmbedderListeners) { if (wrapper.handlerId == source.handlerId) { onToEmbedderListeners[index] = null; onToEmbedderListeners = std.algorithm.remove(onToEmbedderListeners, index); break; } } } } OnToEmbedderDelegateWrapper[] onToEmbedderListeners; /** * The ::to-embedder signal is emitted to translate coordinates * in an offscreen window to its embedder. * * See also #GdkWindow::from-embedder. * * Params: * offscreenX = x coordinate in the offscreen window * offscreenY = y coordinate in the offscreen window * embedderX = return location for the x * coordinate in the embedder window * embedderY = return location for the y * coordinate in the embedder window * * Since: 2.18 */ gulong addOnToEmbedder(void delegate(double, double, void*, void*, Window) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnToEmbedderDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "to-embedder", cast(GCallback)&callBackToEmbedder, cast(void*)wrapper, cast(GClosureNotify)&callBackToEmbedderDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackToEmbedder(GdkWindow* windowStruct, double offscreenX, double offscreenY, void* embedderX, void* embedderY, OnToEmbedderDelegateWrapper wrapper) { wrapper.dlg(offscreenX, offscreenY, embedderX, embedderY, wrapper.outer); } extern(C) static void callBackToEmbedderDestroy(OnToEmbedderDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** * Obtains the root window (parent all other windows are inside) * for the default display and screen. * * Returns: the default root window */ public static Window getDefaultRootWindow() { auto p = gdk_get_default_root_window(); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Gets the window that @window is embedded in. * * Params: * window = a #GdkWindow * * Returns: the embedding #GdkWindow, or * %NULL if @window is not an mbedded offscreen window * * Since: 2.18 */ public static Window offscreenWindowGetEmbedder(Window window) { auto p = gdk_offscreen_window_get_embedder((window is null) ? null : window.getWindowStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** * Gets the offscreen surface that an offscreen window renders into. * If you need to keep this around over window resizes, you need to * add a reference to it. * * Params: * window = a #GdkWindow * * Returns: The offscreen surface, or * %NULL if not offscreen */ public static Surface offscreenWindowGetSurface(Window window) { auto p = gdk_offscreen_window_get_surface((window is null) ? null : window.getWindowStruct()); if(p is null) { return null; } return new Surface(cast(cairo_surface_t*) p); } /** * Sets @window to be embedded in @embedder. * * To fully embed an offscreen window, in addition to calling this * function, it is also necessary to handle the #GdkWindow::pick-embedded-child * signal on the @embedder and the #GdkWindow::to-embedder and * #GdkWindow::from-embedder signals on @window. * * Params: * window = a #GdkWindow * embedder = the #GdkWindow that @window gets embedded in * * Since: 2.18 */ public static void offscreenWindowSetEmbedder(Window window, Window embedder) { gdk_offscreen_window_set_embedder((window is null) ? null : window.getWindowStruct(), (embedder is null) ? null : embedder.getWindowStruct()); } /** */ public static void synthesizeWindowState(Window window, GdkWindowState unsetFlags, GdkWindowState setFlags) { gdk_synthesize_window_state((window is null) ? null : window.getWindowStruct(), unsetFlags, setFlags); } } GtkD-3.7.5/generated/gtkd/gdk/X11.d000066400000000000000000000165111324604450400165370ustar00rootroot00000000000000/* * 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 gdk.X11; private import gdk.Display; private import gdk.Window; private import gdk.c.functions; public import gdk.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.gdktypes; /** */ /** * Looks up the #GdkWindow that wraps the given native window handle. * * Params: * display = the #GdkDisplay corresponding to the * window handle * window = an Xlib Window * * Return: the #GdkWindow wrapper for the native * window, or %NULL if there is none. * * Since: 2.24 */ public Window lookupForDisplay(Display display, uint window) { auto p = gdk_x11_window_lookup_for_display((display is null) ? null : display.getDisplayStruct(), window); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GdkWindow*) p); } /** */ /** * Gets the number of the workspace @window is on. * * Returns: the current workspace of @window * * Since: 3.10 */ public uint getDesktop(Window window) { return gdk_x11_window_get_desktop(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct()); } /** * Returns the X resource (window) belonging to a #GdkWindow. * * Returns: the ID of @drawable’s X resource. */ public uint getXid(Window window) { return gdk_x11_window_get_xid(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct()); } /** * Moves the window to the correct workspace when running under a * window manager that supports multiple workspaces, as described * in the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) specification. * Will not do anything if the window is already on all workspaces. * * Since: 2.8 */ public void moveToCurrentDesktop(Window window) { gdk_x11_window_move_to_current_desktop(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct()); } /** * Moves the window to the given workspace when running unde a * window manager that supports multiple workspaces, as described * in the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) specification. * * Params: * desktop = the number of the workspace to move the window to * * Since: 3.10 */ public void moveToDesktop(Window window, uint desktop) { gdk_x11_window_move_to_desktop(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct(), desktop); } /** * This is the same as gdk_window_set_shadow_width() but it only works * on GdkX11Window. * * Deprecated: Use gdk_window_set_shadow_width() instead. * * Params: * left = The left extent * right = The right extent * top = The top extent * bottom = The bottom extent * * Since: 3.10 */ public void setFrameExtents(Window window, int left, int right, int top, int bottom) { gdk_x11_window_set_frame_extents(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct(), left, right, top, bottom); } /** * This function can be used to disable frame synchronization for a window. * Normally frame synchronziation will be enabled or disabled based on whether * the system has a compositor that supports frame synchronization, but if * the window is not directly managed by the window manager, then frame * synchronziation may need to be disabled. This is the case for a window * embedded via the XEMBED protocol. * * Params: * frameSyncEnabled = whether frame-synchronization should be enabled * * Since: 3.8 */ public void setFrameSyncEnabled(Window window, bool frameSyncEnabled) { gdk_x11_window_set_frame_sync_enabled(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct(), frameSyncEnabled); } /** * Set a hint for the window manager, requesting that the titlebar * should be hidden when the window is maximized. * * Note that this property is automatically updated by GTK+, so this * function should only be used by applications which do not use GTK+ * to create toplevel windows. * * Params: * hideTitlebarWhenMaximized = whether to hide the titlebar when * maximized * * Since: 3.4 */ public void setHideTitlebarWhenMaximized(Window window, bool hideTitlebarWhenMaximized) { gdk_x11_window_set_hide_titlebar_when_maximized(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct(), hideTitlebarWhenMaximized); } /** * GTK+ applications can request a dark theme variant. In order to * make other applications - namely window managers using GTK+ for * themeing - aware of this choice, GTK+ uses this function to * export the requested theme variant as _GTK_THEME_VARIANT property * on toplevel windows. * * Note that this property is automatically updated by GTK+, so this * function should only be used by applications which do not use GTK+ * to create toplevel windows. * * Params: * variant = the theme variant to export * * Since: 3.2 */ public void setThemeVariant(Window window, string variant) { gdk_x11_window_set_theme_variant(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct(), Str.toStringz(variant)); } /** * The application can use this call to update the _NET_WM_USER_TIME * property on a toplevel window. This property stores an Xserver * time which represents the time of the last user input event * received for this window. This property may be used by the window * manager to alter the focus, stacking, and/or placement behavior of * windows when they are mapped depending on whether the new window * was created by a user action or is a "pop-up" window activated by a * timer or some other event. * * Note that this property is automatically updated by GDK, so this * function should only be used by applications which handle input * events bypassing GDK. * * Params: * timestamp = An XServer timestamp to which the property should be set * * Since: 2.6 */ public void setUserTime(Window window, uint timestamp) { gdk_x11_window_set_user_time(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct(), timestamp); } /** * This function modifies or removes an arbitrary X11 window * property of type UTF8_STRING. If the given @window is * not a toplevel window, it is ignored. * * Params: * name = Property name, will be interned as an X atom * value = Property value, or %NULL to delete * * Since: 3.4 */ public void setUtf8Property(Window window, string name, string value) { gdk_x11_window_set_utf8_property(cast(GdkWindow*)(window is null) ? null : window.getWindowStruct(), Str.toStringz(name), Str.toStringz(value)); } GtkD-3.7.5/generated/gtkd/gdk/c/000077500000000000000000000000001324604450400162375ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gdk/c/functions.d000066400000000000000000004162201324604450400204210ustar00rootroot00000000000000/* * 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 gdk.c.functions; import std.stdio; import gdk.c.types; import cairo.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GDK = ["libgdk-3-0.dll"]; else version (OSX) static immutable LIBRARY_GDK = ["libgdk-3.0.dylib"]; else static immutable LIBRARY_GDK = ["libgdk-3.so.0"]; shared static this() { // gdk.AppLaunchContext Linker.link(gdk_app_launch_context_get_type, "gdk_app_launch_context_get_type", LIBRARY_GDK); Linker.link(gdk_app_launch_context_new, "gdk_app_launch_context_new", LIBRARY_GDK); Linker.link(gdk_app_launch_context_set_desktop, "gdk_app_launch_context_set_desktop", LIBRARY_GDK); Linker.link(gdk_app_launch_context_set_display, "gdk_app_launch_context_set_display", LIBRARY_GDK); Linker.link(gdk_app_launch_context_set_icon, "gdk_app_launch_context_set_icon", LIBRARY_GDK); Linker.link(gdk_app_launch_context_set_icon_name, "gdk_app_launch_context_set_icon_name", LIBRARY_GDK); Linker.link(gdk_app_launch_context_set_screen, "gdk_app_launch_context_set_screen", LIBRARY_GDK); Linker.link(gdk_app_launch_context_set_timestamp, "gdk_app_launch_context_set_timestamp", LIBRARY_GDK); // gdk.Atom Linker.link(gdk_atom_name, "gdk_atom_name", LIBRARY_GDK); Linker.link(gdk_atom_intern, "gdk_atom_intern", LIBRARY_GDK); Linker.link(gdk_atom_intern_static_string, "gdk_atom_intern_static_string", LIBRARY_GDK); Linker.link(gdk_property_change, "gdk_property_change", LIBRARY_GDK); Linker.link(gdk_property_delete, "gdk_property_delete", LIBRARY_GDK); Linker.link(gdk_property_get, "gdk_property_get", LIBRARY_GDK); Linker.link(gdk_text_property_to_utf8_list_for_display, "gdk_text_property_to_utf8_list_for_display", LIBRARY_GDK); Linker.link(gdk_utf8_to_string_target, "gdk_utf8_to_string_target", LIBRARY_GDK); // gdk.Color Linker.link(gdk_color_get_type, "gdk_color_get_type", LIBRARY_GDK); Linker.link(gdk_color_copy, "gdk_color_copy", LIBRARY_GDK); Linker.link(gdk_color_equal, "gdk_color_equal", LIBRARY_GDK); Linker.link(gdk_color_free, "gdk_color_free", LIBRARY_GDK); Linker.link(gdk_color_hash, "gdk_color_hash", LIBRARY_GDK); Linker.link(gdk_color_to_string, "gdk_color_to_string", LIBRARY_GDK); Linker.link(gdk_color_parse, "gdk_color_parse", LIBRARY_GDK); // gdk.Cursor Linker.link(gdk_cursor_get_type, "gdk_cursor_get_type", LIBRARY_GDK); Linker.link(gdk_cursor_new, "gdk_cursor_new", LIBRARY_GDK); Linker.link(gdk_cursor_new_for_display, "gdk_cursor_new_for_display", LIBRARY_GDK); Linker.link(gdk_cursor_new_from_name, "gdk_cursor_new_from_name", LIBRARY_GDK); Linker.link(gdk_cursor_new_from_pixbuf, "gdk_cursor_new_from_pixbuf", LIBRARY_GDK); Linker.link(gdk_cursor_new_from_surface, "gdk_cursor_new_from_surface", LIBRARY_GDK); Linker.link(gdk_cursor_get_cursor_type, "gdk_cursor_get_cursor_type", LIBRARY_GDK); Linker.link(gdk_cursor_get_display, "gdk_cursor_get_display", LIBRARY_GDK); Linker.link(gdk_cursor_get_image, "gdk_cursor_get_image", LIBRARY_GDK); Linker.link(gdk_cursor_get_surface, "gdk_cursor_get_surface", LIBRARY_GDK); Linker.link(gdk_cursor_ref, "gdk_cursor_ref", LIBRARY_GDK); Linker.link(gdk_cursor_unref, "gdk_cursor_unref", LIBRARY_GDK); // gdk.Device Linker.link(gdk_device_get_type, "gdk_device_get_type", LIBRARY_GDK); Linker.link(gdk_device_free_history, "gdk_device_free_history", LIBRARY_GDK); Linker.link(gdk_device_grab_info_libgtk_only, "gdk_device_grab_info_libgtk_only", LIBRARY_GDK); Linker.link(gdk_device_get_associated_device, "gdk_device_get_associated_device", LIBRARY_GDK); Linker.link(gdk_device_get_axes, "gdk_device_get_axes", LIBRARY_GDK); Linker.link(gdk_device_get_axis, "gdk_device_get_axis", LIBRARY_GDK); Linker.link(gdk_device_get_axis_use, "gdk_device_get_axis_use", LIBRARY_GDK); Linker.link(gdk_device_get_axis_value, "gdk_device_get_axis_value", LIBRARY_GDK); Linker.link(gdk_device_get_device_type, "gdk_device_get_device_type", LIBRARY_GDK); Linker.link(gdk_device_get_display, "gdk_device_get_display", LIBRARY_GDK); Linker.link(gdk_device_get_has_cursor, "gdk_device_get_has_cursor", LIBRARY_GDK); Linker.link(gdk_device_get_history, "gdk_device_get_history", LIBRARY_GDK); Linker.link(gdk_device_get_key, "gdk_device_get_key", LIBRARY_GDK); Linker.link(gdk_device_get_last_event_window, "gdk_device_get_last_event_window", LIBRARY_GDK); Linker.link(gdk_device_get_mode, "gdk_device_get_mode", LIBRARY_GDK); Linker.link(gdk_device_get_n_axes, "gdk_device_get_n_axes", LIBRARY_GDK); Linker.link(gdk_device_get_n_keys, "gdk_device_get_n_keys", LIBRARY_GDK); Linker.link(gdk_device_get_name, "gdk_device_get_name", LIBRARY_GDK); Linker.link(gdk_device_get_position, "gdk_device_get_position", LIBRARY_GDK); Linker.link(gdk_device_get_position_double, "gdk_device_get_position_double", LIBRARY_GDK); Linker.link(gdk_device_get_product_id, "gdk_device_get_product_id", LIBRARY_GDK); Linker.link(gdk_device_get_seat, "gdk_device_get_seat", LIBRARY_GDK); Linker.link(gdk_device_get_source, "gdk_device_get_source", LIBRARY_GDK); Linker.link(gdk_device_get_state, "gdk_device_get_state", LIBRARY_GDK); Linker.link(gdk_device_get_vendor_id, "gdk_device_get_vendor_id", LIBRARY_GDK); Linker.link(gdk_device_get_window_at_position, "gdk_device_get_window_at_position", LIBRARY_GDK); Linker.link(gdk_device_get_window_at_position_double, "gdk_device_get_window_at_position_double", LIBRARY_GDK); Linker.link(gdk_device_grab, "gdk_device_grab", LIBRARY_GDK); Linker.link(gdk_device_list_axes, "gdk_device_list_axes", LIBRARY_GDK); Linker.link(gdk_device_list_slave_devices, "gdk_device_list_slave_devices", LIBRARY_GDK); Linker.link(gdk_device_set_axis_use, "gdk_device_set_axis_use", LIBRARY_GDK); Linker.link(gdk_device_set_key, "gdk_device_set_key", LIBRARY_GDK); Linker.link(gdk_device_set_mode, "gdk_device_set_mode", LIBRARY_GDK); Linker.link(gdk_device_ungrab, "gdk_device_ungrab", LIBRARY_GDK); Linker.link(gdk_device_warp, "gdk_device_warp", LIBRARY_GDK); // gdk.DeviceManager Linker.link(gdk_device_manager_get_type, "gdk_device_manager_get_type", LIBRARY_GDK); Linker.link(gdk_device_manager_get_client_pointer, "gdk_device_manager_get_client_pointer", LIBRARY_GDK); Linker.link(gdk_device_manager_get_display, "gdk_device_manager_get_display", LIBRARY_GDK); Linker.link(gdk_device_manager_list_devices, "gdk_device_manager_list_devices", LIBRARY_GDK); Linker.link(gdk_disable_multidevice, "gdk_disable_multidevice", LIBRARY_GDK); // gdk.DevicePad Linker.link(gdk_device_pad_get_type, "gdk_device_pad_get_type", LIBRARY_GDK); Linker.link(gdk_device_pad_get_feature_group, "gdk_device_pad_get_feature_group", LIBRARY_GDK); Linker.link(gdk_device_pad_get_group_n_modes, "gdk_device_pad_get_group_n_modes", LIBRARY_GDK); Linker.link(gdk_device_pad_get_n_features, "gdk_device_pad_get_n_features", LIBRARY_GDK); Linker.link(gdk_device_pad_get_n_groups, "gdk_device_pad_get_n_groups", LIBRARY_GDK); // gdk.DeviceTool Linker.link(gdk_device_tool_get_type, "gdk_device_tool_get_type", LIBRARY_GDK); Linker.link(gdk_device_tool_get_hardware_id, "gdk_device_tool_get_hardware_id", LIBRARY_GDK); Linker.link(gdk_device_tool_get_serial, "gdk_device_tool_get_serial", LIBRARY_GDK); Linker.link(gdk_device_tool_get_tool_type, "gdk_device_tool_get_tool_type", LIBRARY_GDK); // gdk.Display Linker.link(gdk_display_get_type, "gdk_display_get_type", LIBRARY_GDK); Linker.link(gdk_display_get_default, "gdk_display_get_default", LIBRARY_GDK); Linker.link(gdk_display_open, "gdk_display_open", LIBRARY_GDK); Linker.link(gdk_display_open_default_libgtk_only, "gdk_display_open_default_libgtk_only", LIBRARY_GDK); Linker.link(gdk_display_beep, "gdk_display_beep", LIBRARY_GDK); Linker.link(gdk_display_close, "gdk_display_close", LIBRARY_GDK); Linker.link(gdk_display_device_is_grabbed, "gdk_display_device_is_grabbed", LIBRARY_GDK); Linker.link(gdk_display_flush, "gdk_display_flush", LIBRARY_GDK); Linker.link(gdk_display_get_app_launch_context, "gdk_display_get_app_launch_context", LIBRARY_GDK); Linker.link(gdk_display_get_default_cursor_size, "gdk_display_get_default_cursor_size", LIBRARY_GDK); Linker.link(gdk_display_get_default_group, "gdk_display_get_default_group", LIBRARY_GDK); Linker.link(gdk_display_get_default_screen, "gdk_display_get_default_screen", LIBRARY_GDK); Linker.link(gdk_display_get_default_seat, "gdk_display_get_default_seat", LIBRARY_GDK); Linker.link(gdk_display_get_device_manager, "gdk_display_get_device_manager", LIBRARY_GDK); Linker.link(gdk_display_get_event, "gdk_display_get_event", LIBRARY_GDK); Linker.link(gdk_display_get_maximal_cursor_size, "gdk_display_get_maximal_cursor_size", LIBRARY_GDK); Linker.link(gdk_display_get_monitor, "gdk_display_get_monitor", LIBRARY_GDK); Linker.link(gdk_display_get_monitor_at_point, "gdk_display_get_monitor_at_point", LIBRARY_GDK); Linker.link(gdk_display_get_monitor_at_window, "gdk_display_get_monitor_at_window", LIBRARY_GDK); Linker.link(gdk_display_get_n_monitors, "gdk_display_get_n_monitors", LIBRARY_GDK); Linker.link(gdk_display_get_n_screens, "gdk_display_get_n_screens", LIBRARY_GDK); Linker.link(gdk_display_get_name, "gdk_display_get_name", LIBRARY_GDK); Linker.link(gdk_display_get_pointer, "gdk_display_get_pointer", LIBRARY_GDK); Linker.link(gdk_display_get_primary_monitor, "gdk_display_get_primary_monitor", LIBRARY_GDK); Linker.link(gdk_display_get_screen, "gdk_display_get_screen", LIBRARY_GDK); Linker.link(gdk_display_get_window_at_pointer, "gdk_display_get_window_at_pointer", LIBRARY_GDK); Linker.link(gdk_display_has_pending, "gdk_display_has_pending", LIBRARY_GDK); Linker.link(gdk_display_is_closed, "gdk_display_is_closed", LIBRARY_GDK); Linker.link(gdk_display_keyboard_ungrab, "gdk_display_keyboard_ungrab", LIBRARY_GDK); Linker.link(gdk_display_list_devices, "gdk_display_list_devices", LIBRARY_GDK); Linker.link(gdk_display_list_seats, "gdk_display_list_seats", LIBRARY_GDK); Linker.link(gdk_display_notify_startup_complete, "gdk_display_notify_startup_complete", LIBRARY_GDK); Linker.link(gdk_display_peek_event, "gdk_display_peek_event", LIBRARY_GDK); Linker.link(gdk_display_pointer_is_grabbed, "gdk_display_pointer_is_grabbed", LIBRARY_GDK); Linker.link(gdk_display_pointer_ungrab, "gdk_display_pointer_ungrab", LIBRARY_GDK); Linker.link(gdk_display_put_event, "gdk_display_put_event", LIBRARY_GDK); Linker.link(gdk_display_request_selection_notification, "gdk_display_request_selection_notification", LIBRARY_GDK); Linker.link(gdk_display_set_double_click_distance, "gdk_display_set_double_click_distance", LIBRARY_GDK); Linker.link(gdk_display_set_double_click_time, "gdk_display_set_double_click_time", LIBRARY_GDK); Linker.link(gdk_display_store_clipboard, "gdk_display_store_clipboard", LIBRARY_GDK); Linker.link(gdk_display_supports_clipboard_persistence, "gdk_display_supports_clipboard_persistence", LIBRARY_GDK); Linker.link(gdk_display_supports_composite, "gdk_display_supports_composite", LIBRARY_GDK); Linker.link(gdk_display_supports_cursor_alpha, "gdk_display_supports_cursor_alpha", LIBRARY_GDK); Linker.link(gdk_display_supports_cursor_color, "gdk_display_supports_cursor_color", LIBRARY_GDK); Linker.link(gdk_display_supports_input_shapes, "gdk_display_supports_input_shapes", LIBRARY_GDK); Linker.link(gdk_display_supports_selection_notification, "gdk_display_supports_selection_notification", LIBRARY_GDK); Linker.link(gdk_display_supports_shapes, "gdk_display_supports_shapes", LIBRARY_GDK); Linker.link(gdk_display_sync, "gdk_display_sync", LIBRARY_GDK); Linker.link(gdk_display_warp_pointer, "gdk_display_warp_pointer", LIBRARY_GDK); // gdk.DisplayManager Linker.link(gdk_display_manager_get_type, "gdk_display_manager_get_type", LIBRARY_GDK); Linker.link(gdk_display_manager_get, "gdk_display_manager_get", LIBRARY_GDK); Linker.link(gdk_display_manager_get_default_display, "gdk_display_manager_get_default_display", LIBRARY_GDK); Linker.link(gdk_display_manager_list_displays, "gdk_display_manager_list_displays", LIBRARY_GDK); Linker.link(gdk_display_manager_open_display, "gdk_display_manager_open_display", LIBRARY_GDK); Linker.link(gdk_display_manager_set_default_display, "gdk_display_manager_set_default_display", LIBRARY_GDK); // gdk.DragContext Linker.link(gdk_drag_context_get_type, "gdk_drag_context_get_type", LIBRARY_GDK); Linker.link(gdk_drag_context_get_actions, "gdk_drag_context_get_actions", LIBRARY_GDK); Linker.link(gdk_drag_context_get_dest_window, "gdk_drag_context_get_dest_window", LIBRARY_GDK); Linker.link(gdk_drag_context_get_device, "gdk_drag_context_get_device", LIBRARY_GDK); Linker.link(gdk_drag_context_get_drag_window, "gdk_drag_context_get_drag_window", LIBRARY_GDK); Linker.link(gdk_drag_context_get_protocol, "gdk_drag_context_get_protocol", LIBRARY_GDK); Linker.link(gdk_drag_context_get_selected_action, "gdk_drag_context_get_selected_action", LIBRARY_GDK); Linker.link(gdk_drag_context_get_source_window, "gdk_drag_context_get_source_window", LIBRARY_GDK); Linker.link(gdk_drag_context_get_suggested_action, "gdk_drag_context_get_suggested_action", LIBRARY_GDK); Linker.link(gdk_drag_context_list_targets, "gdk_drag_context_list_targets", LIBRARY_GDK); Linker.link(gdk_drag_context_manage_dnd, "gdk_drag_context_manage_dnd", LIBRARY_GDK); Linker.link(gdk_drag_context_set_device, "gdk_drag_context_set_device", LIBRARY_GDK); Linker.link(gdk_drag_context_set_hotspot, "gdk_drag_context_set_hotspot", LIBRARY_GDK); Linker.link(gdk_drag_abort, "gdk_drag_abort", LIBRARY_GDK); Linker.link(gdk_drag_begin, "gdk_drag_begin", LIBRARY_GDK); Linker.link(gdk_drag_begin_for_device, "gdk_drag_begin_for_device", LIBRARY_GDK); Linker.link(gdk_drag_begin_from_point, "gdk_drag_begin_from_point", LIBRARY_GDK); Linker.link(gdk_drag_drop, "gdk_drag_drop", LIBRARY_GDK); Linker.link(gdk_drag_drop_done, "gdk_drag_drop_done", LIBRARY_GDK); Linker.link(gdk_drag_drop_succeeded, "gdk_drag_drop_succeeded", LIBRARY_GDK); Linker.link(gdk_drag_find_window_for_screen, "gdk_drag_find_window_for_screen", LIBRARY_GDK); Linker.link(gdk_drag_get_selection, "gdk_drag_get_selection", LIBRARY_GDK); Linker.link(gdk_drag_motion, "gdk_drag_motion", LIBRARY_GDK); Linker.link(gdk_drag_status, "gdk_drag_status", LIBRARY_GDK); Linker.link(gdk_drop_finish, "gdk_drop_finish", LIBRARY_GDK); Linker.link(gdk_drop_reply, "gdk_drop_reply", LIBRARY_GDK); // gdk.DrawingContext Linker.link(gdk_drawing_context_get_type, "gdk_drawing_context_get_type", LIBRARY_GDK); Linker.link(gdk_drawing_context_get_cairo_context, "gdk_drawing_context_get_cairo_context", LIBRARY_GDK); Linker.link(gdk_drawing_context_get_clip, "gdk_drawing_context_get_clip", LIBRARY_GDK); Linker.link(gdk_drawing_context_get_window, "gdk_drawing_context_get_window", LIBRARY_GDK); Linker.link(gdk_drawing_context_is_valid, "gdk_drawing_context_is_valid", LIBRARY_GDK); // gdk.Event Linker.link(gdk_event_get_type, "gdk_event_get_type", LIBRARY_GDK); Linker.link(gdk_event_new, "gdk_event_new", LIBRARY_GDK); Linker.link(gdk_events_get_angle, "gdk_events_get_angle", LIBRARY_GDK); Linker.link(gdk_events_get_center, "gdk_events_get_center", LIBRARY_GDK); Linker.link(gdk_events_get_distance, "gdk_events_get_distance", LIBRARY_GDK); Linker.link(gdk_event_copy, "gdk_event_copy", LIBRARY_GDK); Linker.link(gdk_event_free, "gdk_event_free", LIBRARY_GDK); Linker.link(gdk_event_get_axis, "gdk_event_get_axis", LIBRARY_GDK); Linker.link(gdk_event_get_button, "gdk_event_get_button", LIBRARY_GDK); Linker.link(gdk_event_get_click_count, "gdk_event_get_click_count", LIBRARY_GDK); Linker.link(gdk_event_get_coords, "gdk_event_get_coords", LIBRARY_GDK); Linker.link(gdk_event_get_device, "gdk_event_get_device", LIBRARY_GDK); Linker.link(gdk_event_get_device_tool, "gdk_event_get_device_tool", LIBRARY_GDK); Linker.link(gdk_event_get_event_sequence, "gdk_event_get_event_sequence", LIBRARY_GDK); Linker.link(gdk_event_get_event_type, "gdk_event_get_event_type", LIBRARY_GDK); Linker.link(gdk_event_get_keycode, "gdk_event_get_keycode", LIBRARY_GDK); Linker.link(gdk_event_get_keyval, "gdk_event_get_keyval", LIBRARY_GDK); Linker.link(gdk_event_get_pointer_emulated, "gdk_event_get_pointer_emulated", LIBRARY_GDK); Linker.link(gdk_event_get_root_coords, "gdk_event_get_root_coords", LIBRARY_GDK); Linker.link(gdk_event_get_scancode, "gdk_event_get_scancode", LIBRARY_GDK); Linker.link(gdk_event_get_screen, "gdk_event_get_screen", LIBRARY_GDK); Linker.link(gdk_event_get_scroll_deltas, "gdk_event_get_scroll_deltas", LIBRARY_GDK); Linker.link(gdk_event_get_scroll_direction, "gdk_event_get_scroll_direction", LIBRARY_GDK); Linker.link(gdk_event_get_seat, "gdk_event_get_seat", LIBRARY_GDK); Linker.link(gdk_event_get_source_device, "gdk_event_get_source_device", LIBRARY_GDK); Linker.link(gdk_event_get_state, "gdk_event_get_state", LIBRARY_GDK); Linker.link(gdk_event_get_time, "gdk_event_get_time", LIBRARY_GDK); Linker.link(gdk_event_get_window, "gdk_event_get_window", LIBRARY_GDK); Linker.link(gdk_event_is_scroll_stop_event, "gdk_event_is_scroll_stop_event", LIBRARY_GDK); Linker.link(gdk_event_put, "gdk_event_put", LIBRARY_GDK); Linker.link(gdk_event_set_device, "gdk_event_set_device", LIBRARY_GDK); Linker.link(gdk_event_set_device_tool, "gdk_event_set_device_tool", LIBRARY_GDK); Linker.link(gdk_event_set_screen, "gdk_event_set_screen", LIBRARY_GDK); Linker.link(gdk_event_set_source_device, "gdk_event_set_source_device", LIBRARY_GDK); Linker.link(gdk_event_triggers_context_menu, "gdk_event_triggers_context_menu", LIBRARY_GDK); Linker.link(gdk_event_get, "gdk_event_get", LIBRARY_GDK); Linker.link(gdk_event_handler_set, "gdk_event_handler_set", LIBRARY_GDK); Linker.link(gdk_event_peek, "gdk_event_peek", LIBRARY_GDK); Linker.link(gdk_event_request_motions, "gdk_event_request_motions", LIBRARY_GDK); Linker.link(gdk_events_pending, "gdk_events_pending", LIBRARY_GDK); Linker.link(gdk_get_show_events, "gdk_get_show_events", LIBRARY_GDK); Linker.link(gdk_set_show_events, "gdk_set_show_events", LIBRARY_GDK); Linker.link(gdk_setting_get, "gdk_setting_get", LIBRARY_GDK); // gdk.EventSequence Linker.link(gdk_event_sequence_get_type, "gdk_event_sequence_get_type", LIBRARY_GDK); // gdk.FrameClock Linker.link(gdk_frame_clock_get_type, "gdk_frame_clock_get_type", LIBRARY_GDK); Linker.link(gdk_frame_clock_begin_updating, "gdk_frame_clock_begin_updating", LIBRARY_GDK); Linker.link(gdk_frame_clock_end_updating, "gdk_frame_clock_end_updating", LIBRARY_GDK); Linker.link(gdk_frame_clock_get_current_timings, "gdk_frame_clock_get_current_timings", LIBRARY_GDK); Linker.link(gdk_frame_clock_get_frame_counter, "gdk_frame_clock_get_frame_counter", LIBRARY_GDK); Linker.link(gdk_frame_clock_get_frame_time, "gdk_frame_clock_get_frame_time", LIBRARY_GDK); Linker.link(gdk_frame_clock_get_history_start, "gdk_frame_clock_get_history_start", LIBRARY_GDK); Linker.link(gdk_frame_clock_get_refresh_info, "gdk_frame_clock_get_refresh_info", LIBRARY_GDK); Linker.link(gdk_frame_clock_get_timings, "gdk_frame_clock_get_timings", LIBRARY_GDK); Linker.link(gdk_frame_clock_request_phase, "gdk_frame_clock_request_phase", LIBRARY_GDK); // gdk.FrameTimings Linker.link(gdk_frame_timings_get_type, "gdk_frame_timings_get_type", LIBRARY_GDK); Linker.link(gdk_frame_timings_get_complete, "gdk_frame_timings_get_complete", LIBRARY_GDK); Linker.link(gdk_frame_timings_get_frame_counter, "gdk_frame_timings_get_frame_counter", LIBRARY_GDK); Linker.link(gdk_frame_timings_get_frame_time, "gdk_frame_timings_get_frame_time", LIBRARY_GDK); Linker.link(gdk_frame_timings_get_predicted_presentation_time, "gdk_frame_timings_get_predicted_presentation_time", LIBRARY_GDK); Linker.link(gdk_frame_timings_get_presentation_time, "gdk_frame_timings_get_presentation_time", LIBRARY_GDK); Linker.link(gdk_frame_timings_get_refresh_interval, "gdk_frame_timings_get_refresh_interval", LIBRARY_GDK); Linker.link(gdk_frame_timings_ref, "gdk_frame_timings_ref", LIBRARY_GDK); Linker.link(gdk_frame_timings_unref, "gdk_frame_timings_unref", LIBRARY_GDK); // gdk.GLContext Linker.link(gdk_gl_context_get_type, "gdk_gl_context_get_type", LIBRARY_GDK); Linker.link(gdk_gl_context_clear_current, "gdk_gl_context_clear_current", LIBRARY_GDK); Linker.link(gdk_gl_context_get_current, "gdk_gl_context_get_current", LIBRARY_GDK); Linker.link(gdk_gl_context_get_debug_enabled, "gdk_gl_context_get_debug_enabled", LIBRARY_GDK); Linker.link(gdk_gl_context_get_display, "gdk_gl_context_get_display", LIBRARY_GDK); Linker.link(gdk_gl_context_get_forward_compatible, "gdk_gl_context_get_forward_compatible", LIBRARY_GDK); Linker.link(gdk_gl_context_get_required_version, "gdk_gl_context_get_required_version", LIBRARY_GDK); Linker.link(gdk_gl_context_get_shared_context, "gdk_gl_context_get_shared_context", LIBRARY_GDK); Linker.link(gdk_gl_context_get_use_es, "gdk_gl_context_get_use_es", LIBRARY_GDK); Linker.link(gdk_gl_context_get_version, "gdk_gl_context_get_version", LIBRARY_GDK); Linker.link(gdk_gl_context_get_window, "gdk_gl_context_get_window", LIBRARY_GDK); Linker.link(gdk_gl_context_is_legacy, "gdk_gl_context_is_legacy", LIBRARY_GDK); Linker.link(gdk_gl_context_make_current, "gdk_gl_context_make_current", LIBRARY_GDK); Linker.link(gdk_gl_context_realize, "gdk_gl_context_realize", LIBRARY_GDK); Linker.link(gdk_gl_context_set_debug_enabled, "gdk_gl_context_set_debug_enabled", LIBRARY_GDK); Linker.link(gdk_gl_context_set_forward_compatible, "gdk_gl_context_set_forward_compatible", LIBRARY_GDK); Linker.link(gdk_gl_context_set_required_version, "gdk_gl_context_set_required_version", LIBRARY_GDK); Linker.link(gdk_gl_context_set_use_es, "gdk_gl_context_set_use_es", LIBRARY_GDK); // gdk.Keymap Linker.link(gdk_keymap_get_type, "gdk_keymap_get_type", LIBRARY_GDK); Linker.link(gdk_keymap_get_default, "gdk_keymap_get_default", LIBRARY_GDK); Linker.link(gdk_keymap_get_for_display, "gdk_keymap_get_for_display", LIBRARY_GDK); Linker.link(gdk_keymap_add_virtual_modifiers, "gdk_keymap_add_virtual_modifiers", LIBRARY_GDK); Linker.link(gdk_keymap_get_caps_lock_state, "gdk_keymap_get_caps_lock_state", LIBRARY_GDK); Linker.link(gdk_keymap_get_direction, "gdk_keymap_get_direction", LIBRARY_GDK); Linker.link(gdk_keymap_get_entries_for_keycode, "gdk_keymap_get_entries_for_keycode", LIBRARY_GDK); Linker.link(gdk_keymap_get_entries_for_keyval, "gdk_keymap_get_entries_for_keyval", LIBRARY_GDK); Linker.link(gdk_keymap_get_modifier_mask, "gdk_keymap_get_modifier_mask", LIBRARY_GDK); Linker.link(gdk_keymap_get_modifier_state, "gdk_keymap_get_modifier_state", LIBRARY_GDK); Linker.link(gdk_keymap_get_num_lock_state, "gdk_keymap_get_num_lock_state", LIBRARY_GDK); Linker.link(gdk_keymap_get_scroll_lock_state, "gdk_keymap_get_scroll_lock_state", LIBRARY_GDK); Linker.link(gdk_keymap_have_bidi_layouts, "gdk_keymap_have_bidi_layouts", LIBRARY_GDK); Linker.link(gdk_keymap_lookup_key, "gdk_keymap_lookup_key", LIBRARY_GDK); Linker.link(gdk_keymap_map_virtual_modifiers, "gdk_keymap_map_virtual_modifiers", LIBRARY_GDK); Linker.link(gdk_keymap_translate_keyboard_state, "gdk_keymap_translate_keyboard_state", LIBRARY_GDK); Linker.link(gdk_keyval_convert_case, "gdk_keyval_convert_case", LIBRARY_GDK); Linker.link(gdk_keyval_from_name, "gdk_keyval_from_name", LIBRARY_GDK); Linker.link(gdk_keyval_is_lower, "gdk_keyval_is_lower", LIBRARY_GDK); Linker.link(gdk_keyval_is_upper, "gdk_keyval_is_upper", LIBRARY_GDK); Linker.link(gdk_keyval_name, "gdk_keyval_name", LIBRARY_GDK); Linker.link(gdk_keyval_to_lower, "gdk_keyval_to_lower", LIBRARY_GDK); Linker.link(gdk_keyval_to_unicode, "gdk_keyval_to_unicode", LIBRARY_GDK); Linker.link(gdk_keyval_to_upper, "gdk_keyval_to_upper", LIBRARY_GDK); Linker.link(gdk_unicode_to_keyval, "gdk_unicode_to_keyval", LIBRARY_GDK); // gdk.MonitorG Linker.link(gdk_monitor_get_type, "gdk_monitor_get_type", LIBRARY_GDK); Linker.link(gdk_monitor_get_display, "gdk_monitor_get_display", LIBRARY_GDK); Linker.link(gdk_monitor_get_geometry, "gdk_monitor_get_geometry", LIBRARY_GDK); Linker.link(gdk_monitor_get_height_mm, "gdk_monitor_get_height_mm", LIBRARY_GDK); Linker.link(gdk_monitor_get_manufacturer, "gdk_monitor_get_manufacturer", LIBRARY_GDK); Linker.link(gdk_monitor_get_model, "gdk_monitor_get_model", LIBRARY_GDK); Linker.link(gdk_monitor_get_refresh_rate, "gdk_monitor_get_refresh_rate", LIBRARY_GDK); Linker.link(gdk_monitor_get_scale_factor, "gdk_monitor_get_scale_factor", LIBRARY_GDK); Linker.link(gdk_monitor_get_subpixel_layout, "gdk_monitor_get_subpixel_layout", LIBRARY_GDK); Linker.link(gdk_monitor_get_width_mm, "gdk_monitor_get_width_mm", LIBRARY_GDK); Linker.link(gdk_monitor_get_workarea, "gdk_monitor_get_workarea", LIBRARY_GDK); Linker.link(gdk_monitor_is_primary, "gdk_monitor_is_primary", LIBRARY_GDK); // gdk.RGBA Linker.link(gdk_rgba_get_type, "gdk_rgba_get_type", LIBRARY_GDK); Linker.link(gdk_rgba_copy, "gdk_rgba_copy", LIBRARY_GDK); Linker.link(gdk_rgba_equal, "gdk_rgba_equal", LIBRARY_GDK); Linker.link(gdk_rgba_free, "gdk_rgba_free", LIBRARY_GDK); Linker.link(gdk_rgba_hash, "gdk_rgba_hash", LIBRARY_GDK); Linker.link(gdk_rgba_parse, "gdk_rgba_parse", LIBRARY_GDK); Linker.link(gdk_rgba_to_string, "gdk_rgba_to_string", LIBRARY_GDK); // gdk.Rectangle Linker.link(gdk_rectangle_get_type, "gdk_rectangle_get_type", LIBRARY_GDK); Linker.link(gdk_rectangle_equal, "gdk_rectangle_equal", LIBRARY_GDK); Linker.link(gdk_rectangle_intersect, "gdk_rectangle_intersect", LIBRARY_GDK); Linker.link(gdk_rectangle_union, "gdk_rectangle_union", LIBRARY_GDK); // gdk.Screen Linker.link(gdk_screen_get_type, "gdk_screen_get_type", LIBRARY_GDK); Linker.link(gdk_screen_get_default, "gdk_screen_get_default", LIBRARY_GDK); Linker.link(gdk_screen_height, "gdk_screen_height", LIBRARY_GDK); Linker.link(gdk_screen_height_mm, "gdk_screen_height_mm", LIBRARY_GDK); Linker.link(gdk_screen_width, "gdk_screen_width", LIBRARY_GDK); Linker.link(gdk_screen_width_mm, "gdk_screen_width_mm", LIBRARY_GDK); Linker.link(gdk_screen_get_active_window, "gdk_screen_get_active_window", LIBRARY_GDK); Linker.link(gdk_screen_get_display, "gdk_screen_get_display", LIBRARY_GDK); Linker.link(gdk_screen_get_font_options, "gdk_screen_get_font_options", LIBRARY_GDK); Linker.link(gdk_screen_get_height, "gdk_screen_get_height", LIBRARY_GDK); Linker.link(gdk_screen_get_height_mm, "gdk_screen_get_height_mm", LIBRARY_GDK); Linker.link(gdk_screen_get_monitor_at_point, "gdk_screen_get_monitor_at_point", LIBRARY_GDK); Linker.link(gdk_screen_get_monitor_at_window, "gdk_screen_get_monitor_at_window", LIBRARY_GDK); Linker.link(gdk_screen_get_monitor_geometry, "gdk_screen_get_monitor_geometry", LIBRARY_GDK); Linker.link(gdk_screen_get_monitor_height_mm, "gdk_screen_get_monitor_height_mm", LIBRARY_GDK); Linker.link(gdk_screen_get_monitor_plug_name, "gdk_screen_get_monitor_plug_name", LIBRARY_GDK); Linker.link(gdk_screen_get_monitor_scale_factor, "gdk_screen_get_monitor_scale_factor", LIBRARY_GDK); Linker.link(gdk_screen_get_monitor_width_mm, "gdk_screen_get_monitor_width_mm", LIBRARY_GDK); Linker.link(gdk_screen_get_monitor_workarea, "gdk_screen_get_monitor_workarea", LIBRARY_GDK); Linker.link(gdk_screen_get_n_monitors, "gdk_screen_get_n_monitors", LIBRARY_GDK); Linker.link(gdk_screen_get_number, "gdk_screen_get_number", LIBRARY_GDK); Linker.link(gdk_screen_get_primary_monitor, "gdk_screen_get_primary_monitor", LIBRARY_GDK); Linker.link(gdk_screen_get_resolution, "gdk_screen_get_resolution", LIBRARY_GDK); Linker.link(gdk_screen_get_rgba_visual, "gdk_screen_get_rgba_visual", LIBRARY_GDK); Linker.link(gdk_screen_get_root_window, "gdk_screen_get_root_window", LIBRARY_GDK); Linker.link(gdk_screen_get_setting, "gdk_screen_get_setting", LIBRARY_GDK); Linker.link(gdk_screen_get_system_visual, "gdk_screen_get_system_visual", LIBRARY_GDK); Linker.link(gdk_screen_get_toplevel_windows, "gdk_screen_get_toplevel_windows", LIBRARY_GDK); Linker.link(gdk_screen_get_width, "gdk_screen_get_width", LIBRARY_GDK); Linker.link(gdk_screen_get_width_mm, "gdk_screen_get_width_mm", LIBRARY_GDK); Linker.link(gdk_screen_get_window_stack, "gdk_screen_get_window_stack", LIBRARY_GDK); Linker.link(gdk_screen_is_composited, "gdk_screen_is_composited", LIBRARY_GDK); Linker.link(gdk_screen_list_visuals, "gdk_screen_list_visuals", LIBRARY_GDK); Linker.link(gdk_screen_make_display_name, "gdk_screen_make_display_name", LIBRARY_GDK); Linker.link(gdk_screen_set_font_options, "gdk_screen_set_font_options", LIBRARY_GDK); Linker.link(gdk_screen_set_resolution, "gdk_screen_set_resolution", LIBRARY_GDK); // gdk.Seat Linker.link(gdk_seat_get_type, "gdk_seat_get_type", LIBRARY_GDK); Linker.link(gdk_seat_get_capabilities, "gdk_seat_get_capabilities", LIBRARY_GDK); Linker.link(gdk_seat_get_display, "gdk_seat_get_display", LIBRARY_GDK); Linker.link(gdk_seat_get_keyboard, "gdk_seat_get_keyboard", LIBRARY_GDK); Linker.link(gdk_seat_get_pointer, "gdk_seat_get_pointer", LIBRARY_GDK); Linker.link(gdk_seat_get_slaves, "gdk_seat_get_slaves", LIBRARY_GDK); Linker.link(gdk_seat_grab, "gdk_seat_grab", LIBRARY_GDK); Linker.link(gdk_seat_ungrab, "gdk_seat_ungrab", LIBRARY_GDK); // gdk.Visual Linker.link(gdk_visual_get_type, "gdk_visual_get_type", LIBRARY_GDK); Linker.link(gdk_visual_get_best, "gdk_visual_get_best", LIBRARY_GDK); Linker.link(gdk_visual_get_best_depth, "gdk_visual_get_best_depth", LIBRARY_GDK); Linker.link(gdk_visual_get_best_type, "gdk_visual_get_best_type", LIBRARY_GDK); Linker.link(gdk_visual_get_best_with_both, "gdk_visual_get_best_with_both", LIBRARY_GDK); Linker.link(gdk_visual_get_best_with_depth, "gdk_visual_get_best_with_depth", LIBRARY_GDK); Linker.link(gdk_visual_get_best_with_type, "gdk_visual_get_best_with_type", LIBRARY_GDK); Linker.link(gdk_visual_get_system, "gdk_visual_get_system", LIBRARY_GDK); Linker.link(gdk_visual_get_bits_per_rgb, "gdk_visual_get_bits_per_rgb", LIBRARY_GDK); Linker.link(gdk_visual_get_blue_pixel_details, "gdk_visual_get_blue_pixel_details", LIBRARY_GDK); Linker.link(gdk_visual_get_byte_order, "gdk_visual_get_byte_order", LIBRARY_GDK); Linker.link(gdk_visual_get_colormap_size, "gdk_visual_get_colormap_size", LIBRARY_GDK); Linker.link(gdk_visual_get_depth, "gdk_visual_get_depth", LIBRARY_GDK); Linker.link(gdk_visual_get_green_pixel_details, "gdk_visual_get_green_pixel_details", LIBRARY_GDK); Linker.link(gdk_visual_get_red_pixel_details, "gdk_visual_get_red_pixel_details", LIBRARY_GDK); Linker.link(gdk_visual_get_screen, "gdk_visual_get_screen", LIBRARY_GDK); Linker.link(gdk_visual_get_visual_type, "gdk_visual_get_visual_type", LIBRARY_GDK); Linker.link(gdk_list_visuals, "gdk_list_visuals", LIBRARY_GDK); Linker.link(gdk_query_depths, "gdk_query_depths", LIBRARY_GDK); Linker.link(gdk_query_visual_types, "gdk_query_visual_types", LIBRARY_GDK); // gdk.Window Linker.link(gdk_window_get_type, "gdk_window_get_type", LIBRARY_GDK); Linker.link(gdk_window_new, "gdk_window_new", LIBRARY_GDK); Linker.link(gdk_window_at_pointer, "gdk_window_at_pointer", LIBRARY_GDK); Linker.link(gdk_window_constrain_size, "gdk_window_constrain_size", LIBRARY_GDK); Linker.link(gdk_window_process_all_updates, "gdk_window_process_all_updates", LIBRARY_GDK); Linker.link(gdk_window_set_debug_updates, "gdk_window_set_debug_updates", LIBRARY_GDK); Linker.link(gdk_window_add_filter, "gdk_window_add_filter", LIBRARY_GDK); Linker.link(gdk_window_beep, "gdk_window_beep", LIBRARY_GDK); Linker.link(gdk_window_begin_draw_frame, "gdk_window_begin_draw_frame", LIBRARY_GDK); Linker.link(gdk_window_begin_move_drag, "gdk_window_begin_move_drag", LIBRARY_GDK); Linker.link(gdk_window_begin_move_drag_for_device, "gdk_window_begin_move_drag_for_device", LIBRARY_GDK); Linker.link(gdk_window_begin_paint_rect, "gdk_window_begin_paint_rect", LIBRARY_GDK); Linker.link(gdk_window_begin_paint_region, "gdk_window_begin_paint_region", LIBRARY_GDK); Linker.link(gdk_window_begin_resize_drag, "gdk_window_begin_resize_drag", LIBRARY_GDK); Linker.link(gdk_window_begin_resize_drag_for_device, "gdk_window_begin_resize_drag_for_device", LIBRARY_GDK); Linker.link(gdk_window_configure_finished, "gdk_window_configure_finished", LIBRARY_GDK); Linker.link(gdk_window_coords_from_parent, "gdk_window_coords_from_parent", LIBRARY_GDK); Linker.link(gdk_window_coords_to_parent, "gdk_window_coords_to_parent", LIBRARY_GDK); Linker.link(gdk_window_create_gl_context, "gdk_window_create_gl_context", LIBRARY_GDK); Linker.link(gdk_window_create_similar_image_surface, "gdk_window_create_similar_image_surface", LIBRARY_GDK); Linker.link(gdk_window_create_similar_surface, "gdk_window_create_similar_surface", LIBRARY_GDK); Linker.link(gdk_window_deiconify, "gdk_window_deiconify", LIBRARY_GDK); Linker.link(gdk_window_destroy, "gdk_window_destroy", LIBRARY_GDK); Linker.link(gdk_window_destroy_notify, "gdk_window_destroy_notify", LIBRARY_GDK); Linker.link(gdk_window_enable_synchronized_configure, "gdk_window_enable_synchronized_configure", LIBRARY_GDK); Linker.link(gdk_window_end_draw_frame, "gdk_window_end_draw_frame", LIBRARY_GDK); Linker.link(gdk_window_end_paint, "gdk_window_end_paint", LIBRARY_GDK); Linker.link(gdk_window_ensure_native, "gdk_window_ensure_native", LIBRARY_GDK); Linker.link(gdk_window_flush, "gdk_window_flush", LIBRARY_GDK); Linker.link(gdk_window_focus, "gdk_window_focus", LIBRARY_GDK); Linker.link(gdk_window_freeze_toplevel_updates_libgtk_only, "gdk_window_freeze_toplevel_updates_libgtk_only", LIBRARY_GDK); Linker.link(gdk_window_freeze_updates, "gdk_window_freeze_updates", LIBRARY_GDK); Linker.link(gdk_window_fullscreen, "gdk_window_fullscreen", LIBRARY_GDK); Linker.link(gdk_window_fullscreen_on_monitor, "gdk_window_fullscreen_on_monitor", LIBRARY_GDK); Linker.link(gdk_window_geometry_changed, "gdk_window_geometry_changed", LIBRARY_GDK); Linker.link(gdk_window_get_accept_focus, "gdk_window_get_accept_focus", LIBRARY_GDK); Linker.link(gdk_window_get_background_pattern, "gdk_window_get_background_pattern", LIBRARY_GDK); Linker.link(gdk_window_get_children, "gdk_window_get_children", LIBRARY_GDK); Linker.link(gdk_window_get_children_with_user_data, "gdk_window_get_children_with_user_data", LIBRARY_GDK); Linker.link(gdk_window_get_clip_region, "gdk_window_get_clip_region", LIBRARY_GDK); Linker.link(gdk_window_get_composited, "gdk_window_get_composited", LIBRARY_GDK); Linker.link(gdk_window_get_cursor, "gdk_window_get_cursor", LIBRARY_GDK); Linker.link(gdk_window_get_decorations, "gdk_window_get_decorations", LIBRARY_GDK); Linker.link(gdk_window_get_device_cursor, "gdk_window_get_device_cursor", LIBRARY_GDK); Linker.link(gdk_window_get_device_events, "gdk_window_get_device_events", LIBRARY_GDK); Linker.link(gdk_window_get_device_position, "gdk_window_get_device_position", LIBRARY_GDK); Linker.link(gdk_window_get_device_position_double, "gdk_window_get_device_position_double", LIBRARY_GDK); Linker.link(gdk_window_get_display, "gdk_window_get_display", LIBRARY_GDK); Linker.link(gdk_window_get_drag_protocol, "gdk_window_get_drag_protocol", LIBRARY_GDK); Linker.link(gdk_window_get_effective_parent, "gdk_window_get_effective_parent", LIBRARY_GDK); Linker.link(gdk_window_get_effective_toplevel, "gdk_window_get_effective_toplevel", LIBRARY_GDK); Linker.link(gdk_window_get_event_compression, "gdk_window_get_event_compression", LIBRARY_GDK); Linker.link(gdk_window_get_events, "gdk_window_get_events", LIBRARY_GDK); Linker.link(gdk_window_get_focus_on_map, "gdk_window_get_focus_on_map", LIBRARY_GDK); Linker.link(gdk_window_get_frame_clock, "gdk_window_get_frame_clock", LIBRARY_GDK); Linker.link(gdk_window_get_frame_extents, "gdk_window_get_frame_extents", LIBRARY_GDK); Linker.link(gdk_window_get_fullscreen_mode, "gdk_window_get_fullscreen_mode", LIBRARY_GDK); Linker.link(gdk_window_get_geometry, "gdk_window_get_geometry", LIBRARY_GDK); Linker.link(gdk_window_get_group, "gdk_window_get_group", LIBRARY_GDK); Linker.link(gdk_window_get_height, "gdk_window_get_height", LIBRARY_GDK); Linker.link(gdk_window_get_modal_hint, "gdk_window_get_modal_hint", LIBRARY_GDK); Linker.link(gdk_window_get_origin, "gdk_window_get_origin", LIBRARY_GDK); Linker.link(gdk_window_get_parent, "gdk_window_get_parent", LIBRARY_GDK); Linker.link(gdk_window_get_pass_through, "gdk_window_get_pass_through", LIBRARY_GDK); Linker.link(gdk_window_get_pointer, "gdk_window_get_pointer", LIBRARY_GDK); Linker.link(gdk_window_get_position, "gdk_window_get_position", LIBRARY_GDK); Linker.link(gdk_window_get_root_coords, "gdk_window_get_root_coords", LIBRARY_GDK); Linker.link(gdk_window_get_root_origin, "gdk_window_get_root_origin", LIBRARY_GDK); Linker.link(gdk_window_get_scale_factor, "gdk_window_get_scale_factor", LIBRARY_GDK); Linker.link(gdk_window_get_screen, "gdk_window_get_screen", LIBRARY_GDK); Linker.link(gdk_window_get_source_events, "gdk_window_get_source_events", LIBRARY_GDK); Linker.link(gdk_window_get_state, "gdk_window_get_state", LIBRARY_GDK); Linker.link(gdk_window_get_support_multidevice, "gdk_window_get_support_multidevice", LIBRARY_GDK); Linker.link(gdk_window_get_toplevel, "gdk_window_get_toplevel", LIBRARY_GDK); Linker.link(gdk_window_get_type_hint, "gdk_window_get_type_hint", LIBRARY_GDK); Linker.link(gdk_window_get_update_area, "gdk_window_get_update_area", LIBRARY_GDK); Linker.link(gdk_window_get_user_data, "gdk_window_get_user_data", LIBRARY_GDK); Linker.link(gdk_window_get_visible_region, "gdk_window_get_visible_region", LIBRARY_GDK); Linker.link(gdk_window_get_visual, "gdk_window_get_visual", LIBRARY_GDK); Linker.link(gdk_window_get_width, "gdk_window_get_width", LIBRARY_GDK); Linker.link(gdk_window_get_window_type, "gdk_window_get_window_type", LIBRARY_GDK); Linker.link(gdk_window_has_native, "gdk_window_has_native", LIBRARY_GDK); Linker.link(gdk_window_hide, "gdk_window_hide", LIBRARY_GDK); Linker.link(gdk_window_iconify, "gdk_window_iconify", LIBRARY_GDK); Linker.link(gdk_window_input_shape_combine_region, "gdk_window_input_shape_combine_region", LIBRARY_GDK); Linker.link(gdk_window_invalidate_maybe_recurse, "gdk_window_invalidate_maybe_recurse", LIBRARY_GDK); Linker.link(gdk_window_invalidate_rect, "gdk_window_invalidate_rect", LIBRARY_GDK); Linker.link(gdk_window_invalidate_region, "gdk_window_invalidate_region", LIBRARY_GDK); Linker.link(gdk_window_is_destroyed, "gdk_window_is_destroyed", LIBRARY_GDK); Linker.link(gdk_window_is_input_only, "gdk_window_is_input_only", LIBRARY_GDK); Linker.link(gdk_window_is_shaped, "gdk_window_is_shaped", LIBRARY_GDK); Linker.link(gdk_window_is_viewable, "gdk_window_is_viewable", LIBRARY_GDK); Linker.link(gdk_window_is_visible, "gdk_window_is_visible", LIBRARY_GDK); Linker.link(gdk_window_lower, "gdk_window_lower", LIBRARY_GDK); Linker.link(gdk_window_mark_paint_from_clip, "gdk_window_mark_paint_from_clip", LIBRARY_GDK); Linker.link(gdk_window_maximize, "gdk_window_maximize", LIBRARY_GDK); Linker.link(gdk_window_merge_child_input_shapes, "gdk_window_merge_child_input_shapes", LIBRARY_GDK); Linker.link(gdk_window_merge_child_shapes, "gdk_window_merge_child_shapes", LIBRARY_GDK); Linker.link(gdk_window_move, "gdk_window_move", LIBRARY_GDK); Linker.link(gdk_window_move_region, "gdk_window_move_region", LIBRARY_GDK); Linker.link(gdk_window_move_resize, "gdk_window_move_resize", LIBRARY_GDK); Linker.link(gdk_window_peek_children, "gdk_window_peek_children", LIBRARY_GDK); Linker.link(gdk_window_process_updates, "gdk_window_process_updates", LIBRARY_GDK); Linker.link(gdk_window_raise, "gdk_window_raise", LIBRARY_GDK); Linker.link(gdk_window_register_dnd, "gdk_window_register_dnd", LIBRARY_GDK); Linker.link(gdk_window_remove_filter, "gdk_window_remove_filter", LIBRARY_GDK); Linker.link(gdk_window_reparent, "gdk_window_reparent", LIBRARY_GDK); Linker.link(gdk_window_resize, "gdk_window_resize", LIBRARY_GDK); Linker.link(gdk_window_restack, "gdk_window_restack", LIBRARY_GDK); Linker.link(gdk_window_scroll, "gdk_window_scroll", LIBRARY_GDK); Linker.link(gdk_window_set_accept_focus, "gdk_window_set_accept_focus", LIBRARY_GDK); Linker.link(gdk_window_set_background, "gdk_window_set_background", LIBRARY_GDK); Linker.link(gdk_window_set_background_pattern, "gdk_window_set_background_pattern", LIBRARY_GDK); Linker.link(gdk_window_set_background_rgba, "gdk_window_set_background_rgba", LIBRARY_GDK); Linker.link(gdk_window_set_child_input_shapes, "gdk_window_set_child_input_shapes", LIBRARY_GDK); Linker.link(gdk_window_set_child_shapes, "gdk_window_set_child_shapes", LIBRARY_GDK); Linker.link(gdk_window_set_composited, "gdk_window_set_composited", LIBRARY_GDK); Linker.link(gdk_window_set_cursor, "gdk_window_set_cursor", LIBRARY_GDK); Linker.link(gdk_window_set_decorations, "gdk_window_set_decorations", LIBRARY_GDK); Linker.link(gdk_window_set_device_cursor, "gdk_window_set_device_cursor", LIBRARY_GDK); Linker.link(gdk_window_set_device_events, "gdk_window_set_device_events", LIBRARY_GDK); Linker.link(gdk_window_set_event_compression, "gdk_window_set_event_compression", LIBRARY_GDK); Linker.link(gdk_window_set_events, "gdk_window_set_events", LIBRARY_GDK); Linker.link(gdk_window_set_focus_on_map, "gdk_window_set_focus_on_map", LIBRARY_GDK); Linker.link(gdk_window_set_fullscreen_mode, "gdk_window_set_fullscreen_mode", LIBRARY_GDK); Linker.link(gdk_window_set_functions, "gdk_window_set_functions", LIBRARY_GDK); Linker.link(gdk_window_set_geometry_hints, "gdk_window_set_geometry_hints", LIBRARY_GDK); Linker.link(gdk_window_set_group, "gdk_window_set_group", LIBRARY_GDK); Linker.link(gdk_window_set_icon_list, "gdk_window_set_icon_list", LIBRARY_GDK); Linker.link(gdk_window_set_icon_name, "gdk_window_set_icon_name", LIBRARY_GDK); Linker.link(gdk_window_set_invalidate_handler, "gdk_window_set_invalidate_handler", LIBRARY_GDK); Linker.link(gdk_window_set_keep_above, "gdk_window_set_keep_above", LIBRARY_GDK); Linker.link(gdk_window_set_keep_below, "gdk_window_set_keep_below", LIBRARY_GDK); Linker.link(gdk_window_set_modal_hint, "gdk_window_set_modal_hint", LIBRARY_GDK); Linker.link(gdk_window_set_opacity, "gdk_window_set_opacity", LIBRARY_GDK); Linker.link(gdk_window_set_opaque_region, "gdk_window_set_opaque_region", LIBRARY_GDK); Linker.link(gdk_window_set_override_redirect, "gdk_window_set_override_redirect", LIBRARY_GDK); Linker.link(gdk_window_set_pass_through, "gdk_window_set_pass_through", LIBRARY_GDK); Linker.link(gdk_window_set_role, "gdk_window_set_role", LIBRARY_GDK); Linker.link(gdk_window_set_shadow_width, "gdk_window_set_shadow_width", LIBRARY_GDK); Linker.link(gdk_window_set_skip_pager_hint, "gdk_window_set_skip_pager_hint", LIBRARY_GDK); Linker.link(gdk_window_set_skip_taskbar_hint, "gdk_window_set_skip_taskbar_hint", LIBRARY_GDK); Linker.link(gdk_window_set_source_events, "gdk_window_set_source_events", LIBRARY_GDK); Linker.link(gdk_window_set_startup_id, "gdk_window_set_startup_id", LIBRARY_GDK); Linker.link(gdk_window_set_static_gravities, "gdk_window_set_static_gravities", LIBRARY_GDK); Linker.link(gdk_window_set_support_multidevice, "gdk_window_set_support_multidevice", LIBRARY_GDK); Linker.link(gdk_window_set_title, "gdk_window_set_title", LIBRARY_GDK); Linker.link(gdk_window_set_transient_for, "gdk_window_set_transient_for", LIBRARY_GDK); Linker.link(gdk_window_set_type_hint, "gdk_window_set_type_hint", LIBRARY_GDK); Linker.link(gdk_window_set_urgency_hint, "gdk_window_set_urgency_hint", LIBRARY_GDK); Linker.link(gdk_window_set_user_data, "gdk_window_set_user_data", LIBRARY_GDK); Linker.link(gdk_window_shape_combine_region, "gdk_window_shape_combine_region", LIBRARY_GDK); Linker.link(gdk_window_show, "gdk_window_show", LIBRARY_GDK); Linker.link(gdk_window_show_unraised, "gdk_window_show_unraised", LIBRARY_GDK); Linker.link(gdk_window_show_window_menu, "gdk_window_show_window_menu", LIBRARY_GDK); Linker.link(gdk_window_stick, "gdk_window_stick", LIBRARY_GDK); Linker.link(gdk_window_thaw_toplevel_updates_libgtk_only, "gdk_window_thaw_toplevel_updates_libgtk_only", LIBRARY_GDK); Linker.link(gdk_window_thaw_updates, "gdk_window_thaw_updates", LIBRARY_GDK); Linker.link(gdk_window_unfullscreen, "gdk_window_unfullscreen", LIBRARY_GDK); Linker.link(gdk_window_unmaximize, "gdk_window_unmaximize", LIBRARY_GDK); Linker.link(gdk_window_unstick, "gdk_window_unstick", LIBRARY_GDK); Linker.link(gdk_window_withdraw, "gdk_window_withdraw", LIBRARY_GDK); Linker.link(gdk_get_default_root_window, "gdk_get_default_root_window", LIBRARY_GDK); Linker.link(gdk_offscreen_window_get_embedder, "gdk_offscreen_window_get_embedder", LIBRARY_GDK); Linker.link(gdk_offscreen_window_get_surface, "gdk_offscreen_window_get_surface", LIBRARY_GDK); Linker.link(gdk_offscreen_window_set_embedder, "gdk_offscreen_window_set_embedder", LIBRARY_GDK); Linker.link(gdk_synthesize_window_state, "gdk_synthesize_window_state", LIBRARY_GDK); // gdk.X11 Linker.link(gdk_x11_window_get_type, "gdk_x11_window_get_type", LIBRARY_GDK); Linker.link(gdk_x11_window_foreign_new_for_display, "gdk_x11_window_foreign_new_for_display", LIBRARY_GDK); Linker.link(gdk_x11_window_lookup_for_display, "gdk_x11_window_lookup_for_display", LIBRARY_GDK); Linker.link(gdk_x11_window_get_desktop, "gdk_x11_window_get_desktop", LIBRARY_GDK); Linker.link(gdk_x11_window_get_xid, "gdk_x11_window_get_xid", LIBRARY_GDK); Linker.link(gdk_x11_window_move_to_current_desktop, "gdk_x11_window_move_to_current_desktop", LIBRARY_GDK); Linker.link(gdk_x11_window_move_to_desktop, "gdk_x11_window_move_to_desktop", LIBRARY_GDK); Linker.link(gdk_x11_window_set_frame_extents, "gdk_x11_window_set_frame_extents", LIBRARY_GDK); Linker.link(gdk_x11_window_set_frame_sync_enabled, "gdk_x11_window_set_frame_sync_enabled", LIBRARY_GDK); Linker.link(gdk_x11_window_set_hide_titlebar_when_maximized, "gdk_x11_window_set_hide_titlebar_when_maximized", LIBRARY_GDK); Linker.link(gdk_x11_window_set_theme_variant, "gdk_x11_window_set_theme_variant", LIBRARY_GDK); Linker.link(gdk_x11_window_set_user_time, "gdk_x11_window_set_user_time", LIBRARY_GDK); Linker.link(gdk_x11_window_set_utf8_property, "gdk_x11_window_set_utf8_property", LIBRARY_GDK); // gdk.Cairo Linker.link(gdk_cairo_create, "gdk_cairo_create", LIBRARY_GDK); Linker.link(gdk_cairo_draw_from_gl, "gdk_cairo_draw_from_gl", LIBRARY_GDK); Linker.link(gdk_cairo_get_clip_rectangle, "gdk_cairo_get_clip_rectangle", LIBRARY_GDK); Linker.link(gdk_cairo_rectangle, "gdk_cairo_rectangle", LIBRARY_GDK); Linker.link(gdk_cairo_region, "gdk_cairo_region", LIBRARY_GDK); Linker.link(gdk_cairo_region_create_from_surface, "gdk_cairo_region_create_from_surface", LIBRARY_GDK); Linker.link(gdk_cairo_set_source_color, "gdk_cairo_set_source_color", LIBRARY_GDK); Linker.link(gdk_cairo_set_source_pixbuf, "gdk_cairo_set_source_pixbuf", LIBRARY_GDK); Linker.link(gdk_cairo_set_source_rgba, "gdk_cairo_set_source_rgba", LIBRARY_GDK); Linker.link(gdk_cairo_set_source_window, "gdk_cairo_set_source_window", LIBRARY_GDK); Linker.link(gdk_cairo_surface_create_from_pixbuf, "gdk_cairo_surface_create_from_pixbuf", LIBRARY_GDK); Linker.link(gdk_cairo_get_drawing_context, "gdk_cairo_get_drawing_context", LIBRARY_GDK); // gdk.Pango Linker.link(gdk_pango_context_get, "gdk_pango_context_get", LIBRARY_GDK); Linker.link(gdk_pango_context_get_for_screen, "gdk_pango_context_get_for_screen", LIBRARY_GDK); Linker.link(gdk_pango_layout_get_clip_region, "gdk_pango_layout_get_clip_region", LIBRARY_GDK); Linker.link(gdk_pango_layout_line_get_clip_region, "gdk_pango_layout_line_get_clip_region", LIBRARY_GDK); Linker.link(gdk_pango_context_get_for_display, "gdk_pango_context_get_for_display", LIBRARY_GDK); // gdk.Pixbuf Linker.link(gdk_pixbuf_get_from_surface, "gdk_pixbuf_get_from_surface", LIBRARY_GDK); Linker.link(gdk_pixbuf_get_from_window, "gdk_pixbuf_get_from_window", LIBRARY_GDK); // gdk.Threads Linker.link(gdk_threads_add_idle, "gdk_threads_add_idle", LIBRARY_GDK); Linker.link(gdk_threads_add_idle_full, "gdk_threads_add_idle_full", LIBRARY_GDK); Linker.link(gdk_threads_add_timeout, "gdk_threads_add_timeout", LIBRARY_GDK); Linker.link(gdk_threads_add_timeout_full, "gdk_threads_add_timeout_full", LIBRARY_GDK); Linker.link(gdk_threads_add_timeout_seconds, "gdk_threads_add_timeout_seconds", LIBRARY_GDK); Linker.link(gdk_threads_add_timeout_seconds_full, "gdk_threads_add_timeout_seconds_full", LIBRARY_GDK); Linker.link(gdk_threads_enter, "gdk_threads_enter", LIBRARY_GDK); Linker.link(gdk_threads_init, "gdk_threads_init", LIBRARY_GDK); Linker.link(gdk_threads_leave, "gdk_threads_leave", LIBRARY_GDK); Linker.link(gdk_threads_set_lock_functions, "gdk_threads_set_lock_functions", LIBRARY_GDK); // gdk.Gdk Linker.link(gdk_beep, "gdk_beep", LIBRARY_GDK); Linker.link(gdk_error_trap_pop, "gdk_error_trap_pop", LIBRARY_GDK); Linker.link(gdk_error_trap_pop_ignored, "gdk_error_trap_pop_ignored", LIBRARY_GDK); Linker.link(gdk_error_trap_push, "gdk_error_trap_push", LIBRARY_GDK); Linker.link(gdk_flush, "gdk_flush", LIBRARY_GDK); Linker.link(gdk_get_display, "gdk_get_display", LIBRARY_GDK); Linker.link(gdk_get_display_arg_name, "gdk_get_display_arg_name", LIBRARY_GDK); Linker.link(gdk_get_program_class, "gdk_get_program_class", LIBRARY_GDK); Linker.link(gdk_init, "gdk_init", LIBRARY_GDK); Linker.link(gdk_init_check, "gdk_init_check", LIBRARY_GDK); Linker.link(gdk_keyboard_grab, "gdk_keyboard_grab", LIBRARY_GDK); Linker.link(gdk_keyboard_ungrab, "gdk_keyboard_ungrab", LIBRARY_GDK); Linker.link(gdk_notify_startup_complete, "gdk_notify_startup_complete", LIBRARY_GDK); Linker.link(gdk_notify_startup_complete_with_id, "gdk_notify_startup_complete_with_id", LIBRARY_GDK); Linker.link(gdk_parse_args, "gdk_parse_args", LIBRARY_GDK); Linker.link(gdk_pointer_grab, "gdk_pointer_grab", LIBRARY_GDK); Linker.link(gdk_pointer_is_grabbed, "gdk_pointer_is_grabbed", LIBRARY_GDK); Linker.link(gdk_pointer_ungrab, "gdk_pointer_ungrab", LIBRARY_GDK); Linker.link(gdk_set_allowed_backends, "gdk_set_allowed_backends", LIBRARY_GDK); Linker.link(gdk_set_double_click_time, "gdk_set_double_click_time", LIBRARY_GDK); Linker.link(gdk_set_program_class, "gdk_set_program_class", LIBRARY_GDK); // gdk.Selection Linker.link(gdk_selection_convert, "gdk_selection_convert", LIBRARY_GDK); Linker.link(gdk_selection_owner_get, "gdk_selection_owner_get", LIBRARY_GDK); Linker.link(gdk_selection_owner_get_for_display, "gdk_selection_owner_get_for_display", LIBRARY_GDK); Linker.link(gdk_selection_owner_set, "gdk_selection_owner_set", LIBRARY_GDK); Linker.link(gdk_selection_owner_set_for_display, "gdk_selection_owner_set_for_display", LIBRARY_GDK); Linker.link(gdk_selection_property_get, "gdk_selection_property_get", LIBRARY_GDK); Linker.link(gdk_selection_send_notify, "gdk_selection_send_notify", LIBRARY_GDK); Linker.link(gdk_selection_send_notify_for_display, "gdk_selection_send_notify_for_display", LIBRARY_GDK); // gdk.Testing Linker.link(gdk_test_render_sync, "gdk_test_render_sync", LIBRARY_GDK); Linker.link(gdk_test_simulate_button, "gdk_test_simulate_button", LIBRARY_GDK); Linker.link(gdk_test_simulate_key, "gdk_test_simulate_key", LIBRARY_GDK); } __gshared extern(C) { // gdk.AppLaunchContext GType function() c_gdk_app_launch_context_get_type; GdkAppLaunchContext* function() c_gdk_app_launch_context_new; void function(GdkAppLaunchContext* context, int desktop) c_gdk_app_launch_context_set_desktop; void function(GdkAppLaunchContext* context, GdkDisplay* display) c_gdk_app_launch_context_set_display; void function(GdkAppLaunchContext* context, GIcon* icon) c_gdk_app_launch_context_set_icon; void function(GdkAppLaunchContext* context, const(char)* iconName) c_gdk_app_launch_context_set_icon_name; void function(GdkAppLaunchContext* context, GdkScreen* screen) c_gdk_app_launch_context_set_screen; void function(GdkAppLaunchContext* context, uint timestamp) c_gdk_app_launch_context_set_timestamp; // gdk.Atom char* function(GdkAtom atom) c_gdk_atom_name; GdkAtom function(const(char)* atomName, int onlyIfExists) c_gdk_atom_intern; GdkAtom function(const(char)* atomName) c_gdk_atom_intern_static_string; void function(GdkWindow* window, GdkAtom property, GdkAtom type, int format, GdkPropMode mode, char* data, int nelements) c_gdk_property_change; void function(GdkWindow* window, GdkAtom property) c_gdk_property_delete; int function(GdkWindow* window, GdkAtom property, GdkAtom type, gulong offset, gulong length, int pdelete, GdkAtom* actualPropertyType, int* actualFormat, int* actualLength, char** data) c_gdk_property_get; int function(GdkDisplay* display, GdkAtom encoding, int format, char* text, int length, char*** list) c_gdk_text_property_to_utf8_list_for_display; char* function(const(char)* str) c_gdk_utf8_to_string_target; // gdk.Color GType function() c_gdk_color_get_type; GdkColor* function(GdkColor* color) c_gdk_color_copy; int function(GdkColor* colora, GdkColor* colorb) c_gdk_color_equal; void function(GdkColor* color) c_gdk_color_free; uint function(GdkColor* color) c_gdk_color_hash; char* function(GdkColor* color) c_gdk_color_to_string; int function(const(char)* spec, GdkColor* color) c_gdk_color_parse; // gdk.Cursor GType function() c_gdk_cursor_get_type; GdkCursor* function(GdkCursorType cursorType) c_gdk_cursor_new; GdkCursor* function(GdkDisplay* display, GdkCursorType cursorType) c_gdk_cursor_new_for_display; GdkCursor* function(GdkDisplay* display, const(char)* name) c_gdk_cursor_new_from_name; GdkCursor* function(GdkDisplay* display, GdkPixbuf* pixbuf, int x, int y) c_gdk_cursor_new_from_pixbuf; GdkCursor* function(GdkDisplay* display, cairo_surface_t* surface, double x, double y) c_gdk_cursor_new_from_surface; GdkCursorType function(GdkCursor* cursor) c_gdk_cursor_get_cursor_type; GdkDisplay* function(GdkCursor* cursor) c_gdk_cursor_get_display; GdkPixbuf* function(GdkCursor* cursor) c_gdk_cursor_get_image; cairo_surface_t* function(GdkCursor* cursor, double* xHot, double* yHot) c_gdk_cursor_get_surface; GdkCursor* function(GdkCursor* cursor) c_gdk_cursor_ref; void function(GdkCursor* cursor) c_gdk_cursor_unref; // gdk.Device GType function() c_gdk_device_get_type; void function(GdkTimeCoord** events, int nEvents) c_gdk_device_free_history; int function(GdkDisplay* display, GdkDevice* device, GdkWindow** grabWindow, int* ownerEvents) c_gdk_device_grab_info_libgtk_only; GdkDevice* function(GdkDevice* device) c_gdk_device_get_associated_device; GdkAxisFlags function(GdkDevice* device) c_gdk_device_get_axes; int function(GdkDevice* device, double* axes, GdkAxisUse use, double* value) c_gdk_device_get_axis; GdkAxisUse function(GdkDevice* device, uint index) c_gdk_device_get_axis_use; int function(GdkDevice* device, double* axes, GdkAtom axisLabel, double* value) c_gdk_device_get_axis_value; GdkDeviceType function(GdkDevice* device) c_gdk_device_get_device_type; GdkDisplay* function(GdkDevice* device) c_gdk_device_get_display; int function(GdkDevice* device) c_gdk_device_get_has_cursor; int function(GdkDevice* device, GdkWindow* window, uint start, uint stop, GdkTimeCoord*** events, int* nEvents) c_gdk_device_get_history; int function(GdkDevice* device, uint index, uint* keyval, GdkModifierType* modifiers) c_gdk_device_get_key; GdkWindow* function(GdkDevice* device) c_gdk_device_get_last_event_window; GdkInputMode function(GdkDevice* device) c_gdk_device_get_mode; int function(GdkDevice* device) c_gdk_device_get_n_axes; int function(GdkDevice* device) c_gdk_device_get_n_keys; const(char)* function(GdkDevice* device) c_gdk_device_get_name; void function(GdkDevice* device, GdkScreen** screen, int* x, int* y) c_gdk_device_get_position; void function(GdkDevice* device, GdkScreen** screen, double* x, double* y) c_gdk_device_get_position_double; const(char)* function(GdkDevice* device) c_gdk_device_get_product_id; GdkSeat* function(GdkDevice* device) c_gdk_device_get_seat; GdkInputSource function(GdkDevice* device) c_gdk_device_get_source; void function(GdkDevice* device, GdkWindow* window, double* axes, GdkModifierType* mask) c_gdk_device_get_state; const(char)* function(GdkDevice* device) c_gdk_device_get_vendor_id; GdkWindow* function(GdkDevice* device, int* winX, int* winY) c_gdk_device_get_window_at_position; GdkWindow* function(GdkDevice* device, double* winX, double* winY) c_gdk_device_get_window_at_position_double; GdkGrabStatus function(GdkDevice* device, GdkWindow* window, GdkGrabOwnership grabOwnership, int ownerEvents, GdkEventMask eventMask, GdkCursor* cursor, uint time) c_gdk_device_grab; GList* function(GdkDevice* device) c_gdk_device_list_axes; GList* function(GdkDevice* device) c_gdk_device_list_slave_devices; void function(GdkDevice* device, uint index, GdkAxisUse use) c_gdk_device_set_axis_use; void function(GdkDevice* device, uint index, uint keyval, GdkModifierType modifiers) c_gdk_device_set_key; int function(GdkDevice* device, GdkInputMode mode) c_gdk_device_set_mode; void function(GdkDevice* device, uint time) c_gdk_device_ungrab; void function(GdkDevice* device, GdkScreen* screen, int x, int y) c_gdk_device_warp; // gdk.DeviceManager GType function() c_gdk_device_manager_get_type; GdkDevice* function(GdkDeviceManager* deviceManager) c_gdk_device_manager_get_client_pointer; GdkDisplay* function(GdkDeviceManager* deviceManager) c_gdk_device_manager_get_display; GList* function(GdkDeviceManager* deviceManager, GdkDeviceType type) c_gdk_device_manager_list_devices; void function() c_gdk_disable_multidevice; // gdk.DevicePad GType function() c_gdk_device_pad_get_type; int function(GdkDevicePad* pad, GdkDevicePadFeature feature, int featureIdx) c_gdk_device_pad_get_feature_group; int function(GdkDevicePad* pad, int groupIdx) c_gdk_device_pad_get_group_n_modes; int function(GdkDevicePad* pad, GdkDevicePadFeature feature) c_gdk_device_pad_get_n_features; int function(GdkDevicePad* pad) c_gdk_device_pad_get_n_groups; // gdk.DeviceTool GType function() c_gdk_device_tool_get_type; ulong function(GdkDeviceTool* tool) c_gdk_device_tool_get_hardware_id; ulong function(GdkDeviceTool* tool) c_gdk_device_tool_get_serial; GdkDeviceToolType function(GdkDeviceTool* tool) c_gdk_device_tool_get_tool_type; // gdk.Display GType function() c_gdk_display_get_type; GdkDisplay* function() c_gdk_display_get_default; GdkDisplay* function(const(char)* displayName) c_gdk_display_open; GdkDisplay* function() c_gdk_display_open_default_libgtk_only; void function(GdkDisplay* display) c_gdk_display_beep; void function(GdkDisplay* display) c_gdk_display_close; int function(GdkDisplay* display, GdkDevice* device) c_gdk_display_device_is_grabbed; void function(GdkDisplay* display) c_gdk_display_flush; GdkAppLaunchContext* function(GdkDisplay* display) c_gdk_display_get_app_launch_context; uint function(GdkDisplay* display) c_gdk_display_get_default_cursor_size; GdkWindow* function(GdkDisplay* display) c_gdk_display_get_default_group; GdkScreen* function(GdkDisplay* display) c_gdk_display_get_default_screen; GdkSeat* function(GdkDisplay* display) c_gdk_display_get_default_seat; GdkDeviceManager* function(GdkDisplay* display) c_gdk_display_get_device_manager; GdkEvent* function(GdkDisplay* display) c_gdk_display_get_event; void function(GdkDisplay* display, uint* width, uint* height) c_gdk_display_get_maximal_cursor_size; GdkMonitor* function(GdkDisplay* display, int monitorNum) c_gdk_display_get_monitor; GdkMonitor* function(GdkDisplay* display, int x, int y) c_gdk_display_get_monitor_at_point; GdkMonitor* function(GdkDisplay* display, GdkWindow* window) c_gdk_display_get_monitor_at_window; int function(GdkDisplay* display) c_gdk_display_get_n_monitors; int function(GdkDisplay* display) c_gdk_display_get_n_screens; const(char)* function(GdkDisplay* display) c_gdk_display_get_name; void function(GdkDisplay* display, GdkScreen** screen, int* x, int* y, GdkModifierType* mask) c_gdk_display_get_pointer; GdkMonitor* function(GdkDisplay* display) c_gdk_display_get_primary_monitor; GdkScreen* function(GdkDisplay* display, int screenNum) c_gdk_display_get_screen; GdkWindow* function(GdkDisplay* display, int* winX, int* winY) c_gdk_display_get_window_at_pointer; int function(GdkDisplay* display) c_gdk_display_has_pending; int function(GdkDisplay* display) c_gdk_display_is_closed; void function(GdkDisplay* display, uint time) c_gdk_display_keyboard_ungrab; GList* function(GdkDisplay* display) c_gdk_display_list_devices; GList* function(GdkDisplay* display) c_gdk_display_list_seats; void function(GdkDisplay* display, const(char)* startupId) c_gdk_display_notify_startup_complete; GdkEvent* function(GdkDisplay* display) c_gdk_display_peek_event; int function(GdkDisplay* display) c_gdk_display_pointer_is_grabbed; void function(GdkDisplay* display, uint time) c_gdk_display_pointer_ungrab; void function(GdkDisplay* display, GdkEvent* event) c_gdk_display_put_event; int function(GdkDisplay* display, GdkAtom selection) c_gdk_display_request_selection_notification; void function(GdkDisplay* display, uint distance) c_gdk_display_set_double_click_distance; void function(GdkDisplay* display, uint msec) c_gdk_display_set_double_click_time; void function(GdkDisplay* display, GdkWindow* clipboardWindow, uint time, GdkAtom* targets, int nTargets) c_gdk_display_store_clipboard; int function(GdkDisplay* display) c_gdk_display_supports_clipboard_persistence; int function(GdkDisplay* display) c_gdk_display_supports_composite; int function(GdkDisplay* display) c_gdk_display_supports_cursor_alpha; int function(GdkDisplay* display) c_gdk_display_supports_cursor_color; int function(GdkDisplay* display) c_gdk_display_supports_input_shapes; int function(GdkDisplay* display) c_gdk_display_supports_selection_notification; int function(GdkDisplay* display) c_gdk_display_supports_shapes; void function(GdkDisplay* display) c_gdk_display_sync; void function(GdkDisplay* display, GdkScreen* screen, int x, int y) c_gdk_display_warp_pointer; // gdk.DisplayManager GType function() c_gdk_display_manager_get_type; GdkDisplayManager* function() c_gdk_display_manager_get; GdkDisplay* function(GdkDisplayManager* manager) c_gdk_display_manager_get_default_display; GSList* function(GdkDisplayManager* manager) c_gdk_display_manager_list_displays; GdkDisplay* function(GdkDisplayManager* manager, const(char)* name) c_gdk_display_manager_open_display; void function(GdkDisplayManager* manager, GdkDisplay* display) c_gdk_display_manager_set_default_display; // gdk.DragContext GType function() c_gdk_drag_context_get_type; GdkDragAction function(GdkDragContext* context) c_gdk_drag_context_get_actions; GdkWindow* function(GdkDragContext* context) c_gdk_drag_context_get_dest_window; GdkDevice* function(GdkDragContext* context) c_gdk_drag_context_get_device; GdkWindow* function(GdkDragContext* context) c_gdk_drag_context_get_drag_window; GdkDragProtocol function(GdkDragContext* context) c_gdk_drag_context_get_protocol; GdkDragAction function(GdkDragContext* context) c_gdk_drag_context_get_selected_action; GdkWindow* function(GdkDragContext* context) c_gdk_drag_context_get_source_window; GdkDragAction function(GdkDragContext* context) c_gdk_drag_context_get_suggested_action; GList* function(GdkDragContext* context) c_gdk_drag_context_list_targets; int function(GdkDragContext* context, GdkWindow* ipcWindow, GdkDragAction actions) c_gdk_drag_context_manage_dnd; void function(GdkDragContext* context, GdkDevice* device) c_gdk_drag_context_set_device; void function(GdkDragContext* context, int hotX, int hotY) c_gdk_drag_context_set_hotspot; void function(GdkDragContext* context, uint time) c_gdk_drag_abort; GdkDragContext* function(GdkWindow* window, GList* targets) c_gdk_drag_begin; GdkDragContext* function(GdkWindow* window, GdkDevice* device, GList* targets) c_gdk_drag_begin_for_device; GdkDragContext* function(GdkWindow* window, GdkDevice* device, GList* targets, int xRoot, int yRoot) c_gdk_drag_begin_from_point; void function(GdkDragContext* context, uint time) c_gdk_drag_drop; void function(GdkDragContext* context, int success) c_gdk_drag_drop_done; int function(GdkDragContext* context) c_gdk_drag_drop_succeeded; void function(GdkDragContext* context, GdkWindow* dragWindow, GdkScreen* screen, int xRoot, int yRoot, GdkWindow** destWindow, GdkDragProtocol* protocol) c_gdk_drag_find_window_for_screen; GdkAtom function(GdkDragContext* context) c_gdk_drag_get_selection; int function(GdkDragContext* context, GdkWindow* destWindow, GdkDragProtocol protocol, int xRoot, int yRoot, GdkDragAction suggestedAction, GdkDragAction possibleActions, uint time) c_gdk_drag_motion; void function(GdkDragContext* context, GdkDragAction action, uint time) c_gdk_drag_status; void function(GdkDragContext* context, int success, uint time) c_gdk_drop_finish; void function(GdkDragContext* context, int accepted, uint time) c_gdk_drop_reply; // gdk.DrawingContext GType function() c_gdk_drawing_context_get_type; cairo_t* function(GdkDrawingContext* context) c_gdk_drawing_context_get_cairo_context; cairo_region_t* function(GdkDrawingContext* context) c_gdk_drawing_context_get_clip; GdkWindow* function(GdkDrawingContext* context) c_gdk_drawing_context_get_window; int function(GdkDrawingContext* context) c_gdk_drawing_context_is_valid; // gdk.Event GType function() c_gdk_event_get_type; GdkEvent* function(GdkEventType type) c_gdk_event_new; int function(GdkEvent* event1, GdkEvent* event2, double* angle) c_gdk_events_get_angle; int function(GdkEvent* event1, GdkEvent* event2, double* x, double* y) c_gdk_events_get_center; int function(GdkEvent* event1, GdkEvent* event2, double* distance) c_gdk_events_get_distance; GdkEvent* function(GdkEvent* event) c_gdk_event_copy; void function(GdkEvent* event) c_gdk_event_free; int function(GdkEvent* event, GdkAxisUse axisUse, double* value) c_gdk_event_get_axis; int function(GdkEvent* event, uint* button) c_gdk_event_get_button; int function(GdkEvent* event, uint* clickCount) c_gdk_event_get_click_count; int function(GdkEvent* event, double* xWin, double* yWin) c_gdk_event_get_coords; GdkDevice* function(GdkEvent* event) c_gdk_event_get_device; GdkDeviceTool* function(GdkEvent* event) c_gdk_event_get_device_tool; GdkEventSequence* function(GdkEvent* event) c_gdk_event_get_event_sequence; GdkEventType function(GdkEvent* event) c_gdk_event_get_event_type; int function(GdkEvent* event, ushort* keycode) c_gdk_event_get_keycode; int function(GdkEvent* event, uint* keyval) c_gdk_event_get_keyval; int function(GdkEvent* event) c_gdk_event_get_pointer_emulated; int function(GdkEvent* event, double* xRoot, double* yRoot) c_gdk_event_get_root_coords; int function(GdkEvent* event) c_gdk_event_get_scancode; GdkScreen* function(GdkEvent* event) c_gdk_event_get_screen; int function(GdkEvent* event, double* deltaX, double* deltaY) c_gdk_event_get_scroll_deltas; int function(GdkEvent* event, GdkScrollDirection* direction) c_gdk_event_get_scroll_direction; GdkSeat* function(GdkEvent* event) c_gdk_event_get_seat; GdkDevice* function(GdkEvent* event) c_gdk_event_get_source_device; int function(GdkEvent* event, GdkModifierType* state) c_gdk_event_get_state; uint function(GdkEvent* event) c_gdk_event_get_time; GdkWindow* function(GdkEvent* event) c_gdk_event_get_window; int function(GdkEvent* event) c_gdk_event_is_scroll_stop_event; void function(GdkEvent* event) c_gdk_event_put; void function(GdkEvent* event, GdkDevice* device) c_gdk_event_set_device; void function(GdkEvent* event, GdkDeviceTool* tool) c_gdk_event_set_device_tool; void function(GdkEvent* event, GdkScreen* screen) c_gdk_event_set_screen; void function(GdkEvent* event, GdkDevice* device) c_gdk_event_set_source_device; int function(GdkEvent* event) c_gdk_event_triggers_context_menu; GdkEvent* function() c_gdk_event_get; void function(GdkEventFunc func, void* data, GDestroyNotify notify) c_gdk_event_handler_set; GdkEvent* function() c_gdk_event_peek; void function(GdkEventMotion* event) c_gdk_event_request_motions; int function() c_gdk_events_pending; int function() c_gdk_get_show_events; void function(int showEvents) c_gdk_set_show_events; int function(const(char)* name, GValue* value) c_gdk_setting_get; // gdk.EventSequence GType function() c_gdk_event_sequence_get_type; // gdk.FrameClock GType function() c_gdk_frame_clock_get_type; void function(GdkFrameClock* frameClock) c_gdk_frame_clock_begin_updating; void function(GdkFrameClock* frameClock) c_gdk_frame_clock_end_updating; GdkFrameTimings* function(GdkFrameClock* frameClock) c_gdk_frame_clock_get_current_timings; long function(GdkFrameClock* frameClock) c_gdk_frame_clock_get_frame_counter; long function(GdkFrameClock* frameClock) c_gdk_frame_clock_get_frame_time; long function(GdkFrameClock* frameClock) c_gdk_frame_clock_get_history_start; void function(GdkFrameClock* frameClock, long baseTime, long* refreshIntervalReturn, long* presentationTimeReturn) c_gdk_frame_clock_get_refresh_info; GdkFrameTimings* function(GdkFrameClock* frameClock, long frameCounter) c_gdk_frame_clock_get_timings; void function(GdkFrameClock* frameClock, GdkFrameClockPhase phase) c_gdk_frame_clock_request_phase; // gdk.FrameTimings GType function() c_gdk_frame_timings_get_type; int function(GdkFrameTimings* timings) c_gdk_frame_timings_get_complete; long function(GdkFrameTimings* timings) c_gdk_frame_timings_get_frame_counter; long function(GdkFrameTimings* timings) c_gdk_frame_timings_get_frame_time; long function(GdkFrameTimings* timings) c_gdk_frame_timings_get_predicted_presentation_time; long function(GdkFrameTimings* timings) c_gdk_frame_timings_get_presentation_time; long function(GdkFrameTimings* timings) c_gdk_frame_timings_get_refresh_interval; GdkFrameTimings* function(GdkFrameTimings* timings) c_gdk_frame_timings_ref; void function(GdkFrameTimings* timings) c_gdk_frame_timings_unref; // gdk.GLContext GType function() c_gdk_gl_context_get_type; void function() c_gdk_gl_context_clear_current; GdkGLContext* function() c_gdk_gl_context_get_current; int function(GdkGLContext* context) c_gdk_gl_context_get_debug_enabled; GdkDisplay* function(GdkGLContext* context) c_gdk_gl_context_get_display; int function(GdkGLContext* context) c_gdk_gl_context_get_forward_compatible; void function(GdkGLContext* context, int* major, int* minor) c_gdk_gl_context_get_required_version; GdkGLContext* function(GdkGLContext* context) c_gdk_gl_context_get_shared_context; int function(GdkGLContext* context) c_gdk_gl_context_get_use_es; void function(GdkGLContext* context, int* major, int* minor) c_gdk_gl_context_get_version; GdkWindow* function(GdkGLContext* context) c_gdk_gl_context_get_window; int function(GdkGLContext* context) c_gdk_gl_context_is_legacy; void function(GdkGLContext* context) c_gdk_gl_context_make_current; int function(GdkGLContext* context, GError** err) c_gdk_gl_context_realize; void function(GdkGLContext* context, int enabled) c_gdk_gl_context_set_debug_enabled; void function(GdkGLContext* context, int compatible) c_gdk_gl_context_set_forward_compatible; void function(GdkGLContext* context, int major, int minor) c_gdk_gl_context_set_required_version; void function(GdkGLContext* context, int useEs) c_gdk_gl_context_set_use_es; // gdk.Keymap GType function() c_gdk_keymap_get_type; GdkKeymap* function() c_gdk_keymap_get_default; GdkKeymap* function(GdkDisplay* display) c_gdk_keymap_get_for_display; void function(GdkKeymap* keymap, GdkModifierType* state) c_gdk_keymap_add_virtual_modifiers; int function(GdkKeymap* keymap) c_gdk_keymap_get_caps_lock_state; PangoDirection function(GdkKeymap* keymap) c_gdk_keymap_get_direction; int function(GdkKeymap* keymap, uint hardwareKeycode, GdkKeymapKey** keys, uint** keyvals, int* nEntries) c_gdk_keymap_get_entries_for_keycode; int function(GdkKeymap* keymap, uint keyval, GdkKeymapKey** keys, int* nKeys) c_gdk_keymap_get_entries_for_keyval; GdkModifierType function(GdkKeymap* keymap, GdkModifierIntent intent) c_gdk_keymap_get_modifier_mask; uint function(GdkKeymap* keymap) c_gdk_keymap_get_modifier_state; int function(GdkKeymap* keymap) c_gdk_keymap_get_num_lock_state; int function(GdkKeymap* keymap) c_gdk_keymap_get_scroll_lock_state; int function(GdkKeymap* keymap) c_gdk_keymap_have_bidi_layouts; uint function(GdkKeymap* keymap, GdkKeymapKey* key) c_gdk_keymap_lookup_key; int function(GdkKeymap* keymap, GdkModifierType* state) c_gdk_keymap_map_virtual_modifiers; int function(GdkKeymap* keymap, uint hardwareKeycode, GdkModifierType state, int group, uint* keyval, int* effectiveGroup, int* level, GdkModifierType* consumedModifiers) c_gdk_keymap_translate_keyboard_state; void function(uint symbol, uint* lower, uint* upper) c_gdk_keyval_convert_case; uint function(const(char)* keyvalName) c_gdk_keyval_from_name; int function(uint keyval) c_gdk_keyval_is_lower; int function(uint keyval) c_gdk_keyval_is_upper; char* function(uint keyval) c_gdk_keyval_name; uint function(uint keyval) c_gdk_keyval_to_lower; uint function(uint keyval) c_gdk_keyval_to_unicode; uint function(uint keyval) c_gdk_keyval_to_upper; uint function(uint wc) c_gdk_unicode_to_keyval; // gdk.MonitorG GType function() c_gdk_monitor_get_type; GdkDisplay* function(GdkMonitor* monitor) c_gdk_monitor_get_display; void function(GdkMonitor* monitor, GdkRectangle* geometry) c_gdk_monitor_get_geometry; int function(GdkMonitor* monitor) c_gdk_monitor_get_height_mm; const(char)* function(GdkMonitor* monitor) c_gdk_monitor_get_manufacturer; const(char)* function(GdkMonitor* monitor) c_gdk_monitor_get_model; int function(GdkMonitor* monitor) c_gdk_monitor_get_refresh_rate; int function(GdkMonitor* monitor) c_gdk_monitor_get_scale_factor; GdkSubpixelLayout function(GdkMonitor* monitor) c_gdk_monitor_get_subpixel_layout; int function(GdkMonitor* monitor) c_gdk_monitor_get_width_mm; void function(GdkMonitor* monitor, GdkRectangle* workarea) c_gdk_monitor_get_workarea; int function(GdkMonitor* monitor) c_gdk_monitor_is_primary; // gdk.RGBA GType function() c_gdk_rgba_get_type; GdkRGBA* function(GdkRGBA* rgba) c_gdk_rgba_copy; int function(void* p1, void* p2) c_gdk_rgba_equal; void function(GdkRGBA* rgba) c_gdk_rgba_free; uint function(void* p) c_gdk_rgba_hash; int function(GdkRGBA* rgba, const(char)* spec) c_gdk_rgba_parse; char* function(GdkRGBA* rgba) c_gdk_rgba_to_string; // gdk.Rectangle GType function() c_gdk_rectangle_get_type; int function(GdkRectangle* rect1, GdkRectangle* rect2) c_gdk_rectangle_equal; int function(GdkRectangle* src1, GdkRectangle* src2, GdkRectangle* dest) c_gdk_rectangle_intersect; void function(GdkRectangle* src1, GdkRectangle* src2, GdkRectangle* dest) c_gdk_rectangle_union; // gdk.Screen GType function() c_gdk_screen_get_type; GdkScreen* function() c_gdk_screen_get_default; int function() c_gdk_screen_height; int function() c_gdk_screen_height_mm; int function() c_gdk_screen_width; int function() c_gdk_screen_width_mm; GdkWindow* function(GdkScreen* screen) c_gdk_screen_get_active_window; GdkDisplay* function(GdkScreen* screen) c_gdk_screen_get_display; cairo_font_options_t* function(GdkScreen* screen) c_gdk_screen_get_font_options; int function(GdkScreen* screen) c_gdk_screen_get_height; int function(GdkScreen* screen) c_gdk_screen_get_height_mm; int function(GdkScreen* screen, int x, int y) c_gdk_screen_get_monitor_at_point; int function(GdkScreen* screen, GdkWindow* window) c_gdk_screen_get_monitor_at_window; void function(GdkScreen* screen, int monitorNum, GdkRectangle* dest) c_gdk_screen_get_monitor_geometry; int function(GdkScreen* screen, int monitorNum) c_gdk_screen_get_monitor_height_mm; char* function(GdkScreen* screen, int monitorNum) c_gdk_screen_get_monitor_plug_name; int function(GdkScreen* screen, int monitorNum) c_gdk_screen_get_monitor_scale_factor; int function(GdkScreen* screen, int monitorNum) c_gdk_screen_get_monitor_width_mm; void function(GdkScreen* screen, int monitorNum, GdkRectangle* dest) c_gdk_screen_get_monitor_workarea; int function(GdkScreen* screen) c_gdk_screen_get_n_monitors; int function(GdkScreen* screen) c_gdk_screen_get_number; int function(GdkScreen* screen) c_gdk_screen_get_primary_monitor; double function(GdkScreen* screen) c_gdk_screen_get_resolution; GdkVisual* function(GdkScreen* screen) c_gdk_screen_get_rgba_visual; GdkWindow* function(GdkScreen* screen) c_gdk_screen_get_root_window; int function(GdkScreen* screen, const(char)* name, GValue* value) c_gdk_screen_get_setting; GdkVisual* function(GdkScreen* screen) c_gdk_screen_get_system_visual; GList* function(GdkScreen* screen) c_gdk_screen_get_toplevel_windows; int function(GdkScreen* screen) c_gdk_screen_get_width; int function(GdkScreen* screen) c_gdk_screen_get_width_mm; GList* function(GdkScreen* screen) c_gdk_screen_get_window_stack; int function(GdkScreen* screen) c_gdk_screen_is_composited; GList* function(GdkScreen* screen) c_gdk_screen_list_visuals; char* function(GdkScreen* screen) c_gdk_screen_make_display_name; void function(GdkScreen* screen, cairo_font_options_t* options) c_gdk_screen_set_font_options; void function(GdkScreen* screen, double dpi) c_gdk_screen_set_resolution; // gdk.Seat GType function() c_gdk_seat_get_type; GdkSeatCapabilities function(GdkSeat* seat) c_gdk_seat_get_capabilities; GdkDisplay* function(GdkSeat* seat) c_gdk_seat_get_display; GdkDevice* function(GdkSeat* seat) c_gdk_seat_get_keyboard; GdkDevice* function(GdkSeat* seat) c_gdk_seat_get_pointer; GList* function(GdkSeat* seat, GdkSeatCapabilities capabilities) c_gdk_seat_get_slaves; GdkGrabStatus function(GdkSeat* seat, GdkWindow* window, GdkSeatCapabilities capabilities, int ownerEvents, GdkCursor* cursor, GdkEvent* event, GdkSeatGrabPrepareFunc prepareFunc, void* prepareFuncData) c_gdk_seat_grab; void function(GdkSeat* seat) c_gdk_seat_ungrab; // gdk.Visual GType function() c_gdk_visual_get_type; GdkVisual* function() c_gdk_visual_get_best; int function() c_gdk_visual_get_best_depth; GdkVisualType function() c_gdk_visual_get_best_type; GdkVisual* function(int depth, GdkVisualType visualType) c_gdk_visual_get_best_with_both; GdkVisual* function(int depth) c_gdk_visual_get_best_with_depth; GdkVisual* function(GdkVisualType visualType) c_gdk_visual_get_best_with_type; GdkVisual* function() c_gdk_visual_get_system; int function(GdkVisual* visual) c_gdk_visual_get_bits_per_rgb; void function(GdkVisual* visual, uint* mask, int* shift, int* precision) c_gdk_visual_get_blue_pixel_details; GdkByteOrder function(GdkVisual* visual) c_gdk_visual_get_byte_order; int function(GdkVisual* visual) c_gdk_visual_get_colormap_size; int function(GdkVisual* visual) c_gdk_visual_get_depth; void function(GdkVisual* visual, uint* mask, int* shift, int* precision) c_gdk_visual_get_green_pixel_details; void function(GdkVisual* visual, uint* mask, int* shift, int* precision) c_gdk_visual_get_red_pixel_details; GdkScreen* function(GdkVisual* visual) c_gdk_visual_get_screen; GdkVisualType function(GdkVisual* visual) c_gdk_visual_get_visual_type; GList* function() c_gdk_list_visuals; void function(int** depths, int* count) c_gdk_query_depths; void function(GdkVisualType** visualTypes, int* count) c_gdk_query_visual_types; // gdk.Window GType function() c_gdk_window_get_type; GdkWindow* function(GdkWindow* parent, GdkWindowAttr* attributes, int attributesMask) c_gdk_window_new; GdkWindow* function(int* winX, int* winY) c_gdk_window_at_pointer; void function(GdkGeometry* geometry, GdkWindowHints flags, int width, int height, int* newWidth, int* newHeight) c_gdk_window_constrain_size; void function() c_gdk_window_process_all_updates; void function(int setting) c_gdk_window_set_debug_updates; void function(GdkWindow* window, GdkFilterFunc funct, void* data) c_gdk_window_add_filter; void function(GdkWindow* window) c_gdk_window_beep; GdkDrawingContext* function(GdkWindow* window, cairo_region_t* region) c_gdk_window_begin_draw_frame; void function(GdkWindow* window, int button, int rootX, int rootY, uint timestamp) c_gdk_window_begin_move_drag; void function(GdkWindow* window, GdkDevice* device, int button, int rootX, int rootY, uint timestamp) c_gdk_window_begin_move_drag_for_device; void function(GdkWindow* window, GdkRectangle* rectangle) c_gdk_window_begin_paint_rect; void function(GdkWindow* window, cairo_region_t* region) c_gdk_window_begin_paint_region; void function(GdkWindow* window, GdkWindowEdge edge, int button, int rootX, int rootY, uint timestamp) c_gdk_window_begin_resize_drag; void function(GdkWindow* window, GdkWindowEdge edge, GdkDevice* device, int button, int rootX, int rootY, uint timestamp) c_gdk_window_begin_resize_drag_for_device; void function(GdkWindow* window) c_gdk_window_configure_finished; void function(GdkWindow* window, double parentX, double parentY, double* x, double* y) c_gdk_window_coords_from_parent; void function(GdkWindow* window, double x, double y, double* parentX, double* parentY) c_gdk_window_coords_to_parent; GdkGLContext* function(GdkWindow* window, GError** err) c_gdk_window_create_gl_context; cairo_surface_t* function(GdkWindow* window, cairo_format_t format, int width, int height, int scale) c_gdk_window_create_similar_image_surface; cairo_surface_t* function(GdkWindow* window, cairo_content_t content, int width, int height) c_gdk_window_create_similar_surface; void function(GdkWindow* window) c_gdk_window_deiconify; void function(GdkWindow* window) c_gdk_window_destroy; void function(GdkWindow* window) c_gdk_window_destroy_notify; void function(GdkWindow* window) c_gdk_window_enable_synchronized_configure; void function(GdkWindow* window, GdkDrawingContext* context) c_gdk_window_end_draw_frame; void function(GdkWindow* window) c_gdk_window_end_paint; int function(GdkWindow* window) c_gdk_window_ensure_native; void function(GdkWindow* window) c_gdk_window_flush; void function(GdkWindow* window, uint timestamp) c_gdk_window_focus; void function(GdkWindow* window) c_gdk_window_freeze_toplevel_updates_libgtk_only; void function(GdkWindow* window) c_gdk_window_freeze_updates; void function(GdkWindow* window) c_gdk_window_fullscreen; void function(GdkWindow* window, int monitor) c_gdk_window_fullscreen_on_monitor; void function(GdkWindow* window) c_gdk_window_geometry_changed; int function(GdkWindow* window) c_gdk_window_get_accept_focus; cairo_pattern_t* function(GdkWindow* window) c_gdk_window_get_background_pattern; GList* function(GdkWindow* window) c_gdk_window_get_children; GList* function(GdkWindow* window, void* userData) c_gdk_window_get_children_with_user_data; cairo_region_t* function(GdkWindow* window) c_gdk_window_get_clip_region; int function(GdkWindow* window) c_gdk_window_get_composited; GdkCursor* function(GdkWindow* window) c_gdk_window_get_cursor; int function(GdkWindow* window, GdkWMDecoration* decorations) c_gdk_window_get_decorations; GdkCursor* function(GdkWindow* window, GdkDevice* device) c_gdk_window_get_device_cursor; GdkEventMask function(GdkWindow* window, GdkDevice* device) c_gdk_window_get_device_events; GdkWindow* function(GdkWindow* window, GdkDevice* device, int* x, int* y, GdkModifierType* mask) c_gdk_window_get_device_position; GdkWindow* function(GdkWindow* window, GdkDevice* device, double* x, double* y, GdkModifierType* mask) c_gdk_window_get_device_position_double; GdkDisplay* function(GdkWindow* window) c_gdk_window_get_display; GdkDragProtocol function(GdkWindow* window, GdkWindow** target) c_gdk_window_get_drag_protocol; GdkWindow* function(GdkWindow* window) c_gdk_window_get_effective_parent; GdkWindow* function(GdkWindow* window) c_gdk_window_get_effective_toplevel; int function(GdkWindow* window) c_gdk_window_get_event_compression; GdkEventMask function(GdkWindow* window) c_gdk_window_get_events; int function(GdkWindow* window) c_gdk_window_get_focus_on_map; GdkFrameClock* function(GdkWindow* window) c_gdk_window_get_frame_clock; void function(GdkWindow* window, GdkRectangle* rect) c_gdk_window_get_frame_extents; GdkFullscreenMode function(GdkWindow* window) c_gdk_window_get_fullscreen_mode; void function(GdkWindow* window, int* x, int* y, int* width, int* height) c_gdk_window_get_geometry; GdkWindow* function(GdkWindow* window) c_gdk_window_get_group; int function(GdkWindow* window) c_gdk_window_get_height; int function(GdkWindow* window) c_gdk_window_get_modal_hint; int function(GdkWindow* window, int* x, int* y) c_gdk_window_get_origin; GdkWindow* function(GdkWindow* window) c_gdk_window_get_parent; int function(GdkWindow* window) c_gdk_window_get_pass_through; GdkWindow* function(GdkWindow* window, int* x, int* y, GdkModifierType* mask) c_gdk_window_get_pointer; void function(GdkWindow* window, int* x, int* y) c_gdk_window_get_position; void function(GdkWindow* window, int x, int y, int* rootX, int* rootY) c_gdk_window_get_root_coords; void function(GdkWindow* window, int* x, int* y) c_gdk_window_get_root_origin; int function(GdkWindow* window) c_gdk_window_get_scale_factor; GdkScreen* function(GdkWindow* window) c_gdk_window_get_screen; GdkEventMask function(GdkWindow* window, GdkInputSource source) c_gdk_window_get_source_events; GdkWindowState function(GdkWindow* window) c_gdk_window_get_state; int function(GdkWindow* window) c_gdk_window_get_support_multidevice; GdkWindow* function(GdkWindow* window) c_gdk_window_get_toplevel; GdkWindowTypeHint function(GdkWindow* window) c_gdk_window_get_type_hint; cairo_region_t* function(GdkWindow* window) c_gdk_window_get_update_area; void function(GdkWindow* window, void** data) c_gdk_window_get_user_data; cairo_region_t* function(GdkWindow* window) c_gdk_window_get_visible_region; GdkVisual* function(GdkWindow* window) c_gdk_window_get_visual; int function(GdkWindow* window) c_gdk_window_get_width; GdkWindowType function(GdkWindow* window) c_gdk_window_get_window_type; int function(GdkWindow* window) c_gdk_window_has_native; void function(GdkWindow* window) c_gdk_window_hide; void function(GdkWindow* window) c_gdk_window_iconify; void function(GdkWindow* window, cairo_region_t* shapeRegion, int offsetX, int offsetY) c_gdk_window_input_shape_combine_region; void function(GdkWindow* window, cairo_region_t* region, GdkWindowChildFunc childFunc, void* userData) c_gdk_window_invalidate_maybe_recurse; void function(GdkWindow* window, GdkRectangle* rect, int invalidateChildren) c_gdk_window_invalidate_rect; void function(GdkWindow* window, cairo_region_t* region, int invalidateChildren) c_gdk_window_invalidate_region; int function(GdkWindow* window) c_gdk_window_is_destroyed; int function(GdkWindow* window) c_gdk_window_is_input_only; int function(GdkWindow* window) c_gdk_window_is_shaped; int function(GdkWindow* window) c_gdk_window_is_viewable; int function(GdkWindow* window) c_gdk_window_is_visible; void function(GdkWindow* window) c_gdk_window_lower; void function(GdkWindow* window, cairo_t* cr) c_gdk_window_mark_paint_from_clip; void function(GdkWindow* window) c_gdk_window_maximize; void function(GdkWindow* window) c_gdk_window_merge_child_input_shapes; void function(GdkWindow* window) c_gdk_window_merge_child_shapes; void function(GdkWindow* window, int x, int y) c_gdk_window_move; void function(GdkWindow* window, cairo_region_t* region, int dx, int dy) c_gdk_window_move_region; void function(GdkWindow* window, int x, int y, int width, int height) c_gdk_window_move_resize; GList* function(GdkWindow* window) c_gdk_window_peek_children; void function(GdkWindow* window, int updateChildren) c_gdk_window_process_updates; void function(GdkWindow* window) c_gdk_window_raise; void function(GdkWindow* window) c_gdk_window_register_dnd; void function(GdkWindow* window, GdkFilterFunc funct, void* data) c_gdk_window_remove_filter; void function(GdkWindow* window, GdkWindow* newParent, int x, int y) c_gdk_window_reparent; void function(GdkWindow* window, int width, int height) c_gdk_window_resize; void function(GdkWindow* window, GdkWindow* sibling, int above) c_gdk_window_restack; void function(GdkWindow* window, int dx, int dy) c_gdk_window_scroll; void function(GdkWindow* window, int acceptFocus) c_gdk_window_set_accept_focus; void function(GdkWindow* window, GdkColor* color) c_gdk_window_set_background; void function(GdkWindow* window, cairo_pattern_t* pattern) c_gdk_window_set_background_pattern; void function(GdkWindow* window, GdkRGBA* rgba) c_gdk_window_set_background_rgba; void function(GdkWindow* window) c_gdk_window_set_child_input_shapes; void function(GdkWindow* window) c_gdk_window_set_child_shapes; void function(GdkWindow* window, int composited) c_gdk_window_set_composited; void function(GdkWindow* window, GdkCursor* cursor) c_gdk_window_set_cursor; void function(GdkWindow* window, GdkWMDecoration decorations) c_gdk_window_set_decorations; void function(GdkWindow* window, GdkDevice* device, GdkCursor* cursor) c_gdk_window_set_device_cursor; void function(GdkWindow* window, GdkDevice* device, GdkEventMask eventMask) c_gdk_window_set_device_events; void function(GdkWindow* window, int eventCompression) c_gdk_window_set_event_compression; void function(GdkWindow* window, GdkEventMask eventMask) c_gdk_window_set_events; void function(GdkWindow* window, int focusOnMap) c_gdk_window_set_focus_on_map; void function(GdkWindow* window, GdkFullscreenMode mode) c_gdk_window_set_fullscreen_mode; void function(GdkWindow* window, GdkWMFunction functions) c_gdk_window_set_functions; void function(GdkWindow* window, GdkGeometry* geometry, GdkWindowHints geomMask) c_gdk_window_set_geometry_hints; void function(GdkWindow* window, GdkWindow* leader) c_gdk_window_set_group; void function(GdkWindow* window, GList* pixbufs) c_gdk_window_set_icon_list; void function(GdkWindow* window, const(char)* name) c_gdk_window_set_icon_name; void function(GdkWindow* window, GdkWindowInvalidateHandlerFunc handler) c_gdk_window_set_invalidate_handler; void function(GdkWindow* window, int setting) c_gdk_window_set_keep_above; void function(GdkWindow* window, int setting) c_gdk_window_set_keep_below; void function(GdkWindow* window, int modal) c_gdk_window_set_modal_hint; void function(GdkWindow* window, double opacity) c_gdk_window_set_opacity; void function(GdkWindow* window, cairo_region_t* region) c_gdk_window_set_opaque_region; void function(GdkWindow* window, int overrideRedirect) c_gdk_window_set_override_redirect; void function(GdkWindow* window, int passThrough) c_gdk_window_set_pass_through; void function(GdkWindow* window, const(char)* role) c_gdk_window_set_role; void function(GdkWindow* window, int left, int right, int top, int bottom) c_gdk_window_set_shadow_width; void function(GdkWindow* window, int skipsPager) c_gdk_window_set_skip_pager_hint; void function(GdkWindow* window, int skipsTaskbar) c_gdk_window_set_skip_taskbar_hint; void function(GdkWindow* window, GdkInputSource source, GdkEventMask eventMask) c_gdk_window_set_source_events; void function(GdkWindow* window, const(char)* startupId) c_gdk_window_set_startup_id; int function(GdkWindow* window, int useStatic) c_gdk_window_set_static_gravities; void function(GdkWindow* window, int supportMultidevice) c_gdk_window_set_support_multidevice; void function(GdkWindow* window, const(char)* title) c_gdk_window_set_title; void function(GdkWindow* window, GdkWindow* parent) c_gdk_window_set_transient_for; void function(GdkWindow* window, GdkWindowTypeHint hint) c_gdk_window_set_type_hint; void function(GdkWindow* window, int urgent) c_gdk_window_set_urgency_hint; void function(GdkWindow* window, void* userData) c_gdk_window_set_user_data; void function(GdkWindow* window, cairo_region_t* shapeRegion, int offsetX, int offsetY) c_gdk_window_shape_combine_region; void function(GdkWindow* window) c_gdk_window_show; void function(GdkWindow* window) c_gdk_window_show_unraised; int function(GdkWindow* window, GdkEvent* event) c_gdk_window_show_window_menu; void function(GdkWindow* window) c_gdk_window_stick; void function(GdkWindow* window) c_gdk_window_thaw_toplevel_updates_libgtk_only; void function(GdkWindow* window) c_gdk_window_thaw_updates; void function(GdkWindow* window) c_gdk_window_unfullscreen; void function(GdkWindow* window) c_gdk_window_unmaximize; void function(GdkWindow* window) c_gdk_window_unstick; void function(GdkWindow* window) c_gdk_window_withdraw; GdkWindow* function() c_gdk_get_default_root_window; GdkWindow* function(GdkWindow* window) c_gdk_offscreen_window_get_embedder; cairo_surface_t* function(GdkWindow* window) c_gdk_offscreen_window_get_surface; void function(GdkWindow* window, GdkWindow* embedder) c_gdk_offscreen_window_set_embedder; void function(GdkWindow* window, GdkWindowState unsetFlags, GdkWindowState setFlags) c_gdk_synthesize_window_state; // gdk.X11 GType function() c_gdk_x11_window_get_type; GdkWindow* function(GdkDisplay* display, uint window) c_gdk_x11_window_foreign_new_for_display; GdkWindow* function(GdkDisplay* display, uint window) c_gdk_x11_window_lookup_for_display; uint function(GdkWindow* window) c_gdk_x11_window_get_desktop; uint function(GdkWindow* window) c_gdk_x11_window_get_xid; void function(GdkWindow* window) c_gdk_x11_window_move_to_current_desktop; void function(GdkWindow* window, uint desktop) c_gdk_x11_window_move_to_desktop; void function(GdkWindow* window, int left, int right, int top, int bottom) c_gdk_x11_window_set_frame_extents; void function(GdkWindow* window, int frameSyncEnabled) c_gdk_x11_window_set_frame_sync_enabled; void function(GdkWindow* window, int hideTitlebarWhenMaximized) c_gdk_x11_window_set_hide_titlebar_when_maximized; void function(GdkWindow* window, char* variant) c_gdk_x11_window_set_theme_variant; void function(GdkWindow* window, uint timestamp) c_gdk_x11_window_set_user_time; void function(GdkWindow* window, const(char)* name, const(char)* value) c_gdk_x11_window_set_utf8_property; // gdk.Cairo cairo_t* function(GdkWindow* window) c_gdk_cairo_create; void function(cairo_t* cr, GdkWindow* window, int source, int sourceType, int bufferScale, int x, int y, int width, int height) c_gdk_cairo_draw_from_gl; int function(cairo_t* cr, GdkRectangle* rect) c_gdk_cairo_get_clip_rectangle; void function(cairo_t* cr, GdkRectangle* rectangle) c_gdk_cairo_rectangle; void function(cairo_t* cr, cairo_region_t* region) c_gdk_cairo_region; cairo_region_t* function(cairo_surface_t* surface) c_gdk_cairo_region_create_from_surface; void function(cairo_t* cr, GdkColor* color) c_gdk_cairo_set_source_color; void function(cairo_t* cr, GdkPixbuf* pixbuf, double pixbufX, double pixbufY) c_gdk_cairo_set_source_pixbuf; void function(cairo_t* cr, GdkRGBA* rgba) c_gdk_cairo_set_source_rgba; void function(cairo_t* cr, GdkWindow* window, double x, double y) c_gdk_cairo_set_source_window; cairo_surface_t* function(GdkPixbuf* pixbuf, int scale, GdkWindow* forWindow) c_gdk_cairo_surface_create_from_pixbuf; GdkDrawingContext* function(cairo_t* cr) c_gdk_cairo_get_drawing_context; // gdk.Pango PangoContext* function() c_gdk_pango_context_get; PangoContext* function(GdkScreen* screen) c_gdk_pango_context_get_for_screen; cairo_region_t* function(PangoLayout* layout, int xOrigin, int yOrigin, int* indexRanges, int nRanges) c_gdk_pango_layout_get_clip_region; cairo_region_t* function(PangoLayoutLine* line, int xOrigin, int yOrigin, int* indexRanges, int nRanges) c_gdk_pango_layout_line_get_clip_region; PangoContext* function(GdkDisplay* display) c_gdk_pango_context_get_for_display; // gdk.Pixbuf GdkPixbuf* function(cairo_surface_t* surface, int srcX, int srcY, int width, int height) c_gdk_pixbuf_get_from_surface; GdkPixbuf* function(GdkWindow* window, int srcX, int srcY, int width, int height) c_gdk_pixbuf_get_from_window; // gdk.Threads uint function(GSourceFunc funct, void* data) c_gdk_threads_add_idle; uint function(int priority, GSourceFunc funct, void* data, GDestroyNotify notify) c_gdk_threads_add_idle_full; uint function(uint interval, GSourceFunc funct, void* data) c_gdk_threads_add_timeout; uint function(int priority, uint interval, GSourceFunc funct, void* data, GDestroyNotify notify) c_gdk_threads_add_timeout_full; uint function(uint interval, GSourceFunc funct, void* data) c_gdk_threads_add_timeout_seconds; uint function(int priority, uint interval, GSourceFunc funct, void* data, GDestroyNotify notify) c_gdk_threads_add_timeout_seconds_full; void function() c_gdk_threads_enter; void function() c_gdk_threads_init; void function() c_gdk_threads_leave; void function(GCallback enterFn, GCallback leaveFn) c_gdk_threads_set_lock_functions; // gdk.Gdk void function() c_gdk_beep; int function() c_gdk_error_trap_pop; void function() c_gdk_error_trap_pop_ignored; void function() c_gdk_error_trap_push; void function() c_gdk_flush; char* function() c_gdk_get_display; const(char)* function() c_gdk_get_display_arg_name; const(char)* function() c_gdk_get_program_class; void function(int* argc, char*** argv) c_gdk_init; int function(int* argc, char*** argv) c_gdk_init_check; GdkGrabStatus function(GdkWindow* window, int ownerEvents, uint time) c_gdk_keyboard_grab; void function(uint time) c_gdk_keyboard_ungrab; void function() c_gdk_notify_startup_complete; void function(const(char)* startupId) c_gdk_notify_startup_complete_with_id; void function(int* argc, char*** argv) c_gdk_parse_args; GdkGrabStatus function(GdkWindow* window, int ownerEvents, GdkEventMask eventMask, GdkWindow* confineTo, GdkCursor* cursor, uint time) c_gdk_pointer_grab; int function() c_gdk_pointer_is_grabbed; void function(uint time) c_gdk_pointer_ungrab; void function(const(char)* backends) c_gdk_set_allowed_backends; void function(uint msec) c_gdk_set_double_click_time; void function(const(char)* programClass) c_gdk_set_program_class; // gdk.Selection void function(GdkWindow* requestor, GdkAtom selection, GdkAtom target, uint time) c_gdk_selection_convert; GdkWindow* function(GdkAtom selection) c_gdk_selection_owner_get; GdkWindow* function(GdkDisplay* display, GdkAtom selection) c_gdk_selection_owner_get_for_display; int function(GdkWindow* owner, GdkAtom selection, uint time, int sendEvent) c_gdk_selection_owner_set; int function(GdkDisplay* display, GdkWindow* owner, GdkAtom selection, uint time, int sendEvent) c_gdk_selection_owner_set_for_display; int function(GdkWindow* requestor, char** data, GdkAtom* propType, int* propFormat) c_gdk_selection_property_get; void function(GdkWindow* requestor, GdkAtom selection, GdkAtom target, GdkAtom property, uint time) c_gdk_selection_send_notify; void function(GdkDisplay* display, GdkWindow* requestor, GdkAtom selection, GdkAtom target, GdkAtom property, uint time) c_gdk_selection_send_notify_for_display; // gdk.Testing void function(GdkWindow* window) c_gdk_test_render_sync; int function(GdkWindow* window, int x, int y, uint button, GdkModifierType modifiers, GdkEventType buttonPressrelease) c_gdk_test_simulate_button; int function(GdkWindow* window, int x, int y, uint keyval, GdkModifierType modifiers, GdkEventType keyPressrelease) c_gdk_test_simulate_key; } // gdk.AppLaunchContext alias c_gdk_app_launch_context_get_type gdk_app_launch_context_get_type; alias c_gdk_app_launch_context_new gdk_app_launch_context_new; alias c_gdk_app_launch_context_set_desktop gdk_app_launch_context_set_desktop; alias c_gdk_app_launch_context_set_display gdk_app_launch_context_set_display; alias c_gdk_app_launch_context_set_icon gdk_app_launch_context_set_icon; alias c_gdk_app_launch_context_set_icon_name gdk_app_launch_context_set_icon_name; alias c_gdk_app_launch_context_set_screen gdk_app_launch_context_set_screen; alias c_gdk_app_launch_context_set_timestamp gdk_app_launch_context_set_timestamp; // gdk.Atom alias c_gdk_atom_name gdk_atom_name; alias c_gdk_atom_intern gdk_atom_intern; alias c_gdk_atom_intern_static_string gdk_atom_intern_static_string; alias c_gdk_property_change gdk_property_change; alias c_gdk_property_delete gdk_property_delete; alias c_gdk_property_get gdk_property_get; alias c_gdk_text_property_to_utf8_list_for_display gdk_text_property_to_utf8_list_for_display; alias c_gdk_utf8_to_string_target gdk_utf8_to_string_target; // gdk.Color alias c_gdk_color_get_type gdk_color_get_type; alias c_gdk_color_copy gdk_color_copy; alias c_gdk_color_equal gdk_color_equal; alias c_gdk_color_free gdk_color_free; alias c_gdk_color_hash gdk_color_hash; alias c_gdk_color_to_string gdk_color_to_string; alias c_gdk_color_parse gdk_color_parse; // gdk.Cursor alias c_gdk_cursor_get_type gdk_cursor_get_type; alias c_gdk_cursor_new gdk_cursor_new; alias c_gdk_cursor_new_for_display gdk_cursor_new_for_display; alias c_gdk_cursor_new_from_name gdk_cursor_new_from_name; alias c_gdk_cursor_new_from_pixbuf gdk_cursor_new_from_pixbuf; alias c_gdk_cursor_new_from_surface gdk_cursor_new_from_surface; alias c_gdk_cursor_get_cursor_type gdk_cursor_get_cursor_type; alias c_gdk_cursor_get_display gdk_cursor_get_display; alias c_gdk_cursor_get_image gdk_cursor_get_image; alias c_gdk_cursor_get_surface gdk_cursor_get_surface; alias c_gdk_cursor_ref gdk_cursor_ref; alias c_gdk_cursor_unref gdk_cursor_unref; // gdk.Device alias c_gdk_device_get_type gdk_device_get_type; alias c_gdk_device_free_history gdk_device_free_history; alias c_gdk_device_grab_info_libgtk_only gdk_device_grab_info_libgtk_only; alias c_gdk_device_get_associated_device gdk_device_get_associated_device; alias c_gdk_device_get_axes gdk_device_get_axes; alias c_gdk_device_get_axis gdk_device_get_axis; alias c_gdk_device_get_axis_use gdk_device_get_axis_use; alias c_gdk_device_get_axis_value gdk_device_get_axis_value; alias c_gdk_device_get_device_type gdk_device_get_device_type; alias c_gdk_device_get_display gdk_device_get_display; alias c_gdk_device_get_has_cursor gdk_device_get_has_cursor; alias c_gdk_device_get_history gdk_device_get_history; alias c_gdk_device_get_key gdk_device_get_key; alias c_gdk_device_get_last_event_window gdk_device_get_last_event_window; alias c_gdk_device_get_mode gdk_device_get_mode; alias c_gdk_device_get_n_axes gdk_device_get_n_axes; alias c_gdk_device_get_n_keys gdk_device_get_n_keys; alias c_gdk_device_get_name gdk_device_get_name; alias c_gdk_device_get_position gdk_device_get_position; alias c_gdk_device_get_position_double gdk_device_get_position_double; alias c_gdk_device_get_product_id gdk_device_get_product_id; alias c_gdk_device_get_seat gdk_device_get_seat; alias c_gdk_device_get_source gdk_device_get_source; alias c_gdk_device_get_state gdk_device_get_state; alias c_gdk_device_get_vendor_id gdk_device_get_vendor_id; alias c_gdk_device_get_window_at_position gdk_device_get_window_at_position; alias c_gdk_device_get_window_at_position_double gdk_device_get_window_at_position_double; alias c_gdk_device_grab gdk_device_grab; alias c_gdk_device_list_axes gdk_device_list_axes; alias c_gdk_device_list_slave_devices gdk_device_list_slave_devices; alias c_gdk_device_set_axis_use gdk_device_set_axis_use; alias c_gdk_device_set_key gdk_device_set_key; alias c_gdk_device_set_mode gdk_device_set_mode; alias c_gdk_device_ungrab gdk_device_ungrab; alias c_gdk_device_warp gdk_device_warp; // gdk.DeviceManager alias c_gdk_device_manager_get_type gdk_device_manager_get_type; alias c_gdk_device_manager_get_client_pointer gdk_device_manager_get_client_pointer; alias c_gdk_device_manager_get_display gdk_device_manager_get_display; alias c_gdk_device_manager_list_devices gdk_device_manager_list_devices; alias c_gdk_disable_multidevice gdk_disable_multidevice; // gdk.DevicePad alias c_gdk_device_pad_get_type gdk_device_pad_get_type; alias c_gdk_device_pad_get_feature_group gdk_device_pad_get_feature_group; alias c_gdk_device_pad_get_group_n_modes gdk_device_pad_get_group_n_modes; alias c_gdk_device_pad_get_n_features gdk_device_pad_get_n_features; alias c_gdk_device_pad_get_n_groups gdk_device_pad_get_n_groups; // gdk.DeviceTool alias c_gdk_device_tool_get_type gdk_device_tool_get_type; alias c_gdk_device_tool_get_hardware_id gdk_device_tool_get_hardware_id; alias c_gdk_device_tool_get_serial gdk_device_tool_get_serial; alias c_gdk_device_tool_get_tool_type gdk_device_tool_get_tool_type; // gdk.Display alias c_gdk_display_get_type gdk_display_get_type; alias c_gdk_display_get_default gdk_display_get_default; alias c_gdk_display_open gdk_display_open; alias c_gdk_display_open_default_libgtk_only gdk_display_open_default_libgtk_only; alias c_gdk_display_beep gdk_display_beep; alias c_gdk_display_close gdk_display_close; alias c_gdk_display_device_is_grabbed gdk_display_device_is_grabbed; alias c_gdk_display_flush gdk_display_flush; alias c_gdk_display_get_app_launch_context gdk_display_get_app_launch_context; alias c_gdk_display_get_default_cursor_size gdk_display_get_default_cursor_size; alias c_gdk_display_get_default_group gdk_display_get_default_group; alias c_gdk_display_get_default_screen gdk_display_get_default_screen; alias c_gdk_display_get_default_seat gdk_display_get_default_seat; alias c_gdk_display_get_device_manager gdk_display_get_device_manager; alias c_gdk_display_get_event gdk_display_get_event; alias c_gdk_display_get_maximal_cursor_size gdk_display_get_maximal_cursor_size; alias c_gdk_display_get_monitor gdk_display_get_monitor; alias c_gdk_display_get_monitor_at_point gdk_display_get_monitor_at_point; alias c_gdk_display_get_monitor_at_window gdk_display_get_monitor_at_window; alias c_gdk_display_get_n_monitors gdk_display_get_n_monitors; alias c_gdk_display_get_n_screens gdk_display_get_n_screens; alias c_gdk_display_get_name gdk_display_get_name; alias c_gdk_display_get_pointer gdk_display_get_pointer; alias c_gdk_display_get_primary_monitor gdk_display_get_primary_monitor; alias c_gdk_display_get_screen gdk_display_get_screen; alias c_gdk_display_get_window_at_pointer gdk_display_get_window_at_pointer; alias c_gdk_display_has_pending gdk_display_has_pending; alias c_gdk_display_is_closed gdk_display_is_closed; alias c_gdk_display_keyboard_ungrab gdk_display_keyboard_ungrab; alias c_gdk_display_list_devices gdk_display_list_devices; alias c_gdk_display_list_seats gdk_display_list_seats; alias c_gdk_display_notify_startup_complete gdk_display_notify_startup_complete; alias c_gdk_display_peek_event gdk_display_peek_event; alias c_gdk_display_pointer_is_grabbed gdk_display_pointer_is_grabbed; alias c_gdk_display_pointer_ungrab gdk_display_pointer_ungrab; alias c_gdk_display_put_event gdk_display_put_event; alias c_gdk_display_request_selection_notification gdk_display_request_selection_notification; alias c_gdk_display_set_double_click_distance gdk_display_set_double_click_distance; alias c_gdk_display_set_double_click_time gdk_display_set_double_click_time; alias c_gdk_display_store_clipboard gdk_display_store_clipboard; alias c_gdk_display_supports_clipboard_persistence gdk_display_supports_clipboard_persistence; alias c_gdk_display_supports_composite gdk_display_supports_composite; alias c_gdk_display_supports_cursor_alpha gdk_display_supports_cursor_alpha; alias c_gdk_display_supports_cursor_color gdk_display_supports_cursor_color; alias c_gdk_display_supports_input_shapes gdk_display_supports_input_shapes; alias c_gdk_display_supports_selection_notification gdk_display_supports_selection_notification; alias c_gdk_display_supports_shapes gdk_display_supports_shapes; alias c_gdk_display_sync gdk_display_sync; alias c_gdk_display_warp_pointer gdk_display_warp_pointer; // gdk.DisplayManager alias c_gdk_display_manager_get_type gdk_display_manager_get_type; alias c_gdk_display_manager_get gdk_display_manager_get; alias c_gdk_display_manager_get_default_display gdk_display_manager_get_default_display; alias c_gdk_display_manager_list_displays gdk_display_manager_list_displays; alias c_gdk_display_manager_open_display gdk_display_manager_open_display; alias c_gdk_display_manager_set_default_display gdk_display_manager_set_default_display; // gdk.DragContext alias c_gdk_drag_context_get_type gdk_drag_context_get_type; alias c_gdk_drag_context_get_actions gdk_drag_context_get_actions; alias c_gdk_drag_context_get_dest_window gdk_drag_context_get_dest_window; alias c_gdk_drag_context_get_device gdk_drag_context_get_device; alias c_gdk_drag_context_get_drag_window gdk_drag_context_get_drag_window; alias c_gdk_drag_context_get_protocol gdk_drag_context_get_protocol; alias c_gdk_drag_context_get_selected_action gdk_drag_context_get_selected_action; alias c_gdk_drag_context_get_source_window gdk_drag_context_get_source_window; alias c_gdk_drag_context_get_suggested_action gdk_drag_context_get_suggested_action; alias c_gdk_drag_context_list_targets gdk_drag_context_list_targets; alias c_gdk_drag_context_manage_dnd gdk_drag_context_manage_dnd; alias c_gdk_drag_context_set_device gdk_drag_context_set_device; alias c_gdk_drag_context_set_hotspot gdk_drag_context_set_hotspot; alias c_gdk_drag_abort gdk_drag_abort; alias c_gdk_drag_begin gdk_drag_begin; alias c_gdk_drag_begin_for_device gdk_drag_begin_for_device; alias c_gdk_drag_begin_from_point gdk_drag_begin_from_point; alias c_gdk_drag_drop gdk_drag_drop; alias c_gdk_drag_drop_done gdk_drag_drop_done; alias c_gdk_drag_drop_succeeded gdk_drag_drop_succeeded; alias c_gdk_drag_find_window_for_screen gdk_drag_find_window_for_screen; alias c_gdk_drag_get_selection gdk_drag_get_selection; alias c_gdk_drag_motion gdk_drag_motion; alias c_gdk_drag_status gdk_drag_status; alias c_gdk_drop_finish gdk_drop_finish; alias c_gdk_drop_reply gdk_drop_reply; // gdk.DrawingContext alias c_gdk_drawing_context_get_type gdk_drawing_context_get_type; alias c_gdk_drawing_context_get_cairo_context gdk_drawing_context_get_cairo_context; alias c_gdk_drawing_context_get_clip gdk_drawing_context_get_clip; alias c_gdk_drawing_context_get_window gdk_drawing_context_get_window; alias c_gdk_drawing_context_is_valid gdk_drawing_context_is_valid; // gdk.Event alias c_gdk_event_get_type gdk_event_get_type; alias c_gdk_event_new gdk_event_new; alias c_gdk_events_get_angle gdk_events_get_angle; alias c_gdk_events_get_center gdk_events_get_center; alias c_gdk_events_get_distance gdk_events_get_distance; alias c_gdk_event_copy gdk_event_copy; alias c_gdk_event_free gdk_event_free; alias c_gdk_event_get_axis gdk_event_get_axis; alias c_gdk_event_get_button gdk_event_get_button; alias c_gdk_event_get_click_count gdk_event_get_click_count; alias c_gdk_event_get_coords gdk_event_get_coords; alias c_gdk_event_get_device gdk_event_get_device; alias c_gdk_event_get_device_tool gdk_event_get_device_tool; alias c_gdk_event_get_event_sequence gdk_event_get_event_sequence; alias c_gdk_event_get_event_type gdk_event_get_event_type; alias c_gdk_event_get_keycode gdk_event_get_keycode; alias c_gdk_event_get_keyval gdk_event_get_keyval; alias c_gdk_event_get_pointer_emulated gdk_event_get_pointer_emulated; alias c_gdk_event_get_root_coords gdk_event_get_root_coords; alias c_gdk_event_get_scancode gdk_event_get_scancode; alias c_gdk_event_get_screen gdk_event_get_screen; alias c_gdk_event_get_scroll_deltas gdk_event_get_scroll_deltas; alias c_gdk_event_get_scroll_direction gdk_event_get_scroll_direction; alias c_gdk_event_get_seat gdk_event_get_seat; alias c_gdk_event_get_source_device gdk_event_get_source_device; alias c_gdk_event_get_state gdk_event_get_state; alias c_gdk_event_get_time gdk_event_get_time; alias c_gdk_event_get_window gdk_event_get_window; alias c_gdk_event_is_scroll_stop_event gdk_event_is_scroll_stop_event; alias c_gdk_event_put gdk_event_put; alias c_gdk_event_set_device gdk_event_set_device; alias c_gdk_event_set_device_tool gdk_event_set_device_tool; alias c_gdk_event_set_screen gdk_event_set_screen; alias c_gdk_event_set_source_device gdk_event_set_source_device; alias c_gdk_event_triggers_context_menu gdk_event_triggers_context_menu; alias c_gdk_event_get gdk_event_get; alias c_gdk_event_handler_set gdk_event_handler_set; alias c_gdk_event_peek gdk_event_peek; alias c_gdk_event_request_motions gdk_event_request_motions; alias c_gdk_events_pending gdk_events_pending; alias c_gdk_get_show_events gdk_get_show_events; alias c_gdk_set_show_events gdk_set_show_events; alias c_gdk_setting_get gdk_setting_get; // gdk.EventSequence alias c_gdk_event_sequence_get_type gdk_event_sequence_get_type; // gdk.FrameClock alias c_gdk_frame_clock_get_type gdk_frame_clock_get_type; alias c_gdk_frame_clock_begin_updating gdk_frame_clock_begin_updating; alias c_gdk_frame_clock_end_updating gdk_frame_clock_end_updating; alias c_gdk_frame_clock_get_current_timings gdk_frame_clock_get_current_timings; alias c_gdk_frame_clock_get_frame_counter gdk_frame_clock_get_frame_counter; alias c_gdk_frame_clock_get_frame_time gdk_frame_clock_get_frame_time; alias c_gdk_frame_clock_get_history_start gdk_frame_clock_get_history_start; alias c_gdk_frame_clock_get_refresh_info gdk_frame_clock_get_refresh_info; alias c_gdk_frame_clock_get_timings gdk_frame_clock_get_timings; alias c_gdk_frame_clock_request_phase gdk_frame_clock_request_phase; // gdk.FrameTimings alias c_gdk_frame_timings_get_type gdk_frame_timings_get_type; alias c_gdk_frame_timings_get_complete gdk_frame_timings_get_complete; alias c_gdk_frame_timings_get_frame_counter gdk_frame_timings_get_frame_counter; alias c_gdk_frame_timings_get_frame_time gdk_frame_timings_get_frame_time; alias c_gdk_frame_timings_get_predicted_presentation_time gdk_frame_timings_get_predicted_presentation_time; alias c_gdk_frame_timings_get_presentation_time gdk_frame_timings_get_presentation_time; alias c_gdk_frame_timings_get_refresh_interval gdk_frame_timings_get_refresh_interval; alias c_gdk_frame_timings_ref gdk_frame_timings_ref; alias c_gdk_frame_timings_unref gdk_frame_timings_unref; // gdk.GLContext alias c_gdk_gl_context_get_type gdk_gl_context_get_type; alias c_gdk_gl_context_clear_current gdk_gl_context_clear_current; alias c_gdk_gl_context_get_current gdk_gl_context_get_current; alias c_gdk_gl_context_get_debug_enabled gdk_gl_context_get_debug_enabled; alias c_gdk_gl_context_get_display gdk_gl_context_get_display; alias c_gdk_gl_context_get_forward_compatible gdk_gl_context_get_forward_compatible; alias c_gdk_gl_context_get_required_version gdk_gl_context_get_required_version; alias c_gdk_gl_context_get_shared_context gdk_gl_context_get_shared_context; alias c_gdk_gl_context_get_use_es gdk_gl_context_get_use_es; alias c_gdk_gl_context_get_version gdk_gl_context_get_version; alias c_gdk_gl_context_get_window gdk_gl_context_get_window; alias c_gdk_gl_context_is_legacy gdk_gl_context_is_legacy; alias c_gdk_gl_context_make_current gdk_gl_context_make_current; alias c_gdk_gl_context_realize gdk_gl_context_realize; alias c_gdk_gl_context_set_debug_enabled gdk_gl_context_set_debug_enabled; alias c_gdk_gl_context_set_forward_compatible gdk_gl_context_set_forward_compatible; alias c_gdk_gl_context_set_required_version gdk_gl_context_set_required_version; alias c_gdk_gl_context_set_use_es gdk_gl_context_set_use_es; // gdk.Keymap alias c_gdk_keymap_get_type gdk_keymap_get_type; alias c_gdk_keymap_get_default gdk_keymap_get_default; alias c_gdk_keymap_get_for_display gdk_keymap_get_for_display; alias c_gdk_keymap_add_virtual_modifiers gdk_keymap_add_virtual_modifiers; alias c_gdk_keymap_get_caps_lock_state gdk_keymap_get_caps_lock_state; alias c_gdk_keymap_get_direction gdk_keymap_get_direction; alias c_gdk_keymap_get_entries_for_keycode gdk_keymap_get_entries_for_keycode; alias c_gdk_keymap_get_entries_for_keyval gdk_keymap_get_entries_for_keyval; alias c_gdk_keymap_get_modifier_mask gdk_keymap_get_modifier_mask; alias c_gdk_keymap_get_modifier_state gdk_keymap_get_modifier_state; alias c_gdk_keymap_get_num_lock_state gdk_keymap_get_num_lock_state; alias c_gdk_keymap_get_scroll_lock_state gdk_keymap_get_scroll_lock_state; alias c_gdk_keymap_have_bidi_layouts gdk_keymap_have_bidi_layouts; alias c_gdk_keymap_lookup_key gdk_keymap_lookup_key; alias c_gdk_keymap_map_virtual_modifiers gdk_keymap_map_virtual_modifiers; alias c_gdk_keymap_translate_keyboard_state gdk_keymap_translate_keyboard_state; alias c_gdk_keyval_convert_case gdk_keyval_convert_case; alias c_gdk_keyval_from_name gdk_keyval_from_name; alias c_gdk_keyval_is_lower gdk_keyval_is_lower; alias c_gdk_keyval_is_upper gdk_keyval_is_upper; alias c_gdk_keyval_name gdk_keyval_name; alias c_gdk_keyval_to_lower gdk_keyval_to_lower; alias c_gdk_keyval_to_unicode gdk_keyval_to_unicode; alias c_gdk_keyval_to_upper gdk_keyval_to_upper; alias c_gdk_unicode_to_keyval gdk_unicode_to_keyval; // gdk.MonitorG alias c_gdk_monitor_get_type gdk_monitor_get_type; alias c_gdk_monitor_get_display gdk_monitor_get_display; alias c_gdk_monitor_get_geometry gdk_monitor_get_geometry; alias c_gdk_monitor_get_height_mm gdk_monitor_get_height_mm; alias c_gdk_monitor_get_manufacturer gdk_monitor_get_manufacturer; alias c_gdk_monitor_get_model gdk_monitor_get_model; alias c_gdk_monitor_get_refresh_rate gdk_monitor_get_refresh_rate; alias c_gdk_monitor_get_scale_factor gdk_monitor_get_scale_factor; alias c_gdk_monitor_get_subpixel_layout gdk_monitor_get_subpixel_layout; alias c_gdk_monitor_get_width_mm gdk_monitor_get_width_mm; alias c_gdk_monitor_get_workarea gdk_monitor_get_workarea; alias c_gdk_monitor_is_primary gdk_monitor_is_primary; // gdk.RGBA alias c_gdk_rgba_get_type gdk_rgba_get_type; alias c_gdk_rgba_copy gdk_rgba_copy; alias c_gdk_rgba_equal gdk_rgba_equal; alias c_gdk_rgba_free gdk_rgba_free; alias c_gdk_rgba_hash gdk_rgba_hash; alias c_gdk_rgba_parse gdk_rgba_parse; alias c_gdk_rgba_to_string gdk_rgba_to_string; // gdk.Rectangle alias c_gdk_rectangle_get_type gdk_rectangle_get_type; alias c_gdk_rectangle_equal gdk_rectangle_equal; alias c_gdk_rectangle_intersect gdk_rectangle_intersect; alias c_gdk_rectangle_union gdk_rectangle_union; // gdk.Screen alias c_gdk_screen_get_type gdk_screen_get_type; alias c_gdk_screen_get_default gdk_screen_get_default; alias c_gdk_screen_height gdk_screen_height; alias c_gdk_screen_height_mm gdk_screen_height_mm; alias c_gdk_screen_width gdk_screen_width; alias c_gdk_screen_width_mm gdk_screen_width_mm; alias c_gdk_screen_get_active_window gdk_screen_get_active_window; alias c_gdk_screen_get_display gdk_screen_get_display; alias c_gdk_screen_get_font_options gdk_screen_get_font_options; alias c_gdk_screen_get_height gdk_screen_get_height; alias c_gdk_screen_get_height_mm gdk_screen_get_height_mm; alias c_gdk_screen_get_monitor_at_point gdk_screen_get_monitor_at_point; alias c_gdk_screen_get_monitor_at_window gdk_screen_get_monitor_at_window; alias c_gdk_screen_get_monitor_geometry gdk_screen_get_monitor_geometry; alias c_gdk_screen_get_monitor_height_mm gdk_screen_get_monitor_height_mm; alias c_gdk_screen_get_monitor_plug_name gdk_screen_get_monitor_plug_name; alias c_gdk_screen_get_monitor_scale_factor gdk_screen_get_monitor_scale_factor; alias c_gdk_screen_get_monitor_width_mm gdk_screen_get_monitor_width_mm; alias c_gdk_screen_get_monitor_workarea gdk_screen_get_monitor_workarea; alias c_gdk_screen_get_n_monitors gdk_screen_get_n_monitors; alias c_gdk_screen_get_number gdk_screen_get_number; alias c_gdk_screen_get_primary_monitor gdk_screen_get_primary_monitor; alias c_gdk_screen_get_resolution gdk_screen_get_resolution; alias c_gdk_screen_get_rgba_visual gdk_screen_get_rgba_visual; alias c_gdk_screen_get_root_window gdk_screen_get_root_window; alias c_gdk_screen_get_setting gdk_screen_get_setting; alias c_gdk_screen_get_system_visual gdk_screen_get_system_visual; alias c_gdk_screen_get_toplevel_windows gdk_screen_get_toplevel_windows; alias c_gdk_screen_get_width gdk_screen_get_width; alias c_gdk_screen_get_width_mm gdk_screen_get_width_mm; alias c_gdk_screen_get_window_stack gdk_screen_get_window_stack; alias c_gdk_screen_is_composited gdk_screen_is_composited; alias c_gdk_screen_list_visuals gdk_screen_list_visuals; alias c_gdk_screen_make_display_name gdk_screen_make_display_name; alias c_gdk_screen_set_font_options gdk_screen_set_font_options; alias c_gdk_screen_set_resolution gdk_screen_set_resolution; // gdk.Seat alias c_gdk_seat_get_type gdk_seat_get_type; alias c_gdk_seat_get_capabilities gdk_seat_get_capabilities; alias c_gdk_seat_get_display gdk_seat_get_display; alias c_gdk_seat_get_keyboard gdk_seat_get_keyboard; alias c_gdk_seat_get_pointer gdk_seat_get_pointer; alias c_gdk_seat_get_slaves gdk_seat_get_slaves; alias c_gdk_seat_grab gdk_seat_grab; alias c_gdk_seat_ungrab gdk_seat_ungrab; // gdk.Visual alias c_gdk_visual_get_type gdk_visual_get_type; alias c_gdk_visual_get_best gdk_visual_get_best; alias c_gdk_visual_get_best_depth gdk_visual_get_best_depth; alias c_gdk_visual_get_best_type gdk_visual_get_best_type; alias c_gdk_visual_get_best_with_both gdk_visual_get_best_with_both; alias c_gdk_visual_get_best_with_depth gdk_visual_get_best_with_depth; alias c_gdk_visual_get_best_with_type gdk_visual_get_best_with_type; alias c_gdk_visual_get_system gdk_visual_get_system; alias c_gdk_visual_get_bits_per_rgb gdk_visual_get_bits_per_rgb; alias c_gdk_visual_get_blue_pixel_details gdk_visual_get_blue_pixel_details; alias c_gdk_visual_get_byte_order gdk_visual_get_byte_order; alias c_gdk_visual_get_colormap_size gdk_visual_get_colormap_size; alias c_gdk_visual_get_depth gdk_visual_get_depth; alias c_gdk_visual_get_green_pixel_details gdk_visual_get_green_pixel_details; alias c_gdk_visual_get_red_pixel_details gdk_visual_get_red_pixel_details; alias c_gdk_visual_get_screen gdk_visual_get_screen; alias c_gdk_visual_get_visual_type gdk_visual_get_visual_type; alias c_gdk_list_visuals gdk_list_visuals; alias c_gdk_query_depths gdk_query_depths; alias c_gdk_query_visual_types gdk_query_visual_types; // gdk.Window alias c_gdk_window_get_type gdk_window_get_type; alias c_gdk_window_new gdk_window_new; alias c_gdk_window_at_pointer gdk_window_at_pointer; alias c_gdk_window_constrain_size gdk_window_constrain_size; alias c_gdk_window_process_all_updates gdk_window_process_all_updates; alias c_gdk_window_set_debug_updates gdk_window_set_debug_updates; alias c_gdk_window_add_filter gdk_window_add_filter; alias c_gdk_window_beep gdk_window_beep; alias c_gdk_window_begin_draw_frame gdk_window_begin_draw_frame; alias c_gdk_window_begin_move_drag gdk_window_begin_move_drag; alias c_gdk_window_begin_move_drag_for_device gdk_window_begin_move_drag_for_device; alias c_gdk_window_begin_paint_rect gdk_window_begin_paint_rect; alias c_gdk_window_begin_paint_region gdk_window_begin_paint_region; alias c_gdk_window_begin_resize_drag gdk_window_begin_resize_drag; alias c_gdk_window_begin_resize_drag_for_device gdk_window_begin_resize_drag_for_device; alias c_gdk_window_configure_finished gdk_window_configure_finished; alias c_gdk_window_coords_from_parent gdk_window_coords_from_parent; alias c_gdk_window_coords_to_parent gdk_window_coords_to_parent; alias c_gdk_window_create_gl_context gdk_window_create_gl_context; alias c_gdk_window_create_similar_image_surface gdk_window_create_similar_image_surface; alias c_gdk_window_create_similar_surface gdk_window_create_similar_surface; alias c_gdk_window_deiconify gdk_window_deiconify; alias c_gdk_window_destroy gdk_window_destroy; alias c_gdk_window_destroy_notify gdk_window_destroy_notify; alias c_gdk_window_enable_synchronized_configure gdk_window_enable_synchronized_configure; alias c_gdk_window_end_draw_frame gdk_window_end_draw_frame; alias c_gdk_window_end_paint gdk_window_end_paint; alias c_gdk_window_ensure_native gdk_window_ensure_native; alias c_gdk_window_flush gdk_window_flush; alias c_gdk_window_focus gdk_window_focus; alias c_gdk_window_freeze_toplevel_updates_libgtk_only gdk_window_freeze_toplevel_updates_libgtk_only; alias c_gdk_window_freeze_updates gdk_window_freeze_updates; alias c_gdk_window_fullscreen gdk_window_fullscreen; alias c_gdk_window_fullscreen_on_monitor gdk_window_fullscreen_on_monitor; alias c_gdk_window_geometry_changed gdk_window_geometry_changed; alias c_gdk_window_get_accept_focus gdk_window_get_accept_focus; alias c_gdk_window_get_background_pattern gdk_window_get_background_pattern; alias c_gdk_window_get_children gdk_window_get_children; alias c_gdk_window_get_children_with_user_data gdk_window_get_children_with_user_data; alias c_gdk_window_get_clip_region gdk_window_get_clip_region; alias c_gdk_window_get_composited gdk_window_get_composited; alias c_gdk_window_get_cursor gdk_window_get_cursor; alias c_gdk_window_get_decorations gdk_window_get_decorations; alias c_gdk_window_get_device_cursor gdk_window_get_device_cursor; alias c_gdk_window_get_device_events gdk_window_get_device_events; alias c_gdk_window_get_device_position gdk_window_get_device_position; alias c_gdk_window_get_device_position_double gdk_window_get_device_position_double; alias c_gdk_window_get_display gdk_window_get_display; alias c_gdk_window_get_drag_protocol gdk_window_get_drag_protocol; alias c_gdk_window_get_effective_parent gdk_window_get_effective_parent; alias c_gdk_window_get_effective_toplevel gdk_window_get_effective_toplevel; alias c_gdk_window_get_event_compression gdk_window_get_event_compression; alias c_gdk_window_get_events gdk_window_get_events; alias c_gdk_window_get_focus_on_map gdk_window_get_focus_on_map; alias c_gdk_window_get_frame_clock gdk_window_get_frame_clock; alias c_gdk_window_get_frame_extents gdk_window_get_frame_extents; alias c_gdk_window_get_fullscreen_mode gdk_window_get_fullscreen_mode; alias c_gdk_window_get_geometry gdk_window_get_geometry; alias c_gdk_window_get_group gdk_window_get_group; alias c_gdk_window_get_height gdk_window_get_height; alias c_gdk_window_get_modal_hint gdk_window_get_modal_hint; alias c_gdk_window_get_origin gdk_window_get_origin; alias c_gdk_window_get_parent gdk_window_get_parent; alias c_gdk_window_get_pass_through gdk_window_get_pass_through; alias c_gdk_window_get_pointer gdk_window_get_pointer; alias c_gdk_window_get_position gdk_window_get_position; alias c_gdk_window_get_root_coords gdk_window_get_root_coords; alias c_gdk_window_get_root_origin gdk_window_get_root_origin; alias c_gdk_window_get_scale_factor gdk_window_get_scale_factor; alias c_gdk_window_get_screen gdk_window_get_screen; alias c_gdk_window_get_source_events gdk_window_get_source_events; alias c_gdk_window_get_state gdk_window_get_state; alias c_gdk_window_get_support_multidevice gdk_window_get_support_multidevice; alias c_gdk_window_get_toplevel gdk_window_get_toplevel; alias c_gdk_window_get_type_hint gdk_window_get_type_hint; alias c_gdk_window_get_update_area gdk_window_get_update_area; alias c_gdk_window_get_user_data gdk_window_get_user_data; alias c_gdk_window_get_visible_region gdk_window_get_visible_region; alias c_gdk_window_get_visual gdk_window_get_visual; alias c_gdk_window_get_width gdk_window_get_width; alias c_gdk_window_get_window_type gdk_window_get_window_type; alias c_gdk_window_has_native gdk_window_has_native; alias c_gdk_window_hide gdk_window_hide; alias c_gdk_window_iconify gdk_window_iconify; alias c_gdk_window_input_shape_combine_region gdk_window_input_shape_combine_region; alias c_gdk_window_invalidate_maybe_recurse gdk_window_invalidate_maybe_recurse; alias c_gdk_window_invalidate_rect gdk_window_invalidate_rect; alias c_gdk_window_invalidate_region gdk_window_invalidate_region; alias c_gdk_window_is_destroyed gdk_window_is_destroyed; alias c_gdk_window_is_input_only gdk_window_is_input_only; alias c_gdk_window_is_shaped gdk_window_is_shaped; alias c_gdk_window_is_viewable gdk_window_is_viewable; alias c_gdk_window_is_visible gdk_window_is_visible; alias c_gdk_window_lower gdk_window_lower; alias c_gdk_window_mark_paint_from_clip gdk_window_mark_paint_from_clip; alias c_gdk_window_maximize gdk_window_maximize; alias c_gdk_window_merge_child_input_shapes gdk_window_merge_child_input_shapes; alias c_gdk_window_merge_child_shapes gdk_window_merge_child_shapes; alias c_gdk_window_move gdk_window_move; alias c_gdk_window_move_region gdk_window_move_region; alias c_gdk_window_move_resize gdk_window_move_resize; alias c_gdk_window_peek_children gdk_window_peek_children; alias c_gdk_window_process_updates gdk_window_process_updates; alias c_gdk_window_raise gdk_window_raise; alias c_gdk_window_register_dnd gdk_window_register_dnd; alias c_gdk_window_remove_filter gdk_window_remove_filter; alias c_gdk_window_reparent gdk_window_reparent; alias c_gdk_window_resize gdk_window_resize; alias c_gdk_window_restack gdk_window_restack; alias c_gdk_window_scroll gdk_window_scroll; alias c_gdk_window_set_accept_focus gdk_window_set_accept_focus; alias c_gdk_window_set_background gdk_window_set_background; alias c_gdk_window_set_background_pattern gdk_window_set_background_pattern; alias c_gdk_window_set_background_rgba gdk_window_set_background_rgba; alias c_gdk_window_set_child_input_shapes gdk_window_set_child_input_shapes; alias c_gdk_window_set_child_shapes gdk_window_set_child_shapes; alias c_gdk_window_set_composited gdk_window_set_composited; alias c_gdk_window_set_cursor gdk_window_set_cursor; alias c_gdk_window_set_decorations gdk_window_set_decorations; alias c_gdk_window_set_device_cursor gdk_window_set_device_cursor; alias c_gdk_window_set_device_events gdk_window_set_device_events; alias c_gdk_window_set_event_compression gdk_window_set_event_compression; alias c_gdk_window_set_events gdk_window_set_events; alias c_gdk_window_set_focus_on_map gdk_window_set_focus_on_map; alias c_gdk_window_set_fullscreen_mode gdk_window_set_fullscreen_mode; alias c_gdk_window_set_functions gdk_window_set_functions; alias c_gdk_window_set_geometry_hints gdk_window_set_geometry_hints; alias c_gdk_window_set_group gdk_window_set_group; alias c_gdk_window_set_icon_list gdk_window_set_icon_list; alias c_gdk_window_set_icon_name gdk_window_set_icon_name; alias c_gdk_window_set_invalidate_handler gdk_window_set_invalidate_handler; alias c_gdk_window_set_keep_above gdk_window_set_keep_above; alias c_gdk_window_set_keep_below gdk_window_set_keep_below; alias c_gdk_window_set_modal_hint gdk_window_set_modal_hint; alias c_gdk_window_set_opacity gdk_window_set_opacity; alias c_gdk_window_set_opaque_region gdk_window_set_opaque_region; alias c_gdk_window_set_override_redirect gdk_window_set_override_redirect; alias c_gdk_window_set_pass_through gdk_window_set_pass_through; alias c_gdk_window_set_role gdk_window_set_role; alias c_gdk_window_set_shadow_width gdk_window_set_shadow_width; alias c_gdk_window_set_skip_pager_hint gdk_window_set_skip_pager_hint; alias c_gdk_window_set_skip_taskbar_hint gdk_window_set_skip_taskbar_hint; alias c_gdk_window_set_source_events gdk_window_set_source_events; alias c_gdk_window_set_startup_id gdk_window_set_startup_id; alias c_gdk_window_set_static_gravities gdk_window_set_static_gravities; alias c_gdk_window_set_support_multidevice gdk_window_set_support_multidevice; alias c_gdk_window_set_title gdk_window_set_title; alias c_gdk_window_set_transient_for gdk_window_set_transient_for; alias c_gdk_window_set_type_hint gdk_window_set_type_hint; alias c_gdk_window_set_urgency_hint gdk_window_set_urgency_hint; alias c_gdk_window_set_user_data gdk_window_set_user_data; alias c_gdk_window_shape_combine_region gdk_window_shape_combine_region; alias c_gdk_window_show gdk_window_show; alias c_gdk_window_show_unraised gdk_window_show_unraised; alias c_gdk_window_show_window_menu gdk_window_show_window_menu; alias c_gdk_window_stick gdk_window_stick; alias c_gdk_window_thaw_toplevel_updates_libgtk_only gdk_window_thaw_toplevel_updates_libgtk_only; alias c_gdk_window_thaw_updates gdk_window_thaw_updates; alias c_gdk_window_unfullscreen gdk_window_unfullscreen; alias c_gdk_window_unmaximize gdk_window_unmaximize; alias c_gdk_window_unstick gdk_window_unstick; alias c_gdk_window_withdraw gdk_window_withdraw; alias c_gdk_get_default_root_window gdk_get_default_root_window; alias c_gdk_offscreen_window_get_embedder gdk_offscreen_window_get_embedder; alias c_gdk_offscreen_window_get_surface gdk_offscreen_window_get_surface; alias c_gdk_offscreen_window_set_embedder gdk_offscreen_window_set_embedder; alias c_gdk_synthesize_window_state gdk_synthesize_window_state; // gdk.X11 alias c_gdk_x11_window_get_type gdk_x11_window_get_type; alias c_gdk_x11_window_foreign_new_for_display gdk_x11_window_foreign_new_for_display; alias c_gdk_x11_window_lookup_for_display gdk_x11_window_lookup_for_display; alias c_gdk_x11_window_get_desktop gdk_x11_window_get_desktop; alias c_gdk_x11_window_get_xid gdk_x11_window_get_xid; alias c_gdk_x11_window_move_to_current_desktop gdk_x11_window_move_to_current_desktop; alias c_gdk_x11_window_move_to_desktop gdk_x11_window_move_to_desktop; alias c_gdk_x11_window_set_frame_extents gdk_x11_window_set_frame_extents; alias c_gdk_x11_window_set_frame_sync_enabled gdk_x11_window_set_frame_sync_enabled; alias c_gdk_x11_window_set_hide_titlebar_when_maximized gdk_x11_window_set_hide_titlebar_when_maximized; alias c_gdk_x11_window_set_theme_variant gdk_x11_window_set_theme_variant; alias c_gdk_x11_window_set_user_time gdk_x11_window_set_user_time; alias c_gdk_x11_window_set_utf8_property gdk_x11_window_set_utf8_property; // gdk.Cairo alias c_gdk_cairo_create gdk_cairo_create; alias c_gdk_cairo_draw_from_gl gdk_cairo_draw_from_gl; alias c_gdk_cairo_get_clip_rectangle gdk_cairo_get_clip_rectangle; alias c_gdk_cairo_rectangle gdk_cairo_rectangle; alias c_gdk_cairo_region gdk_cairo_region; alias c_gdk_cairo_region_create_from_surface gdk_cairo_region_create_from_surface; alias c_gdk_cairo_set_source_color gdk_cairo_set_source_color; alias c_gdk_cairo_set_source_pixbuf gdk_cairo_set_source_pixbuf; alias c_gdk_cairo_set_source_rgba gdk_cairo_set_source_rgba; alias c_gdk_cairo_set_source_window gdk_cairo_set_source_window; alias c_gdk_cairo_surface_create_from_pixbuf gdk_cairo_surface_create_from_pixbuf; alias c_gdk_cairo_get_drawing_context gdk_cairo_get_drawing_context; // gdk.Pango alias c_gdk_pango_context_get gdk_pango_context_get; alias c_gdk_pango_context_get_for_screen gdk_pango_context_get_for_screen; alias c_gdk_pango_layout_get_clip_region gdk_pango_layout_get_clip_region; alias c_gdk_pango_layout_line_get_clip_region gdk_pango_layout_line_get_clip_region; alias c_gdk_pango_context_get_for_display gdk_pango_context_get_for_display; // gdk.Pixbuf alias c_gdk_pixbuf_get_from_surface gdk_pixbuf_get_from_surface; alias c_gdk_pixbuf_get_from_window gdk_pixbuf_get_from_window; // gdk.Threads alias c_gdk_threads_add_idle gdk_threads_add_idle; alias c_gdk_threads_add_idle_full gdk_threads_add_idle_full; alias c_gdk_threads_add_timeout gdk_threads_add_timeout; alias c_gdk_threads_add_timeout_full gdk_threads_add_timeout_full; alias c_gdk_threads_add_timeout_seconds gdk_threads_add_timeout_seconds; alias c_gdk_threads_add_timeout_seconds_full gdk_threads_add_timeout_seconds_full; alias c_gdk_threads_enter gdk_threads_enter; alias c_gdk_threads_init gdk_threads_init; alias c_gdk_threads_leave gdk_threads_leave; alias c_gdk_threads_set_lock_functions gdk_threads_set_lock_functions; // gdk.Gdk alias c_gdk_beep gdk_beep; alias c_gdk_error_trap_pop gdk_error_trap_pop; alias c_gdk_error_trap_pop_ignored gdk_error_trap_pop_ignored; alias c_gdk_error_trap_push gdk_error_trap_push; alias c_gdk_flush gdk_flush; alias c_gdk_get_display gdk_get_display; alias c_gdk_get_display_arg_name gdk_get_display_arg_name; alias c_gdk_get_program_class gdk_get_program_class; alias c_gdk_init gdk_init; alias c_gdk_init_check gdk_init_check; alias c_gdk_keyboard_grab gdk_keyboard_grab; alias c_gdk_keyboard_ungrab gdk_keyboard_ungrab; alias c_gdk_notify_startup_complete gdk_notify_startup_complete; alias c_gdk_notify_startup_complete_with_id gdk_notify_startup_complete_with_id; alias c_gdk_parse_args gdk_parse_args; alias c_gdk_pointer_grab gdk_pointer_grab; alias c_gdk_pointer_is_grabbed gdk_pointer_is_grabbed; alias c_gdk_pointer_ungrab gdk_pointer_ungrab; alias c_gdk_set_allowed_backends gdk_set_allowed_backends; alias c_gdk_set_double_click_time gdk_set_double_click_time; alias c_gdk_set_program_class gdk_set_program_class; // gdk.Selection alias c_gdk_selection_convert gdk_selection_convert; alias c_gdk_selection_owner_get gdk_selection_owner_get; alias c_gdk_selection_owner_get_for_display gdk_selection_owner_get_for_display; alias c_gdk_selection_owner_set gdk_selection_owner_set; alias c_gdk_selection_owner_set_for_display gdk_selection_owner_set_for_display; alias c_gdk_selection_property_get gdk_selection_property_get; alias c_gdk_selection_send_notify gdk_selection_send_notify; alias c_gdk_selection_send_notify_for_display gdk_selection_send_notify_for_display; // gdk.Testing alias c_gdk_test_render_sync gdk_test_render_sync; alias c_gdk_test_simulate_button gdk_test_simulate_button; alias c_gdk_test_simulate_key gdk_test_simulate_key; GtkD-3.7.5/generated/gtkd/gdk/c/types.d000066400000000000000000002604651324604450400175650ustar00rootroot00000000000000/* * 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 gdk.c.types; public import cairo.c.types; public import gdkpixbuf.c.types; public import gio.c.types; public import glib.c.types; public import gobject.c.types; public import pango.c.types; /** * Used to represent native events (XEvents for the X11 * backend, MSGs for Win32). */ public alias void GdkXEvent; /** * Positioning hints for aligning a window relative to a rectangle. * * These hints determine how the window should be positioned in the case that * the window would fall off-screen if placed in its ideal position. * * For example, %GDK_ANCHOR_FLIP_X will replace %GDK_GRAVITY_NORTH_WEST with * %GDK_GRAVITY_NORTH_EAST and vice versa if the window extends beyond the left * or right edges of the monitor. * * If %GDK_ANCHOR_SLIDE_X is set, the window can be shifted horizontally to fit * on-screen. If %GDK_ANCHOR_RESIZE_X is set, the window can be shrunken * horizontally to fit. * * In general, when multiple flags are set, flipping should take precedence over * sliding, which should take precedence over resizing. * * Since: 3.22 */ public enum GdkAnchorHints { /** * allow flipping anchors horizontally */ FLIP_X = 1, /** * allow flipping anchors vertically */ FLIP_Y = 2, /** * allow sliding window horizontally */ SLIDE_X = 4, /** * allow sliding window vertically */ SLIDE_Y = 8, /** * allow resizing window horizontally */ RESIZE_X = 16, /** * allow resizing window vertically */ RESIZE_Y = 32, /** * allow flipping anchors on both axes */ FLIP = 3, /** * allow sliding window on both axes */ SLIDE = 12, /** * allow resizing window on both axes */ RESIZE = 48, } alias GdkAnchorHints AnchorHints; /** * Flags describing the current capabilities of a device/tool. * * Since: 3.22 */ public enum GdkAxisFlags { /** * X axis is present */ X = 2, /** * Y axis is present */ Y = 4, /** * Pressure axis is present */ PRESSURE = 8, /** * X tilt axis is present */ XTILT = 16, /** * Y tilt axis is present */ YTILT = 32, /** * Wheel axis is present */ WHEEL = 64, /** * Distance axis is present */ DISTANCE = 128, /** * Z-axis rotation is present */ ROTATION = 256, /** * Slider axis is present */ SLIDER = 512, } alias GdkAxisFlags AxisFlags; /** * An enumeration describing the way in which a device * axis (valuator) maps onto the predefined valuator * types that GTK+ understands. * * Note that the X and Y axes are not really needed; pointer devices * report their location via the x/y members of events regardless. Whether * X and Y are present as axes depends on the GDK backend. */ public enum GdkAxisUse { /** * the axis is ignored. */ IGNORE = 0, /** * the axis is used as the x axis. */ X = 1, /** * the axis is used as the y axis. */ Y = 2, /** * the axis is used for pressure information. */ PRESSURE = 3, /** * the axis is used for x tilt information. */ XTILT = 4, /** * the axis is used for y tilt information. */ YTILT = 5, /** * the axis is used for wheel information. */ WHEEL = 6, /** * the axis is used for pen/tablet distance information. (Since: 3.22) */ DISTANCE = 7, /** * the axis is used for pen rotation information. (Since: 3.22) */ ROTATION = 8, /** * the axis is used for pen slider information. (Since: 3.22) */ SLIDER = 9, /** * a constant equal to the numerically highest axis value. */ LAST = 10, } alias GdkAxisUse AxisUse; /** * A set of values describing the possible byte-orders * for storing pixel values in memory. */ public enum GdkByteOrder { /** * The values are stored with the least-significant byte * first. For instance, the 32-bit value 0xffeecc would be stored * in memory as 0xcc, 0xee, 0xff, 0x00. */ LSB_FIRST = 0, /** * The values are stored with the most-significant byte * first. For instance, the 32-bit value 0xffeecc would be stored * in memory as 0x00, 0xff, 0xee, 0xcc. */ MSB_FIRST = 1, } alias GdkByteOrder ByteOrder; /** * Specifies the crossing mode for #GdkEventCrossing. */ public enum GdkCrossingMode { /** * crossing because of pointer motion. */ NORMAL = 0, /** * crossing because a grab is activated. */ GRAB = 1, /** * crossing because a grab is deactivated. */ UNGRAB = 2, /** * crossing because a GTK+ grab is activated. */ GTK_GRAB = 3, /** * crossing because a GTK+ grab is deactivated. */ GTK_UNGRAB = 4, /** * crossing because a GTK+ widget changed * state (e.g. sensitivity). */ STATE_CHANGED = 5, /** * crossing because a touch sequence has begun, * this event is synthetic as the pointer might have not left the window. */ TOUCH_BEGIN = 6, /** * crossing because a touch sequence has ended, * this event is synthetic as the pointer might have not left the window. */ TOUCH_END = 7, /** * crossing because of a device switch (i.e. * a mouse taking control of the pointer after a touch device), this event * is synthetic as the pointer didn’t leave the window. */ DEVICE_SWITCH = 8, } alias GdkCrossingMode CrossingMode; /** * Predefined cursors. * * Note that these IDs are directly taken from the X cursor font, and many * of these cursors are either not useful, or are not available on other platforms. * * The recommended way to create cursors is to use gdk_cursor_new_from_name(). */ public enum GdkCursorType { /** * ![](X_cursor.png) */ X_CURSOR = 0, /** * ![](arrow.png) */ ARROW = 2, /** * ![](based_arrow_down.png) */ BASED_ARROW_DOWN = 4, /** * ![](based_arrow_up.png) */ BASED_ARROW_UP = 6, /** * ![](boat.png) */ BOAT = 8, /** * ![](bogosity.png) */ BOGOSITY = 10, /** * ![](bottom_left_corner.png) */ BOTTOM_LEFT_CORNER = 12, /** * ![](bottom_right_corner.png) */ BOTTOM_RIGHT_CORNER = 14, /** * ![](bottom_side.png) */ BOTTOM_SIDE = 16, /** * ![](bottom_tee.png) */ BOTTOM_TEE = 18, /** * ![](box_spiral.png) */ BOX_SPIRAL = 20, /** * ![](center_ptr.png) */ CENTER_PTR = 22, /** * ![](circle.png) */ CIRCLE = 24, /** * ![](clock.png) */ CLOCK = 26, /** * ![](coffee_mug.png) */ COFFEE_MUG = 28, /** * ![](cross.png) */ CROSS = 30, /** * ![](cross_reverse.png) */ CROSS_REVERSE = 32, /** * ![](crosshair.png) */ CROSSHAIR = 34, /** * ![](diamond_cross.png) */ DIAMOND_CROSS = 36, /** * ![](dot.png) */ DOT = 38, /** * ![](dotbox.png) */ DOTBOX = 40, /** * ![](double_arrow.png) */ DOUBLE_ARROW = 42, /** * ![](draft_large.png) */ DRAFT_LARGE = 44, /** * ![](draft_small.png) */ DRAFT_SMALL = 46, /** * ![](draped_box.png) */ DRAPED_BOX = 48, /** * ![](exchange.png) */ EXCHANGE = 50, /** * ![](fleur.png) */ FLEUR = 52, /** * ![](gobbler.png) */ GOBBLER = 54, /** * ![](gumby.png) */ GUMBY = 56, /** * ![](hand1.png) */ HAND1 = 58, /** * ![](hand2.png) */ HAND2 = 60, /** * ![](heart.png) */ HEART = 62, /** * ![](icon.png) */ ICON = 64, /** * ![](iron_cross.png) */ IRON_CROSS = 66, /** * ![](left_ptr.png) */ LEFT_PTR = 68, /** * ![](left_side.png) */ LEFT_SIDE = 70, /** * ![](left_tee.png) */ LEFT_TEE = 72, /** * ![](leftbutton.png) */ LEFTBUTTON = 74, /** * ![](ll_angle.png) */ LL_ANGLE = 76, /** * ![](lr_angle.png) */ LR_ANGLE = 78, /** * ![](man.png) */ MAN = 80, /** * ![](middlebutton.png) */ MIDDLEBUTTON = 82, /** * ![](mouse.png) */ MOUSE = 84, /** * ![](pencil.png) */ PENCIL = 86, /** * ![](pirate.png) */ PIRATE = 88, /** * ![](plus.png) */ PLUS = 90, /** * ![](question_arrow.png) */ QUESTION_ARROW = 92, /** * ![](right_ptr.png) */ RIGHT_PTR = 94, /** * ![](right_side.png) */ RIGHT_SIDE = 96, /** * ![](right_tee.png) */ RIGHT_TEE = 98, /** * ![](rightbutton.png) */ RIGHTBUTTON = 100, /** * ![](rtl_logo.png) */ RTL_LOGO = 102, /** * ![](sailboat.png) */ SAILBOAT = 104, /** * ![](sb_down_arrow.png) */ SB_DOWN_ARROW = 106, /** * ![](sb_h_double_arrow.png) */ SB_H_DOUBLE_ARROW = 108, /** * ![](sb_left_arrow.png) */ SB_LEFT_ARROW = 110, /** * ![](sb_right_arrow.png) */ SB_RIGHT_ARROW = 112, /** * ![](sb_up_arrow.png) */ SB_UP_ARROW = 114, /** * ![](sb_v_double_arrow.png) */ SB_V_DOUBLE_ARROW = 116, /** * ![](shuttle.png) */ SHUTTLE = 118, /** * ![](sizing.png) */ SIZING = 120, /** * ![](spider.png) */ SPIDER = 122, /** * ![](spraycan.png) */ SPRAYCAN = 124, /** * ![](star.png) */ STAR = 126, /** * ![](target.png) */ TARGET = 128, /** * ![](tcross.png) */ TCROSS = 130, /** * ![](top_left_arrow.png) */ TOP_LEFT_ARROW = 132, /** * ![](top_left_corner.png) */ TOP_LEFT_CORNER = 134, /** * ![](top_right_corner.png) */ TOP_RIGHT_CORNER = 136, /** * ![](top_side.png) */ TOP_SIDE = 138, /** * ![](top_tee.png) */ TOP_TEE = 140, /** * ![](trek.png) */ TREK = 142, /** * ![](ul_angle.png) */ UL_ANGLE = 144, /** * ![](umbrella.png) */ UMBRELLA = 146, /** * ![](ur_angle.png) */ UR_ANGLE = 148, /** * ![](watch.png) */ WATCH = 150, /** * ![](xterm.png) */ XTERM = 152, /** * last cursor type */ LAST_CURSOR = 153, /** * Blank cursor. Since 2.16 */ BLANK_CURSOR = -2, /** * type of cursors constructed with * gdk_cursor_new_from_pixbuf() */ CURSOR_IS_PIXMAP = -1, } alias GdkCursorType CursorType; /** * A pad feature. */ public enum GdkDevicePadFeature { /** * a button */ BUTTON = 0, /** * a ring-shaped interactive area */ RING = 1, /** * a straight interactive area */ STRIP = 2, } alias GdkDevicePadFeature DevicePadFeature; /** * Indicates the specific type of tool being used being a tablet. Such as an * airbrush, pencil, etc. * * Since: 3.22 */ public enum GdkDeviceToolType { /** * Tool is of an unknown type. */ UNKNOWN = 0, /** * Tool is a standard tablet stylus. */ PEN = 1, /** * Tool is standard tablet eraser. */ ERASER = 2, /** * Tool is a brush stylus. */ BRUSH = 3, /** * Tool is a pencil stylus. */ PENCIL = 4, /** * Tool is an airbrush stylus. */ AIRBRUSH = 5, /** * Tool is a mouse. */ MOUSE = 6, /** * Tool is a lens cursor. */ LENS = 7, } alias GdkDeviceToolType DeviceToolType; /** * Indicates the device type. See [above][GdkDeviceManager.description] * for more information about the meaning of these device types. */ public enum GdkDeviceType { /** * Device is a master (or virtual) device. There will * be an associated focus indicator on the screen. */ MASTER = 0, /** * Device is a slave (or physical) device. */ SLAVE = 1, /** * Device is a physical device, currently not attached to * any virtual device. */ FLOATING = 2, } alias GdkDeviceType DeviceType; /** * Used in #GdkDragContext to indicate what the destination * should do with the dropped data. */ public enum GdkDragAction { /** * Means nothing, and should not be used. */ DEFAULT = 1, /** * Copy the data. */ COPY = 2, /** * Move the data, i.e. first copy it, then delete * it from the source using the DELETE target of the X selection protocol. */ MOVE = 4, /** * Add a link to the data. Note that this is only * useful if source and destination agree on what it means. */ LINK = 8, /** * Special action which tells the source that the * destination will do something that the source doesn’t understand. */ PRIVATE = 16, /** * Ask the user what to do with the data. */ ASK = 32, } alias GdkDragAction DragAction; /** * Used in #GdkDragContext to the reason of a cancelled DND operation. * * Since: 3.20 */ public enum GdkDragCancelReason { /** * There is no suitable drop target. */ NO_TARGET = 0, /** * Drag cancelled by the user */ USER_CANCELLED = 1, /** * Unspecified error. */ ERROR = 2, } alias GdkDragCancelReason DragCancelReason; /** * Used in #GdkDragContext to indicate the protocol according to * which DND is done. */ public enum GdkDragProtocol { /** * no protocol. */ NONE = 0, /** * The Motif DND protocol. No longer supported */ MOTIF = 1, /** * The Xdnd protocol. */ XDND = 2, /** * An extension to the Xdnd protocol for * unclaimed root window drops. */ ROOTWIN = 3, /** * The simple WM_DROPFILES protocol. */ WIN32_DROPFILES = 4, /** * The complex OLE2 DND protocol (not implemented). */ OLE2 = 5, /** * Intra-application DND. */ LOCAL = 6, /** * Wayland DND protocol. */ WAYLAND = 7, } alias GdkDragProtocol DragProtocol; /** * A set of bit-flags to indicate which events a window is to receive. * Most of these masks map onto one or more of the #GdkEventType event types * above. * * See the [input handling overview][chap-input-handling] for details of * [event masks][event-masks] and [event propagation][event-propagation]. * * %GDK_POINTER_MOTION_HINT_MASK is deprecated. It is a special mask * to reduce the number of %GDK_MOTION_NOTIFY events received. When using * %GDK_POINTER_MOTION_HINT_MASK, fewer %GDK_MOTION_NOTIFY events will * be sent, some of which are marked as a hint (the is_hint member is * %TRUE). To receive more motion events after a motion hint event, * the application needs to asks for more, by calling * gdk_event_request_motions(). * * Since GTK 3.8, motion events are already compressed by default, independent * of this mechanism. This compression can be disabled with * gdk_window_set_event_compression(). See the documentation of that function * for details. * * If %GDK_TOUCH_MASK is enabled, the window will receive touch events * from touch-enabled devices. Those will come as sequences of #GdkEventTouch * with type %GDK_TOUCH_UPDATE, enclosed by two events with * type %GDK_TOUCH_BEGIN and %GDK_TOUCH_END (or %GDK_TOUCH_CANCEL). * gdk_event_get_event_sequence() returns the event sequence for these * events, so different sequences may be distinguished. */ public enum GdkEventMask { /** * receive expose events */ EXPOSURE_MASK = 2, /** * receive all pointer motion events */ POINTER_MOTION_MASK = 4, /** * deprecated. see the explanation above */ POINTER_MOTION_HINT_MASK = 8, /** * receive pointer motion events while any button is pressed */ BUTTON_MOTION_MASK = 16, /** * receive pointer motion events while 1 button is pressed */ BUTTON1_MOTION_MASK = 32, /** * receive pointer motion events while 2 button is pressed */ BUTTON2_MOTION_MASK = 64, /** * receive pointer motion events while 3 button is pressed */ BUTTON3_MOTION_MASK = 128, /** * receive button press events */ BUTTON_PRESS_MASK = 256, /** * receive button release events */ BUTTON_RELEASE_MASK = 512, /** * receive key press events */ KEY_PRESS_MASK = 1024, /** * receive key release events */ KEY_RELEASE_MASK = 2048, /** * receive window enter events */ ENTER_NOTIFY_MASK = 4096, /** * receive window leave events */ LEAVE_NOTIFY_MASK = 8192, /** * receive focus change events */ FOCUS_CHANGE_MASK = 16384, /** * receive events about window configuration change */ STRUCTURE_MASK = 32768, /** * receive property change events */ PROPERTY_CHANGE_MASK = 65536, /** * receive visibility change events */ VISIBILITY_NOTIFY_MASK = 131072, /** * receive proximity in events */ PROXIMITY_IN_MASK = 262144, /** * receive proximity out events */ PROXIMITY_OUT_MASK = 524288, /** * receive events about window configuration changes of * child windows */ SUBSTRUCTURE_MASK = 1048576, /** * receive scroll events */ SCROLL_MASK = 2097152, /** * receive touch events. Since 3.4 */ TOUCH_MASK = 4194304, /** * receive smooth scrolling events. Since 3.4 */ SMOOTH_SCROLL_MASK = 8388608, /** * receive touchpad gesture events. Since 3.18 */ TOUCHPAD_GESTURE_MASK = 16777216, /** * receive tablet pad events. Since 3.22 */ TABLET_PAD_MASK = 33554432, /** * the combination of all the above event masks. */ ALL_EVENTS_MASK = 16777214, } alias GdkEventMask EventMask; /** * Specifies the type of the event. * * Do not confuse these events with the signals that GTK+ widgets emit. * Although many of these events result in corresponding signals being emitted, * the events are often transformed or filtered along the way. * * In some language bindings, the values %GDK_2BUTTON_PRESS and * %GDK_3BUTTON_PRESS would translate into something syntactically * invalid (eg `Gdk.EventType.2ButtonPress`, where a * symbol is not allowed to start with a number). In that case, the * aliases %GDK_DOUBLE_BUTTON_PRESS and %GDK_TRIPLE_BUTTON_PRESS can * be used instead. */ public enum GdkEventType { /** * a special code to indicate a null event. */ NOTHING = -1, /** * the window manager has requested that the toplevel window be * hidden or destroyed, usually when the user clicks on a special icon in the * title bar. */ DELETE = 0, /** * the window has been destroyed. */ DESTROY = 1, /** * all or part of the window has become visible and needs to be * redrawn. */ EXPOSE = 2, /** * the pointer (usually a mouse) has moved. */ MOTION_NOTIFY = 3, /** * a mouse button has been pressed. */ BUTTON_PRESS = 4, /** * alias for %GDK_2BUTTON_PRESS, added in 3.6. */ DOUBLE_BUTTON_PRESS = 5, /** * alias for %GDK_3BUTTON_PRESS, added in 3.6. */ TRIPLE_BUTTON_PRESS = 6, /** * a mouse button has been released. */ BUTTON_RELEASE = 7, /** * a key has been pressed. */ KEY_PRESS = 8, /** * a key has been released. */ KEY_RELEASE = 9, /** * the pointer has entered the window. */ ENTER_NOTIFY = 10, /** * the pointer has left the window. */ LEAVE_NOTIFY = 11, /** * the keyboard focus has entered or left the window. */ FOCUS_CHANGE = 12, /** * the size, position or stacking order of the window has changed. * Note that GTK+ discards these events for %GDK_WINDOW_CHILD windows. */ CONFIGURE = 13, /** * the window has been mapped. */ MAP = 14, /** * the window has been unmapped. */ UNMAP = 15, /** * a property on the window has been changed or deleted. */ PROPERTY_NOTIFY = 16, /** * the application has lost ownership of a selection. */ SELECTION_CLEAR = 17, /** * another application has requested a selection. */ SELECTION_REQUEST = 18, /** * a selection has been received. */ SELECTION_NOTIFY = 19, /** * an input device has moved into contact with a sensing * surface (e.g. a touchscreen or graphics tablet). */ PROXIMITY_IN = 20, /** * an input device has moved out of contact with a sensing * surface. */ PROXIMITY_OUT = 21, /** * the mouse has entered the window while a drag is in progress. */ DRAG_ENTER = 22, /** * the mouse has left the window while a drag is in progress. */ DRAG_LEAVE = 23, /** * the mouse has moved in the window while a drag is in * progress. */ DRAG_MOTION = 24, /** * the status of the drag operation initiated by the window * has changed. */ DRAG_STATUS = 25, /** * a drop operation onto the window has started. */ DROP_START = 26, /** * the drop operation initiated by the window has completed. */ DROP_FINISHED = 27, /** * a message has been received from another application. */ CLIENT_EVENT = 28, /** * the window visibility status has changed. */ VISIBILITY_NOTIFY = 29, /** * the scroll wheel was turned */ SCROLL = 31, /** * the state of a window has changed. See #GdkWindowState * for the possible window states */ WINDOW_STATE = 32, /** * a setting has been modified. */ SETTING = 33, /** * the owner of a selection has changed. This event type * was added in 2.6 */ OWNER_CHANGE = 34, /** * a pointer or keyboard grab was broken. This event type * was added in 2.8. */ GRAB_BROKEN = 35, /** * the content of the window has been changed. This event type * was added in 2.14. */ DAMAGE = 36, /** * A new touch event sequence has just started. This event * type was added in 3.4. */ TOUCH_BEGIN = 37, /** * A touch event sequence has been updated. This event type * was added in 3.4. */ TOUCH_UPDATE = 38, /** * A touch event sequence has finished. This event type * was added in 3.4. */ TOUCH_END = 39, /** * A touch event sequence has been canceled. This event type * was added in 3.4. */ TOUCH_CANCEL = 40, /** * A touchpad swipe gesture event, the current state * is determined by its phase field. This event type was added in 3.18. */ TOUCHPAD_SWIPE = 41, /** * A touchpad pinch gesture event, the current state * is determined by its phase field. This event type was added in 3.18. */ TOUCHPAD_PINCH = 42, /** * A tablet pad button press event. This event type * was added in 3.22. */ PAD_BUTTON_PRESS = 43, /** * A tablet pad button release event. This event type * was added in 3.22. */ PAD_BUTTON_RELEASE = 44, /** * A tablet pad axis event from a "ring". This event type was * added in 3.22. */ PAD_RING = 45, /** * A tablet pad axis event from a "strip". This event type was * added in 3.22. */ PAD_STRIP = 46, /** * A tablet pad group mode change. This event type was * added in 3.22. */ PAD_GROUP_MODE = 47, /** * marks the end of the GdkEventType enumeration. Added in 2.18 */ EVENT_LAST = 48, } alias GdkEventType EventType; /** * Specifies the result of applying a #GdkFilterFunc to a native event. */ public enum GdkFilterReturn { /** * event not handled, continue processing. */ CONTINUE = 0, /** * native event translated into a GDK event and stored * in the `event` structure that was passed in. */ TRANSLATE = 1, /** * event handled, terminate processing. */ REMOVE = 2, } alias GdkFilterReturn FilterReturn; /** * #GdkFrameClockPhase is used to represent the different paint clock * phases that can be requested. The elements of the enumeration * correspond to the signals of #GdkFrameClock. * * Since: 3.8 */ public enum GdkFrameClockPhase { /** * no phase */ NONE = 0, /** * corresponds to GdkFrameClock::flush-events. Should not be handled by applications. */ FLUSH_EVENTS = 1, /** * corresponds to GdkFrameClock::before-paint. Should not be handled by applications. */ BEFORE_PAINT = 2, /** * corresponds to GdkFrameClock::update. */ UPDATE = 4, /** * corresponds to GdkFrameClock::layout. */ LAYOUT = 8, /** * corresponds to GdkFrameClock::paint. */ PAINT = 16, /** * corresponds to GdkFrameClock::resume-events. Should not be handled by applications. */ RESUME_EVENTS = 32, /** * corresponds to GdkFrameClock::after-paint. Should not be handled by applications. */ AFTER_PAINT = 64, } alias GdkFrameClockPhase FrameClockPhase; /** * Indicates which monitor (in a multi-head setup) a window should span over * when in fullscreen mode. * * Since: 3.8 */ public enum GdkFullscreenMode { /** * Fullscreen on current monitor only. */ CURRENT_MONITOR = 0, /** * Span across all monitors when fullscreen. */ ALL_MONITORS = 1, } alias GdkFullscreenMode FullscreenMode; /** * Error enumeration for #GdkGLContext. * * Since: 3.16 */ public enum GdkGLError { /** * OpenGL support is not available */ NOT_AVAILABLE = 0, /** * The requested visual format is not supported */ UNSUPPORTED_FORMAT = 1, /** * The requested profile is not supported */ UNSUPPORTED_PROFILE = 2, } alias GdkGLError GLError; /** * Defines how device grabs interact with other devices. */ public enum GdkGrabOwnership { /** * All other devices’ events are allowed. */ NONE = 0, /** * Other devices’ events are blocked for the grab window. */ WINDOW = 1, /** * Other devices’ events are blocked for the whole application. */ APPLICATION = 2, } alias GdkGrabOwnership GrabOwnership; /** * Returned by gdk_device_grab(), gdk_pointer_grab() and gdk_keyboard_grab() to * indicate success or the reason for the failure of the grab attempt. */ public enum GdkGrabStatus { /** * the resource was successfully grabbed. */ SUCCESS = 0, /** * the resource is actively grabbed by another client. */ ALREADY_GRABBED = 1, /** * the resource was grabbed more recently than the * specified time. */ INVALID_TIME = 2, /** * the grab window or the @confine_to window are not * viewable. */ NOT_VIEWABLE = 3, /** * the resource is frozen by an active grab of another client. */ FROZEN = 4, /** * the grab failed for some other reason. Since 3.16 */ FAILED = 5, } alias GdkGrabStatus GrabStatus; /** * Defines the reference point of a window and the meaning of coordinates * passed to gtk_window_move(). See gtk_window_move() and the "implementation * notes" section of the * [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) * specification for more details. */ public enum GdkGravity { /** * the reference point is at the top left corner. */ NORTH_WEST = 1, /** * the reference point is in the middle of the top edge. */ NORTH = 2, /** * the reference point is at the top right corner. */ NORTH_EAST = 3, /** * the reference point is at the middle of the left edge. */ WEST = 4, /** * the reference point is at the center of the window. */ CENTER = 5, /** * the reference point is at the middle of the right edge. */ EAST = 6, /** * the reference point is at the lower left corner. */ SOUTH_WEST = 7, /** * the reference point is at the middle of the lower edge. */ SOUTH = 8, /** * the reference point is at the lower right corner. */ SOUTH_EAST = 9, /** * the reference point is at the top left corner of the * window itself, ignoring window manager decorations. */ STATIC = 10, } alias GdkGravity Gravity; /** * An enumeration that describes the mode of an input device. */ public enum GdkInputMode { /** * the device is disabled and will not report any events. */ DISABLED = 0, /** * the device is enabled. The device’s coordinate space * maps to the entire screen. */ SCREEN = 1, /** * the device is enabled. The device’s coordinate space * is mapped to a single window. The manner in which this window * is chosen is undefined, but it will typically be the same * way in which the focus window for key events is determined. */ WINDOW = 2, } alias GdkInputMode InputMode; /** * An enumeration describing the type of an input device in general terms. */ public enum GdkInputSource { /** * the device is a mouse. (This will be reported for the core * pointer, even if it is something else, such as a trackball.) */ MOUSE = 0, /** * the device is a stylus of a graphics tablet or similar device. */ PEN = 1, /** * the device is an eraser. Typically, this would be the other end * of a stylus on a graphics tablet. */ ERASER = 2, /** * the device is a graphics tablet “puck” or similar device. */ CURSOR = 3, /** * the device is a keyboard. */ KEYBOARD = 4, /** * the device is a direct-input touch device, such * as a touchscreen or tablet. This device type has been added in 3.4. */ TOUCHSCREEN = 5, /** * the device is an indirect touch device, such * as a touchpad. This device type has been added in 3.4. */ TOUCHPAD = 6, /** * the device is a trackpoint. This device type has been * added in 3.22 */ TRACKPOINT = 7, /** * the device is a "pad", a collection of buttons, * rings and strips found in drawing tablets. This device type has been * added in 3.22. */ TABLET_PAD = 8, } alias GdkInputSource InputSource; /** * This enum is used with gdk_keymap_get_modifier_mask() * in order to determine what modifiers the * currently used windowing system backend uses for particular * purposes. For example, on X11/Windows, the Control key is used for * invoking menu shortcuts (accelerators), whereas on Apple computers * it’s the Command key (which correspond to %GDK_CONTROL_MASK and * %GDK_MOD2_MASK, respectively). * * Since: 3.4 */ public enum GdkModifierIntent { /** * the primary modifier used to invoke * menu accelerators. */ PRIMARY_ACCELERATOR = 0, /** * the modifier used to invoke context menus. * Note that mouse button 3 always triggers context menus. When this modifier * is not 0, it additionally triggers context menus when used with mouse button 1. */ CONTEXT_MENU = 1, /** * the modifier used to extend selections * using `modifier`-click or `modifier`-cursor-key */ EXTEND_SELECTION = 2, /** * the modifier used to modify selections, * which in most cases means toggling the clicked item into or out of the selection. */ MODIFY_SELECTION = 3, /** * when any of these modifiers is pressed, the * key event cannot produce a symbol directly. This is meant to be used for * input methods, and for use cases like typeahead search. */ NO_TEXT_INPUT = 4, /** * the modifier that switches between keyboard * groups (AltGr on X11/Windows and Option/Alt on OS X). */ SHIFT_GROUP = 5, /** * The set of modifier masks accepted * as modifiers in accelerators. Needed because Command is mapped to MOD2 on * OSX, which is widely used, but on X11 MOD2 is NumLock and using that for a * mod key is problematic at best. * Ref: https://bugzilla.gnome.org/show_bug.cgi?id=736125. */ DEFAULT_MOD_MASK = 6, } alias GdkModifierIntent ModifierIntent; /** * A set of bit-flags to indicate the state of modifier keys and mouse buttons * in various event types. Typical modifier keys are Shift, Control, Meta, * Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock. * * Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons. * * Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped * to Mod2 - Mod5, and indicates this by setting %GDK_SUPER_MASK, * %GDK_HYPER_MASK or %GDK_META_MASK in the state field of key events. * * Note that GDK may add internal values to events which include * reserved values such as %GDK_MODIFIER_RESERVED_13_MASK. Your code * should preserve and ignore them. You can use %GDK_MODIFIER_MASK to * remove all reserved values. * * Also note that the GDK X backend interprets button press events for button * 4-7 as scroll events, so %GDK_BUTTON4_MASK and %GDK_BUTTON5_MASK will never * be set. */ public enum GdkModifierType { /** * the Shift key. */ SHIFT_MASK = 1, /** * a Lock key (depending on the modifier mapping of the * X server this may either be CapsLock or ShiftLock). */ LOCK_MASK = 2, /** * the Control key. */ CONTROL_MASK = 4, /** * the fourth modifier key (it depends on the modifier * mapping of the X server which key is interpreted as this modifier, but * normally it is the Alt key). */ MOD1_MASK = 8, /** * the fifth modifier key (it depends on the modifier * mapping of the X server which key is interpreted as this modifier). */ MOD2_MASK = 16, /** * the sixth modifier key (it depends on the modifier * mapping of the X server which key is interpreted as this modifier). */ MOD3_MASK = 32, /** * the seventh modifier key (it depends on the modifier * mapping of the X server which key is interpreted as this modifier). */ MOD4_MASK = 64, /** * the eighth modifier key (it depends on the modifier * mapping of the X server which key is interpreted as this modifier). */ MOD5_MASK = 128, /** * the first mouse button. */ BUTTON1_MASK = 256, /** * the second mouse button. */ BUTTON2_MASK = 512, /** * the third mouse button. */ BUTTON3_MASK = 1024, /** * the fourth mouse button. */ BUTTON4_MASK = 2048, /** * the fifth mouse button. */ BUTTON5_MASK = 4096, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_13_MASK = 8192, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_14_MASK = 16384, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_15_MASK = 32768, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_16_MASK = 65536, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_17_MASK = 131072, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_18_MASK = 262144, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_19_MASK = 524288, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_20_MASK = 1048576, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_21_MASK = 2097152, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_22_MASK = 4194304, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_23_MASK = 8388608, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_24_MASK = 16777216, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_25_MASK = 33554432, /** * the Super modifier. Since 2.10 */ SUPER_MASK = 67108864, /** * the Hyper modifier. Since 2.10 */ HYPER_MASK = 134217728, /** * the Meta modifier. Since 2.10 */ META_MASK = 268435456, /** * A reserved bit flag; do not use in your own code */ MODIFIER_RESERVED_29_MASK = 536870912, /** * not used in GDK itself. GTK+ uses it to differentiate * between (keyval, modifiers) pairs from key press and release events. */ RELEASE_MASK = 1073741824, /** * a mask covering all modifier types. */ MODIFIER_MASK = 1543512063, } alias GdkModifierType ModifierType; /** * Specifies the kind of crossing for #GdkEventCrossing. * * See the X11 protocol specification of LeaveNotify for * full details of crossing event generation. */ public enum GdkNotifyType { /** * the window is entered from an ancestor or * left towards an ancestor. */ ANCESTOR = 0, /** * the pointer moves between an ancestor and an * inferior of the window. */ VIRTUAL = 1, /** * the window is entered from an inferior or * left towards an inferior. */ INFERIOR = 2, /** * the window is entered from or left towards * a window which is neither an ancestor nor an inferior. */ NONLINEAR = 3, /** * the pointer moves between two windows * which are not ancestors of each other and the window is part of * the ancestor chain between one of these windows and their least * common ancestor. */ NONLINEAR_VIRTUAL = 4, /** * an unknown type of enter/leave event occurred. */ UNKNOWN = 5, } alias GdkNotifyType NotifyType; /** * Specifies why a selection ownership was changed. */ public enum GdkOwnerChange { /** * some other app claimed the ownership */ NEW_OWNER = 0, /** * the window was destroyed */ DESTROY = 1, /** * the client was closed */ CLOSE = 2, } alias GdkOwnerChange OwnerChange; /** * Describes how existing data is combined with new data when * using gdk_property_change(). */ public enum GdkPropMode { /** * the new data replaces the existing data. */ REPLACE = 0, /** * the new data is prepended to the existing data. */ PREPEND = 1, /** * the new data is appended to the existing data. */ APPEND = 2, } alias GdkPropMode PropMode; /** * Specifies the type of a property change for a #GdkEventProperty. */ public enum GdkPropertyState { /** * the property value was changed. */ NEW_VALUE = 0, /** * the property was deleted. */ DELETE = 1, } alias GdkPropertyState PropertyState; /** * Specifies the direction for #GdkEventScroll. */ public enum GdkScrollDirection { /** * the window is scrolled up. */ UP = 0, /** * the window is scrolled down. */ DOWN = 1, /** * the window is scrolled to the left. */ LEFT = 2, /** * the window is scrolled to the right. */ RIGHT = 3, /** * the scrolling is determined by the delta values * in #GdkEventScroll. See gdk_event_get_scroll_deltas(). Since: 3.4 */ SMOOTH = 4, } alias GdkScrollDirection ScrollDirection; /** * Flags describing the seat capabilities. * * Since: 3.20 */ public enum GdkSeatCapabilities { /** * No input capabilities */ NONE = 0, /** * The seat has a pointer (e.g. mouse) */ POINTER = 1, /** * The seat has touchscreen(s) attached */ TOUCH = 2, /** * The seat has drawing tablet(s) attached */ TABLET_STYLUS = 4, /** * The seat has keyboard(s) attached */ KEYBOARD = 8, /** * The union of all pointing capabilities */ ALL_POINTING = 7, /** * The union of all capabilities */ ALL = 15, } alias GdkSeatCapabilities SeatCapabilities; /** * Specifies the kind of modification applied to a setting in a * #GdkEventSetting. */ public enum GdkSettingAction { /** * a setting was added. */ NEW = 0, /** * a setting was changed. */ CHANGED = 1, /** * a setting was deleted. */ DELETED = 2, } alias GdkSettingAction SettingAction; public enum GdkStatus { OK = 0, ERROR = -1, ERROR_PARAM = -2, ERROR_FILE = -3, ERROR_MEM = -4, } alias GdkStatus Status; /** * This enumeration describes how the red, green and blue components * of physical pixels on an output device are laid out. * * Since: 3.22 */ public enum GdkSubpixelLayout { /** * The layout is not known */ UNKNOWN = 0, /** * Not organized in this way */ NONE = 1, /** * The layout is horizontal, the order is RGB */ HORIZONTAL_RGB = 2, /** * The layout is horizontal, the order is BGR */ HORIZONTAL_BGR = 3, /** * The layout is vertical, the order is RGB */ VERTICAL_RGB = 4, /** * The layout is vertical, the order is BGR */ VERTICAL_BGR = 5, } alias GdkSubpixelLayout SubpixelLayout; /** * Specifies the current state of a touchpad gesture. All gestures are * guaranteed to begin with an event with phase %GDK_TOUCHPAD_GESTURE_PHASE_BEGIN, * followed by 0 or several events with phase %GDK_TOUCHPAD_GESTURE_PHASE_UPDATE. * * A finished gesture may have 2 possible outcomes, an event with phase * %GDK_TOUCHPAD_GESTURE_PHASE_END will be emitted when the gesture is * considered successful, this should be used as the hint to perform any * permanent changes. * * Cancelled gestures may be so for a variety of reasons, due to hardware * or the compositor, or due to the gesture recognition layers hinting the * gesture did not finish resolutely (eg. a 3rd finger being added during * a pinch gesture). In these cases, the last event will report the phase * %GDK_TOUCHPAD_GESTURE_PHASE_CANCEL, this should be used as a hint * to undo any visible/permanent changes that were done throughout the * progress of the gesture. * * See also #GdkEventTouchpadSwipe and #GdkEventTouchpadPinch. */ public enum GdkTouchpadGesturePhase { /** * The gesture has begun. */ BEGIN = 0, /** * The gesture has been updated. */ UPDATE = 1, /** * The gesture was finished, changes * should be permanently applied. */ END = 2, /** * The gesture was cancelled, all * changes should be undone. */ CANCEL = 3, } alias GdkTouchpadGesturePhase TouchpadGesturePhase; /** * Specifies the visiblity status of a window for a #GdkEventVisibility. */ public enum GdkVisibilityState { /** * the window is completely visible. */ UNOBSCURED = 0, /** * the window is partially visible. */ PARTIAL = 1, /** * the window is not visible at all. */ FULLY_OBSCURED = 2, } alias GdkVisibilityState VisibilityState; /** * A set of values that describe the manner in which the pixel values * for a visual are converted into RGB values for display. */ public enum GdkVisualType { /** * Each pixel value indexes a grayscale value * directly. */ STATIC_GRAY = 0, /** * Each pixel is an index into a color map that * maps pixel values into grayscale values. The color map can be * changed by an application. */ GRAYSCALE = 1, /** * Each pixel value is an index into a predefined, * unmodifiable color map that maps pixel values into RGB values. */ STATIC_COLOR = 2, /** * Each pixel is an index into a color map that * maps pixel values into rgb values. The color map can be changed by * an application. */ PSEUDO_COLOR = 3, /** * Each pixel value directly contains red, green, * and blue components. Use gdk_visual_get_red_pixel_details(), etc, * to obtain information about how the components are assembled into * a pixel value. */ TRUE_COLOR = 4, /** * Each pixel value contains red, green, and blue * components as for %GDK_VISUAL_TRUE_COLOR, but the components are * mapped via a color table into the final output table instead of * being converted directly. */ DIRECT_COLOR = 5, } alias GdkVisualType VisualType; /** * These are hints originally defined by the Motif toolkit. * The window manager can use them when determining how to decorate * the window. The hint must be set before mapping the window. */ public enum GdkWMDecoration { /** * all decorations should be applied. */ ALL = 1, /** * a frame should be drawn around the window. */ BORDER = 2, /** * the frame should have resize handles. */ RESIZEH = 4, /** * a titlebar should be placed above the window. */ TITLE = 8, /** * a button for opening a menu should be included. */ MENU = 16, /** * a minimize button should be included. */ MINIMIZE = 32, /** * a maximize button should be included. */ MAXIMIZE = 64, } alias GdkWMDecoration WMDecoration; /** * These are hints originally defined by the Motif toolkit. The window manager * can use them when determining the functions to offer for the window. The * hint must be set before mapping the window. */ public enum GdkWMFunction { /** * all functions should be offered. */ ALL = 1, /** * the window should be resizable. */ RESIZE = 2, /** * the window should be movable. */ MOVE = 4, /** * the window should be minimizable. */ MINIMIZE = 8, /** * the window should be maximizable. */ MAXIMIZE = 16, /** * the window should be closable. */ CLOSE = 32, } alias GdkWMFunction WMFunction; /** * Used to indicate which fields in the #GdkWindowAttr struct should be honored. * For example, if you filled in the “cursor” and “x” fields of #GdkWindowAttr, * pass “@GDK_WA_X | @GDK_WA_CURSOR” to gdk_window_new(). Fields in * #GdkWindowAttr not covered by a bit in this enum are required; for example, * the @width/@height, @wclass, and @window_type fields are required, they have * no corresponding flag in #GdkWindowAttributesType. */ public enum GdkWindowAttributesType { /** * Honor the title field */ TITLE = 2, /** * Honor the X coordinate field */ X = 4, /** * Honor the Y coordinate field */ Y = 8, /** * Honor the cursor field */ CURSOR = 16, /** * Honor the visual field */ VISUAL = 32, /** * Honor the wmclass_class and wmclass_name fields */ WMCLASS = 64, /** * Honor the override_redirect field */ NOREDIR = 128, /** * Honor the type_hint field */ TYPE_HINT = 256, } alias GdkWindowAttributesType WindowAttributesType; /** * Determines a window edge or corner. */ public enum GdkWindowEdge { /** * the top left corner. */ NORTH_WEST = 0, /** * the top edge. */ NORTH = 1, /** * the top right corner. */ NORTH_EAST = 2, /** * the left edge. */ WEST = 3, /** * the right edge. */ EAST = 4, /** * the lower left corner. */ SOUTH_WEST = 5, /** * the lower edge. */ SOUTH = 6, /** * the lower right corner. */ SOUTH_EAST = 7, } alias GdkWindowEdge WindowEdge; /** * Used to indicate which fields of a #GdkGeometry struct should be paid * attention to. Also, the presence/absence of @GDK_HINT_POS, * @GDK_HINT_USER_POS, and @GDK_HINT_USER_SIZE is significant, though they don't * directly refer to #GdkGeometry fields. @GDK_HINT_USER_POS will be set * automatically by #GtkWindow if you call gtk_window_move(). * @GDK_HINT_USER_POS and @GDK_HINT_USER_SIZE should be set if the user * specified a size/position using a --geometry command-line argument; * gtk_window_parse_geometry() automatically sets these flags. */ public enum GdkWindowHints { /** * indicates that the program has positioned the window */ POS = 1, /** * min size fields are set */ MIN_SIZE = 2, /** * max size fields are set */ MAX_SIZE = 4, /** * base size fields are set */ BASE_SIZE = 8, /** * aspect ratio fields are set */ ASPECT = 16, /** * resize increment fields are set */ RESIZE_INC = 32, /** * window gravity field is set */ WIN_GRAVITY = 64, /** * indicates that the window’s position was explicitly set * by the user */ USER_POS = 128, /** * indicates that the window’s size was explicitly set by * the user */ USER_SIZE = 256, } alias GdkWindowHints WindowHints; /** * Specifies the state of a toplevel window. */ public enum GdkWindowState { /** * the window is not shown. */ WITHDRAWN = 1, /** * the window is minimized. */ ICONIFIED = 2, /** * the window is maximized. */ MAXIMIZED = 4, /** * the window is sticky. */ STICKY = 8, /** * the window is maximized without * decorations. */ FULLSCREEN = 16, /** * the window is kept above other windows. */ ABOVE = 32, /** * the window is kept below other windows. */ BELOW = 64, /** * the window is presented as focused (with active decorations). */ FOCUSED = 128, /** * the window is in a tiled state, Since 3.10. Since 3.22.23, this * is deprecated in favor of per-edge information. */ TILED = 256, /** * whether the top edge is tiled, Since 3.22.23 */ TOP_TILED = 512, /** * whether the top edge is resizable, Since 3.22.23 */ TOP_RESIZABLE = 1024, /** * whether the right edge is tiled, Since 3.22.23 */ RIGHT_TILED = 2048, /** * whether the right edge is resizable, Since 3.22.23 */ RIGHT_RESIZABLE = 4096, /** * whether the bottom edge is tiled, Since 3.22.23 */ BOTTOM_TILED = 8192, /** * whether the bottom edge is resizable, Since 3.22.23 */ BOTTOM_RESIZABLE = 16384, /** * whether the left edge is tiled, Since 3.22.23 */ LEFT_TILED = 32768, /** * whether the left edge is resizable, Since 3.22.23 */ LEFT_RESIZABLE = 65536, } alias GdkWindowState WindowState; /** * Describes the kind of window. */ public enum GdkWindowType { /** * root window; this window has no parent, covers the entire * screen, and is created by the window system */ ROOT = 0, /** * toplevel window (used to implement #GtkWindow) */ TOPLEVEL = 1, /** * child window (used to implement e.g. #GtkEntry) */ CHILD = 2, /** * override redirect temporary window (used to implement * #GtkMenu) */ TEMP = 3, /** * foreign window (see gdk_window_foreign_new()) */ FOREIGN = 4, /** * offscreen window (see * [Offscreen Windows][OFFSCREEN-WINDOWS]). Since 2.18 */ OFFSCREEN = 5, /** * subsurface-based window; This window is visually * tied to a toplevel, and is moved/stacked with it. Currently this window * type is only implemented in Wayland. Since 3.14 */ SUBSURFACE = 6, } alias GdkWindowType WindowType; /** * These are hints for the window manager that indicate what type of function * the window has. The window manager can use this when determining decoration * and behaviour of the window. The hint must be set before mapping the window. * * See the [Extended Window Manager Hints](http://www.freedesktop.org/Standards/wm-spec) * specification for more details about window types. */ public enum GdkWindowTypeHint { /** * Normal toplevel window. */ NORMAL = 0, /** * Dialog window. */ DIALOG = 1, /** * Window used to implement a menu; GTK+ uses * this hint only for torn-off menus, see #GtkTearoffMenuItem. */ MENU = 2, /** * Window used to implement toolbars. */ TOOLBAR = 3, /** * Window used to display a splash * screen during application startup. */ SPLASHSCREEN = 4, /** * Utility windows which are not detached * toolbars or dialogs. */ UTILITY = 5, /** * Used for creating dock or panel windows. */ DOCK = 6, /** * Used for creating the desktop background * window. */ DESKTOP = 7, /** * A menu that belongs to a menubar. */ DROPDOWN_MENU = 8, /** * A menu that does not belong to a menubar, * e.g. a context menu. */ POPUP_MENU = 9, /** * A tooltip. */ TOOLTIP = 10, /** * A notification - typically a “bubble” * that belongs to a status icon. */ NOTIFICATION = 11, /** * A popup from a combo box. */ COMBO = 12, /** * A window that is used to implement a DND cursor. */ DND = 13, } alias GdkWindowTypeHint WindowTypeHint; /** * @GDK_INPUT_OUTPUT windows are the standard kind of window you might expect. * Such windows receive events and are also displayed on screen. * @GDK_INPUT_ONLY windows are invisible; they are usually placed above other * windows in order to trap or filter the events. You can’t draw on * @GDK_INPUT_ONLY windows. */ public enum GdkWindowWindowClass { /** * window for graphics and events */ INPUT_OUTPUT = 0, /** * window for events only */ INPUT_ONLY = 1, } alias GdkWindowWindowClass WindowWindowClass; /** * An opaque type representing a string as an index into a table * of strings on the X server. */ alias _GdkAtom* GdkAtom; public struct _GdkAtom; struct GdkAppLaunchContext; struct GdkColor { /** * For allocated colors, the pixel value used to * draw this color on the screen. Not used anymore. */ uint pixel; /** * The red component of the color. This is * a value between 0 and 65535, with 65535 indicating * full intensity */ ushort red; /** * The green component of the color */ ushort green; /** * The blue component of the color */ ushort blue; } struct GdkCursor; struct GdkDevice; struct GdkDeviceManager; struct GdkDevicePad; struct GdkDevicePadInterface; struct GdkDeviceTool; struct GdkDisplay; struct GdkDisplayManager; struct GdkDragContext; struct GdkDrawingContext; struct GdkDrawingContextClass; struct GdkEvent { union { /** * the #GdkEventType */ GdkEventType type; /** * a #GdkEventAny */ GdkEventAny any; /** * a #GdkEventExpose */ GdkEventExpose expose; /** * a #GdkEventVisibility */ GdkEventVisibility visibility; /** * a #GdkEventMotion */ GdkEventMotion motion; /** * a #GdkEventButton */ GdkEventButton button; /** * a #GdkEventTouch */ GdkEventTouch touch; /** * a #GdkEventScroll */ GdkEventScroll scroll; /** * a #GdkEventKey */ GdkEventKey key; /** * a #GdkEventCrossing */ GdkEventCrossing crossing; /** * a #GdkEventFocus */ GdkEventFocus focusChange; /** * a #GdkEventConfigure */ GdkEventConfigure configure; /** * a #GdkEventProperty */ GdkEventProperty property; /** * a #GdkEventSelection */ GdkEventSelection selection; /** * a #GdkEventOwnerChange */ GdkEventOwnerChange ownerChange; /** * a #GdkEventProximity */ GdkEventProximity proximity; /** * a #GdkEventDND */ GdkEventDND dnd; /** * a #GdkEventWindowState */ GdkEventWindowState windowState; /** * a #GdkEventSetting */ GdkEventSetting setting; /** * a #GdkEventGrabBroken */ GdkEventGrabBroken grabBroken; /** * a #GdkEventTouchpadSwipe */ GdkEventTouchpadSwipe touchpadSwipe; /** * a #GdkEventTouchpadPinch */ GdkEventTouchpadPinch touchpadPinch; /** * a #GdkEventPadButton */ GdkEventPadButton padButton; /** * a #GdkEventPadAxis */ GdkEventPadAxis padAxis; /** * a #GdkEventPadGroupMode */ GdkEventPadGroupMode padGroupMode; } } /** * Contains the fields which are common to all event structs. * Any event pointer can safely be cast to a pointer to a #GdkEventAny to * access these fields. */ struct GdkEventAny { /** * the type of the event. */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; } /** * Used for button press and button release events. The * @type field will be one of %GDK_BUTTON_PRESS, * %GDK_2BUTTON_PRESS, %GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE, * * Double and triple-clicks result in a sequence of events being received. * For double-clicks the order of events will be: * * - %GDK_BUTTON_PRESS * - %GDK_BUTTON_RELEASE * - %GDK_BUTTON_PRESS * - %GDK_2BUTTON_PRESS * - %GDK_BUTTON_RELEASE * * Note that the first click is received just like a normal * button press, while the second click results in a %GDK_2BUTTON_PRESS * being received just after the %GDK_BUTTON_PRESS. * * Triple-clicks are very similar to double-clicks, except that * %GDK_3BUTTON_PRESS is inserted after the third click. The order of the * events is: * * - %GDK_BUTTON_PRESS * - %GDK_BUTTON_RELEASE * - %GDK_BUTTON_PRESS * - %GDK_2BUTTON_PRESS * - %GDK_BUTTON_RELEASE * - %GDK_BUTTON_PRESS * - %GDK_3BUTTON_PRESS * - %GDK_BUTTON_RELEASE * * For a double click to occur, the second button press must occur within * 1/4 of a second of the first. For a triple click to occur, the third * button press must also occur within 1/2 second of the first button press. */ struct GdkEventButton { /** * the type of the event (%GDK_BUTTON_PRESS, %GDK_2BUTTON_PRESS, * %GDK_3BUTTON_PRESS or %GDK_BUTTON_RELEASE). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the time of the event in milliseconds. */ uint time; /** * the x coordinate of the pointer relative to the window. */ double x; /** * the y coordinate of the pointer relative to the window. */ double y; /** * @x, @y translated to the axes of @device, or %NULL if @device is * the mouse. */ double* axes; /** * a bit-mask representing the state of * the modifier keys (e.g. Control, Shift and Alt) and the pointer * buttons. See #GdkModifierType. */ ModifierType state; /** * the button which was pressed or released, numbered from 1 to 5. * Normally button 1 is the left mouse button, 2 is the middle button, * and 3 is the right button. On 2-button mice, the middle button can * often be simulated by pressing both mouse buttons together. */ uint button; /** * the master device that the event originated from. Use * gdk_event_get_source_device() to get the slave device. */ GdkDevice* device; /** * the x coordinate of the pointer relative to the root of the * screen. */ double xRoot; /** * the y coordinate of the pointer relative to the root of the * screen. */ double yRoot; } /** * Generated when a window size or position has changed. */ struct GdkEventConfigure { /** * the type of the event (%GDK_CONFIGURE). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the new x coordinate of the window, relative to its parent. */ int x; /** * the new y coordinate of the window, relative to its parent. */ int y; /** * the new width of the window. */ int width; /** * the new height of the window. */ int height; } /** * Generated when the pointer enters or leaves a window. */ struct GdkEventCrossing { /** * the type of the event (%GDK_ENTER_NOTIFY or %GDK_LEAVE_NOTIFY). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the window that was entered or left. */ GdkWindow* subwindow; /** * the time of the event in milliseconds. */ uint time; /** * the x coordinate of the pointer relative to the window. */ double x; /** * the y coordinate of the pointer relative to the window. */ double y; /** * the x coordinate of the pointer relative to the root of the screen. */ double xRoot; /** * the y coordinate of the pointer relative to the root of the screen. */ double yRoot; /** * the crossing mode (%GDK_CROSSING_NORMAL, %GDK_CROSSING_GRAB, * %GDK_CROSSING_UNGRAB, %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB or * %GDK_CROSSING_STATE_CHANGED). %GDK_CROSSING_GTK_GRAB, %GDK_CROSSING_GTK_UNGRAB, * and %GDK_CROSSING_STATE_CHANGED were added in 2.14 and are always synthesized, * never native. */ GdkCrossingMode mode; /** * the kind of crossing that happened (%GDK_NOTIFY_INFERIOR, * %GDK_NOTIFY_ANCESTOR, %GDK_NOTIFY_VIRTUAL, %GDK_NOTIFY_NONLINEAR or * %GDK_NOTIFY_NONLINEAR_VIRTUAL). */ GdkNotifyType detail; /** * %TRUE if @window is the focus window or an inferior. */ bool focus; /** * a bit-mask representing the state of * the modifier keys (e.g. Control, Shift and Alt) and the pointer * buttons. See #GdkModifierType. */ ModifierType state; } /** * Generated during DND operations. */ struct GdkEventDND { /** * the type of the event (%GDK_DRAG_ENTER, %GDK_DRAG_LEAVE, * %GDK_DRAG_MOTION, %GDK_DRAG_STATUS, %GDK_DROP_START or * %GDK_DROP_FINISHED). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the #GdkDragContext for the current DND operation. */ GdkDragContext* context; /** * the time of the event in milliseconds. */ uint time; /** * the x coordinate of the pointer relative to the root of the * screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START. */ short xRoot; /** * the y coordinate of the pointer relative to the root of the * screen, only set for %GDK_DRAG_MOTION and %GDK_DROP_START. */ short yRoot; } /** * Generated when all or part of a window becomes visible and needs to be * redrawn. */ struct GdkEventExpose { /** * the type of the event (%GDK_EXPOSE or %GDK_DAMAGE). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * bounding box of @region. */ GdkRectangle area; /** * the region that needs to be redrawn. */ cairo_region_t* region; /** * the number of contiguous %GDK_EXPOSE events following this one. * The only use for this is “exposure compression”, i.e. handling all * contiguous %GDK_EXPOSE events in one go, though GDK performs some * exposure compression so this is not normally needed. */ int count; } /** * Describes a change of keyboard focus. */ struct GdkEventFocus { /** * the type of the event (%GDK_FOCUS_CHANGE). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * %TRUE if the window has gained the keyboard focus, %FALSE if * it has lost the focus. */ short inn; } /** * Generated when a pointer or keyboard grab is broken. On X11, this happens * when the grab window becomes unviewable (i.e. it or one of its ancestors * is unmapped), or if the same application grabs the pointer or keyboard * again. Note that implicit grabs (which are initiated by button presses) * can also cause #GdkEventGrabBroken events. * * Since: 2.8 */ struct GdkEventGrabBroken { /** * the type of the event (%GDK_GRAB_BROKEN) */ GdkEventType type; /** * the window which received the event, i.e. the window * that previously owned the grab */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * %TRUE if a keyboard grab was broken, %FALSE if a pointer * grab was broken */ bool keyboard; /** * %TRUE if the broken grab was implicit */ bool implicit; /** * If this event is caused by another grab in the same * application, @grab_window contains the new grab window. Otherwise * @grab_window is %NULL. */ GdkWindow* grabWindow; } /** * Describes a key press or key release event. */ struct GdkEventKey { /** * the type of the event (%GDK_KEY_PRESS or %GDK_KEY_RELEASE). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the time of the event in milliseconds. */ uint time; /** * a bit-mask representing the state of * the modifier keys (e.g. Control, Shift and Alt) and the pointer * buttons. See #GdkModifierType. */ ModifierType state; /** * the key that was pressed or released. See the * `gdk/gdkkeysyms.h` header file for a * complete list of GDK key codes. */ uint keyval; /** * the length of @string. */ int length; /** * a string containing an approximation of the text that * would result from this keypress. The only correct way to handle text * input of text is using input methods (see #GtkIMContext), so this * field is deprecated and should never be used. * (gdk_unicode_to_keyval() provides a non-deprecated way of getting * an approximate translation for a key.) The string is encoded in the * encoding of the current locale (Note: this for backwards compatibility: * strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated. * In some cases, the translation of the key code will be a single * NUL byte, in which case looking at @length is necessary to distinguish * it from the an empty translation. */ char* str; /** * the raw code of the key that was pressed or released. */ ushort hardwareKeycode; /** * the keyboard group. */ ubyte group; import std.bitmanip: bitfields; mixin(bitfields!( uint, "isModifier", 1, uint, "", 31 )); } /** * Generated when the pointer moves. */ struct GdkEventMotion { /** * the type of the event. */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the time of the event in milliseconds. */ uint time; /** * the x coordinate of the pointer relative to the window. */ double x; /** * the y coordinate of the pointer relative to the window. */ double y; /** * @x, @y translated to the axes of @device, or %NULL if @device is * the mouse. */ double* axes; /** * a bit-mask representing the state of * the modifier keys (e.g. Control, Shift and Alt) and the pointer * buttons. See #GdkModifierType. */ ModifierType state; /** * set to 1 if this event is just a hint, see the * %GDK_POINTER_MOTION_HINT_MASK value of #GdkEventMask. */ short isHint; /** * the master device that the event originated from. Use * gdk_event_get_source_device() to get the slave device. */ GdkDevice* device; /** * the x coordinate of the pointer relative to the root of the * screen. */ double xRoot; /** * the y coordinate of the pointer relative to the root of the * screen. */ double yRoot; } /** * Generated when the owner of a selection changes. On X11, this * information is only available if the X server supports the XFIXES * extension. * * Since: 2.6 */ struct GdkEventOwnerChange { /** * the type of the event (%GDK_OWNER_CHANGE). */ GdkEventType type; /** * the window which received the event */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the new owner of the selection, or %NULL if there is none */ GdkWindow* owner; /** * the reason for the ownership change as a #GdkOwnerChange value */ GdkOwnerChange reason; /** * the atom identifying the selection */ GdkAtom selection; /** * the timestamp of the event */ uint time; /** * the time at which the selection ownership was taken * over */ uint selectionTime; } /** * Generated during %GDK_SOURCE_TABLET_PAD interaction with tactile sensors. * * Since: 3.22 */ struct GdkEventPadAxis { /** * the type of the event (%GDK_PAD_RING or %GDK_PAD_STRIP). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the time of the event in milliseconds. */ uint time; /** * the pad group the ring/strip belongs to. A %GDK_SOURCE_TABLET_PAD * device may have one or more groups containing a set of buttons/rings/strips * each. */ uint group; /** * number of strip/ring that was interacted. This number is 0-indexed. */ uint index; /** * The current mode of @group. Different groups in a %GDK_SOURCE_TABLET_PAD * device may have different current modes. */ uint mode; /** * The current value for the given axis. */ double value; } /** * Generated during %GDK_SOURCE_TABLET_PAD button presses and releases. * * Since: 3.22 */ struct GdkEventPadButton { /** * the type of the event (%GDK_PAD_BUTTON_PRESS or %GDK_PAD_BUTTON_RELEASE). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the time of the event in milliseconds. */ uint time; /** * the pad group the button belongs to. A %GDK_SOURCE_TABLET_PAD device * may have one or more groups containing a set of buttons/rings/strips each. */ uint group; /** * The pad button that was pressed. */ uint button; /** * The current mode of @group. Different groups in a %GDK_SOURCE_TABLET_PAD * device may have different current modes. */ uint mode; } /** * Generated during %GDK_SOURCE_TABLET_PAD mode switches in a group. * * Since: 3.22 */ struct GdkEventPadGroupMode { /** * the type of the event (%GDK_PAD_GROUP_MODE). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the time of the event in milliseconds. */ uint time; /** * the pad group that is switching mode. A %GDK_SOURCE_TABLET_PAD * device may have one or more groups containing a set of buttons/rings/strips * each. */ uint group; /** * The new mode of @group. Different groups in a %GDK_SOURCE_TABLET_PAD * device may have different current modes. */ uint mode; } /** * Describes a property change on a window. */ struct GdkEventProperty { /** * the type of the event (%GDK_PROPERTY_NOTIFY). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the property that was changed. */ GdkAtom atom; /** * the time of the event in milliseconds. */ uint time; /** * whether the property was changed * (%GDK_PROPERTY_NEW_VALUE) or deleted (%GDK_PROPERTY_DELETE). */ PropertyState state; } /** * Proximity events are generated when using GDK’s wrapper for the * XInput extension. The XInput extension is an add-on for standard X * that allows you to use nonstandard devices such as graphics tablets. * A proximity event indicates that the stylus has moved in or out of * contact with the tablet, or perhaps that the user’s finger has moved * in or out of contact with a touch screen. * * This event type will be used pretty rarely. It only is important for * XInput aware programs that are drawing their own cursor. */ struct GdkEventProximity { /** * the type of the event (%GDK_PROXIMITY_IN or %GDK_PROXIMITY_OUT). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the time of the event in milliseconds. */ uint time; /** * the master device that the event originated from. Use * gdk_event_get_source_device() to get the slave device. */ GdkDevice* device; } /** * Generated from button presses for the buttons 4 to 7. Wheel mice are * usually configured to generate button press events for buttons 4 and 5 * when the wheel is turned. * * Some GDK backends can also generate “smooth” scroll events, which * can be recognized by the %GDK_SCROLL_SMOOTH scroll direction. For * these, the scroll deltas can be obtained with * gdk_event_get_scroll_deltas(). */ struct GdkEventScroll { /** * the type of the event (%GDK_SCROLL). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the time of the event in milliseconds. */ uint time; /** * the x coordinate of the pointer relative to the window. */ double x; /** * the y coordinate of the pointer relative to the window. */ double y; /** * a bit-mask representing the state of * the modifier keys (e.g. Control, Shift and Alt) and the pointer * buttons. See #GdkModifierType. */ ModifierType state; /** * the direction to scroll to (one of %GDK_SCROLL_UP, * %GDK_SCROLL_DOWN, %GDK_SCROLL_LEFT, %GDK_SCROLL_RIGHT or * %GDK_SCROLL_SMOOTH). */ GdkScrollDirection direction; /** * the master device that the event originated from. Use * gdk_event_get_source_device() to get the slave device. */ GdkDevice* device; /** * the x coordinate of the pointer relative to the root of the * screen. */ double xRoot; /** * the y coordinate of the pointer relative to the root of the * screen. */ double yRoot; /** * the x coordinate of the scroll delta */ double deltaX; /** * the y coordinate of the scroll delta */ double deltaY; import std.bitmanip: bitfields; mixin(bitfields!( uint, "isStop", 1, uint, "", 31 )); } /** * Generated when a selection is requested or ownership of a selection * is taken over by another client application. */ struct GdkEventSelection { /** * the type of the event (%GDK_SELECTION_CLEAR, * %GDK_SELECTION_NOTIFY or %GDK_SELECTION_REQUEST). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the selection. */ GdkAtom selection; /** * the target to which the selection should be converted. */ GdkAtom target; /** * the property in which to place the result of the conversion. */ GdkAtom property; /** * the time of the event in milliseconds. */ uint time; /** * the window on which to place @property or %NULL if none. */ GdkWindow* requestor; } struct GdkEventSequence; /** * Generated when a setting is modified. */ struct GdkEventSetting { /** * the type of the event (%GDK_SETTING). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * what happened to the setting (%GDK_SETTING_ACTION_NEW, * %GDK_SETTING_ACTION_CHANGED or %GDK_SETTING_ACTION_DELETED). */ GdkSettingAction action; /** * the name of the setting. */ char* name; } /** * Used for touch events. * @type field will be one of %GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE, * %GDK_TOUCH_END or %GDK_TOUCH_CANCEL. * * Touch events are grouped into sequences by means of the @sequence * field, which can also be obtained with gdk_event_get_event_sequence(). * Each sequence begins with a %GDK_TOUCH_BEGIN event, followed by * any number of %GDK_TOUCH_UPDATE events, and ends with a %GDK_TOUCH_END * (or %GDK_TOUCH_CANCEL) event. With multitouch devices, there may be * several active sequences at the same time. */ struct GdkEventTouch { /** * the type of the event (%GDK_TOUCH_BEGIN, %GDK_TOUCH_UPDATE, * %GDK_TOUCH_END, %GDK_TOUCH_CANCEL) */ GdkEventType type; /** * the window which received the event */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the time of the event in milliseconds. */ uint time; /** * the x coordinate of the pointer relative to the window */ double x; /** * the y coordinate of the pointer relative to the window */ double y; /** * @x, @y translated to the axes of @device, or %NULL if @device is * the mouse */ double* axes; /** * a bit-mask representing the state of * the modifier keys (e.g. Control, Shift and Alt) and the pointer * buttons. See #GdkModifierType */ ModifierType state; /** * the event sequence that the event belongs to */ GdkEventSequence* sequence; /** * whether the event should be used for emulating * pointer event */ bool emulatingPointer; /** * the master device that the event originated from. Use * gdk_event_get_source_device() to get the slave device. */ GdkDevice* device; /** * the x coordinate of the pointer relative to the root of the * screen */ double xRoot; /** * the y coordinate of the pointer relative to the root of the * screen */ double yRoot; } /** * Generated during touchpad swipe gestures. */ struct GdkEventTouchpadPinch { /** * the type of the event (%GDK_TOUCHPAD_PINCH) */ GdkEventType type; /** * the window which received the event */ GdkWindow* window; /** * %TRUE if the event was sent explicitly */ byte sendEvent; /** * the current phase of the gesture */ TouchpadGesturePhase phase; /** * The number of fingers triggering the pinch */ byte nFingers; /** * the time of the event in milliseconds */ uint time; /** * The X coordinate of the pointer */ double x; /** * The Y coordinate of the pointer */ double y; /** * Movement delta in the X axis of the swipe focal point */ double dx; /** * Movement delta in the Y axis of the swipe focal point */ double dy; /** * The angle change in radians, negative angles * denote counter-clockwise movements */ double angleDelta; /** * The current scale, relative to that at the time of * the corresponding %GDK_TOUCHPAD_GESTURE_PHASE_BEGIN event */ double scale; /** * The X coordinate of the pointer, relative to the * root of the screen. */ double xRoot; /** * The Y coordinate of the pointer, relative to the * root of the screen. */ double yRoot; /** * a bit-mask representing the state of * the modifier keys (e.g. Control, Shift and Alt) and the pointer * buttons. See #GdkModifierType. */ ModifierType state; } /** * Generated during touchpad swipe gestures. */ struct GdkEventTouchpadSwipe { /** * the type of the event (%GDK_TOUCHPAD_SWIPE) */ GdkEventType type; /** * the window which received the event */ GdkWindow* window; /** * %TRUE if the event was sent explicitly */ byte sendEvent; /** * the current phase of the gesture */ TouchpadGesturePhase phase; /** * The number of fingers triggering the swipe */ byte nFingers; /** * the time of the event in milliseconds */ uint time; /** * The X coordinate of the pointer */ double x; /** * The Y coordinate of the pointer */ double y; /** * Movement delta in the X axis of the swipe focal point */ double dx; /** * Movement delta in the Y axis of the swipe focal point */ double dy; /** * The X coordinate of the pointer, relative to the * root of the screen. */ double xRoot; /** * The Y coordinate of the pointer, relative to the * root of the screen. */ double yRoot; /** * a bit-mask representing the state of * the modifier keys (e.g. Control, Shift and Alt) and the pointer * buttons. See #GdkModifierType. */ ModifierType state; } /** * Generated when the window visibility status has changed. * * Deprecated: Modern composited windowing systems with pervasive * transparency make it impossible to track the visibility of a window * reliably, so this event can not be guaranteed to provide useful * information. */ struct GdkEventVisibility { /** * the type of the event (%GDK_VISIBILITY_NOTIFY). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * the new visibility state (%GDK_VISIBILITY_FULLY_OBSCURED, * %GDK_VISIBILITY_PARTIAL or %GDK_VISIBILITY_UNOBSCURED). */ GdkVisibilityState state; } /** * Generated when the state of a toplevel window changes. */ struct GdkEventWindowState { /** * the type of the event (%GDK_WINDOW_STATE). */ GdkEventType type; /** * the window which received the event. */ GdkWindow* window; /** * %TRUE if the event was sent explicitly. */ byte sendEvent; /** * mask specifying what flags have changed. */ GdkWindowState changedMask; /** * the new window state, a combination of * #GdkWindowState bits. */ GdkWindowState newWindowState; } struct GdkFrameClock; struct GdkFrameClockClass; struct GdkFrameClockPrivate; struct GdkFrameTimings; struct GdkGLContext; /** * The #GdkGeometry struct gives the window manager information about * a window’s geometry constraints. Normally you would set these on * the GTK+ level using gtk_window_set_geometry_hints(). #GtkWindow * then sets the hints on the #GdkWindow it creates. * * gdk_window_set_geometry_hints() expects the hints to be fully valid already * and simply passes them to the window manager; in contrast, * gtk_window_set_geometry_hints() performs some interpretation. For example, * #GtkWindow will apply the hints to the geometry widget instead of the * toplevel window, if you set a geometry widget. Also, the * @min_width/@min_height/@max_width/@max_height fields may be set to -1, and * #GtkWindow will substitute the size request of the window or geometry widget. * If the minimum size hint is not provided, #GtkWindow will use its requisition * as the minimum size. If the minimum size is provided and a geometry widget is * set, #GtkWindow will take the minimum size as the minimum size of the * geometry widget rather than the entire window. The base size is treated * similarly. * * The canonical use-case for gtk_window_set_geometry_hints() is to get a * terminal widget to resize properly. Here, the terminal text area should be * the geometry widget; #GtkWindow will then automatically set the base size to * the size of other widgets in the terminal window, such as the menubar and * scrollbar. Then, the @width_inc and @height_inc fields should be set to the * size of one character in the terminal. Finally, the base size should be set * to the size of one character. The net effect is that the minimum size of the * terminal will have a 1x1 character terminal area, and only terminal sizes on * the “character grid” will be allowed. * * Here’s an example of how the terminal example would be implemented, assuming * a terminal area widget called “terminal” and a toplevel window “toplevel”: * * |[ * GdkGeometry hints; * * hints.base_width = terminal->char_width; * hints.base_height = terminal->char_height; * hints.min_width = terminal->char_width; * hints.min_height = terminal->char_height; * hints.width_inc = terminal->char_width; * hints.height_inc = terminal->char_height; * * gtk_window_set_geometry_hints (GTK_WINDOW (toplevel), * GTK_WIDGET (terminal), * &hints, * GDK_HINT_RESIZE_INC | * GDK_HINT_MIN_SIZE | * GDK_HINT_BASE_SIZE); * ]| * * The other useful fields are the @min_aspect and @max_aspect fields; these * contain a width/height ratio as a floating point number. If a geometry widget * is set, the aspect applies to the geometry widget rather than the entire * window. The most common use of these hints is probably to set @min_aspect and * @max_aspect to the same value, thus forcing the window to keep a constant * aspect ratio. */ struct GdkGeometry { /** * minimum width of window (or -1 to use requisition, with * #GtkWindow only) */ int minWidth; /** * minimum height of window (or -1 to use requisition, with * #GtkWindow only) */ int minHeight; /** * maximum width of window (or -1 to use requisition, with * #GtkWindow only) */ int maxWidth; /** * maximum height of window (or -1 to use requisition, with * #GtkWindow only) */ int maxHeight; /** * allowed window widths are @base_width + @width_inc * N where N * is any integer (-1 allowed with #GtkWindow) */ int baseWidth; /** * allowed window widths are @base_height + @height_inc * N where * N is any integer (-1 allowed with #GtkWindow) */ int baseHeight; /** * width resize increment */ int widthInc; /** * height resize increment */ int heightInc; /** * minimum width/height ratio */ double minAspect; /** * maximum width/height ratio */ double maxAspect; /** * window gravity, see gtk_window_set_gravity() */ GdkGravity winGravity; } struct GdkKeymap; /** * A #GdkKeymapKey is a hardware key that can be mapped to a keyval. */ struct GdkKeymapKey { /** * the hardware keycode. This is an identifying number for a * physical key. */ uint keycode; /** * indicates movement in a horizontal direction. Usually groups are used * for two different languages. In group 0, a key might have two English * characters, and in group 1 it might have two Hebrew characters. The Hebrew * characters will be printed on the key next to the English characters. */ int group; /** * indicates which symbol on the key will be used, in a vertical direction. * So on a standard US keyboard, the key with the number “1” on it also has the * exclamation point ("!") character on it. The level indicates whether to use * the “1” or the “!” symbol. The letter keys are considered to have a lowercase * letter at level 0, and an uppercase letter at level 1, though only the * uppercase letter is printed. */ int level; } struct GdkMonitor; struct GdkMonitorClass; /** * Defines the x and y coordinates of a point. */ struct GdkPoint { /** * the x coordinate of the point. */ int x; /** * the y coordinate of the point. */ int y; } struct GdkRGBA { /** * The intensity of the red channel from 0.0 to 1.0 inclusive */ double red; /** * The intensity of the green channel from 0.0 to 1.0 inclusive */ double green; /** * The intensity of the blue channel from 0.0 to 1.0 inclusive */ double blue; /** * The opacity of the color from 0.0 for completely translucent to * 1.0 for opaque */ double alpha; } /** * Defines the position and size of a rectangle. It is identical to * #cairo_rectangle_int_t. */ struct GdkRectangle { int x; int y; int width; int height; } struct GdkScreen; struct GdkSeat { GObject parentInstance; } /** * A #GdkTimeCoord stores a single event in a motion history. */ struct GdkTimeCoord { /** * The timestamp for this event. */ uint time; /** * the values of the device’s axes. */ double[128] axes; } struct GdkVisual; struct GdkWindow; /** * Attributes to use for a newly-created window. */ struct GdkWindowAttr { /** * title of the window (for toplevel windows) */ char* title; /** * event mask (see gdk_window_set_events()) */ int eventMask; /** * X coordinate relative to parent window (see gdk_window_move()) */ int x; /** * Y coordinate relative to parent window (see gdk_window_move()) */ int y; /** * width of window */ int width; /** * height of window */ int height; /** * #GDK_INPUT_OUTPUT (normal window) or #GDK_INPUT_ONLY (invisible * window that receives events) */ GdkWindowWindowClass wclass; /** * #GdkVisual for window */ GdkVisual* visual; /** * type of window */ GdkWindowType windowType; /** * cursor for the window (see gdk_window_set_cursor()) */ GdkCursor* cursor; /** * don’t use (see gtk_window_set_wmclass()) */ char* wmclassName; /** * don’t use (see gtk_window_set_wmclass()) */ char* wmclassClass; /** * %TRUE to bypass the window manager */ bool overrideRedirect; /** * a hint of the function of the window */ GdkWindowTypeHint typeHint; } struct GdkWindowClass { GObjectClass parentClass; /** */ extern(C) GdkWindow* function(GdkWindow* window, double x, double y) pickEmbeddedChild; /** */ extern(C) void function(GdkWindow* window, double offscreenX, double offscreenY, double* embedderX, double* embedderY) toEmbedder; /** */ extern(C) void function(GdkWindow* window, double embedderX, double embedderY, double* offscreenX, double* offscreenY) fromEmbedder; /** */ extern(C) cairo_surface_t* function(GdkWindow* window, int width, int height) createSurface; /** */ extern(C) void function() GdkReserved1; /** */ extern(C) void function() GdkReserved2; /** */ extern(C) void function() GdkReserved3; /** */ extern(C) void function() GdkReserved4; /** */ extern(C) void function() GdkReserved5; /** */ extern(C) void function() GdkReserved6; /** */ extern(C) void function() GdkReserved7; /** */ extern(C) void function() GdkReserved8; } struct GdkWindowRedirect; struct GdkX11Window; struct GdkX11WindowClass; /** * Specifies the type of function passed to gdk_event_handler_set() to * handle all GDK events. * * Params: * event = the #GdkEvent to process. * data = user data set when the event handler was installed with * gdk_event_handler_set(). */ public alias extern(C) void function(GdkEvent* event, void* data) GdkEventFunc; /** * Specifies the type of function used to filter native events before they are * converted to GDK events. * * When a filter is called, @event is unpopulated, except for * `event->window`. The filter may translate the native * event to a GDK event and store the result in @event, or handle it without * translation. If the filter translates the event and processing should * continue, it should return %GDK_FILTER_TRANSLATE. * * Params: * xevent = the native event to filter. * event = the GDK event to which the X event will be translated. * data = user data set when the filter was installed. * * Returns: a #GdkFilterReturn value. */ public alias extern(C) GdkFilterReturn function(GdkXEvent* xevent, GdkEvent* event, void* data) GdkFilterFunc; /** * Type of the callback used to set up @window so it can be * grabbed. A typical action would be ensuring the window is * visible, although there's room for other initialization * actions. * * Params: * seat = the #GdkSeat being grabbed * window = the #GdkWindow being grabbed * userData = user data passed in gdk_seat_grab() * * Since: 3.20 */ public alias extern(C) void function(GdkSeat* seat, GdkWindow* window, void* userData) GdkSeatGrabPrepareFunc; /** * A function of this type is passed to gdk_window_invalidate_maybe_recurse(). * It gets called for each child of the window to determine whether to * recursively invalidate it or now. * * Params: * window = a #GdkWindow * userData = user data * * Returns: %TRUE to invalidate @window recursively */ public alias extern(C) int function(GdkWindow* window, void* userData) GdkWindowChildFunc; /** * Whenever some area of the window is invalidated (directly in the * window or in a child window) this gets called with @region in * the coordinate space of @window. You can use @region to just * keep track of the dirty region, or you can actually change * @region in case you are doing display tricks like showing * a child in multiple places. * * Params: * window = a #GdkWindow * region = a #cairo_region_t * * Since: 3.10 */ public alias extern(C) void function(GdkWindow* window, cairo_region_t* region) GdkWindowInvalidateHandlerFunc; /** * The middle button. */ enum BUTTON_MIDDLE = 2; alias GDK_BUTTON_MIDDLE = BUTTON_MIDDLE; /** * The primary button. This is typically the left mouse button, or the * right button in a left-handed setup. */ enum BUTTON_PRIMARY = 1; alias GDK_BUTTON_PRIMARY = BUTTON_PRIMARY; /** * The secondary button. This is typically the right mouse button, or the * left button in a left-handed setup. */ enum BUTTON_SECONDARY = 3; alias GDK_BUTTON_SECONDARY = BUTTON_SECONDARY; /** * Represents the current time, and can be used anywhere a time is expected. */ enum CURRENT_TIME = 0; alias GDK_CURRENT_TIME = CURRENT_TIME; /** * Use this macro as the return value for continuing the propagation of * an event handler. */ enum EVENT_PROPAGATE = false; alias GDK_EVENT_PROPAGATE = EVENT_PROPAGATE; /** * Use this macro as the return value for stopping the propagation of * an event handler. */ enum EVENT_STOP = true; alias GDK_EVENT_STOP = EVENT_STOP; enum MAX_TIMECOORD_AXES = 128; alias GDK_MAX_TIMECOORD_AXES = MAX_TIMECOORD_AXES; /** * A special value, indicating that the background * for a window should be inherited from the parent window. */ enum PARENT_RELATIVE = 1; alias GDK_PARENT_RELATIVE = PARENT_RELATIVE; /** * This is the priority that the idle handler processing window updates * is given in the * [GLib Main Loop][glib-The-Main-Event-Loop]. */ enum PRIORITY_REDRAW = 20; alias GDK_PRIORITY_REDRAW = PRIORITY_REDRAW; GtkD-3.7.5/generated/gtkd/gdkpixbuf/000077500000000000000000000000001324604450400172335ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gdkpixbuf/Pixbuf.d000066400000000000000000001560331324604450400206450ustar00rootroot00000000000000/* * 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 gdkpixbuf.Pixbuf; private import gdkpixbuf.PixbufFormat; private import gdkpixbuf.Pixdata; private import gdkpixbuf.c.functions; public import gdkpixbuf.c.types; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.IconIF; private import gio.IconT; private import gio.InputStream; private import gio.LoadableIconIF; private import gio.LoadableIconT; private import gio.OutputStream; private import glib.Bytes; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.HashTable; private import glib.ListSG; private import glib.Str; private import gobject.ObjectG; public import gtkc.gdkpixbuftypes; /** * This is the main structure in the gdk-pixbuf library. It is * used to represent images. It contains information about the * image's pixel data, its color space, bits per sample, width and * height, and the rowstride (the number of bytes between the start of * one row and the start of the next). */ public class Pixbuf : ObjectG, IconIF, LoadableIconIF { /** the main Gtk struct */ protected GdkPixbuf* gdkPixbuf; /** Get the main Gtk struct */ public GdkPixbuf* getPixbufStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkPixbuf; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkPixbuf; } protected override void setStruct(GObject* obj) { gdkPixbuf = cast(GdkPixbuf*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkPixbuf* gdkPixbuf, bool ownedRef = false) { this.gdkPixbuf = gdkPixbuf; super(cast(GObject*)gdkPixbuf, ownedRef); } // add the Icon capabilities mixin IconT!(GdkPixbuf); // add the LoadableIcon capabilities mixin LoadableIconT!(GdkPixbuf); /** * Saves pixbuf to a new buffer in format @type, which is currently "jpeg", * "tiff", "png", "ico" or "bmp". See gdk_pixbuf_save_to_buffer() * for more details. * * Params: * buffer = location to receive a pointer to the new buffer. * bufferSize = location to receive the size of the new buffer. * type = name of file format. * optionKeys = name of options to set, %NULL-terminated * optionValues = values for named options * * Return: whether an error was set * * Since: 2.4 * * Throws: GException on failure. */ public bool saveToBuffer(out ubyte[] buffer, string type, string[] optionKeys, string[] optionValues) { char* outbuffer = null; size_t bufferSize; GError* err = null; auto p = gdk_pixbuf_save_to_bufferv(gdkPixbuf, &outbuffer, &bufferSize, Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } buffer = (cast(ubyte*)outbuffer)[0 .. bufferSize]; return p; } /** * Creates a new pixbuf by loading an image from an resource. * * The file format is detected automatically. * * Params: * resourcePath = the path of the resource file * * Return: A newly-created pixbuf, or null if any of several error * conditions occurred: the file could not be opened, the image format is * not supported, there was not enough memory to allocate the image buffer, * the stream contained invalid data, or the operation was cancelled. * * Since: 2.26 * * Throws: GException on failure. */ public static Pixbuf newFromResource(string resourcePath) { GError* err = null; auto p = gdk_pixbuf_new_from_resource(Str.toStringz(resourcePath), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return new Pixbuf(cast(GdkPixbuf*) p, true); } /** * Creates a new pixbuf by loading an image from an resource. * * The file format is detected automatically. * * The image will be scaled to fit in the requested size, optionally * preserving the image's aspect ratio. When preserving the aspect ratio, * a width of -1 will cause the image to be scaled to the exact given * height, and a height of -1 will cause the image to be scaled to the * exact given width. When not preserving aspect ratio, a width or * height of -1 means to not scale the image at all in that dimension. * * The stream is not closed. * * Params: * resourcePath = the path of the resource file * width = The width the image should have or -1 to not constrain the width * height = The height the image should have or -1 to not constrain the height * preserveAspectRatio = true to preserve the image's aspect ratio * * Return: A newly-created pixbuf, or null if any of several error * conditions occurred: the file could not be opened, the image format is * not supported, there was not enough memory to allocate the image buffer, * the stream contained invalid data, or the operation was cancelled. * * Since: 2.26 * * Throws: GException on failure. */ public static Pixbuf newFromResource(string resourcePath, int width, int height, bool preserveAspectRatio) { GError* err = null; auto p = gdk_pixbuf_new_from_resource_at_scale(Str.toStringz(resourcePath), width, height, preserveAspectRatio, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return new Pixbuf(cast(GdkPixbuf*) p, true); } /** * Queries a pointer to the pixel data of a pixbuf. * * Return: A pointer to the pixbuf's pixel data. * Please see the section on [image data](image-data) for information * about how the pixel data is stored in memory. * * This function will cause an implicit copy of the pixbuf data if the * pixbuf was created from read-only data. */ public char* getPixels() { return gdk_pixbuf_get_pixels(gdkPixbuf); } /** */ /** */ public static GType getType() { return gdk_pixbuf_get_type(); } /** * Creates a new #GdkPixbuf structure and allocates a buffer for it. The * buffer has an optimal rowstride. Note that the buffer is not cleared; * you will have to fill it completely yourself. * * Params: * colorspace = Color space for image * hasAlpha = Whether the image should have transparency information * bitsPerSample = Number of bits per color sample * width = Width of image in pixels, must be > 0 * height = Height of image in pixels, must be > 0 * * Returns: A newly-created #GdkPixbuf with a reference count of 1, or * %NULL if not enough memory could be allocated for the image buffer. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height) { auto p = gdk_pixbuf_new(colorspace, hasAlpha, bitsPerSample, width, height); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GdkPixbuf*) p, true); } /** * Creates a new #GdkPixbuf out of in-memory readonly image data. * Currently only RGB images with 8 bits per sample are supported. * This is the #GBytes variant of gdk_pixbuf_new_from_data(). * * Params: * data = Image data in 8-bit/sample packed format inside a #GBytes * colorspace = Colorspace for the image data * hasAlpha = Whether the data has an opacity channel * bitsPerSample = Number of bits per sample * width = Width of the image in pixels, must be > 0 * height = Height of the image in pixels, must be > 0 * rowstride = Distance in bytes between row starts * * Returns: A newly-created #GdkPixbuf structure with a reference count of 1. * * Since: 2.32 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Bytes data, GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height, int rowstride) { auto p = gdk_pixbuf_new_from_bytes((data is null) ? null : data.getBytesStruct(), colorspace, hasAlpha, bitsPerSample, width, height, rowstride); if(p is null) { throw new ConstructionException("null returned by new_from_bytes"); } this(cast(GdkPixbuf*) p, true); } /** * Creates a new #GdkPixbuf out of in-memory image data. Currently only RGB * images with 8 bits per sample are supported. * * Since you are providing a pre-allocated pixel buffer, you must also * specify a way to free that data. This is done with a function of * type #GdkPixbufDestroyNotify. When a pixbuf created with is * finalized, your destroy notification function will be called, and * it is its responsibility to free the pixel array. * * See also gdk_pixbuf_new_from_bytes(). * * Params: * data = Image data in 8-bit/sample packed format * colorspace = Colorspace for the image data * hasAlpha = Whether the data has an opacity channel * bitsPerSample = Number of bits per sample * width = Width of the image in pixels, must be > 0 * height = Height of the image in pixels, must be > 0 * rowstride = Distance in bytes between row starts * destroyFn = Function used to free the data when the pixbuf's reference count * drops to zero, or %NULL if the data should not be freed * destroyFnData = Closure data to pass to the destroy notification function * * Returns: A newly-created #GdkPixbuf structure with a reference count of 1. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(char[] data, GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height, int rowstride, GdkPixbufDestroyNotify destroyFn, void* destroyFnData) { auto p = gdk_pixbuf_new_from_data(data.ptr, colorspace, hasAlpha, bitsPerSample, width, height, rowstride, destroyFn, destroyFnData); if(p is null) { throw new ConstructionException("null returned by new_from_data"); } this(cast(GdkPixbuf*) p, true); } /** * Creates a new pixbuf by loading an image from a file. The file format is * detected automatically. If %NULL is returned, then @error will be set. * Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains. * * Params: * filename = Name of file to load, in the GLib file name encoding * * Returns: A newly-created pixbuf with a reference count of 1, or %NULL if * any of several error conditions occurred: the file could not be opened, * there was no loader for the file's format, there was not enough memory to * allocate the image buffer, or the image file contained invalid data. * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string filename) { GError* err = null; auto p = gdk_pixbuf_new_from_file(Str.toStringz(filename), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_file"); } this(cast(GdkPixbuf*) p, true); } /** * Creates a new pixbuf by loading an image from a file. The file format is * detected automatically. If %NULL is returned, then @error will be set. * Possible errors are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains. * The image will be scaled to fit in the requested size, optionally preserving * the image's aspect ratio. * * When preserving the aspect ratio, a @width of -1 will cause the image * to be scaled to the exact given height, and a @height of -1 will cause * the image to be scaled to the exact given width. When not preserving * aspect ratio, a @width or @height of -1 means to not scale the image * at all in that dimension. Negative values for @width and @height are * allowed since 2.8. * * Params: * filename = Name of file to load, in the GLib file name encoding * width = The width the image should have or -1 to not constrain the width * height = The height the image should have or -1 to not constrain the height * preserveAspectRatio = %TRUE to preserve the image's aspect ratio * * Returns: A newly-created pixbuf with a reference count of 1, or %NULL * if any of several error conditions occurred: the file could not be opened, * there was no loader for the file's format, there was not enough memory to * allocate the image buffer, or the image file contained invalid data. * * Since: 2.6 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string filename, int width, int height, bool preserveAspectRatio) { GError* err = null; auto p = gdk_pixbuf_new_from_file_at_scale(Str.toStringz(filename), width, height, preserveAspectRatio, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_file_at_scale"); } this(cast(GdkPixbuf*) p, true); } /** * Creates a new pixbuf by loading an image from a file. * The file format is detected automatically. If %NULL is returned, then * @error will be set. Possible errors are in the #GDK_PIXBUF_ERROR and * #G_FILE_ERROR domains. * * The image will be scaled to fit in the requested size, preserving * the image's aspect ratio. Note that the returned pixbuf may be smaller * than @width x @height, if the aspect ratio requires it. To load * and image at the requested size, regardless of aspect ratio, use * gdk_pixbuf_new_from_file_at_scale(). * * Params: * filename = Name of file to load, in the GLib file name encoding * width = The width the image should have or -1 to not constrain the width * height = The height the image should have or -1 to not constrain the height * * Returns: A newly-created pixbuf with a reference count of 1, or * %NULL if any of several error conditions occurred: the file could not * be opened, there was no loader for the file's format, there was not * enough memory to allocate the image buffer, or the image file contained * invalid data. * * Since: 2.4 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string filename, int width, int height) { GError* err = null; auto p = gdk_pixbuf_new_from_file_at_size(Str.toStringz(filename), width, height, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_file_at_size"); } this(cast(GdkPixbuf*) p, true); } /** * Create a #GdkPixbuf from a flat representation that is suitable for * storing as inline data in a program. This is useful if you want to * ship a program with images, but don't want to depend on any * external files. * * gdk-pixbuf ships with a program called [gdk-pixbuf-csource][gdk-pixbuf-csource], * which allows for conversion of #GdkPixbufs into such a inline representation. * In almost all cases, you should pass the `--raw` option to * `gdk-pixbuf-csource`. A sample invocation would be: * * |[ * gdk-pixbuf-csource --raw --name=myimage_inline myimage.png * ]| * * For the typical case where the inline pixbuf is read-only static data, * you don't need to copy the pixel data unless you intend to write to * it, so you can pass %FALSE for @copy_pixels. (If you pass `--rle` to * `gdk-pixbuf-csource`, a copy will be made even if @copy_pixels is %FALSE, * so using this option is generally a bad idea.) * * If you create a pixbuf from const inline data compiled into your * program, it's probably safe to ignore errors and disable length checks, * since things will always succeed: * |[ * pixbuf = gdk_pixbuf_new_from_inline (-1, myimage_inline, FALSE, NULL); * ]| * * For non-const inline data, you could get out of memory. For untrusted * inline data located at runtime, you could have corrupt inline data in * addition. * * Deprecated: Use #GResource instead. * * Params: * data = Byte data containing a * serialized #GdkPixdata structure * copyPixels = Whether to copy the pixel data, or use direct pointers * @data for the resulting pixbuf * * Returns: A newly-created #GdkPixbuf structure with a reference, * count of 1, or %NULL if an error occurred. * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] data, bool copyPixels) { GError* err = null; auto p = gdk_pixbuf_new_from_inline(cast(int)data.length, data.ptr, copyPixels, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_inline"); } this(cast(GdkPixbuf*) p, true); } /** * Creates a new pixbuf by loading an image from an input stream. * * The file format is detected automatically. If %NULL is returned, then * @error will be set. The @cancellable can be used to abort the operation * from another thread. If the operation was cancelled, the error * %G_IO_ERROR_CANCELLED will be returned. Other possible errors are in * the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains. * * The stream is not closed. * * Params: * stream = a #GInputStream to load the pixbuf from * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: A newly-created pixbuf, or %NULL if any of several error * conditions occurred: the file could not be opened, the image format is * not supported, there was not enough memory to allocate the image buffer, * the stream contained invalid data, or the operation was cancelled. * * Since: 2.14 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(InputStream stream, Cancellable cancellable) { GError* err = null; auto p = gdk_pixbuf_new_from_stream((stream is null) ? null : stream.getInputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_stream"); } this(cast(GdkPixbuf*) p, true); } /** * Creates a new pixbuf by loading an image from an input stream. * * The file format is detected automatically. If %NULL is returned, then * @error will be set. The @cancellable can be used to abort the operation * from another thread. If the operation was cancelled, the error * %G_IO_ERROR_CANCELLED will be returned. Other possible errors are in * the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains. * * The image will be scaled to fit in the requested size, optionally * preserving the image's aspect ratio. * * When preserving the aspect ratio, a @width of -1 will cause the image to be * scaled to the exact given height, and a @height of -1 will cause the image * to be scaled to the exact given width. If both @width and @height are * given, this function will behave as if the smaller of the two values * is passed as -1. * * When not preserving aspect ratio, a @width or @height of -1 means to not * scale the image at all in that dimension. * * The stream is not closed. * * Params: * stream = a #GInputStream to load the pixbuf from * width = The width the image should have or -1 to not constrain the width * height = The height the image should have or -1 to not constrain the height * preserveAspectRatio = %TRUE to preserve the image's aspect ratio * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: A newly-created pixbuf, or %NULL if any of several error * conditions occurred: the file could not be opened, the image format is * not supported, there was not enough memory to allocate the image buffer, * the stream contained invalid data, or the operation was cancelled. * * Since: 2.14 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(InputStream stream, int width, int height, bool preserveAspectRatio, Cancellable cancellable) { GError* err = null; auto p = gdk_pixbuf_new_from_stream_at_scale((stream is null) ? null : stream.getInputStreamStruct(), width, height, preserveAspectRatio, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_stream_at_scale"); } this(cast(GdkPixbuf*) p, true); } /** * Finishes an asynchronous pixbuf creation operation started with * gdk_pixbuf_new_from_stream_async(). * * Params: * asyncResult = a #GAsyncResult * * Returns: a #GdkPixbuf or %NULL on error. Free the returned * object with g_object_unref(). * * Since: 2.24 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(AsyncResultIF asyncResult) { GError* err = null; auto p = gdk_pixbuf_new_from_stream_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_stream_finish"); } this(cast(GdkPixbuf*) p, true); } /** * Creates a new pixbuf by parsing XPM data in memory. This data is commonly * the result of including an XPM file into a program's C source. * * Params: * data = Pointer to inline XPM data. * * Returns: A newly-created pixbuf with a reference count of 1. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string[] data) { auto p = gdk_pixbuf_new_from_xpm_data(Str.toStringzArray(data)); if(p is null) { throw new ConstructionException("null returned by new_from_xpm_data"); } this(cast(GdkPixbuf*) p, true); } /** * Calculates the rowstride that an image created with those values would * have. This is useful for front-ends and backends that want to sanity * check image values without needing to create them. * * Params: * colorspace = Color space for image * hasAlpha = Whether the image should have transparency information * bitsPerSample = Number of bits per color sample * width = Width of image in pixels, must be > 0 * height = Height of image in pixels, must be > 0 * * Returns: the rowstride for the given values, or -1 in case of error. * * Since: 2.36.8 */ public static int calculateRowstride(GdkColorspace colorspace, bool hasAlpha, int bitsPerSample, int width, int height) { return gdk_pixbuf_calculate_rowstride(colorspace, hasAlpha, bitsPerSample, width, height); } /** * Converts a #GdkPixdata to a #GdkPixbuf. If @copy_pixels is %TRUE or * if the pixel data is run-length-encoded, the pixel data is copied into * newly-allocated memory; otherwise it is reused. * * Deprecated: Use #GResource instead. * * Params: * pixdata = a #GdkPixdata to convert into a #GdkPixbuf. * copyPixels = whether to copy raw pixel data; run-length encoded * pixel data is always copied. * * Returns: a new #GdkPixbuf. * * Throws: GException on failure. */ public static Pixbuf fromPixdata(Pixdata pixdata, bool copyPixels) { GError* err = null; auto p = gdk_pixbuf_from_pixdata((pixdata is null) ? null : pixdata.getPixdataStruct(), copyPixels, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Parses an image file far enough to determine its format and size. * * Params: * filename = The name of the file to identify. * width = Return location for the width of the * image, or %NULL * height = Return location for the height of the * image, or %NULL * * Returns: A #GdkPixbufFormat describing * the image format of the file or %NULL if the image format wasn't * recognized. The return value is owned by #GdkPixbuf and should * not be freed. * * Since: 2.4 */ public static PixbufFormat getFileInfo(string filename, out int width, out int height) { auto p = gdk_pixbuf_get_file_info(Str.toStringz(filename), &width, &height); if(p is null) { return null; } return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) p); } /** * Asynchronously parses an image file far enough to determine its * format and size. * * For more details see gdk_pixbuf_get_file_info(), which is the synchronous * version of this function. * * When the operation is finished, @callback will be called in the * main thread. You can then call gdk_pixbuf_get_file_info_finish() to * get the result of the operation. * * Params: * filename = The name of the file to identify * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the file info is available * userData = the data to pass to the callback function * * Since: 2.32 */ public static void getFileInfoAsync(string filename, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { gdk_pixbuf_get_file_info_async(Str.toStringz(filename), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous pixbuf parsing operation started with * gdk_pixbuf_get_file_info_async(). * * Params: * asyncResult = a #GAsyncResult * width = Return location for the width of the image, or %NULL * height = Return location for the height of the image, or %NULL * * Returns: A #GdkPixbufFormat describing the image * format of the file or %NULL if the image format wasn't * recognized. The return value is owned by GdkPixbuf and should * not be freed. * * Since: 2.32 * * Throws: GException on failure. */ public static PixbufFormat getFileInfoFinish(AsyncResultIF asyncResult, out int width, out int height) { GError* err = null; auto p = gdk_pixbuf_get_file_info_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &width, &height, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) p); } /** * Obtains the available information about the image formats supported * by GdkPixbuf. * * Returns: A list of * #GdkPixbufFormats describing the supported image formats. The list should * be freed when it is no longer needed, but the structures themselves are * owned by #GdkPixbuf and should not be freed. * * Since: 2.2 */ public static ListSG getFormats() { auto p = gdk_pixbuf_get_formats(); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Creates a new pixbuf by asynchronously loading an image from an input stream. * * For more details see gdk_pixbuf_new_from_stream(), which is the synchronous * version of this function. * * When the operation is finished, @callback will be called in the main thread. * You can then call gdk_pixbuf_new_from_stream_finish() to get the result of the operation. * * Params: * stream = a #GInputStream from which to load the pixbuf * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the pixbuf is loaded * userData = the data to pass to the callback function * * Since: 2.24 */ public static void newFromStreamAsync(InputStream stream, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { gdk_pixbuf_new_from_stream_async((stream is null) ? null : stream.getInputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Creates a new pixbuf by asynchronously loading an image from an input stream. * * For more details see gdk_pixbuf_new_from_stream_at_scale(), which is the synchronous * version of this function. * * When the operation is finished, @callback will be called in the main thread. * You can then call gdk_pixbuf_new_from_stream_finish() to get the result of the operation. * * Params: * stream = a #GInputStream from which to load the pixbuf * width = the width the image should have or -1 to not constrain the width * height = the height the image should have or -1 to not constrain the height * preserveAspectRatio = %TRUE to preserve the image's aspect ratio * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the pixbuf is loaded * userData = the data to pass to the callback function * * Since: 2.24 */ public static void newFromStreamAtScaleAsync(InputStream stream, int width, int height, bool preserveAspectRatio, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { gdk_pixbuf_new_from_stream_at_scale_async((stream is null) ? null : stream.getInputStreamStruct(), width, height, preserveAspectRatio, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous pixbuf save operation started with * gdk_pixbuf_save_to_stream_async(). * * Params: * asyncResult = a #GAsyncResult * * Returns: %TRUE if the pixbuf was saved successfully, %FALSE if an error was set. * * Since: 2.24 * * Throws: GException on failure. */ public static bool saveToStreamFinish(AsyncResultIF asyncResult) { GError* err = null; auto p = gdk_pixbuf_save_to_stream_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Takes an existing pixbuf and adds an alpha channel to it. * If the existing pixbuf already had an alpha channel, the channel * values are copied from the original; otherwise, the alpha channel * is initialized to 255 (full opacity). * * If @substitute_color is %TRUE, then the color specified by (@r, @g, @b) will be * assigned zero opacity. That is, if you pass (255, 255, 255) for the * substitute color, all white pixels will become fully transparent. * * Params: * substituteColor = Whether to set a color to zero opacity. If this * is %FALSE, then the (@r, @g, @b) arguments will be ignored. * r = Red value to substitute. * g = Green value to substitute. * b = Blue value to substitute. * * Returns: A newly-created pixbuf with a reference count of 1. */ public Pixbuf addAlpha(bool substituteColor, char r, char g, char b) { auto p = gdk_pixbuf_add_alpha(gdkPixbuf, substituteColor, r, g, b); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Takes an existing pixbuf and checks for the presence of an * associated "orientation" option, which may be provided by the * jpeg loader (which reads the exif orientation tag) or the * tiff loader (which reads the tiff orientation tag, and * compensates it for the partial transforms performed by * libtiff). If an orientation option/tag is present, the * appropriate transform will be performed so that the pixbuf * is oriented correctly. * * Returns: A newly-created pixbuf, %NULL if * not enough memory could be allocated for it, or a reference to the * input pixbuf (with an increased reference count). * * Since: 2.12 */ public Pixbuf applyEmbeddedOrientation() { auto p = gdk_pixbuf_apply_embedded_orientation(gdkPixbuf); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Creates a transformation of the source image @src by scaling by * @scale_x and @scale_y then translating by @offset_x and @offset_y. * This gives an image in the coordinates of the destination pixbuf. * The rectangle (@dest_x, @dest_y, @dest_width, @dest_height) * is then alpha blended onto the corresponding rectangle of the * original destination image. * * When the destination rectangle contains parts not in the source * image, the data at the edges of the source image is replicated * to infinity. * * ![](composite.png) * * Params: * dest = the #GdkPixbuf into which to render the results * destX = the left coordinate for region to render * destY = the top coordinate for region to render * destWidth = the width of the region to render * destHeight = the height of the region to render * offsetX = the offset in the X direction (currently rounded to an integer) * offsetY = the offset in the Y direction (currently rounded to an integer) * scaleX = the scale factor in the X direction * scaleY = the scale factor in the Y direction * interpType = the interpolation type for the transformation. * overallAlpha = overall alpha for source image (0..255) */ public void composite(Pixbuf dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, GdkInterpType interpType, int overallAlpha) { gdk_pixbuf_composite(gdkPixbuf, (dest is null) ? null : dest.getPixbufStruct(), destX, destY, destWidth, destHeight, offsetX, offsetY, scaleX, scaleY, interpType, overallAlpha); } /** * Creates a transformation of the source image @src by scaling by * @scale_x and @scale_y then translating by @offset_x and @offset_y, * then alpha blends the rectangle (@dest_x ,@dest_y, @dest_width, * @dest_height) of the resulting image with a checkboard of the * colors @color1 and @color2 and renders it onto the destination * image. * * If the source image has no alpha channel, and @overall_alpha is 255, a fast * path is used which omits the alpha blending and just performs the scaling. * * See gdk_pixbuf_composite_color_simple() for a simpler variant of this * function suitable for many tasks. * * Params: * dest = the #GdkPixbuf into which to render the results * destX = the left coordinate for region to render * destY = the top coordinate for region to render * destWidth = the width of the region to render * destHeight = the height of the region to render * offsetX = the offset in the X direction (currently rounded to an integer) * offsetY = the offset in the Y direction (currently rounded to an integer) * scaleX = the scale factor in the X direction * scaleY = the scale factor in the Y direction * interpType = the interpolation type for the transformation. * overallAlpha = overall alpha for source image (0..255) * checkX = the X offset for the checkboard (origin of checkboard is at -@check_x, -@check_y) * checkY = the Y offset for the checkboard * checkSize = the size of checks in the checkboard (must be a power of two) * color1 = the color of check at upper left * color2 = the color of the other check */ public void compositeColor(Pixbuf dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, GdkInterpType interpType, int overallAlpha, int checkX, int checkY, int checkSize, uint color1, uint color2) { gdk_pixbuf_composite_color(gdkPixbuf, (dest is null) ? null : dest.getPixbufStruct(), destX, destY, destWidth, destHeight, offsetX, offsetY, scaleX, scaleY, interpType, overallAlpha, checkX, checkY, checkSize, color1, color2); } /** * Creates a new #GdkPixbuf by scaling @src to @dest_width x * @dest_height and alpha blending the result with a checkboard of colors * @color1 and @color2. * * Params: * destWidth = the width of destination image * destHeight = the height of destination image * interpType = the interpolation type for the transformation. * overallAlpha = overall alpha for source image (0..255) * checkSize = the size of checks in the checkboard (must be a power of two) * color1 = the color of check at upper left * color2 = the color of the other check * * Returns: the new #GdkPixbuf, or %NULL if not enough memory could be * allocated for it. */ public Pixbuf compositeColorSimple(int destWidth, int destHeight, GdkInterpType interpType, int overallAlpha, int checkSize, uint color1, uint color2) { auto p = gdk_pixbuf_composite_color_simple(gdkPixbuf, destWidth, destHeight, interpType, overallAlpha, checkSize, color1, color2); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Creates a new #GdkPixbuf with a copy of the information in the specified * @pixbuf. Note that this does not copy the options set on the original #GdkPixbuf, * use gdk_pixbuf_copy_options() for this. * * Returns: A newly-created pixbuf with a reference count of 1, or %NULL if * not enough memory could be allocated. */ public Pixbuf copy() { auto p = gdk_pixbuf_copy(gdkPixbuf); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Copies a rectangular area from @src_pixbuf to @dest_pixbuf. Conversion of * pixbuf formats is done automatically. * * If the source rectangle overlaps the destination rectangle on the * same pixbuf, it will be overwritten during the copy operation. * Therefore, you can not use this function to scroll a pixbuf. * * Params: * srcX = Source X coordinate within @src_pixbuf. * srcY = Source Y coordinate within @src_pixbuf. * width = Width of the area to copy. * height = Height of the area to copy. * destPixbuf = Destination pixbuf. * destX = X coordinate within @dest_pixbuf. * destY = Y coordinate within @dest_pixbuf. */ public void copyArea(int srcX, int srcY, int width, int height, Pixbuf destPixbuf, int destX, int destY) { gdk_pixbuf_copy_area(gdkPixbuf, srcX, srcY, width, height, (destPixbuf is null) ? null : destPixbuf.getPixbufStruct(), destX, destY); } /** * Copy the key/value pair options attached to a #GdkPixbuf to another. * This is useful to keep original metadata after having manipulated * a file. However be careful to remove metadata which you've already * applied, such as the "orientation" option after rotating the image. * * Params: * destPixbuf = the #GdkPixbuf to copy options to * * Returns: %TRUE on success. * * Since: 2.36 */ public bool copyOptions(Pixbuf destPixbuf) { return gdk_pixbuf_copy_options(gdkPixbuf, (destPixbuf is null) ? null : destPixbuf.getPixbufStruct()) != 0; } /** * Clears a pixbuf to the given RGBA value, converting the RGBA value into * the pixbuf's pixel format. The alpha will be ignored if the pixbuf * doesn't have an alpha channel. * * Params: * pixel = RGBA pixel to clear to * (0xffffffff is opaque white, 0x00000000 transparent black) */ public void fill(uint pixel) { gdk_pixbuf_fill(gdkPixbuf, pixel); } /** * Flips a pixbuf horizontally or vertically and returns the * result in a new pixbuf. * * Params: * horizontal = %TRUE to flip horizontally, %FALSE to flip vertically * * Returns: the new #GdkPixbuf, or %NULL * if not enough memory could be allocated for it. * * Since: 2.6 */ public Pixbuf flip(bool horizontal) { auto p = gdk_pixbuf_flip(gdkPixbuf, horizontal); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Queries the number of bits per color sample in a pixbuf. * * Returns: Number of bits per color sample. */ public int getBitsPerSample() { return gdk_pixbuf_get_bits_per_sample(gdkPixbuf); } /** * Returns the length of the pixel data, in bytes. * * Returns: The length of the pixel data. * * Since: 2.26 */ public size_t getByteLength() { return gdk_pixbuf_get_byte_length(gdkPixbuf); } /** * Queries the color space of a pixbuf. * * Returns: Color space. */ public GdkColorspace getColorspace() { return gdk_pixbuf_get_colorspace(gdkPixbuf); } /** * Queries whether a pixbuf has an alpha channel (opacity information). * * Returns: %TRUE if it has an alpha channel, %FALSE otherwise. */ public bool getHasAlpha() { return gdk_pixbuf_get_has_alpha(gdkPixbuf) != 0; } /** * Queries the height of a pixbuf. * * Returns: Height in pixels. */ public int getHeight() { return gdk_pixbuf_get_height(gdkPixbuf); } /** * Queries the number of channels of a pixbuf. * * Returns: Number of channels. */ public int getNChannels() { return gdk_pixbuf_get_n_channels(gdkPixbuf); } /** * Looks up @key in the list of options that may have been attached to the * @pixbuf when it was loaded, or that may have been attached by another * function using gdk_pixbuf_set_option(). * * For instance, the ANI loader provides "Title" and "Artist" options. * The ICO, XBM, and XPM loaders provide "x_hot" and "y_hot" hot-spot * options for cursor definitions. The PNG loader provides the tEXt ancillary * chunk key/value pairs as options. Since 2.12, the TIFF and JPEG loaders * return an "orientation" option string that corresponds to the embedded * TIFF/Exif orientation tag (if present). Since 2.32, the TIFF loader sets * the "multipage" option string to "yes" when a multi-page TIFF is loaded. * Since 2.32 the JPEG and PNG loaders set "x-dpi" and "y-dpi" if the file * contains image density information in dots per inch. * Since 2.36.6, the JPEG loader sets the "comment" option with the comment * EXIF tag. * * Params: * key = a nul-terminated string. * * Returns: the value associated with @key. This is a nul-terminated * string that should not be freed or %NULL if @key was not found. */ public string getOption(string key) { return Str.toString(gdk_pixbuf_get_option(gdkPixbuf, Str.toStringz(key))); } /** * Returns a #GHashTable with a list of all the options that may have been * attached to the @pixbuf when it was loaded, or that may have been * attached by another function using gdk_pixbuf_set_option(). * * See gdk_pixbuf_get_option() for more details. * * Returns: a #GHashTable of key/values * * Since: 2.32 */ public HashTable getOptions() { auto p = gdk_pixbuf_get_options(gdkPixbuf); if(p is null) { return null; } return new HashTable(cast(GHashTable*) p); } /** * Queries a pointer to the pixel data of a pixbuf. * * Returns: A pointer to the pixbuf's * pixel data. Please see the section on [image data](image-data) * for information about how the pixel data is stored in memory. * * This function will cause an implicit copy of the pixbuf data if the * pixbuf was created from read-only data. * * Since: 2.26 */ public char[] getPixelsWithLength() { uint length; auto p = gdk_pixbuf_get_pixels_with_length(gdkPixbuf, &length); return p[0 .. length]; } /** * Queries the rowstride of a pixbuf, which is the number of bytes between * the start of a row and the start of the next row. * * Returns: Distance between row starts. */ public int getRowstride() { return gdk_pixbuf_get_rowstride(gdkPixbuf); } /** * Queries the width of a pixbuf. * * Returns: Width in pixels. */ public int getWidth() { return gdk_pixbuf_get_width(gdkPixbuf); } /** * Creates a new pixbuf which represents a sub-region of @src_pixbuf. * The new pixbuf shares its pixels with the original pixbuf, so * writing to one affects both. The new pixbuf holds a reference to * @src_pixbuf, so @src_pixbuf will not be finalized until the new * pixbuf is finalized. * * Note that if @src_pixbuf is read-only, this function will force it * to be mutable. * * Params: * srcX = X coord in @src_pixbuf * srcY = Y coord in @src_pixbuf * width = width of region in @src_pixbuf * height = height of region in @src_pixbuf * * Returns: a new pixbuf */ public Pixbuf newSubpixbuf(int srcX, int srcY, int width, int height) { auto p = gdk_pixbuf_new_subpixbuf(gdkPixbuf, srcX, srcY, width, height); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Returns: A new reference to a read-only copy of * the pixel data. Note that for mutable pixbufs, this function will * incur a one-time copy of the pixel data for conversion into the * returned #GBytes. * * Since: 2.32 */ public Bytes readPixelBytes() { auto p = gdk_pixbuf_read_pixel_bytes(gdkPixbuf); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Returns a read-only pointer to the raw pixel data; must not be * modified. This function allows skipping the implicit copy that * must be made if gdk_pixbuf_get_pixels() is called on a read-only * pixbuf. * * Since: 2.32 */ public ubyte* readPixels() { return gdk_pixbuf_read_pixels(gdkPixbuf); } /** * Remove the key/value pair option attached to a #GdkPixbuf. * * Params: * key = a nul-terminated string representing the key to remove. * * Returns: %TRUE if an option was removed, %FALSE if not. * * Since: 2.36 */ public bool removeOption(string key) { return gdk_pixbuf_remove_option(gdkPixbuf, Str.toStringz(key)) != 0; } /** * Rotates a pixbuf by a multiple of 90 degrees, and returns the * result in a new pixbuf. * * If @angle is 0, a copy of @src is returned, avoiding any rotation. * * Params: * angle = the angle to rotate by * * Returns: the new #GdkPixbuf, or %NULL * if not enough memory could be allocated for it. * * Since: 2.6 */ public Pixbuf rotateSimple(GdkPixbufRotation angle) { auto p = gdk_pixbuf_rotate_simple(gdkPixbuf, angle); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Modifies saturation and optionally pixelates @src, placing the result in * @dest. @src and @dest may be the same pixbuf with no ill effects. If * @saturation is 1.0 then saturation is not changed. If it's less than 1.0, * saturation is reduced (the image turns toward grayscale); if greater than * 1.0, saturation is increased (the image gets more vivid colors). If @pixelate * is %TRUE, then pixels are faded in a checkerboard pattern to create a * pixelated image. @src and @dest must have the same image format, size, and * rowstride. * * Params: * dest = place to write modified version of @src * saturation = saturation factor * pixelate = whether to pixelate */ public void saturateAndPixelate(Pixbuf dest, float saturation, bool pixelate) { gdk_pixbuf_saturate_and_pixelate(gdkPixbuf, (dest is null) ? null : dest.getPixbufStruct(), saturation, pixelate); } /** * Saves pixbuf to a callback in format @type, which is currently "jpeg", * "png", "tiff", "ico" or "bmp". If @error is set, %FALSE will be returned. See * gdk_pixbuf_save_to_callback () for more details. * * Params: * saveFunc = a function that is called to save each block of data that * the save routine generates. * userData = user data to pass to the save function. * type = name of file format. * optionKeys = name of options to set, %NULL-terminated * optionValues = values for named options * * Returns: whether an error was set * * Since: 2.4 * * Throws: GException on failure. */ public bool saveToCallbackv(GdkPixbufSaveFunc saveFunc, void* userData, string type, string[] optionKeys, string[] optionValues) { GError* err = null; auto p = gdk_pixbuf_save_to_callbackv(gdkPixbuf, saveFunc, userData, Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Saves @pixbuf to an output stream. * * Supported file formats are currently "jpeg", "tiff", "png", "ico" or * "bmp". See gdk_pixbuf_save_to_stream() for more details. * * Params: * stream = a #GOutputStream to save the pixbuf to * type = name of file format * optionKeys = name of options to set, %NULL-terminated * optionValues = values for named options * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: %TRUE if the pixbuf was saved successfully, %FALSE if an * error was set. * * Since: 2.36 * * Throws: GException on failure. */ public bool saveToStreamv(OutputStream stream, string type, string[] optionKeys, string[] optionValues, Cancellable cancellable) { GError* err = null; auto p = gdk_pixbuf_save_to_streamv(gdkPixbuf, (stream is null) ? null : stream.getOutputStreamStruct(), Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Saves @pixbuf to an output stream asynchronously. * * For more details see gdk_pixbuf_save_to_streamv(), which is the synchronous * version of this function. * * When the operation is finished, @callback will be called in the main thread. * You can then call gdk_pixbuf_save_to_stream_finish() to get the result of the operation. * * Params: * stream = a #GOutputStream to which to save the pixbuf * type = name of file format * optionKeys = name of options to set, %NULL-terminated * optionValues = values for named options * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the pixbuf is saved * userData = the data to pass to the callback function * * Since: 2.36 */ public void saveToStreamvAsync(OutputStream stream, string type, string[] optionKeys, string[] optionValues, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { gdk_pixbuf_save_to_streamv_async(gdkPixbuf, (stream is null) ? null : stream.getOutputStreamStruct(), Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Saves pixbuf to a file in @type, which is currently "jpeg", "png", "tiff", "ico" or "bmp". * If @error is set, %FALSE will be returned. * See gdk_pixbuf_save () for more details. * * Params: * filename = name of file to save. * type = name of file format. * optionKeys = name of options to set, %NULL-terminated * optionValues = values for named options * * Returns: whether an error was set * * Throws: GException on failure. */ public bool savev(string filename, string type, string[] optionKeys, string[] optionValues) { GError* err = null; auto p = gdk_pixbuf_savev(gdkPixbuf, Str.toStringz(filename), Str.toStringz(type), Str.toStringzArray(optionKeys), Str.toStringzArray(optionValues), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Creates a transformation of the source image @src by scaling by * @scale_x and @scale_y then translating by @offset_x and @offset_y, * then renders the rectangle (@dest_x, @dest_y, @dest_width, * @dest_height) of the resulting image onto the destination image * replacing the previous contents. * * Try to use gdk_pixbuf_scale_simple() first, this function is * the industrial-strength power tool you can fall back to if * gdk_pixbuf_scale_simple() isn't powerful enough. * * If the source rectangle overlaps the destination rectangle on the * same pixbuf, it will be overwritten during the scaling which * results in rendering artifacts. * * Params: * dest = the #GdkPixbuf into which to render the results * destX = the left coordinate for region to render * destY = the top coordinate for region to render * destWidth = the width of the region to render * destHeight = the height of the region to render * offsetX = the offset in the X direction (currently rounded to an integer) * offsetY = the offset in the Y direction (currently rounded to an integer) * scaleX = the scale factor in the X direction * scaleY = the scale factor in the Y direction * interpType = the interpolation type for the transformation. */ public void scale(Pixbuf dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, GdkInterpType interpType) { gdk_pixbuf_scale(gdkPixbuf, (dest is null) ? null : dest.getPixbufStruct(), destX, destY, destWidth, destHeight, offsetX, offsetY, scaleX, scaleY, interpType); } /** * Create a new #GdkPixbuf containing a copy of @src scaled to * @dest_width x @dest_height. Leaves @src unaffected. @interp_type * should be #GDK_INTERP_NEAREST if you want maximum speed (but when * scaling down #GDK_INTERP_NEAREST is usually unusably ugly). The * default @interp_type should be #GDK_INTERP_BILINEAR which offers * reasonable quality and speed. * * You can scale a sub-portion of @src by creating a sub-pixbuf * pointing into @src; see gdk_pixbuf_new_subpixbuf(). * * If @dest_width and @dest_height are equal to the @src width and height, a * copy of @src is returned, avoiding any scaling. * * For more complicated scaling/alpha blending see gdk_pixbuf_scale() * and gdk_pixbuf_composite(). * * Params: * destWidth = the width of destination image * destHeight = the height of destination image * interpType = the interpolation type for the transformation. * * Returns: the new #GdkPixbuf, or %NULL if not enough memory could be * allocated for it. */ public Pixbuf scaleSimple(int destWidth, int destHeight, GdkInterpType interpType) { auto p = gdk_pixbuf_scale_simple(gdkPixbuf, destWidth, destHeight, interpType); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p, true); } /** * Attaches a key/value pair as an option to a #GdkPixbuf. If @key already * exists in the list of options attached to @pixbuf, the new value is * ignored and %FALSE is returned. * * Params: * key = a nul-terminated string. * value = a nul-terminated string. * * Returns: %TRUE on success. * * Since: 2.2 */ public bool setOption(string key, string value) { return gdk_pixbuf_set_option(gdkPixbuf, Str.toStringz(key), Str.toStringz(value)) != 0; } } GtkD-3.7.5/generated/gtkd/gdkpixbuf/PixbufAnimation.d000066400000000000000000000260421324604450400225010ustar00rootroot00000000000000/* * 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 gdkpixbuf.PixbufAnimation; private import gdkpixbuf.Pixbuf; private import gdkpixbuf.PixbufAnimationIter; private import gdkpixbuf.c.functions; public import gdkpixbuf.c.types; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.InputStream; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.TimeVal; private import gobject.ObjectG; public import gtkc.gdkpixbuftypes; /** * An opaque struct representing an animation. */ public class PixbufAnimation : ObjectG { /** the main Gtk struct */ protected GdkPixbufAnimation* gdkPixbufAnimation; /** Get the main Gtk struct */ public GdkPixbufAnimation* getPixbufAnimationStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkPixbufAnimation; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkPixbufAnimation; } protected override void setStruct(GObject* obj) { gdkPixbufAnimation = cast(GdkPixbufAnimation*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkPixbufAnimation* gdkPixbufAnimation, bool ownedRef = false) { this.gdkPixbufAnimation = gdkPixbufAnimation; super(cast(GObject*)gdkPixbufAnimation, ownedRef); } /** */ public static GType getType() { return gdk_pixbuf_animation_get_type(); } /** * Creates a new animation by loading it from a file. The file format is * detected automatically. If the file's format does not support multi-frame * images, then an animation with a single frame will be created. Possible errors * are in the #GDK_PIXBUF_ERROR and #G_FILE_ERROR domains. * * Params: * filename = Name of file to load, in the GLib file name encoding * * Returns: A newly-created animation with a reference count of 1, or %NULL * if any of several error conditions ocurred: the file could not be opened, * there was no loader for the file's format, there was not enough memory to * allocate the image buffer, or the image file contained invalid data. * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string filename) { GError* err = null; auto p = gdk_pixbuf_animation_new_from_file(Str.toStringz(filename), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_file"); } this(cast(GdkPixbufAnimation*) p, true); } /** * Creates a new animation by loading it from an input stream. * * The file format is detected automatically. If %NULL is returned, then * @error will be set. The @cancellable can be used to abort the operation * from another thread. If the operation was cancelled, the error * %G_IO_ERROR_CANCELLED will be returned. Other possible errors are in * the #GDK_PIXBUF_ERROR and %G_IO_ERROR domains. * * The stream is not closed. * * Params: * stream = a #GInputStream to load the pixbuf from * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: A newly-created pixbuf, or %NULL if any of several error * conditions occurred: the file could not be opened, the image format is * not supported, there was not enough memory to allocate the image buffer, * the stream contained invalid data, or the operation was cancelled. * * Since: 2.28 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(InputStream stream, Cancellable cancellable) { GError* err = null; auto p = gdk_pixbuf_animation_new_from_stream((stream is null) ? null : stream.getInputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_stream"); } this(cast(GdkPixbufAnimation*) p, true); } /** * Finishes an asynchronous pixbuf animation creation operation started with * gdk_pixbuf_animation_new_from_stream_async(). * * Params: * asyncResult = a #GAsyncResult * * Returns: a #GdkPixbufAnimation or %NULL on error. Free the returned * object with g_object_unref(). * * Since: 2.28 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(AsyncResultIF asyncResult) { GError* err = null; auto p = gdk_pixbuf_animation_new_from_stream_finish((asyncResult is null) ? null : asyncResult.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_stream_finish"); } this(cast(GdkPixbufAnimation*) p, true); } /** * Creates a new animation by asynchronously loading an image from an input stream. * * For more details see gdk_pixbuf_new_from_stream(), which is the synchronous * version of this function. * * When the operation is finished, @callback will be called in the main thread. * You can then call gdk_pixbuf_animation_new_from_stream_finish() to get the * result of the operation. * * Params: * stream = a #GInputStream from which to load the animation * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the pixbuf is loaded * userData = the data to pass to the callback function * * Since: 2.28 */ public static void newFromStreamAsync(InputStream stream, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { gdk_pixbuf_animation_new_from_stream_async((stream is null) ? null : stream.getInputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Queries the height of the bounding box of a pixbuf animation. * * Returns: Height of the bounding box of the animation. */ public int getHeight() { return gdk_pixbuf_animation_get_height(gdkPixbufAnimation); } /** * Get an iterator for displaying an animation. The iterator provides * the frames that should be displayed at a given time. It should be * freed after use with g_object_unref(). * * @start_time would normally come from g_get_current_time(), and marks * the beginning of animation playback. After creating an iterator, you * should immediately display the pixbuf returned by * gdk_pixbuf_animation_iter_get_pixbuf(). Then, you should install * a timeout (with g_timeout_add()) or by some other mechanism ensure * that you'll update the image after * gdk_pixbuf_animation_iter_get_delay_time() milliseconds. Each time * the image is updated, you should reinstall the timeout with the new, * possibly-changed delay time. * * As a shortcut, if @start_time is %NULL, the result of * g_get_current_time() will be used automatically. * * To update the image (i.e. possibly change the result of * gdk_pixbuf_animation_iter_get_pixbuf() to a new frame of the animation), * call gdk_pixbuf_animation_iter_advance(). * * If you're using #GdkPixbufLoader, in addition to updating the image * after the delay time, you should also update it whenever you * receive the area_updated signal and * gdk_pixbuf_animation_iter_on_currently_loading_frame() returns * %TRUE. In this case, the frame currently being fed into the loader * has received new data, so needs to be refreshed. The delay time for * a frame may also be modified after an area_updated signal, for * example if the delay time for a frame is encoded in the data after * the frame itself. So your timeout should be reinstalled after any * area_updated signal. * * A delay time of -1 is possible, indicating "infinite." * * Params: * startTime = time when the animation starts playing * * Returns: an iterator to move over the animation */ public PixbufAnimationIter getIter(TimeVal startTime) { auto p = gdk_pixbuf_animation_get_iter(gdkPixbufAnimation, (startTime is null) ? null : startTime.getTimeValStruct()); if(p is null) { return null; } return ObjectG.getDObject!(PixbufAnimationIter)(cast(GdkPixbufAnimationIter*) p, true); } /** * If an animation is really just a plain image (has only one frame), * this function returns that image. If the animation is an animation, * this function returns a reasonable thing to display as a static * unanimated image, which might be the first frame, or something more * sophisticated. If an animation hasn't loaded any frames yet, this * function will return %NULL. * * Returns: unanimated image representing the animation */ public Pixbuf getStaticImage() { auto p = gdk_pixbuf_animation_get_static_image(gdkPixbufAnimation); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); } /** * Queries the width of the bounding box of a pixbuf animation. * * Returns: Width of the bounding box of the animation. */ public int getWidth() { return gdk_pixbuf_animation_get_width(gdkPixbufAnimation); } /** * If you load a file with gdk_pixbuf_animation_new_from_file() and it * turns out to be a plain, unanimated image, then this function will * return %TRUE. Use gdk_pixbuf_animation_get_static_image() to retrieve * the image. * * Returns: %TRUE if the "animation" was really just an image */ public bool isStaticImage() { return gdk_pixbuf_animation_is_static_image(gdkPixbufAnimation) != 0; } /** * Adds a reference to an animation. * * Deprecated: Use g_object_ref(). * * Returns: The same as the @animation argument. */ public override PixbufAnimation doref() { auto p = gdk_pixbuf_animation_ref(gdkPixbufAnimation); if(p is null) { return null; } return ObjectG.getDObject!(PixbufAnimation)(cast(GdkPixbufAnimation*) p); } /** * Removes a reference from an animation. * * Deprecated: Use g_object_unref(). */ public override void unref() { gdk_pixbuf_animation_unref(gdkPixbufAnimation); } } GtkD-3.7.5/generated/gtkd/gdkpixbuf/PixbufAnimationIter.d000066400000000000000000000131351324604450400233240ustar00rootroot00000000000000/* * 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 gdkpixbuf.PixbufAnimationIter; private import gdkpixbuf.Pixbuf; private import gdkpixbuf.c.functions; public import gdkpixbuf.c.types; private import glib.TimeVal; private import gobject.ObjectG; public import gtkc.gdkpixbuftypes; /** * An opaque struct representing an iterator which points to a * certain position in an animation. */ public class PixbufAnimationIter : ObjectG { /** the main Gtk struct */ protected GdkPixbufAnimationIter* gdkPixbufAnimationIter; /** Get the main Gtk struct */ public GdkPixbufAnimationIter* getPixbufAnimationIterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkPixbufAnimationIter; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkPixbufAnimationIter; } protected override void setStruct(GObject* obj) { gdkPixbufAnimationIter = cast(GdkPixbufAnimationIter*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkPixbufAnimationIter* gdkPixbufAnimationIter, bool ownedRef = false) { this.gdkPixbufAnimationIter = gdkPixbufAnimationIter; super(cast(GObject*)gdkPixbufAnimationIter, ownedRef); } /** */ public static GType getType() { return gdk_pixbuf_animation_iter_get_type(); } /** * Possibly advances an animation to a new frame. Chooses the frame based * on the start time passed to gdk_pixbuf_animation_get_iter(). * * @current_time would normally come from g_get_current_time(), and * must be greater than or equal to the time passed to * gdk_pixbuf_animation_get_iter(), and must increase or remain * unchanged each time gdk_pixbuf_animation_iter_get_pixbuf() is * called. That is, you can't go backward in time; animations only * play forward. * * As a shortcut, pass %NULL for the current time and g_get_current_time() * will be invoked on your behalf. So you only need to explicitly pass * @current_time if you're doing something odd like playing the animation * at double speed. * * If this function returns %FALSE, there's no need to update the animation * display, assuming the display had been rendered prior to advancing; * if %TRUE, you need to call gdk_pixbuf_animation_iter_get_pixbuf() * and update the display with the new pixbuf. * * Params: * currentTime = current time * * Returns: %TRUE if the image may need updating */ public bool advance(TimeVal currentTime) { return gdk_pixbuf_animation_iter_advance(gdkPixbufAnimationIter, (currentTime is null) ? null : currentTime.getTimeValStruct()) != 0; } /** * Gets the number of milliseconds the current pixbuf should be displayed, * or -1 if the current pixbuf should be displayed forever. g_timeout_add() * conveniently takes a timeout in milliseconds, so you can use a timeout * to schedule the next update. * * Note that some formats, like GIF, might clamp the timeout values in the * image file to avoid updates that are just too quick. The minimum timeout * for GIF images is currently 20 milliseconds. * * Returns: delay time in milliseconds (thousandths of a second) */ public int getDelayTime() { return gdk_pixbuf_animation_iter_get_delay_time(gdkPixbufAnimationIter); } /** * Gets the current pixbuf which should be displayed; the pixbuf might not * be the same size as the animation itself * (gdk_pixbuf_animation_get_width(), gdk_pixbuf_animation_get_height()). * This pixbuf should be displayed for * gdk_pixbuf_animation_iter_get_delay_time() milliseconds. The caller * of this function does not own a reference to the returned pixbuf; * the returned pixbuf will become invalid when the iterator advances * to the next frame, which may happen anytime you call * gdk_pixbuf_animation_iter_advance(). Copy the pixbuf to keep it * (don't just add a reference), as it may get recycled as you advance * the iterator. * * Returns: the pixbuf to be displayed */ public Pixbuf getPixbuf() { auto p = gdk_pixbuf_animation_iter_get_pixbuf(gdkPixbufAnimationIter); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); } /** * Used to determine how to respond to the area_updated signal on * #GdkPixbufLoader when loading an animation. area_updated is emitted * for an area of the frame currently streaming in to the loader. So if * you're on the currently loading frame, you need to redraw the screen for * the updated area. * * Returns: %TRUE if the frame we're on is partially loaded, or the last frame */ public bool onCurrentlyLoadingFrame() { return gdk_pixbuf_animation_iter_on_currently_loading_frame(gdkPixbufAnimationIter) != 0; } } GtkD-3.7.5/generated/gtkd/gdkpixbuf/PixbufFormat.d000066400000000000000000000146651324604450400220220ustar00rootroot00000000000000/* * 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 gdkpixbuf.PixbufFormat; private import gdkpixbuf.c.functions; public import gdkpixbuf.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.gdkpixbuftypes; private import gtkd.Loader; /** */ public class PixbufFormat { /** the main Gtk struct */ protected GdkPixbufFormat* gdkPixbufFormat; protected bool ownedRef; /** Get the main Gtk struct */ public GdkPixbufFormat* getPixbufFormatStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkPixbufFormat; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gdkPixbufFormat; } /** * Sets our main struct and passes it to the parent class. */ public this (GdkPixbufFormat* gdkPixbufFormat, bool ownedRef = false) { this.gdkPixbufFormat = gdkPixbufFormat; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GDKPIXBUF) && ownedRef ) gdk_pixbuf_format_free(gdkPixbufFormat); } /** */ public static GType getType() { return gdk_pixbuf_format_get_type(); } /** * Creates a copy of @format * * Returns: the newly allocated copy of a #GdkPixbufFormat. Use * gdk_pixbuf_format_free() to free the resources when done * * Since: 2.22 */ public PixbufFormat copy() { auto p = gdk_pixbuf_format_copy(gdkPixbufFormat); if(p is null) { return null; } return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) p, true); } /** * Frees the resources allocated when copying a #GdkPixbufFormat * using gdk_pixbuf_format_copy() * * Since: 2.22 */ public void free() { gdk_pixbuf_format_free(gdkPixbufFormat); ownedRef = false; } /** * Returns a description of the format. * * Returns: a description of the format. * * Since: 2.2 */ public string getDescription() { auto retStr = gdk_pixbuf_format_get_description(gdkPixbufFormat); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns the filename extensions typically used for files in the * given format. * * Returns: a %NULL-terminated array of filename extensions which must be * freed with g_strfreev() when it is no longer needed. * * Since: 2.2 */ public string[] getExtensions() { auto retStr = gdk_pixbuf_format_get_extensions(gdkPixbufFormat); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Returns information about the license of the image loader for the format. The * returned string should be a shorthand for a wellknown license, e.g. "LGPL", * "GPL", "QPL", "GPL/QPL", or "other" to indicate some other license. This * string should be freed with g_free() when it's no longer needed. * * Returns: a string describing the license of @format. * * Since: 2.6 */ public string getLicense() { auto retStr = gdk_pixbuf_format_get_license(gdkPixbufFormat); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns the mime types supported by the format. * * Returns: a %NULL-terminated array of mime types which must be freed with * g_strfreev() when it is no longer needed. * * Since: 2.2 */ public string[] getMimeTypes() { auto retStr = gdk_pixbuf_format_get_mime_types(gdkPixbufFormat); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Returns the name of the format. * * Returns: the name of the format. * * Since: 2.2 */ public string getName() { auto retStr = gdk_pixbuf_format_get_name(gdkPixbufFormat); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns whether this image format is disabled. See * gdk_pixbuf_format_set_disabled(). * * Returns: whether this image format is disabled. * * Since: 2.6 */ public bool isDisabled() { return gdk_pixbuf_format_is_disabled(gdkPixbufFormat) != 0; } /** * Returns %TRUE if the save option specified by @option_key is supported when * saving a pixbuf using the module implementing @format. * See gdk_pixbuf_save() for more information about option keys. * * Params: * optionKey = the name of an option * * Returns: %TRUE if the specified option is supported * * Since: 2.36 */ public bool isSaveOptionSupported(string optionKey) { return gdk_pixbuf_format_is_save_option_supported(gdkPixbufFormat, Str.toStringz(optionKey)) != 0; } /** * Returns whether this image format is scalable. If a file is in a * scalable format, it is preferable to load it at the desired size, * rather than loading it at the default size and scaling the * resulting pixbuf to the desired size. * * Returns: whether this image format is scalable. * * Since: 2.6 */ public bool isScalable() { return gdk_pixbuf_format_is_scalable(gdkPixbufFormat) != 0; } /** * Returns whether pixbufs can be saved in the given format. * * Returns: whether pixbufs can be saved in the given format. * * Since: 2.2 */ public bool isWritable() { return gdk_pixbuf_format_is_writable(gdkPixbufFormat) != 0; } /** * Disables or enables an image format. If a format is disabled, * gdk-pixbuf won't use the image loader for this format to load * images. Applications can use this to avoid using image loaders * with an inappropriate license, see gdk_pixbuf_format_get_license(). * * Params: * disabled = %TRUE to disable the format @format * * Since: 2.6 */ public void setDisabled(bool disabled) { gdk_pixbuf_format_set_disabled(gdkPixbufFormat, disabled); } } GtkD-3.7.5/generated/gtkd/gdkpixbuf/PixbufLoader.d000066400000000000000000000404021324604450400217640ustar00rootroot00000000000000/* * 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 gdkpixbuf.PixbufLoader; private import gdkpixbuf.Pixbuf; private import gdkpixbuf.PixbufAnimation; private import gdkpixbuf.PixbufFormat; private import gdkpixbuf.c.functions; public import gdkpixbuf.c.types; private import glib.Bytes; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.gdkpixbuftypes; private import std.algorithm; /** * The GdkPixbufLoader struct contains only private * fields. */ public class PixbufLoader : ObjectG { /** the main Gtk struct */ protected GdkPixbufLoader* gdkPixbufLoader; /** Get the main Gtk struct */ public GdkPixbufLoader* getPixbufLoaderStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkPixbufLoader; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkPixbufLoader; } protected override void setStruct(GObject* obj) { gdkPixbufLoader = cast(GdkPixbufLoader*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkPixbufLoader* gdkPixbufLoader, bool ownedRef = false) { this.gdkPixbufLoader = gdkPixbufLoader; super(cast(GObject*)gdkPixbufLoader, ownedRef); } /** * Creates a new pixbuf loader object that always attempts to parse * image data as if it were an image of type @image_type, instead of * identifying the type automatically. Useful if you want an error if * the image isn't the expected type, for loading image formats * that can't be reliably identified by looking at the data, or if * the user manually forces a specific type. * * The list of supported image formats depends on what image loaders * are installed, but typically "png", "jpeg", "gif", "tiff" and * "xpm" are among the supported formats. To obtain the full list of * supported image formats, call gdk_pixbuf_format_get_name() on each * of the #GdkPixbufFormat structs returned by gdk_pixbuf_get_formats(). * * Params: * imageType = name of the image format to be loaded with the image * isMimeType = Set to true if type is a mime type * * Return: A newly-created pixbuf loader. * * Throws: GException on failure. */ public this(string type, bool isMimeType=false) { GError* err = null; GdkPixbufLoader* p; if ( isMimeType ) { p = cast(GdkPixbufLoader*)gdk_pixbuf_loader_new_with_mime_type(Str.toStringz(type), &err); } else { p = cast(GdkPixbufLoader*)gdk_pixbuf_loader_new_with_type(Str.toStringz(type), &err); } if (err !is null) { throw new GException( new ErrorG(err) ); } this(cast(GdkPixbufLoader*) p, true); } /** */ /** */ public static GType getType() { return gdk_pixbuf_loader_get_type(); } /** * Creates a new pixbuf loader object. * * Returns: A newly-created pixbuf loader. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gdk_pixbuf_loader_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GdkPixbufLoader*) p, true); } /** * Informs a pixbuf loader that no further writes with * gdk_pixbuf_loader_write() will occur, so that it can free its * internal loading structures. Also, tries to parse any data that * hasn't yet been parsed; if the remaining data is partial or * corrupt, an error will be returned. If %FALSE is returned, @error * will be set to an error from the #GDK_PIXBUF_ERROR or #G_FILE_ERROR * domains. If you're just cancelling a load rather than expecting it * to be finished, passing %NULL for @error to ignore it is * reasonable. * * Remember that this does not unref the loader, so if you plan not to * use it anymore, please g_object_unref() it. * * Returns: %TRUE if all image data written so far was successfully * passed out via the update_area signal * * Throws: GException on failure. */ public bool close() { GError* err = null; auto p = gdk_pixbuf_loader_close(gdkPixbufLoader, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Queries the #GdkPixbufAnimation that a pixbuf loader is currently creating. * In general it only makes sense to call this function after the "area-prepared" * signal has been emitted by the loader. If the loader doesn't have enough * bytes yet (hasn't emitted the "area-prepared" signal) this function will * return %NULL. * * Returns: The #GdkPixbufAnimation that the loader is loading, or %NULL if * not enough data has been read to determine the information. */ public PixbufAnimation getAnimation() { auto p = gdk_pixbuf_loader_get_animation(gdkPixbufLoader); if(p is null) { return null; } return ObjectG.getDObject!(PixbufAnimation)(cast(GdkPixbufAnimation*) p); } /** * Obtains the available information about the format of the * currently loading image file. * * Returns: A #GdkPixbufFormat or * %NULL. The return value is owned by GdkPixbuf and should not be * freed. * * Since: 2.2 */ public PixbufFormat getFormat() { auto p = gdk_pixbuf_loader_get_format(gdkPixbufLoader); if(p is null) { return null; } return ObjectG.getDObject!(PixbufFormat)(cast(GdkPixbufFormat*) p); } /** * Queries the #GdkPixbuf that a pixbuf loader is currently creating. * In general it only makes sense to call this function after the * "area-prepared" signal has been emitted by the loader; this means * that enough data has been read to know the size of the image that * will be allocated. If the loader has not received enough data via * gdk_pixbuf_loader_write(), then this function returns %NULL. The * returned pixbuf will be the same in all future calls to the loader, * so simply calling g_object_ref() should be sufficient to continue * using it. Additionally, if the loader is an animation, it will * return the "static image" of the animation * (see gdk_pixbuf_animation_get_static_image()). * * Returns: The #GdkPixbuf that the loader is creating, or %NULL if not * enough data has been read to determine how to create the image buffer. */ public Pixbuf getPixbuf() { auto p = gdk_pixbuf_loader_get_pixbuf(gdkPixbufLoader); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); } /** * Causes the image to be scaled while it is loaded. The desired * image size can be determined relative to the original size of * the image by calling gdk_pixbuf_loader_set_size() from a * signal handler for the ::size-prepared signal. * * Attempts to set the desired image size are ignored after the * emission of the ::size-prepared signal. * * Params: * width = The desired width of the image being loaded. * height = The desired height of the image being loaded. * * Since: 2.2 */ public void setSize(int width, int height) { gdk_pixbuf_loader_set_size(gdkPixbufLoader, width, height); } /** * This will cause a pixbuf loader to parse the next @count bytes of * an image. It will return %TRUE if the data was loaded successfully, * and %FALSE if an error occurred. In the latter case, the loader * will be closed, and will not accept further writes. If %FALSE is * returned, @error will be set to an error from the #GDK_PIXBUF_ERROR * or #G_FILE_ERROR domains. * * Params: * buf = Pointer to image data. * * Returns: %TRUE if the write was successful, or %FALSE if the loader * cannot parse the buffer. * * Throws: GException on failure. */ public bool write(char[] buf) { GError* err = null; auto p = gdk_pixbuf_loader_write(gdkPixbufLoader, buf.ptr, cast(size_t)buf.length, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This will cause a pixbuf loader to parse a buffer inside a #GBytes * for an image. It will return %TRUE if the data was loaded successfully, * and %FALSE if an error occurred. In the latter case, the loader * will be closed, and will not accept further writes. If %FALSE is * returned, @error will be set to an error from the #GDK_PIXBUF_ERROR * or #G_FILE_ERROR domains. * * See also: gdk_pixbuf_loader_write() * * Params: * buffer = The image data as a #GBytes * * Returns: %TRUE if the write was successful, or %FALSE if the loader * cannot parse the buffer. * * Since: 2.30 * * Throws: GException on failure. */ public bool writeBytes(Bytes buffer) { GError* err = null; auto p = gdk_pixbuf_loader_write_bytes(gdkPixbufLoader, (buffer is null) ? null : buffer.getBytesStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } protected class OnAreaPreparedDelegateWrapper { void delegate(PixbufLoader) dlg; gulong handlerId; this(void delegate(PixbufLoader) dlg) { this.dlg = dlg; onAreaPreparedListeners ~= this; } void remove(OnAreaPreparedDelegateWrapper source) { foreach(index, wrapper; onAreaPreparedListeners) { if (wrapper.handlerId == source.handlerId) { onAreaPreparedListeners[index] = null; onAreaPreparedListeners = std.algorithm.remove(onAreaPreparedListeners, index); break; } } } } OnAreaPreparedDelegateWrapper[] onAreaPreparedListeners; /** * This signal is emitted when the pixbuf loader has allocated the * pixbuf in the desired size. After this signal is emitted, * applications can call gdk_pixbuf_loader_get_pixbuf() to fetch * the partially-loaded pixbuf. */ gulong addOnAreaPrepared(void delegate(PixbufLoader) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAreaPreparedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "area-prepared", cast(GCallback)&callBackAreaPrepared, cast(void*)wrapper, cast(GClosureNotify)&callBackAreaPreparedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackAreaPrepared(GdkPixbufLoader* pixbufloaderStruct, OnAreaPreparedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackAreaPreparedDestroy(OnAreaPreparedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnAreaUpdatedDelegateWrapper { void delegate(int, int, int, int, PixbufLoader) dlg; gulong handlerId; this(void delegate(int, int, int, int, PixbufLoader) dlg) { this.dlg = dlg; onAreaUpdatedListeners ~= this; } void remove(OnAreaUpdatedDelegateWrapper source) { foreach(index, wrapper; onAreaUpdatedListeners) { if (wrapper.handlerId == source.handlerId) { onAreaUpdatedListeners[index] = null; onAreaUpdatedListeners = std.algorithm.remove(onAreaUpdatedListeners, index); break; } } } } OnAreaUpdatedDelegateWrapper[] onAreaUpdatedListeners; /** * This signal is emitted when a significant area of the image being * loaded has been updated. Normally it means that a complete * scanline has been read in, but it could be a different area as * well. Applications can use this signal to know when to repaint * areas of an image that is being loaded. * * Params: * x = X offset of upper-left corner of the updated area. * y = Y offset of upper-left corner of the updated area. * width = Width of updated area. * height = Height of updated area. */ gulong addOnAreaUpdated(void delegate(int, int, int, int, PixbufLoader) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAreaUpdatedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "area-updated", cast(GCallback)&callBackAreaUpdated, cast(void*)wrapper, cast(GClosureNotify)&callBackAreaUpdatedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackAreaUpdated(GdkPixbufLoader* pixbufloaderStruct, int x, int y, int width, int height, OnAreaUpdatedDelegateWrapper wrapper) { wrapper.dlg(x, y, width, height, wrapper.outer); } extern(C) static void callBackAreaUpdatedDestroy(OnAreaUpdatedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnClosedDelegateWrapper { void delegate(PixbufLoader) dlg; gulong handlerId; this(void delegate(PixbufLoader) dlg) { this.dlg = dlg; onClosedListeners ~= this; } void remove(OnClosedDelegateWrapper source) { foreach(index, wrapper; onClosedListeners) { if (wrapper.handlerId == source.handlerId) { onClosedListeners[index] = null; onClosedListeners = std.algorithm.remove(onClosedListeners, index); break; } } } } OnClosedDelegateWrapper[] onClosedListeners; /** * This signal is emitted when gdk_pixbuf_loader_close() is called. * It can be used by different parts of an application to receive * notification when an image loader is closed by the code that * drives it. */ gulong addOnClosed(void delegate(PixbufLoader) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnClosedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "closed", cast(GCallback)&callBackClosed, cast(void*)wrapper, cast(GClosureNotify)&callBackClosedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackClosed(GdkPixbufLoader* pixbufloaderStruct, OnClosedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackClosedDestroy(OnClosedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnSizePreparedDelegateWrapper { void delegate(int, int, PixbufLoader) dlg; gulong handlerId; this(void delegate(int, int, PixbufLoader) dlg) { this.dlg = dlg; onSizePreparedListeners ~= this; } void remove(OnSizePreparedDelegateWrapper source) { foreach(index, wrapper; onSizePreparedListeners) { if (wrapper.handlerId == source.handlerId) { onSizePreparedListeners[index] = null; onSizePreparedListeners = std.algorithm.remove(onSizePreparedListeners, index); break; } } } } OnSizePreparedDelegateWrapper[] onSizePreparedListeners; /** * This signal is emitted when the pixbuf loader has been fed the * initial amount of data that is required to figure out the size * of the image that it will create. Applications can call * gdk_pixbuf_loader_set_size() in response to this signal to set * the desired size to which the image should be scaled. * * Params: * width = the original width of the image * height = the original height of the image */ gulong addOnSizePrepared(void delegate(int, int, PixbufLoader) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnSizePreparedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "size-prepared", cast(GCallback)&callBackSizePrepared, cast(void*)wrapper, cast(GClosureNotify)&callBackSizePreparedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackSizePrepared(GdkPixbufLoader* pixbufloaderStruct, int width, int height, OnSizePreparedDelegateWrapper wrapper) { wrapper.dlg(width, height, wrapper.outer); } extern(C) static void callBackSizePreparedDestroy(OnSizePreparedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gdkpixbuf/PixbufSimpleAnimation.d000066400000000000000000000073341324604450400236560ustar00rootroot00000000000000/* * 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 gdkpixbuf.PixbufSimpleAnimation; private import gdkpixbuf.Pixbuf; private import gdkpixbuf.PixbufAnimation; private import gdkpixbuf.c.functions; public import gdkpixbuf.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.gdkpixbuftypes; /** * An opaque struct representing a simple animation. */ public class PixbufSimpleAnimation : PixbufAnimation { /** the main Gtk struct */ protected GdkPixbufSimpleAnim* gdkPixbufSimpleAnim; /** Get the main Gtk struct */ public GdkPixbufSimpleAnim* getPixbufSimpleAnimationStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkPixbufSimpleAnim; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gdkPixbufSimpleAnim; } protected override void setStruct(GObject* obj) { gdkPixbufSimpleAnim = cast(GdkPixbufSimpleAnim*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GdkPixbufSimpleAnim* gdkPixbufSimpleAnim, bool ownedRef = false) { this.gdkPixbufSimpleAnim = gdkPixbufSimpleAnim; super(cast(GdkPixbufAnimation*)gdkPixbufSimpleAnim, ownedRef); } /** */ public static GType getType() { return gdk_pixbuf_simple_anim_get_type(); } /** * Creates a new, empty animation. * * Params: * width = the width of the animation * height = the height of the animation * rate = the speed of the animation, in frames per second * * Returns: a newly allocated #GdkPixbufSimpleAnim * * Since: 2.8 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int width, int height, float rate) { auto p = gdk_pixbuf_simple_anim_new(width, height, rate); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GdkPixbufSimpleAnim*) p, true); } /** * Adds a new frame to @animation. The @pixbuf must * have the dimensions specified when the animation * was constructed. * * Params: * pixbuf = the pixbuf to add * * Since: 2.8 */ public void addFrame(Pixbuf pixbuf) { gdk_pixbuf_simple_anim_add_frame(gdkPixbufSimpleAnim, (pixbuf is null) ? null : pixbuf.getPixbufStruct()); } /** * Gets whether @animation should loop indefinitely when it reaches the end. * * Returns: %TRUE if the animation loops forever, %FALSE otherwise * * Since: 2.18 */ public bool getLoop() { return gdk_pixbuf_simple_anim_get_loop(gdkPixbufSimpleAnim) != 0; } /** * Sets whether @animation should loop indefinitely when it reaches the end. * * Params: * loop = whether to loop the animation * * Since: 2.18 */ public void setLoop(bool loop) { gdk_pixbuf_simple_anim_set_loop(gdkPixbufSimpleAnim, loop); } } GtkD-3.7.5/generated/gtkd/gdkpixbuf/Pixdata.d000066400000000000000000000146461324604450400210050ustar00rootroot00000000000000/* * 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 gdkpixbuf.Pixdata; private import gdkpixbuf.Pixbuf; private import gdkpixbuf.c.functions; public import gdkpixbuf.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.StringG; private import glib.c.functions; public import gtkc.gdkpixbuftypes; private import gtkd.Loader; /** * A #GdkPixdata contains pixbuf information in a form suitable for * serialization and streaming. */ public final class Pixdata { /** the main Gtk struct */ protected GdkPixdata* gdkPixdata; protected bool ownedRef; /** Get the main Gtk struct */ public GdkPixdata* getPixdataStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gdkPixdata; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gdkPixdata; } /** * Sets our main struct and passes it to the parent class. */ public this (GdkPixdata* gdkPixdata, bool ownedRef = false) { this.gdkPixdata = gdkPixdata; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GDKPIXBUF) && ownedRef ) g_free(gdkPixdata); } /** * magic number. A valid #GdkPixdata structure must have * #GDK_PIXBUF_MAGIC_NUMBER here. */ public @property uint magic() { return gdkPixdata.magic; } /** Ditto */ public @property void magic(uint value) { gdkPixdata.magic = value; } /** * less than 1 to disable length checks, otherwise * #GDK_PIXDATA_HEADER_LENGTH + length of @pixel_data. */ public @property int length() { return gdkPixdata.length; } /** Ditto */ public @property void length(int value) { gdkPixdata.length = value; } /** * information about colorspace, sample width and * encoding, in a #GdkPixdataType. */ public @property uint pixdataType() { return gdkPixdata.pixdataType; } /** Ditto */ public @property void pixdataType(uint value) { gdkPixdata.pixdataType = value; } /** * Distance in bytes between rows. */ public @property uint rowstride() { return gdkPixdata.rowstride; } /** Ditto */ public @property void rowstride(uint value) { gdkPixdata.rowstride = value; } /** * Width of the image in pixels. */ public @property uint width() { return gdkPixdata.width; } /** Ditto */ public @property void width(uint value) { gdkPixdata.width = value; } /** * Height of the image in pixels. */ public @property uint height() { return gdkPixdata.height; } /** Ditto */ public @property void height(uint value) { gdkPixdata.height = value; } /** * Deserializes (reconstruct) a #GdkPixdata structure from a byte stream. * The byte stream consists of a straightforward writeout of the * #GdkPixdata fields in network byte order, plus the @pixel_data * bytes the structure points to. * The @pixdata contents are reconstructed byte by byte and are checked * for validity. This function may fail with %GDK_PIXBUF_ERROR_CORRUPT_IMAGE * or %GDK_PIXBUF_ERROR_UNKNOWN_TYPE. * * Deprecated: Use #GResource instead. * * Params: * stream = stream of bytes containing a * serialized #GdkPixdata structure. * * Returns: Upon successful deserialization %TRUE is returned, * %FALSE otherwise. * * Throws: GException on failure. */ public bool deserialize(ubyte[] stream) { GError* err = null; auto p = gdk_pixdata_deserialize(gdkPixdata, cast(uint)stream.length, stream.ptr, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Converts a #GdkPixbuf to a #GdkPixdata. If @use_rle is %TRUE, the * pixel data is run-length encoded into newly-allocated memory and a * pointer to that memory is returned. * * Deprecated: Use #GResource instead. * * Params: * pixbuf = the data to fill @pixdata with. * useRle = whether to use run-length encoding for the pixel data. * * Returns: If @use_rle is %TRUE, a pointer to the * newly-allocated memory for the run-length encoded pixel data, * otherwise %NULL. */ public void* fromPixbuf(Pixbuf pixbuf, bool useRle) { return gdk_pixdata_from_pixbuf(gdkPixdata, (pixbuf is null) ? null : pixbuf.getPixbufStruct(), useRle); } /** * Serializes a #GdkPixdata structure into a byte stream. * The byte stream consists of a straightforward writeout of the * #GdkPixdata fields in network byte order, plus the @pixel_data * bytes the structure points to. * * Deprecated: Use #GResource instead. * * Returns: A * newly-allocated string containing the serialized #GdkPixdata * structure. */ public ubyte[] serialize() { uint streamLengthP; auto p = gdk_pixdata_serialize(gdkPixdata, &streamLengthP); return p[0 .. streamLengthP]; } /** * Generates C source code suitable for compiling images directly * into programs. * * gdk-pixbuf ships with a program called * [gdk-pixbuf-csource][gdk-pixbuf-csource], which offers a command * line interface to this function. * * Deprecated: Use #GResource instead. * * Params: * name = used for naming generated data structures or macros. * dumpType = a #GdkPixdataDumpType determining the kind of C * source to be generated. * * Returns: a newly-allocated string containing the C source form * of @pixdata. */ public StringG toCsource(string name, GdkPixdataDumpType dumpType) { auto p = gdk_pixdata_to_csource(gdkPixdata, Str.toStringz(name), dumpType); if(p is null) { return null; } return new StringG(cast(GString*) p, true); } } GtkD-3.7.5/generated/gtkd/gdkpixbuf/c/000077500000000000000000000000001324604450400174555ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gdkpixbuf/c/functions.d000066400000000000000000001006421324604450400216350ustar00rootroot00000000000000/* * 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 gdkpixbuf.c.functions; import std.stdio; import gdkpixbuf.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GDKPIXBUF = ["libgdk_pixbuf-2.0-0.dll"]; else version (OSX) static immutable LIBRARY_GDKPIXBUF = ["libgdk_pixbuf-2.0.0.dylib"]; else static immutable LIBRARY_GDKPIXBUF = ["libgdk_pixbuf-2.0.so.0"]; shared static this() { // gdkpixbuf.Pixbuf Linker.link(gdk_pixbuf_get_type, "gdk_pixbuf_get_type", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new, "gdk_pixbuf_new", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_bytes, "gdk_pixbuf_new_from_bytes", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_data, "gdk_pixbuf_new_from_data", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_file, "gdk_pixbuf_new_from_file", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_file_at_scale, "gdk_pixbuf_new_from_file_at_scale", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_file_at_size, "gdk_pixbuf_new_from_file_at_size", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_inline, "gdk_pixbuf_new_from_inline", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_resource, "gdk_pixbuf_new_from_resource", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_resource_at_scale, "gdk_pixbuf_new_from_resource_at_scale", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_stream, "gdk_pixbuf_new_from_stream", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_stream_at_scale, "gdk_pixbuf_new_from_stream_at_scale", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_stream_finish, "gdk_pixbuf_new_from_stream_finish", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_xpm_data, "gdk_pixbuf_new_from_xpm_data", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_calculate_rowstride, "gdk_pixbuf_calculate_rowstride", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_from_pixdata, "gdk_pixbuf_from_pixdata", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_file_info, "gdk_pixbuf_get_file_info", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_file_info_async, "gdk_pixbuf_get_file_info_async", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_file_info_finish, "gdk_pixbuf_get_file_info_finish", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_formats, "gdk_pixbuf_get_formats", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_stream_async, "gdk_pixbuf_new_from_stream_async", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_from_stream_at_scale_async, "gdk_pixbuf_new_from_stream_at_scale_async", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_stream_finish, "gdk_pixbuf_save_to_stream_finish", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_add_alpha, "gdk_pixbuf_add_alpha", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_apply_embedded_orientation, "gdk_pixbuf_apply_embedded_orientation", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_composite, "gdk_pixbuf_composite", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_composite_color, "gdk_pixbuf_composite_color", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_composite_color_simple, "gdk_pixbuf_composite_color_simple", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_copy, "gdk_pixbuf_copy", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_copy_area, "gdk_pixbuf_copy_area", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_copy_options, "gdk_pixbuf_copy_options", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_fill, "gdk_pixbuf_fill", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_flip, "gdk_pixbuf_flip", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_bits_per_sample, "gdk_pixbuf_get_bits_per_sample", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_byte_length, "gdk_pixbuf_get_byte_length", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_colorspace, "gdk_pixbuf_get_colorspace", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_has_alpha, "gdk_pixbuf_get_has_alpha", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_height, "gdk_pixbuf_get_height", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_n_channels, "gdk_pixbuf_get_n_channels", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_option, "gdk_pixbuf_get_option", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_options, "gdk_pixbuf_get_options", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_pixels, "gdk_pixbuf_get_pixels", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_pixels_with_length, "gdk_pixbuf_get_pixels_with_length", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_rowstride, "gdk_pixbuf_get_rowstride", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_get_width, "gdk_pixbuf_get_width", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_new_subpixbuf, "gdk_pixbuf_new_subpixbuf", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_read_pixel_bytes, "gdk_pixbuf_read_pixel_bytes", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_read_pixels, "gdk_pixbuf_read_pixels", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_ref, "gdk_pixbuf_ref", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_remove_option, "gdk_pixbuf_remove_option", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_rotate_simple, "gdk_pixbuf_rotate_simple", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_saturate_and_pixelate, "gdk_pixbuf_saturate_and_pixelate", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save, "gdk_pixbuf_save", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_buffer, "gdk_pixbuf_save_to_buffer", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_bufferv, "gdk_pixbuf_save_to_bufferv", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_callback, "gdk_pixbuf_save_to_callback", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_callbackv, "gdk_pixbuf_save_to_callbackv", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_stream, "gdk_pixbuf_save_to_stream", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_stream_async, "gdk_pixbuf_save_to_stream_async", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_streamv, "gdk_pixbuf_save_to_streamv", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_save_to_streamv_async, "gdk_pixbuf_save_to_streamv_async", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_savev, "gdk_pixbuf_savev", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_scale, "gdk_pixbuf_scale", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_scale_simple, "gdk_pixbuf_scale_simple", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_set_option, "gdk_pixbuf_set_option", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_unref, "gdk_pixbuf_unref", LIBRARY_GDKPIXBUF); // gdkpixbuf.PixbufAnimation Linker.link(gdk_pixbuf_animation_get_type, "gdk_pixbuf_animation_get_type", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_new_from_file, "gdk_pixbuf_animation_new_from_file", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_new_from_resource, "gdk_pixbuf_animation_new_from_resource", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_new_from_stream, "gdk_pixbuf_animation_new_from_stream", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_new_from_stream_finish, "gdk_pixbuf_animation_new_from_stream_finish", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_new_from_stream_async, "gdk_pixbuf_animation_new_from_stream_async", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_get_height, "gdk_pixbuf_animation_get_height", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_get_iter, "gdk_pixbuf_animation_get_iter", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_get_static_image, "gdk_pixbuf_animation_get_static_image", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_get_width, "gdk_pixbuf_animation_get_width", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_is_static_image, "gdk_pixbuf_animation_is_static_image", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_ref, "gdk_pixbuf_animation_ref", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_unref, "gdk_pixbuf_animation_unref", LIBRARY_GDKPIXBUF); // gdkpixbuf.PixbufAnimationIter Linker.link(gdk_pixbuf_animation_iter_get_type, "gdk_pixbuf_animation_iter_get_type", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_iter_advance, "gdk_pixbuf_animation_iter_advance", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_iter_get_delay_time, "gdk_pixbuf_animation_iter_get_delay_time", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_iter_get_pixbuf, "gdk_pixbuf_animation_iter_get_pixbuf", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_animation_iter_on_currently_loading_frame, "gdk_pixbuf_animation_iter_on_currently_loading_frame", LIBRARY_GDKPIXBUF); // gdkpixbuf.PixbufFormat Linker.link(gdk_pixbuf_format_get_type, "gdk_pixbuf_format_get_type", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_copy, "gdk_pixbuf_format_copy", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_free, "gdk_pixbuf_format_free", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_get_description, "gdk_pixbuf_format_get_description", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_get_extensions, "gdk_pixbuf_format_get_extensions", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_get_license, "gdk_pixbuf_format_get_license", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_get_mime_types, "gdk_pixbuf_format_get_mime_types", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_get_name, "gdk_pixbuf_format_get_name", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_is_disabled, "gdk_pixbuf_format_is_disabled", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_is_save_option_supported, "gdk_pixbuf_format_is_save_option_supported", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_is_scalable, "gdk_pixbuf_format_is_scalable", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_is_writable, "gdk_pixbuf_format_is_writable", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_format_set_disabled, "gdk_pixbuf_format_set_disabled", LIBRARY_GDKPIXBUF); // gdkpixbuf.PixbufLoader Linker.link(gdk_pixbuf_loader_get_type, "gdk_pixbuf_loader_get_type", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_new, "gdk_pixbuf_loader_new", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_new_with_mime_type, "gdk_pixbuf_loader_new_with_mime_type", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_new_with_type, "gdk_pixbuf_loader_new_with_type", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_close, "gdk_pixbuf_loader_close", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_get_animation, "gdk_pixbuf_loader_get_animation", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_get_format, "gdk_pixbuf_loader_get_format", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_get_pixbuf, "gdk_pixbuf_loader_get_pixbuf", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_set_size, "gdk_pixbuf_loader_set_size", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_write, "gdk_pixbuf_loader_write", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_loader_write_bytes, "gdk_pixbuf_loader_write_bytes", LIBRARY_GDKPIXBUF); // gdkpixbuf.PixbufSimpleAnimation Linker.link(gdk_pixbuf_simple_anim_get_type, "gdk_pixbuf_simple_anim_get_type", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_simple_anim_new, "gdk_pixbuf_simple_anim_new", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_simple_anim_add_frame, "gdk_pixbuf_simple_anim_add_frame", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_simple_anim_get_loop, "gdk_pixbuf_simple_anim_get_loop", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixbuf_simple_anim_set_loop, "gdk_pixbuf_simple_anim_set_loop", LIBRARY_GDKPIXBUF); // gdkpixbuf.PixbufSimpleAnimationIter Linker.link(gdk_pixbuf_simple_anim_iter_get_type, "gdk_pixbuf_simple_anim_iter_get_type", LIBRARY_GDKPIXBUF); // gdkpixbuf.Pixdata Linker.link(gdk_pixdata_deserialize, "gdk_pixdata_deserialize", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixdata_from_pixbuf, "gdk_pixdata_from_pixbuf", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixdata_serialize, "gdk_pixdata_serialize", LIBRARY_GDKPIXBUF); Linker.link(gdk_pixdata_to_csource, "gdk_pixdata_to_csource", LIBRARY_GDKPIXBUF); } __gshared extern(C) { // gdkpixbuf.Pixbuf GType function() c_gdk_pixbuf_get_type; GdkPixbuf* function(GdkColorspace colorspace, int hasAlpha, int bitsPerSample, int width, int height) c_gdk_pixbuf_new; GdkPixbuf* function(GBytes* data, GdkColorspace colorspace, int hasAlpha, int bitsPerSample, int width, int height, int rowstride) c_gdk_pixbuf_new_from_bytes; GdkPixbuf* function(char* data, GdkColorspace colorspace, int hasAlpha, int bitsPerSample, int width, int height, int rowstride, GdkPixbufDestroyNotify destroyFn, void* destroyFnData) c_gdk_pixbuf_new_from_data; GdkPixbuf* function(const(char)* filename, GError** err) c_gdk_pixbuf_new_from_file; GdkPixbuf* function(const(char)* filename, int width, int height, int preserveAspectRatio, GError** err) c_gdk_pixbuf_new_from_file_at_scale; GdkPixbuf* function(const(char)* filename, int width, int height, GError** err) c_gdk_pixbuf_new_from_file_at_size; GdkPixbuf* function(int dataLength, ubyte* data, int copyPixels, GError** err) c_gdk_pixbuf_new_from_inline; GdkPixbuf* function(const(char)* resourcePath, GError** err) c_gdk_pixbuf_new_from_resource; GdkPixbuf* function(const(char)* resourcePath, int width, int height, int preserveAspectRatio, GError** err) c_gdk_pixbuf_new_from_resource_at_scale; GdkPixbuf* function(GInputStream* stream, GCancellable* cancellable, GError** err) c_gdk_pixbuf_new_from_stream; GdkPixbuf* function(GInputStream* stream, int width, int height, int preserveAspectRatio, GCancellable* cancellable, GError** err) c_gdk_pixbuf_new_from_stream_at_scale; GdkPixbuf* function(GAsyncResult* asyncResult, GError** err) c_gdk_pixbuf_new_from_stream_finish; GdkPixbuf* function(char** data) c_gdk_pixbuf_new_from_xpm_data; int function(GdkColorspace colorspace, int hasAlpha, int bitsPerSample, int width, int height) c_gdk_pixbuf_calculate_rowstride; GdkPixbuf* function(GdkPixdata* pixdata, int copyPixels, GError** err) c_gdk_pixbuf_from_pixdata; GdkPixbufFormat* function(const(char)* filename, int* width, int* height) c_gdk_pixbuf_get_file_info; void function(const(char)* filename, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_gdk_pixbuf_get_file_info_async; GdkPixbufFormat* function(GAsyncResult* asyncResult, int* width, int* height, GError** err) c_gdk_pixbuf_get_file_info_finish; GSList* function() c_gdk_pixbuf_get_formats; void function(GInputStream* stream, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_gdk_pixbuf_new_from_stream_async; void function(GInputStream* stream, int width, int height, int preserveAspectRatio, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_gdk_pixbuf_new_from_stream_at_scale_async; int function(GAsyncResult* asyncResult, GError** err) c_gdk_pixbuf_save_to_stream_finish; GdkPixbuf* function(GdkPixbuf* pixbuf, int substituteColor, char r, char g, char b) c_gdk_pixbuf_add_alpha; GdkPixbuf* function(GdkPixbuf* src) c_gdk_pixbuf_apply_embedded_orientation; void function(GdkPixbuf* src, GdkPixbuf* dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, GdkInterpType interpType, int overallAlpha) c_gdk_pixbuf_composite; void function(GdkPixbuf* src, GdkPixbuf* dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, GdkInterpType interpType, int overallAlpha, int checkX, int checkY, int checkSize, uint color1, uint color2) c_gdk_pixbuf_composite_color; GdkPixbuf* function(GdkPixbuf* src, int destWidth, int destHeight, GdkInterpType interpType, int overallAlpha, int checkSize, uint color1, uint color2) c_gdk_pixbuf_composite_color_simple; GdkPixbuf* function(GdkPixbuf* pixbuf) c_gdk_pixbuf_copy; void function(GdkPixbuf* srcPixbuf, int srcX, int srcY, int width, int height, GdkPixbuf* destPixbuf, int destX, int destY) c_gdk_pixbuf_copy_area; int function(GdkPixbuf* srcPixbuf, GdkPixbuf* destPixbuf) c_gdk_pixbuf_copy_options; void function(GdkPixbuf* pixbuf, uint pixel) c_gdk_pixbuf_fill; GdkPixbuf* function(GdkPixbuf* src, int horizontal) c_gdk_pixbuf_flip; int function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_bits_per_sample; size_t function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_byte_length; GdkColorspace function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_colorspace; int function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_has_alpha; int function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_height; int function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_n_channels; const(char)* function(GdkPixbuf* pixbuf, const(char)* key) c_gdk_pixbuf_get_option; GHashTable* function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_options; char* function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_pixels; char* function(GdkPixbuf* pixbuf, uint* length) c_gdk_pixbuf_get_pixels_with_length; int function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_rowstride; int function(GdkPixbuf* pixbuf) c_gdk_pixbuf_get_width; GdkPixbuf* function(GdkPixbuf* srcPixbuf, int srcX, int srcY, int width, int height) c_gdk_pixbuf_new_subpixbuf; GBytes* function(GdkPixbuf* pixbuf) c_gdk_pixbuf_read_pixel_bytes; ubyte* function(GdkPixbuf* pixbuf) c_gdk_pixbuf_read_pixels; GdkPixbuf* function(GdkPixbuf* pixbuf) c_gdk_pixbuf_ref; int function(GdkPixbuf* pixbuf, const(char)* key) c_gdk_pixbuf_remove_option; GdkPixbuf* function(GdkPixbuf* src, GdkPixbufRotation angle) c_gdk_pixbuf_rotate_simple; void function(GdkPixbuf* src, GdkPixbuf* dest, float saturation, int pixelate) c_gdk_pixbuf_saturate_and_pixelate; int function(GdkPixbuf* pixbuf, const(char)* filename, const(char)* type, GError** error, ... ) c_gdk_pixbuf_save; int function(GdkPixbuf* pixbuf, char** buffer, size_t* bufferSize, const(char)* type, GError** error, ... ) c_gdk_pixbuf_save_to_buffer; int function(GdkPixbuf* pixbuf, char** buffer, size_t* bufferSize, const(char)* type, char** optionKeys, char** optionValues, GError** err) c_gdk_pixbuf_save_to_bufferv; int function(GdkPixbuf* pixbuf, GdkPixbufSaveFunc saveFunc, void* userData, const(char)* type, GError** error, ... ) c_gdk_pixbuf_save_to_callback; int function(GdkPixbuf* pixbuf, GdkPixbufSaveFunc saveFunc, void* userData, const(char)* type, char** optionKeys, char** optionValues, GError** err) c_gdk_pixbuf_save_to_callbackv; int function(GdkPixbuf* pixbuf, GOutputStream* stream, const(char)* type, GCancellable* cancellable, GError** error, ... ) c_gdk_pixbuf_save_to_stream; void function(GdkPixbuf* pixbuf, GOutputStream* stream, const(char)* type, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData, ... ) c_gdk_pixbuf_save_to_stream_async; int function(GdkPixbuf* pixbuf, GOutputStream* stream, const(char)* type, char** optionKeys, char** optionValues, GCancellable* cancellable, GError** err) c_gdk_pixbuf_save_to_streamv; void function(GdkPixbuf* pixbuf, GOutputStream* stream, const(char)* type, char** optionKeys, char** optionValues, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_gdk_pixbuf_save_to_streamv_async; int function(GdkPixbuf* pixbuf, const(char)* filename, const(char)* type, char** optionKeys, char** optionValues, GError** err) c_gdk_pixbuf_savev; void function(GdkPixbuf* src, GdkPixbuf* dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, GdkInterpType interpType) c_gdk_pixbuf_scale; GdkPixbuf* function(GdkPixbuf* src, int destWidth, int destHeight, GdkInterpType interpType) c_gdk_pixbuf_scale_simple; int function(GdkPixbuf* pixbuf, const(char)* key, const(char)* value) c_gdk_pixbuf_set_option; void function(GdkPixbuf* pixbuf) c_gdk_pixbuf_unref; // gdkpixbuf.PixbufAnimation GType function() c_gdk_pixbuf_animation_get_type; GdkPixbufAnimation* function(const(char)* filename, GError** err) c_gdk_pixbuf_animation_new_from_file; GdkPixbufAnimation* function(const(char)* resourcePath, GError** err) c_gdk_pixbuf_animation_new_from_resource; GdkPixbufAnimation* function(GInputStream* stream, GCancellable* cancellable, GError** err) c_gdk_pixbuf_animation_new_from_stream; GdkPixbufAnimation* function(GAsyncResult* asyncResult, GError** err) c_gdk_pixbuf_animation_new_from_stream_finish; void function(GInputStream* stream, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_gdk_pixbuf_animation_new_from_stream_async; int function(GdkPixbufAnimation* animation) c_gdk_pixbuf_animation_get_height; GdkPixbufAnimationIter* function(GdkPixbufAnimation* animation, GTimeVal* startTime) c_gdk_pixbuf_animation_get_iter; GdkPixbuf* function(GdkPixbufAnimation* animation) c_gdk_pixbuf_animation_get_static_image; int function(GdkPixbufAnimation* animation) c_gdk_pixbuf_animation_get_width; int function(GdkPixbufAnimation* animation) c_gdk_pixbuf_animation_is_static_image; GdkPixbufAnimation* function(GdkPixbufAnimation* animation) c_gdk_pixbuf_animation_ref; void function(GdkPixbufAnimation* animation) c_gdk_pixbuf_animation_unref; // gdkpixbuf.PixbufAnimationIter GType function() c_gdk_pixbuf_animation_iter_get_type; int function(GdkPixbufAnimationIter* iter, GTimeVal* currentTime) c_gdk_pixbuf_animation_iter_advance; int function(GdkPixbufAnimationIter* iter) c_gdk_pixbuf_animation_iter_get_delay_time; GdkPixbuf* function(GdkPixbufAnimationIter* iter) c_gdk_pixbuf_animation_iter_get_pixbuf; int function(GdkPixbufAnimationIter* iter) c_gdk_pixbuf_animation_iter_on_currently_loading_frame; // gdkpixbuf.PixbufFormat GType function() c_gdk_pixbuf_format_get_type; GdkPixbufFormat* function(GdkPixbufFormat* format) c_gdk_pixbuf_format_copy; void function(GdkPixbufFormat* format) c_gdk_pixbuf_format_free; char* function(GdkPixbufFormat* format) c_gdk_pixbuf_format_get_description; char** function(GdkPixbufFormat* format) c_gdk_pixbuf_format_get_extensions; char* function(GdkPixbufFormat* format) c_gdk_pixbuf_format_get_license; char** function(GdkPixbufFormat* format) c_gdk_pixbuf_format_get_mime_types; char* function(GdkPixbufFormat* format) c_gdk_pixbuf_format_get_name; int function(GdkPixbufFormat* format) c_gdk_pixbuf_format_is_disabled; int function(GdkPixbufFormat* format, const(char)* optionKey) c_gdk_pixbuf_format_is_save_option_supported; int function(GdkPixbufFormat* format) c_gdk_pixbuf_format_is_scalable; int function(GdkPixbufFormat* format) c_gdk_pixbuf_format_is_writable; void function(GdkPixbufFormat* format, int disabled) c_gdk_pixbuf_format_set_disabled; // gdkpixbuf.PixbufLoader GType function() c_gdk_pixbuf_loader_get_type; GdkPixbufLoader* function() c_gdk_pixbuf_loader_new; GdkPixbufLoader* function(const(char)* mimeType, GError** err) c_gdk_pixbuf_loader_new_with_mime_type; GdkPixbufLoader* function(const(char)* imageType, GError** err) c_gdk_pixbuf_loader_new_with_type; int function(GdkPixbufLoader* loader, GError** err) c_gdk_pixbuf_loader_close; GdkPixbufAnimation* function(GdkPixbufLoader* loader) c_gdk_pixbuf_loader_get_animation; GdkPixbufFormat* function(GdkPixbufLoader* loader) c_gdk_pixbuf_loader_get_format; GdkPixbuf* function(GdkPixbufLoader* loader) c_gdk_pixbuf_loader_get_pixbuf; void function(GdkPixbufLoader* loader, int width, int height) c_gdk_pixbuf_loader_set_size; int function(GdkPixbufLoader* loader, char* buf, size_t count, GError** err) c_gdk_pixbuf_loader_write; int function(GdkPixbufLoader* loader, GBytes* buffer, GError** err) c_gdk_pixbuf_loader_write_bytes; // gdkpixbuf.PixbufSimpleAnimation GType function() c_gdk_pixbuf_simple_anim_get_type; GdkPixbufSimpleAnim* function(int width, int height, float rate) c_gdk_pixbuf_simple_anim_new; void function(GdkPixbufSimpleAnim* animation, GdkPixbuf* pixbuf) c_gdk_pixbuf_simple_anim_add_frame; int function(GdkPixbufSimpleAnim* animation) c_gdk_pixbuf_simple_anim_get_loop; void function(GdkPixbufSimpleAnim* animation, int loop) c_gdk_pixbuf_simple_anim_set_loop; // gdkpixbuf.PixbufSimpleAnimationIter GType function() c_gdk_pixbuf_simple_anim_iter_get_type; // gdkpixbuf.Pixdata int function(GdkPixdata* pixdata, uint streamLength, ubyte* stream, GError** err) c_gdk_pixdata_deserialize; void* function(GdkPixdata* pixdata, GdkPixbuf* pixbuf, int useRle) c_gdk_pixdata_from_pixbuf; ubyte* function(GdkPixdata* pixdata, uint* streamLengthP) c_gdk_pixdata_serialize; GString* function(GdkPixdata* pixdata, const(char)* name, GdkPixdataDumpType dumpType) c_gdk_pixdata_to_csource; } // gdkpixbuf.Pixbuf alias c_gdk_pixbuf_get_type gdk_pixbuf_get_type; alias c_gdk_pixbuf_new gdk_pixbuf_new; alias c_gdk_pixbuf_new_from_bytes gdk_pixbuf_new_from_bytes; alias c_gdk_pixbuf_new_from_data gdk_pixbuf_new_from_data; alias c_gdk_pixbuf_new_from_file gdk_pixbuf_new_from_file; alias c_gdk_pixbuf_new_from_file_at_scale gdk_pixbuf_new_from_file_at_scale; alias c_gdk_pixbuf_new_from_file_at_size gdk_pixbuf_new_from_file_at_size; alias c_gdk_pixbuf_new_from_inline gdk_pixbuf_new_from_inline; alias c_gdk_pixbuf_new_from_resource gdk_pixbuf_new_from_resource; alias c_gdk_pixbuf_new_from_resource_at_scale gdk_pixbuf_new_from_resource_at_scale; alias c_gdk_pixbuf_new_from_stream gdk_pixbuf_new_from_stream; alias c_gdk_pixbuf_new_from_stream_at_scale gdk_pixbuf_new_from_stream_at_scale; alias c_gdk_pixbuf_new_from_stream_finish gdk_pixbuf_new_from_stream_finish; alias c_gdk_pixbuf_new_from_xpm_data gdk_pixbuf_new_from_xpm_data; alias c_gdk_pixbuf_calculate_rowstride gdk_pixbuf_calculate_rowstride; alias c_gdk_pixbuf_from_pixdata gdk_pixbuf_from_pixdata; alias c_gdk_pixbuf_get_file_info gdk_pixbuf_get_file_info; alias c_gdk_pixbuf_get_file_info_async gdk_pixbuf_get_file_info_async; alias c_gdk_pixbuf_get_file_info_finish gdk_pixbuf_get_file_info_finish; alias c_gdk_pixbuf_get_formats gdk_pixbuf_get_formats; alias c_gdk_pixbuf_new_from_stream_async gdk_pixbuf_new_from_stream_async; alias c_gdk_pixbuf_new_from_stream_at_scale_async gdk_pixbuf_new_from_stream_at_scale_async; alias c_gdk_pixbuf_save_to_stream_finish gdk_pixbuf_save_to_stream_finish; alias c_gdk_pixbuf_add_alpha gdk_pixbuf_add_alpha; alias c_gdk_pixbuf_apply_embedded_orientation gdk_pixbuf_apply_embedded_orientation; alias c_gdk_pixbuf_composite gdk_pixbuf_composite; alias c_gdk_pixbuf_composite_color gdk_pixbuf_composite_color; alias c_gdk_pixbuf_composite_color_simple gdk_pixbuf_composite_color_simple; alias c_gdk_pixbuf_copy gdk_pixbuf_copy; alias c_gdk_pixbuf_copy_area gdk_pixbuf_copy_area; alias c_gdk_pixbuf_copy_options gdk_pixbuf_copy_options; alias c_gdk_pixbuf_fill gdk_pixbuf_fill; alias c_gdk_pixbuf_flip gdk_pixbuf_flip; alias c_gdk_pixbuf_get_bits_per_sample gdk_pixbuf_get_bits_per_sample; alias c_gdk_pixbuf_get_byte_length gdk_pixbuf_get_byte_length; alias c_gdk_pixbuf_get_colorspace gdk_pixbuf_get_colorspace; alias c_gdk_pixbuf_get_has_alpha gdk_pixbuf_get_has_alpha; alias c_gdk_pixbuf_get_height gdk_pixbuf_get_height; alias c_gdk_pixbuf_get_n_channels gdk_pixbuf_get_n_channels; alias c_gdk_pixbuf_get_option gdk_pixbuf_get_option; alias c_gdk_pixbuf_get_options gdk_pixbuf_get_options; alias c_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels; alias c_gdk_pixbuf_get_pixels_with_length gdk_pixbuf_get_pixels_with_length; alias c_gdk_pixbuf_get_rowstride gdk_pixbuf_get_rowstride; alias c_gdk_pixbuf_get_width gdk_pixbuf_get_width; alias c_gdk_pixbuf_new_subpixbuf gdk_pixbuf_new_subpixbuf; alias c_gdk_pixbuf_read_pixel_bytes gdk_pixbuf_read_pixel_bytes; alias c_gdk_pixbuf_read_pixels gdk_pixbuf_read_pixels; alias c_gdk_pixbuf_ref gdk_pixbuf_ref; alias c_gdk_pixbuf_remove_option gdk_pixbuf_remove_option; alias c_gdk_pixbuf_rotate_simple gdk_pixbuf_rotate_simple; alias c_gdk_pixbuf_saturate_and_pixelate gdk_pixbuf_saturate_and_pixelate; alias c_gdk_pixbuf_save gdk_pixbuf_save; alias c_gdk_pixbuf_save_to_buffer gdk_pixbuf_save_to_buffer; alias c_gdk_pixbuf_save_to_bufferv gdk_pixbuf_save_to_bufferv; alias c_gdk_pixbuf_save_to_callback gdk_pixbuf_save_to_callback; alias c_gdk_pixbuf_save_to_callbackv gdk_pixbuf_save_to_callbackv; alias c_gdk_pixbuf_save_to_stream gdk_pixbuf_save_to_stream; alias c_gdk_pixbuf_save_to_stream_async gdk_pixbuf_save_to_stream_async; alias c_gdk_pixbuf_save_to_streamv gdk_pixbuf_save_to_streamv; alias c_gdk_pixbuf_save_to_streamv_async gdk_pixbuf_save_to_streamv_async; alias c_gdk_pixbuf_savev gdk_pixbuf_savev; alias c_gdk_pixbuf_scale gdk_pixbuf_scale; alias c_gdk_pixbuf_scale_simple gdk_pixbuf_scale_simple; alias c_gdk_pixbuf_set_option gdk_pixbuf_set_option; alias c_gdk_pixbuf_unref gdk_pixbuf_unref; // gdkpixbuf.PixbufAnimation alias c_gdk_pixbuf_animation_get_type gdk_pixbuf_animation_get_type; alias c_gdk_pixbuf_animation_new_from_file gdk_pixbuf_animation_new_from_file; alias c_gdk_pixbuf_animation_new_from_resource gdk_pixbuf_animation_new_from_resource; alias c_gdk_pixbuf_animation_new_from_stream gdk_pixbuf_animation_new_from_stream; alias c_gdk_pixbuf_animation_new_from_stream_finish gdk_pixbuf_animation_new_from_stream_finish; alias c_gdk_pixbuf_animation_new_from_stream_async gdk_pixbuf_animation_new_from_stream_async; alias c_gdk_pixbuf_animation_get_height gdk_pixbuf_animation_get_height; alias c_gdk_pixbuf_animation_get_iter gdk_pixbuf_animation_get_iter; alias c_gdk_pixbuf_animation_get_static_image gdk_pixbuf_animation_get_static_image; alias c_gdk_pixbuf_animation_get_width gdk_pixbuf_animation_get_width; alias c_gdk_pixbuf_animation_is_static_image gdk_pixbuf_animation_is_static_image; alias c_gdk_pixbuf_animation_ref gdk_pixbuf_animation_ref; alias c_gdk_pixbuf_animation_unref gdk_pixbuf_animation_unref; // gdkpixbuf.PixbufAnimationIter alias c_gdk_pixbuf_animation_iter_get_type gdk_pixbuf_animation_iter_get_type; alias c_gdk_pixbuf_animation_iter_advance gdk_pixbuf_animation_iter_advance; alias c_gdk_pixbuf_animation_iter_get_delay_time gdk_pixbuf_animation_iter_get_delay_time; alias c_gdk_pixbuf_animation_iter_get_pixbuf gdk_pixbuf_animation_iter_get_pixbuf; alias c_gdk_pixbuf_animation_iter_on_currently_loading_frame gdk_pixbuf_animation_iter_on_currently_loading_frame; // gdkpixbuf.PixbufFormat alias c_gdk_pixbuf_format_get_type gdk_pixbuf_format_get_type; alias c_gdk_pixbuf_format_copy gdk_pixbuf_format_copy; alias c_gdk_pixbuf_format_free gdk_pixbuf_format_free; alias c_gdk_pixbuf_format_get_description gdk_pixbuf_format_get_description; alias c_gdk_pixbuf_format_get_extensions gdk_pixbuf_format_get_extensions; alias c_gdk_pixbuf_format_get_license gdk_pixbuf_format_get_license; alias c_gdk_pixbuf_format_get_mime_types gdk_pixbuf_format_get_mime_types; alias c_gdk_pixbuf_format_get_name gdk_pixbuf_format_get_name; alias c_gdk_pixbuf_format_is_disabled gdk_pixbuf_format_is_disabled; alias c_gdk_pixbuf_format_is_save_option_supported gdk_pixbuf_format_is_save_option_supported; alias c_gdk_pixbuf_format_is_scalable gdk_pixbuf_format_is_scalable; alias c_gdk_pixbuf_format_is_writable gdk_pixbuf_format_is_writable; alias c_gdk_pixbuf_format_set_disabled gdk_pixbuf_format_set_disabled; // gdkpixbuf.PixbufLoader alias c_gdk_pixbuf_loader_get_type gdk_pixbuf_loader_get_type; alias c_gdk_pixbuf_loader_new gdk_pixbuf_loader_new; alias c_gdk_pixbuf_loader_new_with_mime_type gdk_pixbuf_loader_new_with_mime_type; alias c_gdk_pixbuf_loader_new_with_type gdk_pixbuf_loader_new_with_type; alias c_gdk_pixbuf_loader_close gdk_pixbuf_loader_close; alias c_gdk_pixbuf_loader_get_animation gdk_pixbuf_loader_get_animation; alias c_gdk_pixbuf_loader_get_format gdk_pixbuf_loader_get_format; alias c_gdk_pixbuf_loader_get_pixbuf gdk_pixbuf_loader_get_pixbuf; alias c_gdk_pixbuf_loader_set_size gdk_pixbuf_loader_set_size; alias c_gdk_pixbuf_loader_write gdk_pixbuf_loader_write; alias c_gdk_pixbuf_loader_write_bytes gdk_pixbuf_loader_write_bytes; // gdkpixbuf.PixbufSimpleAnimation alias c_gdk_pixbuf_simple_anim_get_type gdk_pixbuf_simple_anim_get_type; alias c_gdk_pixbuf_simple_anim_new gdk_pixbuf_simple_anim_new; alias c_gdk_pixbuf_simple_anim_add_frame gdk_pixbuf_simple_anim_add_frame; alias c_gdk_pixbuf_simple_anim_get_loop gdk_pixbuf_simple_anim_get_loop; alias c_gdk_pixbuf_simple_anim_set_loop gdk_pixbuf_simple_anim_set_loop; // gdkpixbuf.PixbufSimpleAnimationIter alias c_gdk_pixbuf_simple_anim_iter_get_type gdk_pixbuf_simple_anim_iter_get_type; // gdkpixbuf.Pixdata alias c_gdk_pixdata_deserialize gdk_pixdata_deserialize; alias c_gdk_pixdata_from_pixbuf gdk_pixdata_from_pixbuf; alias c_gdk_pixdata_serialize gdk_pixdata_serialize; alias c_gdk_pixdata_to_csource gdk_pixdata_to_csource; GtkD-3.7.5/generated/gtkd/gdkpixbuf/c/types.d000066400000000000000000000266501324604450400207770ustar00rootroot00000000000000/* * 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 gdkpixbuf.c.types; public import gio.c.types; public import glib.c.types; public import gobject.c.types; /** * This enumeration defines the color spaces that are supported by * the gdk-pixbuf library. Currently only RGB is supported. */ public enum GdkColorspace { /** * Indicates a red/green/blue additive color space. */ RGB = 0, } alias GdkColorspace Colorspace; /** * This enumeration describes the different interpolation modes that * can be used with the scaling functions. @GDK_INTERP_NEAREST is * the fastest scaling method, but has horrible quality when * scaling down. @GDK_INTERP_BILINEAR is the best choice if you * aren't sure what to choose, it has a good speed/quality balance. * * * Cubic filtering is missing from the list; hyperbolic * interpolation is just as fast and results in higher quality. * */ public enum GdkInterpType { /** * Nearest neighbor sampling; this is the fastest * and lowest quality mode. Quality is normally unacceptable when scaling * down, but may be OK when scaling up. */ NEAREST = 0, /** * This is an accurate simulation of the PostScript * image operator without any interpolation enabled. Each pixel is * rendered as a tiny parallelogram of solid color, the edges of which * are implemented with antialiasing. It resembles nearest neighbor for * enlargement, and bilinear for reduction. */ TILES = 1, /** * Best quality/speed balance; use this mode by * default. Bilinear interpolation. For enlargement, it is * equivalent to point-sampling the ideal bilinear-interpolated image. * For reduction, it is equivalent to laying down small tiles and * integrating over the coverage area. */ BILINEAR = 2, /** * This is the slowest and highest quality * reconstruction function. It is derived from the hyperbolic filters in * Wolberg's "Digital Image Warping", and is formally defined as the * hyperbolic-filter sampling the ideal hyperbolic-filter interpolated * image (the filter is designed to be idempotent for 1:1 pixel mapping). */ HYPER = 3, } alias GdkInterpType InterpType; /** * These values can be passed to * gdk_pixbuf_xlib_render_to_drawable_alpha() to control how the alpha * channel of an image should be handled. This function can create a * bilevel clipping mask (black and white) and use it while painting * the image. In the future, when the X Window System gets an alpha * channel extension, it will be possible to do full alpha * compositing onto arbitrary drawables. For now both cases fall * back to a bilevel clipping mask. */ public enum GdkPixbufAlphaMode { /** * A bilevel clipping mask (black and white) * will be created and used to draw the image. Pixels below 0.5 opacity * will be considered fully transparent, and all others will be * considered fully opaque. */ BILEVEL = 0, /** * For now falls back to #GDK_PIXBUF_ALPHA_BILEVEL. * In the future it will do full alpha compositing. */ FULL = 1, } alias GdkPixbufAlphaMode PixbufAlphaMode; /** * An error code in the #GDK_PIXBUF_ERROR domain. Many gdk-pixbuf * operations can cause errors in this domain, or in the #G_FILE_ERROR * domain. */ public enum GdkPixbufError { /** * An image file was broken somehow. */ CORRUPT_IMAGE = 0, /** * Not enough memory. */ INSUFFICIENT_MEMORY = 1, /** * A bad option was passed to a pixbuf save module. */ BAD_OPTION = 2, /** * Unknown image type. */ UNKNOWN_TYPE = 3, /** * Don't know how to perform the * given operation on the type of image at hand. */ UNSUPPORTED_OPERATION = 4, /** * Generic failure code, something went wrong. */ FAILED = 5, /** * Only part of the animation was loaded. */ INCOMPLETE_ANIMATION = 6, } alias GdkPixbufError PixbufError; /** * The possible rotations which can be passed to gdk_pixbuf_rotate_simple(). * To make them easier to use, their numerical values are the actual degrees. */ public enum GdkPixbufRotation { /** * No rotation. */ NONE = 0, /** * Rotate by 90 degrees. */ COUNTERCLOCKWISE = 90, /** * Rotate by 180 degrees. */ UPSIDEDOWN = 180, /** * Rotate by 270 degrees. */ CLOCKWISE = 270, } alias GdkPixbufRotation PixbufRotation; /** * An enumeration which is used by gdk_pixdata_to_csource() to * determine the form of C source to be generated. The three values * @GDK_PIXDATA_DUMP_PIXDATA_STREAM, @GDK_PIXDATA_DUMP_PIXDATA_STRUCT * and @GDK_PIXDATA_DUMP_MACROS are mutually exclusive, as are * @GDK_PIXBUF_DUMP_GTYPES and @GDK_PIXBUF_DUMP_CTYPES. The remaining * elements are optional flags that can be freely added. */ public enum GdkPixdataDumpType { /** * Generate pixbuf data stream (a single * string containing a serialized #GdkPixdata structure in network byte * order). */ PIXDATA_STREAM = 0, /** * Generate #GdkPixdata structure (needs * the #GdkPixdata structure definition from gdk-pixdata.h). */ PIXDATA_STRUCT = 1, /** * Generate *_ROWSTRIDE, * *_WIDTH, *_HEIGHT, * *_BYTES_PER_PIXEL and * *_RLE_PIXEL_DATA or *_PIXEL_DATA * macro definitions for the image. */ MACROS = 2, /** * Generate GLib data types instead of * standard C data types. */ GTYPES = 0, /** * Generate standard C data types instead of * GLib data types. */ CTYPES = 256, /** * Generate static symbols. */ STATIC = 512, /** * Generate const symbols. */ CONST = 1024, /** * Provide a *_RUN_LENGTH_DECODE(image_buf, rle_data, size, bpp) * macro definition to decode run-length encoded image data. */ RLE_DECODER = 65536, } alias GdkPixdataDumpType PixdataDumpType; /** * An enumeration containing three sets of flags for a #GdkPixdata struct: * one for the used colorspace, one for the width of the samples and one * for the encoding of the pixel data. */ public enum GdkPixdataType { /** * each pixel has red, green and blue samples. */ COLOR_TYPE_RGB = 1, /** * each pixel has red, green and blue samples * and an alpha value. */ COLOR_TYPE_RGBA = 2, /** * mask for the colortype flags of the enum. */ COLOR_TYPE_MASK = 255, /** * each sample has 8 bits. */ SAMPLE_WIDTH_8 = 65536, /** * mask for the sample width flags of the enum. */ SAMPLE_WIDTH_MASK = 983040, /** * the pixel data is in raw form. */ ENCODING_RAW = 16777216, /** * the pixel data is run-length encoded. Runs may * be up to 127 bytes long; their length is stored in a single byte * preceding the pixel data for the run. If a run is constant, its length * byte has the high bit set and the pixel data consists of a single pixel * which must be repeated. */ ENCODING_RLE = 33554432, /** * mask for the encoding flags of the enum. */ ENCODING_MASK = 251658240, } alias GdkPixdataType PixdataType; struct GdkPixbuf; struct GdkPixbufAnimation; struct GdkPixbufAnimationIter; struct GdkPixbufFormat; struct GdkPixbufLoader { GObject parentInstance; void* priv; } struct GdkPixbufLoaderClass { GObjectClass parentClass; /** */ extern(C) void function(GdkPixbufLoader* loader, int width, int height) sizePrepared; /** */ extern(C) void function(GdkPixbufLoader* loader) areaPrepared; /** */ extern(C) void function(GdkPixbufLoader* loader, int x, int y, int width, int height) areaUpdated; /** */ extern(C) void function(GdkPixbufLoader* loader) closed; } struct GdkPixbufSimpleAnim; struct GdkPixbufSimpleAnimClass; struct GdkPixdata { /** * magic number. A valid #GdkPixdata structure must have * #GDK_PIXBUF_MAGIC_NUMBER here. */ uint magic; /** * less than 1 to disable length checks, otherwise * #GDK_PIXDATA_HEADER_LENGTH + length of @pixel_data. */ int length; /** * information about colorspace, sample width and * encoding, in a #GdkPixdataType. */ uint pixdataType; /** * Distance in bytes between rows. */ uint rowstride; /** * Width of the image in pixels. */ uint width; /** * Height of the image in pixels. */ uint height; /** * @width x @height pixels, encoded according to @pixdata_type * and @rowstride. */ ubyte* pixelData; } /** * A function of this type is responsible for freeing the pixel array * of a pixbuf. The gdk_pixbuf_new_from_data() function lets you * pass in a pre-allocated pixel array so that a pixbuf can be * created from it; in this case you will need to pass in a function * of #GdkPixbufDestroyNotify so that the pixel data can be freed * when the pixbuf is finalized. * * Params: * pixels = The pixel array of the pixbuf * that is being finalized. * data = User closure data. */ public alias extern(C) void function(char* pixels, void* data) GdkPixbufDestroyNotify; /** * Specifies the type of the function passed to * gdk_pixbuf_save_to_callback(). It is called once for each block of * bytes that is "written" by gdk_pixbuf_save_to_callback(). If * successful it should return %TRUE. If an error occurs it should set * @error and return %FALSE, in which case gdk_pixbuf_save_to_callback() * will fail with the same error. * * Params: * buf = bytes to be written. * count = number of bytes in @buf. * error = A location to return an error. * data = user data passed to gdk_pixbuf_save_to_callback(). * * Returns: %TRUE if successful, %FALSE (with @error set) if failed. * * Since: 2.4 */ public alias extern(C) int function(char* buf, size_t count, GError** error, void* data) GdkPixbufSaveFunc; enum PIXBUF_FEATURES_H = 1; alias GDK_PIXBUF_FEATURES_H = PIXBUF_FEATURES_H; /** * Magic number for #GdkPixdata structures. */ enum PIXBUF_MAGIC_NUMBER = 1197763408; alias GDK_PIXBUF_MAGIC_NUMBER = PIXBUF_MAGIC_NUMBER; /** * Major version of gdk-pixbuf library, that is the "0" in * "0.8.2" for example. */ enum PIXBUF_MAJOR = 2; alias GDK_PIXBUF_MAJOR = PIXBUF_MAJOR; /** * Micro version of gdk-pixbuf library, that is the "2" in * "0.8.2" for example. */ enum PIXBUF_MICRO = 10; alias GDK_PIXBUF_MICRO = PIXBUF_MICRO; /** * Minor version of gdk-pixbuf library, that is the "8" in * "0.8.2" for example. */ enum PIXBUF_MINOR = 36; alias GDK_PIXBUF_MINOR = PIXBUF_MINOR; /** * Contains the full version of the gdk-pixbuf header as a string. * This is the version being compiled against; contrast with * #gdk_pixbuf_version. */ enum PIXBUF_VERSION = "2.36.10"; alias GDK_PIXBUF_VERSION = PIXBUF_VERSION; /** * The length of a #GdkPixdata structure without the @pixel_data pointer. */ enum PIXDATA_HEADER_LENGTH = 24; alias GDK_PIXDATA_HEADER_LENGTH = PIXDATA_HEADER_LENGTH; GtkD-3.7.5/generated/gtkd/gio/000077500000000000000000000000001324604450400160265ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gio/ActionGroupIF.d000066400000000000000000000337601324604450400206550ustar00rootroot00000000000000/* * 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 gio.ActionGroupIF; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GActionGroup represents a group of actions. Actions can be used to * expose functionality in a structured way, either from one part of a * program to another, or to the outside world. Action groups are often * used together with a #GMenuModel that provides additional * representation data for displaying the actions to the user, e.g. in * a menu. * * The main way to interact with the actions in a GActionGroup is to * activate them with g_action_group_activate_action(). Activating an * action may require a #GVariant parameter. The required type of the * parameter can be inquired with g_action_group_get_action_parameter_type(). * Actions may be disabled, see g_action_group_get_action_enabled(). * Activating a disabled action has no effect. * * Actions may optionally have a state in the form of a #GVariant. The * current state of an action can be inquired with * g_action_group_get_action_state(). Activating a stateful action may * change its state, but it is also possible to set the state by calling * g_action_group_change_action_state(). * * As typical example, consider a text editing application which has an * option to change the current font to 'bold'. A good way to represent * this would be a stateful action, with a boolean state. Activating the * action would toggle the state. * * Each action in the group has a unique name (which is a string). All * method calls, except g_action_group_list_actions() take the name of * an action as an argument. * * The #GActionGroup API is meant to be the 'public' API to the action * group. The calls here are exactly the interaction that 'external * forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have * with actions. 'Internal' APIs (ie: ones meant only to be accessed by * the action group implementation) are found on subclasses. This is * why you will find - for example - g_action_group_get_action_enabled() * but not an equivalent set() call. * * Signals are emitted on the action group in response to state changes * on individual actions. * * Implementations of #GActionGroup should provide implementations for * the virtual functions g_action_group_list_actions() and * g_action_group_query_action(). The other virtual functions should * not be implemented - their "wrappers" are actually implemented with * calls to g_action_group_query_action(). */ public interface ActionGroupIF{ /** Get the main Gtk struct */ public GActionGroup* getActionGroupStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_action_group_get_type(); } /** * Emits the #GActionGroup::action-added signal on @action_group. * * This function should only be called by #GActionGroup implementations. * * Params: * actionName = the name of an action in the group * * Since: 2.28 */ public void actionAdded(string actionName); /** * Emits the #GActionGroup::action-enabled-changed signal on @action_group. * * This function should only be called by #GActionGroup implementations. * * Params: * actionName = the name of an action in the group * enabled = whether or not the action is now enabled * * Since: 2.28 */ public void actionEnabledChanged(string actionName, bool enabled); /** * Emits the #GActionGroup::action-removed signal on @action_group. * * This function should only be called by #GActionGroup implementations. * * Params: * actionName = the name of an action in the group * * Since: 2.28 */ public void actionRemoved(string actionName); /** * Emits the #GActionGroup::action-state-changed signal on @action_group. * * This function should only be called by #GActionGroup implementations. * * Params: * actionName = the name of an action in the group * state = the new state of the named action * * Since: 2.28 */ public void actionStateChanged(string actionName, Variant state); /** * Activate the named action within @action_group. * * If the action is expecting a parameter, then the correct type of * parameter must be given as @parameter. If the action is expecting no * parameters then @parameter must be %NULL. See * g_action_group_get_action_parameter_type(). * * Params: * actionName = the name of the action to activate * parameter = parameters to the activation * * Since: 2.28 */ public void activateAction(string actionName, Variant parameter); /** * Request for the state of the named action within @action_group to be * changed to @value. * * The action must be stateful and @value must be of the correct type. * See g_action_group_get_action_state_type(). * * This call merely requests a change. The action may refuse to change * its state or may change its state to something other than @value. * See g_action_group_get_action_state_hint(). * * If the @value GVariant is floating, it is consumed. * * Params: * actionName = the name of the action to request the change on * value = the new state * * Since: 2.28 */ public void changeActionState(string actionName, Variant value); /** * Checks if the named action within @action_group is currently enabled. * * An action must be enabled in order to be activated or in order to * have its state changed from outside callers. * * Params: * actionName = the name of the action to query * * Returns: whether or not the action is currently enabled * * Since: 2.28 */ public bool getActionEnabled(string actionName); /** * Queries the type of the parameter that must be given when activating * the named action within @action_group. * * When activating the action using g_action_group_activate_action(), * the #GVariant given to that function must be of the type returned * by this function. * * In the case that this function returns %NULL, you must not give any * #GVariant, but %NULL instead. * * The parameter type of a particular action will never change but it is * possible for an action to be removed and for a new action to be added * with the same name but a different parameter type. * * Params: * actionName = the name of the action to query * * Returns: the parameter type * * Since: 2.28 */ public VariantType getActionParameterType(string actionName); /** * Queries the current state of the named action within @action_group. * * If the action is not stateful then %NULL will be returned. If the * action is stateful then the type of the return value is the type * given by g_action_group_get_action_state_type(). * * The return value (if non-%NULL) should be freed with * g_variant_unref() when it is no longer required. * * Params: * actionName = the name of the action to query * * Returns: the current state of the action * * Since: 2.28 */ public Variant getActionState(string actionName); /** * Requests a hint about the valid range of values for the state of the * named action within @action_group. * * If %NULL is returned it either means that the action is not stateful * or that there is no hint about the valid range of values for the * state of the action. * * If a #GVariant array is returned then each item in the array is a * possible value for the state. If a #GVariant pair (ie: two-tuple) is * returned then the tuple specifies the inclusive lower and upper bound * of valid values for the state. * * In any case, the information is merely a hint. It may be possible to * have a state value outside of the hinted range and setting a value * within the range may fail. * * The return value (if non-%NULL) should be freed with * g_variant_unref() when it is no longer required. * * Params: * actionName = the name of the action to query * * Returns: the state range hint * * Since: 2.28 */ public Variant getActionStateHint(string actionName); /** * Queries the type of the state of the named action within * @action_group. * * If the action is stateful then this function returns the * #GVariantType of the state. All calls to * g_action_group_change_action_state() must give a #GVariant of this * type and g_action_group_get_action_state() will return a #GVariant * of the same type. * * If the action is not stateful then this function will return %NULL. * In that case, g_action_group_get_action_state() will return %NULL * and you must not call g_action_group_change_action_state(). * * The state type of a particular action will never change but it is * possible for an action to be removed and for a new action to be added * with the same name but a different state type. * * Params: * actionName = the name of the action to query * * Returns: the state type, if the action is stateful * * Since: 2.28 */ public VariantType getActionStateType(string actionName); /** * Checks if the named action exists within @action_group. * * Params: * actionName = the name of the action to check for * * Returns: whether the named action exists * * Since: 2.28 */ public bool hasAction(string actionName); /** * Lists the actions contained within @action_group. * * The caller is responsible for freeing the list with g_strfreev() when * it is no longer required. * * Returns: a %NULL-terminated array of the names of the * actions in the group * * Since: 2.28 */ public string[] listActions(); /** * Queries all aspects of the named action within an @action_group. * * This function acquires the information available from * g_action_group_has_action(), g_action_group_get_action_enabled(), * g_action_group_get_action_parameter_type(), * g_action_group_get_action_state_type(), * g_action_group_get_action_state_hint() and * g_action_group_get_action_state() with a single function call. * * This provides two main benefits. * * The first is the improvement in efficiency that comes with not having * to perform repeated lookups of the action in order to discover * different things about it. The second is that implementing * #GActionGroup can now be done by only overriding this one virtual * function. * * The interface provides a default implementation of this function that * calls the individual functions, as required, to fetch the * information. The interface also provides default implementations of * those functions that call this function. All implementations, * therefore, must override either this function or all of the others. * * If the action exists, %TRUE is returned and any of the requested * fields (as indicated by having a non-%NULL reference passed in) are * filled. If the action doesn't exist, %FALSE is returned and the * fields may or may not have been modified. * * Params: * actionName = the name of an action in the group * enabled = if the action is presently enabled * parameterType = the parameter type, or %NULL if none needed * stateType = the state type, or %NULL if stateless * stateHint = the state hint, or %NULL if none * state = the current state, or %NULL if stateless * * Returns: %TRUE if the action exists, else %FALSE * * Since: 2.32 */ public bool queryAction(string actionName, out bool enabled, out VariantType parameterType, out VariantType stateType, out Variant stateHint, out Variant state); /** * Signals that a new action was just added to the group. * This signal is emitted after the action has been added * and is now visible. * * Params: * actionName = the name of the action in @action_group * * Since: 2.28 */ gulong addOnActionAdded(void delegate(string, ActionGroupIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Signals that the enabled status of the named action has changed. * * Params: * actionName = the name of the action in @action_group * enabled = whether the action is enabled or not * * Since: 2.28 */ gulong addOnActionEnabledChanged(void delegate(string, bool, ActionGroupIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Signals that an action is just about to be removed from the group. * This signal is emitted before the action is removed, so the action * is still visible and can be queried from the signal handler. * * Params: * actionName = the name of the action in @action_group * * Since: 2.28 */ gulong addOnActionRemoved(void delegate(string, ActionGroupIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Signals that the state of the named action has changed. * * Params: * actionName = the name of the action in @action_group * value = the new value of the state * * Since: 2.28 */ gulong addOnActionStateChanged(void delegate(string, Variant, ActionGroupIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/gio/ActionGroupT.d000066400000000000000000000527601324604450400205630ustar00rootroot00000000000000/* * 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 gio.ActionGroupT; public import gio.c.functions; public import gio.c.types; public import glib.Str; public import glib.Variant; public import glib.VariantType; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; /** * #GActionGroup represents a group of actions. Actions can be used to * expose functionality in a structured way, either from one part of a * program to another, or to the outside world. Action groups are often * used together with a #GMenuModel that provides additional * representation data for displaying the actions to the user, e.g. in * a menu. * * The main way to interact with the actions in a GActionGroup is to * activate them with g_action_group_activate_action(). Activating an * action may require a #GVariant parameter. The required type of the * parameter can be inquired with g_action_group_get_action_parameter_type(). * Actions may be disabled, see g_action_group_get_action_enabled(). * Activating a disabled action has no effect. * * Actions may optionally have a state in the form of a #GVariant. The * current state of an action can be inquired with * g_action_group_get_action_state(). Activating a stateful action may * change its state, but it is also possible to set the state by calling * g_action_group_change_action_state(). * * As typical example, consider a text editing application which has an * option to change the current font to 'bold'. A good way to represent * this would be a stateful action, with a boolean state. Activating the * action would toggle the state. * * Each action in the group has a unique name (which is a string). All * method calls, except g_action_group_list_actions() take the name of * an action as an argument. * * The #GActionGroup API is meant to be the 'public' API to the action * group. The calls here are exactly the interaction that 'external * forces' (eg: UI, incoming D-Bus messages, etc.) are supposed to have * with actions. 'Internal' APIs (ie: ones meant only to be accessed by * the action group implementation) are found on subclasses. This is * why you will find - for example - g_action_group_get_action_enabled() * but not an equivalent set() call. * * Signals are emitted on the action group in response to state changes * on individual actions. * * Implementations of #GActionGroup should provide implementations for * the virtual functions g_action_group_list_actions() and * g_action_group_query_action(). The other virtual functions should * not be implemented - their "wrappers" are actually implemented with * calls to g_action_group_query_action(). */ public template ActionGroupT(TStruct) { /** Get the main Gtk struct */ public GActionGroup* getActionGroupStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GActionGroup*)getStruct(); } /** * Emits the #GActionGroup::action-added signal on @action_group. * * This function should only be called by #GActionGroup implementations. * * Params: * actionName = the name of an action in the group * * Since: 2.28 */ public void actionAdded(string actionName) { g_action_group_action_added(getActionGroupStruct(), Str.toStringz(actionName)); } /** * Emits the #GActionGroup::action-enabled-changed signal on @action_group. * * This function should only be called by #GActionGroup implementations. * * Params: * actionName = the name of an action in the group * enabled = whether or not the action is now enabled * * Since: 2.28 */ public void actionEnabledChanged(string actionName, bool enabled) { g_action_group_action_enabled_changed(getActionGroupStruct(), Str.toStringz(actionName), enabled); } /** * Emits the #GActionGroup::action-removed signal on @action_group. * * This function should only be called by #GActionGroup implementations. * * Params: * actionName = the name of an action in the group * * Since: 2.28 */ public void actionRemoved(string actionName) { g_action_group_action_removed(getActionGroupStruct(), Str.toStringz(actionName)); } /** * Emits the #GActionGroup::action-state-changed signal on @action_group. * * This function should only be called by #GActionGroup implementations. * * Params: * actionName = the name of an action in the group * state = the new state of the named action * * Since: 2.28 */ public void actionStateChanged(string actionName, Variant state) { g_action_group_action_state_changed(getActionGroupStruct(), Str.toStringz(actionName), (state is null) ? null : state.getVariantStruct()); } /** * Activate the named action within @action_group. * * If the action is expecting a parameter, then the correct type of * parameter must be given as @parameter. If the action is expecting no * parameters then @parameter must be %NULL. See * g_action_group_get_action_parameter_type(). * * Params: * actionName = the name of the action to activate * parameter = parameters to the activation * * Since: 2.28 */ public void activateAction(string actionName, Variant parameter) { g_action_group_activate_action(getActionGroupStruct(), Str.toStringz(actionName), (parameter is null) ? null : parameter.getVariantStruct()); } /** * Request for the state of the named action within @action_group to be * changed to @value. * * The action must be stateful and @value must be of the correct type. * See g_action_group_get_action_state_type(). * * This call merely requests a change. The action may refuse to change * its state or may change its state to something other than @value. * See g_action_group_get_action_state_hint(). * * If the @value GVariant is floating, it is consumed. * * Params: * actionName = the name of the action to request the change on * value = the new state * * Since: 2.28 */ public void changeActionState(string actionName, Variant value) { g_action_group_change_action_state(getActionGroupStruct(), Str.toStringz(actionName), (value is null) ? null : value.getVariantStruct()); } /** * Checks if the named action within @action_group is currently enabled. * * An action must be enabled in order to be activated or in order to * have its state changed from outside callers. * * Params: * actionName = the name of the action to query * * Returns: whether or not the action is currently enabled * * Since: 2.28 */ public bool getActionEnabled(string actionName) { return g_action_group_get_action_enabled(getActionGroupStruct(), Str.toStringz(actionName)) != 0; } /** * Queries the type of the parameter that must be given when activating * the named action within @action_group. * * When activating the action using g_action_group_activate_action(), * the #GVariant given to that function must be of the type returned * by this function. * * In the case that this function returns %NULL, you must not give any * #GVariant, but %NULL instead. * * The parameter type of a particular action will never change but it is * possible for an action to be removed and for a new action to be added * with the same name but a different parameter type. * * Params: * actionName = the name of the action to query * * Returns: the parameter type * * Since: 2.28 */ public VariantType getActionParameterType(string actionName) { auto p = g_action_group_get_action_parameter_type(getActionGroupStruct(), Str.toStringz(actionName)); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Queries the current state of the named action within @action_group. * * If the action is not stateful then %NULL will be returned. If the * action is stateful then the type of the return value is the type * given by g_action_group_get_action_state_type(). * * The return value (if non-%NULL) should be freed with * g_variant_unref() when it is no longer required. * * Params: * actionName = the name of the action to query * * Returns: the current state of the action * * Since: 2.28 */ public Variant getActionState(string actionName) { auto p = g_action_group_get_action_state(getActionGroupStruct(), Str.toStringz(actionName)); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Requests a hint about the valid range of values for the state of the * named action within @action_group. * * If %NULL is returned it either means that the action is not stateful * or that there is no hint about the valid range of values for the * state of the action. * * If a #GVariant array is returned then each item in the array is a * possible value for the state. If a #GVariant pair (ie: two-tuple) is * returned then the tuple specifies the inclusive lower and upper bound * of valid values for the state. * * In any case, the information is merely a hint. It may be possible to * have a state value outside of the hinted range and setting a value * within the range may fail. * * The return value (if non-%NULL) should be freed with * g_variant_unref() when it is no longer required. * * Params: * actionName = the name of the action to query * * Returns: the state range hint * * Since: 2.28 */ public Variant getActionStateHint(string actionName) { auto p = g_action_group_get_action_state_hint(getActionGroupStruct(), Str.toStringz(actionName)); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Queries the type of the state of the named action within * @action_group. * * If the action is stateful then this function returns the * #GVariantType of the state. All calls to * g_action_group_change_action_state() must give a #GVariant of this * type and g_action_group_get_action_state() will return a #GVariant * of the same type. * * If the action is not stateful then this function will return %NULL. * In that case, g_action_group_get_action_state() will return %NULL * and you must not call g_action_group_change_action_state(). * * The state type of a particular action will never change but it is * possible for an action to be removed and for a new action to be added * with the same name but a different state type. * * Params: * actionName = the name of the action to query * * Returns: the state type, if the action is stateful * * Since: 2.28 */ public VariantType getActionStateType(string actionName) { auto p = g_action_group_get_action_state_type(getActionGroupStruct(), Str.toStringz(actionName)); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Checks if the named action exists within @action_group. * * Params: * actionName = the name of the action to check for * * Returns: whether the named action exists * * Since: 2.28 */ public bool hasAction(string actionName) { return g_action_group_has_action(getActionGroupStruct(), Str.toStringz(actionName)) != 0; } /** * Lists the actions contained within @action_group. * * The caller is responsible for freeing the list with g_strfreev() when * it is no longer required. * * Returns: a %NULL-terminated array of the names of the * actions in the group * * Since: 2.28 */ public string[] listActions() { auto retStr = g_action_group_list_actions(getActionGroupStruct()); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Queries all aspects of the named action within an @action_group. * * This function acquires the information available from * g_action_group_has_action(), g_action_group_get_action_enabled(), * g_action_group_get_action_parameter_type(), * g_action_group_get_action_state_type(), * g_action_group_get_action_state_hint() and * g_action_group_get_action_state() with a single function call. * * This provides two main benefits. * * The first is the improvement in efficiency that comes with not having * to perform repeated lookups of the action in order to discover * different things about it. The second is that implementing * #GActionGroup can now be done by only overriding this one virtual * function. * * The interface provides a default implementation of this function that * calls the individual functions, as required, to fetch the * information. The interface also provides default implementations of * those functions that call this function. All implementations, * therefore, must override either this function or all of the others. * * If the action exists, %TRUE is returned and any of the requested * fields (as indicated by having a non-%NULL reference passed in) are * filled. If the action doesn't exist, %FALSE is returned and the * fields may or may not have been modified. * * Params: * actionName = the name of an action in the group * enabled = if the action is presently enabled * parameterType = the parameter type, or %NULL if none needed * stateType = the state type, or %NULL if stateless * stateHint = the state hint, or %NULL if none * state = the current state, or %NULL if stateless * * Returns: %TRUE if the action exists, else %FALSE * * Since: 2.32 */ public bool queryAction(string actionName, out bool enabled, out VariantType parameterType, out VariantType stateType, out Variant stateHint, out Variant state) { int outenabled; GVariantType* outparameterType = null; GVariantType* outstateType = null; GVariant* outstateHint = null; GVariant* outstate = null; auto p = g_action_group_query_action(getActionGroupStruct(), Str.toStringz(actionName), &outenabled, &outparameterType, &outstateType, &outstateHint, &outstate) != 0; enabled = (outenabled == 1); parameterType = new VariantType(outparameterType); stateType = new VariantType(outstateType); stateHint = new Variant(outstateHint); state = new Variant(outstate); return p; } protected class OnActionAddedDelegateWrapper { void delegate(string, ActionGroupIF) dlg; gulong handlerId; this(void delegate(string, ActionGroupIF) dlg) { this.dlg = dlg; onActionAddedListeners ~= this; } void remove(OnActionAddedDelegateWrapper source) { foreach(index, wrapper; onActionAddedListeners) { if (wrapper.handlerId == source.handlerId) { onActionAddedListeners[index] = null; onActionAddedListeners = std.algorithm.remove(onActionAddedListeners, index); break; } } } } OnActionAddedDelegateWrapper[] onActionAddedListeners; /** * Signals that a new action was just added to the group. * This signal is emitted after the action has been added * and is now visible. * * Params: * actionName = the name of the action in @action_group * * Since: 2.28 */ gulong addOnActionAdded(void delegate(string, ActionGroupIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActionAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "action-added", cast(GCallback)&callBackActionAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackActionAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActionAdded(GActionGroup* actiongroupStruct, char* actionName, OnActionAddedDelegateWrapper wrapper) { wrapper.dlg(Str.toString(actionName), wrapper.outer); } extern(C) static void callBackActionAddedDestroy(OnActionAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnActionEnabledChangedDelegateWrapper { void delegate(string, bool, ActionGroupIF) dlg; gulong handlerId; this(void delegate(string, bool, ActionGroupIF) dlg) { this.dlg = dlg; onActionEnabledChangedListeners ~= this; } void remove(OnActionEnabledChangedDelegateWrapper source) { foreach(index, wrapper; onActionEnabledChangedListeners) { if (wrapper.handlerId == source.handlerId) { onActionEnabledChangedListeners[index] = null; onActionEnabledChangedListeners = std.algorithm.remove(onActionEnabledChangedListeners, index); break; } } } } OnActionEnabledChangedDelegateWrapper[] onActionEnabledChangedListeners; /** * Signals that the enabled status of the named action has changed. * * Params: * actionName = the name of the action in @action_group * enabled = whether the action is enabled or not * * Since: 2.28 */ gulong addOnActionEnabledChanged(void delegate(string, bool, ActionGroupIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActionEnabledChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "action-enabled-changed", cast(GCallback)&callBackActionEnabledChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackActionEnabledChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActionEnabledChanged(GActionGroup* actiongroupStruct, char* actionName, bool enabled, OnActionEnabledChangedDelegateWrapper wrapper) { wrapper.dlg(Str.toString(actionName), enabled, wrapper.outer); } extern(C) static void callBackActionEnabledChangedDestroy(OnActionEnabledChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnActionRemovedDelegateWrapper { void delegate(string, ActionGroupIF) dlg; gulong handlerId; this(void delegate(string, ActionGroupIF) dlg) { this.dlg = dlg; onActionRemovedListeners ~= this; } void remove(OnActionRemovedDelegateWrapper source) { foreach(index, wrapper; onActionRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onActionRemovedListeners[index] = null; onActionRemovedListeners = std.algorithm.remove(onActionRemovedListeners, index); break; } } } } OnActionRemovedDelegateWrapper[] onActionRemovedListeners; /** * Signals that an action is just about to be removed from the group. * This signal is emitted before the action is removed, so the action * is still visible and can be queried from the signal handler. * * Params: * actionName = the name of the action in @action_group * * Since: 2.28 */ gulong addOnActionRemoved(void delegate(string, ActionGroupIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActionRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "action-removed", cast(GCallback)&callBackActionRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackActionRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActionRemoved(GActionGroup* actiongroupStruct, char* actionName, OnActionRemovedDelegateWrapper wrapper) { wrapper.dlg(Str.toString(actionName), wrapper.outer); } extern(C) static void callBackActionRemovedDestroy(OnActionRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnActionStateChangedDelegateWrapper { void delegate(string, Variant, ActionGroupIF) dlg; gulong handlerId; this(void delegate(string, Variant, ActionGroupIF) dlg) { this.dlg = dlg; onActionStateChangedListeners ~= this; } void remove(OnActionStateChangedDelegateWrapper source) { foreach(index, wrapper; onActionStateChangedListeners) { if (wrapper.handlerId == source.handlerId) { onActionStateChangedListeners[index] = null; onActionStateChangedListeners = std.algorithm.remove(onActionStateChangedListeners, index); break; } } } } OnActionStateChangedDelegateWrapper[] onActionStateChangedListeners; /** * Signals that the state of the named action has changed. * * Params: * actionName = the name of the action in @action_group * value = the new value of the state * * Since: 2.28 */ gulong addOnActionStateChanged(void delegate(string, Variant, ActionGroupIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActionStateChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "action-state-changed", cast(GCallback)&callBackActionStateChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackActionStateChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActionStateChanged(GActionGroup* actiongroupStruct, char* actionName, GVariant* value, OnActionStateChangedDelegateWrapper wrapper) { wrapper.dlg(Str.toString(actionName), new Variant(value), wrapper.outer); } extern(C) static void callBackActionStateChangedDestroy(OnActionStateChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/ActionIF.d000066400000000000000000000242051324604450400176320ustar00rootroot00000000000000/* * 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 gio.ActionIF; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; private import glib.VariantType; public import gtkc.giotypes; /** * #GAction represents a single named action. * * The main interface to an action is that it can be activated with * g_action_activate(). This results in the 'activate' signal being * emitted. An activation has a #GVariant parameter (which may be * %NULL). The correct type for the parameter is determined by a static * parameter type (which is given at construction time). * * An action may optionally have a state, in which case the state may be * set with g_action_change_state(). This call takes a #GVariant. The * correct type for the state is determined by a static state type * (which is given at construction time). * * The state may have a hint associated with it, specifying its valid * range. * * #GAction is merely the interface to the concept of an action, as * described above. Various implementations of actions exist, including * #GSimpleAction. * * In all cases, the implementing class is responsible for storing the * name of the action, the parameter type, the enabled state, the * optional state type and the state and emitting the appropriate * signals when these change. The implementor is responsible for filtering * calls to g_action_activate() and g_action_change_state() for type * safety and for the state being enabled. * * Probably the only useful thing to do with a #GAction is to put it * inside of a #GSimpleActionGroup. */ public interface ActionIF{ /** Get the main Gtk struct */ public GAction* getActionStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_action_get_type(); } /** * Checks if @action_name is valid. * * @action_name is valid if it consists only of alphanumeric characters, * plus '-' and '.'. The empty string is not a valid action name. * * It is an error to call this function with a non-utf8 @action_name. * @action_name must not be %NULL. * * Params: * actionName = an potential action name * * Returns: %TRUE if @action_name is valid * * Since: 2.38 */ public static bool nameIsValid(string actionName) { return g_action_name_is_valid(Str.toStringz(actionName)) != 0; } /** * Parses a detailed action name into its separate name and target * components. * * Detailed action names can have three formats. * * The first format is used to represent an action name with no target * value and consists of just an action name containing no whitespace * nor the characters ':', '(' or ')'. For example: "app.action". * * The second format is used to represent an action with a target value * that is a non-empty string consisting only of alphanumerics, plus '-' * and '.'. In that case, the action name and target value are * separated by a double colon ("::"). For example: * "app.action::target". * * The third format is used to represent an action with any type of * target value, including strings. The target value follows the action * name, surrounded in parens. For example: "app.action(42)". The * target value is parsed using g_variant_parse(). If a tuple-typed * value is desired, it must be specified in the same way, resulting in * two sets of parens, for example: "app.action((1,2,3))". A string * target can be specified this way as well: "app.action('target')". * For strings, this third format must be used if * target value is * empty or contains characters other than alphanumerics, '-' and '.'. * * Params: * detailedName = a detailed action name * actionName = the action name * targetValue = the target value, or %NULL for no target * * Returns: %TRUE if successful, else %FALSE with @error set * * Since: 2.38 * * Throws: GException on failure. */ public static bool parseDetailedName(string detailedName, out string actionName, out Variant targetValue) { char* outactionName = null; GVariant* outtargetValue = null; GError* err = null; auto p = g_action_parse_detailed_name(Str.toStringz(detailedName), &outactionName, &outtargetValue, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } actionName = Str.toString(outactionName); targetValue = new Variant(outtargetValue); return p; } /** * Formats a detailed action name from @action_name and @target_value. * * It is an error to call this function with an invalid action name. * * This function is the opposite of g_action_parse_detailed_name(). * It will produce a string that can be parsed back to the @action_name * and @target_value by that function. * * See that function for the types of strings that will be printed by * this function. * * Params: * actionName = a valid action name * targetValue = a #GVariant target value, or %NULL * * Returns: a detailed format string * * Since: 2.38 */ public static string printDetailedName(string actionName, Variant targetValue) { auto retStr = g_action_print_detailed_name(Str.toStringz(actionName), (targetValue is null) ? null : targetValue.getVariantStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Activates the action. * * @parameter must be the correct type of parameter for the action (ie: * the parameter type given at construction time). If the parameter * type was %NULL then @parameter must also be %NULL. * * If the @parameter GVariant is floating, it is consumed. * * Params: * parameter = the parameter to the activation * * Since: 2.28 */ public void activate(Variant parameter); /** * Request for the state of @action to be changed to @value. * * The action must be stateful and @value must be of the correct type. * See g_action_get_state_type(). * * This call merely requests a change. The action may refuse to change * its state or may change its state to something other than @value. * See g_action_get_state_hint(). * * If the @value GVariant is floating, it is consumed. * * Params: * value = the new state * * Since: 2.30 */ public void changeState(Variant value); /** * Checks if @action is currently enabled. * * An action must be enabled in order to be activated or in order to * have its state changed from outside callers. * * Returns: whether the action is enabled * * Since: 2.28 */ public bool getEnabled(); /** * Queries the name of @action. * * Returns: the name of the action * * Since: 2.28 */ public string getName(); /** * Queries the type of the parameter that must be given when activating * @action. * * When activating the action using g_action_activate(), the #GVariant * given to that function must be of the type returned by this function. * * In the case that this function returns %NULL, you must not give any * #GVariant, but %NULL instead. * * Returns: the parameter type * * Since: 2.28 */ public VariantType getParameterType(); /** * Queries the current state of @action. * * If the action is not stateful then %NULL will be returned. If the * action is stateful then the type of the return value is the type * given by g_action_get_state_type(). * * The return value (if non-%NULL) should be freed with * g_variant_unref() when it is no longer required. * * Returns: the current state of the action * * Since: 2.28 */ public Variant getState(); /** * Requests a hint about the valid range of values for the state of * @action. * * If %NULL is returned it either means that the action is not stateful * or that there is no hint about the valid range of values for the * state of the action. * * If a #GVariant array is returned then each item in the array is a * possible value for the state. If a #GVariant pair (ie: two-tuple) is * returned then the tuple specifies the inclusive lower and upper bound * of valid values for the state. * * In any case, the information is merely a hint. It may be possible to * have a state value outside of the hinted range and setting a value * within the range may fail. * * The return value (if non-%NULL) should be freed with * g_variant_unref() when it is no longer required. * * Returns: the state range hint * * Since: 2.28 */ public Variant getStateHint(); /** * Queries the type of the state of @action. * * If the action is stateful (e.g. created with * g_simple_action_new_stateful()) then this function returns the * #GVariantType of the state. This is the type of the initial value * given as the state. All calls to g_action_change_state() must give a * #GVariant of this type and g_action_get_state() will return a * #GVariant of the same type. * * If the action is not stateful (e.g. created with g_simple_action_new()) * then this function will return %NULL. In that case, g_action_get_state() * will return %NULL and you must not call g_action_change_state(). * * Returns: the state type, if the action is stateful * * Since: 2.28 */ public VariantType getStateType(); } GtkD-3.7.5/generated/gtkd/gio/ActionMapIF.d000066400000000000000000000077241324604450400202770ustar00rootroot00000000000000/* * 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 gio.ActionMapIF; private import gio.ActionIF; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * The GActionMap interface is implemented by #GActionGroup * implementations that operate by containing a number of * named #GAction instances, such as #GSimpleActionGroup. * * One useful application of this interface is to map the * names of actions from various action groups to unique, * prefixed names (e.g. by prepending "app." or "win."). * This is the motivation for the 'Map' part of the interface * name. */ public interface ActionMapIF{ /** Get the main Gtk struct */ public GActionMap* getActionMapStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_action_map_get_type(); } /** * Adds an action to the @action_map. * * If the action map already contains an action with the same name * as @action then the old action is dropped from the action map. * * The action map takes its own reference on @action. * * Params: * action = a #GAction * * Since: 2.32 */ public void addAction(ActionIF action); /** * A convenience function for creating multiple #GSimpleAction instances * and adding them to a #GActionMap. * * Each action is constructed as per one #GActionEntry. * * |[ * static void * activate_quit (GSimpleAction *simple, * GVariant *parameter, * gpointer user_data) * { * exit (0); * } * * static void * activate_print_string (GSimpleAction *simple, * GVariant *parameter, * gpointer user_data) * { * g_print ("%s\n", g_variant_get_string (parameter, NULL)); * } * * static GActionGroup * * create_action_group (void) * { * const GActionEntry entries[] = { * { "quit", activate_quit }, * { "print-string", activate_print_string, "s" } * }; * GSimpleActionGroup *group; * * group = g_simple_action_group_new (); * g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL); * * return G_ACTION_GROUP (group); * } * ]| * * Params: * entries = a pointer to * the first item in an array of #GActionEntry structs * userData = the user data for signal connections * * Since: 2.32 */ public void addActionEntries(GActionEntry[] entries, void* userData); /** * Looks up the action with the name @action_name in @action_map. * * If no such action exists, returns %NULL. * * Params: * actionName = the name of an action * * Returns: a #GAction, or %NULL * * Since: 2.32 */ public ActionIF lookupAction(string actionName); /** * Removes the named action from the action map. * * If no action of this name is in the map then nothing happens. * * Params: * actionName = the name of the action * * Since: 2.32 */ public void removeAction(string actionName); } GtkD-3.7.5/generated/gtkd/gio/ActionMapT.d000066400000000000000000000106141324604450400201740ustar00rootroot00000000000000/* * 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 gio.ActionMapT; public import gio.ActionIF; public import gio.c.functions; public import gio.c.types; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * The GActionMap interface is implemented by #GActionGroup * implementations that operate by containing a number of * named #GAction instances, such as #GSimpleActionGroup. * * One useful application of this interface is to map the * names of actions from various action groups to unique, * prefixed names (e.g. by prepending "app." or "win."). * This is the motivation for the 'Map' part of the interface * name. */ public template ActionMapT(TStruct) { /** Get the main Gtk struct */ public GActionMap* getActionMapStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GActionMap*)getStruct(); } /** * Adds an action to the @action_map. * * If the action map already contains an action with the same name * as @action then the old action is dropped from the action map. * * The action map takes its own reference on @action. * * Params: * action = a #GAction * * Since: 2.32 */ public void addAction(ActionIF action) { g_action_map_add_action(getActionMapStruct(), (action is null) ? null : action.getActionStruct()); } /** * A convenience function for creating multiple #GSimpleAction instances * and adding them to a #GActionMap. * * Each action is constructed as per one #GActionEntry. * * |[ * static void * activate_quit (GSimpleAction *simple, * GVariant *parameter, * gpointer user_data) * { * exit (0); * } * * static void * activate_print_string (GSimpleAction *simple, * GVariant *parameter, * gpointer user_data) * { * g_print ("%s\n", g_variant_get_string (parameter, NULL)); * } * * static GActionGroup * * create_action_group (void) * { * const GActionEntry entries[] = { * { "quit", activate_quit }, * { "print-string", activate_print_string, "s" } * }; * GSimpleActionGroup *group; * * group = g_simple_action_group_new (); * g_action_map_add_action_entries (G_ACTION_MAP (group), entries, G_N_ELEMENTS (entries), NULL); * * return G_ACTION_GROUP (group); * } * ]| * * Params: * entries = a pointer to * the first item in an array of #GActionEntry structs * userData = the user data for signal connections * * Since: 2.32 */ public void addActionEntries(GActionEntry[] entries, void* userData) { g_action_map_add_action_entries(getActionMapStruct(), entries.ptr, cast(int)entries.length, userData); } /** * Looks up the action with the name @action_name in @action_map. * * If no such action exists, returns %NULL. * * Params: * actionName = the name of an action * * Returns: a #GAction, or %NULL * * Since: 2.32 */ public ActionIF lookupAction(string actionName) { auto p = g_action_map_lookup_action(getActionMapStruct(), Str.toStringz(actionName)); if(p is null) { return null; } return ObjectG.getDObject!(ActionIF)(cast(GAction*) p); } /** * Removes the named action from the action map. * * If no action of this name is in the map then nothing happens. * * Params: * actionName = the name of the action * * Since: 2.32 */ public void removeAction(string actionName) { g_action_map_remove_action(getActionMapStruct(), Str.toStringz(actionName)); } } GtkD-3.7.5/generated/gtkd/gio/ActionT.d000066400000000000000000000170361324604450400175430ustar00rootroot00000000000000/* * 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 gio.ActionT; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import glib.Variant; public import glib.VariantType; public import gtkc.giotypes; /** * #GAction represents a single named action. * * The main interface to an action is that it can be activated with * g_action_activate(). This results in the 'activate' signal being * emitted. An activation has a #GVariant parameter (which may be * %NULL). The correct type for the parameter is determined by a static * parameter type (which is given at construction time). * * An action may optionally have a state, in which case the state may be * set with g_action_change_state(). This call takes a #GVariant. The * correct type for the state is determined by a static state type * (which is given at construction time). * * The state may have a hint associated with it, specifying its valid * range. * * #GAction is merely the interface to the concept of an action, as * described above. Various implementations of actions exist, including * #GSimpleAction. * * In all cases, the implementing class is responsible for storing the * name of the action, the parameter type, the enabled state, the * optional state type and the state and emitting the appropriate * signals when these change. The implementor is responsible for filtering * calls to g_action_activate() and g_action_change_state() for type * safety and for the state being enabled. * * Probably the only useful thing to do with a #GAction is to put it * inside of a #GSimpleActionGroup. */ public template ActionT(TStruct) { /** Get the main Gtk struct */ public GAction* getActionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GAction*)getStruct(); } /** * Activates the action. * * @parameter must be the correct type of parameter for the action (ie: * the parameter type given at construction time). If the parameter * type was %NULL then @parameter must also be %NULL. * * If the @parameter GVariant is floating, it is consumed. * * Params: * parameter = the parameter to the activation * * Since: 2.28 */ public void activate(Variant parameter) { g_action_activate(getActionStruct(), (parameter is null) ? null : parameter.getVariantStruct()); } /** * Request for the state of @action to be changed to @value. * * The action must be stateful and @value must be of the correct type. * See g_action_get_state_type(). * * This call merely requests a change. The action may refuse to change * its state or may change its state to something other than @value. * See g_action_get_state_hint(). * * If the @value GVariant is floating, it is consumed. * * Params: * value = the new state * * Since: 2.30 */ public void changeState(Variant value) { g_action_change_state(getActionStruct(), (value is null) ? null : value.getVariantStruct()); } /** * Checks if @action is currently enabled. * * An action must be enabled in order to be activated or in order to * have its state changed from outside callers. * * Returns: whether the action is enabled * * Since: 2.28 */ public bool getEnabled() { return g_action_get_enabled(getActionStruct()) != 0; } /** * Queries the name of @action. * * Returns: the name of the action * * Since: 2.28 */ public string getName() { return Str.toString(g_action_get_name(getActionStruct())); } /** * Queries the type of the parameter that must be given when activating * @action. * * When activating the action using g_action_activate(), the #GVariant * given to that function must be of the type returned by this function. * * In the case that this function returns %NULL, you must not give any * #GVariant, but %NULL instead. * * Returns: the parameter type * * Since: 2.28 */ public VariantType getParameterType() { auto p = g_action_get_parameter_type(getActionStruct()); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Queries the current state of @action. * * If the action is not stateful then %NULL will be returned. If the * action is stateful then the type of the return value is the type * given by g_action_get_state_type(). * * The return value (if non-%NULL) should be freed with * g_variant_unref() when it is no longer required. * * Returns: the current state of the action * * Since: 2.28 */ public Variant getState() { auto p = g_action_get_state(getActionStruct()); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Requests a hint about the valid range of values for the state of * @action. * * If %NULL is returned it either means that the action is not stateful * or that there is no hint about the valid range of values for the * state of the action. * * If a #GVariant array is returned then each item in the array is a * possible value for the state. If a #GVariant pair (ie: two-tuple) is * returned then the tuple specifies the inclusive lower and upper bound * of valid values for the state. * * In any case, the information is merely a hint. It may be possible to * have a state value outside of the hinted range and setting a value * within the range may fail. * * The return value (if non-%NULL) should be freed with * g_variant_unref() when it is no longer required. * * Returns: the state range hint * * Since: 2.28 */ public Variant getStateHint() { auto p = g_action_get_state_hint(getActionStruct()); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Queries the type of the state of @action. * * If the action is stateful (e.g. created with * g_simple_action_new_stateful()) then this function returns the * #GVariantType of the state. This is the type of the initial value * given as the state. All calls to g_action_change_state() must give a * #GVariant of this type and g_action_get_state() will return a * #GVariant of the same type. * * If the action is not stateful (e.g. created with g_simple_action_new()) * then this function will return %NULL. In that case, g_action_get_state() * will return %NULL and you must not call g_action_change_state(). * * Returns: the state type, if the action is stateful * * Since: 2.28 */ public VariantType getStateType() { auto p = g_action_get_state_type(getActionStruct()); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } } GtkD-3.7.5/generated/gtkd/gio/AppInfoIF.d000066400000000000000000000463311324604450400177550ustar00rootroot00000000000000/* * 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 gio.AppInfoIF; private import gio.AppInfoIF; private import gio.AppLaunchContext; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.FileIF; private import gio.IconIF; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GAppInfo and #GAppLaunchContext are used for describing and launching * applications installed on the system. * * As of GLib 2.20, URIs will always be converted to POSIX paths * (using g_file_get_path()) when using g_app_info_launch() even if * the application requested an URI and not a POSIX path. For example * for an desktop-file based application with Exec key `totem * %U` and a single URI, `sftp://foo/file.avi`, then * `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will * only work if a set of suitable GIO extensions (such as gvfs 2.26 * compiled with FUSE support), is available and operational; if this * is not the case, the URI will be passed unmodified to the application. * Some URIs, such as `mailto:`, of course cannot be mapped to a POSIX * path (in gvfs there's no FUSE mount for it); such URIs will be * passed unmodified to the application. * * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped * back to the GIO URI in the #GFile constructors (since gvfs * implements the #GVfs extension point). As such, if the application * needs to examine the URI, it needs to use g_file_get_uri() or * similar on #GFile. In other words, an application cannot assume * that the URI passed to e.g. g_file_new_for_commandline_arg() is * equal to the result of g_file_get_uri(). The following snippet * illustrates this: * * |[ * GFile *f; * char *uri; * * file = g_file_new_for_commandline_arg (uri_from_commandline); * * uri = g_file_get_uri (file); * strcmp (uri, uri_from_commandline) == 0; * g_free (uri); * * if (g_file_has_uri_scheme (file, "cdda")) * { * // do something special with uri * } * g_object_unref (file); * ]| * * This code will work when both `cdda://sr0/Track 1.wav` and * `/home/user/.gvfs/cdda on sr0/Track 1.wav` is passed to the * application. It should be noted that it's generally not safe * for applications to rely on the format of a particular URIs. * Different launcher applications (e.g. file managers) may have * different ideas of what a given URI means. */ public interface AppInfoIF{ /** Get the main Gtk struct */ public GAppInfo* getAppInfoStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_app_info_get_type(); } /** * Creates a new #GAppInfo from the given information. * * Note that for @commandline, the quoting rules of the Exec key of the * [freedesktop.org Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec) * are applied. For example, if the @commandline contains * percent-encoded URIs, the percent-character must be doubled in order to prevent it from * being swallowed by Exec key unquoting. See the specification for exact quoting rules. * * Params: * commandline = the commandline to use * applicationName = the application name, or %NULL to use @commandline * flags = flags that can specify details of the created #GAppInfo * * Returns: new #GAppInfo for given command. * * Throws: GException on failure. */ public static AppInfoIF createFromCommandline(string commandline, string applicationName, GAppInfoCreateFlags flags) { GError* err = null; auto p = g_app_info_create_from_commandline(Str.toStringz(commandline), Str.toStringz(applicationName), flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(AppInfoIF)(cast(GAppInfo*) p, true); } /** * Gets a list of all of the applications currently registered * on this system. * * For desktop files, this includes applications that have * `NoDisplay=true` set or are excluded from display by means * of `OnlyShowIn` or `NotShowIn`. See g_app_info_should_show(). * The returned list does not include applications which have * the `Hidden` key set. * * Returns: a newly allocated #GList of references to #GAppInfos. */ public static ListG getAll() { auto p = g_app_info_get_all(); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Gets a list of all #GAppInfos for a given content type, * including the recommended and fallback #GAppInfos. See * g_app_info_get_recommended_for_type() and * g_app_info_get_fallback_for_type(). * * Params: * contentType = the content type to find a #GAppInfo for * * Returns: #GList of #GAppInfos * for given @content_type or %NULL on error. */ public static ListG getAllForType(string contentType) { auto p = g_app_info_get_all_for_type(Str.toStringz(contentType)); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Gets the default #GAppInfo for a given content type. * * Params: * contentType = the content type to find a #GAppInfo for * mustSupportUris = if %TRUE, the #GAppInfo is expected to * support URIs * * Returns: #GAppInfo for given @content_type or * %NULL on error. */ public static AppInfoIF getDefaultForType(string contentType, bool mustSupportUris) { auto p = g_app_info_get_default_for_type(Str.toStringz(contentType), mustSupportUris); if(p is null) { return null; } return ObjectG.getDObject!(AppInfoIF)(cast(GAppInfo*) p, true); } /** * Gets the default application for handling URIs with * the given URI scheme. A URI scheme is the initial part * of the URI, up to but not including the ':', e.g. "http", * "ftp" or "sip". * * Params: * uriScheme = a string containing a URI scheme. * * Returns: #GAppInfo for given @uri_scheme or %NULL on error. */ public static AppInfoIF getDefaultForUriScheme(string uriScheme) { auto p = g_app_info_get_default_for_uri_scheme(Str.toStringz(uriScheme)); if(p is null) { return null; } return ObjectG.getDObject!(AppInfoIF)(cast(GAppInfo*) p, true); } /** * Gets a list of fallback #GAppInfos for a given content type, i.e. * those applications which claim to support the given content type * by MIME type subclassing and not directly. * * Params: * contentType = the content type to find a #GAppInfo for * * Returns: #GList of #GAppInfos * for given @content_type or %NULL on error. * * Since: 2.28 */ public static ListG getFallbackForType(string contentType) { auto p = g_app_info_get_fallback_for_type(Str.toStringz(contentType)); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Gets a list of recommended #GAppInfos for a given content type, i.e. * those applications which claim to support the given content type exactly, * and not by MIME type subclassing. * Note that the first application of the list is the last used one, i.e. * the last one for which g_app_info_set_as_last_used_for_type() has been * called. * * Params: * contentType = the content type to find a #GAppInfo for * * Returns: #GList of #GAppInfos * for given @content_type or %NULL on error. * * Since: 2.28 */ public static ListG getRecommendedForType(string contentType) { auto p = g_app_info_get_recommended_for_type(Str.toStringz(contentType)); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Utility function that launches the default application * registered to handle the specified uri. Synchronous I/O * is done on the uri to detect the type of the file if * required. * * Params: * uri = the uri to show * launchContext = an optional #GAppLaunchContext * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public static bool launchDefaultForUri(string uri, AppLaunchContext launchContext) { GError* err = null; auto p = g_app_info_launch_default_for_uri(Str.toStringz(uri), (launchContext is null) ? null : launchContext.getAppLaunchContextStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Async version of g_app_info_launch_default_for_uri(). * * This version is useful if you are interested in receiving * error information in the case where the application is * sandboxed and the portal may present an application chooser * dialog to the user. * * Params: * uri = the uri to show * callback = a #GASyncReadyCallback to call when the request is done * userData = data to pass to @callback * * Since: 2.50 */ public static void launchDefaultForUriAsync(string uri, AppLaunchContext launchContext, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_app_info_launch_default_for_uri_async(Str.toStringz(uri), (launchContext is null) ? null : launchContext.getAppLaunchContextStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous launch-default-for-uri operation. * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the launch was successful, %FALSE if @error is set * * Since: 2.50 * * Throws: GException on failure. */ public static bool launchDefaultForUriFinish(AsyncResultIF result) { GError* err = null; auto p = g_app_info_launch_default_for_uri_finish((result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Removes all changes to the type associations done by * g_app_info_set_as_default_for_type(), * g_app_info_set_as_default_for_extension(), * g_app_info_add_supports_type() or * g_app_info_remove_supports_type(). * * Params: * contentType = a content type * * Since: 2.20 */ public static void resetTypeAssociations(string contentType) { g_app_info_reset_type_associations(Str.toStringz(contentType)); } /** * Adds a content type to the application information to indicate the * application is capable of opening files with the given content type. * * Params: * contentType = a string. * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool addSupportsType(string contentType); /** * Obtains the information whether the #GAppInfo can be deleted. * See g_app_info_delete(). * * Returns: %TRUE if @appinfo can be deleted * * Since: 2.20 */ public bool canDelete(); /** * Checks if a supported content type can be removed from an application. * * Returns: %TRUE if it is possible to remove supported * content types from a given @appinfo, %FALSE if not. */ public bool canRemoveSupportsType(); /** * Tries to delete a #GAppInfo. * * On some platforms, there may be a difference between user-defined * #GAppInfos which can be deleted, and system-wide ones which cannot. * See g_app_info_can_delete(). * * Returns: %TRUE if @appinfo has been deleted * * Since: 2.20 */ public bool delet(); /** * Creates a duplicate of a #GAppInfo. * * Returns: a duplicate of @appinfo. */ public AppInfoIF dup(); /** * Checks if two #GAppInfos are equal. * * Note that the check may not compare each individual field, and * only does an identity check. In case detecting changes in the contents * is needed, program code must additionally compare relevant fields. * * Params: * appinfo2 = the second #GAppInfo. * * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise. */ public bool equal(AppInfoIF appinfo2); /** * Gets the commandline with which the application will be * started. * * Returns: a string containing the @appinfo's commandline, * or %NULL if this information is not available * * Since: 2.20 */ public string getCommandline(); /** * Gets a human-readable description of an installed application. * * Returns: a string containing a description of the * application @appinfo, or %NULL if none. */ public string getDescription(); /** * Gets the display name of the application. The display name is often more * descriptive to the user than the name itself. * * Returns: the display name of the application for @appinfo, or the name if * no display name is available. * * Since: 2.24 */ public string getDisplayName(); /** * Gets the executable's name for the installed application. * * Returns: a string containing the @appinfo's application * binaries name */ public string getExecutable(); /** * Gets the icon for the application. * * Returns: the default #GIcon for @appinfo or %NULL * if there is no default icon. */ public IconIF getIcon(); /** * Gets the ID of an application. An id is a string that * identifies the application. The exact format of the id is * platform dependent. For instance, on Unix this is the * desktop file id from the xdg menu specification. * * Note that the returned ID may be %NULL, depending on how * the @appinfo has been constructed. * * Returns: a string containing the application's ID. */ public string getId(); /** * Gets the installed name of the application. * * Returns: the name of the application for @appinfo. */ public string getName(); /** * Retrieves the list of content types that @app_info claims to support. * If this information is not provided by the environment, this function * will return %NULL. * This function does not take in consideration associations added with * g_app_info_add_supports_type(), but only those exported directly by * the application. * * Returns: a list of content types. * * Since: 2.34 */ public string[] getSupportedTypes(); /** * Launches the application. Passes @files to the launched application * as arguments, using the optional @launch_context to get information * about the details of the launcher (like what screen it is on). * On error, @error will be set accordingly. * * To launch the application without arguments pass a %NULL @files list. * * Note that even if the launch is successful the application launched * can fail to start if it runs into problems during startup. There is * no way to detect this. * * Some URIs can be changed when passed through a GFile (for instance * unsupported URIs with strange formats like mailto:), so if you have * a textual URI you want to pass in as argument, consider using * g_app_info_launch_uris() instead. * * The launched application inherits the environment of the launching * process, but it can be modified with g_app_launch_context_setenv() * and g_app_launch_context_unsetenv(). * * On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE` * environment variable with the path of the launched desktop file and * `GIO_LAUNCHED_DESKTOP_FILE_PID` to the process id of the launched * process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`, * should it be inherited by further processes. The `DISPLAY` and * `DESKTOP_STARTUP_ID` environment variables are also set, based * on information provided in @launch_context. * * Params: * files = a #GList of #GFile objects * launchContext = a #GAppLaunchContext or %NULL * * Returns: %TRUE on successful launch, %FALSE otherwise. * * Throws: GException on failure. */ public bool launch(ListG files, AppLaunchContext launchContext); /** * Launches the application. This passes the @uris to the launched application * as arguments, using the optional @launch_context to get information * about the details of the launcher (like what screen it is on). * On error, @error will be set accordingly. * * To launch the application without arguments pass a %NULL @uris list. * * Note that even if the launch is successful the application launched * can fail to start if it runs into problems during startup. There is * no way to detect this. * * Params: * uris = a #GList containing URIs to launch. * launchContext = a #GAppLaunchContext or %NULL * * Returns: %TRUE on successful launch, %FALSE otherwise. * * Throws: GException on failure. */ public bool launchUris(ListG uris, AppLaunchContext launchContext); /** * Removes a supported type from an application, if possible. * * Params: * contentType = a string. * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool removeSupportsType(string contentType); /** * Sets the application as the default handler for the given file extension. * * Params: * extension = a string containing the file extension * (without the dot). * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool setAsDefaultForExtension(string extension); /** * Sets the application as the default handler for a given type. * * Params: * contentType = the content type. * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool setAsDefaultForType(string contentType); /** * Sets the application as the last used application for a given type. * This will make the application appear as first in the list returned * by g_app_info_get_recommended_for_type(), regardless of the default * application for that content type. * * Params: * contentType = the content type. * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool setAsLastUsedForType(string contentType); /** * Checks if the application info should be shown in menus that * list available applications. * * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise. */ public bool shouldShow(); /** * Checks if the application accepts files as arguments. * * Returns: %TRUE if the @appinfo supports files. */ public bool supportsFiles(); /** * Checks if the application supports reading files and directories from URIs. * * Returns: %TRUE if the @appinfo supports URIs. */ public bool supportsUris(); } GtkD-3.7.5/generated/gtkd/gio/AppInfoMonitor.d000066400000000000000000000116761324604450400211120ustar00rootroot00000000000000/* * 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 gio.AppInfoMonitor; private import gio.c.functions; public import gio.c.types; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GAppInfoMonitor is a very simple object used for monitoring the app * info database for changes (ie: newly installed or removed * applications). * * Call g_app_info_monitor_get() to get a #GAppInfoMonitor and connect * to the "changed" signal. * * In the usual case, applications should try to make note of the change * (doing things like invalidating caches) but not act on it. In * particular, applications should avoid making calls to #GAppInfo APIs * in response to the change signal, deferring these until the time that * the data is actually required. The exception to this case is when * application information is actually being displayed on the screen * (eg: during a search or when the list of all applications is shown). * The reason for this is that changes to the list of installed * applications often come in groups (like during system updates) and * rescanning the list on every change is pointless and expensive. * * Since: 2.40 */ public class AppInfoMonitor : ObjectG { /** the main Gtk struct */ protected GAppInfoMonitor* gAppInfoMonitor; /** Get the main Gtk struct */ public GAppInfoMonitor* getAppInfoMonitorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gAppInfoMonitor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gAppInfoMonitor; } protected override void setStruct(GObject* obj) { gAppInfoMonitor = cast(GAppInfoMonitor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GAppInfoMonitor* gAppInfoMonitor, bool ownedRef = false) { this.gAppInfoMonitor = gAppInfoMonitor; super(cast(GObject*)gAppInfoMonitor, ownedRef); } /** */ public static GType getType() { return g_app_info_monitor_get_type(); } /** * Gets the #GAppInfoMonitor for the current thread-default main * context. * * The #GAppInfoMonitor will emit a "changed" signal in the * thread-default main context whenever the list of installed * applications (as reported by g_app_info_get_all()) may have changed. * * You must only call g_object_unref() on the return value from under * the same main context as you created it. * * Returns: a reference to a #GAppInfoMonitor * * Since: 2.40 */ public static AppInfoMonitor get() { auto p = g_app_info_monitor_get(); if(p is null) { return null; } return ObjectG.getDObject!(AppInfoMonitor)(cast(GAppInfoMonitor*) p, true); } protected class OnChangedDelegateWrapper { void delegate(AppInfoMonitor) dlg; gulong handlerId; this(void delegate(AppInfoMonitor) dlg) { this.dlg = dlg; onChangedListeners ~= this; } void remove(OnChangedDelegateWrapper source) { foreach(index, wrapper; onChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChangedListeners[index] = null; onChangedListeners = std.algorithm.remove(onChangedListeners, index); break; } } } } OnChangedDelegateWrapper[] onChangedListeners; /** * Signal emitted when the app info database for changes (ie: newly installed * or removed applications). */ gulong addOnChanged(void delegate(AppInfoMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "changed", cast(GCallback)&callBackChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChanged(GAppInfoMonitor* appinfomonitorStruct, OnChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackChangedDestroy(OnChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/AppInfoT.d000066400000000000000000000352631324604450400176640ustar00rootroot00000000000000/* * 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 gio.AppInfoT; public import gio.AppInfoIF; public import gio.AppLaunchContext; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.FileIF; public import gio.IconIF; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.ListG; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GAppInfo and #GAppLaunchContext are used for describing and launching * applications installed on the system. * * As of GLib 2.20, URIs will always be converted to POSIX paths * (using g_file_get_path()) when using g_app_info_launch() even if * the application requested an URI and not a POSIX path. For example * for an desktop-file based application with Exec key `totem * %U` and a single URI, `sftp://foo/file.avi`, then * `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will * only work if a set of suitable GIO extensions (such as gvfs 2.26 * compiled with FUSE support), is available and operational; if this * is not the case, the URI will be passed unmodified to the application. * Some URIs, such as `mailto:`, of course cannot be mapped to a POSIX * path (in gvfs there's no FUSE mount for it); such URIs will be * passed unmodified to the application. * * Specifically for gvfs 2.26 and later, the POSIX URI will be mapped * back to the GIO URI in the #GFile constructors (since gvfs * implements the #GVfs extension point). As such, if the application * needs to examine the URI, it needs to use g_file_get_uri() or * similar on #GFile. In other words, an application cannot assume * that the URI passed to e.g. g_file_new_for_commandline_arg() is * equal to the result of g_file_get_uri(). The following snippet * illustrates this: * * |[ * GFile *f; * char *uri; * * file = g_file_new_for_commandline_arg (uri_from_commandline); * * uri = g_file_get_uri (file); * strcmp (uri, uri_from_commandline) == 0; * g_free (uri); * * if (g_file_has_uri_scheme (file, "cdda")) * { * // do something special with uri * } * g_object_unref (file); * ]| * * This code will work when both `cdda://sr0/Track 1.wav` and * `/home/user/.gvfs/cdda on sr0/Track 1.wav` is passed to the * application. It should be noted that it's generally not safe * for applications to rely on the format of a particular URIs. * Different launcher applications (e.g. file managers) may have * different ideas of what a given URI means. */ public template AppInfoT(TStruct) { /** Get the main Gtk struct */ public GAppInfo* getAppInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GAppInfo*)getStruct(); } /** * Adds a content type to the application information to indicate the * application is capable of opening files with the given content type. * * Params: * contentType = a string. * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool addSupportsType(string contentType) { GError* err = null; auto p = g_app_info_add_supports_type(getAppInfoStruct(), Str.toStringz(contentType), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Obtains the information whether the #GAppInfo can be deleted. * See g_app_info_delete(). * * Returns: %TRUE if @appinfo can be deleted * * Since: 2.20 */ public bool canDelete() { return g_app_info_can_delete(getAppInfoStruct()) != 0; } /** * Checks if a supported content type can be removed from an application. * * Returns: %TRUE if it is possible to remove supported * content types from a given @appinfo, %FALSE if not. */ public bool canRemoveSupportsType() { return g_app_info_can_remove_supports_type(getAppInfoStruct()) != 0; } /** * Tries to delete a #GAppInfo. * * On some platforms, there may be a difference between user-defined * #GAppInfos which can be deleted, and system-wide ones which cannot. * See g_app_info_can_delete(). * * Returns: %TRUE if @appinfo has been deleted * * Since: 2.20 */ public bool delet() { return g_app_info_delete(getAppInfoStruct()) != 0; } /** * Creates a duplicate of a #GAppInfo. * * Returns: a duplicate of @appinfo. */ public AppInfoIF dup() { auto p = g_app_info_dup(getAppInfoStruct()); if(p is null) { return null; } return ObjectG.getDObject!(AppInfoIF)(cast(GAppInfo*) p, true); } /** * Checks if two #GAppInfos are equal. * * Note that the check may not compare each individual field, and * only does an identity check. In case detecting changes in the contents * is needed, program code must additionally compare relevant fields. * * Params: * appinfo2 = the second #GAppInfo. * * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise. */ public bool equal(AppInfoIF appinfo2) { return g_app_info_equal(getAppInfoStruct(), (appinfo2 is null) ? null : appinfo2.getAppInfoStruct()) != 0; } /** * Gets the commandline with which the application will be * started. * * Returns: a string containing the @appinfo's commandline, * or %NULL if this information is not available * * Since: 2.20 */ public string getCommandline() { return Str.toString(g_app_info_get_commandline(getAppInfoStruct())); } /** * Gets a human-readable description of an installed application. * * Returns: a string containing a description of the * application @appinfo, or %NULL if none. */ public string getDescription() { return Str.toString(g_app_info_get_description(getAppInfoStruct())); } /** * Gets the display name of the application. The display name is often more * descriptive to the user than the name itself. * * Returns: the display name of the application for @appinfo, or the name if * no display name is available. * * Since: 2.24 */ public string getDisplayName() { return Str.toString(g_app_info_get_display_name(getAppInfoStruct())); } /** * Gets the executable's name for the installed application. * * Returns: a string containing the @appinfo's application * binaries name */ public string getExecutable() { return Str.toString(g_app_info_get_executable(getAppInfoStruct())); } /** * Gets the icon for the application. * * Returns: the default #GIcon for @appinfo or %NULL * if there is no default icon. */ public IconIF getIcon() { auto p = g_app_info_get_icon(getAppInfoStruct()); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p); } /** * Gets the ID of an application. An id is a string that * identifies the application. The exact format of the id is * platform dependent. For instance, on Unix this is the * desktop file id from the xdg menu specification. * * Note that the returned ID may be %NULL, depending on how * the @appinfo has been constructed. * * Returns: a string containing the application's ID. */ public string getId() { return Str.toString(g_app_info_get_id(getAppInfoStruct())); } /** * Gets the installed name of the application. * * Returns: the name of the application for @appinfo. */ public string getName() { return Str.toString(g_app_info_get_name(getAppInfoStruct())); } /** * Retrieves the list of content types that @app_info claims to support. * If this information is not provided by the environment, this function * will return %NULL. * This function does not take in consideration associations added with * g_app_info_add_supports_type(), but only those exported directly by * the application. * * Returns: a list of content types. * * Since: 2.34 */ public string[] getSupportedTypes() { return Str.toStringArray(g_app_info_get_supported_types(getAppInfoStruct())); } /** * Launches the application. Passes @files to the launched application * as arguments, using the optional @launch_context to get information * about the details of the launcher (like what screen it is on). * On error, @error will be set accordingly. * * To launch the application without arguments pass a %NULL @files list. * * Note that even if the launch is successful the application launched * can fail to start if it runs into problems during startup. There is * no way to detect this. * * Some URIs can be changed when passed through a GFile (for instance * unsupported URIs with strange formats like mailto:), so if you have * a textual URI you want to pass in as argument, consider using * g_app_info_launch_uris() instead. * * The launched application inherits the environment of the launching * process, but it can be modified with g_app_launch_context_setenv() * and g_app_launch_context_unsetenv(). * * On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE` * environment variable with the path of the launched desktop file and * `GIO_LAUNCHED_DESKTOP_FILE_PID` to the process id of the launched * process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`, * should it be inherited by further processes. The `DISPLAY` and * `DESKTOP_STARTUP_ID` environment variables are also set, based * on information provided in @launch_context. * * Params: * files = a #GList of #GFile objects * launchContext = a #GAppLaunchContext or %NULL * * Returns: %TRUE on successful launch, %FALSE otherwise. * * Throws: GException on failure. */ public bool launch(ListG files, AppLaunchContext launchContext) { GError* err = null; auto p = g_app_info_launch(getAppInfoStruct(), (files is null) ? null : files.getListGStruct(), (launchContext is null) ? null : launchContext.getAppLaunchContextStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Launches the application. This passes the @uris to the launched application * as arguments, using the optional @launch_context to get information * about the details of the launcher (like what screen it is on). * On error, @error will be set accordingly. * * To launch the application without arguments pass a %NULL @uris list. * * Note that even if the launch is successful the application launched * can fail to start if it runs into problems during startup. There is * no way to detect this. * * Params: * uris = a #GList containing URIs to launch. * launchContext = a #GAppLaunchContext or %NULL * * Returns: %TRUE on successful launch, %FALSE otherwise. * * Throws: GException on failure. */ public bool launchUris(ListG uris, AppLaunchContext launchContext) { GError* err = null; auto p = g_app_info_launch_uris(getAppInfoStruct(), (uris is null) ? null : uris.getListGStruct(), (launchContext is null) ? null : launchContext.getAppLaunchContextStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Removes a supported type from an application, if possible. * * Params: * contentType = a string. * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool removeSupportsType(string contentType) { GError* err = null; auto p = g_app_info_remove_supports_type(getAppInfoStruct(), Str.toStringz(contentType), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the application as the default handler for the given file extension. * * Params: * extension = a string containing the file extension * (without the dot). * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool setAsDefaultForExtension(string extension) { GError* err = null; auto p = g_app_info_set_as_default_for_extension(getAppInfoStruct(), Str.toStringz(extension), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the application as the default handler for a given type. * * Params: * contentType = the content type. * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool setAsDefaultForType(string contentType) { GError* err = null; auto p = g_app_info_set_as_default_for_type(getAppInfoStruct(), Str.toStringz(contentType), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the application as the last used application for a given type. * This will make the application appear as first in the list returned * by g_app_info_get_recommended_for_type(), regardless of the default * application for that content type. * * Params: * contentType = the content type. * * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool setAsLastUsedForType(string contentType) { GError* err = null; auto p = g_app_info_set_as_last_used_for_type(getAppInfoStruct(), Str.toStringz(contentType), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks if the application info should be shown in menus that * list available applications. * * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise. */ public bool shouldShow() { return g_app_info_should_show(getAppInfoStruct()) != 0; } /** * Checks if the application accepts files as arguments. * * Returns: %TRUE if the @appinfo supports files. */ public bool supportsFiles() { return g_app_info_supports_files(getAppInfoStruct()) != 0; } /** * Checks if the application supports reading files and directories from URIs. * * Returns: %TRUE if the @appinfo supports URIs. */ public bool supportsUris() { return g_app_info_supports_uris(getAppInfoStruct()) != 0; } } GtkD-3.7.5/generated/gtkd/gio/AppLaunchContext.d000066400000000000000000000230751324604450400214220ustar00rootroot00000000000000/* * 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 gio.AppLaunchContext; private import gio.AppInfoIF; private import gio.FileIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * Integrating the launch with the launching application. This is used to * handle for instance startup notification and launching the new application * on the same screen as the launching window. */ public class AppLaunchContext : ObjectG { /** the main Gtk struct */ protected GAppLaunchContext* gAppLaunchContext; /** Get the main Gtk struct */ public GAppLaunchContext* getAppLaunchContextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gAppLaunchContext; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gAppLaunchContext; } protected override void setStruct(GObject* obj) { gAppLaunchContext = cast(GAppLaunchContext*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GAppLaunchContext* gAppLaunchContext, bool ownedRef = false) { this.gAppLaunchContext = gAppLaunchContext; super(cast(GObject*)gAppLaunchContext, ownedRef); } /** */ public static GType getType() { return g_app_launch_context_get_type(); } /** * Creates a new application launch context. This is not normally used, * instead you instantiate a subclass of this, such as #GdkAppLaunchContext. * * Returns: a #GAppLaunchContext. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_app_launch_context_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GAppLaunchContext*) p, true); } /** * Gets the display string for the @context. This is used to ensure new * applications are started on the same display as the launching * application, by setting the `DISPLAY` environment variable. * * Params: * info = a #GAppInfo * files = a #GList of #GFile objects * * Returns: a display string for the display. */ public string getDisplay(AppInfoIF info, ListG files) { auto retStr = g_app_launch_context_get_display(gAppLaunchContext, (info is null) ? null : info.getAppInfoStruct(), (files is null) ? null : files.getListGStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the complete environment variable list to be passed to * the child process when @context is used to launch an application. * This is a %NULL-terminated array of strings, where each string has * the form `KEY=VALUE`. * * Returns: the * child's environment * * Since: 2.32 */ public string[] getEnvironment() { auto retStr = g_app_launch_context_get_environment(gAppLaunchContext); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Initiates startup notification for the application and returns the * `DESKTOP_STARTUP_ID` for the launched operation, if supported. * * Startup notification IDs are defined in the * [FreeDesktop.Org Startup Notifications standard](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt"). * * Params: * info = a #GAppInfo * files = a #GList of of #GFile objects * * Returns: a startup notification ID for the application, or %NULL if * not supported. */ public string getStartupNotifyId(AppInfoIF info, ListG files) { auto retStr = g_app_launch_context_get_startup_notify_id(gAppLaunchContext, (info is null) ? null : info.getAppInfoStruct(), (files is null) ? null : files.getListGStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Called when an application has failed to launch, so that it can cancel * the application startup notification started in g_app_launch_context_get_startup_notify_id(). * * Params: * startupNotifyId = the startup notification id that was returned by g_app_launch_context_get_startup_notify_id(). */ public void launchFailed(string startupNotifyId) { g_app_launch_context_launch_failed(gAppLaunchContext, Str.toStringz(startupNotifyId)); } /** * Arranges for @variable to be set to @value in the child's * environment when @context is used to launch an application. * * Params: * variable = the environment variable to set * value = the value for to set the variable to. * * Since: 2.32 */ public void setenv(string variable, string value) { g_app_launch_context_setenv(gAppLaunchContext, Str.toStringz(variable), Str.toStringz(value)); } /** * Arranges for @variable to be unset in the child's environment * when @context is used to launch an application. * * Params: * variable = the environment variable to remove * * Since: 2.32 */ public void unsetenv(string variable) { g_app_launch_context_unsetenv(gAppLaunchContext, Str.toStringz(variable)); } protected class OnLaunchFailedDelegateWrapper { void delegate(string, AppLaunchContext) dlg; gulong handlerId; this(void delegate(string, AppLaunchContext) dlg) { this.dlg = dlg; onLaunchFailedListeners ~= this; } void remove(OnLaunchFailedDelegateWrapper source) { foreach(index, wrapper; onLaunchFailedListeners) { if (wrapper.handlerId == source.handlerId) { onLaunchFailedListeners[index] = null; onLaunchFailedListeners = std.algorithm.remove(onLaunchFailedListeners, index); break; } } } } OnLaunchFailedDelegateWrapper[] onLaunchFailedListeners; /** * The ::launch-failed signal is emitted when a #GAppInfo launch * fails. The startup notification id is provided, so that the launcher * can cancel the startup notification. * * Params: * startupNotifyId = the startup notification id for the failed launch * * Since: 2.36 */ gulong addOnLaunchFailed(void delegate(string, AppLaunchContext) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnLaunchFailedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "launch-failed", cast(GCallback)&callBackLaunchFailed, cast(void*)wrapper, cast(GClosureNotify)&callBackLaunchFailedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackLaunchFailed(GAppLaunchContext* applaunchcontextStruct, char* startupNotifyId, OnLaunchFailedDelegateWrapper wrapper) { wrapper.dlg(Str.toString(startupNotifyId), wrapper.outer); } extern(C) static void callBackLaunchFailedDestroy(OnLaunchFailedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnLaunchedDelegateWrapper { void delegate(AppInfoIF, Variant, AppLaunchContext) dlg; gulong handlerId; this(void delegate(AppInfoIF, Variant, AppLaunchContext) dlg) { this.dlg = dlg; onLaunchedListeners ~= this; } void remove(OnLaunchedDelegateWrapper source) { foreach(index, wrapper; onLaunchedListeners) { if (wrapper.handlerId == source.handlerId) { onLaunchedListeners[index] = null; onLaunchedListeners = std.algorithm.remove(onLaunchedListeners, index); break; } } } } OnLaunchedDelegateWrapper[] onLaunchedListeners; /** * The ::launched signal is emitted when a #GAppInfo is successfully * launched. The @platform_data is an GVariant dictionary mapping * strings to variants (ie a{sv}), which contains additional, * platform-specific data about this launch. On UNIX, at least the * "pid" and "startup-notification-id" keys will be present. * * Params: * info = the #GAppInfo that was just launched * platformData = additional platform-specific data for this launch * * Since: 2.36 */ gulong addOnLaunched(void delegate(AppInfoIF, Variant, AppLaunchContext) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnLaunchedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "launched", cast(GCallback)&callBackLaunched, cast(void*)wrapper, cast(GClosureNotify)&callBackLaunchedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackLaunched(GAppLaunchContext* applaunchcontextStruct, GAppInfo* info, GVariant* platformData, OnLaunchedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(AppInfoIF)(info), new Variant(platformData), wrapper.outer); } extern(C) static void callBackLaunchedDestroy(OnLaunchedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/Application.d000066400000000000000000001476631324604450400204570ustar00rootroot00000000000000/* * 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 gio.Application; private import gio.ActionGroupIF; private import gio.ActionGroupT; private import gio.ActionMapIF; private import gio.ActionMapT; private import gio.ApplicationCommandLine; private import gio.Cancellable; private import gio.DBusConnection; private import gio.FileIF; private import gio.Notification; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.OptionGroup; private import glib.Str; private import glib.VariantDict; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * A #GApplication is the foundation of an application. It wraps some * low-level platform-specific services and is intended to act as the * foundation for higher-level application classes such as * #GtkApplication or #MxApplication. In general, you should not use * this class outside of a higher level framework. * * GApplication provides convenient life cycle management by maintaining * a "use count" for the primary application instance. The use count can * be changed using g_application_hold() and g_application_release(). If * it drops to zero, the application exits. Higher-level classes such as * #GtkApplication employ the use count to ensure that the application * stays alive as long as it has any opened windows. * * Another feature that GApplication (optionally) provides is process * uniqueness. Applications can make use of this functionality by * providing a unique application ID. If given, only one application * with this ID can be running at a time per session. The session * concept is platform-dependent, but corresponds roughly to a graphical * desktop login. When your application is launched again, its * arguments are passed through platform communication to the already * running program. The already running instance of the program is * called the "primary instance"; for non-unique applications this is * the always the current instance. On Linux, the D-Bus session bus * is used for communication. * * The use of #GApplication differs from some other commonly-used * uniqueness libraries (such as libunique) in important ways. The * application is not expected to manually register itself and check * if it is the primary instance. Instead, the main() function of a * #GApplication should do very little more than instantiating the * application instance, possibly connecting signal handlers, then * calling g_application_run(). All checks for uniqueness are done * internally. If the application is the primary instance then the * startup signal is emitted and the mainloop runs. If the application * is not the primary instance then a signal is sent to the primary * instance and g_application_run() promptly returns. See the code * examples below. * * If used, the expected form of an application identifier is very close * to that of of a * [D-Bus bus name](http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-interface). * Examples include: "com.example.MyApp", "org.example.internal-apps.Calculator". * For details on valid application identifiers, see g_application_id_is_valid(). * * On Linux, the application identifier is claimed as a well-known bus name * on the user's session bus. This means that the uniqueness of your * application is scoped to the current session. It also means that your * application may provide additional services (through registration of other * object paths) at that bus name. The registration of these object paths * should be done with the shared GDBus session bus. Note that due to the * internal architecture of GDBus, method calls can be dispatched at any time * (even if a main loop is not running). For this reason, you must ensure that * any object paths that you wish to register are registered before #GApplication * attempts to acquire the bus name of your application (which happens in * g_application_register()). Unfortunately, this means that you cannot use * g_application_get_is_remote() to decide if you want to register object paths. * * GApplication also implements the #GActionGroup and #GActionMap * interfaces and lets you easily export actions by adding them with * g_action_map_add_action(). When invoking an action by calling * g_action_group_activate_action() on the application, it is always * invoked in the primary instance. The actions are also exported on * the session bus, and GIO provides the #GDBusActionGroup wrapper to * conveniently access them remotely. GIO provides a #GDBusMenuModel wrapper * for remote access to exported #GMenuModels. * * There is a number of different entry points into a GApplication: * * - via 'Activate' (i.e. just starting the application) * * - via 'Open' (i.e. opening some files) * * - by handling a command-line * * - via activating an action * * The #GApplication::startup signal lets you handle the application * initialization for all of these in a single place. * * Regardless of which of these entry points is used to start the * application, GApplication passes some "platform data from the * launching instance to the primary instance, in the form of a * #GVariant dictionary mapping strings to variants. To use platform * data, override the @before_emit or @after_emit virtual functions * in your #GApplication subclass. When dealing with * #GApplicationCommandLine objects, the platform data is * directly available via g_application_command_line_get_cwd(), * g_application_command_line_get_environ() and * g_application_command_line_get_platform_data(). * * As the name indicates, the platform data may vary depending on the * operating system, but it always includes the current directory (key * "cwd"), and optionally the environment (ie the set of environment * variables and their values) of the calling process (key "environ"). * The environment is only added to the platform data if the * %G_APPLICATION_SEND_ENVIRONMENT flag is set. #GApplication subclasses * can add their own platform data by overriding the @add_platform_data * virtual function. For instance, #GtkApplication adds startup notification * data in this way. * * To parse commandline arguments you may handle the * #GApplication::command-line signal or override the local_command_line() * vfunc, to parse them in either the primary instance or the local instance, * respectively. * * For an example of opening files with a GApplication, see * [gapplication-example-open.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-open.c). * * For an example of using actions with GApplication, see * [gapplication-example-actions.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-actions.c). * * For an example of using extra D-Bus hooks with GApplication, see * [gapplication-example-dbushooks.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-dbushooks.c). * * Since: 2.28 */ public class Application : ObjectG, ActionGroupIF, ActionMapIF { /** the main Gtk struct */ protected GApplication* gApplication; /** Get the main Gtk struct */ public GApplication* getApplicationStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gApplication; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gApplication; } protected override void setStruct(GObject* obj) { gApplication = cast(GApplication*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GApplication* gApplication, bool ownedRef = false) { this.gApplication = gApplication; super(cast(GObject*)gApplication, ownedRef); } // add the ActionGroup capabilities mixin ActionGroupT!(GApplication); // add the ActionMap capabilities mixin ActionMapT!(GApplication); protected class ScopedOnCommandLineDelegateWrapper { int delegate(Scoped!ApplicationCommandLine, Application) dlg; gulong handlerId; this(int delegate(Scoped!ApplicationCommandLine, Application) dlg) { this.dlg = dlg; scopedOnCommandLineListeners ~= this; } void remove(ScopedOnCommandLineDelegateWrapper source) { foreach(index, wrapper; scopedOnCommandLineListeners) { if (wrapper.handlerId == source.handlerId) { scopedOnCommandLineListeners[index] = null; scopedOnCommandLineListeners = std.algorithm.remove(scopedOnCommandLineListeners, index); break; } } } } ScopedOnCommandLineDelegateWrapper[] scopedOnCommandLineListeners; /** * The ::command-line signal is emitted on the primary instance when * a commandline is not handled locally. See g_application_run() and * the #GApplicationCommandLine documentation for more information. * * Params: * commandLine = a #GApplicationCommandLine representing the * passed commandline * * Return: An integer that is set as the exit status for the calling * process. See g_application_command_line_set_exit_status(). */ gulong addOnCommandLine(int delegate(Scoped!ApplicationCommandLine, Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new ScopedOnCommandLineDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "command-line", cast(GCallback)&callBackScopedCommandLine, cast(void*)wrapper, cast(GClosureNotify)&callBackScopedCommandLineDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackScopedCommandLine(GApplication* applicationStruct, GApplicationCommandLine* commandLine, ScopedOnCommandLineDelegateWrapper wrapper) { return wrapper.dlg(getScopedGobject!ApplicationCommandLine(commandLine), wrapper.outer); } extern(C) static void callBackScopedCommandLineDestroy(ScopedOnCommandLineDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** */ /** */ public static GType getType() { return g_application_get_type(); } /** * Creates a new #GApplication instance. * * If non-%NULL, the application id must be valid. See * g_application_id_is_valid(). * * If no application ID is given then some features of #GApplication * (most notably application uniqueness) will be disabled. * * Params: * applicationId = the application id * flags = the application flags * * Returns: a new #GApplication instance * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string applicationId, GApplicationFlags flags) { auto p = g_application_new(Str.toStringz(applicationId), flags); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GApplication*) p, true); } /** * Returns the default #GApplication instance for this process. * * Normally there is only one #GApplication per process and it becomes * the default when it is created. You can exercise more control over * this by using g_application_set_default(). * * If there is no default application then %NULL is returned. * * Returns: the default application for this process, or %NULL * * Since: 2.32 */ public static Application getDefault() { auto p = g_application_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(Application)(cast(GApplication*) p); } /** * Checks if @application_id is a valid application identifier. * * A valid ID is required for calls to g_application_new() and * g_application_set_application_id(). * * For convenience, the restrictions on application identifiers are * reproduced here: * * - Application identifiers must contain only the ASCII characters * "[A-Z][a-z][0-9]_-." and must not begin with a digit. * * - Application identifiers must contain at least one '.' (period) * character (and thus at least two elements). * * - Application identifiers must not begin or end with a '.' (period) * character. * * - Application identifiers must not contain consecutive '.' (period) * characters. * * - Application identifiers must not exceed 255 characters. * * Params: * applicationId = a potential application identifier * * Returns: %TRUE if @application_id is valid */ public static bool idIsValid(string applicationId) { return g_application_id_is_valid(Str.toStringz(applicationId)) != 0; } /** * Activates the application. * * In essence, this results in the #GApplication::activate signal being * emitted in the primary instance. * * The application must be registered before calling this function. * * Since: 2.28 */ public void activate() { g_application_activate(gApplication); } /** * Add an option to be handled by @application. * * Calling this function is the equivalent of calling * g_application_add_main_option_entries() with a single #GOptionEntry * that has its arg_data member set to %NULL. * * The parsed arguments will be packed into a #GVariantDict which * is passed to #GApplication::handle-local-options. If * %G_APPLICATION_HANDLES_COMMAND_LINE is set, then it will also * be sent to the primary instance. See * g_application_add_main_option_entries() for more details. * * See #GOptionEntry for more documentation of the arguments. * * Params: * longName = the long name of an option used to specify it in a commandline * shortName = the short name of an option * flags = flags from #GOptionFlags * arg = the type of the option, as a #GOptionArg * description = the description for the option in `--help` output * argDescription = the placeholder to use for the extra argument * parsed by the option in `--help` output * * Since: 2.42 */ public void addMainOption(string longName, char shortName, GOptionFlags flags, GOptionArg arg, string description, string argDescription) { g_application_add_main_option(gApplication, Str.toStringz(longName), shortName, flags, arg, Str.toStringz(description), Str.toStringz(argDescription)); } /** * Adds main option entries to be handled by @application. * * This function is comparable to g_option_context_add_main_entries(). * * After the commandline arguments are parsed, the * #GApplication::handle-local-options signal will be emitted. At this * point, the application can inspect the values pointed to by @arg_data * in the given #GOptionEntrys. * * Unlike #GOptionContext, #GApplication supports giving a %NULL * @arg_data for a non-callback #GOptionEntry. This results in the * argument in question being packed into a #GVariantDict which is also * passed to #GApplication::handle-local-options, where it can be * inspected and modified. If %G_APPLICATION_HANDLES_COMMAND_LINE is * set, then the resulting dictionary is sent to the primary instance, * where g_application_command_line_get_options_dict() will return it. * This "packing" is done according to the type of the argument -- * booleans for normal flags, strings for strings, bytestrings for * filenames, etc. The packing only occurs if the flag is given (ie: we * do not pack a "false" #GVariant in the case that a flag is missing). * * In general, it is recommended that all commandline arguments are * parsed locally. The options dictionary should then be used to * transmit the result of the parsing to the primary instance, where * g_variant_dict_lookup() can be used. For local options, it is * possible to either use @arg_data in the usual way, or to consult (and * potentially remove) the option from the options dictionary. * * This function is new in GLib 2.40. Before then, the only real choice * was to send all of the commandline arguments (options and all) to the * primary instance for handling. #GApplication ignored them completely * on the local side. Calling this function "opts in" to the new * behaviour, and in particular, means that unrecognised options will be * treated as errors. Unrecognised options have never been ignored when * %G_APPLICATION_HANDLES_COMMAND_LINE is unset. * * If #GApplication::handle-local-options needs to see the list of * filenames, then the use of %G_OPTION_REMAINING is recommended. If * @arg_data is %NULL then %G_OPTION_REMAINING can be used as a key into * the options dictionary. If you do use %G_OPTION_REMAINING then you * need to handle these arguments for yourself because once they are * consumed, they will no longer be visible to the default handling * (which treats them as filenames to be opened). * * It is important to use the proper GVariant format when retrieving * the options with g_variant_dict_lookup(): * - for %G_OPTION_ARG_NONE, use b * - for %G_OPTION_ARG_STRING, use &s * - for %G_OPTION_ARG_INT, use i * - for %G_OPTION_ARG_INT64, use x * - for %G_OPTION_ARG_DOUBLE, use d * - for %G_OPTION_ARG_FILENAME, use ^ay * - for %G_OPTION_ARG_STRING_ARRAY, use &as * - for %G_OPTION_ARG_FILENAME_ARRAY, use ^aay * * Params: * entries = a * %NULL-terminated list of #GOptionEntrys * * Since: 2.40 */ public void addMainOptionEntries(GOptionEntry[] entries) { g_application_add_main_option_entries(gApplication, entries.ptr); } /** * Adds a #GOptionGroup to the commandline handling of @application. * * This function is comparable to g_option_context_add_group(). * * Unlike g_application_add_main_option_entries(), this function does * not deal with %NULL @arg_data and never transmits options to the * primary instance. * * The reason for that is because, by the time the options arrive at the * primary instance, it is typically too late to do anything with them. * Taking the GTK option group as an example: GTK will already have been * initialised by the time the #GApplication::command-line handler runs. * In the case that this is not the first-running instance of the * application, the existing instance may already have been running for * a very long time. * * This means that the options from #GOptionGroup are only really usable * in the case that the instance of the application being run is the * first instance. Passing options like `--display=` or `--gdk-debug=` * on future runs will have no effect on the existing primary instance. * * Calling this function will cause the options in the supplied option * group to be parsed, but it does not cause you to be "opted in" to the * new functionality whereby unrecognised options are rejected even if * %G_APPLICATION_HANDLES_COMMAND_LINE was given. * * Params: * group = a #GOptionGroup * * Since: 2.40 */ public void addOptionGroup(OptionGroup group) { g_application_add_option_group(gApplication, (group is null) ? null : group.getOptionGroupStruct(true)); } /** * Marks @application as busy (see g_application_mark_busy()) while * @property on @object is %TRUE. * * The binding holds a reference to @application while it is active, but * not to @object. Instead, the binding is destroyed when @object is * finalized. * * Params: * object = a #GObject * property = the name of a boolean property of @object * * Since: 2.44 */ public void bindBusyProperty(ObjectG object, string property) { g_application_bind_busy_property(gApplication, (object is null) ? null : object.getObjectGStruct(), Str.toStringz(property)); } /** * Gets the unique identifier for @application. * * Returns: the identifier for @application, owned by @application * * Since: 2.28 */ public string getApplicationId() { return Str.toString(g_application_get_application_id(gApplication)); } /** * Gets the #GDBusConnection being used by the application, or %NULL. * * If #GApplication is using its D-Bus backend then this function will * return the #GDBusConnection being used for uniqueness and * communication with the desktop environment and other instances of the * application. * * If #GApplication is not using D-Bus then this function will return * %NULL. This includes the situation where the D-Bus backend would * normally be in use but we were unable to connect to the bus. * * This function must not be called before the application has been * registered. See g_application_get_is_registered(). * * Returns: a #GDBusConnection, or %NULL * * Since: 2.34 */ public DBusConnection getDbusConnection() { auto p = g_application_get_dbus_connection(gApplication); if(p is null) { return null; } return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p); } /** * Gets the D-Bus object path being used by the application, or %NULL. * * If #GApplication is using its D-Bus backend then this function will * return the D-Bus object path that #GApplication is using. If the * application is the primary instance then there is an object published * at this path. If the application is not the primary instance then * the result of this function is undefined. * * If #GApplication is not using D-Bus then this function will return * %NULL. This includes the situation where the D-Bus backend would * normally be in use but we were unable to connect to the bus. * * This function must not be called before the application has been * registered. See g_application_get_is_registered(). * * Returns: the object path, or %NULL * * Since: 2.34 */ public string getDbusObjectPath() { return Str.toString(g_application_get_dbus_object_path(gApplication)); } /** * Gets the flags for @application. * * See #GApplicationFlags. * * Returns: the flags for @application * * Since: 2.28 */ public GApplicationFlags getFlags() { return g_application_get_flags(gApplication); } /** * Gets the current inactivity timeout for the application. * * This is the amount of time (in milliseconds) after the last call to * g_application_release() before the application stops running. * * Returns: the timeout, in milliseconds * * Since: 2.28 */ public uint getInactivityTimeout() { return g_application_get_inactivity_timeout(gApplication); } /** * Gets the application's current busy state, as set through * g_application_mark_busy() or g_application_bind_busy_property(). * * Returns: %TRUE if @application is currenty marked as busy * * Since: 2.44 */ public bool getIsBusy() { return g_application_get_is_busy(gApplication) != 0; } /** * Checks if @application is registered. * * An application is registered if g_application_register() has been * successfully called. * * Returns: %TRUE if @application is registered * * Since: 2.28 */ public bool getIsRegistered() { return g_application_get_is_registered(gApplication) != 0; } /** * Checks if @application is remote. * * If @application is remote then it means that another instance of * application already exists (the 'primary' instance). Calls to * perform actions on @application will result in the actions being * performed by the primary instance. * * The value of this property cannot be accessed before * g_application_register() has been called. See * g_application_get_is_registered(). * * Returns: %TRUE if @application is remote * * Since: 2.28 */ public bool getIsRemote() { return g_application_get_is_remote(gApplication) != 0; } /** * Gets the resource base path of @application. * * See g_application_set_resource_base_path() for more information. * * Returns: the base resource path, if one is set * * Since: 2.42 */ public string getResourceBasePath() { return Str.toString(g_application_get_resource_base_path(gApplication)); } /** * Increases the use count of @application. * * Use this function to indicate that the application has a reason to * continue to run. For example, g_application_hold() is called by GTK+ * when a toplevel window is on the screen. * * To cancel the hold, call g_application_release(). */ public void hold() { g_application_hold(gApplication); } /** * Increases the busy count of @application. * * Use this function to indicate that the application is busy, for instance * while a long running operation is pending. * * The busy state will be exposed to other processes, so a session shell will * use that information to indicate the state to the user (e.g. with a * spinner). * * To cancel the busy indication, use g_application_unmark_busy(). * * Since: 2.38 */ public void markBusy() { g_application_mark_busy(gApplication); } /** * Opens the given files. * * In essence, this results in the #GApplication::open signal being emitted * in the primary instance. * * @n_files must be greater than zero. * * @hint is simply passed through to the ::open signal. It is * intended to be used by applications that have multiple modes for * opening files (eg: "view" vs "edit", etc). Unless you have a need * for this functionality, you should use "". * * The application must be registered before calling this function * and it must have the %G_APPLICATION_HANDLES_OPEN flag set. * * Params: * files = an array of #GFiles to open * hint = a hint (or ""), but never %NULL * * Since: 2.28 */ public void open(FileIF[] files, string hint) { GFile*[] filesArray = new GFile*[files.length]; for ( int i = 0; i < files.length; i++ ) { filesArray[i] = files[i].getFileStruct(); } g_application_open(gApplication, filesArray.ptr, cast(int)files.length, Str.toStringz(hint)); } /** * Immediately quits the application. * * Upon return to the mainloop, g_application_run() will return, * calling only the 'shutdown' function before doing so. * * The hold count is ignored. * * The result of calling g_application_run() again after it returns is * unspecified. * * Since: 2.32 */ public void quit() { g_application_quit(gApplication); } /** * Attempts registration of the application. * * This is the point at which the application discovers if it is the * primary instance or merely acting as a remote for an already-existing * primary instance. This is implemented by attempting to acquire the * application identifier as a unique bus name on the session bus using * GDBus. * * If there is no application ID or if %G_APPLICATION_NON_UNIQUE was * given, then this process will always become the primary instance. * * Due to the internal architecture of GDBus, method calls can be * dispatched at any time (even if a main loop is not running). For * this reason, you must ensure that any object paths that you wish to * register are registered before calling this function. * * If the application has already been registered then %TRUE is * returned with no work performed. * * The #GApplication::startup signal is emitted if registration succeeds * and @application is the primary instance (including the non-unique * case). * * In the event of an error (such as @cancellable being cancelled, or a * failure to connect to the session bus), %FALSE is returned and @error * is set appropriately. * * Note: the return value of this function is not an indicator that this * instance is or is not the primary instance of the application. See * g_application_get_is_remote() for that. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE if registration succeeded * * Since: 2.28 * * Throws: GException on failure. */ public bool register(Cancellable cancellable) { GError* err = null; auto p = g_application_register(gApplication, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Decrease the use count of @application. * * When the use count reaches zero, the application will stop running. * * Never call this function except to cancel the effect of a previous * call to g_application_hold(). */ public void release() { g_application_release(gApplication); } /** * Runs the application. * * This function is intended to be run from main() and its return value * is intended to be returned by main(). Although you are expected to pass * the @argc, @argv parameters from main() to this function, it is possible * to pass %NULL if @argv is not available or commandline handling is not * required. Note that on Windows, @argc and @argv are ignored, and * g_win32_get_command_line() is called internally (for proper support * of Unicode commandline arguments). * * #GApplication will attempt to parse the commandline arguments. You * can add commandline flags to the list of recognised options by way of * g_application_add_main_option_entries(). After this, the * #GApplication::handle-local-options signal is emitted, from which the * application can inspect the values of its #GOptionEntrys. * * #GApplication::handle-local-options is a good place to handle options * such as `--version`, where an immediate reply from the local process is * desired (instead of communicating with an already-running instance). * A #GApplication::handle-local-options handler can stop further processing * by returning a non-negative value, which then becomes the exit status of * the process. * * What happens next depends on the flags: if * %G_APPLICATION_HANDLES_COMMAND_LINE was specified then the remaining * commandline arguments are sent to the primary instance, where a * #GApplication::command-line signal is emitted. Otherwise, the * remaining commandline arguments are assumed to be a list of files. * If there are no files listed, the application is activated via the * #GApplication::activate signal. If there are one or more files, and * %G_APPLICATION_HANDLES_OPEN was specified then the files are opened * via the #GApplication::open signal. * * If you are interested in doing more complicated local handling of the * commandline then you should implement your own #GApplication subclass * and override local_command_line(). In this case, you most likely want * to return %TRUE from your local_command_line() implementation to * suppress the default handling. See * [gapplication-example-cmdline2.c][gapplication-example-cmdline2] * for an example. * * If, after the above is done, the use count of the application is zero * then the exit status is returned immediately. If the use count is * non-zero then the default main context is iterated until the use count * falls to zero, at which point 0 is returned. * * If the %G_APPLICATION_IS_SERVICE flag is set, then the service will * run for as much as 10 seconds with a use count of zero while waiting * for the message that caused the activation to arrive. After that, * if the use count falls to zero the application will exit immediately, * except in the case that g_application_set_inactivity_timeout() is in * use. * * This function sets the prgname (g_set_prgname()), if not already set, * to the basename of argv[0]. * * Much like g_main_loop_run(), this function will acquire the main context * for the duration that the application is running. * * Since 2.40, applications that are not explicitly flagged as services * or launchers (ie: neither %G_APPLICATION_IS_SERVICE or * %G_APPLICATION_IS_LAUNCHER are given as flags) will check (from the * default handler for local_command_line) if "--gapplication-service" * was given in the command line. If this flag is present then normal * commandline processing is interrupted and the * %G_APPLICATION_IS_SERVICE flag is set. This provides a "compromise" * solution whereby running an application directly from the commandline * will invoke it in the normal way (which can be useful for debugging) * while still allowing applications to be D-Bus activated in service * mode. The D-Bus service file should invoke the executable with * "--gapplication-service" as the sole commandline argument. This * approach is suitable for use by most graphical applications but * should not be used from applications like editors that need precise * control over when processes invoked via the commandline will exit and * what their exit status will be. * * Params: * argv = the argv from main(), or %NULL * * Returns: the exit status * * Since: 2.28 */ public int run(string[] argv) { return g_application_run(gApplication, cast(int)argv.length, Str.toStringzArray(argv)); } /** * Sends a notification on behalf of @application to the desktop shell. * There is no guarantee that the notification is displayed immediately, * or even at all. * * Notifications may persist after the application exits. It will be * D-Bus-activated when the notification or one of its actions is * activated. * * Modifying @notification after this call has no effect. However, the * object can be reused for a later call to this function. * * @id may be any string that uniquely identifies the event for the * application. It does not need to be in any special format. For * example, "new-message" might be appropriate for a notification about * new messages. * * If a previous notification was sent with the same @id, it will be * replaced with @notification and shown again as if it was a new * notification. This works even for notifications sent from a previous * execution of the application, as long as @id is the same string. * * @id may be %NULL, but it is impossible to replace or withdraw * notifications without an id. * * If @notification is no longer relevant, it can be withdrawn with * g_application_withdraw_notification(). * * Params: * id = id of the notification, or %NULL * notification = the #GNotification to send * * Since: 2.40 */ public void sendNotification(string id, Notification notification) { g_application_send_notification(gApplication, Str.toStringz(id), (notification is null) ? null : notification.getNotificationStruct()); } /** * This used to be how actions were associated with a #GApplication. * Now there is #GActionMap for that. * * Deprecated: Use the #GActionMap interface instead. Never ever * mix use of this API with use of #GActionMap on the same @application * or things will go very badly wrong. This function is known to * introduce buggy behaviour (ie: signals not emitted on changes to the * action group), so you should really use #GActionMap instead. * * Params: * actionGroup = a #GActionGroup, or %NULL * * Since: 2.28 */ public void setActionGroup(ActionGroupIF actionGroup) { g_application_set_action_group(gApplication, (actionGroup is null) ? null : actionGroup.getActionGroupStruct()); } /** * Sets the unique identifier for @application. * * The application id can only be modified if @application has not yet * been registered. * * If non-%NULL, the application id must be valid. See * g_application_id_is_valid(). * * Params: * applicationId = the identifier for @application * * Since: 2.28 */ public void setApplicationId(string applicationId) { g_application_set_application_id(gApplication, Str.toStringz(applicationId)); } /** * Sets or unsets the default application for the process, as returned * by g_application_get_default(). * * This function does not take its own reference on @application. If * @application is destroyed then the default application will revert * back to %NULL. * * Since: 2.32 */ public void setDefault() { g_application_set_default(gApplication); } /** * Sets the flags for @application. * * The flags can only be modified if @application has not yet been * registered. * * See #GApplicationFlags. * * Params: * flags = the flags for @application * * Since: 2.28 */ public void setFlags(GApplicationFlags flags) { g_application_set_flags(gApplication, flags); } /** * Sets the current inactivity timeout for the application. * * This is the amount of time (in milliseconds) after the last call to * g_application_release() before the application stops running. * * This call has no side effects of its own. The value set here is only * used for next time g_application_release() drops the use count to * zero. Any timeouts currently in progress are not impacted. * * Params: * inactivityTimeout = the timeout, in milliseconds * * Since: 2.28 */ public void setInactivityTimeout(uint inactivityTimeout) { g_application_set_inactivity_timeout(gApplication, inactivityTimeout); } /** * Sets (or unsets) the base resource path of @application. * * The path is used to automatically load various [application * resources][gresource] such as menu layouts and action descriptions. * The various types of resources will be found at fixed names relative * to the given base path. * * By default, the resource base path is determined from the application * ID by prefixing '/' and replacing each '.' with '/'. This is done at * the time that the #GApplication object is constructed. Changes to * the application ID after that point will not have an impact on the * resource base path. * * As an example, if the application has an ID of "org.example.app" then * the default resource base path will be "/org/example/app". If this * is a #GtkApplication (and you have not manually changed the path) * then Gtk will then search for the menus of the application at * "/org/example/app/gtk/menus.ui". * * See #GResource for more information about adding resources to your * application. * * You can disable automatic resource loading functionality by setting * the path to %NULL. * * Changing the resource base path once the application is running is * not recommended. The point at which the resource path is consulted * for forming paths for various purposes is unspecified. When writing * a sub-class of #GApplication you should either set the * #GApplication:resource-base-path property at construction time, or call * this function during the instance initialization. Alternatively, you * can call this function in the #GApplicationClass.startup virtual function, * before chaining up to the parent implementation. * * Params: * resourcePath = the resource path to use * * Since: 2.42 */ public void setResourceBasePath(string resourcePath) { g_application_set_resource_base_path(gApplication, Str.toStringz(resourcePath)); } /** * Destroys a binding between @property and the busy state of * @application that was previously created with * g_application_bind_busy_property(). * * Params: * object = a #GObject * property = the name of a boolean property of @object * * Since: 2.44 */ public void unbindBusyProperty(ObjectG object, string property) { g_application_unbind_busy_property(gApplication, (object is null) ? null : object.getObjectGStruct(), Str.toStringz(property)); } /** * Decreases the busy count of @application. * * When the busy count reaches zero, the new state will be propagated * to other processes. * * This function must only be called to cancel the effect of a previous * call to g_application_mark_busy(). * * Since: 2.38 */ public void unmarkBusy() { g_application_unmark_busy(gApplication); } /** * Withdraws a notification that was sent with * g_application_send_notification(). * * This call does nothing if a notification with @id doesn't exist or * the notification was never sent. * * This function works even for notifications sent in previous * executions of this application, as long @id is the same as it was for * the sent notification. * * Note that notifications are dismissed when the user clicks on one * of the buttons in a notification or triggers its default action, so * there is no need to explicitly withdraw the notification in that case. * * Params: * id = id of a previously sent notification * * Since: 2.40 */ public void withdrawNotification(string id) { g_application_withdraw_notification(gApplication, Str.toStringz(id)); } protected class OnActivateDelegateWrapper { void delegate(Application) dlg; gulong handlerId; this(void delegate(Application) dlg) { this.dlg = dlg; onActivateListeners ~= this; } void remove(OnActivateDelegateWrapper source) { foreach(index, wrapper; onActivateListeners) { if (wrapper.handlerId == source.handlerId) { onActivateListeners[index] = null; onActivateListeners = std.algorithm.remove(onActivateListeners, index); break; } } } } OnActivateDelegateWrapper[] onActivateListeners; /** * The ::activate signal is emitted on the primary instance when an * activation occurs. See g_application_activate(). */ gulong addOnActivate(void delegate(Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActivateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "activate", cast(GCallback)&callBackActivate, cast(void*)wrapper, cast(GClosureNotify)&callBackActivateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActivate(GApplication* applicationStruct, OnActivateDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackActivateDestroy(OnActivateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnCommandLineDelegateWrapper { int delegate(ApplicationCommandLine, Application) dlg; gulong handlerId; this(int delegate(ApplicationCommandLine, Application) dlg) { this.dlg = dlg; onCommandLineListeners ~= this; } void remove(OnCommandLineDelegateWrapper source) { foreach(index, wrapper; onCommandLineListeners) { if (wrapper.handlerId == source.handlerId) { onCommandLineListeners[index] = null; onCommandLineListeners = std.algorithm.remove(onCommandLineListeners, index); break; } } } } OnCommandLineDelegateWrapper[] onCommandLineListeners; /** * The ::command-line signal is emitted on the primary instance when * a commandline is not handled locally. See g_application_run() and * the #GApplicationCommandLine documentation for more information. * * Params: * commandLine = a #GApplicationCommandLine representing the * passed commandline * * Returns: An integer that is set as the exit status for the calling * process. See g_application_command_line_set_exit_status(). */ gulong addOnCommandLine(int delegate(ApplicationCommandLine, Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnCommandLineDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "command-line", cast(GCallback)&callBackCommandLine, cast(void*)wrapper, cast(GClosureNotify)&callBackCommandLineDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackCommandLine(GApplication* applicationStruct, GApplicationCommandLine* commandLine, OnCommandLineDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(ApplicationCommandLine)(commandLine), wrapper.outer); } extern(C) static void callBackCommandLineDestroy(OnCommandLineDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnHandleLocalOptionsDelegateWrapper { int delegate(VariantDict, Application) dlg; gulong handlerId; this(int delegate(VariantDict, Application) dlg) { this.dlg = dlg; onHandleLocalOptionsListeners ~= this; } void remove(OnHandleLocalOptionsDelegateWrapper source) { foreach(index, wrapper; onHandleLocalOptionsListeners) { if (wrapper.handlerId == source.handlerId) { onHandleLocalOptionsListeners[index] = null; onHandleLocalOptionsListeners = std.algorithm.remove(onHandleLocalOptionsListeners, index); break; } } } } OnHandleLocalOptionsDelegateWrapper[] onHandleLocalOptionsListeners; /** * The ::handle-local-options signal is emitted on the local instance * after the parsing of the commandline options has occurred. * * You can add options to be recognised during commandline option * parsing using g_application_add_main_option_entries() and * g_application_add_option_group(). * * Signal handlers can inspect @options (along with values pointed to * from the @arg_data of an installed #GOptionEntrys) in order to * decide to perform certain actions, including direct local handling * (which may be useful for options like --version). * * In the event that the application is marked * %G_APPLICATION_HANDLES_COMMAND_LINE the "normal processing" will * send the @options dictionary to the primary instance where it can be * read with g_application_command_line_get_options_dict(). The signal * handler can modify the dictionary before returning, and the * modified dictionary will be sent. * * In the event that %G_APPLICATION_HANDLES_COMMAND_LINE is not set, * "normal processing" will treat the remaining uncollected command * line arguments as filenames or URIs. If there are no arguments, * the application is activated by g_application_activate(). One or * more arguments results in a call to g_application_open(). * * If you want to handle the local commandline arguments for yourself * by converting them to calls to g_application_open() or * g_action_group_activate_action() then you must be sure to register * the application first. You should probably not call * g_application_activate() for yourself, however: just return -1 and * allow the default handler to do it for you. This will ensure that * the `--gapplication-service` switch works properly (i.e. no activation * in that case). * * Note that this signal is emitted from the default implementation of * local_command_line(). If you override that function and don't * chain up then this signal will never be emitted. * * You can override local_command_line() if you need more powerful * capabilities than what is provided here, but this should not * normally be required. * * Params: * options = the options dictionary * * Returns: an exit code. If you have handled your options and want * to exit the process, return a non-negative option, 0 for success, * and a positive value for failure. To continue, return -1 to let * the default option processing continue. * * Since: 2.40 */ gulong addOnHandleLocalOptions(int delegate(VariantDict, Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnHandleLocalOptionsDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "handle-local-options", cast(GCallback)&callBackHandleLocalOptions, cast(void*)wrapper, cast(GClosureNotify)&callBackHandleLocalOptionsDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackHandleLocalOptions(GApplication* applicationStruct, GVariantDict* options, OnHandleLocalOptionsDelegateWrapper wrapper) { return wrapper.dlg(new VariantDict(options), wrapper.outer); } extern(C) static void callBackHandleLocalOptionsDestroy(OnHandleLocalOptionsDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnOpenDelegateWrapper { void delegate(void*, int, string, Application) dlg; gulong handlerId; this(void delegate(void*, int, string, Application) dlg) { this.dlg = dlg; onOpenListeners ~= this; } void remove(OnOpenDelegateWrapper source) { foreach(index, wrapper; onOpenListeners) { if (wrapper.handlerId == source.handlerId) { onOpenListeners[index] = null; onOpenListeners = std.algorithm.remove(onOpenListeners, index); break; } } } } OnOpenDelegateWrapper[] onOpenListeners; /** * The ::open signal is emitted on the primary instance when there are * files to open. See g_application_open() for more information. * * Params: * files = an array of #GFiles * nFiles = the length of @files * hint = a hint provided by the calling instance */ gulong addOnOpen(void delegate(void*, int, string, Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnOpenDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "open", cast(GCallback)&callBackOpen, cast(void*)wrapper, cast(GClosureNotify)&callBackOpenDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackOpen(GApplication* applicationStruct, void* files, int nFiles, char* hint, OnOpenDelegateWrapper wrapper) { wrapper.dlg(files, nFiles, Str.toString(hint), wrapper.outer); } extern(C) static void callBackOpenDestroy(OnOpenDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnShutdownDelegateWrapper { void delegate(Application) dlg; gulong handlerId; this(void delegate(Application) dlg) { this.dlg = dlg; onShutdownListeners ~= this; } void remove(OnShutdownDelegateWrapper source) { foreach(index, wrapper; onShutdownListeners) { if (wrapper.handlerId == source.handlerId) { onShutdownListeners[index] = null; onShutdownListeners = std.algorithm.remove(onShutdownListeners, index); break; } } } } OnShutdownDelegateWrapper[] onShutdownListeners; /** * The ::shutdown signal is emitted only on the registered primary instance * immediately after the main loop terminates. */ gulong addOnShutdown(void delegate(Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnShutdownDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "shutdown", cast(GCallback)&callBackShutdown, cast(void*)wrapper, cast(GClosureNotify)&callBackShutdownDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackShutdown(GApplication* applicationStruct, OnShutdownDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackShutdownDestroy(OnShutdownDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnStartupDelegateWrapper { void delegate(Application) dlg; gulong handlerId; this(void delegate(Application) dlg) { this.dlg = dlg; onStartupListeners ~= this; } void remove(OnStartupDelegateWrapper source) { foreach(index, wrapper; onStartupListeners) { if (wrapper.handlerId == source.handlerId) { onStartupListeners[index] = null; onStartupListeners = std.algorithm.remove(onStartupListeners, index); break; } } } } OnStartupDelegateWrapper[] onStartupListeners; /** * The ::startup signal is emitted on the primary instance immediately * after registration. See g_application_register(). */ gulong addOnStartup(void delegate(Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnStartupDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "startup", cast(GCallback)&callBackStartup, cast(void*)wrapper, cast(GClosureNotify)&callBackStartupDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackStartup(GApplication* applicationStruct, OnStartupDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackStartupDestroy(OnStartupDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/ApplicationCommandLine.d000066400000000000000000000362111324604450400225500ustar00rootroot00000000000000/* * 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 gio.ApplicationCommandLine; private import gio.FileIF; private import gio.InputStream; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.Variant; private import glib.VariantDict; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GApplicationCommandLine represents a command-line invocation of * an application. It is created by #GApplication and emitted * in the #GApplication::command-line signal and virtual function. * * The class contains the list of arguments that the program was invoked * with. It is also possible to query if the commandline invocation was * local (ie: the current process is running in direct response to the * invocation) or remote (ie: some other process forwarded the * commandline to this process). * * The GApplicationCommandLine object can provide the @argc and @argv * parameters for use with the #GOptionContext command-line parsing API, * with the g_application_command_line_get_arguments() function. See * [gapplication-example-cmdline3.c][gapplication-example-cmdline3] * for an example. * * The exit status of the originally-invoked process may be set and * messages can be printed to stdout or stderr of that process. The * lifecycle of the originally-invoked process is tied to the lifecycle * of this object (ie: the process exits when the last reference is * dropped). * * The main use for #GApplicationCommandLine (and the * #GApplication::command-line signal) is 'Emacs server' like use cases: * You can set the `EDITOR` environment variable to have e.g. git use * your favourite editor to edit commit messages, and if you already * have an instance of the editor running, the editing will happen * in the running instance, instead of opening a new one. An important * aspect of this use case is that the process that gets started by git * does not return until the editing is done. * * Normally, the commandline is completely handled in the * #GApplication::command-line handler. The launching instance exits * once the signal handler in the primary instance has returned, and * the return value of the signal handler becomes the exit status * of the launching instance. * |[ * static int * command_line (GApplication *application, * GApplicationCommandLine *cmdline) * { * gchar **argv; * gint argc; * gint i; * * argv = g_application_command_line_get_arguments (cmdline, &argc); * * g_application_command_line_print (cmdline, * "This text is written back\n" * "to stdout of the caller\n"); * * for (i = 0; i < argc; i++) * g_print ("argument %d: %s\n", i, argv[i]); * * g_strfreev (argv); * * return 0; * } * ]| * The complete example can be found here: * [gapplication-example-cmdline.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline.c) * * In more complicated cases, the handling of the comandline can be * split between the launcher and the primary instance. * |[ * static gboolean * test_local_cmdline (GApplication *application, * gchar ***arguments, * gint *exit_status) * { * gint i, j; * gchar **argv; * * argv = *arguments; * * i = 1; * while (argv[i]) * { * if (g_str_has_prefix (argv[i], "--local-")) * { * g_print ("handling argument %s locally\n", argv[i]); * g_free (argv[i]); * for (j = i; argv[j]; j++) * argv[j] = argv[j + 1]; * } * else * { * g_print ("not handling argument %s locally\n", argv[i]); * i++; * } * } * * *exit_status = 0; * * return FALSE; * } * * static void * test_application_class_init (TestApplicationClass *class) * { * G_APPLICATION_CLASS (class)->local_command_line = test_local_cmdline; * * ... * } * ]| * In this example of split commandline handling, options that start * with `--local-` are handled locally, all other options are passed * to the #GApplication::command-line handler which runs in the primary * instance. * * The complete example can be found here: * [gapplication-example-cmdline2.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline2.c) * * If handling the commandline requires a lot of work, it may * be better to defer it. * |[ * static gboolean * my_cmdline_handler (gpointer data) * { * GApplicationCommandLine *cmdline = data; * * // do the heavy lifting in an idle * * g_application_command_line_set_exit_status (cmdline, 0); * g_object_unref (cmdline); // this releases the application * * return G_SOURCE_REMOVE; * } * * static int * command_line (GApplication *application, * GApplicationCommandLine *cmdline) * { * // keep the application running until we are done with this commandline * g_application_hold (application); * * g_object_set_data_full (G_OBJECT (cmdline), * "application", application, * (GDestroyNotify)g_application_release); * * g_object_ref (cmdline); * g_idle_add (my_cmdline_handler, cmdline); * * return 0; * } * ]| * In this example the commandline is not completely handled before * the #GApplication::command-line handler returns. Instead, we keep * a reference to the #GApplicationCommandLine object and handle it * later (in this example, in an idle). Note that it is necessary to * hold the application until you are done with the commandline. * * The complete example can be found here: * [gapplication-example-cmdline3.c](https://git.gnome.org/browse/glib/tree/gio/tests/gapplication-example-cmdline3.c) */ public class ApplicationCommandLine : ObjectG { /** the main Gtk struct */ protected GApplicationCommandLine* gApplicationCommandLine; /** Get the main Gtk struct */ public GApplicationCommandLine* getApplicationCommandLineStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gApplicationCommandLine; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gApplicationCommandLine; } protected override void setStruct(GObject* obj) { gApplicationCommandLine = cast(GApplicationCommandLine*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GApplicationCommandLine* gApplicationCommandLine, bool ownedRef = false) { this.gApplicationCommandLine = gApplicationCommandLine; super(cast(GObject*)gApplicationCommandLine, ownedRef); } /** */ public static GType getType() { return g_application_command_line_get_type(); } /** * Creates a #GFile corresponding to a filename that was given as part * of the invocation of @cmdline. * * This differs from g_file_new_for_commandline_arg() in that it * resolves relative pathnames using the current working directory of * the invoking process rather than the local process. * * Params: * arg = an argument from @cmdline * * Returns: a new #GFile * * Since: 2.36 */ public FileIF createFileForArg(string arg) { auto p = g_application_command_line_create_file_for_arg(gApplicationCommandLine, Str.toStringz(arg)); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets the list of arguments that was passed on the command line. * * The strings in the array may contain non-UTF-8 data on UNIX (such as * filenames or arguments given in the system locale) but are always in * UTF-8 on Windows. * * If you wish to use the return value with #GOptionContext, you must * use g_option_context_parse_strv(). * * The return value is %NULL-terminated and should be freed using * g_strfreev(). * * Returns: the string array * containing the arguments (the argv) * * Since: 2.28 */ public string[] getArguments() { int argc; auto retStr = g_application_command_line_get_arguments(gApplicationCommandLine, &argc); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr, argc); } /** * Gets the working directory of the command line invocation. * The string may contain non-utf8 data. * * It is possible that the remote application did not send a working * directory, so this may be %NULL. * * The return value should not be modified or freed and is valid for as * long as @cmdline exists. * * Returns: the current directory, or %NULL * * Since: 2.28 */ public string getCwd() { return Str.toString(g_application_command_line_get_cwd(gApplicationCommandLine)); } /** * Gets the contents of the 'environ' variable of the command line * invocation, as would be returned by g_get_environ(), ie as a * %NULL-terminated list of strings in the form 'NAME=VALUE'. * The strings may contain non-utf8 data. * * The remote application usually does not send an environment. Use * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag * set it is possible that the environment is still not available (due * to invocation messages from other applications). * * The return value should not be modified or freed and is valid for as * long as @cmdline exists. * * See g_application_command_line_getenv() if you are only interested * in the value of a single environment variable. * * Returns: the environment * strings, or %NULL if they were not sent * * Since: 2.28 */ public string[] getEnviron() { return Str.toStringArray(g_application_command_line_get_environ(gApplicationCommandLine)); } /** * Gets the exit status of @cmdline. See * g_application_command_line_set_exit_status() for more information. * * Returns: the exit status * * Since: 2.28 */ public int getExitStatus() { return g_application_command_line_get_exit_status(gApplicationCommandLine); } /** * Determines if @cmdline represents a remote invocation. * * Returns: %TRUE if the invocation was remote * * Since: 2.28 */ public bool getIsRemote() { return g_application_command_line_get_is_remote(gApplicationCommandLine) != 0; } /** * Gets the options there were passed to g_application_command_line(). * * If you did not override local_command_line() then these are the same * options that were parsed according to the #GOptionEntrys added to the * application with g_application_add_main_option_entries() and possibly * modified from your GApplication::handle-local-options handler. * * If no options were sent then an empty dictionary is returned so that * you don't need to check for %NULL. * * Returns: a #GVariantDict with the options * * Since: 2.40 */ public VariantDict getOptionsDict() { auto p = g_application_command_line_get_options_dict(gApplicationCommandLine); if(p is null) { return null; } return new VariantDict(cast(GVariantDict*) p); } /** * Gets the platform data associated with the invocation of @cmdline. * * This is a #GVariant dictionary containing information about the * context in which the invocation occurred. It typically contains * information like the current working directory and the startup * notification ID. * * For local invocation, it will be %NULL. * * Returns: the platform data, or %NULL * * Since: 2.28 */ public Variant getPlatformData() { auto p = g_application_command_line_get_platform_data(gApplicationCommandLine); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets the stdin of the invoking process. * * The #GInputStream can be used to read data passed to the standard * input of the invoking process. * This doesn't work on all platforms. Presently, it is only available * on UNIX when using a DBus daemon capable of passing file descriptors. * If stdin is not available then %NULL will be returned. In the * future, support may be expanded to other platforms. * * You must only call this function once per commandline invocation. * * Returns: a #GInputStream for stdin * * Since: 2.34 */ public InputStream getStdin() { auto p = g_application_command_line_get_stdin(gApplicationCommandLine); if(p is null) { return null; } return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p, true); } /** * Gets the value of a particular environment variable of the command * line invocation, as would be returned by g_getenv(). The strings may * contain non-utf8 data. * * The remote application usually does not send an environment. Use * %G_APPLICATION_SEND_ENVIRONMENT to affect that. Even with this flag * set it is possible that the environment is still not available (due * to invocation messages from other applications). * * The return value should not be modified or freed and is valid for as * long as @cmdline exists. * * Params: * name = the environment variable to get * * Returns: the value of the variable, or %NULL if unset or unsent * * Since: 2.28 */ public string getenv(string name) { return Str.toString(g_application_command_line_getenv(gApplicationCommandLine, Str.toStringz(name))); } /** * Sets the exit status that will be used when the invoking process * exits. * * The return value of the #GApplication::command-line signal is * passed to this function when the handler returns. This is the usual * way of setting the exit status. * * In the event that you want the remote invocation to continue running * and want to decide on the exit status in the future, you can use this * call. For the case of a remote invocation, the remote process will * typically exit when the last reference is dropped on @cmdline. The * exit status of the remote process will be equal to the last value * that was set with this function. * * In the case that the commandline invocation is local, the situation * is slightly more complicated. If the commandline invocation results * in the mainloop running (ie: because the use-count of the application * increased to a non-zero value) then the application is considered to * have been 'successful' in a certain sense, and the exit status is * always zero. If the application use count is zero, though, the exit * status of the local #GApplicationCommandLine is used. * * Params: * exitStatus = the exit status * * Since: 2.28 */ public void setExitStatus(int exitStatus) { g_application_command_line_set_exit_status(gApplicationCommandLine, exitStatus); } } GtkD-3.7.5/generated/gtkd/gio/AsyncInitableIF.d000066400000000000000000000237241324604450400211470ustar00rootroot00000000000000/* * 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 gio.AsyncInitableIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * This is the asynchronous version of #GInitable; it behaves the same * in all ways except that initialization is asynchronous. For more details * see the descriptions on #GInitable. * * A class may implement both the #GInitable and #GAsyncInitable interfaces. * * Users of objects implementing this are not intended to use the interface * method directly; instead it will be used automatically in various ways. * For C applications you generally just call g_async_initable_new_async() * directly, or indirectly via a foo_thing_new_async() wrapper. This will call * g_async_initable_init_async() under the cover, calling back with %NULL and * a set %GError on failure. * * A typical implementation might look something like this: * * |[ * enum { * NOT_INITIALIZED, * INITIALIZING, * INITIALIZED * }; * * static void * _foo_ready_cb (Foo *self) * { * GList *l; * * self->priv->state = INITIALIZED; * * for (l = self->priv->init_results; l != NULL; l = l->next) * { * GTask *task = l->data; * * if (self->priv->success) * g_task_return_boolean (task, TRUE); * else * g_task_return_new_error (task, ...); * g_object_unref (task); * } * * g_list_free (self->priv->init_results); * self->priv->init_results = NULL; * } * * static void * foo_init_async (GAsyncInitable *initable, * int io_priority, * GCancellable *cancellable, * GAsyncReadyCallback callback, * gpointer user_data) * { * Foo *self = FOO (initable); * GTask *task; * * task = g_task_new (initable, cancellable, callback, user_data); * * switch (self->priv->state) * { * case NOT_INITIALIZED: * _foo_get_ready (self); * self->priv->init_results = g_list_append (self->priv->init_results, * task); * self->priv->state = INITIALIZING; * break; * case INITIALIZING: * self->priv->init_results = g_list_append (self->priv->init_results, * task); * break; * case INITIALIZED: * if (!self->priv->success) * g_task_return_new_error (task, ...); * else * g_task_return_boolean (task, TRUE); * g_object_unref (task); * break; * } * } * * static gboolean * foo_init_finish (GAsyncInitable *initable, * GAsyncResult *result, * GError **error) * { * g_return_val_if_fail (g_task_is_valid (result, initable), FALSE); * * return g_task_propagate_boolean (G_TASK (result), error); * } * * static void * foo_async_initable_iface_init (gpointer g_iface, * gpointer data) * { * GAsyncInitableIface *iface = g_iface; * * iface->init_async = foo_init_async; * iface->init_finish = foo_init_finish; * } * ]| * * Since: 2.22 */ public interface AsyncInitableIF{ /** Get the main Gtk struct */ public GAsyncInitable* getAsyncInitableStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_async_initable_get_type(); } /** * Helper function for constructing #GAsyncInitable object. This is * similar to g_object_new_valist() but also initializes the object * asynchronously. * * When the initialization is finished, @callback will be called. You can * then call g_async_initable_new_finish() to get the new object and check * for any errors. * * Params: * objectType = a #GType supporting #GAsyncInitable. * firstPropertyName = the name of the first property, followed by * the value, and other property value pairs, and ended by %NULL. * varArgs = The var args list generated from @first_property_name. * ioPriority = the [I/O priority][io-priority] of the operation * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the initialization is * finished * userData = the data to pass to callback function * * Since: 2.22 */ public static void newValistAsync(GType objectType, string firstPropertyName, void* varArgs, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_async_initable_new_valist_async(objectType, Str.toStringz(firstPropertyName), varArgs, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Helper function for constructing #GAsyncInitable object. This is * similar to g_object_newv() but also initializes the object asynchronously. * * When the initialization is finished, @callback will be called. You can * then call g_async_initable_new_finish() to get the new object and check * for any errors. * * Deprecated: Use g_object_new_with_properties() and * g_async_initable_init_async() instead. See #GParameter for more information. * * Params: * objectType = a #GType supporting #GAsyncInitable. * nParameters = the number of parameters in @parameters * parameters = the parameters to use to construct the object * ioPriority = the [I/O priority][io-priority] of the operation * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the initialization is * finished * userData = the data to pass to callback function * * Since: 2.22 */ public static void newvAsync(GType objectType, uint nParameters, GParameter* parameters, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_async_initable_newv_async(objectType, nParameters, parameters, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Starts asynchronous initialization of the object implementing the * interface. This must be done before any real use of the object after * initial construction. If the object also implements #GInitable you can * optionally call g_initable_init() instead. * * This method is intended for language bindings. If writing in C, * g_async_initable_new_async() should typically be used instead. * * When the initialization is finished, @callback will be called. You can * then call g_async_initable_init_finish() to get the result of the * initialization. * * Implementations may also support cancellation. If @cancellable is not * %NULL, then initialization can be cancelled by triggering the cancellable * object from another thread. If the operation was cancelled, the error * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and * the object doesn't support cancellable initialization, the error * %G_IO_ERROR_NOT_SUPPORTED will be returned. * * As with #GInitable, if the object is not initialized, or initialization * returns with an error, then all operations on the object except * g_object_ref() and g_object_unref() are considered to be invalid, and * have undefined behaviour. They will often fail with g_critical() or * g_warning(), but this must not be relied on. * * Callers should not assume that a class which implements #GAsyncInitable can * be initialized multiple times; for more information, see g_initable_init(). * If a class explicitly supports being initialized multiple times, * implementation requires yielding all subsequent calls to init_async() on the * results of the first call. * * For classes that also support the #GInitable interface, the default * implementation of this method will run the g_initable_init() function * in a thread, so if you want to support asynchronous initialization via * threads, just implement the #GAsyncInitable interface without overriding * any interface methods. * * Params: * ioPriority = the [I/O priority][io-priority] of the operation * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void initAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes asynchronous initialization and returns the result. * See g_async_initable_init_async(). * * Params: * res = a #GAsyncResult. * * Returns: %TRUE if successful. If an error has occurred, this function * will return %FALSE and set @error appropriately if present. * * Since: 2.22 * * Throws: GException on failure. */ public bool initFinish(AsyncResultIF res); /** * Finishes the async construction for the various g_async_initable_new * calls, returning the created object or %NULL on error. * * Params: * res = the #GAsyncResult from the callback * * Returns: a newly created #GObject, * or %NULL on error. Free with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public ObjectG newFinish(AsyncResultIF res); } GtkD-3.7.5/generated/gtkd/gio/AsyncInitableT.d000066400000000000000000000200131324604450400210400ustar00rootroot00000000000000/* * 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 gio.AsyncInitableT; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * This is the asynchronous version of #GInitable; it behaves the same * in all ways except that initialization is asynchronous. For more details * see the descriptions on #GInitable. * * A class may implement both the #GInitable and #GAsyncInitable interfaces. * * Users of objects implementing this are not intended to use the interface * method directly; instead it will be used automatically in various ways. * For C applications you generally just call g_async_initable_new_async() * directly, or indirectly via a foo_thing_new_async() wrapper. This will call * g_async_initable_init_async() under the cover, calling back with %NULL and * a set %GError on failure. * * A typical implementation might look something like this: * * |[ * enum { * NOT_INITIALIZED, * INITIALIZING, * INITIALIZED * }; * * static void * _foo_ready_cb (Foo *self) * { * GList *l; * * self->priv->state = INITIALIZED; * * for (l = self->priv->init_results; l != NULL; l = l->next) * { * GTask *task = l->data; * * if (self->priv->success) * g_task_return_boolean (task, TRUE); * else * g_task_return_new_error (task, ...); * g_object_unref (task); * } * * g_list_free (self->priv->init_results); * self->priv->init_results = NULL; * } * * static void * foo_init_async (GAsyncInitable *initable, * int io_priority, * GCancellable *cancellable, * GAsyncReadyCallback callback, * gpointer user_data) * { * Foo *self = FOO (initable); * GTask *task; * * task = g_task_new (initable, cancellable, callback, user_data); * * switch (self->priv->state) * { * case NOT_INITIALIZED: * _foo_get_ready (self); * self->priv->init_results = g_list_append (self->priv->init_results, * task); * self->priv->state = INITIALIZING; * break; * case INITIALIZING: * self->priv->init_results = g_list_append (self->priv->init_results, * task); * break; * case INITIALIZED: * if (!self->priv->success) * g_task_return_new_error (task, ...); * else * g_task_return_boolean (task, TRUE); * g_object_unref (task); * break; * } * } * * static gboolean * foo_init_finish (GAsyncInitable *initable, * GAsyncResult *result, * GError **error) * { * g_return_val_if_fail (g_task_is_valid (result, initable), FALSE); * * return g_task_propagate_boolean (G_TASK (result), error); * } * * static void * foo_async_initable_iface_init (gpointer g_iface, * gpointer data) * { * GAsyncInitableIface *iface = g_iface; * * iface->init_async = foo_init_async; * iface->init_finish = foo_init_finish; * } * ]| * * Since: 2.22 */ public template AsyncInitableT(TStruct) { /** Get the main Gtk struct */ public GAsyncInitable* getAsyncInitableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GAsyncInitable*)getStruct(); } /** * Starts asynchronous initialization of the object implementing the * interface. This must be done before any real use of the object after * initial construction. If the object also implements #GInitable you can * optionally call g_initable_init() instead. * * This method is intended for language bindings. If writing in C, * g_async_initable_new_async() should typically be used instead. * * When the initialization is finished, @callback will be called. You can * then call g_async_initable_init_finish() to get the result of the * initialization. * * Implementations may also support cancellation. If @cancellable is not * %NULL, then initialization can be cancelled by triggering the cancellable * object from another thread. If the operation was cancelled, the error * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and * the object doesn't support cancellable initialization, the error * %G_IO_ERROR_NOT_SUPPORTED will be returned. * * As with #GInitable, if the object is not initialized, or initialization * returns with an error, then all operations on the object except * g_object_ref() and g_object_unref() are considered to be invalid, and * have undefined behaviour. They will often fail with g_critical() or * g_warning(), but this must not be relied on. * * Callers should not assume that a class which implements #GAsyncInitable can * be initialized multiple times; for more information, see g_initable_init(). * If a class explicitly supports being initialized multiple times, * implementation requires yielding all subsequent calls to init_async() on the * results of the first call. * * For classes that also support the #GInitable interface, the default * implementation of this method will run the g_initable_init() function * in a thread, so if you want to support asynchronous initialization via * threads, just implement the #GAsyncInitable interface without overriding * any interface methods. * * Params: * ioPriority = the [I/O priority][io-priority] of the operation * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void initAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_async_initable_init_async(getAsyncInitableStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes asynchronous initialization and returns the result. * See g_async_initable_init_async(). * * Params: * res = a #GAsyncResult. * * Returns: %TRUE if successful. If an error has occurred, this function * will return %FALSE and set @error appropriately if present. * * Since: 2.22 * * Throws: GException on failure. */ public bool initFinish(AsyncResultIF res) { GError* err = null; auto p = g_async_initable_init_finish(getAsyncInitableStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Finishes the async construction for the various g_async_initable_new * calls, returning the created object or %NULL on error. * * Params: * res = the #GAsyncResult from the callback * * Returns: a newly created #GObject, * or %NULL on error. Free with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public ObjectG newFinish(AsyncResultIF res) { GError* err = null; auto p = g_async_initable_new_finish(getAsyncInitableStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/AsyncResultIF.d000066400000000000000000000135751324604450400207010ustar00rootroot00000000000000/* * 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 gio.AsyncResultIF; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * Provides a base class for implementing asynchronous function results. * * Asynchronous operations are broken up into two separate operations * which are chained together by a #GAsyncReadyCallback. To begin * an asynchronous operation, provide a #GAsyncReadyCallback to the * asynchronous function. This callback will be triggered when the * operation has completed, and will be passed a #GAsyncResult instance * filled with the details of the operation's success or failure, the * object the asynchronous function was started for and any error codes * returned. The asynchronous callback function is then expected to call * the corresponding "_finish()" function, passing the object the * function was called for, the #GAsyncResult instance, and (optionally) * an @error to grab any error conditions that may have occurred. * * The "_finish()" function for an operation takes the generic result * (of type #GAsyncResult) and returns the specific result that the * operation in question yields (e.g. a #GFileEnumerator for a * "enumerate children" operation). If the result or error status of the * operation is not needed, there is no need to call the "_finish()" * function; GIO will take care of cleaning up the result and error * information after the #GAsyncReadyCallback returns. You can pass * %NULL for the #GAsyncReadyCallback if you don't need to take any * action at all after the operation completes. Applications may also * take a reference to the #GAsyncResult and call "_finish()" later; * however, the "_finish()" function may be called at most once. * * Example of a typical asynchronous operation flow: * |[ * void _theoretical_frobnitz_async (Theoretical *t, * GCancellable *c, * GAsyncReadyCallback cb, * gpointer u); * * gboolean _theoretical_frobnitz_finish (Theoretical *t, * GAsyncResult *res, * GError **e); * * static void * frobnitz_result_func (GObject *source_object, * GAsyncResult *res, * gpointer user_data) * { * gboolean success = FALSE; * * success = _theoretical_frobnitz_finish (source_object, res, NULL); * * if (success) * g_printf ("Hurray!\n"); * else * g_printf ("Uh oh!\n"); * * ... * * } * * int main (int argc, void *argv[]) * { * ... * * _theoretical_frobnitz_async (theoretical_data, * NULL, * frobnitz_result_func, * NULL); * * ... * } * ]| * * The callback for an asynchronous operation is called only once, and is * always called, even in the case of a cancelled operation. On cancellation * the result is a %G_IO_ERROR_CANCELLED error. * * ## I/O Priority # {#io-priority} * * Many I/O-related asynchronous operations have a priority parameter, * which is used in certain cases to determine the order in which * operations are executed. They are not used to determine system-wide * I/O scheduling. Priorities are integers, with lower numbers indicating * higher priority. It is recommended to choose priorities between * %G_PRIORITY_LOW and %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT * as a default. */ public interface AsyncResultIF{ /** Get the main Gtk struct */ public GAsyncResult* getAsyncResultStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_async_result_get_type(); } /** * Gets the source object from a #GAsyncResult. * * Returns: a new reference to the source object for the @res, * or %NULL if there is none. */ public ObjectG getSourceObject(); /** * Gets the user data from a #GAsyncResult. * * Returns: the user data for @res. */ public void* getUserData(); /** * Checks if @res has the given @source_tag (generally a function * pointer indicating the function @res was created by). * * Params: * sourceTag = an application-defined tag * * Returns: %TRUE if @res has the indicated @source_tag, %FALSE if * not. * * Since: 2.34 */ public bool isTagged(void* sourceTag); /** * If @res is a #GSimpleAsyncResult, this is equivalent to * g_simple_async_result_propagate_error(). Otherwise it returns * %FALSE. * * This can be used for legacy error handling in async *_finish() * wrapper functions that traditionally handled #GSimpleAsyncResult * error returns themselves rather than calling into the virtual method. * This should not be used in new code; #GAsyncResult errors that are * set by virtual methods should also be extracted by virtual methods, * to enable subclasses to chain up correctly. * * Returns: %TRUE if @error is has been filled in with an error from * @res, %FALSE if not. * * Since: 2.34 * * Throws: GException on failure. */ public bool legacyPropagateError(); } GtkD-3.7.5/generated/gtkd/gio/AsyncResultT.d000066400000000000000000000145261324604450400206030ustar00rootroot00000000000000/* * 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 gio.AsyncResultT; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import gobject.ObjectG; public import gtkc.giotypes; /** * Provides a base class for implementing asynchronous function results. * * Asynchronous operations are broken up into two separate operations * which are chained together by a #GAsyncReadyCallback. To begin * an asynchronous operation, provide a #GAsyncReadyCallback to the * asynchronous function. This callback will be triggered when the * operation has completed, and will be passed a #GAsyncResult instance * filled with the details of the operation's success or failure, the * object the asynchronous function was started for and any error codes * returned. The asynchronous callback function is then expected to call * the corresponding "_finish()" function, passing the object the * function was called for, the #GAsyncResult instance, and (optionally) * an @error to grab any error conditions that may have occurred. * * The "_finish()" function for an operation takes the generic result * (of type #GAsyncResult) and returns the specific result that the * operation in question yields (e.g. a #GFileEnumerator for a * "enumerate children" operation). If the result or error status of the * operation is not needed, there is no need to call the "_finish()" * function; GIO will take care of cleaning up the result and error * information after the #GAsyncReadyCallback returns. You can pass * %NULL for the #GAsyncReadyCallback if you don't need to take any * action at all after the operation completes. Applications may also * take a reference to the #GAsyncResult and call "_finish()" later; * however, the "_finish()" function may be called at most once. * * Example of a typical asynchronous operation flow: * |[ * void _theoretical_frobnitz_async (Theoretical *t, * GCancellable *c, * GAsyncReadyCallback cb, * gpointer u); * * gboolean _theoretical_frobnitz_finish (Theoretical *t, * GAsyncResult *res, * GError **e); * * static void * frobnitz_result_func (GObject *source_object, * GAsyncResult *res, * gpointer user_data) * { * gboolean success = FALSE; * * success = _theoretical_frobnitz_finish (source_object, res, NULL); * * if (success) * g_printf ("Hurray!\n"); * else * g_printf ("Uh oh!\n"); * * ... * * } * * int main (int argc, void *argv[]) * { * ... * * _theoretical_frobnitz_async (theoretical_data, * NULL, * frobnitz_result_func, * NULL); * * ... * } * ]| * * The callback for an asynchronous operation is called only once, and is * always called, even in the case of a cancelled operation. On cancellation * the result is a %G_IO_ERROR_CANCELLED error. * * ## I/O Priority # {#io-priority} * * Many I/O-related asynchronous operations have a priority parameter, * which is used in certain cases to determine the order in which * operations are executed. They are not used to determine system-wide * I/O scheduling. Priorities are integers, with lower numbers indicating * higher priority. It is recommended to choose priorities between * %G_PRIORITY_LOW and %G_PRIORITY_HIGH, with %G_PRIORITY_DEFAULT * as a default. */ public template AsyncResultT(TStruct) { /** Get the main Gtk struct */ public GAsyncResult* getAsyncResultStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GAsyncResult*)getStruct(); } /** * Gets the source object from a #GAsyncResult. * * Returns: a new reference to the source object for the @res, * or %NULL if there is none. */ public ObjectG getSourceObject() { auto p = g_async_result_get_source_object(getAsyncResultStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); } /** * Gets the user data from a #GAsyncResult. * * Returns: the user data for @res. */ public void* getUserData() { return g_async_result_get_user_data(getAsyncResultStruct()); } /** * Checks if @res has the given @source_tag (generally a function * pointer indicating the function @res was created by). * * Params: * sourceTag = an application-defined tag * * Returns: %TRUE if @res has the indicated @source_tag, %FALSE if * not. * * Since: 2.34 */ public bool isTagged(void* sourceTag) { return g_async_result_is_tagged(getAsyncResultStruct(), sourceTag) != 0; } /** * If @res is a #GSimpleAsyncResult, this is equivalent to * g_simple_async_result_propagate_error(). Otherwise it returns * %FALSE. * * This can be used for legacy error handling in async *_finish() * wrapper functions that traditionally handled #GSimpleAsyncResult * error returns themselves rather than calling into the virtual method. * This should not be used in new code; #GAsyncResult errors that are * set by virtual methods should also be extracted by virtual methods, * to enable subclasses to chain up correctly. * * Returns: %TRUE if @error is has been filled in with an error from * @res, %FALSE if not. * * Since: 2.34 * * Throws: GException on failure. */ public bool legacyPropagateError() { GError* err = null; auto p = g_async_result_legacy_propagate_error(getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/BufferedInputStream.d000066400000000000000000000244211324604450400221140ustar00rootroot00000000000000/* * 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 gio.BufferedInputStream; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.FilterInputStream; private import gio.InputStream; private import gio.SeekableIF; private import gio.SeekableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * Buffered input stream implements #GFilterInputStream and provides * for buffered reads. * * By default, #GBufferedInputStream's buffer size is set at 4 kilobytes. * * To create a buffered input stream, use g_buffered_input_stream_new(), * or g_buffered_input_stream_new_sized() to specify the buffer's size at * construction. * * To get the size of a buffer within a buffered input stream, use * g_buffered_input_stream_get_buffer_size(). To change the size of a * buffered input stream's buffer, use * g_buffered_input_stream_set_buffer_size(). Note that the buffer's size * cannot be reduced below the size of the data within the buffer. */ public class BufferedInputStream : FilterInputStream, SeekableIF { /** the main Gtk struct */ protected GBufferedInputStream* gBufferedInputStream; /** Get the main Gtk struct */ public GBufferedInputStream* getBufferedInputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gBufferedInputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gBufferedInputStream; } protected override void setStruct(GObject* obj) { gBufferedInputStream = cast(GBufferedInputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GBufferedInputStream* gBufferedInputStream, bool ownedRef = false) { this.gBufferedInputStream = gBufferedInputStream; super(cast(GFilterInputStream*)gBufferedInputStream, ownedRef); } // add the Seekable capabilities mixin SeekableT!(GBufferedInputStream); /** * Returns the buffer with the currently available bytes. The returned * buffer must not be modified and will become invalid when reading from * the stream or filling the buffer. * * Params: * count = a #gsize to get the number of bytes available in the buffer * * Return: read-only buffer */ public ubyte[] peekBuffer() { size_t count; auto p = g_buffered_input_stream_peek_buffer(gBufferedInputStream, &count); return (cast(ubyte*)p)[0 .. count]; } /** */ /** */ public static GType getType() { return g_buffered_input_stream_get_type(); } /** * Creates a new #GInputStream from the given @base_stream, with * a buffer set to the default size (4 kilobytes). * * Params: * baseStream = a #GInputStream * * Returns: a #GInputStream for the given @base_stream. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(InputStream baseStream) { auto p = g_buffered_input_stream_new((baseStream is null) ? null : baseStream.getInputStreamStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GBufferedInputStream*) p, true); } /** * Creates a new #GBufferedInputStream from the given @base_stream, * with a buffer set to @size. * * Params: * baseStream = a #GInputStream * size = a #gsize * * Returns: a #GInputStream. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(InputStream baseStream, size_t size) { auto p = g_buffered_input_stream_new_sized((baseStream is null) ? null : baseStream.getInputStreamStruct(), size); if(p is null) { throw new ConstructionException("null returned by new_sized"); } this(cast(GBufferedInputStream*) p, true); } /** * Tries to read @count bytes from the stream into the buffer. * Will block during this read. * * If @count is zero, returns zero and does nothing. A value of @count * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. * * On success, the number of bytes read into the buffer is returned. * It is not an error if this is not the same as the requested size, as it * can happen e.g. near the end of a file. Zero is returned on end of file * (or if @count is zero), but never otherwise. * * If @count is -1 then the attempted read size is equal to the number of * bytes that are required to fill the buffer. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an * operation was partially finished when the operation was cancelled the * partial result will be returned, without an error. * * On error -1 is returned and @error is set accordingly. * * For the asynchronous, non-blocking, version of this function, see * g_buffered_input_stream_fill_async(). * * Params: * count = the number of bytes that will be read from the stream * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: the number of bytes read into @stream's buffer, up to @count, * or -1 on error. * * Throws: GException on failure. */ public ptrdiff_t fill(ptrdiff_t count, Cancellable cancellable) { GError* err = null; auto p = g_buffered_input_stream_fill(gBufferedInputStream, count, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Reads data into @stream's buffer asynchronously, up to @count size. * @io_priority can be used to prioritize reads. For the synchronous * version of this function, see g_buffered_input_stream_fill(). * * If @count is -1 then the attempted read size is equal to the number * of bytes that are required to fill the buffer. * * Params: * count = the number of bytes that will be read from the stream * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object * callback = a #GAsyncReadyCallback * userData = a #gpointer */ public void fillAsync(ptrdiff_t count, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_buffered_input_stream_fill_async(gBufferedInputStream, count, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous read. * * Params: * result = a #GAsyncResult * * Returns: a #gssize of the read stream, or %-1 on an error. * * Throws: GException on failure. */ public ptrdiff_t fillFinish(AsyncResultIF result) { GError* err = null; auto p = g_buffered_input_stream_fill_finish(gBufferedInputStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the size of the available data within the stream. * * Returns: size of the available stream. */ public size_t getAvailable() { return g_buffered_input_stream_get_available(gBufferedInputStream); } /** * Gets the size of the input buffer. * * Returns: the current buffer size. */ public size_t getBufferSize() { return g_buffered_input_stream_get_buffer_size(gBufferedInputStream); } /** * Peeks in the buffer, copying data of size @count into @buffer, * offset @offset bytes. * * Params: * buffer = a pointer to * an allocated chunk of memory * offset = a #gsize * * Returns: a #gsize of the number of bytes peeked, or -1 on error. */ public size_t peek(ubyte[] buffer, size_t offset) { return g_buffered_input_stream_peek(gBufferedInputStream, buffer.ptr, offset, cast(size_t)buffer.length); } /** * Tries to read a single byte from the stream or the buffer. Will block * during this read. * * On success, the byte read from the stream is returned. On end of stream * -1 is returned but it's not an exceptional error and @error is not set. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an * operation was partially finished when the operation was cancelled the * partial result will be returned, without an error. * * On error -1 is returned and @error is set accordingly. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: the byte read from the @stream, or -1 on end of stream or error. * * Throws: GException on failure. */ public int readByte(Cancellable cancellable) { GError* err = null; auto p = g_buffered_input_stream_read_byte(gBufferedInputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the size of the internal buffer of @stream to @size, or to the * size of the contents of the buffer. The buffer can never be resized * smaller than its current contents. * * Params: * size = a #gsize */ public void setBufferSize(size_t size) { g_buffered_input_stream_set_buffer_size(gBufferedInputStream, size); } } GtkD-3.7.5/generated/gtkd/gio/BufferedOutputStream.d000066400000000000000000000123661324604450400223220ustar00rootroot00000000000000/* * 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 gio.BufferedOutputStream; private import gio.FilterOutputStream; private import gio.OutputStream; private import gio.SeekableIF; private import gio.SeekableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * Buffered output stream implements #GFilterOutputStream and provides * for buffered writes. * * By default, #GBufferedOutputStream's buffer size is set at 4 kilobytes. * * To create a buffered output stream, use g_buffered_output_stream_new(), * or g_buffered_output_stream_new_sized() to specify the buffer's size * at construction. * * To get the size of a buffer within a buffered input stream, use * g_buffered_output_stream_get_buffer_size(). To change the size of a * buffered output stream's buffer, use * g_buffered_output_stream_set_buffer_size(). Note that the buffer's * size cannot be reduced below the size of the data within the buffer. */ public class BufferedOutputStream : FilterOutputStream, SeekableIF { /** the main Gtk struct */ protected GBufferedOutputStream* gBufferedOutputStream; /** Get the main Gtk struct */ public GBufferedOutputStream* getBufferedOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gBufferedOutputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gBufferedOutputStream; } protected override void setStruct(GObject* obj) { gBufferedOutputStream = cast(GBufferedOutputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GBufferedOutputStream* gBufferedOutputStream, bool ownedRef = false) { this.gBufferedOutputStream = gBufferedOutputStream; super(cast(GFilterOutputStream*)gBufferedOutputStream, ownedRef); } // add the Seekable capabilities mixin SeekableT!(GBufferedOutputStream); /** */ public static GType getType() { return g_buffered_output_stream_get_type(); } /** * Creates a new buffered output stream for a base stream. * * Params: * baseStream = a #GOutputStream. * * Returns: a #GOutputStream for the given @base_stream. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(OutputStream baseStream) { auto p = g_buffered_output_stream_new((baseStream is null) ? null : baseStream.getOutputStreamStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GBufferedOutputStream*) p, true); } /** * Creates a new buffered output stream with a given buffer size. * * Params: * baseStream = a #GOutputStream. * size = a #gsize. * * Returns: a #GOutputStream with an internal buffer set to @size. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(OutputStream baseStream, size_t size) { auto p = g_buffered_output_stream_new_sized((baseStream is null) ? null : baseStream.getOutputStreamStruct(), size); if(p is null) { throw new ConstructionException("null returned by new_sized"); } this(cast(GBufferedOutputStream*) p, true); } /** * Checks if the buffer automatically grows as data is added. * * Returns: %TRUE if the @stream's buffer automatically grows, * %FALSE otherwise. */ public bool getAutoGrow() { return g_buffered_output_stream_get_auto_grow(gBufferedOutputStream) != 0; } /** * Gets the size of the buffer in the @stream. * * Returns: the current size of the buffer. */ public size_t getBufferSize() { return g_buffered_output_stream_get_buffer_size(gBufferedOutputStream); } /** * Sets whether or not the @stream's buffer should automatically grow. * If @auto_grow is true, then each write will just make the buffer * larger, and you must manually flush the buffer to actually write out * the data to the underlying stream. * * Params: * autoGrow = a #gboolean. */ public void setAutoGrow(bool autoGrow) { g_buffered_output_stream_set_auto_grow(gBufferedOutputStream, autoGrow); } /** * Sets the size of the internal buffer to @size. * * Params: * size = a #gsize. */ public void setBufferSize(size_t size) { g_buffered_output_stream_set_buffer_size(gBufferedOutputStream, size); } } GtkD-3.7.5/generated/gtkd/gio/BytesIcon.d000066400000000000000000000061071324604450400200760ustar00rootroot00000000000000/* * 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 gio.BytesIcon; private import gio.IconIF; private import gio.IconT; private import gio.LoadableIconIF; private import gio.LoadableIconT; private import gio.c.functions; public import gio.c.types; private import glib.Bytes; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GBytesIcon specifies an image held in memory in a common format (usually * png) to be used as icon. */ public class BytesIcon : ObjectG, IconIF, LoadableIconIF { /** the main Gtk struct */ protected GBytesIcon* gBytesIcon; /** Get the main Gtk struct */ public GBytesIcon* getBytesIconStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gBytesIcon; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gBytesIcon; } protected override void setStruct(GObject* obj) { gBytesIcon = cast(GBytesIcon*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GBytesIcon* gBytesIcon, bool ownedRef = false) { this.gBytesIcon = gBytesIcon; super(cast(GObject*)gBytesIcon, ownedRef); } // add the Icon capabilities mixin IconT!(GBytesIcon); // add the LoadableIcon capabilities mixin LoadableIconT!(GBytesIcon); /** */ public static GType getType() { return g_bytes_icon_get_type(); } /** * Creates a new icon for a bytes. * * Params: * bytes = a #GBytes. * * Returns: a #GIcon for the given * @bytes, or %NULL on error. * * Since: 2.38 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Bytes bytes) { auto p = g_bytes_icon_new((bytes is null) ? null : bytes.getBytesStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GBytesIcon*) p, true); } /** * Gets the #GBytes associated with the given @icon. * * Returns: a #GBytes, or %NULL. * * Since: 2.38 */ public Bytes getBytes() { auto p = g_bytes_icon_get_bytes(gBytesIcon); if(p is null) { return null; } return new Bytes(cast(GBytes*) p); } } GtkD-3.7.5/generated/gtkd/gio/Cancellable.d000066400000000000000000000352031324604450400203630ustar00rootroot00000000000000/* * 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 gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Source; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * GCancellable is a thread-safe operation cancellation stack used * throughout GIO to allow for cancellation of synchronous and * asynchronous operations. */ public class Cancellable : ObjectG { /** the main Gtk struct */ protected GCancellable* gCancellable; /** Get the main Gtk struct */ public GCancellable* getCancellableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gCancellable; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gCancellable; } protected override void setStruct(GObject* obj) { gCancellable = cast(GCancellable*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GCancellable* gCancellable, bool ownedRef = false) { this.gCancellable = gCancellable; super(cast(GObject*)gCancellable, ownedRef); } /** */ public static GType getType() { return g_cancellable_get_type(); } /** * Creates a new #GCancellable object. * * Applications that want to start one or more operations * that should be cancellable should create a #GCancellable * and pass it to the operations. * * One #GCancellable can be used in multiple consecutive * operations or in multiple concurrent operations. * * Returns: a #GCancellable. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_cancellable_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GCancellable*) p, true); } /** * Gets the top cancellable from the stack. * * Returns: a #GCancellable from the top * of the stack, or %NULL if the stack is empty. */ public static Cancellable getCurrent() { auto p = g_cancellable_get_current(); if(p is null) { return null; } return ObjectG.getDObject!(Cancellable)(cast(GCancellable*) p); } /** * Will set @cancellable to cancelled, and will emit the * #GCancellable::cancelled signal. (However, see the warning about * race conditions in the documentation for that signal if you are * planning to connect to it.) * * This function is thread-safe. In other words, you can safely call * it from a thread other than the one running the operation that was * passed the @cancellable. * * If @cancellable is %NULL, this function returns immediately for convenience. * * The convention within GIO is that cancelling an asynchronous * operation causes it to complete asynchronously. That is, if you * cancel the operation from the same thread in which it is running, * then the operation's #GAsyncReadyCallback will not be invoked until * the application returns to the main loop. */ public void cancel() { g_cancellable_cancel(gCancellable); } /** * Convenience function to connect to the #GCancellable::cancelled * signal. Also handles the race condition that may happen * if the cancellable is cancelled right before connecting. * * @callback is called at most once, either directly at the * time of the connect if @cancellable is already cancelled, * or when @cancellable is cancelled in some thread. * * @data_destroy_func will be called when the handler is * disconnected, or immediately if the cancellable is already * cancelled. * * See #GCancellable::cancelled for details on how to use this. * * Since GLib 2.40, the lock protecting @cancellable is not held when * @callback is invoked. This lifts a restriction in place for * earlier GLib versions which now makes it easier to write cleanup * code that unconditionally invokes e.g. g_cancellable_cancel(). * * Params: * callback = The #GCallback to connect. * data = Data to pass to @callback. * dataDestroyFunc = Free function for @data or %NULL. * * Returns: The id of the signal handler or 0 if @cancellable has already * been cancelled. * * Since: 2.22 */ public gulong connect(GCallback callback, void* data, GDestroyNotify dataDestroyFunc) { return g_cancellable_connect(gCancellable, callback, data, dataDestroyFunc); } /** * Disconnects a handler from a cancellable instance similar to * g_signal_handler_disconnect(). Additionally, in the event that a * signal handler is currently running, this call will block until the * handler has finished. Calling this function from a * #GCancellable::cancelled signal handler will therefore result in a * deadlock. * * This avoids a race condition where a thread cancels at the * same time as the cancellable operation is finished and the * signal handler is removed. See #GCancellable::cancelled for * details on how to use this. * * If @cancellable is %NULL or @handler_id is %0 this function does * nothing. * * Params: * handlerId = Handler id of the handler to be disconnected, or %0. * * Since: 2.22 */ public void disconnect(gulong handlerId) { g_cancellable_disconnect(gCancellable, handlerId); } /** * Gets the file descriptor for a cancellable job. This can be used to * implement cancellable operations on Unix systems. The returned fd will * turn readable when @cancellable is cancelled. * * You are not supposed to read from the fd yourself, just check for * readable status. Reading to unset the readable status is done * with g_cancellable_reset(). * * After a successful return from this function, you should use * g_cancellable_release_fd() to free up resources allocated for * the returned file descriptor. * * See also g_cancellable_make_pollfd(). * * Returns: A valid file descriptor. %-1 if the file descriptor * is not supported, or on errors. */ public int getFd() { return g_cancellable_get_fd(gCancellable); } /** * Checks if a cancellable job has been cancelled. * * Returns: %TRUE if @cancellable is cancelled, * FALSE if called with %NULL or if item is not cancelled. */ public bool isCancelled() { return g_cancellable_is_cancelled(gCancellable) != 0; } /** * Creates a #GPollFD corresponding to @cancellable; this can be passed * to g_poll() and used to poll for cancellation. This is useful both * for unix systems without a native poll and for portability to * windows. * * When this function returns %TRUE, you should use * g_cancellable_release_fd() to free up resources allocated for the * @pollfd. After a %FALSE return, do not call g_cancellable_release_fd(). * * If this function returns %FALSE, either no @cancellable was given or * resource limits prevent this function from allocating the necessary * structures for polling. (On Linux, you will likely have reached * the maximum number of file descriptors.) The suggested way to handle * these cases is to ignore the @cancellable. * * You are not supposed to read from the fd yourself, just check for * readable status. Reading to unset the readable status is done * with g_cancellable_reset(). * * Params: * pollfd = a pointer to a #GPollFD * * Returns: %TRUE if @pollfd was successfully initialized, %FALSE on * failure to prepare the cancellable. * * Since: 2.22 */ public bool makePollfd(GPollFD* pollfd) { return g_cancellable_make_pollfd(gCancellable, pollfd) != 0; } /** * Pops @cancellable off the cancellable stack (verifying that @cancellable * is on the top of the stack). */ public void popCurrent() { g_cancellable_pop_current(gCancellable); } /** * Pushes @cancellable onto the cancellable stack. The current * cancellable can then be received using g_cancellable_get_current(). * * This is useful when implementing cancellable operations in * code that does not allow you to pass down the cancellable object. * * This is typically called automatically by e.g. #GFile operations, * so you rarely have to call this yourself. */ public void pushCurrent() { g_cancellable_push_current(gCancellable); } /** * Releases a resources previously allocated by g_cancellable_get_fd() * or g_cancellable_make_pollfd(). * * For compatibility reasons with older releases, calling this function * is not strictly required, the resources will be automatically freed * when the @cancellable is finalized. However, the @cancellable will * block scarce file descriptors until it is finalized if this function * is not called. This can cause the application to run out of file * descriptors when many #GCancellables are used at the same time. * * Since: 2.22 */ public void releaseFd() { g_cancellable_release_fd(gCancellable); } /** * Resets @cancellable to its uncancelled state. * * If cancellable is currently in use by any cancellable operation * then the behavior of this function is undefined. * * Note that it is generally not a good idea to reuse an existing * cancellable for more operations after it has been cancelled once, * as this function might tempt you to do. The recommended practice * is to drop the reference to a cancellable after cancelling it, * and let it die with the outstanding async operations. You should * create a fresh cancellable for further async operations. */ public void reset() { g_cancellable_reset(gCancellable); } /** * If the @cancellable is cancelled, sets the error to notify * that the operation was cancelled. * * Returns: %TRUE if @cancellable was cancelled, %FALSE if it was not * * Throws: GException on failure. */ public bool setErrorIfCancelled() { GError* err = null; auto p = g_cancellable_set_error_if_cancelled(gCancellable, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Creates a source that triggers if @cancellable is cancelled and * calls its callback of type #GCancellableSourceFunc. This is * primarily useful for attaching to another (non-cancellable) source * with g_source_add_child_source() to add cancellability to it. * * For convenience, you can call this with a %NULL #GCancellable, * in which case the source will never trigger. * * The new #GSource will hold a reference to the #GCancellable. * * Returns: the new #GSource. * * Since: 2.28 */ public Source sourceNew() { auto p = g_cancellable_source_new(gCancellable); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } protected class OnCancelledDelegateWrapper { void delegate(Cancellable) dlg; gulong handlerId; this(void delegate(Cancellable) dlg) { this.dlg = dlg; onCancelledListeners ~= this; } void remove(OnCancelledDelegateWrapper source) { foreach(index, wrapper; onCancelledListeners) { if (wrapper.handlerId == source.handlerId) { onCancelledListeners[index] = null; onCancelledListeners = std.algorithm.remove(onCancelledListeners, index); break; } } } } OnCancelledDelegateWrapper[] onCancelledListeners; /** * Emitted when the operation has been cancelled. * * Can be used by implementations of cancellable operations. If the * operation is cancelled from another thread, the signal will be * emitted in the thread that cancelled the operation, not the * thread that is running the operation. * * Note that disconnecting from this signal (or any signal) in a * multi-threaded program is prone to race conditions. For instance * it is possible that a signal handler may be invoked even after * a call to g_signal_handler_disconnect() for that handler has * already returned. * * There is also a problem when cancellation happens right before * connecting to the signal. If this happens the signal will * unexpectedly not be emitted, and checking before connecting to * the signal leaves a race condition where this is still happening. * * In order to make it safe and easy to connect handlers there * are two helper functions: g_cancellable_connect() and * g_cancellable_disconnect() which protect against problems * like this. * * An example of how to us this: * |[ * // Make sure we don't do unnecessary work if already cancelled * if (g_cancellable_set_error_if_cancelled (cancellable, error)) * return; * * // Set up all the data needed to be able to handle cancellation * // of the operation * my_data = my_data_new (...); * * id = 0; * if (cancellable) * id = g_cancellable_connect (cancellable, * G_CALLBACK (cancelled_handler) * data, NULL); * * // cancellable operation here... * * g_cancellable_disconnect (cancellable, id); * * // cancelled_handler is never called after this, it is now safe * // to free the data * my_data_free (my_data); * ]| * * Note that the cancelled signal is emitted in the thread that * the user cancelled from, which may be the main thread. So, the * cancellable signal should not do something that can block. */ gulong addOnCancelled(void delegate(Cancellable) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnCancelledDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "cancelled", cast(GCallback)&callBackCancelled, cast(void*)wrapper, cast(GClosureNotify)&callBackCancelledDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackCancelled(GCancellable* cancellableStruct, OnCancelledDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackCancelledDestroy(OnCancelledDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/CharsetConverter.d000066400000000000000000000077101324604450400214610ustar00rootroot00000000000000/* * 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 gio.CharsetConverter; private import gio.ConverterIF; private import gio.ConverterT; private import gio.InitableIF; private import gio.InitableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GCharsetConverter is an implementation of #GConverter based on * GIConv. */ public class CharsetConverter : ObjectG, ConverterIF, InitableIF { /** the main Gtk struct */ protected GCharsetConverter* gCharsetConverter; /** Get the main Gtk struct */ public GCharsetConverter* getCharsetConverterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gCharsetConverter; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gCharsetConverter; } protected override void setStruct(GObject* obj) { gCharsetConverter = cast(GCharsetConverter*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GCharsetConverter* gCharsetConverter, bool ownedRef = false) { this.gCharsetConverter = gCharsetConverter; super(cast(GObject*)gCharsetConverter, ownedRef); } // add the Converter capabilities mixin ConverterT!(GCharsetConverter); // add the Initable capabilities mixin InitableT!(GCharsetConverter); /** */ public static GType getType() { return g_charset_converter_get_type(); } /** * Creates a new #GCharsetConverter. * * Params: * toCharset = destination charset * fromCharset = source charset * * Returns: a new #GCharsetConverter or %NULL on error. * * Since: 2.24 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string toCharset, string fromCharset) { GError* err = null; auto p = g_charset_converter_new(Str.toStringz(toCharset), Str.toStringz(fromCharset), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GCharsetConverter*) p, true); } /** * Gets the number of fallbacks that @converter has applied so far. * * Returns: the number of fallbacks that @converter has applied * * Since: 2.24 */ public uint getNumFallbacks() { return g_charset_converter_get_num_fallbacks(gCharsetConverter); } /** * Gets the #GCharsetConverter:use-fallback property. * * Returns: %TRUE if fallbacks are used by @converter * * Since: 2.24 */ public bool getUseFallback() { return g_charset_converter_get_use_fallback(gCharsetConverter) != 0; } /** * Sets the #GCharsetConverter:use-fallback property. * * Params: * useFallback = %TRUE to use fallbacks * * Since: 2.24 */ public void setUseFallback(bool useFallback) { g_charset_converter_set_use_fallback(gCharsetConverter, useFallback); } } GtkD-3.7.5/generated/gtkd/gio/ContentType.d000066400000000000000000000205371324604450400204560ustar00rootroot00000000000000/* * 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 gio.ContentType; private import gio.FileIF; private import gio.IconIF; private import gio.c.functions; public import gio.c.types; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** */ public struct ContentType { /** * Checks if a content type can be executable. Note that for instance * things like text files can be executables (i.e. scripts and batch files). * * Params: * type = a content type string * * Returns: %TRUE if the file type corresponds to a type that * can be executable, %FALSE otherwise. */ public static bool canBeExecutable(string type) { return g_content_type_can_be_executable(Str.toStringz(type)) != 0; } /** * Compares two content types for equality. * * Params: * type1 = a content type string * type2 = a content type string * * Returns: %TRUE if the two strings are identical or equivalent, * %FALSE otherwise. */ public static bool equals(string type1, string type2) { return g_content_type_equals(Str.toStringz(type1), Str.toStringz(type2)) != 0; } /** * Tries to find a content type based on the mime type name. * * Params: * mimeType = a mime type string * * Returns: Newly allocated string with content type or * %NULL. Free with g_free() * * Since: 2.18 */ public static string fromMimeType(string mimeType) { auto retStr = g_content_type_from_mime_type(Str.toStringz(mimeType)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the human readable description of the content type. * * Params: * type = a content type string * * Returns: a short description of the content type @type. Free the * returned string with g_free() */ public static string getDescription(string type) { auto retStr = g_content_type_get_description(Str.toStringz(type)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the generic icon name for a content type. * * See the * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) * specification for more on the generic icon name. * * Params: * type = a content type string * * Returns: the registered generic icon name for the given @type, * or %NULL if unknown. Free with g_free() * * Since: 2.34 */ public static string getGenericIconName(string type) { auto retStr = g_content_type_get_generic_icon_name(Str.toStringz(type)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the icon for a content type. * * Params: * type = a content type string * * Returns: #GIcon corresponding to the content type. Free the returned * object with g_object_unref() */ public static IconIF getIcon(string type) { auto p = g_content_type_get_icon(Str.toStringz(type)); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Gets the mime type for the content type, if one is registered. * * Params: * type = a content type string * * Returns: the registered mime type for the given @type, * or %NULL if unknown. */ public static string getMimeType(string type) { auto retStr = g_content_type_get_mime_type(Str.toStringz(type)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the symbolic icon for a content type. * * Params: * type = a content type string * * Returns: symbolic #GIcon corresponding to the content type. * Free the returned object with g_object_unref() * * Since: 2.34 */ public static IconIF getSymbolicIcon(string type) { auto p = g_content_type_get_symbolic_icon(Str.toStringz(type)); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Guesses the content type based on example data. If the function is * uncertain, @result_uncertain will be set to %TRUE. Either @filename * or @data may be %NULL, in which case the guess will be based solely * on the other argument. * * Params: * filename = a string, or %NULL * data = a stream of data, or %NULL * resultUncertain = return location for the certainty * of the result, or %NULL * * Returns: a string indicating a guessed content type for the * given data. Free with g_free() */ public static string typeGuess(string filename, char[] data, out bool resultUncertain) { int outresultUncertain; auto retStr = g_content_type_guess(Str.toStringz(filename), data.ptr, cast(size_t)data.length, &outresultUncertain); resultUncertain = (outresultUncertain == 1); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Tries to guess the type of the tree with root @root, by * looking at the files it contains. The result is an array * of content types, with the best guess coming first. * * The types returned all have the form x-content/foo, e.g. * x-content/audio-cdda (for audio CDs) or x-content/image-dcf * (for a camera memory card). See the * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) * specification for more on x-content types. * * This function is useful in the implementation of * g_mount_guess_content_type(). * * Params: * root = the root of the tree to guess a type for * * Returns: an %NULL-terminated * array of zero or more content types. Free with g_strfreev() * * Since: 2.18 */ public static string[] guessForTree(FileIF root) { auto retStr = g_content_type_guess_for_tree((root is null) ? null : root.getFileStruct()); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Determines if @type is a subset of @supertype. * * Params: * type = a content type string * supertype = a content type string * * Returns: %TRUE if @type is a kind of @supertype, * %FALSE otherwise. */ public static bool isA(string type, string supertype) { return g_content_type_is_a(Str.toStringz(type), Str.toStringz(supertype)) != 0; } /** * Checks if the content type is the generic "unknown" type. * On UNIX this is the "application/octet-stream" mimetype, * while on win32 it is "*" and on OSX it is a dynamic type * or octet-stream. * * Params: * type = a content type string * * Returns: %TRUE if the type is the unknown type. */ public static bool isUnknown(string type) { return g_content_type_is_unknown(Str.toStringz(type)) != 0; } /** * Gets a list of strings containing all the registered content types * known to the system. The list and its data should be freed using * g_list_free_full (list, g_free). * * Returns: list of the registered * content types */ public static ListG contentTypesGetRegistered() { auto p = g_content_types_get_registered(); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Determines if @type is a subset of @mime_type. * Convenience wrapper around g_content_type_is_a(). * * Params: * type = a content type string * mimeType = a mime type string * * Returns: %TRUE if @type is a kind of @mime_type, * %FALSE otherwise. * * Since: 2.52 */ public static bool isMimeType(string type, string mimeType) { return g_content_type_is_mime_type(Str.toStringz(type), Str.toStringz(mimeType)) != 0; } } GtkD-3.7.5/generated/gtkd/gio/ConverterIF.d000066400000000000000000000163531324604450400203710ustar00rootroot00000000000000/* * 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 gio.ConverterIF; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; public import gtkc.giotypes; /** * #GConverter is implemented by objects that convert * binary data in various ways. The conversion can be * stateful and may fail at any place. * * Some example conversions are: character set conversion, * compression, decompression and regular expression * replace. * * Since: 2.24 */ public interface ConverterIF{ /** Get the main Gtk struct */ public GConverter* getConverterStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_converter_get_type(); } /** * This is the main operation used when converting data. It is to be called * multiple times in a loop, and each time it will do some work, i.e. * producing some output (in @outbuf) or consuming some input (from @inbuf) or * both. If its not possible to do any work an error is returned. * * Note that a single call may not consume all input (or any input at all). * Also a call may produce output even if given no input, due to state stored * in the converter producing output. * * If any data was either produced or consumed, and then an error happens, then * only the successful conversion is reported and the error is returned on the * next call. * * A full conversion loop involves calling this method repeatedly, each time * giving it new input and space output space. When there is no more input * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set. * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED * each time until all data is consumed and all output is produced, then * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance * in a decompression converter where the end of data is detectable from the * data (and there might even be other data after the end of the compressed data). * * When some data has successfully been converted @bytes_read and is set to * the number of bytes read from @inbuf, and @bytes_written is set to indicate * how many bytes was written to @outbuf. If there are more data to output * or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then * %G_CONVERTER_CONVERTED is returned, and if no more data is to be output * then %G_CONVERTER_FINISHED is returned. * * On error %G_CONVERTER_ERROR is returned and @error is set accordingly. * Some errors need special handling: * * %G_IO_ERROR_NO_SPACE is returned if there is not enough space * to write the resulting converted data, the application should * call the function again with a larger @outbuf to continue. * * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough * input to fully determine what the conversion should produce, * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for * example with an incomplete multibyte sequence when converting text, * or when a regexp matches up to the end of the input (and may match * further input). It may also happen when @inbuf_size is zero and * there is no more data to produce. * * When this happens the application should read more input and then * call the function again. If further input shows that there is no * more data call the function again with the same data but with * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion * to finish as e.g. in the regexp match case (or, to fail again with * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the * input is actually partial). * * After g_converter_convert() has returned %G_CONVERTER_FINISHED the * converter object is in an invalid state where its not allowed * to call g_converter_convert() anymore. At this time you can only * free the object or call g_converter_reset() to reset it to the * initial state. * * If the flag %G_CONVERTER_FLUSH is set then conversion is modified * to try to write out all internal state to the output. The application * has to call the function multiple times with the flag set, and when * the available input has been consumed and all internal state has * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if * really at the end) is returned instead of %G_CONVERTER_CONVERTED. * This is somewhat similar to what happens at the end of the input stream, * but done in the middle of the data. * * This has different meanings for different conversions. For instance * in a compression converter it would mean that we flush all the * compression state into output such that if you uncompress the * compressed data you get back all the input data. Doing this may * make the final file larger due to padding though. Another example * is a regexp conversion, where if you at the end of the flushed data * have a match, but there is also a potential longer match. In the * non-flushed case we would ask for more input, but when flushing we * treat this as the end of input and do the match. * * Flushing is not always possible (like if a charset converter flushes * at a partial multibyte sequence). Converters are supposed to try * to produce as much output as possible and then return an error * (typically %G_IO_ERROR_PARTIAL_INPUT). * * Params: * inbuf = the buffer * containing the data to convert. * outbuf = a buffer to write * converted data in. * flags = a #GConverterFlags controlling the conversion details * bytesRead = will be set to the number of bytes read from @inbuf on success * bytesWritten = will be set to the number of bytes written to @outbuf on success * * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error. * * Since: 2.24 * * Throws: GException on failure. */ public GConverterResult convert(ubyte[] inbuf, ubyte[] outbuf, GConverterFlags flags, out size_t bytesRead, out size_t bytesWritten); /** * Resets all internal state in the converter, making it behave * as if it was just created. If the converter has any internal * state that would produce output then that output is lost. * * Since: 2.24 */ public void reset(); } GtkD-3.7.5/generated/gtkd/gio/ConverterInputStream.d000066400000000000000000000071401324604450400223400ustar00rootroot00000000000000/* * 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 gio.ConverterInputStream; private import gio.ConverterIF; private import gio.FilterInputStream; private import gio.InputStream; private import gio.PollableInputStreamIF; private import gio.PollableInputStreamT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * Converter input stream implements #GInputStream and allows * conversion of data of various types during reading. * * As of GLib 2.34, #GConverterInputStream implements * #GPollableInputStream. */ public class ConverterInputStream : FilterInputStream, PollableInputStreamIF { /** the main Gtk struct */ protected GConverterInputStream* gConverterInputStream; /** Get the main Gtk struct */ public GConverterInputStream* getConverterInputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gConverterInputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gConverterInputStream; } protected override void setStruct(GObject* obj) { gConverterInputStream = cast(GConverterInputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GConverterInputStream* gConverterInputStream, bool ownedRef = false) { this.gConverterInputStream = gConverterInputStream; super(cast(GFilterInputStream*)gConverterInputStream, ownedRef); } // add the PollableInputStream capabilities mixin PollableInputStreamT!(GConverterInputStream); /** */ public static GType getType() { return g_converter_input_stream_get_type(); } /** * Creates a new converter input stream for the @base_stream. * * Params: * baseStream = a #GInputStream * converter = a #GConverter * * Returns: a new #GInputStream. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(InputStream baseStream, ConverterIF converter) { auto p = g_converter_input_stream_new((baseStream is null) ? null : baseStream.getInputStreamStruct(), (converter is null) ? null : converter.getConverterStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GConverterInputStream*) p, true); } /** * Gets the #GConverter that is used by @converter_stream. * * Returns: the converter of the converter input stream * * Since: 2.24 */ public ConverterIF getConverter() { auto p = g_converter_input_stream_get_converter(gConverterInputStream); if(p is null) { return null; } return ObjectG.getDObject!(ConverterIF)(cast(GConverter*) p); } } GtkD-3.7.5/generated/gtkd/gio/ConverterOutputStream.d000066400000000000000000000072101324604450400225370ustar00rootroot00000000000000/* * 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 gio.ConverterOutputStream; private import gio.ConverterIF; private import gio.FilterOutputStream; private import gio.OutputStream; private import gio.PollableOutputStreamIF; private import gio.PollableOutputStreamT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * Converter output stream implements #GOutputStream and allows * conversion of data of various types during reading. * * As of GLib 2.34, #GConverterOutputStream implements * #GPollableOutputStream. */ public class ConverterOutputStream : FilterOutputStream, PollableOutputStreamIF { /** the main Gtk struct */ protected GConverterOutputStream* gConverterOutputStream; /** Get the main Gtk struct */ public GConverterOutputStream* getConverterOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gConverterOutputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gConverterOutputStream; } protected override void setStruct(GObject* obj) { gConverterOutputStream = cast(GConverterOutputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GConverterOutputStream* gConverterOutputStream, bool ownedRef = false) { this.gConverterOutputStream = gConverterOutputStream; super(cast(GFilterOutputStream*)gConverterOutputStream, ownedRef); } // add the PollableOutputStream capabilities mixin PollableOutputStreamT!(GConverterOutputStream); /** */ public static GType getType() { return g_converter_output_stream_get_type(); } /** * Creates a new converter output stream for the @base_stream. * * Params: * baseStream = a #GOutputStream * converter = a #GConverter * * Returns: a new #GOutputStream. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(OutputStream baseStream, ConverterIF converter) { auto p = g_converter_output_stream_new((baseStream is null) ? null : baseStream.getOutputStreamStruct(), (converter is null) ? null : converter.getConverterStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GConverterOutputStream*) p, true); } /** * Gets the #GConverter that is used by @converter_stream. * * Returns: the converter of the converter output stream * * Since: 2.24 */ public ConverterIF getConverter() { auto p = g_converter_output_stream_get_converter(gConverterOutputStream); if(p is null) { return null; } return ObjectG.getDObject!(ConverterIF)(cast(GConverter*) p); } } GtkD-3.7.5/generated/gtkd/gio/ConverterT.d000066400000000000000000000170031324604450400202670ustar00rootroot00000000000000/* * 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 gio.ConverterT; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import gtkc.giotypes; /** * #GConverter is implemented by objects that convert * binary data in various ways. The conversion can be * stateful and may fail at any place. * * Some example conversions are: character set conversion, * compression, decompression and regular expression * replace. * * Since: 2.24 */ public template ConverterT(TStruct) { /** Get the main Gtk struct */ public GConverter* getConverterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GConverter*)getStruct(); } /** * This is the main operation used when converting data. It is to be called * multiple times in a loop, and each time it will do some work, i.e. * producing some output (in @outbuf) or consuming some input (from @inbuf) or * both. If its not possible to do any work an error is returned. * * Note that a single call may not consume all input (or any input at all). * Also a call may produce output even if given no input, due to state stored * in the converter producing output. * * If any data was either produced or consumed, and then an error happens, then * only the successful conversion is reported and the error is returned on the * next call. * * A full conversion loop involves calling this method repeatedly, each time * giving it new input and space output space. When there is no more input * data after the data in @inbuf, the flag %G_CONVERTER_INPUT_AT_END must be set. * The loop will be (unless some error happens) returning %G_CONVERTER_CONVERTED * each time until all data is consumed and all output is produced, then * %G_CONVERTER_FINISHED is returned instead. Note, that %G_CONVERTER_FINISHED * may be returned even if %G_CONVERTER_INPUT_AT_END is not set, for instance * in a decompression converter where the end of data is detectable from the * data (and there might even be other data after the end of the compressed data). * * When some data has successfully been converted @bytes_read and is set to * the number of bytes read from @inbuf, and @bytes_written is set to indicate * how many bytes was written to @outbuf. If there are more data to output * or consume (i.e. unless the %G_CONVERTER_INPUT_AT_END is specified) then * %G_CONVERTER_CONVERTED is returned, and if no more data is to be output * then %G_CONVERTER_FINISHED is returned. * * On error %G_CONVERTER_ERROR is returned and @error is set accordingly. * Some errors need special handling: * * %G_IO_ERROR_NO_SPACE is returned if there is not enough space * to write the resulting converted data, the application should * call the function again with a larger @outbuf to continue. * * %G_IO_ERROR_PARTIAL_INPUT is returned if there is not enough * input to fully determine what the conversion should produce, * and the %G_CONVERTER_INPUT_AT_END flag is not set. This happens for * example with an incomplete multibyte sequence when converting text, * or when a regexp matches up to the end of the input (and may match * further input). It may also happen when @inbuf_size is zero and * there is no more data to produce. * * When this happens the application should read more input and then * call the function again. If further input shows that there is no * more data call the function again with the same data but with * the %G_CONVERTER_INPUT_AT_END flag set. This may cause the conversion * to finish as e.g. in the regexp match case (or, to fail again with * %G_IO_ERROR_PARTIAL_INPUT in e.g. a charset conversion where the * input is actually partial). * * After g_converter_convert() has returned %G_CONVERTER_FINISHED the * converter object is in an invalid state where its not allowed * to call g_converter_convert() anymore. At this time you can only * free the object or call g_converter_reset() to reset it to the * initial state. * * If the flag %G_CONVERTER_FLUSH is set then conversion is modified * to try to write out all internal state to the output. The application * has to call the function multiple times with the flag set, and when * the available input has been consumed and all internal state has * been produced then %G_CONVERTER_FLUSHED (or %G_CONVERTER_FINISHED if * really at the end) is returned instead of %G_CONVERTER_CONVERTED. * This is somewhat similar to what happens at the end of the input stream, * but done in the middle of the data. * * This has different meanings for different conversions. For instance * in a compression converter it would mean that we flush all the * compression state into output such that if you uncompress the * compressed data you get back all the input data. Doing this may * make the final file larger due to padding though. Another example * is a regexp conversion, where if you at the end of the flushed data * have a match, but there is also a potential longer match. In the * non-flushed case we would ask for more input, but when flushing we * treat this as the end of input and do the match. * * Flushing is not always possible (like if a charset converter flushes * at a partial multibyte sequence). Converters are supposed to try * to produce as much output as possible and then return an error * (typically %G_IO_ERROR_PARTIAL_INPUT). * * Params: * inbuf = the buffer * containing the data to convert. * outbuf = a buffer to write * converted data in. * flags = a #GConverterFlags controlling the conversion details * bytesRead = will be set to the number of bytes read from @inbuf on success * bytesWritten = will be set to the number of bytes written to @outbuf on success * * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error. * * Since: 2.24 * * Throws: GException on failure. */ public GConverterResult convert(ubyte[] inbuf, ubyte[] outbuf, GConverterFlags flags, out size_t bytesRead, out size_t bytesWritten) { GError* err = null; auto p = g_converter_convert(getConverterStruct(), inbuf.ptr, cast(size_t)inbuf.length, outbuf.ptr, cast(size_t)outbuf.length, flags, &bytesRead, &bytesWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Resets all internal state in the converter, making it behave * as if it was just created. If the converter has any internal * state that would produce output then that output is lost. * * Since: 2.24 */ public void reset() { g_converter_reset(getConverterStruct()); } } GtkD-3.7.5/generated/gtkd/gio/Credentials.d000066400000000000000000000203351324604450400204330ustar00rootroot00000000000000/* * 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 gio.Credentials; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * The #GCredentials type is a reference-counted wrapper for native * credentials. This information is typically used for identifying, * authenticating and authorizing other processes. * * Some operating systems supports looking up the credentials of the * remote peer of a communication endpoint - see e.g. * g_socket_get_credentials(). * * Some operating systems supports securely sending and receiving * credentials over a Unix Domain Socket, see * #GUnixCredentialsMessage, g_unix_connection_send_credentials() and * g_unix_connection_receive_credentials() for details. * * On Linux, the native credential type is a struct ucred - see the * unix(7) man page for details. This corresponds to * %G_CREDENTIALS_TYPE_LINUX_UCRED. * * On FreeBSD, Debian GNU/kFreeBSD, and GNU/Hurd, the native * credential type is a struct cmsgcred. This corresponds * to %G_CREDENTIALS_TYPE_FREEBSD_CMSGCRED. * * On NetBSD, the native credential type is a struct unpcbid. * This corresponds to %G_CREDENTIALS_TYPE_NETBSD_UNPCBID. * * On OpenBSD, the native credential type is a struct sockpeercred. * This corresponds to %G_CREDENTIALS_TYPE_OPENBSD_SOCKPEERCRED. * * On Solaris (including OpenSolaris and its derivatives), the native * credential type is a ucred_t. This corresponds to * %G_CREDENTIALS_TYPE_SOLARIS_UCRED. * * Since: 2.26 */ public class Credentials : ObjectG { /** the main Gtk struct */ protected GCredentials* gCredentials; /** Get the main Gtk struct */ public GCredentials* getCredentialsStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gCredentials; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gCredentials; } protected override void setStruct(GObject* obj) { gCredentials = cast(GCredentials*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GCredentials* gCredentials, bool ownedRef = false) { this.gCredentials = gCredentials; super(cast(GObject*)gCredentials, ownedRef); } /** */ public static GType getType() { return g_credentials_get_type(); } /** * Creates a new #GCredentials object with credentials matching the * the current process. * * Returns: A #GCredentials. Free with g_object_unref(). * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_credentials_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GCredentials*) p, true); } /** * Gets a pointer to native credentials of type @native_type from * @credentials. * * It is a programming error (which will cause an warning to be * logged) to use this method if there is no #GCredentials support for * the OS or if @native_type isn't supported by the OS. * * Params: * nativeType = The type of native credentials to get. * * Returns: The pointer to native credentials or %NULL if the * operation there is no #GCredentials support for the OS or if * @native_type isn't supported by the OS. Do not free the returned * data, it is owned by @credentials. * * Since: 2.26 */ public void* getNative(GCredentialsType nativeType) { return g_credentials_get_native(gCredentials, nativeType); } /** * Tries to get the UNIX process identifier from @credentials. This * method is only available on UNIX platforms. * * This operation can fail if #GCredentials is not supported on the * OS or if the native credentials type does not contain information * about the UNIX process ID. * * Returns: The UNIX process ID, or -1 if @error is set. * * Since: 2.36 * * Throws: GException on failure. */ public pid_t getUnixPid() { GError* err = null; auto p = g_credentials_get_unix_pid(gCredentials, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Tries to get the UNIX user identifier from @credentials. This * method is only available on UNIX platforms. * * This operation can fail if #GCredentials is not supported on the * OS or if the native credentials type does not contain information * about the UNIX user. * * Returns: The UNIX user identifier or -1 if @error is set. * * Since: 2.26 * * Throws: GException on failure. */ public uid_t getUnixUser() { GError* err = null; auto p = g_credentials_get_unix_user(gCredentials, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks if @credentials and @other_credentials is the same user. * * This operation can fail if #GCredentials is not supported on the * the OS. * * Params: * otherCredentials = A #GCredentials. * * Returns: %TRUE if @credentials and @other_credentials has the same * user, %FALSE otherwise or if @error is set. * * Since: 2.26 * * Throws: GException on failure. */ public bool isSameUser(Credentials otherCredentials) { GError* err = null; auto p = g_credentials_is_same_user(gCredentials, (otherCredentials is null) ? null : otherCredentials.getCredentialsStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Copies the native credentials of type @native_type from @native * into @credentials. * * It is a programming error (which will cause an warning to be * logged) to use this method if there is no #GCredentials support for * the OS or if @native_type isn't supported by the OS. * * Params: * nativeType = The type of native credentials to set. * native = A pointer to native credentials. * * Since: 2.26 */ public void setNative(GCredentialsType nativeType, void* native) { g_credentials_set_native(gCredentials, nativeType, native); } /** * Tries to set the UNIX user identifier on @credentials. This method * is only available on UNIX platforms. * * This operation can fail if #GCredentials is not supported on the * OS or if the native credentials type does not contain information * about the UNIX user. It can also fail if the OS does not allow the * use of "spoofed" credentials. * * Params: * uid = The UNIX user identifier to set. * * Returns: %TRUE if @uid was set, %FALSE if error is set. * * Since: 2.26 * * Throws: GException on failure. */ public bool setUnixUser(uid_t uid) { GError* err = null; auto p = g_credentials_set_unix_user(gCredentials, uid, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Creates a human-readable textual representation of @credentials * that can be used in logging and debug messages. The format of the * returned string may change in future GLib release. * * Returns: A string that should be freed with g_free(). * * Since: 2.26 */ public override string toString() { auto retStr = g_credentials_to_string(gCredentials); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/gio/DBusActionGroup.d000066400000000000000000000105561324604450400212120ustar00rootroot00000000000000/* * 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 gio.DBusActionGroup; private import gio.ActionGroupIF; private import gio.ActionGroupT; private import gio.DBusConnection; private import gio.RemoteActionGroupIF; private import gio.RemoteActionGroupT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GDBusActionGroup is an implementation of the #GActionGroup * interface that can be used as a proxy for an action group * that is exported over D-Bus with g_dbus_connection_export_action_group(). */ public class DBusActionGroup : ObjectG, ActionGroupIF, RemoteActionGroupIF { /** the main Gtk struct */ protected GDBusActionGroup* gDBusActionGroup; /** Get the main Gtk struct */ public GDBusActionGroup* getDBusActionGroupStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusActionGroup; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusActionGroup; } protected override void setStruct(GObject* obj) { gDBusActionGroup = cast(GDBusActionGroup*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusActionGroup* gDBusActionGroup, bool ownedRef = false) { this.gDBusActionGroup = gDBusActionGroup; super(cast(GObject*)gDBusActionGroup, ownedRef); } // add the ActionGroup capabilities mixin ActionGroupT!(GDBusActionGroup); // add the RemoteActionGroup capabilities mixin RemoteActionGroupT!(GDBusActionGroup); /** * See_Also: get(). */ this(DBusConnection connection, string busName, string objectPath) { auto p = g_dbus_action_group_get((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(busName), Str.toStringz(objectPath)); if(p is null) { throw new ConstructionException("null returned by g_dbus_action_group_get"); } this(cast(GDBusActionGroup*) p, true); } /** */ /** */ public static GType getType() { return g_dbus_action_group_get_type(); } /** * Obtains a #GDBusActionGroup for the action group which is exported at * the given @bus_name and @object_path. * * The thread default main context is taken at the time of this call. * All signals on the menu model (and any linked models) are reported * with respect to this context. All calls on the returned menu model * (and linked models) must also originate from this same context, with * the thread default main context unchanged. * * This call is non-blocking. The returned action group may or may not * already be filled in. The correct thing to do is connect the signals * for the action group to monitor for changes and then to call * g_action_group_list_actions() to get the initial list. * * Params: * connection = A #GDBusConnection * busName = the bus name which exports the action group * objectPath = the object path at which the action group is exported * * Returns: a #GDBusActionGroup * * Since: 2.32 */ public static DBusActionGroup get(DBusConnection connection, string busName, string objectPath) { auto p = g_dbus_action_group_get((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(busName), Str.toStringz(objectPath)); if(p is null) { return null; } return ObjectG.getDObject!(DBusActionGroup)(cast(GDBusActionGroup*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/DBusAnnotationInfo.d000066400000000000000000000121701324604450400217000ustar00rootroot00000000000000/* * 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 gio.DBusAnnotationInfo; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Information about an annotation. * * Since: 2.26 */ public final class DBusAnnotationInfo { /** the main Gtk struct */ protected GDBusAnnotationInfo* gDBusAnnotationInfo; protected bool ownedRef; /** Get the main Gtk struct */ public GDBusAnnotationInfo* getDBusAnnotationInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusAnnotationInfo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDBusAnnotationInfo; } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusAnnotationInfo* gDBusAnnotationInfo, bool ownedRef = false) { this.gDBusAnnotationInfo = gDBusAnnotationInfo; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_dbus_annotation_info_unref(gDBusAnnotationInfo); } /** * Looks up the value of an annotation. * * The cost of this function is O(n) in number of annotations. * * Params: * annotations = A %NULL-terminated array of annotations or %NULL. * name = The name of the annotation to look up. * * Return: The value or %NULL if not found. Do not free, it is owned by @annotations. * * Since: 2.26 */ public static string lookup(DBusAnnotationInfo[] annotations, string name) { GDBusAnnotationInfo*[] annotationsArray = new GDBusAnnotationInfo*[annotations.length+1]; for ( int i = 0; i < annotations.length ; i++ ) { annotationsArray[i] = annotations[i].getDBusAnnotationInfoStruct(); } annotationsArray[$-1] = null; return Str.toString(g_dbus_annotation_info_lookup(annotationsArray.ptr, Str.toStringz(name))); } /** */ /** * The reference count or -1 if statically allocated. */ public @property int refCount() { return gDBusAnnotationInfo.refCount; } /** Ditto */ public @property void refCount(int value) { gDBusAnnotationInfo.refCount = value; } /** * The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated". */ public @property string key() { return Str.toString(gDBusAnnotationInfo.key); } /** Ditto */ public @property void key(string value) { gDBusAnnotationInfo.key = Str.toStringz(value); } /** * The value of the annotation. */ public @property string value() { return Str.toString(gDBusAnnotationInfo.value); } /** Ditto */ public @property void value(string value) { gDBusAnnotationInfo.value = Str.toStringz(value); } /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ public @property DBusAnnotationInfo[] annotations() { DBusAnnotationInfo[] arr = new DBusAnnotationInfo[getArrayLength(gDBusAnnotationInfo.annotations)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusAnnotationInfo)(gDBusAnnotationInfo.annotations[i], false); } return arr; } /** Ditto */ public @property void annotations(DBusAnnotationInfo[] value) { GDBusAnnotationInfo*[] arr = new GDBusAnnotationInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusAnnotationInfoStruct(); } arr[value.length] = null; gDBusAnnotationInfo.annotations = arr.ptr; } /** */ public static GType getType() { return g_dbus_annotation_info_get_type(); } /** * If @info is statically allocated does nothing. Otherwise increases * the reference count. * * Returns: The same @info. * * Since: 2.26 */ public DBusAnnotationInfo doref() { auto p = g_dbus_annotation_info_ref(gDBusAnnotationInfo); if(p is null) { return null; } return ObjectG.getDObject!(DBusAnnotationInfo)(cast(GDBusAnnotationInfo*) p, true); } /** * If @info is statically allocated, does nothing. Otherwise decreases * the reference count of @info. When its reference count drops to 0, * the memory used is freed. * * Since: 2.26 */ public void unref() { g_dbus_annotation_info_unref(gDBusAnnotationInfo); } } GtkD-3.7.5/generated/gtkd/gio/DBusArgInfo.d000066400000000000000000000103041324604450400202740ustar00rootroot00000000000000/* * 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 gio.DBusArgInfo; private import gio.DBusAnnotationInfo; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Information about an argument for a method or a signal. * * Since: 2.26 */ public final class DBusArgInfo { /** the main Gtk struct */ protected GDBusArgInfo* gDBusArgInfo; protected bool ownedRef; /** Get the main Gtk struct */ public GDBusArgInfo* getDBusArgInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusArgInfo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDBusArgInfo; } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusArgInfo* gDBusArgInfo, bool ownedRef = false) { this.gDBusArgInfo = gDBusArgInfo; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_dbus_arg_info_unref(gDBusArgInfo); } /** * The reference count or -1 if statically allocated. */ public @property int refCount() { return gDBusArgInfo.refCount; } /** Ditto */ public @property void refCount(int value) { gDBusArgInfo.refCount = value; } /** * Name of the argument, e.g. @unix_user_id. */ public @property string name() { return Str.toString(gDBusArgInfo.name); } /** Ditto */ public @property void name(string value) { gDBusArgInfo.name = Str.toStringz(value); } /** * D-Bus signature of the argument (a single complete type). */ public @property string signature() { return Str.toString(gDBusArgInfo.signature); } /** Ditto */ public @property void signature(string value) { gDBusArgInfo.signature = Str.toStringz(value); } /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ public @property DBusAnnotationInfo[] annotations() { DBusAnnotationInfo[] arr = new DBusAnnotationInfo[getArrayLength(gDBusArgInfo.annotations)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusAnnotationInfo)(gDBusArgInfo.annotations[i], false); } return arr; } /** Ditto */ public @property void annotations(DBusAnnotationInfo[] value) { GDBusAnnotationInfo*[] arr = new GDBusAnnotationInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusAnnotationInfoStruct(); } arr[value.length] = null; gDBusArgInfo.annotations = arr.ptr; } /** */ public static GType getType() { return g_dbus_arg_info_get_type(); } /** * If @info is statically allocated does nothing. Otherwise increases * the reference count. * * Returns: The same @info. * * Since: 2.26 */ public DBusArgInfo doref() { auto p = g_dbus_arg_info_ref(gDBusArgInfo); if(p is null) { return null; } return ObjectG.getDObject!(DBusArgInfo)(cast(GDBusArgInfo*) p, true); } /** * If @info is statically allocated, does nothing. Otherwise decreases * the reference count of @info. When its reference count drops to 0, * the memory used is freed. * * Since: 2.26 */ public void unref() { g_dbus_arg_info_unref(gDBusArgInfo); } } GtkD-3.7.5/generated/gtkd/gio/DBusAuthObserver.d000066400000000000000000000205631324604450400213700ustar00rootroot00000000000000/* * 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 gio.DBusAuthObserver; private import gio.Credentials; private import gio.IOStream; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * The #GDBusAuthObserver type provides a mechanism for participating * in how a #GDBusServer (or a #GDBusConnection) authenticates remote * peers. Simply instantiate a #GDBusAuthObserver and connect to the * signals you are interested in. Note that new signals may be added * in the future * * ## Controlling Authentication # {#auth-observer} * * For example, if you only want to allow D-Bus connections from * processes owned by the same uid as the server, you would use a * signal handler like the following: * * |[ * static gboolean * on_authorize_authenticated_peer (GDBusAuthObserver *observer, * GIOStream *stream, * GCredentials *credentials, * gpointer user_data) * { * gboolean authorized; * * authorized = FALSE; * if (credentials != NULL) * { * GCredentials *own_credentials; * own_credentials = g_credentials_new (); * if (g_credentials_is_same_user (credentials, own_credentials, NULL)) * authorized = TRUE; * g_object_unref (own_credentials); * } * * return authorized; * } * ]| * * Since: 2.26 */ public class DBusAuthObserver : ObjectG { /** the main Gtk struct */ protected GDBusAuthObserver* gDBusAuthObserver; /** Get the main Gtk struct */ public GDBusAuthObserver* getDBusAuthObserverStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusAuthObserver; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusAuthObserver; } protected override void setStruct(GObject* obj) { gDBusAuthObserver = cast(GDBusAuthObserver*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusAuthObserver* gDBusAuthObserver, bool ownedRef = false) { this.gDBusAuthObserver = gDBusAuthObserver; super(cast(GObject*)gDBusAuthObserver, ownedRef); } /** */ public static GType getType() { return g_dbus_auth_observer_get_type(); } /** * Creates a new #GDBusAuthObserver object. * * Returns: A #GDBusAuthObserver. Free with g_object_unref(). * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_dbus_auth_observer_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDBusAuthObserver*) p, true); } /** * Emits the #GDBusAuthObserver::allow-mechanism signal on @observer. * * Params: * mechanism = The name of the mechanism, e.g. `DBUS_COOKIE_SHA1`. * * Returns: %TRUE if @mechanism can be used to authenticate the other peer, %FALSE if not. * * Since: 2.34 */ public bool allowMechanism(string mechanism) { return g_dbus_auth_observer_allow_mechanism(gDBusAuthObserver, Str.toStringz(mechanism)) != 0; } /** * Emits the #GDBusAuthObserver::authorize-authenticated-peer signal on @observer. * * Params: * stream = A #GIOStream for the #GDBusConnection. * credentials = Credentials received from the peer or %NULL. * * Returns: %TRUE if the peer is authorized, %FALSE if not. * * Since: 2.26 */ public bool authorizeAuthenticatedPeer(IOStream stream, Credentials credentials) { return g_dbus_auth_observer_authorize_authenticated_peer(gDBusAuthObserver, (stream is null) ? null : stream.getIOStreamStruct(), (credentials is null) ? null : credentials.getCredentialsStruct()) != 0; } protected class OnAllowMechanismDelegateWrapper { bool delegate(string, DBusAuthObserver) dlg; gulong handlerId; this(bool delegate(string, DBusAuthObserver) dlg) { this.dlg = dlg; onAllowMechanismListeners ~= this; } void remove(OnAllowMechanismDelegateWrapper source) { foreach(index, wrapper; onAllowMechanismListeners) { if (wrapper.handlerId == source.handlerId) { onAllowMechanismListeners[index] = null; onAllowMechanismListeners = std.algorithm.remove(onAllowMechanismListeners, index); break; } } } } OnAllowMechanismDelegateWrapper[] onAllowMechanismListeners; /** * Emitted to check if @mechanism is allowed to be used. * * Params: * mechanism = The name of the mechanism, e.g. `DBUS_COOKIE_SHA1`. * * Returns: %TRUE if @mechanism can be used to authenticate the other peer, %FALSE if not. * * Since: 2.34 */ gulong addOnAllowMechanism(bool delegate(string, DBusAuthObserver) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAllowMechanismDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "allow-mechanism", cast(GCallback)&callBackAllowMechanism, cast(void*)wrapper, cast(GClosureNotify)&callBackAllowMechanismDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackAllowMechanism(GDBusAuthObserver* dbusauthobserverStruct, char* mechanism, OnAllowMechanismDelegateWrapper wrapper) { return wrapper.dlg(Str.toString(mechanism), wrapper.outer); } extern(C) static void callBackAllowMechanismDestroy(OnAllowMechanismDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnAuthorizeAuthenticatedPeerDelegateWrapper { bool delegate(IOStream, Credentials, DBusAuthObserver) dlg; gulong handlerId; this(bool delegate(IOStream, Credentials, DBusAuthObserver) dlg) { this.dlg = dlg; onAuthorizeAuthenticatedPeerListeners ~= this; } void remove(OnAuthorizeAuthenticatedPeerDelegateWrapper source) { foreach(index, wrapper; onAuthorizeAuthenticatedPeerListeners) { if (wrapper.handlerId == source.handlerId) { onAuthorizeAuthenticatedPeerListeners[index] = null; onAuthorizeAuthenticatedPeerListeners = std.algorithm.remove(onAuthorizeAuthenticatedPeerListeners, index); break; } } } } OnAuthorizeAuthenticatedPeerDelegateWrapper[] onAuthorizeAuthenticatedPeerListeners; /** * Emitted to check if a peer that is successfully authenticated * is authorized. * * Params: * stream = A #GIOStream for the #GDBusConnection. * credentials = Credentials received from the peer or %NULL. * * Returns: %TRUE if the peer is authorized, %FALSE if not. * * Since: 2.26 */ gulong addOnAuthorizeAuthenticatedPeer(bool delegate(IOStream, Credentials, DBusAuthObserver) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAuthorizeAuthenticatedPeerDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "authorize-authenticated-peer", cast(GCallback)&callBackAuthorizeAuthenticatedPeer, cast(void*)wrapper, cast(GClosureNotify)&callBackAuthorizeAuthenticatedPeerDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackAuthorizeAuthenticatedPeer(GDBusAuthObserver* dbusauthobserverStruct, GIOStream* stream, GCredentials* credentials, OnAuthorizeAuthenticatedPeerDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(IOStream)(stream), ObjectG.getDObject!(Credentials)(credentials), wrapper.outer); } extern(C) static void callBackAuthorizeAuthenticatedPeerDestroy(OnAuthorizeAuthenticatedPeerDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DBusConnection.d000066400000000000000000002053531324604450400210600ustar00rootroot00000000000000/* * 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 gio.DBusConnection; private import gio.ActionGroupIF; private import gio.AsyncInitableIF; private import gio.AsyncInitableT; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.Credentials; private import gio.DBusAuthObserver; private import gio.DBusInterfaceInfo; private import gio.DBusMessage; private import gio.IOStream; private import gio.InitableIF; private import gio.InitableT; private import gio.MenuModel; private import gio.UnixFDList; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import gobject.Closure; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * The #GDBusConnection type is used for D-Bus connections to remote * peers such as a message buses. It is a low-level API that offers a * lot of flexibility. For instance, it lets you establish a connection * over any transport that can by represented as an #GIOStream. * * This class is rarely used directly in D-Bus clients. If you are writing * a D-Bus client, it is often easier to use the g_bus_own_name(), * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs. * * As an exception to the usual GLib rule that a particular object must not * be used by two threads at the same time, #GDBusConnection's methods may be * called from any thread. This is so that g_bus_get() and g_bus_get_sync() * can safely return the same #GDBusConnection when called from any thread. * * Most of the ways to obtain a #GDBusConnection automatically initialize it * (i.e. connect to D-Bus): for instance, g_dbus_connection_new() and * g_bus_get(), and the synchronous versions of those methods, give you an * initialized connection. Language bindings for GIO should use * g_initable_new() or g_async_initable_new_async(), which also initialize the * connection. * * If you construct an uninitialized #GDBusConnection, such as via * g_object_new(), you must initialize it via g_initable_init() or * g_async_initable_init_async() before using its methods or properties. * Calling methods or accessing properties on a #GDBusConnection that has not * completed initialization successfully is considered to be invalid, and leads * to undefined behaviour. In particular, if initialization fails with a * #GError, the only valid thing you can do with that #GDBusConnection is to * free it with g_object_unref(). * * ## An example D-Bus server # {#gdbus-server} * * Here is an example for a D-Bus server: * [gdbus-example-server.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-server.c) * * ## An example for exporting a subtree # {#gdbus-subtree-server} * * Here is an example for exporting a subtree: * [gdbus-example-subtree.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-subtree.c) * * ## An example for file descriptor passing # {#gdbus-unix-fd-client} * * Here is an example for passing UNIX file descriptors: * [gdbus-unix-fd-client.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-unix-fd-client.c) * * ## An example for exporting a GObject # {#gdbus-export} * * Here is an example for exporting a #GObject: * [gdbus-example-export.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-export.c) * * Since: 2.26 */ public class DBusConnection : ObjectG, AsyncInitableIF, InitableIF { /** the main Gtk struct */ protected GDBusConnection* gDBusConnection; /** Get the main Gtk struct */ public GDBusConnection* getDBusConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusConnection; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusConnection; } protected override void setStruct(GObject* obj) { gDBusConnection = cast(GDBusConnection*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusConnection* gDBusConnection, bool ownedRef = false) { this.gDBusConnection = gDBusConnection; super(cast(GObject*)gDBusConnection, ownedRef); } // add the AsyncInitable capabilities mixin AsyncInitableT!(GDBusConnection); // add the Initable capabilities mixin InitableT!(GDBusConnection); /** * Finishes an operation started with g_dbus_connection_new(). * * Params: * res = A GAsyncResult obtained from the GAsyncReadyCallback * passed to g_dbus_connection_new(). * address = If true finish an address. * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. * * Since: 2.26 */ public this (AsyncResultIF res, bool address = false) { GError* err = null; GDBusConnection* p; if ( address ) { p = g_dbus_connection_new_for_address_finish((res is null) ? null : res.getAsyncResultStruct(), &err); } else { p = g_dbus_connection_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err); } if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by g_dbus_connection_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err)"); } this(p, true); } /** */ /** */ public static GType getType() { return g_dbus_connection_get_type(); } /** * Synchronously connects and sets up a D-Bus client connection for * exchanging D-Bus messages with an endpoint specified by @address * which must be in the * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * * This constructor can only be used to initiate client-side * connections - use g_dbus_connection_new_sync() if you need to act * as the server. In particular, @flags cannot contain the * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. * * This is a synchronous failable constructor. See * g_dbus_connection_new_for_address() for the asynchronous version. * * If @observer is not %NULL it may be used to control the * authentication process. * * Params: * address = a D-Bus address * flags = flags describing how to make the connection * observer = a #GDBusAuthObserver or %NULL * cancellable = a #GCancellable or %NULL * * Returns: a #GDBusConnection or %NULL if @error is set. Free with * g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string address, GDBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable) { GError* err = null; auto p = g_dbus_connection_new_for_address_sync(Str.toStringz(address), flags, (observer is null) ? null : observer.getDBusAuthObserverStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_for_address_sync"); } this(cast(GDBusConnection*) p, true); } /** * Synchronously sets up a D-Bus connection for exchanging D-Bus messages * with the end represented by @stream. * * If @stream is a #GSocketConnection, then the corresponding #GSocket * will be put into non-blocking mode. * * The D-Bus connection will interact with @stream from a worker thread. * As a result, the caller should not interact with @stream after this * method has been called, except by calling g_object_unref() on it. * * If @observer is not %NULL it may be used to control the * authentication process. * * This is a synchronous failable constructor. See * g_dbus_connection_new() for the asynchronous version. * * Params: * stream = a #GIOStream * guid = the GUID to use if a authenticating as a server or %NULL * flags = flags describing how to make the connection * observer = a #GDBusAuthObserver or %NULL * cancellable = a #GCancellable or %NULL * * Returns: a #GDBusConnection or %NULL if @error is set. Free with g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(IOStream stream, string guid, GDBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable) { GError* err = null; auto p = g_dbus_connection_new_sync((stream is null) ? null : stream.getIOStreamStruct(), Str.toStringz(guid), flags, (observer is null) ? null : observer.getDBusAuthObserverStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_sync"); } this(cast(GDBusConnection*) p, true); } /** * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages * with the end represented by @stream. * * If @stream is a #GSocketConnection, then the corresponding #GSocket * will be put into non-blocking mode. * * The D-Bus connection will interact with @stream from a worker thread. * As a result, the caller should not interact with @stream after this * method has been called, except by calling g_object_unref() on it. * * If @observer is not %NULL it may be used to control the * authentication process. * * When the operation is finished, @callback will be invoked. You can * then call g_dbus_connection_new_finish() to get the result of the * operation. * * This is a asynchronous failable constructor. See * g_dbus_connection_new_sync() for the synchronous * version. * * Params: * stream = a #GIOStream * guid = the GUID to use if a authenticating as a server or %NULL * flags = flags describing how to make the connection * observer = a #GDBusAuthObserver or %NULL * cancellable = a #GCancellable or %NULL * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to @callback * * Since: 2.26 */ public static void newConnection(IOStream stream, string guid, GDBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_connection_new((stream is null) ? null : stream.getIOStreamStruct(), Str.toStringz(guid), flags, (observer is null) ? null : observer.getDBusAuthObserverStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Asynchronously connects and sets up a D-Bus client connection for * exchanging D-Bus messages with an endpoint specified by @address * which must be in the * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * * This constructor can only be used to initiate client-side * connections - use g_dbus_connection_new() if you need to act as the * server. In particular, @flags cannot contain the * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER or * %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS flags. * * When the operation is finished, @callback will be invoked. You can * then call g_dbus_connection_new_finish() to get the result of the * operation. * * If @observer is not %NULL it may be used to control the * authentication process. * * This is a asynchronous failable constructor. See * g_dbus_connection_new_for_address_sync() for the synchronous * version. * * Params: * address = a D-Bus address * flags = flags describing how to make the connection * observer = a #GDBusAuthObserver or %NULL * cancellable = a #GCancellable or %NULL * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to @callback * * Since: 2.26 */ public static void newForAddress(string address, GDBusConnectionFlags flags, DBusAuthObserver observer, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_connection_new_for_address(Str.toStringz(address), flags, (observer is null) ? null : observer.getDBusAuthObserverStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Adds a message filter. Filters are handlers that are run on all * incoming and outgoing messages, prior to standard dispatch. Filters * are run in the order that they were added. The same handler can be * added as a filter more than once, in which case it will be run more * than once. Filters added during a filter callback won't be run on * the message being processed. Filter functions are allowed to modify * and even drop messages. * * Note that filters are run in a dedicated message handling thread so * they can't block and, generally, can't do anything but signal a * worker thread. Also note that filters are rarely needed - use API * such as g_dbus_connection_send_message_with_reply(), * g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead. * * If a filter consumes an incoming message the message is not * dispatched anywhere else - not even the standard dispatch machinery * (that API such as g_dbus_connection_signal_subscribe() and * g_dbus_connection_send_message_with_reply() relies on) will see the * message. Similary, if a filter consumes an outgoing message, the * message will not be sent to the other peer. * * If @user_data_free_func is non-%NULL, it will be called (in the * thread-default main context of the thread you are calling this * method from) at some point after @user_data is no longer * needed. (It is not guaranteed to be called synchronously when the * filter is removed, and may be called after @connection has been * destroyed.) * * Params: * filterFunction = a filter function * userData = user data to pass to @filter_function * userDataFreeFunc = function to free @user_data with when filter * is removed or %NULL * * Returns: a filter identifier that can be used with * g_dbus_connection_remove_filter() * * Since: 2.26 */ public uint addFilter(GDBusMessageFilterFunction filterFunction, void* userData, GDestroyNotify userDataFreeFunc) { return g_dbus_connection_add_filter(gDBusConnection, filterFunction, userData, userDataFreeFunc); } /** * Asynchronously invokes the @method_name method on the * @interface_name D-Bus interface on the remote object at * @object_path owned by @bus_name. * * If @connection is closed then the operation will fail with * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will * fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value * not compatible with the D-Bus protocol, the operation fails with * %G_IO_ERROR_INVALID_ARGUMENT. * * If @reply_type is non-%NULL then the reply will be checked for having this type and an * error will be raised if it does not match. Said another way, if you give a @reply_type * then any non-%NULL return value will be of this type. * * If the @parameters #GVariant is floating, it is consumed. This allows * convenient 'inline' use of g_variant_new(), e.g.: * |[ * g_dbus_connection_call (connection, * "org.freedesktop.StringThings", * "/org/freedesktop/StringThings", * "org.freedesktop.StringThings", * "TwoStrings", * g_variant_new ("(ss)", * "Thing One", * "Thing Two"), * NULL, * G_DBUS_CALL_FLAGS_NONE, * -1, * NULL, * (GAsyncReadyCallback) two_strings_done, * NULL); * ]| * * This is an asynchronous method. When the operation is finished, * @callback will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this method from. You can then call * g_dbus_connection_call_finish() to get the result of the operation. * See g_dbus_connection_call_sync() for the synchronous version of this * function. * * If @callback is %NULL then the D-Bus method call message will be sent with * the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. * * Params: * busName = a unique or well-known bus name or %NULL if * @connection is not a message bus connection * objectPath = path of remote object * interfaceName = D-Bus interface to invoke method on * methodName = the name of the method to invoke * parameters = a #GVariant tuple with parameters for the method * or %NULL if not passing parameters * replyType = the expected type of the reply, or %NULL * flags = flags from the #GDBusCallFlags enumeration * timeoutMsec = the timeout in milliseconds, -1 to use the default * timeout or %G_MAXINT for no timeout * cancellable = a #GCancellable or %NULL * callback = a #GAsyncReadyCallback to call when the request * is satisfied or %NULL if you don't care about the result of the * method invocation * userData = the data to pass to @callback * * Since: 2.26 */ public void call(string busName, string objectPath, string interfaceName, string methodName, Variant parameters, VariantType replyType, GDBusCallFlags flags, int timeoutMsec, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_connection_call(gDBusConnection, Str.toStringz(busName), Str.toStringz(objectPath), Str.toStringz(interfaceName), Str.toStringz(methodName), (parameters is null) ? null : parameters.getVariantStruct(), (replyType is null) ? null : replyType.getVariantTypeStruct(), flags, timeoutMsec, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_dbus_connection_call(). * * Params: * res = a #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_connection_call() * * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with * return values. Free with g_variant_unref(). * * Since: 2.26 * * Throws: GException on failure. */ public Variant callFinish(AsyncResultIF res) { GError* err = null; auto p = g_dbus_connection_call_finish(gDBusConnection, (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Synchronously invokes the @method_name method on the * @interface_name D-Bus interface on the remote object at * @object_path owned by @bus_name. * * If @connection is closed then the operation will fail with * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the * operation will fail with %G_IO_ERROR_CANCELLED. If @parameters * contains a value not compatible with the D-Bus protocol, the operation * fails with %G_IO_ERROR_INVALID_ARGUMENT. * * If @reply_type is non-%NULL then the reply will be checked for having * this type and an error will be raised if it does not match. Said * another way, if you give a @reply_type then any non-%NULL return * value will be of this type. * * If the @parameters #GVariant is floating, it is consumed. * This allows convenient 'inline' use of g_variant_new(), e.g.: * |[ * g_dbus_connection_call_sync (connection, * "org.freedesktop.StringThings", * "/org/freedesktop/StringThings", * "org.freedesktop.StringThings", * "TwoStrings", * g_variant_new ("(ss)", * "Thing One", * "Thing Two"), * NULL, * G_DBUS_CALL_FLAGS_NONE, * -1, * NULL, * &error); * ]| * * The calling thread is blocked until a reply is received. See * g_dbus_connection_call() for the asynchronous version of * this method. * * Params: * busName = a unique or well-known bus name or %NULL if * @connection is not a message bus connection * objectPath = path of remote object * interfaceName = D-Bus interface to invoke method on * methodName = the name of the method to invoke * parameters = a #GVariant tuple with parameters for the method * or %NULL if not passing parameters * replyType = the expected type of the reply, or %NULL * flags = flags from the #GDBusCallFlags enumeration * timeoutMsec = the timeout in milliseconds, -1 to use the default * timeout or %G_MAXINT for no timeout * cancellable = a #GCancellable or %NULL * * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with * return values. Free with g_variant_unref(). * * Since: 2.26 * * Throws: GException on failure. */ public Variant callSync(string busName, string objectPath, string interfaceName, string methodName, Variant parameters, VariantType replyType, GDBusCallFlags flags, int timeoutMsec, Cancellable cancellable) { GError* err = null; auto p = g_dbus_connection_call_sync(gDBusConnection, Str.toStringz(busName), Str.toStringz(objectPath), Str.toStringz(interfaceName), Str.toStringz(methodName), (parameters is null) ? null : parameters.getVariantStruct(), (replyType is null) ? null : replyType.getVariantTypeStruct(), flags, timeoutMsec, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Like g_dbus_connection_call() but also takes a #GUnixFDList object. * * This method is only available on UNIX. * * Params: * busName = a unique or well-known bus name or %NULL if * @connection is not a message bus connection * objectPath = path of remote object * interfaceName = D-Bus interface to invoke method on * methodName = the name of the method to invoke * parameters = a #GVariant tuple with parameters for the method * or %NULL if not passing parameters * replyType = the expected type of the reply, or %NULL * flags = flags from the #GDBusCallFlags enumeration * timeoutMsec = the timeout in milliseconds, -1 to use the default * timeout or %G_MAXINT for no timeout * fdList = a #GUnixFDList or %NULL * cancellable = a #GCancellable or %NULL * callback = a #GAsyncReadyCallback to call when the request is * satisfied or %NULL if you don't * care about the result of the * method invocation * userData = The data to pass to @callback. * * Since: 2.30 */ public void callWithUnixFdList(string busName, string objectPath, string interfaceName, string methodName, Variant parameters, VariantType replyType, GDBusCallFlags flags, int timeoutMsec, UnixFDList fdList, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_connection_call_with_unix_fd_list(gDBusConnection, Str.toStringz(busName), Str.toStringz(objectPath), Str.toStringz(interfaceName), Str.toStringz(methodName), (parameters is null) ? null : parameters.getVariantStruct(), (replyType is null) ? null : replyType.getVariantTypeStruct(), flags, timeoutMsec, (fdList is null) ? null : fdList.getUnixFDListStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_dbus_connection_call_with_unix_fd_list(). * * Params: * outFdList = return location for a #GUnixFDList or %NULL * res = a #GAsyncResult obtained from the #GAsyncReadyCallback passed to * g_dbus_connection_call_with_unix_fd_list() * * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with * return values. Free with g_variant_unref(). * * Since: 2.30 * * Throws: GException on failure. */ public Variant callWithUnixFdListFinish(out UnixFDList outFdList, AsyncResultIF res) { GUnixFDList* outoutFdList = null; GError* err = null; auto p = g_dbus_connection_call_with_unix_fd_list_finish(gDBusConnection, &outoutFdList, (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } outFdList = ObjectG.getDObject!(UnixFDList)(outoutFdList); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects. * * This method is only available on UNIX. * * Params: * busName = a unique or well-known bus name or %NULL * if @connection is not a message bus connection * objectPath = path of remote object * interfaceName = D-Bus interface to invoke method on * methodName = the name of the method to invoke * parameters = a #GVariant tuple with parameters for * the method or %NULL if not passing parameters * replyType = the expected type of the reply, or %NULL * flags = flags from the #GDBusCallFlags enumeration * timeoutMsec = the timeout in milliseconds, -1 to use the default * timeout or %G_MAXINT for no timeout * fdList = a #GUnixFDList or %NULL * outFdList = return location for a #GUnixFDList or %NULL * cancellable = a #GCancellable or %NULL * * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with * return values. Free with g_variant_unref(). * * Since: 2.30 * * Throws: GException on failure. */ public Variant callWithUnixFdListSync(string busName, string objectPath, string interfaceName, string methodName, Variant parameters, VariantType replyType, GDBusCallFlags flags, int timeoutMsec, UnixFDList fdList, out UnixFDList outFdList, Cancellable cancellable) { GUnixFDList* outoutFdList = null; GError* err = null; auto p = g_dbus_connection_call_with_unix_fd_list_sync(gDBusConnection, Str.toStringz(busName), Str.toStringz(objectPath), Str.toStringz(interfaceName), Str.toStringz(methodName), (parameters is null) ? null : parameters.getVariantStruct(), (replyType is null) ? null : replyType.getVariantTypeStruct(), flags, timeoutMsec, (fdList is null) ? null : fdList.getUnixFDListStruct(), &outoutFdList, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } outFdList = ObjectG.getDObject!(UnixFDList)(outoutFdList); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Closes @connection. Note that this never causes the process to * exit (this might only happen if the other end of a shared message * bus connection disconnects, see #GDBusConnection:exit-on-close). * * Once the connection is closed, operations such as sending a message * will return with the error %G_IO_ERROR_CLOSED. Closing a connection * will not automatically flush the connection so queued messages may * be lost. Use g_dbus_connection_flush() if you need such guarantees. * * If @connection is already closed, this method fails with * %G_IO_ERROR_CLOSED. * * When @connection has been closed, the #GDBusConnection::closed * signal is emitted in the * [thread-default main context][g-main-context-push-thread-default] * of the thread that @connection was constructed in. * * This is an asynchronous method. When the operation is finished, * @callback will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this method from. You can * then call g_dbus_connection_close_finish() to get the result of the * operation. See g_dbus_connection_close_sync() for the synchronous * version. * * Params: * cancellable = a #GCancellable or %NULL * callback = a #GAsyncReadyCallback to call when the request is * satisfied or %NULL if you don't care about the result * userData = The data to pass to @callback * * Since: 2.26 */ public void close(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_connection_close(gDBusConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_dbus_connection_close(). * * Params: * res = a #GAsyncResult obtained from the #GAsyncReadyCallback passed * to g_dbus_connection_close() * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set * * Since: 2.26 * * Throws: GException on failure. */ public bool closeFinish(AsyncResultIF res) { GError* err = null; auto p = g_dbus_connection_close_finish(gDBusConnection, (res is null) ? null : res.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Synchronously closees @connection. The calling thread is blocked * until this is done. See g_dbus_connection_close() for the * asynchronous version of this method and more details about what it * does. * * Params: * cancellable = a #GCancellable or %NULL * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set * * Since: 2.26 * * Throws: GException on failure. */ public bool closeSync(Cancellable cancellable) { GError* err = null; auto p = g_dbus_connection_close_sync(gDBusConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Emits a signal. * * If the parameters GVariant is floating, it is consumed. * * This can only fail if @parameters is not compatible with the D-Bus protocol. * * Params: * destinationBusName = the unique bus name for the destination * for the signal or %NULL to emit to all listeners * objectPath = path of remote object * interfaceName = D-Bus interface to emit a signal on * signalName = the name of the signal to emit * parameters = a #GVariant tuple with parameters for the signal * or %NULL if not passing parameters * * Returns: %TRUE unless @error is set * * Since: 2.26 * * Throws: GException on failure. */ public bool emitSignal(string destinationBusName, string objectPath, string interfaceName, string signalName, Variant parameters) { GError* err = null; auto p = g_dbus_connection_emit_signal(gDBusConnection, Str.toStringz(destinationBusName), Str.toStringz(objectPath), Str.toStringz(interfaceName), Str.toStringz(signalName), (parameters is null) ? null : parameters.getVariantStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Exports @action_group on @connection at @object_path. * * The implemented D-Bus API should be considered private. It is * subject to change in the future. * * A given object path can only have one action group exported on it. * If this constraint is violated, the export will fail and 0 will be * returned (with @error set accordingly). * * You can unexport the action group using * g_dbus_connection_unexport_action_group() with the return value of * this function. * * The thread default main context is taken at the time of this call. * All incoming action activations and state change requests are * reported from this context. Any changes on the action group that * cause it to emit signals must also come from this same context. * Since incoming action activations and state change requests are * rather likely to cause changes on the action group, this effectively * limits a given action group to being exported from only one main * context. * * Params: * objectPath = a D-Bus object path * actionGroup = a #GActionGroup * * Returns: the ID of the export (never zero), or 0 in case of failure * * Since: 2.32 * * Throws: GException on failure. */ public uint exportActionGroup(string objectPath, ActionGroupIF actionGroup) { GError* err = null; auto p = g_dbus_connection_export_action_group(gDBusConnection, Str.toStringz(objectPath), (actionGroup is null) ? null : actionGroup.getActionGroupStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Exports @menu on @connection at @object_path. * * The implemented D-Bus API should be considered private. * It is subject to change in the future. * * An object path can only have one menu model exported on it. If this * constraint is violated, the export will fail and 0 will be * returned (with @error set accordingly). * * You can unexport the menu model using * g_dbus_connection_unexport_menu_model() with the return value of * this function. * * Params: * objectPath = a D-Bus object path * menu = a #GMenuModel * * Returns: the ID of the export (never zero), or 0 in case of failure * * Since: 2.32 * * Throws: GException on failure. */ public uint exportMenuModel(string objectPath, MenuModel menu) { GError* err = null; auto p = g_dbus_connection_export_menu_model(gDBusConnection, Str.toStringz(objectPath), (menu is null) ? null : menu.getMenuModelStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously flushes @connection, that is, writes all queued * outgoing message to the transport and then flushes the transport * (using g_output_stream_flush_async()). This is useful in programs * that wants to emit a D-Bus signal and then exit immediately. Without * flushing the connection, there is no guaranteed that the message has * been sent to the networking buffers in the OS kernel. * * This is an asynchronous method. When the operation is finished, * @callback will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this method from. You can * then call g_dbus_connection_flush_finish() to get the result of the * operation. See g_dbus_connection_flush_sync() for the synchronous * version. * * Params: * cancellable = a #GCancellable or %NULL * callback = a #GAsyncReadyCallback to call when the * request is satisfied or %NULL if you don't care about the result * userData = The data to pass to @callback * * Since: 2.26 */ public void flush(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_connection_flush(gDBusConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_dbus_connection_flush(). * * Params: * res = a #GAsyncResult obtained from the #GAsyncReadyCallback passed * to g_dbus_connection_flush() * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set * * Since: 2.26 * * Throws: GException on failure. */ public bool flushFinish(AsyncResultIF res) { GError* err = null; auto p = g_dbus_connection_flush_finish(gDBusConnection, (res is null) ? null : res.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Synchronously flushes @connection. The calling thread is blocked * until this is done. See g_dbus_connection_flush() for the * asynchronous version of this method and more details about what it * does. * * Params: * cancellable = a #GCancellable or %NULL * * Returns: %TRUE if the operation succeeded, %FALSE if @error is set * * Since: 2.26 * * Throws: GException on failure. */ public bool flushSync(Cancellable cancellable) { GError* err = null; auto p = g_dbus_connection_flush_sync(gDBusConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the capabilities negotiated with the remote peer * * Returns: zero or more flags from the #GDBusCapabilityFlags enumeration * * Since: 2.26 */ public GDBusCapabilityFlags getCapabilities() { return g_dbus_connection_get_capabilities(gDBusConnection); } /** * Gets whether the process is terminated when @connection is * closed by the remote peer. See * #GDBusConnection:exit-on-close for more details. * * Returns: whether the process is terminated when @connection is * closed by the remote peer * * Since: 2.26 */ public bool getExitOnClose() { return g_dbus_connection_get_exit_on_close(gDBusConnection) != 0; } /** * The GUID of the peer performing the role of server when * authenticating. See #GDBusConnection:guid for more details. * * Returns: The GUID. Do not free this string, it is owned by * @connection. * * Since: 2.26 */ public string getGuid() { return Str.toString(g_dbus_connection_get_guid(gDBusConnection)); } /** * Retrieves the last serial number assigned to a #GDBusMessage on * the current thread. This includes messages sent via both low-level * API such as g_dbus_connection_send_message() as well as * high-level API such as g_dbus_connection_emit_signal(), * g_dbus_connection_call() or g_dbus_proxy_call(). * * Returns: the last used serial or zero when no message has been sent * within the current thread * * Since: 2.34 */ public uint getLastSerial() { return g_dbus_connection_get_last_serial(gDBusConnection); } /** * Gets the credentials of the authenticated peer. This will always * return %NULL unless @connection acted as a server * (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed) * when set up and the client passed credentials as part of the * authentication process. * * In a message bus setup, the message bus is always the server and * each application is a client. So this method will always return * %NULL for message bus clients. * * Returns: a #GCredentials or %NULL if not * available. Do not free this object, it is owned by @connection. * * Since: 2.26 */ public Credentials getPeerCredentials() { auto p = g_dbus_connection_get_peer_credentials(gDBusConnection); if(p is null) { return null; } return ObjectG.getDObject!(Credentials)(cast(GCredentials*) p); } /** * Gets the underlying stream used for IO. * * While the #GDBusConnection is active, it will interact with this * stream from a worker thread, so it is not safe to interact with * the stream directly. * * Returns: the stream used for IO * * Since: 2.26 */ public IOStream getStream() { auto p = g_dbus_connection_get_stream(gDBusConnection); if(p is null) { return null; } return ObjectG.getDObject!(IOStream)(cast(GIOStream*) p); } /** * Gets the unique name of @connection as assigned by the message * bus. This can also be used to figure out if @connection is a * message bus connection. * * Returns: the unique name or %NULL if @connection is not a message * bus connection. Do not free this string, it is owned by * @connection. * * Since: 2.26 */ public string getUniqueName() { return Str.toString(g_dbus_connection_get_unique_name(gDBusConnection)); } /** * Gets whether @connection is closed. * * Returns: %TRUE if the connection is closed, %FALSE otherwise * * Since: 2.26 */ public bool isClosed() { return g_dbus_connection_is_closed(gDBusConnection) != 0; } /** * Registers callbacks for exported objects at @object_path with the * D-Bus interface that is described in @interface_info. * * Calls to functions in @vtable (and @user_data_free_func) will happen * in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this method from. * * Note that all #GVariant values passed to functions in @vtable will match * the signature given in @interface_info - if a remote caller passes * incorrect values, the `org.freedesktop.DBus.Error.InvalidArgs` * is returned to the remote caller. * * Additionally, if the remote caller attempts to invoke methods or * access properties not mentioned in @interface_info the * `org.freedesktop.DBus.Error.UnknownMethod` resp. * `org.freedesktop.DBus.Error.InvalidArgs` errors * are returned to the caller. * * It is considered a programming error if the * #GDBusInterfaceGetPropertyFunc function in @vtable returns a * #GVariant of incorrect type. * * If an existing callback is already registered at @object_path and * @interface_name, then @error is set to #G_IO_ERROR_EXISTS. * * GDBus automatically implements the standard D-Bus interfaces * org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable * and org.freedesktop.Peer, so you don't have to implement those for the * objects you export. You can implement org.freedesktop.DBus.Properties * yourself, e.g. to handle getting and setting of properties asynchronously. * * Note that the reference count on @interface_info will be * incremented by 1 (unless allocated statically, e.g. if the * reference count is -1, see g_dbus_interface_info_ref()) for as long * as the object is exported. Also note that @vtable will be copied. * * See this [server][gdbus-server] for an example of how to use this method. * * Params: * objectPath = the object path to register at * interfaceInfo = introspection data for the interface * vtable = a #GDBusInterfaceVTable to call into or %NULL * userData = data to pass to functions in @vtable * userDataFreeFunc = function to call when the object path is unregistered * * Returns: 0 if @error is set, otherwise a registration id (never 0) * that can be used with g_dbus_connection_unregister_object() * * Since: 2.26 * * Throws: GException on failure. */ public uint registerObject(string objectPath, DBusInterfaceInfo interfaceInfo, GDBusInterfaceVTable* vtable, void* userData, GDestroyNotify userDataFreeFunc) { GError* err = null; auto p = g_dbus_connection_register_object(gDBusConnection, Str.toStringz(objectPath), (interfaceInfo is null) ? null : interfaceInfo.getDBusInterfaceInfoStruct(), vtable, userData, userDataFreeFunc, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Version of g_dbus_connection_register_object() using closures instead of a * #GDBusInterfaceVTable for easier binding in other languages. * * Params: * objectPath = The object path to register at. * interfaceInfo = Introspection data for the interface. * methodCallClosure = #GClosure for handling incoming method calls. * getPropertyClosure = #GClosure for getting a property. * setPropertyClosure = #GClosure for setting a property. * * Returns: 0 if @error is set, otherwise a registration id (never 0) * that can be used with g_dbus_connection_unregister_object() . * * Since: 2.46 * * Throws: GException on failure. */ public uint registerObjectWithClosures(string objectPath, DBusInterfaceInfo interfaceInfo, Closure methodCallClosure, Closure getPropertyClosure, Closure setPropertyClosure) { GError* err = null; auto p = g_dbus_connection_register_object_with_closures(gDBusConnection, Str.toStringz(objectPath), (interfaceInfo is null) ? null : interfaceInfo.getDBusInterfaceInfoStruct(), (methodCallClosure is null) ? null : methodCallClosure.getClosureStruct(), (getPropertyClosure is null) ? null : getPropertyClosure.getClosureStruct(), (setPropertyClosure is null) ? null : setPropertyClosure.getClosureStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Registers a whole subtree of dynamic objects. * * The @enumerate and @introspection functions in @vtable are used to * convey, to remote callers, what nodes exist in the subtree rooted * by @object_path. * * When handling remote calls into any node in the subtree, first the * @enumerate function is used to check if the node exists. If the node exists * or the #G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set * the @introspection function is used to check if the node supports the * requested method. If so, the @dispatch function is used to determine * where to dispatch the call. The collected #GDBusInterfaceVTable and * #gpointer will be used to call into the interface vtable for processing * the request. * * All calls into user-provided code will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this method from. * * If an existing subtree is already registered at @object_path or * then @error is set to #G_IO_ERROR_EXISTS. * * Note that it is valid to register regular objects (using * g_dbus_connection_register_object()) in a subtree registered with * g_dbus_connection_register_subtree() - if so, the subtree handler * is tried as the last resort. One way to think about a subtree * handler is to consider it a fallback handler for object paths not * registered via g_dbus_connection_register_object() or other bindings. * * Note that @vtable will be copied so you cannot change it after * registration. * * See this [server][gdbus-subtree-server] for an example of how to use * this method. * * Params: * objectPath = the object path to register the subtree at * vtable = a #GDBusSubtreeVTable to enumerate, introspect and * dispatch nodes in the subtree * flags = flags used to fine tune the behavior of the subtree * userData = data to pass to functions in @vtable * userDataFreeFunc = function to call when the subtree is unregistered * * Returns: 0 if @error is set, otherwise a subtree registration id (never 0) * that can be used with g_dbus_connection_unregister_subtree() . * * Since: 2.26 * * Throws: GException on failure. */ public uint registerSubtree(string objectPath, GDBusSubtreeVTable* vtable, GDBusSubtreeFlags flags, void* userData, GDestroyNotify userDataFreeFunc) { GError* err = null; auto p = g_dbus_connection_register_subtree(gDBusConnection, Str.toStringz(objectPath), vtable, flags, userData, userDataFreeFunc, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Removes a filter. * * Note that since filters run in a different thread, there is a race * condition where it is possible that the filter will be running even * after calling g_dbus_connection_remove_filter(), so you cannot just * free data that the filter might be using. Instead, you should pass * a #GDestroyNotify to g_dbus_connection_add_filter(), which will be * called when it is guaranteed that the data is no longer needed. * * Params: * filterId = an identifier obtained from g_dbus_connection_add_filter() * * Since: 2.26 */ public void removeFilter(uint filterId) { g_dbus_connection_remove_filter(gDBusConnection, filterId); } /** * Asynchronously sends @message to the peer represented by @connection. * * Unless @flags contain the * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number * will be assigned by @connection and set on @message via * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the * serial number used will be written to this location prior to * submitting the message to the underlying transport. * * If @connection is closed then the operation will fail with * %G_IO_ERROR_CLOSED. If @message is not well-formed, * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT. * * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] * for an example of how to use this low-level API to send and receive * UNIX file descriptors. * * Note that @message must be unlocked, unless @flags contain the * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. * * Params: * message = a #GDBusMessage * flags = flags affecting how the message is sent * outSerial = return location for serial number assigned * to @message when sending it or %NULL * * Returns: %TRUE if the message was well-formed and queued for * transmission, %FALSE if @error is set * * Since: 2.26 * * Throws: GException on failure. */ public bool sendMessage(DBusMessage message, GDBusSendMessageFlags flags, out uint outSerial) { GError* err = null; auto p = g_dbus_connection_send_message(gDBusConnection, (message is null) ? null : message.getDBusMessageStruct(), flags, &outSerial, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously sends @message to the peer represented by @connection. * * Unless @flags contain the * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number * will be assigned by @connection and set on @message via * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the * serial number used will be written to this location prior to * submitting the message to the underlying transport. * * If @connection is closed then the operation will fail with * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed, * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT. * * This is an asynchronous method. When the operation is finished, @callback * will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this method from. You can then call * g_dbus_connection_send_message_with_reply_finish() to get the result of the operation. * See g_dbus_connection_send_message_with_reply_sync() for the synchronous version. * * Note that @message must be unlocked, unless @flags contain the * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. * * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] * for an example of how to use this low-level API to send and receive * UNIX file descriptors. * * Params: * message = a #GDBusMessage * flags = flags affecting how the message is sent * timeoutMsec = the timeout in milliseconds, -1 to use the default * timeout or %G_MAXINT for no timeout * outSerial = return location for serial number assigned * to @message when sending it or %NULL * cancellable = a #GCancellable or %NULL * callback = a #GAsyncReadyCallback to call when the request * is satisfied or %NULL if you don't care about the result * userData = The data to pass to @callback * * Since: 2.26 */ public void sendMessageWithReply(DBusMessage message, GDBusSendMessageFlags flags, int timeoutMsec, out uint outSerial, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_connection_send_message_with_reply(gDBusConnection, (message is null) ? null : message.getDBusMessageStruct(), flags, timeoutMsec, &outSerial, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_dbus_connection_send_message_with_reply(). * * Note that @error is only set if a local in-process error * occurred. That is to say that the returned #GDBusMessage object may * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use * g_dbus_message_to_gerror() to transcode this to a #GError. * * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] * for an example of how to use this low-level API to send and receive * UNIX file descriptors. * * Params: * res = a #GAsyncResult obtained from the #GAsyncReadyCallback passed to * g_dbus_connection_send_message_with_reply() * * Returns: a locked #GDBusMessage or %NULL if @error is set * * Since: 2.26 * * Throws: GException on failure. */ public DBusMessage sendMessageWithReplyFinish(AsyncResultIF res) { GError* err = null; auto p = g_dbus_connection_send_message_with_reply_finish(gDBusConnection, (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(DBusMessage)(cast(GDBusMessage*) p, true); } /** * Synchronously sends @message to the peer represented by @connection * and blocks the calling thread until a reply is received or the * timeout is reached. See g_dbus_connection_send_message_with_reply() * for the asynchronous version of this method. * * Unless @flags contain the * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number * will be assigned by @connection and set on @message via * g_dbus_message_set_serial(). If @out_serial is not %NULL, then the * serial number used will be written to this location prior to * submitting the message to the underlying transport. * * If @connection is closed then the operation will fail with * %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will * fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed, * the operation fails with %G_IO_ERROR_INVALID_ARGUMENT. * * Note that @error is only set if a local in-process error * occurred. That is to say that the returned #GDBusMessage object may * be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use * g_dbus_message_to_gerror() to transcode this to a #GError. * * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] * for an example of how to use this low-level API to send and receive * UNIX file descriptors. * * Note that @message must be unlocked, unless @flags contain the * %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag. * * Params: * message = a #GDBusMessage * flags = flags affecting how the message is sent. * timeoutMsec = the timeout in milliseconds, -1 to use the default * timeout or %G_MAXINT for no timeout * outSerial = return location for serial number * assigned to @message when sending it or %NULL * cancellable = a #GCancellable or %NULL * * Returns: a locked #GDBusMessage that is the reply * to @message or %NULL if @error is set * * Since: 2.26 * * Throws: GException on failure. */ public DBusMessage sendMessageWithReplySync(DBusMessage message, GDBusSendMessageFlags flags, int timeoutMsec, out uint outSerial, Cancellable cancellable) { GError* err = null; auto p = g_dbus_connection_send_message_with_reply_sync(gDBusConnection, (message is null) ? null : message.getDBusMessageStruct(), flags, timeoutMsec, &outSerial, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(DBusMessage)(cast(GDBusMessage*) p, true); } /** * Sets whether the process should be terminated when @connection is * closed by the remote peer. See #GDBusConnection:exit-on-close for * more details. * * Note that this function should be used with care. Most modern UNIX * desktops tie the notion of a user session the session bus, and expect * all of a users applications to quit when their bus connection goes away. * If you are setting @exit_on_close to %FALSE for the shared session * bus connection, you should make sure that your application exits * when the user session ends. * * Params: * exitOnClose = whether the process should be terminated * when @connection is closed by the remote peer * * Since: 2.26 */ public void setExitOnClose(bool exitOnClose) { g_dbus_connection_set_exit_on_close(gDBusConnection, exitOnClose); } /** * Subscribes to signals on @connection and invokes @callback with a whenever * the signal is received. Note that @callback will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this method from. * * If @connection is not a message bus connection, @sender must be * %NULL. * * If @sender is a well-known name note that @callback is invoked with * the unique name for the owner of @sender, not the well-known name * as one would expect. This is because the message bus rewrites the * name. As such, to avoid certain race conditions, users should be * tracking the name owner of the well-known name and use that when * processing the received signal. * * If one of %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE or * %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH are given, @arg0 is * interpreted as part of a namespace or path. The first argument * of a signal is matched against that part as specified by D-Bus. * * If @user_data_free_func is non-%NULL, it will be called (in the * thread-default main context of the thread you are calling this * method from) at some point after @user_data is no longer * needed. (It is not guaranteed to be called synchronously when the * signal is unsubscribed from, and may be called after @connection * has been destroyed.) * * Params: * sender = sender name to match on (unique or well-known name) * or %NULL to listen from all senders * interfaceName = D-Bus interface name to match on or %NULL to * match on all interfaces * member = D-Bus signal name to match on or %NULL to match on * all signals * objectPath = object path to match on or %NULL to match on * all object paths * arg0 = contents of first string argument to match on or %NULL * to match on all kinds of arguments * flags = #GDBusSignalFlags describing how arg0 is used in subscribing to the * signal * callback = callback to invoke when there is a signal matching the requested data * userData = user data to pass to @callback * userDataFreeFunc = function to free @user_data with when * subscription is removed or %NULL * * Returns: a subscription identifier that can be used with g_dbus_connection_signal_unsubscribe() * * Since: 2.26 */ public uint signalSubscribe(string sender, string interfaceName, string member, string objectPath, string arg0, GDBusSignalFlags flags, GDBusSignalCallback callback, void* userData, GDestroyNotify userDataFreeFunc) { return g_dbus_connection_signal_subscribe(gDBusConnection, Str.toStringz(sender), Str.toStringz(interfaceName), Str.toStringz(member), Str.toStringz(objectPath), Str.toStringz(arg0), flags, callback, userData, userDataFreeFunc); } /** * Unsubscribes from signals. * * Params: * subscriptionId = a subscription id obtained from * g_dbus_connection_signal_subscribe() * * Since: 2.26 */ public void signalUnsubscribe(uint subscriptionId) { g_dbus_connection_signal_unsubscribe(gDBusConnection, subscriptionId); } /** * If @connection was created with * %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method * starts processing messages. Does nothing on if @connection wasn't * created with this flag or if the method has already been called. * * Since: 2.26 */ public void startMessageProcessing() { g_dbus_connection_start_message_processing(gDBusConnection); } /** * Reverses the effect of a previous call to * g_dbus_connection_export_action_group(). * * It is an error to call this function with an ID that wasn't returned * from g_dbus_connection_export_action_group() or to call it with the * same ID more than once. * * Params: * exportId = the ID from g_dbus_connection_export_action_group() * * Since: 2.32 */ public void unexportActionGroup(uint exportId) { g_dbus_connection_unexport_action_group(gDBusConnection, exportId); } /** * Reverses the effect of a previous call to * g_dbus_connection_export_menu_model(). * * It is an error to call this function with an ID that wasn't returned * from g_dbus_connection_export_menu_model() or to call it with the * same ID more than once. * * Params: * exportId = the ID from g_dbus_connection_export_menu_model() * * Since: 2.32 */ public void unexportMenuModel(uint exportId) { g_dbus_connection_unexport_menu_model(gDBusConnection, exportId); } /** * Unregisters an object. * * Params: * registrationId = a registration id obtained from * g_dbus_connection_register_object() * * Returns: %TRUE if the object was unregistered, %FALSE otherwise * * Since: 2.26 */ public bool unregisterObject(uint registrationId) { return g_dbus_connection_unregister_object(gDBusConnection, registrationId) != 0; } /** * Unregisters a subtree. * * Params: * registrationId = a subtree registration id obtained from * g_dbus_connection_register_subtree() * * Returns: %TRUE if the subtree was unregistered, %FALSE otherwise * * Since: 2.26 */ public bool unregisterSubtree(uint registrationId) { return g_dbus_connection_unregister_subtree(gDBusConnection, registrationId) != 0; } protected class OnClosedDelegateWrapper { void delegate(bool, ErrorG, DBusConnection) dlg; gulong handlerId; this(void delegate(bool, ErrorG, DBusConnection) dlg) { this.dlg = dlg; onClosedListeners ~= this; } void remove(OnClosedDelegateWrapper source) { foreach(index, wrapper; onClosedListeners) { if (wrapper.handlerId == source.handlerId) { onClosedListeners[index] = null; onClosedListeners = std.algorithm.remove(onClosedListeners, index); break; } } } } OnClosedDelegateWrapper[] onClosedListeners; /** * Emitted when the connection is closed. * * The cause of this event can be * * - If g_dbus_connection_close() is called. In this case * @remote_peer_vanished is set to %FALSE and @error is %NULL. * * - If the remote peer closes the connection. In this case * @remote_peer_vanished is set to %TRUE and @error is set. * * - If the remote peer sends invalid or malformed data. In this * case @remote_peer_vanished is set to %FALSE and @error is set. * * Upon receiving this signal, you should give up your reference to * @connection. You are guaranteed that this signal is emitted only * once. * * Params: * remotePeerVanished = %TRUE if @connection is closed because the * remote peer closed its end of the connection * error = a #GError with more details about the event or %NULL * * Since: 2.26 */ gulong addOnClosed(void delegate(bool, ErrorG, DBusConnection) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnClosedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "closed", cast(GCallback)&callBackClosed, cast(void*)wrapper, cast(GClosureNotify)&callBackClosedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackClosed(GDBusConnection* dbusconnectionStruct, bool remotePeerVanished, GError* error, OnClosedDelegateWrapper wrapper) { wrapper.dlg(remotePeerVanished, new ErrorG(error), wrapper.outer); } extern(C) static void callBackClosedDestroy(OnClosedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** * Asynchronously connects to the message bus specified by @bus_type. * * When the operation is finished, @callback will be invoked. You can * then call g_bus_get_finish() to get the result of the operation. * * This is a asynchronous failable function. See g_bus_get_sync() for * the synchronous version. * * Params: * busType = a #GBusType * cancellable = a #GCancellable or %NULL * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to @callback * * Since: 2.26 */ public static void get(GBusType busType, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_bus_get(busType, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_bus_get(). * * The returned object is a singleton, that is, shared with other * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the * event that you need a private message bus connection, use * g_dbus_address_get_for_bus_sync() and * g_dbus_connection_new_for_address(). * * Note that the returned #GDBusConnection object will (usually) have * the #GDBusConnection:exit-on-close property set to %TRUE. * * Params: * res = a #GAsyncResult obtained from the #GAsyncReadyCallback passed * to g_bus_get() * * Returns: a #GDBusConnection or %NULL if @error is set. * Free with g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. */ public static DBusConnection getFinish(AsyncResultIF res) { GError* err = null; auto p = g_bus_get_finish((res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p, true); } /** * Synchronously connects to the message bus specified by @bus_type. * Note that the returned object may shared with other callers, * e.g. if two separate parts of a process calls this function with * the same @bus_type, they will share the same object. * * This is a synchronous failable function. See g_bus_get() and * g_bus_get_finish() for the asynchronous version. * * The returned object is a singleton, that is, shared with other * callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the * event that you need a private message bus connection, use * g_dbus_address_get_for_bus_sync() and * g_dbus_connection_new_for_address(). * * Note that the returned #GDBusConnection object will (usually) have * the #GDBusConnection:exit-on-close property set to %TRUE. * * Params: * busType = a #GBusType * cancellable = a #GCancellable or %NULL * * Returns: a #GDBusConnection or %NULL if @error is set. * Free with g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. */ public static DBusConnection getSync(GBusType busType, Cancellable cancellable) { GError* err = null; auto p = g_bus_get_sync(busType, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/DBusError.d000066400000000000000000000167641324604450400200600ustar00rootroot00000000000000/* * 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 gio.DBusError; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.Str; public import gtkc.giotypes; /** */ public struct DBusError { /** * Creates a D-Bus error name to use for @error. If @error matches * a registered error (cf. g_dbus_error_register_error()), the corresponding * D-Bus error name will be returned. * * Otherwise the a name of the form * `org.gtk.GDBus.UnmappedGError.Quark._ESCAPED_QUARK_NAME.Code_ERROR_CODE` * will be used. This allows other GDBus applications to map the error * on the wire back to a #GError using g_dbus_error_new_for_dbus_error(). * * This function is typically only used in object mappings to put a * #GError on the wire. Regular applications should not use it. * * Params: * error = A #GError. * * Returns: A D-Bus error name (never %NULL). Free with g_free(). * * Since: 2.26 */ public static string encodeGerror(ErrorG error) { auto retStr = g_dbus_error_encode_gerror((error is null) ? null : error.getErrorGStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the D-Bus error name used for @error, if any. * * This function is guaranteed to return a D-Bus error name for all * #GErrors returned from functions handling remote method calls * (e.g. g_dbus_connection_call_finish()) unless * g_dbus_error_strip_remote_error() has been used on @error. * * Params: * error = a #GError * * Returns: an allocated string or %NULL if the D-Bus error name * could not be found. Free with g_free(). * * Since: 2.26 */ public static string getRemoteError(ErrorG error) { auto retStr = g_dbus_error_get_remote_error((error is null) ? null : error.getErrorGStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Checks if @error represents an error received via D-Bus from a remote peer. If so, * use g_dbus_error_get_remote_error() to get the name of the error. * * Params: * error = A #GError. * * Returns: %TRUE if @error represents an error from a remote peer, * %FALSE otherwise. * * Since: 2.26 */ public static bool isRemoteError(ErrorG error) { return g_dbus_error_is_remote_error((error is null) ? null : error.getErrorGStruct()) != 0; } /** * Creates a #GError based on the contents of @dbus_error_name and * @dbus_error_message. * * Errors registered with g_dbus_error_register_error() will be looked * up using @dbus_error_name and if a match is found, the error domain * and code is used. Applications can use g_dbus_error_get_remote_error() * to recover @dbus_error_name. * * If a match against a registered error is not found and the D-Bus * error name is in a form as returned by g_dbus_error_encode_gerror() * the error domain and code encoded in the name is used to * create the #GError. Also, @dbus_error_name is added to the error message * such that it can be recovered with g_dbus_error_get_remote_error(). * * Otherwise, a #GError with the error code %G_IO_ERROR_DBUS_ERROR * in the #G_IO_ERROR error domain is returned. Also, @dbus_error_name is * added to the error message such that it can be recovered with * g_dbus_error_get_remote_error(). * * In all three cases, @dbus_error_name can always be recovered from the * returned #GError using the g_dbus_error_get_remote_error() function * (unless g_dbus_error_strip_remote_error() hasn't been used on the returned error). * * This function is typically only used in object mappings to prepare * #GError instances for applications. Regular applications should not use * it. * * Params: * dbusErrorName = D-Bus error name. * dbusErrorMessage = D-Bus error message. * * Returns: An allocated #GError. Free with g_error_free(). * * Since: 2.26 */ public static ErrorG newForDbusError(string dbusErrorName, string dbusErrorMessage) { auto p = g_dbus_error_new_for_dbus_error(Str.toStringz(dbusErrorName), Str.toStringz(dbusErrorMessage)); if(p is null) { return null; } return new ErrorG(cast(GError*) p, true); } /** */ public static GQuark quark() { return g_dbus_error_quark(); } /** * Creates an association to map between @dbus_error_name and * #GErrors specified by @error_domain and @error_code. * * This is typically done in the routine that returns the #GQuark for * an error domain. * * Params: * errorDomain = A #GQuark for a error domain. * errorCode = An error code. * dbusErrorName = A D-Bus error name. * * Returns: %TRUE if the association was created, %FALSE if it already * exists. * * Since: 2.26 */ public static bool registerError(GQuark errorDomain, int errorCode, string dbusErrorName) { return g_dbus_error_register_error(errorDomain, errorCode, Str.toStringz(dbusErrorName)) != 0; } /** * Helper function for associating a #GError error domain with D-Bus error names. * * Params: * errorDomainQuarkName = The error domain name. * quarkVolatile = A pointer where to store the #GQuark. * entries = A pointer to @num_entries #GDBusErrorEntry struct items. * numEntries = Number of items to register. * * Since: 2.26 */ public static void registerErrorDomain(string errorDomainQuarkName, size_t* quarkVolatile, GDBusErrorEntry* entries, uint numEntries) { g_dbus_error_register_error_domain(Str.toStringz(errorDomainQuarkName), quarkVolatile, entries, numEntries); } /** * Looks for extra information in the error message used to recover * the D-Bus error name and strips it if found. If stripped, the * message field in @error will correspond exactly to what was * received on the wire. * * This is typically used when presenting errors to the end user. * * Params: * error = A #GError. * * Returns: %TRUE if information was stripped, %FALSE otherwise. * * Since: 2.26 */ public static bool stripRemoteError(ErrorG error) { return g_dbus_error_strip_remote_error((error is null) ? null : error.getErrorGStruct()) != 0; } /** * Destroys an association previously set up with g_dbus_error_register_error(). * * Params: * errorDomain = A #GQuark for a error domain. * errorCode = An error code. * dbusErrorName = A D-Bus error name. * * Returns: %TRUE if the association was destroyed, %FALSE if it wasn't found. * * Since: 2.26 */ public static bool unregisterError(GQuark errorDomain, int errorCode, string dbusErrorName) { return g_dbus_error_unregister_error(errorDomain, errorCode, Str.toStringz(dbusErrorName)) != 0; } } GtkD-3.7.5/generated/gtkd/gio/DBusInterfaceIF.d000066400000000000000000000054241324604450400210750ustar00rootroot00000000000000/* * 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 gio.DBusInterfaceIF; private import gio.DBusInterfaceInfo; private import gio.DBusObjectIF; private import gio.c.functions; public import gio.c.types; private import gobject.ObjectG; public import gtkc.giotypes; /** * The #GDBusInterface type is the base type for D-Bus interfaces both * on the service side (see #GDBusInterfaceSkeleton) and client side * (see #GDBusProxy). * * Since: 2.30 */ public interface DBusInterfaceIF{ /** Get the main Gtk struct */ public GDBusInterface* getDBusInterfaceStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_dbus_interface_get_type(); } /** * Gets the #GDBusObject that @interface_ belongs to, if any. * * Returns: A #GDBusObject or %NULL. The returned * reference should be freed with g_object_unref(). * * Since: 2.32 */ public DBusObjectIF dupObject(); /** * Gets D-Bus introspection information for the D-Bus interface * implemented by @interface_. * * Returns: A #GDBusInterfaceInfo. Do not free. * * Since: 2.30 */ public DBusInterfaceInfo getInfo(); /** * Gets the #GDBusObject that @interface_ belongs to, if any. * * It is not safe to use the returned object if @interface_ or * the returned object is being used from other threads. See * g_dbus_interface_dup_object() for a thread-safe alternative. * * Returns: A #GDBusObject or %NULL. The returned * reference belongs to @interface_ and should not be freed. * * Since: 2.30 */ public DBusObjectIF getObject(); /** * Sets the #GDBusObject for @interface_ to @object. * * Note that @interface_ will hold a weak reference to @object. * * Params: * object = A #GDBusObject or %NULL. * * Since: 2.30 */ public void setObject(DBusObjectIF object); } GtkD-3.7.5/generated/gtkd/gio/DBusInterfaceInfo.d000066400000000000000000000232731324604450400214740ustar00rootroot00000000000000/* * 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 gio.DBusInterfaceInfo; private import gio.DBusAnnotationInfo; private import gio.DBusMethodInfo; private import gio.DBusPropertyInfo; private import gio.DBusSignalInfo; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.StringG; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Information about a D-Bus interface. * * Since: 2.26 */ public final class DBusInterfaceInfo { /** the main Gtk struct */ protected GDBusInterfaceInfo* gDBusInterfaceInfo; protected bool ownedRef; /** Get the main Gtk struct */ public GDBusInterfaceInfo* getDBusInterfaceInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusInterfaceInfo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDBusInterfaceInfo; } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusInterfaceInfo* gDBusInterfaceInfo, bool ownedRef = false) { this.gDBusInterfaceInfo = gDBusInterfaceInfo; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_dbus_interface_info_unref(gDBusInterfaceInfo); } /** * The reference count or -1 if statically allocated. */ public @property int refCount() { return gDBusInterfaceInfo.refCount; } /** Ditto */ public @property void refCount(int value) { gDBusInterfaceInfo.refCount = value; } /** * The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties". */ public @property string name() { return Str.toString(gDBusInterfaceInfo.name); } /** Ditto */ public @property void name(string value) { gDBusInterfaceInfo.name = Str.toStringz(value); } /** * A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods. */ public @property DBusMethodInfo[] methods() { DBusMethodInfo[] arr = new DBusMethodInfo[getArrayLength(gDBusInterfaceInfo.methods)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusMethodInfo)(gDBusInterfaceInfo.methods[i], false); } return arr; } /** Ditto */ public @property void methods(DBusMethodInfo[] value) { GDBusMethodInfo*[] arr = new GDBusMethodInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusMethodInfoStruct(); } arr[value.length] = null; gDBusInterfaceInfo.methods = arr.ptr; } /** * A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals. */ public @property DBusSignalInfo[] signals() { DBusSignalInfo[] arr = new DBusSignalInfo[getArrayLength(gDBusInterfaceInfo.signals)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusSignalInfo)(gDBusInterfaceInfo.signals[i], false); } return arr; } /** Ditto */ public @property void signals(DBusSignalInfo[] value) { GDBusSignalInfo*[] arr = new GDBusSignalInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusSignalInfoStruct(); } arr[value.length] = null; gDBusInterfaceInfo.signals = arr.ptr; } /** * A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties. */ public @property DBusPropertyInfo[] properties() { DBusPropertyInfo[] arr = new DBusPropertyInfo[getArrayLength(gDBusInterfaceInfo.properties)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusPropertyInfo)(gDBusInterfaceInfo.properties[i], false); } return arr; } /** Ditto */ public @property void properties(DBusPropertyInfo[] value) { GDBusPropertyInfo*[] arr = new GDBusPropertyInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusPropertyInfoStruct(); } arr[value.length] = null; gDBusInterfaceInfo.properties = arr.ptr; } /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ public @property DBusAnnotationInfo[] annotations() { DBusAnnotationInfo[] arr = new DBusAnnotationInfo[getArrayLength(gDBusInterfaceInfo.annotations)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusAnnotationInfo)(gDBusInterfaceInfo.annotations[i], false); } return arr; } /** Ditto */ public @property void annotations(DBusAnnotationInfo[] value) { GDBusAnnotationInfo*[] arr = new GDBusAnnotationInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusAnnotationInfoStruct(); } arr[value.length] = null; gDBusInterfaceInfo.annotations = arr.ptr; } /** */ public static GType getType() { return g_dbus_interface_info_get_type(); } /** * Builds a lookup-cache to speed up * g_dbus_interface_info_lookup_method(), * g_dbus_interface_info_lookup_signal() and * g_dbus_interface_info_lookup_property(). * * If this has already been called with @info, the existing cache is * used and its use count is increased. * * Note that @info cannot be modified until * g_dbus_interface_info_cache_release() is called. * * Since: 2.30 */ public void cacheBuild() { g_dbus_interface_info_cache_build(gDBusInterfaceInfo); } /** * Decrements the usage count for the cache for @info built by * g_dbus_interface_info_cache_build() (if any) and frees the * resources used by the cache if the usage count drops to zero. * * Since: 2.30 */ public void cacheRelease() { g_dbus_interface_info_cache_release(gDBusInterfaceInfo); } /** * Appends an XML representation of @info (and its children) to @string_builder. * * This function is typically used for generating introspection XML * documents at run-time for handling the * `org.freedesktop.DBus.Introspectable.Introspect` * method. * * Params: * indent = Indentation level. * stringBuilder = A #GString to to append XML data to. * * Since: 2.26 */ public void generateXml(uint indent, StringG stringBuilder) { g_dbus_interface_info_generate_xml(gDBusInterfaceInfo, indent, (stringBuilder is null) ? null : stringBuilder.getStringGStruct()); } /** * Looks up information about a method. * * The cost of this function is O(n) in number of methods unless * g_dbus_interface_info_cache_build() has been used on @info. * * Params: * name = A D-Bus method name (typically in CamelCase) * * Returns: A #GDBusMethodInfo or %NULL if not found. Do not free, it is owned by @info. * * Since: 2.26 */ public DBusMethodInfo lookupMethod(string name) { auto p = g_dbus_interface_info_lookup_method(gDBusInterfaceInfo, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(DBusMethodInfo)(cast(GDBusMethodInfo*) p); } /** * Looks up information about a property. * * The cost of this function is O(n) in number of properties unless * g_dbus_interface_info_cache_build() has been used on @info. * * Params: * name = A D-Bus property name (typically in CamelCase). * * Returns: A #GDBusPropertyInfo or %NULL if not found. Do not free, it is owned by @info. * * Since: 2.26 */ public DBusPropertyInfo lookupProperty(string name) { auto p = g_dbus_interface_info_lookup_property(gDBusInterfaceInfo, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(DBusPropertyInfo)(cast(GDBusPropertyInfo*) p); } /** * Looks up information about a signal. * * The cost of this function is O(n) in number of signals unless * g_dbus_interface_info_cache_build() has been used on @info. * * Params: * name = A D-Bus signal name (typically in CamelCase) * * Returns: A #GDBusSignalInfo or %NULL if not found. Do not free, it is owned by @info. * * Since: 2.26 */ public DBusSignalInfo lookupSignal(string name) { auto p = g_dbus_interface_info_lookup_signal(gDBusInterfaceInfo, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(DBusSignalInfo)(cast(GDBusSignalInfo*) p); } /** * If @info is statically allocated does nothing. Otherwise increases * the reference count. * * Returns: The same @info. * * Since: 2.26 */ public DBusInterfaceInfo doref() { auto p = g_dbus_interface_info_ref(gDBusInterfaceInfo); if(p is null) { return null; } return ObjectG.getDObject!(DBusInterfaceInfo)(cast(GDBusInterfaceInfo*) p, true); } /** * If @info is statically allocated, does nothing. Otherwise decreases * the reference count of @info. When its reference count drops to 0, * the memory used is freed. * * Since: 2.26 */ public void unref() { g_dbus_interface_info_unref(gDBusInterfaceInfo); } } GtkD-3.7.5/generated/gtkd/gio/DBusInterfaceSkeleton.d000066400000000000000000000275701324604450400223710ustar00rootroot00000000000000/* * 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 gio.DBusInterfaceSkeleton; private import gio.DBusConnection; private import gio.DBusInterfaceIF; private import gio.DBusInterfaceInfo; private import gio.DBusInterfaceT; private import gio.DBusMethodInvocation; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * Abstract base class for D-Bus interfaces on the service side. * * Since: 2.30 */ public class DBusInterfaceSkeleton : ObjectG, DBusInterfaceIF { /** the main Gtk struct */ protected GDBusInterfaceSkeleton* gDBusInterfaceSkeleton; /** Get the main Gtk struct */ public GDBusInterfaceSkeleton* getDBusInterfaceSkeletonStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusInterfaceSkeleton; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusInterfaceSkeleton; } protected override void setStruct(GObject* obj) { gDBusInterfaceSkeleton = cast(GDBusInterfaceSkeleton*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusInterfaceSkeleton* gDBusInterfaceSkeleton, bool ownedRef = false) { this.gDBusInterfaceSkeleton = gDBusInterfaceSkeleton; super(cast(GObject*)gDBusInterfaceSkeleton, ownedRef); } // add the DBusInterface capabilities mixin DBusInterfaceT!(GDBusInterfaceSkeleton); /** */ public static GType getType() { return g_dbus_interface_skeleton_get_type(); } /** * Exports @interface_ at @object_path on @connection. * * This can be called multiple times to export the same @interface_ * onto multiple connections however the @object_path provided must be * the same for all connections. * * Use g_dbus_interface_skeleton_unexport() to unexport the object. * * Params: * connection = A #GDBusConnection to export @interface_ on. * objectPath = The path to export the interface at. * * Returns: %TRUE if the interface was exported on @connection, otherwise %FALSE with * @error set. * * Since: 2.30 * * Throws: GException on failure. */ public bool expor(DBusConnection connection, string objectPath) { GError* err = null; auto p = g_dbus_interface_skeleton_export(gDBusInterfaceSkeleton, (connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(objectPath), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * If @interface_ has outstanding changes, request for these changes to be * emitted immediately. * * For example, an exported D-Bus interface may queue up property * changes and emit the * `org.freedesktop.DBus.Properties::PropertiesChanged` * signal later (e.g. in an idle handler). This technique is useful * for collapsing multiple property changes into one. * * Since: 2.30 */ public void flush() { g_dbus_interface_skeleton_flush(gDBusInterfaceSkeleton); } /** * Gets the first connection that @interface_ is exported on, if any. * * Returns: A #GDBusConnection or %NULL if @interface_ is * not exported anywhere. Do not free, the object belongs to @interface_. * * Since: 2.30 */ public DBusConnection getConnection() { auto p = g_dbus_interface_skeleton_get_connection(gDBusInterfaceSkeleton); if(p is null) { return null; } return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p); } /** * Gets a list of the connections that @interface_ is exported on. * * Returns: A list of * all the connections that @interface_ is exported on. The returned * list should be freed with g_list_free() after each element has * been freed with g_object_unref(). * * Since: 2.32 */ public ListG getConnections() { auto p = g_dbus_interface_skeleton_get_connections(gDBusInterfaceSkeleton); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Gets the #GDBusInterfaceSkeletonFlags that describes what the behavior * of @interface_ * * Returns: One or more flags from the #GDBusInterfaceSkeletonFlags enumeration. * * Since: 2.30 */ public GDBusInterfaceSkeletonFlags getFlags() { return g_dbus_interface_skeleton_get_flags(gDBusInterfaceSkeleton); } /** * Gets D-Bus introspection information for the D-Bus interface * implemented by @interface_. * * Returns: A #GDBusInterfaceInfo (never %NULL). Do not free. * * Since: 2.30 */ public DBusInterfaceInfo getInfo() { auto p = g_dbus_interface_skeleton_get_info(gDBusInterfaceSkeleton); if(p is null) { return null; } return ObjectG.getDObject!(DBusInterfaceInfo)(cast(GDBusInterfaceInfo*) p); } /** * Gets the object path that @interface_ is exported on, if any. * * Returns: A string owned by @interface_ or %NULL if @interface_ is not exported * anywhere. Do not free, the string belongs to @interface_. * * Since: 2.30 */ public string getObjectPath() { return Str.toString(g_dbus_interface_skeleton_get_object_path(gDBusInterfaceSkeleton)); } /** * Gets all D-Bus properties for @interface_. * * Returns: A #GVariant of type * ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. * Free with g_variant_unref(). * * Since: 2.30 */ public Variant getProperties() { auto p = g_dbus_interface_skeleton_get_properties(gDBusInterfaceSkeleton); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets the interface vtable for the D-Bus interface implemented by * @interface_. The returned function pointers should expect @interface_ * itself to be passed as @user_data. * * Returns: A #GDBusInterfaceVTable (never %NULL). * * Since: 2.30 */ public GDBusInterfaceVTable* getVtable() { return g_dbus_interface_skeleton_get_vtable(gDBusInterfaceSkeleton); } /** * Checks if @interface_ is exported on @connection. * * Params: * connection = A #GDBusConnection. * * Returns: %TRUE if @interface_ is exported on @connection, %FALSE otherwise. * * Since: 2.32 */ public bool hasConnection(DBusConnection connection) { return g_dbus_interface_skeleton_has_connection(gDBusInterfaceSkeleton, (connection is null) ? null : connection.getDBusConnectionStruct()) != 0; } /** * Sets flags describing what the behavior of @skeleton should be. * * Params: * flags = Flags from the #GDBusInterfaceSkeletonFlags enumeration. * * Since: 2.30 */ public void setFlags(GDBusInterfaceSkeletonFlags flags) { g_dbus_interface_skeleton_set_flags(gDBusInterfaceSkeleton, flags); } /** * Stops exporting @interface_ on all connections it is exported on. * * To unexport @interface_ from only a single connection, use * g_dbus_interface_skeleton_unexport_from_connection() * * Since: 2.30 */ public void unexport() { g_dbus_interface_skeleton_unexport(gDBusInterfaceSkeleton); } /** * Stops exporting @interface_ on @connection. * * To stop exporting on all connections the interface is exported on, * use g_dbus_interface_skeleton_unexport(). * * Params: * connection = A #GDBusConnection. * * Since: 2.32 */ public void unexportFromConnection(DBusConnection connection) { g_dbus_interface_skeleton_unexport_from_connection(gDBusInterfaceSkeleton, (connection is null) ? null : connection.getDBusConnectionStruct()); } protected class OnGAuthorizeMethodDelegateWrapper { bool delegate(DBusMethodInvocation, DBusInterfaceSkeleton) dlg; gulong handlerId; this(bool delegate(DBusMethodInvocation, DBusInterfaceSkeleton) dlg) { this.dlg = dlg; onGAuthorizeMethodListeners ~= this; } void remove(OnGAuthorizeMethodDelegateWrapper source) { foreach(index, wrapper; onGAuthorizeMethodListeners) { if (wrapper.handlerId == source.handlerId) { onGAuthorizeMethodListeners[index] = null; onGAuthorizeMethodListeners = std.algorithm.remove(onGAuthorizeMethodListeners, index); break; } } } } OnGAuthorizeMethodDelegateWrapper[] onGAuthorizeMethodListeners; /** * Emitted when a method is invoked by a remote caller and used to * determine if the method call is authorized. * * Note that this signal is emitted in a thread dedicated to * handling the method call so handlers are allowed to perform * blocking IO. This means that it is appropriate to call e.g. * [polkit_authority_check_authorization_sync()](http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#polkit-authority-check-authorization-sync) * with the * [POLKIT_CHECK_AUTHORIZATION_FLAGS_ALLOW_USER_INTERACTION](http://hal.freedesktop.org/docs/polkit/PolkitAuthority.html#POLKIT-CHECK-AUTHORIZATION-FLAGS-ALLOW-USER-INTERACTION:CAPS) * flag set. * * If %FALSE is returned then no further handlers are run and the * signal handler must take a reference to @invocation and finish * handling the call (e.g. return an error via * g_dbus_method_invocation_return_error()). * * Otherwise, if %TRUE is returned, signal emission continues. If no * handlers return %FALSE, then the method is dispatched. If * @interface has an enclosing #GDBusObjectSkeleton, then the * #GDBusObjectSkeleton::authorize-method signal handlers run before * the handlers for this signal. * * The default class handler just returns %TRUE. * * Please note that the common case is optimized: if no signals * handlers are connected and the default class handler isn't * overridden (for both @interface and the enclosing * #GDBusObjectSkeleton, if any) and #GDBusInterfaceSkeleton:g-flags does * not have the * %G_DBUS_INTERFACE_SKELETON_FLAGS_HANDLE_METHOD_INVOCATIONS_IN_THREAD * flags set, no dedicated thread is ever used and the call will be * handled in the same thread as the object that @interface belongs * to was exported in. * * Params: * invocation = A #GDBusMethodInvocation. * * Returns: %TRUE if the call is authorized, %FALSE otherwise. * * Since: 2.30 */ gulong addOnGAuthorizeMethod(bool delegate(DBusMethodInvocation, DBusInterfaceSkeleton) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnGAuthorizeMethodDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "g-authorize-method", cast(GCallback)&callBackGAuthorizeMethod, cast(void*)wrapper, cast(GClosureNotify)&callBackGAuthorizeMethodDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackGAuthorizeMethod(GDBusInterfaceSkeleton* dbusinterfaceskeletonStruct, GDBusMethodInvocation* invocation, OnGAuthorizeMethodDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(DBusMethodInvocation)(invocation), wrapper.outer); } extern(C) static void callBackGAuthorizeMethodDestroy(OnGAuthorizeMethodDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DBusInterfaceT.d000066400000000000000000000065761324604450400210130ustar00rootroot00000000000000/* * 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 gio.DBusInterfaceT; public import gio.DBusInterfaceInfo; public import gio.DBusObjectIF; public import gio.c.functions; public import gio.c.types; public import gobject.ObjectG; public import gtkc.giotypes; /** * The #GDBusInterface type is the base type for D-Bus interfaces both * on the service side (see #GDBusInterfaceSkeleton) and client side * (see #GDBusProxy). * * Since: 2.30 */ public template DBusInterfaceT(TStruct) { /** Get the main Gtk struct */ public GDBusInterface* getDBusInterfaceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GDBusInterface*)getStruct(); } /** * Gets the #GDBusObject that @interface_ belongs to, if any. * * Returns: A #GDBusObject or %NULL. The returned * reference should be freed with g_object_unref(). * * Since: 2.32 */ public DBusObjectIF dupObject() { auto p = g_dbus_interface_dup_object(getDBusInterfaceStruct()); if(p is null) { return null; } return ObjectG.getDObject!(DBusObjectIF)(cast(GDBusObject*) p, true); } /** * Gets D-Bus introspection information for the D-Bus interface * implemented by @interface_. * * Returns: A #GDBusInterfaceInfo. Do not free. * * Since: 2.30 */ public DBusInterfaceInfo getInfo() { auto p = g_dbus_interface_get_info(getDBusInterfaceStruct()); if(p is null) { return null; } return ObjectG.getDObject!(DBusInterfaceInfo)(cast(GDBusInterfaceInfo*) p); } /** * Gets the #GDBusObject that @interface_ belongs to, if any. * * It is not safe to use the returned object if @interface_ or * the returned object is being used from other threads. See * g_dbus_interface_dup_object() for a thread-safe alternative. * * Returns: A #GDBusObject or %NULL. The returned * reference belongs to @interface_ and should not be freed. * * Since: 2.30 */ public DBusObjectIF getObject() { auto p = g_dbus_interface_get_object(getDBusInterfaceStruct()); if(p is null) { return null; } return ObjectG.getDObject!(DBusObjectIF)(cast(GDBusObject*) p); } /** * Sets the #GDBusObject for @interface_ to @object. * * Note that @interface_ will hold a weak reference to @object. * * Params: * object = A #GDBusObject or %NULL. * * Since: 2.30 */ public void setObject(DBusObjectIF object) { g_dbus_interface_set_object(getDBusInterfaceStruct(), (object is null) ? null : object.getDBusObjectStruct()); } } GtkD-3.7.5/generated/gtkd/gio/DBusMenuModel.d000066400000000000000000000073761324604450400206530ustar00rootroot00000000000000/* * 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 gio.DBusMenuModel; private import gio.DBusConnection; private import gio.MenuModel; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GDBusMenuModel is an implementation of #GMenuModel that can be used * as a proxy for a menu model that is exported over D-Bus with * g_dbus_connection_export_menu_model(). */ public class DBusMenuModel : MenuModel { /** the main Gtk struct */ protected GDBusMenuModel* gDBusMenuModel; /** Get the main Gtk struct */ public GDBusMenuModel* getDBusMenuModelStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusMenuModel; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusMenuModel; } protected override void setStruct(GObject* obj) { gDBusMenuModel = cast(GDBusMenuModel*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusMenuModel* gDBusMenuModel, bool ownedRef = false) { this.gDBusMenuModel = gDBusMenuModel; super(cast(GMenuModel*)gDBusMenuModel, ownedRef); } /** * See_Also: get(). */ this(DBusConnection connection, string busName, string objectPath) { auto p = g_dbus_menu_model_get((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(busName), Str.toStringz(objectPath)); if(p is null) { throw new ConstructionException("null returned by g_dbus_menu_model_get"); } this(cast(GDBusMenuModel*) p, true); } /** */ /** */ public static GType getType() { return g_dbus_menu_model_get_type(); } /** * Obtains a #GDBusMenuModel for the menu model which is exported * at the given @bus_name and @object_path. * * The thread default main context is taken at the time of this call. * All signals on the menu model (and any linked models) are reported * with respect to this context. All calls on the returned menu model * (and linked models) must also originate from this same context, with * the thread default main context unchanged. * * Params: * connection = a #GDBusConnection * busName = the bus name which exports the menu model * objectPath = the object path at which the menu model is exported * * Returns: a #GDBusMenuModel object. Free with * g_object_unref(). * * Since: 2.32 */ public static DBusMenuModel get(DBusConnection connection, string busName, string objectPath) { auto p = g_dbus_menu_model_get((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(busName), Str.toStringz(objectPath)); if(p is null) { return null; } return ObjectG.getDObject!(DBusMenuModel)(cast(GDBusMenuModel*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/DBusMessage.d000066400000000000000000000517661324604450400203540ustar00rootroot00000000000000/* * 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 gio.DBusMessage; private import gio.UnixFDList; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; public import gtkc.giotypes; /** * A type for representing D-Bus messages that can be sent or received * on a #GDBusConnection. * * Since: 2.26 */ public class DBusMessage : ObjectG { /** the main Gtk struct */ protected GDBusMessage* gDBusMessage; /** Get the main Gtk struct */ public GDBusMessage* getDBusMessageStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusMessage; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusMessage; } protected override void setStruct(GObject* obj) { gDBusMessage = cast(GDBusMessage*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusMessage* gDBusMessage, bool ownedRef = false) { this.gDBusMessage = gDBusMessage; super(cast(GObject*)gDBusMessage, ownedRef); } /** */ public static GType getType() { return g_dbus_message_get_type(); } /** * Creates a new empty #GDBusMessage. * * Returns: A #GDBusMessage. Free with g_object_unref(). * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_dbus_message_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDBusMessage*) p, true); } /** * Creates a new #GDBusMessage from the data stored at @blob. The byte * order that the message was in can be retrieved using * g_dbus_message_get_byte_order(). * * Params: * blob = A blob represent a binary D-Bus message. * capabilities = A #GDBusCapabilityFlags describing what protocol features are supported. * * Returns: A new #GDBusMessage or %NULL if @error is set. Free with * g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(char[] blob, GDBusCapabilityFlags capabilities) { GError* err = null; auto p = g_dbus_message_new_from_blob(blob.ptr, cast(size_t)blob.length, capabilities, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_blob"); } this(cast(GDBusMessage*) p, true); } /** * Creates a new #GDBusMessage for a method call. * * Params: * name = A valid D-Bus name or %NULL. * path = A valid object path. * iface = A valid D-Bus interface name or %NULL. * method = A valid method name. * * Returns: A #GDBusMessage. Free with g_object_unref(). * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, string path, string iface, string method) { auto p = g_dbus_message_new_method_call(Str.toStringz(name), Str.toStringz(path), Str.toStringz(iface), Str.toStringz(method)); if(p is null) { throw new ConstructionException("null returned by new_method_call"); } this(cast(GDBusMessage*) p, true); } /** * Creates a new #GDBusMessage for a signal emission. * * Params: * path = A valid object path. * iface = A valid D-Bus interface name. * signal = A valid signal name. * * Returns: A #GDBusMessage. Free with g_object_unref(). * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string path, string iface, string signal) { auto p = g_dbus_message_new_signal(Str.toStringz(path), Str.toStringz(iface), Str.toStringz(signal)); if(p is null) { throw new ConstructionException("null returned by new_signal"); } this(cast(GDBusMessage*) p, true); } /** * Utility function to calculate how many bytes are needed to * completely deserialize the D-Bus message stored at @blob. * * Params: * blob = A blob represent a binary D-Bus message. * * Returns: Number of bytes needed or -1 if @error is set (e.g. if * @blob contains invalid data or not enough data is available to * determine the size). * * Since: 2.26 * * Throws: GException on failure. */ public static ptrdiff_t bytesNeeded(char[] blob) { GError* err = null; auto p = g_dbus_message_bytes_needed(blob.ptr, cast(size_t)blob.length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Copies @message. The copy is a deep copy and the returned * #GDBusMessage is completely identical except that it is guaranteed * to not be locked. * * This operation can fail if e.g. @message contains file descriptors * and the per-process or system-wide open files limit is reached. * * Returns: A new #GDBusMessage or %NULL if @error is set. * Free with g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. */ public DBusMessage copy() { GError* err = null; auto p = g_dbus_message_copy(gDBusMessage, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(DBusMessage)(cast(GDBusMessage*) p, true); } /** * Convenience to get the first item in the body of @message. * * Returns: The string item or %NULL if the first item in the body of * @message is not a string. * * Since: 2.26 */ public string getArg0() { return Str.toString(g_dbus_message_get_arg0(gDBusMessage)); } /** * Gets the body of a message. * * Returns: A #GVariant or %NULL if the body is * empty. Do not free, it is owned by @message. * * Since: 2.26 */ public Variant getBody() { auto p = g_dbus_message_get_body(gDBusMessage); if(p is null) { return null; } return new Variant(cast(GVariant*) p); } /** * Gets the byte order of @message. * * Returns: The byte order. */ public GDBusMessageByteOrder getByteOrder() { return g_dbus_message_get_byte_order(gDBusMessage); } /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field. * * Returns: The value. * * Since: 2.26 */ public string getDestination() { return Str.toString(g_dbus_message_get_destination(gDBusMessage)); } /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field. * * Returns: The value. * * Since: 2.26 */ public string getErrorName() { return Str.toString(g_dbus_message_get_error_name(gDBusMessage)); } /** * Gets the flags for @message. * * Returns: Flags that are set (typically values from the #GDBusMessageFlags enumeration bitwise ORed together). * * Since: 2.26 */ public GDBusMessageFlags getFlags() { return g_dbus_message_get_flags(gDBusMessage); } /** * Gets a header field on @message. * * Params: * headerField = A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration) * * Returns: A #GVariant with the value if the header was found, %NULL * otherwise. Do not free, it is owned by @message. * * Since: 2.26 */ public Variant getHeader(GDBusMessageHeaderField headerField) { auto p = g_dbus_message_get_header(gDBusMessage, headerField); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets an array of all header fields on @message that are set. * * Returns: An array of header fields * terminated by %G_DBUS_MESSAGE_HEADER_FIELD_INVALID. Each element * is a #guchar. Free with g_free(). * * Since: 2.26 */ public char[] getHeaderFields() { auto p = g_dbus_message_get_header_fields(gDBusMessage); return p[0 .. getArrayLength(p)]; } /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field. * * Returns: The value. * * Since: 2.26 */ public string getInterface() { return Str.toString(g_dbus_message_get_interface(gDBusMessage)); } /** * Checks whether @message is locked. To monitor changes to this * value, conncet to the #GObject::notify signal to listen for changes * on the #GDBusMessage:locked property. * * Returns: %TRUE if @message is locked, %FALSE otherwise. * * Since: 2.26 */ public bool getLocked() { return g_dbus_message_get_locked(gDBusMessage) != 0; } /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field. * * Returns: The value. * * Since: 2.26 */ public string getMember() { return Str.toString(g_dbus_message_get_member(gDBusMessage)); } /** * Gets the type of @message. * * Returns: A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration). * * Since: 2.26 */ public GDBusMessageType getMessageType() { return g_dbus_message_get_message_type(gDBusMessage); } /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field. * * Returns: The value. * * Since: 2.26 */ public uint getNumUnixFds() { return g_dbus_message_get_num_unix_fds(gDBusMessage); } /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field. * * Returns: The value. * * Since: 2.26 */ public string getPath() { return Str.toString(g_dbus_message_get_path(gDBusMessage)); } /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field. * * Returns: The value. * * Since: 2.26 */ public uint getReplySerial() { return g_dbus_message_get_reply_serial(gDBusMessage); } /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field. * * Returns: The value. * * Since: 2.26 */ public string getSender() { return Str.toString(g_dbus_message_get_sender(gDBusMessage)); } /** * Gets the serial for @message. * * Returns: A #guint32. * * Since: 2.26 */ public uint getSerial() { return g_dbus_message_get_serial(gDBusMessage); } /** * Convenience getter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field. * * Returns: The value. * * Since: 2.26 */ public string getSignature() { return Str.toString(g_dbus_message_get_signature(gDBusMessage)); } /** * Gets the UNIX file descriptors associated with @message, if any. * * This method is only available on UNIX. * * Returns: A #GUnixFDList or %NULL if no file descriptors are * associated. Do not free, this object is owned by @message. * * Since: 2.26 */ public UnixFDList getUnixFdList() { auto p = g_dbus_message_get_unix_fd_list(gDBusMessage); if(p is null) { return null; } return ObjectG.getDObject!(UnixFDList)(cast(GUnixFDList*) p); } /** * If @message is locked, does nothing. Otherwise locks the message. * * Since: 2.26 */ public void lock() { g_dbus_message_lock(gDBusMessage); } /** * Creates a new #GDBusMessage that is an error reply to @method_call_message. * * Params: * errorName = A valid D-Bus error name. * errorMessage = The D-Bus error message. * * Returns: A #GDBusMessage. Free with g_object_unref(). * * Since: 2.26 */ public DBusMessage newMethodErrorLiteral(string errorName, string errorMessage) { auto p = g_dbus_message_new_method_error_literal(gDBusMessage, Str.toStringz(errorName), Str.toStringz(errorMessage)); if(p is null) { return null; } return ObjectG.getDObject!(DBusMessage)(cast(GDBusMessage*) p, true); } /** * Like g_dbus_message_new_method_error() but intended for language bindings. * * Params: * errorName = A valid D-Bus error name. * errorMessageFormat = The D-Bus error message in a printf() format. * varArgs = Arguments for @error_message_format. * * Returns: A #GDBusMessage. Free with g_object_unref(). * * Since: 2.26 */ public DBusMessage newMethodErrorValist(string errorName, string errorMessageFormat, void* varArgs) { auto p = g_dbus_message_new_method_error_valist(gDBusMessage, Str.toStringz(errorName), Str.toStringz(errorMessageFormat), varArgs); if(p is null) { return null; } return ObjectG.getDObject!(DBusMessage)(cast(GDBusMessage*) p, true); } /** * Creates a new #GDBusMessage that is a reply to @method_call_message. * * Returns: #GDBusMessage. Free with g_object_unref(). * * Since: 2.26 */ public DBusMessage newMethodReply() { auto p = g_dbus_message_new_method_reply(gDBusMessage); if(p is null) { return null; } return ObjectG.getDObject!(DBusMessage)(cast(GDBusMessage*) p, true); } /** * Produces a human-readable multi-line description of @message. * * The contents of the description has no ABI guarantees, the contents * and formatting is subject to change at any time. Typical output * looks something like this: * |[ * Flags: none * Version: 0 * Serial: 4 * Headers: * path -> objectpath '/org/gtk/GDBus/TestObject' * interface -> 'org.gtk.GDBus.TestInterface' * member -> 'GimmeStdout' * destination -> ':1.146' * Body: () * UNIX File Descriptors: * (none) * ]| * or * |[ * Flags: no-reply-expected * Version: 0 * Serial: 477 * Headers: * reply-serial -> uint32 4 * destination -> ':1.159' * sender -> ':1.146' * num-unix-fds -> uint32 1 * Body: () * UNIX File Descriptors: * fd 12: dev=0:10,mode=020620,ino=5,uid=500,gid=5,rdev=136:2,size=0,atime=1273085037,mtime=1273085851,ctime=1272982635 * ]| * * Params: * indent = Indentation level. * * Returns: A string that should be freed with g_free(). * * Since: 2.26 */ public string print(uint indent) { auto retStr = g_dbus_message_print(gDBusMessage, indent); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Sets the body @message. As a side-effect the * %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field is set to the * type string of @body (or cleared if @body is %NULL). * * If @body is floating, @message assumes ownership of @body. * * Params: * bod = Either %NULL or a #GVariant that is a tuple. * * Since: 2.26 */ public void setBody(Variant bod) { g_dbus_message_set_body(gDBusMessage, (bod is null) ? null : bod.getVariantStruct()); } /** * Sets the byte order of @message. * * Params: * byteOrder = The byte order. */ public void setByteOrder(GDBusMessageByteOrder byteOrder) { g_dbus_message_set_byte_order(gDBusMessage, byteOrder); } /** * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_DESTINATION header field. * * Params: * value = The value to set. * * Since: 2.26 */ public void setDestination(string value) { g_dbus_message_set_destination(gDBusMessage, Str.toStringz(value)); } /** * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field. * * Params: * value = The value to set. * * Since: 2.26 */ public void setErrorName(string value) { g_dbus_message_set_error_name(gDBusMessage, Str.toStringz(value)); } /** * Sets the flags to set on @message. * * Params: * flags = Flags for @message that are set (typically values from the #GDBusMessageFlags * enumeration bitwise ORed together). * * Since: 2.26 */ public void setFlags(GDBusMessageFlags flags) { g_dbus_message_set_flags(gDBusMessage, flags); } /** * Sets a header field on @message. * * If @value is floating, @message assumes ownership of @value. * * Params: * headerField = A 8-bit unsigned integer (typically a value from the #GDBusMessageHeaderField enumeration) * value = A #GVariant to set the header field or %NULL to clear the header field. * * Since: 2.26 */ public void setHeader(GDBusMessageHeaderField headerField, Variant value) { g_dbus_message_set_header(gDBusMessage, headerField, (value is null) ? null : value.getVariantStruct()); } /** * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_INTERFACE header field. * * Params: * value = The value to set. * * Since: 2.26 */ public void setInterface(string value) { g_dbus_message_set_interface(gDBusMessage, Str.toStringz(value)); } /** * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_MEMBER header field. * * Params: * value = The value to set. * * Since: 2.26 */ public void setMember(string value) { g_dbus_message_set_member(gDBusMessage, Str.toStringz(value)); } /** * Sets @message to be of @type. * * Params: * type = A 8-bit unsigned integer (typically a value from the #GDBusMessageType enumeration). * * Since: 2.26 */ public void setMessageType(GDBusMessageType type) { g_dbus_message_set_message_type(gDBusMessage, type); } /** * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header field. * * Params: * value = The value to set. * * Since: 2.26 */ public void setNumUnixFds(uint value) { g_dbus_message_set_num_unix_fds(gDBusMessage, value); } /** * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_PATH header field. * * Params: * value = The value to set. * * Since: 2.26 */ public void setPath(string value) { g_dbus_message_set_path(gDBusMessage, Str.toStringz(value)); } /** * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_REPLY_SERIAL header field. * * Params: * value = The value to set. * * Since: 2.26 */ public void setReplySerial(uint value) { g_dbus_message_set_reply_serial(gDBusMessage, value); } /** * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SENDER header field. * * Params: * value = The value to set. * * Since: 2.26 */ public void setSender(string value) { g_dbus_message_set_sender(gDBusMessage, Str.toStringz(value)); } /** * Sets the serial for @message. * * Params: * serial = A #guint32. * * Since: 2.26 */ public void setSerial(uint serial) { g_dbus_message_set_serial(gDBusMessage, serial); } /** * Convenience setter for the %G_DBUS_MESSAGE_HEADER_FIELD_SIGNATURE header field. * * Params: * value = The value to set. * * Since: 2.26 */ public void setSignature(string value) { g_dbus_message_set_signature(gDBusMessage, Str.toStringz(value)); } /** * Sets the UNIX file descriptors associated with @message. As a * side-effect the %G_DBUS_MESSAGE_HEADER_FIELD_NUM_UNIX_FDS header * field is set to the number of fds in @fd_list (or cleared if * @fd_list is %NULL). * * This method is only available on UNIX. * * Params: * fdList = A #GUnixFDList or %NULL. * * Since: 2.26 */ public void setUnixFdList(UnixFDList fdList) { g_dbus_message_set_unix_fd_list(gDBusMessage, (fdList is null) ? null : fdList.getUnixFDListStruct()); } /** * Serializes @message to a blob. The byte order returned by * g_dbus_message_get_byte_order() will be used. * * Params: * capabilities = A #GDBusCapabilityFlags describing what protocol features are supported. * * Returns: A pointer to a * valid binary D-Bus message of @out_size bytes generated by @message * or %NULL if @error is set. Free with g_free(). * * Since: 2.26 * * Throws: GException on failure. */ public char[] toBlob(GDBusCapabilityFlags capabilities) { size_t outSize; GError* err = null; auto p = g_dbus_message_to_blob(gDBusMessage, &outSize, capabilities, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p[0 .. outSize]; } /** * If @message is not of type %G_DBUS_MESSAGE_TYPE_ERROR does * nothing and returns %FALSE. * * Otherwise this method encodes the error in @message as a #GError * using g_dbus_error_set_dbus_error() using the information in the * %G_DBUS_MESSAGE_HEADER_FIELD_ERROR_NAME header field of @message as * well as the first string item in @message's body. * * Returns: %TRUE if @error was set, %FALSE otherwise. * * Since: 2.26 * * Throws: GException on failure. */ public bool toGerror() { GError* err = null; auto p = g_dbus_message_to_gerror(gDBusMessage, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/DBusMethodInfo.d000066400000000000000000000126261324604450400210140ustar00rootroot00000000000000/* * 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 gio.DBusMethodInfo; private import gio.DBusAnnotationInfo; private import gio.DBusArgInfo; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Information about a method on an D-Bus interface. * * Since: 2.26 */ public final class DBusMethodInfo { /** the main Gtk struct */ protected GDBusMethodInfo* gDBusMethodInfo; protected bool ownedRef; /** Get the main Gtk struct */ public GDBusMethodInfo* getDBusMethodInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusMethodInfo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDBusMethodInfo; } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusMethodInfo* gDBusMethodInfo, bool ownedRef = false) { this.gDBusMethodInfo = gDBusMethodInfo; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_dbus_method_info_unref(gDBusMethodInfo); } /** * The reference count or -1 if statically allocated. */ public @property int refCount() { return gDBusMethodInfo.refCount; } /** Ditto */ public @property void refCount(int value) { gDBusMethodInfo.refCount = value; } /** * The name of the D-Bus method, e.g. @RequestName. */ public @property string name() { return Str.toString(gDBusMethodInfo.name); } /** Ditto */ public @property void name(string value) { gDBusMethodInfo.name = Str.toStringz(value); } /** * A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments. */ public @property DBusArgInfo[] inArgs() { DBusArgInfo[] arr = new DBusArgInfo[getArrayLength(gDBusMethodInfo.inArgs)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusArgInfo)(gDBusMethodInfo.inArgs[i], false); } return arr; } /** Ditto */ public @property void inArgs(DBusArgInfo[] value) { GDBusArgInfo*[] arr = new GDBusArgInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusArgInfoStruct(); } arr[value.length] = null; gDBusMethodInfo.inArgs = arr.ptr; } /** * A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments. */ public @property DBusArgInfo[] outArgs() { DBusArgInfo[] arr = new DBusArgInfo[getArrayLength(gDBusMethodInfo.outArgs)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusArgInfo)(gDBusMethodInfo.outArgs[i], false); } return arr; } /** Ditto */ public @property void outArgs(DBusArgInfo[] value) { GDBusArgInfo*[] arr = new GDBusArgInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusArgInfoStruct(); } arr[value.length] = null; gDBusMethodInfo.outArgs = arr.ptr; } /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ public @property DBusAnnotationInfo[] annotations() { DBusAnnotationInfo[] arr = new DBusAnnotationInfo[getArrayLength(gDBusMethodInfo.annotations)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusAnnotationInfo)(gDBusMethodInfo.annotations[i], false); } return arr; } /** Ditto */ public @property void annotations(DBusAnnotationInfo[] value) { GDBusAnnotationInfo*[] arr = new GDBusAnnotationInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusAnnotationInfoStruct(); } arr[value.length] = null; gDBusMethodInfo.annotations = arr.ptr; } /** */ public static GType getType() { return g_dbus_method_info_get_type(); } /** * If @info is statically allocated does nothing. Otherwise increases * the reference count. * * Returns: The same @info. * * Since: 2.26 */ public DBusMethodInfo doref() { auto p = g_dbus_method_info_ref(gDBusMethodInfo); if(p is null) { return null; } return ObjectG.getDObject!(DBusMethodInfo)(cast(GDBusMethodInfo*) p, true); } /** * If @info is statically allocated, does nothing. Otherwise decreases * the reference count of @info. When its reference count drops to 0, * the memory used is freed. * * Since: 2.26 */ public void unref() { g_dbus_method_info_unref(gDBusMethodInfo); } } GtkD-3.7.5/generated/gtkd/gio/DBusMethodInvocation.d000066400000000000000000000305421324604450400222270ustar00rootroot00000000000000/* * 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 gio.DBusMethodInvocation; private import gio.DBusConnection; private import gio.DBusMessage; private import gio.DBusMethodInfo; private import gio.DBusPropertyInfo; private import gio.UnixFDList; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; public import gtkc.giotypes; /** * Instances of the #GDBusMethodInvocation class are used when * handling D-Bus method calls. It provides a way to asynchronously * return results and errors. * * The normal way to obtain a #GDBusMethodInvocation object is to receive * it as an argument to the handle_method_call() function in a * #GDBusInterfaceVTable that was passed to g_dbus_connection_register_object(). * * Since: 2.26 */ public class DBusMethodInvocation : ObjectG { /** the main Gtk struct */ protected GDBusMethodInvocation* gDBusMethodInvocation; /** Get the main Gtk struct */ public GDBusMethodInvocation* getDBusMethodInvocationStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusMethodInvocation; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusMethodInvocation; } protected override void setStruct(GObject* obj) { gDBusMethodInvocation = cast(GDBusMethodInvocation*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusMethodInvocation* gDBusMethodInvocation, bool ownedRef = false) { this.gDBusMethodInvocation = gDBusMethodInvocation; super(cast(GObject*)gDBusMethodInvocation, ownedRef); } /** */ public static GType getType() { return g_dbus_method_invocation_get_type(); } /** * Gets the #GDBusConnection the method was invoked on. * * Returns: A #GDBusConnection. Do not free, it is owned by @invocation. * * Since: 2.26 */ public DBusConnection getConnection() { auto p = g_dbus_method_invocation_get_connection(gDBusMethodInvocation); if(p is null) { return null; } return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p); } /** * Gets the name of the D-Bus interface the method was invoked on. * * If this method call is a property Get, Set or GetAll call that has * been redirected to the method call handler then * "org.freedesktop.DBus.Properties" will be returned. See * #GDBusInterfaceVTable for more information. * * Returns: A string. Do not free, it is owned by @invocation. * * Since: 2.26 */ public string getInterfaceName() { return Str.toString(g_dbus_method_invocation_get_interface_name(gDBusMethodInvocation)); } /** * Gets the #GDBusMessage for the method invocation. This is useful if * you need to use low-level protocol features, such as UNIX file * descriptor passing, that cannot be properly expressed in the * #GVariant API. * * See this [server][gdbus-server] and [client][gdbus-unix-fd-client] * for an example of how to use this low-level API to send and receive * UNIX file descriptors. * * Returns: #GDBusMessage. Do not free, it is owned by @invocation. * * Since: 2.26 */ public DBusMessage getMessage() { auto p = g_dbus_method_invocation_get_message(gDBusMethodInvocation); if(p is null) { return null; } return ObjectG.getDObject!(DBusMessage)(cast(GDBusMessage*) p); } /** * Gets information about the method call, if any. * * If this method invocation is a property Get, Set or GetAll call that * has been redirected to the method call handler then %NULL will be * returned. See g_dbus_method_invocation_get_property_info() and * #GDBusInterfaceVTable for more information. * * Returns: A #GDBusMethodInfo or %NULL. Do not free, it is owned by @invocation. * * Since: 2.26 */ public DBusMethodInfo getMethodInfo() { auto p = g_dbus_method_invocation_get_method_info(gDBusMethodInvocation); if(p is null) { return null; } return ObjectG.getDObject!(DBusMethodInfo)(cast(GDBusMethodInfo*) p); } /** * Gets the name of the method that was invoked. * * Returns: A string. Do not free, it is owned by @invocation. * * Since: 2.26 */ public string getMethodName() { return Str.toString(g_dbus_method_invocation_get_method_name(gDBusMethodInvocation)); } /** * Gets the object path the method was invoked on. * * Returns: A string. Do not free, it is owned by @invocation. * * Since: 2.26 */ public string getObjectPath() { return Str.toString(g_dbus_method_invocation_get_object_path(gDBusMethodInvocation)); } /** * Gets the parameters of the method invocation. If there are no input * parameters then this will return a GVariant with 0 children rather than NULL. * * Returns: A #GVariant tuple. Do not unref this because it is owned by @invocation. * * Since: 2.26 */ public Variant getParameters() { auto p = g_dbus_method_invocation_get_parameters(gDBusMethodInvocation); if(p is null) { return null; } return new Variant(cast(GVariant*) p); } /** * Gets information about the property that this method call is for, if * any. * * This will only be set in the case of an invocation in response to a * property Get or Set call that has been directed to the method call * handler for an object on account of its property_get() or * property_set() vtable pointers being unset. * * See #GDBusInterfaceVTable for more information. * * If the call was GetAll, %NULL will be returned. * * Returns: a #GDBusPropertyInfo or %NULL * * Since: 2.38 */ public DBusPropertyInfo getPropertyInfo() { auto p = g_dbus_method_invocation_get_property_info(gDBusMethodInvocation); if(p is null) { return null; } return ObjectG.getDObject!(DBusPropertyInfo)(cast(GDBusPropertyInfo*) p); } /** * Gets the bus name that invoked the method. * * Returns: A string. Do not free, it is owned by @invocation. * * Since: 2.26 */ public string getSender() { return Str.toString(g_dbus_method_invocation_get_sender(gDBusMethodInvocation)); } /** * Gets the @user_data #gpointer passed to g_dbus_connection_register_object(). * * Returns: A #gpointer. * * Since: 2.26 */ public void* getUserData() { return g_dbus_method_invocation_get_user_data(gDBusMethodInvocation); } /** * Finishes handling a D-Bus method call by returning an error. * * This method will take ownership of @invocation. See * #GDBusInterfaceVTable for more information about the ownership of * @invocation. * * Params: * errorName = A valid D-Bus error name. * errorMessage = A valid D-Bus error message. * * Since: 2.26 */ public void returnDbusError(string errorName, string errorMessage) { g_dbus_method_invocation_return_dbus_error(gDBusMethodInvocation, Str.toStringz(errorName), Str.toStringz(errorMessage)); } /** * Like g_dbus_method_invocation_return_error() but without printf()-style formatting. * * This method will take ownership of @invocation. See * #GDBusInterfaceVTable for more information about the ownership of * @invocation. * * Params: * domain = A #GQuark for the #GError error domain. * code = The error code. * message = The error message. * * Since: 2.26 */ public void returnErrorLiteral(GQuark domain, int code, string message) { g_dbus_method_invocation_return_error_literal(gDBusMethodInvocation, domain, code, Str.toStringz(message)); } /** * Like g_dbus_method_invocation_return_error() but intended for * language bindings. * * This method will take ownership of @invocation. See * #GDBusInterfaceVTable for more information about the ownership of * @invocation. * * Params: * domain = A #GQuark for the #GError error domain. * code = The error code. * format = printf()-style format. * varArgs = #va_list of parameters for @format. * * Since: 2.26 */ public void returnErrorValist(GQuark domain, int code, string format, void* varArgs) { g_dbus_method_invocation_return_error_valist(gDBusMethodInvocation, domain, code, Str.toStringz(format), varArgs); } /** * Like g_dbus_method_invocation_return_error() but takes a #GError * instead of the error domain, error code and message. * * This method will take ownership of @invocation. See * #GDBusInterfaceVTable for more information about the ownership of * @invocation. * * Params: * error = A #GError. * * Since: 2.26 */ public void returnGerror(ErrorG error) { g_dbus_method_invocation_return_gerror(gDBusMethodInvocation, (error is null) ? null : error.getErrorGStruct()); } /** * Finishes handling a D-Bus method call by returning @parameters. * If the @parameters GVariant is floating, it is consumed. * * It is an error if @parameters is not of the right format: it must be a tuple * containing the out-parameters of the D-Bus method. Even if the method has a * single out-parameter, it must be contained in a tuple. If the method has no * out-parameters, @parameters may be %NULL or an empty tuple. * * |[ * GDBusMethodInvocation *invocation = some_invocation; * g_autofree gchar *result_string = NULL; * g_autoptr (GError) error = NULL; * * result_string = calculate_result (&error); * * if (error != NULL) * g_dbus_method_invocation_return_gerror (invocation, error); * else * g_dbus_method_invocation_return_value (invocation, * g_variant_new ("(s)", result_string)); * * /* Do not free @invocation here; returning a value does that */ * ]| * * This method will take ownership of @invocation. See * #GDBusInterfaceVTable for more information about the ownership of * @invocation. * * Since 2.48, if the method call requested for a reply not to be sent * then this call will sink @parameters and free @invocation, but * otherwise do nothing (as per the recommendations of the D-Bus * specification). * * Params: * parameters = A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters. * * Since: 2.26 */ public void returnValue(Variant parameters) { g_dbus_method_invocation_return_value(gDBusMethodInvocation, (parameters is null) ? null : parameters.getVariantStruct()); } /** * Like g_dbus_method_invocation_return_value() but also takes a #GUnixFDList. * * This method is only available on UNIX. * * This method will take ownership of @invocation. See * #GDBusInterfaceVTable for more information about the ownership of * @invocation. * * Params: * parameters = A #GVariant tuple with out parameters for the method or %NULL if not passing any parameters. * fdList = A #GUnixFDList or %NULL. * * Since: 2.30 */ public void returnValueWithUnixFdList(Variant parameters, UnixFDList fdList) { g_dbus_method_invocation_return_value_with_unix_fd_list(gDBusMethodInvocation, (parameters is null) ? null : parameters.getVariantStruct(), (fdList is null) ? null : fdList.getUnixFDListStruct()); } /** * Like g_dbus_method_invocation_return_gerror() but takes ownership * of @error so the caller does not need to free it. * * This method will take ownership of @invocation. See * #GDBusInterfaceVTable for more information about the ownership of * @invocation. * * Params: * error = A #GError. * * Since: 2.30 */ public void takeError(ErrorG error) { g_dbus_method_invocation_take_error(gDBusMethodInvocation, (error is null) ? null : error.getErrorGStruct(true)); } } GtkD-3.7.5/generated/gtkd/gio/DBusNames.d000066400000000000000000000342521324604450400200220ustar00rootroot00000000000000/* * 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 gio.DBusNames; private import gio.DBusConnection; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import gobject.Closure; public import gtkc.giotypes; /** */ public struct DBusNames { /** * Starts acquiring @name on the bus specified by @bus_type and calls * @name_acquired_handler and @name_lost_handler when the name is * acquired respectively lost. Callbacks will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this function from. * * You are guaranteed that one of the @name_acquired_handler and @name_lost_handler * callbacks will be invoked after calling this function - there are three * possible cases: * * - @name_lost_handler with a %NULL connection (if a connection to the bus * can't be made). * * - @bus_acquired_handler then @name_lost_handler (if the name can't be * obtained) * * - @bus_acquired_handler then @name_acquired_handler (if the name was * obtained). * * When you are done owning the name, just call g_bus_unown_name() * with the owner id this function returns. * * If the name is acquired or lost (for example another application * could acquire the name if you allow replacement or the application * currently owning the name exits), the handlers are also invoked. * If the #GDBusConnection that is used for attempting to own the name * closes, then @name_lost_handler is invoked since it is no longer * possible for other processes to access the process. * * You cannot use g_bus_own_name() several times for the same name (unless * interleaved with calls to g_bus_unown_name()) - only the first call * will work. * * Another guarantee is that invocations of @name_acquired_handler * and @name_lost_handler are guaranteed to alternate; that * is, if @name_acquired_handler is invoked then you are * guaranteed that the next time one of the handlers is invoked, it * will be @name_lost_handler. The reverse is also true. * * If you plan on exporting objects (using e.g. * g_dbus_connection_register_object()), note that it is generally too late * to export the objects in @name_acquired_handler. Instead, you can do this * in @bus_acquired_handler since you are guaranteed that this will run * before @name is requested from the bus. * * This behavior makes it very simple to write applications that wants * to [own names][gdbus-owning-names] and export objects. * Simply register objects to be exported in @bus_acquired_handler and * unregister the objects (if any) in @name_lost_handler. * * Params: * busType = the type of bus to own a name on * name = the well-known name to own * flags = a set of flags from the #GBusNameOwnerFlags enumeration * busAcquiredHandler = handler to invoke when connected to the bus of type @bus_type or %NULL * nameAcquiredHandler = handler to invoke when @name is acquired or %NULL * nameLostHandler = handler to invoke when @name is lost or %NULL * userData = user data to pass to handlers * userDataFreeFunc = function for freeing @user_data or %NULL * * Returns: an identifier (never 0) that an be used with * g_bus_unown_name() to stop owning the name. * * Since: 2.26 */ public static uint ownName(GBusType busType, string name, GBusNameOwnerFlags flags, GBusAcquiredCallback busAcquiredHandler, GBusNameAcquiredCallback nameAcquiredHandler, GBusNameLostCallback nameLostHandler, void* userData, GDestroyNotify userDataFreeFunc) { return g_bus_own_name(busType, Str.toStringz(name), flags, busAcquiredHandler, nameAcquiredHandler, nameLostHandler, userData, userDataFreeFunc); } /** * Like g_bus_own_name() but takes a #GDBusConnection instead of a * #GBusType. * * Params: * connection = a #GDBusConnection * name = the well-known name to own * flags = a set of flags from the #GBusNameOwnerFlags enumeration * nameAcquiredHandler = handler to invoke when @name is acquired or %NULL * nameLostHandler = handler to invoke when @name is lost or %NULL * userData = user data to pass to handlers * userDataFreeFunc = function for freeing @user_data or %NULL * * Returns: an identifier (never 0) that an be used with * g_bus_unown_name() to stop owning the name * * Since: 2.26 */ public static uint ownNameOnConnection(DBusConnection connection, string name, GBusNameOwnerFlags flags, GBusNameAcquiredCallback nameAcquiredHandler, GBusNameLostCallback nameLostHandler, void* userData, GDestroyNotify userDataFreeFunc) { return g_bus_own_name_on_connection((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(name), flags, nameAcquiredHandler, nameLostHandler, userData, userDataFreeFunc); } /** * Version of g_bus_own_name_on_connection() using closures instead of * callbacks for easier binding in other languages. * * Params: * connection = a #GDBusConnection * name = the well-known name to own * flags = a set of flags from the #GBusNameOwnerFlags enumeration * nameAcquiredClosure = #GClosure to invoke when @name is * acquired or %NULL * nameLostClosure = #GClosure to invoke when @name is lost * or %NULL * * Returns: an identifier (never 0) that an be used with * g_bus_unown_name() to stop owning the name. * * Since: 2.26 */ public static uint ownNameOnConnectionWithClosures(DBusConnection connection, string name, GBusNameOwnerFlags flags, Closure nameAcquiredClosure, Closure nameLostClosure) { return g_bus_own_name_on_connection_with_closures((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(name), flags, (nameAcquiredClosure is null) ? null : nameAcquiredClosure.getClosureStruct(), (nameLostClosure is null) ? null : nameLostClosure.getClosureStruct()); } /** * Version of g_bus_own_name() using closures instead of callbacks for * easier binding in other languages. * * Params: * busType = the type of bus to own a name on * name = the well-known name to own * flags = a set of flags from the #GBusNameOwnerFlags enumeration * busAcquiredClosure = #GClosure to invoke when connected to * the bus of type @bus_type or %NULL * nameAcquiredClosure = #GClosure to invoke when @name is * acquired or %NULL * nameLostClosure = #GClosure to invoke when @name is lost or * %NULL * * Returns: an identifier (never 0) that an be used with * g_bus_unown_name() to stop owning the name. * * Since: 2.26 */ public static uint ownNameWithClosures(GBusType busType, string name, GBusNameOwnerFlags flags, Closure busAcquiredClosure, Closure nameAcquiredClosure, Closure nameLostClosure) { return g_bus_own_name_with_closures(busType, Str.toStringz(name), flags, (busAcquiredClosure is null) ? null : busAcquiredClosure.getClosureStruct(), (nameAcquiredClosure is null) ? null : nameAcquiredClosure.getClosureStruct(), (nameLostClosure is null) ? null : nameLostClosure.getClosureStruct()); } /** * Stops owning a name. * * Params: * ownerId = an identifier obtained from g_bus_own_name() * * Since: 2.26 */ public static void unownName(uint ownerId) { g_bus_unown_name(ownerId); } /** * Stops watching a name. * * Params: * watcherId = An identifier obtained from g_bus_watch_name() * * Since: 2.26 */ public static void unwatchName(uint watcherId) { g_bus_unwatch_name(watcherId); } /** * Starts watching @name on the bus specified by @bus_type and calls * @name_appeared_handler and @name_vanished_handler when the name is * known to have a owner respectively known to lose its * owner. Callbacks will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this function from. * * You are guaranteed that one of the handlers will be invoked after * calling this function. When you are done watching the name, just * call g_bus_unwatch_name() with the watcher id this function * returns. * * If the name vanishes or appears (for example the application owning * the name could restart), the handlers are also invoked. If the * #GDBusConnection that is used for watching the name disconnects, then * @name_vanished_handler is invoked since it is no longer * possible to access the name. * * Another guarantee is that invocations of @name_appeared_handler * and @name_vanished_handler are guaranteed to alternate; that * is, if @name_appeared_handler is invoked then you are * guaranteed that the next time one of the handlers is invoked, it * will be @name_vanished_handler. The reverse is also true. * * This behavior makes it very simple to write applications that want * to take action when a certain [name exists][gdbus-watching-names]. * Basically, the application should create object proxies in * @name_appeared_handler and destroy them again (if any) in * @name_vanished_handler. * * Params: * busType = The type of bus to watch a name on. * name = The name (well-known or unique) to watch. * flags = Flags from the #GBusNameWatcherFlags enumeration. * nameAppearedHandler = Handler to invoke when @name is known to exist or %NULL. * nameVanishedHandler = Handler to invoke when @name is known to not exist or %NULL. * userData = User data to pass to handlers. * userDataFreeFunc = Function for freeing @user_data or %NULL. * * Returns: An identifier (never 0) that an be used with * g_bus_unwatch_name() to stop watching the name. * * Since: 2.26 */ public static uint watchName(GBusType busType, string name, GBusNameWatcherFlags flags, GBusNameAppearedCallback nameAppearedHandler, GBusNameVanishedCallback nameVanishedHandler, void* userData, GDestroyNotify userDataFreeFunc) { return g_bus_watch_name(busType, Str.toStringz(name), flags, nameAppearedHandler, nameVanishedHandler, userData, userDataFreeFunc); } /** * Like g_bus_watch_name() but takes a #GDBusConnection instead of a * #GBusType. * * Params: * connection = A #GDBusConnection. * name = The name (well-known or unique) to watch. * flags = Flags from the #GBusNameWatcherFlags enumeration. * nameAppearedHandler = Handler to invoke when @name is known to exist or %NULL. * nameVanishedHandler = Handler to invoke when @name is known to not exist or %NULL. * userData = User data to pass to handlers. * userDataFreeFunc = Function for freeing @user_data or %NULL. * * Returns: An identifier (never 0) that an be used with * g_bus_unwatch_name() to stop watching the name. * * Since: 2.26 */ public static uint watchNameOnConnection(DBusConnection connection, string name, GBusNameWatcherFlags flags, GBusNameAppearedCallback nameAppearedHandler, GBusNameVanishedCallback nameVanishedHandler, void* userData, GDestroyNotify userDataFreeFunc) { return g_bus_watch_name_on_connection((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(name), flags, nameAppearedHandler, nameVanishedHandler, userData, userDataFreeFunc); } /** * Version of g_bus_watch_name_on_connection() using closures instead of callbacks for * easier binding in other languages. * * Params: * connection = A #GDBusConnection. * name = The name (well-known or unique) to watch. * flags = Flags from the #GBusNameWatcherFlags enumeration. * nameAppearedClosure = #GClosure to invoke when @name is known * to exist or %NULL. * nameVanishedClosure = #GClosure to invoke when @name is known * to not exist or %NULL. * * Returns: An identifier (never 0) that an be used with * g_bus_unwatch_name() to stop watching the name. * * Since: 2.26 */ public static uint watchNameOnConnectionWithClosures(DBusConnection connection, string name, GBusNameWatcherFlags flags, Closure nameAppearedClosure, Closure nameVanishedClosure) { return g_bus_watch_name_on_connection_with_closures((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(name), flags, (nameAppearedClosure is null) ? null : nameAppearedClosure.getClosureStruct(), (nameVanishedClosure is null) ? null : nameVanishedClosure.getClosureStruct()); } /** * Version of g_bus_watch_name() using closures instead of callbacks for * easier binding in other languages. * * Params: * busType = The type of bus to watch a name on. * name = The name (well-known or unique) to watch. * flags = Flags from the #GBusNameWatcherFlags enumeration. * nameAppearedClosure = #GClosure to invoke when @name is known * to exist or %NULL. * nameVanishedClosure = #GClosure to invoke when @name is known * to not exist or %NULL. * * Returns: An identifier (never 0) that an be used with * g_bus_unwatch_name() to stop watching the name. * * Since: 2.26 */ public static uint watchNameWithClosures(GBusType busType, string name, GBusNameWatcherFlags flags, Closure nameAppearedClosure, Closure nameVanishedClosure) { return g_bus_watch_name_with_closures(busType, Str.toStringz(name), flags, (nameAppearedClosure is null) ? null : nameAppearedClosure.getClosureStruct(), (nameVanishedClosure is null) ? null : nameVanishedClosure.getClosureStruct()); } } GtkD-3.7.5/generated/gtkd/gio/DBusNodeInfo.d000066400000000000000000000172611324604450400204610ustar00rootroot00000000000000/* * 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 gio.DBusNodeInfo; private import gio.DBusAnnotationInfo; private import gio.DBusInterfaceInfo; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.StringG; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Information about nodes in a remote object hierarchy. * * Since: 2.26 */ public final class DBusNodeInfo { /** the main Gtk struct */ protected GDBusNodeInfo* gDBusNodeInfo; protected bool ownedRef; /** Get the main Gtk struct */ public GDBusNodeInfo* getDBusNodeInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusNodeInfo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDBusNodeInfo; } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusNodeInfo* gDBusNodeInfo, bool ownedRef = false) { this.gDBusNodeInfo = gDBusNodeInfo; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_dbus_node_info_unref(gDBusNodeInfo); } /** * The reference count or -1 if statically allocated. */ public @property int refCount() { return gDBusNodeInfo.refCount; } /** Ditto */ public @property void refCount(int value) { gDBusNodeInfo.refCount = value; } /** * The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details. */ public @property string path() { return Str.toString(gDBusNodeInfo.path); } /** Ditto */ public @property void path(string value) { gDBusNodeInfo.path = Str.toStringz(value); } /** * A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces. */ public @property DBusInterfaceInfo[] interfaces() { DBusInterfaceInfo[] arr = new DBusInterfaceInfo[getArrayLength(gDBusNodeInfo.interfaces)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusInterfaceInfo)(gDBusNodeInfo.interfaces[i], false); } return arr; } /** Ditto */ public @property void interfaces(DBusInterfaceInfo[] value) { GDBusInterfaceInfo*[] arr = new GDBusInterfaceInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusInterfaceInfoStruct(); } arr[value.length] = null; gDBusNodeInfo.interfaces = arr.ptr; } /** * A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes. */ public @property DBusNodeInfo[] nodes() { DBusNodeInfo[] arr = new DBusNodeInfo[getArrayLength(gDBusNodeInfo.nodes)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusNodeInfo)(gDBusNodeInfo.nodes[i], false); } return arr; } /** Ditto */ public @property void nodes(DBusNodeInfo[] value) { GDBusNodeInfo*[] arr = new GDBusNodeInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusNodeInfoStruct(); } arr[value.length] = null; gDBusNodeInfo.nodes = arr.ptr; } /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ public @property DBusAnnotationInfo[] annotations() { DBusAnnotationInfo[] arr = new DBusAnnotationInfo[getArrayLength(gDBusNodeInfo.annotations)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusAnnotationInfo)(gDBusNodeInfo.annotations[i], false); } return arr; } /** Ditto */ public @property void annotations(DBusAnnotationInfo[] value) { GDBusAnnotationInfo*[] arr = new GDBusAnnotationInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusAnnotationInfoStruct(); } arr[value.length] = null; gDBusNodeInfo.annotations = arr.ptr; } /** */ public static GType getType() { return g_dbus_node_info_get_type(); } /** * Parses @xml_data and returns a #GDBusNodeInfo representing the data. * * The introspection XML must contain exactly one top-level * element. * * Note that this routine is using a * [GMarkup][glib-Simple-XML-Subset-Parser.description]-based * parser that only accepts a subset of valid XML documents. * * Params: * xmlData = Valid D-Bus introspection XML. * * Returns: A #GDBusNodeInfo structure or %NULL if @error is set. Free * with g_dbus_node_info_unref(). * * Since: 2.26 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string xmlData) { GError* err = null; auto p = g_dbus_node_info_new_for_xml(Str.toStringz(xmlData), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_for_xml"); } this(cast(GDBusNodeInfo*) p); } /** * Appends an XML representation of @info (and its children) to @string_builder. * * This function is typically used for generating introspection XML documents at run-time for * handling the `org.freedesktop.DBus.Introspectable.Introspect` method. * * Params: * indent = Indentation level. * stringBuilder = A #GString to to append XML data to. * * Since: 2.26 */ public void generateXml(uint indent, StringG stringBuilder) { g_dbus_node_info_generate_xml(gDBusNodeInfo, indent, (stringBuilder is null) ? null : stringBuilder.getStringGStruct()); } /** * Looks up information about an interface. * * The cost of this function is O(n) in number of interfaces. * * Params: * name = A D-Bus interface name. * * Returns: A #GDBusInterfaceInfo or %NULL if not found. Do not free, it is owned by @info. * * Since: 2.26 */ public DBusInterfaceInfo lookupInterface(string name) { auto p = g_dbus_node_info_lookup_interface(gDBusNodeInfo, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(DBusInterfaceInfo)(cast(GDBusInterfaceInfo*) p); } /** * If @info is statically allocated does nothing. Otherwise increases * the reference count. * * Returns: The same @info. * * Since: 2.26 */ public DBusNodeInfo doref() { auto p = g_dbus_node_info_ref(gDBusNodeInfo); if(p is null) { return null; } return ObjectG.getDObject!(DBusNodeInfo)(cast(GDBusNodeInfo*) p, true); } /** * If @info is statically allocated, does nothing. Otherwise decreases * the reference count of @info. When its reference count drops to 0, * the memory used is freed. * * Since: 2.26 */ public void unref() { g_dbus_node_info_unref(gDBusNodeInfo); } } GtkD-3.7.5/generated/gtkd/gio/DBusObjectIF.d000066400000000000000000000061121324604450400203760ustar00rootroot00000000000000/* * 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 gio.DBusObjectIF; private import gio.DBusInterfaceIF; private import gio.c.functions; public import gio.c.types; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * The #GDBusObject type is the base type for D-Bus objects on both * the service side (see #GDBusObjectSkeleton) and the client side * (see #GDBusObjectProxy). It is essentially just a container of * interfaces. */ public interface DBusObjectIF{ /** Get the main Gtk struct */ public GDBusObject* getDBusObjectStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_dbus_object_get_type(); } /** * Gets the D-Bus interface with name @interface_name associated with * @object, if any. * * Params: * interfaceName = A D-Bus interface name. * * Returns: %NULL if not found, otherwise a * #GDBusInterface that must be freed with g_object_unref(). * * Since: 2.30 */ public DBusInterfaceIF getInterface(string interfaceName); /** * Gets the D-Bus interfaces associated with @object. * * Returns: A list of #GDBusInterface instances. * The returned list must be freed by g_list_free() after each element has been freed * with g_object_unref(). * * Since: 2.30 */ public ListG getInterfaces(); /** * Gets the object path for @object. * * Returns: A string owned by @object. Do not free. * * Since: 2.30 */ public string getObjectPath(); /** * Emitted when @interface is added to @object. * * Params: * iface = The #GDBusInterface that was added. * * Since: 2.30 */ gulong addOnInterfaceAdded(void delegate(DBusInterfaceIF, DBusObjectIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Emitted when @interface is removed from @object. * * Params: * iface = The #GDBusInterface that was removed. * * Since: 2.30 */ gulong addOnInterfaceRemoved(void delegate(DBusInterfaceIF, DBusObjectIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/gio/DBusObjectManagerClient.d000066400000000000000000000553151324604450400226220ustar00rootroot00000000000000/* * 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 gio.DBusObjectManagerClient; private import gio.AsyncInitableIF; private import gio.AsyncInitableT; private import gio.Cancellable; private import gio.DBusConnection; private import gio.DBusObjectManagerIF; private import gio.DBusObjectManagerT; private import gio.DBusObjectProxy; private import gio.DBusProxy; private import gio.InitableIF; private import gio.InitableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GDBusObjectManagerClient is used to create, monitor and delete object * proxies for remote objects exported by a #GDBusObjectManagerServer (or any * code implementing the * [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager) * interface). * * Once an instance of this type has been created, you can connect to * the #GDBusObjectManager::object-added and * #GDBusObjectManager::object-removed signals and inspect the * #GDBusObjectProxy objects returned by * g_dbus_object_manager_get_objects(). * * If the name for a #GDBusObjectManagerClient is not owned by anyone at * object construction time, the default behavior is to request the * message bus to launch an owner for the name. This behavior can be * disabled using the %G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START * flag. It's also worth noting that this only works if the name of * interest is activatable in the first place. E.g. in some cases it * is not possible to launch an owner for the requested name. In this * case, #GDBusObjectManagerClient object construction still succeeds but * there will be no object proxies * (e.g. g_dbus_object_manager_get_objects() returns the empty list) and * the #GDBusObjectManagerClient:name-owner property is %NULL. * * The owner of the requested name can come and go (for example * consider a system service being restarted) – #GDBusObjectManagerClient * handles this case too; simply connect to the #GObject::notify * signal to watch for changes on the #GDBusObjectManagerClient:name-owner * property. When the name owner vanishes, the behavior is that * #GDBusObjectManagerClient:name-owner is set to %NULL (this includes * emission of the #GObject::notify signal) and then * #GDBusObjectManager::object-removed signals are synthesized * for all currently existing object proxies. Since * #GDBusObjectManagerClient:name-owner is %NULL when this happens, you can * use this information to disambiguate a synthesized signal from a * genuine signal caused by object removal on the remote * #GDBusObjectManager. Similarly, when a new name owner appears, * #GDBusObjectManager::object-added signals are synthesized * while #GDBusObjectManagerClient:name-owner is still %NULL. Only when all * object proxies have been added, the #GDBusObjectManagerClient:name-owner * is set to the new name owner (this includes emission of the * #GObject::notify signal). Furthermore, you are guaranteed that * #GDBusObjectManagerClient:name-owner will alternate between a name owner * (e.g. `:1.42`) and %NULL even in the case where * the name of interest is atomically replaced * * Ultimately, #GDBusObjectManagerClient is used to obtain #GDBusProxy * instances. All signals (including the * org.freedesktop.DBus.Properties::PropertiesChanged signal) * delivered to #GDBusProxy instances are guaranteed to originate * from the name owner. This guarantee along with the behavior * described above, means that certain race conditions including the * "half the proxy is from the old owner and the other half is from * the new owner" problem cannot happen. * * To avoid having the application connect to signals on the returned * #GDBusObjectProxy and #GDBusProxy objects, the * #GDBusObject::interface-added, * #GDBusObject::interface-removed, * #GDBusProxy::g-properties-changed and * #GDBusProxy::g-signal signals * are also emitted on the #GDBusObjectManagerClient instance managing these * objects. The signals emitted are * #GDBusObjectManager::interface-added, * #GDBusObjectManager::interface-removed, * #GDBusObjectManagerClient::interface-proxy-properties-changed and * #GDBusObjectManagerClient::interface-proxy-signal. * * Note that all callbacks and signals are emitted in the * [thread-default main context][g-main-context-push-thread-default] * that the #GDBusObjectManagerClient object was constructed * in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects * originating from the #GDBusObjectManagerClient object will be created in * the same context and, consequently, will deliver signals in the * same main loop. * * Since: 2.30 */ public class DBusObjectManagerClient : ObjectG, AsyncInitableIF, DBusObjectManagerIF, InitableIF { /** the main Gtk struct */ protected GDBusObjectManagerClient* gDBusObjectManagerClient; /** Get the main Gtk struct */ public GDBusObjectManagerClient* getDBusObjectManagerClientStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusObjectManagerClient; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusObjectManagerClient; } protected override void setStruct(GObject* obj) { gDBusObjectManagerClient = cast(GDBusObjectManagerClient*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusObjectManagerClient* gDBusObjectManagerClient, bool ownedRef = false) { this.gDBusObjectManagerClient = gDBusObjectManagerClient; super(cast(GObject*)gDBusObjectManagerClient, ownedRef); } // add the AsyncInitable capabilities mixin AsyncInitableT!(GDBusObjectManagerClient); // add the DBusObjectManager capabilities mixin DBusObjectManagerT!(GDBusObjectManagerClient); // add the Initable capabilities mixin InitableT!(GDBusObjectManagerClient); /** * Finishes an operation started with g_dbus_object_manager_client_new(). * * Params: * res = A GAsyncResult obtained from the GAsyncReadyCallback passed to the DBusObjectManager constructor. * forBus = If true finish an address. * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. * * Since: 2.30 */ public this (AsyncResultIF res, bool forBus = false) { GError* err = null; GDBusObjectManager* p; if ( forBus ) { p = g_dbus_object_manager_client_new_for_bus_finish((res is null) ? null : res.getAsyncResultStruct(), &err); } else { p = g_dbus_object_manager_client_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err); } if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by g_dbus_object_manager_client_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err)"); } this(cast(GDBusObjectManagerClient*) p, true); } /** */ /** */ public static GType getType() { return g_dbus_object_manager_client_get_type(); } /** * Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead * of a #GDBusConnection. * * This is a synchronous failable constructor - the calling thread is * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus() * for the asynchronous version. * * Params: * busType = A #GBusType. * flags = Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. * name = The owner of the control object (unique or well-known name). * objectPath = The object path of the control object. * getProxyTypeFunc = A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. * getProxyTypeUserData = User data to pass to @get_proxy_type_func. * getProxyTypeDestroyNotify = Free function for @get_proxy_type_user_data or %NULL. * cancellable = A #GCancellable or %NULL * * Returns: A * #GDBusObjectManagerClient object or %NULL if @error is set. Free * with g_object_unref(). * * Since: 2.30 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(GBusType busType, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable) { GError* err = null; auto p = g_dbus_object_manager_client_new_for_bus_sync(busType, flags, Str.toStringz(name), Str.toStringz(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_for_bus_sync"); } this(cast(GDBusObjectManagerClient*) p, true); } /** * Creates a new #GDBusObjectManagerClient object. * * This is a synchronous failable constructor - the calling thread is * blocked until a reply is received. See g_dbus_object_manager_client_new() * for the asynchronous version. * * Params: * connection = A #GDBusConnection. * flags = Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. * name = The owner of the control object (unique or well-known name), or %NULL when not using a message bus connection. * objectPath = The object path of the control object. * getProxyTypeFunc = A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. * getProxyTypeUserData = User data to pass to @get_proxy_type_func. * getProxyTypeDestroyNotify = Free function for @get_proxy_type_user_data or %NULL. * cancellable = A #GCancellable or %NULL * * Returns: A * #GDBusObjectManagerClient object or %NULL if @error is set. Free * with g_object_unref(). * * Since: 2.30 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(DBusConnection connection, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable) { GError* err = null; auto p = g_dbus_object_manager_client_new_sync((connection is null) ? null : connection.getDBusConnectionStruct(), flags, Str.toStringz(name), Str.toStringz(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_sync"); } this(cast(GDBusObjectManagerClient*) p, true); } /** * Asynchronously creates a new #GDBusObjectManagerClient object. * * This is an asynchronous failable constructor. When the result is * ready, @callback will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this method from. You can * then call g_dbus_object_manager_client_new_finish() to get the result. See * g_dbus_object_manager_client_new_sync() for the synchronous version. * * Params: * connection = A #GDBusConnection. * flags = Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. * name = The owner of the control object (unique or well-known name). * objectPath = The object path of the control object. * getProxyTypeFunc = A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. * getProxyTypeUserData = User data to pass to @get_proxy_type_func. * getProxyTypeDestroyNotify = Free function for @get_proxy_type_user_data or %NULL. * cancellable = A #GCancellable or %NULL * callback = A #GAsyncReadyCallback to call when the request is satisfied. * userData = The data to pass to @callback. * * Since: 2.30 */ public static void newObjectManagerClient(DBusConnection connection, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_object_manager_client_new((connection is null) ? null : connection.getDBusConnectionStruct(), flags, Str.toStringz(name), Str.toStringz(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a * #GDBusConnection. * * This is an asynchronous failable constructor. When the result is * ready, @callback will be invoked in the * [thread-default main loop][g-main-context-push-thread-default] * of the thread you are calling this method from. You can * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version. * * Params: * busType = A #GBusType. * flags = Zero or more flags from the #GDBusObjectManagerClientFlags enumeration. * name = The owner of the control object (unique or well-known name). * objectPath = The object path of the control object. * getProxyTypeFunc = A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies. * getProxyTypeUserData = User data to pass to @get_proxy_type_func. * getProxyTypeDestroyNotify = Free function for @get_proxy_type_user_data or %NULL. * cancellable = A #GCancellable or %NULL * callback = A #GAsyncReadyCallback to call when the request is satisfied. * userData = The data to pass to @callback. * * Since: 2.30 */ public static void newForBus(GBusType busType, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_object_manager_client_new_for_bus(busType, flags, Str.toStringz(name), Str.toStringz(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Gets the #GDBusConnection used by @manager. * * Returns: A #GDBusConnection object. Do not free, * the object belongs to @manager. * * Since: 2.30 */ public DBusConnection getConnection() { auto p = g_dbus_object_manager_client_get_connection(gDBusObjectManagerClient); if(p is null) { return null; } return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p); } /** * Gets the flags that @manager was constructed with. * * Returns: Zero of more flags from the #GDBusObjectManagerClientFlags * enumeration. * * Since: 2.30 */ public GDBusObjectManagerClientFlags getFlags() { return g_dbus_object_manager_client_get_flags(gDBusObjectManagerClient); } /** * Gets the name that @manager is for, or %NULL if not a message bus * connection. * * Returns: A unique or well-known name. Do not free, the string * belongs to @manager. * * Since: 2.30 */ public string getName() { return Str.toString(g_dbus_object_manager_client_get_name(gDBusObjectManagerClient)); } /** * The unique name that owns the name that @manager is for or %NULL if * no-one currently owns that name. You can connect to the * #GObject::notify signal to track changes to the * #GDBusObjectManagerClient:name-owner property. * * Returns: The name owner or %NULL if no name owner * exists. Free with g_free(). * * Since: 2.30 */ public string getNameOwner() { auto retStr = g_dbus_object_manager_client_get_name_owner(gDBusObjectManagerClient); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } protected class OnInterfaceProxyPropertiesChangedDelegateWrapper { void delegate(DBusObjectProxy, DBusProxy, Variant, string[], DBusObjectManagerClient) dlg; gulong handlerId; this(void delegate(DBusObjectProxy, DBusProxy, Variant, string[], DBusObjectManagerClient) dlg) { this.dlg = dlg; onInterfaceProxyPropertiesChangedListeners ~= this; } void remove(OnInterfaceProxyPropertiesChangedDelegateWrapper source) { foreach(index, wrapper; onInterfaceProxyPropertiesChangedListeners) { if (wrapper.handlerId == source.handlerId) { onInterfaceProxyPropertiesChangedListeners[index] = null; onInterfaceProxyPropertiesChangedListeners = std.algorithm.remove(onInterfaceProxyPropertiesChangedListeners, index); break; } } } } OnInterfaceProxyPropertiesChangedDelegateWrapper[] onInterfaceProxyPropertiesChangedListeners; /** * Emitted when one or more D-Bus properties on proxy changes. The * local cache has already been updated when this signal fires. Note * that both @changed_properties and @invalidated_properties are * guaranteed to never be %NULL (either may be empty though). * * This signal exists purely as a convenience to avoid having to * connect signals to all interface proxies managed by @manager. * * This signal is emitted in the * [thread-default main context][g-main-context-push-thread-default] * that @manager was constructed in. * * Params: * objectProxy = The #GDBusObjectProxy on which an interface has properties that are changing. * interfaceProxy = The #GDBusProxy that has properties that are changing. * changedProperties = A #GVariant containing the properties that changed. * invalidatedProperties = A %NULL terminated array of properties that was invalidated. * * Since: 2.30 */ gulong addOnInterfaceProxyPropertiesChanged(void delegate(DBusObjectProxy, DBusProxy, Variant, string[], DBusObjectManagerClient) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnInterfaceProxyPropertiesChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "interface-proxy-properties-changed", cast(GCallback)&callBackInterfaceProxyPropertiesChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackInterfaceProxyPropertiesChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackInterfaceProxyPropertiesChanged(GDBusObjectManagerClient* dbusobjectmanagerclientStruct, GDBusObjectProxy* objectProxy, GDBusProxy* interfaceProxy, GVariant* changedProperties, char** invalidatedProperties, OnInterfaceProxyPropertiesChangedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DBusObjectProxy)(objectProxy), ObjectG.getDObject!(DBusProxy)(interfaceProxy), new Variant(changedProperties), Str.toStringArray(invalidatedProperties), wrapper.outer); } extern(C) static void callBackInterfaceProxyPropertiesChangedDestroy(OnInterfaceProxyPropertiesChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnInterfaceProxySignalDelegateWrapper { void delegate(DBusObjectProxy, DBusProxy, string, string, Variant, DBusObjectManagerClient) dlg; gulong handlerId; this(void delegate(DBusObjectProxy, DBusProxy, string, string, Variant, DBusObjectManagerClient) dlg) { this.dlg = dlg; onInterfaceProxySignalListeners ~= this; } void remove(OnInterfaceProxySignalDelegateWrapper source) { foreach(index, wrapper; onInterfaceProxySignalListeners) { if (wrapper.handlerId == source.handlerId) { onInterfaceProxySignalListeners[index] = null; onInterfaceProxySignalListeners = std.algorithm.remove(onInterfaceProxySignalListeners, index); break; } } } } OnInterfaceProxySignalDelegateWrapper[] onInterfaceProxySignalListeners; /** * Emitted when a D-Bus signal is received on @interface_proxy. * * This signal exists purely as a convenience to avoid having to * connect signals to all interface proxies managed by @manager. * * This signal is emitted in the * [thread-default main context][g-main-context-push-thread-default] * that @manager was constructed in. * * Params: * objectProxy = The #GDBusObjectProxy on which an interface is emitting a D-Bus signal. * interfaceProxy = The #GDBusProxy that is emitting a D-Bus signal. * senderName = The sender of the signal or NULL if the connection is not a bus connection. * signalName = The signal name. * parameters = A #GVariant tuple with parameters for the signal. * * Since: 2.30 */ gulong addOnInterfaceProxySignal(void delegate(DBusObjectProxy, DBusProxy, string, string, Variant, DBusObjectManagerClient) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnInterfaceProxySignalDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "interface-proxy-signal", cast(GCallback)&callBackInterfaceProxySignal, cast(void*)wrapper, cast(GClosureNotify)&callBackInterfaceProxySignalDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackInterfaceProxySignal(GDBusObjectManagerClient* dbusobjectmanagerclientStruct, GDBusObjectProxy* objectProxy, GDBusProxy* interfaceProxy, char* senderName, char* signalName, GVariant* parameters, OnInterfaceProxySignalDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DBusObjectProxy)(objectProxy), ObjectG.getDObject!(DBusProxy)(interfaceProxy), Str.toString(senderName), Str.toString(signalName), new Variant(parameters), wrapper.outer); } extern(C) static void callBackInterfaceProxySignalDestroy(OnInterfaceProxySignalDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DBusObjectManagerIF.d000066400000000000000000000111451324604450400216730ustar00rootroot00000000000000/* * 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 gio.DBusObjectManagerIF; private import gio.DBusInterfaceIF; private import gio.DBusObjectIF; private import gio.c.functions; public import gio.c.types; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * The #GDBusObjectManager type is the base type for service- and * client-side implementations of the standardized * [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager) * interface. * * See #GDBusObjectManagerClient for the client-side implementation * and #GDBusObjectManagerServer for the service-side implementation. */ public interface DBusObjectManagerIF{ /** Get the main Gtk struct */ public GDBusObjectManager* getDBusObjectManagerStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_dbus_object_manager_get_type(); } /** * Gets the interface proxy for @interface_name at @object_path, if * any. * * Params: * objectPath = Object path to lookup. * interfaceName = D-Bus interface name to lookup. * * Returns: A #GDBusInterface instance or %NULL. Free * with g_object_unref(). * * Since: 2.30 */ public DBusInterfaceIF getInterface(string objectPath, string interfaceName); /** * Gets the #GDBusObjectProxy at @object_path, if any. * * Params: * objectPath = Object path to lookup. * * Returns: A #GDBusObject or %NULL. Free with * g_object_unref(). * * Since: 2.30 */ public DBusObjectIF getObject(string objectPath); /** * Gets the object path that @manager is for. * * Returns: A string owned by @manager. Do not free. * * Since: 2.30 */ public string getObjectPath(); /** * Gets all #GDBusObject objects known to @manager. * * Returns: A list of * #GDBusObject objects. The returned list should be freed with * g_list_free() after each element has been freed with * g_object_unref(). * * Since: 2.30 */ public ListG getObjects(); /** * Emitted when @interface is added to @object. * * This signal exists purely as a convenience to avoid having to * connect signals to all objects managed by @manager. * * Params: * object = The #GDBusObject on which an interface was added. * iface = The #GDBusInterface that was added. * * Since: 2.30 */ gulong addOnInterfaceAdded(void delegate(DBusObjectIF, DBusInterfaceIF, DBusObjectManagerIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Emitted when @interface has been removed from @object. * * This signal exists purely as a convenience to avoid having to * connect signals to all objects managed by @manager. * * Params: * object = The #GDBusObject on which an interface was removed. * iface = The #GDBusInterface that was removed. * * Since: 2.30 */ gulong addOnInterfaceRemoved(void delegate(DBusObjectIF, DBusInterfaceIF, DBusObjectManagerIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Emitted when @object is added to @manager. * * Params: * object = The #GDBusObject that was added. * * Since: 2.30 */ gulong addOnObjectAdded(void delegate(DBusObjectIF, DBusObjectManagerIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Emitted when @object is removed from @manager. * * Params: * object = The #GDBusObject that was removed. * * Since: 2.30 */ gulong addOnObjectRemoved(void delegate(DBusObjectIF, DBusObjectManagerIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/gio/DBusObjectManagerServer.d000066400000000000000000000166311324604450400226500ustar00rootroot00000000000000/* * 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 gio.DBusObjectManagerServer; private import gio.DBusConnection; private import gio.DBusObjectManagerIF; private import gio.DBusObjectManagerT; private import gio.DBusObjectSkeleton; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GDBusObjectManagerServer is used to export #GDBusObject instances using * the standardized * [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager) * interface. For example, remote D-Bus clients can get all objects * and properties in a single call. Additionally, any change in the * object hierarchy is broadcast using signals. This means that D-Bus * clients can keep caches up to date by only listening to D-Bus * signals. * * The recommended path to export an object manager at is the path form of the * well-known name of a D-Bus service, or below. For example, if a D-Bus service * is available at the well-known name `net.example.ExampleService1`, the object * manager should typically be exported at `/net/example/ExampleService1`, or * below (to allow for multiple object managers in a service). * * It is supported, but not recommended, to export an object manager at the root * path, `/`. * * See #GDBusObjectManagerClient for the client-side code that is * intended to be used with #GDBusObjectManagerServer or any D-Bus * object implementing the org.freedesktop.DBus.ObjectManager * interface. * * Since: 2.30 */ public class DBusObjectManagerServer : ObjectG, DBusObjectManagerIF { /** the main Gtk struct */ protected GDBusObjectManagerServer* gDBusObjectManagerServer; /** Get the main Gtk struct */ public GDBusObjectManagerServer* getDBusObjectManagerServerStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusObjectManagerServer; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusObjectManagerServer; } protected override void setStruct(GObject* obj) { gDBusObjectManagerServer = cast(GDBusObjectManagerServer*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusObjectManagerServer* gDBusObjectManagerServer, bool ownedRef = false) { this.gDBusObjectManagerServer = gDBusObjectManagerServer; super(cast(GObject*)gDBusObjectManagerServer, ownedRef); } // add the DBusObjectManager capabilities mixin DBusObjectManagerT!(GDBusObjectManagerServer); /** */ public static GType getType() { return g_dbus_object_manager_server_get_type(); } /** * Creates a new #GDBusObjectManagerServer object. * * The returned server isn't yet exported on any connection. To do so, * use g_dbus_object_manager_server_set_connection(). Normally you * want to export all of your objects before doing so to avoid * [InterfacesAdded](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager) * signals being emitted. * * Params: * objectPath = The object path to export the manager object at. * * Returns: A #GDBusObjectManagerServer object. Free with g_object_unref(). * * Since: 2.30 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string objectPath) { auto p = g_dbus_object_manager_server_new(Str.toStringz(objectPath)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDBusObjectManagerServer*) p, true); } /** * Exports @object on @manager. * * If there is already a #GDBusObject exported at the object path, * then the old object is removed. * * The object path for @object must be in the hierarchy rooted by the * object path for @manager. * * Note that @manager will take a reference on @object for as long as * it is exported. * * Params: * object = A #GDBusObjectSkeleton. * * Since: 2.30 */ public void expor(DBusObjectSkeleton object) { g_dbus_object_manager_server_export(gDBusObjectManagerServer, (object is null) ? null : object.getDBusObjectSkeletonStruct()); } /** * Like g_dbus_object_manager_server_export() but appends a string of * the form _N (with N being a natural number) to @object's object path * if an object with the given path already exists. As such, the * #GDBusObjectProxy:g-object-path property of @object may be modified. * * Params: * object = An object. * * Since: 2.30 */ public void exportUniquely(DBusObjectSkeleton object) { g_dbus_object_manager_server_export_uniquely(gDBusObjectManagerServer, (object is null) ? null : object.getDBusObjectSkeletonStruct()); } /** * Gets the #GDBusConnection used by @manager. * * Returns: A #GDBusConnection object or %NULL if * @manager isn't exported on a connection. The returned object should * be freed with g_object_unref(). * * Since: 2.30 */ public DBusConnection getConnection() { auto p = g_dbus_object_manager_server_get_connection(gDBusObjectManagerServer); if(p is null) { return null; } return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p, true); } /** * Returns whether @object is currently exported on @manager. * * Params: * object = An object. * * Returns: %TRUE if @object is exported * * Since: 2.34 */ public bool isExported(DBusObjectSkeleton object) { return g_dbus_object_manager_server_is_exported(gDBusObjectManagerServer, (object is null) ? null : object.getDBusObjectSkeletonStruct()) != 0; } /** * Exports all objects managed by @manager on @connection. If * @connection is %NULL, stops exporting objects. * * Params: * connection = A #GDBusConnection or %NULL. */ public void setConnection(DBusConnection connection) { g_dbus_object_manager_server_set_connection(gDBusObjectManagerServer, (connection is null) ? null : connection.getDBusConnectionStruct()); } /** * If @manager has an object at @path, removes the object. Otherwise * does nothing. * * Note that @object_path must be in the hierarchy rooted by the * object path for @manager. * * Params: * objectPath = An object path. * * Returns: %TRUE if object at @object_path was removed, %FALSE otherwise. * * Since: 2.30 */ public bool unexport(string objectPath) { return g_dbus_object_manager_server_unexport(gDBusObjectManagerServer, Str.toStringz(objectPath)) != 0; } } GtkD-3.7.5/generated/gtkd/gio/DBusObjectManagerT.d000066400000000000000000000252541324604450400216060ustar00rootroot00000000000000/* * 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 gio.DBusObjectManagerT; public import gio.DBusInterfaceIF; public import gio.DBusObjectIF; public import gio.c.functions; public import gio.c.types; public import glib.ListG; public import glib.Str; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; /** * The #GDBusObjectManager type is the base type for service- and * client-side implementations of the standardized * [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager) * interface. * * See #GDBusObjectManagerClient for the client-side implementation * and #GDBusObjectManagerServer for the service-side implementation. */ public template DBusObjectManagerT(TStruct) { /** Get the main Gtk struct */ public GDBusObjectManager* getDBusObjectManagerStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GDBusObjectManager*)getStruct(); } /** * Gets the interface proxy for @interface_name at @object_path, if * any. * * Params: * objectPath = Object path to lookup. * interfaceName = D-Bus interface name to lookup. * * Returns: A #GDBusInterface instance or %NULL. Free * with g_object_unref(). * * Since: 2.30 */ public DBusInterfaceIF getInterface(string objectPath, string interfaceName) { auto p = g_dbus_object_manager_get_interface(getDBusObjectManagerStruct(), Str.toStringz(objectPath), Str.toStringz(interfaceName)); if(p is null) { return null; } return ObjectG.getDObject!(DBusInterfaceIF)(cast(GDBusInterface*) p, true); } /** * Gets the #GDBusObjectProxy at @object_path, if any. * * Params: * objectPath = Object path to lookup. * * Returns: A #GDBusObject or %NULL. Free with * g_object_unref(). * * Since: 2.30 */ public DBusObjectIF getObject(string objectPath) { auto p = g_dbus_object_manager_get_object(getDBusObjectManagerStruct(), Str.toStringz(objectPath)); if(p is null) { return null; } return ObjectG.getDObject!(DBusObjectIF)(cast(GDBusObject*) p, true); } /** * Gets the object path that @manager is for. * * Returns: A string owned by @manager. Do not free. * * Since: 2.30 */ public string getObjectPath() { return Str.toString(g_dbus_object_manager_get_object_path(getDBusObjectManagerStruct())); } /** * Gets all #GDBusObject objects known to @manager. * * Returns: A list of * #GDBusObject objects. The returned list should be freed with * g_list_free() after each element has been freed with * g_object_unref(). * * Since: 2.30 */ public ListG getObjects() { auto p = g_dbus_object_manager_get_objects(getDBusObjectManagerStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } protected class OnInterfaceAddedDelegateWrapper { void delegate(DBusObjectIF, DBusInterfaceIF, DBusObjectManagerIF) dlg; gulong handlerId; this(void delegate(DBusObjectIF, DBusInterfaceIF, DBusObjectManagerIF) dlg) { this.dlg = dlg; onInterfaceAddedListeners ~= this; } void remove(OnInterfaceAddedDelegateWrapper source) { foreach(index, wrapper; onInterfaceAddedListeners) { if (wrapper.handlerId == source.handlerId) { onInterfaceAddedListeners[index] = null; onInterfaceAddedListeners = std.algorithm.remove(onInterfaceAddedListeners, index); break; } } } } OnInterfaceAddedDelegateWrapper[] onInterfaceAddedListeners; /** * Emitted when @interface is added to @object. * * This signal exists purely as a convenience to avoid having to * connect signals to all objects managed by @manager. * * Params: * object = The #GDBusObject on which an interface was added. * iface = The #GDBusInterface that was added. * * Since: 2.30 */ gulong addOnInterfaceAdded(void delegate(DBusObjectIF, DBusInterfaceIF, DBusObjectManagerIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnInterfaceAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "interface-added", cast(GCallback)&callBackInterfaceAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackInterfaceAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackInterfaceAdded(GDBusObjectManager* dbusobjectmanagerStruct, GDBusObject* object, GDBusInterface* iface, OnInterfaceAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DBusObjectIF)(object), ObjectG.getDObject!(DBusInterfaceIF)(iface), wrapper.outer); } extern(C) static void callBackInterfaceAddedDestroy(OnInterfaceAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnInterfaceRemovedDelegateWrapper { void delegate(DBusObjectIF, DBusInterfaceIF, DBusObjectManagerIF) dlg; gulong handlerId; this(void delegate(DBusObjectIF, DBusInterfaceIF, DBusObjectManagerIF) dlg) { this.dlg = dlg; onInterfaceRemovedListeners ~= this; } void remove(OnInterfaceRemovedDelegateWrapper source) { foreach(index, wrapper; onInterfaceRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onInterfaceRemovedListeners[index] = null; onInterfaceRemovedListeners = std.algorithm.remove(onInterfaceRemovedListeners, index); break; } } } } OnInterfaceRemovedDelegateWrapper[] onInterfaceRemovedListeners; /** * Emitted when @interface has been removed from @object. * * This signal exists purely as a convenience to avoid having to * connect signals to all objects managed by @manager. * * Params: * object = The #GDBusObject on which an interface was removed. * iface = The #GDBusInterface that was removed. * * Since: 2.30 */ gulong addOnInterfaceRemoved(void delegate(DBusObjectIF, DBusInterfaceIF, DBusObjectManagerIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnInterfaceRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "interface-removed", cast(GCallback)&callBackInterfaceRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackInterfaceRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackInterfaceRemoved(GDBusObjectManager* dbusobjectmanagerStruct, GDBusObject* object, GDBusInterface* iface, OnInterfaceRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DBusObjectIF)(object), ObjectG.getDObject!(DBusInterfaceIF)(iface), wrapper.outer); } extern(C) static void callBackInterfaceRemovedDestroy(OnInterfaceRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnObjectAddedDelegateWrapper { void delegate(DBusObjectIF, DBusObjectManagerIF) dlg; gulong handlerId; this(void delegate(DBusObjectIF, DBusObjectManagerIF) dlg) { this.dlg = dlg; onObjectAddedListeners ~= this; } void remove(OnObjectAddedDelegateWrapper source) { foreach(index, wrapper; onObjectAddedListeners) { if (wrapper.handlerId == source.handlerId) { onObjectAddedListeners[index] = null; onObjectAddedListeners = std.algorithm.remove(onObjectAddedListeners, index); break; } } } } OnObjectAddedDelegateWrapper[] onObjectAddedListeners; /** * Emitted when @object is added to @manager. * * Params: * object = The #GDBusObject that was added. * * Since: 2.30 */ gulong addOnObjectAdded(void delegate(DBusObjectIF, DBusObjectManagerIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnObjectAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "object-added", cast(GCallback)&callBackObjectAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackObjectAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackObjectAdded(GDBusObjectManager* dbusobjectmanagerStruct, GDBusObject* object, OnObjectAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DBusObjectIF)(object), wrapper.outer); } extern(C) static void callBackObjectAddedDestroy(OnObjectAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnObjectRemovedDelegateWrapper { void delegate(DBusObjectIF, DBusObjectManagerIF) dlg; gulong handlerId; this(void delegate(DBusObjectIF, DBusObjectManagerIF) dlg) { this.dlg = dlg; onObjectRemovedListeners ~= this; } void remove(OnObjectRemovedDelegateWrapper source) { foreach(index, wrapper; onObjectRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onObjectRemovedListeners[index] = null; onObjectRemovedListeners = std.algorithm.remove(onObjectRemovedListeners, index); break; } } } } OnObjectRemovedDelegateWrapper[] onObjectRemovedListeners; /** * Emitted when @object is removed from @manager. * * Params: * object = The #GDBusObject that was removed. * * Since: 2.30 */ gulong addOnObjectRemoved(void delegate(DBusObjectIF, DBusObjectManagerIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnObjectRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "object-removed", cast(GCallback)&callBackObjectRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackObjectRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackObjectRemoved(GDBusObjectManager* dbusobjectmanagerStruct, GDBusObject* object, OnObjectRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DBusObjectIF)(object), wrapper.outer); } extern(C) static void callBackObjectRemovedDestroy(OnObjectRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DBusObjectProxy.d000066400000000000000000000067501324604450400212310ustar00rootroot00000000000000/* * 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 gio.DBusObjectProxy; private import gio.DBusConnection; private import gio.DBusObjectIF; private import gio.DBusObjectT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * A #GDBusObjectProxy is an object used to represent a remote object * with one or more D-Bus interfaces. Normally, you don't instantiate * a #GDBusObjectProxy yourself - typically #GDBusObjectManagerClient * is used to obtain it. * * Since: 2.30 */ public class DBusObjectProxy : ObjectG, DBusObjectIF { /** the main Gtk struct */ protected GDBusObjectProxy* gDBusObjectProxy; /** Get the main Gtk struct */ public GDBusObjectProxy* getDBusObjectProxyStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusObjectProxy; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusObjectProxy; } protected override void setStruct(GObject* obj) { gDBusObjectProxy = cast(GDBusObjectProxy*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusObjectProxy* gDBusObjectProxy, bool ownedRef = false) { this.gDBusObjectProxy = gDBusObjectProxy; super(cast(GObject*)gDBusObjectProxy, ownedRef); } // add the DBusObject capabilities mixin DBusObjectT!(GDBusObjectProxy); /** */ public static GType getType() { return g_dbus_object_proxy_get_type(); } /** * Creates a new #GDBusObjectProxy for the given connection and * object path. * * Params: * connection = a #GDBusConnection * objectPath = the object path * * Returns: a new #GDBusObjectProxy * * Since: 2.30 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(DBusConnection connection, string objectPath) { auto p = g_dbus_object_proxy_new((connection is null) ? null : connection.getDBusConnectionStruct(), Str.toStringz(objectPath)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDBusObjectProxy*) p, true); } /** * Gets the connection that @proxy is for. * * Returns: A #GDBusConnection. Do not free, the * object is owned by @proxy. * * Since: 2.30 */ public DBusConnection getConnection() { auto p = g_dbus_object_proxy_get_connection(gDBusObjectProxy); if(p is null) { return null; } return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p); } } GtkD-3.7.5/generated/gtkd/gio/DBusObjectSkeleton.d000066400000000000000000000161461324604450400216740ustar00rootroot00000000000000/* * 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 gio.DBusObjectSkeleton; private import gio.DBusInterfaceSkeleton; private import gio.DBusMethodInvocation; private import gio.DBusObjectIF; private import gio.DBusObjectT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * A #GDBusObjectSkeleton instance is essentially a group of D-Bus * interfaces. The set of exported interfaces on the object may be * dynamic and change at runtime. * * This type is intended to be used with #GDBusObjectManager. * * Since: 2.30 */ public class DBusObjectSkeleton : ObjectG, DBusObjectIF { /** the main Gtk struct */ protected GDBusObjectSkeleton* gDBusObjectSkeleton; /** Get the main Gtk struct */ public GDBusObjectSkeleton* getDBusObjectSkeletonStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusObjectSkeleton; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusObjectSkeleton; } protected override void setStruct(GObject* obj) { gDBusObjectSkeleton = cast(GDBusObjectSkeleton*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusObjectSkeleton* gDBusObjectSkeleton, bool ownedRef = false) { this.gDBusObjectSkeleton = gDBusObjectSkeleton; super(cast(GObject*)gDBusObjectSkeleton, ownedRef); } // add the DBusObject capabilities mixin DBusObjectT!(GDBusObjectSkeleton); /** */ public static GType getType() { return g_dbus_object_skeleton_get_type(); } /** * Creates a new #GDBusObjectSkeleton. * * Params: * objectPath = An object path. * * Returns: A #GDBusObjectSkeleton. Free with g_object_unref(). * * Since: 2.30 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string objectPath) { auto p = g_dbus_object_skeleton_new(Str.toStringz(objectPath)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDBusObjectSkeleton*) p, true); } /** * Adds @interface_ to @object. * * If @object already contains a #GDBusInterfaceSkeleton with the same * interface name, it is removed before @interface_ is added. * * Note that @object takes its own reference on @interface_ and holds * it until removed. * * Params: * iface = A #GDBusInterfaceSkeleton. * * Since: 2.30 */ public void addInterface(DBusInterfaceSkeleton iface) { g_dbus_object_skeleton_add_interface(gDBusObjectSkeleton, (iface is null) ? null : iface.getDBusInterfaceSkeletonStruct()); } /** * This method simply calls g_dbus_interface_skeleton_flush() on all * interfaces belonging to @object. See that method for when flushing * is useful. * * Since: 2.30 */ public void flush() { g_dbus_object_skeleton_flush(gDBusObjectSkeleton); } /** * Removes @interface_ from @object. * * Params: * iface = A #GDBusInterfaceSkeleton. * * Since: 2.30 */ public void removeInterface(DBusInterfaceSkeleton iface) { g_dbus_object_skeleton_remove_interface(gDBusObjectSkeleton, (iface is null) ? null : iface.getDBusInterfaceSkeletonStruct()); } /** * Removes the #GDBusInterface with @interface_name from @object. * * If no D-Bus interface of the given interface exists, this function * does nothing. * * Params: * interfaceName = A D-Bus interface name. * * Since: 2.30 */ public void removeInterfaceByName(string interfaceName) { g_dbus_object_skeleton_remove_interface_by_name(gDBusObjectSkeleton, Str.toStringz(interfaceName)); } /** * Sets the object path for @object. * * Params: * objectPath = A valid D-Bus object path. * * Since: 2.30 */ public void setObjectPath(string objectPath) { g_dbus_object_skeleton_set_object_path(gDBusObjectSkeleton, Str.toStringz(objectPath)); } protected class OnAuthorizeMethodDelegateWrapper { bool delegate(DBusInterfaceSkeleton, DBusMethodInvocation, DBusObjectSkeleton) dlg; gulong handlerId; this(bool delegate(DBusInterfaceSkeleton, DBusMethodInvocation, DBusObjectSkeleton) dlg) { this.dlg = dlg; onAuthorizeMethodListeners ~= this; } void remove(OnAuthorizeMethodDelegateWrapper source) { foreach(index, wrapper; onAuthorizeMethodListeners) { if (wrapper.handlerId == source.handlerId) { onAuthorizeMethodListeners[index] = null; onAuthorizeMethodListeners = std.algorithm.remove(onAuthorizeMethodListeners, index); break; } } } } OnAuthorizeMethodDelegateWrapper[] onAuthorizeMethodListeners; /** * Emitted when a method is invoked by a remote caller and used to * determine if the method call is authorized. * * This signal is like #GDBusInterfaceSkeleton's * #GDBusInterfaceSkeleton::g-authorize-method signal, * except that it is for the enclosing object. * * The default class handler just returns %TRUE. * * Params: * iface = The #GDBusInterfaceSkeleton that @invocation is for. * invocation = A #GDBusMethodInvocation. * * Returns: %TRUE if the call is authorized, %FALSE otherwise. * * Since: 2.30 */ gulong addOnAuthorizeMethod(bool delegate(DBusInterfaceSkeleton, DBusMethodInvocation, DBusObjectSkeleton) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAuthorizeMethodDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "authorize-method", cast(GCallback)&callBackAuthorizeMethod, cast(void*)wrapper, cast(GClosureNotify)&callBackAuthorizeMethodDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackAuthorizeMethod(GDBusObjectSkeleton* dbusobjectskeletonStruct, GDBusInterfaceSkeleton* iface, GDBusMethodInvocation* invocation, OnAuthorizeMethodDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(DBusInterfaceSkeleton)(iface), ObjectG.getDObject!(DBusMethodInvocation)(invocation), wrapper.outer); } extern(C) static void callBackAuthorizeMethodDestroy(OnAuthorizeMethodDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DBusObjectT.d000066400000000000000000000141161324604450400203060ustar00rootroot00000000000000/* * 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 gio.DBusObjectT; public import gio.DBusInterfaceIF; public import gio.c.functions; public import gio.c.types; public import glib.ListG; public import glib.Str; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; /** * The #GDBusObject type is the base type for D-Bus objects on both * the service side (see #GDBusObjectSkeleton) and the client side * (see #GDBusObjectProxy). It is essentially just a container of * interfaces. */ public template DBusObjectT(TStruct) { /** Get the main Gtk struct */ public GDBusObject* getDBusObjectStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GDBusObject*)getStruct(); } /** * Gets the D-Bus interface with name @interface_name associated with * @object, if any. * * Params: * interfaceName = A D-Bus interface name. * * Returns: %NULL if not found, otherwise a * #GDBusInterface that must be freed with g_object_unref(). * * Since: 2.30 */ public DBusInterfaceIF getInterface(string interfaceName) { auto p = g_dbus_object_get_interface(getDBusObjectStruct(), Str.toStringz(interfaceName)); if(p is null) { return null; } return ObjectG.getDObject!(DBusInterfaceIF)(cast(GDBusInterface*) p, true); } /** * Gets the D-Bus interfaces associated with @object. * * Returns: A list of #GDBusInterface instances. * The returned list must be freed by g_list_free() after each element has been freed * with g_object_unref(). * * Since: 2.30 */ public ListG getInterfaces() { auto p = g_dbus_object_get_interfaces(getDBusObjectStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Gets the object path for @object. * * Returns: A string owned by @object. Do not free. * * Since: 2.30 */ public string getObjectPath() { return Str.toString(g_dbus_object_get_object_path(getDBusObjectStruct())); } protected class OnInterfaceAddedDelegateWrapper { void delegate(DBusInterfaceIF, DBusObjectIF) dlg; gulong handlerId; this(void delegate(DBusInterfaceIF, DBusObjectIF) dlg) { this.dlg = dlg; onInterfaceAddedListeners ~= this; } void remove(OnInterfaceAddedDelegateWrapper source) { foreach(index, wrapper; onInterfaceAddedListeners) { if (wrapper.handlerId == source.handlerId) { onInterfaceAddedListeners[index] = null; onInterfaceAddedListeners = std.algorithm.remove(onInterfaceAddedListeners, index); break; } } } } OnInterfaceAddedDelegateWrapper[] onInterfaceAddedListeners; /** * Emitted when @interface is added to @object. * * Params: * iface = The #GDBusInterface that was added. * * Since: 2.30 */ gulong addOnInterfaceAdded(void delegate(DBusInterfaceIF, DBusObjectIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnInterfaceAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "interface-added", cast(GCallback)&callBackInterfaceAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackInterfaceAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackInterfaceAdded(GDBusObject* dbusobjectStruct, GDBusInterface* iface, OnInterfaceAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DBusInterfaceIF)(iface), wrapper.outer); } extern(C) static void callBackInterfaceAddedDestroy(OnInterfaceAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnInterfaceRemovedDelegateWrapper { void delegate(DBusInterfaceIF, DBusObjectIF) dlg; gulong handlerId; this(void delegate(DBusInterfaceIF, DBusObjectIF) dlg) { this.dlg = dlg; onInterfaceRemovedListeners ~= this; } void remove(OnInterfaceRemovedDelegateWrapper source) { foreach(index, wrapper; onInterfaceRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onInterfaceRemovedListeners[index] = null; onInterfaceRemovedListeners = std.algorithm.remove(onInterfaceRemovedListeners, index); break; } } } } OnInterfaceRemovedDelegateWrapper[] onInterfaceRemovedListeners; /** * Emitted when @interface is removed from @object. * * Params: * iface = The #GDBusInterface that was removed. * * Since: 2.30 */ gulong addOnInterfaceRemoved(void delegate(DBusInterfaceIF, DBusObjectIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnInterfaceRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "interface-removed", cast(GCallback)&callBackInterfaceRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackInterfaceRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackInterfaceRemoved(GDBusObject* dbusobjectStruct, GDBusInterface* iface, OnInterfaceRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DBusInterfaceIF)(iface), wrapper.outer); } extern(C) static void callBackInterfaceRemovedDestroy(OnInterfaceRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DBusPropertyInfo.d000066400000000000000000000111711324604450400214120ustar00rootroot00000000000000/* * 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 gio.DBusPropertyInfo; private import gio.DBusAnnotationInfo; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Information about a D-Bus property on a D-Bus interface. * * Since: 2.26 */ public final class DBusPropertyInfo { /** the main Gtk struct */ protected GDBusPropertyInfo* gDBusPropertyInfo; protected bool ownedRef; /** Get the main Gtk struct */ public GDBusPropertyInfo* getDBusPropertyInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusPropertyInfo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDBusPropertyInfo; } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusPropertyInfo* gDBusPropertyInfo, bool ownedRef = false) { this.gDBusPropertyInfo = gDBusPropertyInfo; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_dbus_property_info_unref(gDBusPropertyInfo); } /** * The reference count or -1 if statically allocated. */ public @property int refCount() { return gDBusPropertyInfo.refCount; } /** Ditto */ public @property void refCount(int value) { gDBusPropertyInfo.refCount = value; } /** * The name of the D-Bus property, e.g. "SupportedFilesystems". */ public @property string name() { return Str.toString(gDBusPropertyInfo.name); } /** Ditto */ public @property void name(string value) { gDBusPropertyInfo.name = Str.toStringz(value); } /** * The D-Bus signature of the property (a single complete type). */ public @property string signature() { return Str.toString(gDBusPropertyInfo.signature); } /** Ditto */ public @property void signature(string value) { gDBusPropertyInfo.signature = Str.toStringz(value); } /** * Access control flags for the property. */ public @property GDBusPropertyInfoFlags flags() { return gDBusPropertyInfo.flags; } /** Ditto */ public @property void flags(GDBusPropertyInfoFlags value) { gDBusPropertyInfo.flags = value; } /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ public @property DBusAnnotationInfo[] annotations() { DBusAnnotationInfo[] arr = new DBusAnnotationInfo[getArrayLength(gDBusPropertyInfo.annotations)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusAnnotationInfo)(gDBusPropertyInfo.annotations[i], false); } return arr; } /** Ditto */ public @property void annotations(DBusAnnotationInfo[] value) { GDBusAnnotationInfo*[] arr = new GDBusAnnotationInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusAnnotationInfoStruct(); } arr[value.length] = null; gDBusPropertyInfo.annotations = arr.ptr; } /** */ public static GType getType() { return g_dbus_property_info_get_type(); } /** * If @info is statically allocated does nothing. Otherwise increases * the reference count. * * Returns: The same @info. * * Since: 2.26 */ public DBusPropertyInfo doref() { auto p = g_dbus_property_info_ref(gDBusPropertyInfo); if(p is null) { return null; } return ObjectG.getDObject!(DBusPropertyInfo)(cast(GDBusPropertyInfo*) p, true); } /** * If @info is statically allocated, does nothing. Otherwise decreases * the reference count of @info. When its reference count drops to 0, * the memory used is freed. * * Since: 2.26 */ public void unref() { g_dbus_property_info_unref(gDBusPropertyInfo); } } GtkD-3.7.5/generated/gtkd/gio/DBusProxy.d000066400000000000000000001017371324604450400201030ustar00rootroot00000000000000/* * 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 gio.DBusProxy; private import gio.AsyncInitableIF; private import gio.AsyncInitableT; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.DBusConnection; private import gio.DBusInterfaceIF; private import gio.DBusInterfaceInfo; private import gio.DBusInterfaceT; private import gio.InitableIF; private import gio.InitableT; private import gio.UnixFDList; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GDBusProxy is a base class used for proxies to access a D-Bus * interface on a remote object. A #GDBusProxy can be constructed for * both well-known and unique names. * * By default, #GDBusProxy will cache all properties (and listen to * changes) of the remote object, and proxy all signals that gets * emitted. This behaviour can be changed by passing suitable * #GDBusProxyFlags when the proxy is created. If the proxy is for a * well-known name, the property cache is flushed when the name owner * vanishes and reloaded when a name owner appears. * * If a #GDBusProxy is used for a well-known name, the owner of the * name is tracked and can be read from * #GDBusProxy:g-name-owner. Connect to the #GObject::notify signal to * get notified of changes. Additionally, only signals and property * changes emitted from the current name owner are considered and * calls are always sent to the current name owner. This avoids a * number of race conditions when the name is lost by one owner and * claimed by another. However, if no name owner currently exists, * then calls will be sent to the well-known name which may result in * the message bus launching an owner (unless * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is set). * * The generic #GDBusProxy::g-properties-changed and * #GDBusProxy::g-signal signals are not very convenient to work with. * Therefore, the recommended way of working with proxies is to subclass * #GDBusProxy, and have more natural properties and signals in your derived * class. This [example][gdbus-example-gdbus-codegen] shows how this can * easily be done using the [gdbus-codegen][gdbus-codegen] tool. * * A #GDBusProxy instance can be used from multiple threads but note * that all signals (e.g. #GDBusProxy::g-signal, #GDBusProxy::g-properties-changed * and #GObject::notify) are emitted in the * [thread-default main context][g-main-context-push-thread-default] * of the thread where the instance was constructed. * * An example using a proxy for a well-known name can be found in * [gdbus-example-watch-proxy.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-watch-proxy.c) * * Since: 2.26 */ public class DBusProxy : ObjectG, AsyncInitableIF, DBusInterfaceIF, InitableIF { /** the main Gtk struct */ protected GDBusProxy* gDBusProxy; /** Get the main Gtk struct */ public GDBusProxy* getDBusProxyStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusProxy; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusProxy; } protected override void setStruct(GObject* obj) { gDBusProxy = cast(GDBusProxy*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusProxy* gDBusProxy, bool ownedRef = false) { this.gDBusProxy = gDBusProxy; super(cast(GObject*)gDBusProxy, ownedRef); } // add the AsyncInitable capabilities mixin AsyncInitableT!(GDBusProxy); // add the DBusInterface capabilities mixin DBusInterfaceT!(GDBusProxy); // add the Initable capabilities mixin InitableT!(GDBusProxy); /** * Finishes creating a GDBusProxy. * * Params: * res = A GAsyncResult obtained from the GAsyncReadyCallback * function passed to g_dbus_proxy_new(). * forBus = If true finish an address. * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. * * Since: 2.26 */ public this (AsyncResultIF res, bool forBus = false) { GError* err = null; GDBusProxy* p; if ( forBus ) { p = g_dbus_proxy_new_for_bus_finish((res is null) ? null : res.getAsyncResultStruct(), &err); } else { p = g_dbus_proxy_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err); } if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by g_dbus_proxy_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err)"); } this(p, true); } /** */ /** */ public static GType getType() { return g_dbus_proxy_get_type(); } /** * Like g_dbus_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection. * * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. * * Params: * busType = A #GBusType. * flags = Flags used when constructing the proxy. * info = A #GDBusInterfaceInfo specifying the minimal interface * that @proxy conforms to or %NULL. * name = A bus name (well-known or unique). * objectPath = An object path. * interfaceName = A D-Bus interface name. * cancellable = A #GCancellable or %NULL. * * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(GBusType busType, GDBusProxyFlags flags, DBusInterfaceInfo info, string name, string objectPath, string interfaceName, Cancellable cancellable) { GError* err = null; auto p = g_dbus_proxy_new_for_bus_sync(busType, flags, (info is null) ? null : info.getDBusInterfaceInfoStruct(), Str.toStringz(name), Str.toStringz(objectPath), Str.toStringz(interfaceName), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_for_bus_sync"); } this(cast(GDBusProxy*) p, true); } /** * Creates a proxy for accessing @interface_name on the remote object * at @object_path owned by @name at @connection and synchronously * loads D-Bus properties unless the * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. * * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up * match rules for signals. Connect to the #GDBusProxy::g-signal signal * to handle signals from the remote object. * * If @name is a well-known name and the * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION * flags aren't set and no name owner currently exists, the message bus * will be requested to launch a name owner for the name. * * This is a synchronous failable constructor. See g_dbus_proxy_new() * and g_dbus_proxy_new_finish() for the asynchronous version. * * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. * * Params: * connection = A #GDBusConnection. * flags = Flags used when constructing the proxy. * info = A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL. * name = A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. * objectPath = An object path. * interfaceName = A D-Bus interface name. * cancellable = A #GCancellable or %NULL. * * Returns: A #GDBusProxy or %NULL if error is set. Free with g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(DBusConnection connection, GDBusProxyFlags flags, DBusInterfaceInfo info, string name, string objectPath, string interfaceName, Cancellable cancellable) { GError* err = null; auto p = g_dbus_proxy_new_sync((connection is null) ? null : connection.getDBusConnectionStruct(), flags, (info is null) ? null : info.getDBusInterfaceInfoStruct(), Str.toStringz(name), Str.toStringz(objectPath), Str.toStringz(interfaceName), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_sync"); } this(cast(GDBusProxy*) p, true); } /** * Creates a proxy for accessing @interface_name on the remote object * at @object_path owned by @name at @connection and asynchronously * loads D-Bus properties unless the * %G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. Connect to * the #GDBusProxy::g-properties-changed signal to get notified about * property changes. * * If the %G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up * match rules for signals. Connect to the #GDBusProxy::g-signal signal * to handle signals from the remote object. * * If @name is a well-known name and the * %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START and %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION * flags aren't set and no name owner currently exists, the message bus * will be requested to launch a name owner for the name. * * This is a failable asynchronous constructor - when the proxy is * ready, @callback will be invoked and you can use * g_dbus_proxy_new_finish() to get the result. * * See g_dbus_proxy_new_sync() and for a synchronous version of this constructor. * * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. * * Params: * connection = A #GDBusConnection. * flags = Flags used when constructing the proxy. * info = A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL. * name = A bus name (well-known or unique) or %NULL if @connection is not a message bus connection. * objectPath = An object path. * interfaceName = A D-Bus interface name. * cancellable = A #GCancellable or %NULL. * callback = Callback function to invoke when the proxy is ready. * userData = User data to pass to @callback. * * Since: 2.26 */ public static void newProxy(DBusConnection connection, GDBusProxyFlags flags, DBusInterfaceInfo info, string name, string objectPath, string interfaceName, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_proxy_new((connection is null) ? null : connection.getDBusConnectionStruct(), flags, (info is null) ? null : info.getDBusInterfaceInfoStruct(), Str.toStringz(name), Str.toStringz(objectPath), Str.toStringz(interfaceName), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Like g_dbus_proxy_new() but takes a #GBusType instead of a #GDBusConnection. * * #GDBusProxy is used in this [example][gdbus-wellknown-proxy]. * * Params: * busType = A #GBusType. * flags = Flags used when constructing the proxy. * info = A #GDBusInterfaceInfo specifying the minimal interface that @proxy conforms to or %NULL. * name = A bus name (well-known or unique). * objectPath = An object path. * interfaceName = A D-Bus interface name. * cancellable = A #GCancellable or %NULL. * callback = Callback function to invoke when the proxy is ready. * userData = User data to pass to @callback. * * Since: 2.26 */ public static void newForBus(GBusType busType, GDBusProxyFlags flags, DBusInterfaceInfo info, string name, string objectPath, string interfaceName, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_proxy_new_for_bus(busType, flags, (info is null) ? null : info.getDBusInterfaceInfoStruct(), Str.toStringz(name), Str.toStringz(objectPath), Str.toStringz(interfaceName), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Asynchronously invokes the @method_name method on @proxy. * * If @method_name contains any dots, then @name is split into interface and * method name parts. This allows using @proxy for invoking methods on * other interfaces. * * If the #GDBusConnection associated with @proxy is closed then * the operation will fail with %G_IO_ERROR_CLOSED. If * @cancellable is canceled, the operation will fail with * %G_IO_ERROR_CANCELLED. If @parameters contains a value not * compatible with the D-Bus protocol, the operation fails with * %G_IO_ERROR_INVALID_ARGUMENT. * * If the @parameters #GVariant is floating, it is consumed. This allows * convenient 'inline' use of g_variant_new(), e.g.: * |[ * g_dbus_proxy_call (proxy, * "TwoStrings", * g_variant_new ("(ss)", * "Thing One", * "Thing Two"), * G_DBUS_CALL_FLAGS_NONE, * -1, * NULL, * (GAsyncReadyCallback) two_strings_done, * &data); * ]| * * If @proxy has an expected interface (see * #GDBusProxy:g-interface-info) and @method_name is referenced by it, * then the return value is checked against the return type. * * This is an asynchronous method. When the operation is finished, * @callback will be invoked in the * [thread-default main context][g-main-context-push-thread-default] * of the thread you are calling this method from. * You can then call g_dbus_proxy_call_finish() to get the result of * the operation. See g_dbus_proxy_call_sync() for the synchronous * version of this method. * * If @callback is %NULL then the D-Bus method call message will be sent with * the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set. * * Params: * methodName = Name of method to invoke. * parameters = A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. * flags = Flags from the #GDBusCallFlags enumeration. * timeoutMsec = The timeout in milliseconds (with %G_MAXINT meaning * "infinite") or -1 to use the proxy default timeout. * cancellable = A #GCancellable or %NULL. * callback = A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * userData = The data to pass to @callback. * * Since: 2.26 */ public void call(string methodName, Variant parameters, GDBusCallFlags flags, int timeoutMsec, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_proxy_call(gDBusProxy, Str.toStringz(methodName), (parameters is null) ? null : parameters.getVariantStruct(), flags, timeoutMsec, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_dbus_proxy_call(). * * Params: * res = A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call(). * * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with * return values. Free with g_variant_unref(). * * Since: 2.26 * * Throws: GException on failure. */ public Variant callFinish(AsyncResultIF res) { GError* err = null; auto p = g_dbus_proxy_call_finish(gDBusProxy, (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Synchronously invokes the @method_name method on @proxy. * * If @method_name contains any dots, then @name is split into interface and * method name parts. This allows using @proxy for invoking methods on * other interfaces. * * If the #GDBusConnection associated with @proxy is disconnected then * the operation will fail with %G_IO_ERROR_CLOSED. If * @cancellable is canceled, the operation will fail with * %G_IO_ERROR_CANCELLED. If @parameters contains a value not * compatible with the D-Bus protocol, the operation fails with * %G_IO_ERROR_INVALID_ARGUMENT. * * If the @parameters #GVariant is floating, it is consumed. This allows * convenient 'inline' use of g_variant_new(), e.g.: * |[ * g_dbus_proxy_call_sync (proxy, * "TwoStrings", * g_variant_new ("(ss)", * "Thing One", * "Thing Two"), * G_DBUS_CALL_FLAGS_NONE, * -1, * NULL, * &error); * ]| * * The calling thread is blocked until a reply is received. See * g_dbus_proxy_call() for the asynchronous version of this * method. * * If @proxy has an expected interface (see * #GDBusProxy:g-interface-info) and @method_name is referenced by it, * then the return value is checked against the return type. * * Params: * methodName = Name of method to invoke. * parameters = A #GVariant tuple with parameters for the signal * or %NULL if not passing parameters. * flags = Flags from the #GDBusCallFlags enumeration. * timeoutMsec = The timeout in milliseconds (with %G_MAXINT meaning * "infinite") or -1 to use the proxy default timeout. * cancellable = A #GCancellable or %NULL. * * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with * return values. Free with g_variant_unref(). * * Since: 2.26 * * Throws: GException on failure. */ public Variant callSync(string methodName, Variant parameters, GDBusCallFlags flags, int timeoutMsec, Cancellable cancellable) { GError* err = null; auto p = g_dbus_proxy_call_sync(gDBusProxy, Str.toStringz(methodName), (parameters is null) ? null : parameters.getVariantStruct(), flags, timeoutMsec, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Like g_dbus_proxy_call() but also takes a #GUnixFDList object. * * This method is only available on UNIX. * * Params: * methodName = Name of method to invoke. * parameters = A #GVariant tuple with parameters for the signal or %NULL if not passing parameters. * flags = Flags from the #GDBusCallFlags enumeration. * timeoutMsec = The timeout in milliseconds (with %G_MAXINT meaning * "infinite") or -1 to use the proxy default timeout. * fdList = A #GUnixFDList or %NULL. * cancellable = A #GCancellable or %NULL. * callback = A #GAsyncReadyCallback to call when the request is satisfied or %NULL if you don't * care about the result of the method invocation. * userData = The data to pass to @callback. * * Since: 2.30 */ public void callWithUnixFdList(string methodName, Variant parameters, GDBusCallFlags flags, int timeoutMsec, UnixFDList fdList, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_proxy_call_with_unix_fd_list(gDBusProxy, Str.toStringz(methodName), (parameters is null) ? null : parameters.getVariantStruct(), flags, timeoutMsec, (fdList is null) ? null : fdList.getUnixFDListStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_dbus_proxy_call_with_unix_fd_list(). * * Params: * outFdList = Return location for a #GUnixFDList or %NULL. * res = A #GAsyncResult obtained from the #GAsyncReadyCallback passed to g_dbus_proxy_call_with_unix_fd_list(). * * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with * return values. Free with g_variant_unref(). * * Since: 2.30 * * Throws: GException on failure. */ public Variant callWithUnixFdListFinish(out UnixFDList outFdList, AsyncResultIF res) { GUnixFDList* outoutFdList = null; GError* err = null; auto p = g_dbus_proxy_call_with_unix_fd_list_finish(gDBusProxy, &outoutFdList, (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } outFdList = ObjectG.getDObject!(UnixFDList)(outoutFdList); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Like g_dbus_proxy_call_sync() but also takes and returns #GUnixFDList objects. * * This method is only available on UNIX. * * Params: * methodName = Name of method to invoke. * parameters = A #GVariant tuple with parameters for the signal * or %NULL if not passing parameters. * flags = Flags from the #GDBusCallFlags enumeration. * timeoutMsec = The timeout in milliseconds (with %G_MAXINT meaning * "infinite") or -1 to use the proxy default timeout. * fdList = A #GUnixFDList or %NULL. * outFdList = Return location for a #GUnixFDList or %NULL. * cancellable = A #GCancellable or %NULL. * * Returns: %NULL if @error is set. Otherwise a #GVariant tuple with * return values. Free with g_variant_unref(). * * Since: 2.30 * * Throws: GException on failure. */ public Variant callWithUnixFdListSync(string methodName, Variant parameters, GDBusCallFlags flags, int timeoutMsec, UnixFDList fdList, out UnixFDList outFdList, Cancellable cancellable) { GUnixFDList* outoutFdList = null; GError* err = null; auto p = g_dbus_proxy_call_with_unix_fd_list_sync(gDBusProxy, Str.toStringz(methodName), (parameters is null) ? null : parameters.getVariantStruct(), flags, timeoutMsec, (fdList is null) ? null : fdList.getUnixFDListStruct(), &outoutFdList, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } outFdList = ObjectG.getDObject!(UnixFDList)(outoutFdList); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Looks up the value for a property from the cache. This call does no * blocking IO. * * If @proxy has an expected interface (see * #GDBusProxy:g-interface-info) and @property_name is referenced by * it, then @value is checked against the type of the property. * * Params: * propertyName = Property name. * * Returns: A reference to the #GVariant instance that holds the value * for @property_name or %NULL if the value is not in the cache. The * returned reference must be freed with g_variant_unref(). * * Since: 2.26 */ public Variant getCachedProperty(string propertyName) { auto p = g_dbus_proxy_get_cached_property(gDBusProxy, Str.toStringz(propertyName)); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets the names of all cached properties on @proxy. * * Returns: A %NULL-terminated array of strings or %NULL if * @proxy has no cached properties. Free the returned array with * g_strfreev(). * * Since: 2.26 */ public string[] getCachedPropertyNames() { auto retStr = g_dbus_proxy_get_cached_property_names(gDBusProxy); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Gets the connection @proxy is for. * * Returns: A #GDBusConnection owned by @proxy. Do not free. * * Since: 2.26 */ public DBusConnection getConnection() { auto p = g_dbus_proxy_get_connection(gDBusProxy); if(p is null) { return null; } return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p); } /** * Gets the timeout to use if -1 (specifying default timeout) is * passed as @timeout_msec in the g_dbus_proxy_call() and * g_dbus_proxy_call_sync() functions. * * See the #GDBusProxy:g-default-timeout property for more details. * * Returns: Timeout to use for @proxy. * * Since: 2.26 */ public int getDefaultTimeout() { return g_dbus_proxy_get_default_timeout(gDBusProxy); } /** * Gets the flags that @proxy was constructed with. * * Returns: Flags from the #GDBusProxyFlags enumeration. * * Since: 2.26 */ public GDBusProxyFlags getFlags() { return g_dbus_proxy_get_flags(gDBusProxy); } /** * Returns the #GDBusInterfaceInfo, if any, specifying the interface * that @proxy conforms to. See the #GDBusProxy:g-interface-info * property for more details. * * Returns: A #GDBusInterfaceInfo or %NULL. Do not unref the returned * object, it is owned by @proxy. * * Since: 2.26 */ public DBusInterfaceInfo getInterfaceInfo() { auto p = g_dbus_proxy_get_interface_info(gDBusProxy); if(p is null) { return null; } return ObjectG.getDObject!(DBusInterfaceInfo)(cast(GDBusInterfaceInfo*) p, true); } /** * Gets the D-Bus interface name @proxy is for. * * Returns: A string owned by @proxy. Do not free. * * Since: 2.26 */ public string getInterfaceName() { return Str.toString(g_dbus_proxy_get_interface_name(gDBusProxy)); } /** * Gets the name that @proxy was constructed for. * * Returns: A string owned by @proxy. Do not free. * * Since: 2.26 */ public string getName() { return Str.toString(g_dbus_proxy_get_name(gDBusProxy)); } /** * The unique name that owns the name that @proxy is for or %NULL if * no-one currently owns that name. You may connect to the * #GObject::notify signal to track changes to the * #GDBusProxy:g-name-owner property. * * Returns: The name owner or %NULL if no name owner exists. Free with g_free(). * * Since: 2.26 */ public string getNameOwner() { auto retStr = g_dbus_proxy_get_name_owner(gDBusProxy); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the object path @proxy is for. * * Returns: A string owned by @proxy. Do not free. * * Since: 2.26 */ public string getObjectPath() { return Str.toString(g_dbus_proxy_get_object_path(gDBusProxy)); } /** * If @value is not %NULL, sets the cached value for the property with * name @property_name to the value in @value. * * If @value is %NULL, then the cached value is removed from the * property cache. * * If @proxy has an expected interface (see * #GDBusProxy:g-interface-info) and @property_name is referenced by * it, then @value is checked against the type of the property. * * If the @value #GVariant is floating, it is consumed. This allows * convenient 'inline' use of g_variant_new(), e.g. * |[ * g_dbus_proxy_set_cached_property (proxy, * "SomeProperty", * g_variant_new ("(si)", * "A String", * 42)); * ]| * * Normally you will not need to use this method since @proxy * is tracking changes using the * `org.freedesktop.DBus.Properties.PropertiesChanged` * D-Bus signal. However, for performance reasons an object may * decide to not use this signal for some properties and instead * use a proprietary out-of-band mechanism to transmit changes. * * As a concrete example, consider an object with a property * `ChatroomParticipants` which is an array of strings. Instead of * transmitting the same (long) array every time the property changes, * it is more efficient to only transmit the delta using e.g. signals * `ChatroomParticipantJoined(String name)` and * `ChatroomParticipantParted(String name)`. * * Params: * propertyName = Property name. * value = Value for the property or %NULL to remove it from the cache. * * Since: 2.26 */ public void setCachedProperty(string propertyName, Variant value) { g_dbus_proxy_set_cached_property(gDBusProxy, Str.toStringz(propertyName), (value is null) ? null : value.getVariantStruct()); } /** * Sets the timeout to use if -1 (specifying default timeout) is * passed as @timeout_msec in the g_dbus_proxy_call() and * g_dbus_proxy_call_sync() functions. * * See the #GDBusProxy:g-default-timeout property for more details. * * Params: * timeoutMsec = Timeout in milliseconds. * * Since: 2.26 */ public void setDefaultTimeout(int timeoutMsec) { g_dbus_proxy_set_default_timeout(gDBusProxy, timeoutMsec); } /** * Ensure that interactions with @proxy conform to the given * interface. See the #GDBusProxy:g-interface-info property for more * details. * * Params: * info = Minimum interface this proxy conforms to or %NULL to unset. * * Since: 2.26 */ public void setInterfaceInfo(DBusInterfaceInfo info) { g_dbus_proxy_set_interface_info(gDBusProxy, (info is null) ? null : info.getDBusInterfaceInfoStruct()); } protected class OnGPropertiesChangedDelegateWrapper { void delegate(Variant, string[], DBusProxy) dlg; gulong handlerId; this(void delegate(Variant, string[], DBusProxy) dlg) { this.dlg = dlg; onGPropertiesChangedListeners ~= this; } void remove(OnGPropertiesChangedDelegateWrapper source) { foreach(index, wrapper; onGPropertiesChangedListeners) { if (wrapper.handlerId == source.handlerId) { onGPropertiesChangedListeners[index] = null; onGPropertiesChangedListeners = std.algorithm.remove(onGPropertiesChangedListeners, index); break; } } } } OnGPropertiesChangedDelegateWrapper[] onGPropertiesChangedListeners; /** * Emitted when one or more D-Bus properties on @proxy changes. The * local cache has already been updated when this signal fires. Note * that both @changed_properties and @invalidated_properties are * guaranteed to never be %NULL (either may be empty though). * * If the proxy has the flag * %G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES set, then * @invalidated_properties will always be empty. * * This signal corresponds to the * `PropertiesChanged` D-Bus signal on the * `org.freedesktop.DBus.Properties` interface. * * Params: * changedProperties = A #GVariant containing the properties that changed * invalidatedProperties = A %NULL terminated array of properties that was invalidated * * Since: 2.26 */ gulong addOnGPropertiesChanged(void delegate(Variant, string[], DBusProxy) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnGPropertiesChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "g-properties-changed", cast(GCallback)&callBackGPropertiesChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackGPropertiesChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackGPropertiesChanged(GDBusProxy* dbusproxyStruct, GVariant* changedProperties, char** invalidatedProperties, OnGPropertiesChangedDelegateWrapper wrapper) { wrapper.dlg(new Variant(changedProperties), Str.toStringArray(invalidatedProperties), wrapper.outer); } extern(C) static void callBackGPropertiesChangedDestroy(OnGPropertiesChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnGSignalDelegateWrapper { void delegate(string, string, Variant, DBusProxy) dlg; gulong handlerId; this(void delegate(string, string, Variant, DBusProxy) dlg) { this.dlg = dlg; onGSignalListeners ~= this; } void remove(OnGSignalDelegateWrapper source) { foreach(index, wrapper; onGSignalListeners) { if (wrapper.handlerId == source.handlerId) { onGSignalListeners[index] = null; onGSignalListeners = std.algorithm.remove(onGSignalListeners, index); break; } } } } OnGSignalDelegateWrapper[] onGSignalListeners; /** * Emitted when a signal from the remote object and interface that @proxy is for, has been received. * * Params: * senderName = The sender of the signal or %NULL if the connection is not a bus connection. * signalName = The name of the signal. * parameters = A #GVariant tuple with parameters for the signal. * * Since: 2.26 */ gulong addOnGSignal(void delegate(string, string, Variant, DBusProxy) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnGSignalDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "g-signal", cast(GCallback)&callBackGSignal, cast(void*)wrapper, cast(GClosureNotify)&callBackGSignalDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackGSignal(GDBusProxy* dbusproxyStruct, char* senderName, char* signalName, GVariant* parameters, OnGSignalDelegateWrapper wrapper) { wrapper.dlg(Str.toString(senderName), Str.toString(signalName), new Variant(parameters), wrapper.outer); } extern(C) static void callBackGSignalDestroy(OnGSignalDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DBusServer.d000066400000000000000000000210551324604450400202220ustar00rootroot00000000000000/* * 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 gio.DBusServer; private import gio.Cancellable; private import gio.DBusAuthObserver; private import gio.DBusConnection; private import gio.InitableIF; private import gio.InitableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GDBusServer is a helper for listening to and accepting D-Bus * connections. This can be used to create a new D-Bus server, allowing two * peers to use the D-Bus protocol for their own specialized communication. * A server instance provided in this way will not perform message routing or * implement the org.freedesktop.DBus interface. * * To just export an object on a well-known name on a message bus, such as the * session or system bus, you should instead use g_bus_own_name(). * * An example of peer-to-peer communication with G-DBus can be found * in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-peer.c). * * Since: 2.26 */ public class DBusServer : ObjectG, InitableIF { /** the main Gtk struct */ protected GDBusServer* gDBusServer; /** Get the main Gtk struct */ public GDBusServer* getDBusServerStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusServer; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDBusServer; } protected override void setStruct(GObject* obj) { gDBusServer = cast(GDBusServer*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusServer* gDBusServer, bool ownedRef = false) { this.gDBusServer = gDBusServer; super(cast(GObject*)gDBusServer, ownedRef); } // add the Initable capabilities mixin InitableT!(GDBusServer); /** */ public static GType getType() { return g_dbus_server_get_type(); } /** * Creates a new D-Bus server that listens on the first address in * @address that works. * * Once constructed, you can use g_dbus_server_get_client_address() to * get a D-Bus address string that clients can use to connect. * * Connect to the #GDBusServer::new-connection signal to handle * incoming connections. * * The returned #GDBusServer isn't active - you have to start it with * g_dbus_server_start(). * * #GDBusServer is used in this [example][gdbus-peer-to-peer]. * * This is a synchronous failable constructor. See * g_dbus_server_new() for the asynchronous version. * * Params: * address = A D-Bus address. * flags = Flags from the #GDBusServerFlags enumeration. * guid = A D-Bus GUID. * observer = A #GDBusAuthObserver or %NULL. * cancellable = A #GCancellable or %NULL. * * Returns: A #GDBusServer or %NULL if @error is set. Free with * g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string address, GDBusServerFlags flags, string guid, DBusAuthObserver observer, Cancellable cancellable) { GError* err = null; auto p = g_dbus_server_new_sync(Str.toStringz(address), flags, Str.toStringz(guid), (observer is null) ? null : observer.getDBusAuthObserverStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_sync"); } this(cast(GDBusServer*) p, true); } /** * Gets a * [D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses) * string that can be used by clients to connect to @server. * * Returns: A D-Bus address string. Do not free, the string is owned * by @server. * * Since: 2.26 */ public string getClientAddress() { return Str.toString(g_dbus_server_get_client_address(gDBusServer)); } /** * Gets the flags for @server. * * Returns: A set of flags from the #GDBusServerFlags enumeration. * * Since: 2.26 */ public GDBusServerFlags getFlags() { return g_dbus_server_get_flags(gDBusServer); } /** * Gets the GUID for @server. * * Returns: A D-Bus GUID. Do not free this string, it is owned by @server. * * Since: 2.26 */ public string getGuid() { return Str.toString(g_dbus_server_get_guid(gDBusServer)); } /** * Gets whether @server is active. * * Returns: %TRUE if server is active, %FALSE otherwise. * * Since: 2.26 */ public bool isActive() { return g_dbus_server_is_active(gDBusServer) != 0; } /** * Starts @server. * * Since: 2.26 */ public void start() { g_dbus_server_start(gDBusServer); } /** * Stops @server. * * Since: 2.26 */ public void stop() { g_dbus_server_stop(gDBusServer); } protected class OnNewConnectionDelegateWrapper { bool delegate(DBusConnection, DBusServer) dlg; gulong handlerId; this(bool delegate(DBusConnection, DBusServer) dlg) { this.dlg = dlg; onNewConnectionListeners ~= this; } void remove(OnNewConnectionDelegateWrapper source) { foreach(index, wrapper; onNewConnectionListeners) { if (wrapper.handlerId == source.handlerId) { onNewConnectionListeners[index] = null; onNewConnectionListeners = std.algorithm.remove(onNewConnectionListeners, index); break; } } } } OnNewConnectionDelegateWrapper[] onNewConnectionListeners; /** * Emitted when a new authenticated connection has been made. Use * g_dbus_connection_get_peer_credentials() to figure out what * identity (if any), was authenticated. * * If you want to accept the connection, take a reference to the * @connection object and return %TRUE. When you are done with the * connection call g_dbus_connection_close() and give up your * reference. Note that the other peer may disconnect at any time - * a typical thing to do when accepting a connection is to listen to * the #GDBusConnection::closed signal. * * If #GDBusServer:flags contains %G_DBUS_SERVER_FLAGS_RUN_IN_THREAD * then the signal is emitted in a new thread dedicated to the * connection. Otherwise the signal is emitted in the * [thread-default main context][g-main-context-push-thread-default] * of the thread that @server was constructed in. * * You are guaranteed that signal handlers for this signal runs * before incoming messages on @connection are processed. This means * that it's suitable to call g_dbus_connection_register_object() or * similar from the signal handler. * * Params: * connection = A #GDBusConnection for the new connection. * * Returns: %TRUE to claim @connection, %FALSE to let other handlers * run. * * Since: 2.26 */ gulong addOnNewConnection(bool delegate(DBusConnection, DBusServer) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnNewConnectionDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "new-connection", cast(GCallback)&callBackNewConnection, cast(void*)wrapper, cast(GClosureNotify)&callBackNewConnectionDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackNewConnection(GDBusServer* dbusserverStruct, GDBusConnection* connection, OnNewConnectionDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(DBusConnection)(connection), wrapper.outer); } extern(C) static void callBackNewConnectionDestroy(OnNewConnectionDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DBusSignalInfo.d000066400000000000000000000113221324604450400210010ustar00rootroot00000000000000/* * 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 gio.DBusSignalInfo; private import gio.DBusAnnotationInfo; private import gio.DBusArgInfo; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Information about a signal on a D-Bus interface. * * Since: 2.26 */ public final class DBusSignalInfo { /** the main Gtk struct */ protected GDBusSignalInfo* gDBusSignalInfo; protected bool ownedRef; /** Get the main Gtk struct */ public GDBusSignalInfo* getDBusSignalInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDBusSignalInfo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDBusSignalInfo; } /** * Sets our main struct and passes it to the parent class. */ public this (GDBusSignalInfo* gDBusSignalInfo, bool ownedRef = false) { this.gDBusSignalInfo = gDBusSignalInfo; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_dbus_signal_info_unref(gDBusSignalInfo); } /** * The reference count or -1 if statically allocated. */ public @property int refCount() { return gDBusSignalInfo.refCount; } /** Ditto */ public @property void refCount(int value) { gDBusSignalInfo.refCount = value; } /** * The name of the D-Bus signal, e.g. "NameOwnerChanged". */ public @property string name() { return Str.toString(gDBusSignalInfo.name); } /** Ditto */ public @property void name(string value) { gDBusSignalInfo.name = Str.toStringz(value); } /** * A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments. */ public @property DBusArgInfo[] args() { DBusArgInfo[] arr = new DBusArgInfo[getArrayLength(gDBusSignalInfo.args)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusArgInfo)(gDBusSignalInfo.args[i], false); } return arr; } /** Ditto */ public @property void args(DBusArgInfo[] value) { GDBusArgInfo*[] arr = new GDBusArgInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusArgInfoStruct(); } arr[value.length] = null; gDBusSignalInfo.args = arr.ptr; } /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ public @property DBusAnnotationInfo[] annotations() { DBusAnnotationInfo[] arr = new DBusAnnotationInfo[getArrayLength(gDBusSignalInfo.annotations)]; for ( int i = 0; i < arr.length; i++ ) { arr[i] = ObjectG.getDObject!(DBusAnnotationInfo)(gDBusSignalInfo.annotations[i], false); } return arr; } /** Ditto */ public @property void annotations(DBusAnnotationInfo[] value) { GDBusAnnotationInfo*[] arr = new GDBusAnnotationInfo*[value.length+1]; for ( int i = 0; i < value.length; i++ ) { arr[i] = value[i].getDBusAnnotationInfoStruct(); } arr[value.length] = null; gDBusSignalInfo.annotations = arr.ptr; } /** */ public static GType getType() { return g_dbus_signal_info_get_type(); } /** * If @info is statically allocated does nothing. Otherwise increases * the reference count. * * Returns: The same @info. * * Since: 2.26 */ public DBusSignalInfo doref() { auto p = g_dbus_signal_info_ref(gDBusSignalInfo); if(p is null) { return null; } return ObjectG.getDObject!(DBusSignalInfo)(cast(GDBusSignalInfo*) p, true); } /** * If @info is statically allocated, does nothing. Otherwise decreases * the reference count of @info. When its reference count drops to 0, * the memory used is freed. * * Since: 2.26 */ public void unref() { g_dbus_signal_info_unref(gDBusSignalInfo); } } GtkD-3.7.5/generated/gtkd/gio/DBusUtilities.d000066400000000000000000000304471324604450400207340ustar00rootroot00000000000000/* * 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 gio.DBusUtilities; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.IOStream; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.MemorySlice; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import gobject.ObjectG; private import gobject.Value; public import gtkc.giotypes; /** */ public struct DBusUtilities { /** * Escape @string so it can appear in a D-Bus address as the value * part of a key-value pair. * * For instance, if @string is "/run/bus-for-:0", * this function would return "/run/bus-for-%3A0", * which could be used in a D-Bus address like * "unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0". * * Params: * str = an unescaped string to be included in a D-Bus address * as the value in a key-value pair * * Returns: a copy of @string with all * non-optionally-escaped bytes escaped * * Since: 2.36 */ public static string addressEscapeValue(string str) { auto retStr = g_dbus_address_escape_value(Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Synchronously looks up the D-Bus address for the well-known message * bus instance specified by @bus_type. This may involve using various * platform specific mechanisms. * * The returned address will be in the * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * * Params: * busType = a #GBusType * cancellable = a #GCancellable or %NULL * * Returns: a valid D-Bus address string for @bus_type or %NULL if * @error is set * * Since: 2.26 * * Throws: GException on failure. */ public static string addressGetForBusSync(GBusType busType, Cancellable cancellable) { GError* err = null; auto retStr = g_dbus_address_get_for_bus_sync(busType, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Asynchronously connects to an endpoint specified by @address and * sets up the connection so it is in a state to run the client-side * of the D-Bus authentication conversation. @address must be in the * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * * When the operation is finished, @callback will be invoked. You can * then call g_dbus_address_get_stream_finish() to get the result of * the operation. * * This is an asynchronous failable function. See * g_dbus_address_get_stream_sync() for the synchronous version. * * Params: * address = A valid D-Bus address. * cancellable = A #GCancellable or %NULL. * callback = A #GAsyncReadyCallback to call when the request is satisfied. * userData = Data to pass to @callback. * * Since: 2.26 */ public static void addressGetStream(string address, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dbus_address_get_stream(Str.toStringz(address), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_dbus_address_get_stream(). * * Params: * res = A #GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_address_get_stream(). * outGuid = %NULL or return location to store the GUID extracted from @address, if any. * * Returns: A #GIOStream or %NULL if @error is set. * * Since: 2.26 * * Throws: GException on failure. */ public static IOStream addressGetStreamFinish(AsyncResultIF res, out string outGuid) { char* outoutGuid = null; GError* err = null; auto p = g_dbus_address_get_stream_finish((res is null) ? null : res.getAsyncResultStruct(), &outoutGuid, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } outGuid = Str.toString(outoutGuid); if(p is null) { return null; } return ObjectG.getDObject!(IOStream)(cast(GIOStream*) p, true); } /** * Synchronously connects to an endpoint specified by @address and * sets up the connection so it is in a state to run the client-side * of the D-Bus authentication conversation. @address must be in the * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * * This is a synchronous failable function. See * g_dbus_address_get_stream() for the asynchronous version. * * Params: * address = A valid D-Bus address. * outGuid = %NULL or return location to store the GUID extracted from @address, if any. * cancellable = A #GCancellable or %NULL. * * Returns: A #GIOStream or %NULL if @error is set. * * Since: 2.26 * * Throws: GException on failure. */ public static IOStream addressGetStreamSync(string address, out string outGuid, Cancellable cancellable) { char* outoutGuid = null; GError* err = null; auto p = g_dbus_address_get_stream_sync(Str.toStringz(address), &outoutGuid, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } outGuid = Str.toString(outoutGuid); if(p is null) { return null; } return ObjectG.getDObject!(IOStream)(cast(GIOStream*) p, true); } /** * Generate a D-Bus GUID that can be used with * e.g. g_dbus_connection_new(). * * See the D-Bus specification regarding what strings are valid D-Bus * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). * * Returns: A valid D-Bus GUID. Free with g_free(). * * Since: 2.26 */ public static string generateGuid() { auto retStr = g_dbus_generate_guid(); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a #GValue to a #GVariant of the type indicated by the @type * parameter. * * The conversion is using the following rules: * * - #G_TYPE_STRING: 's', 'o', 'g' or 'ay' * - #G_TYPE_STRV: 'as', 'ao' or 'aay' * - #G_TYPE_BOOLEAN: 'b' * - #G_TYPE_UCHAR: 'y' * - #G_TYPE_INT: 'i', 'n' * - #G_TYPE_UINT: 'u', 'q' * - #G_TYPE_INT64 'x' * - #G_TYPE_UINT64: 't' * - #G_TYPE_DOUBLE: 'd' * - #G_TYPE_VARIANT: Any #GVariantType * * This can fail if e.g. @gvalue is of type #G_TYPE_STRING and @type * is ['i'][G-VARIANT-TYPE-INT32:CAPS]. It will also fail for any #GType * (including e.g. #G_TYPE_OBJECT and #G_TYPE_BOXED derived-types) not * in the table above. * * Note that if @gvalue is of type #G_TYPE_VARIANT and its value is * %NULL, the empty #GVariant instance (never %NULL) for @type is * returned (e.g. 0 for scalar types, the empty string for string types, * '/' for object path types, the empty array for any array type and so on). * * See the g_dbus_gvariant_to_gvalue() function for how to convert a * #GVariant to a #GValue. * * Params: * gvalue = A #GValue to convert to a #GVariant * type = A #GVariantType * * Returns: A #GVariant (never floating) of #GVariantType @type holding * the data from @gvalue or %NULL in case of failure. Free with * g_variant_unref(). * * Since: 2.30 */ public static Variant gvalueToGvariant(Value gvalue, VariantType type) { auto p = g_dbus_gvalue_to_gvariant((gvalue is null) ? null : gvalue.getValueStruct(), (type is null) ? null : type.getVariantTypeStruct()); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Converts a #GVariant to a #GValue. If @value is floating, it is consumed. * * The rules specified in the g_dbus_gvalue_to_gvariant() function are * used - this function is essentially its reverse form. So, a #GVariant * containing any basic or string array type will be converted to a #GValue * containing a basic value or string array. Any other #GVariant (handle, * variant, tuple, dict entry) will be converted to a #GValue containing that * #GVariant. * * The conversion never fails - a valid #GValue is always returned in * @out_gvalue. * * Params: * value = A #GVariant. * outGvalue = Return location pointing to a zero-filled (uninitialized) #GValue. * * Since: 2.30 */ public static void gvariantToGvalue(Variant value, out Value outGvalue) { GValue* outoutGvalue = sliceNew!GValue(); g_dbus_gvariant_to_gvalue((value is null) ? null : value.getVariantStruct(), outoutGvalue); outGvalue = ObjectG.getDObject!(Value)(outoutGvalue, true); } /** * Checks if @string is a * [D-Bus address](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * * This doesn't check if @string is actually supported by #GDBusServer * or #GDBusConnection - use g_dbus_is_supported_address() to do more * checks. * * Params: * str = A string. * * Returns: %TRUE if @string is a valid D-Bus address, %FALSE otherwise. * * Since: 2.26 */ public static bool isAddress(string str) { return g_dbus_is_address(Str.toStringz(str)) != 0; } /** * Checks if @string is a D-Bus GUID. * * See the D-Bus specification regarding what strings are valid D-Bus * GUID (for example, D-Bus GUIDs are not RFC-4122 compliant). * * Params: * str = The string to check. * * Returns: %TRUE if @string is a guid, %FALSE otherwise. * * Since: 2.26 */ public static bool isGuid(string str) { return g_dbus_is_guid(Str.toStringz(str)) != 0; } /** * Checks if @string is a valid D-Bus interface name. * * Params: * str = The string to check. * * Returns: %TRUE if valid, %FALSE otherwise. * * Since: 2.26 */ public static bool isInterfaceName(string str) { return g_dbus_is_interface_name(Str.toStringz(str)) != 0; } /** * Checks if @string is a valid D-Bus member (e.g. signal or method) name. * * Params: * str = The string to check. * * Returns: %TRUE if valid, %FALSE otherwise. * * Since: 2.26 */ public static bool isMemberName(string str) { return g_dbus_is_member_name(Str.toStringz(str)) != 0; } /** * Checks if @string is a valid D-Bus bus name (either unique or well-known). * * Params: * str = The string to check. * * Returns: %TRUE if valid, %FALSE otherwise. * * Since: 2.26 */ public static bool isName(string str) { return g_dbus_is_name(Str.toStringz(str)) != 0; } /** * Like g_dbus_is_address() but also checks if the library supports the * transports in @string and that key/value pairs for each transport * are valid. See the specification of the * [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses). * * Params: * str = A string. * * Returns: %TRUE if @string is a valid D-Bus address that is * supported by this library, %FALSE if @error is set. * * Since: 2.26 * * Throws: GException on failure. */ public static bool isSupportedAddress(string str) { GError* err = null; auto p = g_dbus_is_supported_address(Str.toStringz(str), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks if @string is a valid D-Bus unique bus name. * * Params: * str = The string to check. * * Returns: %TRUE if valid, %FALSE otherwise. * * Since: 2.26 */ public static bool isUniqueName(string str) { return g_dbus_is_unique_name(Str.toStringz(str)) != 0; } } GtkD-3.7.5/generated/gtkd/gio/DataInputStream.d000066400000000000000000000553321324604450400212500ustar00rootroot00000000000000/* * 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 gio.DataInputStream; private import gio.AsyncResultIF; private import gio.BufferedInputStream; private import gio.Cancellable; private import gio.InputStream; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Data input stream implements #GInputStream and includes functions for * reading structured data directly from a binary input stream. */ public class DataInputStream : BufferedInputStream { /** the main Gtk struct */ protected GDataInputStream* gDataInputStream; /** Get the main Gtk struct */ public GDataInputStream* getDataInputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDataInputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDataInputStream; } protected override void setStruct(GObject* obj) { gDataInputStream = cast(GDataInputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDataInputStream* gDataInputStream, bool ownedRef = false) { this.gDataInputStream = gDataInputStream; super(cast(GBufferedInputStream*)gDataInputStream, ownedRef); } /** */ public static GType getType() { return g_data_input_stream_get_type(); } /** * Creates a new data input stream for the @base_stream. * * Params: * baseStream = a #GInputStream. * * Returns: a new #GDataInputStream. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(InputStream baseStream) { auto p = g_data_input_stream_new((baseStream is null) ? null : baseStream.getInputStreamStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDataInputStream*) p, true); } /** * Gets the byte order for the data input stream. * * Returns: the @stream's current #GDataStreamByteOrder. */ public GDataStreamByteOrder getByteOrder() { return g_data_input_stream_get_byte_order(gDataInputStream); } /** * Gets the current newline type for the @stream. * * Returns: #GDataStreamNewlineType for the given @stream. */ public GDataStreamNewlineType getNewlineType() { return g_data_input_stream_get_newline_type(gDataInputStream); } /** * Reads a 16-bit/2-byte value from @stream. * * In order to get the correct byte order for this read operation, * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a signed 16-bit/2-byte value read from @stream or %0 if * an error occurred. * * Throws: GException on failure. */ public short readInt16(Cancellable cancellable) { GError* err = null; auto p = g_data_input_stream_read_int16(gDataInputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Reads a signed 32-bit/4-byte value from @stream. * * In order to get the correct byte order for this read operation, * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a signed 32-bit/4-byte value read from the @stream or %0 if * an error occurred. * * Throws: GException on failure. */ public int readInt32(Cancellable cancellable) { GError* err = null; auto p = g_data_input_stream_read_int32(gDataInputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Reads a 64-bit/8-byte value from @stream. * * In order to get the correct byte order for this read operation, * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a signed 64-bit/8-byte value read from @stream or %0 if * an error occurred. * * Throws: GException on failure. */ public long readInt64(Cancellable cancellable) { GError* err = null; auto p = g_data_input_stream_read_int64(gDataInputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Reads a line from the data input stream. Note that no encoding * checks or conversion is performed; the input is not guaranteed to * be UTF-8, and may in fact have embedded NUL characters. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * length = a #gsize to get the length of the data read in. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a NUL terminated byte array with the line that was read in * (without the newlines). Set @length to a #gsize to get the length * of the read line. On an error, it will return %NULL and @error * will be set. If there's no content to read, it will still return * %NULL, but @error won't be set. * * Throws: GException on failure. */ public string readLine(out size_t length, Cancellable cancellable) { GError* err = null; auto retStr = g_data_input_stream_read_line(gDataInputStream, &length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * The asynchronous version of g_data_input_stream_read_line(). It is * an error to have two outstanding calls to this function. * * When the operation is finished, @callback will be called. You * can then call g_data_input_stream_read_line_finish() to get * the result of the operation. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied. * userData = the data to pass to callback function. * * Since: 2.20 */ public void readLineAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_data_input_stream_read_line_async(gDataInputStream, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous call started by * g_data_input_stream_read_line_async(). Note the warning about * string encoding in g_data_input_stream_read_line() applies here as * well. * * Params: * result = the #GAsyncResult that was provided to the callback. * length = a #gsize to get the length of the data read in. * * Returns: a NUL-terminated byte array with the line that was read in * (without the newlines). Set @length to a #gsize to get the length * of the read line. On an error, it will return %NULL and @error * will be set. If there's no content to read, it will still return * %NULL, but @error won't be set. * * Since: 2.20 * * Throws: GException on failure. */ public string readLineFinish(AsyncResultIF result, out size_t length) { GError* err = null; auto retStr = g_data_input_stream_read_line_finish(gDataInputStream, (result is null) ? null : result.getAsyncResultStruct(), &length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Finish an asynchronous call started by * g_data_input_stream_read_line_async(). * * Params: * result = the #GAsyncResult that was provided to the callback. * length = a #gsize to get the length of the data read in. * * Returns: a string with the line that * was read in (without the newlines). Set @length to a #gsize to * get the length of the read line. On an error, it will return * %NULL and @error will be set. For UTF-8 conversion errors, the set * error domain is %G_CONVERT_ERROR. If there's no content to read, * it will still return %NULL, but @error won't be set. * * Since: 2.30 * * Throws: GException on failure. */ public string readLineFinishUtf8(AsyncResultIF result, out size_t length) { GError* err = null; auto retStr = g_data_input_stream_read_line_finish_utf8(gDataInputStream, (result is null) ? null : result.getAsyncResultStruct(), &length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Reads a UTF-8 encoded line from the data input stream. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * length = a #gsize to get the length of the data read in. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a NUL terminated UTF-8 string * with the line that was read in (without the newlines). Set * @length to a #gsize to get the length of the read line. On an * error, it will return %NULL and @error will be set. For UTF-8 * conversion errors, the set error domain is %G_CONVERT_ERROR. If * there's no content to read, it will still return %NULL, but @error * won't be set. * * Since: 2.30 * * Throws: GException on failure. */ public string readLineUtf8(out size_t length, Cancellable cancellable) { GError* err = null; auto retStr = g_data_input_stream_read_line_utf8(gDataInputStream, &length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Reads an unsigned 16-bit/2-byte value from @stream. * * In order to get the correct byte order for this read operation, * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: an unsigned 16-bit/2-byte value read from the @stream or %0 if * an error occurred. * * Throws: GException on failure. */ public ushort readUint16(Cancellable cancellable) { GError* err = null; auto p = g_data_input_stream_read_uint16(gDataInputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Reads an unsigned 32-bit/4-byte value from @stream. * * In order to get the correct byte order for this read operation, * see g_data_input_stream_get_byte_order() and g_data_input_stream_set_byte_order(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: an unsigned 32-bit/4-byte value read from the @stream or %0 if * an error occurred. * * Throws: GException on failure. */ public uint readUint32(Cancellable cancellable) { GError* err = null; auto p = g_data_input_stream_read_uint32(gDataInputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Reads an unsigned 64-bit/8-byte value from @stream. * * In order to get the correct byte order for this read operation, * see g_data_input_stream_get_byte_order(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: an unsigned 64-bit/8-byte read from @stream or %0 if * an error occurred. * * Throws: GException on failure. */ public ulong readUint64(Cancellable cancellable) { GError* err = null; auto p = g_data_input_stream_read_uint64(gDataInputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Reads a string from the data input stream, up to the first * occurrence of any of the stop characters. * * Note that, in contrast to g_data_input_stream_read_until_async(), * this function consumes the stop character that it finds. * * Don't use this function in new code. Its functionality is * inconsistent with g_data_input_stream_read_until_async(). Both * functions will be marked as deprecated in a future release. Use * g_data_input_stream_read_upto() instead, but note that that function * does not consume the stop character. * * Params: * stopChars = characters to terminate the read. * length = a #gsize to get the length of the data read in. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a string with the data that was read * before encountering any of the stop characters. Set @length to * a #gsize to get the length of the string. This function will * return %NULL on an error. * * Throws: GException on failure. */ public string readUntil(string stopChars, out size_t length, Cancellable cancellable) { GError* err = null; auto retStr = g_data_input_stream_read_until(gDataInputStream, Str.toStringz(stopChars), &length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * The asynchronous version of g_data_input_stream_read_until(). * It is an error to have two outstanding calls to this function. * * Note that, in contrast to g_data_input_stream_read_until(), * this function does not consume the stop character that it finds. You * must read it for yourself. * * When the operation is finished, @callback will be called. You * can then call g_data_input_stream_read_until_finish() to get * the result of the operation. * * Don't use this function in new code. Its functionality is * inconsistent with g_data_input_stream_read_until(). Both functions * will be marked as deprecated in a future release. Use * g_data_input_stream_read_upto_async() instead. * * Params: * stopChars = characters to terminate the read. * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied. * userData = the data to pass to callback function. * * Since: 2.20 */ public void readUntilAsync(string stopChars, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_data_input_stream_read_until_async(gDataInputStream, Str.toStringz(stopChars), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous call started by * g_data_input_stream_read_until_async(). * * Params: * result = the #GAsyncResult that was provided to the callback. * length = a #gsize to get the length of the data read in. * * Returns: a string with the data that was read * before encountering any of the stop characters. Set @length to * a #gsize to get the length of the string. This function will * return %NULL on an error. * * Since: 2.20 * * Throws: GException on failure. */ public string readUntilFinish(AsyncResultIF result, out size_t length) { GError* err = null; auto retStr = g_data_input_stream_read_until_finish(gDataInputStream, (result is null) ? null : result.getAsyncResultStruct(), &length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Reads a string from the data input stream, up to the first * occurrence of any of the stop characters. * * In contrast to g_data_input_stream_read_until(), this function * does not consume the stop character. You have to use * g_data_input_stream_read_byte() to get it before calling * g_data_input_stream_read_upto() again. * * Note that @stop_chars may contain '\0' if @stop_chars_len is * specified. * * Params: * stopChars = characters to terminate the read * stopCharsLen = length of @stop_chars. May be -1 if @stop_chars is * nul-terminated * length = a #gsize to get the length of the data read in * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: a string with the data that was read * before encountering any of the stop characters. Set @length to * a #gsize to get the length of the string. This function will * return %NULL on an error * * Since: 2.26 * * Throws: GException on failure. */ public string readUpto(string stopChars, ptrdiff_t stopCharsLen, out size_t length, Cancellable cancellable) { GError* err = null; auto retStr = g_data_input_stream_read_upto(gDataInputStream, Str.toStringz(stopChars), stopCharsLen, &length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * The asynchronous version of g_data_input_stream_read_upto(). * It is an error to have two outstanding calls to this function. * * In contrast to g_data_input_stream_read_until(), this function * does not consume the stop character. You have to use * g_data_input_stream_read_byte() to get it before calling * g_data_input_stream_read_upto() again. * * Note that @stop_chars may contain '\0' if @stop_chars_len is * specified. * * When the operation is finished, @callback will be called. You * can then call g_data_input_stream_read_upto_finish() to get * the result of the operation. * * Params: * stopChars = characters to terminate the read * stopCharsLen = length of @stop_chars. May be -1 if @stop_chars is * nul-terminated * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, %NULL to ignore * callback = callback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.26 */ public void readUptoAsync(string stopChars, ptrdiff_t stopCharsLen, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_data_input_stream_read_upto_async(gDataInputStream, Str.toStringz(stopChars), stopCharsLen, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous call started by * g_data_input_stream_read_upto_async(). * * Note that this function does not consume the stop character. You * have to use g_data_input_stream_read_byte() to get it before calling * g_data_input_stream_read_upto_async() again. * * Params: * result = the #GAsyncResult that was provided to the callback * length = a #gsize to get the length of the data read in * * Returns: a string with the data that was read * before encountering any of the stop characters. Set @length to * a #gsize to get the length of the string. This function will * return %NULL on an error. * * Since: 2.24 * * Throws: GException on failure. */ public string readUptoFinish(AsyncResultIF result, out size_t length) { GError* err = null; auto retStr = g_data_input_stream_read_upto_finish(gDataInputStream, (result is null) ? null : result.getAsyncResultStruct(), &length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * This function sets the byte order for the given @stream. All subsequent * reads from the @stream will be read in the given @order. * * Params: * order = a #GDataStreamByteOrder to set. */ public void setByteOrder(GDataStreamByteOrder order) { g_data_input_stream_set_byte_order(gDataInputStream, order); } /** * Sets the newline type for the @stream. * * Note that using G_DATA_STREAM_NEWLINE_TYPE_ANY is slightly unsafe. If a read * chunk ends in "CR" we must read an additional byte to know if this is "CR" or * "CR LF", and this might block if there is no more data available. * * Params: * type = the type of new line return as #GDataStreamNewlineType. */ public void setNewlineType(GDataStreamNewlineType type) { g_data_input_stream_set_newline_type(gDataInputStream, type); } } GtkD-3.7.5/generated/gtkd/gio/DataOutputStream.d000066400000000000000000000203151324604450400214420ustar00rootroot00000000000000/* * 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 gio.DataOutputStream; private import gio.Cancellable; private import gio.FilterOutputStream; private import gio.OutputStream; private import gio.SeekableIF; private import gio.SeekableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Data output stream implements #GOutputStream and includes functions for * writing data directly to an output stream. */ public class DataOutputStream : FilterOutputStream, SeekableIF { /** the main Gtk struct */ protected GDataOutputStream* gDataOutputStream; /** Get the main Gtk struct */ public GDataOutputStream* getDataOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDataOutputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDataOutputStream; } protected override void setStruct(GObject* obj) { gDataOutputStream = cast(GDataOutputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDataOutputStream* gDataOutputStream, bool ownedRef = false) { this.gDataOutputStream = gDataOutputStream; super(cast(GFilterOutputStream*)gDataOutputStream, ownedRef); } // add the Seekable capabilities mixin SeekableT!(GDataOutputStream); /** */ public static GType getType() { return g_data_output_stream_get_type(); } /** * Creates a new data output stream for @base_stream. * * Params: * baseStream = a #GOutputStream. * * Returns: #GDataOutputStream. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(OutputStream baseStream) { auto p = g_data_output_stream_new((baseStream is null) ? null : baseStream.getOutputStreamStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDataOutputStream*) p, true); } /** * Gets the byte order for the stream. * * Returns: the #GDataStreamByteOrder for the @stream. */ public GDataStreamByteOrder getByteOrder() { return g_data_output_stream_get_byte_order(gDataOutputStream); } /** * Puts a byte into the output stream. * * Params: * data = a #guchar. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if @data was successfully added to the @stream. * * Throws: GException on failure. */ public bool putByte(char data, Cancellable cancellable) { GError* err = null; auto p = g_data_output_stream_put_byte(gDataOutputStream, data, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Puts a signed 16-bit integer into the output stream. * * Params: * data = a #gint16. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if @data was successfully added to the @stream. * * Throws: GException on failure. */ public bool putInt16(short data, Cancellable cancellable) { GError* err = null; auto p = g_data_output_stream_put_int16(gDataOutputStream, data, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Puts a signed 32-bit integer into the output stream. * * Params: * data = a #gint32. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if @data was successfully added to the @stream. * * Throws: GException on failure. */ public bool putInt32(int data, Cancellable cancellable) { GError* err = null; auto p = g_data_output_stream_put_int32(gDataOutputStream, data, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Puts a signed 64-bit integer into the stream. * * Params: * data = a #gint64. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if @data was successfully added to the @stream. * * Throws: GException on failure. */ public bool putInt64(long data, Cancellable cancellable) { GError* err = null; auto p = g_data_output_stream_put_int64(gDataOutputStream, data, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Puts a string into the output stream. * * Params: * str = a string. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if @string was successfully added to the @stream. * * Throws: GException on failure. */ public bool putString(string str, Cancellable cancellable) { GError* err = null; auto p = g_data_output_stream_put_string(gDataOutputStream, Str.toStringz(str), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Puts an unsigned 16-bit integer into the output stream. * * Params: * data = a #guint16. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if @data was successfully added to the @stream. * * Throws: GException on failure. */ public bool putUint16(ushort data, Cancellable cancellable) { GError* err = null; auto p = g_data_output_stream_put_uint16(gDataOutputStream, data, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Puts an unsigned 32-bit integer into the stream. * * Params: * data = a #guint32. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if @data was successfully added to the @stream. * * Throws: GException on failure. */ public bool putUint32(uint data, Cancellable cancellable) { GError* err = null; auto p = g_data_output_stream_put_uint32(gDataOutputStream, data, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Puts an unsigned 64-bit integer into the stream. * * Params: * data = a #guint64. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if @data was successfully added to the @stream. * * Throws: GException on failure. */ public bool putUint64(ulong data, Cancellable cancellable) { GError* err = null; auto p = g_data_output_stream_put_uint64(gDataOutputStream, data, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the byte order of the data output stream to @order. * * Params: * order = a %GDataStreamByteOrder. */ public void setByteOrder(GDataStreamByteOrder order) { g_data_output_stream_set_byte_order(gDataOutputStream, order); } } GtkD-3.7.5/generated/gtkd/gio/DatagramBasedIF.d000066400000000000000000000353361324604450400211030ustar00rootroot00000000000000/* * 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 gio.DatagramBasedIF; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Source; public import gtkc.giotypes; /** * A #GDatagramBased is a networking interface for representing datagram-based * communications. It is a more or less direct mapping of the core parts of the * BSD socket API in a portable GObject interface. It is implemented by * #GSocket, which wraps the UNIX socket API on UNIX and winsock2 on Windows. * * #GDatagramBased is entirely platform independent, and is intended to be used * alongside higher-level networking APIs such as #GIOStream. * * It uses vectored scatter/gather I/O by default, allowing for many messages * to be sent or received in a single call. Where possible, implementations of * the interface should take advantage of vectored I/O to minimise processing * or system calls. For example, #GSocket uses recvmmsg() and sendmmsg() where * possible. Callers should take advantage of scatter/gather I/O (the use of * multiple buffers per message) to avoid unnecessary copying of data to * assemble or disassemble a message. * * Each #GDatagramBased operation has a timeout parameter which may be negative * for blocking behaviour, zero for non-blocking behaviour, or positive for * timeout behaviour. A blocking operation blocks until finished or there is an * error. A non-blocking operation will return immediately with a * %G_IO_ERROR_WOULD_BLOCK error if it cannot make progress. A timeout operation * will block until the operation is complete or the timeout expires; if the * timeout expires it will return what progress it made, or * %G_IO_ERROR_TIMED_OUT if no progress was made. To know when a call would * successfully run you can call g_datagram_based_condition_check() or * g_datagram_based_condition_wait(). You can also use * g_datagram_based_create_source() and attach it to a #GMainContext to get * callbacks when I/O is possible. * * When running a non-blocking operation applications should always be able to * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other function * said that I/O was possible. This can easily happen in case of a race * condition in the application, but it can also happen for other reasons. For * instance, on Windows a socket is always seen as writable until a write * returns %G_IO_ERROR_WOULD_BLOCK. * * As with #GSocket, #GDatagramBaseds can be either connection oriented (for * example, SCTP) or connectionless (for example, UDP). #GDatagramBaseds must be * datagram-based, not stream-based. The interface does not cover connection * establishment — use methods on the underlying type to establish a connection * before sending and receiving data through the #GDatagramBased API. For * connectionless socket types the target/source address is specified or * received in each I/O operation. * * Like most other APIs in GLib, #GDatagramBased is not inherently thread safe. * To use a #GDatagramBased concurrently from multiple threads, you must * implement your own locking. * * Since: 2.48 */ public interface DatagramBasedIF{ /** Get the main Gtk struct */ public GDatagramBased* getDatagramBasedStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_datagram_based_get_type(); } /** * Checks on the readiness of @datagram_based to perform operations. The * operations specified in @condition are checked for and masked against the * currently-satisfied conditions on @datagram_based. The result is returned. * * %G_IO_IN will be set in the return value if data is available to read with * g_datagram_based_receive_messages(), or if the connection is closed remotely * (EOS); and if the datagram_based has not been closed locally using some * implementation-specific method (such as g_socket_close() or * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket). * * If the connection is shut down or closed (by calling g_socket_close() or * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for * example), all calls to this function will return %G_IO_ERROR_CLOSED. * * %G_IO_OUT will be set if it is expected that at least one byte can be sent * using g_datagram_based_send_messages() without blocking. It will not be set * if the datagram_based has been closed locally. * * %G_IO_HUP will be set if the connection has been closed locally. * * %G_IO_ERR will be set if there was an asynchronous error in transmitting data * previously enqueued using g_datagram_based_send_messages(). * * Note that on Windows, it is possible for an operation to return * %G_IO_ERROR_WOULD_BLOCK even immediately after * g_datagram_based_condition_check() has claimed that the #GDatagramBased is * ready for writing. Rather than calling g_datagram_based_condition_check() and * then writing to the #GDatagramBased if it succeeds, it is generally better to * simply try writing right away, and try again later if the initial attempt * returns %G_IO_ERROR_WOULD_BLOCK. * * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these * conditions will always be set in the output if they are true. Apart from * these flags, the output is guaranteed to be masked by @condition. * * This call never blocks. * * Params: * condition = a #GIOCondition mask to check * * Returns: the #GIOCondition mask of the current state * * Since: 2.48 */ public GIOCondition conditionCheck(GIOCondition condition); /** * Waits for up to @timeout microseconds for condition to become true on * @datagram_based. If the condition is met, %TRUE is returned. * * If @cancellable is cancelled before the condition is met, or if @timeout is * reached before the condition is met, then %FALSE is returned and @error is * set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT). * * Params: * condition = a #GIOCondition mask to wait for * timeout = the maximum time (in microseconds) to wait, 0 to not block, or -1 * to block indefinitely * cancellable = a #GCancellable * * Returns: %TRUE if the condition was met, %FALSE otherwise * * Since: 2.48 * * Throws: GException on failure. */ public bool conditionWait(GIOCondition condition, long timeout, Cancellable cancellable); /** * Creates a #GSource that can be attached to a #GMainContext to monitor for * the availability of the specified @condition on the #GDatagramBased. The * #GSource keeps a reference to the @datagram_based. * * The callback on the source is of the #GDatagramBasedSourceFunc type. * * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these * conditions will always be reported in the callback if they are true. * * If non-%NULL, @cancellable can be used to cancel the source, which will * cause the source to trigger, reporting the current condition (which is * likely 0 unless cancellation happened at the same time as a condition * change). You can check for this in the callback using * g_cancellable_is_cancelled(). * * Params: * condition = a #GIOCondition mask to monitor * cancellable = a #GCancellable * * Returns: a newly allocated #GSource * * Since: 2.48 */ public Source createSource(GIOCondition condition, Cancellable cancellable); /** * Receive one or more data messages from @datagram_based in one go. * * @messages must point to an array of #GInputMessage structs and * @num_messages must be the length of this array. Each #GInputMessage * contains a pointer to an array of #GInputVector structs describing the * buffers that the data received in each message will be written to. * * @flags modify how all messages are received. The commonly available * arguments for this are available in the #GSocketMsgFlags enum, but the * values there are the same as the system values, and the flags * are passed in as-is, so you can pass in system-specific flags too. These * flags affect the overall receive operation. Flags affecting individual * messages are returned in #GInputMessage.flags. * * The other members of #GInputMessage are treated as described in its * documentation. * * If @timeout is negative the call will block until @num_messages have been * received, the connection is closed remotely (EOS), @cancellable is cancelled, * or an error occurs. * * If @timeout is 0 the call will return up to @num_messages without blocking, * or %G_IO_ERROR_WOULD_BLOCK if no messages are queued in the operating system * to be received. * * If @timeout is positive the call will block on the same conditions as if * @timeout were negative. If the timeout is reached * before any messages are received, %G_IO_ERROR_TIMED_OUT is returned, * otherwise it will return the number of messages received before timing out. * (Note: This is effectively the behaviour of `MSG_WAITFORONE` with * recvmmsg().) * * To be notified when messages are available, wait for the %G_IO_IN condition. * Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from * g_datagram_based_receive_messages() even if you were previously notified of a * %G_IO_IN condition. * * If the remote peer closes the connection, any messages queued in the * underlying receive buffer will be returned, and subsequent calls to * g_datagram_based_receive_messages() will return 0 (with no error set). * * If the connection is shut down or closed (by calling g_socket_close() or * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for * example), all calls to this function will return %G_IO_ERROR_CLOSED. * * On error -1 is returned and @error is set accordingly. An error will only * be returned if zero messages could be received; otherwise the number of * messages successfully received before the error will be returned. If * @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any * other error. * * Params: * messages = an array of #GInputMessage structs * flags = an int containing #GSocketMsgFlags flags for the overall operation * timeout = the maximum time (in microseconds) to wait, 0 to not block, or -1 * to block indefinitely * cancellable = a %GCancellable * * Returns: number of messages received, or -1 on error. Note that the number * of messages received may be smaller than @num_messages if @timeout is * zero or positive, if the peer closed the connection, or if @num_messages * was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try * to receive the remaining messages. * * Since: 2.48 * * Throws: GException on failure. */ public int receiveMessages(GInputMessage[] messages, int flags, long timeout, Cancellable cancellable); /** * Send one or more data messages from @datagram_based in one go. * * @messages must point to an array of #GOutputMessage structs and * @num_messages must be the length of this array. Each #GOutputMessage * contains an address to send the data to, and a pointer to an array of * #GOutputVector structs to describe the buffers that the data to be sent * for each message will be gathered from. * * @flags modify how the message is sent. The commonly available arguments * for this are available in the #GSocketMsgFlags enum, but the * values there are the same as the system values, and the flags * are passed in as-is, so you can pass in system-specific flags too. * * The other members of #GOutputMessage are treated as described in its * documentation. * * If @timeout is negative the call will block until @num_messages have been * sent, @cancellable is cancelled, or an error occurs. * * If @timeout is 0 the call will send up to @num_messages without blocking, * or will return %G_IO_ERROR_WOULD_BLOCK if there is no space to send messages. * * If @timeout is positive the call will block on the same conditions as if * @timeout were negative. If the timeout is reached before any messages are * sent, %G_IO_ERROR_TIMED_OUT is returned, otherwise it will return the number * of messages sent before timing out. * * To be notified when messages can be sent, wait for the %G_IO_OUT condition. * Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from * g_datagram_based_send_messages() even if you were previously notified of a * %G_IO_OUT condition. (On Windows in particular, this is very common due to * the way the underlying APIs work.) * * If the connection is shut down or closed (by calling g_socket_close() or * g_socket_shutdown() with @shutdown_write set, if it’s a #GSocket, for * example), all calls to this function will return %G_IO_ERROR_CLOSED. * * On error -1 is returned and @error is set accordingly. An error will only * be returned if zero messages could be sent; otherwise the number of messages * successfully sent before the error will be returned. If @cancellable is * cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error. * * Params: * messages = an array of #GOutputMessage structs * flags = an int containing #GSocketMsgFlags flags * timeout = the maximum time (in microseconds) to wait, 0 to not block, or -1 * to block indefinitely * cancellable = a %GCancellable * * Returns: number of messages sent, or -1 on error. Note that the number of * messages sent may be smaller than @num_messages if @timeout is zero * or positive, or if @num_messages was larger than `UIO_MAXIOV` (1024), in * which case the caller may re-try to send the remaining messages. * * Since: 2.48 * * Throws: GException on failure. */ public int sendMessages(GOutputMessage[] messages, int flags, long timeout, Cancellable cancellable); } GtkD-3.7.5/generated/gtkd/gio/DatagramBasedT.d000066400000000000000000000375741324604450400210160ustar00rootroot00000000000000/* * 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 gio.DatagramBasedT; public import gio.Cancellable; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Source; public import gtkc.giotypes; /** * A #GDatagramBased is a networking interface for representing datagram-based * communications. It is a more or less direct mapping of the core parts of the * BSD socket API in a portable GObject interface. It is implemented by * #GSocket, which wraps the UNIX socket API on UNIX and winsock2 on Windows. * * #GDatagramBased is entirely platform independent, and is intended to be used * alongside higher-level networking APIs such as #GIOStream. * * It uses vectored scatter/gather I/O by default, allowing for many messages * to be sent or received in a single call. Where possible, implementations of * the interface should take advantage of vectored I/O to minimise processing * or system calls. For example, #GSocket uses recvmmsg() and sendmmsg() where * possible. Callers should take advantage of scatter/gather I/O (the use of * multiple buffers per message) to avoid unnecessary copying of data to * assemble or disassemble a message. * * Each #GDatagramBased operation has a timeout parameter which may be negative * for blocking behaviour, zero for non-blocking behaviour, or positive for * timeout behaviour. A blocking operation blocks until finished or there is an * error. A non-blocking operation will return immediately with a * %G_IO_ERROR_WOULD_BLOCK error if it cannot make progress. A timeout operation * will block until the operation is complete or the timeout expires; if the * timeout expires it will return what progress it made, or * %G_IO_ERROR_TIMED_OUT if no progress was made. To know when a call would * successfully run you can call g_datagram_based_condition_check() or * g_datagram_based_condition_wait(). You can also use * g_datagram_based_create_source() and attach it to a #GMainContext to get * callbacks when I/O is possible. * * When running a non-blocking operation applications should always be able to * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other function * said that I/O was possible. This can easily happen in case of a race * condition in the application, but it can also happen for other reasons. For * instance, on Windows a socket is always seen as writable until a write * returns %G_IO_ERROR_WOULD_BLOCK. * * As with #GSocket, #GDatagramBaseds can be either connection oriented (for * example, SCTP) or connectionless (for example, UDP). #GDatagramBaseds must be * datagram-based, not stream-based. The interface does not cover connection * establishment — use methods on the underlying type to establish a connection * before sending and receiving data through the #GDatagramBased API. For * connectionless socket types the target/source address is specified or * received in each I/O operation. * * Like most other APIs in GLib, #GDatagramBased is not inherently thread safe. * To use a #GDatagramBased concurrently from multiple threads, you must * implement your own locking. * * Since: 2.48 */ public template DatagramBasedT(TStruct) { /** Get the main Gtk struct */ public GDatagramBased* getDatagramBasedStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GDatagramBased*)getStruct(); } /** * Checks on the readiness of @datagram_based to perform operations. The * operations specified in @condition are checked for and masked against the * currently-satisfied conditions on @datagram_based. The result is returned. * * %G_IO_IN will be set in the return value if data is available to read with * g_datagram_based_receive_messages(), or if the connection is closed remotely * (EOS); and if the datagram_based has not been closed locally using some * implementation-specific method (such as g_socket_close() or * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket). * * If the connection is shut down or closed (by calling g_socket_close() or * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for * example), all calls to this function will return %G_IO_ERROR_CLOSED. * * %G_IO_OUT will be set if it is expected that at least one byte can be sent * using g_datagram_based_send_messages() without blocking. It will not be set * if the datagram_based has been closed locally. * * %G_IO_HUP will be set if the connection has been closed locally. * * %G_IO_ERR will be set if there was an asynchronous error in transmitting data * previously enqueued using g_datagram_based_send_messages(). * * Note that on Windows, it is possible for an operation to return * %G_IO_ERROR_WOULD_BLOCK even immediately after * g_datagram_based_condition_check() has claimed that the #GDatagramBased is * ready for writing. Rather than calling g_datagram_based_condition_check() and * then writing to the #GDatagramBased if it succeeds, it is generally better to * simply try writing right away, and try again later if the initial attempt * returns %G_IO_ERROR_WOULD_BLOCK. * * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these * conditions will always be set in the output if they are true. Apart from * these flags, the output is guaranteed to be masked by @condition. * * This call never blocks. * * Params: * condition = a #GIOCondition mask to check * * Returns: the #GIOCondition mask of the current state * * Since: 2.48 */ public GIOCondition conditionCheck(GIOCondition condition) { return g_datagram_based_condition_check(getDatagramBasedStruct(), condition); } /** * Waits for up to @timeout microseconds for condition to become true on * @datagram_based. If the condition is met, %TRUE is returned. * * If @cancellable is cancelled before the condition is met, or if @timeout is * reached before the condition is met, then %FALSE is returned and @error is * set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT). * * Params: * condition = a #GIOCondition mask to wait for * timeout = the maximum time (in microseconds) to wait, 0 to not block, or -1 * to block indefinitely * cancellable = a #GCancellable * * Returns: %TRUE if the condition was met, %FALSE otherwise * * Since: 2.48 * * Throws: GException on failure. */ public bool conditionWait(GIOCondition condition, long timeout, Cancellable cancellable) { GError* err = null; auto p = g_datagram_based_condition_wait(getDatagramBasedStruct(), condition, timeout, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Creates a #GSource that can be attached to a #GMainContext to monitor for * the availability of the specified @condition on the #GDatagramBased. The * #GSource keeps a reference to the @datagram_based. * * The callback on the source is of the #GDatagramBasedSourceFunc type. * * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these * conditions will always be reported in the callback if they are true. * * If non-%NULL, @cancellable can be used to cancel the source, which will * cause the source to trigger, reporting the current condition (which is * likely 0 unless cancellation happened at the same time as a condition * change). You can check for this in the callback using * g_cancellable_is_cancelled(). * * Params: * condition = a #GIOCondition mask to monitor * cancellable = a #GCancellable * * Returns: a newly allocated #GSource * * Since: 2.48 */ public Source createSource(GIOCondition condition, Cancellable cancellable) { auto p = g_datagram_based_create_source(getDatagramBasedStruct(), condition, (cancellable is null) ? null : cancellable.getCancellableStruct()); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } /** * Receive one or more data messages from @datagram_based in one go. * * @messages must point to an array of #GInputMessage structs and * @num_messages must be the length of this array. Each #GInputMessage * contains a pointer to an array of #GInputVector structs describing the * buffers that the data received in each message will be written to. * * @flags modify how all messages are received. The commonly available * arguments for this are available in the #GSocketMsgFlags enum, but the * values there are the same as the system values, and the flags * are passed in as-is, so you can pass in system-specific flags too. These * flags affect the overall receive operation. Flags affecting individual * messages are returned in #GInputMessage.flags. * * The other members of #GInputMessage are treated as described in its * documentation. * * If @timeout is negative the call will block until @num_messages have been * received, the connection is closed remotely (EOS), @cancellable is cancelled, * or an error occurs. * * If @timeout is 0 the call will return up to @num_messages without blocking, * or %G_IO_ERROR_WOULD_BLOCK if no messages are queued in the operating system * to be received. * * If @timeout is positive the call will block on the same conditions as if * @timeout were negative. If the timeout is reached * before any messages are received, %G_IO_ERROR_TIMED_OUT is returned, * otherwise it will return the number of messages received before timing out. * (Note: This is effectively the behaviour of `MSG_WAITFORONE` with * recvmmsg().) * * To be notified when messages are available, wait for the %G_IO_IN condition. * Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from * g_datagram_based_receive_messages() even if you were previously notified of a * %G_IO_IN condition. * * If the remote peer closes the connection, any messages queued in the * underlying receive buffer will be returned, and subsequent calls to * g_datagram_based_receive_messages() will return 0 (with no error set). * * If the connection is shut down or closed (by calling g_socket_close() or * g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for * example), all calls to this function will return %G_IO_ERROR_CLOSED. * * On error -1 is returned and @error is set accordingly. An error will only * be returned if zero messages could be received; otherwise the number of * messages successfully received before the error will be returned. If * @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any * other error. * * Params: * messages = an array of #GInputMessage structs * flags = an int containing #GSocketMsgFlags flags for the overall operation * timeout = the maximum time (in microseconds) to wait, 0 to not block, or -1 * to block indefinitely * cancellable = a %GCancellable * * Returns: number of messages received, or -1 on error. Note that the number * of messages received may be smaller than @num_messages if @timeout is * zero or positive, if the peer closed the connection, or if @num_messages * was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try * to receive the remaining messages. * * Since: 2.48 * * Throws: GException on failure. */ public int receiveMessages(GInputMessage[] messages, int flags, long timeout, Cancellable cancellable) { GError* err = null; auto p = g_datagram_based_receive_messages(getDatagramBasedStruct(), messages.ptr, cast(uint)messages.length, flags, timeout, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Send one or more data messages from @datagram_based in one go. * * @messages must point to an array of #GOutputMessage structs and * @num_messages must be the length of this array. Each #GOutputMessage * contains an address to send the data to, and a pointer to an array of * #GOutputVector structs to describe the buffers that the data to be sent * for each message will be gathered from. * * @flags modify how the message is sent. The commonly available arguments * for this are available in the #GSocketMsgFlags enum, but the * values there are the same as the system values, and the flags * are passed in as-is, so you can pass in system-specific flags too. * * The other members of #GOutputMessage are treated as described in its * documentation. * * If @timeout is negative the call will block until @num_messages have been * sent, @cancellable is cancelled, or an error occurs. * * If @timeout is 0 the call will send up to @num_messages without blocking, * or will return %G_IO_ERROR_WOULD_BLOCK if there is no space to send messages. * * If @timeout is positive the call will block on the same conditions as if * @timeout were negative. If the timeout is reached before any messages are * sent, %G_IO_ERROR_TIMED_OUT is returned, otherwise it will return the number * of messages sent before timing out. * * To be notified when messages can be sent, wait for the %G_IO_OUT condition. * Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from * g_datagram_based_send_messages() even if you were previously notified of a * %G_IO_OUT condition. (On Windows in particular, this is very common due to * the way the underlying APIs work.) * * If the connection is shut down or closed (by calling g_socket_close() or * g_socket_shutdown() with @shutdown_write set, if it’s a #GSocket, for * example), all calls to this function will return %G_IO_ERROR_CLOSED. * * On error -1 is returned and @error is set accordingly. An error will only * be returned if zero messages could be sent; otherwise the number of messages * successfully sent before the error will be returned. If @cancellable is * cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error. * * Params: * messages = an array of #GOutputMessage structs * flags = an int containing #GSocketMsgFlags flags * timeout = the maximum time (in microseconds) to wait, 0 to not block, or -1 * to block indefinitely * cancellable = a %GCancellable * * Returns: number of messages sent, or -1 on error. Note that the number of * messages sent may be smaller than @num_messages if @timeout is zero * or positive, or if @num_messages was larger than `UIO_MAXIOV` (1024), in * which case the caller may re-try to send the remaining messages. * * Since: 2.48 * * Throws: GException on failure. */ public int sendMessages(GOutputMessage[] messages, int flags, long timeout, Cancellable cancellable) { GError* err = null; auto p = g_datagram_based_send_messages(getDatagramBasedStruct(), messages.ptr, cast(uint)messages.length, flags, timeout, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/DesktopAppInfo.d000066400000000000000000000357411324604450400210730ustar00rootroot00000000000000/* * 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 gio.DesktopAppInfo; private import gio.AppInfoIF; private import gio.AppInfoT; private import gio.AppLaunchContext; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.KeyFile; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GDesktopAppInfo is an implementation of #GAppInfo based on * desktop files. * * Note that `` belongs to the UNIX-specific * GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config * file when using it. */ public class DesktopAppInfo : ObjectG, AppInfoIF { /** the main Gtk struct */ protected GDesktopAppInfo* gDesktopAppInfo; /** Get the main Gtk struct */ public GDesktopAppInfo* getDesktopAppInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDesktopAppInfo; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gDesktopAppInfo; } protected override void setStruct(GObject* obj) { gDesktopAppInfo = cast(GDesktopAppInfo*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GDesktopAppInfo* gDesktopAppInfo, bool ownedRef = false) { this.gDesktopAppInfo = gDesktopAppInfo; super(cast(GObject*)gDesktopAppInfo, ownedRef); } // add the AppInfo capabilities mixin AppInfoT!(GDesktopAppInfo); /** * Creates a new #GDesktopAppInfo. * * Params: * filename = the path of a desktop file, in the GLib filename encoding * * Return: a new #GDesktopAppInfo or %NULL on error. * * Throws: ConstructionException GTK+ fails to create the object. */ public static DesktopAppInfo createFromFilename(string filename) { auto p = g_desktop_app_info_new_from_filename(Str.toStringz(filename)); if(p is null) { throw new ConstructionException("null returned by g_desktop_app_info_new_from_filename"); } return new DesktopAppInfo(p, true); } /** */ /** */ public static GType getType() { return g_desktop_app_info_get_type(); } /** * Creates a new #GDesktopAppInfo based on a desktop file id. * * A desktop file id is the basename of the desktop file, including the * .desktop extension. GIO is looking for a desktop file with this name * in the `applications` subdirectories of the XDG * data directories (i.e. the directories specified in the `XDG_DATA_HOME` * and `XDG_DATA_DIRS` environment variables). GIO also supports the * prefix-to-subdirectory mapping that is described in the * [Menu Spec](http://standards.freedesktop.org/menu-spec/latest/) * (i.e. a desktop id of kde-foo.desktop will match * `/usr/share/applications/kde/foo.desktop`). * * Params: * desktopId = the desktop file id * * Returns: a new #GDesktopAppInfo, or %NULL if no desktop file with that id * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string desktopId) { auto p = g_desktop_app_info_new(Str.toStringz(desktopId)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDesktopAppInfo*) p, true); } /** * Creates a new #GDesktopAppInfo. * * Params: * keyFile = an opened #GKeyFile * * Returns: a new #GDesktopAppInfo or %NULL on error. * * Since: 2.18 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(KeyFile keyFile) { auto p = g_desktop_app_info_new_from_keyfile((keyFile is null) ? null : keyFile.getKeyFileStruct()); if(p is null) { throw new ConstructionException("null returned by new_from_keyfile"); } this(cast(GDesktopAppInfo*) p, true); } /** * Gets all applications that implement @interface. * * An application implements an interface if that interface is listed in * the Implements= line of the desktop file of the application. * * Params: * iface = the name of the interface * * Returns: a list of #GDesktopAppInfo * objects. * * Since: 2.42 */ public static ListG getImplementations(string iface) { auto p = g_desktop_app_info_get_implementations(Str.toStringz(iface)); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Searches desktop files for ones that match @search_string. * * The return value is an array of strvs. Each strv contains a list of * applications that matched @search_string with an equal score. The * outer list is sorted by score so that the first strv contains the * best-matching applications, and so on. * The algorithm for determining matches is undefined and may change at * any time. * * Params: * searchString = the search string to use * * Returns: a * list of strvs. Free each item with g_strfreev() and free the outer * list with g_free(). */ public static string[][] search(string searchString) { auto retStr = g_desktop_app_info_search(Str.toStringz(searchString)); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Sets the name of the desktop that the application is running in. * This is used by g_app_info_should_show() and * g_desktop_app_info_get_show_in() to evaluate the * `OnlyShowIn` and `NotShowIn` * desktop entry fields. * * Should be called only once; subsequent calls are ignored. * * Deprecated: do not use this API. Since 2.42 the value of the * `XDG_CURRENT_DESKTOP` environment variable will be used. * * Params: * desktopEnv = a string specifying what desktop this is */ public static void setDesktopEnv(string desktopEnv) { g_desktop_app_info_set_desktop_env(Str.toStringz(desktopEnv)); } /** * Gets the user-visible display name of the "additional application * action" specified by @action_name. * * This corresponds to the "Name" key within the keyfile group for the * action. * * Params: * actionName = the name of the action as from * g_desktop_app_info_list_actions() * * Returns: the locale-specific action name * * Since: 2.38 */ public string getActionName(string actionName) { auto retStr = g_desktop_app_info_get_action_name(gDesktopAppInfo, Str.toStringz(actionName)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Looks up a boolean value in the keyfile backing @info. * * The @key is looked up in the "Desktop Entry" group. * * Params: * key = the key to look up * * Returns: the boolean value, or %FALSE if the key * is not found * * Since: 2.36 */ public bool getBoolean(string key) { return g_desktop_app_info_get_boolean(gDesktopAppInfo, Str.toStringz(key)) != 0; } /** * Gets the categories from the desktop file. * * Returns: The unparsed Categories key from the desktop file; * i.e. no attempt is made to split it by ';' or validate it. */ public string getCategories() { return Str.toString(g_desktop_app_info_get_categories(gDesktopAppInfo)); } /** * When @info was created from a known filename, return it. In some * situations such as the #GDesktopAppInfo returned from * g_desktop_app_info_new_from_keyfile(), this function will return %NULL. * * Returns: The full path to the file for @info, * or %NULL if not known. * * Since: 2.24 */ public string getFilename() { return Str.toString(g_desktop_app_info_get_filename(gDesktopAppInfo)); } /** * Gets the generic name from the destkop file. * * Returns: The value of the GenericName key */ public string getGenericName() { return Str.toString(g_desktop_app_info_get_generic_name(gDesktopAppInfo)); } /** * A desktop file is hidden if the Hidden key in it is * set to True. * * Returns: %TRUE if hidden, %FALSE otherwise. */ public bool getIsHidden() { return g_desktop_app_info_get_is_hidden(gDesktopAppInfo) != 0; } /** * Gets the keywords from the desktop file. * * Returns: The value of the Keywords key * * Since: 2.32 */ public string[] getKeywords() { return Str.toStringArray(g_desktop_app_info_get_keywords(gDesktopAppInfo)); } /** * Gets the value of the NoDisplay key, which helps determine if the * application info should be shown in menus. See * #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show(). * * Returns: The value of the NoDisplay key * * Since: 2.30 */ public bool getNodisplay() { return g_desktop_app_info_get_nodisplay(gDesktopAppInfo) != 0; } /** * Checks if the application info should be shown in menus that list available * applications for a specific name of the desktop, based on the * `OnlyShowIn` and `NotShowIn` keys. * * @desktop_env should typically be given as %NULL, in which case the * `XDG_CURRENT_DESKTOP` environment variable is consulted. If you want * to override the default mechanism then you may specify @desktop_env, * but this is not recommended. * * Note that g_app_info_should_show() for @info will include this check (with * %NULL for @desktop_env) as well as additional checks. * * Params: * desktopEnv = a string specifying a desktop name * * Returns: %TRUE if the @info should be shown in @desktop_env according to the * `OnlyShowIn` and `NotShowIn` keys, %FALSE * otherwise. * * Since: 2.30 */ public bool getShowIn(string desktopEnv) { return g_desktop_app_info_get_show_in(gDesktopAppInfo, Str.toStringz(desktopEnv)) != 0; } /** * Retrieves the StartupWMClass field from @info. This represents the * WM_CLASS property of the main window of the application, if launched * through @info. * * Returns: the startup WM class, or %NULL if none is set * in the desktop file. * * Since: 2.34 */ public string getStartupWmClass() { return Str.toString(g_desktop_app_info_get_startup_wm_class(gDesktopAppInfo)); } /** * Looks up a string value in the keyfile backing @info. * * The @key is looked up in the "Desktop Entry" group. * * Params: * key = the key to look up * * Returns: a newly allocated string, or %NULL if the key * is not found * * Since: 2.36 */ public string getString(string key) { auto retStr = g_desktop_app_info_get_string(gDesktopAppInfo, Str.toStringz(key)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns whether @key exists in the "Desktop Entry" group * of the keyfile backing @info. * * Params: * key = the key to look up * * Returns: %TRUE if the @key exists * * Since: 2.36 */ public bool hasKey(string key) { return g_desktop_app_info_has_key(gDesktopAppInfo, Str.toStringz(key)) != 0; } /** * Activates the named application action. * * You may only call this function on action names that were * returned from g_desktop_app_info_list_actions(). * * Note that if the main entry of the desktop file indicates that the * application supports startup notification, and @launch_context is * non-%NULL, then startup notification will be used when activating the * action (and as such, invocation of the action on the receiving side * must signal the end of startup notification when it is completed). * This is the expected behaviour of applications declaring additional * actions, as per the desktop file specification. * * As with g_app_info_launch() there is no way to detect failures that * occur while using this function. * * Params: * actionName = the name of the action as from * g_desktop_app_info_list_actions() * launchContext = a #GAppLaunchContext * * Since: 2.38 */ public void launchAction(string actionName, AppLaunchContext launchContext) { g_desktop_app_info_launch_action(gDesktopAppInfo, Str.toStringz(actionName), (launchContext is null) ? null : launchContext.getAppLaunchContextStruct()); } /** * This function performs the equivalent of g_app_info_launch_uris(), * but is intended primarily for operating system components that * launch applications. Ordinary applications should use * g_app_info_launch_uris(). * * If the application is launched via traditional UNIX fork()/exec() * then @spawn_flags, @user_setup and @user_setup_data are used for the * call to g_spawn_async(). Additionally, @pid_callback (with * @pid_callback_data) will be called to inform about the PID of the * created process. * * If application launching occurs via some other mechanism (eg: D-Bus * activation) then @spawn_flags, @user_setup, @user_setup_data, * @pid_callback and @pid_callback_data are ignored. * * Params: * uris = List of URIs * launchContext = a #GAppLaunchContext * spawnFlags = #GSpawnFlags, used for each process * userSetup = a #GSpawnChildSetupFunc, used once * for each process. * userSetupData = User data for @user_setup * pidCallback = Callback for child processes * pidCallbackData = User data for @callback * * Returns: %TRUE on successful launch, %FALSE otherwise. * * Throws: GException on failure. */ public bool launchUrisAsManager(ListG uris, AppLaunchContext launchContext, GSpawnFlags spawnFlags, GSpawnChildSetupFunc userSetup, void* userSetupData, GDesktopAppLaunchCallback pidCallback, void* pidCallbackData) { GError* err = null; auto p = g_desktop_app_info_launch_uris_as_manager(gDesktopAppInfo, (uris is null) ? null : uris.getListGStruct(), (launchContext is null) ? null : launchContext.getAppLaunchContextStruct(), spawnFlags, userSetup, userSetupData, pidCallback, pidCallbackData, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Returns the list of "additional application actions" supported on the * desktop file, as per the desktop file specification. * * As per the specification, this is the list of actions that are * explicitly listed in the "Actions" key of the [Desktop Entry] group. * * Returns: a list of strings, always non-%NULL * * Since: 2.38 */ public string[] listActions() { return Str.toStringArray(g_desktop_app_info_list_actions(gDesktopAppInfo)); } } GtkD-3.7.5/generated/gtkd/gio/DesktopAppInfoLookupIF.d000066400000000000000000000044651324604450400225030ustar00rootroot00000000000000/* * 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 gio.DesktopAppInfoLookupIF; private import gio.AppInfoIF; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GDesktopAppInfoLookup is an opaque data structure and can only be accessed * using the following functions. */ public interface DesktopAppInfoLookupIF{ /** Get the main Gtk struct */ public GDesktopAppInfoLookup* getDesktopAppInfoLookupStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_desktop_app_info_lookup_get_type(); } /** * Gets the default application for launching applications * using this URI scheme for a particular GDesktopAppInfoLookup * implementation. * * The GDesktopAppInfoLookup interface and this function is used * to implement g_app_info_get_default_for_uri_scheme() backends * in a GIO module. There is no reason for applications to use it * directly. Applications should use g_app_info_get_default_for_uri_scheme(). * * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio. * * Params: * uriScheme = a string containing a URI scheme. * * Returns: #GAppInfo for given @uri_scheme or %NULL on error. */ public AppInfoIF getDefaultForUriScheme(string uriScheme); } GtkD-3.7.5/generated/gtkd/gio/DesktopAppInfoLookupT.d000066400000000000000000000047531324604450400224100ustar00rootroot00000000000000/* * 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 gio.DesktopAppInfoLookupT; public import gio.AppInfoIF; public import gio.c.functions; public import gio.c.types; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GDesktopAppInfoLookup is an opaque data structure and can only be accessed * using the following functions. */ public template DesktopAppInfoLookupT(TStruct) { /** Get the main Gtk struct */ public GDesktopAppInfoLookup* getDesktopAppInfoLookupStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GDesktopAppInfoLookup*)getStruct(); } /** * Gets the default application for launching applications * using this URI scheme for a particular GDesktopAppInfoLookup * implementation. * * The GDesktopAppInfoLookup interface and this function is used * to implement g_app_info_get_default_for_uri_scheme() backends * in a GIO module. There is no reason for applications to use it * directly. Applications should use g_app_info_get_default_for_uri_scheme(). * * Deprecated: The #GDesktopAppInfoLookup interface is deprecated and unused by gio. * * Params: * uriScheme = a string containing a URI scheme. * * Returns: #GAppInfo for given @uri_scheme or %NULL on error. */ public AppInfoIF getDefaultForUriScheme(string uriScheme) { auto p = g_desktop_app_info_lookup_get_default_for_uri_scheme(getDesktopAppInfoLookupStruct(), Str.toStringz(uriScheme)); if(p is null) { return null; } return ObjectG.getDObject!(AppInfoIF)(cast(GAppInfo*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/DriveIF.d000066400000000000000000000307031324604450400174660ustar00rootroot00000000000000/* * 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 gio.DriveIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.IconIF; private import gio.MountOperation; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GDrive - this represent a piece of hardware connected to the machine. * It's generally only created for removable hardware or hardware with * removable media. * * #GDrive is a container class for #GVolume objects that stem from * the same piece of media. As such, #GDrive abstracts a drive with * (or without) removable media and provides operations for querying * whether media is available, determining whether media change is * automatically detected and ejecting the media. * * If the #GDrive reports that media isn't automatically detected, one * can poll for media; typically one should not do this periodically * as a poll for media operation is potententially expensive and may * spin up the drive creating noise. * * #GDrive supports starting and stopping drives with authentication * support for the former. This can be used to support a diverse set * of use cases including connecting/disconnecting iSCSI devices, * powering down external disk enclosures and starting/stopping * multi-disk devices such as RAID devices. Note that the actual * semantics and side-effects of starting/stopping a #GDrive may vary * according to implementation. To choose the correct verbs in e.g. a * file manager, use g_drive_get_start_stop_type(). * * For porting from GnomeVFS note that there is no equivalent of * #GDrive in that API. */ public interface DriveIF{ /** Get the main Gtk struct */ public GDrive* getDriveStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_drive_get_type(); } /** * Checks if a drive can be ejected. * * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise. */ public bool canEject(); /** * Checks if a drive can be polled for media changes. * * Returns: %TRUE if the @drive can be polled for media changes, * %FALSE otherwise. */ public bool canPollForMedia(); /** * Checks if a drive can be started. * * Returns: %TRUE if the @drive can be started, %FALSE otherwise. * * Since: 2.22 */ public bool canStart(); /** * Checks if a drive can be started degraded. * * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise. * * Since: 2.22 */ public bool canStartDegraded(); /** * Checks if a drive can be stopped. * * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise. * * Since: 2.22 */ public bool canStop(); /** * Asynchronously ejects a drive. * * When the operation is finished, @callback will be called. * You can then call g_drive_eject_finish() to obtain the * result of the operation. * * Deprecated: Use g_drive_eject_with_operation() instead. * * Params: * flags = flags affecting the unmount if required for eject * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data to pass to @callback */ public void eject(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes ejecting a drive. * * Deprecated: Use g_drive_eject_with_operation_finish() instead. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive has been ejected successfully, * %FALSE otherwise. * * Throws: GException on failure. */ public bool ejectFinish(AsyncResultIF result); /** * Ejects a drive. This is an asynchronous operation, and is * finished by calling g_drive_eject_with_operation_finish() with the @drive * and #GAsyncResult data returned in the @callback. * * Params: * flags = flags affecting the unmount if required for eject * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. * * Since: 2.22 */ public void ejectWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes ejecting a drive. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool ejectWithOperationFinish(AsyncResultIF result); /** * Gets the kinds of identifiers that @drive has. * Use g_drive_get_identifier() to obtain the identifiers * themselves. * * Returns: a %NULL-terminated * array of strings containing kinds of identifiers. Use g_strfreev() * to free. */ public string[] enumerateIdentifiers(); /** * Gets the icon for @drive. * * Returns: #GIcon for the @drive. * Free the returned object with g_object_unref(). */ public IconIF getIcon(); /** * Gets the identifier of the given kind for @drive. * * Params: * kind = the kind of identifier to return * * Returns: a newly allocated string containing the * requested identfier, or %NULL if the #GDrive * doesn't have this kind of identifier. */ public string getIdentifier(string kind); /** * Gets the name of @drive. * * Returns: a string containing @drive's name. The returned * string should be freed when no longer needed. */ public string getName(); /** * Gets the sort key for @drive, if any. * * Returns: Sorting key for @drive or %NULL if no such key is available. * * Since: 2.32 */ public string getSortKey(); /** * Gets a hint about how a drive can be started/stopped. * * Returns: A value from the #GDriveStartStopType enumeration. * * Since: 2.22 */ public GDriveStartStopType getStartStopType(); /** * Gets the icon for @drive. * * Returns: symbolic #GIcon for the @drive. * Free the returned object with g_object_unref(). * * Since: 2.34 */ public IconIF getSymbolicIcon(); /** * Get a list of mountable volumes for @drive. * * The returned list should be freed with g_list_free(), after * its elements have been unreffed with g_object_unref(). * * Returns: #GList containing any #GVolume objects on the given @drive. */ public ListG getVolumes(); /** * Checks if the @drive has media. Note that the OS may not be polling * the drive for media changes; see g_drive_is_media_check_automatic() * for more details. * * Returns: %TRUE if @drive has media, %FALSE otherwise. */ public bool hasMedia(); /** * Check if @drive has any mountable volumes. * * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise. */ public bool hasVolumes(); /** * Checks if @drive is capabable of automatically detecting media changes. * * Returns: %TRUE if the @drive is capabable of automatically detecting * media changes, %FALSE otherwise. */ public bool isMediaCheckAutomatic(); /** * Checks if the @drive supports removable media. * * Returns: %TRUE if @drive supports removable media, %FALSE otherwise. */ public bool isMediaRemovable(); /** * Checks if the #GDrive and/or its media is considered removable by the user. * See g_drive_is_media_removable(). * * Returns: %TRUE if @drive and/or its media is considered removable, %FALSE otherwise. * * Since: 2.50 */ public bool isRemovable(); /** * Asynchronously polls @drive to see if media has been inserted or removed. * * When the operation is finished, @callback will be called. * You can then call g_drive_poll_for_media_finish() to obtain the * result of the operation. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data to pass to @callback */ public void pollForMedia(Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an operation started with g_drive_poll_for_media() on a drive. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive has been poll_for_mediaed successfully, * %FALSE otherwise. * * Throws: GException on failure. */ public bool pollForMediaFinish(AsyncResultIF result); /** * Asynchronously starts a drive. * * When the operation is finished, @callback will be called. * You can then call g_drive_start_finish() to obtain the * result of the operation. * * Params: * flags = flags affecting the start operation. * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data to pass to @callback * * Since: 2.22 */ public void start(GDriveStartFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes starting a drive. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive has been started successfully, * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool startFinish(AsyncResultIF result); /** * Asynchronously stops a drive. * * When the operation is finished, @callback will be called. * You can then call g_drive_stop_finish() to obtain the * result of the operation. * * Params: * flags = flags affecting the unmount if required for stopping. * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data to pass to @callback * * Since: 2.22 */ public void stop(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes stopping a drive. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive has been stopped successfully, * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool stopFinish(AsyncResultIF result); /** * Emitted when the drive's state has changed. */ gulong addOnChanged(void delegate(DriveIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * This signal is emitted when the #GDrive have been * disconnected. If the recipient is holding references to the * object they should release them so the object can be * finalized. */ gulong addOnDisconnected(void delegate(DriveIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Emitted when the physical eject button (if any) of a drive has * been pressed. */ gulong addOnEjectButton(void delegate(DriveIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * Emitted when the physical stop button (if any) of a drive has * been pressed. * * Since: 2.22 */ gulong addOnStopButton(void delegate(DriveIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/gio/DriveT.d000066400000000000000000000507051324604450400173770ustar00rootroot00000000000000/* * 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 gio.DriveT; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.IconIF; public import gio.MountOperation; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.ListG; public import glib.Str; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; /** * #GDrive - this represent a piece of hardware connected to the machine. * It's generally only created for removable hardware or hardware with * removable media. * * #GDrive is a container class for #GVolume objects that stem from * the same piece of media. As such, #GDrive abstracts a drive with * (or without) removable media and provides operations for querying * whether media is available, determining whether media change is * automatically detected and ejecting the media. * * If the #GDrive reports that media isn't automatically detected, one * can poll for media; typically one should not do this periodically * as a poll for media operation is potententially expensive and may * spin up the drive creating noise. * * #GDrive supports starting and stopping drives with authentication * support for the former. This can be used to support a diverse set * of use cases including connecting/disconnecting iSCSI devices, * powering down external disk enclosures and starting/stopping * multi-disk devices such as RAID devices. Note that the actual * semantics and side-effects of starting/stopping a #GDrive may vary * according to implementation. To choose the correct verbs in e.g. a * file manager, use g_drive_get_start_stop_type(). * * For porting from GnomeVFS note that there is no equivalent of * #GDrive in that API. */ public template DriveT(TStruct) { /** Get the main Gtk struct */ public GDrive* getDriveStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GDrive*)getStruct(); } /** * Checks if a drive can be ejected. * * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise. */ public bool canEject() { return g_drive_can_eject(getDriveStruct()) != 0; } /** * Checks if a drive can be polled for media changes. * * Returns: %TRUE if the @drive can be polled for media changes, * %FALSE otherwise. */ public bool canPollForMedia() { return g_drive_can_poll_for_media(getDriveStruct()) != 0; } /** * Checks if a drive can be started. * * Returns: %TRUE if the @drive can be started, %FALSE otherwise. * * Since: 2.22 */ public bool canStart() { return g_drive_can_start(getDriveStruct()) != 0; } /** * Checks if a drive can be started degraded. * * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise. * * Since: 2.22 */ public bool canStartDegraded() { return g_drive_can_start_degraded(getDriveStruct()) != 0; } /** * Checks if a drive can be stopped. * * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise. * * Since: 2.22 */ public bool canStop() { return g_drive_can_stop(getDriveStruct()) != 0; } /** * Asynchronously ejects a drive. * * When the operation is finished, @callback will be called. * You can then call g_drive_eject_finish() to obtain the * result of the operation. * * Deprecated: Use g_drive_eject_with_operation() instead. * * Params: * flags = flags affecting the unmount if required for eject * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data to pass to @callback */ public void eject(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_drive_eject(getDriveStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes ejecting a drive. * * Deprecated: Use g_drive_eject_with_operation_finish() instead. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive has been ejected successfully, * %FALSE otherwise. * * Throws: GException on failure. */ public bool ejectFinish(AsyncResultIF result) { GError* err = null; auto p = g_drive_eject_finish(getDriveStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Ejects a drive. This is an asynchronous operation, and is * finished by calling g_drive_eject_with_operation_finish() with the @drive * and #GAsyncResult data returned in the @callback. * * Params: * flags = flags affecting the unmount if required for eject * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. * * Since: 2.22 */ public void ejectWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_drive_eject_with_operation(getDriveStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes ejecting a drive. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool ejectWithOperationFinish(AsyncResultIF result) { GError* err = null; auto p = g_drive_eject_with_operation_finish(getDriveStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the kinds of identifiers that @drive has. * Use g_drive_get_identifier() to obtain the identifiers * themselves. * * Returns: a %NULL-terminated * array of strings containing kinds of identifiers. Use g_strfreev() * to free. */ public string[] enumerateIdentifiers() { auto retStr = g_drive_enumerate_identifiers(getDriveStruct()); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Gets the icon for @drive. * * Returns: #GIcon for the @drive. * Free the returned object with g_object_unref(). */ public IconIF getIcon() { auto p = g_drive_get_icon(getDriveStruct()); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Gets the identifier of the given kind for @drive. * * Params: * kind = the kind of identifier to return * * Returns: a newly allocated string containing the * requested identfier, or %NULL if the #GDrive * doesn't have this kind of identifier. */ public string getIdentifier(string kind) { auto retStr = g_drive_get_identifier(getDriveStruct(), Str.toStringz(kind)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the name of @drive. * * Returns: a string containing @drive's name. The returned * string should be freed when no longer needed. */ public string getName() { auto retStr = g_drive_get_name(getDriveStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the sort key for @drive, if any. * * Returns: Sorting key for @drive or %NULL if no such key is available. * * Since: 2.32 */ public string getSortKey() { return Str.toString(g_drive_get_sort_key(getDriveStruct())); } /** * Gets a hint about how a drive can be started/stopped. * * Returns: A value from the #GDriveStartStopType enumeration. * * Since: 2.22 */ public GDriveStartStopType getStartStopType() { return g_drive_get_start_stop_type(getDriveStruct()); } /** * Gets the icon for @drive. * * Returns: symbolic #GIcon for the @drive. * Free the returned object with g_object_unref(). * * Since: 2.34 */ public IconIF getSymbolicIcon() { auto p = g_drive_get_symbolic_icon(getDriveStruct()); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Get a list of mountable volumes for @drive. * * The returned list should be freed with g_list_free(), after * its elements have been unreffed with g_object_unref(). * * Returns: #GList containing any #GVolume objects on the given @drive. */ public ListG getVolumes() { auto p = g_drive_get_volumes(getDriveStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Checks if the @drive has media. Note that the OS may not be polling * the drive for media changes; see g_drive_is_media_check_automatic() * for more details. * * Returns: %TRUE if @drive has media, %FALSE otherwise. */ public bool hasMedia() { return g_drive_has_media(getDriveStruct()) != 0; } /** * Check if @drive has any mountable volumes. * * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise. */ public bool hasVolumes() { return g_drive_has_volumes(getDriveStruct()) != 0; } /** * Checks if @drive is capabable of automatically detecting media changes. * * Returns: %TRUE if the @drive is capabable of automatically detecting * media changes, %FALSE otherwise. */ public bool isMediaCheckAutomatic() { return g_drive_is_media_check_automatic(getDriveStruct()) != 0; } /** * Checks if the @drive supports removable media. * * Returns: %TRUE if @drive supports removable media, %FALSE otherwise. */ public bool isMediaRemovable() { return g_drive_is_media_removable(getDriveStruct()) != 0; } /** * Checks if the #GDrive and/or its media is considered removable by the user. * See g_drive_is_media_removable(). * * Returns: %TRUE if @drive and/or its media is considered removable, %FALSE otherwise. * * Since: 2.50 */ public bool isRemovable() { return g_drive_is_removable(getDriveStruct()) != 0; } /** * Asynchronously polls @drive to see if media has been inserted or removed. * * When the operation is finished, @callback will be called. * You can then call g_drive_poll_for_media_finish() to obtain the * result of the operation. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data to pass to @callback */ public void pollForMedia(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_drive_poll_for_media(getDriveStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an operation started with g_drive_poll_for_media() on a drive. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive has been poll_for_mediaed successfully, * %FALSE otherwise. * * Throws: GException on failure. */ public bool pollForMediaFinish(AsyncResultIF result) { GError* err = null; auto p = g_drive_poll_for_media_finish(getDriveStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously starts a drive. * * When the operation is finished, @callback will be called. * You can then call g_drive_start_finish() to obtain the * result of the operation. * * Params: * flags = flags affecting the start operation. * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data to pass to @callback * * Since: 2.22 */ public void start(GDriveStartFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_drive_start(getDriveStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes starting a drive. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive has been started successfully, * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool startFinish(AsyncResultIF result) { GError* err = null; auto p = g_drive_start_finish(getDriveStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously stops a drive. * * When the operation is finished, @callback will be called. * You can then call g_drive_stop_finish() to obtain the * result of the operation. * * Params: * flags = flags affecting the unmount if required for stopping. * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data to pass to @callback * * Since: 2.22 */ public void stop(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_drive_stop(getDriveStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes stopping a drive. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the drive has been stopped successfully, * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool stopFinish(AsyncResultIF result) { GError* err = null; auto p = g_drive_stop_finish(getDriveStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } protected class OnChangedDelegateWrapper { void delegate(DriveIF) dlg; gulong handlerId; this(void delegate(DriveIF) dlg) { this.dlg = dlg; onChangedListeners ~= this; } void remove(OnChangedDelegateWrapper source) { foreach(index, wrapper; onChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChangedListeners[index] = null; onChangedListeners = std.algorithm.remove(onChangedListeners, index); break; } } } } OnChangedDelegateWrapper[] onChangedListeners; /** * Emitted when the drive's state has changed. */ gulong addOnChanged(void delegate(DriveIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "changed", cast(GCallback)&callBackChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChanged(GDrive* driveStruct, OnChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackChangedDestroy(OnChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDisconnectedDelegateWrapper { void delegate(DriveIF) dlg; gulong handlerId; this(void delegate(DriveIF) dlg) { this.dlg = dlg; onDisconnectedListeners ~= this; } void remove(OnDisconnectedDelegateWrapper source) { foreach(index, wrapper; onDisconnectedListeners) { if (wrapper.handlerId == source.handlerId) { onDisconnectedListeners[index] = null; onDisconnectedListeners = std.algorithm.remove(onDisconnectedListeners, index); break; } } } } OnDisconnectedDelegateWrapper[] onDisconnectedListeners; /** * This signal is emitted when the #GDrive have been * disconnected. If the recipient is holding references to the * object they should release them so the object can be * finalized. */ gulong addOnDisconnected(void delegate(DriveIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDisconnectedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "disconnected", cast(GCallback)&callBackDisconnected, cast(void*)wrapper, cast(GClosureNotify)&callBackDisconnectedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDisconnected(GDrive* driveStruct, OnDisconnectedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackDisconnectedDestroy(OnDisconnectedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnEjectButtonDelegateWrapper { void delegate(DriveIF) dlg; gulong handlerId; this(void delegate(DriveIF) dlg) { this.dlg = dlg; onEjectButtonListeners ~= this; } void remove(OnEjectButtonDelegateWrapper source) { foreach(index, wrapper; onEjectButtonListeners) { if (wrapper.handlerId == source.handlerId) { onEjectButtonListeners[index] = null; onEjectButtonListeners = std.algorithm.remove(onEjectButtonListeners, index); break; } } } } OnEjectButtonDelegateWrapper[] onEjectButtonListeners; /** * Emitted when the physical eject button (if any) of a drive has * been pressed. */ gulong addOnEjectButton(void delegate(DriveIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnEjectButtonDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "eject-button", cast(GCallback)&callBackEjectButton, cast(void*)wrapper, cast(GClosureNotify)&callBackEjectButtonDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackEjectButton(GDrive* driveStruct, OnEjectButtonDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackEjectButtonDestroy(OnEjectButtonDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnStopButtonDelegateWrapper { void delegate(DriveIF) dlg; gulong handlerId; this(void delegate(DriveIF) dlg) { this.dlg = dlg; onStopButtonListeners ~= this; } void remove(OnStopButtonDelegateWrapper source) { foreach(index, wrapper; onStopButtonListeners) { if (wrapper.handlerId == source.handlerId) { onStopButtonListeners[index] = null; onStopButtonListeners = std.algorithm.remove(onStopButtonListeners, index); break; } } } } OnStopButtonDelegateWrapper[] onStopButtonListeners; /** * Emitted when the physical stop button (if any) of a drive has * been pressed. * * Since: 2.22 */ gulong addOnStopButton(void delegate(DriveIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnStopButtonDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "stop-button", cast(GCallback)&callBackStopButton, cast(void*)wrapper, cast(GClosureNotify)&callBackStopButtonDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackStopButton(GDrive* driveStruct, OnStopButtonDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackStopButtonDestroy(OnStopButtonDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DtlsClientConnectionIF.d000066400000000000000000000070351324604450400225040ustar00rootroot00000000000000/* * 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 gio.DtlsClientConnectionIF; private import gio.DatagramBasedIF; private import gio.SocketConnectableIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GDtlsClientConnection is the client-side subclass of * #GDtlsConnection, representing a client-side DTLS connection. * * Since: 2.48 */ public interface DtlsClientConnectionIF{ /** Get the main Gtk struct */ public GDtlsClientConnection* getDtlsClientConnectionStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_dtls_client_connection_get_type(); } /** * Gets the list of distinguished names of the Certificate Authorities * that the server will accept certificates from. This will be set * during the TLS handshake if the server requests a certificate. * Otherwise, it will be %NULL. * * Each item in the list is a #GByteArray which contains the complete * subject DN of the certificate authority. * * Returns: the list of * CA DNs. You should unref each element with g_byte_array_unref() and then * the free the list with g_list_free(). * * Since: 2.48 */ public ListG getAcceptedCas(); /** * Gets @conn's expected server identity * * Returns: a #GSocketConnectable describing the * expected server identity, or %NULL if the expected identity is not * known. * * Since: 2.48 */ public SocketConnectableIF getServerIdentity(); /** * Gets @conn's validation flags * * Returns: the validation flags * * Since: 2.48 */ public GTlsCertificateFlags getValidationFlags(); /** * Sets @conn's expected server identity, which is used both to tell * servers on virtual hosts which certificate to present, and also * to let @conn know what name to look for in the certificate when * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. * * Params: * identity = a #GSocketConnectable describing the expected server identity * * Since: 2.48 */ public void setServerIdentity(SocketConnectableIF identity); /** * Sets @conn's validation flags, to override the default set of * checks performed when validating a server certificate. By default, * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. * * Params: * flags = the #GTlsCertificateFlags to use * * Since: 2.48 */ public void setValidationFlags(GTlsCertificateFlags flags); } GtkD-3.7.5/generated/gtkd/gio/DtlsClientConnectionT.d000066400000000000000000000103051324604450400224030ustar00rootroot00000000000000/* * 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 gio.DtlsClientConnectionT; public import gio.DatagramBasedIF; public import gio.SocketConnectableIF; public import gio.c.functions; public import gio.c.types; public import glib.ConstructionException; public import glib.ErrorG; public import glib.GException; public import glib.ListG; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GDtlsClientConnection is the client-side subclass of * #GDtlsConnection, representing a client-side DTLS connection. * * Since: 2.48 */ public template DtlsClientConnectionT(TStruct) { /** Get the main Gtk struct */ public GDtlsClientConnection* getDtlsClientConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GDtlsClientConnection*)getStruct(); } /** * Gets the list of distinguished names of the Certificate Authorities * that the server will accept certificates from. This will be set * during the TLS handshake if the server requests a certificate. * Otherwise, it will be %NULL. * * Each item in the list is a #GByteArray which contains the complete * subject DN of the certificate authority. * * Returns: the list of * CA DNs. You should unref each element with g_byte_array_unref() and then * the free the list with g_list_free(). * * Since: 2.48 */ public ListG getAcceptedCas() { auto p = g_dtls_client_connection_get_accepted_cas(getDtlsClientConnectionStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Gets @conn's expected server identity * * Returns: a #GSocketConnectable describing the * expected server identity, or %NULL if the expected identity is not * known. * * Since: 2.48 */ public SocketConnectableIF getServerIdentity() { auto p = g_dtls_client_connection_get_server_identity(getDtlsClientConnectionStruct()); if(p is null) { return null; } return ObjectG.getDObject!(SocketConnectableIF)(cast(GSocketConnectable*) p); } /** * Gets @conn's validation flags * * Returns: the validation flags * * Since: 2.48 */ public GTlsCertificateFlags getValidationFlags() { return g_dtls_client_connection_get_validation_flags(getDtlsClientConnectionStruct()); } /** * Sets @conn's expected server identity, which is used both to tell * servers on virtual hosts which certificate to present, and also * to let @conn know what name to look for in the certificate when * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. * * Params: * identity = a #GSocketConnectable describing the expected server identity * * Since: 2.48 */ public void setServerIdentity(SocketConnectableIF identity) { g_dtls_client_connection_set_server_identity(getDtlsClientConnectionStruct(), (identity is null) ? null : identity.getSocketConnectableStruct()); } /** * Sets @conn's validation flags, to override the default set of * checks performed when validating a server certificate. By default, * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. * * Params: * flags = the #GTlsCertificateFlags to use * * Since: 2.48 */ public void setValidationFlags(GTlsCertificateFlags flags) { g_dtls_client_connection_set_validation_flags(getDtlsClientConnectionStruct(), flags); } } GtkD-3.7.5/generated/gtkd/gio/DtlsConnectionIF.d000066400000000000000000000455331324604450400213520ustar00rootroot00000000000000/* * 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 gio.DtlsConnectionIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.TlsCertificate; private import gio.TlsDatabase; private import gio.TlsInteraction; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GDtlsConnection is the base DTLS connection class type, which wraps * a #GDatagramBased and provides DTLS encryption on top of it. Its * subclasses, #GDtlsClientConnection and #GDtlsServerConnection, * implement client-side and server-side DTLS, respectively. * * For TLS support, see #GTlsConnection. * * As DTLS is datagram based, #GDtlsConnection implements #GDatagramBased, * presenting a datagram-socket-like API for the encrypted connection. This * operates over a base datagram connection, which is also a #GDatagramBased * (#GDtlsConnection:base-socket). * * To close a DTLS connection, use g_dtls_connection_close(). * * Neither #GDtlsServerConnection or #GDtlsClientConnection set the peer address * on their base #GDatagramBased if it is a #GSocket — it is up to the caller to * do that if they wish. If they do not, and g_socket_close() is called on the * base socket, the #GDtlsConnection will not raise a %G_IO_ERROR_NOT_CONNECTED * error on further I/O. * * Since: 2.48 */ public interface DtlsConnectionIF{ /** Get the main Gtk struct */ public GDtlsConnection* getDtlsConnectionStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_dtls_connection_get_type(); } /** * Close the DTLS connection. This is equivalent to calling * g_dtls_connection_shutdown() to shut down both sides of the connection. * * Closing a #GDtlsConnection waits for all buffered but untransmitted data to * be sent before it completes. It then sends a `close_notify` DTLS alert to the * peer and may wait for a `close_notify` to be received from the peer. It does * not close the underlying #GDtlsConnection:base-socket; that must be closed * separately. * * Once @conn is closed, all other operations will return %G_IO_ERROR_CLOSED. * Closing a #GDtlsConnection multiple times will not return an error. * * #GDtlsConnections will be automatically closed when the last reference is * dropped, but you might want to call this function to make sure resources are * released as early as possible. * * If @cancellable is cancelled, the #GDtlsConnection may be left * partially-closed and any pending untransmitted data may be lost. Call * g_dtls_connection_close() again to complete closing the #GDtlsConnection. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE on success, %FALSE otherwise * * Since: 2.48 * * Throws: GException on failure. */ public bool close(Cancellable cancellable); /** * Asynchronously close the DTLS connection. See g_dtls_connection_close() for * more information. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = a #GCancellable, or %NULL * callback = callback to call when the close operation is complete * userData = the data to pass to the callback function * * Since: 2.48 */ public void closeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finish an asynchronous TLS close operation. See g_dtls_connection_close() * for more information. * * Params: * result = a #GAsyncResult * * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set * * Since: 2.48 * * Throws: GException on failure. */ public bool closeFinish(AsyncResultIF result); /** * Used by #GDtlsConnection implementations to emit the * #GDtlsConnection::accept-certificate signal. * * Params: * peerCert = the peer's #GTlsCertificate * errors = the problems with @peer_cert * * Returns: %TRUE if one of the signal handlers has returned * %TRUE to accept @peer_cert * * Since: 2.48 */ public bool emitAcceptCertificate(TlsCertificate peerCert, GTlsCertificateFlags errors); /** * Gets @conn's certificate, as set by * g_dtls_connection_set_certificate(). * * Returns: @conn's certificate, or %NULL * * Since: 2.48 */ public TlsCertificate getCertificate(); /** * Gets the certificate database that @conn uses to verify * peer certificates. See g_dtls_connection_set_database(). * * Returns: the certificate database that @conn uses or %NULL * * Since: 2.48 */ public TlsDatabase getDatabase(); /** * Get the object that will be used to interact with the user. It will be used * for things like prompting the user for passwords. If %NULL is returned, then * no user interaction will occur for this connection. * * Returns: The interaction object. * * Since: 2.48 */ public TlsInteraction getInteraction(); /** * Gets @conn's peer's certificate after the handshake has completed. * (It is not set during the emission of * #GDtlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate, or %NULL * * Since: 2.48 */ public TlsCertificate getPeerCertificate(); /** * Gets the errors associated with validating @conn's peer's * certificate, after the handshake has completed. (It is not set * during the emission of #GDtlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate errors * * Since: 2.48 */ public GTlsCertificateFlags getPeerCertificateErrors(); /** * Gets @conn rehandshaking mode. See * g_dtls_connection_set_rehandshake_mode() for details. * * Returns: @conn's rehandshaking mode * * Since: 2.48 */ public GTlsRehandshakeMode getRehandshakeMode(); /** * Tests whether or not @conn expects a proper TLS close notification * when the connection is closed. See * g_dtls_connection_set_require_close_notify() for details. * * Returns: %TRUE if @conn requires a proper TLS close notification. * * Since: 2.48 */ public bool getRequireCloseNotify(); /** * Attempts a TLS handshake on @conn. * * On the client side, it is never necessary to call this method; * although the connection needs to perform a handshake after * connecting (or after sending a "STARTTLS"-type command) and may * need to rehandshake later if the server requests it, * #GDtlsConnection will handle this for you automatically when you try * to send or receive data on the connection. However, you can call * g_dtls_connection_handshake() manually if you want to know for sure * whether the initial handshake succeeded or failed (as opposed to * just immediately trying to write to @conn, in which * case if it fails, it may not be possible to tell if it failed * before or after completing the handshake). * * Likewise, on the server side, although a handshake is necessary at * the beginning of the communication, you do not need to call this * function explicitly unless you want clearer error reporting. * However, you may call g_dtls_connection_handshake() later on to * renegotiate parameters (encryption methods, etc) with the client. * * #GDtlsConnection::accept_certificate may be emitted during the * handshake. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: success or failure * * Since: 2.48 * * Throws: GException on failure. */ public bool handshake(Cancellable cancellable); /** * Asynchronously performs a TLS handshake on @conn. See * g_dtls_connection_handshake() for more information. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = a #GCancellable, or %NULL * callback = callback to call when the handshake is complete * userData = the data to pass to the callback function * * Since: 2.48 */ public void handshakeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finish an asynchronous TLS handshake operation. See * g_dtls_connection_handshake() for more information. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set. * * Since: 2.48 * * Throws: GException on failure. */ public bool handshakeFinish(AsyncResultIF result); /** * This sets the certificate that @conn will present to its peer * during the TLS handshake. For a #GDtlsServerConnection, it is * mandatory to set this, and that will normally be done at construct * time. * * For a #GDtlsClientConnection, this is optional. If a handshake fails * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server * requires a certificate, and if you try connecting again, you should * call this method first. You can call * g_dtls_client_connection_get_accepted_cas() on the failed connection * to get a list of Certificate Authorities that the server will * accept certificates from. * * (It is also possible that a server will allow the connection with * or without a certificate; in that case, if you don't provide a * certificate, you can tell that the server requested one by the fact * that g_dtls_client_connection_get_accepted_cas() will return * non-%NULL.) * * Params: * certificate = the certificate to use for @conn * * Since: 2.48 */ public void setCertificate(TlsCertificate certificate); /** * Sets the certificate database that is used to verify peer certificates. * This is set to the default database by default. See * g_dtls_backend_get_default_database(). If set to %NULL, then * peer certificate validation will always set the * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning * #GDtlsConnection::accept-certificate will always be emitted on * client-side connections, unless that bit is not set in * #GDtlsClientConnection:validation-flags). * * Params: * database = a #GTlsDatabase * * Since: 2.48 */ public void setDatabase(TlsDatabase database); /** * Set the object that will be used to interact with the user. It will be used * for things like prompting the user for passwords. * * The @interaction argument will normally be a derived subclass of * #GTlsInteraction. %NULL can also be provided if no user interaction * should occur for this connection. * * Params: * interaction = an interaction object, or %NULL * * Since: 2.48 */ public void setInteraction(TlsInteraction interaction); /** * Sets how @conn behaves with respect to rehandshaking requests. * * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to * rehandshake after the initial handshake is complete. (For a client, * this means it will refuse rehandshake requests from the server, and * for a server, this means it will close the connection with an error * if the client attempts to rehandshake.) * * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a * rehandshake only if the other end of the connection supports the * TLS `renegotiation_info` extension. This is the default behavior, * but means that rehandshaking will not work against older * implementations that do not support that extension. * * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow * rehandshaking even without the `renegotiation_info` extension. On * the server side in particular, this is not recommended, since it * leaves the server open to certain attacks. However, this mode is * necessary if you need to allow renegotiation with older client * software. * * Params: * mode = the rehandshaking mode * * Since: 2.48 */ public void setRehandshakeMode(GTlsRehandshakeMode mode); /** * Sets whether or not @conn expects a proper TLS close notification * before the connection is closed. If this is %TRUE (the default), * then @conn will expect to receive a TLS close notification from its * peer before the connection is closed, and will return a * %G_TLS_ERROR_EOF error if the connection is closed without proper * notification (since this may indicate a network error, or * man-in-the-middle attack). * * In some protocols, the application will know whether or not the * connection was closed cleanly based on application-level data * (because the application-level data includes a length field, or is * somehow self-delimiting); in this case, the close notify is * redundant and may be omitted. You * can use g_dtls_connection_set_require_close_notify() to tell @conn * to allow an "unannounced" connection close, in which case the close * will show up as a 0-length read, as in a non-TLS * #GDatagramBased, and it is up to the application to check that * the data has been fully received. * * Note that this only affects the behavior when the peer closes the * connection; when the application calls g_dtls_connection_close_async() on * @conn itself, this will send a close notification regardless of the * setting of this property. If you explicitly want to do an unclean * close, you can close @conn's #GDtlsConnection:base-socket rather * than closing @conn itself. * * Params: * requireCloseNotify = whether or not to require close notification * * Since: 2.48 */ public void setRequireCloseNotify(bool requireCloseNotify); /** * Shut down part or all of a DTLS connection. * * If @shutdown_read is %TRUE then the receiving side of the connection is shut * down, and further reading is disallowed. Subsequent calls to * g_datagram_based_receive_messages() will return %G_IO_ERROR_CLOSED. * * If @shutdown_write is %TRUE then the sending side of the connection is shut * down, and further writing is disallowed. Subsequent calls to * g_datagram_based_send_messages() will return %G_IO_ERROR_CLOSED. * * It is allowed for both @shutdown_read and @shutdown_write to be TRUE — this * is equivalent to calling g_dtls_connection_close(). * * If @cancellable is cancelled, the #GDtlsConnection may be left * partially-closed and any pending untransmitted data may be lost. Call * g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection. * * Params: * shutdownRead = %TRUE to stop reception of incoming datagrams * shutdownWrite = %TRUE to stop sending outgoing datagrams * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE on success, %FALSE otherwise * * Since: 2.48 * * Throws: GException on failure. */ public bool shutdown(bool shutdownRead, bool shutdownWrite, Cancellable cancellable); /** * Asynchronously shut down part or all of the DTLS connection. See * g_dtls_connection_shutdown() for more information. * * Params: * shutdownRead = %TRUE to stop reception of incoming datagrams * shutdownWrite = %TRUE to stop sending outgoing datagrams * ioPriority = the [I/O priority][io-priority] of the request * cancellable = a #GCancellable, or %NULL * callback = callback to call when the shutdown operation is complete * userData = the data to pass to the callback function * * Since: 2.48 */ public void shutdownAsync(bool shutdownRead, bool shutdownWrite, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finish an asynchronous TLS shutdown operation. See * g_dtls_connection_shutdown() for more information. * * Params: * result = a #GAsyncResult * * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set * * Since: 2.48 * * Throws: GException on failure. */ public bool shutdownFinish(AsyncResultIF result); /** * Emitted during the TLS handshake after the peer certificate has * been received. You can examine @peer_cert's certification path by * calling g_tls_certificate_get_issuer() on it. * * For a client-side connection, @peer_cert is the server's * certificate, and the signal will only be emitted if the * certificate was not acceptable according to @conn's * #GDtlsClientConnection:validation_flags. If you would like the * certificate to be accepted despite @errors, return %TRUE from the * signal handler. Otherwise, if no handler accepts the certificate, * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE. * * For a server-side connection, @peer_cert is the certificate * presented by the client, if this was requested via the server's * #GDtlsServerConnection:authentication_mode. On the server side, * the signal is always emitted when the client presents a * certificate, and the certificate will only be accepted if a * handler returns %TRUE. * * Note that if this signal is emitted as part of asynchronous I/O * in the main thread, then you should not attempt to interact with * the user before returning from the signal handler. If you want to * let the user decide whether or not to accept the certificate, you * would have to return %FALSE from the signal handler on the first * attempt, and then after the connection attempt returns a * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if * the user decides to accept the certificate, remember that fact, * create a new connection, and return %TRUE from the signal handler * the next time. * * If you are doing I/O in another thread, you do not * need to worry about this, and can simply block in the signal * handler until the UI thread returns an answer. * * Params: * peerCert = the peer's #GTlsCertificate * errors = the problems with @peer_cert. * * Returns: %TRUE to accept @peer_cert (which will also * immediately end the signal emission). %FALSE to allow the signal * emission to continue, which will cause the handshake to fail if * no one else overrides it. * * Since: 2.48 */ gulong addOnAcceptCertificate(bool delegate(TlsCertificate, GTlsCertificateFlags, DtlsConnectionIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/gio/DtlsConnectionT.d000066400000000000000000000600001324604450400212410ustar00rootroot00000000000000/* * 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 gio.DtlsConnectionT; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.TlsCertificate; public import gio.TlsDatabase; public import gio.TlsInteraction; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; /** * #GDtlsConnection is the base DTLS connection class type, which wraps * a #GDatagramBased and provides DTLS encryption on top of it. Its * subclasses, #GDtlsClientConnection and #GDtlsServerConnection, * implement client-side and server-side DTLS, respectively. * * For TLS support, see #GTlsConnection. * * As DTLS is datagram based, #GDtlsConnection implements #GDatagramBased, * presenting a datagram-socket-like API for the encrypted connection. This * operates over a base datagram connection, which is also a #GDatagramBased * (#GDtlsConnection:base-socket). * * To close a DTLS connection, use g_dtls_connection_close(). * * Neither #GDtlsServerConnection or #GDtlsClientConnection set the peer address * on their base #GDatagramBased if it is a #GSocket — it is up to the caller to * do that if they wish. If they do not, and g_socket_close() is called on the * base socket, the #GDtlsConnection will not raise a %G_IO_ERROR_NOT_CONNECTED * error on further I/O. * * Since: 2.48 */ public template DtlsConnectionT(TStruct) { /** Get the main Gtk struct */ public GDtlsConnection* getDtlsConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GDtlsConnection*)getStruct(); } /** * Close the DTLS connection. This is equivalent to calling * g_dtls_connection_shutdown() to shut down both sides of the connection. * * Closing a #GDtlsConnection waits for all buffered but untransmitted data to * be sent before it completes. It then sends a `close_notify` DTLS alert to the * peer and may wait for a `close_notify` to be received from the peer. It does * not close the underlying #GDtlsConnection:base-socket; that must be closed * separately. * * Once @conn is closed, all other operations will return %G_IO_ERROR_CLOSED. * Closing a #GDtlsConnection multiple times will not return an error. * * #GDtlsConnections will be automatically closed when the last reference is * dropped, but you might want to call this function to make sure resources are * released as early as possible. * * If @cancellable is cancelled, the #GDtlsConnection may be left * partially-closed and any pending untransmitted data may be lost. Call * g_dtls_connection_close() again to complete closing the #GDtlsConnection. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE on success, %FALSE otherwise * * Since: 2.48 * * Throws: GException on failure. */ public bool close(Cancellable cancellable) { GError* err = null; auto p = g_dtls_connection_close(getDtlsConnectionStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously close the DTLS connection. See g_dtls_connection_close() for * more information. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = a #GCancellable, or %NULL * callback = callback to call when the close operation is complete * userData = the data to pass to the callback function * * Since: 2.48 */ public void closeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dtls_connection_close_async(getDtlsConnectionStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous TLS close operation. See g_dtls_connection_close() * for more information. * * Params: * result = a #GAsyncResult * * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set * * Since: 2.48 * * Throws: GException on failure. */ public bool closeFinish(AsyncResultIF result) { GError* err = null; auto p = g_dtls_connection_close_finish(getDtlsConnectionStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Used by #GDtlsConnection implementations to emit the * #GDtlsConnection::accept-certificate signal. * * Params: * peerCert = the peer's #GTlsCertificate * errors = the problems with @peer_cert * * Returns: %TRUE if one of the signal handlers has returned * %TRUE to accept @peer_cert * * Since: 2.48 */ public bool emitAcceptCertificate(TlsCertificate peerCert, GTlsCertificateFlags errors) { return g_dtls_connection_emit_accept_certificate(getDtlsConnectionStruct(), (peerCert is null) ? null : peerCert.getTlsCertificateStruct(), errors) != 0; } /** * Gets @conn's certificate, as set by * g_dtls_connection_set_certificate(). * * Returns: @conn's certificate, or %NULL * * Since: 2.48 */ public TlsCertificate getCertificate() { auto p = g_dtls_connection_get_certificate(getDtlsConnectionStruct()); if(p is null) { return null; } return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) p); } /** * Gets the certificate database that @conn uses to verify * peer certificates. See g_dtls_connection_set_database(). * * Returns: the certificate database that @conn uses or %NULL * * Since: 2.48 */ public TlsDatabase getDatabase() { auto p = g_dtls_connection_get_database(getDtlsConnectionStruct()); if(p is null) { return null; } return ObjectG.getDObject!(TlsDatabase)(cast(GTlsDatabase*) p); } /** * Get the object that will be used to interact with the user. It will be used * for things like prompting the user for passwords. If %NULL is returned, then * no user interaction will occur for this connection. * * Returns: The interaction object. * * Since: 2.48 */ public TlsInteraction getInteraction() { auto p = g_dtls_connection_get_interaction(getDtlsConnectionStruct()); if(p is null) { return null; } return ObjectG.getDObject!(TlsInteraction)(cast(GTlsInteraction*) p); } /** * Gets @conn's peer's certificate after the handshake has completed. * (It is not set during the emission of * #GDtlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate, or %NULL * * Since: 2.48 */ public TlsCertificate getPeerCertificate() { auto p = g_dtls_connection_get_peer_certificate(getDtlsConnectionStruct()); if(p is null) { return null; } return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) p); } /** * Gets the errors associated with validating @conn's peer's * certificate, after the handshake has completed. (It is not set * during the emission of #GDtlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate errors * * Since: 2.48 */ public GTlsCertificateFlags getPeerCertificateErrors() { return g_dtls_connection_get_peer_certificate_errors(getDtlsConnectionStruct()); } /** * Gets @conn rehandshaking mode. See * g_dtls_connection_set_rehandshake_mode() for details. * * Returns: @conn's rehandshaking mode * * Since: 2.48 */ public GTlsRehandshakeMode getRehandshakeMode() { return g_dtls_connection_get_rehandshake_mode(getDtlsConnectionStruct()); } /** * Tests whether or not @conn expects a proper TLS close notification * when the connection is closed. See * g_dtls_connection_set_require_close_notify() for details. * * Returns: %TRUE if @conn requires a proper TLS close notification. * * Since: 2.48 */ public bool getRequireCloseNotify() { return g_dtls_connection_get_require_close_notify(getDtlsConnectionStruct()) != 0; } /** * Attempts a TLS handshake on @conn. * * On the client side, it is never necessary to call this method; * although the connection needs to perform a handshake after * connecting (or after sending a "STARTTLS"-type command) and may * need to rehandshake later if the server requests it, * #GDtlsConnection will handle this for you automatically when you try * to send or receive data on the connection. However, you can call * g_dtls_connection_handshake() manually if you want to know for sure * whether the initial handshake succeeded or failed (as opposed to * just immediately trying to write to @conn, in which * case if it fails, it may not be possible to tell if it failed * before or after completing the handshake). * * Likewise, on the server side, although a handshake is necessary at * the beginning of the communication, you do not need to call this * function explicitly unless you want clearer error reporting. * However, you may call g_dtls_connection_handshake() later on to * renegotiate parameters (encryption methods, etc) with the client. * * #GDtlsConnection::accept_certificate may be emitted during the * handshake. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: success or failure * * Since: 2.48 * * Throws: GException on failure. */ public bool handshake(Cancellable cancellable) { GError* err = null; auto p = g_dtls_connection_handshake(getDtlsConnectionStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously performs a TLS handshake on @conn. See * g_dtls_connection_handshake() for more information. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = a #GCancellable, or %NULL * callback = callback to call when the handshake is complete * userData = the data to pass to the callback function * * Since: 2.48 */ public void handshakeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dtls_connection_handshake_async(getDtlsConnectionStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous TLS handshake operation. See * g_dtls_connection_handshake() for more information. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set. * * Since: 2.48 * * Throws: GException on failure. */ public bool handshakeFinish(AsyncResultIF result) { GError* err = null; auto p = g_dtls_connection_handshake_finish(getDtlsConnectionStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This sets the certificate that @conn will present to its peer * during the TLS handshake. For a #GDtlsServerConnection, it is * mandatory to set this, and that will normally be done at construct * time. * * For a #GDtlsClientConnection, this is optional. If a handshake fails * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server * requires a certificate, and if you try connecting again, you should * call this method first. You can call * g_dtls_client_connection_get_accepted_cas() on the failed connection * to get a list of Certificate Authorities that the server will * accept certificates from. * * (It is also possible that a server will allow the connection with * or without a certificate; in that case, if you don't provide a * certificate, you can tell that the server requested one by the fact * that g_dtls_client_connection_get_accepted_cas() will return * non-%NULL.) * * Params: * certificate = the certificate to use for @conn * * Since: 2.48 */ public void setCertificate(TlsCertificate certificate) { g_dtls_connection_set_certificate(getDtlsConnectionStruct(), (certificate is null) ? null : certificate.getTlsCertificateStruct()); } /** * Sets the certificate database that is used to verify peer certificates. * This is set to the default database by default. See * g_dtls_backend_get_default_database(). If set to %NULL, then * peer certificate validation will always set the * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning * #GDtlsConnection::accept-certificate will always be emitted on * client-side connections, unless that bit is not set in * #GDtlsClientConnection:validation-flags). * * Params: * database = a #GTlsDatabase * * Since: 2.48 */ public void setDatabase(TlsDatabase database) { g_dtls_connection_set_database(getDtlsConnectionStruct(), (database is null) ? null : database.getTlsDatabaseStruct()); } /** * Set the object that will be used to interact with the user. It will be used * for things like prompting the user for passwords. * * The @interaction argument will normally be a derived subclass of * #GTlsInteraction. %NULL can also be provided if no user interaction * should occur for this connection. * * Params: * interaction = an interaction object, or %NULL * * Since: 2.48 */ public void setInteraction(TlsInteraction interaction) { g_dtls_connection_set_interaction(getDtlsConnectionStruct(), (interaction is null) ? null : interaction.getTlsInteractionStruct()); } /** * Sets how @conn behaves with respect to rehandshaking requests. * * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to * rehandshake after the initial handshake is complete. (For a client, * this means it will refuse rehandshake requests from the server, and * for a server, this means it will close the connection with an error * if the client attempts to rehandshake.) * * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a * rehandshake only if the other end of the connection supports the * TLS `renegotiation_info` extension. This is the default behavior, * but means that rehandshaking will not work against older * implementations that do not support that extension. * * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow * rehandshaking even without the `renegotiation_info` extension. On * the server side in particular, this is not recommended, since it * leaves the server open to certain attacks. However, this mode is * necessary if you need to allow renegotiation with older client * software. * * Params: * mode = the rehandshaking mode * * Since: 2.48 */ public void setRehandshakeMode(GTlsRehandshakeMode mode) { g_dtls_connection_set_rehandshake_mode(getDtlsConnectionStruct(), mode); } /** * Sets whether or not @conn expects a proper TLS close notification * before the connection is closed. If this is %TRUE (the default), * then @conn will expect to receive a TLS close notification from its * peer before the connection is closed, and will return a * %G_TLS_ERROR_EOF error if the connection is closed without proper * notification (since this may indicate a network error, or * man-in-the-middle attack). * * In some protocols, the application will know whether or not the * connection was closed cleanly based on application-level data * (because the application-level data includes a length field, or is * somehow self-delimiting); in this case, the close notify is * redundant and may be omitted. You * can use g_dtls_connection_set_require_close_notify() to tell @conn * to allow an "unannounced" connection close, in which case the close * will show up as a 0-length read, as in a non-TLS * #GDatagramBased, and it is up to the application to check that * the data has been fully received. * * Note that this only affects the behavior when the peer closes the * connection; when the application calls g_dtls_connection_close_async() on * @conn itself, this will send a close notification regardless of the * setting of this property. If you explicitly want to do an unclean * close, you can close @conn's #GDtlsConnection:base-socket rather * than closing @conn itself. * * Params: * requireCloseNotify = whether or not to require close notification * * Since: 2.48 */ public void setRequireCloseNotify(bool requireCloseNotify) { g_dtls_connection_set_require_close_notify(getDtlsConnectionStruct(), requireCloseNotify); } /** * Shut down part or all of a DTLS connection. * * If @shutdown_read is %TRUE then the receiving side of the connection is shut * down, and further reading is disallowed. Subsequent calls to * g_datagram_based_receive_messages() will return %G_IO_ERROR_CLOSED. * * If @shutdown_write is %TRUE then the sending side of the connection is shut * down, and further writing is disallowed. Subsequent calls to * g_datagram_based_send_messages() will return %G_IO_ERROR_CLOSED. * * It is allowed for both @shutdown_read and @shutdown_write to be TRUE — this * is equivalent to calling g_dtls_connection_close(). * * If @cancellable is cancelled, the #GDtlsConnection may be left * partially-closed and any pending untransmitted data may be lost. Call * g_dtls_connection_shutdown() again to complete closing the #GDtlsConnection. * * Params: * shutdownRead = %TRUE to stop reception of incoming datagrams * shutdownWrite = %TRUE to stop sending outgoing datagrams * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE on success, %FALSE otherwise * * Since: 2.48 * * Throws: GException on failure. */ public bool shutdown(bool shutdownRead, bool shutdownWrite, Cancellable cancellable) { GError* err = null; auto p = g_dtls_connection_shutdown(getDtlsConnectionStruct(), shutdownRead, shutdownWrite, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously shut down part or all of the DTLS connection. See * g_dtls_connection_shutdown() for more information. * * Params: * shutdownRead = %TRUE to stop reception of incoming datagrams * shutdownWrite = %TRUE to stop sending outgoing datagrams * ioPriority = the [I/O priority][io-priority] of the request * cancellable = a #GCancellable, or %NULL * callback = callback to call when the shutdown operation is complete * userData = the data to pass to the callback function * * Since: 2.48 */ public void shutdownAsync(bool shutdownRead, bool shutdownWrite, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_dtls_connection_shutdown_async(getDtlsConnectionStruct(), shutdownRead, shutdownWrite, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous TLS shutdown operation. See * g_dtls_connection_shutdown() for more information. * * Params: * result = a #GAsyncResult * * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set * * Since: 2.48 * * Throws: GException on failure. */ public bool shutdownFinish(AsyncResultIF result) { GError* err = null; auto p = g_dtls_connection_shutdown_finish(getDtlsConnectionStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } protected class OnAcceptCertificateDelegateWrapper { bool delegate(TlsCertificate, GTlsCertificateFlags, DtlsConnectionIF) dlg; gulong handlerId; this(bool delegate(TlsCertificate, GTlsCertificateFlags, DtlsConnectionIF) dlg) { this.dlg = dlg; onAcceptCertificateListeners ~= this; } void remove(OnAcceptCertificateDelegateWrapper source) { foreach(index, wrapper; onAcceptCertificateListeners) { if (wrapper.handlerId == source.handlerId) { onAcceptCertificateListeners[index] = null; onAcceptCertificateListeners = std.algorithm.remove(onAcceptCertificateListeners, index); break; } } } } OnAcceptCertificateDelegateWrapper[] onAcceptCertificateListeners; /** * Emitted during the TLS handshake after the peer certificate has * been received. You can examine @peer_cert's certification path by * calling g_tls_certificate_get_issuer() on it. * * For a client-side connection, @peer_cert is the server's * certificate, and the signal will only be emitted if the * certificate was not acceptable according to @conn's * #GDtlsClientConnection:validation_flags. If you would like the * certificate to be accepted despite @errors, return %TRUE from the * signal handler. Otherwise, if no handler accepts the certificate, * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE. * * For a server-side connection, @peer_cert is the certificate * presented by the client, if this was requested via the server's * #GDtlsServerConnection:authentication_mode. On the server side, * the signal is always emitted when the client presents a * certificate, and the certificate will only be accepted if a * handler returns %TRUE. * * Note that if this signal is emitted as part of asynchronous I/O * in the main thread, then you should not attempt to interact with * the user before returning from the signal handler. If you want to * let the user decide whether or not to accept the certificate, you * would have to return %FALSE from the signal handler on the first * attempt, and then after the connection attempt returns a * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if * the user decides to accept the certificate, remember that fact, * create a new connection, and return %TRUE from the signal handler * the next time. * * If you are doing I/O in another thread, you do not * need to worry about this, and can simply block in the signal * handler until the UI thread returns an answer. * * Params: * peerCert = the peer's #GTlsCertificate * errors = the problems with @peer_cert. * * Returns: %TRUE to accept @peer_cert (which will also * immediately end the signal emission). %FALSE to allow the signal * emission to continue, which will cause the handshake to fail if * no one else overrides it. * * Since: 2.48 */ gulong addOnAcceptCertificate(bool delegate(TlsCertificate, GTlsCertificateFlags, DtlsConnectionIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAcceptCertificateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "accept-certificate", cast(GCallback)&callBackAcceptCertificate, cast(void*)wrapper, cast(GClosureNotify)&callBackAcceptCertificateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackAcceptCertificate(GDtlsConnection* dtlsconnectionStruct, GTlsCertificate* peerCert, GTlsCertificateFlags errors, OnAcceptCertificateDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(TlsCertificate)(peerCert), errors, wrapper.outer); } extern(C) static void callBackAcceptCertificateDestroy(OnAcceptCertificateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/DtlsServerConnectionIF.d000066400000000000000000000033601324604450400225310ustar00rootroot00000000000000/* * 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 gio.DtlsServerConnectionIF; private import gio.DatagramBasedIF; private import gio.TlsCertificate; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GDtlsServerConnection is the server-side subclass of #GDtlsConnection, * representing a server-side DTLS connection. * * Since: 2.48 */ public interface DtlsServerConnectionIF{ /** Get the main Gtk struct */ public GDtlsServerConnection* getDtlsServerConnectionStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_dtls_server_connection_get_type(); } } GtkD-3.7.5/generated/gtkd/gio/DtlsServerConnectionT.d000066400000000000000000000032721324604450400224400ustar00rootroot00000000000000/* * 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 gio.DtlsServerConnectionT; public import gio.DatagramBasedIF; public import gio.TlsCertificate; public import gio.c.functions; public import gio.c.types; public import glib.ConstructionException; public import glib.ErrorG; public import glib.GException; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GDtlsServerConnection is the server-side subclass of #GDtlsConnection, * representing a server-side DTLS connection. * * Since: 2.48 */ public template DtlsServerConnectionT(TStruct) { /** Get the main Gtk struct */ public GDtlsServerConnection* getDtlsServerConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GDtlsServerConnection*)getStruct(); } } GtkD-3.7.5/generated/gtkd/gio/Emblem.d000066400000000000000000000074451324604450400174060ustar00rootroot00000000000000/* * 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 gio.Emblem; private import gio.IconIF; private import gio.IconT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GEmblem is an implementation of #GIcon that supports * having an emblem, which is an icon with additional properties. * It can than be added to a #GEmblemedIcon. * * Currently, only metainformation about the emblem's origin is * supported. More may be added in the future. */ public class Emblem : ObjectG, IconIF { /** the main Gtk struct */ protected GEmblem* gEmblem; /** Get the main Gtk struct */ public GEmblem* getEmblemStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gEmblem; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gEmblem; } protected override void setStruct(GObject* obj) { gEmblem = cast(GEmblem*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GEmblem* gEmblem, bool ownedRef = false) { this.gEmblem = gEmblem; super(cast(GObject*)gEmblem, ownedRef); } // add the Icon capabilities mixin IconT!(GEmblem); /** */ public static GType getType() { return g_emblem_get_type(); } /** * Creates a new emblem for @icon. * * Params: * icon = a GIcon containing the icon. * * Returns: a new #GEmblem. * * Since: 2.18 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(IconIF icon) { auto p = g_emblem_new((icon is null) ? null : icon.getIconStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GEmblem*) p, true); } /** * Creates a new emblem for @icon. * * Params: * icon = a GIcon containing the icon. * origin = a GEmblemOrigin enum defining the emblem's origin * * Returns: a new #GEmblem. * * Since: 2.18 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(IconIF icon, GEmblemOrigin origin) { auto p = g_emblem_new_with_origin((icon is null) ? null : icon.getIconStruct(), origin); if(p is null) { throw new ConstructionException("null returned by new_with_origin"); } this(cast(GEmblem*) p, true); } /** * Gives back the icon from @emblem. * * Returns: a #GIcon. The returned object belongs to * the emblem and should not be modified or freed. * * Since: 2.18 */ public IconIF getIcon() { auto p = g_emblem_get_icon(gEmblem); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p); } /** * Gets the origin of the emblem. * * Returns: the origin of the emblem * * Since: 2.18 */ public GEmblemOrigin getOrigin() { return g_emblem_get_origin(gEmblem); } } GtkD-3.7.5/generated/gtkd/gio/EmblemedIcon.d000066400000000000000000000100071324604450400205140ustar00rootroot00000000000000/* * 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 gio.EmblemedIcon; private import gio.Emblem; private import gio.IconIF; private import gio.IconT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ListG; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GEmblemedIcon is an implementation of #GIcon that supports * adding an emblem to an icon. Adding multiple emblems to an * icon is ensured via g_emblemed_icon_add_emblem(). * * Note that #GEmblemedIcon allows no control over the position * of the emblems. See also #GEmblem for more information. */ public class EmblemedIcon : ObjectG, IconIF { /** the main Gtk struct */ protected GEmblemedIcon* gEmblemedIcon; /** Get the main Gtk struct */ public GEmblemedIcon* getEmblemedIconStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gEmblemedIcon; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gEmblemedIcon; } protected override void setStruct(GObject* obj) { gEmblemedIcon = cast(GEmblemedIcon*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GEmblemedIcon* gEmblemedIcon, bool ownedRef = false) { this.gEmblemedIcon = gEmblemedIcon; super(cast(GObject*)gEmblemedIcon, ownedRef); } // add the Icon capabilities mixin IconT!(GEmblemedIcon); /** */ public static GType getType() { return g_emblemed_icon_get_type(); } /** * Creates a new emblemed icon for @icon with the emblem @emblem. * * Params: * icon = a #GIcon * emblem = a #GEmblem, or %NULL * * Returns: a new #GIcon * * Since: 2.18 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(IconIF icon, Emblem emblem) { auto p = g_emblemed_icon_new((icon is null) ? null : icon.getIconStruct(), (emblem is null) ? null : emblem.getEmblemStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GEmblemedIcon*) p, true); } /** * Adds @emblem to the #GList of #GEmblems. * * Params: * emblem = a #GEmblem * * Since: 2.18 */ public void addEmblem(Emblem emblem) { g_emblemed_icon_add_emblem(gEmblemedIcon, (emblem is null) ? null : emblem.getEmblemStruct()); } /** * Removes all the emblems from @icon. * * Since: 2.28 */ public void clearEmblems() { g_emblemed_icon_clear_emblems(gEmblemedIcon); } /** * Gets the list of emblems for the @icon. * * Returns: a #GList of * #GEmblems that is owned by @emblemed * * Since: 2.18 */ public ListG getEmblems() { auto p = g_emblemed_icon_get_emblems(gEmblemedIcon); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the main icon for @emblemed. * * Returns: a #GIcon that is owned by @emblemed * * Since: 2.18 */ public IconIF getIcon() { auto p = g_emblemed_icon_get_icon(gEmblemedIcon); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p); } } GtkD-3.7.5/generated/gtkd/gio/ErrorGIO.d000066400000000000000000000035321324604450400176260ustar00rootroot00000000000000/* * 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 gio.ErrorGIO; private import gio.c.functions; public import gio.c.types; public import gtkc.giotypes; /** */ public struct ErrorGIO { /** * Converts errno.h error codes into GIO error codes. The fallback * value %G_IO_ERROR_FAILED is returned for error codes not currently * handled (but note that future GLib releases may return a more * specific value instead). * * As %errno is global and may be modified by intermediate function * calls, you should save its value as soon as the call which sets it * * Params: * errNo = Error number as defined in errno.h. * * Returns: #GIOErrorEnum value for the given errno.h error number. */ public static GIOErrorEnum ioErrorFromErrno(int errNo) { return g_io_error_from_errno(errNo); } /** * Gets the GIO Error Quark. * * Returns: a #GQuark. */ public static GQuark ioErrorQuark() { return g_io_error_quark(); } } GtkD-3.7.5/generated/gtkd/gio/FileAttributeInfoList.d000066400000000000000000000113461324604450400224130ustar00rootroot00000000000000/* * 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 gio.FileAttributeInfoList; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Acts as a lightweight registry for possible valid file attributes. * The registry stores Key-Value pair formats as #GFileAttributeInfos. */ public final class FileAttributeInfoList { /** the main Gtk struct */ protected GFileAttributeInfoList* gFileAttributeInfoList; protected bool ownedRef; /** Get the main Gtk struct */ public GFileAttributeInfoList* getFileAttributeInfoListStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFileAttributeInfoList; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gFileAttributeInfoList; } /** * Sets our main struct and passes it to the parent class. */ public this (GFileAttributeInfoList* gFileAttributeInfoList, bool ownedRef = false) { this.gFileAttributeInfoList = gFileAttributeInfoList; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_file_attribute_info_list_unref(gFileAttributeInfoList); } /** * an array of #GFileAttributeInfos. */ public @property GFileAttributeInfo[] infos() { return gFileAttributeInfoList.infos[0..gFileAttributeInfoList.nInfos]; } /** Ditto */ public @property void infos(GFileAttributeInfo[] value) { gFileAttributeInfoList.infos = value.ptr; gFileAttributeInfoList.nInfos = cast(int)value.length; } /** */ public static GType getType() { return g_file_attribute_info_list_get_type(); } /** * Creates a new file attribute info list. * * Returns: a #GFileAttributeInfoList. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_file_attribute_info_list_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GFileAttributeInfoList*) p); } /** * Adds a new attribute with @name to the @list, setting * its @type and @flags. * * Params: * name = the name of the attribute to add. * type = the #GFileAttributeType for the attribute. * flags = #GFileAttributeInfoFlags for the attribute. */ public void add(string name, GFileAttributeType type, GFileAttributeInfoFlags flags) { g_file_attribute_info_list_add(gFileAttributeInfoList, Str.toStringz(name), type, flags); } /** * Makes a duplicate of a file attribute info list. * * Returns: a copy of the given @list. */ public FileAttributeInfoList dup() { auto p = g_file_attribute_info_list_dup(gFileAttributeInfoList); if(p is null) { return null; } return ObjectG.getDObject!(FileAttributeInfoList)(cast(GFileAttributeInfoList*) p, true); } /** * Gets the file attribute with the name @name from @list. * * Params: * name = the name of the attribute to lookup. * * Returns: a #GFileAttributeInfo for the @name, or %NULL if an * attribute isn't found. */ public GFileAttributeInfo* lookup(string name) { return g_file_attribute_info_list_lookup(gFileAttributeInfoList, Str.toStringz(name)); } /** * References a file attribute info list. * * Returns: #GFileAttributeInfoList or %NULL on error. */ public FileAttributeInfoList doref() { auto p = g_file_attribute_info_list_ref(gFileAttributeInfoList); if(p is null) { return null; } return ObjectG.getDObject!(FileAttributeInfoList)(cast(GFileAttributeInfoList*) p, true); } /** * Removes a reference from the given @list. If the reference count * falls to zero, the @list is deleted. */ public void unref() { g_file_attribute_info_list_unref(gFileAttributeInfoList); } } GtkD-3.7.5/generated/gtkd/gio/FileAttributeMatcher.d000066400000000000000000000166401324604450400222510ustar00rootroot00000000000000/* * 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 gio.FileAttributeMatcher; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Determines if a string matches a file attribute. */ public class FileAttributeMatcher { /** the main Gtk struct */ protected GFileAttributeMatcher* gFileAttributeMatcher; protected bool ownedRef; /** Get the main Gtk struct */ public GFileAttributeMatcher* getFileAttributeMatcherStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFileAttributeMatcher; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gFileAttributeMatcher; } /** * Sets our main struct and passes it to the parent class. */ public this (GFileAttributeMatcher* gFileAttributeMatcher, bool ownedRef = false) { this.gFileAttributeMatcher = gFileAttributeMatcher; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_file_attribute_matcher_unref(gFileAttributeMatcher); } /** */ public static GType getType() { return g_file_attribute_matcher_get_type(); } /** * Creates a new file attribute matcher, which matches attributes * against a given string. #GFileAttributeMatchers are reference * counted structures, and are created with a reference count of 1. If * the number of references falls to 0, the #GFileAttributeMatcher is * automatically destroyed. * * The @attribute string should be formatted with specific keys separated * from namespaces with a double colon. Several "namespace::key" strings may be * concatenated with a single comma (e.g. "standard::type,standard::is-hidden"). * The wildcard "*" may be used to match all keys and namespaces, or * "namespace::*" will match all keys in a given namespace. * * ## Examples of file attribute matcher strings and results * * - `"*"`: matches all attributes. * - `"standard::is-hidden"`: matches only the key is-hidden in the * standard namespace. * - `"standard::type,unix::*"`: matches the type key in the standard * namespace and all keys in the unix namespace. * * Params: * attributes = an attribute string to match. * * Returns: a #GFileAttributeMatcher * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string attributes) { auto p = g_file_attribute_matcher_new(Str.toStringz(attributes)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GFileAttributeMatcher*) p); } /** * Checks if the matcher will match all of the keys in a given namespace. * This will always return %TRUE if a wildcard character is in use (e.g. if * matcher was created with "standard::*" and @ns is "standard", or if matcher was created * using "*" and namespace is anything.) * * TODO: this is awkwardly worded. * * Params: * ns = a string containing a file attribute namespace. * * Returns: %TRUE if the matcher matches all of the entries * in the given @ns, %FALSE otherwise. */ public bool enumerateNamespace(string ns) { return g_file_attribute_matcher_enumerate_namespace(gFileAttributeMatcher, Str.toStringz(ns)) != 0; } /** * Gets the next matched attribute from a #GFileAttributeMatcher. * * Returns: a string containing the next attribute or %NULL if * no more attribute exist. */ public string enumerateNext() { return Str.toString(g_file_attribute_matcher_enumerate_next(gFileAttributeMatcher)); } /** * Checks if an attribute will be matched by an attribute matcher. If * the matcher was created with the "*" matching string, this function * will always return %TRUE. * * Params: * attribute = a file attribute key. * * Returns: %TRUE if @attribute matches @matcher. %FALSE otherwise. */ public bool matches(string attribute) { return g_file_attribute_matcher_matches(gFileAttributeMatcher, Str.toStringz(attribute)) != 0; } /** * Checks if a attribute matcher only matches a given attribute. Always * returns %FALSE if "*" was used when creating the matcher. * * Params: * attribute = a file attribute key. * * Returns: %TRUE if the matcher only matches @attribute. %FALSE otherwise. */ public bool matchesOnly(string attribute) { return g_file_attribute_matcher_matches_only(gFileAttributeMatcher, Str.toStringz(attribute)) != 0; } /** * References a file attribute matcher. * * Returns: a #GFileAttributeMatcher. */ public FileAttributeMatcher doref() { auto p = g_file_attribute_matcher_ref(gFileAttributeMatcher); if(p is null) { return null; } return ObjectG.getDObject!(FileAttributeMatcher)(cast(GFileAttributeMatcher*) p, true); } /** * Subtracts all attributes of @subtract from @matcher and returns * a matcher that supports those attributes. * * Note that currently it is not possible to remove a single * attribute when the @matcher matches the whole namespace - or remove * a namespace or attribute when the matcher matches everything. This * is a limitation of the current implementation, but may be fixed * in the future. * * Params: * subtract = The matcher to subtract * * Returns: A file attribute matcher matching all attributes of * @matcher that are not matched by @subtract */ public FileAttributeMatcher subtract(FileAttributeMatcher subtract) { auto p = g_file_attribute_matcher_subtract(gFileAttributeMatcher, (subtract is null) ? null : subtract.getFileAttributeMatcherStruct()); if(p is null) { return null; } return ObjectG.getDObject!(FileAttributeMatcher)(cast(GFileAttributeMatcher*) p, true); } /** * Prints what the matcher is matching against. The format will be * equal to the format passed to g_file_attribute_matcher_new(). * The output however, might not be identical, as the matcher may * decide to use a different order or omit needless parts. * * Returns: a string describing the attributes the matcher matches * against or %NULL if @matcher was %NULL. * * Since: 2.32 */ public override string toString() { auto retStr = g_file_attribute_matcher_to_string(gFileAttributeMatcher); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Unreferences @matcher. If the reference count falls below 1, * the @matcher is automatically freed. */ public void unref() { g_file_attribute_matcher_unref(gFileAttributeMatcher); } } GtkD-3.7.5/generated/gtkd/gio/FileDescriptorBasedIF.d000066400000000000000000000035171324604450400222750ustar00rootroot00000000000000/* * 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 gio.FileDescriptorBasedIF; private import gio.c.functions; public import gio.c.types; public import gtkc.giotypes; /** * #GFileDescriptorBased is implemented by streams (implementations of * #GInputStream or #GOutputStream) that are based on file descriptors. * * Note that `` belongs to the UNIX-specific * GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config * file when using it. */ public interface FileDescriptorBasedIF{ /** Get the main Gtk struct */ public GFileDescriptorBased* getFileDescriptorBasedStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_file_descriptor_based_get_type(); } /** * Gets the underlying file descriptor. * * Returns: The file descriptor * * Since: 2.24 */ public int getFd(); } GtkD-3.7.5/generated/gtkd/gio/FileDescriptorBasedT.d000066400000000000000000000035471324604450400222050ustar00rootroot00000000000000/* * 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 gio.FileDescriptorBasedT; public import gio.c.functions; public import gio.c.types; public import gtkc.giotypes; /** * #GFileDescriptorBased is implemented by streams (implementations of * #GInputStream or #GOutputStream) that are based on file descriptors. * * Note that `` belongs to the UNIX-specific * GIO interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config * file when using it. */ public template FileDescriptorBasedT(TStruct) { /** Get the main Gtk struct */ public GFileDescriptorBased* getFileDescriptorBasedStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GFileDescriptorBased*)getStruct(); } /** * Gets the underlying file descriptor. * * Returns: The file descriptor * * Since: 2.24 */ public int getFd() { return g_file_descriptor_based_get_fd(getFileDescriptorBasedStruct()); } } GtkD-3.7.5/generated/gtkd/gio/FileEnumerator.d000066400000000000000000000333201324604450400211150ustar00rootroot00000000000000/* * 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 gio.FileEnumerator; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.FileIF; private import gio.FileInfo; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GFileEnumerator allows you to operate on a set of #GFiles, * returning a #GFileInfo structure for each file enumerated (e.g. * g_file_enumerate_children() will return a #GFileEnumerator for each * of the children within a directory). * * To get the next file's information from a #GFileEnumerator, use * g_file_enumerator_next_file() or its asynchronous version, * g_file_enumerator_next_files_async(). Note that the asynchronous * version will return a list of #GFileInfos, whereas the * synchronous will only return the next file in the enumerator. * * The ordering of returned files is unspecified for non-Unix * platforms; for more information, see g_dir_read_name(). On Unix, * when operating on local files, returned files will be sorted by * inode number. Effectively you can assume that the ordering of * returned files will be stable between successive calls (and * applications) assuming the directory is unchanged. * * If your application needs a specific ordering, such as by name or * modification time, you will have to implement that in your * application code. * * To close a #GFileEnumerator, use g_file_enumerator_close(), or * its asynchronous version, g_file_enumerator_close_async(). Once * a #GFileEnumerator is closed, no further actions may be performed * on it, and it should be freed with g_object_unref(). */ public class FileEnumerator : ObjectG { /** the main Gtk struct */ protected GFileEnumerator* gFileEnumerator; /** Get the main Gtk struct */ public GFileEnumerator* getFileEnumeratorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFileEnumerator; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFileEnumerator; } protected override void setStruct(GObject* obj) { gFileEnumerator = cast(GFileEnumerator*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFileEnumerator* gFileEnumerator, bool ownedRef = false) { this.gFileEnumerator = gFileEnumerator; super(cast(GObject*)gFileEnumerator, ownedRef); } /** */ public static GType getType() { return g_file_enumerator_get_type(); } /** * Releases all resources used by this enumerator, making the * enumerator return %G_IO_ERROR_CLOSED on all calls. * * This will be automatically called when the last reference * is dropped, but you might want to call this function to make * sure resources are released as early as possible. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: #TRUE on success or #FALSE on error. * * Throws: GException on failure. */ public bool close(Cancellable cancellable) { GError* err = null; auto p = g_file_enumerator_close(gFileEnumerator, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously closes the file enumerator. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned in * g_file_enumerator_close_finish(). * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function */ public void closeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_enumerator_close_async(gFileEnumerator, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes closing a file enumerator, started from g_file_enumerator_close_async(). * * If the file enumerator was already closed when g_file_enumerator_close_async() * was called, then this function will report %G_IO_ERROR_CLOSED in @error, and * return %FALSE. If the file enumerator had pending operation when the close * operation was started, then this function will report %G_IO_ERROR_PENDING, and * return %FALSE. If @cancellable was not %NULL, then the operation may have been * cancelled by triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %FALSE will be * returned. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the close operation has finished successfully. * * Throws: GException on failure. */ public bool closeFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_enumerator_close_finish(gFileEnumerator, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Return a new #GFile which refers to the file named by @info in the source * directory of @enumerator. This function is primarily intended to be used * inside loops with g_file_enumerator_next_file(). * * This is a convenience method that's equivalent to: * |[ * gchar *name = g_file_info_get_name (info); * GFile *child = g_file_get_child (g_file_enumerator_get_container (enumr), * name); * ]| * * Params: * info = a #GFileInfo gotten from g_file_enumerator_next_file() * or the async equivalents. * * Returns: a #GFile for the #GFileInfo passed it. * * Since: 2.36 */ public FileIF getChild(FileInfo info) { auto p = g_file_enumerator_get_child(gFileEnumerator, (info is null) ? null : info.getFileInfoStruct()); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Get the #GFile container which is being enumerated. * * Returns: the #GFile which is being enumerated. * * Since: 2.18 */ public FileIF getContainer() { auto p = g_file_enumerator_get_container(gFileEnumerator); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p); } /** * Checks if the file enumerator has pending operations. * * Returns: %TRUE if the @enumerator has pending operations. */ public bool hasPending() { return g_file_enumerator_has_pending(gFileEnumerator) != 0; } /** * Checks if the file enumerator has been closed. * * Returns: %TRUE if the @enumerator is closed. */ public bool isClosed() { return g_file_enumerator_is_closed(gFileEnumerator) != 0; } /** * This is a version of g_file_enumerator_next_file() that's easier to * use correctly from C programs. With g_file_enumerator_next_file(), * the gboolean return value signifies "end of iteration or error", which * requires allocation of a temporary #GError. * * In contrast, with this function, a %FALSE return from * g_file_enumerator_iterate() *always* means * "error". End of iteration is signaled by @out_info or @out_child being %NULL. * * Another crucial difference is that the references for @out_info and * @out_child are owned by @direnum (they are cached as hidden * properties). You must not unref them in your own code. This makes * memory management significantly easier for C code in combination * with loops. * * Finally, this function optionally allows retrieving a #GFile as * well. * * You must specify at least one of @out_info or @out_child. * * The code pattern for correctly using g_file_enumerator_iterate() from C * is: * * |[ * direnum = g_file_enumerate_children (file, ...); * while (TRUE) * { * GFileInfo *info; * if (!g_file_enumerator_iterate (direnum, &info, NULL, cancellable, error)) * goto out; * if (!info) * break; * ... do stuff with "info"; do not unref it! ... * } * * out: * g_object_unref (direnum); // Note: frees the last @info * ]| * * Params: * outInfo = Output location for the next #GFileInfo, or %NULL * outChild = Output location for the next #GFile, or %NULL * cancellable = a #GCancellable * * Since: 2.44 * * Throws: GException on failure. */ public bool iterate(out FileInfo outInfo, out FileIF outChild, Cancellable cancellable) { GFileInfo* outoutInfo = null; GFile* outoutChild = null; GError* err = null; auto p = g_file_enumerator_iterate(gFileEnumerator, &outoutInfo, &outoutChild, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } outInfo = ObjectG.getDObject!(FileInfo)(outoutInfo); outChild = ObjectG.getDObject!(FileIF)(outoutChild); return p; } /** * Returns information for the next file in the enumerated object. * Will block until the information is available. The #GFileInfo * returned from this function will contain attributes that match the * attribute string that was passed when the #GFileEnumerator was created. * * See the documentation of #GFileEnumerator for information about the * order of returned files. * * On error, returns %NULL and sets @error to the error. If the * enumerator is at the end, %NULL will be returned and @error will * be unset. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: A #GFileInfo or %NULL on error * or end of enumerator. Free the returned object with * g_object_unref() when no longer needed. * * Throws: GException on failure. */ public FileInfo nextFile(Cancellable cancellable) { GError* err = null; auto p = g_file_enumerator_next_file(gFileEnumerator, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } /** * Request information for a number of files from the enumerator asynchronously. * When all i/o for the operation is finished the @callback will be called with * the requested information. * * See the documentation of #GFileEnumerator for information about the * order of returned files. * * The callback can be called with less than @num_files files in case of error * or at the end of the enumerator. In case of a partial error the callback will * be called with any succeeding items and no error, and on the next request the * error will be reported. If a request is cancelled the callback will be called * with %G_IO_ERROR_CANCELLED. * * During an async request no other sync and async calls are allowed, and will * result in %G_IO_ERROR_PENDING errors. * * Any outstanding i/o request with higher priority (lower numerical value) will * be executed before an outstanding request with lower priority. Default * priority is %G_PRIORITY_DEFAULT. * * Params: * numFiles = the number of file info objects to request * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function */ public void nextFilesAsync(int numFiles, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_enumerator_next_files_async(gFileEnumerator, numFiles, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes the asynchronous operation started with g_file_enumerator_next_files_async(). * * Params: * result = a #GAsyncResult. * * Returns: a #GList of #GFileInfos. You must free the list with * g_list_free() and unref the infos with g_object_unref() when you're * done with them. * * Throws: GException on failure. */ public ListG nextFilesFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_enumerator_next_files_finish(gFileEnumerator, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Sets the file enumerator as having pending operations. * * Params: * pending = a boolean value. */ public void setPending(bool pending) { g_file_enumerator_set_pending(gFileEnumerator, pending); } } GtkD-3.7.5/generated/gtkd/gio/FileIF.d000066400000000000000000003167471324604450400173130ustar00rootroot00000000000000/* * 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 gio.FileIF; private import gio.AppInfoIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.FileAttributeInfoList; private import gio.FileEnumerator; private import gio.FileIF; private import gio.FileIOStream; private import gio.FileInfo; private import gio.FileInputStream; private import gio.FileMonitor; private import gio.FileOutputStream; private import gio.MountIF; private import gio.MountOperation; private import gio.c.functions; public import gio.c.types; private import glib.Bytes; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GFile is a high level abstraction for manipulating files on a * virtual file system. #GFiles are lightweight, immutable objects * that do no I/O upon creation. It is necessary to understand that * #GFile objects do not represent files, merely an identifier for a * file. All file content I/O is implemented as streaming operations * (see #GInputStream and #GOutputStream). * * To construct a #GFile, you can use: * - g_file_new_for_path() if you have a path. * - g_file_new_for_uri() if you have a URI. * - g_file_new_for_commandline_arg() for a command line argument. * - g_file_new_tmp() to create a temporary file from a template. * - g_file_parse_name() from a UTF-8 string gotten from g_file_get_parse_name(). * * One way to think of a #GFile is as an abstraction of a pathname. For * normal files the system pathname is what is stored internally, but as * #GFiles are extensible it could also be something else that corresponds * to a pathname in a userspace implementation of a filesystem. * * #GFiles make up hierarchies of directories and files that correspond to * the files on a filesystem. You can move through the file system with * #GFile using g_file_get_parent() to get an identifier for the parent * directory, g_file_get_child() to get a child within a directory, * g_file_resolve_relative_path() to resolve a relative path between two * #GFiles. There can be multiple hierarchies, so you may not end up at * the same root if you repeatedly call g_file_get_parent() on two different * files. * * All #GFiles have a basename (get with g_file_get_basename()). These names * are byte strings that are used to identify the file on the filesystem * (relative to its parent directory) and there is no guarantees that they * have any particular charset encoding or even make any sense at all. If * you want to use filenames in a user interface you should use the display * name that you can get by requesting the * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info(). * This is guaranteed to be in UTF-8 and can be used in a user interface. * But always store the real basename or the #GFile to use to actually * access the file, because there is no way to go from a display name to * the actual name. * * Using #GFile as an identifier has the same weaknesses as using a path * in that there may be multiple aliases for the same file. For instance, * hard or soft links may cause two different #GFiles to refer to the same * file. Other possible causes for aliases are: case insensitive filesystems, * short and long names on FAT/NTFS, or bind mounts in Linux. If you want to * check if two #GFiles point to the same file you can query for the * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial * canonicalization of pathnames passed in, so that trivial differences in * the path string used at creation (duplicated slashes, slash at end of * path, "." or ".." path segments, etc) does not create different #GFiles. * * Many #GFile operations have both synchronous and asynchronous versions * to suit your application. Asynchronous versions of synchronous functions * simply have _async() appended to their function names. The asynchronous * I/O functions call a #GAsyncReadyCallback which is then used to finalize * the operation, producing a GAsyncResult which is then passed to the * function's matching _finish() operation. * * It is highly recommended to use asynchronous calls when running within a * shared main loop, such as in the main thread of an application. This avoids * I/O operations blocking other sources on the main loop from being dispatched. * Synchronous I/O operations should be performed from worker threads. See the * [introduction to asynchronous programming section][async-programming] for * more. * * Some #GFile operations almost always take a noticeable amount of time, and * so do not have synchronous analogs. Notable cases include: * - g_file_mount_mountable() to mount a mountable file. * - g_file_unmount_mountable_with_operation() to unmount a mountable file. * - g_file_eject_mountable_with_operation() to eject a mountable file. * * ## Entity Tags # {#gfile-etag} * * One notable feature of #GFiles are entity tags, or "etags" for * short. Entity tags are somewhat like a more abstract version of the * traditional mtime, and can be used to quickly determine if the file * has been modified from the version on the file system. See the * HTTP 1.1 * [specification](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) * for HTTP Etag headers, which are a very similar concept. */ public interface FileIF{ /** Get the main Gtk struct */ public GFile* getFileStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_file_get_type(); } /** * Constructs a #GFile with the given @parse_name (i.e. something * given by g_file_get_parse_name()). This operation never fails, * but the returned object might not support any I/O operation if * the @parse_name cannot be parsed. * * Params: * parseName = a file name or path to be parsed * * Returns: a new #GFile. */ public static FileIF parseName(string parseName) { auto p = g_file_parse_name(Str.toStringz(parseName)); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets an output stream for appending data to the file. * If the file doesn't already exist it is created. * * By default files created are generally readable by everyone, * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level that * is supported on the target filesystem. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * Some file systems don't allow all file names, and may return an * %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the * %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are * possible too, and depend on what kind of filesystem the file is on. * * Params: * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileOutputStream, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream appendTo(GFileCreateFlags flags, Cancellable cancellable); /** * Asynchronously opens @file for appending. * * For more details, see g_file_append_to() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_append_to_finish() to get the result * of the operation. * * Params: * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void appendToAsync(GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous file append operation started with * g_file_append_to_async(). * * Params: * res = #GAsyncResult * * Returns: a valid #GFileOutputStream * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream appendToFinish(AsyncResultIF res); /** * Copies the file @source to the location specified by @destination. * Can not handle recursive copies of directories. * * If the flag #G_FILE_COPY_OVERWRITE is specified an already * existing @destination file is overwritten. * * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks * will be copied as symlinks, otherwise the target of the * @source symlink will be copied. * * If the flag #G_FILE_COPY_ALL_METADATA is specified then all the metadata * that is possible to copy is copied, not just the default subset (which, * for instance, does not include the owner, see #GFileInfo). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If @progress_callback is not %NULL, then the operation can be monitored * by setting this to a #GFileProgressCallback function. * @progress_callback_data will be passed to this function. It is guaranteed * that this callback will be called after all data has been transferred with * the total number of bytes copied during the operation. * * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND error * is returned, independent on the status of the @destination. * * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then * the error %G_IO_ERROR_EXISTS is returned. * * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY * error is returned. If trying to overwrite a directory with a directory the * %G_IO_ERROR_WOULD_MERGE error is returned. * * If the source is a directory and the target does not exist, or * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the * %G_IO_ERROR_WOULD_RECURSE error is returned. * * If you are interested in copying the #GFile object itself (not the on-disk * file), see g_file_dup(). * * Params: * destination = destination #GFile * flags = set of #GFileCopyFlags * cancellable = optional #GCancellable object, * %NULL to ignore * progressCallback = function to callback with * progress information, or %NULL if progress information is not needed * progressCallbackData = user data to pass to @progress_callback * * Returns: %TRUE on success, %FALSE otherwise. * * Throws: GException on failure. */ public bool copy(FileIF destination, GFileCopyFlags flags, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData); /** * Copies the file @source to the location specified by @destination * asynchronously. For details of the behaviour, see g_file_copy(). * * If @progress_callback is not %NULL, then that function that will be called * just like in g_file_copy(). The callback will run in the default main context * of the thread calling g_file_copy_async() — the same context as @callback is * run in. * * When the operation is finished, @callback will be called. You can then call * g_file_copy_finish() to get the result of the operation. * * Params: * destination = destination #GFile * flags = set of #GFileCopyFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * progressCallback = function to callback with progress * information, or %NULL if progress information is not needed * progressCallbackData = user data to pass to @progress_callback * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function */ public void copyAsync(FileIF destination, GFileCopyFlags flags, int ioPriority, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData); /** * Copies the file attributes from @source to @destination. * * Normally only a subset of the file attributes are copied, * those that are copies in a normal file copy operation * (which for instance does not include e.g. owner). However * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then * all the metadata that is possible to copy is copied. This * is useful when implementing move by copy + delete source. * * Params: * destination = a #GFile to copy attributes to * flags = a set of #GFileCopyFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the attributes were copied successfully, * %FALSE otherwise. * * Throws: GException on failure. */ public bool copyAttributes(FileIF destination, GFileCopyFlags flags, Cancellable cancellable); /** * Finishes copying the file started with g_file_copy_async(). * * Params: * res = a #GAsyncResult * * Returns: a %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool copyFinish(AsyncResultIF res); /** * Creates a new file and returns an output stream for writing to it. * The file must not already exist. * * By default files created are generally readable by everyone, * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level * that is supported on the target filesystem. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If a file or directory with this name already exists the * %G_IO_ERROR_EXISTS error will be returned. Some file systems don't * allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME * error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will * be returned. Other errors are possible too, and depend on what kind * of filesystem the file is on. * * Params: * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileOutputStream for the newly created * file, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream create(GFileCreateFlags flags, Cancellable cancellable); /** * Asynchronously creates a new file and returns an output stream * for writing to it. The file must not already exist. * * For more details, see g_file_create() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_create_finish() to get the result * of the operation. * * Params: * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void createAsync(GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous file create operation started with * g_file_create_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileOutputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream createFinish(AsyncResultIF res); /** * Creates a new file and returns a stream for reading and * writing to it. The file must not already exist. * * By default files created are generally readable by everyone, * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level * that is supported on the target filesystem. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If a file or directory with this name already exists, the * %G_IO_ERROR_EXISTS error will be returned. Some file systems don't * allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME * error, and if the name is too long, %G_IO_ERROR_FILENAME_TOO_LONG * will be returned. Other errors are possible too, and depend on what * kind of filesystem the file is on. * * Note that in many non-local file cases read and write streams are * not supported, so make sure you really need to do read and write * streaming, rather than just opening for reading or writing. * * Params: * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileIOStream for the newly created * file, or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream createReadwrite(GFileCreateFlags flags, Cancellable cancellable); /** * Asynchronously creates a new file and returns a stream * for reading and writing to it. The file must not already exist. * * For more details, see g_file_create_readwrite() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_create_readwrite_finish() to get * the result of the operation. * * Params: * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void createReadwriteAsync(GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous file create operation started with * g_file_create_readwrite_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream createReadwriteFinish(AsyncResultIF res); /** * Deletes a file. If the @file is a directory, it will only be * deleted if it is empty. This has the same semantics as g_unlink(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the file was deleted. %FALSE otherwise. * * Throws: GException on failure. */ public bool delet(Cancellable cancellable); /** * Asynchronously delete a file. If the @file is a directory, it will * only be deleted if it is empty. This has the same semantics as * g_unlink(). * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.34 */ public void deleteAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes deleting a file started with g_file_delete_async(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the file was deleted. %FALSE otherwise. * * Since: 2.34 * * Throws: GException on failure. */ public bool deleteFinish(AsyncResultIF result); /** * Duplicates a #GFile handle. This operation does not duplicate * the actual file or directory represented by the #GFile; see * g_file_copy() if attempting to copy a file. * * This call does no blocking I/O. * * Returns: a new #GFile that is a duplicate * of the given #GFile. */ public FileIF dup(); /** * Starts an asynchronous eject on a mountable. * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_eject_mountable_finish(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Deprecated: Use g_file_eject_mountable_with_operation() instead. * * Params: * flags = flags affecting the operation * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function */ public void ejectMountable(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous eject operation started by * g_file_eject_mountable(). * * Deprecated: Use g_file_eject_mountable_with_operation_finish() * instead. * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the @file was ejected successfully. * %FALSE otherwise. * * Throws: GException on failure. */ public bool ejectMountableFinish(AsyncResultIF result); /** * Starts an asynchronous eject on a mountable. * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_eject_mountable_with_operation_finish(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation, * or %NULL to avoid user interaction * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void ejectMountableWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous eject operation started by * g_file_eject_mountable_with_operation(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the @file was ejected successfully. * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool ejectMountableWithOperationFinish(AsyncResultIF result); /** * Gets the requested information about the files in a directory. * The result is a #GFileEnumerator object that will give out * #GFileInfo objects for all the files in the directory. * * The @attributes value is a string that specifies the file * attributes that should be gathered. It is not an error if * it's not possible to read a particular requested attribute * from a file - it just won't be set. @attributes should * be a comma-separated list of attributes or attribute wildcards. * The wildcard "*" means all attributes, and a wildcard like * "standard::*" means all attributes in the standard namespace. * An example attribute query be "standard::*,owner::user". * The standard attributes are available as defines, like * #G_FILE_ATTRIBUTE_STANDARD_NAME. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will * be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY * error will be returned. Other errors are possible too. * * Params: * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: A #GFileEnumerator if successful, * %NULL on error. Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileEnumerator enumerateChildren(string attributes, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Asynchronously gets the requested information about the files * in a directory. The result is a #GFileEnumerator object that will * give out #GFileInfo objects for all the files in the directory. * * For more details, see g_file_enumerate_children() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. You can * then call g_file_enumerate_children_finish() to get the result of * the operation. * * Params: * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call when the * request is satisfied * userData = the data to pass to callback function */ public void enumerateChildrenAsync(string attributes, GFileQueryInfoFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an async enumerate children operation. * See g_file_enumerate_children_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileEnumerator or %NULL * if an error occurred. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileEnumerator enumerateChildrenFinish(AsyncResultIF res); /** * Checks if the two given #GFiles refer to the same file. * * Note that two #GFiles that differ can still refer to the same * file on the filesystem due to various forms of filename * aliasing. * * This call does no blocking I/O. * * Params: * file2 = the second #GFile * * Returns: %TRUE if @file1 and @file2 are equal. */ public bool equal(FileIF file2); /** * Gets a #GMount for the #GFile. * * If the #GFileIface for @file does not have a mount (e.g. * possibly a remote share), @error will be set to %G_IO_ERROR_NOT_FOUND * and %NULL will be returned. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GMount where the @file is located * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public MountIF findEnclosingMount(Cancellable cancellable); /** * Asynchronously gets the mount for the file. * * For more details, see g_file_find_enclosing_mount() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_find_enclosing_mount_finish() to * get the result of the operation. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void findEnclosingMountAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous find mount request. * See g_file_find_enclosing_mount_async(). * * Params: * res = a #GAsyncResult * * Returns: #GMount for given @file or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public MountIF findEnclosingMountFinish(AsyncResultIF res); /** * Gets the base name (the last component of the path) for a given #GFile. * * If called for the top level of a system (such as the filesystem root * or a uri like sftp://host/) it will return a single directory separator * (and on Windows, possibly a drive letter). * * The base name is a byte string (not UTF-8). It has no defined encoding * or rules other than it may not contain zero bytes. If you want to use * filenames in a user interface you should use the display name that you * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME * attribute with g_file_query_info(). * * This call does no blocking I/O. * * Returns: string containing the #GFile's * base name, or %NULL if given #GFile is invalid. The returned string * should be freed with g_free() when no longer needed. */ public string getBasename(); /** * Gets a child of @file with basename equal to @name. * * Note that the file with that specific name might not exist, but * you can still have a #GFile that points to it. You can use this * for instance to create that file. * * This call does no blocking I/O. * * Params: * name = string containing the child's basename * * Returns: a #GFile to a child specified by @name. * Free the returned object with g_object_unref(). */ public FileIF getChild(string name); /** * Gets the child of @file for a given @display_name (i.e. a UTF-8 * version of the name). If this function fails, it returns %NULL * and @error will be set. This is very useful when constructing a * #GFile for a new file and the user entered the filename in the * user interface, for instance when you select a directory and * type a filename in the file selector. * * This call does no blocking I/O. * * Params: * displayName = string to a possible child * * Returns: a #GFile to the specified child, or * %NULL if the display name couldn't be converted. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileIF getChildForDisplayName(string displayName); /** * Gets the parent directory for the @file. * If the @file represents the root directory of the * file system, then %NULL will be returned. * * This call does no blocking I/O. * * Returns: a #GFile structure to the * parent of the given #GFile or %NULL if there is no parent. Free * the returned object with g_object_unref(). */ public FileIF getParent(); /** * Gets the parse name of the @file. * A parse name is a UTF-8 string that describes the * file such that one can get the #GFile back using * g_file_parse_name(). * * This is generally used to show the #GFile as a nice * full-pathname kind of string in a user interface, * like in a location entry. * * For local files with names that can safely be converted * to UTF-8 the pathname is used, otherwise the IRI is used * (a form of URI that allows UTF-8 characters unescaped). * * This call does no blocking I/O. * * Returns: a string containing the #GFile's parse name. * The returned string should be freed with g_free() * when no longer needed. */ public string getParseName(); /** * Gets the local pathname for #GFile, if one exists. If non-%NULL, this is * guaranteed to be an absolute, canonical path. It might contain symlinks. * * This call does no blocking I/O. * * Returns: string containing the #GFile's path, * or %NULL if no such path exists. The returned string should be freed * with g_free() when no longer needed. */ public string getPath(); /** * Gets the path for @descendant relative to @parent. * * This call does no blocking I/O. * * Params: * descendant = input #GFile * * Returns: string with the relative path from * @descendant to @parent, or %NULL if @descendant doesn't have @parent as * prefix. The returned string should be freed with g_free() when * no longer needed. */ public string getRelativePath(FileIF descendant); /** * Gets the URI for the @file. * * This call does no blocking I/O. * * Returns: a string containing the #GFile's URI. * The returned string should be freed with g_free() * when no longer needed. */ public string getUri(); /** * Gets the URI scheme for a #GFile. * RFC 3986 decodes the scheme as: * |[ * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] * ]| * Common schemes include "file", "http", "ftp", etc. * * This call does no blocking I/O. * * Returns: a string containing the URI scheme for the given * #GFile. The returned string should be freed with g_free() * when no longer needed. */ public string getUriScheme(); /** * Checks if @file has a parent, and optionally, if it is @parent. * * If @parent is %NULL then this function returns %TRUE if @file has any * parent at all. If @parent is non-%NULL then %TRUE is only returned * if @file is an immediate child of @parent. * * Params: * parent = the parent to check for, or %NULL * * Returns: %TRUE if @file is an immediate child of @parent (or any parent in * the case that @parent is %NULL). * * Since: 2.24 */ public bool hasParent(FileIF parent); /** * Checks whether @file has the prefix specified by @prefix. * * In other words, if the names of initial elements of @file's * pathname match @prefix. Only full pathname elements are matched, * so a path like /foo is not considered a prefix of /foobar, only * of /foo/bar. * * A #GFile is not a prefix of itself. If you want to check for * equality, use g_file_equal(). * * This call does no I/O, as it works purely on names. As such it can * sometimes return %FALSE even if @file is inside a @prefix (from a * filesystem point of view), because the prefix of @file is an alias * of @prefix. * * Params: * prefix = input #GFile * * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix, * %FALSE otherwise. */ public bool hasPrefix(FileIF prefix); /** * Checks to see if a #GFile has a given URI scheme. * * This call does no blocking I/O. * * Params: * uriScheme = a string containing a URI scheme * * Returns: %TRUE if #GFile's backend supports the * given URI scheme, %FALSE if URI scheme is %NULL, * not supported, or #GFile is invalid. */ public bool hasUriScheme(string uriScheme); /** * Creates a hash value for a #GFile. * * This call does no blocking I/O. * * Returns: 0 if @file is not a valid #GFile, otherwise an * integer that can be used as hash value for the #GFile. * This function is intended for easily hashing a #GFile to * add to a #GHashTable or similar data structure. */ public uint hash(); /** * Checks to see if a file is native to the platform. * * A native file s one expressed in the platform-native filename format, * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local, * as it might be on a locally mounted remote filesystem. * * On some systems non-native files may be available using the native * filesystem via a userspace filesystem (FUSE), in these cases this call * will return %FALSE, but g_file_get_path() will still return a native path. * * This call does no blocking I/O. * * Returns: %TRUE if @file is native */ public bool isNative(); /** * Loads the content of the file into memory. The data is always * zero-terminated, but this is not included in the resultant @length. * The returned @content should be freed with g_free() when no longer * needed. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * contents = a location to place the contents of the file * etagOut = a location to place the current entity tag for the file, * or %NULL if the entity tag is not needed * * Returns: %TRUE if the @file's contents were successfully loaded. * %FALSE if there were errors. * * Throws: GException on failure. */ public bool loadContents(Cancellable cancellable, out string contents, out string etagOut); /** * Starts an asynchronous load of the @file's contents. * * For more details, see g_file_load_contents() which is * the synchronous version of this call. * * When the load operation has completed, @callback will be called * with @user data. To finish the operation, call * g_file_load_contents_finish() with the #GAsyncResult returned by * the @callback. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function */ public void loadContentsAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous load of the @file's contents. * The contents are placed in @contents, and @length is set to the * size of the @contents string. The @content should be freed with * g_free() when no longer needed. If @etag_out is present, it will be * set to the new entity tag for the @file. * * Params: * res = a #GAsyncResult * contents = a location to place the contents of the file * etagOut = a location to place the current entity tag for the file, * or %NULL if the entity tag is not needed * * Returns: %TRUE if the load was successful. If %FALSE and @error is * present, it will be set appropriately. * * Throws: GException on failure. */ public bool loadContentsFinish(AsyncResultIF res, out string contents, out string etagOut); /** * Reads the partial contents of a file. A #GFileReadMoreCallback should * be used to stop reading from the file when appropriate, else this * function will behave exactly as g_file_load_contents_async(). This * operation can be finished by g_file_load_partial_contents_finish(). * * Users of this function should be aware that @user_data is passed to * both the @read_more_callback and the @callback. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * readMoreCallback = a #GFileReadMoreCallback to receive partial data * and to specify whether further data should be read * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to the callback functions */ public void loadPartialContentsAsync(Cancellable cancellable, GFileReadMoreCallback readMoreCallback, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous partial load operation that was started * with g_file_load_partial_contents_async(). The data is always * zero-terminated, but this is not included in the resultant @length. * The returned @content should be freed with g_free() when no longer * needed. * * Params: * res = a #GAsyncResult * contents = a location to place the contents of the file * etagOut = a location to place the current entity tag for the file, * or %NULL if the entity tag is not needed * * Returns: %TRUE if the load was successful. If %FALSE and @error is * present, it will be set appropriately. * * Throws: GException on failure. */ public bool loadPartialContentsFinish(AsyncResultIF res, out string contents, out string etagOut); /** * Creates a directory. Note that this will only create a child directory * of the immediate parent directory of the path or URI given by the #GFile. * To recursively create directories, see g_file_make_directory_with_parents(). * This function will fail if the parent directory does not exist, setting * @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support * creating directories, this function will fail, setting @error to * %G_IO_ERROR_NOT_SUPPORTED. * * For a local #GFile the newly created directory will have the default * (current) ownership and permissions of the current process. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE on successful creation, %FALSE otherwise. * * Throws: GException on failure. */ public bool makeDirectory(Cancellable cancellable); /** * Asynchronously creates a directory. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.38 */ public void makeDirectoryAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous directory creation, started with * g_file_make_directory_async(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE on successful directory creation, %FALSE otherwise. * * Since: 2.38 * * Throws: GException on failure. */ public bool makeDirectoryFinish(AsyncResultIF result); /** * Creates a directory and any parent directories that may not * exist similar to 'mkdir -p'. If the file system does not support * creating directories, this function will fail, setting @error to * %G_IO_ERROR_NOT_SUPPORTED. If the directory itself already exists, * this function will fail setting @error to %G_IO_ERROR_EXISTS, unlike * the similar g_mkdir_with_parents(). * * For a local #GFile the newly created directories will have the default * (current) ownership and permissions of the current process. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if all directories have been successfully created, %FALSE * otherwise. * * Since: 2.18 * * Throws: GException on failure. */ public bool makeDirectoryWithParents(Cancellable cancellable); /** * Creates a symbolic link named @file which contains the string * @symlink_value. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * symlinkValue = a string with the path for the target * of the new symlink * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise. * * Throws: GException on failure. */ public bool makeSymbolicLink(string symlinkValue, Cancellable cancellable); /** * Recursively measures the disk usage of @file. * * This is essentially an analog of the 'du' command, but it also * reports the number of directories and non-directory files encountered * (including things like symbolic links). * * By default, errors are only reported against the toplevel file * itself. Errors found while recursing are silently ignored, unless * %G_FILE_DISK_USAGE_REPORT_ALL_ERRORS is given in @flags. * * The returned size, @disk_usage, is in bytes and should be formatted * with g_format_size() in order to get something reasonable for showing * in a user interface. * * @progress_callback and @progress_data can be given to request * periodic progress updates while scanning. See the documentation for * #GFileMeasureProgressCallback for information about when and how the * callback will be invoked. * * Params: * flags = #GFileMeasureFlags * cancellable = optional #GCancellable * progressCallback = a #GFileMeasureProgressCallback * progressData = user_data for @progress_callback * diskUsage = the number of bytes of disk space used * numDirs = the number of directories encountered * numFiles = the number of non-directories encountered * * Returns: %TRUE if successful, with the out parameters set. * %FALSE otherwise, with @error set. * * Since: 2.38 * * Throws: GException on failure. */ public bool measureDiskUsage(GFileMeasureFlags flags, Cancellable cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, out ulong diskUsage, out ulong numDirs, out ulong numFiles); /** * Recursively measures the disk usage of @file. * * This is the asynchronous version of g_file_measure_disk_usage(). See * there for more information. * * Params: * flags = #GFileMeasureFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable * progressCallback = a #GFileMeasureProgressCallback * progressData = user_data for @progress_callback * callback = a #GAsyncReadyCallback to call when complete * userData = the data to pass to callback function * * Since: 2.38 */ public void measureDiskUsageAsync(GFileMeasureFlags flags, int ioPriority, Cancellable cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, GAsyncReadyCallback callback, void* userData); /** * Collects the results from an earlier call to * g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for * more information. * * Params: * result = the #GAsyncResult passed to your #GAsyncReadyCallback * diskUsage = the number of bytes of disk space used * numDirs = the number of directories encountered * numFiles = the number of non-directories encountered * * Returns: %TRUE if successful, with the out parameters set. * %FALSE otherwise, with @error set. * * Since: 2.38 * * Throws: GException on failure. */ public bool measureDiskUsageFinish(AsyncResultIF result, out ulong diskUsage, out ulong numDirs, out ulong numFiles); /** * Obtains a file or directory monitor for the given file, * depending on the type of the file. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * flags = a set of #GFileMonitorFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileMonitor for the given @file, * or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.18 * * Throws: GException on failure. */ public FileMonitor monitor(GFileMonitorFlags flags, Cancellable cancellable); /** * Obtains a directory monitor for the given file. * This may fail if directory monitoring is not supported. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * It does not make sense for @flags to contain * %G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to * directories. It is not possible to monitor all the files in a * directory for changes made via hard links; if you want to do this then * you must register individual watches with g_file_monitor(). * * Params: * flags = a set of #GFileMonitorFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileMonitor for the given @file, * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileMonitor monitorDirectory(GFileMonitorFlags flags, Cancellable cancellable); /** * Obtains a file monitor for the given file. If no file notification * mechanism exists, then regular polling of the file is used. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor * will also attempt to report changes made to the file via another * filename (ie, a hard link). Without this flag, you can only rely on * changes made through the filename contained in @file to be * reported. Using this flag may result in an increase in resource * usage, and may not have any effect depending on the #GFileMonitor * backend and/or filesystem type. * * Params: * flags = a set of #GFileMonitorFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileMonitor for the given @file, * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileMonitor monitorFile(GFileMonitorFlags flags, Cancellable cancellable); /** * Starts a @mount_operation, mounting the volume that contains * the file @location. * * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_mount_enclosing_volume_finish(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation * or %NULL to avoid user interaction * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function */ public void mountEnclosingVolume(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes a mount operation started by g_file_mount_enclosing_volume(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if successful. If an error has occurred, * this function will return %FALSE and set @error * appropriately if present. * * Throws: GException on failure. */ public bool mountEnclosingVolumeFinish(AsyncResultIF result); /** * Mounts a file of type G_FILE_TYPE_MOUNTABLE. * Using @mount_operation, you can request callbacks when, for instance, * passwords are needed during authentication. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_mount_mountable_finish() to get * the result of the operation. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation, * or %NULL to avoid user interaction * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function */ public void mountMountable(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes a mount operation. See g_file_mount_mountable() for details. * * Finish an asynchronous mount operation that was started * with g_file_mount_mountable(). * * Params: * result = a #GAsyncResult * * Returns: a #GFile or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileIF mountMountableFinish(AsyncResultIF result); /** * Tries to move the file or directory @source to the location specified * by @destination. If native move operations are supported then this is * used, otherwise a copy + delete fallback is used. The native * implementation may support moving directories (for instance on moves * inside the same filesystem), but the fallback code does not. * * If the flag #G_FILE_COPY_OVERWRITE is specified an already * existing @destination file is overwritten. * * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks * will be copied as symlinks, otherwise the target of the * @source symlink will be copied. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If @progress_callback is not %NULL, then the operation can be monitored * by setting this to a #GFileProgressCallback function. * @progress_callback_data will be passed to this function. It is * guaranteed that this callback will be called after all data has been * transferred with the total number of bytes copied during the operation. * * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND * error is returned, independent on the status of the @destination. * * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, * then the error %G_IO_ERROR_EXISTS is returned. * * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY * error is returned. If trying to overwrite a directory with a directory the * %G_IO_ERROR_WOULD_MERGE error is returned. * * If the source is a directory and the target does not exist, or * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then * the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native * move operation isn't available). * * Params: * destination = #GFile pointing to the destination location * flags = set of #GFileCopyFlags * cancellable = optional #GCancellable object, * %NULL to ignore * progressCallback = #GFileProgressCallback * function for updates * progressCallbackData = gpointer to user data for * the callback function * * Returns: %TRUE on successful move, %FALSE otherwise. * * Throws: GException on failure. */ public bool move(FileIF destination, GFileCopyFlags flags, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData); /** * Opens an existing file for reading and writing. The result is * a #GFileIOStream that can be used to read and write the contents * of the file. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will * be returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY * error will be returned. Other errors are possible too, and depend on * what kind of filesystem the file is on. Note that in many non-local * file cases read and write streams are not supported, so make sure you * really need to do read and write streaming, rather than just opening * for reading or writing. * * Params: * cancellable = a #GCancellable * * Returns: #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream openReadwrite(Cancellable cancellable); /** * Asynchronously opens @file for reading and writing. * * For more details, see g_file_open_readwrite() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_open_readwrite_finish() to get * the result of the operation. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void openReadwriteAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous file read operation started with * g_file_open_readwrite_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream openReadwriteFinish(AsyncResultIF res); /** * Polls a file of type #G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_mount_mountable_finish() to get * the result of the operation. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void pollMountable(Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes a poll operation. See g_file_poll_mountable() for details. * * Finish an asynchronous poll operation that was polled * with g_file_poll_mountable(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. %FALSE * otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool pollMountableFinish(AsyncResultIF result); /** * Returns the #GAppInfo that is registered as the default * application to handle the file specified by @file. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: a #GAppInfo if the handle was found, * %NULL if there were errors. * When you are done with it, release it with g_object_unref() * * Throws: GException on failure. */ public AppInfoIF queryDefaultHandler(Cancellable cancellable); /** * Utility function to check if a particular file exists. This is * implemented using g_file_query_info() and as such does blocking I/O. * * Note that in many cases it is racy to first check for file existence * and then execute something based on the outcome of that, because the * file might have been created or removed in between the operations. The * general approach to handling that is to not check, but just do the * operation and handle the errors as they come. * * As an example of race-free checking, take the case of reading a file, * and if it doesn't exist, creating it. There are two racy versions: read * it, and on error create it; and: check if it exists, if not create it. * These can both result in two processes creating the file (with perhaps * a partially written file as the result). The correct approach is to * always try to create the file with g_file_create() which will either * atomically create the file or fail with a %G_IO_ERROR_EXISTS error. * * However, in many cases an existence check is useful in a user interface, * for instance to make a menu item sensitive/insensitive, so that you don't * have to fool users that something is possible and then just show an error * dialog. If you do this, you should make sure to also handle the errors * that can happen due to races when you execute the operation. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the file exists (and can be detected without error), * %FALSE otherwise (or if cancelled). */ public bool queryExists(Cancellable cancellable); /** * Utility function to inspect the #GFileType of a file. This is * implemented using g_file_query_info() and as such does blocking I/O. * * The primary use case of this method is to check if a file is * a regular file, directory, or symlink. * * Params: * flags = a set of #GFileQueryInfoFlags passed to g_file_query_info() * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN * if the file does not exist * * Since: 2.18 */ public GFileType queryFileType(GFileQueryInfoFlags flags, Cancellable cancellable); /** * Similar to g_file_query_info(), but obtains information * about the filesystem the @file is on, rather than the file itself. * For instance the amount of space available and the type of * the filesystem. * * The @attributes value is a string that specifies the attributes * that should be gathered. It is not an error if it's not possible * to read a particular requested attribute from a file - it just * won't be set. @attributes should be a comma-separated list of * attributes or attribute wildcards. The wildcard "*" means all * attributes, and a wildcard like "filesystem::*" means all attributes * in the filesystem namespace. The standard namespace for filesystem * attributes is "filesystem". Common attributes of interest are * #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem * in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), * and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will * be returned. Other errors are possible too, and depend on what * kind of filesystem the file is on. * * Params: * attributes = an attribute query string * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileInfo or %NULL if there was an error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInfo queryFilesystemInfo(string attributes, Cancellable cancellable); /** * Asynchronously gets the requested information about the filesystem * that the specified @file is on. The result is a #GFileInfo object * that contains key-value attributes (such as type or size for the * file). * * For more details, see g_file_query_filesystem_info() which is the * synchronous version of this call. * * When the operation is finished, @callback will be called. You can * then call g_file_query_info_finish() to get the result of the * operation. * * Params: * attributes = an attribute query string * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void queryFilesystemInfoAsync(string attributes, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous filesystem info query. * See g_file_query_filesystem_info_async(). * * Params: * res = a #GAsyncResult * * Returns: #GFileInfo for given @file * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInfo queryFilesystemInfoFinish(AsyncResultIF res); /** * Gets the requested information about specified @file. * The result is a #GFileInfo object that contains key-value * attributes (such as the type or size of the file). * * The @attributes value is a string that specifies the file * attributes that should be gathered. It is not an error if * it's not possible to read a particular requested attribute * from a file - it just won't be set. @attributes should be a * comma-separated list of attributes or attribute wildcards. * The wildcard "*" means all attributes, and a wildcard like * "standard::*" means all attributes in the standard namespace. * An example attribute query be "standard::*,owner::user". * The standard attributes are available as defines, like * #G_FILE_ATTRIBUTE_STANDARD_NAME. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * For symlinks, normally the information about the target of the * symlink is returned, rather than information about the symlink * itself. However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS * in @flags the information about the symlink itself will be returned. * Also, for symlinks that point to non-existing files the information * about the symlink itself will be returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be * returned. Other errors are possible too, and depend on what kind of * filesystem the file is on. * * Params: * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileInfo for the given @file, or %NULL * on error. Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInfo queryInfo(string attributes, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Asynchronously gets the requested information about specified @file. * The result is a #GFileInfo object that contains key-value attributes * (such as type or size for the file). * * For more details, see g_file_query_info() which is the synchronous * version of this call. * * When the operation is finished, @callback will be called. You can * then call g_file_query_info_finish() to get the result of the operation. * * Params: * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call when the * request is satisfied * userData = the data to pass to callback function */ public void queryInfoAsync(string attributes, GFileQueryInfoFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous file info query. * See g_file_query_info_async(). * * Params: * res = a #GAsyncResult * * Returns: #GFileInfo for given @file * or %NULL on error. Free the returned object with * g_object_unref(). * * Throws: GException on failure. */ public FileInfo queryInfoFinish(AsyncResultIF res); /** * Obtain the list of settable attributes for the file. * * Returns the type and full attribute name of all the attributes * that can be set on this file. This doesn't mean setting it will * always succeed though, you might get an access failure, or some * specific file may not support a specific attribute. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileAttributeInfoList describing the settable attributes. * When you are done with it, release it with * g_file_attribute_info_list_unref() * * Throws: GException on failure. */ public FileAttributeInfoList querySettableAttributes(Cancellable cancellable); /** * Obtain the list of attribute namespaces where new attributes * can be created by a user. An example of this is extended * attributes (in the "xattr" namespace). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileAttributeInfoList describing the writable namespaces. * When you are done with it, release it with * g_file_attribute_info_list_unref() * * Throws: GException on failure. */ public FileAttributeInfoList queryWritableNamespaces(Cancellable cancellable); /** * Opens a file for reading. The result is a #GFileInputStream that * can be used to read the contents of the file. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be * returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY * error will be returned. Other errors are possible too, and depend * on what kind of filesystem the file is on. * * Params: * cancellable = a #GCancellable * * Returns: #GFileInputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInputStream read(Cancellable cancellable); /** * Asynchronously opens @file for reading. * * For more details, see g_file_read() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_read_finish() to get the result * of the operation. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void readAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous file read operation started with * g_file_read_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileInputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInputStream readFinish(AsyncResultIF res); /** * Returns an output stream for overwriting the file, possibly * creating a backup copy of the file first. If the file doesn't exist, * it will be created. * * This will try to replace the file in the safest way possible so * that any errors during the writing will not affect an already * existing copy of the file. For instance, for local files it * may write to a temporary file and then atomically rename over * the destination when the stream is closed. * * By default files created are generally readable by everyone, * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level that * is supported on the target filesystem. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If you pass in a non-%NULL @etag value and @file already exists, then * this value is compared to the current entity tag of the file, and if * they differ an %G_IO_ERROR_WRONG_ETAG error is returned. This * generally means that the file has been changed since you last read * it. You can get the new etag from g_file_output_stream_get_etag() * after you've finished writing and closed the #GFileOutputStream. When * you load a new file you can use g_file_input_stream_query_info() to * get the etag of the file. * * If @make_backup is %TRUE, this function will attempt to make a * backup of the current file before overwriting it. If this fails * a %G_IO_ERROR_CANT_CREATE_BACKUP error will be returned. If you * want to replace anyway, try again with @make_backup set to %FALSE. * * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will * be returned, and if the file is some other form of non-regular file * then a %G_IO_ERROR_NOT_REGULAR_FILE error will be returned. Some * file systems don't allow all file names, and may return an * %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long * %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are * possible too, and depend on what kind of filesystem the file is on. * * Params: * etag = an optional [entity tag][gfile-etag] * for the current #GFile, or #NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileOutputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream replace(string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable); /** * Asynchronously overwrites the file, replacing the contents, * possibly creating a backup copy of the file first. * * For more details, see g_file_replace() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_replace_finish() to get the result * of the operation. * * Params: * etag = an [entity tag][gfile-etag] for the current #GFile, * or %NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void replaceAsync(string etag, bool makeBackup, GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Replaces the contents of @file with @contents of @length bytes. * * If @etag is specified (not %NULL), any existing file must have that etag, * or the error %G_IO_ERROR_WRONG_ETAG will be returned. * * If @make_backup is %TRUE, this function will attempt to make a backup * of @file. Internally, it uses g_file_replace(), so will try to replace the * file contents in the safest way possible. For example, atomic renames are * used when replacing local files’ contents. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * The returned @new_etag can be used to verify that the file hasn't * changed the next time it is saved over. * * Params: * contents = a string containing the new contents for @file * etag = the old [entity-tag][gfile-etag] for the document, * or %NULL * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * newEtag = a location to a new [entity tag][gfile-etag] * for the document. This should be freed with g_free() when no longer * needed, or %NULL * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: %TRUE if successful. If an error has occurred, this function * will return %FALSE and set @error appropriately if present. * * Throws: GException on failure. */ public bool replaceContents(string contents, string etag, bool makeBackup, GFileCreateFlags flags, out string newEtag, Cancellable cancellable); /** * Starts an asynchronous replacement of @file with the given * @contents of @length bytes. @etag will replace the document's * current entity tag. * * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_replace_contents_finish(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If @make_backup is %TRUE, this function will attempt to * make a backup of @file. * * Note that no copy of @content will be made, so it must stay valid * until @callback is called. See g_file_replace_contents_bytes_async() * for a #GBytes version that will automatically hold a reference to the * contents (without copying) for the duration of the call. * * Params: * contents = string of contents to replace the file with * etag = a new [entity tag][gfile-etag] for the @file, or %NULL * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function */ public void replaceContentsAsync(string contents, string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Same as g_file_replace_contents_async() but takes a #GBytes input instead. * This function will keep a ref on @contents until the operation is done. * Unlike g_file_replace_contents_async() this allows forgetting about the * content without waiting for the callback. * * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_replace_contents_finish(). * * Params: * contents = a #GBytes * etag = a new [entity tag][gfile-etag] for the @file, or %NULL * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.40 */ public void replaceContentsBytesAsync(Bytes contents, string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous replace of the given @file. See * g_file_replace_contents_async(). Sets @new_etag to the new entity * tag for the document, if present. * * Params: * res = a #GAsyncResult * newEtag = a location of a new [entity tag][gfile-etag] * for the document. This should be freed with g_free() when it is no * longer needed, or %NULL * * Returns: %TRUE on success, %FALSE on failure. * * Throws: GException on failure. */ public bool replaceContentsFinish(AsyncResultIF res, out string newEtag); /** * Finishes an asynchronous file replace operation started with * g_file_replace_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileOutputStream, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream replaceFinish(AsyncResultIF res); /** * Returns an output stream for overwriting the file in readwrite mode, * possibly creating a backup copy of the file first. If the file doesn't * exist, it will be created. * * For details about the behaviour, see g_file_replace() which does the * same thing but returns an output stream only. * * Note that in many non-local file cases read and write streams are not * supported, so make sure you really need to do read and write streaming, * rather than just opening for reading or writing. * * Params: * etag = an optional [entity tag][gfile-etag] * for the current #GFile, or #NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream replaceReadwrite(string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable); /** * Asynchronously overwrites the file in read-write mode, * replacing the contents, possibly creating a backup copy * of the file first. * * For more details, see g_file_replace_readwrite() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_replace_readwrite_finish() to get * the result of the operation. * * Params: * etag = an [entity tag][gfile-etag] for the current #GFile, * or %NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void replaceReadwriteAsync(string etag, bool makeBackup, GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous file replace operation started with * g_file_replace_readwrite_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileIOStream, or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream replaceReadwriteFinish(AsyncResultIF res); /** * Resolves a relative path for @file to an absolute path. * * This call does no blocking I/O. * * Params: * relativePath = a given relative path string * * Returns: #GFile to the resolved path. * %NULL if @relative_path is %NULL or if @file is invalid. * Free the returned object with g_object_unref(). */ public FileIF resolveRelativePath(string relativePath); /** * Sets an attribute in the file with attribute name @attribute to @value. * * Some attributes can be unset by setting @attribute to * %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * type = The type of the attribute * valueP = a pointer to the value (or the pointer * itself if the type is a pointer type) * flags = a set of #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the attribute was set, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttribute(string attribute, GFileAttributeType type, void* valueP, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value. * If @attribute is of a different type, this operation will fail, * returning %FALSE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a string containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set to @value * in the @file, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeByteString(string attribute, string value, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a #gint32 containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set to @value * in the @file, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeInt32(string attribute, int value, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a #guint64 containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeInt64(string attribute, long value, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a string containing the attribute's value * flags = #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeString(string attribute, string value, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a #guint32 containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set to @value * in the @file, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeUint32(string attribute, uint value, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a #guint64 containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set to @value * in the @file, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeUint64(string attribute, ulong value, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Asynchronously sets the attributes of @file with @info. * * For more details, see g_file_set_attributes_from_info(), * which is the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_set_attributes_finish() to get * the result of the operation. * * Params: * info = a #GFileInfo * flags = a #GFileQueryInfoFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback * userData = a #gpointer */ public void setAttributesAsync(FileInfo info, GFileQueryInfoFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes setting an attribute started in g_file_set_attributes_async(). * * Params: * result = a #GAsyncResult * info = a #GFileInfo * * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributesFinish(AsyncResultIF result, out FileInfo info); /** * Tries to set all attributes in the #GFileInfo on the target * values, not stopping on the first error. * * If there is any error during this operation then @error will * be set to the first error. Error on particular fields are flagged * by setting the "status" field in the attribute value to * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can * also detect further errors. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * info = a #GFileInfo * flags = #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %FALSE if there was any error, %TRUE otherwise. * * Throws: GException on failure. */ public bool setAttributesFromInfo(FileInfo info, GFileQueryInfoFlags flags, Cancellable cancellable); /** * Renames @file to the specified display name. * * The display name is converted from UTF-8 to the correct encoding * for the target filesystem if possible and the @file is renamed to this. * * If you want to implement a rename operation in the user interface the * edit name (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the * initial value in the rename widget, and then the result after editing * should be passed to g_file_set_display_name(). * * On success the resulting converted filename is returned. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * displayName = a string * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFile specifying what @file was renamed to, * or %NULL if there was an error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileIF setDisplayName(string displayName, Cancellable cancellable); /** * Asynchronously sets the display name for a given #GFile. * * For more details, see g_file_set_display_name() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_set_display_name_finish() to get * the result of the operation. * * Params: * displayName = a string * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void setDisplayNameAsync(string displayName, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes setting a display name started with * g_file_set_display_name_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFile or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileIF setDisplayNameFinish(AsyncResultIF res); /** * Starts a file of type #G_FILE_TYPE_MOUNTABLE. * Using @start_operation, you can request callbacks when, for instance, * passwords are needed during authentication. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_mount_mountable_finish() to get * the result of the operation. * * Params: * flags = flags affecting the operation * startOperation = a #GMountOperation, or %NULL to avoid user interaction * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void startMountable(GDriveStartFlags flags, MountOperation startOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes a start operation. See g_file_start_mountable() for details. * * Finish an asynchronous start operation that was started * with g_file_start_mountable(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. %FALSE * otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool startMountableFinish(AsyncResultIF result); /** * Stops a file of type #G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_stop_mountable_finish() to get * the result of the operation. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation, * or %NULL to avoid user interaction. * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void stopMountable(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an stop operation, see g_file_stop_mountable() for details. * * Finish an asynchronous stop operation that was started * with g_file_stop_mountable(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool stopMountableFinish(AsyncResultIF result); /** * Checks if @file supports * [thread-default contexts][g-main-context-push-thread-default-context]. * If this returns %FALSE, you cannot perform asynchronous operations on * @file in a thread that has a thread-default context. * * Returns: Whether or not @file supports thread-default contexts. * * Since: 2.22 */ public bool supportsThreadContexts(); /** * Sends @file to the "Trashcan", if possible. This is similar to * deleting it, but the user can recover it before emptying the trashcan. * Not all file systems support trashing, so this call can return the * %G_IO_ERROR_NOT_SUPPORTED error. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE on successful trash, %FALSE otherwise. * * Throws: GException on failure. */ public bool trash(Cancellable cancellable); /** * Asynchronously sends @file to the Trash location, if possible. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.38 */ public void trashAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous file trashing operation, started with * g_file_trash_async(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE on successful trash, %FALSE otherwise. * * Since: 2.38 * * Throws: GException on failure. */ public bool trashFinish(AsyncResultIF result); /** * Unmounts a file of type G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_unmount_mountable_finish() to get * the result of the operation. * * Deprecated: Use g_file_unmount_mountable_with_operation() instead. * * Params: * flags = flags affecting the operation * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function */ public void unmountMountable(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an unmount operation, see g_file_unmount_mountable() for details. * * Finish an asynchronous unmount operation that was started * with g_file_unmount_mountable(). * * Deprecated: Use g_file_unmount_mountable_with_operation_finish() * instead. * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. * %FALSE otherwise. * * Throws: GException on failure. */ public bool unmountMountableFinish(AsyncResultIF result); /** * Unmounts a file of type #G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_unmount_mountable_finish() to get * the result of the operation. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation, * or %NULL to avoid user interaction * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void unmountMountableWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an unmount operation, * see g_file_unmount_mountable_with_operation() for details. * * Finish an asynchronous unmount operation that was started * with g_file_unmount_mountable_with_operation(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool unmountMountableWithOperationFinish(AsyncResultIF result); } GtkD-3.7.5/generated/gtkd/gio/FileIOStream.d000066400000000000000000000153671324604450400204720ustar00rootroot00000000000000/* * 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 gio.FileIOStream; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.FileInfo; private import gio.IOStream; private import gio.SeekableIF; private import gio.SeekableT; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * GFileIOStream provides io streams that both read and write to the same * file handle. * * GFileIOStream implements #GSeekable, which allows the io * stream to jump to arbitrary positions in the file and to truncate * the file, provided the filesystem of the file supports these * operations. * * To find the position of a file io stream, use * g_seekable_tell(). * * To find out if a file io stream supports seeking, use g_seekable_can_seek(). * To position a file io stream, use g_seekable_seek(). * To find out if a file io stream supports truncating, use * g_seekable_can_truncate(). To truncate a file io * stream, use g_seekable_truncate(). * * The default implementation of all the #GFileIOStream operations * and the implementation of #GSeekable just call into the same operations * on the output stream. */ public class FileIOStream : IOStream, SeekableIF { /** the main Gtk struct */ protected GFileIOStream* gFileIOStream; /** Get the main Gtk struct */ public GFileIOStream* getFileIOStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFileIOStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFileIOStream; } protected override void setStruct(GObject* obj) { gFileIOStream = cast(GFileIOStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFileIOStream* gFileIOStream, bool ownedRef = false) { this.gFileIOStream = gFileIOStream; super(cast(GIOStream*)gFileIOStream, ownedRef); } // add the Seekable capabilities mixin SeekableT!(GFileIOStream); /** */ public static GType getType() { return g_file_io_stream_get_type(); } /** * Gets the entity tag for the file when it has been written. * This must be called after the stream has been written * and closed, as the etag can change while writing. * * Returns: the entity tag for the stream. * * Since: 2.22 */ public string getEtag() { auto retStr = g_file_io_stream_get_etag(gFileIOStream); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Queries a file io stream for the given @attributes. * This function blocks while querying the stream. For the asynchronous * version of this function, see g_file_io_stream_query_info_async(). * While the stream is blocked, the stream will set the pending flag * internally, and any other operations on the stream will fail with * %G_IO_ERROR_PENDING. * * Can fail if the stream was already closed (with @error being set to * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being * set to %G_IO_ERROR_PENDING), or if querying info is not supported for * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). I * all cases of failure, %NULL will be returned. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will * be returned. * * Params: * attributes = a file attribute query string. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a #GFileInfo for the @stream, or %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public FileInfo queryInfo(string attributes, Cancellable cancellable) { GError* err = null; auto p = g_file_io_stream_query_info(gFileIOStream, Str.toStringz(attributes), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } /** * Asynchronously queries the @stream for a #GFileInfo. When completed, * @callback will be called with a #GAsyncResult which can be used to * finish the operation with g_file_io_stream_query_info_finish(). * * For the synchronous version of this function, see * g_file_io_stream_query_info(). * * Params: * attributes = a file attribute query string. * ioPriority = the [I/O priority][gio-GIOScheduler] of the request * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void queryInfoAsync(string attributes, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_io_stream_query_info_async(gFileIOStream, Str.toStringz(attributes), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finalizes the asynchronous query started * by g_file_io_stream_query_info_async(). * * Params: * result = a #GAsyncResult. * * Returns: A #GFileInfo for the finished query. * * Since: 2.22 * * Throws: GException on failure. */ public FileInfo queryInfoFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_io_stream_query_info_finish(gFileIOStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/FileIcon.d000066400000000000000000000057731324604450400176770ustar00rootroot00000000000000/* * 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 gio.FileIcon; private import gio.FileIF; private import gio.IconIF; private import gio.IconT; private import gio.LoadableIconIF; private import gio.LoadableIconT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GFileIcon specifies an icon by pointing to an image file * to be used as icon. */ public class FileIcon : ObjectG, IconIF, LoadableIconIF { /** the main Gtk struct */ protected GFileIcon* gFileIcon; /** Get the main Gtk struct */ public GFileIcon* getFileIconStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFileIcon; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFileIcon; } protected override void setStruct(GObject* obj) { gFileIcon = cast(GFileIcon*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFileIcon* gFileIcon, bool ownedRef = false) { this.gFileIcon = gFileIcon; super(cast(GObject*)gFileIcon, ownedRef); } // add the Icon capabilities mixin IconT!(GFileIcon); // add the LoadableIcon capabilities mixin LoadableIconT!(GFileIcon); /** */ public static GType getType() { return g_file_icon_get_type(); } /** * Creates a new icon for a file. * * Params: * file = a #GFile. * * Returns: a #GIcon for the given * @file, or %NULL on error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(FileIF file) { auto p = g_file_icon_new((file is null) ? null : file.getFileStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GFileIcon*) p, true); } /** * Gets the #GFile associated with the given @icon. * * Returns: a #GFile, or %NULL. */ public FileIF getFile() { auto p = g_file_icon_get_file(gFileIcon); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p); } } GtkD-3.7.5/generated/gtkd/gio/FileInfo.d000066400000000000000000000602331324604450400176720ustar00rootroot00000000000000/* * 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 gio.FileInfo; private import gio.FileAttributeMatcher; private import gio.IconIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.DateTime; private import glib.MemorySlice; private import glib.Str; private import glib.TimeVal; private import gobject.ObjectG; public import gtkc.giotypes; /** * Functionality for manipulating basic metadata for files. #GFileInfo * implements methods for getting information that all files should * contain, and allows for manipulation of extended attributes. * * See [GFileAttribute][gio-GFileAttribute] for more information on how * GIO handles file attributes. * * To obtain a #GFileInfo for a #GFile, use g_file_query_info() (or its * async variant). To obtain a #GFileInfo for a file input or output * stream, use g_file_input_stream_query_info() or * g_file_output_stream_query_info() (or their async variants). * * To change the actual attributes of a file, you should then set the * attribute in the #GFileInfo and call g_file_set_attributes_from_info() * or g_file_set_attributes_async() on a GFile. * * However, not all attributes can be changed in the file. For instance, * the actual size of a file cannot be changed via g_file_info_set_size(). * You may call g_file_query_settable_attributes() and * g_file_query_writable_namespaces() to discover the settable attributes * of a particular file at runtime. * * #GFileAttributeMatcher allows for searching through a #GFileInfo for * attributes. */ public class FileInfo : ObjectG { /** the main Gtk struct */ protected GFileInfo* gFileInfo; /** Get the main Gtk struct */ public GFileInfo* getFileInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFileInfo; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFileInfo; } protected override void setStruct(GObject* obj) { gFileInfo = cast(GFileInfo*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFileInfo* gFileInfo, bool ownedRef = false) { this.gFileInfo = gFileInfo; super(cast(GObject*)gFileInfo, ownedRef); } /** */ public static GType getType() { return g_file_info_get_type(); } /** * Creates a new file info structure. * * Returns: a #GFileInfo. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_file_info_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GFileInfo*) p, true); } /** * Clears the status information from @info. */ public void clearStatus() { g_file_info_clear_status(gFileInfo); } /** * First clears all of the [GFileAttribute][gio-GFileAttribute] of @dest_info, * and then copies all of the file attributes from @src_info to @dest_info. * * Params: * destInfo = destination to copy attributes to. */ public void copyInto(FileInfo destInfo) { g_file_info_copy_into(gFileInfo, (destInfo is null) ? null : destInfo.getFileInfoStruct()); } /** * Duplicates a file info structure. * * Returns: a duplicate #GFileInfo of @other. */ public FileInfo dup() { auto p = g_file_info_dup(gFileInfo); if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } /** * Gets the value of a attribute, formated as a string. * This escapes things as needed to make the string valid * utf8. * * Params: * attribute = a file attribute key. * * Returns: a UTF-8 string associated with the given @attribute. * When you're done with the string it must be freed with g_free(). */ public string getAttributeAsString(string attribute) { auto retStr = g_file_info_get_attribute_as_string(gFileInfo, Str.toStringz(attribute)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the value of a boolean attribute. If the attribute does not * contain a boolean value, %FALSE will be returned. * * Params: * attribute = a file attribute key. * * Returns: the boolean value contained within the attribute. */ public bool getAttributeBoolean(string attribute) { return g_file_info_get_attribute_boolean(gFileInfo, Str.toStringz(attribute)) != 0; } /** * Gets the value of a byte string attribute. If the attribute does * not contain a byte string, %NULL will be returned. * * Params: * attribute = a file attribute key. * * Returns: the contents of the @attribute value as a byte string, or * %NULL otherwise. */ public string getAttributeByteString(string attribute) { return Str.toString(g_file_info_get_attribute_byte_string(gFileInfo, Str.toStringz(attribute))); } /** * Gets the attribute type, value and status for an attribute key. * * Params: * attribute = a file attribute key * type = return location for the attribute type, or %NULL * valuePp = return location for the * attribute value, or %NULL; the attribute value will not be %NULL * status = return location for the attribute status, or %NULL * * Returns: %TRUE if @info has an attribute named @attribute, * %FALSE otherwise. */ public bool getAttributeData(string attribute, out GFileAttributeType type, out void* valuePp, out GFileAttributeStatus status) { return g_file_info_get_attribute_data(gFileInfo, Str.toStringz(attribute), &type, &valuePp, &status) != 0; } /** * Gets a signed 32-bit integer contained within the attribute. If the * attribute does not contain a signed 32-bit integer, or is invalid, * 0 will be returned. * * Params: * attribute = a file attribute key. * * Returns: a signed 32-bit integer from the attribute. */ public int getAttributeInt32(string attribute) { return g_file_info_get_attribute_int32(gFileInfo, Str.toStringz(attribute)); } /** * Gets a signed 64-bit integer contained within the attribute. If the * attribute does not contain an signed 64-bit integer, or is invalid, * 0 will be returned. * * Params: * attribute = a file attribute key. * * Returns: a signed 64-bit integer from the attribute. */ public long getAttributeInt64(string attribute) { return g_file_info_get_attribute_int64(gFileInfo, Str.toStringz(attribute)); } /** * Gets the value of a #GObject attribute. If the attribute does * not contain a #GObject, %NULL will be returned. * * Params: * attribute = a file attribute key. * * Returns: a #GObject associated with the given @attribute, or * %NULL otherwise. */ public ObjectG getAttributeObject(string attribute) { auto p = g_file_info_get_attribute_object(gFileInfo, Str.toStringz(attribute)); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); } /** * Gets the attribute status for an attribute key. * * Params: * attribute = a file attribute key * * Returns: a #GFileAttributeStatus for the given @attribute, or * %G_FILE_ATTRIBUTE_STATUS_UNSET if the key is invalid. */ public GFileAttributeStatus getAttributeStatus(string attribute) { return g_file_info_get_attribute_status(gFileInfo, Str.toStringz(attribute)); } /** * Gets the value of a string attribute. If the attribute does * not contain a string, %NULL will be returned. * * Params: * attribute = a file attribute key. * * Returns: the contents of the @attribute value as a UTF-8 string, or * %NULL otherwise. */ public string getAttributeString(string attribute) { return Str.toString(g_file_info_get_attribute_string(gFileInfo, Str.toStringz(attribute))); } /** * Gets the value of a stringv attribute. If the attribute does * not contain a stringv, %NULL will be returned. * * Params: * attribute = a file attribute key. * * Returns: the contents of the @attribute value as a stringv, or * %NULL otherwise. Do not free. These returned strings are UTF-8. * * Since: 2.22 */ public string[] getAttributeStringv(string attribute) { return Str.toStringArray(g_file_info_get_attribute_stringv(gFileInfo, Str.toStringz(attribute))); } /** * Gets the attribute type for an attribute key. * * Params: * attribute = a file attribute key. * * Returns: a #GFileAttributeType for the given @attribute, or * %G_FILE_ATTRIBUTE_TYPE_INVALID if the key is not set. */ public GFileAttributeType getAttributeType(string attribute) { return g_file_info_get_attribute_type(gFileInfo, Str.toStringz(attribute)); } /** * Gets an unsigned 32-bit integer contained within the attribute. If the * attribute does not contain an unsigned 32-bit integer, or is invalid, * 0 will be returned. * * Params: * attribute = a file attribute key. * * Returns: an unsigned 32-bit integer from the attribute. */ public uint getAttributeUint32(string attribute) { return g_file_info_get_attribute_uint32(gFileInfo, Str.toStringz(attribute)); } /** * Gets a unsigned 64-bit integer contained within the attribute. If the * attribute does not contain an unsigned 64-bit integer, or is invalid, * 0 will be returned. * * Params: * attribute = a file attribute key. * * Returns: a unsigned 64-bit integer from the attribute. */ public ulong getAttributeUint64(string attribute) { return g_file_info_get_attribute_uint64(gFileInfo, Str.toStringz(attribute)); } /** * Gets the file's content type. * * Returns: a string containing the file's content type. */ public string getContentType() { return Str.toString(g_file_info_get_content_type(gFileInfo)); } /** * Returns the #GDateTime representing the deletion date of the file, as * available in G_FILE_ATTRIBUTE_TRASH_DELETION_DATE. If the * G_FILE_ATTRIBUTE_TRASH_DELETION_DATE attribute is unset, %NULL is returned. * * Returns: a #GDateTime, or %NULL. * * Since: 2.36 */ public DateTime getDeletionDate() { auto p = g_file_info_get_deletion_date(gFileInfo); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Gets a display name for a file. * * Returns: a string containing the display name. */ public string getDisplayName() { return Str.toString(g_file_info_get_display_name(gFileInfo)); } /** * Gets the edit name for a file. * * Returns: a string containing the edit name. */ public string getEditName() { return Str.toString(g_file_info_get_edit_name(gFileInfo)); } /** * Gets the [entity tag][gfile-etag] for a given * #GFileInfo. See %G_FILE_ATTRIBUTE_ETAG_VALUE. * * Returns: a string containing the value of the "etag:value" attribute. */ public string getEtag() { return Str.toString(g_file_info_get_etag(gFileInfo)); } /** * Gets a file's type (whether it is a regular file, symlink, etc). * This is different from the file's content type, see g_file_info_get_content_type(). * * Returns: a #GFileType for the given file. */ public GFileType getFileType() { return g_file_info_get_file_type(gFileInfo); } /** * Gets the icon for a file. * * Returns: #GIcon for the given @info. */ public IconIF getIcon() { auto p = g_file_info_get_icon(gFileInfo); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p); } /** * Checks if a file is a backup file. * * Returns: %TRUE if file is a backup file, %FALSE otherwise. */ public bool getIsBackup() { return g_file_info_get_is_backup(gFileInfo) != 0; } /** * Checks if a file is hidden. * * Returns: %TRUE if the file is a hidden file, %FALSE otherwise. */ public bool getIsHidden() { return g_file_info_get_is_hidden(gFileInfo) != 0; } /** * Checks if a file is a symlink. * * Returns: %TRUE if the given @info is a symlink. */ public bool getIsSymlink() { return g_file_info_get_is_symlink(gFileInfo) != 0; } /** * Gets the modification time of the current @info and sets it * in @result. * * Params: * result = a #GTimeVal. */ public void getModificationTime(out TimeVal result) { GTimeVal* outresult = sliceNew!GTimeVal(); g_file_info_get_modification_time(gFileInfo, outresult); result = new TimeVal(outresult, true); } /** * Gets the name for a file. * * Returns: a string containing the file name. */ public string getName() { return Str.toString(g_file_info_get_name(gFileInfo)); } /** * Gets the file's size. * * Returns: a #goffset containing the file's size. */ public long getSize() { return g_file_info_get_size(gFileInfo); } /** * Gets the value of the sort_order attribute from the #GFileInfo. * See %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. * * Returns: a #gint32 containing the value of the "standard::sort_order" attribute. */ public int getSortOrder() { return g_file_info_get_sort_order(gFileInfo); } /** * Gets the symbolic icon for a file. * * Returns: #GIcon for the given @info. * * Since: 2.34 */ public IconIF getSymbolicIcon() { auto p = g_file_info_get_symbolic_icon(gFileInfo); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p); } /** * Gets the symlink target for a given #GFileInfo. * * Returns: a string containing the symlink target. */ public string getSymlinkTarget() { return Str.toString(g_file_info_get_symlink_target(gFileInfo)); } /** * Checks if a file info structure has an attribute named @attribute. * * Params: * attribute = a file attribute key. * * Returns: %TRUE if @Ginfo has an attribute named @attribute, * %FALSE otherwise. */ public bool hasAttribute(string attribute) { return g_file_info_has_attribute(gFileInfo, Str.toStringz(attribute)) != 0; } /** * Checks if a file info structure has an attribute in the * specified @name_space. * * Params: * nameSpace = a file attribute namespace. * * Returns: %TRUE if @Ginfo has an attribute in @name_space, * %FALSE otherwise. * * Since: 2.22 */ public bool hasNamespace(string nameSpace) { return g_file_info_has_namespace(gFileInfo, Str.toStringz(nameSpace)) != 0; } /** * Lists the file info structure's attributes. * * Params: * nameSpace = a file attribute key's namespace, or %NULL to list * all attributes. * * Returns: a * null-terminated array of strings of all of the possible attribute * types for the given @name_space, or %NULL on error. */ public string[] listAttributes(string nameSpace) { auto retStr = g_file_info_list_attributes(gFileInfo, Str.toStringz(nameSpace)); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Removes all cases of @attribute from @info if it exists. * * Params: * attribute = a file attribute key. */ public void removeAttribute(string attribute) { g_file_info_remove_attribute(gFileInfo, Str.toStringz(attribute)); } /** * Sets the @attribute to contain the given value, if possible. To unset the * attribute, use %G_ATTRIBUTE_TYPE_INVALID for @type. * * Params: * attribute = a file attribute key. * type = a #GFileAttributeType * valueP = pointer to the value */ public void setAttribute(string attribute, GFileAttributeType type, void* valueP) { g_file_info_set_attribute(gFileInfo, Str.toStringz(attribute), type, valueP); } /** * Sets the @attribute to contain the given @attr_value, * if possible. * * Params: * attribute = a file attribute key. * attrValue = a boolean value. */ public void setAttributeBoolean(string attribute, bool attrValue) { g_file_info_set_attribute_boolean(gFileInfo, Str.toStringz(attribute), attrValue); } /** * Sets the @attribute to contain the given @attr_value, * if possible. * * Params: * attribute = a file attribute key. * attrValue = a byte string. */ public void setAttributeByteString(string attribute, string attrValue) { g_file_info_set_attribute_byte_string(gFileInfo, Str.toStringz(attribute), Str.toStringz(attrValue)); } /** * Sets the @attribute to contain the given @attr_value, * if possible. * * Params: * attribute = a file attribute key. * attrValue = a signed 32-bit integer */ public void setAttributeInt32(string attribute, int attrValue) { g_file_info_set_attribute_int32(gFileInfo, Str.toStringz(attribute), attrValue); } /** * Sets the @attribute to contain the given @attr_value, * if possible. * * Params: * attribute = attribute name to set. * attrValue = int64 value to set attribute to. */ public void setAttributeInt64(string attribute, long attrValue) { g_file_info_set_attribute_int64(gFileInfo, Str.toStringz(attribute), attrValue); } /** * Sets @mask on @info to match specific attribute types. * * Params: * mask = a #GFileAttributeMatcher. */ public void setAttributeMask(FileAttributeMatcher mask) { g_file_info_set_attribute_mask(gFileInfo, (mask is null) ? null : mask.getFileAttributeMatcherStruct()); } /** * Sets the @attribute to contain the given @attr_value, * if possible. * * Params: * attribute = a file attribute key. * attrValue = a #GObject. */ public void setAttributeObject(string attribute, ObjectG attrValue) { g_file_info_set_attribute_object(gFileInfo, Str.toStringz(attribute), (attrValue is null) ? null : attrValue.getObjectGStruct()); } /** * Sets the attribute status for an attribute key. This is only * needed by external code that implement g_file_set_attributes_from_info() * or similar functions. * * The attribute must exist in @info for this to work. Otherwise %FALSE * is returned and @info is unchanged. * * Params: * attribute = a file attribute key * status = a #GFileAttributeStatus * * Returns: %TRUE if the status was changed, %FALSE if the key was not set. * * Since: 2.22 */ public bool setAttributeStatus(string attribute, GFileAttributeStatus status) { return g_file_info_set_attribute_status(gFileInfo, Str.toStringz(attribute), status) != 0; } /** * Sets the @attribute to contain the given @attr_value, * if possible. * * Params: * attribute = a file attribute key. * attrValue = a UTF-8 string. */ public void setAttributeString(string attribute, string attrValue) { g_file_info_set_attribute_string(gFileInfo, Str.toStringz(attribute), Str.toStringz(attrValue)); } /** * Sets the @attribute to contain the given @attr_value, * if possible. * * Sinze: 2.22 * * Params: * attribute = a file attribute key * attrValue = a %NULL terminated array of UTF-8 strings. */ public void setAttributeStringv(string attribute, string[] attrValue) { g_file_info_set_attribute_stringv(gFileInfo, Str.toStringz(attribute), Str.toStringzArray(attrValue)); } /** * Sets the @attribute to contain the given @attr_value, * if possible. * * Params: * attribute = a file attribute key. * attrValue = an unsigned 32-bit integer. */ public void setAttributeUint32(string attribute, uint attrValue) { g_file_info_set_attribute_uint32(gFileInfo, Str.toStringz(attribute), attrValue); } /** * Sets the @attribute to contain the given @attr_value, * if possible. * * Params: * attribute = a file attribute key. * attrValue = an unsigned 64-bit integer. */ public void setAttributeUint64(string attribute, ulong attrValue) { g_file_info_set_attribute_uint64(gFileInfo, Str.toStringz(attribute), attrValue); } /** * Sets the content type attribute for a given #GFileInfo. * See %G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE. * * Params: * contentType = a content type. See [GContentType][gio-GContentType] */ public void setContentType(string contentType) { g_file_info_set_content_type(gFileInfo, Str.toStringz(contentType)); } /** * Sets the display name for the current #GFileInfo. * See %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME. * * Params: * displayName = a string containing a display name. */ public void setDisplayName(string displayName) { g_file_info_set_display_name(gFileInfo, Str.toStringz(displayName)); } /** * Sets the edit name for the current file. * See %G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME. * * Params: * editName = a string containing an edit name. */ public void setEditName(string editName) { g_file_info_set_edit_name(gFileInfo, Str.toStringz(editName)); } /** * Sets the file type in a #GFileInfo to @type. * See %G_FILE_ATTRIBUTE_STANDARD_TYPE. * * Params: * type = a #GFileType. */ public void setFileType(GFileType type) { g_file_info_set_file_type(gFileInfo, type); } /** * Sets the icon for a given #GFileInfo. * See %G_FILE_ATTRIBUTE_STANDARD_ICON. * * Params: * icon = a #GIcon. */ public void setIcon(IconIF icon) { g_file_info_set_icon(gFileInfo, (icon is null) ? null : icon.getIconStruct()); } /** * Sets the "is_hidden" attribute in a #GFileInfo according to @is_hidden. * See %G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN. * * Params: * isHidden = a #gboolean. */ public void setIsHidden(bool isHidden) { g_file_info_set_is_hidden(gFileInfo, isHidden); } /** * Sets the "is_symlink" attribute in a #GFileInfo according to @is_symlink. * See %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK. * * Params: * isSymlink = a #gboolean. */ public void setIsSymlink(bool isSymlink) { g_file_info_set_is_symlink(gFileInfo, isSymlink); } /** * Sets the %G_FILE_ATTRIBUTE_TIME_MODIFIED attribute in the file * info to the given time value. * * Params: * mtime = a #GTimeVal. */ public void setModificationTime(TimeVal mtime) { g_file_info_set_modification_time(gFileInfo, (mtime is null) ? null : mtime.getTimeValStruct()); } /** * Sets the name attribute for the current #GFileInfo. * See %G_FILE_ATTRIBUTE_STANDARD_NAME. * * Params: * name = a string containing a name. */ public void setName(string name) { g_file_info_set_name(gFileInfo, Str.toStringz(name)); } /** * Sets the %G_FILE_ATTRIBUTE_STANDARD_SIZE attribute in the file info * to the given size. * * Params: * size = a #goffset containing the file's size. */ public void setSize(long size) { g_file_info_set_size(gFileInfo, size); } /** * Sets the sort order attribute in the file info structure. See * %G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER. * * Params: * sortOrder = a sort order integer. */ public void setSortOrder(int sortOrder) { g_file_info_set_sort_order(gFileInfo, sortOrder); } /** * Sets the symbolic icon for a given #GFileInfo. * See %G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON. * * Params: * icon = a #GIcon. * * Since: 2.34 */ public void setSymbolicIcon(IconIF icon) { g_file_info_set_symbolic_icon(gFileInfo, (icon is null) ? null : icon.getIconStruct()); } /** * Sets the %G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET attribute in the file info * to the given symlink target. * * Params: * symlinkTarget = a static string containing a path to a symlink target. */ public void setSymlinkTarget(string symlinkTarget) { g_file_info_set_symlink_target(gFileInfo, Str.toStringz(symlinkTarget)); } /** * Unsets a mask set by g_file_info_set_attribute_mask(), if one * is set. */ public void unsetAttributeMask() { g_file_info_unset_attribute_mask(gFileInfo); } } GtkD-3.7.5/generated/gtkd/gio/FileInputStream.d000066400000000000000000000130601324604450400212460ustar00rootroot00000000000000/* * 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 gio.FileInputStream; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.FileInfo; private import gio.InputStream; private import gio.SeekableIF; private import gio.SeekableT; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * GFileInputStream provides input streams that take their * content from a file. * * GFileInputStream implements #GSeekable, which allows the input * stream to jump to arbitrary positions in the file, provided the * filesystem of the file allows it. To find the position of a file * input stream, use g_seekable_tell(). To find out if a file input * stream supports seeking, use g_seekable_can_seek(). * To position a file input stream, use g_seekable_seek(). */ public class FileInputStream : InputStream, SeekableIF { /** the main Gtk struct */ protected GFileInputStream* gFileInputStream; /** Get the main Gtk struct */ public GFileInputStream* getFileInputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFileInputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFileInputStream; } protected override void setStruct(GObject* obj) { gFileInputStream = cast(GFileInputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFileInputStream* gFileInputStream, bool ownedRef = false) { this.gFileInputStream = gFileInputStream; super(cast(GInputStream*)gFileInputStream, ownedRef); } // add the Seekable capabilities mixin SeekableT!(GFileInputStream); /** */ public static GType getType() { return g_file_input_stream_get_type(); } /** * Queries a file input stream the given @attributes. This function blocks * while querying the stream. For the asynchronous (non-blocking) version * of this function, see g_file_input_stream_query_info_async(). While the * stream is blocked, the stream will set the pending flag internally, and * any other operations on the stream will fail with %G_IO_ERROR_PENDING. * * Params: * attributes = a file attribute query string. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a #GFileInfo, or %NULL on error. * * Throws: GException on failure. */ public FileInfo queryInfo(string attributes, Cancellable cancellable) { GError* err = null; auto p = g_file_input_stream_query_info(gFileInputStream, Str.toStringz(attributes), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } /** * Queries the stream information asynchronously. * When the operation is finished @callback will be called. * You can then call g_file_input_stream_query_info_finish() * to get the result of the operation. * * For the synchronous version of this function, * see g_file_input_stream_query_info(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be set * * Params: * attributes = a file attribute query string. * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied * userData = the data to pass to callback function */ public void queryInfoAsync(string attributes, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_input_stream_query_info_async(gFileInputStream, Str.toStringz(attributes), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous info query operation. * * Params: * result = a #GAsyncResult. * * Returns: #GFileInfo. * * Throws: GException on failure. */ public FileInfo queryInfoFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_input_stream_query_info_finish(gFileInputStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/FileMonitor.d000066400000000000000000000160311324604450400204230ustar00rootroot00000000000000/* * 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 gio.FileMonitor; private import gio.FileIF; private import gio.c.functions; public import gio.c.types; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * Monitors a file or directory for changes. * * To obtain a #GFileMonitor for a file or directory, use * g_file_monitor(), g_file_monitor_file(), or * g_file_monitor_directory(). * * To get informed about changes to the file or directory you are * monitoring, connect to the #GFileMonitor::changed signal. The * signal will be emitted in the * [thread-default main context][g-main-context-push-thread-default] * of the thread that the monitor was created in * (though if the global default main context is blocked, this may * cause notifications to be blocked even if the thread-default * context is still running). */ public class FileMonitor : ObjectG { /** the main Gtk struct */ protected GFileMonitor* gFileMonitor; /** Get the main Gtk struct */ public GFileMonitor* getFileMonitorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFileMonitor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFileMonitor; } protected override void setStruct(GObject* obj) { gFileMonitor = cast(GFileMonitor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFileMonitor* gFileMonitor, bool ownedRef = false) { this.gFileMonitor = gFileMonitor; super(cast(GObject*)gFileMonitor, ownedRef); } /** */ public static GType getType() { return g_file_monitor_get_type(); } /** * Cancels a file monitor. * * Returns: always %TRUE */ public bool cancel() { return g_file_monitor_cancel(gFileMonitor) != 0; } /** * Emits the #GFileMonitor::changed signal if a change * has taken place. Should be called from file monitor * implementations only. * * Implementations are responsible to call this method from the * [thread-default main context][g-main-context-push-thread-default] of the * thread that the monitor was created in. * * Params: * child = a #GFile. * otherFile = a #GFile. * eventType = a set of #GFileMonitorEvent flags. */ public void emitEvent(FileIF child, FileIF otherFile, GFileMonitorEvent eventType) { g_file_monitor_emit_event(gFileMonitor, (child is null) ? null : child.getFileStruct(), (otherFile is null) ? null : otherFile.getFileStruct(), eventType); } /** * Returns whether the monitor is canceled. * * Returns: %TRUE if monitor is canceled. %FALSE otherwise. */ public bool isCancelled() { return g_file_monitor_is_cancelled(gFileMonitor) != 0; } /** * Sets the rate limit to which the @monitor will report * consecutive change events to the same file. * * Params: * limitMsecs = a non-negative integer with the limit in milliseconds * to poll for changes */ public void setRateLimit(int limitMsecs) { g_file_monitor_set_rate_limit(gFileMonitor, limitMsecs); } protected class OnChangedDelegateWrapper { void delegate(FileIF, FileIF, GFileMonitorEvent, FileMonitor) dlg; gulong handlerId; this(void delegate(FileIF, FileIF, GFileMonitorEvent, FileMonitor) dlg) { this.dlg = dlg; onChangedListeners ~= this; } void remove(OnChangedDelegateWrapper source) { foreach(index, wrapper; onChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChangedListeners[index] = null; onChangedListeners = std.algorithm.remove(onChangedListeners, index); break; } } } } OnChangedDelegateWrapper[] onChangedListeners; /** * Emitted when @file has been changed. * * If using %G_FILE_MONITOR_WATCH_MOVES on a directory monitor, and * the information is available (and if supported by the backend), * @event_type may be %G_FILE_MONITOR_EVENT_RENAMED, * %G_FILE_MONITOR_EVENT_MOVED_IN or %G_FILE_MONITOR_EVENT_MOVED_OUT. * * In all cases @file will be a child of the monitored directory. For * renames, @file will be the old name and @other_file is the new * name. For "moved in" events, @file is the name of the file that * appeared and @other_file is the old name that it was moved from (in * another directory). For "moved out" events, @file is the name of * the file that used to be in this directory and @other_file is the * name of the file at its new location. * * It makes sense to treat %G_FILE_MONITOR_EVENT_MOVED_IN as * equivalent to %G_FILE_MONITOR_EVENT_CREATED and * %G_FILE_MONITOR_EVENT_MOVED_OUT as equivalent to * %G_FILE_MONITOR_EVENT_DELETED, with extra information. * %G_FILE_MONITOR_EVENT_RENAMED is equivalent to a delete/create * pair. This is exactly how the events will be reported in the case * that the %G_FILE_MONITOR_WATCH_MOVES flag is not in use. * * If using the deprecated flag %G_FILE_MONITOR_SEND_MOVED flag and @event_type is * #G_FILE_MONITOR_EVENT_MOVED, @file will be set to a #GFile containing the * old path, and @other_file will be set to a #GFile containing the new path. * * In all the other cases, @other_file will be set to #NULL. * * Params: * file = a #GFile. * otherFile = a #GFile or #NULL. * eventType = a #GFileMonitorEvent. */ gulong addOnChanged(void delegate(FileIF, FileIF, GFileMonitorEvent, FileMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "changed", cast(GCallback)&callBackChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChanged(GFileMonitor* filemonitorStruct, GFile* file, GFile* otherFile, GFileMonitorEvent eventType, OnChangedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(FileIF)(file), ObjectG.getDObject!(FileIF)(otherFile), eventType, wrapper.outer); } extern(C) static void callBackChangedDestroy(OnChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/FileOutputStream.d000066400000000000000000000152171324604450400214550ustar00rootroot00000000000000/* * 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 gio.FileOutputStream; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.FileInfo; private import gio.OutputStream; private import gio.SeekableIF; private import gio.SeekableT; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * GFileOutputStream provides output streams that write their * content to a file. * * GFileOutputStream implements #GSeekable, which allows the output * stream to jump to arbitrary positions in the file and to truncate * the file, provided the filesystem of the file supports these * operations. * * To find the position of a file output stream, use g_seekable_tell(). * To find out if a file output stream supports seeking, use * g_seekable_can_seek().To position a file output stream, use * g_seekable_seek(). To find out if a file output stream supports * truncating, use g_seekable_can_truncate(). To truncate a file output * stream, use g_seekable_truncate(). */ public class FileOutputStream : OutputStream, SeekableIF { /** the main Gtk struct */ protected GFileOutputStream* gFileOutputStream; /** Get the main Gtk struct */ public GFileOutputStream* getFileOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFileOutputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFileOutputStream; } protected override void setStruct(GObject* obj) { gFileOutputStream = cast(GFileOutputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFileOutputStream* gFileOutputStream, bool ownedRef = false) { this.gFileOutputStream = gFileOutputStream; super(cast(GOutputStream*)gFileOutputStream, ownedRef); } // add the Seekable capabilities mixin SeekableT!(GFileOutputStream); /** */ public static GType getType() { return g_file_output_stream_get_type(); } /** * Gets the entity tag for the file when it has been written. * This must be called after the stream has been written * and closed, as the etag can change while writing. * * Returns: the entity tag for the stream. */ public string getEtag() { auto retStr = g_file_output_stream_get_etag(gFileOutputStream); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Queries a file output stream for the given @attributes. * This function blocks while querying the stream. For the asynchronous * version of this function, see g_file_output_stream_query_info_async(). * While the stream is blocked, the stream will set the pending flag * internally, and any other operations on the stream will fail with * %G_IO_ERROR_PENDING. * * Can fail if the stream was already closed (with @error being set to * %G_IO_ERROR_CLOSED), the stream has pending operations (with @error being * set to %G_IO_ERROR_PENDING), or if querying info is not supported for * the stream's interface (with @error being set to %G_IO_ERROR_NOT_SUPPORTED). In * all cases of failure, %NULL will be returned. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be set, and %NULL will * be returned. * * Params: * attributes = a file attribute query string. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a #GFileInfo for the @stream, or %NULL on error. * * Throws: GException on failure. */ public FileInfo queryInfo(string attributes, Cancellable cancellable) { GError* err = null; auto p = g_file_output_stream_query_info(gFileOutputStream, Str.toStringz(attributes), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } /** * Asynchronously queries the @stream for a #GFileInfo. When completed, * @callback will be called with a #GAsyncResult which can be used to * finish the operation with g_file_output_stream_query_info_finish(). * * For the synchronous version of this function, see * g_file_output_stream_query_info(). * * Params: * attributes = a file attribute query string. * ioPriority = the [I/O priority][gio-GIOScheduler] of the request * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied * userData = the data to pass to callback function */ public void queryInfoAsync(string attributes, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_output_stream_query_info_async(gFileOutputStream, Str.toStringz(attributes), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finalizes the asynchronous query started * by g_file_output_stream_query_info_async(). * * Params: * result = a #GAsyncResult. * * Returns: A #GFileInfo for the finished query. * * Throws: GException on failure. */ public FileInfo queryInfoFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_output_stream_query_info_finish(gFileOutputStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/FileT.d000066400000000000000000004072071324604450400172100ustar00rootroot00000000000000/* * 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 gio.FileT; public import gio.AppInfoIF; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.FileAttributeInfoList; public import gio.FileEnumerator; public import gio.FileIF; public import gio.FileIOStream; public import gio.FileInfo; public import gio.FileInputStream; public import gio.FileMonitor; public import gio.FileOutputStream; public import gio.MountIF; public import gio.MountOperation; public import gio.c.functions; public import gio.c.types; public import glib.Bytes; public import glib.ConstructionException; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GFile is a high level abstraction for manipulating files on a * virtual file system. #GFiles are lightweight, immutable objects * that do no I/O upon creation. It is necessary to understand that * #GFile objects do not represent files, merely an identifier for a * file. All file content I/O is implemented as streaming operations * (see #GInputStream and #GOutputStream). * * To construct a #GFile, you can use: * - g_file_new_for_path() if you have a path. * - g_file_new_for_uri() if you have a URI. * - g_file_new_for_commandline_arg() for a command line argument. * - g_file_new_tmp() to create a temporary file from a template. * - g_file_parse_name() from a UTF-8 string gotten from g_file_get_parse_name(). * * One way to think of a #GFile is as an abstraction of a pathname. For * normal files the system pathname is what is stored internally, but as * #GFiles are extensible it could also be something else that corresponds * to a pathname in a userspace implementation of a filesystem. * * #GFiles make up hierarchies of directories and files that correspond to * the files on a filesystem. You can move through the file system with * #GFile using g_file_get_parent() to get an identifier for the parent * directory, g_file_get_child() to get a child within a directory, * g_file_resolve_relative_path() to resolve a relative path between two * #GFiles. There can be multiple hierarchies, so you may not end up at * the same root if you repeatedly call g_file_get_parent() on two different * files. * * All #GFiles have a basename (get with g_file_get_basename()). These names * are byte strings that are used to identify the file on the filesystem * (relative to its parent directory) and there is no guarantees that they * have any particular charset encoding or even make any sense at all. If * you want to use filenames in a user interface you should use the display * name that you can get by requesting the * %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME attribute with g_file_query_info(). * This is guaranteed to be in UTF-8 and can be used in a user interface. * But always store the real basename or the #GFile to use to actually * access the file, because there is no way to go from a display name to * the actual name. * * Using #GFile as an identifier has the same weaknesses as using a path * in that there may be multiple aliases for the same file. For instance, * hard or soft links may cause two different #GFiles to refer to the same * file. Other possible causes for aliases are: case insensitive filesystems, * short and long names on FAT/NTFS, or bind mounts in Linux. If you want to * check if two #GFiles point to the same file you can query for the * %G_FILE_ATTRIBUTE_ID_FILE attribute. Note that #GFile does some trivial * canonicalization of pathnames passed in, so that trivial differences in * the path string used at creation (duplicated slashes, slash at end of * path, "." or ".." path segments, etc) does not create different #GFiles. * * Many #GFile operations have both synchronous and asynchronous versions * to suit your application. Asynchronous versions of synchronous functions * simply have _async() appended to their function names. The asynchronous * I/O functions call a #GAsyncReadyCallback which is then used to finalize * the operation, producing a GAsyncResult which is then passed to the * function's matching _finish() operation. * * It is highly recommended to use asynchronous calls when running within a * shared main loop, such as in the main thread of an application. This avoids * I/O operations blocking other sources on the main loop from being dispatched. * Synchronous I/O operations should be performed from worker threads. See the * [introduction to asynchronous programming section][async-programming] for * more. * * Some #GFile operations almost always take a noticeable amount of time, and * so do not have synchronous analogs. Notable cases include: * - g_file_mount_mountable() to mount a mountable file. * - g_file_unmount_mountable_with_operation() to unmount a mountable file. * - g_file_eject_mountable_with_operation() to eject a mountable file. * * ## Entity Tags # {#gfile-etag} * * One notable feature of #GFiles are entity tags, or "etags" for * short. Entity tags are somewhat like a more abstract version of the * traditional mtime, and can be used to quickly determine if the file * has been modified from the version on the file system. See the * HTTP 1.1 * [specification](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html) * for HTTP Etag headers, which are a very similar concept. */ public template FileT(TStruct) { /** Get the main Gtk struct */ public GFile* getFileStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GFile*)getStruct(); } /** * Gets an output stream for appending data to the file. * If the file doesn't already exist it is created. * * By default files created are generally readable by everyone, * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level that * is supported on the target filesystem. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * Some file systems don't allow all file names, and may return an * %G_IO_ERROR_INVALID_FILENAME error. If the file is a directory the * %G_IO_ERROR_IS_DIRECTORY error will be returned. Other errors are * possible too, and depend on what kind of filesystem the file is on. * * Params: * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileOutputStream, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream appendTo(GFileCreateFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_append_to(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileOutputStream)(cast(GFileOutputStream*) p, true); } /** * Asynchronously opens @file for appending. * * For more details, see g_file_append_to() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_append_to_finish() to get the result * of the operation. * * Params: * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void appendToAsync(GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_append_to_async(getFileStruct(), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous file append operation started with * g_file_append_to_async(). * * Params: * res = #GAsyncResult * * Returns: a valid #GFileOutputStream * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream appendToFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_append_to_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileOutputStream)(cast(GFileOutputStream*) p, true); } /** * Copies the file @source to the location specified by @destination. * Can not handle recursive copies of directories. * * If the flag #G_FILE_COPY_OVERWRITE is specified an already * existing @destination file is overwritten. * * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks * will be copied as symlinks, otherwise the target of the * @source symlink will be copied. * * If the flag #G_FILE_COPY_ALL_METADATA is specified then all the metadata * that is possible to copy is copied, not just the default subset (which, * for instance, does not include the owner, see #GFileInfo). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If @progress_callback is not %NULL, then the operation can be monitored * by setting this to a #GFileProgressCallback function. * @progress_callback_data will be passed to this function. It is guaranteed * that this callback will be called after all data has been transferred with * the total number of bytes copied during the operation. * * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND error * is returned, independent on the status of the @destination. * * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, then * the error %G_IO_ERROR_EXISTS is returned. * * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY * error is returned. If trying to overwrite a directory with a directory the * %G_IO_ERROR_WOULD_MERGE error is returned. * * If the source is a directory and the target does not exist, or * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then the * %G_IO_ERROR_WOULD_RECURSE error is returned. * * If you are interested in copying the #GFile object itself (not the on-disk * file), see g_file_dup(). * * Params: * destination = destination #GFile * flags = set of #GFileCopyFlags * cancellable = optional #GCancellable object, * %NULL to ignore * progressCallback = function to callback with * progress information, or %NULL if progress information is not needed * progressCallbackData = user data to pass to @progress_callback * * Returns: %TRUE on success, %FALSE otherwise. * * Throws: GException on failure. */ public bool copy(FileIF destination, GFileCopyFlags flags, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData) { GError* err = null; auto p = g_file_copy(getFileStruct(), (destination is null) ? null : destination.getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), progressCallback, progressCallbackData, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Copies the file @source to the location specified by @destination * asynchronously. For details of the behaviour, see g_file_copy(). * * If @progress_callback is not %NULL, then that function that will be called * just like in g_file_copy(). The callback will run in the default main context * of the thread calling g_file_copy_async() — the same context as @callback is * run in. * * When the operation is finished, @callback will be called. You can then call * g_file_copy_finish() to get the result of the operation. * * Params: * destination = destination #GFile * flags = set of #GFileCopyFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * progressCallback = function to callback with progress * information, or %NULL if progress information is not needed * progressCallbackData = user data to pass to @progress_callback * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function */ public void copyAsync(FileIF destination, GFileCopyFlags flags, int ioPriority, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData) { g_file_copy_async(getFileStruct(), (destination is null) ? null : destination.getFileStruct(), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), progressCallback, progressCallbackData, callback, userData); } /** * Copies the file attributes from @source to @destination. * * Normally only a subset of the file attributes are copied, * those that are copies in a normal file copy operation * (which for instance does not include e.g. owner). However * if #G_FILE_COPY_ALL_METADATA is specified in @flags, then * all the metadata that is possible to copy is copied. This * is useful when implementing move by copy + delete source. * * Params: * destination = a #GFile to copy attributes to * flags = a set of #GFileCopyFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the attributes were copied successfully, * %FALSE otherwise. * * Throws: GException on failure. */ public bool copyAttributes(FileIF destination, GFileCopyFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_copy_attributes(getFileStruct(), (destination is null) ? null : destination.getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Finishes copying the file started with g_file_copy_async(). * * Params: * res = a #GAsyncResult * * Returns: a %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ public bool copyFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_copy_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Creates a new file and returns an output stream for writing to it. * The file must not already exist. * * By default files created are generally readable by everyone, * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level * that is supported on the target filesystem. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If a file or directory with this name already exists the * %G_IO_ERROR_EXISTS error will be returned. Some file systems don't * allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME * error, and if the name is to long %G_IO_ERROR_FILENAME_TOO_LONG will * be returned. Other errors are possible too, and depend on what kind * of filesystem the file is on. * * Params: * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileOutputStream for the newly created * file, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream create(GFileCreateFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_create(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileOutputStream)(cast(GFileOutputStream*) p, true); } /** * Asynchronously creates a new file and returns an output stream * for writing to it. The file must not already exist. * * For more details, see g_file_create() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_create_finish() to get the result * of the operation. * * Params: * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void createAsync(GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_create_async(getFileStruct(), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous file create operation started with * g_file_create_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileOutputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream createFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_create_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileOutputStream)(cast(GFileOutputStream*) p, true); } /** * Creates a new file and returns a stream for reading and * writing to it. The file must not already exist. * * By default files created are generally readable by everyone, * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level * that is supported on the target filesystem. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If a file or directory with this name already exists, the * %G_IO_ERROR_EXISTS error will be returned. Some file systems don't * allow all file names, and may return an %G_IO_ERROR_INVALID_FILENAME * error, and if the name is too long, %G_IO_ERROR_FILENAME_TOO_LONG * will be returned. Other errors are possible too, and depend on what * kind of filesystem the file is on. * * Note that in many non-local file cases read and write streams are * not supported, so make sure you really need to do read and write * streaming, rather than just opening for reading or writing. * * Params: * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileIOStream for the newly created * file, or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream createReadwrite(GFileCreateFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_create_readwrite(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIOStream)(cast(GFileIOStream*) p, true); } /** * Asynchronously creates a new file and returns a stream * for reading and writing to it. The file must not already exist. * * For more details, see g_file_create_readwrite() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_create_readwrite_finish() to get * the result of the operation. * * Params: * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void createReadwriteAsync(GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_create_readwrite_async(getFileStruct(), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous file create operation started with * g_file_create_readwrite_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream createReadwriteFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_create_readwrite_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIOStream)(cast(GFileIOStream*) p, true); } /** * Deletes a file. If the @file is a directory, it will only be * deleted if it is empty. This has the same semantics as g_unlink(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the file was deleted. %FALSE otherwise. * * Throws: GException on failure. */ public bool delet(Cancellable cancellable) { GError* err = null; auto p = g_file_delete(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously delete a file. If the @file is a directory, it will * only be deleted if it is empty. This has the same semantics as * g_unlink(). * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.34 */ public void deleteAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_delete_async(getFileStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes deleting a file started with g_file_delete_async(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the file was deleted. %FALSE otherwise. * * Since: 2.34 * * Throws: GException on failure. */ public bool deleteFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_delete_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Duplicates a #GFile handle. This operation does not duplicate * the actual file or directory represented by the #GFile; see * g_file_copy() if attempting to copy a file. * * This call does no blocking I/O. * * Returns: a new #GFile that is a duplicate * of the given #GFile. */ public FileIF dup() { auto p = g_file_dup(getFileStruct()); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Starts an asynchronous eject on a mountable. * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_eject_mountable_finish(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Deprecated: Use g_file_eject_mountable_with_operation() instead. * * Params: * flags = flags affecting the operation * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function */ public void ejectMountable(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_eject_mountable(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous eject operation started by * g_file_eject_mountable(). * * Deprecated: Use g_file_eject_mountable_with_operation_finish() * instead. * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the @file was ejected successfully. * %FALSE otherwise. * * Throws: GException on failure. */ public bool ejectMountableFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_eject_mountable_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Starts an asynchronous eject on a mountable. * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_eject_mountable_with_operation_finish(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation, * or %NULL to avoid user interaction * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void ejectMountableWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_eject_mountable_with_operation(getFileStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous eject operation started by * g_file_eject_mountable_with_operation(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the @file was ejected successfully. * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool ejectMountableWithOperationFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_eject_mountable_with_operation_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the requested information about the files in a directory. * The result is a #GFileEnumerator object that will give out * #GFileInfo objects for all the files in the directory. * * The @attributes value is a string that specifies the file * attributes that should be gathered. It is not an error if * it's not possible to read a particular requested attribute * from a file - it just won't be set. @attributes should * be a comma-separated list of attributes or attribute wildcards. * The wildcard "*" means all attributes, and a wildcard like * "standard::*" means all attributes in the standard namespace. * An example attribute query be "standard::*,owner::user". * The standard attributes are available as defines, like * #G_FILE_ATTRIBUTE_STANDARD_NAME. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will * be returned. If the file is not a directory, the %G_IO_ERROR_NOT_DIRECTORY * error will be returned. Other errors are possible too. * * Params: * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: A #GFileEnumerator if successful, * %NULL on error. Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileEnumerator enumerateChildren(string attributes, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_enumerate_children(getFileStruct(), Str.toStringz(attributes), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileEnumerator)(cast(GFileEnumerator*) p, true); } /** * Asynchronously gets the requested information about the files * in a directory. The result is a #GFileEnumerator object that will * give out #GFileInfo objects for all the files in the directory. * * For more details, see g_file_enumerate_children() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. You can * then call g_file_enumerate_children_finish() to get the result of * the operation. * * Params: * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call when the * request is satisfied * userData = the data to pass to callback function */ public void enumerateChildrenAsync(string attributes, GFileQueryInfoFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_enumerate_children_async(getFileStruct(), Str.toStringz(attributes), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an async enumerate children operation. * See g_file_enumerate_children_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileEnumerator or %NULL * if an error occurred. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileEnumerator enumerateChildrenFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_enumerate_children_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileEnumerator)(cast(GFileEnumerator*) p, true); } /** * Checks if the two given #GFiles refer to the same file. * * Note that two #GFiles that differ can still refer to the same * file on the filesystem due to various forms of filename * aliasing. * * This call does no blocking I/O. * * Params: * file2 = the second #GFile * * Returns: %TRUE if @file1 and @file2 are equal. */ public bool equal(FileIF file2) { return g_file_equal(getFileStruct(), (file2 is null) ? null : file2.getFileStruct()) != 0; } /** * Gets a #GMount for the #GFile. * * If the #GFileIface for @file does not have a mount (e.g. * possibly a remote share), @error will be set to %G_IO_ERROR_NOT_FOUND * and %NULL will be returned. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GMount where the @file is located * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public MountIF findEnclosingMount(Cancellable cancellable) { GError* err = null; auto p = g_file_find_enclosing_mount(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(MountIF)(cast(GMount*) p, true); } /** * Asynchronously gets the mount for the file. * * For more details, see g_file_find_enclosing_mount() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_find_enclosing_mount_finish() to * get the result of the operation. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void findEnclosingMountAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_find_enclosing_mount_async(getFileStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous find mount request. * See g_file_find_enclosing_mount_async(). * * Params: * res = a #GAsyncResult * * Returns: #GMount for given @file or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public MountIF findEnclosingMountFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_find_enclosing_mount_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(MountIF)(cast(GMount*) p, true); } /** * Gets the base name (the last component of the path) for a given #GFile. * * If called for the top level of a system (such as the filesystem root * or a uri like sftp://host/) it will return a single directory separator * (and on Windows, possibly a drive letter). * * The base name is a byte string (not UTF-8). It has no defined encoding * or rules other than it may not contain zero bytes. If you want to use * filenames in a user interface you should use the display name that you * can get by requesting the %G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME * attribute with g_file_query_info(). * * This call does no blocking I/O. * * Returns: string containing the #GFile's * base name, or %NULL if given #GFile is invalid. The returned string * should be freed with g_free() when no longer needed. */ public string getBasename() { auto retStr = g_file_get_basename(getFileStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets a child of @file with basename equal to @name. * * Note that the file with that specific name might not exist, but * you can still have a #GFile that points to it. You can use this * for instance to create that file. * * This call does no blocking I/O. * * Params: * name = string containing the child's basename * * Returns: a #GFile to a child specified by @name. * Free the returned object with g_object_unref(). */ public FileIF getChild(string name) { auto p = g_file_get_child(getFileStruct(), Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets the child of @file for a given @display_name (i.e. a UTF-8 * version of the name). If this function fails, it returns %NULL * and @error will be set. This is very useful when constructing a * #GFile for a new file and the user entered the filename in the * user interface, for instance when you select a directory and * type a filename in the file selector. * * This call does no blocking I/O. * * Params: * displayName = string to a possible child * * Returns: a #GFile to the specified child, or * %NULL if the display name couldn't be converted. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileIF getChildForDisplayName(string displayName) { GError* err = null; auto p = g_file_get_child_for_display_name(getFileStruct(), Str.toStringz(displayName), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets the parent directory for the @file. * If the @file represents the root directory of the * file system, then %NULL will be returned. * * This call does no blocking I/O. * * Returns: a #GFile structure to the * parent of the given #GFile or %NULL if there is no parent. Free * the returned object with g_object_unref(). */ public FileIF getParent() { auto p = g_file_get_parent(getFileStruct()); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets the parse name of the @file. * A parse name is a UTF-8 string that describes the * file such that one can get the #GFile back using * g_file_parse_name(). * * This is generally used to show the #GFile as a nice * full-pathname kind of string in a user interface, * like in a location entry. * * For local files with names that can safely be converted * to UTF-8 the pathname is used, otherwise the IRI is used * (a form of URI that allows UTF-8 characters unescaped). * * This call does no blocking I/O. * * Returns: a string containing the #GFile's parse name. * The returned string should be freed with g_free() * when no longer needed. */ public string getParseName() { auto retStr = g_file_get_parse_name(getFileStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the local pathname for #GFile, if one exists. If non-%NULL, this is * guaranteed to be an absolute, canonical path. It might contain symlinks. * * This call does no blocking I/O. * * Returns: string containing the #GFile's path, * or %NULL if no such path exists. The returned string should be freed * with g_free() when no longer needed. */ public string getPath() { auto retStr = g_file_get_path(getFileStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the path for @descendant relative to @parent. * * This call does no blocking I/O. * * Params: * descendant = input #GFile * * Returns: string with the relative path from * @descendant to @parent, or %NULL if @descendant doesn't have @parent as * prefix. The returned string should be freed with g_free() when * no longer needed. */ public string getRelativePath(FileIF descendant) { auto retStr = g_file_get_relative_path(getFileStruct(), (descendant is null) ? null : descendant.getFileStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the URI for the @file. * * This call does no blocking I/O. * * Returns: a string containing the #GFile's URI. * The returned string should be freed with g_free() * when no longer needed. */ public string getUri() { auto retStr = g_file_get_uri(getFileStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the URI scheme for a #GFile. * RFC 3986 decodes the scheme as: * |[ * URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ] * ]| * Common schemes include "file", "http", "ftp", etc. * * This call does no blocking I/O. * * Returns: a string containing the URI scheme for the given * #GFile. The returned string should be freed with g_free() * when no longer needed. */ public string getUriScheme() { auto retStr = g_file_get_uri_scheme(getFileStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Checks if @file has a parent, and optionally, if it is @parent. * * If @parent is %NULL then this function returns %TRUE if @file has any * parent at all. If @parent is non-%NULL then %TRUE is only returned * if @file is an immediate child of @parent. * * Params: * parent = the parent to check for, or %NULL * * Returns: %TRUE if @file is an immediate child of @parent (or any parent in * the case that @parent is %NULL). * * Since: 2.24 */ public bool hasParent(FileIF parent) { return g_file_has_parent(getFileStruct(), (parent is null) ? null : parent.getFileStruct()) != 0; } /** * Checks whether @file has the prefix specified by @prefix. * * In other words, if the names of initial elements of @file's * pathname match @prefix. Only full pathname elements are matched, * so a path like /foo is not considered a prefix of /foobar, only * of /foo/bar. * * A #GFile is not a prefix of itself. If you want to check for * equality, use g_file_equal(). * * This call does no I/O, as it works purely on names. As such it can * sometimes return %FALSE even if @file is inside a @prefix (from a * filesystem point of view), because the prefix of @file is an alias * of @prefix. * * Params: * prefix = input #GFile * * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix, * %FALSE otherwise. */ public bool hasPrefix(FileIF prefix) { return g_file_has_prefix(getFileStruct(), (prefix is null) ? null : prefix.getFileStruct()) != 0; } /** * Checks to see if a #GFile has a given URI scheme. * * This call does no blocking I/O. * * Params: * uriScheme = a string containing a URI scheme * * Returns: %TRUE if #GFile's backend supports the * given URI scheme, %FALSE if URI scheme is %NULL, * not supported, or #GFile is invalid. */ public bool hasUriScheme(string uriScheme) { return g_file_has_uri_scheme(getFileStruct(), Str.toStringz(uriScheme)) != 0; } /** * Creates a hash value for a #GFile. * * This call does no blocking I/O. * * Returns: 0 if @file is not a valid #GFile, otherwise an * integer that can be used as hash value for the #GFile. * This function is intended for easily hashing a #GFile to * add to a #GHashTable or similar data structure. */ public uint hash() { return g_file_hash(getFileStruct()); } /** * Checks to see if a file is native to the platform. * * A native file s one expressed in the platform-native filename format, * e.g. "C:\Windows" or "/usr/bin/". This does not mean the file is local, * as it might be on a locally mounted remote filesystem. * * On some systems non-native files may be available using the native * filesystem via a userspace filesystem (FUSE), in these cases this call * will return %FALSE, but g_file_get_path() will still return a native path. * * This call does no blocking I/O. * * Returns: %TRUE if @file is native */ public bool isNative() { return g_file_is_native(getFileStruct()) != 0; } /** * Loads the content of the file into memory. The data is always * zero-terminated, but this is not included in the resultant @length. * The returned @content should be freed with g_free() when no longer * needed. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * contents = a location to place the contents of the file * etagOut = a location to place the current entity tag for the file, * or %NULL if the entity tag is not needed * * Returns: %TRUE if the @file's contents were successfully loaded. * %FALSE if there were errors. * * Throws: GException on failure. */ public bool loadContents(Cancellable cancellable, out string contents, out string etagOut) { char* outcontents = null; size_t length; char* outetagOut = null; GError* err = null; auto p = g_file_load_contents(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &outcontents, &length, &outetagOut, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } contents = Str.toString(outcontents, length); etagOut = Str.toString(outetagOut); return p; } /** * Starts an asynchronous load of the @file's contents. * * For more details, see g_file_load_contents() which is * the synchronous version of this call. * * When the load operation has completed, @callback will be called * with @user data. To finish the operation, call * g_file_load_contents_finish() with the #GAsyncResult returned by * the @callback. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function */ public void loadContentsAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_load_contents_async(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous load of the @file's contents. * The contents are placed in @contents, and @length is set to the * size of the @contents string. The @content should be freed with * g_free() when no longer needed. If @etag_out is present, it will be * set to the new entity tag for the @file. * * Params: * res = a #GAsyncResult * contents = a location to place the contents of the file * etagOut = a location to place the current entity tag for the file, * or %NULL if the entity tag is not needed * * Returns: %TRUE if the load was successful. If %FALSE and @error is * present, it will be set appropriately. * * Throws: GException on failure. */ public bool loadContentsFinish(AsyncResultIF res, out string contents, out string etagOut) { char* outcontents = null; size_t length; char* outetagOut = null; GError* err = null; auto p = g_file_load_contents_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &outcontents, &length, &outetagOut, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } contents = Str.toString(outcontents, length); etagOut = Str.toString(outetagOut); return p; } /** * Reads the partial contents of a file. A #GFileReadMoreCallback should * be used to stop reading from the file when appropriate, else this * function will behave exactly as g_file_load_contents_async(). This * operation can be finished by g_file_load_partial_contents_finish(). * * Users of this function should be aware that @user_data is passed to * both the @read_more_callback and the @callback. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * readMoreCallback = a #GFileReadMoreCallback to receive partial data * and to specify whether further data should be read * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to the callback functions */ public void loadPartialContentsAsync(Cancellable cancellable, GFileReadMoreCallback readMoreCallback, GAsyncReadyCallback callback, void* userData) { g_file_load_partial_contents_async(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), readMoreCallback, callback, userData); } /** * Finishes an asynchronous partial load operation that was started * with g_file_load_partial_contents_async(). The data is always * zero-terminated, but this is not included in the resultant @length. * The returned @content should be freed with g_free() when no longer * needed. * * Params: * res = a #GAsyncResult * contents = a location to place the contents of the file * etagOut = a location to place the current entity tag for the file, * or %NULL if the entity tag is not needed * * Returns: %TRUE if the load was successful. If %FALSE and @error is * present, it will be set appropriately. * * Throws: GException on failure. */ public bool loadPartialContentsFinish(AsyncResultIF res, out string contents, out string etagOut) { char* outcontents = null; size_t length; char* outetagOut = null; GError* err = null; auto p = g_file_load_partial_contents_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &outcontents, &length, &outetagOut, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } contents = Str.toString(outcontents, length); etagOut = Str.toString(outetagOut); return p; } /** * Creates a directory. Note that this will only create a child directory * of the immediate parent directory of the path or URI given by the #GFile. * To recursively create directories, see g_file_make_directory_with_parents(). * This function will fail if the parent directory does not exist, setting * @error to %G_IO_ERROR_NOT_FOUND. If the file system doesn't support * creating directories, this function will fail, setting @error to * %G_IO_ERROR_NOT_SUPPORTED. * * For a local #GFile the newly created directory will have the default * (current) ownership and permissions of the current process. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE on successful creation, %FALSE otherwise. * * Throws: GException on failure. */ public bool makeDirectory(Cancellable cancellable) { GError* err = null; auto p = g_file_make_directory(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously creates a directory. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.38 */ public void makeDirectoryAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_make_directory_async(getFileStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous directory creation, started with * g_file_make_directory_async(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE on successful directory creation, %FALSE otherwise. * * Since: 2.38 * * Throws: GException on failure. */ public bool makeDirectoryFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_make_directory_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Creates a directory and any parent directories that may not * exist similar to 'mkdir -p'. If the file system does not support * creating directories, this function will fail, setting @error to * %G_IO_ERROR_NOT_SUPPORTED. If the directory itself already exists, * this function will fail setting @error to %G_IO_ERROR_EXISTS, unlike * the similar g_mkdir_with_parents(). * * For a local #GFile the newly created directories will have the default * (current) ownership and permissions of the current process. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if all directories have been successfully created, %FALSE * otherwise. * * Since: 2.18 * * Throws: GException on failure. */ public bool makeDirectoryWithParents(Cancellable cancellable) { GError* err = null; auto p = g_file_make_directory_with_parents(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Creates a symbolic link named @file which contains the string * @symlink_value. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * symlinkValue = a string with the path for the target * of the new symlink * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise. * * Throws: GException on failure. */ public bool makeSymbolicLink(string symlinkValue, Cancellable cancellable) { GError* err = null; auto p = g_file_make_symbolic_link(getFileStruct(), Str.toStringz(symlinkValue), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Recursively measures the disk usage of @file. * * This is essentially an analog of the 'du' command, but it also * reports the number of directories and non-directory files encountered * (including things like symbolic links). * * By default, errors are only reported against the toplevel file * itself. Errors found while recursing are silently ignored, unless * %G_FILE_DISK_USAGE_REPORT_ALL_ERRORS is given in @flags. * * The returned size, @disk_usage, is in bytes and should be formatted * with g_format_size() in order to get something reasonable for showing * in a user interface. * * @progress_callback and @progress_data can be given to request * periodic progress updates while scanning. See the documentation for * #GFileMeasureProgressCallback for information about when and how the * callback will be invoked. * * Params: * flags = #GFileMeasureFlags * cancellable = optional #GCancellable * progressCallback = a #GFileMeasureProgressCallback * progressData = user_data for @progress_callback * diskUsage = the number of bytes of disk space used * numDirs = the number of directories encountered * numFiles = the number of non-directories encountered * * Returns: %TRUE if successful, with the out parameters set. * %FALSE otherwise, with @error set. * * Since: 2.38 * * Throws: GException on failure. */ public bool measureDiskUsage(GFileMeasureFlags flags, Cancellable cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, out ulong diskUsage, out ulong numDirs, out ulong numFiles) { GError* err = null; auto p = g_file_measure_disk_usage(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), progressCallback, progressData, &diskUsage, &numDirs, &numFiles, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Recursively measures the disk usage of @file. * * This is the asynchronous version of g_file_measure_disk_usage(). See * there for more information. * * Params: * flags = #GFileMeasureFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable * progressCallback = a #GFileMeasureProgressCallback * progressData = user_data for @progress_callback * callback = a #GAsyncReadyCallback to call when complete * userData = the data to pass to callback function * * Since: 2.38 */ public void measureDiskUsageAsync(GFileMeasureFlags flags, int ioPriority, Cancellable cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, GAsyncReadyCallback callback, void* userData) { g_file_measure_disk_usage_async(getFileStruct(), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), progressCallback, progressData, callback, userData); } /** * Collects the results from an earlier call to * g_file_measure_disk_usage_async(). See g_file_measure_disk_usage() for * more information. * * Params: * result = the #GAsyncResult passed to your #GAsyncReadyCallback * diskUsage = the number of bytes of disk space used * numDirs = the number of directories encountered * numFiles = the number of non-directories encountered * * Returns: %TRUE if successful, with the out parameters set. * %FALSE otherwise, with @error set. * * Since: 2.38 * * Throws: GException on failure. */ public bool measureDiskUsageFinish(AsyncResultIF result, out ulong diskUsage, out ulong numDirs, out ulong numFiles) { GError* err = null; auto p = g_file_measure_disk_usage_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &diskUsage, &numDirs, &numFiles, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Obtains a file or directory monitor for the given file, * depending on the type of the file. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * flags = a set of #GFileMonitorFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileMonitor for the given @file, * or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.18 * * Throws: GException on failure. */ public FileMonitor monitor(GFileMonitorFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_monitor(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileMonitor)(cast(GFileMonitor*) p, true); } /** * Obtains a directory monitor for the given file. * This may fail if directory monitoring is not supported. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * It does not make sense for @flags to contain * %G_FILE_MONITOR_WATCH_HARD_LINKS, since hard links can not be made to * directories. It is not possible to monitor all the files in a * directory for changes made via hard links; if you want to do this then * you must register individual watches with g_file_monitor(). * * Params: * flags = a set of #GFileMonitorFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileMonitor for the given @file, * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileMonitor monitorDirectory(GFileMonitorFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_monitor_directory(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileMonitor)(cast(GFileMonitor*) p, true); } /** * Obtains a file monitor for the given file. If no file notification * mechanism exists, then regular polling of the file is used. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If @flags contains %G_FILE_MONITOR_WATCH_HARD_LINKS then the monitor * will also attempt to report changes made to the file via another * filename (ie, a hard link). Without this flag, you can only rely on * changes made through the filename contained in @file to be * reported. Using this flag may result in an increase in resource * usage, and may not have any effect depending on the #GFileMonitor * backend and/or filesystem type. * * Params: * flags = a set of #GFileMonitorFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileMonitor for the given @file, * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileMonitor monitorFile(GFileMonitorFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_monitor_file(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileMonitor)(cast(GFileMonitor*) p, true); } /** * Starts a @mount_operation, mounting the volume that contains * the file @location. * * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_mount_enclosing_volume_finish(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation * or %NULL to avoid user interaction * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function */ public void mountEnclosingVolume(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_mount_enclosing_volume(getFileStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes a mount operation started by g_file_mount_enclosing_volume(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if successful. If an error has occurred, * this function will return %FALSE and set @error * appropriately if present. * * Throws: GException on failure. */ public bool mountEnclosingVolumeFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_mount_enclosing_volume_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Mounts a file of type G_FILE_TYPE_MOUNTABLE. * Using @mount_operation, you can request callbacks when, for instance, * passwords are needed during authentication. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_mount_mountable_finish() to get * the result of the operation. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation, * or %NULL to avoid user interaction * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function */ public void mountMountable(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_mount_mountable(getFileStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes a mount operation. See g_file_mount_mountable() for details. * * Finish an asynchronous mount operation that was started * with g_file_mount_mountable(). * * Params: * result = a #GAsyncResult * * Returns: a #GFile or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileIF mountMountableFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_mount_mountable_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Tries to move the file or directory @source to the location specified * by @destination. If native move operations are supported then this is * used, otherwise a copy + delete fallback is used. The native * implementation may support moving directories (for instance on moves * inside the same filesystem), but the fallback code does not. * * If the flag #G_FILE_COPY_OVERWRITE is specified an already * existing @destination file is overwritten. * * If the flag #G_FILE_COPY_NOFOLLOW_SYMLINKS is specified then symlinks * will be copied as symlinks, otherwise the target of the * @source symlink will be copied. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If @progress_callback is not %NULL, then the operation can be monitored * by setting this to a #GFileProgressCallback function. * @progress_callback_data will be passed to this function. It is * guaranteed that this callback will be called after all data has been * transferred with the total number of bytes copied during the operation. * * If the @source file does not exist, then the %G_IO_ERROR_NOT_FOUND * error is returned, independent on the status of the @destination. * * If #G_FILE_COPY_OVERWRITE is not specified and the target exists, * then the error %G_IO_ERROR_EXISTS is returned. * * If trying to overwrite a file over a directory, the %G_IO_ERROR_IS_DIRECTORY * error is returned. If trying to overwrite a directory with a directory the * %G_IO_ERROR_WOULD_MERGE error is returned. * * If the source is a directory and the target does not exist, or * #G_FILE_COPY_OVERWRITE is specified and the target is a file, then * the %G_IO_ERROR_WOULD_RECURSE error may be returned (if the native * move operation isn't available). * * Params: * destination = #GFile pointing to the destination location * flags = set of #GFileCopyFlags * cancellable = optional #GCancellable object, * %NULL to ignore * progressCallback = #GFileProgressCallback * function for updates * progressCallbackData = gpointer to user data for * the callback function * * Returns: %TRUE on successful move, %FALSE otherwise. * * Throws: GException on failure. */ public bool move(FileIF destination, GFileCopyFlags flags, Cancellable cancellable, GFileProgressCallback progressCallback, void* progressCallbackData) { GError* err = null; auto p = g_file_move(getFileStruct(), (destination is null) ? null : destination.getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), progressCallback, progressCallbackData, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Opens an existing file for reading and writing. The result is * a #GFileIOStream that can be used to read and write the contents * of the file. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will * be returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY * error will be returned. Other errors are possible too, and depend on * what kind of filesystem the file is on. Note that in many non-local * file cases read and write streams are not supported, so make sure you * really need to do read and write streaming, rather than just opening * for reading or writing. * * Params: * cancellable = a #GCancellable * * Returns: #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream openReadwrite(Cancellable cancellable) { GError* err = null; auto p = g_file_open_readwrite(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIOStream)(cast(GFileIOStream*) p, true); } /** * Asynchronously opens @file for reading and writing. * * For more details, see g_file_open_readwrite() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_open_readwrite_finish() to get * the result of the operation. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void openReadwriteAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_open_readwrite_async(getFileStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous file read operation started with * g_file_open_readwrite_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream openReadwriteFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_open_readwrite_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIOStream)(cast(GFileIOStream*) p, true); } /** * Polls a file of type #G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_mount_mountable_finish() to get * the result of the operation. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void pollMountable(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_poll_mountable(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes a poll operation. See g_file_poll_mountable() for details. * * Finish an asynchronous poll operation that was polled * with g_file_poll_mountable(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. %FALSE * otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool pollMountableFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_poll_mountable_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Returns the #GAppInfo that is registered as the default * application to handle the file specified by @file. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: a #GAppInfo if the handle was found, * %NULL if there were errors. * When you are done with it, release it with g_object_unref() * * Throws: GException on failure. */ public AppInfoIF queryDefaultHandler(Cancellable cancellable) { GError* err = null; auto p = g_file_query_default_handler(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(AppInfoIF)(cast(GAppInfo*) p, true); } /** * Utility function to check if a particular file exists. This is * implemented using g_file_query_info() and as such does blocking I/O. * * Note that in many cases it is racy to first check for file existence * and then execute something based on the outcome of that, because the * file might have been created or removed in between the operations. The * general approach to handling that is to not check, but just do the * operation and handle the errors as they come. * * As an example of race-free checking, take the case of reading a file, * and if it doesn't exist, creating it. There are two racy versions: read * it, and on error create it; and: check if it exists, if not create it. * These can both result in two processes creating the file (with perhaps * a partially written file as the result). The correct approach is to * always try to create the file with g_file_create() which will either * atomically create the file or fail with a %G_IO_ERROR_EXISTS error. * * However, in many cases an existence check is useful in a user interface, * for instance to make a menu item sensitive/insensitive, so that you don't * have to fool users that something is possible and then just show an error * dialog. If you do this, you should make sure to also handle the errors * that can happen due to races when you execute the operation. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the file exists (and can be detected without error), * %FALSE otherwise (or if cancelled). */ public bool queryExists(Cancellable cancellable) { return g_file_query_exists(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct()) != 0; } /** * Utility function to inspect the #GFileType of a file. This is * implemented using g_file_query_info() and as such does blocking I/O. * * The primary use case of this method is to check if a file is * a regular file, directory, or symlink. * * Params: * flags = a set of #GFileQueryInfoFlags passed to g_file_query_info() * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: The #GFileType of the file and #G_FILE_TYPE_UNKNOWN * if the file does not exist * * Since: 2.18 */ public GFileType queryFileType(GFileQueryInfoFlags flags, Cancellable cancellable) { return g_file_query_file_type(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct()); } /** * Similar to g_file_query_info(), but obtains information * about the filesystem the @file is on, rather than the file itself. * For instance the amount of space available and the type of * the filesystem. * * The @attributes value is a string that specifies the attributes * that should be gathered. It is not an error if it's not possible * to read a particular requested attribute from a file - it just * won't be set. @attributes should be a comma-separated list of * attributes or attribute wildcards. The wildcard "*" means all * attributes, and a wildcard like "filesystem::*" means all attributes * in the filesystem namespace. The standard namespace for filesystem * attributes is "filesystem". Common attributes of interest are * #G_FILE_ATTRIBUTE_FILESYSTEM_SIZE (the total size of the filesystem * in bytes), #G_FILE_ATTRIBUTE_FILESYSTEM_FREE (number of bytes available), * and #G_FILE_ATTRIBUTE_FILESYSTEM_TYPE (type of the filesystem). * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will * be returned. Other errors are possible too, and depend on what * kind of filesystem the file is on. * * Params: * attributes = an attribute query string * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileInfo or %NULL if there was an error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInfo queryFilesystemInfo(string attributes, Cancellable cancellable) { GError* err = null; auto p = g_file_query_filesystem_info(getFileStruct(), Str.toStringz(attributes), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } /** * Asynchronously gets the requested information about the filesystem * that the specified @file is on. The result is a #GFileInfo object * that contains key-value attributes (such as type or size for the * file). * * For more details, see g_file_query_filesystem_info() which is the * synchronous version of this call. * * When the operation is finished, @callback will be called. You can * then call g_file_query_info_finish() to get the result of the * operation. * * Params: * attributes = an attribute query string * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void queryFilesystemInfoAsync(string attributes, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_query_filesystem_info_async(getFileStruct(), Str.toStringz(attributes), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous filesystem info query. * See g_file_query_filesystem_info_async(). * * Params: * res = a #GAsyncResult * * Returns: #GFileInfo for given @file * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInfo queryFilesystemInfoFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_query_filesystem_info_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } /** * Gets the requested information about specified @file. * The result is a #GFileInfo object that contains key-value * attributes (such as the type or size of the file). * * The @attributes value is a string that specifies the file * attributes that should be gathered. It is not an error if * it's not possible to read a particular requested attribute * from a file - it just won't be set. @attributes should be a * comma-separated list of attributes or attribute wildcards. * The wildcard "*" means all attributes, and a wildcard like * "standard::*" means all attributes in the standard namespace. * An example attribute query be "standard::*,owner::user". * The standard attributes are available as defines, like * #G_FILE_ATTRIBUTE_STANDARD_NAME. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * For symlinks, normally the information about the target of the * symlink is returned, rather than information about the symlink * itself. However if you pass #G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS * in @flags the information about the symlink itself will be returned. * Also, for symlinks that point to non-existing files the information * about the symlink itself will be returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be * returned. Other errors are possible too, and depend on what kind of * filesystem the file is on. * * Params: * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileInfo for the given @file, or %NULL * on error. Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInfo queryInfo(string attributes, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_query_info(getFileStruct(), Str.toStringz(attributes), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } /** * Asynchronously gets the requested information about specified @file. * The result is a #GFileInfo object that contains key-value attributes * (such as type or size for the file). * * For more details, see g_file_query_info() which is the synchronous * version of this call. * * When the operation is finished, @callback will be called. You can * then call g_file_query_info_finish() to get the result of the operation. * * Params: * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call when the * request is satisfied * userData = the data to pass to callback function */ public void queryInfoAsync(string attributes, GFileQueryInfoFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_query_info_async(getFileStruct(), Str.toStringz(attributes), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous file info query. * See g_file_query_info_async(). * * Params: * res = a #GAsyncResult * * Returns: #GFileInfo for given @file * or %NULL on error. Free the returned object with * g_object_unref(). * * Throws: GException on failure. */ public FileInfo queryInfoFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_query_info_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p, true); } /** * Obtain the list of settable attributes for the file. * * Returns the type and full attribute name of all the attributes * that can be set on this file. This doesn't mean setting it will * always succeed though, you might get an access failure, or some * specific file may not support a specific attribute. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileAttributeInfoList describing the settable attributes. * When you are done with it, release it with * g_file_attribute_info_list_unref() * * Throws: GException on failure. */ public FileAttributeInfoList querySettableAttributes(Cancellable cancellable) { GError* err = null; auto p = g_file_query_settable_attributes(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileAttributeInfoList)(cast(GFileAttributeInfoList*) p, true); } /** * Obtain the list of attribute namespaces where new attributes * can be created by a user. An example of this is extended * attributes (in the "xattr" namespace). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileAttributeInfoList describing the writable namespaces. * When you are done with it, release it with * g_file_attribute_info_list_unref() * * Throws: GException on failure. */ public FileAttributeInfoList queryWritableNamespaces(Cancellable cancellable) { GError* err = null; auto p = g_file_query_writable_namespaces(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileAttributeInfoList)(cast(GFileAttributeInfoList*) p, true); } /** * Opens a file for reading. The result is a #GFileInputStream that * can be used to read the contents of the file. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If the file does not exist, the %G_IO_ERROR_NOT_FOUND error will be * returned. If the file is a directory, the %G_IO_ERROR_IS_DIRECTORY * error will be returned. Other errors are possible too, and depend * on what kind of filesystem the file is on. * * Params: * cancellable = a #GCancellable * * Returns: #GFileInputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInputStream read(Cancellable cancellable) { GError* err = null; auto p = g_file_read(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInputStream)(cast(GFileInputStream*) p, true); } /** * Asynchronously opens @file for reading. * * For more details, see g_file_read() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_read_finish() to get the result * of the operation. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void readAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_read_async(getFileStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous file read operation started with * g_file_read_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileInputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileInputStream readFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_read_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileInputStream)(cast(GFileInputStream*) p, true); } /** * Returns an output stream for overwriting the file, possibly * creating a backup copy of the file first. If the file doesn't exist, * it will be created. * * This will try to replace the file in the safest way possible so * that any errors during the writing will not affect an already * existing copy of the file. For instance, for local files it * may write to a temporary file and then atomically rename over * the destination when the stream is closed. * * By default files created are generally readable by everyone, * but if you pass #G_FILE_CREATE_PRIVATE in @flags the file * will be made readable only to the current user, to the level that * is supported on the target filesystem. * * If @cancellable is not %NULL, then the operation can be cancelled * by triggering the cancellable object from another thread. If the * operation was cancelled, the error %G_IO_ERROR_CANCELLED will be * returned. * * If you pass in a non-%NULL @etag value and @file already exists, then * this value is compared to the current entity tag of the file, and if * they differ an %G_IO_ERROR_WRONG_ETAG error is returned. This * generally means that the file has been changed since you last read * it. You can get the new etag from g_file_output_stream_get_etag() * after you've finished writing and closed the #GFileOutputStream. When * you load a new file you can use g_file_input_stream_query_info() to * get the etag of the file. * * If @make_backup is %TRUE, this function will attempt to make a * backup of the current file before overwriting it. If this fails * a %G_IO_ERROR_CANT_CREATE_BACKUP error will be returned. If you * want to replace anyway, try again with @make_backup set to %FALSE. * * If the file is a directory the %G_IO_ERROR_IS_DIRECTORY error will * be returned, and if the file is some other form of non-regular file * then a %G_IO_ERROR_NOT_REGULAR_FILE error will be returned. Some * file systems don't allow all file names, and may return an * %G_IO_ERROR_INVALID_FILENAME error, and if the name is to long * %G_IO_ERROR_FILENAME_TOO_LONG will be returned. Other errors are * possible too, and depend on what kind of filesystem the file is on. * * Params: * etag = an optional [entity tag][gfile-etag] * for the current #GFile, or #NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileOutputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream replace(string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_replace(getFileStruct(), Str.toStringz(etag), makeBackup, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileOutputStream)(cast(GFileOutputStream*) p, true); } /** * Asynchronously overwrites the file, replacing the contents, * possibly creating a backup copy of the file first. * * For more details, see g_file_replace() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_replace_finish() to get the result * of the operation. * * Params: * etag = an [entity tag][gfile-etag] for the current #GFile, * or %NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void replaceAsync(string etag, bool makeBackup, GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_replace_async(getFileStruct(), Str.toStringz(etag), makeBackup, flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Replaces the contents of @file with @contents of @length bytes. * * If @etag is specified (not %NULL), any existing file must have that etag, * or the error %G_IO_ERROR_WRONG_ETAG will be returned. * * If @make_backup is %TRUE, this function will attempt to make a backup * of @file. Internally, it uses g_file_replace(), so will try to replace the * file contents in the safest way possible. For example, atomic renames are * used when replacing local files’ contents. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * The returned @new_etag can be used to verify that the file hasn't * changed the next time it is saved over. * * Params: * contents = a string containing the new contents for @file * etag = the old [entity-tag][gfile-etag] for the document, * or %NULL * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * newEtag = a location to a new [entity tag][gfile-etag] * for the document. This should be freed with g_free() when no longer * needed, or %NULL * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: %TRUE if successful. If an error has occurred, this function * will return %FALSE and set @error appropriately if present. * * Throws: GException on failure. */ public bool replaceContents(string contents, string etag, bool makeBackup, GFileCreateFlags flags, out string newEtag, Cancellable cancellable) { char* outnewEtag = null; GError* err = null; auto p = g_file_replace_contents(getFileStruct(), Str.toStringz(contents), cast(size_t)contents.length, Str.toStringz(etag), makeBackup, flags, &outnewEtag, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } newEtag = Str.toString(outnewEtag); return p; } /** * Starts an asynchronous replacement of @file with the given * @contents of @length bytes. @etag will replace the document's * current entity tag. * * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_replace_contents_finish(). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * If @make_backup is %TRUE, this function will attempt to * make a backup of @file. * * Note that no copy of @content will be made, so it must stay valid * until @callback is called. See g_file_replace_contents_bytes_async() * for a #GBytes version that will automatically hold a reference to the * contents (without copying) for the duration of the call. * * Params: * contents = string of contents to replace the file with * etag = a new [entity tag][gfile-etag] for the @file, or %NULL * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function */ public void replaceContentsAsync(string contents, string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_replace_contents_async(getFileStruct(), Str.toStringz(contents), cast(size_t)contents.length, Str.toStringz(etag), makeBackup, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Same as g_file_replace_contents_async() but takes a #GBytes input instead. * This function will keep a ref on @contents until the operation is done. * Unlike g_file_replace_contents_async() this allows forgetting about the * content without waiting for the callback. * * When this operation has completed, @callback will be called with * @user_user data, and the operation can be finalized with * g_file_replace_contents_finish(). * * Params: * contents = a #GBytes * etag = a new [entity tag][gfile-etag] for the @file, or %NULL * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.40 */ public void replaceContentsBytesAsync(Bytes contents, string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_replace_contents_bytes_async(getFileStruct(), (contents is null) ? null : contents.getBytesStruct(), Str.toStringz(etag), makeBackup, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous replace of the given @file. See * g_file_replace_contents_async(). Sets @new_etag to the new entity * tag for the document, if present. * * Params: * res = a #GAsyncResult * newEtag = a location of a new [entity tag][gfile-etag] * for the document. This should be freed with g_free() when it is no * longer needed, or %NULL * * Returns: %TRUE on success, %FALSE on failure. * * Throws: GException on failure. */ public bool replaceContentsFinish(AsyncResultIF res, out string newEtag) { char* outnewEtag = null; GError* err = null; auto p = g_file_replace_contents_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &outnewEtag, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } newEtag = Str.toString(outnewEtag); return p; } /** * Finishes an asynchronous file replace operation started with * g_file_replace_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileOutputStream, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileOutputStream replaceFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_replace_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileOutputStream)(cast(GFileOutputStream*) p, true); } /** * Returns an output stream for overwriting the file in readwrite mode, * possibly creating a backup copy of the file first. If the file doesn't * exist, it will be created. * * For details about the behaviour, see g_file_replace() which does the * same thing but returns an output stream only. * * Note that in many non-local file cases read and write streams are not * supported, so make sure you really need to do read and write streaming, * rather than just opening for reading or writing. * * Params: * etag = an optional [entity tag][gfile-etag] * for the current #GFile, or #NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream replaceReadwrite(string etag, bool makeBackup, GFileCreateFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_replace_readwrite(getFileStruct(), Str.toStringz(etag), makeBackup, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIOStream)(cast(GFileIOStream*) p, true); } /** * Asynchronously overwrites the file in read-write mode, * replacing the contents, possibly creating a backup copy * of the file first. * * For more details, see g_file_replace_readwrite() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_replace_readwrite_finish() to get * the result of the operation. * * Params: * etag = an [entity tag][gfile-etag] for the current #GFile, * or %NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void replaceReadwriteAsync(string etag, bool makeBackup, GFileCreateFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_replace_readwrite_async(getFileStruct(), Str.toStringz(etag), makeBackup, flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous file replace operation started with * g_file_replace_readwrite_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFileIOStream, or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public FileIOStream replaceReadwriteFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_replace_readwrite_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIOStream)(cast(GFileIOStream*) p, true); } /** * Resolves a relative path for @file to an absolute path. * * This call does no blocking I/O. * * Params: * relativePath = a given relative path string * * Returns: #GFile to the resolved path. * %NULL if @relative_path is %NULL or if @file is invalid. * Free the returned object with g_object_unref(). */ public FileIF resolveRelativePath(string relativePath) { auto p = g_file_resolve_relative_path(getFileStruct(), Str.toStringz(relativePath)); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Sets an attribute in the file with attribute name @attribute to @value. * * Some attributes can be unset by setting @attribute to * %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * type = The type of the attribute * valueP = a pointer to the value (or the pointer * itself if the type is a pointer type) * flags = a set of #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the attribute was set, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttribute(string attribute, GFileAttributeType type, void* valueP, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_set_attribute(getFileStruct(), Str.toStringz(attribute), type, valueP, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING to @value. * If @attribute is of a different type, this operation will fail, * returning %FALSE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a string containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set to @value * in the @file, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeByteString(string attribute, string value, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_set_attribute_byte_string(getFileStruct(), Str.toStringz(attribute), Str.toStringz(value), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT32 to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a #gint32 containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set to @value * in the @file, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeInt32(string attribute, int value, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_set_attribute_int32(getFileStruct(), Str.toStringz(attribute), value, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_INT64 to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a #guint64 containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeInt64(string attribute, long value, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_set_attribute_int64(getFileStruct(), Str.toStringz(attribute), value, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_STRING to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a string containing the attribute's value * flags = #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeString(string attribute, string value, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_set_attribute_string(getFileStruct(), Str.toStringz(attribute), Str.toStringz(value), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT32 to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a #guint32 containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set to @value * in the @file, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeUint32(string attribute, uint value, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_set_attribute_uint32(getFileStruct(), Str.toStringz(attribute), value, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets @attribute of type %G_FILE_ATTRIBUTE_TYPE_UINT64 to @value. * If @attribute is of a different type, this operation will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * attribute = a string containing the attribute's name * value = a #guint64 containing the attribute's new value * flags = a #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE if the @attribute was successfully set to @value * in the @file, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributeUint64(string attribute, ulong value, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_set_attribute_uint64(getFileStruct(), Str.toStringz(attribute), value, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously sets the attributes of @file with @info. * * For more details, see g_file_set_attributes_from_info(), * which is the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_set_attributes_finish() to get * the result of the operation. * * Params: * info = a #GFileInfo * flags = a #GFileQueryInfoFlags * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback * userData = a #gpointer */ public void setAttributesAsync(FileInfo info, GFileQueryInfoFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_set_attributes_async(getFileStruct(), (info is null) ? null : info.getFileInfoStruct(), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes setting an attribute started in g_file_set_attributes_async(). * * Params: * result = a #GAsyncResult * info = a #GFileInfo * * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise. * * Throws: GException on failure. */ public bool setAttributesFinish(AsyncResultIF result, out FileInfo info) { GFileInfo* outinfo = null; GError* err = null; auto p = g_file_set_attributes_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &outinfo, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } info = ObjectG.getDObject!(FileInfo)(outinfo); return p; } /** * Tries to set all attributes in the #GFileInfo on the target * values, not stopping on the first error. * * If there is any error during this operation then @error will * be set to the first error. Error on particular fields are flagged * by setting the "status" field in the attribute value to * %G_FILE_ATTRIBUTE_STATUS_ERROR_SETTING, which means you can * also detect further errors. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * info = a #GFileInfo * flags = #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %FALSE if there was any error, %TRUE otherwise. * * Throws: GException on failure. */ public bool setAttributesFromInfo(FileInfo info, GFileQueryInfoFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_file_set_attributes_from_info(getFileStruct(), (info is null) ? null : info.getFileInfoStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Renames @file to the specified display name. * * The display name is converted from UTF-8 to the correct encoding * for the target filesystem if possible and the @file is renamed to this. * * If you want to implement a rename operation in the user interface the * edit name (#G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME) should be used as the * initial value in the rename widget, and then the result after editing * should be passed to g_file_set_display_name(). * * On success the resulting converted filename is returned. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * displayName = a string * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: a #GFile specifying what @file was renamed to, * or %NULL if there was an error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileIF setDisplayName(string displayName, Cancellable cancellable) { GError* err = null; auto p = g_file_set_display_name(getFileStruct(), Str.toStringz(displayName), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Asynchronously sets the display name for a given #GFile. * * For more details, see g_file_set_display_name() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. * You can then call g_file_set_display_name_finish() to get * the result of the operation. * * Params: * displayName = a string * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function */ public void setDisplayNameAsync(string displayName, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_set_display_name_async(getFileStruct(), Str.toStringz(displayName), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes setting a display name started with * g_file_set_display_name_async(). * * Params: * res = a #GAsyncResult * * Returns: a #GFile or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ public FileIF setDisplayNameFinish(AsyncResultIF res) { GError* err = null; auto p = g_file_set_display_name_finish(getFileStruct(), (res is null) ? null : res.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Starts a file of type #G_FILE_TYPE_MOUNTABLE. * Using @start_operation, you can request callbacks when, for instance, * passwords are needed during authentication. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_mount_mountable_finish() to get * the result of the operation. * * Params: * flags = flags affecting the operation * startOperation = a #GMountOperation, or %NULL to avoid user interaction * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback to call when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void startMountable(GDriveStartFlags flags, MountOperation startOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_start_mountable(getFileStruct(), flags, (startOperation is null) ? null : startOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes a start operation. See g_file_start_mountable() for details. * * Finish an asynchronous start operation that was started * with g_file_start_mountable(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. %FALSE * otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool startMountableFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_start_mountable_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Stops a file of type #G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_stop_mountable_finish() to get * the result of the operation. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation, * or %NULL to avoid user interaction. * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void stopMountable(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_stop_mountable(getFileStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an stop operation, see g_file_stop_mountable() for details. * * Finish an asynchronous stop operation that was started * with g_file_stop_mountable(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool stopMountableFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_stop_mountable_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks if @file supports * [thread-default contexts][g-main-context-push-thread-default-context]. * If this returns %FALSE, you cannot perform asynchronous operations on * @file in a thread that has a thread-default context. * * Returns: Whether or not @file supports thread-default contexts. * * Since: 2.22 */ public bool supportsThreadContexts() { return g_file_supports_thread_contexts(getFileStruct()) != 0; } /** * Sends @file to the "Trashcan", if possible. This is similar to * deleting it, but the user can recover it before emptying the trashcan. * Not all file systems support trashing, so this call can return the * %G_IO_ERROR_NOT_SUPPORTED error. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional #GCancellable object, * %NULL to ignore * * Returns: %TRUE on successful trash, %FALSE otherwise. * * Throws: GException on failure. */ public bool trash(Cancellable cancellable) { GError* err = null; auto p = g_file_trash(getFileStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously sends @file to the Trash location, if possible. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied * userData = the data to pass to callback function * * Since: 2.38 */ public void trashAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_trash_async(getFileStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous file trashing operation, started with * g_file_trash_async(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE on successful trash, %FALSE otherwise. * * Since: 2.38 * * Throws: GException on failure. */ public bool trashFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_trash_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Unmounts a file of type G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_unmount_mountable_finish() to get * the result of the operation. * * Deprecated: Use g_file_unmount_mountable_with_operation() instead. * * Params: * flags = flags affecting the operation * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function */ public void unmountMountable(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_unmount_mountable(getFileStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an unmount operation, see g_file_unmount_mountable() for details. * * Finish an asynchronous unmount operation that was started * with g_file_unmount_mountable(). * * Deprecated: Use g_file_unmount_mountable_with_operation_finish() * instead. * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. * %FALSE otherwise. * * Throws: GException on failure. */ public bool unmountMountableFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_unmount_mountable_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Unmounts a file of type #G_FILE_TYPE_MOUNTABLE. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * When the operation is finished, @callback will be called. * You can then call g_file_unmount_mountable_finish() to get * the result of the operation. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation, * or %NULL to avoid user interaction * cancellable = optional #GCancellable object, * %NULL to ignore * callback = a #GAsyncReadyCallback to call * when the request is satisfied, or %NULL * userData = the data to pass to callback function * * Since: 2.22 */ public void unmountMountableWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_file_unmount_mountable_with_operation(getFileStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an unmount operation, * see g_file_unmount_mountable_with_operation() for details. * * Finish an asynchronous unmount operation that was started * with g_file_unmount_mountable_with_operation(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the operation finished successfully. * %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool unmountMountableWithOperationFinish(AsyncResultIF result) { GError* err = null; auto p = g_file_unmount_mountable_with_operation_finish(getFileStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/FilenameCompleter.d000066400000000000000000000126451324604450400215760ustar00rootroot00000000000000/* * 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 gio.FilenameCompleter; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * Completes partial file and directory names given a partial string by * looking in the file system for clues. Can return a list of possible * completion strings for widget implementations. */ public class FilenameCompleter : ObjectG { /** the main Gtk struct */ protected GFilenameCompleter* gFilenameCompleter; /** Get the main Gtk struct */ public GFilenameCompleter* getFilenameCompleterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFilenameCompleter; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFilenameCompleter; } protected override void setStruct(GObject* obj) { gFilenameCompleter = cast(GFilenameCompleter*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFilenameCompleter* gFilenameCompleter, bool ownedRef = false) { this.gFilenameCompleter = gFilenameCompleter; super(cast(GObject*)gFilenameCompleter, ownedRef); } /** */ public static GType getType() { return g_filename_completer_get_type(); } /** * Creates a new filename completer. * * Returns: a #GFilenameCompleter. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_filename_completer_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GFilenameCompleter*) p, true); } /** * Obtains a completion for @initial_text from @completer. * * Params: * initialText = text to be completed. * * Returns: a completed string, or %NULL if no completion exists. * This string is not owned by GIO, so remember to g_free() it * when finished. */ public string getCompletionSuffix(string initialText) { auto retStr = g_filename_completer_get_completion_suffix(gFilenameCompleter, Str.toStringz(initialText)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets an array of completion strings for a given initial text. * * Params: * initialText = text to be completed. * * Returns: array of strings with possible completions for @initial_text. * This array must be freed by g_strfreev() when finished. */ public string[] getCompletions(string initialText) { auto retStr = g_filename_completer_get_completions(gFilenameCompleter, Str.toStringz(initialText)); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * If @dirs_only is %TRUE, @completer will only * complete directory names, and not file names. * * Params: * dirsOnly = a #gboolean. */ public void setDirsOnly(bool dirsOnly) { g_filename_completer_set_dirs_only(gFilenameCompleter, dirsOnly); } protected class OnGotCompletionDataDelegateWrapper { void delegate(FilenameCompleter) dlg; gulong handlerId; this(void delegate(FilenameCompleter) dlg) { this.dlg = dlg; onGotCompletionDataListeners ~= this; } void remove(OnGotCompletionDataDelegateWrapper source) { foreach(index, wrapper; onGotCompletionDataListeners) { if (wrapper.handlerId == source.handlerId) { onGotCompletionDataListeners[index] = null; onGotCompletionDataListeners = std.algorithm.remove(onGotCompletionDataListeners, index); break; } } } } OnGotCompletionDataDelegateWrapper[] onGotCompletionDataListeners; /** * Emitted when the file name completion information comes available. */ gulong addOnGotCompletionData(void delegate(FilenameCompleter) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnGotCompletionDataDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "got-completion-data", cast(GCallback)&callBackGotCompletionData, cast(void*)wrapper, cast(GClosureNotify)&callBackGotCompletionDataDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackGotCompletionData(GFilenameCompleter* filenamecompleterStruct, OnGotCompletionDataDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackGotCompletionDataDestroy(OnGotCompletionDataDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/FilterInputStream.d000066400000000000000000000061601324604450400216170ustar00rootroot00000000000000/* * 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 gio.FilterInputStream; private import gio.InputStream; private import gio.c.functions; public import gio.c.types; private import gobject.ObjectG; public import gtkc.giotypes; /** * Base class for input stream implementations that perform some * kind of filtering operation on a base stream. Typical examples * of filtering operations are character set conversion, compression * and byte order flipping. */ public class FilterInputStream : InputStream { /** the main Gtk struct */ protected GFilterInputStream* gFilterInputStream; /** Get the main Gtk struct */ public GFilterInputStream* getFilterInputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFilterInputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFilterInputStream; } protected override void setStruct(GObject* obj) { gFilterInputStream = cast(GFilterInputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFilterInputStream* gFilterInputStream, bool ownedRef = false) { this.gFilterInputStream = gFilterInputStream; super(cast(GInputStream*)gFilterInputStream, ownedRef); } /** */ public static GType getType() { return g_filter_input_stream_get_type(); } /** * Gets the base stream for the filter stream. * * Returns: a #GInputStream. */ public InputStream getBaseStream() { auto p = g_filter_input_stream_get_base_stream(gFilterInputStream); if(p is null) { return null; } return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p); } /** * Returns whether the base stream will be closed when @stream is * closed. * * Returns: %TRUE if the base stream will be closed. */ public bool getCloseBaseStream() { return g_filter_input_stream_get_close_base_stream(gFilterInputStream) != 0; } /** * Sets whether the base stream will be closed when @stream is closed. * * Params: * closeBase = %TRUE to close the base stream. */ public void setCloseBaseStream(bool closeBase) { g_filter_input_stream_set_close_base_stream(gFilterInputStream, closeBase); } } GtkD-3.7.5/generated/gtkd/gio/FilterOutputStream.d000066400000000000000000000062161324604450400220220ustar00rootroot00000000000000/* * 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 gio.FilterOutputStream; private import gio.OutputStream; private import gio.c.functions; public import gio.c.types; private import gobject.ObjectG; public import gtkc.giotypes; /** * Base class for output stream implementations that perform some * kind of filtering operation on a base stream. Typical examples * of filtering operations are character set conversion, compression * and byte order flipping. */ public class FilterOutputStream : OutputStream { /** the main Gtk struct */ protected GFilterOutputStream* gFilterOutputStream; /** Get the main Gtk struct */ public GFilterOutputStream* getFilterOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gFilterOutputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gFilterOutputStream; } protected override void setStruct(GObject* obj) { gFilterOutputStream = cast(GFilterOutputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GFilterOutputStream* gFilterOutputStream, bool ownedRef = false) { this.gFilterOutputStream = gFilterOutputStream; super(cast(GOutputStream*)gFilterOutputStream, ownedRef); } /** */ public static GType getType() { return g_filter_output_stream_get_type(); } /** * Gets the base stream for the filter stream. * * Returns: a #GOutputStream. */ public OutputStream getBaseStream() { auto p = g_filter_output_stream_get_base_stream(gFilterOutputStream); if(p is null) { return null; } return ObjectG.getDObject!(OutputStream)(cast(GOutputStream*) p); } /** * Returns whether the base stream will be closed when @stream is * closed. * * Returns: %TRUE if the base stream will be closed. */ public bool getCloseBaseStream() { return g_filter_output_stream_get_close_base_stream(gFilterOutputStream) != 0; } /** * Sets whether the base stream will be closed when @stream is closed. * * Params: * closeBase = %TRUE to close the base stream. */ public void setCloseBaseStream(bool closeBase) { g_filter_output_stream_set_close_base_stream(gFilterOutputStream, closeBase); } } GtkD-3.7.5/generated/gtkd/gio/IOExtension.d000066400000000000000000000056121324604450400204030ustar00rootroot00000000000000/* * 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 gio.IOExtension; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import gobject.ObjectG; private import gobject.TypeClass; public import gtkc.giotypes; /** * #GIOExtension is an opaque data structure and can only be accessed * using the following functions. */ public class IOExtension { /** the main Gtk struct */ protected GIOExtension* gIOExtension; protected bool ownedRef; /** Get the main Gtk struct */ public GIOExtension* getIOExtensionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gIOExtension; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gIOExtension; } /** * Sets our main struct and passes it to the parent class. */ public this (GIOExtension* gIOExtension, bool ownedRef = false) { this.gIOExtension = gIOExtension; this.ownedRef = ownedRef; } /** * Gets the name under which @extension was registered. * * Note that the same type may be registered as extension * for multiple extension points, under different names. * * Returns: the name of @extension. */ public string getName() { return Str.toString(g_io_extension_get_name(gIOExtension)); } /** * Gets the priority with which @extension was registered. * * Returns: the priority of @extension */ public int getPriority() { return g_io_extension_get_priority(gIOExtension); } /** * Gets the type associated with @extension. * * Returns: the type of @extension */ public GType getType() { return g_io_extension_get_type(gIOExtension); } /** * Gets a reference to the class for the type that is * associated with @extension. * * Returns: the #GTypeClass for the type of @extension */ public TypeClass refClass() { auto p = g_io_extension_ref_class(gIOExtension); if(p is null) { return null; } return ObjectG.getDObject!(TypeClass)(cast(GTypeClass*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/IOExtensionPoint.d000066400000000000000000000123721324604450400214160ustar00rootroot00000000000000/* * 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 gio.IOExtensionPoint; private import gio.IOExtension; private import gio.c.functions; public import gio.c.types; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GIOExtensionPoint is an opaque data structure and can only be accessed * using the following functions. */ public class IOExtensionPoint { /** the main Gtk struct */ protected GIOExtensionPoint* gIOExtensionPoint; protected bool ownedRef; /** Get the main Gtk struct */ public GIOExtensionPoint* getIOExtensionPointStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gIOExtensionPoint; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gIOExtensionPoint; } /** * Sets our main struct and passes it to the parent class. */ public this (GIOExtensionPoint* gIOExtensionPoint, bool ownedRef = false) { this.gIOExtensionPoint = gIOExtensionPoint; this.ownedRef = ownedRef; } /** * Finds a #GIOExtension for an extension point by name. * * Params: * name = the name of the extension to get * * Returns: the #GIOExtension for @extension_point that has the * given name, or %NULL if there is no extension with that name */ public IOExtension getExtensionByName(string name) { auto p = g_io_extension_point_get_extension_by_name(gIOExtensionPoint, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(IOExtension)(cast(GIOExtension*) p); } /** * Gets a list of all extensions that implement this extension point. * The list is sorted by priority, beginning with the highest priority. * * Returns: a #GList of * #GIOExtensions. The list is owned by GIO and should not be * modified. */ public ListG getExtensions() { auto p = g_io_extension_point_get_extensions(gIOExtensionPoint); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the required type for @extension_point. * * Returns: the #GType that all implementations must have, * or #G_TYPE_INVALID if the extension point has no required type */ public GType getRequiredType() { return g_io_extension_point_get_required_type(gIOExtensionPoint); } /** * Sets the required type for @extension_point to @type. * All implementations must henceforth have this type. * * Params: * type = the #GType to require */ public void setRequiredType(GType type) { g_io_extension_point_set_required_type(gIOExtensionPoint, type); } /** * Registers @type as extension for the extension point with name * @extension_point_name. * * If @type has already been registered as an extension for this * extension point, the existing #GIOExtension object is returned. * * Params: * extensionPointName = the name of the extension point * type = the #GType to register as extension * extensionName = the name for the extension * priority = the priority for the extension * * Returns: a #GIOExtension object for #GType */ public static IOExtension implement(string extensionPointName, GType type, string extensionName, int priority) { auto p = g_io_extension_point_implement(Str.toStringz(extensionPointName), type, Str.toStringz(extensionName), priority); if(p is null) { return null; } return ObjectG.getDObject!(IOExtension)(cast(GIOExtension*) p); } /** * Looks up an existing extension point. * * Params: * name = the name of the extension point * * Returns: the #GIOExtensionPoint, or %NULL if there * is no registered extension point with the given name. */ public static IOExtensionPoint lookup(string name) { auto p = g_io_extension_point_lookup(Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(IOExtensionPoint)(cast(GIOExtensionPoint*) p); } /** * Registers an extension point. * * Params: * name = The name of the extension point * * Returns: the new #GIOExtensionPoint. This object is * owned by GIO and should not be freed. */ public static IOExtensionPoint register(string name) { auto p = g_io_extension_point_register(Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(IOExtensionPoint)(cast(GIOExtensionPoint*) p); } } GtkD-3.7.5/generated/gtkd/gio/IOModule.d000066400000000000000000000146141324604450400176560ustar00rootroot00000000000000/* * 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 gio.IOModule; private import gio.IOModuleScope; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.TypeModule; private import gobject.TypePluginIF; private import gobject.TypePluginT; public import gtkc.giotypes; /** * Provides an interface and default functions for loading and unloading * modules. This is used internally to make GIO extensible, but can also * be used by others to implement module loading. */ public class IOModule : TypeModule { /** the main Gtk struct */ protected GIOModule* gIOModule; /** Get the main Gtk struct */ public GIOModule* getIOModuleStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gIOModule; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gIOModule; } protected override void setStruct(GObject* obj) { gIOModule = cast(GIOModule*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GIOModule* gIOModule, bool ownedRef = false) { this.gIOModule = gIOModule; super(cast(GTypeModule*)gIOModule, ownedRef); } /** */ public static GType getType() { return g_io_module_get_type(); } /** * Creates a new GIOModule that will load the specific * shared library when in use. * * Params: * filename = filename of the shared library module. * * Returns: a #GIOModule from given @filename, * or %NULL on error. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string filename) { auto p = g_io_module_new(Str.toStringz(filename)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GIOModule*) p, true); } /** * Loads all the modules in the specified directory. * * If don't require all modules to be initialized (and thus registering * all gtypes) then you can use g_io_modules_scan_all_in_directory() * which allows delayed/lazy loading of modules. * * Params: * dirname = pathname for a directory containing modules * to load. * * Returns: a list of #GIOModules loaded * from the directory, * All the modules are loaded into memory, if you want to * unload them (enabling on-demand loading) you must call * g_type_module_unuse() on all the modules. Free the list * with g_list_free(). */ public static ListG loadAllInDirectory(string dirname) { auto p = g_io_modules_load_all_in_directory(Str.toStringz(dirname)); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Loads all the modules in the specified directory. * * If don't require all modules to be initialized (and thus registering * all gtypes) then you can use g_io_modules_scan_all_in_directory() * which allows delayed/lazy loading of modules. * * Params: * dirname = pathname for a directory containing modules * to load. * scop = a scope to use when scanning the modules. * * Returns: a list of #GIOModules loaded * from the directory, * All the modules are loaded into memory, if you want to * unload them (enabling on-demand loading) you must call * g_type_module_unuse() on all the modules. Free the list * with g_list_free(). * * Since: 2.30 */ public static ListG loadAllInDirectoryWithScope(string dirname, IOModuleScope scop) { auto p = g_io_modules_load_all_in_directory_with_scope(Str.toStringz(dirname), (scop is null) ? null : scop.getIOModuleScopeStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Scans all the modules in the specified directory, ensuring that * any extension point implemented by a module is registered. * * This may not actually load and initialize all the types in each * module, some modules may be lazily loaded and initialized when * an extension point it implementes is used with e.g. * g_io_extension_point_get_extensions() or * g_io_extension_point_get_extension_by_name(). * * If you need to guarantee that all types are loaded in all the modules, * use g_io_modules_load_all_in_directory(). * * Params: * dirname = pathname for a directory containing modules * to scan. * * Since: 2.24 */ public static void scanAllInDirectory(string dirname) { g_io_modules_scan_all_in_directory(Str.toStringz(dirname)); } /** * Scans all the modules in the specified directory, ensuring that * any extension point implemented by a module is registered. * * This may not actually load and initialize all the types in each * module, some modules may be lazily loaded and initialized when * an extension point it implementes is used with e.g. * g_io_extension_point_get_extensions() or * g_io_extension_point_get_extension_by_name(). * * If you need to guarantee that all types are loaded in all the modules, * use g_io_modules_load_all_in_directory(). * * Params: * dirname = pathname for a directory containing modules * to scan. * scop = a scope to use when scanning the modules * * Since: 2.30 */ public static void scanAllInDirectoryWithScope(string dirname, IOModuleScope scop) { g_io_modules_scan_all_in_directory_with_scope(Str.toStringz(dirname), (scop is null) ? null : scop.getIOModuleScopeStruct()); } } GtkD-3.7.5/generated/gtkd/gio/IOModuleScope.d000066400000000000000000000067161324604450400206540ustar00rootroot00000000000000/* * 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 gio.IOModuleScope; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Represents a scope for loading IO modules. A scope can be used for blocking * duplicate modules, or blocking a module you don't want to load. * * The scope can be used with g_io_modules_load_all_in_directory_with_scope() * or g_io_modules_scan_all_in_directory_with_scope(). * * Since: 2.30 */ public class IOModuleScope { /** the main Gtk struct */ protected GIOModuleScope* gIOModuleScope; protected bool ownedRef; /** Get the main Gtk struct */ public GIOModuleScope* getIOModuleScopeStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gIOModuleScope; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gIOModuleScope; } /** * Sets our main struct and passes it to the parent class. */ public this (GIOModuleScope* gIOModuleScope, bool ownedRef = false) { this.gIOModuleScope = gIOModuleScope; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_io_module_scope_free(gIOModuleScope); } /** * Block modules with the given @basename from being loaded when * this scope is used with g_io_modules_scan_all_in_directory_with_scope() * or g_io_modules_load_all_in_directory_with_scope(). * * Params: * basename = the basename to block * * Since: 2.30 */ public void block(string basename) { g_io_module_scope_block(gIOModuleScope, Str.toStringz(basename)); } /** * Free a module scope. * * Since: 2.30 */ public void free() { g_io_module_scope_free(gIOModuleScope); ownedRef = false; } /** * Create a new scope for loading of IO modules. A scope can be used for * blocking duplicate modules, or blocking a module you don't want to load. * * Specify the %G_IO_MODULE_SCOPE_BLOCK_DUPLICATES flag to block modules * which have the same base name as a module that has already been seen * in this scope. * * Params: * flags = flags for the new scope * * Returns: the new module scope * * Since: 2.30 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GIOModuleScopeFlags flags) { auto p = g_io_module_scope_new(flags); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GIOModuleScope*) p); } } GtkD-3.7.5/generated/gtkd/gio/IOSchedulerJob.d000066400000000000000000000114321324604450400207750ustar00rootroot00000000000000/* * 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 gio.IOSchedulerJob; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; public import gtkc.giotypes; /** * Opaque class for defining and scheduling IO jobs. */ public class IOSchedulerJob { /** the main Gtk struct */ protected GIOSchedulerJob* gIOSchedulerJob; protected bool ownedRef; /** Get the main Gtk struct */ public GIOSchedulerJob* getIOSchedulerJobStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gIOSchedulerJob; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gIOSchedulerJob; } /** * Sets our main struct and passes it to the parent class. */ public this (GIOSchedulerJob* gIOSchedulerJob, bool ownedRef = false) { this.gIOSchedulerJob = gIOSchedulerJob; this.ownedRef = ownedRef; } /** * Used from an I/O job to send a callback to be run in the thread * that the job was started from, waiting for the result (and thus * blocking the I/O job). * * Deprecated: Use g_main_context_invoke(). * * Params: * func = a #GSourceFunc callback that will be called in the original thread * userData = data to pass to @func * notify = a #GDestroyNotify for @user_data, or %NULL * * Returns: The return value of @func */ public bool sendToMainloop(GSourceFunc func, void* userData, GDestroyNotify notify) { return g_io_scheduler_job_send_to_mainloop(gIOSchedulerJob, func, userData, notify) != 0; } /** * Used from an I/O job to send a callback to be run asynchronously in * the thread that the job was started from. The callback will be run * when the main loop is available, but at that time the I/O job might * have finished. The return value from the callback is ignored. * * Note that if you are passing the @user_data from g_io_scheduler_push_job() * on to this function you have to ensure that it is not freed before * @func is called, either by passing %NULL as @notify to * g_io_scheduler_push_job() or by using refcounting for @user_data. * * Deprecated: Use g_main_context_invoke(). * * Params: * func = a #GSourceFunc callback that will be called in the original thread * userData = data to pass to @func * notify = a #GDestroyNotify for @user_data, or %NULL */ public void sendToMainloopAsync(GSourceFunc func, void* userData, GDestroyNotify notify) { g_io_scheduler_job_send_to_mainloop_async(gIOSchedulerJob, func, userData, notify); } /** * Cancels all cancellable I/O jobs. * * A job is cancellable if a #GCancellable was passed into * g_io_scheduler_push_job(). * * Deprecated: You should never call this function, since you don't * know how other libraries in your program might be making use of * gioscheduler. */ public static void cancelAllJobs() { g_io_scheduler_cancel_all_jobs(); } /** * Schedules the I/O job to run in another thread. * * @notify will be called on @user_data after @job_func has returned, * regardless whether the job was cancelled or has run to completion. * * If @cancellable is not %NULL, it can be used to cancel the I/O job * by calling g_cancellable_cancel() or by calling * g_io_scheduler_cancel_all_jobs(). * * Deprecated: use #GThreadPool or g_task_run_in_thread() * * Params: * jobFunc = a #GIOSchedulerJobFunc. * userData = data to pass to @job_func * notify = a #GDestroyNotify for @user_data, or %NULL * ioPriority = the [I/O priority][io-priority] * of the request. * cancellable = optional #GCancellable object, %NULL to ignore. */ public static void pushJob(GIOSchedulerJobFunc jobFunc, void* userData, GDestroyNotify notify, int ioPriority, Cancellable cancellable) { g_io_scheduler_push_job(jobFunc, userData, notify, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct()); } } GtkD-3.7.5/generated/gtkd/gio/IOStream.d000066400000000000000000000271511324604450400176640ustar00rootroot00000000000000/* * 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 gio.IOStream; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.InputStream; private import gio.OutputStream; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * GIOStream represents an object that has both read and write streams. * Generally the two streams act as separate input and output streams, * but they share some common resources and state. For instance, for * seekable streams, both streams may use the same position. * * Examples of #GIOStream objects are #GSocketConnection, which represents * a two-way network connection; and #GFileIOStream, which represents a * file handle opened in read-write mode. * * To do the actual reading and writing you need to get the substreams * with g_io_stream_get_input_stream() and g_io_stream_get_output_stream(). * * The #GIOStream object owns the input and the output streams, not the other * way around, so keeping the substreams alive will not keep the #GIOStream * object alive. If the #GIOStream object is freed it will be closed, thus * closing the substreams, so even if the substreams stay alive they will * always return %G_IO_ERROR_CLOSED for all operations. * * To close a stream use g_io_stream_close() which will close the common * stream object and also the individual substreams. You can also close * the substreams themselves. In most cases this only marks the * substream as closed, so further I/O on it fails but common state in the * #GIOStream may still be open. However, some streams may support * "half-closed" states where one direction of the stream is actually shut down. * * Operations on #GIOStreams cannot be started while another operation on the * #GIOStream or its substreams is in progress. Specifically, an application can * read from the #GInputStream and write to the #GOutputStream simultaneously * (either in separate threads, or as asynchronous operations in the same * thread), but an application cannot start any #GIOStream operation while there * is a #GIOStream, #GInputStream or #GOutputStream operation in progress, and * an application can’t start any #GInputStream or #GOutputStream operation * while there is a #GIOStream operation in progress. * * This is a product of individual stream operations being associated with a * given #GMainContext (the thread-default context at the time the operation was * started), rather than entire streams being associated with a single * #GMainContext. * * GIO may run operations on #GIOStreams from other (worker) threads, and this * may be exposed to application code in the behaviour of wrapper streams, such * as #GBufferedInputStream or #GTlsConnection. With such wrapper APIs, * application code may only run operations on the base (wrapped) stream when * the wrapper stream is idle. Note that the semantics of such operations may * not be well-defined due to the state the wrapper stream leaves the base * stream in (though they are guaranteed not to crash). */ public class IOStream : ObjectG { /** the main Gtk struct */ protected GIOStream* gIOStream; /** Get the main Gtk struct */ public GIOStream* getIOStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gIOStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gIOStream; } protected override void setStruct(GObject* obj) { gIOStream = cast(GIOStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GIOStream* gIOStream, bool ownedRef = false) { this.gIOStream = gIOStream; super(cast(GObject*)gIOStream, ownedRef); } /** */ public static GType getType() { return g_io_stream_get_type(); } /** * Finishes an asynchronous io stream splice operation. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE on success, %FALSE otherwise. * * Since: 2.28 * * Throws: GException on failure. */ public static bool spliceFinish(AsyncResultIF result) { GError* err = null; auto p = g_io_stream_splice_finish((result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Clears the pending flag on @stream. * * Since: 2.22 */ public void clearPending() { g_io_stream_clear_pending(gIOStream); } /** * Closes the stream, releasing resources related to it. This will also * close the individual input and output streams, if they are not already * closed. * * Once the stream is closed, all other operations will return * %G_IO_ERROR_CLOSED. Closing a stream multiple times will not * return an error. * * Closing a stream will automatically flush any outstanding buffers * in the stream. * * Streams will be automatically closed when the last reference * is dropped, but you might want to call this function to make sure * resources are released as early as possible. * * Some streams might keep the backing store of the stream (e.g. a file * descriptor) open after the stream is closed. See the documentation for * the individual stream for details. * * On failure the first error that happened will be reported, but the * close operation will finish as much as possible. A stream that failed * to close will still return %G_IO_ERROR_CLOSED for all operations. * Still, it is important to check and report the error to the user, * otherwise there might be a loss of data as all data might not be written. * * If @cancellable is not NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * Cancelling a close will still leave the stream closed, but some streams * can use a faster close that doesn't block to e.g. check errors. * * The default implementation of this method just calls close on the * individual input/output streams. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: %TRUE on success, %FALSE on failure * * Since: 2.22 * * Throws: GException on failure. */ public bool close(Cancellable cancellable) { GError* err = null; auto p = g_io_stream_close(gIOStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Requests an asynchronous close of the stream, releasing resources * related to it. When the operation is finished @callback will be * called. You can then call g_io_stream_close_finish() to get * the result of the operation. * * For behaviour details see g_io_stream_close(). * * The asynchronous methods have a default fallback that uses threads * to implement asynchronicity, so they are optional for inheriting * classes. However, if you override one you must override all. * * Params: * ioPriority = the io priority of the request * cancellable = optional cancellable object * callback = callback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.22 */ public void closeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_io_stream_close_async(gIOStream, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Closes a stream. * * Params: * result = a #GAsyncResult * * Returns: %TRUE if stream was successfully closed, %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool closeFinish(AsyncResultIF result) { GError* err = null; auto p = g_io_stream_close_finish(gIOStream, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the input stream for this object. This is used * for reading. * * Returns: a #GInputStream, owned by the #GIOStream. * Do not free. * * Since: 2.22 */ public InputStream getInputStream() { auto p = g_io_stream_get_input_stream(gIOStream); if(p is null) { return null; } return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p); } /** * Gets the output stream for this object. This is used for * writing. * * Returns: a #GOutputStream, owned by the #GIOStream. * Do not free. * * Since: 2.22 */ public OutputStream getOutputStream() { auto p = g_io_stream_get_output_stream(gIOStream); if(p is null) { return null; } return ObjectG.getDObject!(OutputStream)(cast(GOutputStream*) p); } /** * Checks if a stream has pending actions. * * Returns: %TRUE if @stream has pending actions. * * Since: 2.22 */ public bool hasPending() { return g_io_stream_has_pending(gIOStream) != 0; } /** * Checks if a stream is closed. * * Returns: %TRUE if the stream is closed. * * Since: 2.22 */ public bool isClosed() { return g_io_stream_is_closed(gIOStream) != 0; } /** * Sets @stream to have actions pending. If the pending flag is * already set or @stream is closed, it will return %FALSE and set * @error. * * Returns: %TRUE if pending was previously unset and is now set. * * Since: 2.22 * * Throws: GException on failure. */ public bool setPending() { GError* err = null; auto p = g_io_stream_set_pending(gIOStream, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asyncronously splice the output stream of @stream1 to the input stream of * @stream2, and splice the output stream of @stream2 to the input stream of * @stream1. * * When the operation is finished @callback will be called. * You can then call g_io_stream_splice_finish() to get the * result of the operation. * * Params: * stream2 = a #GIOStream. * flags = a set of #GIOStreamSpliceFlags. * ioPriority = the io priority of the request. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback. * userData = user data passed to @callback. * * Since: 2.28 */ public void spliceAsync(IOStream stream2, GIOStreamSpliceFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_io_stream_splice_async(gIOStream, (stream2 is null) ? null : stream2.getIOStreamStruct(), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } } GtkD-3.7.5/generated/gtkd/gio/IconIF.d000066400000000000000000000124311324604450400173030ustar00rootroot00000000000000/* * 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 gio.IconIF; private import gio.IconIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GIcon is a very minimal interface for icons. It provides functions * for checking the equality of two icons, hashing of icons and * serializing an icon to and from strings. * * #GIcon does not provide the actual pixmap for the icon as this is out * of GIO's scope, however implementations of #GIcon may contain the name * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon). * * To obtain a hash of a #GIcon, see g_icon_hash(). * * To check if two #GIcons are equal, see g_icon_equal(). * * For serializing a #GIcon, use g_icon_serialize() and * g_icon_deserialize(). * * If you want to consume #GIcon (for example, in a toolkit) you must * be prepared to handle at least the three following cases: * #GLoadableIcon, #GThemedIcon and #GEmblemedIcon. It may also make * sense to have fast-paths for other cases (like handling #GdkPixbuf * directly, for example) but all compliant #GIcon implementations * outside of GIO must implement #GLoadableIcon. * * If your application or library provides one or more #GIcon * implementations you need to ensure that your new implementation also * implements #GLoadableIcon. Additionally, you must provide an * implementation of g_icon_serialize() that gives a result that is * understood by g_icon_deserialize(), yielding one of the built-in icon * types. */ public interface IconIF{ /** Get the main Gtk struct */ public GIcon* getIconStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_icon_get_type(); } /** * Deserializes a #GIcon previously serialized using g_icon_serialize(). * * Params: * value = a #GVariant created with g_icon_serialize() * * Returns: a #GIcon, or %NULL when deserialization fails. * * Since: 2.38 */ public static IconIF deserialize(Variant value) { auto p = g_icon_deserialize((value is null) ? null : value.getVariantStruct()); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Gets a hash for an icon. * * Params: * icon = #gconstpointer to an icon object. * * Returns: a #guint containing a hash for the @icon, suitable for * use in a #GHashTable or similar data structure. */ public static uint hash(void* icon) { return g_icon_hash(icon); } /** * Checks if two icons are equal. * * Params: * icon2 = pointer to the second #GIcon. * * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise. */ public bool equal(IconIF icon2); /** * Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved * back by calling g_icon_deserialize() on the returned value. * As serialization will avoid using raw icon data when possible, it only * makes sense to transfer the #GVariant between processes on the same machine, * (as opposed to over the network), and within the same file system namespace. * * Returns: a #GVariant, or %NULL when serialization fails. * * Since: 2.38 */ public Variant serialize(); /** * Generates a textual representation of @icon that can be used for * serialization such as when passing @icon to a different process or * saving it to persistent storage. Use g_icon_new_for_string() to * get @icon back from the returned string. * * The encoding of the returned string is proprietary to #GIcon except * in the following two cases * * - If @icon is a #GFileIcon, the returned string is a native path * (such as `/path/to/my icon.png`) without escaping * if the #GFile for @icon is a native file. If the file is not * native, the returned string is the result of g_file_get_uri() * (such as `sftp://path/to/my%20icon.png`). * * - If @icon is a #GThemedIcon with exactly one name, the encoding is * simply the name (such as `network-server`). * * Returns: An allocated NUL-terminated UTF8 string or * %NULL if @icon can't be serialized. Use g_free() to free. * * Since: 2.20 */ public string toString(); } GtkD-3.7.5/generated/gtkd/gio/IconT.d000066400000000000000000000115061324604450400172120ustar00rootroot00000000000000/* * 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 gio.IconT; public import gio.IconIF; public import gio.c.functions; public import gio.c.types; public import glib.ConstructionException; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import glib.Variant; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GIcon is a very minimal interface for icons. It provides functions * for checking the equality of two icons, hashing of icons and * serializing an icon to and from strings. * * #GIcon does not provide the actual pixmap for the icon as this is out * of GIO's scope, however implementations of #GIcon may contain the name * of an icon (see #GThemedIcon), or the path to an icon (see #GLoadableIcon). * * To obtain a hash of a #GIcon, see g_icon_hash(). * * To check if two #GIcons are equal, see g_icon_equal(). * * For serializing a #GIcon, use g_icon_serialize() and * g_icon_deserialize(). * * If you want to consume #GIcon (for example, in a toolkit) you must * be prepared to handle at least the three following cases: * #GLoadableIcon, #GThemedIcon and #GEmblemedIcon. It may also make * sense to have fast-paths for other cases (like handling #GdkPixbuf * directly, for example) but all compliant #GIcon implementations * outside of GIO must implement #GLoadableIcon. * * If your application or library provides one or more #GIcon * implementations you need to ensure that your new implementation also * implements #GLoadableIcon. Additionally, you must provide an * implementation of g_icon_serialize() that gives a result that is * understood by g_icon_deserialize(), yielding one of the built-in icon * types. */ public template IconT(TStruct) { /** Get the main Gtk struct */ public GIcon* getIconStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GIcon*)getStruct(); } /** * Checks if two icons are equal. * * Params: * icon2 = pointer to the second #GIcon. * * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise. */ public bool equal(IconIF icon2) { return g_icon_equal(getIconStruct(), (icon2 is null) ? null : icon2.getIconStruct()) != 0; } /** * Serializes a #GIcon into a #GVariant. An equivalent #GIcon can be retrieved * back by calling g_icon_deserialize() on the returned value. * As serialization will avoid using raw icon data when possible, it only * makes sense to transfer the #GVariant between processes on the same machine, * (as opposed to over the network), and within the same file system namespace. * * Returns: a #GVariant, or %NULL when serialization fails. * * Since: 2.38 */ public Variant serialize() { auto p = g_icon_serialize(getIconStruct()); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Generates a textual representation of @icon that can be used for * serialization such as when passing @icon to a different process or * saving it to persistent storage. Use g_icon_new_for_string() to * get @icon back from the returned string. * * The encoding of the returned string is proprietary to #GIcon except * in the following two cases * * - If @icon is a #GFileIcon, the returned string is a native path * (such as `/path/to/my icon.png`) without escaping * if the #GFile for @icon is a native file. If the file is not * native, the returned string is the result of g_file_get_uri() * (such as `sftp://path/to/my%20icon.png`). * * - If @icon is a #GThemedIcon with exactly one name, the encoding is * simply the name (such as `network-server`). * * Returns: An allocated NUL-terminated UTF8 string or * %NULL if @icon can't be serialized. Use g_free() to free. * * Since: 2.20 */ public override string toString() { auto retStr = g_icon_to_string(getIconStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/gio/InetAddress.d000066400000000000000000000215631324604450400204070ustar00rootroot00000000000000/* * 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 gio.InetAddress; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GInetAddress represents an IPv4 or IPv6 internet address. Use * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_async() to * look up the #GInetAddress for a hostname. Use * g_resolver_lookup_by_address() or * g_resolver_lookup_by_address_async() to look up the hostname for a * #GInetAddress. * * To actually connect to a remote host, you will need a * #GInetSocketAddress (which includes a #GInetAddress as well as a * port number). */ public class InetAddress : ObjectG { /** the main Gtk struct */ protected GInetAddress* gInetAddress; /** Get the main Gtk struct */ public GInetAddress* getInetAddressStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gInetAddress; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gInetAddress; } protected override void setStruct(GObject* obj) { gInetAddress = cast(GInetAddress*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GInetAddress* gInetAddress, bool ownedRef = false) { this.gInetAddress = gInetAddress; super(cast(GObject*)gInetAddress, ownedRef); } /** * Creates a InetAddress for the "any" address (unassigned/"don't * care") for family. * * Params: * family = the address family * loopback = If true create an InetAddress for the loopback address. * * Throws: ConstructionException GTK+ fails to create the object. * * Since: 2.22 */ public this (GSocketFamily family, bool loopback = false) { GInetAddress* p; if ( loopback ) { p = g_inet_address_new_loopback(family); } else { p = g_inet_address_new_any(family); } if(p is null) { throw new ConstructionException("null returned by g_inet_address_new_any(family)"); } this(p, true); } /** */ /** */ public static GType getType() { return g_inet_address_get_type(); } /** * Creates a new #GInetAddress from the given @family and @bytes. * @bytes should be 4 bytes for %G_SOCKET_FAMILY_IPV4 and 16 bytes for * %G_SOCKET_FAMILY_IPV6. * * Params: * bytes = raw address data * family = the address family of @bytes * * Returns: a new #GInetAddress corresponding to @family and @bytes. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] bytes, GSocketFamily family) { auto p = g_inet_address_new_from_bytes(bytes.ptr, family); if(p is null) { throw new ConstructionException("null returned by new_from_bytes"); } this(cast(GInetAddress*) p, true); } /** * Parses @string as an IP address and creates a new #GInetAddress. * * Params: * str = a string representation of an IP address * * Returns: a new #GInetAddress corresponding to @string, or %NULL if * @string could not be parsed. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string str) { auto p = g_inet_address_new_from_string(Str.toStringz(str)); if(p is null) { throw new ConstructionException("null returned by new_from_string"); } this(cast(GInetAddress*) p, true); } /** * Checks if two #GInetAddress instances are equal, e.g. the same address. * * Params: * otherAddress = Another #GInetAddress. * * Returns: %TRUE if @address and @other_address are equal, %FALSE otherwise. * * Since: 2.30 */ public bool equal(InetAddress otherAddress) { return g_inet_address_equal(gInetAddress, (otherAddress is null) ? null : otherAddress.getInetAddressStruct()) != 0; } /** * Gets @address's family * * Returns: @address's family * * Since: 2.22 */ public GSocketFamily getFamily() { return g_inet_address_get_family(gInetAddress); } /** * Tests whether @address is the "any" address for its family. * * Returns: %TRUE if @address is the "any" address for its family. * * Since: 2.22 */ public bool getIsAny() { return g_inet_address_get_is_any(gInetAddress) != 0; } /** * Tests whether @address is a link-local address (that is, if it * identifies a host on a local network that is not connected to the * Internet). * * Returns: %TRUE if @address is a link-local address. * * Since: 2.22 */ public bool getIsLinkLocal() { return g_inet_address_get_is_link_local(gInetAddress) != 0; } /** * Tests whether @address is the loopback address for its family. * * Returns: %TRUE if @address is the loopback address for its family. * * Since: 2.22 */ public bool getIsLoopback() { return g_inet_address_get_is_loopback(gInetAddress) != 0; } /** * Tests whether @address is a global multicast address. * * Returns: %TRUE if @address is a global multicast address. * * Since: 2.22 */ public bool getIsMcGlobal() { return g_inet_address_get_is_mc_global(gInetAddress) != 0; } /** * Tests whether @address is a link-local multicast address. * * Returns: %TRUE if @address is a link-local multicast address. * * Since: 2.22 */ public bool getIsMcLinkLocal() { return g_inet_address_get_is_mc_link_local(gInetAddress) != 0; } /** * Tests whether @address is a node-local multicast address. * * Returns: %TRUE if @address is a node-local multicast address. * * Since: 2.22 */ public bool getIsMcNodeLocal() { return g_inet_address_get_is_mc_node_local(gInetAddress) != 0; } /** * Tests whether @address is an organization-local multicast address. * * Returns: %TRUE if @address is an organization-local multicast address. * * Since: 2.22 */ public bool getIsMcOrgLocal() { return g_inet_address_get_is_mc_org_local(gInetAddress) != 0; } /** * Tests whether @address is a site-local multicast address. * * Returns: %TRUE if @address is a site-local multicast address. * * Since: 2.22 */ public bool getIsMcSiteLocal() { return g_inet_address_get_is_mc_site_local(gInetAddress) != 0; } /** * Tests whether @address is a multicast address. * * Returns: %TRUE if @address is a multicast address. * * Since: 2.22 */ public bool getIsMulticast() { return g_inet_address_get_is_multicast(gInetAddress) != 0; } /** * Tests whether @address is a site-local address such as 10.0.0.1 * (that is, the address identifies a host on a local network that can * not be reached directly from the Internet, but which may have * outgoing Internet connectivity via a NAT or firewall). * * Returns: %TRUE if @address is a site-local address. * * Since: 2.22 */ public bool getIsSiteLocal() { return g_inet_address_get_is_site_local(gInetAddress) != 0; } /** * Gets the size of the native raw binary address for @address. This * is the size of the data that you get from g_inet_address_to_bytes(). * * Returns: the number of bytes used for the native version of @address. * * Since: 2.22 */ public size_t getNativeSize() { return g_inet_address_get_native_size(gInetAddress); } /** * Gets the raw binary address data from @address. * * Returns: a pointer to an internal array of the bytes in @address, * which should not be modified, stored, or freed. The size of this * array can be gotten with g_inet_address_get_native_size(). * * Since: 2.22 */ public ubyte* toBytes() { return g_inet_address_to_bytes(gInetAddress); } /** * Converts @address to string form. * * Returns: a representation of @address as a string, which should be * freed after use. * * Since: 2.22 */ public override string toString() { auto retStr = g_inet_address_to_string(gInetAddress); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/gio/InetAddressMask.d000066400000000000000000000137101324604450400212160ustar00rootroot00000000000000/* * 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 gio.InetAddressMask; private import gio.InetAddress; private import gio.InitableIF; private import gio.InitableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GInetAddressMask represents a range of IPv4 or IPv6 addresses * described by a base address and a length indicating how many bits * of the base address are relevant for matching purposes. These are * often given in string form. Eg, "10.0.0.0/8", or "fe80::/10". * * Since: 2.32 */ public class InetAddressMask : ObjectG, InitableIF { /** the main Gtk struct */ protected GInetAddressMask* gInetAddressMask; /** Get the main Gtk struct */ public GInetAddressMask* getInetAddressMaskStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gInetAddressMask; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gInetAddressMask; } protected override void setStruct(GObject* obj) { gInetAddressMask = cast(GInetAddressMask*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GInetAddressMask* gInetAddressMask, bool ownedRef = false) { this.gInetAddressMask = gInetAddressMask; super(cast(GObject*)gInetAddressMask, ownedRef); } // add the Initable capabilities mixin InitableT!(GInetAddressMask); /** */ public static GType getType() { return g_inet_address_mask_get_type(); } /** * Creates a new #GInetAddressMask representing all addresses whose * first @length bits match @addr. * * Params: * addr = a #GInetAddress * length = number of bits of @addr to use * * Returns: a new #GInetAddressMask, or %NULL on error * * Since: 2.32 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(InetAddress addr, uint length) { GError* err = null; auto p = g_inet_address_mask_new((addr is null) ? null : addr.getInetAddressStruct(), length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GInetAddressMask*) p, true); } /** * Parses @mask_string as an IP address and (optional) length, and * creates a new #GInetAddressMask. The length, if present, is * delimited by a "/". If it is not present, then the length is * assumed to be the full length of the address. * * Params: * maskString = an IP address or address/length string * * Returns: a new #GInetAddressMask corresponding to @string, or %NULL * on error. * * Since: 2.32 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string maskString) { GError* err = null; auto p = g_inet_address_mask_new_from_string(Str.toStringz(maskString), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_string"); } this(cast(GInetAddressMask*) p, true); } /** * Tests if @mask and @mask2 are the same mask. * * Params: * mask2 = another #GInetAddressMask * * Returns: whether @mask and @mask2 are the same mask * * Since: 2.32 */ public bool equal(InetAddressMask mask2) { return g_inet_address_mask_equal(gInetAddressMask, (mask2 is null) ? null : mask2.getInetAddressMaskStruct()) != 0; } /** * Gets @mask's base address * * Returns: @mask's base address * * Since: 2.32 */ public InetAddress getAddress() { auto p = g_inet_address_mask_get_address(gInetAddressMask); if(p is null) { return null; } return ObjectG.getDObject!(InetAddress)(cast(GInetAddress*) p); } /** * Gets the #GSocketFamily of @mask's address * * Returns: the #GSocketFamily of @mask's address * * Since: 2.32 */ public GSocketFamily getFamily() { return g_inet_address_mask_get_family(gInetAddressMask); } /** * Gets @mask's length * * Returns: @mask's length * * Since: 2.32 */ public uint getLength() { return g_inet_address_mask_get_length(gInetAddressMask); } /** * Tests if @address falls within the range described by @mask. * * Params: * address = a #GInetAddress * * Returns: whether @address falls within the range described by * @mask. * * Since: 2.32 */ public bool matches(InetAddress address) { return g_inet_address_mask_matches(gInetAddressMask, (address is null) ? null : address.getInetAddressStruct()) != 0; } /** * Converts @mask back to its corresponding string form. * * Returns: a string corresponding to @mask. * * Since: 2.32 */ public override string toString() { auto retStr = g_inet_address_mask_to_string(gInetAddressMask); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/gio/InetSocketAddress.d000066400000000000000000000111061324604450400215500ustar00rootroot00000000000000/* * 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 gio.InetSocketAddress; private import gio.InetAddress; private import gio.SocketAddress; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * An IPv4 or IPv6 socket address; that is, the combination of a * #GInetAddress and a port number. */ public class InetSocketAddress : SocketAddress { /** the main Gtk struct */ protected GInetSocketAddress* gInetSocketAddress; /** Get the main Gtk struct */ public GInetSocketAddress* getInetSocketAddressStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gInetSocketAddress; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gInetSocketAddress; } protected override void setStruct(GObject* obj) { gInetSocketAddress = cast(GInetSocketAddress*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GInetSocketAddress* gInetSocketAddress, bool ownedRef = false) { this.gInetSocketAddress = gInetSocketAddress; super(cast(GSocketAddress*)gInetSocketAddress, ownedRef); } /** */ public static GType getType() { return g_inet_socket_address_get_type(); } /** * Creates a new #GInetSocketAddress for @address and @port. * * Params: * address = a #GInetAddress * port = a port number * * Returns: a new #GInetSocketAddress * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(InetAddress address, ushort port) { auto p = g_inet_socket_address_new((address is null) ? null : address.getInetAddressStruct(), port); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GInetSocketAddress*) p, true); } /** * Creates a new #GInetSocketAddress for @address and @port. * * If @address is an IPv6 address, it can also contain a scope ID * (separated from the address by a `%`). * * Params: * address = the string form of an IP address * port = a port number * * Returns: a new #GInetSocketAddress, or %NULL if @address cannot be * parsed. * * Since: 2.40 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string address, uint port) { auto p = g_inet_socket_address_new_from_string(Str.toStringz(address), port); if(p is null) { throw new ConstructionException("null returned by new_from_string"); } this(cast(GInetSocketAddress*) p, true); } /** * Gets @address's #GInetAddress. * * Returns: the #GInetAddress for @address, which must be * g_object_ref()'d if it will be stored * * Since: 2.22 */ public InetAddress getAddress() { auto p = g_inet_socket_address_get_address(gInetSocketAddress); if(p is null) { return null; } return ObjectG.getDObject!(InetAddress)(cast(GInetAddress*) p); } /** * Gets the `sin6_flowinfo` field from @address, * which must be an IPv6 address. * * Returns: the flowinfo field * * Since: 2.32 */ public uint getFlowinfo() { return g_inet_socket_address_get_flowinfo(gInetSocketAddress); } /** * Gets @address's port. * * Returns: the port for @address * * Since: 2.22 */ public ushort getPort() { return g_inet_socket_address_get_port(gInetSocketAddress); } /** * Gets the `sin6_scope_id` field from @address, * which must be an IPv6 address. * * Returns: the scope id field * * Since: 2.32 */ public uint getScopeId() { return g_inet_socket_address_get_scope_id(gInetSocketAddress); } } GtkD-3.7.5/generated/gtkd/gio/InitableIF.d000066400000000000000000000124621324604450400201460ustar00rootroot00000000000000/* * 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 gio.InitableIF; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GInitable is implemented by objects that can fail during * initialization. If an object implements this interface then * it must be initialized as the first thing after construction, * either via g_initable_init() or g_async_initable_init_async() * (the latter is only available if it also implements #GAsyncInitable). * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except g_object_ref() and * g_object_unref() are considered to be invalid, and have undefined * behaviour. They will often fail with g_critical() or g_warning(), but * this must not be relied on. * * Users of objects implementing this are not intended to use * the interface method directly, instead it will be used automatically * in various ways. For C applications you generally just call * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper. * This will call g_initable_init() under the cover, returning %NULL and * setting a #GError on failure (at which point the instance is * unreferenced). * * For bindings in languages where the native constructor supports * exceptions the binding could check for objects implemention %GInitable * during normal construction and automatically initialize them, throwing * an exception on failure. * * Since: 2.22 */ public interface InitableIF{ /** Get the main Gtk struct */ public GInitable* getInitableStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_initable_get_type(); } /** * Initializes the object implementing the interface. * * This method is intended for language bindings. If writing in C, * g_initable_new() should typically be used instead. * * The object must be initialized before any real use after initial * construction, either with this function or g_async_initable_init_async(). * * Implementations may also support cancellation. If @cancellable is not %NULL, * then initialization can be cancelled by triggering the cancellable object * from another thread. If the operation was cancelled, the error * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and * the object doesn't support cancellable initialization the error * %G_IO_ERROR_NOT_SUPPORTED will be returned. * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except g_object_ref() and * g_object_unref() are considered to be invalid, and have undefined * behaviour. See the [introduction][ginitable] for more details. * * Callers should not assume that a class which implements #GInitable can be * initialized multiple times, unless the class explicitly documents itself as * supporting this. Generally, a class’ implementation of init() can assume * (and assert) that it will only be called once. Previously, this documentation * recommended all #GInitable implementations should be idempotent; that * recommendation was relaxed in GLib 2.54. * * If a class explicitly supports being initialized multiple times, it is * recommended that the method is idempotent: multiple calls with the same * arguments should return the same results. Only the first call initializes * the object; further calls return the result of the first call. * * One reason why a class might need to support idempotent initialization is if * it is designed to be used via the singleton pattern, with a * #GObjectClass.constructor that sometimes returns an existing instance. * In this pattern, a caller would expect to be able to call g_initable_init() * on the result of g_object_new(), regardless of whether it is in fact a new * instance. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if successful. If an error has occurred, this function will * return %FALSE and set @error appropriately if present. * * Since: 2.22 * * Throws: GException on failure. */ public bool init(Cancellable cancellable); } GtkD-3.7.5/generated/gtkd/gio/InitableT.d000066400000000000000000000127571324604450400200620ustar00rootroot00000000000000/* * 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 gio.InitableT; public import gio.Cancellable; public import gio.c.functions; public import gio.c.types; public import glib.ConstructionException; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GInitable is implemented by objects that can fail during * initialization. If an object implements this interface then * it must be initialized as the first thing after construction, * either via g_initable_init() or g_async_initable_init_async() * (the latter is only available if it also implements #GAsyncInitable). * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except g_object_ref() and * g_object_unref() are considered to be invalid, and have undefined * behaviour. They will often fail with g_critical() or g_warning(), but * this must not be relied on. * * Users of objects implementing this are not intended to use * the interface method directly, instead it will be used automatically * in various ways. For C applications you generally just call * g_initable_new() directly, or indirectly via a foo_thing_new() wrapper. * This will call g_initable_init() under the cover, returning %NULL and * setting a #GError on failure (at which point the instance is * unreferenced). * * For bindings in languages where the native constructor supports * exceptions the binding could check for objects implemention %GInitable * during normal construction and automatically initialize them, throwing * an exception on failure. * * Since: 2.22 */ public template InitableT(TStruct) { /** Get the main Gtk struct */ public GInitable* getInitableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GInitable*)getStruct(); } /** * Initializes the object implementing the interface. * * This method is intended for language bindings. If writing in C, * g_initable_new() should typically be used instead. * * The object must be initialized before any real use after initial * construction, either with this function or g_async_initable_init_async(). * * Implementations may also support cancellation. If @cancellable is not %NULL, * then initialization can be cancelled by triggering the cancellable object * from another thread. If the operation was cancelled, the error * %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and * the object doesn't support cancellable initialization the error * %G_IO_ERROR_NOT_SUPPORTED will be returned. * * If the object is not initialized, or initialization returns with an * error, then all operations on the object except g_object_ref() and * g_object_unref() are considered to be invalid, and have undefined * behaviour. See the [introduction][ginitable] for more details. * * Callers should not assume that a class which implements #GInitable can be * initialized multiple times, unless the class explicitly documents itself as * supporting this. Generally, a class’ implementation of init() can assume * (and assert) that it will only be called once. Previously, this documentation * recommended all #GInitable implementations should be idempotent; that * recommendation was relaxed in GLib 2.54. * * If a class explicitly supports being initialized multiple times, it is * recommended that the method is idempotent: multiple calls with the same * arguments should return the same results. Only the first call initializes * the object; further calls return the result of the first call. * * One reason why a class might need to support idempotent initialization is if * it is designed to be used via the singleton pattern, with a * #GObjectClass.constructor that sometimes returns an existing instance. * In this pattern, a caller would expect to be able to call g_initable_init() * on the result of g_object_new(), regardless of whether it is in fact a new * instance. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if successful. If an error has occurred, this function will * return %FALSE and set @error appropriately if present. * * Since: 2.22 * * Throws: GException on failure. */ public bool init(Cancellable cancellable) { GError* err = null; auto p = g_initable_init(getInitableStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/InputStream.d000066400000000000000000000547531324604450400204640ustar00rootroot00000000000000/* * 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 gio.InputStream; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.Bytes; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GInputStream has functions to read from a stream (g_input_stream_read()), * to close a stream (g_input_stream_close()) and to skip some content * (g_input_stream_skip()). * * To copy the content of an input stream to an output stream without * manually handling the reads and writes, use g_output_stream_splice(). * * See the documentation for #GIOStream for details of thread safety of * streaming APIs. * * All of these functions have async variants too. */ public class InputStream : ObjectG { /** the main Gtk struct */ protected GInputStream* gInputStream; /** Get the main Gtk struct */ public GInputStream* getInputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gInputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gInputStream; } protected override void setStruct(GObject* obj) { gInputStream = cast(GInputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GInputStream* gInputStream, bool ownedRef = false) { this.gInputStream = gInputStream; super(cast(GObject*)gInputStream, ownedRef); } /** */ public static GType getType() { return g_input_stream_get_type(); } /** * Clears the pending flag on @stream. */ public void clearPending() { g_input_stream_clear_pending(gInputStream); } /** * Closes the stream, releasing resources related to it. * * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED. * Closing a stream multiple times will not return an error. * * Streams will be automatically closed when the last reference * is dropped, but you might want to call this function to make sure * resources are released as early as possible. * * Some streams might keep the backing store of the stream (e.g. a file descriptor) * open after the stream is closed. See the documentation for the individual * stream for details. * * On failure the first error that happened will be reported, but the close * operation will finish as much as possible. A stream that failed to * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it * is important to check and report the error to the user. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * Cancelling a close will still leave the stream closed, but some streams * can use a faster close that doesn't block to e.g. check errors. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE on success, %FALSE on failure * * Throws: GException on failure. */ public bool close(Cancellable cancellable) { GError* err = null; auto p = g_input_stream_close(gInputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Requests an asynchronous closes of the stream, releasing resources related to it. * When the operation is finished @callback will be called. * You can then call g_input_stream_close_finish() to get the result of the * operation. * * For behaviour details see g_input_stream_close(). * * The asynchronous methods have a default fallback that uses threads to implement * asynchronicity, so they are optional for inheriting classes. However, if you * override one you must override all. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional cancellable object * callback = callback to call when the request is satisfied * userData = the data to pass to callback function */ public void closeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_input_stream_close_async(gInputStream, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes closing a stream asynchronously, started from g_input_stream_close_async(). * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the stream was closed successfully. * * Throws: GException on failure. */ public bool closeFinish(AsyncResultIF result) { GError* err = null; auto p = g_input_stream_close_finish(gInputStream, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks if an input stream has pending actions. * * Returns: %TRUE if @stream has pending actions. */ public bool hasPending() { return g_input_stream_has_pending(gInputStream) != 0; } /** * Checks if an input stream is closed. * * Returns: %TRUE if the stream is closed. */ public bool isClosed() { return g_input_stream_is_closed(gInputStream) != 0; } /** * Tries to read @count bytes from the stream into the buffer starting at * @buffer. Will block during this read. * * If count is zero returns zero and does nothing. A value of @count * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. * * On success, the number of bytes read into the buffer is returned. * It is not an error if this is not the same as the requested size, as it * can happen e.g. near the end of a file. Zero is returned on end of file * (or if @count is zero), but never otherwise. * * The returned @buffer is not a nul-terminated string, it can contain nul bytes * at any position, and this function doesn't nul-terminate the @buffer. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an * operation was partially finished when the operation was cancelled the * partial result will be returned, without an error. * * On error -1 is returned and @error is set accordingly. * * Params: * buffer = a buffer to * read data into (which should be at least count bytes long). * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: Number of bytes read, or -1 on error, or 0 on end of file. * * Throws: GException on failure. */ public ptrdiff_t read(ubyte[] buffer, Cancellable cancellable) { GError* err = null; auto p = g_input_stream_read(gInputStream, buffer.ptr, cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Tries to read @count bytes from the stream into the buffer starting at * @buffer. Will block during this read. * * This function is similar to g_input_stream_read(), except it tries to * read as many bytes as requested, only stopping on an error or end of stream. * * On a successful read of @count bytes, or if we reached the end of the * stream, %TRUE is returned, and @bytes_read is set to the number of bytes * read into @buffer. * * If there is an error during the operation %FALSE is returned and @error * is set to indicate the error status. * * As a special exception to the normal conventions for functions that * use #GError, if this function returns %FALSE (and sets @error) then * @bytes_read will be set to the number of bytes that were successfully * read before the error was encountered. This functionality is only * available from C. If you need it from another language then you must * write your own loop around g_input_stream_read(). * * Params: * buffer = a buffer to * read data into (which should be at least count bytes long). * bytesRead = location to store the number of bytes that was read from the stream * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE on success, %FALSE if there was an error * * Throws: GException on failure. */ public bool readAll(ubyte[] buffer, out size_t bytesRead, Cancellable cancellable) { GError* err = null; auto p = g_input_stream_read_all(gInputStream, buffer.ptr, cast(size_t)buffer.length, &bytesRead, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Request an asynchronous read of @count bytes from the stream into the * buffer starting at @buffer. * * This is the asynchronous equivalent of g_input_stream_read_all(). * * Call g_input_stream_read_all_finish() to collect the result. * * Any outstanding I/O request with higher priority (lower numerical * value) will be executed before an outstanding request with lower * priority. Default priority is %G_PRIORITY_DEFAULT. * * Params: * buffer = a buffer to * read data into (which should be at least count bytes long) * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, %NULL to ignore * callback = callback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.44 */ public void readAllAsync(ubyte[] buffer, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_input_stream_read_all_async(gInputStream, buffer.ptr, cast(size_t)buffer.length, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous stream read operation started with * g_input_stream_read_all_async(). * * As a special exception to the normal conventions for functions that * use #GError, if this function returns %FALSE (and sets @error) then * @bytes_read will be set to the number of bytes that were successfully * read before the error was encountered. This functionality is only * available from C. If you need it from another language then you must * write your own loop around g_input_stream_read_async(). * * Params: * result = a #GAsyncResult * bytesRead = location to store the number of bytes that was read from the stream * * Returns: %TRUE on success, %FALSE if there was an error * * Since: 2.44 * * Throws: GException on failure. */ public bool readAllFinish(AsyncResultIF result, out size_t bytesRead) { GError* err = null; auto p = g_input_stream_read_all_finish(gInputStream, (result is null) ? null : result.getAsyncResultStruct(), &bytesRead, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Request an asynchronous read of @count bytes from the stream into the buffer * starting at @buffer. When the operation is finished @callback will be called. * You can then call g_input_stream_read_finish() to get the result of the * operation. * * During an async request no other sync and async calls are allowed on @stream, and will * result in %G_IO_ERROR_PENDING errors. * * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. * * On success, the number of bytes read into the buffer will be passed to the * callback. It is not an error if this is not the same as the requested size, as it * can happen e.g. near the end of a file, but generally we try to read * as many bytes as requested. Zero is returned on end of file * (or if @count is zero), but never otherwise. * * Any outstanding i/o request with higher priority (lower numerical value) will * be executed before an outstanding request with lower priority. Default * priority is %G_PRIORITY_DEFAULT. * * The asynchronous methods have a default fallback that uses threads to implement * asynchronicity, so they are optional for inheriting classes. However, if you * override one you must override all. * * Params: * buffer = a buffer to * read data into (which should be at least count bytes long). * ioPriority = the [I/O priority][io-priority] * of the request. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied * userData = the data to pass to callback function */ public void readAsync(ubyte[] buffer, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_input_stream_read_async(gInputStream, buffer.ptr, cast(size_t)buffer.length, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Like g_input_stream_read(), this tries to read @count bytes from * the stream in a blocking fashion. However, rather than reading into * a user-supplied buffer, this will create a new #GBytes containing * the data that was read. This may be easier to use from language * bindings. * * If count is zero, returns a zero-length #GBytes and does nothing. A * value of @count larger than %G_MAXSSIZE will cause a * %G_IO_ERROR_INVALID_ARGUMENT error. * * On success, a new #GBytes is returned. It is not an error if the * size of this object is not the same as the requested size, as it * can happen e.g. near the end of a file. A zero-length #GBytes is * returned on end of file (or if @count is zero), but never * otherwise. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an * operation was partially finished when the operation was cancelled the * partial result will be returned, without an error. * * On error %NULL is returned and @error is set accordingly. * * Params: * count = maximum number of bytes that will be read from the stream. Common * values include 4096 and 8192. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a new #GBytes, or %NULL on error * * Since: 2.34 * * Throws: GException on failure. */ public Bytes readBytes(size_t count, Cancellable cancellable) { GError* err = null; auto p = g_input_stream_read_bytes(gInputStream, count, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Request an asynchronous read of @count bytes from the stream into a * new #GBytes. When the operation is finished @callback will be * called. You can then call g_input_stream_read_bytes_finish() to get the * result of the operation. * * During an async request no other sync and async calls are allowed * on @stream, and will result in %G_IO_ERROR_PENDING errors. * * A value of @count larger than %G_MAXSSIZE will cause a * %G_IO_ERROR_INVALID_ARGUMENT error. * * On success, the new #GBytes will be passed to the callback. It is * not an error if this is smaller than the requested size, as it can * happen e.g. near the end of a file, but generally we try to read as * many bytes as requested. Zero is returned on end of file (or if * @count is zero), but never otherwise. * * Any outstanding I/O request with higher priority (lower numerical * value) will be executed before an outstanding request with lower * priority. Default priority is %G_PRIORITY_DEFAULT. * * Params: * count = the number of bytes that will be read from the stream * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.34 */ public void readBytesAsync(size_t count, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_input_stream_read_bytes_async(gInputStream, count, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous stream read-into-#GBytes operation. * * Params: * result = a #GAsyncResult. * * Returns: the newly-allocated #GBytes, or %NULL on error * * Since: 2.34 * * Throws: GException on failure. */ public Bytes readBytesFinish(AsyncResultIF result) { GError* err = null; auto p = g_input_stream_read_bytes_finish(gInputStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Finishes an asynchronous stream read operation. * * Params: * result = a #GAsyncResult. * * Returns: number of bytes read in, or -1 on error, or 0 on end of file. * * Throws: GException on failure. */ public ptrdiff_t readFinish(AsyncResultIF result) { GError* err = null; auto p = g_input_stream_read_finish(gInputStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets @stream to have actions pending. If the pending flag is * already set or @stream is closed, it will return %FALSE and set * @error. * * Returns: %TRUE if pending was previously unset and is now set. * * Throws: GException on failure. */ public bool setPending() { GError* err = null; auto p = g_input_stream_set_pending(gInputStream, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Tries to skip @count bytes from the stream. Will block during the operation. * * This is identical to g_input_stream_read(), from a behaviour standpoint, * but the bytes that are skipped are not returned to the user. Some * streams have an implementation that is more efficient than reading the data. * * This function is optional for inherited classes, as the default implementation * emulates it using read. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an * operation was partially finished when the operation was cancelled the * partial result will be returned, without an error. * * Params: * count = the number of bytes that will be skipped from the stream * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: Number of bytes skipped, or -1 on error * * Throws: GException on failure. */ public ptrdiff_t skip(size_t count, Cancellable cancellable) { GError* err = null; auto p = g_input_stream_skip(gInputStream, count, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Request an asynchronous skip of @count bytes from the stream. * When the operation is finished @callback will be called. * You can then call g_input_stream_skip_finish() to get the result * of the operation. * * During an async request no other sync and async calls are allowed, * and will result in %G_IO_ERROR_PENDING errors. * * A value of @count larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. * * On success, the number of bytes skipped will be passed to the callback. * It is not an error if this is not the same as the requested size, as it * can happen e.g. near the end of a file, but generally we try to skip * as many bytes as requested. Zero is returned on end of file * (or if @count is zero), but never otherwise. * * Any outstanding i/o request with higher priority (lower numerical value) * will be executed before an outstanding request with lower priority. * Default priority is %G_PRIORITY_DEFAULT. * * The asynchronous methods have a default fallback that uses threads to * implement asynchronicity, so they are optional for inheriting classes. * However, if you override one, you must override all. * * Params: * count = the number of bytes that will be skipped from the stream * ioPriority = the [I/O priority][io-priority] of the request * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied * userData = the data to pass to callback function */ public void skipAsync(size_t count, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_input_stream_skip_async(gInputStream, count, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes a stream skip operation. * * Params: * result = a #GAsyncResult. * * Returns: the size of the bytes skipped, or %-1 on error. * * Throws: GException on failure. */ public ptrdiff_t skipFinish(AsyncResultIF result) { GError* err = null; auto p = g_input_stream_skip_finish(gInputStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/ListModelIF.d000066400000000000000000000162361324604450400203160ustar00rootroot00000000000000/* * 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 gio.ListModelIF; private import gio.c.functions; public import gio.c.types; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GListModel is an interface that represents a mutable list of * #GObjects. Its main intention is as a model for various widgets in * user interfaces, such as list views, but it can also be used as a * convenient method of returning lists of data, with support for * updates. * * Each object in the list may also report changes in itself via some * mechanism (normally the #GObject::notify signal). Taken together * with the #GListModel::items-changed signal, this provides for a list * that can change its membership, and in which the members can change * their individual properties. * * A good example would be the list of visible wireless network access * points, where each access point can report dynamic properties such as * signal strength. * * It is important to note that the #GListModel itself does not report * changes to the individual items. It only reports changes to the list * membership. If you want to observe changes to the objects themselves * then you need to connect signals to the objects that you are * interested in. * * All items in a #GListModel are of (or derived from) the same type. * g_list_model_get_item_type() returns that type. The type may be an * interface, in which case all objects in the list must implement it. * * The semantics are close to that of an array: * g_list_model_get_n_items() returns the number of items in the list and * g_list_model_get_item() returns an item at a (0-based) position. In * order to allow implementations to calculate the list length lazily, * you can also iterate over items: starting from 0, repeatedly call * g_list_model_get_item() until it returns %NULL. * * An implementation may create objects lazily, but must take care to * return the same object for a given position until all references to * it are gone. * * On the other side, a consumer is expected only to hold references on * objects that are currently "user visible", in order to faciliate the * maximum level of laziness in the implementation of the list and to * reduce the required number of signal connections at a given time. * * This interface is intended only to be used from a single thread. The * thread in which it is appropriate to use it depends on the particular * implementation, but typically it will be from the thread that owns * the [thread-default main context][g-main-context-push-thread-default] * in effect at the time that the model was created. */ public interface ListModelIF{ /** Get the main Gtk struct */ public GListModel* getListModelStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_list_model_get_type(); } /** * Get the item at @position. If @position is greater than the number of * items in @list, %NULL is returned. * * %NULL is never returned for an index that is smaller than the length * of the list. See g_list_model_get_n_items(). * * Params: * position = the position of the item to fetch * * Returns: the item at @position. * * Since: 2.44 */ public ObjectG getItem(uint position); /** * Gets the type of the items in @list. All items returned from * g_list_model_get_type() are of that type or a subtype, or are an * implementation of that interface. * * The item type of a #GListModel can not change during the life of the * model. * * Returns: the #GType of the items contained in @list. * * Since: 2.44 */ public GType getItemType(); /** * Gets the number of items in @list. * * Depending on the model implementation, calling this function may be * less efficient than iterating the list with increasing values for * @position until g_list_model_get_item() returns %NULL. * * Returns: the number of items in @list. * * Since: 2.44 */ public uint getNItems(); /** * Get the item at @position. If @position is greater than the number of * items in @list, %NULL is returned. * * %NULL is never returned for an index that is smaller than the length * of the list. See g_list_model_get_n_items(). * * Params: * position = the position of the item to fetch * * Returns: the object at @position. * * Since: 2.44 */ public ObjectG getObject(uint position); /** * Emits the #GListModel::items-changed signal on @list. * * This function should only be called by classes implementing * #GListModel. It has to be called after the internal representation * of @list has been updated, because handlers connected to this signal * might query the new state of the list. * * Implementations must only make changes to the model (as visible to * its consumer) in places that will not cause problems for that * consumer. For models that are driven directly by a write API (such * as #GListStore), changes can be reported in response to uses of that * API. For models that represent remote data, changes should only be * made from a fresh mainloop dispatch. It is particularly not * permitted to make changes in response to a call to the #GListModel * consumer API. * * Stated another way: in general, it is assumed that code making a * series of accesses to the model via the API, without returning to the * mainloop, and without calling other code, will continue to view the * same contents of the model. * * Params: * position = the position at which @list changed * removed = the number of items removed * added = the number of items added * * Since: 2.44 */ public void itemsChanged(uint position, uint removed, uint added); /** * This signal is emitted whenever items were added or removed to * @list. At @position, @removed items were removed and @added items * were added in their place. * * Params: * position = the position at which @list changed * removed = the number of items removed * added = the number of items added * * Since: 2.44 */ gulong addOnItemsChanged(void delegate(uint, uint, uint, ListModelIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/gio/ListModelT.d000066400000000000000000000216401324604450400202160ustar00rootroot00000000000000/* * 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 gio.ListModelT; public import gio.c.functions; public import gio.c.types; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; /** * #GListModel is an interface that represents a mutable list of * #GObjects. Its main intention is as a model for various widgets in * user interfaces, such as list views, but it can also be used as a * convenient method of returning lists of data, with support for * updates. * * Each object in the list may also report changes in itself via some * mechanism (normally the #GObject::notify signal). Taken together * with the #GListModel::items-changed signal, this provides for a list * that can change its membership, and in which the members can change * their individual properties. * * A good example would be the list of visible wireless network access * points, where each access point can report dynamic properties such as * signal strength. * * It is important to note that the #GListModel itself does not report * changes to the individual items. It only reports changes to the list * membership. If you want to observe changes to the objects themselves * then you need to connect signals to the objects that you are * interested in. * * All items in a #GListModel are of (or derived from) the same type. * g_list_model_get_item_type() returns that type. The type may be an * interface, in which case all objects in the list must implement it. * * The semantics are close to that of an array: * g_list_model_get_n_items() returns the number of items in the list and * g_list_model_get_item() returns an item at a (0-based) position. In * order to allow implementations to calculate the list length lazily, * you can also iterate over items: starting from 0, repeatedly call * g_list_model_get_item() until it returns %NULL. * * An implementation may create objects lazily, but must take care to * return the same object for a given position until all references to * it are gone. * * On the other side, a consumer is expected only to hold references on * objects that are currently "user visible", in order to faciliate the * maximum level of laziness in the implementation of the list and to * reduce the required number of signal connections at a given time. * * This interface is intended only to be used from a single thread. The * thread in which it is appropriate to use it depends on the particular * implementation, but typically it will be from the thread that owns * the [thread-default main context][g-main-context-push-thread-default] * in effect at the time that the model was created. */ public template ListModelT(TStruct) { /** Get the main Gtk struct */ public GListModel* getListModelStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GListModel*)getStruct(); } /** * Get the item at @position. If @position is greater than the number of * items in @list, %NULL is returned. * * %NULL is never returned for an index that is smaller than the length * of the list. See g_list_model_get_n_items(). * * Params: * position = the position of the item to fetch * * Returns: the item at @position. * * Since: 2.44 */ public ObjectG getItem(uint position) { auto p = g_list_model_get_item(getListModelStruct(), position); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); } /** * Gets the type of the items in @list. All items returned from * g_list_model_get_type() are of that type or a subtype, or are an * implementation of that interface. * * The item type of a #GListModel can not change during the life of the * model. * * Returns: the #GType of the items contained in @list. * * Since: 2.44 */ public GType getItemType() { return g_list_model_get_item_type(getListModelStruct()); } /** * Gets the number of items in @list. * * Depending on the model implementation, calling this function may be * less efficient than iterating the list with increasing values for * @position until g_list_model_get_item() returns %NULL. * * Returns: the number of items in @list. * * Since: 2.44 */ public uint getNItems() { return g_list_model_get_n_items(getListModelStruct()); } /** * Get the item at @position. If @position is greater than the number of * items in @list, %NULL is returned. * * %NULL is never returned for an index that is smaller than the length * of the list. See g_list_model_get_n_items(). * * Params: * position = the position of the item to fetch * * Returns: the object at @position. * * Since: 2.44 */ public ObjectG getObject(uint position) { auto p = g_list_model_get_object(getListModelStruct(), position); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); } /** * Emits the #GListModel::items-changed signal on @list. * * This function should only be called by classes implementing * #GListModel. It has to be called after the internal representation * of @list has been updated, because handlers connected to this signal * might query the new state of the list. * * Implementations must only make changes to the model (as visible to * its consumer) in places that will not cause problems for that * consumer. For models that are driven directly by a write API (such * as #GListStore), changes can be reported in response to uses of that * API. For models that represent remote data, changes should only be * made from a fresh mainloop dispatch. It is particularly not * permitted to make changes in response to a call to the #GListModel * consumer API. * * Stated another way: in general, it is assumed that code making a * series of accesses to the model via the API, without returning to the * mainloop, and without calling other code, will continue to view the * same contents of the model. * * Params: * position = the position at which @list changed * removed = the number of items removed * added = the number of items added * * Since: 2.44 */ public void itemsChanged(uint position, uint removed, uint added) { g_list_model_items_changed(getListModelStruct(), position, removed, added); } protected class OnItemsChangedDelegateWrapper { void delegate(uint, uint, uint, ListModelIF) dlg; gulong handlerId; this(void delegate(uint, uint, uint, ListModelIF) dlg) { this.dlg = dlg; onItemsChangedListeners ~= this; } void remove(OnItemsChangedDelegateWrapper source) { foreach(index, wrapper; onItemsChangedListeners) { if (wrapper.handlerId == source.handlerId) { onItemsChangedListeners[index] = null; onItemsChangedListeners = std.algorithm.remove(onItemsChangedListeners, index); break; } } } } OnItemsChangedDelegateWrapper[] onItemsChangedListeners; /** * This signal is emitted whenever items were added or removed to * @list. At @position, @removed items were removed and @added items * were added in their place. * * Params: * position = the position at which @list changed * removed = the number of items removed * added = the number of items added * * Since: 2.44 */ gulong addOnItemsChanged(void delegate(uint, uint, uint, ListModelIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnItemsChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "items-changed", cast(GCallback)&callBackItemsChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackItemsChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackItemsChanged(GListModel* listmodelStruct, uint position, uint removed, uint added, OnItemsChangedDelegateWrapper wrapper) { wrapper.dlg(position, removed, added, wrapper.outer); } extern(C) static void callBackItemsChangedDestroy(OnItemsChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/ListStore.d000066400000000000000000000151011324604450400201210ustar00rootroot00000000000000/* * 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 gio.ListStore; private import gio.ListModelIF; private import gio.ListModelT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GListStore is a simple implementation of #GListModel that stores all * items in memory. * * It provides insertions, deletions, and lookups in logarithmic time * with a fast path for the common case of iterating the list linearly. */ public class ListStore : ObjectG, ListModelIF { /** the main Gtk struct */ protected GListStore* gListStore; /** Get the main Gtk struct */ public GListStore* getListStoreStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gListStore; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gListStore; } protected override void setStruct(GObject* obj) { gListStore = cast(GListStore*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GListStore* gListStore, bool ownedRef = false) { this.gListStore = gListStore; super(cast(GObject*)gListStore, ownedRef); } // add the ListModel capabilities mixin ListModelT!(GListStore); /** */ public static GType getType() { return g_list_store_get_type(); } /** * Creates a new #GListStore with items of type @item_type. @item_type * must be a subclass of #GObject. * * Params: * itemType = the #GType of items in the list * * Returns: a new #GListStore * * Since: 2.44 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GType itemType) { auto p = g_list_store_new(itemType); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GListStore*) p, true); } /** * Appends @item to @store. @item must be of type #GListStore:item-type. * * This function takes a ref on @item. * * Use g_list_store_splice() to append multiple items at the same time * efficiently. * * Params: * item = the new item * * Since: 2.44 */ public void append(ObjectG item) { g_list_store_append(gListStore, (item is null) ? null : item.getObjectGStruct()); } /** * Inserts @item into @store at @position. @item must be of type * #GListStore:item-type or derived from it. @position must be smaller * than the length of the list, or equal to it to append. * * This function takes a ref on @item. * * Use g_list_store_splice() to insert multiple items at the same time * efficiently. * * Params: * position = the position at which to insert the new item * item = the new item * * Since: 2.44 */ public void insert(uint position, ObjectG item) { g_list_store_insert(gListStore, position, (item is null) ? null : item.getObjectGStruct()); } /** * Inserts @item into @store at a position to be determined by the * @compare_func. * * The list must already be sorted before calling this function or the * result is undefined. Usually you would approach this by only ever * inserting items by way of this function. * * This function takes a ref on @item. * * Params: * item = the new item * compareFunc = pairwise comparison function for sorting * userData = user data for @compare_func * * Returns: the position at which @item was inserted * * Since: 2.44 */ public uint insertSorted(ObjectG item, GCompareDataFunc compareFunc, void* userData) { return g_list_store_insert_sorted(gListStore, (item is null) ? null : item.getObjectGStruct(), compareFunc, userData); } /** * Removes the item from @store that is at @position. @position must be * smaller than the current length of the list. * * Use g_list_store_splice() to remove multiple items at the same time * efficiently. * * Params: * position = the position of the item that is to be removed * * Since: 2.44 */ public void remove(uint position) { g_list_store_remove(gListStore, position); } /** * Removes all items from @store. * * Since: 2.44 */ public void removeAll() { g_list_store_remove_all(gListStore); } /** * Sort the items in @store according to @compare_func. * * Params: * compareFunc = pairwise comparison function for sorting * userData = user data for @compare_func * * Since: 2.46 */ public void sort(GCompareDataFunc compareFunc, void* userData) { g_list_store_sort(gListStore, compareFunc, userData); } /** * Changes @store by removing @n_removals items and adding @n_additions * items to it. @additions must contain @n_additions items of type * #GListStore:item-type. %NULL is not permitted. * * This function is more efficient than g_list_store_insert() and * g_list_store_remove(), because it only emits * #GListModel::items-changed once for the change. * * This function takes a ref on each item in @additions. * * The parameters @position and @n_removals must be correct (ie: * @position + @n_removals must be less than or equal to the length of * the list at the time this function is called). * * Params: * position = the position at which to make the change * nRemovals = the number of items to remove * additions = the items to add * * Since: 2.44 */ public void splice(uint position, uint nRemovals, ObjectG[] additions) { void*[] additionsArray = new void*[additions.length]; for ( int i = 0; i < additions.length; i++ ) { additionsArray[i] = additions[i].getObjectGStruct(); } g_list_store_splice(gListStore, position, nRemovals, additionsArray.ptr, cast(uint)additions.length); } } GtkD-3.7.5/generated/gtkd/gio/LoadableIconIF.d000066400000000000000000000061301324604450400207260ustar00rootroot00000000000000/* * 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 gio.LoadableIconIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.InputStream; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Extends the #GIcon interface and adds the ability to * load icons from streams. */ public interface LoadableIconIF{ /** Get the main Gtk struct */ public GLoadableIcon* getLoadableIconStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_loadable_icon_get_type(); } /** * Loads a loadable icon. For the asynchronous version of this function, * see g_loadable_icon_load_async(). * * Params: * size = an integer. * type = a location to store the type of the loaded * icon, %NULL to ignore. * cancellable = optional #GCancellable object, %NULL to * ignore. * * Returns: a #GInputStream to read the icon from. * * Throws: GException on failure. */ public InputStream load(int size, out string type, Cancellable cancellable); /** * Loads an icon asynchronously. To finish this function, see * g_loadable_icon_load_finish(). For the synchronous, blocking * version of this function, see g_loadable_icon_load(). * * Params: * size = an integer. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the * request is satisfied * userData = the data to pass to callback function */ public void loadAsync(int size, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an asynchronous icon load started in g_loadable_icon_load_async(). * * Params: * res = a #GAsyncResult. * type = a location to store the type of the loaded * icon, %NULL to ignore. * * Returns: a #GInputStream to read the icon from. * * Throws: GException on failure. */ public InputStream loadFinish(AsyncResultIF res, out string type); } GtkD-3.7.5/generated/gtkd/gio/LoadableIconT.d000066400000000000000000000077631324604450400206500ustar00rootroot00000000000000/* * 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 gio.LoadableIconT; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.InputStream; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * Extends the #GIcon interface and adds the ability to * load icons from streams. */ public template LoadableIconT(TStruct) { /** Get the main Gtk struct */ public GLoadableIcon* getLoadableIconStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GLoadableIcon*)getStruct(); } /** * Loads a loadable icon. For the asynchronous version of this function, * see g_loadable_icon_load_async(). * * Params: * size = an integer. * type = a location to store the type of the loaded * icon, %NULL to ignore. * cancellable = optional #GCancellable object, %NULL to * ignore. * * Returns: a #GInputStream to read the icon from. * * Throws: GException on failure. */ public InputStream load(int size, out string type, Cancellable cancellable) { char* outtype = null; GError* err = null; auto p = g_loadable_icon_load(getLoadableIconStruct(), size, &outtype, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } type = Str.toString(outtype); if(p is null) { return null; } return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p, true); } /** * Loads an icon asynchronously. To finish this function, see * g_loadable_icon_load_finish(). For the synchronous, blocking * version of this function, see g_loadable_icon_load(). * * Params: * size = an integer. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the * request is satisfied * userData = the data to pass to callback function */ public void loadAsync(int size, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_loadable_icon_load_async(getLoadableIconStruct(), size, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous icon load started in g_loadable_icon_load_async(). * * Params: * res = a #GAsyncResult. * type = a location to store the type of the loaded * icon, %NULL to ignore. * * Returns: a #GInputStream to read the icon from. * * Throws: GException on failure. */ public InputStream loadFinish(AsyncResultIF res, out string type) { char* outtype = null; GError* err = null; auto p = g_loadable_icon_load_finish(getLoadableIconStruct(), (res is null) ? null : res.getAsyncResultStruct(), &outtype, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } type = Str.toString(outtype); if(p is null) { return null; } return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/MemoryInputStream.d000066400000000000000000000113721324604450400216430ustar00rootroot00000000000000/* * 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 gio.MemoryInputStream; private import gio.InputStream; private import gio.PollableInputStreamIF; private import gio.PollableInputStreamT; private import gio.SeekableIF; private import gio.SeekableT; private import gio.c.functions; public import gio.c.types; private import glib.Bytes; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GMemoryInputStream is a class for using arbitrary * memory chunks as input for GIO streaming input operations. * * As of GLib 2.34, #GMemoryInputStream implements * #GPollableInputStream. */ public class MemoryInputStream : InputStream, PollableInputStreamIF, SeekableIF { /** the main Gtk struct */ protected GMemoryInputStream* gMemoryInputStream; /** Get the main Gtk struct */ public GMemoryInputStream* getMemoryInputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMemoryInputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gMemoryInputStream; } protected override void setStruct(GObject* obj) { gMemoryInputStream = cast(GMemoryInputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GMemoryInputStream* gMemoryInputStream, bool ownedRef = false) { this.gMemoryInputStream = gMemoryInputStream; super(cast(GInputStream*)gMemoryInputStream, ownedRef); } // add the PollableInputStream capabilities mixin PollableInputStreamT!(GMemoryInputStream); // add the Seekable capabilities mixin SeekableT!(GMemoryInputStream); /** */ public static GType getType() { return g_memory_input_stream_get_type(); } /** * Creates a new empty #GMemoryInputStream. * * Returns: a new #GInputStream * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_memory_input_stream_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GMemoryInputStream*) p, true); } /** * Creates a new #GMemoryInputStream with data from the given @bytes. * * Params: * bytes = a #GBytes * * Returns: new #GInputStream read from @bytes * * Since: 2.34 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Bytes bytes) { auto p = g_memory_input_stream_new_from_bytes((bytes is null) ? null : bytes.getBytesStruct()); if(p is null) { throw new ConstructionException("null returned by new_from_bytes"); } this(cast(GMemoryInputStream*) p, true); } /** * Creates a new #GMemoryInputStream with data in memory of a given size. * * Params: * data = input data * destroy = function that is called to free @data, or %NULL * * Returns: new #GInputStream read from @data of @len bytes. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] data, GDestroyNotify destroy) { auto p = g_memory_input_stream_new_from_data(data.ptr, cast(ptrdiff_t)data.length, destroy); if(p is null) { throw new ConstructionException("null returned by new_from_data"); } this(cast(GMemoryInputStream*) p, true); } /** * Appends @bytes to data that can be read from the input stream. * * Params: * bytes = input data * * Since: 2.34 */ public void addBytes(Bytes bytes) { g_memory_input_stream_add_bytes(gMemoryInputStream, (bytes is null) ? null : bytes.getBytesStruct()); } /** * Appends @data to data that can be read from the input stream * * Params: * data = input data * destroy = function that is called to free @data, or %NULL */ public void addData(ubyte[] data, GDestroyNotify destroy) { g_memory_input_stream_add_data(gMemoryInputStream, data.ptr, cast(ptrdiff_t)data.length, destroy); } } GtkD-3.7.5/generated/gtkd/gio/MemoryOutputStream.d000066400000000000000000000203541324604450400220440ustar00rootroot00000000000000/* * 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 gio.MemoryOutputStream; private import gio.OutputStream; private import gio.PollableOutputStreamIF; private import gio.PollableOutputStreamT; private import gio.SeekableIF; private import gio.SeekableT; private import gio.c.functions; public import gio.c.types; private import glib.Bytes; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GMemoryOutputStream is a class for using arbitrary * memory chunks as output for GIO streaming output operations. * * As of GLib 2.34, #GMemoryOutputStream trivially implements * #GPollableOutputStream: it always polls as ready. */ public class MemoryOutputStream : OutputStream, PollableOutputStreamIF, SeekableIF { /** the main Gtk struct */ protected GMemoryOutputStream* gMemoryOutputStream; /** Get the main Gtk struct */ public GMemoryOutputStream* getMemoryOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMemoryOutputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gMemoryOutputStream; } protected override void setStruct(GObject* obj) { gMemoryOutputStream = cast(GMemoryOutputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GMemoryOutputStream* gMemoryOutputStream, bool ownedRef = false) { this.gMemoryOutputStream = gMemoryOutputStream; super(cast(GOutputStream*)gMemoryOutputStream, ownedRef); } // add the PollableOutputStream capabilities mixin PollableOutputStreamT!(GMemoryOutputStream); // add the Seekable capabilities mixin SeekableT!(GMemoryOutputStream); /** */ public static GType getType() { return g_memory_output_stream_get_type(); } /** * Creates a new #GMemoryOutputStream. * * In most cases this is not the function you want. See * g_memory_output_stream_new_resizable() instead. * * If @data is non-%NULL, the stream will use that for its internal storage. * * If @realloc_fn is non-%NULL, it will be used for resizing the internal * storage when necessary and the stream will be considered resizable. * In that case, the stream will start out being (conceptually) empty. * @size is used only as a hint for how big @data is. Specifically, * seeking to the end of a newly-created stream will seek to zero, not * @size. Seeking past the end of the stream and then writing will * introduce a zero-filled gap. * * If @realloc_fn is %NULL then the stream is fixed-sized. Seeking to * the end will seek to @size exactly. Writing past the end will give * an 'out of space' error. Attempting to seek past the end will fail. * Unlike the resizable case, seeking to an offset within the stream and * writing will preserve the bytes passed in as @data before that point * and will return them as part of g_memory_output_stream_steal_data(). * If you intend to seek you should probably therefore ensure that @data * is properly initialised. * * It is probably only meaningful to provide @data and @size in the case * that you want a fixed-sized stream. Put another way: if @realloc_fn * is non-%NULL then it makes most sense to give @data as %NULL and * @size as 0 (allowing #GMemoryOutputStream to do the initial * allocation for itself). * * |[ * // a stream that can grow * stream = g_memory_output_stream_new (NULL, 0, realloc, free); * * // another stream that can grow * stream2 = g_memory_output_stream_new (NULL, 0, g_realloc, g_free); * * // a fixed-size stream * data = malloc (200); * stream3 = g_memory_output_stream_new (data, 200, NULL, free); * ]| * * Params: * data = pointer to a chunk of memory to use, or %NULL * size = the size of @data * reallocFunction = a function with realloc() semantics (like g_realloc()) * to be called when @data needs to be grown, or %NULL * destroyFunction = a function to be called on @data when the stream is * finalized, or %NULL * * Returns: A newly created #GMemoryOutputStream object. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(void* data, size_t size, GReallocFunc reallocFunction, GDestroyNotify destroyFunction) { auto p = g_memory_output_stream_new(data, size, reallocFunction, destroyFunction); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GMemoryOutputStream*) p, true); } /** * Creates a new #GMemoryOutputStream, using g_realloc() and g_free() * for memory allocation. * * Since: 2.36 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_memory_output_stream_new_resizable(); if(p is null) { throw new ConstructionException("null returned by new_resizable"); } this(cast(GMemoryOutputStream*) p, true); } /** * Gets any loaded data from the @ostream. * * Note that the returned pointer may become invalid on the next * write or truncate operation on the stream. * * Returns: pointer to the stream's data, or %NULL if the data * has been stolen */ public void* getData() { return g_memory_output_stream_get_data(gMemoryOutputStream); } /** * Returns the number of bytes from the start up to including the last * byte written in the stream that has not been truncated away. * * Returns: the number of bytes written to the stream * * Since: 2.18 */ public size_t getDataSize() { return g_memory_output_stream_get_data_size(gMemoryOutputStream); } /** * Gets the size of the currently allocated data area (available from * g_memory_output_stream_get_data()). * * You probably don't want to use this function on resizable streams. * See g_memory_output_stream_get_data_size() instead. For resizable * streams the size returned by this function is an implementation * detail and may be change at any time in response to operations on the * stream. * * If the stream is fixed-sized (ie: no realloc was passed to * g_memory_output_stream_new()) then this is the maximum size of the * stream and further writes will return %G_IO_ERROR_NO_SPACE. * * In any case, if you want the number of bytes currently written to the * stream, use g_memory_output_stream_get_data_size(). * * Returns: the number of bytes allocated for the data buffer */ public size_t getSize() { return g_memory_output_stream_get_size(gMemoryOutputStream); } /** * Returns data from the @ostream as a #GBytes. @ostream must be * closed before calling this function. * * Returns: the stream's data * * Since: 2.34 */ public Bytes stealAsBytes() { auto p = g_memory_output_stream_steal_as_bytes(gMemoryOutputStream); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Gets any loaded data from the @ostream. Ownership of the data * is transferred to the caller; when no longer needed it must be * freed using the free function set in @ostream's * #GMemoryOutputStream:destroy-function property. * * @ostream must be closed before calling this function. * * Returns: the stream's data, or %NULL if it has previously * been stolen * * Since: 2.26 */ public void* stealData() { return g_memory_output_stream_steal_data(gMemoryOutputStream); } } GtkD-3.7.5/generated/gtkd/gio/Menu.d000066400000000000000000000240521324604450400171020ustar00rootroot00000000000000/* * 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 gio.Menu; private import gio.MenuItem; private import gio.MenuModel; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GMenu is a simple implementation of #GMenuModel. * You populate a #GMenu by adding #GMenuItem instances to it. * * There are some convenience functions to allow you to directly * add items (avoiding #GMenuItem) for the common cases. To add * a regular item, use g_menu_insert(). To add a section, use * g_menu_insert_section(). To add a submenu, use * g_menu_insert_submenu(). * * Since: 2.32 */ public class Menu : MenuModel { /** the main Gtk struct */ protected GMenu* gMenu; /** Get the main Gtk struct */ public GMenu* getMenuStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMenu; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gMenu; } protected override void setStruct(GObject* obj) { gMenu = cast(GMenu*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GMenu* gMenu, bool ownedRef = false) { this.gMenu = gMenu; super(cast(GMenuModel*)gMenu, ownedRef); } /** */ public static GType getType() { return g_menu_get_type(); } /** * Creates a new #GMenu. * * The new menu has no items. * * Returns: a new #GMenu * * Since: 2.32 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_menu_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GMenu*) p, true); } /** * Convenience function for appending a normal menu item to the end of * @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more * flexible alternative. * * Params: * label = the section label, or %NULL * detailedAction = the detailed action string, or %NULL * * Since: 2.32 */ public void append(string label, string detailedAction) { g_menu_append(gMenu, Str.toStringz(label), Str.toStringz(detailedAction)); } /** * Appends @item to the end of @menu. * * See g_menu_insert_item() for more information. * * Params: * item = a #GMenuItem to append * * Since: 2.32 */ public void appendItem(MenuItem item) { g_menu_append_item(gMenu, (item is null) ? null : item.getMenuItemStruct()); } /** * Convenience function for appending a section menu item to the end of * @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for a * more flexible alternative. * * Params: * label = the section label, or %NULL * section = a #GMenuModel with the items of the section * * Since: 2.32 */ public void appendSection(string label, MenuModel section) { g_menu_append_section(gMenu, Str.toStringz(label), (section is null) ? null : section.getMenuModelStruct()); } /** * Convenience function for appending a submenu menu item to the end of * @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for a * more flexible alternative. * * Params: * label = the section label, or %NULL * submenu = a #GMenuModel with the items of the submenu * * Since: 2.32 */ public void appendSubmenu(string label, MenuModel submenu) { g_menu_append_submenu(gMenu, Str.toStringz(label), (submenu is null) ? null : submenu.getMenuModelStruct()); } /** * Marks @menu as frozen. * * After the menu is frozen, it is an error to attempt to make any * changes to it. In effect this means that the #GMenu API must no * longer be used. * * This function causes g_menu_model_is_mutable() to begin returning * %FALSE, which has some positive performance implications. * * Since: 2.32 */ public void freeze() { g_menu_freeze(gMenu); } /** * Convenience function for inserting a normal menu item into @menu. * Combine g_menu_item_new() and g_menu_insert_item() for a more flexible * alternative. * * Params: * position = the position at which to insert the item * label = the section label, or %NULL * detailedAction = the detailed action string, or %NULL * * Since: 2.32 */ public void insert(int position, string label, string detailedAction) { g_menu_insert(gMenu, position, Str.toStringz(label), Str.toStringz(detailedAction)); } /** * Inserts @item into @menu. * * The "insertion" is actually done by copying all of the attribute and * link values of @item and using them to form a new item within @menu. * As such, @item itself is not really inserted, but rather, a menu item * that is exactly the same as the one presently described by @item. * * This means that @item is essentially useless after the insertion * occurs. Any changes you make to it are ignored unless it is inserted * again (at which point its updated values will be copied). * * You should probably just free @item once you're done. * * There are many convenience functions to take care of common cases. * See g_menu_insert(), g_menu_insert_section() and * g_menu_insert_submenu() as well as "prepend" and "append" variants of * each of these functions. * * Params: * position = the position at which to insert the item * item = the #GMenuItem to insert * * Since: 2.32 */ public void insertItem(int position, MenuItem item) { g_menu_insert_item(gMenu, position, (item is null) ? null : item.getMenuItemStruct()); } /** * Convenience function for inserting a section menu item into @menu. * Combine g_menu_item_new_section() and g_menu_insert_item() for a more * flexible alternative. * * Params: * position = the position at which to insert the item * label = the section label, or %NULL * section = a #GMenuModel with the items of the section * * Since: 2.32 */ public void insertSection(int position, string label, MenuModel section) { g_menu_insert_section(gMenu, position, Str.toStringz(label), (section is null) ? null : section.getMenuModelStruct()); } /** * Convenience function for inserting a submenu menu item into @menu. * Combine g_menu_item_new_submenu() and g_menu_insert_item() for a more * flexible alternative. * * Params: * position = the position at which to insert the item * label = the section label, or %NULL * submenu = a #GMenuModel with the items of the submenu * * Since: 2.32 */ public void insertSubmenu(int position, string label, MenuModel submenu) { g_menu_insert_submenu(gMenu, position, Str.toStringz(label), (submenu is null) ? null : submenu.getMenuModelStruct()); } /** * Convenience function for prepending a normal menu item to the start * of @menu. Combine g_menu_item_new() and g_menu_insert_item() for a more * flexible alternative. * * Params: * label = the section label, or %NULL * detailedAction = the detailed action string, or %NULL * * Since: 2.32 */ public void prepend(string label, string detailedAction) { g_menu_prepend(gMenu, Str.toStringz(label), Str.toStringz(detailedAction)); } /** * Prepends @item to the start of @menu. * * See g_menu_insert_item() for more information. * * Params: * item = a #GMenuItem to prepend * * Since: 2.32 */ public void prependItem(MenuItem item) { g_menu_prepend_item(gMenu, (item is null) ? null : item.getMenuItemStruct()); } /** * Convenience function for prepending a section menu item to the start * of @menu. Combine g_menu_item_new_section() and g_menu_insert_item() for * a more flexible alternative. * * Params: * label = the section label, or %NULL * section = a #GMenuModel with the items of the section * * Since: 2.32 */ public void prependSection(string label, MenuModel section) { g_menu_prepend_section(gMenu, Str.toStringz(label), (section is null) ? null : section.getMenuModelStruct()); } /** * Convenience function for prepending a submenu menu item to the start * of @menu. Combine g_menu_item_new_submenu() and g_menu_insert_item() for * a more flexible alternative. * * Params: * label = the section label, or %NULL * submenu = a #GMenuModel with the items of the submenu * * Since: 2.32 */ public void prependSubmenu(string label, MenuModel submenu) { g_menu_prepend_submenu(gMenu, Str.toStringz(label), (submenu is null) ? null : submenu.getMenuModelStruct()); } /** * Removes an item from the menu. * * @position gives the index of the item to remove. * * It is an error if position is not in range the range from 0 to one * less than the number of items in the menu. * * It is not possible to remove items by identity since items are added * to the menu simply by copying their links and attributes (ie: * identity of the item itself is not preserved). * * Params: * position = the position of the item to remove * * Since: 2.32 */ public void remove(int position) { g_menu_remove(gMenu, position); } /** * Removes all items in the menu. * * Since: 2.38 */ public void removeAll() { g_menu_remove_all(gMenu); } } GtkD-3.7.5/generated/gtkd/gio/MenuAttributeIter.d000066400000000000000000000111651324604450400216130ustar00rootroot00000000000000/* * 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 gio.MenuAttributeIter; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GMenuAttributeIter is an opaque structure type. You must access it * using the functions below. * * Since: 2.32 */ public class MenuAttributeIter : ObjectG { /** the main Gtk struct */ protected GMenuAttributeIter* gMenuAttributeIter; /** Get the main Gtk struct */ public GMenuAttributeIter* getMenuAttributeIterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMenuAttributeIter; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gMenuAttributeIter; } protected override void setStruct(GObject* obj) { gMenuAttributeIter = cast(GMenuAttributeIter*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GMenuAttributeIter* gMenuAttributeIter, bool ownedRef = false) { this.gMenuAttributeIter = gMenuAttributeIter; super(cast(GObject*)gMenuAttributeIter, ownedRef); } /** */ public static GType getType() { return g_menu_attribute_iter_get_type(); } /** * Gets the name of the attribute at the current iterator position, as * a string. * * The iterator is not advanced. * * Returns: the name of the attribute * * Since: 2.32 */ public string getName() { return Str.toString(g_menu_attribute_iter_get_name(gMenuAttributeIter)); } /** * This function combines g_menu_attribute_iter_next() with * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value(). * * First the iterator is advanced to the next (possibly first) attribute. * If that fails, then %FALSE is returned and there are no other * effects. * * If successful, @name and @value are set to the name and value of the * attribute that has just been advanced to. At this point, * g_menu_attribute_iter_get_name() and g_menu_attribute_iter_get_value() will * return the same values again. * * The value returned in @name remains valid for as long as the iterator * remains at the current position. The value returned in @value must * be unreffed using g_variant_unref() when it is no longer in use. * * Params: * outName = the type of the attribute * value = the attribute value * * Returns: %TRUE on success, or %FALSE if there is no additional * attribute * * Since: 2.32 */ public bool getNext(out string outName, out Variant value) { char* outoutName = null; GVariant* outvalue = null; auto p = g_menu_attribute_iter_get_next(gMenuAttributeIter, &outoutName, &outvalue) != 0; outName = Str.toString(outoutName); value = new Variant(outvalue); return p; } /** * Gets the value of the attribute at the current iterator position. * * The iterator is not advanced. * * Returns: the value of the current attribute * * Since: 2.32 */ public Variant getValue() { auto p = g_menu_attribute_iter_get_value(gMenuAttributeIter); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Attempts to advance the iterator to the next (possibly first) * attribute. * * %TRUE is returned on success, or %FALSE if there are no more * attributes. * * You must call this function when you first acquire the iterator * to advance it to the first attribute (and determine if the first * attribute exists at all). * * Returns: %TRUE on success, or %FALSE when there are no more attributes * * Since: 2.32 */ public bool next() { return g_menu_attribute_iter_next(gMenuAttributeIter) != 0; } } GtkD-3.7.5/generated/gtkd/gio/MenuItem.d000066400000000000000000000275031324604450400177250ustar00rootroot00000000000000/* * 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 gio.MenuItem; private import gio.IconIF; private import gio.MenuModel; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GMenuItem is an opaque structure type. You must access it using the * functions below. * * Since: 2.32 */ public class MenuItem : ObjectG { /** the main Gtk struct */ protected GMenuItem* gMenuItem; /** Get the main Gtk struct */ public GMenuItem* getMenuItemStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMenuItem; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gMenuItem; } protected override void setStruct(GObject* obj) { gMenuItem = cast(GMenuItem*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GMenuItem* gMenuItem, bool ownedRef = false) { this.gMenuItem = gMenuItem; super(cast(GObject*)gMenuItem, ownedRef); } /** */ public static GType getType() { return g_menu_item_get_type(); } /** * Creates a new #GMenuItem. * * If @label is non-%NULL it is used to set the "label" attribute of the * new item. * * If @detailed_action is non-%NULL it is used to set the "action" and * possibly the "target" attribute of the new item. See * g_menu_item_set_detailed_action() for more information. * * Params: * label = the section label, or %NULL * detailedAction = the detailed action string, or %NULL * * Returns: a new #GMenuItem * * Since: 2.32 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string label, string detailedAction) { auto p = g_menu_item_new(Str.toStringz(label), Str.toStringz(detailedAction)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GMenuItem*) p, true); } /** * Creates a #GMenuItem as an exact copy of an existing menu item in a * #GMenuModel. * * @item_index must be valid (ie: be sure to call * g_menu_model_get_n_items() first). * * Params: * model = a #GMenuModel * itemIndex = the index of an item in @model * * Returns: a new #GMenuItem. * * Since: 2.34 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(MenuModel model, int itemIndex) { auto p = g_menu_item_new_from_model((model is null) ? null : model.getMenuModelStruct(), itemIndex); if(p is null) { throw new ConstructionException("null returned by new_from_model"); } this(cast(GMenuItem*) p, true); } /** * Queries the named @attribute on @menu_item. * * If @expected_type is specified and the attribute does not have this * type, %NULL is returned. %NULL is also returned if the attribute * simply does not exist. * * Params: * attribute = the attribute name to query * expectedType = the expected type of the attribute * * Returns: the attribute value, or %NULL * * Since: 2.34 */ public Variant getAttributeValue(string attribute, VariantType expectedType) { auto p = g_menu_item_get_attribute_value(gMenuItem, Str.toStringz(attribute), (expectedType is null) ? null : expectedType.getVariantTypeStruct()); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Queries the named @link on @menu_item. * * Params: * link = the link name to query * * Returns: the link, or %NULL * * Since: 2.34 */ public MenuModel getLink(string link) { auto p = g_menu_item_get_link(gMenuItem, Str.toStringz(link)); if(p is null) { return null; } return ObjectG.getDObject!(MenuModel)(cast(GMenuModel*) p, true); } /** * Sets or unsets the "action" and "target" attributes of @menu_item. * * If @action is %NULL then both the "action" and "target" attributes * are unset (and @target_value is ignored). * * If @action is non-%NULL then the "action" attribute is set. The * "target" attribute is then set to the value of @target_value if it is * non-%NULL or unset otherwise. * * Normal menu items (ie: not submenu, section or other custom item * types) are expected to have the "action" attribute set to identify * the action that they are associated with. The state type of the * action help to determine the disposition of the menu item. See * #GAction and #GActionGroup for an overview of actions. * * In general, clicking on the menu item will result in activation of * the named action with the "target" attribute given as the parameter * to the action invocation. If the "target" attribute is not set then * the action is invoked with no parameter. * * If the action has no state then the menu item is usually drawn as a * plain menu item (ie: with no additional decoration). * * If the action has a boolean state then the menu item is usually drawn * as a toggle menu item (ie: with a checkmark or equivalent * indication). The item should be marked as 'toggled' or 'checked' * when the boolean state is %TRUE. * * If the action has a string state then the menu item is usually drawn * as a radio menu item (ie: with a radio bullet or equivalent * indication). The item should be marked as 'selected' when the string * state is equal to the value of the @target property. * * See g_menu_item_set_action_and_target() or * g_menu_item_set_detailed_action() for two equivalent calls that are * probably more convenient for most uses. * * Params: * action = the name of the action for this item * targetValue = a #GVariant to use as the action target * * Since: 2.32 */ public void setActionAndTargetValue(string action, Variant targetValue) { g_menu_item_set_action_and_target_value(gMenuItem, Str.toStringz(action), (targetValue is null) ? null : targetValue.getVariantStruct()); } /** * Sets or unsets an attribute on @menu_item. * * The attribute to set or unset is specified by @attribute. This * can be one of the standard attribute names %G_MENU_ATTRIBUTE_LABEL, * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, or a custom * attribute name. * Attribute names are restricted to lowercase characters, numbers * and '-'. Furthermore, the names must begin with a lowercase character, * must not end with a '-', and must not contain consecutive dashes. * * must consist only of lowercase * ASCII characters, digits and '-'. * * If @value is non-%NULL then it is used as the new value for the * attribute. If @value is %NULL then the attribute is unset. If * the @value #GVariant is floating, it is consumed. * * See also g_menu_item_set_attribute() for a more convenient way to do * the same. * * Params: * attribute = the attribute to set * value = a #GVariant to use as the value, or %NULL * * Since: 2.32 */ public void setAttributeValue(string attribute, Variant value) { g_menu_item_set_attribute_value(gMenuItem, Str.toStringz(attribute), (value is null) ? null : value.getVariantStruct()); } /** * Sets the "action" and possibly the "target" attribute of @menu_item. * * The format of @detailed_action is the same format parsed by * g_action_parse_detailed_name(). * * See g_menu_item_set_action_and_target() or * g_menu_item_set_action_and_target_value() for more flexible (but * slightly less convenient) alternatives. * * See also g_menu_item_set_action_and_target_value() for a description of * the semantics of the action and target attributes. * * Params: * detailedAction = the "detailed" action string * * Since: 2.32 */ public void setDetailedAction(string detailedAction) { g_menu_item_set_detailed_action(gMenuItem, Str.toStringz(detailedAction)); } /** * Sets (or unsets) the icon on @menu_item. * * This call is the same as calling g_icon_serialize() and using the * result as the value to g_menu_item_set_attribute_value() for * %G_MENU_ATTRIBUTE_ICON. * * This API is only intended for use with "noun" menu items; things like * bookmarks or applications in an "Open With" menu. Don't use it on * menu items corresponding to verbs (eg: stock icons for 'Save' or * 'Quit'). * * If @icon is %NULL then the icon is unset. * * Params: * icon = a #GIcon, or %NULL * * Since: 2.38 */ public void setIcon(IconIF icon) { g_menu_item_set_icon(gMenuItem, (icon is null) ? null : icon.getIconStruct()); } /** * Sets or unsets the "label" attribute of @menu_item. * * If @label is non-%NULL it is used as the label for the menu item. If * it is %NULL then the label attribute is unset. * * Params: * label = the label to set, or %NULL to unset * * Since: 2.32 */ public void setLabel(string label) { g_menu_item_set_label(gMenuItem, Str.toStringz(label)); } /** * Creates a link from @menu_item to @model if non-%NULL, or unsets it. * * Links are used to establish a relationship between a particular menu * item and another menu. For example, %G_MENU_LINK_SUBMENU is used to * associate a submenu with a particular menu item, and %G_MENU_LINK_SECTION * is used to create a section. Other types of link can be used, but there * is no guarantee that clients will be able to make sense of them. * Link types are restricted to lowercase characters, numbers * and '-'. Furthermore, the names must begin with a lowercase character, * must not end with a '-', and must not contain consecutive dashes. * * Params: * link = type of link to establish or unset * model = the #GMenuModel to link to (or %NULL to unset) * * Since: 2.32 */ public void setLink(string link, MenuModel model) { g_menu_item_set_link(gMenuItem, Str.toStringz(link), (model is null) ? null : model.getMenuModelStruct()); } /** * Sets or unsets the "section" link of @menu_item to @section. * * The effect of having one menu appear as a section of another is * exactly as it sounds: the items from @section become a direct part of * the menu that @menu_item is added to. See g_menu_item_new_section() * for more information about what it means for a menu item to be a * section. * * Params: * section = a #GMenuModel, or %NULL * * Since: 2.32 */ public void setSection(MenuModel section) { g_menu_item_set_section(gMenuItem, (section is null) ? null : section.getMenuModelStruct()); } /** * Sets or unsets the "submenu" link of @menu_item to @submenu. * * If @submenu is non-%NULL, it is linked to. If it is %NULL then the * link is unset. * * The effect of having one menu appear as a submenu of another is * exactly as it sounds. * * Params: * submenu = a #GMenuModel, or %NULL * * Since: 2.32 */ public void setSubmenu(MenuModel submenu) { g_menu_item_set_submenu(gMenuItem, (submenu is null) ? null : submenu.getMenuModelStruct()); } } GtkD-3.7.5/generated/gtkd/gio/MenuLinkIter.d000066400000000000000000000107011324604450400205400ustar00rootroot00000000000000/* * 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 gio.MenuLinkIter; private import gio.MenuModel; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GMenuLinkIter is an opaque structure type. You must access it using * the functions below. * * Since: 2.32 */ public class MenuLinkIter : ObjectG { /** the main Gtk struct */ protected GMenuLinkIter* gMenuLinkIter; /** Get the main Gtk struct */ public GMenuLinkIter* getMenuLinkIterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMenuLinkIter; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gMenuLinkIter; } protected override void setStruct(GObject* obj) { gMenuLinkIter = cast(GMenuLinkIter*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GMenuLinkIter* gMenuLinkIter, bool ownedRef = false) { this.gMenuLinkIter = gMenuLinkIter; super(cast(GObject*)gMenuLinkIter, ownedRef); } /** */ public static GType getType() { return g_menu_link_iter_get_type(); } /** * Gets the name of the link at the current iterator position. * * The iterator is not advanced. * * Returns: the type of the link * * Since: 2.32 */ public string getName() { return Str.toString(g_menu_link_iter_get_name(gMenuLinkIter)); } /** * This function combines g_menu_link_iter_next() with * g_menu_link_iter_get_name() and g_menu_link_iter_get_value(). * * First the iterator is advanced to the next (possibly first) link. * If that fails, then %FALSE is returned and there are no other effects. * * If successful, @out_link and @value are set to the name and #GMenuModel * of the link that has just been advanced to. At this point, * g_menu_link_iter_get_name() and g_menu_link_iter_get_value() will return the * same values again. * * The value returned in @out_link remains valid for as long as the iterator * remains at the current position. The value returned in @value must * be unreffed using g_object_unref() when it is no longer in use. * * Params: * outLink = the name of the link * value = the linked #GMenuModel * * Returns: %TRUE on success, or %FALSE if there is no additional link * * Since: 2.32 */ public bool getNext(out string outLink, out MenuModel value) { char* outoutLink = null; GMenuModel* outvalue = null; auto p = g_menu_link_iter_get_next(gMenuLinkIter, &outoutLink, &outvalue) != 0; outLink = Str.toString(outoutLink); value = ObjectG.getDObject!(MenuModel)(outvalue); return p; } /** * Gets the linked #GMenuModel at the current iterator position. * * The iterator is not advanced. * * Returns: the #GMenuModel that is linked to * * Since: 2.32 */ public MenuModel getValue() { auto p = g_menu_link_iter_get_value(gMenuLinkIter); if(p is null) { return null; } return ObjectG.getDObject!(MenuModel)(cast(GMenuModel*) p, true); } /** * Attempts to advance the iterator to the next (possibly first) * link. * * %TRUE is returned on success, or %FALSE if there are no more links. * * You must call this function when you first acquire the iterator to * advance it to the first link (and determine if the first link exists * at all). * * Returns: %TRUE on success, or %FALSE when there are no more links * * Since: 2.32 */ public bool next() { return g_menu_link_iter_next(gMenuLinkIter) != 0; } } GtkD-3.7.5/generated/gtkd/gio/MenuModel.d000066400000000000000000000351201324604450400200610ustar00rootroot00000000000000/* * 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 gio.MenuModel; private import gio.MenuAttributeIter; private import gio.MenuLinkIter; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GMenuModel represents the contents of a menu -- an ordered list of * menu items. The items are associated with actions, which can be * activated through them. Items can be grouped in sections, and may * have submenus associated with them. Both items and sections usually * have some representation data, such as labels or icons. The type of * the associated action (ie whether it is stateful, and what kind of * state it has) can influence the representation of the item. * * The conceptual model of menus in #GMenuModel is hierarchical: * sections and submenus are again represented by #GMenuModels. * Menus themselves do not define their own roles. Rather, the role * of a particular #GMenuModel is defined by the item that references * it (or, in the case of the 'root' menu, is defined by the context * in which it is used). * * As an example, consider the visible portions of this menu: * * ## An example menu # {#menu-example} * * ![](menu-example.png) * * There are 8 "menus" visible in the screenshot: one menubar, two * submenus and 5 sections: * * - the toplevel menubar (containing 4 items) * - the View submenu (containing 3 sections) * - the first section of the View submenu (containing 2 items) * - the second section of the View submenu (containing 1 item) * - the final section of the View submenu (containing 1 item) * - the Highlight Mode submenu (containing 2 sections) * - the Sources section (containing 2 items) * - the Markup section (containing 2 items) * * The [example][menu-model] illustrates the conceptual connection between * these 8 menus. Each large block in the figure represents a menu and the * smaller blocks within the large block represent items in that menu. Some * items contain references to other menus. * * ## A menu example # {#menu-model} * * ![](menu-model.png) * * Notice that the separators visible in the [example][menu-example] * appear nowhere in the [menu model][menu-model]. This is because * separators are not explicitly represented in the menu model. Instead, * a separator is inserted between any two non-empty sections of a menu. * Section items can have labels just like any other item. In that case, * a display system may show a section header instead of a separator. * * The motivation for this abstract model of application controls is * that modern user interfaces tend to make these controls available * outside the application. Examples include global menus, jumplists, * dash boards, etc. To support such uses, it is necessary to 'export' * information about actions and their representation in menus, which * is exactly what the [GActionGroup exporter][gio-GActionGroup-exporter] * and the [GMenuModel exporter][gio-GMenuModel-exporter] do for * #GActionGroup and #GMenuModel. The client-side counterparts to * make use of the exported information are #GDBusActionGroup and * #GDBusMenuModel. * * The API of #GMenuModel is very generic, with iterators for the * attributes and links of an item, see g_menu_model_iterate_item_attributes() * and g_menu_model_iterate_item_links(). The 'standard' attributes and * link types have predefined names: %G_MENU_ATTRIBUTE_LABEL, * %G_MENU_ATTRIBUTE_ACTION, %G_MENU_ATTRIBUTE_TARGET, %G_MENU_LINK_SECTION * and %G_MENU_LINK_SUBMENU. * * Items in a #GMenuModel represent active controls if they refer to * an action that can get activated when the user interacts with the * menu item. The reference to the action is encoded by the string id * in the %G_MENU_ATTRIBUTE_ACTION attribute. An action id uniquely * identifies an action in an action group. Which action group(s) provide * actions depends on the context in which the menu model is used. * E.g. when the model is exported as the application menu of a * #GtkApplication, actions can be application-wide or window-specific * (and thus come from two different action groups). By convention, the * application-wide actions have names that start with "app.", while the * names of window-specific actions start with "win.". * * While a wide variety of stateful actions is possible, the following * is the minimum that is expected to be supported by all users of exported * menu information: * - an action with no parameter type and no state * - an action with no parameter type and boolean state * - an action with string parameter type and string state * * ## Stateless * * A stateless action typically corresponds to an ordinary menu item. * * Selecting such a menu item will activate the action (with no parameter). * * ## Boolean State * * An action with a boolean state will most typically be used with a "toggle" * or "switch" menu item. The state can be set directly, but activating the * action (with no parameter) results in the state being toggled. * * Selecting a toggle menu item will activate the action. The menu item should * be rendered as "checked" when the state is true. * * ## String Parameter and State * * Actions with string parameters and state will most typically be used to * represent an enumerated choice over the items available for a group of * radio menu items. Activating the action with a string parameter is * equivalent to setting that parameter as the state. * * Radio menu items, in addition to being associated with the action, will * have a target value. Selecting that menu item will result in activation * of the action with the target value as the parameter. The menu item should * be rendered as "selected" when the state of the action is equal to the * target value of the menu item. * * Since: 2.32 */ public class MenuModel : ObjectG { /** the main Gtk struct */ protected GMenuModel* gMenuModel; /** Get the main Gtk struct */ public GMenuModel* getMenuModelStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMenuModel; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gMenuModel; } protected override void setStruct(GObject* obj) { gMenuModel = cast(GMenuModel*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GMenuModel* gMenuModel, bool ownedRef = false) { this.gMenuModel = gMenuModel; super(cast(GObject*)gMenuModel, ownedRef); } /** */ public static GType getType() { return g_menu_model_get_type(); } /** * Queries the item at position @item_index in @model for the attribute * specified by @attribute. * * If @expected_type is non-%NULL then it specifies the expected type of * the attribute. If it is %NULL then any type will be accepted. * * If the attribute exists and matches @expected_type (or if the * expected type is unspecified) then the value is returned. * * If the attribute does not exist, or does not match the expected type * then %NULL is returned. * * Params: * itemIndex = the index of the item * attribute = the attribute to query * expectedType = the expected type of the attribute, or * %NULL * * Returns: the value of the attribute * * Since: 2.32 */ public Variant getItemAttributeValue(int itemIndex, string attribute, VariantType expectedType) { auto p = g_menu_model_get_item_attribute_value(gMenuModel, itemIndex, Str.toStringz(attribute), (expectedType is null) ? null : expectedType.getVariantTypeStruct()); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Queries the item at position @item_index in @model for the link * specified by @link. * * If the link exists, the linked #GMenuModel is returned. If the link * does not exist, %NULL is returned. * * Params: * itemIndex = the index of the item * link = the link to query * * Returns: the linked #GMenuModel, or %NULL * * Since: 2.32 */ public MenuModel getItemLink(int itemIndex, string link) { auto p = g_menu_model_get_item_link(gMenuModel, itemIndex, Str.toStringz(link)); if(p is null) { return null; } return ObjectG.getDObject!(MenuModel)(cast(GMenuModel*) p, true); } /** * Query the number of items in @model. * * Returns: the number of items * * Since: 2.32 */ public int getNItems() { return g_menu_model_get_n_items(gMenuModel); } /** * Queries if @model is mutable. * * An immutable #GMenuModel will never emit the #GMenuModel::items-changed * signal. Consumers of the model may make optimisations accordingly. * * Returns: %TRUE if the model is mutable (ie: "items-changed" may be * emitted). * * Since: 2.32 */ public bool isMutable() { return g_menu_model_is_mutable(gMenuModel) != 0; } /** * Requests emission of the #GMenuModel::items-changed signal on @model. * * This function should never be called except by #GMenuModel * subclasses. Any other calls to this function will very likely lead * to a violation of the interface of the model. * * The implementation should update its internal representation of the * menu before emitting the signal. The implementation should further * expect to receive queries about the new state of the menu (and * particularly added menu items) while signal handlers are running. * * The implementation must dispatch this call directly from a mainloop * entry and not in response to calls -- particularly those from the * #GMenuModel API. Said another way: the menu must not change while * user code is running without returning to the mainloop. * * Params: * position = the position of the change * removed = the number of items removed * added = the number of items added * * Since: 2.32 */ public void itemsChanged(int position, int removed, int added) { g_menu_model_items_changed(gMenuModel, position, removed, added); } /** * Creates a #GMenuAttributeIter to iterate over the attributes of * the item at position @item_index in @model. * * You must free the iterator with g_object_unref() when you are done. * * Params: * itemIndex = the index of the item * * Returns: a new #GMenuAttributeIter * * Since: 2.32 */ public MenuAttributeIter iterateItemAttributes(int itemIndex) { auto p = g_menu_model_iterate_item_attributes(gMenuModel, itemIndex); if(p is null) { return null; } return ObjectG.getDObject!(MenuAttributeIter)(cast(GMenuAttributeIter*) p, true); } /** * Creates a #GMenuLinkIter to iterate over the links of the item at * position @item_index in @model. * * You must free the iterator with g_object_unref() when you are done. * * Params: * itemIndex = the index of the item * * Returns: a new #GMenuLinkIter * * Since: 2.32 */ public MenuLinkIter iterateItemLinks(int itemIndex) { auto p = g_menu_model_iterate_item_links(gMenuModel, itemIndex); if(p is null) { return null; } return ObjectG.getDObject!(MenuLinkIter)(cast(GMenuLinkIter*) p, true); } protected class OnItemsChangedDelegateWrapper { void delegate(int, int, int, MenuModel) dlg; gulong handlerId; this(void delegate(int, int, int, MenuModel) dlg) { this.dlg = dlg; onItemsChangedListeners ~= this; } void remove(OnItemsChangedDelegateWrapper source) { foreach(index, wrapper; onItemsChangedListeners) { if (wrapper.handlerId == source.handlerId) { onItemsChangedListeners[index] = null; onItemsChangedListeners = std.algorithm.remove(onItemsChangedListeners, index); break; } } } } OnItemsChangedDelegateWrapper[] onItemsChangedListeners; /** * Emitted when a change has occured to the menu. * * The only changes that can occur to a menu is that items are removed * or added. Items may not change (except by being removed and added * back in the same location). This signal is capable of describing * both of those changes (at the same time). * * The signal means that starting at the index @position, @removed * items were removed and @added items were added in their place. If * @removed is zero then only items were added. If @added is zero * then only items were removed. * * As an example, if the menu contains items a, b, c, d (in that * order) and the signal (2, 1, 3) occurs then the new composition of * the menu will be a, b, _, _, _, d (with each _ representing some * new item). * * Signal handlers may query the model (particularly the added items) * and expect to see the results of the modification that is being * reported. The signal is emitted after the modification. * * Params: * position = the position of the change * removed = the number of items removed * added = the number of items added */ gulong addOnItemsChanged(void delegate(int, int, int, MenuModel) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnItemsChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "items-changed", cast(GCallback)&callBackItemsChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackItemsChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackItemsChanged(GMenuModel* menumodelStruct, int position, int removed, int added, OnItemsChangedDelegateWrapper wrapper) { wrapper.dlg(position, removed, added, wrapper.outer); } extern(C) static void callBackItemsChangedDestroy(OnItemsChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/MountIF.d000066400000000000000000000405561324604450400175260ustar00rootroot00000000000000/* * 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 gio.MountIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.DriveIF; private import gio.FileIF; private import gio.IconIF; private import gio.MountOperation; private import gio.VolumeIF; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * The #GMount interface represents user-visible mounts. Note, when * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume. * * #GMount is a "mounted" filesystem that you can access. Mounted is in * quotes because it's not the same as a unix mount, it might be a gvfs * mount, but you can still access the files on it if you use GIO. Might or * might not be related to a volume object. * * Unmounting a #GMount instance is an asynchronous operation. For * more information about asynchronous operations, see #GAsyncResult * and #GTask. To unmount a #GMount instance, first call * g_mount_unmount_with_operation() with (at least) the #GMount instance and a * #GAsyncReadyCallback. The callback will be fired when the * operation has resolved (either with success or failure), and a * #GAsyncReady structure will be passed to the callback. That * callback should then call g_mount_unmount_with_operation_finish() with the #GMount * and the #GAsyncReady data to see if the operation was completed * successfully. If an @error is present when g_mount_unmount_with_operation_finish() * is called, then it will be filled with any error information. */ public interface MountIF{ /** Get the main Gtk struct */ public GMount* getMountStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_mount_get_type(); } /** * Checks if @mount can be ejected. * * Returns: %TRUE if the @mount can be ejected. */ public bool canEject(); /** * Checks if @mount can be unmounted. * * Returns: %TRUE if the @mount can be unmounted. */ public bool canUnmount(); /** * Ejects a mount. This is an asynchronous operation, and is * finished by calling g_mount_eject_finish() with the @mount * and #GAsyncResult data returned in the @callback. * * Deprecated: Use g_mount_eject_with_operation() instead. * * Params: * flags = flags affecting the unmount if required for eject * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. */ public void eject(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes ejecting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Deprecated: Use g_mount_eject_with_operation_finish() instead. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. * * Throws: GException on failure. */ public bool ejectFinish(AsyncResultIF result); /** * Ejects a mount. This is an asynchronous operation, and is * finished by calling g_mount_eject_with_operation_finish() with the @mount * and #GAsyncResult data returned in the @callback. * * Params: * flags = flags affecting the unmount if required for eject * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. * * Since: 2.22 */ public void ejectWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes ejecting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool ejectWithOperationFinish(AsyncResultIF result); /** * Gets the default location of @mount. The default location of the given * @mount is a path that reflects the main entry point for the user (e.g. * the home directory, or the root of the volume). * * Returns: a #GFile. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public FileIF getDefaultLocation(); /** * Gets the drive for the @mount. * * This is a convenience method for getting the #GVolume and then * using that object to get the #GDrive. * * Returns: a #GDrive or %NULL if @mount is not associated with a volume or a drive. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public DriveIF getDrive(); /** * Gets the icon for @mount. * * Returns: a #GIcon. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public IconIF getIcon(); /** * Gets the name of @mount. * * Returns: the name for the given @mount. * The returned string should be freed with g_free() * when no longer needed. */ public string getName(); /** * Gets the root directory on @mount. * * Returns: a #GFile. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public FileIF getRoot(); /** * Gets the sort key for @mount, if any. * * Returns: Sorting key for @mount or %NULL if no such key is available. * * Since: 2.32 */ public string getSortKey(); /** * Gets the symbolic icon for @mount. * * Returns: a #GIcon. * The returned object should be unreffed with * g_object_unref() when no longer needed. * * Since: 2.34 */ public IconIF getSymbolicIcon(); /** * Gets the UUID for the @mount. The reference is typically based on * the file system UUID for the mount in question and should be * considered an opaque string. Returns %NULL if there is no UUID * available. * * Returns: the UUID for @mount or %NULL if no UUID can be computed. * The returned string should be freed with g_free() * when no longer needed. */ public string getUuid(); /** * Gets the volume for the @mount. * * Returns: a #GVolume or %NULL if @mount is not associated with a volume. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public VolumeIF getVolume(); /** * Tries to guess the type of content stored on @mount. Returns one or * more textual identifiers of well-known content types (typically * prefixed with "x-content/"), e.g. x-content/image-dcf for camera * memory cards. See the * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) * specification for more on x-content types. * * This is an asynchronous operation (see * g_mount_guess_content_type_sync() for the synchronous version), and * is finished by calling g_mount_guess_content_type_finish() with the * @mount and #GAsyncResult data returned in the @callback. * * Params: * forceRescan = Whether to force a rescan of the content. * Otherwise a cached result will be used if available * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback * userData = user data passed to @callback * * Since: 2.18 */ public void guessContentType(bool forceRescan, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes guessing content types of @mount. If any errors occurred * during the operation, @error will be set to contain the errors and * %FALSE will be returned. In particular, you may get an * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content * guessing. * * Params: * result = a #GAsyncResult * * Returns: a %NULL-terminated array of content types or %NULL on error. * Caller should free this array with g_strfreev() when done with it. * * Since: 2.18 * * Throws: GException on failure. */ public string[] guessContentTypeFinish(AsyncResultIF result); /** * Tries to guess the type of content stored on @mount. Returns one or * more textual identifiers of well-known content types (typically * prefixed with "x-content/"), e.g. x-content/image-dcf for camera * memory cards. See the * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) * specification for more on x-content types. * * This is an synchronous operation and as such may block doing IO; * see g_mount_guess_content_type() for the asynchronous version. * * Params: * forceRescan = Whether to force a rescan of the content. * Otherwise a cached result will be used if available * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: a %NULL-terminated array of content types or %NULL on error. * Caller should free this array with g_strfreev() when done with it. * * Since: 2.18 * * Throws: GException on failure. */ public string[] guessContentTypeSync(bool forceRescan, Cancellable cancellable); /** * Determines if @mount is shadowed. Applications or libraries should * avoid displaying @mount in the user interface if it is shadowed. * * A mount is said to be shadowed if there exists one or more user * visible objects (currently #GMount objects) with a root that is * inside the root of @mount. * * One application of shadow mounts is when exposing a single file * system that is used to address several logical volumes. In this * situation, a #GVolumeMonitor implementation would create two * #GVolume objects (for example, one for the camera functionality of * the device and one for a SD card reader on the device) with * activation URIs `gphoto2://[usb:001,002]/store1/` * and `gphoto2://[usb:001,002]/store2/`. When the * underlying mount (with root * `gphoto2://[usb:001,002]/`) is mounted, said * #GVolumeMonitor implementation would create two #GMount objects * (each with their root matching the corresponding volume activation * root) that would shadow the original mount. * * The proxy monitor in GVfs 2.26 and later, automatically creates and * manage shadow mounts (and shadows the underlying mount) if the * activation root on a #GVolume is set. * * Returns: %TRUE if @mount is shadowed. * * Since: 2.20 */ public bool isShadowed(); /** * Remounts a mount. This is an asynchronous operation, and is * finished by calling g_mount_remount_finish() with the @mount * and #GAsyncResults data returned in the @callback. * * Remounting is useful when some setting affecting the operation * of the volume has been changed, as these may need a remount to * take affect. While this is semantically equivalent with unmounting * and then remounting not all backends might need to actually be * unmounted. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. */ public void remount(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes remounting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise. * * Throws: GException on failure. */ public bool remountFinish(AsyncResultIF result); /** * Increments the shadow count on @mount. Usually used by * #GVolumeMonitor implementations when creating a shadow mount for * @mount, see g_mount_is_shadowed() for more information. The caller * will need to emit the #GMount::changed signal on @mount manually. * * Since: 2.20 */ public void shadow(); /** * Unmounts a mount. This is an asynchronous operation, and is * finished by calling g_mount_unmount_finish() with the @mount * and #GAsyncResult data returned in the @callback. * * Deprecated: Use g_mount_unmount_with_operation() instead. * * Params: * flags = flags affecting the operation * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. */ public void unmount(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes unmounting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Deprecated: Use g_mount_unmount_with_operation_finish() instead. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. * * Throws: GException on failure. */ public bool unmountFinish(AsyncResultIF result); /** * Unmounts a mount. This is an asynchronous operation, and is * finished by calling g_mount_unmount_with_operation_finish() with the @mount * and #GAsyncResult data returned in the @callback. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. * * Since: 2.22 */ public void unmountWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes unmounting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool unmountWithOperationFinish(AsyncResultIF result); /** * Decrements the shadow count on @mount. Usually used by * #GVolumeMonitor implementations when destroying a shadow mount for * @mount, see g_mount_is_shadowed() for more information. The caller * will need to emit the #GMount::changed signal on @mount manually. * * Since: 2.20 */ public void unshadow(); /** * Emitted when the mount has been changed. */ gulong addOnChanged(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * This signal is emitted when the #GMount is about to be * unmounted. * * Since: 2.22 */ gulong addOnPreUnmount(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * This signal is emitted when the #GMount have been * unmounted. If the recipient is holding references to the * object they should release them so the object can be * finalized. */ gulong addOnUnmounted(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/gio/MountOperation.d000066400000000000000000000440361324604450400211650ustar00rootroot00000000000000/* * 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 gio.MountOperation; private import gio.c.functions; public import gio.c.types; private import glib.ArrayG; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GMountOperation provides a mechanism for interacting with the user. * It can be used for authenticating mountable operations, such as loop * mounting files, hard drive partitions or server locations. It can * also be used to ask the user questions or show a list of applications * preventing unmount or eject operations from completing. * * Note that #GMountOperation is used for more than just #GMount * objects – for example it is also used in g_drive_start() and * g_drive_stop(). * * Users should instantiate a subclass of this that implements all the * various callbacks to show the required dialogs, such as * #GtkMountOperation. If no user interaction is desired (for example * when automounting filesystems at login time), usually %NULL can be * passed, see each method taking a #GMountOperation for details. */ public class MountOperation : ObjectG { /** the main Gtk struct */ protected GMountOperation* gMountOperation; /** Get the main Gtk struct */ public GMountOperation* getMountOperationStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMountOperation; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gMountOperation; } protected override void setStruct(GObject* obj) { gMountOperation = cast(GMountOperation*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GMountOperation* gMountOperation, bool ownedRef = false) { this.gMountOperation = gMountOperation; super(cast(GObject*)gMountOperation, ownedRef); } /** */ public static GType getType() { return g_mount_operation_get_type(); } /** * Creates a new mount operation. * * Returns: a #GMountOperation. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_mount_operation_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GMountOperation*) p, true); } /** * Check to see whether the mount operation is being used * for an anonymous user. * * Returns: %TRUE if mount operation is anonymous. */ public bool getAnonymous() { return g_mount_operation_get_anonymous(gMountOperation) != 0; } /** * Gets a choice from the mount operation. * * Returns: an integer containing an index of the user's choice from * the choice's list, or %0. */ public int getChoice() { return g_mount_operation_get_choice(gMountOperation); } /** * Gets the domain of the mount operation. * * Returns: a string set to the domain. */ public string getDomain() { return Str.toString(g_mount_operation_get_domain(gMountOperation)); } /** * Gets a password from the mount operation. * * Returns: a string containing the password within @op. */ public string getPassword() { return Str.toString(g_mount_operation_get_password(gMountOperation)); } /** * Gets the state of saving passwords for the mount operation. * * Returns: a #GPasswordSave flag. */ public GPasswordSave getPasswordSave() { return g_mount_operation_get_password_save(gMountOperation); } /** * Get the user name from the mount operation. * * Returns: a string containing the user name. */ public string getUsername() { return Str.toString(g_mount_operation_get_username(gMountOperation)); } /** * Emits the #GMountOperation::reply signal. * * Params: * result = a #GMountOperationResult */ public void reply(GMountOperationResult result) { g_mount_operation_reply(gMountOperation, result); } /** * Sets the mount operation to use an anonymous user if @anonymous is %TRUE. * * Params: * anonymous = boolean value. */ public void setAnonymous(bool anonymous) { g_mount_operation_set_anonymous(gMountOperation, anonymous); } /** * Sets a default choice for the mount operation. * * Params: * choice = an integer. */ public void setChoice(int choice) { g_mount_operation_set_choice(gMountOperation, choice); } /** * Sets the mount operation's domain. * * Params: * domain = the domain to set. */ public void setDomain(string domain) { g_mount_operation_set_domain(gMountOperation, Str.toStringz(domain)); } /** * Sets the mount operation's password to @password. * * Params: * password = password to set. */ public void setPassword(string password) { g_mount_operation_set_password(gMountOperation, Str.toStringz(password)); } /** * Sets the state of saving passwords for the mount operation. * * Params: * save = a set of #GPasswordSave flags. */ public void setPasswordSave(GPasswordSave save) { g_mount_operation_set_password_save(gMountOperation, save); } /** * Sets the user name within @op to @username. * * Params: * username = input username. */ public void setUsername(string username) { g_mount_operation_set_username(gMountOperation, Str.toStringz(username)); } protected class OnAbortedDelegateWrapper { void delegate(MountOperation) dlg; gulong handlerId; this(void delegate(MountOperation) dlg) { this.dlg = dlg; onAbortedListeners ~= this; } void remove(OnAbortedDelegateWrapper source) { foreach(index, wrapper; onAbortedListeners) { if (wrapper.handlerId == source.handlerId) { onAbortedListeners[index] = null; onAbortedListeners = std.algorithm.remove(onAbortedListeners, index); break; } } } } OnAbortedDelegateWrapper[] onAbortedListeners; /** * Emitted by the backend when e.g. a device becomes unavailable * while a mount operation is in progress. * * Implementations of GMountOperation should handle this signal * by dismissing open password dialogs. * * Since: 2.20 */ gulong addOnAborted(void delegate(MountOperation) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAbortedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "aborted", cast(GCallback)&callBackAborted, cast(void*)wrapper, cast(GClosureNotify)&callBackAbortedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackAborted(GMountOperation* mountoperationStruct, OnAbortedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackAbortedDestroy(OnAbortedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnAskPasswordDelegateWrapper { void delegate(string, string, string, GAskPasswordFlags, MountOperation) dlg; gulong handlerId; this(void delegate(string, string, string, GAskPasswordFlags, MountOperation) dlg) { this.dlg = dlg; onAskPasswordListeners ~= this; } void remove(OnAskPasswordDelegateWrapper source) { foreach(index, wrapper; onAskPasswordListeners) { if (wrapper.handlerId == source.handlerId) { onAskPasswordListeners[index] = null; onAskPasswordListeners = std.algorithm.remove(onAskPasswordListeners, index); break; } } } } OnAskPasswordDelegateWrapper[] onAskPasswordListeners; /** * Emitted when a mount operation asks the user for a password. * * If the message contains a line break, the first line should be * presented as a heading. For example, it may be used as the * primary text in a #GtkMessageDialog. * * Params: * message = string containing a message to display to the user. * defaultUser = string containing the default user name. * defaultDomain = string containing the default domain. * flags = a set of #GAskPasswordFlags. */ gulong addOnAskPassword(void delegate(string, string, string, GAskPasswordFlags, MountOperation) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAskPasswordDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "ask-password", cast(GCallback)&callBackAskPassword, cast(void*)wrapper, cast(GClosureNotify)&callBackAskPasswordDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackAskPassword(GMountOperation* mountoperationStruct, char* message, char* defaultUser, char* defaultDomain, GAskPasswordFlags flags, OnAskPasswordDelegateWrapper wrapper) { wrapper.dlg(Str.toString(message), Str.toString(defaultUser), Str.toString(defaultDomain), flags, wrapper.outer); } extern(C) static void callBackAskPasswordDestroy(OnAskPasswordDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnAskQuestionDelegateWrapper { void delegate(string, string[], MountOperation) dlg; gulong handlerId; this(void delegate(string, string[], MountOperation) dlg) { this.dlg = dlg; onAskQuestionListeners ~= this; } void remove(OnAskQuestionDelegateWrapper source) { foreach(index, wrapper; onAskQuestionListeners) { if (wrapper.handlerId == source.handlerId) { onAskQuestionListeners[index] = null; onAskQuestionListeners = std.algorithm.remove(onAskQuestionListeners, index); break; } } } } OnAskQuestionDelegateWrapper[] onAskQuestionListeners; /** * Emitted when asking the user a question and gives a list of * choices for the user to choose from. * * If the message contains a line break, the first line should be * presented as a heading. For example, it may be used as the * primary text in a #GtkMessageDialog. * * Params: * message = string containing a message to display to the user. * choices = an array of strings for each possible choice. */ gulong addOnAskQuestion(void delegate(string, string[], MountOperation) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAskQuestionDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "ask-question", cast(GCallback)&callBackAskQuestion, cast(void*)wrapper, cast(GClosureNotify)&callBackAskQuestionDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackAskQuestion(GMountOperation* mountoperationStruct, char* message, char** choices, OnAskQuestionDelegateWrapper wrapper) { wrapper.dlg(Str.toString(message), Str.toStringArray(choices), wrapper.outer); } extern(C) static void callBackAskQuestionDestroy(OnAskQuestionDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnReplyDelegateWrapper { void delegate(GMountOperationResult, MountOperation) dlg; gulong handlerId; this(void delegate(GMountOperationResult, MountOperation) dlg) { this.dlg = dlg; onReplyListeners ~= this; } void remove(OnReplyDelegateWrapper source) { foreach(index, wrapper; onReplyListeners) { if (wrapper.handlerId == source.handlerId) { onReplyListeners[index] = null; onReplyListeners = std.algorithm.remove(onReplyListeners, index); break; } } } } OnReplyDelegateWrapper[] onReplyListeners; /** * Emitted when the user has replied to the mount operation. * * Params: * result = a #GMountOperationResult indicating how the request was handled */ gulong addOnReply(void delegate(GMountOperationResult, MountOperation) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnReplyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "reply", cast(GCallback)&callBackReply, cast(void*)wrapper, cast(GClosureNotify)&callBackReplyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackReply(GMountOperation* mountoperationStruct, GMountOperationResult result, OnReplyDelegateWrapper wrapper) { wrapper.dlg(result, wrapper.outer); } extern(C) static void callBackReplyDestroy(OnReplyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnShowProcessesDelegateWrapper { void delegate(string, ArrayG, string[], MountOperation) dlg; gulong handlerId; this(void delegate(string, ArrayG, string[], MountOperation) dlg) { this.dlg = dlg; onShowProcessesListeners ~= this; } void remove(OnShowProcessesDelegateWrapper source) { foreach(index, wrapper; onShowProcessesListeners) { if (wrapper.handlerId == source.handlerId) { onShowProcessesListeners[index] = null; onShowProcessesListeners = std.algorithm.remove(onShowProcessesListeners, index); break; } } } } OnShowProcessesDelegateWrapper[] onShowProcessesListeners; /** * Emitted when one or more processes are blocking an operation * e.g. unmounting/ejecting a #GMount or stopping a #GDrive. * * Note that this signal may be emitted several times to update the * list of blocking processes as processes close files. The * application should only respond with g_mount_operation_reply() to * the latest signal (setting #GMountOperation:choice to the choice * the user made). * * If the message contains a line break, the first line should be * presented as a heading. For example, it may be used as the * primary text in a #GtkMessageDialog. * * Params: * message = string containing a message to display to the user. * processes = an array of #GPid for processes * blocking the operation. * choices = an array of strings for each possible choice. * * Since: 2.22 */ gulong addOnShowProcesses(void delegate(string, ArrayG, string[], MountOperation) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnShowProcessesDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "show-processes", cast(GCallback)&callBackShowProcesses, cast(void*)wrapper, cast(GClosureNotify)&callBackShowProcessesDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackShowProcesses(GMountOperation* mountoperationStruct, char* message, GArray* processes, char** choices, OnShowProcessesDelegateWrapper wrapper) { wrapper.dlg(Str.toString(message), new ArrayG(processes), Str.toStringArray(choices), wrapper.outer); } extern(C) static void callBackShowProcessesDestroy(OnShowProcessesDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnShowUnmountProgressDelegateWrapper { void delegate(string, long, long, MountOperation) dlg; gulong handlerId; this(void delegate(string, long, long, MountOperation) dlg) { this.dlg = dlg; onShowUnmountProgressListeners ~= this; } void remove(OnShowUnmountProgressDelegateWrapper source) { foreach(index, wrapper; onShowUnmountProgressListeners) { if (wrapper.handlerId == source.handlerId) { onShowUnmountProgressListeners[index] = null; onShowUnmountProgressListeners = std.algorithm.remove(onShowUnmountProgressListeners, index); break; } } } } OnShowUnmountProgressDelegateWrapper[] onShowUnmountProgressListeners; /** * Emitted when an unmount operation has been busy for more than some time * (typically 1.5 seconds). * * When unmounting or ejecting a volume, the kernel might need to flush * pending data in its buffers to the volume stable storage, and this operation * can take a considerable amount of time. This signal may be emitted several * times as long as the unmount operation is outstanding, and then one * last time when the operation is completed, with @bytes_left set to zero. * * Implementations of GMountOperation should handle this signal by * showing an UI notification, and then dismiss it, or show another notification * of completion, when @bytes_left reaches zero. * * If the message contains a line break, the first line should be * presented as a heading. For example, it may be used as the * primary text in a #GtkMessageDialog. * * Params: * message = string containing a mesage to display to the user * timeLeft = the estimated time left before the operation completes, * in microseconds, or -1 * bytesLeft = the amount of bytes to be written before the operation * completes (or -1 if such amount is not known), or zero if the operation * is completed * * Since: 2.34 */ gulong addOnShowUnmountProgress(void delegate(string, long, long, MountOperation) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnShowUnmountProgressDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "show-unmount-progress", cast(GCallback)&callBackShowUnmountProgress, cast(void*)wrapper, cast(GClosureNotify)&callBackShowUnmountProgressDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackShowUnmountProgress(GMountOperation* mountoperationStruct, char* message, long timeLeft, long bytesLeft, OnShowUnmountProgressDelegateWrapper wrapper) { wrapper.dlg(Str.toString(message), timeLeft, bytesLeft, wrapper.outer); } extern(C) static void callBackShowUnmountProgressDestroy(OnShowUnmountProgressDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/MountT.d000066400000000000000000000576501324604450400174360ustar00rootroot00000000000000/* * 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 gio.MountT; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.DriveIF; public import gio.FileIF; public import gio.IconIF; public import gio.MountOperation; public import gio.VolumeIF; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; /** * The #GMount interface represents user-visible mounts. Note, when * porting from GnomeVFS, #GMount is the moral equivalent of #GnomeVFSVolume. * * #GMount is a "mounted" filesystem that you can access. Mounted is in * quotes because it's not the same as a unix mount, it might be a gvfs * mount, but you can still access the files on it if you use GIO. Might or * might not be related to a volume object. * * Unmounting a #GMount instance is an asynchronous operation. For * more information about asynchronous operations, see #GAsyncResult * and #GTask. To unmount a #GMount instance, first call * g_mount_unmount_with_operation() with (at least) the #GMount instance and a * #GAsyncReadyCallback. The callback will be fired when the * operation has resolved (either with success or failure), and a * #GAsyncReady structure will be passed to the callback. That * callback should then call g_mount_unmount_with_operation_finish() with the #GMount * and the #GAsyncReady data to see if the operation was completed * successfully. If an @error is present when g_mount_unmount_with_operation_finish() * is called, then it will be filled with any error information. */ public template MountT(TStruct) { /** Get the main Gtk struct */ public GMount* getMountStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GMount*)getStruct(); } /** * Checks if @mount can be ejected. * * Returns: %TRUE if the @mount can be ejected. */ public bool canEject() { return g_mount_can_eject(getMountStruct()) != 0; } /** * Checks if @mount can be unmounted. * * Returns: %TRUE if the @mount can be unmounted. */ public bool canUnmount() { return g_mount_can_unmount(getMountStruct()) != 0; } /** * Ejects a mount. This is an asynchronous operation, and is * finished by calling g_mount_eject_finish() with the @mount * and #GAsyncResult data returned in the @callback. * * Deprecated: Use g_mount_eject_with_operation() instead. * * Params: * flags = flags affecting the unmount if required for eject * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. */ public void eject(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_mount_eject(getMountStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes ejecting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Deprecated: Use g_mount_eject_with_operation_finish() instead. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. * * Throws: GException on failure. */ public bool ejectFinish(AsyncResultIF result) { GError* err = null; auto p = g_mount_eject_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Ejects a mount. This is an asynchronous operation, and is * finished by calling g_mount_eject_with_operation_finish() with the @mount * and #GAsyncResult data returned in the @callback. * * Params: * flags = flags affecting the unmount if required for eject * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. * * Since: 2.22 */ public void ejectWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_mount_eject_with_operation(getMountStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes ejecting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool ejectWithOperationFinish(AsyncResultIF result) { GError* err = null; auto p = g_mount_eject_with_operation_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the default location of @mount. The default location of the given * @mount is a path that reflects the main entry point for the user (e.g. * the home directory, or the root of the volume). * * Returns: a #GFile. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public FileIF getDefaultLocation() { auto p = g_mount_get_default_location(getMountStruct()); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets the drive for the @mount. * * This is a convenience method for getting the #GVolume and then * using that object to get the #GDrive. * * Returns: a #GDrive or %NULL if @mount is not associated with a volume or a drive. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public DriveIF getDrive() { auto p = g_mount_get_drive(getMountStruct()); if(p is null) { return null; } return ObjectG.getDObject!(DriveIF)(cast(GDrive*) p, true); } /** * Gets the icon for @mount. * * Returns: a #GIcon. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public IconIF getIcon() { auto p = g_mount_get_icon(getMountStruct()); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Gets the name of @mount. * * Returns: the name for the given @mount. * The returned string should be freed with g_free() * when no longer needed. */ public string getName() { auto retStr = g_mount_get_name(getMountStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the root directory on @mount. * * Returns: a #GFile. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public FileIF getRoot() { auto p = g_mount_get_root(getMountStruct()); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets the sort key for @mount, if any. * * Returns: Sorting key for @mount or %NULL if no such key is available. * * Since: 2.32 */ public string getSortKey() { return Str.toString(g_mount_get_sort_key(getMountStruct())); } /** * Gets the symbolic icon for @mount. * * Returns: a #GIcon. * The returned object should be unreffed with * g_object_unref() when no longer needed. * * Since: 2.34 */ public IconIF getSymbolicIcon() { auto p = g_mount_get_symbolic_icon(getMountStruct()); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Gets the UUID for the @mount. The reference is typically based on * the file system UUID for the mount in question and should be * considered an opaque string. Returns %NULL if there is no UUID * available. * * Returns: the UUID for @mount or %NULL if no UUID can be computed. * The returned string should be freed with g_free() * when no longer needed. */ public string getUuid() { auto retStr = g_mount_get_uuid(getMountStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the volume for the @mount. * * Returns: a #GVolume or %NULL if @mount is not associated with a volume. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ public VolumeIF getVolume() { auto p = g_mount_get_volume(getMountStruct()); if(p is null) { return null; } return ObjectG.getDObject!(VolumeIF)(cast(GVolume*) p, true); } /** * Tries to guess the type of content stored on @mount. Returns one or * more textual identifiers of well-known content types (typically * prefixed with "x-content/"), e.g. x-content/image-dcf for camera * memory cards. See the * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) * specification for more on x-content types. * * This is an asynchronous operation (see * g_mount_guess_content_type_sync() for the synchronous version), and * is finished by calling g_mount_guess_content_type_finish() with the * @mount and #GAsyncResult data returned in the @callback. * * Params: * forceRescan = Whether to force a rescan of the content. * Otherwise a cached result will be used if available * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback * userData = user data passed to @callback * * Since: 2.18 */ public void guessContentType(bool forceRescan, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_mount_guess_content_type(getMountStruct(), forceRescan, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes guessing content types of @mount. If any errors occurred * during the operation, @error will be set to contain the errors and * %FALSE will be returned. In particular, you may get an * %G_IO_ERROR_NOT_SUPPORTED if the mount does not support content * guessing. * * Params: * result = a #GAsyncResult * * Returns: a %NULL-terminated array of content types or %NULL on error. * Caller should free this array with g_strfreev() when done with it. * * Since: 2.18 * * Throws: GException on failure. */ public string[] guessContentTypeFinish(AsyncResultIF result) { GError* err = null; auto retStr = g_mount_guess_content_type_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Tries to guess the type of content stored on @mount. Returns one or * more textual identifiers of well-known content types (typically * prefixed with "x-content/"), e.g. x-content/image-dcf for camera * memory cards. See the * [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) * specification for more on x-content types. * * This is an synchronous operation and as such may block doing IO; * see g_mount_guess_content_type() for the asynchronous version. * * Params: * forceRescan = Whether to force a rescan of the content. * Otherwise a cached result will be used if available * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: a %NULL-terminated array of content types or %NULL on error. * Caller should free this array with g_strfreev() when done with it. * * Since: 2.18 * * Throws: GException on failure. */ public string[] guessContentTypeSync(bool forceRescan, Cancellable cancellable) { GError* err = null; auto retStr = g_mount_guess_content_type_sync(getMountStruct(), forceRescan, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Determines if @mount is shadowed. Applications or libraries should * avoid displaying @mount in the user interface if it is shadowed. * * A mount is said to be shadowed if there exists one or more user * visible objects (currently #GMount objects) with a root that is * inside the root of @mount. * * One application of shadow mounts is when exposing a single file * system that is used to address several logical volumes. In this * situation, a #GVolumeMonitor implementation would create two * #GVolume objects (for example, one for the camera functionality of * the device and one for a SD card reader on the device) with * activation URIs `gphoto2://[usb:001,002]/store1/` * and `gphoto2://[usb:001,002]/store2/`. When the * underlying mount (with root * `gphoto2://[usb:001,002]/`) is mounted, said * #GVolumeMonitor implementation would create two #GMount objects * (each with their root matching the corresponding volume activation * root) that would shadow the original mount. * * The proxy monitor in GVfs 2.26 and later, automatically creates and * manage shadow mounts (and shadows the underlying mount) if the * activation root on a #GVolume is set. * * Returns: %TRUE if @mount is shadowed. * * Since: 2.20 */ public bool isShadowed() { return g_mount_is_shadowed(getMountStruct()) != 0; } /** * Remounts a mount. This is an asynchronous operation, and is * finished by calling g_mount_remount_finish() with the @mount * and #GAsyncResults data returned in the @callback. * * Remounting is useful when some setting affecting the operation * of the volume has been changed, as these may need a remount to * take affect. While this is semantically equivalent with unmounting * and then remounting not all backends might need to actually be * unmounted. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. */ public void remount(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_mount_remount(getMountStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes remounting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise. * * Throws: GException on failure. */ public bool remountFinish(AsyncResultIF result) { GError* err = null; auto p = g_mount_remount_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Increments the shadow count on @mount. Usually used by * #GVolumeMonitor implementations when creating a shadow mount for * @mount, see g_mount_is_shadowed() for more information. The caller * will need to emit the #GMount::changed signal on @mount manually. * * Since: 2.20 */ public void shadow() { g_mount_shadow(getMountStruct()); } /** * Unmounts a mount. This is an asynchronous operation, and is * finished by calling g_mount_unmount_finish() with the @mount * and #GAsyncResult data returned in the @callback. * * Deprecated: Use g_mount_unmount_with_operation() instead. * * Params: * flags = flags affecting the operation * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. */ public void unmount(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_mount_unmount(getMountStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes unmounting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Deprecated: Use g_mount_unmount_with_operation_finish() instead. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. * * Throws: GException on failure. */ public bool unmountFinish(AsyncResultIF result) { GError* err = null; auto p = g_mount_unmount_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Unmounts a mount. This is an asynchronous operation, and is * finished by calling g_mount_unmount_with_operation_finish() with the @mount * and #GAsyncResult data returned in the @callback. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation or %NULL to avoid * user interaction. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback, or %NULL. * userData = user data passed to @callback. * * Since: 2.22 */ public void unmountWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_mount_unmount_with_operation(getMountStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes unmounting a mount. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. * * Since: 2.22 * * Throws: GException on failure. */ public bool unmountWithOperationFinish(AsyncResultIF result) { GError* err = null; auto p = g_mount_unmount_with_operation_finish(getMountStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Decrements the shadow count on @mount. Usually used by * #GVolumeMonitor implementations when destroying a shadow mount for * @mount, see g_mount_is_shadowed() for more information. The caller * will need to emit the #GMount::changed signal on @mount manually. * * Since: 2.20 */ public void unshadow() { g_mount_unshadow(getMountStruct()); } protected class OnChangedDelegateWrapper { void delegate(MountIF) dlg; gulong handlerId; this(void delegate(MountIF) dlg) { this.dlg = dlg; onChangedListeners ~= this; } void remove(OnChangedDelegateWrapper source) { foreach(index, wrapper; onChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChangedListeners[index] = null; onChangedListeners = std.algorithm.remove(onChangedListeners, index); break; } } } } OnChangedDelegateWrapper[] onChangedListeners; /** * Emitted when the mount has been changed. */ gulong addOnChanged(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "changed", cast(GCallback)&callBackChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChanged(GMount* mountStruct, OnChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackChangedDestroy(OnChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPreUnmountDelegateWrapper { void delegate(MountIF) dlg; gulong handlerId; this(void delegate(MountIF) dlg) { this.dlg = dlg; onPreUnmountListeners ~= this; } void remove(OnPreUnmountDelegateWrapper source) { foreach(index, wrapper; onPreUnmountListeners) { if (wrapper.handlerId == source.handlerId) { onPreUnmountListeners[index] = null; onPreUnmountListeners = std.algorithm.remove(onPreUnmountListeners, index); break; } } } } OnPreUnmountDelegateWrapper[] onPreUnmountListeners; /** * This signal is emitted when the #GMount is about to be * unmounted. * * Since: 2.22 */ gulong addOnPreUnmount(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPreUnmountDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "pre-unmount", cast(GCallback)&callBackPreUnmount, cast(void*)wrapper, cast(GClosureNotify)&callBackPreUnmountDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPreUnmount(GMount* mountStruct, OnPreUnmountDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackPreUnmountDestroy(OnPreUnmountDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnUnmountedDelegateWrapper { void delegate(MountIF) dlg; gulong handlerId; this(void delegate(MountIF) dlg) { this.dlg = dlg; onUnmountedListeners ~= this; } void remove(OnUnmountedDelegateWrapper source) { foreach(index, wrapper; onUnmountedListeners) { if (wrapper.handlerId == source.handlerId) { onUnmountedListeners[index] = null; onUnmountedListeners = std.algorithm.remove(onUnmountedListeners, index); break; } } } } OnUnmountedDelegateWrapper[] onUnmountedListeners; /** * This signal is emitted when the #GMount have been * unmounted. If the recipient is holding references to the * object they should release them so the object can be * finalized. */ gulong addOnUnmounted(void delegate(MountIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnUnmountedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "unmounted", cast(GCallback)&callBackUnmounted, cast(void*)wrapper, cast(GClosureNotify)&callBackUnmountedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackUnmounted(GMount* mountStruct, OnUnmountedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackUnmountedDestroy(OnUnmountedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/NativeVolumeMonitor.d000066400000000000000000000040621324604450400221630ustar00rootroot00000000000000/* * 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 gio.NativeVolumeMonitor; private import gio.VolumeMonitor; private import gio.c.functions; public import gio.c.types; public import gtkc.giotypes; /** */ public class NativeVolumeMonitor : VolumeMonitor { /** the main Gtk struct */ protected GNativeVolumeMonitor* gNativeVolumeMonitor; /** Get the main Gtk struct */ public GNativeVolumeMonitor* getNativeVolumeMonitorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gNativeVolumeMonitor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gNativeVolumeMonitor; } protected override void setStruct(GObject* obj) { gNativeVolumeMonitor = cast(GNativeVolumeMonitor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GNativeVolumeMonitor* gNativeVolumeMonitor, bool ownedRef = false) { this.gNativeVolumeMonitor = gNativeVolumeMonitor; super(cast(GVolumeMonitor*)gNativeVolumeMonitor, ownedRef); } /** */ public static GType getType() { return g_native_volume_monitor_get_type(); } } GtkD-3.7.5/generated/gtkd/gio/NetworkAddress.d000066400000000000000000000172561324604450400211450ustar00rootroot00000000000000/* * 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 gio.NetworkAddress; private import gio.SocketConnectableIF; private import gio.SocketConnectableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GNetworkAddress provides an easy way to resolve a hostname and * then attempt to connect to that host, handling the possibility of * multiple IP addresses and multiple address families. * * See #GSocketConnectable for and example of using the connectable * interface. */ public class NetworkAddress : ObjectG, SocketConnectableIF { /** the main Gtk struct */ protected GNetworkAddress* gNetworkAddress; /** Get the main Gtk struct */ public GNetworkAddress* getNetworkAddressStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gNetworkAddress; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gNetworkAddress; } protected override void setStruct(GObject* obj) { gNetworkAddress = cast(GNetworkAddress*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GNetworkAddress* gNetworkAddress, bool ownedRef = false) { this.gNetworkAddress = gNetworkAddress; super(cast(GObject*)gNetworkAddress, ownedRef); } // add the SocketConnectable capabilities mixin SocketConnectableT!(GNetworkAddress); /** */ public static GType getType() { return g_network_address_get_type(); } /** * Creates a new #GSocketConnectable for connecting to the given * @hostname and @port. * * Note that depending on the configuration of the machine, a * @hostname of `localhost` may refer to the IPv4 loopback address * only, or to both IPv4 and IPv6; use * g_network_address_new_loopback() to create a #GNetworkAddress that * is guaranteed to resolve to both addresses. * * Params: * hostname = the hostname * port = the port * * Returns: the new #GNetworkAddress * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string hostname, ushort port) { auto p = g_network_address_new(Str.toStringz(hostname), port); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GNetworkAddress*) p, true); } /** * Creates a new #GSocketConnectable for connecting to the local host * over a loopback connection to the given @port. This is intended for * use in connecting to local services which may be running on IPv4 or * IPv6. * * The connectable will return IPv4 and IPv6 loopback addresses, * regardless of how the host resolves `localhost`. By contrast, * g_network_address_new() will often only return an IPv4 address when * resolving `localhost`, and an IPv6 address for `localhost6`. * * g_network_address_get_hostname() will always return `localhost` for * #GNetworkAddresses created with this constructor. * * Params: * port = the port * * Returns: the new #GNetworkAddress * * Since: 2.44 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ushort port) { auto p = g_network_address_new_loopback(port); if(p is null) { throw new ConstructionException("null returned by new_loopback"); } this(cast(GNetworkAddress*) p, true); } /** * Creates a new #GSocketConnectable for connecting to the given * @hostname and @port. May fail and return %NULL in case * parsing @host_and_port fails. * * @host_and_port may be in any of a number of recognised formats; an IPv6 * address, an IPv4 address, or a domain name (in which case a DNS * lookup is performed). Quoting with [] is supported for all address * types. A port override may be specified in the usual way with a * colon. * * If no port is specified in @host_and_port then @default_port will be * used as the port number to connect to. * * In general, @host_and_port is expected to be provided by the user * (allowing them to give the hostname, and a port overide if necessary) * and @default_port is expected to be provided by the application. * * (The port component of @host_and_port can also be specified as a * service name rather than as a numeric port, but this functionality * is deprecated, because it depends on the contents of /etc/services, * which is generally quite sparse on platforms other than Linux.) * * Params: * hostAndPort = the hostname and optionally a port * defaultPort = the default port if not in @host_and_port * * Returns: the new * #GNetworkAddress, or %NULL on error * * Since: 2.22 * * Throws: GException on failure. */ public static NetworkAddress parse(string hostAndPort, ushort defaultPort) { GError* err = null; auto p = g_network_address_parse(Str.toStringz(hostAndPort), defaultPort, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(NetworkAddress)(cast(GNetworkAddress*) p, true); } /** * Creates a new #GSocketConnectable for connecting to the given * @uri. May fail and return %NULL in case parsing @uri fails. * * Using this rather than g_network_address_new() or * g_network_address_parse() allows #GSocketClient to determine * when to use application-specific proxy protocols. * * Params: * uri = the hostname and optionally a port * defaultPort = The default port if none is found in the URI * * Returns: the new * #GNetworkAddress, or %NULL on error * * Since: 2.26 * * Throws: GException on failure. */ public static NetworkAddress parseUri(string uri, ushort defaultPort) { GError* err = null; auto p = g_network_address_parse_uri(Str.toStringz(uri), defaultPort, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(NetworkAddress)(cast(GNetworkAddress*) p, true); } /** * Gets @addr's hostname. This might be either UTF-8 or ASCII-encoded, * depending on what @addr was created with. * * Returns: @addr's hostname * * Since: 2.22 */ public string getHostname() { return Str.toString(g_network_address_get_hostname(gNetworkAddress)); } /** * Gets @addr's port number * * Returns: @addr's port (which may be 0) * * Since: 2.22 */ public ushort getPort() { return g_network_address_get_port(gNetworkAddress); } /** * Gets @addr's scheme * * Returns: @addr's scheme (%NULL if not built from URI) * * Since: 2.26 */ public string getScheme() { return Str.toString(g_network_address_get_scheme(gNetworkAddress)); } } GtkD-3.7.5/generated/gtkd/gio/NetworkMonitorIF.d000066400000000000000000000154021324604450400214150ustar00rootroot00000000000000/* * 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 gio.NetworkMonitorIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.NetworkMonitorIF; private import gio.SocketConnectableIF; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GNetworkMonitor provides an easy-to-use cross-platform API * for monitoring network connectivity. On Linux, the available * implementations are based on the kernel's netlink interface and * on NetworkManager. * * There is also an implementation for use inside Flatpak sandboxes. * * Since: 2.32 */ public interface NetworkMonitorIF{ /** Get the main Gtk struct */ public GNetworkMonitor* getNetworkMonitorStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_network_monitor_get_type(); } /** * Gets the default #GNetworkMonitor for the system. * * Returns: a #GNetworkMonitor * * Since: 2.32 */ public static NetworkMonitorIF getDefault() { auto p = g_network_monitor_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(NetworkMonitorIF)(cast(GNetworkMonitor*) p); } /** * Attempts to determine whether or not the host pointed to by * @connectable can be reached, without actually trying to connect to * it. * * This may return %TRUE even when #GNetworkMonitor:network-available * is %FALSE, if, for example, @monitor can determine that * @connectable refers to a host on a local network. * * If @monitor believes that an attempt to connect to @connectable * will succeed, it will return %TRUE. Otherwise, it will return * %FALSE and set @error to an appropriate error (such as * %G_IO_ERROR_HOST_UNREACHABLE). * * Note that although this does not attempt to connect to * @connectable, it may still block for a brief period of time (eg, * trying to do multicast DNS on the local network), so if you do not * want to block, you should use g_network_monitor_can_reach_async(). * * Params: * connectable = a #GSocketConnectable * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE if @connectable is reachable, %FALSE if not. * * Since: 2.32 * * Throws: GException on failure. */ public bool canReach(SocketConnectableIF connectable, Cancellable cancellable); /** * Asynchronously attempts to determine whether or not the host * pointed to by @connectable can be reached, without actually * trying to connect to it. * * For more details, see g_network_monitor_can_reach(). * * When the operation is finished, @callback will be called. * You can then call g_network_monitor_can_reach_finish() * to get the result of the operation. * * Params: * connectable = a #GSocketConnectable * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback to call when the * request is satisfied * userData = the data to pass to callback function */ public void canReachAsync(SocketConnectableIF connectable, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes an async network connectivity test. * See g_network_monitor_can_reach_async(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if network is reachable, %FALSE if not. * * Throws: GException on failure. */ public bool canReachFinish(AsyncResultIF result); /** * Gets a more detailed networking state than * g_network_monitor_get_network_available(). * * If #GNetworkMonitor:network-available is %FALSE, then the * connectivity state will be %G_NETWORK_CONNECTIVITY_LOCAL. * * If #GNetworkMonitor:network-available is %TRUE, then the * connectivity state will be %G_NETWORK_CONNECTIVITY_FULL (if there * is full Internet connectivity), %G_NETWORK_CONNECTIVITY_LIMITED (if * the host has a default route, but appears to be unable to actually * reach the full Internet), or %G_NETWORK_CONNECTIVITY_PORTAL (if the * host is trapped behind a "captive portal" that requires some sort * of login or acknowledgement before allowing full Internet access). * * Note that in the case of %G_NETWORK_CONNECTIVITY_LIMITED and * %G_NETWORK_CONNECTIVITY_PORTAL, it is possible that some sites are * reachable but others are not. In this case, applications can * attempt to connect to remote servers, but should gracefully fall * back to their "offline" behavior if the connection attempt fails. * * Returns: the network connectivity state * * Since: 2.44 */ public GNetworkConnectivity getConnectivity(); /** * Checks if the network is available. "Available" here means that the * system has a default route available for at least one of IPv4 or * IPv6. It does not necessarily imply that the public Internet is * reachable. See #GNetworkMonitor:network-available for more details. * * Returns: whether the network is available * * Since: 2.32 */ public bool getNetworkAvailable(); /** * Checks if the network is metered. * See #GNetworkMonitor:network-metered for more details. * * Returns: whether the connection is metered * * Since: 2.46 */ public bool getNetworkMetered(); /** * Emitted when the network configuration changes. If @available is * %TRUE, then some hosts may be reachable that were not reachable * before, while others that were reachable before may no longer be * reachable. If @available is %FALSE, then no remote hosts are * reachable. * * Params: * available = the current value of #GNetworkMonitor:network-available * * Since: 2.32 */ gulong addOnNetworkChanged(void delegate(bool, NetworkMonitorIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/gio/NetworkMonitorT.d000066400000000000000000000212451324604450400213240ustar00rootroot00000000000000/* * 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 gio.NetworkMonitorT; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.NetworkMonitorIF; public import gio.SocketConnectableIF; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; /** * #GNetworkMonitor provides an easy-to-use cross-platform API * for monitoring network connectivity. On Linux, the available * implementations are based on the kernel's netlink interface and * on NetworkManager. * * There is also an implementation for use inside Flatpak sandboxes. * * Since: 2.32 */ public template NetworkMonitorT(TStruct) { /** Get the main Gtk struct */ public GNetworkMonitor* getNetworkMonitorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GNetworkMonitor*)getStruct(); } /** * Attempts to determine whether or not the host pointed to by * @connectable can be reached, without actually trying to connect to * it. * * This may return %TRUE even when #GNetworkMonitor:network-available * is %FALSE, if, for example, @monitor can determine that * @connectable refers to a host on a local network. * * If @monitor believes that an attempt to connect to @connectable * will succeed, it will return %TRUE. Otherwise, it will return * %FALSE and set @error to an appropriate error (such as * %G_IO_ERROR_HOST_UNREACHABLE). * * Note that although this does not attempt to connect to * @connectable, it may still block for a brief period of time (eg, * trying to do multicast DNS on the local network), so if you do not * want to block, you should use g_network_monitor_can_reach_async(). * * Params: * connectable = a #GSocketConnectable * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE if @connectable is reachable, %FALSE if not. * * Since: 2.32 * * Throws: GException on failure. */ public bool canReach(SocketConnectableIF connectable, Cancellable cancellable) { GError* err = null; auto p = g_network_monitor_can_reach(getNetworkMonitorStruct(), (connectable is null) ? null : connectable.getSocketConnectableStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously attempts to determine whether or not the host * pointed to by @connectable can be reached, without actually * trying to connect to it. * * For more details, see g_network_monitor_can_reach(). * * When the operation is finished, @callback will be called. * You can then call g_network_monitor_can_reach_finish() * to get the result of the operation. * * Params: * connectable = a #GSocketConnectable * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback to call when the * request is satisfied * userData = the data to pass to callback function */ public void canReachAsync(SocketConnectableIF connectable, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_network_monitor_can_reach_async(getNetworkMonitorStruct(), (connectable is null) ? null : connectable.getSocketConnectableStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an async network connectivity test. * See g_network_monitor_can_reach_async(). * * Params: * result = a #GAsyncResult * * Returns: %TRUE if network is reachable, %FALSE if not. * * Throws: GException on failure. */ public bool canReachFinish(AsyncResultIF result) { GError* err = null; auto p = g_network_monitor_can_reach_finish(getNetworkMonitorStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets a more detailed networking state than * g_network_monitor_get_network_available(). * * If #GNetworkMonitor:network-available is %FALSE, then the * connectivity state will be %G_NETWORK_CONNECTIVITY_LOCAL. * * If #GNetworkMonitor:network-available is %TRUE, then the * connectivity state will be %G_NETWORK_CONNECTIVITY_FULL (if there * is full Internet connectivity), %G_NETWORK_CONNECTIVITY_LIMITED (if * the host has a default route, but appears to be unable to actually * reach the full Internet), or %G_NETWORK_CONNECTIVITY_PORTAL (if the * host is trapped behind a "captive portal" that requires some sort * of login or acknowledgement before allowing full Internet access). * * Note that in the case of %G_NETWORK_CONNECTIVITY_LIMITED and * %G_NETWORK_CONNECTIVITY_PORTAL, it is possible that some sites are * reachable but others are not. In this case, applications can * attempt to connect to remote servers, but should gracefully fall * back to their "offline" behavior if the connection attempt fails. * * Returns: the network connectivity state * * Since: 2.44 */ public GNetworkConnectivity getConnectivity() { return g_network_monitor_get_connectivity(getNetworkMonitorStruct()); } /** * Checks if the network is available. "Available" here means that the * system has a default route available for at least one of IPv4 or * IPv6. It does not necessarily imply that the public Internet is * reachable. See #GNetworkMonitor:network-available for more details. * * Returns: whether the network is available * * Since: 2.32 */ public bool getNetworkAvailable() { return g_network_monitor_get_network_available(getNetworkMonitorStruct()) != 0; } /** * Checks if the network is metered. * See #GNetworkMonitor:network-metered for more details. * * Returns: whether the connection is metered * * Since: 2.46 */ public bool getNetworkMetered() { return g_network_monitor_get_network_metered(getNetworkMonitorStruct()) != 0; } protected class OnNetworkChangedDelegateWrapper { void delegate(bool, NetworkMonitorIF) dlg; gulong handlerId; this(void delegate(bool, NetworkMonitorIF) dlg) { this.dlg = dlg; onNetworkChangedListeners ~= this; } void remove(OnNetworkChangedDelegateWrapper source) { foreach(index, wrapper; onNetworkChangedListeners) { if (wrapper.handlerId == source.handlerId) { onNetworkChangedListeners[index] = null; onNetworkChangedListeners = std.algorithm.remove(onNetworkChangedListeners, index); break; } } } } OnNetworkChangedDelegateWrapper[] onNetworkChangedListeners; /** * Emitted when the network configuration changes. If @available is * %TRUE, then some hosts may be reachable that were not reachable * before, while others that were reachable before may no longer be * reachable. If @available is %FALSE, then no remote hosts are * reachable. * * Params: * available = the current value of #GNetworkMonitor:network-available * * Since: 2.32 */ gulong addOnNetworkChanged(void delegate(bool, NetworkMonitorIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnNetworkChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "network-changed", cast(GCallback)&callBackNetworkChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackNetworkChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackNetworkChanged(GNetworkMonitor* networkmonitorStruct, bool available, OnNetworkChangedDelegateWrapper wrapper) { wrapper.dlg(available, wrapper.outer); } extern(C) static void callBackNetworkChangedDestroy(OnNetworkChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/NetworkService.d000066400000000000000000000113441324604450400211500ustar00rootroot00000000000000/* * 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 gio.NetworkService; private import gio.SocketConnectableIF; private import gio.SocketConnectableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Like #GNetworkAddress does with hostnames, #GNetworkService * provides an easy way to resolve a SRV record, and then attempt to * connect to one of the hosts that implements that service, handling * service priority/weighting, multiple IP addresses, and multiple * address families. * * See #GSrvTarget for more information about SRV records, and see * #GSocketConnectable for and example of using the connectable * interface. */ public class NetworkService : ObjectG, SocketConnectableIF { /** the main Gtk struct */ protected GNetworkService* gNetworkService; /** Get the main Gtk struct */ public GNetworkService* getNetworkServiceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gNetworkService; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gNetworkService; } protected override void setStruct(GObject* obj) { gNetworkService = cast(GNetworkService*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GNetworkService* gNetworkService, bool ownedRef = false) { this.gNetworkService = gNetworkService; super(cast(GObject*)gNetworkService, ownedRef); } // add the SocketConnectable capabilities mixin SocketConnectableT!(GNetworkService); /** */ public static GType getType() { return g_network_service_get_type(); } /** * Creates a new #GNetworkService representing the given @service, * @protocol, and @domain. This will initially be unresolved; use the * #GSocketConnectable interface to resolve it. * * Params: * service = the service type to look up (eg, "ldap") * protocol = the networking protocol to use for @service (eg, "tcp") * domain = the DNS domain to look up the service in * * Returns: a new #GNetworkService * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string service, string protocol, string domain) { auto p = g_network_service_new(Str.toStringz(service), Str.toStringz(protocol), Str.toStringz(domain)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GNetworkService*) p, true); } /** * Gets the domain that @srv serves. This might be either UTF-8 or * ASCII-encoded, depending on what @srv was created with. * * Returns: @srv's domain name * * Since: 2.22 */ public string getDomain() { return Str.toString(g_network_service_get_domain(gNetworkService)); } /** * Gets @srv's protocol name (eg, "tcp"). * * Returns: @srv's protocol name * * Since: 2.22 */ public string getProtocol() { return Str.toString(g_network_service_get_protocol(gNetworkService)); } /** * Get's the URI scheme used to resolve proxies. By default, the service name * is used as scheme. * * Returns: @srv's scheme name * * Since: 2.26 */ public string getScheme() { return Str.toString(g_network_service_get_scheme(gNetworkService)); } /** * Gets @srv's service name (eg, "ldap"). * * Returns: @srv's service name * * Since: 2.22 */ public string getService() { return Str.toString(g_network_service_get_service(gNetworkService)); } /** * Set's the URI scheme used to resolve proxies. By default, the service name * is used as scheme. * * Params: * scheme = a URI scheme * * Since: 2.26 */ public void setScheme(string scheme) { g_network_service_set_scheme(gNetworkService, Str.toStringz(scheme)); } } GtkD-3.7.5/generated/gtkd/gio/Notification.d000066400000000000000000000177001324604450400206260ustar00rootroot00000000000000/* * 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 gio.Notification; private import gio.IconIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GNotification is a mechanism for creating a notification to be shown * to the user -- typically as a pop-up notification presented by the * desktop environment shell. * * The key difference between #GNotification and other similar APIs is * that, if supported by the desktop environment, notifications sent * with #GNotification will persist after the application has exited, * and even across system reboots. * * Since the user may click on a notification while the application is * not running, applications using #GNotification should be able to be * started as a D-Bus service, using #GApplication. * * User interaction with a notification (either the default action, or * buttons) must be associated with actions on the application (ie: * "app." actions). It is not possible to route user interaction * through the notification itself, because the object will not exist if * the application is autostarted as a result of a notification being * clicked. * * A notification can be sent with g_application_send_notification(). * * Since: 2.40 */ public class Notification : ObjectG { /** the main Gtk struct */ protected GNotification* gNotification; /** Get the main Gtk struct */ public GNotification* getNotificationStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gNotification; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gNotification; } protected override void setStruct(GObject* obj) { gNotification = cast(GNotification*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GNotification* gNotification, bool ownedRef = false) { this.gNotification = gNotification; super(cast(GObject*)gNotification, ownedRef); } /** */ public static GType getType() { return g_notification_get_type(); } /** * Creates a new #GNotification with @title as its title. * * After populating @notification with more details, it can be sent to * the desktop shell with g_application_send_notification(). Changing * any properties after this call will not have any effect until * resending @notification. * * Params: * title = the title of the notification * * Returns: a new #GNotification instance * * Since: 2.40 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string title) { auto p = g_notification_new(Str.toStringz(title)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GNotification*) p, true); } /** * Adds a button to @notification that activates the action in * @detailed_action when clicked. That action must be an * application-wide action (starting with "app."). If @detailed_action * contains a target, the action will be activated with that target as * its parameter. * * See g_action_parse_detailed_name() for a description of the format * for @detailed_action. * * Params: * label = label of the button * detailedAction = a detailed action name * * Since: 2.40 */ public void addButton(string label, string detailedAction) { g_notification_add_button(gNotification, Str.toStringz(label), Str.toStringz(detailedAction)); } /** * Adds a button to @notification that activates @action when clicked. * @action must be an application-wide action (it must start with "app."). * * If @target is non-%NULL, @action will be activated with @target as * its parameter. * * Params: * label = label of the button * action = an action name * target = a #GVariant to use as @action's parameter, or %NULL * * Since: 2.40 */ public void addButtonWithTargetValue(string label, string action, Variant target) { g_notification_add_button_with_target_value(gNotification, Str.toStringz(label), Str.toStringz(action), (target is null) ? null : target.getVariantStruct()); } /** * Sets the body of @notification to @body. * * Params: * bod = the new body for @notification, or %NULL * * Since: 2.40 */ public void setBody(string bod) { g_notification_set_body(gNotification, Str.toStringz(bod)); } /** * Sets the default action of @notification to @detailed_action. This * action is activated when the notification is clicked on. * * The action in @detailed_action must be an application-wide action (it * must start with "app."). If @detailed_action contains a target, the * given action will be activated with that target as its parameter. * See g_action_parse_detailed_name() for a description of the format * for @detailed_action. * * When no default action is set, the application that the notification * was sent on is activated. * * Params: * detailedAction = a detailed action name * * Since: 2.40 */ public void setDefaultAction(string detailedAction) { g_notification_set_default_action(gNotification, Str.toStringz(detailedAction)); } /** * Sets the default action of @notification to @action. This action is * activated when the notification is clicked on. It must be an * application-wide action (start with "app."). * * If @target is non-%NULL, @action will be activated with @target as * its parameter. * * When no default action is set, the application that the notification * was sent on is activated. * * Params: * action = an action name * target = a #GVariant to use as @action's parameter, or %NULL * * Since: 2.40 */ public void setDefaultActionAndTargetValue(string action, Variant target) { g_notification_set_default_action_and_target_value(gNotification, Str.toStringz(action), (target is null) ? null : target.getVariantStruct()); } /** * Sets the icon of @notification to @icon. * * Params: * icon = the icon to be shown in @notification, as a #GIcon * * Since: 2.40 */ public void setIcon(IconIF icon) { g_notification_set_icon(gNotification, (icon is null) ? null : icon.getIconStruct()); } /** * Sets the priority of @notification to @priority. See * #GNotificationPriority for possible values. * * Params: * priority = a #GNotificationPriority */ public void setPriority(GNotificationPriority priority) { g_notification_set_priority(gNotification, priority); } /** * Sets the title of @notification to @title. * * Params: * title = the new title for @notification * * Since: 2.40 */ public void setTitle(string title) { g_notification_set_title(gNotification, Str.toStringz(title)); } /** * Deprecated in favor of g_notification_set_priority(). * * Params: * urgent = %TRUE if @notification is urgent * * Since: 2.40 */ public void setUrgent(bool urgent) { g_notification_set_urgent(gNotification, urgent); } } GtkD-3.7.5/generated/gtkd/gio/OutputStream.d000066400000000000000000000620621324604450400206550ustar00rootroot00000000000000/* * 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 gio.OutputStream; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.InputStream; private import gio.c.functions; public import gio.c.types; private import glib.Bytes; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GOutputStream has functions to write to a stream (g_output_stream_write()), * to close a stream (g_output_stream_close()) and to flush pending writes * (g_output_stream_flush()). * * To copy the content of an input stream to an output stream without * manually handling the reads and writes, use g_output_stream_splice(). * * See the documentation for #GIOStream for details of thread safety of * streaming APIs. * * All of these functions have async variants too. */ public class OutputStream : ObjectG { /** the main Gtk struct */ protected GOutputStream* gOutputStream; /** Get the main Gtk struct */ public GOutputStream* getOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gOutputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gOutputStream; } protected override void setStruct(GObject* obj) { gOutputStream = cast(GOutputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GOutputStream* gOutputStream, bool ownedRef = false) { this.gOutputStream = gOutputStream; super(cast(GObject*)gOutputStream, ownedRef); } /** */ public static GType getType() { return g_output_stream_get_type(); } /** * Clears the pending flag on @stream. */ public void clearPending() { g_output_stream_clear_pending(gOutputStream); } /** * Closes the stream, releasing resources related to it. * * Once the stream is closed, all other operations will return %G_IO_ERROR_CLOSED. * Closing a stream multiple times will not return an error. * * Closing a stream will automatically flush any outstanding buffers in the * stream. * * Streams will be automatically closed when the last reference * is dropped, but you might want to call this function to make sure * resources are released as early as possible. * * Some streams might keep the backing store of the stream (e.g. a file descriptor) * open after the stream is closed. See the documentation for the individual * stream for details. * * On failure the first error that happened will be reported, but the close * operation will finish as much as possible. A stream that failed to * close will still return %G_IO_ERROR_CLOSED for all operations. Still, it * is important to check and report the error to the user, otherwise * there might be a loss of data as all data might not be written. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * Cancelling a close will still leave the stream closed, but there some streams * can use a faster close that doesn't block to e.g. check errors. On * cancellation (as with any error) there is no guarantee that all written * data will reach the target. * * Params: * cancellable = optional cancellable object * * Returns: %TRUE on success, %FALSE on failure * * Throws: GException on failure. */ public bool close(Cancellable cancellable) { GError* err = null; auto p = g_output_stream_close(gOutputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Requests an asynchronous close of the stream, releasing resources * related to it. When the operation is finished @callback will be * called. You can then call g_output_stream_close_finish() to get * the result of the operation. * * For behaviour details see g_output_stream_close(). * * The asynchronous methods have a default fallback that uses threads * to implement asynchronicity, so they are optional for inheriting * classes. However, if you override one you must override all. * * Params: * ioPriority = the io priority of the request. * cancellable = optional cancellable object * callback = callback to call when the request is satisfied * userData = the data to pass to callback function */ public void closeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_output_stream_close_async(gOutputStream, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Closes an output stream. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if stream was successfully closed, %FALSE otherwise. * * Throws: GException on failure. */ public bool closeFinish(AsyncResultIF result) { GError* err = null; auto p = g_output_stream_close_finish(gOutputStream, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Forces a write of all user-space buffered data for the given * @stream. Will block during the operation. Closing the stream will * implicitly cause a flush. * * This function is optional for inherited classes. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * cancellable = optional cancellable object * * Returns: %TRUE on success, %FALSE on error * * Throws: GException on failure. */ public bool flush(Cancellable cancellable) { GError* err = null; auto p = g_output_stream_flush(gOutputStream, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Forces an asynchronous write of all user-space buffered data for * the given @stream. * For behaviour details see g_output_stream_flush(). * * When the operation is finished @callback will be * called. You can then call g_output_stream_flush_finish() to get the * result of the operation. * * Params: * ioPriority = the io priority of the request. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function */ public void flushAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_output_stream_flush_async(gOutputStream, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes flushing an output stream. * * Params: * result = a GAsyncResult. * * Returns: %TRUE if flush operation succeeded, %FALSE otherwise. * * Throws: GException on failure. */ public bool flushFinish(AsyncResultIF result) { GError* err = null; auto p = g_output_stream_flush_finish(gOutputStream, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks if an output stream has pending actions. * * Returns: %TRUE if @stream has pending actions. */ public bool hasPending() { return g_output_stream_has_pending(gOutputStream) != 0; } /** * Checks if an output stream has already been closed. * * Returns: %TRUE if @stream is closed. %FALSE otherwise. */ public bool isClosed() { return g_output_stream_is_closed(gOutputStream) != 0; } /** * Checks if an output stream is being closed. This can be * used inside e.g. a flush implementation to see if the * flush (or other i/o operation) is called from within * the closing operation. * * Returns: %TRUE if @stream is being closed. %FALSE otherwise. * * Since: 2.24 */ public bool isClosing() { return g_output_stream_is_closing(gOutputStream) != 0; } /** * Sets @stream to have actions pending. If the pending flag is * already set or @stream is closed, it will return %FALSE and set * @error. * * Returns: %TRUE if pending was previously unset and is now set. * * Throws: GException on failure. */ public bool setPending() { GError* err = null; auto p = g_output_stream_set_pending(gOutputStream, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Splices an input stream into an output stream. * * Params: * source = a #GInputStream. * flags = a set of #GOutputStreamSpliceFlags. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a #gssize containing the size of the data spliced, or * -1 if an error occurred. Note that if the number of bytes * spliced is greater than %G_MAXSSIZE, then that will be * returned, and there is no way to determine the actual number * of bytes spliced. * * Throws: GException on failure. */ public ptrdiff_t splice(InputStream source, GOutputStreamSpliceFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_output_stream_splice(gOutputStream, (source is null) ? null : source.getInputStreamStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Splices a stream asynchronously. * When the operation is finished @callback will be called. * You can then call g_output_stream_splice_finish() to get the * result of the operation. * * For the synchronous, blocking version of this function, see * g_output_stream_splice(). * * Params: * source = a #GInputStream. * flags = a set of #GOutputStreamSpliceFlags. * ioPriority = the io priority of the request. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback. * userData = user data passed to @callback. */ public void spliceAsync(InputStream source, GOutputStreamSpliceFlags flags, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_output_stream_splice_async(gOutputStream, (source is null) ? null : source.getInputStreamStruct(), flags, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous stream splice operation. * * Params: * result = a #GAsyncResult. * * Returns: a #gssize of the number of bytes spliced. Note that if the * number of bytes spliced is greater than %G_MAXSSIZE, then that * will be returned, and there is no way to determine the actual * number of bytes spliced. * * Throws: GException on failure. */ public ptrdiff_t spliceFinish(AsyncResultIF result) { GError* err = null; auto p = g_output_stream_splice_finish(gOutputStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This is a utility function around g_output_stream_write_all(). It * uses g_strdup_vprintf() to turn @format and @args into a string that * is then written to @stream. * * See the documentation of g_output_stream_write_all() about the * behavior of the actual write operation. * * Note that partial writes cannot be properly checked with this * function due to the variable length of the written string, if you * need precise control over partial write failures, you need to * create you own printf()-like wrapper around g_output_stream_write() * or g_output_stream_write_all(). * * Params: * bytesWritten = location to store the number of bytes that was * written to the stream * cancellable = optional #GCancellable object, %NULL to ignore. * error = location to store the error occurring, or %NULL to ignore * format = the format string. See the printf() documentation * args = the parameters to insert into the format string * * Returns: %TRUE on success, %FALSE if there was an error * * Since: 2.40 */ public bool vprintf(out size_t bytesWritten, Cancellable cancellable, out ErrorG error, string format, void* args) { GError* outerror = null; auto p = g_output_stream_vprintf(gOutputStream, &bytesWritten, (cancellable is null) ? null : cancellable.getCancellableStruct(), &outerror, Str.toStringz(format), args) != 0; error = new ErrorG(outerror); return p; } /** * Tries to write @count bytes from @buffer into the stream. Will block * during the operation. * * If count is 0, returns 0 and does nothing. A value of @count * larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error. * * On success, the number of bytes written to the stream is returned. * It is not an error if this is not the same as the requested size, as it * can happen e.g. on a partial I/O error, or if there is not enough * storage in the stream. All writes block until at least one byte * is written or an error occurs; 0 is never returned (unless * @count is 0). * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an * operation was partially finished when the operation was cancelled the * partial result will be returned, without an error. * * On error -1 is returned and @error is set accordingly. * * Params: * buffer = the buffer containing the data to write. * cancellable = optional cancellable object * * Returns: Number of bytes written, or -1 on error * * Throws: GException on failure. */ public ptrdiff_t write(ubyte[] buffer, Cancellable cancellable) { GError* err = null; auto p = g_output_stream_write(gOutputStream, buffer.ptr, cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Tries to write @count bytes from @buffer into the stream. Will block * during the operation. * * This function is similar to g_output_stream_write(), except it tries to * write as many bytes as requested, only stopping on an error. * * On a successful write of @count bytes, %TRUE is returned, and @bytes_written * is set to @count. * * If there is an error during the operation %FALSE is returned and @error * is set to indicate the error status. * * As a special exception to the normal conventions for functions that * use #GError, if this function returns %FALSE (and sets @error) then * @bytes_written will be set to the number of bytes that were * successfully written before the error was encountered. This * functionality is only available from C. If you need it from another * language then you must write your own loop around * g_output_stream_write(). * * Params: * buffer = the buffer containing the data to write. * bytesWritten = location to store the number of bytes that was * written to the stream * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE on success, %FALSE if there was an error * * Throws: GException on failure. */ public bool writeAll(ubyte[] buffer, out size_t bytesWritten, Cancellable cancellable) { GError* err = null; auto p = g_output_stream_write_all(gOutputStream, buffer.ptr, cast(size_t)buffer.length, &bytesWritten, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Request an asynchronous write of @count bytes from @buffer into * the stream. When the operation is finished @callback will be called. * You can then call g_output_stream_write_all_finish() to get the result of the * operation. * * This is the asynchronous version of g_output_stream_write_all(). * * Call g_output_stream_write_all_finish() to collect the result. * * Any outstanding I/O request with higher priority (lower numerical * value) will be executed before an outstanding request with lower * priority. Default priority is %G_PRIORITY_DEFAULT. * * Note that no copy of @buffer will be made, so it must stay valid * until @callback is called. * * Params: * buffer = the buffer containing the data to write * ioPriority = the io priority of the request * cancellable = optional #GCancellable object, %NULL to ignore * callback = callback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.44 */ public void writeAllAsync(ubyte[] buffer, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_output_stream_write_all_async(gOutputStream, buffer.ptr, cast(size_t)buffer.length, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous stream write operation started with * g_output_stream_write_all_async(). * * As a special exception to the normal conventions for functions that * use #GError, if this function returns %FALSE (and sets @error) then * @bytes_written will be set to the number of bytes that were * successfully written before the error was encountered. This * functionality is only available from C. If you need it from another * language then you must write your own loop around * g_output_stream_write_async(). * * Params: * result = a #GAsyncResult * bytesWritten = location to store the number of bytes that was written to the stream * * Returns: %TRUE on success, %FALSE if there was an error * * Since: 2.44 * * Throws: GException on failure. */ public bool writeAllFinish(AsyncResultIF result, out size_t bytesWritten) { GError* err = null; auto p = g_output_stream_write_all_finish(gOutputStream, (result is null) ? null : result.getAsyncResultStruct(), &bytesWritten, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Request an asynchronous write of @count bytes from @buffer into * the stream. When the operation is finished @callback will be called. * You can then call g_output_stream_write_finish() to get the result of the * operation. * * During an async request no other sync and async calls are allowed, * and will result in %G_IO_ERROR_PENDING errors. * * A value of @count larger than %G_MAXSSIZE will cause a * %G_IO_ERROR_INVALID_ARGUMENT error. * * On success, the number of bytes written will be passed to the * @callback. It is not an error if this is not the same as the * requested size, as it can happen e.g. on a partial I/O error, * but generally we try to write as many bytes as requested. * * You are guaranteed that this method will never fail with * %G_IO_ERROR_WOULD_BLOCK - if @stream can't accept more data, the * method will just wait until this changes. * * Any outstanding I/O request with higher priority (lower numerical * value) will be executed before an outstanding request with lower * priority. Default priority is %G_PRIORITY_DEFAULT. * * The asynchronous methods have a default fallback that uses threads * to implement asynchronicity, so they are optional for inheriting * classes. However, if you override one you must override all. * * For the synchronous, blocking version of this function, see * g_output_stream_write(). * * Note that no copy of @buffer will be made, so it must stay valid * until @callback is called. See g_output_stream_write_bytes_async() * for a #GBytes version that will automatically hold a reference to * the contents (without copying) for the duration of the call. * * Params: * buffer = the buffer containing the data to write. * ioPriority = the io priority of the request. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied * userData = the data to pass to callback function */ public void writeAsync(ubyte[] buffer, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_output_stream_write_async(gOutputStream, buffer.ptr, cast(size_t)buffer.length, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * A wrapper function for g_output_stream_write() which takes a * #GBytes as input. This can be more convenient for use by language * bindings or in other cases where the refcounted nature of #GBytes * is helpful over a bare pointer interface. * * However, note that this function may still perform partial writes, * just like g_output_stream_write(). If that occurs, to continue * writing, you will need to create a new #GBytes containing just the * remaining bytes, using g_bytes_new_from_bytes(). Passing the same * #GBytes instance multiple times potentially can result in duplicated * data in the output stream. * * Params: * bytes = the #GBytes to write * cancellable = optional cancellable object * * Returns: Number of bytes written, or -1 on error * * Throws: GException on failure. */ public ptrdiff_t writeBytes(Bytes bytes, Cancellable cancellable) { GError* err = null; auto p = g_output_stream_write_bytes(gOutputStream, (bytes is null) ? null : bytes.getBytesStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This function is similar to g_output_stream_write_async(), but * takes a #GBytes as input. Due to the refcounted nature of #GBytes, * this allows the stream to avoid taking a copy of the data. * * However, note that this function may still perform partial writes, * just like g_output_stream_write_async(). If that occurs, to continue * writing, you will need to create a new #GBytes containing just the * remaining bytes, using g_bytes_new_from_bytes(). Passing the same * #GBytes instance multiple times potentially can result in duplicated * data in the output stream. * * For the synchronous, blocking version of this function, see * g_output_stream_write_bytes(). * * Params: * bytes = The bytes to write * ioPriority = the io priority of the request. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = callback to call when the request is satisfied * userData = the data to pass to callback function */ public void writeBytesAsync(Bytes bytes, int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_output_stream_write_bytes_async(gOutputStream, (bytes is null) ? null : bytes.getBytesStruct(), ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes a stream write-from-#GBytes operation. * * Params: * result = a #GAsyncResult. * * Returns: a #gssize containing the number of bytes written to the stream. * * Throws: GException on failure. */ public ptrdiff_t writeBytesFinish(AsyncResultIF result) { GError* err = null; auto p = g_output_stream_write_bytes_finish(gOutputStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Finishes a stream write operation. * * Params: * result = a #GAsyncResult. * * Returns: a #gssize containing the number of bytes written to the stream. * * Throws: GException on failure. */ public ptrdiff_t writeFinish(AsyncResultIF result) { GError* err = null; auto p = g_output_stream_write_finish(gOutputStream, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/Permission.d000066400000000000000000000222361324604450400203300ustar00rootroot00000000000000/* * 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 gio.Permission; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * A #GPermission represents the status of the caller's permission to * perform a certain action. * * You can query if the action is currently allowed and if it is * possible to acquire the permission so that the action will be allowed * in the future. * * There is also an API to actually acquire the permission and one to * release it. * * As an example, a #GPermission might represent the ability for the * user to write to a #GSettings object. This #GPermission object could * then be used to decide if it is appropriate to show a "Click here to * unlock" button in a dialog and to provide the mechanism to invoke * when that button is clicked. */ public class Permission : ObjectG { /** the main Gtk struct */ protected GPermission* gPermission; /** Get the main Gtk struct */ public GPermission* getPermissionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gPermission; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gPermission; } protected override void setStruct(GObject* obj) { gPermission = cast(GPermission*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GPermission* gPermission, bool ownedRef = false) { this.gPermission = gPermission; super(cast(GObject*)gPermission, ownedRef); } /** */ public static GType getType() { return g_permission_get_type(); } /** * Attempts to acquire the permission represented by @permission. * * The precise method by which this happens depends on the permission * and the underlying authentication mechanism. A simple example is * that a dialog may appear asking the user to enter their password. * * You should check with g_permission_get_can_acquire() before calling * this function. * * If the permission is acquired then %TRUE is returned. Otherwise, * %FALSE is returned and @error is set appropriately. * * This call is blocking, likely for a very long time (in the case that * user interaction is required). See g_permission_acquire_async() for * the non-blocking version. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE if the permission was successfully acquired * * Since: 2.26 * * Throws: GException on failure. */ public bool acquire(Cancellable cancellable) { GError* err = null; auto p = g_permission_acquire(gPermission, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Attempts to acquire the permission represented by @permission. * * This is the first half of the asynchronous version of * g_permission_acquire(). * * Params: * cancellable = a #GCancellable, or %NULL * callback = the #GAsyncReadyCallback to call when done * userData = the user data to pass to @callback * * Since: 2.26 */ public void acquireAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_permission_acquire_async(gPermission, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Collects the result of attempting to acquire the permission * represented by @permission. * * This is the second half of the asynchronous version of * g_permission_acquire(). * * Params: * result = the #GAsyncResult given to the #GAsyncReadyCallback * * Returns: %TRUE if the permission was successfully acquired * * Since: 2.26 * * Throws: GException on failure. */ public bool acquireFinish(AsyncResultIF result) { GError* err = null; auto p = g_permission_acquire_finish(gPermission, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the value of the 'allowed' property. This property is %TRUE if * the caller currently has permission to perform the action that * @permission represents the permission to perform. * * Returns: the value of the 'allowed' property * * Since: 2.26 */ public bool getAllowed() { return g_permission_get_allowed(gPermission) != 0; } /** * Gets the value of the 'can-acquire' property. This property is %TRUE * if it is generally possible to acquire the permission by calling * g_permission_acquire(). * * Returns: the value of the 'can-acquire' property * * Since: 2.26 */ public bool getCanAcquire() { return g_permission_get_can_acquire(gPermission) != 0; } /** * Gets the value of the 'can-release' property. This property is %TRUE * if it is generally possible to release the permission by calling * g_permission_release(). * * Returns: the value of the 'can-release' property * * Since: 2.26 */ public bool getCanRelease() { return g_permission_get_can_release(gPermission) != 0; } /** * This function is called by the #GPermission implementation to update * the properties of the permission. You should never call this * function except from a #GPermission implementation. * * GObject notify signals are generated, as appropriate. * * Params: * allowed = the new value for the 'allowed' property * canAcquire = the new value for the 'can-acquire' property * canRelease = the new value for the 'can-release' property * * Since: 2.26 */ public void implUpdate(bool allowed, bool canAcquire, bool canRelease) { g_permission_impl_update(gPermission, allowed, canAcquire, canRelease); } /** * Attempts to release the permission represented by @permission. * * The precise method by which this happens depends on the permission * and the underlying authentication mechanism. In most cases the * permission will be dropped immediately without further action. * * You should check with g_permission_get_can_release() before calling * this function. * * If the permission is released then %TRUE is returned. Otherwise, * %FALSE is returned and @error is set appropriately. * * This call is blocking, likely for a very long time (in the case that * user interaction is required). See g_permission_release_async() for * the non-blocking version. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE if the permission was successfully released * * Since: 2.26 * * Throws: GException on failure. */ public bool release(Cancellable cancellable) { GError* err = null; auto p = g_permission_release(gPermission, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Attempts to release the permission represented by @permission. * * This is the first half of the asynchronous version of * g_permission_release(). * * Params: * cancellable = a #GCancellable, or %NULL * callback = the #GAsyncReadyCallback to call when done * userData = the user data to pass to @callback * * Since: 2.26 */ public void releaseAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_permission_release_async(gPermission, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Collects the result of attempting to release the permission * represented by @permission. * * This is the second half of the asynchronous version of * g_permission_release(). * * Params: * result = the #GAsyncResult given to the #GAsyncReadyCallback * * Returns: %TRUE if the permission was successfully released * * Since: 2.26 * * Throws: GException on failure. */ public bool releaseFinish(AsyncResultIF result) { GError* err = null; auto p = g_permission_release_finish(gPermission, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/PollableInputStreamIF.d000066400000000000000000000111671324604450400223460ustar00rootroot00000000000000/* * 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 gio.PollableInputStreamIF; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Source; public import gtkc.giotypes; /** * #GPollableInputStream is implemented by #GInputStreams that * can be polled for readiness to read. This can be used when * interfacing with a non-GIO API that expects * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style. * * Since: 2.28 */ public interface PollableInputStreamIF{ /** Get the main Gtk struct */ public GPollableInputStream* getPollableInputStreamStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_pollable_input_stream_get_type(); } /** * Checks if @stream is actually pollable. Some classes may implement * #GPollableInputStream but have only certain instances of that class * be pollable. If this method returns %FALSE, then the behavior of * other #GPollableInputStream methods is undefined. * * For any given stream, the value returned by this method is constant; * a stream cannot switch from pollable to non-pollable or vice versa. * * Returns: %TRUE if @stream is pollable, %FALSE if not. * * Since: 2.28 */ public bool canPoll(); /** * Creates a #GSource that triggers when @stream can be read, or * @cancellable is triggered or an error occurs. The callback on the * source is of the #GPollableSourceFunc type. * * As with g_pollable_input_stream_is_readable(), it is possible that * the stream may not actually be readable even after the source * triggers, so you should use g_pollable_input_stream_read_nonblocking() * rather than g_input_stream_read() from the callback. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: a new #GSource * * Since: 2.28 */ public Source createSource(Cancellable cancellable); /** * Checks if @stream can be read. * * Note that some stream types may not be able to implement this 100% * reliably, and it is possible that a call to g_input_stream_read() * after this returns %TRUE would still block. To guarantee * non-blocking behavior, you should always use * g_pollable_input_stream_read_nonblocking(), which will return a * %G_IO_ERROR_WOULD_BLOCK error rather than blocking. * * Returns: %TRUE if @stream is readable, %FALSE if not. If an error * has occurred on @stream, this will result in * g_pollable_input_stream_is_readable() returning %TRUE, and the * next attempt to read will return the error. * * Since: 2.28 */ public bool isReadable(); /** * Attempts to read up to @count bytes from @stream into @buffer, as * with g_input_stream_read(). If @stream is not currently readable, * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can * use g_pollable_input_stream_create_source() to create a #GSource * that will be triggered when @stream is readable. * * Note that since this method never blocks, you cannot actually * use @cancellable to cancel it. However, it will return an error * if @cancellable has already been cancelled when you call, which * may happen if you call this method after a source triggers due * to having been cancelled. * * Params: * buffer = a buffer to * read data into (which should be at least @count bytes long). * cancellable = a #GCancellable, or %NULL * * Returns: the number of bytes read, or -1 on error (including * %G_IO_ERROR_WOULD_BLOCK). * * Throws: GException on failure. */ public ptrdiff_t readNonblocking(ubyte[] buffer, Cancellable cancellable); } GtkD-3.7.5/generated/gtkd/gio/PollableInputStreamT.d000066400000000000000000000124261324604450400222520ustar00rootroot00000000000000/* * 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 gio.PollableInputStreamT; public import gio.Cancellable; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Source; public import gtkc.giotypes; /** * #GPollableInputStream is implemented by #GInputStreams that * can be polled for readiness to read. This can be used when * interfacing with a non-GIO API that expects * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style. * * Since: 2.28 */ public template PollableInputStreamT(TStruct) { /** Get the main Gtk struct */ public GPollableInputStream* getPollableInputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GPollableInputStream*)getStruct(); } /** * Checks if @stream is actually pollable. Some classes may implement * #GPollableInputStream but have only certain instances of that class * be pollable. If this method returns %FALSE, then the behavior of * other #GPollableInputStream methods is undefined. * * For any given stream, the value returned by this method is constant; * a stream cannot switch from pollable to non-pollable or vice versa. * * Returns: %TRUE if @stream is pollable, %FALSE if not. * * Since: 2.28 */ public bool canPoll() { return g_pollable_input_stream_can_poll(getPollableInputStreamStruct()) != 0; } /** * Creates a #GSource that triggers when @stream can be read, or * @cancellable is triggered or an error occurs. The callback on the * source is of the #GPollableSourceFunc type. * * As with g_pollable_input_stream_is_readable(), it is possible that * the stream may not actually be readable even after the source * triggers, so you should use g_pollable_input_stream_read_nonblocking() * rather than g_input_stream_read() from the callback. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: a new #GSource * * Since: 2.28 */ public Source createSource(Cancellable cancellable) { auto p = g_pollable_input_stream_create_source(getPollableInputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct()); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } /** * Checks if @stream can be read. * * Note that some stream types may not be able to implement this 100% * reliably, and it is possible that a call to g_input_stream_read() * after this returns %TRUE would still block. To guarantee * non-blocking behavior, you should always use * g_pollable_input_stream_read_nonblocking(), which will return a * %G_IO_ERROR_WOULD_BLOCK error rather than blocking. * * Returns: %TRUE if @stream is readable, %FALSE if not. If an error * has occurred on @stream, this will result in * g_pollable_input_stream_is_readable() returning %TRUE, and the * next attempt to read will return the error. * * Since: 2.28 */ public bool isReadable() { return g_pollable_input_stream_is_readable(getPollableInputStreamStruct()) != 0; } /** * Attempts to read up to @count bytes from @stream into @buffer, as * with g_input_stream_read(). If @stream is not currently readable, * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can * use g_pollable_input_stream_create_source() to create a #GSource * that will be triggered when @stream is readable. * * Note that since this method never blocks, you cannot actually * use @cancellable to cancel it. However, it will return an error * if @cancellable has already been cancelled when you call, which * may happen if you call this method after a source triggers due * to having been cancelled. * * Params: * buffer = a buffer to * read data into (which should be at least @count bytes long). * cancellable = a #GCancellable, or %NULL * * Returns: the number of bytes read, or -1 on error (including * %G_IO_ERROR_WOULD_BLOCK). * * Throws: GException on failure. */ public ptrdiff_t readNonblocking(ubyte[] buffer, Cancellable cancellable) { GError* err = null; auto p = g_pollable_input_stream_read_nonblocking(getPollableInputStreamStruct(), buffer.ptr, cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/PollableOutputStreamIF.d000066400000000000000000000111531324604450400225420ustar00rootroot00000000000000/* * 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 gio.PollableOutputStreamIF; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Source; public import gtkc.giotypes; /** * #GPollableOutputStream is implemented by #GOutputStreams that * can be polled for readiness to write. This can be used when * interfacing with a non-GIO API that expects * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style. * * Since: 2.28 */ public interface PollableOutputStreamIF{ /** Get the main Gtk struct */ public GPollableOutputStream* getPollableOutputStreamStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_pollable_output_stream_get_type(); } /** * Checks if @stream is actually pollable. Some classes may implement * #GPollableOutputStream but have only certain instances of that * class be pollable. If this method returns %FALSE, then the behavior * of other #GPollableOutputStream methods is undefined. * * For any given stream, the value returned by this method is constant; * a stream cannot switch from pollable to non-pollable or vice versa. * * Returns: %TRUE if @stream is pollable, %FALSE if not. * * Since: 2.28 */ public bool canPoll(); /** * Creates a #GSource that triggers when @stream can be written, or * @cancellable is triggered or an error occurs. The callback on the * source is of the #GPollableSourceFunc type. * * As with g_pollable_output_stream_is_writable(), it is possible that * the stream may not actually be writable even after the source * triggers, so you should use g_pollable_output_stream_write_nonblocking() * rather than g_output_stream_write() from the callback. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: a new #GSource * * Since: 2.28 */ public Source createSource(Cancellable cancellable); /** * Checks if @stream can be written. * * Note that some stream types may not be able to implement this 100% * reliably, and it is possible that a call to g_output_stream_write() * after this returns %TRUE would still block. To guarantee * non-blocking behavior, you should always use * g_pollable_output_stream_write_nonblocking(), which will return a * %G_IO_ERROR_WOULD_BLOCK error rather than blocking. * * Returns: %TRUE if @stream is writable, %FALSE if not. If an error * has occurred on @stream, this will result in * g_pollable_output_stream_is_writable() returning %TRUE, and the * next attempt to write will return the error. * * Since: 2.28 */ public bool isWritable(); /** * Attempts to write up to @count bytes from @buffer to @stream, as * with g_output_stream_write(). If @stream is not currently writable, * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can * use g_pollable_output_stream_create_source() to create a #GSource * that will be triggered when @stream is writable. * * Note that since this method never blocks, you cannot actually * use @cancellable to cancel it. However, it will return an error * if @cancellable has already been cancelled when you call, which * may happen if you call this method after a source triggers due * to having been cancelled. * * Params: * buffer = a buffer to write * data from * cancellable = a #GCancellable, or %NULL * * Returns: the number of bytes written, or -1 on error (including * %G_IO_ERROR_WOULD_BLOCK). * * Throws: GException on failure. */ public ptrdiff_t writeNonblocking(ubyte[] buffer, Cancellable cancellable); } GtkD-3.7.5/generated/gtkd/gio/PollableOutputStreamT.d000066400000000000000000000124231324604450400224500ustar00rootroot00000000000000/* * 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 gio.PollableOutputStreamT; public import gio.Cancellable; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Source; public import gtkc.giotypes; /** * #GPollableOutputStream is implemented by #GOutputStreams that * can be polled for readiness to write. This can be used when * interfacing with a non-GIO API that expects * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style. * * Since: 2.28 */ public template PollableOutputStreamT(TStruct) { /** Get the main Gtk struct */ public GPollableOutputStream* getPollableOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GPollableOutputStream*)getStruct(); } /** * Checks if @stream is actually pollable. Some classes may implement * #GPollableOutputStream but have only certain instances of that * class be pollable. If this method returns %FALSE, then the behavior * of other #GPollableOutputStream methods is undefined. * * For any given stream, the value returned by this method is constant; * a stream cannot switch from pollable to non-pollable or vice versa. * * Returns: %TRUE if @stream is pollable, %FALSE if not. * * Since: 2.28 */ public bool canPoll() { return g_pollable_output_stream_can_poll(getPollableOutputStreamStruct()) != 0; } /** * Creates a #GSource that triggers when @stream can be written, or * @cancellable is triggered or an error occurs. The callback on the * source is of the #GPollableSourceFunc type. * * As with g_pollable_output_stream_is_writable(), it is possible that * the stream may not actually be writable even after the source * triggers, so you should use g_pollable_output_stream_write_nonblocking() * rather than g_output_stream_write() from the callback. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: a new #GSource * * Since: 2.28 */ public Source createSource(Cancellable cancellable) { auto p = g_pollable_output_stream_create_source(getPollableOutputStreamStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct()); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } /** * Checks if @stream can be written. * * Note that some stream types may not be able to implement this 100% * reliably, and it is possible that a call to g_output_stream_write() * after this returns %TRUE would still block. To guarantee * non-blocking behavior, you should always use * g_pollable_output_stream_write_nonblocking(), which will return a * %G_IO_ERROR_WOULD_BLOCK error rather than blocking. * * Returns: %TRUE if @stream is writable, %FALSE if not. If an error * has occurred on @stream, this will result in * g_pollable_output_stream_is_writable() returning %TRUE, and the * next attempt to write will return the error. * * Since: 2.28 */ public bool isWritable() { return g_pollable_output_stream_is_writable(getPollableOutputStreamStruct()) != 0; } /** * Attempts to write up to @count bytes from @buffer to @stream, as * with g_output_stream_write(). If @stream is not currently writable, * this will immediately return %G_IO_ERROR_WOULD_BLOCK, and you can * use g_pollable_output_stream_create_source() to create a #GSource * that will be triggered when @stream is writable. * * Note that since this method never blocks, you cannot actually * use @cancellable to cancel it. However, it will return an error * if @cancellable has already been cancelled when you call, which * may happen if you call this method after a source triggers due * to having been cancelled. * * Params: * buffer = a buffer to write * data from * cancellable = a #GCancellable, or %NULL * * Returns: the number of bytes written, or -1 on error (including * %G_IO_ERROR_WOULD_BLOCK). * * Throws: GException on failure. */ public ptrdiff_t writeNonblocking(ubyte[] buffer, Cancellable cancellable) { GError* err = null; auto p = g_pollable_output_stream_write_nonblocking(getPollableOutputStreamStruct(), buffer.ptr, cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/PollableUtils.d000066400000000000000000000163161324604450400207550ustar00rootroot00000000000000/* * 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 gio.PollableUtils; private import gio.Cancellable; private import gio.InputStream; private import gio.OutputStream; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Source; private import gobject.ObjectG; public import gtkc.giotypes; /** */ /** * Utility method for #GPollableInputStream and #GPollableOutputStream * implementations. Creates a new #GSource that expects a callback of * type #GPollableSourceFunc. The new source does not actually do * anything on its own; use g_source_add_child_source() to add other * sources to it to cause it to trigger. * * Params: * pollableStream = the stream associated with the new source * * Returns: the new #GSource. * * Since: 2.28 */ public Source pollableSourceNew(ObjectG pollableStream) { auto p = g_pollable_source_new((pollableStream is null) ? null : pollableStream.getObjectGStruct()); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } /** * Utility method for #GPollableInputStream and #GPollableOutputStream * implementations. Creates a new #GSource, as with * g_pollable_source_new(), but also attaching @child_source (with a * dummy callback), and @cancellable, if they are non-%NULL. * * Params: * pollableStream = the stream associated with the * new source * childSource = optional child source to attach * cancellable = optional #GCancellable to attach * * Returns: the new #GSource. * * Since: 2.34 */ public Source pollableSourceNewFull(ObjectG pollableStream, Source childSource, Cancellable cancellable) { auto p = g_pollable_source_new_full((pollableStream is null) ? null : pollableStream.getObjectGStruct(), (childSource is null) ? null : childSource.getSourceStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct()); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } /** * Tries to read from @stream, as with g_input_stream_read() (if * @blocking is %TRUE) or g_pollable_input_stream_read_nonblocking() * (if @blocking is %FALSE). This can be used to more easily share * code between blocking and non-blocking implementations of a method. * * If @blocking is %FALSE, then @stream must be a * #GPollableInputStream for which g_pollable_input_stream_can_poll() * returns %TRUE, or else the behavior is undefined. If @blocking is * %TRUE, then @stream does not need to be a #GPollableInputStream. * * Params: * stream = a #GInputStream * buffer = a buffer to * read data into * blocking = whether to do blocking I/O * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: the number of bytes read, or -1 on error. * * Since: 2.34 * * Throws: GException on failure. */ public ptrdiff_t pollableStreamRead(InputStream stream, ubyte[] buffer, bool blocking, Cancellable cancellable) { GError* err = null; auto p = g_pollable_stream_read((stream is null) ? null : stream.getInputStreamStruct(), buffer.ptr, cast(size_t)buffer.length, blocking, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Tries to write to @stream, as with g_output_stream_write() (if * @blocking is %TRUE) or g_pollable_output_stream_write_nonblocking() * (if @blocking is %FALSE). This can be used to more easily share * code between blocking and non-blocking implementations of a method. * * If @blocking is %FALSE, then @stream must be a * #GPollableOutputStream for which * g_pollable_output_stream_can_poll() returns %TRUE or else the * behavior is undefined. If @blocking is %TRUE, then @stream does not * need to be a #GPollableOutputStream. * * Params: * stream = a #GOutputStream. * buffer = the buffer * containing the data to write. * blocking = whether to do blocking I/O * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: the number of bytes written, or -1 on error. * * Since: 2.34 * * Throws: GException on failure. */ public ptrdiff_t pollableStreamWrite(OutputStream stream, ubyte[] buffer, bool blocking, Cancellable cancellable) { GError* err = null; auto p = g_pollable_stream_write((stream is null) ? null : stream.getOutputStreamStruct(), buffer.ptr, cast(size_t)buffer.length, blocking, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Tries to write @count bytes to @stream, as with * g_output_stream_write_all(), but using g_pollable_stream_write() * rather than g_output_stream_write(). * * On a successful write of @count bytes, %TRUE is returned, and * @bytes_written is set to @count. * * If there is an error during the operation (including * %G_IO_ERROR_WOULD_BLOCK in the non-blocking case), %FALSE is * returned and @error is set to indicate the error status, * @bytes_written is updated to contain the number of bytes written * into the stream before the error occurred. * * As with g_pollable_stream_write(), if @blocking is %FALSE, then * @stream must be a #GPollableOutputStream for which * g_pollable_output_stream_can_poll() returns %TRUE or else the * behavior is undefined. If @blocking is %TRUE, then @stream does not * need to be a #GPollableOutputStream. * * Params: * stream = a #GOutputStream. * buffer = the buffer * containing the data to write. * blocking = whether to do blocking I/O * bytesWritten = location to store the number of bytes that was * written to the stream * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE on success, %FALSE if there was an error * * Since: 2.34 * * Throws: GException on failure. */ public bool pollableStreamWriteAll(OutputStream stream, ubyte[] buffer, bool blocking, out size_t bytesWritten, Cancellable cancellable) { GError* err = null; auto p = g_pollable_stream_write_all((stream is null) ? null : stream.getOutputStreamStruct(), buffer.ptr, cast(size_t)buffer.length, blocking, &bytesWritten, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } GtkD-3.7.5/generated/gtkd/gio/PropertyAction.d000066400000000000000000000127441324604450400211650ustar00rootroot00000000000000/* * 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 gio.PropertyAction; private import gio.ActionIF; private import gio.ActionT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * A #GPropertyAction is a way to get a #GAction with a state value * reflecting and controlling the value of a #GObject property. * * The state of the action will correspond to the value of the property. * Changing it will change the property (assuming the requested value * matches the requirements as specified in the #GParamSpec). * * Only the most common types are presently supported. Booleans are * mapped to booleans, strings to strings, signed/unsigned integers to * int32/uint32 and floats and doubles to doubles. * * If the property is an enum then the state will be string-typed and * conversion will automatically be performed between the enum value and * "nick" string as per the #GEnumValue table. * * Flags types are not currently supported. * * Properties of object types, boxed types and pointer types are not * supported and probably never will be. * * Properties of #GVariant types are not currently supported. * * If the property is boolean-valued then the action will have a NULL * parameter type, and activating the action (with no parameter) will * toggle the value of the property. * * In all other cases, the parameter type will correspond to the type of * the property. * * The general idea here is to reduce the number of locations where a * particular piece of state is kept (and therefore has to be synchronised * between). #GPropertyAction does not have a separate state that is kept * in sync with the property value -- its state is the property value. * * For example, it might be useful to create a #GAction corresponding to * the "visible-child-name" property of a #GtkStack so that the current * page can be switched from a menu. The active radio indication in the * menu is then directly determined from the active page of the * #GtkStack. * * An anti-example would be binding the "active-id" property on a * #GtkComboBox. This is because the state of the combobox itself is * probably uninteresting and is actually being used to control * something else. * * Another anti-example would be to bind to the "visible-child-name" * property of a #GtkStack if this value is actually stored in * #GSettings. In that case, the real source of the value is * #GSettings. If you want a #GAction to control a setting stored in * #GSettings, see g_settings_create_action() instead, and possibly * combine its use with g_settings_bind(). * * Since: 2.38 */ public class PropertyAction : ObjectG, ActionIF { /** the main Gtk struct */ protected GPropertyAction* gPropertyAction; /** Get the main Gtk struct */ public GPropertyAction* getPropertyActionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gPropertyAction; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gPropertyAction; } protected override void setStruct(GObject* obj) { gPropertyAction = cast(GPropertyAction*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GPropertyAction* gPropertyAction, bool ownedRef = false) { this.gPropertyAction = gPropertyAction; super(cast(GObject*)gPropertyAction, ownedRef); } // add the Action capabilities mixin ActionT!(GPropertyAction); /** */ public static GType getType() { return g_property_action_get_type(); } /** * Creates a #GAction corresponding to the value of property * @property_name on @object. * * The property must be existent and readable and writable (and not * construct-only). * * This function takes a reference on @object and doesn't release it * until the action is destroyed. * * Params: * name = the name of the action to create * object = the object that has the property * to wrap * propertyName = the name of the property * * Returns: a new #GPropertyAction * * Since: 2.38 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, ObjectG object, string propertyName) { auto p = g_property_action_new(Str.toStringz(name), (object is null) ? null : object.getObjectGStruct(), Str.toStringz(propertyName)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GPropertyAction*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/ProxyAddress.d000066400000000000000000000126241324604450400206270ustar00rootroot00000000000000/* * 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 gio.ProxyAddress; private import gio.InetAddress; private import gio.InetSocketAddress; private import gio.SocketAddress; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Support for proxied #GInetSocketAddress. * * Since: 2.26 */ public class ProxyAddress : InetSocketAddress { /** the main Gtk struct */ protected GProxyAddress* gProxyAddress; /** Get the main Gtk struct */ public GProxyAddress* getProxyAddressStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gProxyAddress; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gProxyAddress; } protected override void setStruct(GObject* obj) { gProxyAddress = cast(GProxyAddress*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GProxyAddress* gProxyAddress, bool ownedRef = false) { this.gProxyAddress = gProxyAddress; super(cast(GInetSocketAddress*)gProxyAddress, ownedRef); } /** */ public static GType getType() { return g_proxy_address_get_type(); } /** * Creates a new #GProxyAddress for @inetaddr with @protocol that should * tunnel through @dest_hostname and @dest_port. * * (Note that this method doesn't set the #GProxyAddress:uri or * #GProxyAddress:destination-protocol fields; use g_object_new() * directly if you want to set those.) * * Params: * inetaddr = The proxy server #GInetAddress. * port = The proxy server port. * protocol = The proxy protocol to support, in lower case (e.g. socks, http). * destHostname = The destination hostname the proxy should tunnel to. * destPort = The destination port to tunnel to. * username = The username to authenticate to the proxy server * (or %NULL). * password = The password to authenticate to the proxy server * (or %NULL). * * Returns: a new #GProxyAddress * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(InetAddress inetaddr, ushort port, string protocol, string destHostname, ushort destPort, string username, string password) { auto p = g_proxy_address_new((inetaddr is null) ? null : inetaddr.getInetAddressStruct(), port, Str.toStringz(protocol), Str.toStringz(destHostname), destPort, Str.toStringz(username), Str.toStringz(password)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GProxyAddress*) p, true); } /** * Gets @proxy's destination hostname; that is, the name of the host * that will be connected to via the proxy, not the name of the proxy * itself. * * Returns: the @proxy's destination hostname * * Since: 2.26 */ public string getDestinationHostname() { return Str.toString(g_proxy_address_get_destination_hostname(gProxyAddress)); } /** * Gets @proxy's destination port; that is, the port on the * destination host that will be connected to via the proxy, not the * port number of the proxy itself. * * Returns: the @proxy's destination port * * Since: 2.26 */ public ushort getDestinationPort() { return g_proxy_address_get_destination_port(gProxyAddress); } /** * Gets the protocol that is being spoken to the destination * server; eg, "http" or "ftp". * * Returns: the @proxy's destination protocol * * Since: 2.34 */ public string getDestinationProtocol() { return Str.toString(g_proxy_address_get_destination_protocol(gProxyAddress)); } /** * Gets @proxy's password. * * Returns: the @proxy's password * * Since: 2.26 */ public string getPassword() { return Str.toString(g_proxy_address_get_password(gProxyAddress)); } /** * Gets @proxy's protocol. eg, "socks" or "http" * * Returns: the @proxy's protocol * * Since: 2.26 */ public string getProtocol() { return Str.toString(g_proxy_address_get_protocol(gProxyAddress)); } /** * Gets the proxy URI that @proxy was constructed from. * * Returns: the @proxy's URI, or %NULL if unknown * * Since: 2.34 */ public string getUri() { return Str.toString(g_proxy_address_get_uri(gProxyAddress)); } /** * Gets @proxy's username. * * Returns: the @proxy's username * * Since: 2.26 */ public string getUsername() { return Str.toString(g_proxy_address_get_username(gProxyAddress)); } } GtkD-3.7.5/generated/gtkd/gio/ProxyAddressEnumerator.d000066400000000000000000000044661324604450400226760ustar00rootroot00000000000000/* * 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 gio.ProxyAddressEnumerator; private import gio.SocketAddressEnumerator; private import gio.c.functions; public import gio.c.types; public import gtkc.giotypes; /** * A subclass of #GSocketAddressEnumerator that takes another address * enumerator and wraps its results in #GProxyAddresses as * directed by the default #GProxyResolver. */ public class ProxyAddressEnumerator : SocketAddressEnumerator { /** the main Gtk struct */ protected GProxyAddressEnumerator* gProxyAddressEnumerator; /** Get the main Gtk struct */ public GProxyAddressEnumerator* getProxyAddressEnumeratorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gProxyAddressEnumerator; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gProxyAddressEnumerator; } protected override void setStruct(GObject* obj) { gProxyAddressEnumerator = cast(GProxyAddressEnumerator*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GProxyAddressEnumerator* gProxyAddressEnumerator, bool ownedRef = false) { this.gProxyAddressEnumerator = gProxyAddressEnumerator; super(cast(GSocketAddressEnumerator*)gProxyAddressEnumerator, ownedRef); } /** */ public static GType getType() { return g_proxy_address_enumerator_get_type(); } } GtkD-3.7.5/generated/gtkd/gio/ProxyIF.d000066400000000000000000000106061324604450400175360ustar00rootroot00000000000000/* * 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 gio.ProxyIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.IOStream; private import gio.ProxyAddress; private import gio.ProxyIF; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * A #GProxy handles connecting to a remote host via a given type of * proxy server. It is implemented by the 'gio-proxy' extension point. * The extensions are named after their proxy protocol name. As an * example, a SOCKS5 proxy implementation can be retrieved with the * name 'socks5' using the function * g_io_extension_point_get_extension_by_name(). * * Since: 2.26 */ public interface ProxyIF{ /** Get the main Gtk struct */ public GProxy* getProxyStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_proxy_get_type(); } /** * Lookup "gio-proxy" extension point for a proxy implementation that supports * specified protocol. * * Params: * protocol = the proxy protocol name (e.g. http, socks, etc) * * Returns: return a #GProxy or NULL if protocol * is not supported. * * Since: 2.26 */ public static ProxyIF getDefaultForProtocol(string protocol) { auto p = g_proxy_get_default_for_protocol(Str.toStringz(protocol)); if(p is null) { return null; } return ObjectG.getDObject!(ProxyIF)(cast(GProxy*) p, true); } /** * Given @connection to communicate with a proxy (eg, a * #GSocketConnection that is connected to the proxy server), this * does the necessary handshake to connect to @proxy_address, and if * required, wraps the #GIOStream to handle proxy payload. * * Params: * connection = a #GIOStream * proxyAddress = a #GProxyAddress * cancellable = a #GCancellable * * Returns: a #GIOStream that will replace @connection. This might * be the same as @connection, in which case a reference * will be added. * * Since: 2.26 * * Throws: GException on failure. */ public IOStream connect(IOStream connection, ProxyAddress proxyAddress, Cancellable cancellable); /** * Asynchronous version of g_proxy_connect(). * * Params: * connection = a #GIOStream * proxyAddress = a #GProxyAddress * cancellable = a #GCancellable * callback = a #GAsyncReadyCallback * userData = callback data * * Since: 2.26 */ public void connectAsync(IOStream connection, ProxyAddress proxyAddress, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * See g_proxy_connect(). * * Params: * result = a #GAsyncResult * * Returns: a #GIOStream. * * Since: 2.26 * * Throws: GException on failure. */ public IOStream connectFinish(AsyncResultIF result); /** * Some proxy protocols expect to be passed a hostname, which they * will resolve to an IP address themselves. Others, like SOCKS4, do * not allow this. This function will return %FALSE if @proxy is * implementing such a protocol. When %FALSE is returned, the caller * should resolve the destination hostname first, and then pass a * #GProxyAddress containing the stringified IP address to * g_proxy_connect() or g_proxy_connect_async(). * * Returns: %TRUE if hostname resolution is supported. * * Since: 2.26 */ public bool supportsHostname(); } GtkD-3.7.5/generated/gtkd/gio/ProxyResolverIF.d000066400000000000000000000110721324604450400212560ustar00rootroot00000000000000/* * 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 gio.ProxyResolverIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.ProxyResolverIF; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GProxyResolver provides synchronous and asynchronous network proxy * resolution. #GProxyResolver is used within #GSocketClient through * the method g_socket_connectable_proxy_enumerate(). * * Implementations of #GProxyResolver based on libproxy and GNOME settings can * be found in glib-networking. GIO comes with an implementation for use inside * Flatpak portals. * * Since: 2.26 */ public interface ProxyResolverIF{ /** Get the main Gtk struct */ public GProxyResolver* getProxyResolverStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_proxy_resolver_get_type(); } /** * Gets the default #GProxyResolver for the system. * * Returns: the default #GProxyResolver. * * Since: 2.26 */ public static ProxyResolverIF getDefault() { auto p = g_proxy_resolver_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(ProxyResolverIF)(cast(GProxyResolver*) p); } /** * Checks if @resolver can be used on this system. (This is used * internally; g_proxy_resolver_get_default() will only return a proxy * resolver that returns %TRUE for this method.) * * Returns: %TRUE if @resolver is supported. * * Since: 2.26 */ public bool isSupported(); /** * Looks into the system proxy configuration to determine what proxy, * if any, to use to connect to @uri. The returned proxy URIs are of * the form `://[user[:password]@]host:port` or * `direct://`, where could be http, rtsp, socks * or other proxying protocol. * * If you don't know what network protocol is being used on the * socket, you should use `none` as the URI protocol. * In this case, the resolver might still return a generic proxy type * (such as SOCKS), but would not return protocol-specific proxy types * (such as http). * * `direct://` is used when no proxy is needed. * Direct connection should not be attempted unless it is part of the * returned array of proxies. * * Params: * uri = a URI representing the destination to connect to * cancellable = a #GCancellable, or %NULL * * Returns: A * NULL-terminated array of proxy URIs. Must be freed * with g_strfreev(). * * Since: 2.26 * * Throws: GException on failure. */ public string[] lookup(string uri, Cancellable cancellable); /** * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more * details. * * Params: * uri = a URI representing the destination to connect to * cancellable = a #GCancellable, or %NULL * callback = callback to call after resolution completes * userData = data for @callback * * Since: 2.26 */ public void lookupAsync(string uri, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Call this function to obtain the array of proxy URIs when * g_proxy_resolver_lookup_async() is complete. See * g_proxy_resolver_lookup() for more details. * * Params: * result = the result passed to your #GAsyncReadyCallback * * Returns: A * NULL-terminated array of proxy URIs. Must be freed * with g_strfreev(). * * Since: 2.26 * * Throws: GException on failure. */ public string[] lookupFinish(AsyncResultIF result); } GtkD-3.7.5/generated/gtkd/gio/ProxyResolverT.d000066400000000000000000000120761324604450400211700ustar00rootroot00000000000000/* * 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 gio.ProxyResolverT; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.ProxyResolverIF; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GProxyResolver provides synchronous and asynchronous network proxy * resolution. #GProxyResolver is used within #GSocketClient through * the method g_socket_connectable_proxy_enumerate(). * * Implementations of #GProxyResolver based on libproxy and GNOME settings can * be found in glib-networking. GIO comes with an implementation for use inside * Flatpak portals. * * Since: 2.26 */ public template ProxyResolverT(TStruct) { /** Get the main Gtk struct */ public GProxyResolver* getProxyResolverStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GProxyResolver*)getStruct(); } /** * Checks if @resolver can be used on this system. (This is used * internally; g_proxy_resolver_get_default() will only return a proxy * resolver that returns %TRUE for this method.) * * Returns: %TRUE if @resolver is supported. * * Since: 2.26 */ public bool isSupported() { return g_proxy_resolver_is_supported(getProxyResolverStruct()) != 0; } /** * Looks into the system proxy configuration to determine what proxy, * if any, to use to connect to @uri. The returned proxy URIs are of * the form `://[user[:password]@]host:port` or * `direct://`, where could be http, rtsp, socks * or other proxying protocol. * * If you don't know what network protocol is being used on the * socket, you should use `none` as the URI protocol. * In this case, the resolver might still return a generic proxy type * (such as SOCKS), but would not return protocol-specific proxy types * (such as http). * * `direct://` is used when no proxy is needed. * Direct connection should not be attempted unless it is part of the * returned array of proxies. * * Params: * uri = a URI representing the destination to connect to * cancellable = a #GCancellable, or %NULL * * Returns: A * NULL-terminated array of proxy URIs. Must be freed * with g_strfreev(). * * Since: 2.26 * * Throws: GException on failure. */ public string[] lookup(string uri, Cancellable cancellable) { GError* err = null; auto retStr = g_proxy_resolver_lookup(getProxyResolverStruct(), Str.toStringz(uri), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Asynchronous lookup of proxy. See g_proxy_resolver_lookup() for more * details. * * Params: * uri = a URI representing the destination to connect to * cancellable = a #GCancellable, or %NULL * callback = callback to call after resolution completes * userData = data for @callback * * Since: 2.26 */ public void lookupAsync(string uri, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_proxy_resolver_lookup_async(getProxyResolverStruct(), Str.toStringz(uri), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Call this function to obtain the array of proxy URIs when * g_proxy_resolver_lookup_async() is complete. See * g_proxy_resolver_lookup() for more details. * * Params: * result = the result passed to your #GAsyncReadyCallback * * Returns: A * NULL-terminated array of proxy URIs. Must be freed * with g_strfreev(). * * Since: 2.26 * * Throws: GException on failure. */ public string[] lookupFinish(AsyncResultIF result) { GError* err = null; auto retStr = g_proxy_resolver_lookup_finish(getProxyResolverStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } } GtkD-3.7.5/generated/gtkd/gio/ProxyT.d000066400000000000000000000116221324604450400174420ustar00rootroot00000000000000/* * 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 gio.ProxyT; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.IOStream; public import gio.ProxyAddress; public import gio.ProxyIF; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * A #GProxy handles connecting to a remote host via a given type of * proxy server. It is implemented by the 'gio-proxy' extension point. * The extensions are named after their proxy protocol name. As an * example, a SOCKS5 proxy implementation can be retrieved with the * name 'socks5' using the function * g_io_extension_point_get_extension_by_name(). * * Since: 2.26 */ public template ProxyT(TStruct) { /** Get the main Gtk struct */ public GProxy* getProxyStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GProxy*)getStruct(); } /** * Given @connection to communicate with a proxy (eg, a * #GSocketConnection that is connected to the proxy server), this * does the necessary handshake to connect to @proxy_address, and if * required, wraps the #GIOStream to handle proxy payload. * * Params: * connection = a #GIOStream * proxyAddress = a #GProxyAddress * cancellable = a #GCancellable * * Returns: a #GIOStream that will replace @connection. This might * be the same as @connection, in which case a reference * will be added. * * Since: 2.26 * * Throws: GException on failure. */ public IOStream connect(IOStream connection, ProxyAddress proxyAddress, Cancellable cancellable) { GError* err = null; auto p = g_proxy_connect(getProxyStruct(), (connection is null) ? null : connection.getIOStreamStruct(), (proxyAddress is null) ? null : proxyAddress.getProxyAddressStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(IOStream)(cast(GIOStream*) p, true); } /** * Asynchronous version of g_proxy_connect(). * * Params: * connection = a #GIOStream * proxyAddress = a #GProxyAddress * cancellable = a #GCancellable * callback = a #GAsyncReadyCallback * userData = callback data * * Since: 2.26 */ public void connectAsync(IOStream connection, ProxyAddress proxyAddress, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_proxy_connect_async(getProxyStruct(), (connection is null) ? null : connection.getIOStreamStruct(), (proxyAddress is null) ? null : proxyAddress.getProxyAddressStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * See g_proxy_connect(). * * Params: * result = a #GAsyncResult * * Returns: a #GIOStream. * * Since: 2.26 * * Throws: GException on failure. */ public IOStream connectFinish(AsyncResultIF result) { GError* err = null; auto p = g_proxy_connect_finish(getProxyStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(IOStream)(cast(GIOStream*) p, true); } /** * Some proxy protocols expect to be passed a hostname, which they * will resolve to an IP address themselves. Others, like SOCKS4, do * not allow this. This function will return %FALSE if @proxy is * implementing such a protocol. When %FALSE is returned, the caller * should resolve the destination hostname first, and then pass a * #GProxyAddress containing the stringified IP address to * g_proxy_connect() or g_proxy_connect_async(). * * Returns: %TRUE if hostname resolution is supported. * * Since: 2.26 */ public bool supportsHostname() { return g_proxy_supports_hostname(getProxyStruct()) != 0; } } GtkD-3.7.5/generated/gtkd/gio/RemoteActionGroupIF.d000066400000000000000000000077261324604450400220340ustar00rootroot00000000000000/* * 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 gio.RemoteActionGroupIF; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.Variant; public import gtkc.giotypes; /** * The GRemoteActionGroup interface is implemented by #GActionGroup * instances that either transmit action invocations to other processes * or receive action invocations in the local process from other * processes. * * The interface has `_full` variants of the two * methods on #GActionGroup used to activate actions: * g_action_group_activate_action() and * g_action_group_change_action_state(). These variants allow a * "platform data" #GVariant to be specified: a dictionary providing * context for the action invocation (for example: timestamps, startup * notification IDs, etc). * * #GDBusActionGroup implements #GRemoteActionGroup. This provides a * mechanism to send platform data for action invocations over D-Bus. * * Additionally, g_dbus_connection_export_action_group() will check if * the exported #GActionGroup implements #GRemoteActionGroup and use the * `_full` variants of the calls if available. This * provides a mechanism by which to receive platform data for action * invocations that arrive by way of D-Bus. */ public interface RemoteActionGroupIF{ /** Get the main Gtk struct */ public GRemoteActionGroup* getRemoteActionGroupStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_remote_action_group_get_type(); } /** * Activates the remote action. * * This is the same as g_action_group_activate_action() except that it * allows for provision of "platform data" to be sent along with the * activation request. This typically contains details such as the user * interaction timestamp or startup notification information. * * @platform_data must be non-%NULL and must have the type * %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. * * Params: * actionName = the name of the action to activate * parameter = the optional parameter to the activation * platformData = the platform data to send * * Since: 2.32 */ public void activateActionFull(string actionName, Variant parameter, Variant platformData); /** * Changes the state of a remote action. * * This is the same as g_action_group_change_action_state() except that * it allows for provision of "platform data" to be sent along with the * state change request. This typically contains details such as the * user interaction timestamp or startup notification information. * * @platform_data must be non-%NULL and must have the type * %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. * * Params: * actionName = the name of the action to change the state of * value = the new requested value for the state * platformData = the platform data to send * * Since: 2.32 */ public void changeActionStateFull(string actionName, Variant value, Variant platformData); } GtkD-3.7.5/generated/gtkd/gio/RemoteActionGroupT.d000066400000000000000000000105541324604450400217320ustar00rootroot00000000000000/* * 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 gio.RemoteActionGroupT; public import gio.c.functions; public import gio.c.types; public import glib.Str; public import glib.Variant; public import gtkc.giotypes; /** * The GRemoteActionGroup interface is implemented by #GActionGroup * instances that either transmit action invocations to other processes * or receive action invocations in the local process from other * processes. * * The interface has `_full` variants of the two * methods on #GActionGroup used to activate actions: * g_action_group_activate_action() and * g_action_group_change_action_state(). These variants allow a * "platform data" #GVariant to be specified: a dictionary providing * context for the action invocation (for example: timestamps, startup * notification IDs, etc). * * #GDBusActionGroup implements #GRemoteActionGroup. This provides a * mechanism to send platform data for action invocations over D-Bus. * * Additionally, g_dbus_connection_export_action_group() will check if * the exported #GActionGroup implements #GRemoteActionGroup and use the * `_full` variants of the calls if available. This * provides a mechanism by which to receive platform data for action * invocations that arrive by way of D-Bus. */ public template RemoteActionGroupT(TStruct) { /** Get the main Gtk struct */ public GRemoteActionGroup* getRemoteActionGroupStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GRemoteActionGroup*)getStruct(); } /** * Activates the remote action. * * This is the same as g_action_group_activate_action() except that it * allows for provision of "platform data" to be sent along with the * activation request. This typically contains details such as the user * interaction timestamp or startup notification information. * * @platform_data must be non-%NULL and must have the type * %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. * * Params: * actionName = the name of the action to activate * parameter = the optional parameter to the activation * platformData = the platform data to send * * Since: 2.32 */ public void activateActionFull(string actionName, Variant parameter, Variant platformData) { g_remote_action_group_activate_action_full(getRemoteActionGroupStruct(), Str.toStringz(actionName), (parameter is null) ? null : parameter.getVariantStruct(), (platformData is null) ? null : platformData.getVariantStruct()); } /** * Changes the state of a remote action. * * This is the same as g_action_group_change_action_state() except that * it allows for provision of "platform data" to be sent along with the * state change request. This typically contains details such as the * user interaction timestamp or startup notification information. * * @platform_data must be non-%NULL and must have the type * %G_VARIANT_TYPE_VARDICT. If it is floating, it will be consumed. * * Params: * actionName = the name of the action to change the state of * value = the new requested value for the state * platformData = the platform data to send * * Since: 2.32 */ public void changeActionStateFull(string actionName, Variant value, Variant platformData) { g_remote_action_group_change_action_state_full(getRemoteActionGroupStruct(), Str.toStringz(actionName), (value is null) ? null : value.getVariantStruct(), (platformData is null) ? null : platformData.getVariantStruct()); } } GtkD-3.7.5/generated/gtkd/gio/Resolver.d000066400000000000000000000466151324604450400200100ustar00rootroot00000000000000/* * 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 gio.Resolver; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.InetAddress; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GResolver provides cancellable synchronous and asynchronous DNS * resolution, for hostnames (g_resolver_lookup_by_address(), * g_resolver_lookup_by_name() and their async variants) and SRV * (service) records (g_resolver_lookup_service()). * * #GNetworkAddress and #GNetworkService provide wrappers around * #GResolver functionality that also implement #GSocketConnectable, * making it easy to connect to a remote host/service. */ public class Resolver : ObjectG { /** the main Gtk struct */ protected GResolver* gResolver; /** Get the main Gtk struct */ public GResolver* getResolverStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gResolver; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gResolver; } protected override void setStruct(GObject* obj) { gResolver = cast(GResolver*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GResolver* gResolver, bool ownedRef = false) { this.gResolver = gResolver; super(cast(GObject*)gResolver, ownedRef); } /** */ public static GType getType() { return g_resolver_get_type(); } /** * Frees @addresses (which should be the return value from * g_resolver_lookup_by_name() or g_resolver_lookup_by_name_finish()). * (This is a convenience method; you can also simply free the results * by hand.) * * Params: * addresses = a #GList of #GInetAddress * * Since: 2.22 */ public static void freeAddresses(ListG addresses) { g_resolver_free_addresses((addresses is null) ? null : addresses.getListGStruct()); } /** * Frees @targets (which should be the return value from * g_resolver_lookup_service() or g_resolver_lookup_service_finish()). * (This is a convenience method; you can also simply free the * results by hand.) * * Params: * targets = a #GList of #GSrvTarget * * Since: 2.22 */ public static void freeTargets(ListG targets) { g_resolver_free_targets((targets is null) ? null : targets.getListGStruct()); } /** * Gets the default #GResolver. You should unref it when you are done * with it. #GResolver may use its reference count as a hint about how * many threads it should allocate for concurrent DNS resolutions. * * Returns: the default #GResolver. * * Since: 2.22 */ public static Resolver getDefault() { auto p = g_resolver_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(Resolver)(cast(GResolver*) p, true); } /** * Synchronously reverse-resolves @address to determine its * associated hostname. * * If the DNS resolution fails, @error (if non-%NULL) will be set to * a value from #GResolverError. * * If @cancellable is non-%NULL, it can be used to cancel the * operation, in which case @error (if non-%NULL) will be set to * %G_IO_ERROR_CANCELLED. * * Params: * address = the address to reverse-resolve * cancellable = a #GCancellable, or %NULL * * Returns: a hostname (either ASCII-only, or in ASCII-encoded * form), or %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public string lookupByAddress(InetAddress address, Cancellable cancellable) { GError* err = null; auto retStr = g_resolver_lookup_by_address(gResolver, (address is null) ? null : address.getInetAddressStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Begins asynchronously reverse-resolving @address to determine its * associated hostname, and eventually calls @callback, which must * call g_resolver_lookup_by_address_finish() to get the final result. * * Params: * address = the address to reverse-resolve * cancellable = a #GCancellable, or %NULL * callback = callback to call after resolution completes * userData = data for @callback * * Since: 2.22 */ public void lookupByAddressAsync(InetAddress address, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_resolver_lookup_by_address_async(gResolver, (address is null) ? null : address.getInetAddressStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Retrieves the result of a previous call to * g_resolver_lookup_by_address_async(). * * If the DNS resolution failed, @error (if non-%NULL) will be set to * a value from #GResolverError. If the operation was cancelled, * @error will be set to %G_IO_ERROR_CANCELLED. * * Params: * result = the result passed to your #GAsyncReadyCallback * * Returns: a hostname (either ASCII-only, or in ASCII-encoded * form), or %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public string lookupByAddressFinish(AsyncResultIF result) { GError* err = null; auto retStr = g_resolver_lookup_by_address_finish(gResolver, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Synchronously resolves @hostname to determine its associated IP * address(es). @hostname may be an ASCII-only or UTF-8 hostname, or * the textual form of an IP address (in which case this just becomes * a wrapper around g_inet_address_new_from_string()). * * On success, g_resolver_lookup_by_name() will return a non-empty #GList of * #GInetAddress, sorted in order of preference and guaranteed to not * contain duplicates. That is, if using the result to connect to * @hostname, you should attempt to connect to the first address * first, then the second if the first fails, etc. If you are using * the result to listen on a socket, it is appropriate to add each * result using e.g. g_socket_listener_add_address(). * * If the DNS resolution fails, @error (if non-%NULL) will be set to a * value from #GResolverError and %NULL will be returned. * * If @cancellable is non-%NULL, it can be used to cancel the * operation, in which case @error (if non-%NULL) will be set to * %G_IO_ERROR_CANCELLED. * * If you are planning to connect to a socket on the resolved IP * address, it may be easier to create a #GNetworkAddress and use its * #GSocketConnectable interface. * * Params: * hostname = the hostname to look up * cancellable = a #GCancellable, or %NULL * * Returns: a non-empty #GList * of #GInetAddress, or %NULL on error. You * must unref each of the addresses and free the list when you are * done with it. (You can use g_resolver_free_addresses() to do this.) * * Since: 2.22 * * Throws: GException on failure. */ public ListG lookupByName(string hostname, Cancellable cancellable) { GError* err = null; auto p = g_resolver_lookup_by_name(gResolver, Str.toStringz(hostname), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Begins asynchronously resolving @hostname to determine its * associated IP address(es), and eventually calls @callback, which * must call g_resolver_lookup_by_name_finish() to get the result. * See g_resolver_lookup_by_name() for more details. * * Params: * hostname = the hostname to look up the address of * cancellable = a #GCancellable, or %NULL * callback = callback to call after resolution completes * userData = data for @callback * * Since: 2.22 */ public void lookupByNameAsync(string hostname, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_resolver_lookup_by_name_async(gResolver, Str.toStringz(hostname), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Retrieves the result of a call to * g_resolver_lookup_by_name_async(). * * If the DNS resolution failed, @error (if non-%NULL) will be set to * a value from #GResolverError. If the operation was cancelled, * @error will be set to %G_IO_ERROR_CANCELLED. * * Params: * result = the result passed to your #GAsyncReadyCallback * * Returns: a #GList * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name() * for more details. * * Since: 2.22 * * Throws: GException on failure. */ public ListG lookupByNameFinish(AsyncResultIF result) { GError* err = null; auto p = g_resolver_lookup_by_name_finish(gResolver, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Synchronously performs a DNS record lookup for the given @rrname and returns * a list of records as #GVariant tuples. See #GResolverRecordType for * information on what the records contain for each @record_type. * * If the DNS resolution fails, @error (if non-%NULL) will be set to * a value from #GResolverError and %NULL will be returned. * * If @cancellable is non-%NULL, it can be used to cancel the * operation, in which case @error (if non-%NULL) will be set to * %G_IO_ERROR_CANCELLED. * * Params: * rrname = the DNS name to lookup the record for * recordType = the type of DNS record to lookup * cancellable = a #GCancellable, or %NULL * * Returns: a non-empty #GList of * #GVariant, or %NULL on error. You must free each of the records and the list * when you are done with it. (You can use g_list_free_full() with * g_variant_unref() to do this.) * * Since: 2.34 * * Throws: GException on failure. */ public ListG lookupRecords(string rrname, GResolverRecordType recordType, Cancellable cancellable) { GError* err = null; auto p = g_resolver_lookup_records(gResolver, Str.toStringz(rrname), recordType, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Begins asynchronously performing a DNS lookup for the given * @rrname, and eventually calls @callback, which must call * g_resolver_lookup_records_finish() to get the final result. See * g_resolver_lookup_records() for more details. * * Params: * rrname = the DNS name to lookup the record for * recordType = the type of DNS record to lookup * cancellable = a #GCancellable, or %NULL * callback = callback to call after resolution completes * userData = data for @callback * * Since: 2.34 */ public void lookupRecordsAsync(string rrname, GResolverRecordType recordType, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_resolver_lookup_records_async(gResolver, Str.toStringz(rrname), recordType, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Retrieves the result of a previous call to * g_resolver_lookup_records_async(). Returns a non-empty list of records as * #GVariant tuples. See #GResolverRecordType for information on what the * records contain. * * If the DNS resolution failed, @error (if non-%NULL) will be set to * a value from #GResolverError. If the operation was cancelled, * @error will be set to %G_IO_ERROR_CANCELLED. * * Params: * result = the result passed to your #GAsyncReadyCallback * * Returns: a non-empty #GList of * #GVariant, or %NULL on error. You must free each of the records and the list * when you are done with it. (You can use g_list_free_full() with * g_variant_unref() to do this.) * * Since: 2.34 * * Throws: GException on failure. */ public ListG lookupRecordsFinish(AsyncResultIF result) { GError* err = null; auto p = g_resolver_lookup_records_finish(gResolver, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Synchronously performs a DNS SRV lookup for the given @service and * @protocol in the given @domain and returns an array of #GSrvTarget. * @domain may be an ASCII-only or UTF-8 hostname. Note also that the * @service and @protocol arguments do not include the leading underscore * that appears in the actual DNS entry. * * On success, g_resolver_lookup_service() will return a non-empty #GList of * #GSrvTarget, sorted in order of preference. (That is, you should * attempt to connect to the first target first, then the second if * the first fails, etc.) * * If the DNS resolution fails, @error (if non-%NULL) will be set to * a value from #GResolverError and %NULL will be returned. * * If @cancellable is non-%NULL, it can be used to cancel the * operation, in which case @error (if non-%NULL) will be set to * %G_IO_ERROR_CANCELLED. * * If you are planning to connect to the service, it is usually easier * to create a #GNetworkService and use its #GSocketConnectable * interface. * * Params: * service = the service type to look up (eg, "ldap") * protocol = the networking protocol to use for @service (eg, "tcp") * domain = the DNS domain to look up the service in * cancellable = a #GCancellable, or %NULL * * Returns: a non-empty #GList of * #GSrvTarget, or %NULL on error. You must free each of the targets and the * list when you are done with it. (You can use g_resolver_free_targets() to do * this.) * * Since: 2.22 * * Throws: GException on failure. */ public ListG lookupService(string service, string protocol, string domain, Cancellable cancellable) { GError* err = null; auto p = g_resolver_lookup_service(gResolver, Str.toStringz(service), Str.toStringz(protocol), Str.toStringz(domain), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Begins asynchronously performing a DNS SRV lookup for the given * @service and @protocol in the given @domain, and eventually calls * @callback, which must call g_resolver_lookup_service_finish() to * get the final result. See g_resolver_lookup_service() for more * details. * * Params: * service = the service type to look up (eg, "ldap") * protocol = the networking protocol to use for @service (eg, "tcp") * domain = the DNS domain to look up the service in * cancellable = a #GCancellable, or %NULL * callback = callback to call after resolution completes * userData = data for @callback * * Since: 2.22 */ public void lookupServiceAsync(string service, string protocol, string domain, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_resolver_lookup_service_async(gResolver, Str.toStringz(service), Str.toStringz(protocol), Str.toStringz(domain), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Retrieves the result of a previous call to * g_resolver_lookup_service_async(). * * If the DNS resolution failed, @error (if non-%NULL) will be set to * a value from #GResolverError. If the operation was cancelled, * @error will be set to %G_IO_ERROR_CANCELLED. * * Params: * result = the result passed to your #GAsyncReadyCallback * * Returns: a non-empty #GList of * #GSrvTarget, or %NULL on error. See g_resolver_lookup_service() for more * details. * * Since: 2.22 * * Throws: GException on failure. */ public ListG lookupServiceFinish(AsyncResultIF result) { GError* err = null; auto p = g_resolver_lookup_service_finish(gResolver, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Sets @resolver to be the application's default resolver (reffing * @resolver, and unreffing the previous default resolver, if any). * Future calls to g_resolver_get_default() will return this resolver. * * This can be used if an application wants to perform any sort of DNS * caching or "pinning"; it can implement its own #GResolver that * calls the original default resolver for DNS operations, and * implements its own cache policies on top of that, and then set * itself as the default resolver for all later code to use. * * Since: 2.22 */ public void setDefault() { g_resolver_set_default(gResolver); } protected class OnReloadDelegateWrapper { void delegate(Resolver) dlg; gulong handlerId; this(void delegate(Resolver) dlg) { this.dlg = dlg; onReloadListeners ~= this; } void remove(OnReloadDelegateWrapper source) { foreach(index, wrapper; onReloadListeners) { if (wrapper.handlerId == source.handlerId) { onReloadListeners[index] = null; onReloadListeners = std.algorithm.remove(onReloadListeners, index); break; } } } } OnReloadDelegateWrapper[] onReloadListeners; /** * Emitted when the resolver notices that the system resolver * configuration has changed. */ gulong addOnReload(void delegate(Resolver) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnReloadDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "reload", cast(GCallback)&callBackReload, cast(void*)wrapper, cast(GClosureNotify)&callBackReloadDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackReload(GResolver* resolverStruct, OnReloadDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackReloadDestroy(OnReloadDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/Resource.d000066400000000000000000000507501324604450400177710ustar00rootroot00000000000000/* * 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 gio.Resource; private import gio.InputStream; private import gio.c.functions; public import gio.c.types; private import glib.Bytes; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Applications and libraries often contain binary or textual data that is * really part of the application, rather than user data. For instance * #GtkBuilder .ui files, splashscreen images, GMenu markup XML, CSS files, * icons, etc. These are often shipped as files in `$datadir/appname`, or * manually included as literal strings in the code. * * The #GResource API and the [glib-compile-resources][glib-compile-resources] program * provide a convenient and efficient alternative to this which has some nice properties. You * maintain the files as normal files, so its easy to edit them, but during the build the files * are combined into a binary bundle that is linked into the executable. This means that loading * the resource files are efficient (as they are already in memory, shared with other instances) and * simple (no need to check for things like I/O errors or locate the files in the filesystem). It * also makes it easier to create relocatable applications. * * Resource files can also be marked as compressed. Such files will be included in the resource bundle * in a compressed form, but will be automatically uncompressed when the resource is used. This * is very useful e.g. for larger text files that are parsed once (or rarely) and then thrown away. * * Resource files can also be marked to be preprocessed, by setting the value of the * `preprocess` attribute to a comma-separated list of preprocessing options. * The only options currently supported are: * * `xml-stripblanks` which will use the xmllint command * to strip ignorable whitespace from the XML file. For this to work, * the `XMLLINT` environment variable must be set to the full path to * the xmllint executable, or xmllint must be in the `PATH`; otherwise * the preprocessing step is skipped. * * `to-pixdata` which will use the gdk-pixbuf-pixdata command to convert * images to the GdkPixdata format, which allows you to create pixbufs directly using the data inside * the resource file, rather than an (uncompressed) copy if it. For this, the gdk-pixbuf-pixdata * program must be in the PATH, or the `GDK_PIXBUF_PIXDATA` environment variable must be * set to the full path to the gdk-pixbuf-pixdata executable; otherwise the resource compiler will * abort. * * Resource files will be exported in the GResource namespace using the * combination of the given `prefix` and the filename from the `file` element. * The `alias` attribute can be used to alter the filename to expose them at a * different location in the resource namespace. Typically, this is used to * include files from a different source directory without exposing the source * directory in the resource namespace, as in the example below. * * Resource bundles are created by the [glib-compile-resources][glib-compile-resources] program * which takes an XML file that describes the bundle, and a set of files that the XML references. These * are combined into a binary resource bundle. * * An example resource description: * |[ * * * * data/splashscreen.png * dialog.ui * menumarkup.xml * data/example.css * * * ]| * * This will create a resource bundle with the following files: * |[ * /org/gtk/Example/data/splashscreen.png * /org/gtk/Example/dialog.ui * /org/gtk/Example/menumarkup.xml * /org/gtk/Example/example.css * ]| * * Note that all resources in the process share the same namespace, so use Java-style * path prefixes (like in the above example) to avoid conflicts. * * You can then use [glib-compile-resources][glib-compile-resources] to compile the XML to a * binary bundle that you can load with g_resource_load(). However, its more common to use the --generate-source and * --generate-header arguments to create a source file and header to link directly into your application. * This will generate `get_resource()`, `register_resource()` and * `unregister_resource()` functions, prefixed by the `--c-name` argument passed * to [glib-compile-resources][glib-compile-resources]. `get_resource()` returns * the generated #GResource object. The register and unregister functions * register the resource so its files can be accessed using * g_resources_lookup_data(). * * Once a #GResource has been created and registered all the data in it can be accessed globally in the process by * using API calls like g_resources_open_stream() to stream the data or g_resources_lookup_data() to get a direct pointer * to the data. You can also use URIs like "resource:///org/gtk/Example/data/splashscreen.png" with #GFile to access * the resource data. * * Some higher-level APIs, such as #GtkApplication, will automatically load * resources from certain well-known paths in the resource namespace as a * convenience. See the documentation for those APIs for details. * * There are two forms of the generated source, the default version uses the compiler support for constructor * and destructor functions (where available) to automatically create and register the #GResource on startup * or library load time. If you pass `--manual-register`, two functions to register/unregister the resource are created * instead. This requires an explicit initialization call in your application/library, but it works on all platforms, * even on the minor ones where constructors are not supported. (Constructor support is available for at least Win32, Mac OS and Linux.) * * Note that resource data can point directly into the data segment of e.g. a library, so if you are unloading libraries * during runtime you need to be very careful with keeping around pointers to data from a resource, as this goes away * when the library is unloaded. However, in practice this is not generally a problem, since most resource accesses * are for your own resources, and resource data is often used once, during parsing, and then released. * * When debugging a program or testing a change to an installed version, it is often useful to be able to * replace resources in the program or library, without recompiling, for debugging or quick hacking and testing * purposes. Since GLib 2.50, it is possible to use the `G_RESOURCE_OVERLAYS` environment variable to selectively overlay * resources with replacements from the filesystem. It is a colon-separated list of substitutions to perform * during resource lookups. * * A substitution has the form * * |[ * /org/gtk/libgtk=/home/desrt/gtk-overlay * ]| * * The part before the `=` is the resource subpath for which the overlay applies. The part after is a * filesystem path which contains files and subdirectories as you would like to be loaded as resources with the * equivalent names. * * In the example above, if an application tried to load a resource with the resource path * `/org/gtk/libgtk/ui/gtkdialog.ui` then GResource would check the filesystem path * `/home/desrt/gtk-overlay/ui/gtkdialog.ui`. If a file was found there, it would be used instead. This is an * overlay, not an outright replacement, which means that if a file is not found at that path, the built-in * version will be used instead. Whiteouts are not currently supported. * * Substitutions must start with a slash, and must not contain a trailing slash before the '='. The path after * the slash should ideally be absolute, but this is not strictly required. It is possible to overlay the * location of a single resource with an individual file. * * Since: 2.32 */ public class Resource { /** the main Gtk struct */ protected GResource* gResource; protected bool ownedRef; /** Get the main Gtk struct */ public GResource* getResourceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gResource; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gResource; } /** * Sets our main struct and passes it to the parent class. */ public this (GResource* gResource, bool ownedRef = false) { this.gResource = gResource; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_resource_unref(gResource); } /** */ public static GType getType() { return g_resource_get_type(); } /** * Creates a GResource from a reference to the binary resource bundle. * This will keep a reference to @data while the resource lives, so * the data should not be modified or freed. * * If you want to use this resource in the global resource namespace you need * to register it with g_resources_register(). * * Params: * data = A #GBytes * * Returns: a new #GResource, or %NULL on error * * Since: 2.32 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(Bytes data) { GError* err = null; auto p = g_resource_new_from_data((data is null) ? null : data.getBytesStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_data"); } this(cast(GResource*) p); } /** * Registers the resource with the process-global set of resources. * Once a resource is registered the files in it can be accessed * with the global resource lookup functions like g_resources_lookup_data(). * * Params: * resource = A #GResource * * Since: 2.32 */ public static void register(Resource resource) { g_resources_register((resource is null) ? null : resource.getResourceStruct()); } /** * Unregisters the resource from the process-global set of resources. * * Params: * resource = A #GResource * * Since: 2.32 */ public static void unregister(Resource resource) { g_resources_unregister((resource is null) ? null : resource.getResourceStruct()); } /** * Returns all the names of children at the specified @path in the resource. * The return result is a %NULL terminated list of strings which should * be released with g_strfreev(). * * If @path is invalid or does not exist in the #GResource, * %G_RESOURCE_ERROR_NOT_FOUND will be returned. * * @lookup_flags controls the behaviour of the lookup. * * Params: * path = A pathname inside the resource * lookupFlags = A #GResourceLookupFlags * * Returns: an array of constant strings * * Since: 2.32 * * Throws: GException on failure. */ public string[] enumerateChildren(string path, GResourceLookupFlags lookupFlags) { GError* err = null; auto retStr = g_resource_enumerate_children(gResource, Str.toStringz(path), lookupFlags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Looks for a file at the specified @path in the resource and * if found returns information about it. * * @lookup_flags controls the behaviour of the lookup. * * Params: * path = A pathname inside the resource * lookupFlags = A #GResourceLookupFlags * size = a location to place the length of the contents of the file, * or %NULL if the length is not needed * flags = a location to place the flags about the file, * or %NULL if the length is not needed * * Returns: %TRUE if the file was found. %FALSE if there were errors * * Since: 2.32 * * Throws: GException on failure. */ public bool getInfo(string path, GResourceLookupFlags lookupFlags, out size_t size, out uint flags) { GError* err = null; auto p = g_resource_get_info(gResource, Str.toStringz(path), lookupFlags, &size, &flags, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Looks for a file at the specified @path in the resource and * returns a #GBytes that lets you directly access the data in * memory. * * The data is always followed by a zero byte, so you * can safely use the data as a C string. However, that byte * is not included in the size of the GBytes. * * For uncompressed resource files this is a pointer directly into * the resource bundle, which is typically in some readonly data section * in the program binary. For compressed files we allocate memory on * the heap and automatically uncompress the data. * * @lookup_flags controls the behaviour of the lookup. * * Params: * path = A pathname inside the resource * lookupFlags = A #GResourceLookupFlags * * Returns: #GBytes or %NULL on error. * Free the returned object with g_bytes_unref() * * Since: 2.32 * * Throws: GException on failure. */ public Bytes lookupData(string path, GResourceLookupFlags lookupFlags) { GError* err = null; auto p = g_resource_lookup_data(gResource, Str.toStringz(path), lookupFlags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Looks for a file at the specified @path in the resource and * returns a #GInputStream that lets you read the data. * * @lookup_flags controls the behaviour of the lookup. * * Params: * path = A pathname inside the resource * lookupFlags = A #GResourceLookupFlags * * Returns: #GInputStream or %NULL on error. * Free the returned object with g_object_unref() * * Since: 2.32 * * Throws: GException on failure. */ public InputStream openStream(string path, GResourceLookupFlags lookupFlags) { GError* err = null; auto p = g_resource_open_stream(gResource, Str.toStringz(path), lookupFlags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p, true); } /** * Atomically increments the reference count of @resource by one. This * function is MT-safe and may be called from any thread. * * Returns: The passed in #GResource * * Since: 2.32 */ public Resource doref() { auto p = g_resource_ref(gResource); if(p is null) { return null; } return ObjectG.getDObject!(Resource)(cast(GResource*) p, true); } /** * Atomically decrements the reference count of @resource by one. If the * reference count drops to 0, all memory allocated by the resource is * released. This function is MT-safe and may be called from any * thread. * * Since: 2.32 */ public void unref() { g_resource_unref(gResource); } /** * Loads a binary resource bundle and creates a #GResource representation of it, allowing * you to query it for data. * * If you want to use this resource in the global resource namespace you need * to register it with g_resources_register(). * * Params: * filename = the path of a filename to load, in the GLib filename encoding * * Returns: a new #GResource, or %NULL on error * * Since: 2.32 * * Throws: GException on failure. */ public static Resource load(string filename) { GError* err = null; auto p = g_resource_load(Str.toStringz(filename), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Resource)(cast(GResource*) p, true); } /** * Returns all the names of children at the specified @path in the set of * globally registered resources. * The return result is a %NULL terminated list of strings which should * be released with g_strfreev(). * * @lookup_flags controls the behaviour of the lookup. * * Params: * path = A pathname inside the resource * lookupFlags = A #GResourceLookupFlags * * Returns: an array of constant strings * * Since: 2.32 * * Throws: GException on failure. */ public static string[] resourcesEnumerateChildren(string path, GResourceLookupFlags lookupFlags) { GError* err = null; auto retStr = g_resources_enumerate_children(Str.toStringz(path), lookupFlags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Looks for a file at the specified @path in the set of * globally registered resources and if found returns information about it. * * @lookup_flags controls the behaviour of the lookup. * * Params: * path = A pathname inside the resource * lookupFlags = A #GResourceLookupFlags * size = a location to place the length of the contents of the file, * or %NULL if the length is not needed * flags = a location to place the #GResourceFlags about the file, * or %NULL if the flags are not needed * * Returns: %TRUE if the file was found. %FALSE if there were errors * * Since: 2.32 * * Throws: GException on failure. */ public static bool resourcesGetInfo(string path, GResourceLookupFlags lookupFlags, out size_t size, out uint flags) { GError* err = null; auto p = g_resources_get_info(Str.toStringz(path), lookupFlags, &size, &flags, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Looks for a file at the specified @path in the set of * globally registered resources and returns a #GBytes that * lets you directly access the data in memory. * * The data is always followed by a zero byte, so you * can safely use the data as a C string. However, that byte * is not included in the size of the GBytes. * * For uncompressed resource files this is a pointer directly into * the resource bundle, which is typically in some readonly data section * in the program binary. For compressed files we allocate memory on * the heap and automatically uncompress the data. * * @lookup_flags controls the behaviour of the lookup. * * Params: * path = A pathname inside the resource * lookupFlags = A #GResourceLookupFlags * * Returns: #GBytes or %NULL on error. * Free the returned object with g_bytes_unref() * * Since: 2.32 * * Throws: GException on failure. */ public static Bytes resourcesLookupData(string path, GResourceLookupFlags lookupFlags) { GError* err = null; auto p = g_resources_lookup_data(Str.toStringz(path), lookupFlags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Looks for a file at the specified @path in the set of * globally registered resources and returns a #GInputStream * that lets you read the data. * * @lookup_flags controls the behaviour of the lookup. * * Params: * path = A pathname inside the resource * lookupFlags = A #GResourceLookupFlags * * Returns: #GInputStream or %NULL on error. * Free the returned object with g_object_unref() * * Since: 2.32 * * Throws: GException on failure. */ public static InputStream resourcesOpenStream(string path, GResourceLookupFlags lookupFlags) { GError* err = null; auto p = g_resources_open_stream(Str.toStringz(path), lookupFlags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/SeekableIF.d000066400000000000000000000106661324604450400201360ustar00rootroot00000000000000/* * 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 gio.SeekableIF; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; public import gtkc.giotypes; /** * #GSeekable is implemented by streams (implementations of * #GInputStream or #GOutputStream) that support seeking. * * Seekable streams largely fall into two categories: resizable and * fixed-size. * * #GSeekable on fixed-sized streams is approximately the same as POSIX * lseek() on a block device (for example: attmepting to seek past the * end of the device is an error). Fixed streams typically cannot be * truncated. * * #GSeekable on resizable streams is approximately the same as POSIX * lseek() on a normal file. Seeking past the end and writing data will * usually cause the stream to resize by introducing zero bytes. */ public interface SeekableIF{ /** Get the main Gtk struct */ public GSeekable* getSeekableStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_seekable_get_type(); } /** * Tests if the stream supports the #GSeekableIface. * * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise. */ public bool canSeek(); /** * Tests if the stream can be truncated. * * Returns: %TRUE if the stream can be truncated, %FALSE otherwise. */ public bool canTruncate(); /** * Seeks in the stream by the given @offset, modified by @type. * * Attempting to seek past the end of the stream will have different * results depending on if the stream is fixed-sized or resizable. If * the stream is resizable then seeking past the end and then writing * will result in zeros filling the empty space. Seeking past the end * of a resizable stream and reading will result in EOF. Seeking past * the end of a fixed-sized stream will fail. * * Any operation that would result in a negative offset will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * offset = a #goffset. * type = a #GSeekType. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if successful. If an error * has occurred, this function will return %FALSE and set @error * appropriately if present. * * Throws: GException on failure. */ public bool seek(long offset, GSeekType type, Cancellable cancellable); /** * Tells the current position within the stream. * * Returns: the offset from the beginning of the buffer. */ public long tell(); /** * Truncates a stream with a given #offset. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an * operation was partially finished when the operation was cancelled the * partial result will be returned, without an error. * * Params: * offset = a #goffset. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if successful. If an error * has occurred, this function will return %FALSE and set @error * appropriately if present. * * Throws: GException on failure. */ public bool truncate(long offset, Cancellable cancellable); } GtkD-3.7.5/generated/gtkd/gio/SeekableT.d000066400000000000000000000120601324604450400200310ustar00rootroot00000000000000/* * 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 gio.SeekableT; public import gio.Cancellable; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import gtkc.giotypes; /** * #GSeekable is implemented by streams (implementations of * #GInputStream or #GOutputStream) that support seeking. * * Seekable streams largely fall into two categories: resizable and * fixed-size. * * #GSeekable on fixed-sized streams is approximately the same as POSIX * lseek() on a block device (for example: attmepting to seek past the * end of the device is an error). Fixed streams typically cannot be * truncated. * * #GSeekable on resizable streams is approximately the same as POSIX * lseek() on a normal file. Seeking past the end and writing data will * usually cause the stream to resize by introducing zero bytes. */ public template SeekableT(TStruct) { /** Get the main Gtk struct */ public GSeekable* getSeekableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GSeekable*)getStruct(); } /** * Tests if the stream supports the #GSeekableIface. * * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise. */ public bool canSeek() { return g_seekable_can_seek(getSeekableStruct()) != 0; } /** * Tests if the stream can be truncated. * * Returns: %TRUE if the stream can be truncated, %FALSE otherwise. */ public bool canTruncate() { return g_seekable_can_truncate(getSeekableStruct()) != 0; } /** * Seeks in the stream by the given @offset, modified by @type. * * Attempting to seek past the end of the stream will have different * results depending on if the stream is fixed-sized or resizable. If * the stream is resizable then seeking past the end and then writing * will result in zeros filling the empty space. Seeking past the end * of a resizable stream and reading will result in EOF. Seeking past * the end of a fixed-sized stream will fail. * * Any operation that would result in a negative offset will fail. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * offset = a #goffset. * type = a #GSeekType. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if successful. If an error * has occurred, this function will return %FALSE and set @error * appropriately if present. * * Throws: GException on failure. */ public bool seek(long offset, GSeekType type, Cancellable cancellable) { GError* err = null; auto p = g_seekable_seek(getSeekableStruct(), offset, type, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Tells the current position within the stream. * * Returns: the offset from the beginning of the buffer. */ public long tell() { return g_seekable_tell(getSeekableStruct()); } /** * Truncates a stream with a given #offset. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an * operation was partially finished when the operation was cancelled the * partial result will be returned, without an error. * * Params: * offset = a #goffset. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: %TRUE if successful. If an error * has occurred, this function will return %FALSE and set @error * appropriately if present. * * Throws: GException on failure. */ public bool truncate(long offset, Cancellable cancellable) { GError* err = null; auto p = g_seekable_truncate(getSeekableStruct(), offset, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/Settings.d000066400000000000000000001613141324604450400200010ustar00rootroot00000000000000/* * 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 gio.Settings; private import gio.ActionIF; private import gio.SettingsBackend; private import gio.SettingsSchema; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * The #GSettings class provides a convenient API for storing and retrieving * application settings. * * Reads and writes can be considered to be non-blocking. Reading * settings with #GSettings is typically extremely fast: on * approximately the same order of magnitude (but slower than) a * #GHashTable lookup. Writing settings is also extremely fast in terms * of time to return to your application, but can be extremely expensive * for other threads and other processes. Many settings backends * (including dconf) have lazy initialisation which means in the common * case of the user using their computer without modifying any settings * a lot of work can be avoided. For dconf, the D-Bus service doesn't * even need to be started in this case. For this reason, you should * only ever modify #GSettings keys in response to explicit user action. * Particular care should be paid to ensure that modifications are not * made during startup -- for example, when setting the initial value * of preferences widgets. The built-in g_settings_bind() functionality * is careful not to write settings in response to notify signals as a * result of modifications that it makes to widgets. * * When creating a GSettings instance, you have to specify a schema * that describes the keys in your settings and their types and default * values, as well as some other information. * * Normally, a schema has as fixed path that determines where the settings * are stored in the conceptual global tree of settings. However, schemas * can also be '[relocatable][gsettings-relocatable]', i.e. not equipped with * a fixed path. This is * useful e.g. when the schema describes an 'account', and you want to be * able to store a arbitrary number of accounts. * * Paths must start with and end with a forward slash character ('/') * and must not contain two sequential slash characters. Paths should * be chosen based on a domain name associated with the program or * library to which the settings belong. Examples of paths are * "/org/gtk/settings/file-chooser/" and "/ca/desrt/dconf-editor/". * Paths should not start with "/apps/", "/desktop/" or "/system/" as * they often did in GConf. * * Unlike other configuration systems (like GConf), GSettings does not * restrict keys to basic types like strings and numbers. GSettings stores * values as #GVariant, and allows any #GVariantType for keys. Key names * are restricted to lowercase characters, numbers and '-'. Furthermore, * the names must begin with a lowercase character, must not end * with a '-', and must not contain consecutive dashes. * * Similar to GConf, the default values in GSettings schemas can be * localized, but the localized values are stored in gettext catalogs * and looked up with the domain that is specified in the * `gettext-domain` attribute of the or * elements and the category that is specified in the `l10n` attribute of * the element. The string which is translated includes all text in * the element, including any surrounding quotation marks. * * The `l10n` attribute must be set to `messages` or `time`, and sets the * [locale category for * translation](https://www.gnu.org/software/gettext/manual/html_node/Aspects.html#index-locale-categories-1). * The `messages` category should be used by default; use `time` for * translatable date or time formats. A translation comment can be added as an * XML comment immediately above the element — it is recommended to * add these comments to aid translators understand the meaning and * implications of the default value. An optional translation `context` * attribute can be set on the element to disambiguate multiple * defaults which use the same string. * * For example: * |[ * * ['bad', 'words'] * ]| * * Translations of default values must remain syntactically valid serialized * #GVariants (e.g. retaining any surrounding quotation marks) or runtime * errors will occur. * * GSettings uses schemas in a compact binary form that is created * by the [glib-compile-schemas][glib-compile-schemas] * utility. The input is a schema description in an XML format. * * A DTD for the gschema XML format can be found here: * [gschema.dtd](https://git.gnome.org/browse/glib/tree/gio/gschema.dtd) * * The [glib-compile-schemas][glib-compile-schemas] tool expects schema * files to have the extension `.gschema.xml`. * * At runtime, schemas are identified by their id (as specified in the * id attribute of the element). The convention for schema * ids is to use a dotted name, similar in style to a D-Bus bus name, * e.g. "org.gnome.SessionManager". In particular, if the settings are * for a specific service that owns a D-Bus bus name, the D-Bus bus name * and schema id should match. For schemas which deal with settings not * associated with one named application, the id should not use * StudlyCaps, e.g. "org.gnome.font-rendering". * * In addition to #GVariant types, keys can have types that have * enumerated types. These can be described by a , * or element, as seen in the * [example][schema-enumerated]. The underlying type of such a key * is string, but you can use g_settings_get_enum(), g_settings_set_enum(), * g_settings_get_flags(), g_settings_set_flags() access the numeric values * corresponding to the string value of enum and flags keys. * * An example for default value: * |[ * * * * * "Hello, earthlings" * A greeting * * Greeting of the invading martians * * * * * (20,30) * * * * * ]| * * An example for ranges, choices and enumerated types: * |[ * * * * * * * * * * * * * * * * * * 10 * * * * * * * * * * * * * 'Joe' * * * * 'first' * * * * ["flag1","flag2"] * * * * ]| * * ## Vendor overrides * * Default values are defined in the schemas that get installed by * an application. Sometimes, it is necessary for a vendor or distributor * to adjust these defaults. Since patching the XML source for the schema * is inconvenient and error-prone, * [glib-compile-schemas][glib-compile-schemas] reads so-called vendor * override' files. These are keyfiles in the same directory as the XML * schema sources which can override default values. The schema id serves * as the group name in the key file, and the values are expected in * serialized GVariant form, as in the following example: * |[ * [org.gtk.Example] * key1='string' * key2=1.5 * ]| * * glib-compile-schemas expects schema files to have the extension * `.gschema.override`. * * ## Binding * * A very convenient feature of GSettings lets you bind #GObject properties * directly to settings, using g_settings_bind(). Once a GObject property * has been bound to a setting, changes on either side are automatically * propagated to the other side. GSettings handles details like mapping * between GObject and GVariant types, and preventing infinite cycles. * * This makes it very easy to hook up a preferences dialog to the * underlying settings. To make this even more convenient, GSettings * looks for a boolean property with the name "sensitivity" and * automatically binds it to the writability of the bound setting. * If this 'magic' gets in the way, it can be suppressed with the * #G_SETTINGS_BIND_NO_SENSITIVITY flag. * * ## Relocatable schemas # {#gsettings-relocatable} * * A relocatable schema is one with no `path` attribute specified on its * element. By using g_settings_new_with_path(), a #GSettings object * can be instantiated for a relocatable schema, assigning a path to the * instance. Paths passed to g_settings_new_with_path() will typically be * constructed dynamically from a constant prefix plus some form of instance * identifier; but they must still be valid GSettings paths. Paths could also * be constant and used with a globally installed schema originating from a * dependency library. * * For example, a relocatable schema could be used to store geometry information * for different windows in an application. If the schema ID was * `org.foo.MyApp.Window`, it could be instantiated for paths * `/org/foo/MyApp/main/`, `/org/foo/MyApp/document-1/`, * `/org/foo/MyApp/document-2/`, etc. If any of the paths are well-known * they can be specified as elements in the parent schema, e.g.: * |[ * * * * ]| * * ## Build system integration # {#gsettings-build-system} * * GSettings comes with autotools integration to simplify compiling and * installing schemas. To add GSettings support to an application, add the * following to your `configure.ac`: * |[ * GLIB_GSETTINGS * ]| * * In the appropriate `Makefile.am`, use the following snippet to compile and * install the named schema: * |[ * gsettings_SCHEMAS = org.foo.MyApp.gschema.xml * EXTRA_DIST = $(gsettings_SCHEMAS) * * @GSETTINGS_RULES@ * ]| * * No changes are needed to the build system to mark a schema XML file for * translation. Assuming it sets the `gettext-domain` attribute, a schema may * be marked for translation by adding it to `POTFILES.in`, assuming gettext * 0.19 is in use (the preferred method for translation): * |[ * data/org.foo.MyApp.gschema.xml * ]| * * Alternatively, if intltool 0.50.1 is in use: * |[ * [type: gettext/gsettings]data/org.foo.MyApp.gschema.xml * ]| * * GSettings will use gettext to look up translations for the
    and * elements, and also any elements which have a `l10n` * attribute set. Translations must not be included in the `.gschema.xml` file * by the build system, for example by using intltool XML rules with a * `.gschema.xml.in` template. * * If an enumerated type defined in a C header file is to be used in a GSettings * schema, it can either be defined manually using an element in the * schema XML, or it can be extracted automatically from the C header. This * approach is preferred, as it ensures the two representations are always * synchronised. To do so, add the following to the relevant `Makefile.am`: * |[ * gsettings_ENUM_NAMESPACE = org.foo.MyApp * gsettings_ENUM_FILES = my-app-enums.h my-app-misc.h * ]| * * `gsettings_ENUM_NAMESPACE` specifies the schema namespace for the enum files, * which are specified in `gsettings_ENUM_FILES`. This will generate a * `org.foo.MyApp.enums.xml` file containing the extracted enums, which will be * automatically included in the schema compilation, install and uninstall * rules. It should not be committed to version control or included in * `EXTRA_DIST`. */ public class Settings : ObjectG { /** the main Gtk struct */ protected GSettings* gSettings; /** Get the main Gtk struct */ public GSettings* getSettingsStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSettings; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSettings; } protected override void setStruct(GObject* obj) { gSettings = cast(GSettings*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSettings* gSettings, bool ownedRef = false) { this.gSettings = gSettings; super(cast(GObject*)gSettings, ownedRef); } /** */ public static GType getType() { return g_settings_get_type(); } /** * Creates a new #GSettings object with the schema specified by * @schema_id. * * Signals on the newly created #GSettings object will be dispatched * via the thread-default #GMainContext in effect at the time of the * call to g_settings_new(). The new #GSettings will hold a reference * on the context. See g_main_context_push_thread_default(). * * Params: * schemaId = the id of the schema * * Returns: a new #GSettings object * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string schemaId) { auto p = g_settings_new(Str.toStringz(schemaId)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSettings*) p, true); } /** * Creates a new #GSettings object with a given schema, backend and * path. * * It should be extremely rare that you ever want to use this function. * It is made available for advanced use-cases (such as plugin systems * that want to provide access to schemas loaded from custom locations, * etc). * * At the most basic level, a #GSettings object is a pure composition of * 4 things: a #GSettingsSchema, a #GSettingsBackend, a path within that * backend, and a #GMainContext to which signals are dispatched. * * This constructor therefore gives you full control over constructing * #GSettings instances. The first 3 parameters are given directly as * @schema, @backend and @path, and the main context is taken from the * thread-default (as per g_settings_new()). * * If @backend is %NULL then the default backend is used. * * If @path is %NULL then the path from the schema is used. It is an * error if @path is %NULL and the schema has no path of its own or if * @path is non-%NULL and not equal to the path that the schema does * have. * * Params: * schema = a #GSettingsSchema * backend = a #GSettingsBackend * path = the path to use * * Returns: a new #GSettings object * * Since: 2.32 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(SettingsSchema schema, SettingsBackend backend, string path) { auto p = g_settings_new_full((schema is null) ? null : schema.getSettingsSchemaStruct(), (backend is null) ? null : backend.getSettingsBackendStruct(), Str.toStringz(path)); if(p is null) { throw new ConstructionException("null returned by new_full"); } this(cast(GSettings*) p, true); } /** * Creates a new #GSettings object with the schema specified by * @schema_id and a given #GSettingsBackend. * * Creating a #GSettings object with a different backend allows accessing * settings from a database other than the usual one. For example, it may make * sense to pass a backend corresponding to the "defaults" settings database on * the system to get a settings object that modifies the system default * settings instead of the settings for this user. * * Params: * schemaId = the id of the schema * backend = the #GSettingsBackend to use * * Returns: a new #GSettings object * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string schemaId, SettingsBackend backend) { auto p = g_settings_new_with_backend(Str.toStringz(schemaId), (backend is null) ? null : backend.getSettingsBackendStruct()); if(p is null) { throw new ConstructionException("null returned by new_with_backend"); } this(cast(GSettings*) p, true); } /** * Creates a new #GSettings object with the schema specified by * @schema_id and a given #GSettingsBackend and path. * * This is a mix of g_settings_new_with_backend() and * g_settings_new_with_path(). * * Params: * schemaId = the id of the schema * backend = the #GSettingsBackend to use * path = the path to use * * Returns: a new #GSettings object * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string schemaId, SettingsBackend backend, string path) { auto p = g_settings_new_with_backend_and_path(Str.toStringz(schemaId), (backend is null) ? null : backend.getSettingsBackendStruct(), Str.toStringz(path)); if(p is null) { throw new ConstructionException("null returned by new_with_backend_and_path"); } this(cast(GSettings*) p, true); } /** * Creates a new #GSettings object with the relocatable schema specified * by @schema_id and a given path. * * You only need to do this if you want to directly create a settings * object with a schema that doesn't have a specified path of its own. * That's quite rare. * * It is a programmer error to call this function for a schema that * has an explicitly specified path. * * It is a programmer error if @path is not a valid path. A valid path * begins and ends with '/' and does not contain two consecutive '/' * characters. * * Params: * schemaId = the id of the schema * path = the path to use * * Returns: a new #GSettings object * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string schemaId, string path) { auto p = g_settings_new_with_path(Str.toStringz(schemaId), Str.toStringz(path)); if(p is null) { throw new ConstructionException("null returned by new_with_path"); } this(cast(GSettings*) p, true); } /** * * * Deprecated: Use g_settings_schema_source_list_schemas() instead * * Returns: a list of relocatable * #GSettings schemas that are available. The list must not be * modified or freed. * * Since: 2.28 */ public static string[] listRelocatableSchemas() { return Str.toStringArray(g_settings_list_relocatable_schemas()); } /** * * * Deprecated: Use g_settings_schema_source_list_schemas() instead. * If you used g_settings_list_schemas() to check for the presence of * a particular schema, use g_settings_schema_source_lookup() instead * of your whole loop. * * Returns: a list of #GSettings * schemas that are available. The list must not be modified or * freed. * * Since: 2.26 */ public static string[] listSchemas() { return Str.toStringArray(g_settings_list_schemas()); } /** * Ensures that all pending operations are complete for the default backend. * * Writes made to a #GSettings are handled asynchronously. For this * reason, it is very unlikely that the changes have it to disk by the * time g_settings_set() returns. * * This call will block until all of the writes have made it to the * backend. Since the mainloop is not running, no change notifications * will be dispatched during this call (but some may be queued by the * time the call is done). */ public static void sync() { g_settings_sync(); } /** * Removes an existing binding for @property on @object. * * Note that bindings are automatically removed when the * object is finalized, so it is rarely necessary to call this * function. * * Params: * object = the object * property = the property whose binding is removed * * Since: 2.26 */ public static void unbind(ObjectG object, string property) { g_settings_unbind((object is null) ? null : object.getObjectGStruct(), Str.toStringz(property)); } /** * Applies any changes that have been made to the settings. This * function does nothing unless @settings is in 'delay-apply' mode; * see g_settings_delay(). In the normal case settings are always * applied immediately. */ public void apply() { g_settings_apply(gSettings); } /** * Create a binding between the @key in the @settings object * and the property @property of @object. * * The binding uses the default GIO mapping functions to map * between the settings and property values. These functions * handle booleans, numeric types and string types in a * straightforward way. Use g_settings_bind_with_mapping() if * you need a custom mapping, or map between types that are not * supported by the default mapping functions. * * Unless the @flags include %G_SETTINGS_BIND_NO_SENSITIVITY, this * function also establishes a binding between the writability of * @key and the "sensitive" property of @object (if @object has * a boolean property by that name). See g_settings_bind_writable() * for more details about writable bindings. * * Note that the lifecycle of the binding is tied to the object, * and that you can have only one binding per object property. * If you bind the same property twice on the same object, the second * binding overrides the first one. * * Params: * key = the key to bind * object = a #GObject * property = the name of the property to bind * flags = flags for the binding * * Since: 2.26 */ public void bind(string key, ObjectG object, string property, GSettingsBindFlags flags) { g_settings_bind(gSettings, Str.toStringz(key), (object is null) ? null : object.getObjectGStruct(), Str.toStringz(property), flags); } /** * Create a binding between the @key in the @settings object * and the property @property of @object. * * The binding uses the provided mapping functions to map between * settings and property values. * * Note that the lifecycle of the binding is tied to the object, * and that you can have only one binding per object property. * If you bind the same property twice on the same object, the second * binding overrides the first one. * * Params: * key = the key to bind * object = a #GObject * property = the name of the property to bind * flags = flags for the binding * getMapping = a function that gets called to convert values * from @settings to @object, or %NULL to use the default GIO mapping * setMapping = a function that gets called to convert values * from @object to @settings, or %NULL to use the default GIO mapping * userData = data that gets passed to @get_mapping and @set_mapping * destroy = #GDestroyNotify function for @user_data * * Since: 2.26 */ public void bindWithMapping(string key, ObjectG object, string property, GSettingsBindFlags flags, GSettingsBindGetMapping getMapping, GSettingsBindSetMapping setMapping, void* userData, GDestroyNotify destroy) { g_settings_bind_with_mapping(gSettings, Str.toStringz(key), (object is null) ? null : object.getObjectGStruct(), Str.toStringz(property), flags, getMapping, setMapping, userData, destroy); } /** * Create a binding between the writability of @key in the * @settings object and the property @property of @object. * The property must be boolean; "sensitive" or "visible" * properties of widgets are the most likely candidates. * * Writable bindings are always uni-directional; changes of the * writability of the setting will be propagated to the object * property, not the other way. * * When the @inverted argument is %TRUE, the binding inverts the * value as it passes from the setting to the object, i.e. @property * will be set to %TRUE if the key is not writable. * * Note that the lifecycle of the binding is tied to the object, * and that you can have only one binding per object property. * If you bind the same property twice on the same object, the second * binding overrides the first one. * * Params: * key = the key to bind * object = a #GObject * property = the name of a boolean property to bind * inverted = whether to 'invert' the value * * Since: 2.26 */ public void bindWritable(string key, ObjectG object, string property, bool inverted) { g_settings_bind_writable(gSettings, Str.toStringz(key), (object is null) ? null : object.getObjectGStruct(), Str.toStringz(property), inverted); } /** * Creates a #GAction corresponding to a given #GSettings key. * * The action has the same name as the key. * * The value of the key becomes the state of the action and the action * is enabled when the key is writable. Changing the state of the * action results in the key being written to. Changes to the value or * writability of the key cause appropriate change notifications to be * emitted for the action. * * For boolean-valued keys, action activations take no parameter and * result in the toggling of the value. For all other types, * activations take the new value for the key (which must have the * correct type). * * Params: * key = the name of a key in @settings * * Returns: a new #GAction * * Since: 2.32 */ public ActionIF createAction(string key) { auto p = g_settings_create_action(gSettings, Str.toStringz(key)); if(p is null) { return null; } return ObjectG.getDObject!(ActionIF)(cast(GAction*) p, true); } /** * Changes the #GSettings object into 'delay-apply' mode. In this * mode, changes to @settings are not immediately propagated to the * backend, but kept locally until g_settings_apply() is called. * * Since: 2.26 */ public void delay() { g_settings_delay(gSettings); } /** * Gets the value that is stored at @key in @settings. * * A convenience variant of g_settings_get() for booleans. * * It is a programmer error to give a @key that isn't specified as * having a boolean type in the schema for @settings. * * Params: * key = the key to get the value for * * Returns: a boolean * * Since: 2.26 */ public bool getBoolean(string key) { return g_settings_get_boolean(gSettings, Str.toStringz(key)) != 0; } /** * Creates a child settings object which has a base path of * `base-path/@name`, where `base-path` is the base path of * @settings. * * The schema for the child settings object must have been declared * in the schema of @settings using a element. * * Params: * name = the name of the child schema * * Returns: a 'child' settings object * * Since: 2.26 */ public Settings getChild(string name) { auto p = g_settings_get_child(gSettings, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(Settings)(cast(GSettings*) p, true); } /** * Gets the "default value" of a key. * * This is the value that would be read if g_settings_reset() were to be * called on the key. * * Note that this may be a different value than returned by * g_settings_schema_key_get_default_value() if the system administrator * has provided a default value. * * Comparing the return values of g_settings_get_default_value() and * g_settings_get_value() is not sufficient for determining if a value * has been set because the user may have explicitly set the value to * something that happens to be equal to the default. The difference * here is that if the default changes in the future, the user's key * will still be set. * * This function may be useful for adding an indication to a UI of what * the default value was before the user set it. * * It is a programmer error to give a @key that isn't contained in the * schema for @settings. * * Params: * key = the key to get the default value for * * Returns: the default value * * Since: 2.40 */ public Variant getDefaultValue(string key) { auto p = g_settings_get_default_value(gSettings, Str.toStringz(key)); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets the value that is stored at @key in @settings. * * A convenience variant of g_settings_get() for doubles. * * It is a programmer error to give a @key that isn't specified as * having a 'double' type in the schema for @settings. * * Params: * key = the key to get the value for * * Returns: a double * * Since: 2.26 */ public double getDouble(string key) { return g_settings_get_double(gSettings, Str.toStringz(key)); } /** * Gets the value that is stored in @settings for @key and converts it * to the enum value that it represents. * * In order to use this function the type of the value must be a string * and it must be marked in the schema file as an enumerated type. * * It is a programmer error to give a @key that isn't contained in the * schema for @settings or is not marked as an enumerated type. * * If the value stored in the configuration database is not a valid * value for the enumerated type then this function will return the * default value. * * Params: * key = the key to get the value for * * Returns: the enum value * * Since: 2.26 */ public int getEnum(string key) { return g_settings_get_enum(gSettings, Str.toStringz(key)); } /** * Gets the value that is stored in @settings for @key and converts it * to the flags value that it represents. * * In order to use this function the type of the value must be an array * of strings and it must be marked in the schema file as an flags type. * * It is a programmer error to give a @key that isn't contained in the * schema for @settings or is not marked as a flags type. * * If the value stored in the configuration database is not a valid * value for the flags type then this function will return the default * value. * * Params: * key = the key to get the value for * * Returns: the flags value * * Since: 2.26 */ public uint getFlags(string key) { return g_settings_get_flags(gSettings, Str.toStringz(key)); } /** * Returns whether the #GSettings object has any unapplied * changes. This can only be the case if it is in 'delayed-apply' mode. * * Returns: %TRUE if @settings has unapplied changes * * Since: 2.26 */ public bool getHasUnapplied() { return g_settings_get_has_unapplied(gSettings) != 0; } /** * Gets the value that is stored at @key in @settings. * * A convenience variant of g_settings_get() for 32-bit integers. * * It is a programmer error to give a @key that isn't specified as * having a int32 type in the schema for @settings. * * Params: * key = the key to get the value for * * Returns: an integer * * Since: 2.26 */ public int getInt(string key) { return g_settings_get_int(gSettings, Str.toStringz(key)); } /** * Gets the value that is stored at @key in @settings. * * A convenience variant of g_settings_get() for 64-bit integers. * * It is a programmer error to give a @key that isn't specified as * having a int64 type in the schema for @settings. * * Params: * key = the key to get the value for * * Returns: a 64-bit integer * * Since: 2.50 */ public long getInt64(string key) { return g_settings_get_int64(gSettings, Str.toStringz(key)); } /** * Gets the value that is stored at @key in @settings, subject to * application-level validation/mapping. * * You should use this function when the application needs to perform * some processing on the value of the key (for example, parsing). The * @mapping function performs that processing. If the function * indicates that the processing was unsuccessful (due to a parse error, * for example) then the mapping is tried again with another value. * * This allows a robust 'fall back to defaults' behaviour to be * implemented somewhat automatically. * * The first value that is tried is the user's setting for the key. If * the mapping function fails to map this value, other values may be * tried in an unspecified order (system or site defaults, translated * schema default values, untranslated schema default values, etc). * * If the mapping function fails for all possible values, one additional * attempt is made: the mapping function is called with a %NULL value. * If the mapping function still indicates failure at this point then * the application will be aborted. * * The result parameter for the @mapping function is pointed to a * #gpointer which is initially set to %NULL. The same pointer is given * to each invocation of @mapping. The final value of that #gpointer is * what is returned by this function. %NULL is valid; it is returned * just as any other value would be. * * Params: * key = the key to get the value for * mapping = the function to map the value in the * settings database to the value used by the application * userData = user data for @mapping * * Returns: the result, which may be %NULL */ public void* getMapped(string key, GSettingsGetMapping mapping, void* userData) { return g_settings_get_mapped(gSettings, Str.toStringz(key), mapping, userData); } /** * Queries the range of a key. * * Deprecated: Use g_settings_schema_key_get_range() instead. * * Params: * key = the key to query the range of * * Since: 2.28 */ public Variant getRange(string key) { auto p = g_settings_get_range(gSettings, Str.toStringz(key)); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets the value that is stored at @key in @settings. * * A convenience variant of g_settings_get() for strings. * * It is a programmer error to give a @key that isn't specified as * having a string type in the schema for @settings. * * Params: * key = the key to get the value for * * Returns: a newly-allocated string * * Since: 2.26 */ public string getString(string key) { auto retStr = g_settings_get_string(gSettings, Str.toStringz(key)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * A convenience variant of g_settings_get() for string arrays. * * It is a programmer error to give a @key that isn't specified as * having an array of strings type in the schema for @settings. * * Params: * key = the key to get the value for * * Returns: a * newly-allocated, %NULL-terminated array of strings, the value that * is stored at @key in @settings. * * Since: 2.26 */ public string[] getStrv(string key) { auto retStr = g_settings_get_strv(gSettings, Str.toStringz(key)); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Gets the value that is stored at @key in @settings. * * A convenience variant of g_settings_get() for 32-bit unsigned * integers. * * It is a programmer error to give a @key that isn't specified as * having a uint32 type in the schema for @settings. * * Params: * key = the key to get the value for * * Returns: an unsigned integer * * Since: 2.30 */ public uint getUint(string key) { return g_settings_get_uint(gSettings, Str.toStringz(key)); } /** * Gets the value that is stored at @key in @settings. * * A convenience variant of g_settings_get() for 64-bit unsigned * integers. * * It is a programmer error to give a @key that isn't specified as * having a uint64 type in the schema for @settings. * * Params: * key = the key to get the value for * * Returns: a 64-bit unsigned integer * * Since: 2.50 */ public ulong getUint64(string key) { return g_settings_get_uint64(gSettings, Str.toStringz(key)); } /** * Checks the "user value" of a key, if there is one. * * The user value of a key is the last value that was set by the user. * * After calling g_settings_reset() this function should always return * %NULL (assuming something is not wrong with the system * configuration). * * It is possible that g_settings_get_value() will return a different * value than this function. This can happen in the case that the user * set a value for a key that was subsequently locked down by the system * administrator -- this function will return the user's old value. * * This function may be useful for adding a "reset" option to a UI or * for providing indication that a particular value has been changed. * * It is a programmer error to give a @key that isn't contained in the * schema for @settings. * * Params: * key = the key to get the user value for * * Returns: the user's value, if set * * Since: 2.40 */ public Variant getUserValue(string key) { auto p = g_settings_get_user_value(gSettings, Str.toStringz(key)); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets the value that is stored in @settings for @key. * * It is a programmer error to give a @key that isn't contained in the * schema for @settings. * * Params: * key = the key to get the value for * * Returns: a new #GVariant * * Since: 2.26 */ public Variant getValue(string key) { auto p = g_settings_get_value(gSettings, Str.toStringz(key)); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Finds out if a key can be written or not * * Params: * name = the name of a key * * Returns: %TRUE if the key @name is writable * * Since: 2.26 */ public bool isWritable(string name) { return g_settings_is_writable(gSettings, Str.toStringz(name)) != 0; } /** * Gets the list of children on @settings. * * The list is exactly the list of strings for which it is not an error * to call g_settings_get_child(). * * For GSettings objects that are lists, this value can change at any * time and you should connect to the "children-changed" signal to watch * for those changes. Note that there is a race condition here: you may * request a child after listing it only for it to have been destroyed * in the meantime. For this reason, g_settings_get_child() may return * %NULL even for a child that was listed by this function. * * For GSettings objects that are not lists, you should probably not be * calling this function from "normal" code (since you should already * know what children are in your schema). This function may still be * useful there for introspection reasons, however. * * You should free the return value with g_strfreev() when you are done * with it. * * Returns: a list of the children on @settings */ public string[] listChildren() { auto retStr = g_settings_list_children(gSettings); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Introspects the list of keys on @settings. * * You should probably not be calling this function from "normal" code * (since you should already know what keys are in your schema). This * function is intended for introspection reasons. * * You should free the return value with g_strfreev() when you are done * with it. * * Returns: a list of the keys on @settings */ public string[] listKeys() { auto retStr = g_settings_list_keys(gSettings); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Checks if the given @value is of the correct type and within the * permitted range for @key. * * Deprecated: Use g_settings_schema_key_range_check() instead. * * Params: * key = the key to check * value = the value to check * * Returns: %TRUE if @value is valid for @key * * Since: 2.28 */ public bool rangeCheck(string key, Variant value) { return g_settings_range_check(gSettings, Str.toStringz(key), (value is null) ? null : value.getVariantStruct()) != 0; } /** * Resets @key to its default value. * * This call resets the key, as much as possible, to its default value. * That might the value specified in the schema or the one set by the * administrator. * * Params: * key = the name of a key */ public void reset(string key) { g_settings_reset(gSettings, Str.toStringz(key)); } /** * Reverts all non-applied changes to the settings. This function * does nothing unless @settings is in 'delay-apply' mode; see * g_settings_delay(). In the normal case settings are always applied * immediately. * * Change notifications will be emitted for affected keys. */ public void revert() { g_settings_revert(gSettings); } /** * Sets @key in @settings to @value. * * A convenience variant of g_settings_set() for booleans. * * It is a programmer error to give a @key that isn't specified as * having a boolean type in the schema for @settings. * * Params: * key = the name of the key to set * value = the value to set it to * * Returns: %TRUE if setting the key succeeded, * %FALSE if the key was not writable * * Since: 2.26 */ public bool setBoolean(string key, bool value) { return g_settings_set_boolean(gSettings, Str.toStringz(key), value) != 0; } /** * Sets @key in @settings to @value. * * A convenience variant of g_settings_set() for doubles. * * It is a programmer error to give a @key that isn't specified as * having a 'double' type in the schema for @settings. * * Params: * key = the name of the key to set * value = the value to set it to * * Returns: %TRUE if setting the key succeeded, * %FALSE if the key was not writable * * Since: 2.26 */ public bool setDouble(string key, double value) { return g_settings_set_double(gSettings, Str.toStringz(key), value) != 0; } /** * Looks up the enumerated type nick for @value and writes it to @key, * within @settings. * * It is a programmer error to give a @key that isn't contained in the * schema for @settings or is not marked as an enumerated type, or for * @value not to be a valid value for the named type. * * After performing the write, accessing @key directly with * g_settings_get_string() will return the 'nick' associated with * @value. * * Params: * key = a key, within @settings * value = an enumerated value * * Returns: %TRUE, if the set succeeds */ public bool setEnum(string key, int value) { return g_settings_set_enum(gSettings, Str.toStringz(key), value) != 0; } /** * Looks up the flags type nicks for the bits specified by @value, puts * them in an array of strings and writes the array to @key, within * @settings. * * It is a programmer error to give a @key that isn't contained in the * schema for @settings or is not marked as a flags type, or for @value * to contain any bits that are not value for the named type. * * After performing the write, accessing @key directly with * g_settings_get_strv() will return an array of 'nicks'; one for each * bit in @value. * * Params: * key = a key, within @settings * value = a flags value * * Returns: %TRUE, if the set succeeds */ public bool setFlags(string key, uint value) { return g_settings_set_flags(gSettings, Str.toStringz(key), value) != 0; } /** * Sets @key in @settings to @value. * * A convenience variant of g_settings_set() for 32-bit integers. * * It is a programmer error to give a @key that isn't specified as * having a int32 type in the schema for @settings. * * Params: * key = the name of the key to set * value = the value to set it to * * Returns: %TRUE if setting the key succeeded, * %FALSE if the key was not writable * * Since: 2.26 */ public bool setInt(string key, int value) { return g_settings_set_int(gSettings, Str.toStringz(key), value) != 0; } /** * Sets @key in @settings to @value. * * A convenience variant of g_settings_set() for 64-bit integers. * * It is a programmer error to give a @key that isn't specified as * having a int64 type in the schema for @settings. * * Params: * key = the name of the key to set * value = the value to set it to * * Returns: %TRUE if setting the key succeeded, * %FALSE if the key was not writable * * Since: 2.50 */ public bool setInt64(string key, long value) { return g_settings_set_int64(gSettings, Str.toStringz(key), value) != 0; } /** * Sets @key in @settings to @value. * * A convenience variant of g_settings_set() for strings. * * It is a programmer error to give a @key that isn't specified as * having a string type in the schema for @settings. * * Params: * key = the name of the key to set * value = the value to set it to * * Returns: %TRUE if setting the key succeeded, * %FALSE if the key was not writable * * Since: 2.26 */ public bool setString(string key, string value) { return g_settings_set_string(gSettings, Str.toStringz(key), Str.toStringz(value)) != 0; } /** * Sets @key in @settings to @value. * * A convenience variant of g_settings_set() for string arrays. If * @value is %NULL, then @key is set to be the empty array. * * It is a programmer error to give a @key that isn't specified as * having an array of strings type in the schema for @settings. * * Params: * key = the name of the key to set * value = the value to set it to, or %NULL * * Returns: %TRUE if setting the key succeeded, * %FALSE if the key was not writable * * Since: 2.26 */ public bool setStrv(string key, string[] value) { return g_settings_set_strv(gSettings, Str.toStringz(key), Str.toStringzArray(value)) != 0; } /** * Sets @key in @settings to @value. * * A convenience variant of g_settings_set() for 32-bit unsigned * integers. * * It is a programmer error to give a @key that isn't specified as * having a uint32 type in the schema for @settings. * * Params: * key = the name of the key to set * value = the value to set it to * * Returns: %TRUE if setting the key succeeded, * %FALSE if the key was not writable * * Since: 2.30 */ public bool setUint(string key, uint value) { return g_settings_set_uint(gSettings, Str.toStringz(key), value) != 0; } /** * Sets @key in @settings to @value. * * A convenience variant of g_settings_set() for 64-bit unsigned * integers. * * It is a programmer error to give a @key that isn't specified as * having a uint64 type in the schema for @settings. * * Params: * key = the name of the key to set * value = the value to set it to * * Returns: %TRUE if setting the key succeeded, * %FALSE if the key was not writable * * Since: 2.50 */ public bool setUint64(string key, ulong value) { return g_settings_set_uint64(gSettings, Str.toStringz(key), value) != 0; } /** * Sets @key in @settings to @value. * * It is a programmer error to give a @key that isn't contained in the * schema for @settings or for @value to have the incorrect type, per * the schema. * * If @value is floating then this function consumes the reference. * * Params: * key = the name of the key to set * value = a #GVariant of the correct type * * Returns: %TRUE if setting the key succeeded, * %FALSE if the key was not writable * * Since: 2.26 */ public bool setValue(string key, Variant value) { return g_settings_set_value(gSettings, Str.toStringz(key), (value is null) ? null : value.getVariantStruct()) != 0; } protected class OnChangeDelegateWrapper { bool delegate(void*, int, Settings) dlg; gulong handlerId; this(bool delegate(void*, int, Settings) dlg) { this.dlg = dlg; onChangeListeners ~= this; } void remove(OnChangeDelegateWrapper source) { foreach(index, wrapper; onChangeListeners) { if (wrapper.handlerId == source.handlerId) { onChangeListeners[index] = null; onChangeListeners = std.algorithm.remove(onChangeListeners, index); break; } } } } OnChangeDelegateWrapper[] onChangeListeners; /** * The "change-event" signal is emitted once per change event that * affects this settings object. You should connect to this signal * only if you are interested in viewing groups of changes before they * are split out into multiple emissions of the "changed" signal. * For most use cases it is more appropriate to use the "changed" signal. * * In the event that the change event applies to one or more specified * keys, @keys will be an array of #GQuark of length @n_keys. In the * event that the change event applies to the #GSettings object as a * whole (ie: potentially every key has been changed) then @keys will * be %NULL and @n_keys will be 0. * * The default handler for this signal invokes the "changed" signal * for each affected key. If any other connected handler returns * %TRUE then this default functionality will be suppressed. * * Params: * keys = an array of #GQuarks for the changed keys, or %NULL * nKeys = the length of the @keys array, or 0 * * Returns: %TRUE to stop other handlers from being invoked for the * event. FALSE to propagate the event further. */ gulong addOnChange(bool delegate(void*, int, Settings) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangeDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "change-event", cast(GCallback)&callBackChange, cast(void*)wrapper, cast(GClosureNotify)&callBackChangeDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackChange(GSettings* settingsStruct, void* keys, int nKeys, OnChangeDelegateWrapper wrapper) { return wrapper.dlg(keys, nKeys, wrapper.outer); } extern(C) static void callBackChangeDestroy(OnChangeDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnChangedDelegateWrapper { void delegate(string, Settings) dlg; gulong handlerId; this(void delegate(string, Settings) dlg) { this.dlg = dlg; onChangedListeners ~= this; } void remove(OnChangedDelegateWrapper source) { foreach(index, wrapper; onChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChangedListeners[index] = null; onChangedListeners = std.algorithm.remove(onChangedListeners, index); break; } } } } OnChangedDelegateWrapper[] onChangedListeners; /** * The "changed" signal is emitted when a key has potentially changed. * You should call one of the g_settings_get() calls to check the new * value. * * This signal supports detailed connections. You can connect to the * detailed signal "changed::x" in order to only receive callbacks * when key "x" changes. * * Note that @settings only emits this signal if you have read @key at * least once while a signal handler was already connected for @key. * * Params: * key = the name of the key that changed */ gulong addOnChanged(void delegate(string, Settings) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "changed", cast(GCallback)&callBackChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChanged(GSettings* settingsStruct, char* key, OnChangedDelegateWrapper wrapper) { wrapper.dlg(Str.toString(key), wrapper.outer); } extern(C) static void callBackChangedDestroy(OnChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnWritableChangeDelegateWrapper { bool delegate(uint, Settings) dlg; gulong handlerId; this(bool delegate(uint, Settings) dlg) { this.dlg = dlg; onWritableChangeListeners ~= this; } void remove(OnWritableChangeDelegateWrapper source) { foreach(index, wrapper; onWritableChangeListeners) { if (wrapper.handlerId == source.handlerId) { onWritableChangeListeners[index] = null; onWritableChangeListeners = std.algorithm.remove(onWritableChangeListeners, index); break; } } } } OnWritableChangeDelegateWrapper[] onWritableChangeListeners; /** * The "writable-change-event" signal is emitted once per writability * change event that affects this settings object. You should connect * to this signal if you are interested in viewing groups of changes * before they are split out into multiple emissions of the * "writable-changed" signal. For most use cases it is more * appropriate to use the "writable-changed" signal. * * In the event that the writability change applies only to a single * key, @key will be set to the #GQuark for that key. In the event * that the writability change affects the entire settings object, * @key will be 0. * * The default handler for this signal invokes the "writable-changed" * and "changed" signals for each affected key. This is done because * changes in writability might also imply changes in value (if for * example, a new mandatory setting is introduced). If any other * connected handler returns %TRUE then this default functionality * will be suppressed. * * Params: * key = the quark of the key, or 0 * * Returns: %TRUE to stop other handlers from being invoked for the * event. FALSE to propagate the event further. */ gulong addOnWritableChange(bool delegate(uint, Settings) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnWritableChangeDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "writable-change-event", cast(GCallback)&callBackWritableChange, cast(void*)wrapper, cast(GClosureNotify)&callBackWritableChangeDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackWritableChange(GSettings* settingsStruct, uint key, OnWritableChangeDelegateWrapper wrapper) { return wrapper.dlg(key, wrapper.outer); } extern(C) static void callBackWritableChangeDestroy(OnWritableChangeDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnWritableChangedDelegateWrapper { void delegate(string, Settings) dlg; gulong handlerId; this(void delegate(string, Settings) dlg) { this.dlg = dlg; onWritableChangedListeners ~= this; } void remove(OnWritableChangedDelegateWrapper source) { foreach(index, wrapper; onWritableChangedListeners) { if (wrapper.handlerId == source.handlerId) { onWritableChangedListeners[index] = null; onWritableChangedListeners = std.algorithm.remove(onWritableChangedListeners, index); break; } } } } OnWritableChangedDelegateWrapper[] onWritableChangedListeners; /** * The "writable-changed" signal is emitted when the writability of a * key has potentially changed. You should call * g_settings_is_writable() in order to determine the new status. * * This signal supports detailed connections. You can connect to the * detailed signal "writable-changed::x" in order to only receive * callbacks when the writability of "x" changes. * * Params: * key = the key */ gulong addOnWritableChanged(void delegate(string, Settings) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnWritableChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "writable-changed", cast(GCallback)&callBackWritableChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackWritableChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackWritableChanged(GSettings* settingsStruct, char* key, OnWritableChangedDelegateWrapper wrapper) { wrapper.dlg(Str.toString(key), wrapper.outer); } extern(C) static void callBackWritableChangedDestroy(OnWritableChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/SettingsBackend.d000066400000000000000000000331541324604450400212510ustar00rootroot00000000000000/* * 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 gio.SettingsBackend; private import gio.c.functions; public import gio.c.types; private import glib.BBTree; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; public import gtkc.giotypes; /** * The #GSettingsBackend interface defines a generic interface for * non-strictly-typed data that is stored in a hierarchy. To implement * an alternative storage backend for #GSettings, you need to implement * the #GSettingsBackend interface and then make it implement the * extension point #G_SETTINGS_BACKEND_EXTENSION_POINT_NAME. * * The interface defines methods for reading and writing values, a * method for determining if writing of certain values will fail * (lockdown) and a change notification mechanism. * * The semantics of the interface are very precisely defined and * implementations must carefully adhere to the expectations of * callers that are documented on each of the interface methods. * * Some of the GSettingsBackend functions accept or return a #GTree. * These trees always have strings as keys and #GVariant as values. * g_settings_backend_create_tree() is a convenience function to create * suitable trees. * * The GSettingsBackend API is exported to allow third-party * implementations, but does not carry the same stability guarantees * as the public GIO API. For this reason, you have to define the * C preprocessor symbol %G_SETTINGS_ENABLE_BACKEND before including * `gio/gsettingsbackend.h`. */ public class SettingsBackend : ObjectG { /** the main Gtk struct */ protected GSettingsBackend* gSettingsBackend; /** Get the main Gtk struct */ public GSettingsBackend* getSettingsBackendStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSettingsBackend; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSettingsBackend; } protected override void setStruct(GObject* obj) { gSettingsBackend = cast(GSettingsBackend*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSettingsBackend* gSettingsBackend, bool ownedRef = false) { this.gSettingsBackend = gSettingsBackend; super(cast(GObject*)gSettingsBackend, ownedRef); } /** */ public static GType getType() { return g_settings_backend_get_type(); } /** * Calculate the longest common prefix of all keys in a tree and write * out an array of the key names relative to that prefix and, * optionally, the value to store at each of those keys. * * You must free the value returned in @path, @keys and @values using * g_free(). You should not attempt to free or unref the contents of * @keys or @values. * * Params: * tree = a #GTree containing the changes * path = the location to save the path * keys = the * location to save the relative keys * values = the location to save the values, or %NULL * * Since: 2.26 */ public static void flattenTree(BBTree tree, out string path, out string[] keys, out Variant[] values) { char* outpath = null; char** outkeys = null; GVariant** outvalues = null; g_settings_backend_flatten_tree((tree is null) ? null : tree.getBBTreeStruct(), &outpath, &outkeys, &outvalues); path = Str.toString(outpath); keys = Str.toStringArray(outkeys); values = new Variant[getArrayLength(outvalues)]; for(size_t i = 0; i < getArrayLength(outvalues); i++) { values[i] = new Variant(cast(GVariant*) outvalues[i]); } } /** * Returns the default #GSettingsBackend. It is possible to override * the default by setting the `GSETTINGS_BACKEND` environment variable * to the name of a settings backend. * * The user gets a reference to the backend. * * Returns: the default #GSettingsBackend * * Since: 2.28 */ public static SettingsBackend getDefault() { auto p = g_settings_backend_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(SettingsBackend)(cast(GSettingsBackend*) p, true); } /** * Signals that a single key has possibly changed. Backend * implementations should call this if a key has possibly changed its * value. * * @key must be a valid key (ie starting with a slash, not containing * '//', and not ending with a slash). * * The implementation must call this function during any call to * g_settings_backend_write(), before the call returns (except in the * case that no keys are actually changed and it cares to detect this * fact). It may not rely on the existence of a mainloop for * dispatching the signal later. * * The implementation may call this function at any other time it likes * in response to other events (such as changes occurring outside of the * program). These calls may originate from a mainloop or may originate * in response to any other action (including from calls to * g_settings_backend_write()). * * In the case that this call is in response to a call to * g_settings_backend_write() then @origin_tag must be set to the same * value that was passed to that call. * * Params: * key = the name of the key * originTag = the origin tag * * Since: 2.26 */ public void changed(string key, void* originTag) { g_settings_backend_changed(gSettingsBackend, Str.toStringz(key), originTag); } /** * This call is a convenience wrapper. It gets the list of changes from * @tree, computes the longest common prefix and calls * g_settings_backend_changed(). * * Params: * tree = a #GTree containing the changes * originTag = the origin tag * * Since: 2.26 */ public void changedTree(BBTree tree, void* originTag) { g_settings_backend_changed_tree(gSettingsBackend, (tree is null) ? null : tree.getBBTreeStruct(), originTag); } /** * Signals that a list of keys have possibly changed. Backend * implementations should call this if keys have possibly changed their * values. * * @path must be a valid path (ie starting and ending with a slash and * not containing '//'). Each string in @items must form a valid key * name when @path is prefixed to it (ie: each item must not start or * end with '/' and must not contain '//'). * * The meaning of this signal is that any of the key names resulting * from the contatenation of @path with each item in @items may have * changed. * * The same rules for when notifications must occur apply as per * g_settings_backend_changed(). These two calls can be used * interchangeably if exactly one item has changed (although in that * case g_settings_backend_changed() is definitely preferred). * * For efficiency reasons, the implementation should strive for @path to * be as long as possible (ie: the longest common prefix of all of the * keys that were changed) but this is not strictly required. * * Params: * path = the path containing the changes * items = the %NULL-terminated list of changed keys * originTag = the origin tag * * Since: 2.26 */ public void keysChanged(string path, string[] items, void* originTag) { g_settings_backend_keys_changed(gSettingsBackend, Str.toStringz(path), Str.toStringzArray(items), originTag); } /** * Signals that all keys below a given path may have possibly changed. * Backend implementations should call this if an entire path of keys * have possibly changed their values. * * @path must be a valid path (ie starting and ending with a slash and * not containing '//'). * * The meaning of this signal is that any of the key which has a name * starting with @path may have changed. * * The same rules for when notifications must occur apply as per * g_settings_backend_changed(). This call might be an appropriate * reasponse to a 'reset' call but implementations are also free to * explicitly list the keys that were affected by that call if they can * easily do so. * * For efficiency reasons, the implementation should strive for @path to * be as long as possible (ie: the longest common prefix of all of the * keys that were changed) but this is not strictly required. As an * example, if this function is called with the path of "/" then every * single key in the application will be notified of a possible change. * * Params: * path = the path containing the changes * originTag = the origin tag * * Since: 2.26 */ public void pathChanged(string path, void* originTag) { g_settings_backend_path_changed(gSettingsBackend, Str.toStringz(path), originTag); } /** * Signals that the writability of all keys below a given path may have * changed. * * Since GSettings performs no locking operations for itself, this call * will always be made in response to external events. * * Params: * path = the name of the path * * Since: 2.26 */ public void pathWritableChanged(string path) { g_settings_backend_path_writable_changed(gSettingsBackend, Str.toStringz(path)); } /** * Signals that the writability of a single key has possibly changed. * * Since GSettings performs no locking operations for itself, this call * will always be made in response to external events. * * Params: * key = the name of the key * * Since: 2.26 */ public void writableChanged(string key) { g_settings_backend_writable_changed(gSettingsBackend, Str.toStringz(key)); } /** * Creates a keyfile-backed #GSettingsBackend. * * The filename of the keyfile to use is given by @filename. * * All settings read to or written from the backend must fall under the * path given in @root_path (which must start and end with a slash and * not contain two consecutive slashes). @root_path may be "/". * * If @root_group is non-%NULL then it specifies the name of the keyfile * group used for keys that are written directly below @root_path. For * example, if @root_path is "/apps/example/" and @root_group is * "toplevel", then settings the key "/apps/example/enabled" to a value * of %TRUE will cause the following to appear in the keyfile: * * |[ * [toplevel] * enabled=true * ]| * * If @root_group is %NULL then it is not permitted to store keys * directly below the @root_path. * * For keys not stored directly below @root_path (ie: in a sub-path), * the name of the subpath (with the final slash stripped) is used as * the name of the keyfile group. To continue the example, if * "/apps/example/profiles/default/font-size" were set to * 12 then the following would appear in the keyfile: * * |[ * [profiles/default] * font-size=12 * ]| * * The backend will refuse writes (and return writability as being * %FALSE) for keys outside of @root_path and, in the event that * @root_group is %NULL, also for keys directly under @root_path. * Writes will also be refused if the backend detects that it has the * inability to rewrite the keyfile (ie: the containing directory is not * writable). * * There is no checking done for your key namespace clashing with the * syntax of the key file format. For example, if you have '[' or ']' * characters in your path names or '=' in your key names you may be in * trouble. * * Params: * filename = the filename of the keyfile * rootPath = the path under which all settings keys appear * rootGroup = the group name corresponding to * @root_path, or %NULL * * Returns: a keyfile-backed #GSettingsBackend */ public static SettingsBackend keyfileSettingsBackendNew(string filename, string rootPath, string rootGroup) { auto p = g_keyfile_settings_backend_new(Str.toStringz(filename), Str.toStringz(rootPath), Str.toStringz(rootGroup)); if(p is null) { return null; } return ObjectG.getDObject!(SettingsBackend)(cast(GSettingsBackend*) p, true); } /** * Creates a memory-backed #GSettingsBackend. * * This backend allows changes to settings, but does not write them * to any backing storage, so the next time you run your application, * the memory backend will start out with the default values again. * * Returns: a newly created #GSettingsBackend * * Since: 2.28 */ public static SettingsBackend memorySettingsBackendNew() { auto p = g_memory_settings_backend_new(); if(p is null) { return null; } return ObjectG.getDObject!(SettingsBackend)(cast(GSettingsBackend*) p, true); } /** * Creates a readonly #GSettingsBackend. * * This backend does not allow changes to settings, so all settings * will always have their default values. * * Returns: a newly created #GSettingsBackend * * Since: 2.28 */ public static SettingsBackend nullSettingsBackendNew() { auto p = g_null_settings_backend_new(); if(p is null) { return null; } return ObjectG.getDObject!(SettingsBackend)(cast(GSettingsBackend*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/SettingsSchema.d000066400000000000000000000171461324604450400211250ustar00rootroot00000000000000/* * 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 gio.SettingsSchema; private import gio.SettingsSchemaKey; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * The #GSettingsSchemaSource and #GSettingsSchema APIs provide a * mechanism for advanced control over the loading of schemas and a * mechanism for introspecting their content. * * Plugin loading systems that wish to provide plugins a way to access * settings face the problem of how to make the schemas for these * settings visible to GSettings. Typically, a plugin will want to ship * the schema along with itself and it won't be installed into the * standard system directories for schemas. * * #GSettingsSchemaSource provides a mechanism for dealing with this by * allowing the creation of a new 'schema source' from which schemas can * be acquired. This schema source can then become part of the metadata * associated with the plugin and queried whenever the plugin requires * access to some settings. * * Consider the following example: * * |[ * typedef struct * { * ... * GSettingsSchemaSource *schema_source; * ... * } Plugin; * * Plugin * * initialise_plugin (const gchar *dir) * { * Plugin *plugin; * * ... * * plugin->schema_source = * g_settings_new_schema_source_from_directory (dir, * g_settings_schema_source_get_default (), FALSE, NULL); * * ... * * return plugin; * } * * ... * * GSettings * * plugin_get_settings (Plugin *plugin, * const gchar *schema_id) * { * GSettingsSchema *schema; * * if (schema_id == NULL) * schema_id = plugin->identifier; * * schema = g_settings_schema_source_lookup (plugin->schema_source, * schema_id, FALSE); * * if (schema == NULL) * { * ... disable the plugin or abort, etc ... * } * * return g_settings_new_full (schema, NULL, NULL); * } * ]| * * The code above shows how hooks should be added to the code that * initialises (or enables) the plugin to create the schema source and * how an API can be added to the plugin system to provide a convenient * way for the plugin to access its settings, using the schemas that it * ships. * * From the standpoint of the plugin, it would need to ensure that it * ships a gschemas.compiled file as part of itself, and then simply do * the following: * * |[ * { * GSettings *settings; * gint some_value; * * settings = plugin_get_settings (self, NULL); * some_value = g_settings_get_int (settings, "some-value"); * ... * } * ]| * * It's also possible that the plugin system expects the schema source * files (ie: .gschema.xml files) instead of a gschemas.compiled file. * In that case, the plugin loading system must compile the schemas for * itself before attempting to create the settings source. * * Since: 2.32 */ public class SettingsSchema { /** the main Gtk struct */ protected GSettingsSchema* gSettingsSchema; protected bool ownedRef; /** Get the main Gtk struct */ public GSettingsSchema* getSettingsSchemaStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSettingsSchema; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gSettingsSchema; } /** * Sets our main struct and passes it to the parent class. */ public this (GSettingsSchema* gSettingsSchema, bool ownedRef = false) { this.gSettingsSchema = gSettingsSchema; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_settings_schema_unref(gSettingsSchema); } /** */ public static GType getType() { return g_settings_schema_get_type(); } /** * Get the ID of @schema. * * Returns: the ID */ public string getId() { return Str.toString(g_settings_schema_get_id(gSettingsSchema)); } /** * Gets the key named @name from @schema. * * It is a programmer error to request a key that does not exist. See * g_settings_schema_list_keys(). * * Params: * name = the name of a key * * Returns: the #GSettingsSchemaKey for @name * * Since: 2.40 */ public SettingsSchemaKey getKey(string name) { auto p = g_settings_schema_get_key(gSettingsSchema, Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(SettingsSchemaKey)(cast(GSettingsSchemaKey*) p, true); } /** * Gets the path associated with @schema, or %NULL. * * Schemas may be single-instance or relocatable. Single-instance * schemas correspond to exactly one set of keys in the backend * database: those located at the path returned by this function. * * Relocatable schemas can be referenced by other schemas and can * threfore describe multiple sets of keys at different locations. For * relocatable schemas, this function will return %NULL. * * Returns: the path of the schema, or %NULL * * Since: 2.32 */ public string getPath() { return Str.toString(g_settings_schema_get_path(gSettingsSchema)); } /** * Checks if @schema has a key named @name. * * Params: * name = the name of a key * * Returns: %TRUE if such a key exists * * Since: 2.40 */ public bool hasKey(string name) { return g_settings_schema_has_key(gSettingsSchema, Str.toStringz(name)) != 0; } /** * Gets the list of children in @schema. * * You should free the return value with g_strfreev() when you are done * with it. * * Returns: a list of the children on @settings * * Since: 2.44 */ public string[] listChildren() { auto retStr = g_settings_schema_list_children(gSettingsSchema); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Introspects the list of keys on @schema. * * You should probably not be calling this function from "normal" code * (since you should already know what keys are in your schema). This * function is intended for introspection reasons. * * Returns: a list of the keys on * @schema * * Since: 2.46 */ public string[] listKeys() { auto retStr = g_settings_schema_list_keys(gSettingsSchema); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Increase the reference count of @schema, returning a new reference. * * Returns: a new reference to @schema * * Since: 2.32 */ public SettingsSchema doref() { auto p = g_settings_schema_ref(gSettingsSchema); if(p is null) { return null; } return ObjectG.getDObject!(SettingsSchema)(cast(GSettingsSchema*) p, true); } /** * Decrease the reference count of @schema, possibly freeing it. * * Since: 2.32 */ public void unref() { g_settings_schema_unref(gSettingsSchema); } } GtkD-3.7.5/generated/gtkd/gio/SettingsSchemaKey.d000066400000000000000000000171121324604450400215670ustar00rootroot00000000000000/* * 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 gio.SettingsSchemaKey; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * #GSettingsSchemaKey is an opaque data structure and can only be accessed * using the following functions. */ public class SettingsSchemaKey { /** the main Gtk struct */ protected GSettingsSchemaKey* gSettingsSchemaKey; protected bool ownedRef; /** Get the main Gtk struct */ public GSettingsSchemaKey* getSettingsSchemaKeyStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSettingsSchemaKey; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gSettingsSchemaKey; } /** * Sets our main struct and passes it to the parent class. */ public this (GSettingsSchemaKey* gSettingsSchemaKey, bool ownedRef = false) { this.gSettingsSchemaKey = gSettingsSchemaKey; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_settings_schema_key_unref(gSettingsSchemaKey); } /** */ public static GType getType() { return g_settings_schema_key_get_type(); } /** * Gets the default value for @key. * * Note that this is the default value according to the schema. System * administrator defaults and lockdown are not visible via this API. * * Returns: the default value for the key * * Since: 2.40 */ public Variant getDefaultValue() { auto p = g_settings_schema_key_get_default_value(gSettingsSchemaKey); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets the description for @key. * * If no description has been provided in the schema for @key, returns * %NULL. * * The description can be one sentence to several paragraphs in length. * Paragraphs are delimited with a double newline. Descriptions can be * translated and the value returned from this function is is the * current locale. * * This function is slow. The summary and description information for * the schemas is not stored in the compiled schema database so this * function has to parse all of the source XML files in the schema * directory. * * Returns: the description for @key, or %NULL * * Since: 2.34 */ public string getDescription() { return Str.toString(g_settings_schema_key_get_description(gSettingsSchemaKey)); } /** * Gets the name of @key. * * Returns: the name of @key. * * Since: 2.44 */ public string getName() { return Str.toString(g_settings_schema_key_get_name(gSettingsSchemaKey)); } /** * Queries the range of a key. * * This function will return a #GVariant that fully describes the range * of values that are valid for @key. * * The type of #GVariant returned is `(sv)`. The string describes * the type of range restriction in effect. The type and meaning of * the value contained in the variant depends on the string. * * If the string is `'type'` then the variant contains an empty array. * The element type of that empty array is the expected type of value * and all values of that type are valid. * * If the string is `'enum'` then the variant contains an array * enumerating the possible values. Each item in the array is * a possible valid value and no other values are valid. * * If the string is `'flags'` then the variant contains an array. Each * item in the array is a value that may appear zero or one times in an * array to be used as the value for this key. For example, if the * variant contained the array `['x', 'y']` then the valid values for * the key would be `[]`, `['x']`, `['y']`, `['x', 'y']` and * `['y', 'x']`. * * Finally, if the string is `'range'` then the variant contains a pair * of like-typed values -- the minimum and maximum permissible values * for this key. * * This information should not be used by normal programs. It is * considered to be a hint for introspection purposes. Normal programs * should already know what is permitted by their own schema. The * format may change in any way in the future -- but particularly, new * forms may be added to the possibilities described above. * * You should free the returned value with g_variant_unref() when it is * no longer needed. * * Returns: a #GVariant describing the range * * Since: 2.40 */ public Variant getRange() { auto p = g_settings_schema_key_get_range(gSettingsSchemaKey); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets the summary for @key. * * If no summary has been provided in the schema for @key, returns * %NULL. * * The summary is a short description of the purpose of the key; usually * one short sentence. Summaries can be translated and the value * returned from this function is is the current locale. * * This function is slow. The summary and description information for * the schemas is not stored in the compiled schema database so this * function has to parse all of the source XML files in the schema * directory. * * Returns: the summary for @key, or %NULL * * Since: 2.34 */ public string getSummary() { return Str.toString(g_settings_schema_key_get_summary(gSettingsSchemaKey)); } /** * Gets the #GVariantType of @key. * * Returns: the type of @key * * Since: 2.40 */ public VariantType getValueType() { auto p = g_settings_schema_key_get_value_type(gSettingsSchemaKey); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Checks if the given @value is of the correct type and within the * permitted range for @key. * * It is a programmer error if @value is not of the correct type -- you * must check for this first. * * Params: * value = the value to check * * Returns: %TRUE if @value is valid for @key * * Since: 2.40 */ public bool rangeCheck(Variant value) { return g_settings_schema_key_range_check(gSettingsSchemaKey, (value is null) ? null : value.getVariantStruct()) != 0; } /** * Increase the reference count of @key, returning a new reference. * * Returns: a new reference to @key * * Since: 2.40 */ public SettingsSchemaKey doref() { auto p = g_settings_schema_key_ref(gSettingsSchemaKey); if(p is null) { return null; } return ObjectG.getDObject!(SettingsSchemaKey)(cast(GSettingsSchemaKey*) p, true); } /** * Decrease the reference count of @key, possibly freeing it. * * Since: 2.40 */ public void unref() { g_settings_schema_key_unref(gSettingsSchemaKey); } } GtkD-3.7.5/generated/gtkd/gio/SettingsSchemaSource.d000066400000000000000000000175101324604450400223010ustar00rootroot00000000000000/* * 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 gio.SettingsSchemaSource; private import gio.SettingsSchema; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * This is an opaque structure type. You may not access it directly. * * Since: 2.32 */ public class SettingsSchemaSource { /** the main Gtk struct */ protected GSettingsSchemaSource* gSettingsSchemaSource; protected bool ownedRef; /** Get the main Gtk struct */ public GSettingsSchemaSource* getSettingsSchemaSourceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSettingsSchemaSource; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gSettingsSchemaSource; } /** * Sets our main struct and passes it to the parent class. */ public this (GSettingsSchemaSource* gSettingsSchemaSource, bool ownedRef = false) { this.gSettingsSchemaSource = gSettingsSchemaSource; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_settings_schema_source_unref(gSettingsSchemaSource); } /** */ public static GType getType() { return g_settings_schema_source_get_type(); } /** * Attempts to create a new schema source corresponding to the contents * of the given directory. * * This function is not required for normal uses of #GSettings but it * may be useful to authors of plugin management systems. * * The directory should contain a file called `gschemas.compiled` as * produced by the [glib-compile-schemas][glib-compile-schemas] tool. * * If @trusted is %TRUE then `gschemas.compiled` is trusted not to be * corrupted. This assumption has a performance advantage, but can result * in crashes or inconsistent behaviour in the case of a corrupted file. * Generally, you should set @trusted to %TRUE for files installed by the * system and to %FALSE for files in the home directory. * * If @parent is non-%NULL then there are two effects. * * First, if g_settings_schema_source_lookup() is called with the * @recursive flag set to %TRUE and the schema can not be found in the * source, the lookup will recurse to the parent. * * Second, any references to other schemas specified within this * source (ie: `child` or `extends`) references may be resolved * from the @parent. * * For this second reason, except in very unusual situations, the * @parent should probably be given as the default schema source, as * returned by g_settings_schema_source_get_default(). * * Params: * directory = the filename of a directory * parent = a #GSettingsSchemaSource, or %NULL * trusted = %TRUE, if the directory is trusted * * Since: 2.32 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string directory, SettingsSchemaSource parent, bool trusted) { GError* err = null; auto p = g_settings_schema_source_new_from_directory(Str.toStringz(directory), (parent is null) ? null : parent.getSettingsSchemaSourceStruct(), trusted, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_directory"); } this(cast(GSettingsSchemaSource*) p); } /** * Lists the schemas in a given source. * * If @recursive is %TRUE then include parent sources. If %FALSE then * only include the schemas from one source (ie: one directory). You * probably want %TRUE. * * Non-relocatable schemas are those for which you can call * g_settings_new(). Relocatable schemas are those for which you must * use g_settings_new_with_path(). * * Do not call this function from normal programs. This is designed for * use by database editors, commandline tools, etc. * * Params: * recursive = if we should recurse * nonRelocatable = the * list of non-relocatable schemas * relocatable = the list * of relocatable schemas * * Since: 2.40 */ public void listSchemas(bool recursive, out string[] nonRelocatable, out string[] relocatable) { char** outnonRelocatable = null; char** outrelocatable = null; g_settings_schema_source_list_schemas(gSettingsSchemaSource, recursive, &outnonRelocatable, &outrelocatable); nonRelocatable = Str.toStringArray(outnonRelocatable); relocatable = Str.toStringArray(outrelocatable); } /** * Looks up a schema with the identifier @schema_id in @source. * * This function is not required for normal uses of #GSettings but it * may be useful to authors of plugin management systems or to those who * want to introspect the content of schemas. * * If the schema isn't found directly in @source and @recursive is %TRUE * then the parent sources will also be checked. * * If the schema isn't found, %NULL is returned. * * Params: * schemaId = a schema ID * recursive = %TRUE if the lookup should be recursive * * Returns: a new #GSettingsSchema * * Since: 2.32 */ public SettingsSchema lookup(string schemaId, bool recursive) { auto p = g_settings_schema_source_lookup(gSettingsSchemaSource, Str.toStringz(schemaId), recursive); if(p is null) { return null; } return ObjectG.getDObject!(SettingsSchema)(cast(GSettingsSchema*) p, true); } /** * Increase the reference count of @source, returning a new reference. * * Returns: a new reference to @source * * Since: 2.32 */ public SettingsSchemaSource doref() { auto p = g_settings_schema_source_ref(gSettingsSchemaSource); if(p is null) { return null; } return ObjectG.getDObject!(SettingsSchemaSource)(cast(GSettingsSchemaSource*) p, true); } /** * Decrease the reference count of @source, possibly freeing it. * * Since: 2.32 */ public void unref() { g_settings_schema_source_unref(gSettingsSchemaSource); } /** * Gets the default system schema source. * * This function is not required for normal uses of #GSettings but it * may be useful to authors of plugin management systems or to those who * want to introspect the content of schemas. * * If no schemas are installed, %NULL will be returned. * * The returned source may actually consist of multiple schema sources * from different directories, depending on which directories were given * in `XDG_DATA_DIRS` and `GSETTINGS_SCHEMA_DIR`. For this reason, all * lookups performed against the default source should probably be done * recursively. * * Returns: the default schema source * * Since: 2.32 */ public static SettingsSchemaSource getDefault() { auto p = g_settings_schema_source_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(SettingsSchemaSource)(cast(GSettingsSchemaSource*) p); } } GtkD-3.7.5/generated/gtkd/gio/SimpleAction.d000066400000000000000000000240011324604450400205570ustar00rootroot00000000000000/* * 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 gio.SimpleAction; private import gio.ActionIF; private import gio.ActionT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * A #GSimpleAction is the obvious simple implementation of the #GAction * interface. This is the easiest way to create an action for purposes of * adding it to a #GSimpleActionGroup. * * See also #GtkAction. */ public class SimpleAction : ObjectG, ActionIF { /** the main Gtk struct */ protected GSimpleAction* gSimpleAction; /** Get the main Gtk struct */ public GSimpleAction* getSimpleActionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSimpleAction; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSimpleAction; } protected override void setStruct(GObject* obj) { gSimpleAction = cast(GSimpleAction*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSimpleAction* gSimpleAction, bool ownedRef = false) { this.gSimpleAction = gSimpleAction; super(cast(GObject*)gSimpleAction, ownedRef); } // add the Action capabilities mixin ActionT!(GSimpleAction); /** */ public static GType getType() { return g_simple_action_get_type(); } /** * Creates a new action. * * The created action is stateless. See g_simple_action_new_stateful(). * * Params: * name = the name of the action * parameterType = the type of parameter to the activate function * * Returns: a new #GSimpleAction * * Since: 2.28 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, VariantType parameterType) { auto p = g_simple_action_new(Str.toStringz(name), (parameterType is null) ? null : parameterType.getVariantTypeStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSimpleAction*) p, true); } /** * Creates a new stateful action. * * @state is the initial state of the action. All future state values * must have the same #GVariantType as the initial state. * * If the @state GVariant is floating, it is consumed. * * Params: * name = the name of the action * parameterType = the type of the parameter to the activate function * state = the initial state of the action * * Returns: a new #GSimpleAction * * Since: 2.28 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, VariantType parameterType, Variant state) { auto p = g_simple_action_new_stateful(Str.toStringz(name), (parameterType is null) ? null : parameterType.getVariantTypeStruct(), (state is null) ? null : state.getVariantStruct()); if(p is null) { throw new ConstructionException("null returned by new_stateful"); } this(cast(GSimpleAction*) p, true); } /** * Sets the action as enabled or not. * * An action must be enabled in order to be activated or in order to * have its state changed from outside callers. * * This should only be called by the implementor of the action. Users * of the action should not attempt to modify its enabled flag. * * Params: * enabled = whether the action is enabled * * Since: 2.28 */ public void setEnabled(bool enabled) { g_simple_action_set_enabled(gSimpleAction, enabled); } /** * Sets the state of the action. * * This directly updates the 'state' property to the given value. * * This should only be called by the implementor of the action. Users * of the action should not attempt to directly modify the 'state' * property. Instead, they should call g_action_change_state() to * request the change. * * If the @value GVariant is floating, it is consumed. * * Params: * value = the new #GVariant for the state * * Since: 2.30 */ public void setState(Variant value) { g_simple_action_set_state(gSimpleAction, (value is null) ? null : value.getVariantStruct()); } /** * Sets the state hint for the action. * * See g_action_get_state_hint() for more information about * action state hints. * * Params: * stateHint = a #GVariant representing the state hint * * Since: 2.44 */ public void setStateHint(Variant stateHint) { g_simple_action_set_state_hint(gSimpleAction, (stateHint is null) ? null : stateHint.getVariantStruct()); } protected class OnActivateDelegateWrapper { void delegate(Variant, SimpleAction) dlg; gulong handlerId; this(void delegate(Variant, SimpleAction) dlg) { this.dlg = dlg; onActivateListeners ~= this; } void remove(OnActivateDelegateWrapper source) { foreach(index, wrapper; onActivateListeners) { if (wrapper.handlerId == source.handlerId) { onActivateListeners[index] = null; onActivateListeners = std.algorithm.remove(onActivateListeners, index); break; } } } } OnActivateDelegateWrapper[] onActivateListeners; /** * Indicates that the action was just activated. * * @parameter will always be of the expected type. In the event that * an incorrect type was given, no signal will be emitted. * * Since GLib 2.40, if no handler is connected to this signal then the * default behaviour for boolean-stated actions with a %NULL parameter * type is to toggle them via the #GSimpleAction::change-state signal. * For stateful actions where the state type is equal to the parameter * type, the default is to forward them directly to * #GSimpleAction::change-state. This should allow almost all users * of #GSimpleAction to connect only one handler or the other. * * Params: * parameter = the parameter to the activation * * Since: 2.28 */ gulong addOnActivate(void delegate(Variant, SimpleAction) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActivateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "activate", cast(GCallback)&callBackActivate, cast(void*)wrapper, cast(GClosureNotify)&callBackActivateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActivate(GSimpleAction* simpleactionStruct, GVariant* parameter, OnActivateDelegateWrapper wrapper) { wrapper.dlg(new Variant(parameter), wrapper.outer); } extern(C) static void callBackActivateDestroy(OnActivateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnChangeStateDelegateWrapper { void delegate(Variant, SimpleAction) dlg; gulong handlerId; this(void delegate(Variant, SimpleAction) dlg) { this.dlg = dlg; onChangeStateListeners ~= this; } void remove(OnChangeStateDelegateWrapper source) { foreach(index, wrapper; onChangeStateListeners) { if (wrapper.handlerId == source.handlerId) { onChangeStateListeners[index] = null; onChangeStateListeners = std.algorithm.remove(onChangeStateListeners, index); break; } } } } OnChangeStateDelegateWrapper[] onChangeStateListeners; /** * Indicates that the action just received a request to change its * state. * * @value will always be of the correct state type. In the event that * an incorrect type was given, no signal will be emitted. * * If no handler is connected to this signal then the default * behaviour is to call g_simple_action_set_state() to set the state * to the requested value. If you connect a signal handler then no * default action is taken. If the state should change then you must * call g_simple_action_set_state() from the handler. * * An example of a 'change-state' handler: * |[ * static void * change_volume_state (GSimpleAction *action, * GVariant *value, * gpointer user_data) * { * gint requested; * * requested = g_variant_get_int32 (value); * * // Volume only goes from 0 to 10 * if (0 <= requested && requested <= 10) * g_simple_action_set_state (action, value); * } * ]| * * The handler need not set the state to the requested value. * It could set it to any value at all, or take some other action. * * Params: * value = the requested value for the state * * Since: 2.30 */ gulong addOnChangeState(void delegate(Variant, SimpleAction) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangeStateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "change-state", cast(GCallback)&callBackChangeState, cast(void*)wrapper, cast(GClosureNotify)&callBackChangeStateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChangeState(GSimpleAction* simpleactionStruct, GVariant* value, OnChangeStateDelegateWrapper wrapper) { wrapper.dlg(new Variant(value), wrapper.outer); } extern(C) static void callBackChangeStateDestroy(OnChangeStateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/SimpleActionGroup.d000066400000000000000000000115551324604450400216060ustar00rootroot00000000000000/* * 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 gio.SimpleActionGroup; private import gio.ActionGroupIF; private import gio.ActionGroupT; private import gio.ActionIF; private import gio.ActionMapIF; private import gio.ActionMapT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GSimpleActionGroup is a hash table filled with #GAction objects, * implementing the #GActionGroup and #GActionMap interfaces. * * Since: 2.28 */ public class SimpleActionGroup : ObjectG, ActionGroupIF, ActionMapIF { /** the main Gtk struct */ protected GSimpleActionGroup* gSimpleActionGroup; /** Get the main Gtk struct */ public GSimpleActionGroup* getSimpleActionGroupStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSimpleActionGroup; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSimpleActionGroup; } protected override void setStruct(GObject* obj) { gSimpleActionGroup = cast(GSimpleActionGroup*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSimpleActionGroup* gSimpleActionGroup, bool ownedRef = false) { this.gSimpleActionGroup = gSimpleActionGroup; super(cast(GObject*)gSimpleActionGroup, ownedRef); } // add the ActionGroup capabilities mixin ActionGroupT!(GSimpleActionGroup); // add the ActionMap capabilities mixin ActionMapT!(GSimpleActionGroup); /** */ public static GType getType() { return g_simple_action_group_get_type(); } /** * Creates a new, empty, #GSimpleActionGroup. * * Returns: a new #GSimpleActionGroup * * Since: 2.28 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_simple_action_group_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSimpleActionGroup*) p, true); } /** * A convenience function for creating multiple #GSimpleAction instances * and adding them to the action group. * * Deprecated: Use g_action_map_add_action_entries() * * Params: * entries = a pointer to the first item in * an array of #GActionEntry structs * userData = the user data for signal connections * * Since: 2.30 */ public void addEntries(GActionEntry[] entries, void* userData) { g_simple_action_group_add_entries(gSimpleActionGroup, entries.ptr, cast(int)entries.length, userData); } /** * Adds an action to the action group. * * If the action group already contains an action with the same name as * @action then the old action is dropped from the group. * * The action group takes its own reference on @action. * * Deprecated: Use g_action_map_add_action() * * Params: * action = a #GAction * * Since: 2.28 */ public void insert(ActionIF action) { g_simple_action_group_insert(gSimpleActionGroup, (action is null) ? null : action.getActionStruct()); } /** * Looks up the action with the name @action_name in the group. * * If no such action exists, returns %NULL. * * Deprecated: Use g_action_map_lookup_action() * * Params: * actionName = the name of an action * * Returns: a #GAction, or %NULL * * Since: 2.28 */ public ActionIF lookup(string actionName) { auto p = g_simple_action_group_lookup(gSimpleActionGroup, Str.toStringz(actionName)); if(p is null) { return null; } return ObjectG.getDObject!(ActionIF)(cast(GAction*) p); } /** * Removes the named action from the action group. * * If no action of this name is in the group then nothing happens. * * Deprecated: Use g_action_map_remove_action() * * Params: * actionName = the name of the action * * Since: 2.28 */ public void remove(string actionName) { g_simple_action_group_remove(gSimpleActionGroup, Str.toStringz(actionName)); } } GtkD-3.7.5/generated/gtkd/gio/SimpleAsyncResult.d000066400000000000000000000514421324604450400216270ustar00rootroot00000000000000/* * 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 gio.SimpleAsyncResult; private import gio.AsyncResultIF; private import gio.AsyncResultT; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * As of GLib 2.46, #GSimpleAsyncResult is deprecated in favor of * #GTask, which provides a simpler API. * * #GSimpleAsyncResult implements #GAsyncResult. * * GSimpleAsyncResult handles #GAsyncReadyCallbacks, error * reporting, operation cancellation and the final state of an operation, * completely transparent to the application. Results can be returned * as a pointer e.g. for functions that return data that is collected * asynchronously, a boolean value for checking the success or failure * of an operation, or a #gssize for operations which return the number * of bytes modified by the operation; all of the simple return cases * are covered. * * Most of the time, an application will not need to know of the details * of this API; it is handled transparently, and any necessary operations * are handled by #GAsyncResult's interface. However, if implementing a * new GIO module, for writing language bindings, or for complex * applications that need better control of how asynchronous operations * are completed, it is important to understand this functionality. * * GSimpleAsyncResults are tagged with the calling function to ensure * that asynchronous functions and their finishing functions are used * together correctly. * * To create a new #GSimpleAsyncResult, call g_simple_async_result_new(). * If the result needs to be created for a #GError, use * g_simple_async_result_new_from_error() or * g_simple_async_result_new_take_error(). If a #GError is not available * (e.g. the asynchronous operation's doesn't take a #GError argument), * but the result still needs to be created for an error condition, use * g_simple_async_result_new_error() (or g_simple_async_result_set_error_va() * if your application or binding requires passing a variable argument list * directly), and the error can then be propagated through the use of * g_simple_async_result_propagate_error(). * * An asynchronous operation can be made to ignore a cancellation event by * calling g_simple_async_result_set_handle_cancellation() with a * #GSimpleAsyncResult for the operation and %FALSE. This is useful for * operations that are dangerous to cancel, such as close (which would * cause a leak if cancelled before being run). * * GSimpleAsyncResult can integrate into GLib's event loop, #GMainLoop, * or it can use #GThreads. * g_simple_async_result_complete() will finish an I/O task directly * from the point where it is called. g_simple_async_result_complete_in_idle() * will finish it from an idle handler in the * [thread-default main context][g-main-context-push-thread-default] * . g_simple_async_result_run_in_thread() will run the * job in a separate thread and then deliver the result to the * thread-default main context. * * To set the results of an asynchronous function, * g_simple_async_result_set_op_res_gpointer(), * g_simple_async_result_set_op_res_gboolean(), and * g_simple_async_result_set_op_res_gssize() * are provided, setting the operation's result to a gpointer, gboolean, or * gssize, respectively. * * Likewise, to get the result of an asynchronous function, * g_simple_async_result_get_op_res_gpointer(), * g_simple_async_result_get_op_res_gboolean(), and * g_simple_async_result_get_op_res_gssize() are * provided, getting the operation's result as a gpointer, gboolean, and * gssize, respectively. * * For the details of the requirements implementations must respect, see * #GAsyncResult. A typical implementation of an asynchronous operation * using GSimpleAsyncResult looks something like this: * * |[ * static void * baked_cb (Cake *cake, * gpointer user_data) * { * // In this example, this callback is not given a reference to the cake, * // so the GSimpleAsyncResult has to take a reference to it. * GSimpleAsyncResult *result = user_data; * * if (cake == NULL) * g_simple_async_result_set_error (result, * BAKER_ERRORS, * BAKER_ERROR_NO_FLOUR, * "Go to the supermarket"); * else * g_simple_async_result_set_op_res_gpointer (result, * g_object_ref (cake), * g_object_unref); * * * // In this example, we assume that baked_cb is called as a callback from * // the mainloop, so it's safe to complete the operation synchronously here. * // If, however, _baker_prepare_cake () might call its callback without * // first returning to the mainloop — inadvisable, but some APIs do so — * // we would need to use g_simple_async_result_complete_in_idle(). * g_simple_async_result_complete (result); * g_object_unref (result); * } * * void * baker_bake_cake_async (Baker *self, * guint radius, * GAsyncReadyCallback callback, * gpointer user_data) * { * GSimpleAsyncResult *simple; * Cake *cake; * * if (radius < 3) * { * g_simple_async_report_error_in_idle (G_OBJECT (self), * callback, * user_data, * BAKER_ERRORS, * BAKER_ERROR_TOO_SMALL, * "%ucm radius cakes are silly", * radius); * return; * } * * simple = g_simple_async_result_new (G_OBJECT (self), * callback, * user_data, * baker_bake_cake_async); * cake = _baker_get_cached_cake (self, radius); * * if (cake != NULL) * { * g_simple_async_result_set_op_res_gpointer (simple, * g_object_ref (cake), * g_object_unref); * g_simple_async_result_complete_in_idle (simple); * g_object_unref (simple); * // Drop the reference returned by _baker_get_cached_cake(); * // the GSimpleAsyncResult has taken its own reference. * g_object_unref (cake); * return; * } * * _baker_prepare_cake (self, radius, baked_cb, simple); * } * * Cake * * baker_bake_cake_finish (Baker *self, * GAsyncResult *result, * GError **error) * { * GSimpleAsyncResult *simple; * Cake *cake; * * g_return_val_if_fail (g_simple_async_result_is_valid (result, * G_OBJECT (self), * baker_bake_cake_async), * NULL); * * simple = (GSimpleAsyncResult *) result; * * if (g_simple_async_result_propagate_error (simple, error)) * return NULL; * * cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple)); * return g_object_ref (cake); * } * ]| */ public class SimpleAsyncResult : ObjectG, AsyncResultIF { /** the main Gtk struct */ protected GSimpleAsyncResult* gSimpleAsyncResult; /** Get the main Gtk struct */ public GSimpleAsyncResult* getSimpleAsyncResultStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSimpleAsyncResult; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSimpleAsyncResult; } protected override void setStruct(GObject* obj) { gSimpleAsyncResult = cast(GSimpleAsyncResult*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSimpleAsyncResult* gSimpleAsyncResult, bool ownedRef = false) { this.gSimpleAsyncResult = gSimpleAsyncResult; super(cast(GObject*)gSimpleAsyncResult, ownedRef); } // add the AsyncResult capabilities mixin AsyncResultT!(GSimpleAsyncResult); /** */ public static GType getType() { return g_simple_async_result_get_type(); } /** * Creates a #GSimpleAsyncResult. * * The common convention is to create the #GSimpleAsyncResult in the * function that starts the asynchronous operation and use that same * function as the @source_tag. * * If your operation supports cancellation with #GCancellable (which it * probably should) then you should provide the user's cancellable to * g_simple_async_result_set_check_cancellable() immediately after * this function returns. * * Deprecated: Use g_task_new() instead. * * Params: * sourceObject = a #GObject, or %NULL. * callback = a #GAsyncReadyCallback. * userData = user data passed to @callback. * sourceTag = the asynchronous function. * * Returns: a #GSimpleAsyncResult. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectG sourceObject, GAsyncReadyCallback callback, void* userData, void* sourceTag) { auto p = g_simple_async_result_new((sourceObject is null) ? null : sourceObject.getObjectGStruct(), callback, userData, sourceTag); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSimpleAsyncResult*) p, true); } /** * Creates a #GSimpleAsyncResult from an error condition. * * Deprecated: Use g_task_new() and g_task_return_error() instead. * * Params: * sourceObject = a #GObject, or %NULL. * callback = a #GAsyncReadyCallback. * userData = user data passed to @callback. * error = a #GError * * Returns: a #GSimpleAsyncResult. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectG sourceObject, GAsyncReadyCallback callback, void* userData, ErrorG error) { auto p = g_simple_async_result_new_from_error((sourceObject is null) ? null : sourceObject.getObjectGStruct(), callback, userData, (error is null) ? null : error.getErrorGStruct()); if(p is null) { throw new ConstructionException("null returned by new_from_error"); } this(cast(GSimpleAsyncResult*) p, true); } /** * Ensures that the data passed to the _finish function of an async * operation is consistent. Three checks are performed. * * First, @result is checked to ensure that it is really a * #GSimpleAsyncResult. Second, @source is checked to ensure that it * matches the source object of @result. Third, @source_tag is * checked to ensure that it is equal to the @source_tag argument given * to g_simple_async_result_new() (which, by convention, is a pointer * to the _async function corresponding to the _finish function from * which this function is called). (Alternatively, if either * @source_tag or @result's source tag is %NULL, then the source tag * check is skipped.) * * Deprecated: Use #GTask and g_task_is_valid() instead. * * Params: * result = the #GAsyncResult passed to the _finish function. * source = the #GObject passed to the _finish function. * sourceTag = the asynchronous function. * * Returns: #TRUE if all checks passed or #FALSE if any failed. * * Since: 2.20 */ public static bool isValid(AsyncResultIF result, ObjectG source, void* sourceTag) { return g_simple_async_result_is_valid((result is null) ? null : result.getAsyncResultStruct(), (source is null) ? null : source.getObjectGStruct(), sourceTag) != 0; } /** * Completes an asynchronous I/O job immediately. Must be called in * the thread where the asynchronous result was to be delivered, as it * invokes the callback directly. If you are in a different thread use * g_simple_async_result_complete_in_idle(). * * Calling this function takes a reference to @simple for as long as * is needed to complete the call. * * Deprecated: Use #GTask instead. */ public void complete() { g_simple_async_result_complete(gSimpleAsyncResult); } /** * Completes an asynchronous function in an idle handler in the * [thread-default main context][g-main-context-push-thread-default] * of the thread that @simple was initially created in * (and re-pushes that context around the invocation of the callback). * * Calling this function takes a reference to @simple for as long as * is needed to complete the call. * * Deprecated: Use #GTask instead. */ public void completeInIdle() { g_simple_async_result_complete_in_idle(gSimpleAsyncResult); } /** * Gets the operation result boolean from within the asynchronous result. * * Deprecated: Use #GTask and g_task_propagate_boolean() instead. * * Returns: %TRUE if the operation's result was %TRUE, %FALSE * if the operation's result was %FALSE. */ public bool getOpResGboolean() { return g_simple_async_result_get_op_res_gboolean(gSimpleAsyncResult) != 0; } /** * Gets a pointer result as returned by the asynchronous function. * * Deprecated: Use #GTask and g_task_propagate_pointer() instead. * * Returns: a pointer from the result. */ public void* getOpResGpointer() { return g_simple_async_result_get_op_res_gpointer(gSimpleAsyncResult); } /** * Gets a gssize from the asynchronous result. * * Deprecated: Use #GTask and g_task_propagate_int() instead. * * Returns: a gssize returned from the asynchronous function. */ public ptrdiff_t getOpResGssize() { return g_simple_async_result_get_op_res_gssize(gSimpleAsyncResult); } /** * Gets the source tag for the #GSimpleAsyncResult. * * Deprecated: Use #GTask and g_task_get_source_tag() instead. * * Returns: a #gpointer to the source object for the #GSimpleAsyncResult. */ public void* getSourceTag() { return g_simple_async_result_get_source_tag(gSimpleAsyncResult); } /** * Propagates an error from within the simple asynchronous result to * a given destination. * * If the #GCancellable given to a prior call to * g_simple_async_result_set_check_cancellable() is cancelled then this * function will return %TRUE with @dest set appropriately. * * Deprecated: Use #GTask instead. * * Returns: %TRUE if the error was propagated to @dest. %FALSE otherwise. * * Throws: GException on failure. */ public bool propagateError() { GError* err = null; auto p = g_simple_async_result_propagate_error(gSimpleAsyncResult, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Runs the asynchronous job in a separate thread and then calls * g_simple_async_result_complete_in_idle() on @simple to return * the result to the appropriate main loop. * * Calling this function takes a reference to @simple for as long as * is needed to run the job and report its completion. * * Deprecated: Use #GTask and g_task_run_in_thread() instead. * * Params: * func = a #GSimpleAsyncThreadFunc. * ioPriority = the io priority of the request. * cancellable = optional #GCancellable object, %NULL to ignore. */ public void runInThread(GSimpleAsyncThreadFunc func, int ioPriority, Cancellable cancellable) { g_simple_async_result_run_in_thread(gSimpleAsyncResult, func, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct()); } /** * Sets a #GCancellable to check before dispatching results. * * This function has one very specific purpose: the provided cancellable * is checked at the time of g_simple_async_result_propagate_error() If * it is cancelled, these functions will return an "Operation was * cancelled" error (%G_IO_ERROR_CANCELLED). * * Implementors of cancellable asynchronous functions should use this in * order to provide a guarantee to their callers that cancelling an * async operation will reliably result in an error being returned for * that operation (even if a positive result for the operation has * already been sent as an idle to the main context to be dispatched). * * The checking described above is done regardless of any call to the * unrelated g_simple_async_result_set_handle_cancellation() function. * * Deprecated: Use #GTask instead. * * Params: * checkCancellable = a #GCancellable to check, or %NULL to unset * * Since: 2.32 */ public void setCheckCancellable(Cancellable checkCancellable) { g_simple_async_result_set_check_cancellable(gSimpleAsyncResult, (checkCancellable is null) ? null : checkCancellable.getCancellableStruct()); } /** * Sets an error within the asynchronous result without a #GError. * Unless writing a binding, see g_simple_async_result_set_error(). * * Deprecated: Use #GTask and g_task_return_error() instead. * * Params: * domain = a #GQuark (usually #G_IO_ERROR). * code = an error code. * format = a formatted error reporting string. * args = va_list of arguments. */ public void setErrorVa(GQuark domain, int code, string format, void* args) { g_simple_async_result_set_error_va(gSimpleAsyncResult, domain, code, Str.toStringz(format), args); } /** * Sets the result from a #GError. * * Deprecated: Use #GTask and g_task_return_error() instead. * * Params: * error = #GError. */ public void setFromError(ErrorG error) { g_simple_async_result_set_from_error(gSimpleAsyncResult, (error is null) ? null : error.getErrorGStruct()); } /** * Sets whether to handle cancellation within the asynchronous operation. * * This function has nothing to do with * g_simple_async_result_set_check_cancellable(). It only refers to the * #GCancellable passed to g_simple_async_result_run_in_thread(). * * Params: * handleCancellation = a #gboolean. */ public void setHandleCancellation(bool handleCancellation) { g_simple_async_result_set_handle_cancellation(gSimpleAsyncResult, handleCancellation); } /** * Sets the operation result to a boolean within the asynchronous result. * * Deprecated: Use #GTask and g_task_return_boolean() instead. * * Params: * opRes = a #gboolean. */ public void setOpResGboolean(bool opRes) { g_simple_async_result_set_op_res_gboolean(gSimpleAsyncResult, opRes); } /** * Sets the operation result within the asynchronous result to a pointer. * * Deprecated: Use #GTask and g_task_return_pointer() instead. * * Params: * opRes = a pointer result from an asynchronous function. * destroyOpRes = a #GDestroyNotify function. */ public void setOpResGpointer(void* opRes, GDestroyNotify destroyOpRes) { g_simple_async_result_set_op_res_gpointer(gSimpleAsyncResult, opRes, destroyOpRes); } /** * Sets the operation result within the asynchronous result to * the given @op_res. * * Deprecated: Use #GTask and g_task_return_int() instead. * * Params: * opRes = a #gssize. */ public void setOpResGssize(ptrdiff_t opRes) { g_simple_async_result_set_op_res_gssize(gSimpleAsyncResult, opRes); } /** * Sets the result from @error, and takes over the caller's ownership * of @error, so the caller does not need to free it any more. * * Deprecated: Use #GTask and g_task_return_error() instead. * * Params: * error = a #GError * * Since: 2.28 */ public void takeError(ErrorG error) { g_simple_async_result_take_error(gSimpleAsyncResult, (error is null) ? null : error.getErrorGStruct()); } /** * Reports an error in an idle function. Similar to * g_simple_async_report_error_in_idle(), but takes a #GError rather * than building a new one. * * Deprecated: Use g_task_report_error(). * * Params: * object = a #GObject, or %NULL * callback = a #GAsyncReadyCallback. * userData = user data passed to @callback. * error = the #GError to report */ public static void simpleAsyncReportGerrorInIdle(ObjectG object, GAsyncReadyCallback callback, void* userData, ErrorG error) { g_simple_async_report_gerror_in_idle((object is null) ? null : object.getObjectGStruct(), callback, userData, (error is null) ? null : error.getErrorGStruct()); } /** * Reports an error in an idle function. Similar to * g_simple_async_report_gerror_in_idle(), but takes over the caller's * ownership of @error, so the caller does not have to free it any more. * * Deprecated: Use g_task_report_error(). * * Params: * object = a #GObject, or %NULL * callback = a #GAsyncReadyCallback. * userData = user data passed to @callback. * error = the #GError to report * * Since: 2.28 */ public static void simpleAsyncReportTakeGerrorInIdle(ObjectG object, GAsyncReadyCallback callback, void* userData, ErrorG error) { g_simple_async_report_take_gerror_in_idle((object is null) ? null : object.getObjectGStruct(), callback, userData, (error is null) ? null : error.getErrorGStruct()); } } GtkD-3.7.5/generated/gtkd/gio/SimpleIOStream.d000066400000000000000000000064331324604450400210360ustar00rootroot00000000000000/* * 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 gio.SimpleIOStream; private import gio.IOStream; private import gio.InputStream; private import gio.OutputStream; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * GSimpleIOStream creates a #GIOStream from an arbitrary #GInputStream and * #GOutputStream. This allows any pair of input and output streams to be used * with #GIOStream methods. * * This is useful when you obtained a #GInputStream and a #GOutputStream * by other means, for instance creating them with platform specific methods as * g_unix_input_stream_new() or g_win32_input_stream_new(), and you want * to take advantage of the methods provided by #GIOStream. * * Since: 2.44 */ public class SimpleIOStream : IOStream { /** the main Gtk struct */ protected GSimpleIOStream* gSimpleIOStream; /** Get the main Gtk struct */ public GSimpleIOStream* getSimpleIOStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSimpleIOStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSimpleIOStream; } protected override void setStruct(GObject* obj) { gSimpleIOStream = cast(GSimpleIOStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSimpleIOStream* gSimpleIOStream, bool ownedRef = false) { this.gSimpleIOStream = gSimpleIOStream; super(cast(GIOStream*)gSimpleIOStream, ownedRef); } /** */ public static GType getType() { return g_simple_io_stream_get_type(); } /** * Creates a new #GSimpleIOStream wrapping @input_stream and @output_stream. * See also #GIOStream. * * Params: * inputStream = a #GInputStream. * outputStream = a #GOutputStream. * * Returns: a new #GSimpleIOStream instance. * * Since: 2.44 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(InputStream inputStream, OutputStream outputStream) { auto p = g_simple_io_stream_new((inputStream is null) ? null : inputStream.getInputStreamStruct(), (outputStream is null) ? null : outputStream.getOutputStreamStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSimpleIOStream*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/SimplePermission.d000066400000000000000000000055401324604450400215010ustar00rootroot00000000000000/* * 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 gio.SimplePermission; private import gio.Permission; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GSimplePermission is a trivial implementation of #GPermission that * represents a permission that is either always or never allowed. The * value is given at construction and doesn't change. * * Calling request or release will result in errors. */ public class SimplePermission : Permission { /** the main Gtk struct */ protected GSimplePermission* gSimplePermission; /** Get the main Gtk struct */ public GSimplePermission* getSimplePermissionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSimplePermission; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSimplePermission; } protected override void setStruct(GObject* obj) { gSimplePermission = cast(GSimplePermission*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSimplePermission* gSimplePermission, bool ownedRef = false) { this.gSimplePermission = gSimplePermission; super(cast(GPermission*)gSimplePermission, ownedRef); } /** */ public static GType getType() { return g_simple_permission_get_type(); } /** * Creates a new #GPermission instance that represents an action that is * either always or never allowed. * * Params: * allowed = %TRUE if the action is allowed * * Returns: the #GSimplePermission, as a #GPermission * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(bool allowed) { auto p = g_simple_permission_new(allowed); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSimplePermission*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/SimpleProxyResolver.d000066400000000000000000000124041324604450400222110ustar00rootroot00000000000000/* * 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 gio.SimpleProxyResolver; private import gio.ProxyResolverIF; private import gio.ProxyResolverT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GSimpleProxyResolver is a simple #GProxyResolver implementation * that handles a single default proxy, multiple URI-scheme-specific * proxies, and a list of hosts that proxies should not be used for. * * #GSimpleProxyResolver is never the default proxy resolver, but it * can be used as the base class for another proxy resolver * implementation, or it can be created and used manually, such as * with g_socket_client_set_proxy_resolver(). */ public class SimpleProxyResolver : ObjectG, ProxyResolverIF { /** the main Gtk struct */ protected GSimpleProxyResolver* gSimpleProxyResolver; /** Get the main Gtk struct */ public GSimpleProxyResolver* getSimpleProxyResolverStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSimpleProxyResolver; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSimpleProxyResolver; } protected override void setStruct(GObject* obj) { gSimpleProxyResolver = cast(GSimpleProxyResolver*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSimpleProxyResolver* gSimpleProxyResolver, bool ownedRef = false) { this.gSimpleProxyResolver = gSimpleProxyResolver; super(cast(GObject*)gSimpleProxyResolver, ownedRef); } // add the ProxyResolver capabilities mixin ProxyResolverT!(GSimpleProxyResolver); /** */ public static GType getType() { return g_simple_proxy_resolver_get_type(); } /** * Creates a new #GSimpleProxyResolver. See * #GSimpleProxyResolver:default-proxy and * #GSimpleProxyResolver:ignore-hosts for more details on how the * arguments are interpreted. * * Params: * defaultProxy = the default proxy to use, eg * "socks://192.168.1.1" * ignoreHosts = an optional list of hosts/IP addresses * to not use a proxy for. * * Returns: a new #GSimpleProxyResolver * * Since: 2.36 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string defaultProxy, string[] ignoreHosts) { auto p = g_simple_proxy_resolver_new(Str.toStringz(defaultProxy), Str.toStringzArray(ignoreHosts)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSimpleProxyResolver*) p, true); } /** * Sets the default proxy on @resolver, to be used for any URIs that * don't match #GSimpleProxyResolver:ignore-hosts or a proxy set * via g_simple_proxy_resolver_set_uri_proxy(). * * If @default_proxy starts with "socks://", * #GSimpleProxyResolver will treat it as referring to all three of * the socks5, socks4a, and socks4 proxy types. * * Params: * defaultProxy = the default proxy to use * * Since: 2.36 */ public void setDefaultProxy(string defaultProxy) { g_simple_proxy_resolver_set_default_proxy(gSimpleProxyResolver, Str.toStringz(defaultProxy)); } /** * Sets the list of ignored hosts. * * See #GSimpleProxyResolver:ignore-hosts for more details on how the * @ignore_hosts argument is interpreted. * * Params: * ignoreHosts = %NULL-terminated list of hosts/IP addresses * to not use a proxy for * * Since: 2.36 */ public void setIgnoreHosts(string[] ignoreHosts) { g_simple_proxy_resolver_set_ignore_hosts(gSimpleProxyResolver, Str.toStringzArray(ignoreHosts)); } /** * Adds a URI-scheme-specific proxy to @resolver; URIs whose scheme * matches @uri_scheme (and which don't match * #GSimpleProxyResolver:ignore-hosts) will be proxied via @proxy. * * As with #GSimpleProxyResolver:default-proxy, if @proxy starts with * "socks://", #GSimpleProxyResolver will treat it * as referring to all three of the socks5, socks4a, and socks4 proxy * types. * * Params: * uriScheme = the URI scheme to add a proxy for * proxy = the proxy to use for @uri_scheme * * Since: 2.36 */ public void setUriProxy(string uriScheme, string proxy) { g_simple_proxy_resolver_set_uri_proxy(gSimpleProxyResolver, Str.toStringz(uriScheme), Str.toStringz(proxy)); } } GtkD-3.7.5/generated/gtkd/gio/Socket.d000066400000000000000000001706701324604450400174360ustar00rootroot00000000000000/* * 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 gio.Socket; private import gio.Cancellable; private import gio.Credentials; private import gio.DatagramBasedIF; private import gio.DatagramBasedT; private import gio.InetAddress; private import gio.InitableIF; private import gio.InitableT; private import gio.SocketAddress; private import gio.SocketConnection; private import gio.SocketControlMessage; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Source; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * A #GSocket is a low-level networking primitive. It is a more or less * direct mapping of the BSD socket API in a portable GObject based API. * It supports both the UNIX socket implementations and winsock2 on Windows. * * #GSocket is the platform independent base upon which the higher level * network primitives are based. Applications are not typically meant to * use it directly, but rather through classes like #GSocketClient, * #GSocketService and #GSocketConnection. However there may be cases where * direct use of #GSocket is useful. * * #GSocket implements the #GInitable interface, so if it is manually constructed * by e.g. g_object_new() you must call g_initable_init() and check the * results before using the object. This is done automatically in * g_socket_new() and g_socket_new_from_fd(), so these functions can return * %NULL. * * Sockets operate in two general modes, blocking or non-blocking. When * in blocking mode all operations (which don’t take an explicit blocking * parameter) block until the requested operation * is finished or there is an error. In non-blocking mode all calls that * would block return immediately with a %G_IO_ERROR_WOULD_BLOCK error. * To know when a call would successfully run you can call g_socket_condition_check(), * or g_socket_condition_wait(). You can also use g_socket_create_source() and * attach it to a #GMainContext to get callbacks when I/O is possible. * Note that all sockets are always set to non blocking mode in the system, and * blocking mode is emulated in GSocket. * * When working in non-blocking mode applications should always be able to * handle getting a %G_IO_ERROR_WOULD_BLOCK error even when some other * function said that I/O was possible. This can easily happen in case * of a race condition in the application, but it can also happen for other * reasons. For instance, on Windows a socket is always seen as writable * until a write returns %G_IO_ERROR_WOULD_BLOCK. * * #GSockets can be either connection oriented or datagram based. * For connection oriented types you must first establish a connection by * either connecting to an address or accepting a connection from another * address. For connectionless socket types the target/source address is * specified or received in each I/O operation. * * All socket file descriptors are set to be close-on-exec. * * Note that creating a #GSocket causes the signal %SIGPIPE to be * ignored for the remainder of the program. If you are writing a * command-line utility that uses #GSocket, you may need to take into * account the fact that your program will not automatically be killed * if it tries to write to %stdout after it has been closed. * * Like most other APIs in GLib, #GSocket is not inherently thread safe. To use * a #GSocket concurrently from multiple threads, you must implement your own * locking. * * Since: 2.22 */ public class Socket : ObjectG, DatagramBasedIF, InitableIF { /** the main Gtk struct */ protected GSocket* gSocket; /** Get the main Gtk struct */ public GSocket* getSocketStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSocket; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSocket; } protected override void setStruct(GObject* obj) { gSocket = cast(GSocket*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSocket* gSocket, bool ownedRef = false) { this.gSocket = gSocket; super(cast(GObject*)gSocket, ownedRef); } // add the DatagramBased capabilities mixin DatagramBasedT!(GSocket); // add the Initable capabilities mixin InitableT!(GSocket); /** */ public static GType getType() { return g_socket_get_type(); } /** * Creates a new #GSocket with the defined family, type and protocol. * If @protocol is 0 (%G_SOCKET_PROTOCOL_DEFAULT) the default protocol type * for the family and type is used. * * The @protocol is a family and type specific int that specifies what * kind of protocol to use. #GSocketProtocol lists several common ones. * Many families only support one protocol, and use 0 for this, others * support several and using 0 means to use the default protocol for * the family and type. * * The protocol id is passed directly to the operating * system, so you can use protocols not listed in #GSocketProtocol if you * know the protocol number used for it. * * Params: * family = the socket family to use, e.g. %G_SOCKET_FAMILY_IPV4. * type = the socket type to use. * protocol = the id of the protocol to use, or 0 for default. * * Returns: a #GSocket or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(GSocketFamily family, GSocketType type, GSocketProtocol protocol) { GError* err = null; auto p = g_socket_new(family, type, protocol, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSocket*) p, true); } /** * Creates a new #GSocket from a native file descriptor * or winsock SOCKET handle. * * This reads all the settings from the file descriptor so that * all properties should work. Note that the file descriptor * will be set to non-blocking mode, independent on the blocking * mode of the #GSocket. * * On success, the returned #GSocket takes ownership of @fd. On failure, the * caller must close @fd themselves. * * Since GLib 2.46, it is no longer a fatal error to call this on a non-socket * descriptor. Instead, a GError will be set with code %G_IO_ERROR_FAILED * * Params: * fd = a native socket file descriptor. * * Returns: a #GSocket or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(int fd) { GError* err = null; auto p = g_socket_new_from_fd(fd, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_fd"); } this(cast(GSocket*) p, true); } /** * Accept incoming connections on a connection-based socket. This removes * the first outstanding connection request from the listening socket and * creates a #GSocket object for it. * * The @socket must be bound to a local address with g_socket_bind() and * must be listening for incoming connections (g_socket_listen()). * * If there are no outstanding connections then the operation will block * or return %G_IO_ERROR_WOULD_BLOCK if non-blocking I/O is enabled. * To be notified of an incoming connection, wait for the %G_IO_IN condition. * * Params: * cancellable = a %GCancellable or %NULL * * Returns: a new #GSocket, or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public Socket accept(Cancellable cancellable) { GError* err = null; auto p = g_socket_accept(gSocket, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Socket)(cast(GSocket*) p, true); } /** * When a socket is created it is attached to an address family, but it * doesn't have an address in this family. g_socket_bind() assigns the * address (sometimes called name) of the socket. * * It is generally required to bind to a local address before you can * receive connections. (See g_socket_listen() and g_socket_accept() ). * In certain situations, you may also want to bind a socket that will be * used to initiate connections, though this is not normally required. * * If @socket is a TCP socket, then @allow_reuse controls the setting * of the `SO_REUSEADDR` socket option; normally it should be %TRUE for * server sockets (sockets that you will eventually call * g_socket_accept() on), and %FALSE for client sockets. (Failing to * set this flag on a server socket may cause g_socket_bind() to return * %G_IO_ERROR_ADDRESS_IN_USE if the server program is stopped and then * immediately restarted.) * * If @socket is a UDP socket, then @allow_reuse determines whether or * not other UDP sockets can be bound to the same address at the same * time. In particular, you can have several UDP sockets bound to the * same address, and they will all receive all of the multicast and * broadcast packets sent to that address. (The behavior of unicast * UDP packets to an address with multiple listeners is not defined.) * * Params: * address = a #GSocketAddress specifying the local address. * allowReuse = whether to allow reusing this address * * Returns: %TRUE on success, %FALSE on error. * * Since: 2.22 * * Throws: GException on failure. */ public bool bind(SocketAddress address, bool allowReuse) { GError* err = null; auto p = g_socket_bind(gSocket, (address is null) ? null : address.getSocketAddressStruct(), allowReuse, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks and resets the pending connect error for the socket. * This is used to check for errors when g_socket_connect() is * used in non-blocking mode. * * Returns: %TRUE if no error, %FALSE otherwise, setting @error to the error * * Since: 2.22 * * Throws: GException on failure. */ public bool checkConnectResult() { GError* err = null; auto p = g_socket_check_connect_result(gSocket, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Closes the socket, shutting down any active connection. * * Closing a socket does not wait for all outstanding I/O operations * to finish, so the caller should not rely on them to be guaranteed * to complete even if the close returns with no error. * * Once the socket is closed, all other operations will return * %G_IO_ERROR_CLOSED. Closing a socket multiple times will not * return an error. * * Sockets will be automatically closed when the last reference * is dropped, but you might want to call this function to make sure * resources are released as early as possible. * * Beware that due to the way that TCP works, it is possible for * recently-sent data to be lost if either you close a socket while the * %G_IO_IN condition is set, or else if the remote connection tries to * send something to you after you close the socket but before it has * finished reading all of the data you sent. There is no easy generic * way to avoid this problem; the easiest fix is to design the network * protocol such that the client will never send data "out of turn". * Another solution is for the server to half-close the connection by * calling g_socket_shutdown() with only the @shutdown_write flag set, * and then wait for the client to notice this and close its side of the * connection, after which the server can safely call g_socket_close(). * (This is what #GTcpConnection does if you call * g_tcp_connection_set_graceful_disconnect(). But of course, this * only works if the client will close its connection after the server * does.) * * Returns: %TRUE on success, %FALSE on error * * Since: 2.22 * * Throws: GException on failure. */ public bool close() { GError* err = null; auto p = g_socket_close(gSocket, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks on the readiness of @socket to perform operations. * The operations specified in @condition are checked for and masked * against the currently-satisfied conditions on @socket. The result * is returned. * * Note that on Windows, it is possible for an operation to return * %G_IO_ERROR_WOULD_BLOCK even immediately after * g_socket_condition_check() has claimed that the socket is ready for * writing. Rather than calling g_socket_condition_check() and then * writing to the socket if it succeeds, it is generally better to * simply try writing to the socket right away, and try again later if * the initial attempt returns %G_IO_ERROR_WOULD_BLOCK. * * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in condition; * these conditions will always be set in the output if they are true. * * This call never blocks. * * Params: * condition = a #GIOCondition mask to check * * Returns: the @GIOCondition mask of the current state * * Since: 2.22 */ public GIOCondition conditionCheck(GIOCondition condition) { return g_socket_condition_check(gSocket, condition); } /** * Waits for up to @timeout microseconds for @condition to become true * on @socket. If the condition is met, %TRUE is returned. * * If @cancellable is cancelled before the condition is met, or if * @timeout (or the socket's #GSocket:timeout) is reached before the * condition is met, then %FALSE is returned and @error, if non-%NULL, * is set to the appropriate value (%G_IO_ERROR_CANCELLED or * %G_IO_ERROR_TIMED_OUT). * * If you don't want a timeout, use g_socket_condition_wait(). * (Alternatively, you can pass -1 for @timeout.) * * Note that although @timeout is in microseconds for consistency with * other GLib APIs, this function actually only has millisecond * resolution, and the behavior is undefined if @timeout is not an * exact number of milliseconds. * * Params: * condition = a #GIOCondition mask to wait for * timeout = the maximum time (in microseconds) to wait, or -1 * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE if the condition was met, %FALSE otherwise * * Since: 2.32 * * Throws: GException on failure. */ public bool conditionTimedWait(GIOCondition condition, long timeout, Cancellable cancellable) { GError* err = null; auto p = g_socket_condition_timed_wait(gSocket, condition, timeout, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Waits for @condition to become true on @socket. When the condition * is met, %TRUE is returned. * * If @cancellable is cancelled before the condition is met, or if the * socket has a timeout set and it is reached before the condition is * met, then %FALSE is returned and @error, if non-%NULL, is set to * the appropriate value (%G_IO_ERROR_CANCELLED or * %G_IO_ERROR_TIMED_OUT). * * See also g_socket_condition_timed_wait(). * * Params: * condition = a #GIOCondition mask to wait for * cancellable = a #GCancellable, or %NULL * * Returns: %TRUE if the condition was met, %FALSE otherwise * * Since: 2.22 * * Throws: GException on failure. */ public bool conditionWait(GIOCondition condition, Cancellable cancellable) { GError* err = null; auto p = g_socket_condition_wait(gSocket, condition, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Connect the socket to the specified remote address. * * For connection oriented socket this generally means we attempt to make * a connection to the @address. For a connection-less socket it sets * the default address for g_socket_send() and discards all incoming datagrams * from other sources. * * Generally connection oriented sockets can only connect once, but * connection-less sockets can connect multiple times to change the * default address. * * If the connect call needs to do network I/O it will block, unless * non-blocking I/O is enabled. Then %G_IO_ERROR_PENDING is returned * and the user can be notified of the connection finishing by waiting * for the G_IO_OUT condition. The result of the connection must then be * checked with g_socket_check_connect_result(). * * Params: * address = a #GSocketAddress specifying the remote address. * cancellable = a %GCancellable or %NULL * * Returns: %TRUE if connected, %FALSE on error. * * Since: 2.22 * * Throws: GException on failure. */ public bool connect(SocketAddress address, Cancellable cancellable) { GError* err = null; auto p = g_socket_connect(gSocket, (address is null) ? null : address.getSocketAddressStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Creates a #GSocketConnection subclass of the right type for * @socket. * * Returns: a #GSocketConnection * * Since: 2.22 */ public SocketConnection connectionFactoryCreateConnection() { auto p = g_socket_connection_factory_create_connection(gSocket); if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * Creates a #GSource that can be attached to a %GMainContext to monitor * for the availability of the specified @condition on the socket. The #GSource * keeps a reference to the @socket. * * The callback on the source is of the #GSocketSourceFunc type. * * It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; * these conditions will always be reported output if they are true. * * @cancellable if not %NULL can be used to cancel the source, which will * cause the source to trigger, reporting the current condition (which * is likely 0 unless cancellation happened at the same time as a * condition change). You can check for this in the callback using * g_cancellable_is_cancelled(). * * If @socket has a timeout set, and it is reached before @condition * occurs, the source will then trigger anyway, reporting %G_IO_IN or * %G_IO_OUT depending on @condition. However, @socket will have been * marked as having had a timeout, and so the next #GSocket I/O method * you call will then fail with a %G_IO_ERROR_TIMED_OUT. * * Params: * condition = a #GIOCondition mask to monitor * cancellable = a %GCancellable or %NULL * * Returns: a newly allocated %GSource, free with g_source_unref(). * * Since: 2.22 */ public Source createSource(GIOCondition condition, Cancellable cancellable) { auto p = g_socket_create_source(gSocket, condition, (cancellable is null) ? null : cancellable.getCancellableStruct()); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } /** * Get the amount of data pending in the OS input buffer, without blocking. * * If @socket is a UDP or SCTP socket, this will return the size of * just the next packet, even if additional packets are buffered after * that one. * * Note that on Windows, this function is rather inefficient in the * UDP case, and so if you know any plausible upper bound on the size * of the incoming packet, it is better to just do a * g_socket_receive() with a buffer of that size, rather than calling * g_socket_get_available_bytes() first and then doing a receive of * exactly the right size. * * Returns: the number of bytes that can be read from the socket * without blocking or truncating, or -1 on error. * * Since: 2.32 */ public ptrdiff_t getAvailableBytes() { return g_socket_get_available_bytes(gSocket); } /** * Gets the blocking mode of the socket. For details on blocking I/O, * see g_socket_set_blocking(). * * Returns: %TRUE if blocking I/O is used, %FALSE otherwise. * * Since: 2.22 */ public bool getBlocking() { return g_socket_get_blocking(gSocket) != 0; } /** * Gets the broadcast setting on @socket; if %TRUE, * it is possible to send packets to broadcast * addresses. * * Returns: the broadcast setting on @socket * * Since: 2.32 */ public bool getBroadcast() { return g_socket_get_broadcast(gSocket) != 0; } /** * Returns the credentials of the foreign process connected to this * socket, if any (e.g. it is only supported for %G_SOCKET_FAMILY_UNIX * sockets). * * If this operation isn't supported on the OS, the method fails with * the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented * by reading the %SO_PEERCRED option on the underlying socket. * * Other ways to obtain credentials from a foreign peer includes the * #GUnixCredentialsMessage type and * g_unix_connection_send_credentials() / * g_unix_connection_receive_credentials() functions. * * Returns: %NULL if @error is set, otherwise a #GCredentials object * that must be freed with g_object_unref(). * * Since: 2.26 * * Throws: GException on failure. */ public Credentials getCredentials() { GError* err = null; auto p = g_socket_get_credentials(gSocket, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Credentials)(cast(GCredentials*) p, true); } /** * Gets the socket family of the socket. * * Returns: a #GSocketFamily * * Since: 2.22 */ public GSocketFamily getFamily() { return g_socket_get_family(gSocket); } /** * Returns the underlying OS socket object. On unix this * is a socket file descriptor, and on Windows this is * a Winsock2 SOCKET handle. This may be useful for * doing platform specific or otherwise unusual operations * on the socket. * * Returns: the file descriptor of the socket. * * Since: 2.22 */ public int getFd() { return g_socket_get_fd(gSocket); } /** * Gets the keepalive mode of the socket. For details on this, * see g_socket_set_keepalive(). * * Returns: %TRUE if keepalive is active, %FALSE otherwise. * * Since: 2.22 */ public bool getKeepalive() { return g_socket_get_keepalive(gSocket) != 0; } /** * Gets the listen backlog setting of the socket. For details on this, * see g_socket_set_listen_backlog(). * * Returns: the maximum number of pending connections. * * Since: 2.22 */ public int getListenBacklog() { return g_socket_get_listen_backlog(gSocket); } /** * Try to get the local address of a bound socket. This is only * useful if the socket has been bound to a local address, * either explicitly or implicitly when connecting. * * Returns: a #GSocketAddress or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public SocketAddress getLocalAddress() { GError* err = null; auto p = g_socket_get_local_address(gSocket, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketAddress)(cast(GSocketAddress*) p, true); } /** * Gets the multicast loopback setting on @socket; if %TRUE (the * default), outgoing multicast packets will be looped back to * multicast listeners on the same host. * * Returns: the multicast loopback setting on @socket * * Since: 2.32 */ public bool getMulticastLoopback() { return g_socket_get_multicast_loopback(gSocket) != 0; } /** * Gets the multicast time-to-live setting on @socket; see * g_socket_set_multicast_ttl() for more details. * * Returns: the multicast time-to-live setting on @socket * * Since: 2.32 */ public uint getMulticastTtl() { return g_socket_get_multicast_ttl(gSocket); } /** * Gets the value of an integer-valued option on @socket, as with * getsockopt(). (If you need to fetch a non-integer-valued option, * you will need to call getsockopt() directly.) * * The [][gio-gnetworking.h] * header pulls in system headers that will define most of the * standard/portable socket options. For unusual socket protocols or * platform-dependent options, you may need to include additional * headers. * * Note that even for socket options that are a single byte in size, * @value is still a pointer to a #gint variable, not a #guchar; * g_socket_get_option() will handle the conversion internally. * * Params: * level = the "API level" of the option (eg, `SOL_SOCKET`) * optname = the "name" of the option (eg, `SO_BROADCAST`) * value = return location for the option value * * Returns: success or failure. On failure, @error will be set, and * the system error value (`errno` or WSAGetLastError()) will still * be set to the result of the getsockopt() call. * * Since: 2.36 * * Throws: GException on failure. */ public bool getOption(int level, int optname, out int value) { GError* err = null; auto p = g_socket_get_option(gSocket, level, optname, &value, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the socket protocol id the socket was created with. * In case the protocol is unknown, -1 is returned. * * Returns: a protocol id, or -1 if unknown * * Since: 2.22 */ public GSocketProtocol getProtocol() { return g_socket_get_protocol(gSocket); } /** * Try to get the remove address of a connected socket. This is only * useful for connection oriented sockets that have been connected. * * Returns: a #GSocketAddress or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public SocketAddress getRemoteAddress() { GError* err = null; auto p = g_socket_get_remote_address(gSocket, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketAddress)(cast(GSocketAddress*) p, true); } /** * Gets the socket type of the socket. * * Returns: a #GSocketType * * Since: 2.22 */ public GSocketType getSocketType() { return g_socket_get_socket_type(gSocket); } /** * Gets the timeout setting of the socket. For details on this, see * g_socket_set_timeout(). * * Returns: the timeout in seconds * * Since: 2.26 */ public uint getTimeout() { return g_socket_get_timeout(gSocket); } /** * Gets the unicast time-to-live setting on @socket; see * g_socket_set_ttl() for more details. * * Returns: the time-to-live setting on @socket * * Since: 2.32 */ public uint getTtl() { return g_socket_get_ttl(gSocket); } /** * Checks whether a socket is closed. * * Returns: %TRUE if socket is closed, %FALSE otherwise * * Since: 2.22 */ public bool isClosed() { return g_socket_is_closed(gSocket) != 0; } /** * Check whether the socket is connected. This is only useful for * connection-oriented sockets. * * If using g_socket_shutdown(), this function will return %TRUE until the * socket has been shut down for reading and writing. If you do a non-blocking * connect, this function will not return %TRUE until after you call * g_socket_check_connect_result(). * * Returns: %TRUE if socket is connected, %FALSE otherwise. * * Since: 2.22 */ public bool isConnected() { return g_socket_is_connected(gSocket) != 0; } /** * Registers @socket to receive multicast messages sent to @group. * @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have * been bound to an appropriate interface and port with * g_socket_bind(). * * If @iface is %NULL, the system will automatically pick an interface * to bind to based on @group. * * If @source_specific is %TRUE, source-specific multicast as defined * in RFC 4604 is used. Note that on older platforms this may fail * with a %G_IO_ERROR_NOT_SUPPORTED error. * * Params: * group = a #GInetAddress specifying the group address to join. * sourceSpecific = %TRUE if source-specific multicast should be used * iface = Name of the interface to use, or %NULL * * Returns: %TRUE on success, %FALSE on error. * * Since: 2.32 * * Throws: GException on failure. */ public bool joinMulticastGroup(InetAddress group, bool sourceSpecific, string iface) { GError* err = null; auto p = g_socket_join_multicast_group(gSocket, (group is null) ? null : group.getInetAddressStruct(), sourceSpecific, Str.toStringz(iface), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Removes @socket from the multicast group defined by @group, @iface, * and @source_specific (which must all have the same values they had * when you joined the group). * * @socket remains bound to its address and port, and can still receive * unicast messages after calling this. * * Params: * group = a #GInetAddress specifying the group address to leave. * sourceSpecific = %TRUE if source-specific multicast was used * iface = Interface used * * Returns: %TRUE on success, %FALSE on error. * * Since: 2.32 * * Throws: GException on failure. */ public bool leaveMulticastGroup(InetAddress group, bool sourceSpecific, string iface) { GError* err = null; auto p = g_socket_leave_multicast_group(gSocket, (group is null) ? null : group.getInetAddressStruct(), sourceSpecific, Str.toStringz(iface), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Marks the socket as a server socket, i.e. a socket that is used * to accept incoming requests using g_socket_accept(). * * Before calling this the socket must be bound to a local address using * g_socket_bind(). * * To set the maximum amount of outstanding clients, use * g_socket_set_listen_backlog(). * * Returns: %TRUE on success, %FALSE on error. * * Since: 2.22 * * Throws: GException on failure. */ public bool listen() { GError* err = null; auto p = g_socket_listen(gSocket, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Receive data (up to @size bytes) from a socket. This is mainly used by * connection-oriented sockets; it is identical to g_socket_receive_from() * with @address set to %NULL. * * For %G_SOCKET_TYPE_DATAGRAM and %G_SOCKET_TYPE_SEQPACKET sockets, * g_socket_receive() will always read either 0 or 1 complete messages from * the socket. If the received message is too large to fit in @buffer, then * the data beyond @size bytes will be discarded, without any explicit * indication that this has occurred. * * For %G_SOCKET_TYPE_STREAM sockets, g_socket_receive() can return any * number of bytes, up to @size. If more than @size bytes have been * received, the additional data will be returned in future calls to * g_socket_receive(). * * If the socket is in blocking mode the call will block until there * is some data to receive, the connection is closed, or there is an * error. If there is no data available and the socket is in * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be * returned. To be notified when data is available, wait for the * %G_IO_IN condition. * * On error -1 is returned and @error is set accordingly. * * Params: * buffer = a buffer to * read data into (which should be at least @size bytes long). * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes read, or 0 if the connection was closed by * the peer, or -1 on error * * Since: 2.22 * * Throws: GException on failure. */ public ptrdiff_t receive(ref char[] buffer, Cancellable cancellable) { GError* err = null; auto p = g_socket_receive(gSocket, buffer.ptr, cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Receive data (up to @size bytes) from a socket. * * If @address is non-%NULL then @address will be set equal to the * source address of the received packet. * @address is owned by the caller. * * See g_socket_receive() for additional information. * * Params: * address = a pointer to a #GSocketAddress * pointer, or %NULL * buffer = a buffer to * read data into (which should be at least @size bytes long). * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes read, or 0 if the connection was closed by * the peer, or -1 on error * * Since: 2.22 * * Throws: GException on failure. */ public ptrdiff_t receiveFrom(out SocketAddress address, ref char[] buffer, Cancellable cancellable) { GSocketAddress* outaddress = null; GError* err = null; auto p = g_socket_receive_from(gSocket, &outaddress, buffer.ptr, cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } address = ObjectG.getDObject!(SocketAddress)(outaddress); return p; } /** * Receive data from a socket. For receiving multiple messages, see * g_socket_receive_messages(); for easier use, see * g_socket_receive() and g_socket_receive_from(). * * If @address is non-%NULL then @address will be set equal to the * source address of the received packet. * @address is owned by the caller. * * @vector must point to an array of #GInputVector structs and * @num_vectors must be the length of this array. These structs * describe the buffers that received data will be scattered into. * If @num_vectors is -1, then @vectors is assumed to be terminated * by a #GInputVector with a %NULL buffer pointer. * * As a special case, if @num_vectors is 0 (in which case, @vectors * may of course be %NULL), then a single byte is received and * discarded. This is to facilitate the common practice of sending a * single '\0' byte for the purposes of transferring ancillary data. * * @messages, if non-%NULL, will be set to point to a newly-allocated * array of #GSocketControlMessage instances or %NULL if no such * messages was received. These correspond to the control messages * received from the kernel, one #GSocketControlMessage per message * from the kernel. This array is %NULL-terminated and must be freed * by the caller using g_free() after calling g_object_unref() on each * element. If @messages is %NULL, any control messages received will * be discarded. * * @num_messages, if non-%NULL, will be set to the number of control * messages received. * * If both @messages and @num_messages are non-%NULL, then * @num_messages gives the number of #GSocketControlMessage instances * in @messages (ie: not including the %NULL terminator). * * @flags is an in/out parameter. The commonly available arguments * for this are available in the #GSocketMsgFlags enum, but the * values there are the same as the system values, and the flags * are passed in as-is, so you can pass in system-specific flags too * (and g_socket_receive_message() may pass system-specific flags out). * Flags passed in to the parameter affect the receive operation; flags returned * out of it are relevant to the specific returned message. * * As with g_socket_receive(), data may be discarded if @socket is * %G_SOCKET_TYPE_DATAGRAM or %G_SOCKET_TYPE_SEQPACKET and you do not * provide enough buffer space to read a complete message. You can pass * %G_SOCKET_MSG_PEEK in @flags to peek at the current message without * removing it from the receive queue, but there is no portable way to find * out the length of the message other than by reading it into a * sufficiently-large buffer. * * If the socket is in blocking mode the call will block until there * is some data to receive, the connection is closed, or there is an * error. If there is no data available and the socket is in * non-blocking mode, a %G_IO_ERROR_WOULD_BLOCK error will be * returned. To be notified when data is available, wait for the * %G_IO_IN condition. * * On error -1 is returned and @error is set accordingly. * * Params: * address = a pointer to a #GSocketAddress * pointer, or %NULL * vectors = an array of #GInputVector structs * messages = a pointer * which may be filled with an array of #GSocketControlMessages, or %NULL * flags = a pointer to an int containing #GSocketMsgFlags flags * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes read, or 0 if the connection was closed by * the peer, or -1 on error * * Since: 2.22 * * Throws: GException on failure. */ public ptrdiff_t receiveMessage(out SocketAddress address, GInputVector[] vectors, out SocketControlMessage[] messages, ref int flags, Cancellable cancellable) { GSocketAddress* outaddress = null; GSocketControlMessage** outmessages = null; int numMessages; GError* err = null; auto p = g_socket_receive_message(gSocket, &outaddress, vectors.ptr, cast(int)vectors.length, &outmessages, &numMessages, &flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } address = ObjectG.getDObject!(SocketAddress)(outaddress); messages = new SocketControlMessage[numMessages]; for(size_t i = 0; i < numMessages; i++) { messages[i] = ObjectG.getDObject!(SocketControlMessage)(cast(GSocketControlMessage*) outmessages[i]); } return p; } /** * Receive multiple data messages from @socket in one go. This is the most * complicated and fully-featured version of this call. For easier use, see * g_socket_receive(), g_socket_receive_from(), and g_socket_receive_message(). * * @messages must point to an array of #GInputMessage structs and * @num_messages must be the length of this array. Each #GInputMessage * contains a pointer to an array of #GInputVector structs describing the * buffers that the data received in each message will be written to. Using * multiple #GInputVectors is more memory-efficient than manually copying data * out of a single buffer to multiple sources, and more system-call-efficient * than making multiple calls to g_socket_receive(), such as in scenarios where * a lot of data packets need to be received (e.g. high-bandwidth video * streaming over RTP/UDP). * * @flags modify how all messages are received. The commonly available * arguments for this are available in the #GSocketMsgFlags enum, but the * values there are the same as the system values, and the flags * are passed in as-is, so you can pass in system-specific flags too. These * flags affect the overall receive operation. Flags affecting individual * messages are returned in #GInputMessage.flags. * * The other members of #GInputMessage are treated as described in its * documentation. * * If #GSocket:blocking is %TRUE the call will block until @num_messages have * been received, or the end of the stream is reached. * * If #GSocket:blocking is %FALSE the call will return up to @num_messages * without blocking, or %G_IO_ERROR_WOULD_BLOCK if no messages are queued in the * operating system to be received. * * In blocking mode, if #GSocket:timeout is positive and is reached before any * messages are received, %G_IO_ERROR_TIMED_OUT is returned, otherwise up to * @num_messages are returned. (Note: This is effectively the * behaviour of `MSG_WAITFORONE` with recvmmsg().) * * To be notified when messages are available, wait for the * %G_IO_IN condition. Note though that you may still receive * %G_IO_ERROR_WOULD_BLOCK from g_socket_receive_messages() even if you were * previously notified of a %G_IO_IN condition. * * If the remote peer closes the connection, any messages queued in the * operating system will be returned, and subsequent calls to * g_socket_receive_messages() will return 0 (with no error set). * * On error -1 is returned and @error is set accordingly. An error will only * be returned if zero messages could be received; otherwise the number of * messages successfully received before the error will be returned. * * Params: * messages = an array of #GInputMessage structs * flags = an int containing #GSocketMsgFlags flags for the overall operation * cancellable = a %GCancellable or %NULL * * Returns: number of messages received, or -1 on error. Note that the number * of messages received may be smaller than @num_messages if in non-blocking * mode, if the peer closed the connection, or if @num_messages * was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try * to receive the remaining messages. * * Since: 2.48 * * Throws: GException on failure. */ public int receiveMessages(GInputMessage[] messages, int flags, Cancellable cancellable) { GError* err = null; auto p = g_socket_receive_messages(gSocket, messages.ptr, cast(uint)messages.length, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This behaves exactly the same as g_socket_receive(), except that * the choice of blocking or non-blocking behavior is determined by * the @blocking argument rather than by @socket's properties. * * Params: * buffer = a buffer to * read data into (which should be at least @size bytes long). * blocking = whether to do blocking or non-blocking I/O * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes read, or 0 if the connection was closed by * the peer, or -1 on error * * Since: 2.26 * * Throws: GException on failure. */ public ptrdiff_t receiveWithBlocking(string buffer, bool blocking, Cancellable cancellable) { GError* err = null; auto p = g_socket_receive_with_blocking(gSocket, Str.toStringz(buffer), cast(size_t)buffer.length, blocking, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Tries to send @size bytes from @buffer on the socket. This is * mainly used by connection-oriented sockets; it is identical to * g_socket_send_to() with @address set to %NULL. * * If the socket is in blocking mode the call will block until there is * space for the data in the socket queue. If there is no space available * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error * will be returned. To be notified when space is available, wait for the * %G_IO_OUT condition. Note though that you may still receive * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously * notified of a %G_IO_OUT condition. (On Windows in particular, this is * very common due to the way the underlying APIs work.) * * On error -1 is returned and @error is set accordingly. * * Params: * buffer = the buffer * containing the data to send. * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes written (which may be less than @size), or -1 * on error * * Since: 2.22 * * Throws: GException on failure. */ public ptrdiff_t send(string buffer, Cancellable cancellable) { GError* err = null; auto p = g_socket_send(gSocket, Str.toStringz(buffer), cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Send data to @address on @socket. For sending multiple messages see * g_socket_send_messages(); for easier use, see * g_socket_send() and g_socket_send_to(). * * If @address is %NULL then the message is sent to the default receiver * (set by g_socket_connect()). * * @vectors must point to an array of #GOutputVector structs and * @num_vectors must be the length of this array. (If @num_vectors is -1, * then @vectors is assumed to be terminated by a #GOutputVector with a * %NULL buffer pointer.) The #GOutputVector structs describe the buffers * that the sent data will be gathered from. Using multiple * #GOutputVectors is more memory-efficient than manually copying * data from multiple sources into a single buffer, and more * network-efficient than making multiple calls to g_socket_send(). * * @messages, if non-%NULL, is taken to point to an array of @num_messages * #GSocketControlMessage instances. These correspond to the control * messages to be sent on the socket. * If @num_messages is -1 then @messages is treated as a %NULL-terminated * array. * * @flags modify how the message is sent. The commonly available arguments * for this are available in the #GSocketMsgFlags enum, but the * values there are the same as the system values, and the flags * are passed in as-is, so you can pass in system-specific flags too. * * If the socket is in blocking mode the call will block until there is * space for the data in the socket queue. If there is no space available * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error * will be returned. To be notified when space is available, wait for the * %G_IO_OUT condition. Note though that you may still receive * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously * notified of a %G_IO_OUT condition. (On Windows in particular, this is * very common due to the way the underlying APIs work.) * * On error -1 is returned and @error is set accordingly. * * Params: * address = a #GSocketAddress, or %NULL * vectors = an array of #GOutputVector structs * messages = a pointer to an * array of #GSocketControlMessages, or %NULL. * flags = an int containing #GSocketMsgFlags flags * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes written (which may be less than @size), or -1 * on error * * Since: 2.22 * * Throws: GException on failure. */ public ptrdiff_t sendMessage(SocketAddress address, GOutputVector[] vectors, SocketControlMessage[] messages, int flags, Cancellable cancellable) { GSocketControlMessage*[] messagesArray = new GSocketControlMessage*[messages.length]; for ( int i = 0; i < messages.length; i++ ) { messagesArray[i] = messages[i].getSocketControlMessageStruct(); } GError* err = null; auto p = g_socket_send_message(gSocket, (address is null) ? null : address.getSocketAddressStruct(), vectors.ptr, cast(int)vectors.length, messagesArray.ptr, cast(int)messages.length, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Send multiple data messages from @socket in one go. This is the most * complicated and fully-featured version of this call. For easier use, see * g_socket_send(), g_socket_send_to(), and g_socket_send_message(). * * @messages must point to an array of #GOutputMessage structs and * @num_messages must be the length of this array. Each #GOutputMessage * contains an address to send the data to, and a pointer to an array of * #GOutputVector structs to describe the buffers that the data to be sent * for each message will be gathered from. Using multiple #GOutputVectors is * more memory-efficient than manually copying data from multiple sources * into a single buffer, and more network-efficient than making multiple * calls to g_socket_send(). Sending multiple messages in one go avoids the * overhead of making a lot of syscalls in scenarios where a lot of data * packets need to be sent (e.g. high-bandwidth video streaming over RTP/UDP), * or where the same data needs to be sent to multiple recipients. * * @flags modify how the message is sent. The commonly available arguments * for this are available in the #GSocketMsgFlags enum, but the * values there are the same as the system values, and the flags * are passed in as-is, so you can pass in system-specific flags too. * * If the socket is in blocking mode the call will block until there is * space for all the data in the socket queue. If there is no space available * and the socket is in non-blocking mode a %G_IO_ERROR_WOULD_BLOCK error * will be returned if no data was written at all, otherwise the number of * messages sent will be returned. To be notified when space is available, * wait for the %G_IO_OUT condition. Note though that you may still receive * %G_IO_ERROR_WOULD_BLOCK from g_socket_send() even if you were previously * notified of a %G_IO_OUT condition. (On Windows in particular, this is * very common due to the way the underlying APIs work.) * * On error -1 is returned and @error is set accordingly. An error will only * be returned if zero messages could be sent; otherwise the number of messages * successfully sent before the error will be returned. * * Params: * messages = an array of #GOutputMessage structs * flags = an int containing #GSocketMsgFlags flags * cancellable = a %GCancellable or %NULL * * Returns: number of messages sent, or -1 on error. Note that the number of * messages sent may be smaller than @num_messages if the socket is * non-blocking or if @num_messages was larger than UIO_MAXIOV (1024), * in which case the caller may re-try to send the remaining messages. * * Since: 2.44 * * Throws: GException on failure. */ public int sendMessages(GOutputMessage[] messages, int flags, Cancellable cancellable) { GError* err = null; auto p = g_socket_send_messages(gSocket, messages.ptr, cast(uint)messages.length, flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Tries to send @size bytes from @buffer to @address. If @address is * %NULL then the message is sent to the default receiver (set by * g_socket_connect()). * * See g_socket_send() for additional information. * * Params: * address = a #GSocketAddress, or %NULL * buffer = the buffer * containing the data to send. * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes written (which may be less than @size), or -1 * on error * * Since: 2.22 * * Throws: GException on failure. */ public ptrdiff_t sendTo(SocketAddress address, string buffer, Cancellable cancellable) { GError* err = null; auto p = g_socket_send_to(gSocket, (address is null) ? null : address.getSocketAddressStruct(), Str.toStringz(buffer), cast(size_t)buffer.length, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This behaves exactly the same as g_socket_send(), except that * the choice of blocking or non-blocking behavior is determined by * the @blocking argument rather than by @socket's properties. * * Params: * buffer = the buffer * containing the data to send. * blocking = whether to do blocking or non-blocking I/O * cancellable = a %GCancellable or %NULL * * Returns: Number of bytes written (which may be less than @size), or -1 * on error * * Since: 2.26 * * Throws: GException on failure. */ public ptrdiff_t sendWithBlocking(string buffer, bool blocking, Cancellable cancellable) { GError* err = null; auto p = g_socket_send_with_blocking(gSocket, Str.toStringz(buffer), cast(size_t)buffer.length, blocking, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the blocking mode of the socket. In blocking mode * all operations (which don’t take an explicit blocking parameter) block until * they succeed or there is an error. In * non-blocking mode all functions return results immediately or * with a %G_IO_ERROR_WOULD_BLOCK error. * * All sockets are created in blocking mode. However, note that the * platform level socket is always non-blocking, and blocking mode * is a GSocket level feature. * * Params: * blocking = Whether to use blocking I/O or not. * * Since: 2.22 */ public void setBlocking(bool blocking) { g_socket_set_blocking(gSocket, blocking); } /** * Sets whether @socket should allow sending to broadcast addresses. * This is %FALSE by default. * * Params: * broadcast = whether @socket should allow sending to broadcast * addresses * * Since: 2.32 */ public void setBroadcast(bool broadcast) { g_socket_set_broadcast(gSocket, broadcast); } /** * Sets or unsets the %SO_KEEPALIVE flag on the underlying socket. When * this flag is set on a socket, the system will attempt to verify that the * remote socket endpoint is still present if a sufficiently long period of * time passes with no data being exchanged. If the system is unable to * verify the presence of the remote endpoint, it will automatically close * the connection. * * This option is only functional on certain kinds of sockets. (Notably, * %G_SOCKET_PROTOCOL_TCP sockets.) * * The exact time between pings is system- and protocol-dependent, but will * normally be at least two hours. Most commonly, you would set this flag * on a server socket if you want to allow clients to remain idle for long * periods of time, but also want to ensure that connections are eventually * garbage-collected if clients crash or become unreachable. * * Params: * keepalive = Value for the keepalive flag * * Since: 2.22 */ public void setKeepalive(bool keepalive) { g_socket_set_keepalive(gSocket, keepalive); } /** * Sets the maximum number of outstanding connections allowed * when listening on this socket. If more clients than this are * connecting to the socket and the application is not handling them * on time then the new connections will be refused. * * Note that this must be called before g_socket_listen() and has no * effect if called after that. * * Params: * backlog = the maximum number of pending connections. * * Since: 2.22 */ public void setListenBacklog(int backlog) { g_socket_set_listen_backlog(gSocket, backlog); } /** * Sets whether outgoing multicast packets will be received by sockets * listening on that multicast address on the same host. This is %TRUE * by default. * * Params: * loopback = whether @socket should receive messages sent to its * multicast groups from the local host * * Since: 2.32 */ public void setMulticastLoopback(bool loopback) { g_socket_set_multicast_loopback(gSocket, loopback); } /** * Sets the time-to-live for outgoing multicast datagrams on @socket. * By default, this is 1, meaning that multicast packets will not leave * the local network. * * Params: * ttl = the time-to-live value for all multicast datagrams on @socket * * Since: 2.32 */ public void setMulticastTtl(uint ttl) { g_socket_set_multicast_ttl(gSocket, ttl); } /** * Sets the value of an integer-valued option on @socket, as with * setsockopt(). (If you need to set a non-integer-valued option, * you will need to call setsockopt() directly.) * * The [][gio-gnetworking.h] * header pulls in system headers that will define most of the * standard/portable socket options. For unusual socket protocols or * platform-dependent options, you may need to include additional * headers. * * Params: * level = the "API level" of the option (eg, `SOL_SOCKET`) * optname = the "name" of the option (eg, `SO_BROADCAST`) * value = the value to set the option to * * Returns: success or failure. On failure, @error will be set, and * the system error value (`errno` or WSAGetLastError()) will still * be set to the result of the setsockopt() call. * * Since: 2.36 * * Throws: GException on failure. */ public bool setOption(int level, int optname, int value) { GError* err = null; auto p = g_socket_set_option(gSocket, level, optname, value, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the time in seconds after which I/O operations on @socket will * time out if they have not yet completed. * * On a blocking socket, this means that any blocking #GSocket * operation will time out after @timeout seconds of inactivity, * returning %G_IO_ERROR_TIMED_OUT. * * On a non-blocking socket, calls to g_socket_condition_wait() will * also fail with %G_IO_ERROR_TIMED_OUT after the given time. Sources * created with g_socket_create_source() will trigger after * @timeout seconds of inactivity, with the requested condition * set, at which point calling g_socket_receive(), g_socket_send(), * g_socket_check_connect_result(), etc, will fail with * %G_IO_ERROR_TIMED_OUT. * * If @timeout is 0 (the default), operations will never time out * on their own. * * Note that if an I/O operation is interrupted by a signal, this may * cause the timeout to be reset. * * Params: * timeout = the timeout for @socket, in seconds, or 0 for none * * Since: 2.26 */ public void setTimeout(uint timeout) { g_socket_set_timeout(gSocket, timeout); } /** * Sets the time-to-live for outgoing unicast packets on @socket. * By default the platform-specific default value is used. * * Params: * ttl = the time-to-live value for all unicast packets on @socket * * Since: 2.32 */ public void setTtl(uint ttl) { g_socket_set_ttl(gSocket, ttl); } /** * Shut down part or all of a full-duplex connection. * * If @shutdown_read is %TRUE then the receiving side of the connection * is shut down, and further reading is disallowed. * * If @shutdown_write is %TRUE then the sending side of the connection * is shut down, and further writing is disallowed. * * It is allowed for both @shutdown_read and @shutdown_write to be %TRUE. * * One example where it is useful to shut down only one side of a connection is * graceful disconnect for TCP connections where you close the sending side, * then wait for the other side to close the connection, thus ensuring that the * other side saw all sent data. * * Params: * shutdownRead = whether to shut down the read side * shutdownWrite = whether to shut down the write side * * Returns: %TRUE on success, %FALSE on error * * Since: 2.22 * * Throws: GException on failure. */ public bool shutdown(bool shutdownRead, bool shutdownWrite) { GError* err = null; auto p = g_socket_shutdown(gSocket, shutdownRead, shutdownWrite, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks if a socket is capable of speaking IPv4. * * IPv4 sockets are capable of speaking IPv4. On some operating systems * and under some combinations of circumstances IPv6 sockets are also * capable of speaking IPv4. See RFC 3493 section 3.7 for more * information. * * No other types of sockets are currently considered as being capable * of speaking IPv4. * * Returns: %TRUE if this socket can be used with IPv4. * * Since: 2.22 */ public bool speaksIpv4() { return g_socket_speaks_ipv4(gSocket) != 0; } } GtkD-3.7.5/generated/gtkd/gio/SocketAddress.d000066400000000000000000000111071324604450400207310ustar00rootroot00000000000000/* * 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 gio.SocketAddress; private import gio.SocketConnectableIF; private import gio.SocketConnectableT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GSocketAddress is the equivalent of struct sockaddr in the BSD * sockets API. This is an abstract class; use #GInetSocketAddress * for internet sockets, or #GUnixSocketAddress for UNIX domain sockets. */ public class SocketAddress : ObjectG, SocketConnectableIF { /** the main Gtk struct */ protected GSocketAddress* gSocketAddress; /** Get the main Gtk struct */ public GSocketAddress* getSocketAddressStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSocketAddress; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSocketAddress; } protected override void setStruct(GObject* obj) { gSocketAddress = cast(GSocketAddress*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSocketAddress* gSocketAddress, bool ownedRef = false) { this.gSocketAddress = gSocketAddress; super(cast(GObject*)gSocketAddress, ownedRef); } // add the SocketConnectable capabilities mixin SocketConnectableT!(GSocketAddress); /** */ public static GType getType() { return g_socket_address_get_type(); } /** * Creates a #GSocketAddress subclass corresponding to the native * struct sockaddr @native. * * Params: * native = a pointer to a struct sockaddr * len = the size of the memory location pointed to by @native * * Returns: a new #GSocketAddress if @native could successfully * be converted, otherwise %NULL * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(void* native, size_t len) { auto p = g_socket_address_new_from_native(native, len); if(p is null) { throw new ConstructionException("null returned by new_from_native"); } this(cast(GSocketAddress*) p, true); } /** * Gets the socket family type of @address. * * Returns: the socket family type of @address * * Since: 2.22 */ public GSocketFamily getFamily() { return g_socket_address_get_family(gSocketAddress); } /** * Gets the size of @address's native struct sockaddr. * You can use this to allocate memory to pass to * g_socket_address_to_native(). * * Returns: the size of the native struct sockaddr that * @address represents * * Since: 2.22 */ public ptrdiff_t getNativeSize() { return g_socket_address_get_native_size(gSocketAddress); } /** * Converts a #GSocketAddress to a native struct sockaddr, which can * be passed to low-level functions like connect() or bind(). * * If not enough space is available, a %G_IO_ERROR_NO_SPACE error * is returned. If the address type is not known on the system * then a %G_IO_ERROR_NOT_SUPPORTED error is returned. * * Params: * dest = a pointer to a memory location that will contain the native * struct sockaddr * destlen = the size of @dest. Must be at least as large as * g_socket_address_get_native_size() * * Returns: %TRUE if @dest was filled in, %FALSE on error * * Since: 2.22 * * Throws: GException on failure. */ public bool toNative(void* dest, size_t destlen) { GError* err = null; auto p = g_socket_address_to_native(gSocketAddress, dest, destlen, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/SocketAddressEnumerator.d000066400000000000000000000123471324604450400230020ustar00rootroot00000000000000/* * 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 gio.SocketAddressEnumerator; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.SocketAddress; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * Enumerator type for objects that contain or generate * #GSocketAddresses. */ public class SocketAddressEnumerator : ObjectG { /** the main Gtk struct */ protected GSocketAddressEnumerator* gSocketAddressEnumerator; /** Get the main Gtk struct */ public GSocketAddressEnumerator* getSocketAddressEnumeratorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSocketAddressEnumerator; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSocketAddressEnumerator; } protected override void setStruct(GObject* obj) { gSocketAddressEnumerator = cast(GSocketAddressEnumerator*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSocketAddressEnumerator* gSocketAddressEnumerator, bool ownedRef = false) { this.gSocketAddressEnumerator = gSocketAddressEnumerator; super(cast(GObject*)gSocketAddressEnumerator, ownedRef); } /** */ public static GType getType() { return g_socket_address_enumerator_get_type(); } /** * Retrieves the next #GSocketAddress from @enumerator. Note that this * may block for some amount of time. (Eg, a #GNetworkAddress may need * to do a DNS lookup before it can return an address.) Use * g_socket_address_enumerator_next_async() if you need to avoid * blocking. * * If @enumerator is expected to yield addresses, but for some reason * is unable to (eg, because of a DNS error), then the first call to * g_socket_address_enumerator_next() will return an appropriate error * in *@error. However, if the first call to * g_socket_address_enumerator_next() succeeds, then any further * internal errors (other than @cancellable being triggered) will be * ignored. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a #GSocketAddress (owned by the caller), or %NULL on * error (in which case *@error will be set) or if there are no * more addresses. * * Throws: GException on failure. */ public SocketAddress next(Cancellable cancellable) { GError* err = null; auto p = g_socket_address_enumerator_next(gSocketAddressEnumerator, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketAddress)(cast(GSocketAddress*) p, true); } /** * Asynchronously retrieves the next #GSocketAddress from @enumerator * and then calls @callback, which must call * g_socket_address_enumerator_next_finish() to get the result. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the request * is satisfied * userData = the data to pass to callback function */ public void nextAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_socket_address_enumerator_next_async(gSocketAddressEnumerator, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Retrieves the result of a completed call to * g_socket_address_enumerator_next_async(). See * g_socket_address_enumerator_next() for more information about * error handling. * * Params: * result = a #GAsyncResult * * Returns: a #GSocketAddress (owned by the caller), or %NULL on * error (in which case *@error will be set) or if there are no * more addresses. * * Throws: GException on failure. */ public SocketAddress nextFinish(AsyncResultIF result) { GError* err = null; auto p = g_socket_address_enumerator_next_finish(gSocketAddressEnumerator, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketAddress)(cast(GSocketAddress*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/SocketClient.d000066400000000000000000000730731324604450400205740ustar00rootroot00000000000000/* * 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 gio.SocketClient; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.IOStream; private import gio.ProxyResolverIF; private import gio.SocketAddress; private import gio.SocketConnectableIF; private import gio.SocketConnection; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GSocketClient is a lightweight high-level utility class for connecting to * a network host using a connection oriented socket type. * * You create a #GSocketClient object, set any options you want, and then * call a sync or async connect operation, which returns a #GSocketConnection * subclass on success. * * The type of the #GSocketConnection object returned depends on the type of * the underlying socket that is in use. For instance, for a TCP/IP connection * it will be a #GTcpConnection. * * As #GSocketClient is a lightweight object, you don't need to cache it. You * can just create a new one any time you need one. * * Since: 2.22 */ public class SocketClient : ObjectG { /** the main Gtk struct */ protected GSocketClient* gSocketClient; /** Get the main Gtk struct */ public GSocketClient* getSocketClientStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSocketClient; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSocketClient; } protected override void setStruct(GObject* obj) { gSocketClient = cast(GSocketClient*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSocketClient* gSocketClient, bool ownedRef = false) { this.gSocketClient = gSocketClient; super(cast(GObject*)gSocketClient, ownedRef); } /** */ public static GType getType() { return g_socket_client_get_type(); } /** * Creates a new #GSocketClient with the default options. * * Returns: a #GSocketClient. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_socket_client_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSocketClient*) p, true); } /** * Enable proxy protocols to be handled by the application. When the * indicated proxy protocol is returned by the #GProxyResolver, * #GSocketClient will consider this protocol as supported but will * not try to find a #GProxy instance to handle handshaking. The * application must check for this case by calling * g_socket_connection_get_remote_address() on the returned * #GSocketConnection, and seeing if it's a #GProxyAddress of the * appropriate type, to determine whether or not it needs to handle * the proxy handshaking itself. * * This should be used for proxy protocols that are dialects of * another protocol such as HTTP proxy. It also allows cohabitation of * proxy protocols that are reused between protocols. A good example * is HTTP. It can be used to proxy HTTP, FTP and Gopher and can also * be use as generic socket proxy through the HTTP CONNECT method. * * When the proxy is detected as being an application proxy, TLS handshake * will be skipped. This is required to let the application do the proxy * specific handshake. * * Params: * protocol = The proxy protocol */ public void addApplicationProxy(string protocol) { g_socket_client_add_application_proxy(gSocketClient, Str.toStringz(protocol)); } /** * Tries to resolve the @connectable and make a network connection to it. * * Upon a successful connection, a new #GSocketConnection is constructed * and returned. The caller owns this new object and must drop their * reference to it when finished with it. * * The type of the #GSocketConnection object returned depends on the type of * the underlying socket that is used. For instance, for a TCP/IP connection * it will be a #GTcpConnection. * * The socket created will be the same family as the address that the * @connectable resolves to, unless family is set with g_socket_client_set_family() * or indirectly via g_socket_client_set_local_address(). The socket type * defaults to %G_SOCKET_TYPE_STREAM but can be set with * g_socket_client_set_socket_type(). * * If a local address is specified with g_socket_client_set_local_address() the * socket will be bound to this address before connecting. * * Params: * connectable = a #GSocketConnectable specifying the remote address. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a #GSocketConnection on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public SocketConnection connect(SocketConnectableIF connectable, Cancellable cancellable) { GError* err = null; auto p = g_socket_client_connect(gSocketClient, (connectable is null) ? null : connectable.getSocketConnectableStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * This is the asynchronous version of g_socket_client_connect(). * * When the operation is finished @callback will be * called. You can then call g_socket_client_connect_finish() to get * the result of the operation. * * Params: * connectable = a #GSocketConnectable specifying the remote address. * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback * userData = user data for the callback * * Since: 2.22 */ public void connectAsync(SocketConnectableIF connectable, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_socket_client_connect_async(gSocketClient, (connectable is null) ? null : connectable.getSocketConnectableStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an async connect operation. See g_socket_client_connect_async() * * Params: * result = a #GAsyncResult. * * Returns: a #GSocketConnection on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public SocketConnection connectFinish(AsyncResultIF result) { GError* err = null; auto p = g_socket_client_connect_finish(gSocketClient, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * This is a helper function for g_socket_client_connect(). * * Attempts to create a TCP connection to the named host. * * @host_and_port may be in any of a number of recognized formats; an IPv6 * address, an IPv4 address, or a domain name (in which case a DNS * lookup is performed). Quoting with [] is supported for all address * types. A port override may be specified in the usual way with a * colon. Ports may be given as decimal numbers or symbolic names (in * which case an /etc/services lookup is performed). * * If no port override is given in @host_and_port then @default_port will be * used as the port number to connect to. * * In general, @host_and_port is expected to be provided by the user (allowing * them to give the hostname, and a port override if necessary) and * @default_port is expected to be provided by the application. * * In the case that an IP address is given, a single connection * attempt is made. In the case that a name is given, multiple * connection attempts may be made, in turn and according to the * number of address records in DNS, until a connection succeeds. * * Upon a successful connection, a new #GSocketConnection is constructed * and returned. The caller owns this new object and must drop their * reference to it when finished with it. * * In the event of any failure (DNS error, service not found, no hosts * connectable) %NULL is returned and @error (if non-%NULL) is set * accordingly. * * Params: * hostAndPort = the name and optionally port of the host to connect to * defaultPort = the default port to connect to * cancellable = a #GCancellable, or %NULL * * Returns: a #GSocketConnection on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public SocketConnection connectToHost(string hostAndPort, ushort defaultPort, Cancellable cancellable) { GError* err = null; auto p = g_socket_client_connect_to_host(gSocketClient, Str.toStringz(hostAndPort), defaultPort, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * This is the asynchronous version of g_socket_client_connect_to_host(). * * When the operation is finished @callback will be * called. You can then call g_socket_client_connect_to_host_finish() to get * the result of the operation. * * Params: * hostAndPort = the name and optionally the port of the host to connect to * defaultPort = the default port to connect to * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback * userData = user data for the callback * * Since: 2.22 */ public void connectToHostAsync(string hostAndPort, ushort defaultPort, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_socket_client_connect_to_host_async(gSocketClient, Str.toStringz(hostAndPort), defaultPort, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an async connect operation. See g_socket_client_connect_to_host_async() * * Params: * result = a #GAsyncResult. * * Returns: a #GSocketConnection on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public SocketConnection connectToHostFinish(AsyncResultIF result) { GError* err = null; auto p = g_socket_client_connect_to_host_finish(gSocketClient, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * Attempts to create a TCP connection to a service. * * This call looks up the SRV record for @service at @domain for the * "tcp" protocol. It then attempts to connect, in turn, to each of * the hosts providing the service until either a connection succeeds * or there are no hosts remaining. * * Upon a successful connection, a new #GSocketConnection is constructed * and returned. The caller owns this new object and must drop their * reference to it when finished with it. * * In the event of any failure (DNS error, service not found, no hosts * connectable) %NULL is returned and @error (if non-%NULL) is set * accordingly. * * Params: * domain = a domain name * service = the name of the service to connect to * cancellable = a #GCancellable, or %NULL * * Returns: a #GSocketConnection if successful, or %NULL on error * * Throws: GException on failure. */ public SocketConnection connectToService(string domain, string service, Cancellable cancellable) { GError* err = null; auto p = g_socket_client_connect_to_service(gSocketClient, Str.toStringz(domain), Str.toStringz(service), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * This is the asynchronous version of * g_socket_client_connect_to_service(). * * Params: * domain = a domain name * service = the name of the service to connect to * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback * userData = user data for the callback * * Since: 2.22 */ public void connectToServiceAsync(string domain, string service, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_socket_client_connect_to_service_async(gSocketClient, Str.toStringz(domain), Str.toStringz(service), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an async connect operation. See g_socket_client_connect_to_service_async() * * Params: * result = a #GAsyncResult. * * Returns: a #GSocketConnection on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public SocketConnection connectToServiceFinish(AsyncResultIF result) { GError* err = null; auto p = g_socket_client_connect_to_service_finish(gSocketClient, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * This is a helper function for g_socket_client_connect(). * * Attempts to create a TCP connection with a network URI. * * @uri may be any valid URI containing an "authority" (hostname/port) * component. If a port is not specified in the URI, @default_port * will be used. TLS will be negotiated if #GSocketClient:tls is %TRUE. * (#GSocketClient does not know to automatically assume TLS for * certain URI schemes.) * * Using this rather than g_socket_client_connect() or * g_socket_client_connect_to_host() allows #GSocketClient to * determine when to use application-specific proxy protocols. * * Upon a successful connection, a new #GSocketConnection is constructed * and returned. The caller owns this new object and must drop their * reference to it when finished with it. * * In the event of any failure (DNS error, service not found, no hosts * connectable) %NULL is returned and @error (if non-%NULL) is set * accordingly. * * Params: * uri = A network URI * defaultPort = the default port to connect to * cancellable = a #GCancellable, or %NULL * * Returns: a #GSocketConnection on success, %NULL on error. * * Since: 2.26 * * Throws: GException on failure. */ public SocketConnection connectToUri(string uri, ushort defaultPort, Cancellable cancellable) { GError* err = null; auto p = g_socket_client_connect_to_uri(gSocketClient, Str.toStringz(uri), defaultPort, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * This is the asynchronous version of g_socket_client_connect_to_uri(). * * When the operation is finished @callback will be * called. You can then call g_socket_client_connect_to_uri_finish() to get * the result of the operation. * * Params: * uri = a network uri * defaultPort = the default port to connect to * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback * userData = user data for the callback * * Since: 2.26 */ public void connectToUriAsync(string uri, ushort defaultPort, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_socket_client_connect_to_uri_async(gSocketClient, Str.toStringz(uri), defaultPort, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an async connect operation. See g_socket_client_connect_to_uri_async() * * Params: * result = a #GAsyncResult. * * Returns: a #GSocketConnection on success, %NULL on error. * * Since: 2.26 * * Throws: GException on failure. */ public SocketConnection connectToUriFinish(AsyncResultIF result) { GError* err = null; auto p = g_socket_client_connect_to_uri_finish(gSocketClient, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * Gets the proxy enable state; see g_socket_client_set_enable_proxy() * * Returns: whether proxying is enabled * * Since: 2.26 */ public bool getEnableProxy() { return g_socket_client_get_enable_proxy(gSocketClient) != 0; } /** * Gets the socket family of the socket client. * * See g_socket_client_set_family() for details. * * Returns: a #GSocketFamily * * Since: 2.22 */ public GSocketFamily getFamily() { return g_socket_client_get_family(gSocketClient); } /** * Gets the local address of the socket client. * * See g_socket_client_set_local_address() for details. * * Returns: a #GSocketAddress or %NULL. Do not free. * * Since: 2.22 */ public SocketAddress getLocalAddress() { auto p = g_socket_client_get_local_address(gSocketClient); if(p is null) { return null; } return ObjectG.getDObject!(SocketAddress)(cast(GSocketAddress*) p); } /** * Gets the protocol name type of the socket client. * * See g_socket_client_set_protocol() for details. * * Returns: a #GSocketProtocol * * Since: 2.22 */ public GSocketProtocol getProtocol() { return g_socket_client_get_protocol(gSocketClient); } /** * Gets the #GProxyResolver being used by @client. Normally, this will * be the resolver returned by g_proxy_resolver_get_default(), but you * can override it with g_socket_client_set_proxy_resolver(). * * Returns: The #GProxyResolver being used by * @client. * * Since: 2.36 */ public ProxyResolverIF getProxyResolver() { auto p = g_socket_client_get_proxy_resolver(gSocketClient); if(p is null) { return null; } return ObjectG.getDObject!(ProxyResolverIF)(cast(GProxyResolver*) p); } /** * Gets the socket type of the socket client. * * See g_socket_client_set_socket_type() for details. * * Returns: a #GSocketFamily * * Since: 2.22 */ public GSocketType getSocketType() { return g_socket_client_get_socket_type(gSocketClient); } /** * Gets the I/O timeout time for sockets created by @client. * * See g_socket_client_set_timeout() for details. * * Returns: the timeout in seconds * * Since: 2.26 */ public uint getTimeout() { return g_socket_client_get_timeout(gSocketClient); } /** * Gets whether @client creates TLS connections. See * g_socket_client_set_tls() for details. * * Returns: whether @client uses TLS * * Since: 2.28 */ public bool getTls() { return g_socket_client_get_tls(gSocketClient) != 0; } /** * Gets the TLS validation flags used creating TLS connections via * @client. * * Returns: the TLS validation flags * * Since: 2.28 */ public GTlsCertificateFlags getTlsValidationFlags() { return g_socket_client_get_tls_validation_flags(gSocketClient); } /** * Sets whether or not @client attempts to make connections via a * proxy server. When enabled (the default), #GSocketClient will use a * #GProxyResolver to determine if a proxy protocol such as SOCKS is * needed, and automatically do the necessary proxy negotiation. * * See also g_socket_client_set_proxy_resolver(). * * Params: * enable = whether to enable proxies * * Since: 2.26 */ public void setEnableProxy(bool enable) { g_socket_client_set_enable_proxy(gSocketClient, enable); } /** * Sets the socket family of the socket client. * If this is set to something other than %G_SOCKET_FAMILY_INVALID * then the sockets created by this object will be of the specified * family. * * This might be useful for instance if you want to force the local * connection to be an ipv4 socket, even though the address might * be an ipv6 mapped to ipv4 address. * * Params: * family = a #GSocketFamily * * Since: 2.22 */ public void setFamily(GSocketFamily family) { g_socket_client_set_family(gSocketClient, family); } /** * Sets the local address of the socket client. * The sockets created by this object will bound to the * specified address (if not %NULL) before connecting. * * This is useful if you want to ensure that the local * side of the connection is on a specific port, or on * a specific interface. * * Params: * address = a #GSocketAddress, or %NULL * * Since: 2.22 */ public void setLocalAddress(SocketAddress address) { g_socket_client_set_local_address(gSocketClient, (address is null) ? null : address.getSocketAddressStruct()); } /** * Sets the protocol of the socket client. * The sockets created by this object will use of the specified * protocol. * * If @protocol is %0 that means to use the default * protocol for the socket family and type. * * Params: * protocol = a #GSocketProtocol * * Since: 2.22 */ public void setProtocol(GSocketProtocol protocol) { g_socket_client_set_protocol(gSocketClient, protocol); } /** * Overrides the #GProxyResolver used by @client. You can call this if * you want to use specific proxies, rather than using the system * default proxy settings. * * Note that whether or not the proxy resolver is actually used * depends on the setting of #GSocketClient:enable-proxy, which is not * changed by this function (but which is %TRUE by default) * * Params: * proxyResolver = a #GProxyResolver, or %NULL for the * default. * * Since: 2.36 */ public void setProxyResolver(ProxyResolverIF proxyResolver) { g_socket_client_set_proxy_resolver(gSocketClient, (proxyResolver is null) ? null : proxyResolver.getProxyResolverStruct()); } /** * Sets the socket type of the socket client. * The sockets created by this object will be of the specified * type. * * It doesn't make sense to specify a type of %G_SOCKET_TYPE_DATAGRAM, * as GSocketClient is used for connection oriented services. * * Params: * type = a #GSocketType * * Since: 2.22 */ public void setSocketType(GSocketType type) { g_socket_client_set_socket_type(gSocketClient, type); } /** * Sets the I/O timeout for sockets created by @client. @timeout is a * time in seconds, or 0 for no timeout (the default). * * The timeout value affects the initial connection attempt as well, * so setting this may cause calls to g_socket_client_connect(), etc, * to fail with %G_IO_ERROR_TIMED_OUT. * * Params: * timeout = the timeout * * Since: 2.26 */ public void setTimeout(uint timeout) { g_socket_client_set_timeout(gSocketClient, timeout); } /** * Sets whether @client creates TLS (aka SSL) connections. If @tls is * %TRUE, @client will wrap its connections in a #GTlsClientConnection * and perform a TLS handshake when connecting. * * Note that since #GSocketClient must return a #GSocketConnection, * but #GTlsClientConnection is not a #GSocketConnection, this * actually wraps the resulting #GTlsClientConnection in a * #GTcpWrapperConnection when returning it. You can use * g_tcp_wrapper_connection_get_base_io_stream() on the return value * to extract the #GTlsClientConnection. * * If you need to modify the behavior of the TLS handshake (eg, by * setting a client-side certificate to use, or connecting to the * #GTlsConnection::accept-certificate signal), you can connect to * @client's #GSocketClient::event signal and wait for it to be * emitted with %G_SOCKET_CLIENT_TLS_HANDSHAKING, which will give you * a chance to see the #GTlsClientConnection before the handshake * starts. * * Params: * tls = whether to use TLS * * Since: 2.28 */ public void setTls(bool tls) { g_socket_client_set_tls(gSocketClient, tls); } /** * Sets the TLS validation flags used when creating TLS connections * via @client. The default value is %G_TLS_CERTIFICATE_VALIDATE_ALL. * * Params: * flags = the validation flags * * Since: 2.28 */ public void setTlsValidationFlags(GTlsCertificateFlags flags) { g_socket_client_set_tls_validation_flags(gSocketClient, flags); } protected class OnEventDelegateWrapper { void delegate(GSocketClientEvent, SocketConnectableIF, IOStream, SocketClient) dlg; gulong handlerId; this(void delegate(GSocketClientEvent, SocketConnectableIF, IOStream, SocketClient) dlg) { this.dlg = dlg; onEventListeners ~= this; } void remove(OnEventDelegateWrapper source) { foreach(index, wrapper; onEventListeners) { if (wrapper.handlerId == source.handlerId) { onEventListeners[index] = null; onEventListeners = std.algorithm.remove(onEventListeners, index); break; } } } } OnEventDelegateWrapper[] onEventListeners; /** * Emitted when @client's activity on @connectable changes state. * Among other things, this can be used to provide progress * information about a network connection in the UI. The meanings of * the different @event values are as follows: * * - %G_SOCKET_CLIENT_RESOLVING: @client is about to look up @connectable * in DNS. @connection will be %NULL. * * - %G_SOCKET_CLIENT_RESOLVED: @client has successfully resolved * @connectable in DNS. @connection will be %NULL. * * - %G_SOCKET_CLIENT_CONNECTING: @client is about to make a connection * to a remote host; either a proxy server or the destination server * itself. @connection is the #GSocketConnection, which is not yet * connected. Since GLib 2.40, you can access the remote * address via g_socket_connection_get_remote_address(). * * - %G_SOCKET_CLIENT_CONNECTED: @client has successfully connected * to a remote host. @connection is the connected #GSocketConnection. * * - %G_SOCKET_CLIENT_PROXY_NEGOTIATING: @client is about to negotiate * with a proxy to get it to connect to @connectable. @connection is * the #GSocketConnection to the proxy server. * * - %G_SOCKET_CLIENT_PROXY_NEGOTIATED: @client has negotiated a * connection to @connectable through a proxy server. @connection is * the stream returned from g_proxy_connect(), which may or may not * be a #GSocketConnection. * * - %G_SOCKET_CLIENT_TLS_HANDSHAKING: @client is about to begin a TLS * handshake. @connection is a #GTlsClientConnection. * * - %G_SOCKET_CLIENT_TLS_HANDSHAKED: @client has successfully completed * the TLS handshake. @connection is a #GTlsClientConnection. * * - %G_SOCKET_CLIENT_COMPLETE: @client has either successfully connected * to @connectable (in which case @connection is the #GSocketConnection * that it will be returning to the caller) or has failed (in which * case @connection is %NULL and the client is about to return an error). * * Each event except %G_SOCKET_CLIENT_COMPLETE may be emitted * multiple times (or not at all) for a given connectable (in * particular, if @client ends up attempting to connect to more than * one address). However, if @client emits the #GSocketClient::event * signal at all for a given connectable, that it will always emit * it with %G_SOCKET_CLIENT_COMPLETE when it is done. * * Note that there may be additional #GSocketClientEvent values in * the future; unrecognized @event values should be ignored. * * Params: * event = the event that is occurring * connectable = the #GSocketConnectable that @event is occurring on * connection = the current representation of the connection * * Since: 2.32 */ gulong addOnEvent(void delegate(GSocketClientEvent, SocketConnectableIF, IOStream, SocketClient) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnEventDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "event", cast(GCallback)&callBackEvent, cast(void*)wrapper, cast(GClosureNotify)&callBackEventDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackEvent(GSocketClient* socketclientStruct, GSocketClientEvent event, GSocketConnectable* connectable, GIOStream* connection, OnEventDelegateWrapper wrapper) { wrapper.dlg(event, ObjectG.getDObject!(SocketConnectableIF)(connectable), ObjectG.getDObject!(IOStream)(connection), wrapper.outer); } extern(C) static void callBackEventDestroy(OnEventDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/SocketConnectableIF.d000066400000000000000000000103031324604450400217750ustar00rootroot00000000000000/* * 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 gio.SocketConnectableIF; private import gio.SocketAddressEnumerator; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Objects that describe one or more potential socket endpoints * implement #GSocketConnectable. Callers can then use * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator * to try out each socket address in turn until one succeeds, as shown * in the sample code below. * * |[ * MyConnectionType * * connect_to_host (const char *hostname, * guint16 port, * GCancellable *cancellable, * GError **error) * { * MyConnection *conn = NULL; * GSocketConnectable *addr; * GSocketAddressEnumerator *enumerator; * GSocketAddress *sockaddr; * GError *conn_error = NULL; * * addr = g_network_address_new (hostname, port); * enumerator = g_socket_connectable_enumerate (addr); * g_object_unref (addr); * * // Try each sockaddr until we succeed. Record the first connection error, * // but not any further ones (since they'll probably be basically the same * // as the first). * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error)) * { * conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &conn_error); * g_object_unref (sockaddr); * } * g_object_unref (enumerator); * * if (conn) * { * if (conn_error) * { * // We couldn't connect to the first address, but we succeeded * // in connecting to a later address. * g_error_free (conn_error); * } * return conn; * } * else if (error) * { * /// Either initial lookup failed, or else the caller cancelled us. * if (conn_error) * g_error_free (conn_error); * return NULL; * } * else * { * g_error_propagate (error, conn_error); * return NULL; * } * } * ]| */ public interface SocketConnectableIF{ /** Get the main Gtk struct */ public GSocketConnectable* getSocketConnectableStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_socket_connectable_get_type(); } /** * Creates a #GSocketAddressEnumerator for @connectable. * * Returns: a new #GSocketAddressEnumerator. * * Since: 2.22 */ public SocketAddressEnumerator enumerate(); /** * Creates a #GSocketAddressEnumerator for @connectable that will * return #GProxyAddresses for addresses that you must connect * to via a proxy. * * If @connectable does not implement * g_socket_connectable_proxy_enumerate(), this will fall back to * calling g_socket_connectable_enumerate(). * * Returns: a new #GSocketAddressEnumerator. * * Since: 2.26 */ public SocketAddressEnumerator proxyEnumerate(); /** * Format a #GSocketConnectable as a string. This is a human-readable format for * use in debugging output, and is not a stable serialization format. It is not * suitable for use in user interfaces as it exposes too much information for a * user. * * If the #GSocketConnectable implementation does not support string formatting, * the implementation’s type name will be returned as a fallback. * * Returns: the formatted string * * Since: 2.48 */ public string toString(); } GtkD-3.7.5/generated/gtkd/gio/SocketConnectableT.d000066400000000000000000000113461324604450400217120ustar00rootroot00000000000000/* * 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 gio.SocketConnectableT; public import gio.SocketAddressEnumerator; public import gio.c.functions; public import gio.c.types; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * Objects that describe one or more potential socket endpoints * implement #GSocketConnectable. Callers can then use * g_socket_connectable_enumerate() to get a #GSocketAddressEnumerator * to try out each socket address in turn until one succeeds, as shown * in the sample code below. * * |[ * MyConnectionType * * connect_to_host (const char *hostname, * guint16 port, * GCancellable *cancellable, * GError **error) * { * MyConnection *conn = NULL; * GSocketConnectable *addr; * GSocketAddressEnumerator *enumerator; * GSocketAddress *sockaddr; * GError *conn_error = NULL; * * addr = g_network_address_new (hostname, port); * enumerator = g_socket_connectable_enumerate (addr); * g_object_unref (addr); * * // Try each sockaddr until we succeed. Record the first connection error, * // but not any further ones (since they'll probably be basically the same * // as the first). * while (!conn && (sockaddr = g_socket_address_enumerator_next (enumerator, cancellable, error)) * { * conn = connect_to_sockaddr (sockaddr, conn_error ? NULL : &conn_error); * g_object_unref (sockaddr); * } * g_object_unref (enumerator); * * if (conn) * { * if (conn_error) * { * // We couldn't connect to the first address, but we succeeded * // in connecting to a later address. * g_error_free (conn_error); * } * return conn; * } * else if (error) * { * /// Either initial lookup failed, or else the caller cancelled us. * if (conn_error) * g_error_free (conn_error); * return NULL; * } * else * { * g_error_propagate (error, conn_error); * return NULL; * } * } * ]| */ public template SocketConnectableT(TStruct) { /** Get the main Gtk struct */ public GSocketConnectable* getSocketConnectableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GSocketConnectable*)getStruct(); } /** * Creates a #GSocketAddressEnumerator for @connectable. * * Returns: a new #GSocketAddressEnumerator. * * Since: 2.22 */ public SocketAddressEnumerator enumerate() { auto p = g_socket_connectable_enumerate(getSocketConnectableStruct()); if(p is null) { return null; } return ObjectG.getDObject!(SocketAddressEnumerator)(cast(GSocketAddressEnumerator*) p, true); } /** * Creates a #GSocketAddressEnumerator for @connectable that will * return #GProxyAddresses for addresses that you must connect * to via a proxy. * * If @connectable does not implement * g_socket_connectable_proxy_enumerate(), this will fall back to * calling g_socket_connectable_enumerate(). * * Returns: a new #GSocketAddressEnumerator. * * Since: 2.26 */ public SocketAddressEnumerator proxyEnumerate() { auto p = g_socket_connectable_proxy_enumerate(getSocketConnectableStruct()); if(p is null) { return null; } return ObjectG.getDObject!(SocketAddressEnumerator)(cast(GSocketAddressEnumerator*) p, true); } /** * Format a #GSocketConnectable as a string. This is a human-readable format for * use in debugging output, and is not a stable serialization format. It is not * suitable for use in user interfaces as it exposes too much information for a * user. * * If the #GSocketConnectable implementation does not support string formatting, * the implementation’s type name will be returned as a fallback. * * Returns: the formatted string * * Since: 2.48 */ public override string toString() { auto retStr = g_socket_connectable_to_string(getSocketConnectableStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/gio/SocketConnection.d000066400000000000000000000207021324604450400214440ustar00rootroot00000000000000/* * 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 gio.SocketConnection; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.IOStream; private import gio.Socket; private import gio.SocketAddress; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GSocketConnection is a #GIOStream for a connected socket. They * can be created either by #GSocketClient when connecting to a host, * or by #GSocketListener when accepting a new client. * * The type of the #GSocketConnection object returned from these calls * depends on the type of the underlying socket that is in use. For * instance, for a TCP/IP connection it will be a #GTcpConnection. * * Choosing what type of object to construct is done with the socket * connection factory, and it is possible for 3rd parties to register * custom socket connection types for specific combination of socket * family/type/protocol using g_socket_connection_factory_register_type(). * * To close a #GSocketConnection, use g_io_stream_close(). Closing both * substreams of the #GIOStream separately will not close the underlying * #GSocket. * * Since: 2.22 */ public class SocketConnection : IOStream { /** the main Gtk struct */ protected GSocketConnection* gSocketConnection; /** Get the main Gtk struct */ public GSocketConnection* getSocketConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSocketConnection; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSocketConnection; } protected override void setStruct(GObject* obj) { gSocketConnection = cast(GSocketConnection*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSocketConnection* gSocketConnection, bool ownedRef = false) { this.gSocketConnection = gSocketConnection; super(cast(GIOStream*)gSocketConnection, ownedRef); } /** */ public static GType getType() { return g_socket_connection_get_type(); } /** * Looks up the #GType to be used when creating socket connections on * sockets with the specified @family, @type and @protocol_id. * * If no type is registered, the #GSocketConnection base type is returned. * * Params: * family = a #GSocketFamily * type = a #GSocketType * protocolId = a protocol id * * Returns: a #GType * * Since: 2.22 */ public static GType factoryLookupType(GSocketFamily family, GSocketType type, int protocolId) { return g_socket_connection_factory_lookup_type(family, type, protocolId); } /** * Looks up the #GType to be used when creating socket connections on * sockets with the specified @family, @type and @protocol. * * If no type is registered, the #GSocketConnection base type is returned. * * Params: * gType = a #GType, inheriting from %G_TYPE_SOCKET_CONNECTION * family = a #GSocketFamily * type = a #GSocketType * protocol = a protocol id * * Since: 2.22 */ public static void factoryRegisterType(GType gType, GSocketFamily family, GSocketType type, int protocol) { g_socket_connection_factory_register_type(gType, family, type, protocol); } /** * Connect @connection to the specified remote address. * * Params: * address = a #GSocketAddress specifying the remote address. * cancellable = a %GCancellable or %NULL * * Returns: %TRUE if the connection succeeded, %FALSE on error * * Since: 2.32 * * Throws: GException on failure. */ public bool connect(SocketAddress address, Cancellable cancellable) { GError* err = null; auto p = g_socket_connection_connect(gSocketConnection, (address is null) ? null : address.getSocketAddressStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously connect @connection to the specified remote address. * * This clears the #GSocket:blocking flag on @connection's underlying * socket if it is currently set. * * Use g_socket_connection_connect_finish() to retrieve the result. * * Params: * address = a #GSocketAddress specifying the remote address. * cancellable = a %GCancellable or %NULL * callback = a #GAsyncReadyCallback * userData = user data for the callback * * Since: 2.32 */ public void connectAsync(SocketAddress address, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_socket_connection_connect_async(gSocketConnection, (address is null) ? null : address.getSocketAddressStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Gets the result of a g_socket_connection_connect_async() call. * * Params: * result = the #GAsyncResult * * Returns: %TRUE if the connection succeeded, %FALSE on error * * Since: 2.32 * * Throws: GException on failure. */ public bool connectFinish(AsyncResultIF result) { GError* err = null; auto p = g_socket_connection_connect_finish(gSocketConnection, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Try to get the local address of a socket connection. * * Returns: a #GSocketAddress or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public SocketAddress getLocalAddress() { GError* err = null; auto p = g_socket_connection_get_local_address(gSocketConnection, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketAddress)(cast(GSocketAddress*) p, true); } /** * Try to get the remote address of a socket connection. * * Since GLib 2.40, when used with g_socket_client_connect() or * g_socket_client_connect_async(), during emission of * %G_SOCKET_CLIENT_CONNECTING, this function will return the remote * address that will be used for the connection. This allows * applications to print e.g. "Connecting to example.com * (10.42.77.3)...". * * Returns: a #GSocketAddress or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.22 * * Throws: GException on failure. */ public SocketAddress getRemoteAddress() { GError* err = null; auto p = g_socket_connection_get_remote_address(gSocketConnection, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(SocketAddress)(cast(GSocketAddress*) p, true); } /** * Gets the underlying #GSocket object of the connection. * This can be useful if you want to do something unusual on it * not supported by the #GSocketConnection APIs. * * Returns: a #GSocket or %NULL on error. * * Since: 2.22 */ public Socket getSocket() { auto p = g_socket_connection_get_socket(gSocketConnection); if(p is null) { return null; } return ObjectG.getDObject!(Socket)(cast(GSocket*) p); } /** * Checks if @connection is connected. This is equivalent to calling * g_socket_is_connected() on @connection's underlying #GSocket. * * Returns: whether @connection is connected * * Since: 2.32 */ public bool isConnected() { return g_socket_connection_is_connected(gSocketConnection) != 0; } } GtkD-3.7.5/generated/gtkd/gio/SocketControlMessage.d000066400000000000000000000122021324604450400222660ustar00rootroot00000000000000/* * 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 gio.SocketControlMessage; private import gio.c.functions; public import gio.c.types; private import gobject.ObjectG; public import gtkc.giotypes; /** * A #GSocketControlMessage is a special-purpose utility message that * can be sent to or received from a #GSocket. These types of * messages are often called "ancillary data". * * The message can represent some sort of special instruction to or * information from the socket or can represent a special kind of * transfer to the peer (for example, sending a file descriptor over * a UNIX socket). * * These messages are sent with g_socket_send_message() and received * with g_socket_receive_message(). * * To extend the set of control message that can be sent, subclass this * class and override the get_size, get_level, get_type and serialize * methods. * * To extend the set of control messages that can be received, subclass * this class and implement the deserialize method. Also, make sure your * class is registered with the GType typesystem before calling * g_socket_receive_message() to read such a message. */ public class SocketControlMessage : ObjectG { /** the main Gtk struct */ protected GSocketControlMessage* gSocketControlMessage; /** Get the main Gtk struct */ public GSocketControlMessage* getSocketControlMessageStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSocketControlMessage; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSocketControlMessage; } protected override void setStruct(GObject* obj) { gSocketControlMessage = cast(GSocketControlMessage*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSocketControlMessage* gSocketControlMessage, bool ownedRef = false) { this.gSocketControlMessage = gSocketControlMessage; super(cast(GObject*)gSocketControlMessage, ownedRef); } /** */ public static GType getType() { return g_socket_control_message_get_type(); } /** * Tries to deserialize a socket control message of a given * @level and @type. This will ask all known (to GType) subclasses * of #GSocketControlMessage if they can understand this kind * of message and if so deserialize it into a #GSocketControlMessage. * * If there is no implementation for this kind of control message, %NULL * will be returned. * * Params: * level = a socket level * type = a socket control message type for the given @level * data = pointer to the message data * * Returns: the deserialized message or %NULL * * Since: 2.22 */ public static SocketControlMessage deserialize(int level, int type, ubyte[] data) { auto p = g_socket_control_message_deserialize(level, type, cast(size_t)data.length, data.ptr); if(p is null) { return null; } return ObjectG.getDObject!(SocketControlMessage)(cast(GSocketControlMessage*) p, true); } /** * Returns the "level" (i.e. the originating protocol) of the control message. * This is often SOL_SOCKET. * * Returns: an integer describing the level * * Since: 2.22 */ public int getLevel() { return g_socket_control_message_get_level(gSocketControlMessage); } /** * Returns the protocol specific type of the control message. * For instance, for UNIX fd passing this would be SCM_RIGHTS. * * Returns: an integer describing the type of control message * * Since: 2.22 */ public int getMsgType() { return g_socket_control_message_get_msg_type(gSocketControlMessage); } /** * Returns the space required for the control message, not including * headers or alignment. * * Returns: The number of bytes required. * * Since: 2.22 */ public size_t getSize() { return g_socket_control_message_get_size(gSocketControlMessage); } /** * Converts the data in the message to bytes placed in the * message. * * @data is guaranteed to have enough space to fit the size * returned by g_socket_control_message_get_size() on this * object. * * Params: * data = A buffer to write data to * * Since: 2.22 */ public void serialize(void* data) { g_socket_control_message_serialize(gSocketControlMessage, data); } } GtkD-3.7.5/generated/gtkd/gio/SocketListener.d000066400000000000000000000404171324604450400211370ustar00rootroot00000000000000/* * 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 gio.SocketListener; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.Socket; private import gio.SocketAddress; private import gio.SocketConnection; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * A #GSocketListener is an object that keeps track of a set * of server sockets and helps you accept sockets from any of the * socket, either sync or async. * * If you want to implement a network server, also look at #GSocketService * and #GThreadedSocketService which are subclass of #GSocketListener * that makes this even easier. * * Since: 2.22 */ public class SocketListener : ObjectG { /** the main Gtk struct */ protected GSocketListener* gSocketListener; /** Get the main Gtk struct */ public GSocketListener* getSocketListenerStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSocketListener; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSocketListener; } protected override void setStruct(GObject* obj) { gSocketListener = cast(GSocketListener*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSocketListener* gSocketListener, bool ownedRef = false) { this.gSocketListener = gSocketListener; super(cast(GObject*)gSocketListener, ownedRef); } /** */ public static GType getType() { return g_socket_listener_get_type(); } /** * Creates a new #GSocketListener with no sockets to listen for. * New listeners can be added with e.g. g_socket_listener_add_address() * or g_socket_listener_add_inet_port(). * * Returns: a new #GSocketListener. * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_socket_listener_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSocketListener*) p, true); } /** * Blocks waiting for a client to connect to any of the sockets added * to the listener. Returns a #GSocketConnection for the socket that was * accepted. * * If @source_object is not %NULL it will be filled out with the source * object specified when the corresponding socket or address was added * to the listener. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * sourceObject = location where #GObject pointer will be stored, or %NULL * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a #GSocketConnection on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public SocketConnection accept(out ObjectG sourceObject, Cancellable cancellable) { GObject* outsourceObject = null; GError* err = null; auto p = g_socket_listener_accept(gSocketListener, &outsourceObject, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } sourceObject = ObjectG.getDObject!(ObjectG)(outsourceObject); if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * This is the asynchronous version of g_socket_listener_accept(). * * When the operation is finished @callback will be * called. You can then call g_socket_listener_accept_socket() * to get the result of the operation. * * Params: * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback * userData = user data for the callback * * Since: 2.22 */ public void acceptAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_socket_listener_accept_async(gSocketListener, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an async accept operation. See g_socket_listener_accept_async() * * Params: * result = a #GAsyncResult. * sourceObject = Optional #GObject identifying this source * * Returns: a #GSocketConnection on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public SocketConnection acceptFinish(AsyncResultIF result, out ObjectG sourceObject) { GObject* outsourceObject = null; GError* err = null; auto p = g_socket_listener_accept_finish(gSocketListener, (result is null) ? null : result.getAsyncResultStruct(), &outsourceObject, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } sourceObject = ObjectG.getDObject!(ObjectG)(outsourceObject); if(p is null) { return null; } return ObjectG.getDObject!(SocketConnection)(cast(GSocketConnection*) p, true); } /** * Blocks waiting for a client to connect to any of the sockets added * to the listener. Returns the #GSocket that was accepted. * * If you want to accept the high-level #GSocketConnection, not a #GSocket, * which is often the case, then you should use g_socket_listener_accept() * instead. * * If @source_object is not %NULL it will be filled out with the source * object specified when the corresponding socket or address was added * to the listener. * * If @cancellable is not %NULL, then the operation can be cancelled by * triggering the cancellable object from another thread. If the operation * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. * * Params: * sourceObject = location where #GObject pointer will be stored, or %NULL. * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a #GSocket on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public Socket acceptSocket(out ObjectG sourceObject, Cancellable cancellable) { GObject* outsourceObject = null; GError* err = null; auto p = g_socket_listener_accept_socket(gSocketListener, &outsourceObject, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } sourceObject = ObjectG.getDObject!(ObjectG)(outsourceObject); if(p is null) { return null; } return ObjectG.getDObject!(Socket)(cast(GSocket*) p, true); } /** * This is the asynchronous version of g_socket_listener_accept_socket(). * * When the operation is finished @callback will be * called. You can then call g_socket_listener_accept_socket_finish() * to get the result of the operation. * * Params: * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback * userData = user data for the callback * * Since: 2.22 */ public void acceptSocketAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_socket_listener_accept_socket_async(gSocketListener, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an async accept operation. See g_socket_listener_accept_socket_async() * * Params: * result = a #GAsyncResult. * sourceObject = Optional #GObject identifying this source * * Returns: a #GSocket on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public Socket acceptSocketFinish(AsyncResultIF result, out ObjectG sourceObject) { GObject* outsourceObject = null; GError* err = null; auto p = g_socket_listener_accept_socket_finish(gSocketListener, (result is null) ? null : result.getAsyncResultStruct(), &outsourceObject, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } sourceObject = ObjectG.getDObject!(ObjectG)(outsourceObject); if(p is null) { return null; } return ObjectG.getDObject!(Socket)(cast(GSocket*) p, true); } /** * Creates a socket of type @type and protocol @protocol, binds * it to @address and adds it to the set of sockets we're accepting * sockets from. * * Note that adding an IPv6 address, depending on the platform, * may or may not result in a listener that also accepts IPv4 * connections. For more deterministic behavior, see * g_socket_listener_add_inet_port(). * * @source_object will be passed out in the various calls * to accept to identify this particular source, which is * useful if you're listening on multiple addresses and do * different things depending on what address is connected to. * * If successful and @effective_address is non-%NULL then it will * be set to the address that the binding actually occurred at. This * is helpful for determining the port number that was used for when * requesting a binding to port 0 (ie: "any port"). This address, if * requested, belongs to the caller and must be freed. * * Params: * address = a #GSocketAddress * type = a #GSocketType * protocol = a #GSocketProtocol * sourceObject = Optional #GObject identifying this source * effectiveAddress = location to store the address that was bound to, or %NULL. * * Returns: %TRUE on success, %FALSE on error. * * Since: 2.22 * * Throws: GException on failure. */ public bool addAddress(SocketAddress address, GSocketType type, GSocketProtocol protocol, ObjectG sourceObject, out SocketAddress effectiveAddress) { GSocketAddress* outeffectiveAddress = null; GError* err = null; auto p = g_socket_listener_add_address(gSocketListener, (address is null) ? null : address.getSocketAddressStruct(), type, protocol, (sourceObject is null) ? null : sourceObject.getObjectGStruct(), &outeffectiveAddress, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } effectiveAddress = ObjectG.getDObject!(SocketAddress)(outeffectiveAddress); return p; } /** * Listens for TCP connections on any available port number for both * IPv6 and IPv4 (if each is available). * * This is useful if you need to have a socket for incoming connections * but don't care about the specific port number. * * @source_object will be passed out in the various calls * to accept to identify this particular source, which is * useful if you're listening on multiple addresses and do * different things depending on what address is connected to. * * Params: * sourceObject = Optional #GObject identifying this source * * Returns: the port number, or 0 in case of failure. * * Since: 2.24 * * Throws: GException on failure. */ public ushort addAnyInetPort(ObjectG sourceObject) { GError* err = null; auto p = g_socket_listener_add_any_inet_port(gSocketListener, (sourceObject is null) ? null : sourceObject.getObjectGStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Helper function for g_socket_listener_add_address() that * creates a TCP/IP socket listening on IPv4 and IPv6 (if * supported) on the specified port on all interfaces. * * @source_object will be passed out in the various calls * to accept to identify this particular source, which is * useful if you're listening on multiple addresses and do * different things depending on what address is connected to. * * Params: * port = an IP port number (non-zero) * sourceObject = Optional #GObject identifying this source * * Returns: %TRUE on success, %FALSE on error. * * Since: 2.22 * * Throws: GException on failure. */ public bool addInetPort(ushort port, ObjectG sourceObject) { GError* err = null; auto p = g_socket_listener_add_inet_port(gSocketListener, port, (sourceObject is null) ? null : sourceObject.getObjectGStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Adds @socket to the set of sockets that we try to accept * new clients from. The socket must be bound to a local * address and listened to. * * @source_object will be passed out in the various calls * to accept to identify this particular source, which is * useful if you're listening on multiple addresses and do * different things depending on what address is connected to. * * The @socket will not be automatically closed when the @listener is finalized * unless the listener held the final reference to the socket. Before GLib 2.42, * the @socket was automatically closed on finalization of the @listener, even * if references to it were held elsewhere. * * Params: * socket = a listening #GSocket * sourceObject = Optional #GObject identifying this source * * Returns: %TRUE on success, %FALSE on error. * * Since: 2.22 * * Throws: GException on failure. */ public bool addSocket(Socket socket, ObjectG sourceObject) { GError* err = null; auto p = g_socket_listener_add_socket(gSocketListener, (socket is null) ? null : socket.getSocketStruct(), (sourceObject is null) ? null : sourceObject.getObjectGStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Closes all the sockets in the listener. * * Since: 2.22 */ public void close() { g_socket_listener_close(gSocketListener); } /** * Sets the listen backlog on the sockets in the listener. * * See g_socket_set_listen_backlog() for details * * Params: * listenBacklog = an integer * * Since: 2.22 */ public void setBacklog(int listenBacklog) { g_socket_listener_set_backlog(gSocketListener, listenBacklog); } protected class OnEventDelegateWrapper { void delegate(GSocketListenerEvent, Socket, SocketListener) dlg; gulong handlerId; this(void delegate(GSocketListenerEvent, Socket, SocketListener) dlg) { this.dlg = dlg; onEventListeners ~= this; } void remove(OnEventDelegateWrapper source) { foreach(index, wrapper; onEventListeners) { if (wrapper.handlerId == source.handlerId) { onEventListeners[index] = null; onEventListeners = std.algorithm.remove(onEventListeners, index); break; } } } } OnEventDelegateWrapper[] onEventListeners; /** * Emitted when @listener's activity on @socket changes state. * Note that when @listener is used to listen on both IPv4 and * IPv6, a separate set of signals will be emitted for each, and * the order they happen in is undefined. * * Params: * event = the event that is occurring * socket = the #GSocket the event is occurring on * * Since: 2.46 */ gulong addOnEvent(void delegate(GSocketListenerEvent, Socket, SocketListener) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnEventDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "event", cast(GCallback)&callBackEvent, cast(void*)wrapper, cast(GClosureNotify)&callBackEventDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackEvent(GSocketListener* socketlistenerStruct, GSocketListenerEvent event, GSocket* socket, OnEventDelegateWrapper wrapper) { wrapper.dlg(event, ObjectG.getDObject!(Socket)(socket), wrapper.outer); } extern(C) static void callBackEventDestroy(OnEventDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/SocketService.d000066400000000000000000000173131324604450400207510ustar00rootroot00000000000000/* * 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 gio.SocketService; private import gio.SocketConnection; private import gio.SocketListener; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * A #GSocketService is an object that represents a service that * is provided to the network or over local sockets. When a new * connection is made to the service the #GSocketService::incoming * signal is emitted. * * A #GSocketService is a subclass of #GSocketListener and you need * to add the addresses you want to accept connections on with the * #GSocketListener APIs. * * There are two options for implementing a network service based on * #GSocketService. The first is to create the service using * g_socket_service_new() and to connect to the #GSocketService::incoming * signal. The second is to subclass #GSocketService and override the * default signal handler implementation. * * In either case, the handler must immediately return, or else it * will block additional incoming connections from being serviced. * If you are interested in writing connection handlers that contain * blocking code then see #GThreadedSocketService. * * The socket service runs on the main loop of the * [thread-default context][g-main-context-push-thread-default-context] * of the thread it is created in, and is not * threadsafe in general. However, the calls to start and stop the * service are thread-safe so these can be used from threads that * handle incoming clients. * * Since: 2.22 */ public class SocketService : SocketListener { /** the main Gtk struct */ protected GSocketService* gSocketService; /** Get the main Gtk struct */ public GSocketService* getSocketServiceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSocketService; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSocketService; } protected override void setStruct(GObject* obj) { gSocketService = cast(GSocketService*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSocketService* gSocketService, bool ownedRef = false) { this.gSocketService = gSocketService; super(cast(GSocketListener*)gSocketService, ownedRef); } /** */ public static GType getType() { return g_socket_service_get_type(); } /** * Creates a new #GSocketService with no sockets to listen for. * New listeners can be added with e.g. g_socket_listener_add_address() * or g_socket_listener_add_inet_port(). * * New services are created active, there is no need to call * g_socket_service_start(), unless g_socket_service_stop() has been * called before. * * Returns: a new #GSocketService. * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_socket_service_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSocketService*) p, true); } /** * Check whether the service is active or not. An active * service will accept new clients that connect, while * a non-active service will let connecting clients queue * up until the service is started. * * Returns: %TRUE if the service is active, %FALSE otherwise * * Since: 2.22 */ public bool isActive() { return g_socket_service_is_active(gSocketService) != 0; } /** * Restarts the service, i.e. start accepting connections * from the added sockets when the mainloop runs. This only needs * to be called after the service has been stopped from * g_socket_service_stop(). * * This call is thread-safe, so it may be called from a thread * handling an incoming client request. * * Since: 2.22 */ public void start() { g_socket_service_start(gSocketService); } /** * Stops the service, i.e. stops accepting connections * from the added sockets when the mainloop runs. * * This call is thread-safe, so it may be called from a thread * handling an incoming client request. * * Note that this only stops accepting new connections; it does not * close the listening sockets, and you can call * g_socket_service_start() again later to begin listening again. To * close the listening sockets, call g_socket_listener_close(). (This * will happen automatically when the #GSocketService is finalized.) * * This must be called before calling g_socket_listener_close() as * the socket service will start accepting connections immediately * when a new socket is added. * * Since: 2.22 */ public void stop() { g_socket_service_stop(gSocketService); } protected class OnIncomingDelegateWrapper { bool delegate(SocketConnection, ObjectG, SocketService) dlg; gulong handlerId; this(bool delegate(SocketConnection, ObjectG, SocketService) dlg) { this.dlg = dlg; onIncomingListeners ~= this; } void remove(OnIncomingDelegateWrapper source) { foreach(index, wrapper; onIncomingListeners) { if (wrapper.handlerId == source.handlerId) { onIncomingListeners[index] = null; onIncomingListeners = std.algorithm.remove(onIncomingListeners, index); break; } } } } OnIncomingDelegateWrapper[] onIncomingListeners; /** * The ::incoming signal is emitted when a new incoming connection * to @service needs to be handled. The handler must initiate the * handling of @connection, but may not block; in essence, * asynchronous operations must be used. * * @connection will be unreffed once the signal handler returns, * so you need to ref it yourself if you are planning to use it. * * Params: * connection = a new #GSocketConnection object * sourceObject = the source_object passed to * g_socket_listener_add_address() * * Returns: %TRUE to stop other handlers from being called * * Since: 2.22 */ gulong addOnIncoming(bool delegate(SocketConnection, ObjectG, SocketService) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnIncomingDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "incoming", cast(GCallback)&callBackIncoming, cast(void*)wrapper, cast(GClosureNotify)&callBackIncomingDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackIncoming(GSocketService* socketserviceStruct, GSocketConnection* connection, GObject* sourceObject, OnIncomingDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(SocketConnection)(connection), ObjectG.getDObject!(ObjectG)(sourceObject), wrapper.outer); } extern(C) static void callBackIncomingDestroy(OnIncomingDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/SrvTarget.d000066400000000000000000000127231324604450400201210ustar00rootroot00000000000000/* * 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 gio.SrvTarget; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * SRV (service) records are used by some network protocols to provide * service-specific aliasing and load-balancing. For example, XMPP * (Jabber) uses SRV records to locate the XMPP server for a domain; * rather than connecting directly to "example.com" or assuming a * specific server hostname like "xmpp.example.com", an XMPP client * would look up the "xmpp-client" SRV record for "example.com", and * then connect to whatever host was pointed to by that record. * * You can use g_resolver_lookup_service() or * g_resolver_lookup_service_async() to find the #GSrvTargets * for a given service. However, if you are simply planning to connect * to the remote service, you can use #GNetworkService's * #GSocketConnectable interface and not need to worry about * #GSrvTarget at all. */ public class SrvTarget { /** the main Gtk struct */ protected GSrvTarget* gSrvTarget; protected bool ownedRef; /** Get the main Gtk struct */ public GSrvTarget* getSrvTargetStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSrvTarget; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gSrvTarget; } /** * Sets our main struct and passes it to the parent class. */ public this (GSrvTarget* gSrvTarget, bool ownedRef = false) { this.gSrvTarget = gSrvTarget; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_srv_target_free(gSrvTarget); } /** */ public static GType getType() { return g_srv_target_get_type(); } /** * Creates a new #GSrvTarget with the given parameters. * * You should not need to use this; normally #GSrvTargets are * created by #GResolver. * * Params: * hostname = the host that the service is running on * port = the port that the service is running on * priority = the target's priority * weight = the target's weight * * Returns: a new #GSrvTarget. * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string hostname, ushort port, ushort priority, ushort weight) { auto p = g_srv_target_new(Str.toStringz(hostname), port, priority, weight); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSrvTarget*) p); } /** * Copies @target * * Returns: a copy of @target * * Since: 2.22 */ public SrvTarget copy() { auto p = g_srv_target_copy(gSrvTarget); if(p is null) { return null; } return ObjectG.getDObject!(SrvTarget)(cast(GSrvTarget*) p, true); } /** * Frees @target * * Since: 2.22 */ public void free() { g_srv_target_free(gSrvTarget); ownedRef = false; } /** * Gets @target's hostname (in ASCII form; if you are going to present * this to the user, you should use g_hostname_is_ascii_encoded() to * check if it contains encoded Unicode segments, and use * g_hostname_to_unicode() to convert it if it does.) * * Returns: @target's hostname * * Since: 2.22 */ public string getHostname() { return Str.toString(g_srv_target_get_hostname(gSrvTarget)); } /** * Gets @target's port * * Returns: @target's port * * Since: 2.22 */ public ushort getPort() { return g_srv_target_get_port(gSrvTarget); } /** * Gets @target's priority. You should not need to look at this; * #GResolver already sorts the targets according to the algorithm in * RFC 2782. * * Returns: @target's priority * * Since: 2.22 */ public ushort getPriority() { return g_srv_target_get_priority(gSrvTarget); } /** * Gets @target's weight. You should not need to look at this; * #GResolver already sorts the targets according to the algorithm in * RFC 2782. * * Returns: @target's weight * * Since: 2.22 */ public ushort getWeight() { return g_srv_target_get_weight(gSrvTarget); } /** * Sorts @targets in place according to the algorithm in RFC 2782. * * Params: * targets = a #GList of #GSrvTarget * * Returns: the head of the sorted list. * * Since: 2.22 */ public static ListG listSort(ListG targets) { auto p = g_srv_target_list_sort((targets is null) ? null : targets.getListGStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/StaticResource.d000066400000000000000000000057421324604450400211420ustar00rootroot00000000000000/* * 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 gio.StaticResource; private import gio.Resource; private import gio.c.functions; public import gio.c.types; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GStaticResource is an opaque data structure and can only be accessed * using the following functions. */ public class StaticResource { /** the main Gtk struct */ protected GStaticResource* gStaticResource; protected bool ownedRef; /** Get the main Gtk struct */ public GStaticResource* getStaticResourceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gStaticResource; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gStaticResource; } /** * Sets our main struct and passes it to the parent class. */ public this (GStaticResource* gStaticResource, bool ownedRef = false) { this.gStaticResource = gStaticResource; this.ownedRef = ownedRef; } /** * Finalized a GResource initialized by g_static_resource_init(). * * This is normally used by code generated by * [glib-compile-resources][glib-compile-resources] * and is not typically used by other code. * * Since: 2.32 */ public void fini() { g_static_resource_fini(gStaticResource); } /** * Gets the GResource that was registered by a call to g_static_resource_init(). * * This is normally used by code generated by * [glib-compile-resources][glib-compile-resources] * and is not typically used by other code. * * Returns: a #GResource * * Since: 2.32 */ public Resource getResource() { auto p = g_static_resource_get_resource(gStaticResource); if(p is null) { return null; } return ObjectG.getDObject!(Resource)(cast(GResource*) p); } /** * Initializes a GResource from static data using a * GStaticResource. * * This is normally used by code generated by * [glib-compile-resources][glib-compile-resources] * and is not typically used by other code. * * Since: 2.32 */ public void init() { g_static_resource_init(gStaticResource); } } GtkD-3.7.5/generated/gtkd/gio/Subprocess.d000066400000000000000000000531471324604450400203350ustar00rootroot00000000000000/* * 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 gio.Subprocess; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.InitableIF; private import gio.InitableT; private import gio.InputStream; private import gio.OutputStream; private import gio.c.functions; public import gio.c.types; private import glib.Bytes; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GSubprocess allows the creation of and interaction with child * processes. * * Processes can be communicated with using standard GIO-style APIs (ie: * #GInputStream, #GOutputStream). There are GIO-style APIs to wait for * process termination (ie: cancellable and with an asynchronous * variant). * * There is an API to force a process to terminate, as well as a * race-free API for sending UNIX signals to a subprocess. * * One major advantage that GIO brings over the core GLib library is * comprehensive API for asynchronous I/O, such * g_output_stream_splice_async(). This makes GSubprocess * significantly more powerful and flexible than equivalent APIs in * some other languages such as the `subprocess.py` * included with Python. For example, using #GSubprocess one could * create two child processes, reading standard output from the first, * processing it, and writing to the input stream of the second, all * without blocking the main loop. * * A powerful g_subprocess_communicate() API is provided similar to the * `communicate()` method of `subprocess.py`. This enables very easy * interaction with a subprocess that has been opened with pipes. * * #GSubprocess defaults to tight control over the file descriptors open * in the child process, avoiding dangling-fd issues that are caused by * a simple fork()/exec(). The only open file descriptors in the * spawned process are ones that were explicitly specified by the * #GSubprocess API (unless %G_SUBPROCESS_FLAGS_INHERIT_FDS was * specified). * * #GSubprocess will quickly reap all child processes as they exit, * avoiding "zombie processes" remaining around for long periods of * time. g_subprocess_wait() can be used to wait for this to happen, * but it will happen even without the call being explicitly made. * * As a matter of principle, #GSubprocess has no API that accepts * shell-style space-separated strings. It will, however, match the * typical shell behaviour of searching the PATH for executables that do * not contain a directory separator in their name. * * #GSubprocess attempts to have a very simple API for most uses (ie: * spawning a subprocess with arguments and support for most typical * kinds of input and output redirection). See g_subprocess_new(). The * #GSubprocessLauncher API is provided for more complicated cases * (advanced types of redirection, environment variable manipulation, * change of working directory, child setup functions, etc). * * A typical use of #GSubprocess will involve calling * g_subprocess_new(), followed by g_subprocess_wait_async() or * g_subprocess_wait(). After the process exits, the status can be * checked using functions such as g_subprocess_get_if_exited() (which * are similar to the familiar WIFEXITED-style POSIX macros). * * Since: 2.40 */ public class Subprocess : ObjectG, InitableIF { /** the main Gtk struct */ protected GSubprocess* gSubprocess; /** Get the main Gtk struct */ public GSubprocess* getSubprocessStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSubprocess; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSubprocess; } protected override void setStruct(GObject* obj) { gSubprocess = cast(GSubprocess*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSubprocess* gSubprocess, bool ownedRef = false) { this.gSubprocess = gSubprocess; super(cast(GObject*)gSubprocess, ownedRef); } // add the Initable capabilities mixin InitableT!(GSubprocess); /** */ public static GType getType() { return g_subprocess_get_type(); } /** * Create a new process with the given flags and argument list. * * The argument list is expected to be %NULL-terminated. * * Params: * argv = commandline arguments for the subprocess * flags = flags that define the behaviour of the subprocess * * Returns: A newly created #GSubprocess, or %NULL on error (and @error * will be set) * * Since: 2.40 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string[] argv, GSubprocessFlags flags) { GError* err = null; auto p = g_subprocess_newv(Str.toStringzArray(argv), flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by newv"); } this(cast(GSubprocess*) p, true); } /** * Communicate with the subprocess until it terminates, and all input * and output has been completed. * * If @stdin_buf is given, the subprocess must have been created with * %G_SUBPROCESS_FLAGS_STDIN_PIPE. The given data is fed to the * stdin of the subprocess and the pipe is closed (ie: EOF). * * At the same time (as not to cause blocking when dealing with large * amounts of data), if %G_SUBPROCESS_FLAGS_STDOUT_PIPE or * %G_SUBPROCESS_FLAGS_STDERR_PIPE were used, reads from those * streams. The data that was read is returned in @stdout and/or * the @stderr. * * If the subprocess was created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE, * @stdout_buf will contain the data read from stdout. Otherwise, for * subprocesses not created with %G_SUBPROCESS_FLAGS_STDOUT_PIPE, * @stdout_buf will be set to %NULL. Similar provisions apply to * @stderr_buf and %G_SUBPROCESS_FLAGS_STDERR_PIPE. * * As usual, any output variable may be given as %NULL to ignore it. * * If you desire the stdout and stderr data to be interleaved, create * the subprocess with %G_SUBPROCESS_FLAGS_STDOUT_PIPE and * %G_SUBPROCESS_FLAGS_STDERR_MERGE. The merged result will be returned * in @stdout_buf and @stderr_buf will be set to %NULL. * * In case of any error (including cancellation), %FALSE will be * returned with @error set. Some or all of the stdin data may have * been written. Any stdout or stderr data that has been read will be * discarded. None of the out variables (aside from @error) will have * been set to anything in particular and should not be inspected. * * In the case that %TRUE is returned, the subprocess has exited and the * exit status inspection APIs (eg: g_subprocess_get_if_exited(), * g_subprocess_get_exit_status()) may be used. * * You should not attempt to use any of the subprocess pipes after * starting this function, since they may be left in strange states, * even if the operation was cancelled. You should especially not * attempt to interact with the pipes while the operation is in progress * (either from another thread or if using the asynchronous version). * * Params: * stdinBuf = data to send to the stdin of the subprocess, or %NULL * cancellable = a #GCancellable * stdoutBuf = data read from the subprocess stdout * stderrBuf = data read from the subprocess stderr * * Returns: %TRUE if successful * * Since: 2.40 * * Throws: GException on failure. */ public bool communicate(Bytes stdinBuf, Cancellable cancellable, out Bytes stdoutBuf, out Bytes stderrBuf) { GBytes* outstdoutBuf = null; GBytes* outstderrBuf = null; GError* err = null; auto p = g_subprocess_communicate(gSubprocess, (stdinBuf is null) ? null : stdinBuf.getBytesStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &outstdoutBuf, &outstderrBuf, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } stdoutBuf = new Bytes(outstdoutBuf); stderrBuf = new Bytes(outstderrBuf); return p; } /** * Asynchronous version of g_subprocess_communicate(). Complete * invocation with g_subprocess_communicate_finish(). * * Params: * stdinBuf = Input data, or %NULL * cancellable = Cancellable * callback = Callback * userData = User data */ public void communicateAsync(Bytes stdinBuf, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_subprocess_communicate_async(gSubprocess, (stdinBuf is null) ? null : stdinBuf.getBytesStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Complete an invocation of g_subprocess_communicate_async(). * * Params: * result = Result * stdoutBuf = Return location for stdout data * stderrBuf = Return location for stderr data * * Throws: GException on failure. */ public bool communicateFinish(AsyncResultIF result, out Bytes stdoutBuf, out Bytes stderrBuf) { GBytes* outstdoutBuf = null; GBytes* outstderrBuf = null; GError* err = null; auto p = g_subprocess_communicate_finish(gSubprocess, (result is null) ? null : result.getAsyncResultStruct(), &outstdoutBuf, &outstderrBuf, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } stdoutBuf = new Bytes(outstdoutBuf); stderrBuf = new Bytes(outstderrBuf); return p; } /** * Like g_subprocess_communicate(), but validates the output of the * process as UTF-8, and returns it as a regular NUL terminated string. * * Params: * stdinBuf = data to send to the stdin of the subprocess, or %NULL * cancellable = a #GCancellable * stdoutBuf = data read from the subprocess stdout * stderrBuf = data read from the subprocess stderr * * Throws: GException on failure. */ public bool communicateUtf8(string stdinBuf, Cancellable cancellable, out string stdoutBuf, out string stderrBuf) { char* outstdoutBuf = null; char* outstderrBuf = null; GError* err = null; auto p = g_subprocess_communicate_utf8(gSubprocess, Str.toStringz(stdinBuf), (cancellable is null) ? null : cancellable.getCancellableStruct(), &outstdoutBuf, &outstderrBuf, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } stdoutBuf = Str.toString(outstdoutBuf); stderrBuf = Str.toString(outstderrBuf); return p; } /** * Asynchronous version of g_subprocess_communicate_utf8(). Complete * invocation with g_subprocess_communicate_utf8_finish(). * * Params: * stdinBuf = Input data, or %NULL * cancellable = Cancellable * callback = Callback * userData = User data */ public void communicateUtf8Async(string stdinBuf, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_subprocess_communicate_utf8_async(gSubprocess, Str.toStringz(stdinBuf), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Complete an invocation of g_subprocess_communicate_utf8_async(). * * Params: * result = Result * stdoutBuf = Return location for stdout data * stderrBuf = Return location for stderr data * * Throws: GException on failure. */ public bool communicateUtf8Finish(AsyncResultIF result, out string stdoutBuf, out string stderrBuf) { char* outstdoutBuf = null; char* outstderrBuf = null; GError* err = null; auto p = g_subprocess_communicate_utf8_finish(gSubprocess, (result is null) ? null : result.getAsyncResultStruct(), &outstdoutBuf, &outstderrBuf, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } stdoutBuf = Str.toString(outstdoutBuf); stderrBuf = Str.toString(outstderrBuf); return p; } /** * Use an operating-system specific method to attempt an immediate, * forceful termination of the process. There is no mechanism to * determine whether or not the request itself was successful; * however, you can use g_subprocess_wait() to monitor the status of * the process after calling this function. * * On Unix, this function sends %SIGKILL. * * Since: 2.40 */ public void forceExit() { g_subprocess_force_exit(gSubprocess); } /** * Check the exit status of the subprocess, given that it exited * normally. This is the value passed to the exit() system call or the * return value from main. * * This is equivalent to the system WEXITSTATUS macro. * * It is an error to call this function before g_subprocess_wait() and * unless g_subprocess_get_if_exited() returned %TRUE. * * Returns: the exit status * * Since: 2.40 */ public int getExitStatus() { return g_subprocess_get_exit_status(gSubprocess); } /** * On UNIX, returns the process ID as a decimal string. * On Windows, returns the result of GetProcessId() also as a string. */ public string getIdentifier() { return Str.toString(g_subprocess_get_identifier(gSubprocess)); } /** * Check if the given subprocess exited normally (ie: by way of exit() * or return from main()). * * This is equivalent to the system WIFEXITED macro. * * It is an error to call this function before g_subprocess_wait() has * returned. * * Returns: %TRUE if the case of a normal exit * * Since: 2.40 */ public bool getIfExited() { return g_subprocess_get_if_exited(gSubprocess) != 0; } /** * Check if the given subprocess terminated in response to a signal. * * This is equivalent to the system WIFSIGNALED macro. * * It is an error to call this function before g_subprocess_wait() has * returned. * * Returns: %TRUE if the case of termination due to a signal * * Since: 2.40 */ public bool getIfSignaled() { return g_subprocess_get_if_signaled(gSubprocess) != 0; } /** * Gets the raw status code of the process, as from waitpid(). * * This value has no particular meaning, but it can be used with the * macros defined by the system headers such as WIFEXITED. It can also * be used with g_spawn_check_exit_status(). * * It is more likely that you want to use g_subprocess_get_if_exited() * followed by g_subprocess_get_exit_status(). * * It is an error to call this function before g_subprocess_wait() has * returned. * * Returns: the (meaningless) waitpid() exit status from the kernel * * Since: 2.40 */ public int getStatus() { return g_subprocess_get_status(gSubprocess); } /** * Gets the #GInputStream from which to read the stderr output of * @subprocess. * * The process must have been created with * %G_SUBPROCESS_FLAGS_STDERR_PIPE. * * Returns: the stderr pipe * * Since: 2.40 */ public InputStream getStderrPipe() { auto p = g_subprocess_get_stderr_pipe(gSubprocess); if(p is null) { return null; } return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p); } /** * Gets the #GOutputStream that you can write to in order to give data * to the stdin of @subprocess. * * The process must have been created with * %G_SUBPROCESS_FLAGS_STDIN_PIPE. * * Returns: the stdout pipe * * Since: 2.40 */ public OutputStream getStdinPipe() { auto p = g_subprocess_get_stdin_pipe(gSubprocess); if(p is null) { return null; } return ObjectG.getDObject!(OutputStream)(cast(GOutputStream*) p); } /** * Gets the #GInputStream from which to read the stdout output of * @subprocess. * * The process must have been created with * %G_SUBPROCESS_FLAGS_STDOUT_PIPE. * * Returns: the stdout pipe * * Since: 2.40 */ public InputStream getStdoutPipe() { auto p = g_subprocess_get_stdout_pipe(gSubprocess); if(p is null) { return null; } return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p); } /** * Checks if the process was "successful". A process is considered * successful if it exited cleanly with an exit status of 0, either by * way of the exit() system call or return from main(). * * It is an error to call this function before g_subprocess_wait() has * returned. * * Returns: %TRUE if the process exited cleanly with a exit status of 0 * * Since: 2.40 */ public bool getSuccessful() { return g_subprocess_get_successful(gSubprocess) != 0; } /** * Get the signal number that caused the subprocess to terminate, given * that it terminated due to a signal. * * This is equivalent to the system WTERMSIG macro. * * It is an error to call this function before g_subprocess_wait() and * unless g_subprocess_get_if_signaled() returned %TRUE. * * Returns: the signal causing termination * * Since: 2.40 */ public int getTermSig() { return g_subprocess_get_term_sig(gSubprocess); } /** * Sends the UNIX signal @signal_num to the subprocess, if it is still * running. * * This API is race-free. If the subprocess has terminated, it will not * be signalled. * * This API is not available on Windows. * * Params: * signalNum = the signal number to send * * Since: 2.40 */ public void sendSignal(int signalNum) { g_subprocess_send_signal(gSubprocess, signalNum); } /** * Synchronously wait for the subprocess to terminate. * * After the process terminates you can query its exit status with * functions such as g_subprocess_get_if_exited() and * g_subprocess_get_exit_status(). * * This function does not fail in the case of the subprocess having * abnormal termination. See g_subprocess_wait_check() for that. * * Cancelling @cancellable doesn't kill the subprocess. Call * g_subprocess_force_exit() if it is desirable. * * Params: * cancellable = a #GCancellable * * Returns: %TRUE on success, %FALSE if @cancellable was cancelled * * Since: 2.40 * * Throws: GException on failure. */ public bool wait(Cancellable cancellable) { GError* err = null; auto p = g_subprocess_wait(gSubprocess, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Wait for the subprocess to terminate. * * This is the asynchronous version of g_subprocess_wait(). * * Params: * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback to call when the operation is complete * userData = user_data for @callback * * Since: 2.40 */ public void waitAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_subprocess_wait_async(gSubprocess, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Combines g_subprocess_wait() with g_spawn_check_exit_status(). * * Params: * cancellable = a #GCancellable * * Returns: %TRUE on success, %FALSE if process exited abnormally, or * @cancellable was cancelled * * Since: 2.40 * * Throws: GException on failure. */ public bool waitCheck(Cancellable cancellable) { GError* err = null; auto p = g_subprocess_wait_check(gSubprocess, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Combines g_subprocess_wait_async() with g_spawn_check_exit_status(). * * This is the asynchronous version of g_subprocess_wait_check(). * * Params: * cancellable = a #GCancellable, or %NULL * callback = a #GAsyncReadyCallback to call when the operation is complete * userData = user_data for @callback * * Since: 2.40 */ public void waitCheckAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_subprocess_wait_check_async(gSubprocess, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Collects the result of a previous call to * g_subprocess_wait_check_async(). * * Params: * result = the #GAsyncResult passed to your #GAsyncReadyCallback * * Returns: %TRUE if successful, or %FALSE with @error set * * Since: 2.40 * * Throws: GException on failure. */ public bool waitCheckFinish(AsyncResultIF result) { GError* err = null; auto p = g_subprocess_wait_check_finish(gSubprocess, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Collects the result of a previous call to * g_subprocess_wait_async(). * * Params: * result = the #GAsyncResult passed to your #GAsyncReadyCallback * * Returns: %TRUE if successful, or %FALSE with @error set * * Since: 2.40 * * Throws: GException on failure. */ public bool waitFinish(AsyncResultIF result) { GError* err = null; auto p = g_subprocess_wait_finish(gSubprocess, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/SubprocessLauncher.d000066400000000000000000000344121324604450400220110ustar00rootroot00000000000000/* * 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 gio.SubprocessLauncher; private import gio.Subprocess; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * This class contains a set of options for launching child processes, * such as where its standard input and output will be directed, the * argument list, the environment, and more. * * While the #GSubprocess class has high level functions covering * popular cases, use of this class allows access to more advanced * options. It can also be used to launch multiple subprocesses with * a similar configuration. * * Since: 2.40 */ public class SubprocessLauncher : ObjectG { /** the main Gtk struct */ protected GSubprocessLauncher* gSubprocessLauncher; /** Get the main Gtk struct */ public GSubprocessLauncher* getSubprocessLauncherStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSubprocessLauncher; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gSubprocessLauncher; } protected override void setStruct(GObject* obj) { gSubprocessLauncher = cast(GSubprocessLauncher*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GSubprocessLauncher* gSubprocessLauncher, bool ownedRef = false) { this.gSubprocessLauncher = gSubprocessLauncher; super(cast(GObject*)gSubprocessLauncher, ownedRef); } /** */ public static GType getType() { return g_subprocess_launcher_get_type(); } /** * Creates a new #GSubprocessLauncher. * * The launcher is created with the default options. A copy of the * environment of the calling process is made at the time of this call * and will be used as the environment that the process is launched in. * * Params: * flags = #GSubprocessFlags * * Since: 2.40 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GSubprocessFlags flags) { auto p = g_subprocess_launcher_new(flags); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSubprocessLauncher*) p, true); } /** * Returns the value of the environment variable @variable in the * environment of processes launched from this launcher. * * On UNIX, the returned string can be an arbitrary byte string. * On Windows, it will be UTF-8. * * Params: * variable = the environment variable to get * * Returns: the value of the environment variable, %NULL if unset * * Since: 2.40 */ public string getenv(string variable) { return Str.toString(g_subprocess_launcher_getenv(gSubprocessLauncher, Str.toStringz(variable))); } /** * Sets up a child setup function. * * The child setup function will be called after fork() but before * exec() on the child's side. * * @destroy_notify will not be automatically called on the child's side * of the fork(). It will only be called when the last reference on the * #GSubprocessLauncher is dropped or when a new child setup function is * given. * * %NULL can be given as @child_setup to disable the functionality. * * Child setup functions are only available on UNIX. * * Params: * childSetup = a #GSpawnChildSetupFunc to use as the child setup function * userData = user data for @child_setup * destroyNotify = a #GDestroyNotify for @user_data * * Since: 2.40 */ public void setChildSetup(GSpawnChildSetupFunc childSetup, void* userData, GDestroyNotify destroyNotify) { g_subprocess_launcher_set_child_setup(gSubprocessLauncher, childSetup, userData, destroyNotify); } /** * Sets the current working directory that processes will be launched * with. * * By default processes are launched with the current working directory * of the launching process at the time of launch. * * Params: * cwd = the cwd for launched processes * * Since: 2.40 */ public void setCwd(string cwd) { g_subprocess_launcher_set_cwd(gSubprocessLauncher, Str.toStringz(cwd)); } /** * Replace the entire environment of processes launched from this * launcher with the given 'environ' variable. * * Typically you will build this variable by using g_listenv() to copy * the process 'environ' and using the functions g_environ_setenv(), * g_environ_unsetenv(), etc. * * As an alternative, you can use g_subprocess_launcher_setenv(), * g_subprocess_launcher_unsetenv(), etc. * * Pass an empty array to set an empty environment. Pass %NULL to inherit the * parent process’ environment. As of GLib 2.54, the parent process’ environment * will be copied when g_subprocess_launcher_set_environ() is called. * Previously, it was copied when the subprocess was executed. This means the * copied environment may now be modified (using g_subprocess_launcher_setenv(), * etc.) before launching the subprocess. * * On UNIX, all strings in this array can be arbitrary byte strings. * On Windows, they should be in UTF-8. * * Params: * env = the replacement environment * * Since: 2.40 */ public void setEnviron(string[] env) { g_subprocess_launcher_set_environ(gSubprocessLauncher, Str.toStringzArray(env)); } /** * Sets the flags on the launcher. * * The default flags are %G_SUBPROCESS_FLAGS_NONE. * * You may not set flags that specify conflicting options for how to * handle a particular stdio stream (eg: specifying both * %G_SUBPROCESS_FLAGS_STDIN_PIPE and * %G_SUBPROCESS_FLAGS_STDIN_INHERIT). * * You may also not set a flag that conflicts with a previous call to a * function like g_subprocess_launcher_set_stdin_file_path() or * g_subprocess_launcher_take_stdout_fd(). * * Params: * flags = #GSubprocessFlags * * Since: 2.40 */ public void setFlags(GSubprocessFlags flags) { g_subprocess_launcher_set_flags(gSubprocessLauncher, flags); } /** * Sets the file path to use as the stderr for spawned processes. * * If @path is %NULL then any previously given path is unset. * * The file will be created or truncated when the process is spawned, as * would be the case if using '2>' at the shell. * * If you want to send both stdout and stderr to the same file then use * %G_SUBPROCESS_FLAGS_STDERR_MERGE. * * You may not set a stderr file path if a stderr fd is already set or * if the launcher flags contain any flags directing stderr elsewhere. * * This feature is only available on UNIX. * * Params: * path = a filename or %NULL * * Since: 2.40 */ public void setStderrFilePath(string path) { g_subprocess_launcher_set_stderr_file_path(gSubprocessLauncher, Str.toStringz(path)); } /** * Sets the file path to use as the stdin for spawned processes. * * If @path is %NULL then any previously given path is unset. * * The file must exist or spawning the process will fail. * * You may not set a stdin file path if a stdin fd is already set or if * the launcher flags contain any flags directing stdin elsewhere. * * This feature is only available on UNIX. * * Since: 2.40 */ public void setStdinFilePath(string path) { g_subprocess_launcher_set_stdin_file_path(gSubprocessLauncher, Str.toStringz(path)); } /** * Sets the file path to use as the stdout for spawned processes. * * If @path is %NULL then any previously given path is unset. * * The file will be created or truncated when the process is spawned, as * would be the case if using '>' at the shell. * * You may not set a stdout file path if a stdout fd is already set or * if the launcher flags contain any flags directing stdout elsewhere. * * This feature is only available on UNIX. * * Params: * path = a filename or %NULL * * Since: 2.40 */ public void setStdoutFilePath(string path) { g_subprocess_launcher_set_stdout_file_path(gSubprocessLauncher, Str.toStringz(path)); } /** * Sets the environment variable @variable in the environment of * processes launched from this launcher. * * On UNIX, both the variable's name and value can be arbitrary byte * strings, except that the variable's name cannot contain '='. * On Windows, they should be in UTF-8. * * Params: * variable = the environment variable to set, must not contain '=' * value = the new value for the variable * overwrite = whether to change the variable if it already exists * * Since: 2.40 */ public void setenv(string variable, string value, bool overwrite) { g_subprocess_launcher_setenv(gSubprocessLauncher, Str.toStringz(variable), Str.toStringz(value), overwrite); } /** * Creates a #GSubprocess given a provided array of arguments. * * Params: * argv = Command line arguments * * Returns: A new #GSubprocess, or %NULL on error (and @error will be set) * * Since: 2.40 * * Throws: GException on failure. */ public Subprocess spawnv(string[] argv) { GError* err = null; auto p = g_subprocess_launcher_spawnv(gSubprocessLauncher, Str.toStringzArray(argv), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Subprocess)(cast(GSubprocess*) p, true); } /** * Transfer an arbitrary file descriptor from parent process to the * child. This function takes "ownership" of the fd; it will be closed * in the parent when @self is freed. * * By default, all file descriptors from the parent will be closed. * This function allows you to create (for example) a custom pipe() or * socketpair() before launching the process, and choose the target * descriptor in the child. * * An example use case is GNUPG, which has a command line argument * --passphrase-fd providing a file descriptor number where it expects * the passphrase to be written. * * Params: * sourceFd = File descriptor in parent process * targetFd = Target descriptor for child process */ public void takeFd(int sourceFd, int targetFd) { g_subprocess_launcher_take_fd(gSubprocessLauncher, sourceFd, targetFd); } /** * Sets the file descriptor to use as the stderr for spawned processes. * * If @fd is -1 then any previously given fd is unset. * * Note that the default behaviour is to pass stderr through to the * stderr of the parent process. * * The passed @fd belongs to the #GSubprocessLauncher. It will be * automatically closed when the launcher is finalized. The file * descriptor will also be closed on the child side when executing the * spawned process. * * You may not set a stderr fd if a stderr file path is already set or * if the launcher flags contain any flags directing stderr elsewhere. * * This feature is only available on UNIX. * * Params: * fd = a file descriptor, or -1 * * Since: 2.40 */ public void takeStderrFd(int fd) { g_subprocess_launcher_take_stderr_fd(gSubprocessLauncher, fd); } /** * Sets the file descriptor to use as the stdin for spawned processes. * * If @fd is -1 then any previously given fd is unset. * * Note that if your intention is to have the stdin of the calling * process inherited by the child then %G_SUBPROCESS_FLAGS_STDIN_INHERIT * is a better way to go about doing that. * * The passed @fd is noted but will not be touched in the current * process. It is therefore necessary that it be kept open by the * caller until the subprocess is spawned. The file descriptor will * also not be explicitly closed on the child side, so it must be marked * O_CLOEXEC if that's what you want. * * You may not set a stdin fd if a stdin file path is already set or if * the launcher flags contain any flags directing stdin elsewhere. * * This feature is only available on UNIX. * * Params: * fd = a file descriptor, or -1 * * Since: 2.40 */ public void takeStdinFd(int fd) { g_subprocess_launcher_take_stdin_fd(gSubprocessLauncher, fd); } /** * Sets the file descriptor to use as the stdout for spawned processes. * * If @fd is -1 then any previously given fd is unset. * * Note that the default behaviour is to pass stdout through to the * stdout of the parent process. * * The passed @fd is noted but will not be touched in the current * process. It is therefore necessary that it be kept open by the * caller until the subprocess is spawned. The file descriptor will * also not be explicitly closed on the child side, so it must be marked * O_CLOEXEC if that's what you want. * * You may not set a stdout fd if a stdout file path is already set or * if the launcher flags contain any flags directing stdout elsewhere. * * This feature is only available on UNIX. * * Params: * fd = a file descriptor, or -1 * * Since: 2.40 */ public void takeStdoutFd(int fd) { g_subprocess_launcher_take_stdout_fd(gSubprocessLauncher, fd); } /** * Removes the environment variable @variable from the environment of * processes launched from this launcher. * * On UNIX, the variable's name can be an arbitrary byte string not * containing '='. On Windows, it should be in UTF-8. * * Params: * variable = the environment variable to unset, must not contain '=' * * Since: 2.40 */ public void unsetenv(string variable) { g_subprocess_launcher_unsetenv(gSubprocessLauncher, Str.toStringz(variable)); } } GtkD-3.7.5/generated/gtkd/gio/Task.d000066400000000000000000001060311324604450400170760ustar00rootroot00000000000000/* * 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 gio.Task; private import gio.AsyncResultIF; private import gio.AsyncResultT; private import gio.Cancellable; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.MainContext; private import glib.Source; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * A #GTask represents and manages a cancellable "task". * * ## Asynchronous operations * * The most common usage of #GTask is as a #GAsyncResult, to * manage data during an asynchronous operation. You call * g_task_new() in the "start" method, followed by * g_task_set_task_data() and the like if you need to keep some * additional data associated with the task, and then pass the * task object around through your asynchronous operation. * Eventually, you will call a method such as * g_task_return_pointer() or g_task_return_error(), which will * save the value you give it and then invoke the task's callback * function (waiting until the next iteration of the main * loop first, if necessary). The caller will pass the #GTask back * to the operation's finish function (as a #GAsyncResult), and * you can use g_task_propagate_pointer() or the like to extract * the return value. * * Here is an example for using GTask as a GAsyncResult: * |[ * typedef struct { * CakeFrostingType frosting; * char *message; * } DecorationData; * * static void * decoration_data_free (DecorationData *decoration) * { * g_free (decoration->message); * g_slice_free (DecorationData, decoration); * } * * static void * baked_cb (Cake *cake, * gpointer user_data) * { * GTask *task = user_data; * DecorationData *decoration = g_task_get_task_data (task); * GError *error = NULL; * * if (cake == NULL) * { * g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_NO_FLOUR, * "Go to the supermarket"); * g_object_unref (task); * return; * } * * if (!cake_decorate (cake, decoration->frosting, decoration->message, &error)) * { * g_object_unref (cake); * // g_task_return_error() takes ownership of error * g_task_return_error (task, error); * g_object_unref (task); * return; * } * * g_task_return_pointer (task, cake, g_object_unref); * g_object_unref (task); * } * * void * baker_bake_cake_async (Baker *self, * guint radius, * CakeFlavor flavor, * CakeFrostingType frosting, * const char *message, * GCancellable *cancellable, * GAsyncReadyCallback callback, * gpointer user_data) * { * GTask *task; * DecorationData *decoration; * Cake *cake; * * task = g_task_new (self, cancellable, callback, user_data); * if (radius < 3) * { * g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_TOO_SMALL, * "%ucm radius cakes are silly", * radius); * g_object_unref (task); * return; * } * * cake = _baker_get_cached_cake (self, radius, flavor, frosting, message); * if (cake != NULL) * { * // _baker_get_cached_cake() returns a reffed cake * g_task_return_pointer (task, cake, g_object_unref); * g_object_unref (task); * return; * } * * decoration = g_slice_new (DecorationData); * decoration->frosting = frosting; * decoration->message = g_strdup (message); * g_task_set_task_data (task, decoration, (GDestroyNotify) decoration_data_free); * * _baker_begin_cake (self, radius, flavor, cancellable, baked_cb, task); * } * * Cake * * baker_bake_cake_finish (Baker *self, * GAsyncResult *result, * GError **error) * { * g_return_val_if_fail (g_task_is_valid (result, self), NULL); * * return g_task_propagate_pointer (G_TASK (result), error); * } * ]| * * ## Chained asynchronous operations * * #GTask also tries to simplify asynchronous operations that * internally chain together several smaller asynchronous * operations. g_task_get_cancellable(), g_task_get_context(), * and g_task_get_priority() allow you to get back the task's * #GCancellable, #GMainContext, and [I/O priority][io-priority] * when starting a new subtask, so you don't have to keep track * of them yourself. g_task_attach_source() simplifies the case * of waiting for a source to fire (automatically using the correct * #GMainContext and priority). * * Here is an example for chained asynchronous operations: * |[ * typedef struct { * Cake *cake; * CakeFrostingType frosting; * char *message; * } BakingData; * * static void * decoration_data_free (BakingData *bd) * { * if (bd->cake) * g_object_unref (bd->cake); * g_free (bd->message); * g_slice_free (BakingData, bd); * } * * static void * decorated_cb (Cake *cake, * GAsyncResult *result, * gpointer user_data) * { * GTask *task = user_data; * GError *error = NULL; * * if (!cake_decorate_finish (cake, result, &error)) * { * g_object_unref (cake); * g_task_return_error (task, error); * g_object_unref (task); * return; * } * * // baking_data_free() will drop its ref on the cake, so we have to * // take another here to give to the caller. * g_task_return_pointer (task, g_object_ref (cake), g_object_unref); * g_object_unref (task); * } * * static gboolean * decorator_ready (gpointer user_data) * { * GTask *task = user_data; * BakingData *bd = g_task_get_task_data (task); * * cake_decorate_async (bd->cake, bd->frosting, bd->message, * g_task_get_cancellable (task), * decorated_cb, task); * * return G_SOURCE_REMOVE; * } * * static void * baked_cb (Cake *cake, * gpointer user_data) * { * GTask *task = user_data; * BakingData *bd = g_task_get_task_data (task); * GError *error = NULL; * * if (cake == NULL) * { * g_task_return_new_error (task, BAKER_ERROR, BAKER_ERROR_NO_FLOUR, * "Go to the supermarket"); * g_object_unref (task); * return; * } * * bd->cake = cake; * * // Bail out now if the user has already cancelled * if (g_task_return_error_if_cancelled (task)) * { * g_object_unref (task); * return; * } * * if (cake_decorator_available (cake)) * decorator_ready (task); * else * { * GSource *source; * * source = cake_decorator_wait_source_new (cake); * // Attach @source to @task's GMainContext and have it call * // decorator_ready() when it is ready. * g_task_attach_source (task, source, decorator_ready); * g_source_unref (source); * } * } * * void * baker_bake_cake_async (Baker *self, * guint radius, * CakeFlavor flavor, * CakeFrostingType frosting, * const char *message, * gint priority, * GCancellable *cancellable, * GAsyncReadyCallback callback, * gpointer user_data) * { * GTask *task; * BakingData *bd; * * task = g_task_new (self, cancellable, callback, user_data); * g_task_set_priority (task, priority); * * bd = g_slice_new0 (BakingData); * bd->frosting = frosting; * bd->message = g_strdup (message); * g_task_set_task_data (task, bd, (GDestroyNotify) baking_data_free); * * _baker_begin_cake (self, radius, flavor, cancellable, baked_cb, task); * } * * Cake * * baker_bake_cake_finish (Baker *self, * GAsyncResult *result, * GError **error) * { * g_return_val_if_fail (g_task_is_valid (result, self), NULL); * * return g_task_propagate_pointer (G_TASK (result), error); * } * ]| * * ## Asynchronous operations from synchronous ones * * You can use g_task_run_in_thread() to turn a synchronous * operation into an asynchronous one, by running it in a thread * which will then dispatch the result back to the caller's * #GMainContext when it completes. * * Running a task in a thread: * |[ * typedef struct { * guint radius; * CakeFlavor flavor; * CakeFrostingType frosting; * char *message; * } CakeData; * * static void * cake_data_free (CakeData *cake_data) * { * g_free (cake_data->message); * g_slice_free (CakeData, cake_data); * } * * static void * bake_cake_thread (GTask *task, * gpointer source_object, * gpointer task_data, * GCancellable *cancellable) * { * Baker *self = source_object; * CakeData *cake_data = task_data; * Cake *cake; * GError *error = NULL; * * cake = bake_cake (baker, cake_data->radius, cake_data->flavor, * cake_data->frosting, cake_data->message, * cancellable, &error); * if (cake) * g_task_return_pointer (task, cake, g_object_unref); * else * g_task_return_error (task, error); * } * * void * baker_bake_cake_async (Baker *self, * guint radius, * CakeFlavor flavor, * CakeFrostingType frosting, * const char *message, * GCancellable *cancellable, * GAsyncReadyCallback callback, * gpointer user_data) * { * CakeData *cake_data; * GTask *task; * * cake_data = g_slice_new (CakeData); * cake_data->radius = radius; * cake_data->flavor = flavor; * cake_data->frosting = frosting; * cake_data->message = g_strdup (message); * task = g_task_new (self, cancellable, callback, user_data); * g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free); * g_task_run_in_thread (task, bake_cake_thread); * g_object_unref (task); * } * * Cake * * baker_bake_cake_finish (Baker *self, * GAsyncResult *result, * GError **error) * { * g_return_val_if_fail (g_task_is_valid (result, self), NULL); * * return g_task_propagate_pointer (G_TASK (result), error); * } * ]| * * ## Adding cancellability to uncancellable tasks * * Finally, g_task_run_in_thread() and g_task_run_in_thread_sync() * can be used to turn an uncancellable operation into a * cancellable one. If you call g_task_set_return_on_cancel(), * passing %TRUE, then if the task's #GCancellable is cancelled, * it will return control back to the caller immediately, while * allowing the task thread to continue running in the background * (and simply discarding its result when it finally does finish). * Provided that the task thread is careful about how it uses * locks and other externally-visible resources, this allows you * to make "GLib-friendly" asynchronous and cancellable * synchronous variants of blocking APIs. * * Cancelling a task: * |[ * static void * bake_cake_thread (GTask *task, * gpointer source_object, * gpointer task_data, * GCancellable *cancellable) * { * Baker *self = source_object; * CakeData *cake_data = task_data; * Cake *cake; * GError *error = NULL; * * cake = bake_cake (baker, cake_data->radius, cake_data->flavor, * cake_data->frosting, cake_data->message, * &error); * if (error) * { * g_task_return_error (task, error); * return; * } * * // If the task has already been cancelled, then we don't want to add * // the cake to the cake cache. Likewise, we don't want to have the * // task get cancelled in the middle of updating the cache. * // g_task_set_return_on_cancel() will return %TRUE here if it managed * // to disable return-on-cancel, or %FALSE if the task was cancelled * // before it could. * if (g_task_set_return_on_cancel (task, FALSE)) * { * // If the caller cancels at this point, their * // GAsyncReadyCallback won't be invoked until we return, * // so we don't have to worry that this code will run at * // the same time as that code does. But if there were * // other functions that might look at the cake cache, * // then we'd probably need a GMutex here as well. * baker_add_cake_to_cache (baker, cake); * g_task_return_pointer (task, cake, g_object_unref); * } * } * * void * baker_bake_cake_async (Baker *self, * guint radius, * CakeFlavor flavor, * CakeFrostingType frosting, * const char *message, * GCancellable *cancellable, * GAsyncReadyCallback callback, * gpointer user_data) * { * CakeData *cake_data; * GTask *task; * * cake_data = g_slice_new (CakeData); * * ... * * task = g_task_new (self, cancellable, callback, user_data); * g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free); * g_task_set_return_on_cancel (task, TRUE); * g_task_run_in_thread (task, bake_cake_thread); * } * * Cake * * baker_bake_cake_sync (Baker *self, * guint radius, * CakeFlavor flavor, * CakeFrostingType frosting, * const char *message, * GCancellable *cancellable, * GError **error) * { * CakeData *cake_data; * GTask *task; * Cake *cake; * * cake_data = g_slice_new (CakeData); * * ... * * task = g_task_new (self, cancellable, NULL, NULL); * g_task_set_task_data (task, cake_data, (GDestroyNotify) cake_data_free); * g_task_set_return_on_cancel (task, TRUE); * g_task_run_in_thread_sync (task, bake_cake_thread); * * cake = g_task_propagate_pointer (task, error); * g_object_unref (task); * return cake; * } * ]| * * ## Porting from GSimpleAsyncResult * * #GTask's API attempts to be simpler than #GSimpleAsyncResult's * in several ways: * - You can save task-specific data with g_task_set_task_data(), and * retrieve it later with g_task_get_task_data(). This replaces the * abuse of g_simple_async_result_set_op_res_gpointer() for the same * purpose with #GSimpleAsyncResult. * - In addition to the task data, #GTask also keeps track of the * [priority][io-priority], #GCancellable, and * #GMainContext associated with the task, so tasks that consist of * a chain of simpler asynchronous operations will have easy access * to those values when starting each sub-task. * - g_task_return_error_if_cancelled() provides simplified * handling for cancellation. In addition, cancellation * overrides any other #GTask return value by default, like * #GSimpleAsyncResult does when * g_simple_async_result_set_check_cancellable() is called. * (You can use g_task_set_check_cancellable() to turn off that * behavior.) On the other hand, g_task_run_in_thread() * guarantees that it will always run your * `task_func`, even if the task's #GCancellable * is already cancelled before the task gets a chance to run; * you can start your `task_func` with a * g_task_return_error_if_cancelled() check if you need the * old behavior. * - The "return" methods (eg, g_task_return_pointer()) * automatically cause the task to be "completed" as well, and * there is no need to worry about the "complete" vs "complete * in idle" distinction. (#GTask automatically figures out * whether the task's callback can be invoked directly, or * if it needs to be sent to another #GMainContext, or delayed * until the next iteration of the current #GMainContext.) * - The "finish" functions for #GTask-based operations are generally * much simpler than #GSimpleAsyncResult ones, normally consisting * of only a single call to g_task_propagate_pointer() or the like. * Since g_task_propagate_pointer() "steals" the return value from * the #GTask, it is not necessary to juggle pointers around to * prevent it from being freed twice. * - With #GSimpleAsyncResult, it was common to call * g_simple_async_result_propagate_error() from the * `_finish()` wrapper function, and have * virtual method implementations only deal with successful * returns. This behavior is deprecated, because it makes it * difficult for a subclass to chain to a parent class's async * methods. Instead, the wrapper function should just be a * simple wrapper, and the virtual method should call an * appropriate `g_task_propagate_` function. * Note that wrapper methods can now use * g_async_result_legacy_propagate_error() to do old-style * #GSimpleAsyncResult error-returning behavior, and * g_async_result_is_tagged() to check if a result is tagged as * having come from the `_async()` wrapper * function (for "short-circuit" results, such as when passing * 0 to g_input_stream_read_async()). */ public class Task : ObjectG, AsyncResultIF { /** the main Gtk struct */ protected GTask* gTask; /** Get the main Gtk struct */ public GTask* getTaskStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTask; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTask; } protected override void setStruct(GObject* obj) { gTask = cast(GTask*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTask* gTask, bool ownedRef = false) { this.gTask = gTask; super(cast(GObject*)gTask, ownedRef); } // add the AsyncResult capabilities mixin AsyncResultT!(GTask); /** */ public static GType getType() { return g_task_get_type(); } /** * Creates a #GTask acting on @source_object, which will eventually be * used to invoke @callback in the current * [thread-default main context][g-main-context-push-thread-default]. * * Call this in the "start" method of your asynchronous method, and * pass the #GTask around throughout the asynchronous operation. You * can use g_task_set_task_data() to attach task-specific data to the * object, which you can retrieve later via g_task_get_task_data(). * * By default, if @cancellable is cancelled, then the return value of * the task will always be %G_IO_ERROR_CANCELLED, even if the task had * already completed before the cancellation. This allows for * simplified handling in cases where cancellation may imply that * other objects that the task depends on have been destroyed. If you * do not want this behavior, you can use * g_task_set_check_cancellable() to change it. * * Params: * sourceObject = the #GObject that owns * this task, or %NULL. * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback. * callbackData = user data passed to @callback. * * Returns: a #GTask. * * Since: 2.36 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ObjectG sourceObject, Cancellable cancellable, GAsyncReadyCallback callback, void* callbackData) { auto p = g_task_new((sourceObject is null) ? null : sourceObject.getObjectGStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, callbackData); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GTask*) p, true); } /** * Checks that @result is a #GTask, and that @source_object is its * source object (or that @source_object is %NULL and @result has no * source object). This can be used in g_return_if_fail() checks. * * Params: * result = A #GAsyncResult * sourceObject = the source object * expected to be associated with the task * * Returns: %TRUE if @result and @source_object are valid, %FALSE * if not * * Since: 2.36 */ public static bool isValid(AsyncResultIF result, ObjectG sourceObject) { return g_task_is_valid((result is null) ? null : result.getAsyncResultStruct(), (sourceObject is null) ? null : sourceObject.getObjectGStruct()) != 0; } /** * Creates a #GTask and then immediately calls g_task_return_error() * on it. Use this in the wrapper function of an asynchronous method * when you want to avoid even calling the virtual method. You can * then use g_async_result_is_tagged() in the finish method wrapper to * check if the result there is tagged as having been created by the * wrapper method, and deal with it appropriately if so. * * See also g_task_report_new_error(). * * Params: * sourceObject = the #GObject that owns * this task, or %NULL. * callback = a #GAsyncReadyCallback. * callbackData = user data passed to @callback. * sourceTag = an opaque pointer indicating the source of this task * error = error to report * * Since: 2.36 */ public static void reportError(ObjectG sourceObject, GAsyncReadyCallback callback, void* callbackData, void* sourceTag, ErrorG error) { g_task_report_error((sourceObject is null) ? null : sourceObject.getObjectGStruct(), callback, callbackData, sourceTag, (error is null) ? null : error.getErrorGStruct(true)); } /** * A utility function for dealing with async operations where you need * to wait for a #GSource to trigger. Attaches @source to @task's * #GMainContext with @task's [priority][io-priority], and sets @source's * callback to @callback, with @task as the callback's `user_data`. * * This takes a reference on @task until @source is destroyed. * * Params: * source = the source to attach * callback = the callback to invoke when @source triggers * * Since: 2.36 */ public void attachSource(Source source, GSourceFunc callback) { g_task_attach_source(gTask, (source is null) ? null : source.getSourceStruct(), callback); } /** * Gets @task's #GCancellable * * Returns: @task's #GCancellable * * Since: 2.36 */ public Cancellable getCancellable() { auto p = g_task_get_cancellable(gTask); if(p is null) { return null; } return ObjectG.getDObject!(Cancellable)(cast(GCancellable*) p); } /** * Gets @task's check-cancellable flag. See * g_task_set_check_cancellable() for more details. * * Since: 2.36 */ public bool getCheckCancellable() { return g_task_get_check_cancellable(gTask) != 0; } /** * Gets the value of #GTask:completed. This changes from %FALSE to %TRUE after * the task’s callback is invoked, and will return %FALSE if called from inside * the callback. * * Returns: %TRUE if the task has completed, %FALSE otherwise. * * Since: 2.44 */ public bool getCompleted() { return g_task_get_completed(gTask) != 0; } /** * Gets the #GMainContext that @task will return its result in (that * is, the context that was the * [thread-default main context][g-main-context-push-thread-default] * at the point when @task was created). * * This will always return a non-%NULL value, even if the task's * context is the default #GMainContext. * * Returns: @task's #GMainContext * * Since: 2.36 */ public MainContext getContext() { auto p = g_task_get_context(gTask); if(p is null) { return null; } return new MainContext(cast(GMainContext*) p); } /** * Gets @task's priority * * Returns: @task's priority * * Since: 2.36 */ public int getPriority() { return g_task_get_priority(gTask); } /** * Gets @task's return-on-cancel flag. See * g_task_set_return_on_cancel() for more details. * * Since: 2.36 */ public bool getReturnOnCancel() { return g_task_get_return_on_cancel(gTask) != 0; } /** * Gets the source object from @task. Like * g_async_result_get_source_object(), but does not ref the object. * * Returns: @task's source object, or %NULL * * Since: 2.36 */ public ObjectG getSourceObject() { auto p = g_task_get_source_object(gTask); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); } /** * Gets @task's source tag. See g_task_set_source_tag(). * * Returns: @task's source tag * * Since: 2.36 */ public void* getSourceTag() { return g_task_get_source_tag(gTask); } /** * Gets @task's `task_data`. * * Returns: @task's `task_data`. * * Since: 2.36 */ public void* getTaskData() { return g_task_get_task_data(gTask); } /** * Tests if @task resulted in an error. * * Returns: %TRUE if the task resulted in an error, %FALSE otherwise. * * Since: 2.36 */ public bool hadError() { return g_task_had_error(gTask) != 0; } /** * Gets the result of @task as a #gboolean. * * If the task resulted in an error, or was cancelled, then this will * instead return %FALSE and set @error. * * Since this method transfers ownership of the return value (or * error) to the caller, you may only call it once. * * Returns: the task result, or %FALSE on error * * Since: 2.36 * * Throws: GException on failure. */ public bool propagateBoolean() { GError* err = null; auto p = g_task_propagate_boolean(gTask, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the result of @task as an integer (#gssize). * * If the task resulted in an error, or was cancelled, then this will * instead return -1 and set @error. * * Since this method transfers ownership of the return value (or * error) to the caller, you may only call it once. * * Returns: the task result, or -1 on error * * Since: 2.36 * * Throws: GException on failure. */ public ptrdiff_t propagateInt() { GError* err = null; auto p = g_task_propagate_int(gTask, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the result of @task as a pointer, and transfers ownership * of that value to the caller. * * If the task resulted in an error, or was cancelled, then this will * instead return %NULL and set @error. * * Since this method transfers ownership of the return value (or * error) to the caller, you may only call it once. * * Returns: the task result, or %NULL on error * * Since: 2.36 * * Throws: GException on failure. */ public void* propagatePointer() { GError* err = null; auto p = g_task_propagate_pointer(gTask, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets @task's result to @result and completes the task (see * g_task_return_pointer() for more discussion of exactly what this * means). * * Params: * result = the #gboolean result of a task function. * * Since: 2.36 */ public void returnBoolean(bool result) { g_task_return_boolean(gTask, result); } /** * Sets @task's result to @error (which @task assumes ownership of) * and completes the task (see g_task_return_pointer() for more * discussion of exactly what this means). * * Note that since the task takes ownership of @error, and since the * task may be completed before returning from g_task_return_error(), * you cannot assume that @error is still valid after calling this. * Call g_error_copy() on the error if you need to keep a local copy * as well. * * See also g_task_return_new_error(). * * Params: * error = the #GError result of a task function. * * Since: 2.36 */ public void returnError(ErrorG error) { g_task_return_error(gTask, (error is null) ? null : error.getErrorGStruct(true)); } /** * Checks if @task's #GCancellable has been cancelled, and if so, sets * @task's error accordingly and completes the task (see * g_task_return_pointer() for more discussion of exactly what this * means). * * Returns: %TRUE if @task has been cancelled, %FALSE if not * * Since: 2.36 */ public bool returnErrorIfCancelled() { return g_task_return_error_if_cancelled(gTask) != 0; } /** * Sets @task's result to @result and completes the task (see * g_task_return_pointer() for more discussion of exactly what this * means). * * Params: * result = the integer (#gssize) result of a task function. * * Since: 2.36 */ public void returnInt(ptrdiff_t result) { g_task_return_int(gTask, result); } /** * Sets @task's result to @result and completes the task. If @result * is not %NULL, then @result_destroy will be used to free @result if * the caller does not take ownership of it with * g_task_propagate_pointer(). * * "Completes the task" means that for an ordinary asynchronous task * it will either invoke the task's callback, or else queue that * callback to be invoked in the proper #GMainContext, or in the next * iteration of the current #GMainContext. For a task run via * g_task_run_in_thread() or g_task_run_in_thread_sync(), calling this * method will save @result to be returned to the caller later, but * the task will not actually be completed until the #GTaskThreadFunc * exits. * * Note that since the task may be completed before returning from * g_task_return_pointer(), you cannot assume that @result is still * valid after calling this, unless you are still holding another * reference on it. * * Params: * result = the pointer result of a task * function * resultDestroy = a #GDestroyNotify function. * * Since: 2.36 */ public void returnPointer(void* result, GDestroyNotify resultDestroy) { g_task_return_pointer(gTask, result, resultDestroy); } /** * Runs @task_func in another thread. When @task_func returns, @task's * #GAsyncReadyCallback will be invoked in @task's #GMainContext. * * This takes a ref on @task until the task completes. * * See #GTaskThreadFunc for more details about how @task_func is handled. * * Although GLib currently rate-limits the tasks queued via * g_task_run_in_thread(), you should not assume that it will always * do this. If you have a very large number of tasks to run, but don't * want them to all run at once, you should only queue a limited * number of them at a time. * * Params: * taskFunc = a #GTaskThreadFunc * * Since: 2.36 */ public void runInThread(GTaskThreadFunc taskFunc) { g_task_run_in_thread(gTask, taskFunc); } /** * Runs @task_func in another thread, and waits for it to return or be * cancelled. You can use g_task_propagate_pointer(), etc, afterward * to get the result of @task_func. * * See #GTaskThreadFunc for more details about how @task_func is handled. * * Normally this is used with tasks created with a %NULL * `callback`, but note that even if the task does * have a callback, it will not be invoked when @task_func returns. * #GTask:completed will be set to %TRUE just before this function returns. * * Although GLib currently rate-limits the tasks queued via * g_task_run_in_thread_sync(), you should not assume that it will * always do this. If you have a very large number of tasks to run, * but don't want them to all run at once, you should only queue a * limited number of them at a time. * * Params: * taskFunc = a #GTaskThreadFunc * * Since: 2.36 */ public void runInThreadSync(GTaskThreadFunc taskFunc) { g_task_run_in_thread_sync(gTask, taskFunc); } /** * Sets or clears @task's check-cancellable flag. If this is %TRUE * (the default), then g_task_propagate_pointer(), etc, and * g_task_had_error() will check the task's #GCancellable first, and * if it has been cancelled, then they will consider the task to have * returned an "Operation was cancelled" error * (%G_IO_ERROR_CANCELLED), regardless of any other error or return * value the task may have had. * * If @check_cancellable is %FALSE, then the #GTask will not check the * cancellable itself, and it is up to @task's owner to do this (eg, * via g_task_return_error_if_cancelled()). * * If you are using g_task_set_return_on_cancel() as well, then * you must leave check-cancellable set %TRUE. * * Params: * checkCancellable = whether #GTask will check the state of * its #GCancellable for you. * * Since: 2.36 */ public void setCheckCancellable(bool checkCancellable) { g_task_set_check_cancellable(gTask, checkCancellable); } /** * Sets @task's priority. If you do not call this, it will default to * %G_PRIORITY_DEFAULT. * * This will affect the priority of #GSources created with * g_task_attach_source() and the scheduling of tasks run in threads, * and can also be explicitly retrieved later via * g_task_get_priority(). * * Params: * priority = the [priority][io-priority] of the request * * Since: 2.36 */ public void setPriority(int priority) { g_task_set_priority(gTask, priority); } /** * Sets or clears @task's return-on-cancel flag. This is only * meaningful for tasks run via g_task_run_in_thread() or * g_task_run_in_thread_sync(). * * If @return_on_cancel is %TRUE, then cancelling @task's * #GCancellable will immediately cause it to return, as though the * task's #GTaskThreadFunc had called * g_task_return_error_if_cancelled() and then returned. * * This allows you to create a cancellable wrapper around an * uninterruptable function. The #GTaskThreadFunc just needs to be * careful that it does not modify any externally-visible state after * it has been cancelled. To do that, the thread should call * g_task_set_return_on_cancel() again to (atomically) set * return-on-cancel %FALSE before making externally-visible changes; * if the task gets cancelled before the return-on-cancel flag could * be changed, g_task_set_return_on_cancel() will indicate this by * returning %FALSE. * * You can disable and re-enable this flag multiple times if you wish. * If the task's #GCancellable is cancelled while return-on-cancel is * %FALSE, then calling g_task_set_return_on_cancel() to set it %TRUE * again will cause the task to be cancelled at that point. * * If the task's #GCancellable is already cancelled before you call * g_task_run_in_thread()/g_task_run_in_thread_sync(), then the * #GTaskThreadFunc will still be run (for consistency), but the task * will also be completed right away. * * Params: * returnOnCancel = whether the task returns automatically when * it is cancelled. * * Returns: %TRUE if @task's return-on-cancel flag was changed to * match @return_on_cancel. %FALSE if @task has already been * cancelled. * * Since: 2.36 */ public bool setReturnOnCancel(bool returnOnCancel) { return g_task_set_return_on_cancel(gTask, returnOnCancel) != 0; } /** * Sets @task's source tag. You can use this to tag a task return * value with a particular pointer (usually a pointer to the function * doing the tagging) and then later check it using * g_task_get_source_tag() (or g_async_result_is_tagged()) in the * task's "finish" function, to figure out if the response came from a * particular place. * * Params: * sourceTag = an opaque pointer indicating the source of this task * * Since: 2.36 */ public void setSourceTag(void* sourceTag) { g_task_set_source_tag(gTask, sourceTag); } /** * Sets @task's task data (freeing the existing task data, if any). * * Params: * taskData = task-specific data * taskDataDestroy = #GDestroyNotify for @task_data * * Since: 2.36 */ public void setTaskData(void* taskData, GDestroyNotify taskDataDestroy) { g_task_set_task_data(gTask, taskData, taskDataDestroy); } } GtkD-3.7.5/generated/gtkd/gio/TcpConnection.d000066400000000000000000000063341324604450400207470ustar00rootroot00000000000000/* * 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 gio.TcpConnection; private import gio.SocketConnection; private import gio.c.functions; public import gio.c.types; public import gtkc.giotypes; /** * This is the subclass of #GSocketConnection that is created * for TCP/IP sockets. * * Since: 2.22 */ public class TcpConnection : SocketConnection { /** the main Gtk struct */ protected GTcpConnection* gTcpConnection; /** Get the main Gtk struct */ public GTcpConnection* getTcpConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTcpConnection; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTcpConnection; } protected override void setStruct(GObject* obj) { gTcpConnection = cast(GTcpConnection*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTcpConnection* gTcpConnection, bool ownedRef = false) { this.gTcpConnection = gTcpConnection; super(cast(GSocketConnection*)gTcpConnection, ownedRef); } /** */ public static GType getType() { return g_tcp_connection_get_type(); } /** * Checks if graceful disconnects are used. See * g_tcp_connection_set_graceful_disconnect(). * * Returns: %TRUE if graceful disconnect is used on close, %FALSE otherwise * * Since: 2.22 */ public bool getGracefulDisconnect() { return g_tcp_connection_get_graceful_disconnect(gTcpConnection) != 0; } /** * This enables graceful disconnects on close. A graceful disconnect * means that we signal the receiving end that the connection is terminated * and wait for it to close the connection before closing the connection. * * A graceful disconnect means that we can be sure that we successfully sent * all the outstanding data to the other end, or get an error reported. * However, it also means we have to wait for all the data to reach the * other side and for it to acknowledge this by closing the socket, which may * take a while. For this reason it is disabled by default. * * Params: * gracefulDisconnect = Whether to do graceful disconnects or not * * Since: 2.22 */ public void setGracefulDisconnect(bool gracefulDisconnect) { g_tcp_connection_set_graceful_disconnect(gTcpConnection, gracefulDisconnect); } } GtkD-3.7.5/generated/gtkd/gio/TcpWrapperConnection.d000066400000000000000000000070211324604450400223020ustar00rootroot00000000000000/* * 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 gio.TcpWrapperConnection; private import gio.IOStream; private import gio.Socket; private import gio.SocketConnection; private import gio.TcpConnection; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * A #GTcpWrapperConnection can be used to wrap a #GIOStream that is * based on a #GSocket, but which is not actually a * #GSocketConnection. This is used by #GSocketClient so that it can * always return a #GSocketConnection, even when the connection it has * actually created is not directly a #GSocketConnection. */ public class TcpWrapperConnection : TcpConnection { /** the main Gtk struct */ protected GTcpWrapperConnection* gTcpWrapperConnection; /** Get the main Gtk struct */ public GTcpWrapperConnection* getTcpWrapperConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTcpWrapperConnection; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTcpWrapperConnection; } protected override void setStruct(GObject* obj) { gTcpWrapperConnection = cast(GTcpWrapperConnection*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTcpWrapperConnection* gTcpWrapperConnection, bool ownedRef = false) { this.gTcpWrapperConnection = gTcpWrapperConnection; super(cast(GTcpConnection*)gTcpWrapperConnection, ownedRef); } /** */ public static GType getType() { return g_tcp_wrapper_connection_get_type(); } /** * Wraps @base_io_stream and @socket together as a #GSocketConnection. * * Params: * baseIoStream = the #GIOStream to wrap * socket = the #GSocket associated with @base_io_stream * * Returns: the new #GSocketConnection. * * Since: 2.28 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(IOStream baseIoStream, Socket socket) { auto p = g_tcp_wrapper_connection_new((baseIoStream is null) ? null : baseIoStream.getIOStreamStruct(), (socket is null) ? null : socket.getSocketStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GTcpWrapperConnection*) p, true); } /** * Get's @conn's base #GIOStream * * Returns: @conn's base #GIOStream */ public IOStream getBaseIoStream() { auto p = g_tcp_wrapper_connection_get_base_io_stream(gTcpWrapperConnection); if(p is null) { return null; } return ObjectG.getDObject!(IOStream)(cast(GIOStream*) p); } } GtkD-3.7.5/generated/gtkd/gio/TestDBus.d000066400000000000000000000205741324604450400177000ustar00rootroot00000000000000/* * 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 gio.TestDBus; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * A helper class for testing code which uses D-Bus without touching the user's * session bus. * * Note that #GTestDBus modifies the user’s environment, calling setenv(). * This is not thread-safe, so all #GTestDBus calls should be completed before * threads are spawned, or should have appropriate locking to ensure no access * conflicts to environment variables shared between #GTestDBus and other * threads. * * ## Creating unit tests using GTestDBus * * Testing of D-Bus services can be tricky because normally we only ever run * D-Bus services over an existing instance of the D-Bus daemon thus we * usually don't activate D-Bus services that are not yet installed into the * target system. The #GTestDBus object makes this easier for us by taking care * of the lower level tasks such as running a private D-Bus daemon and looking * up uninstalled services in customizable locations, typically in your source * code tree. * * The first thing you will need is a separate service description file for the * D-Bus daemon. Typically a `services` subdirectory of your `tests` directory * is a good place to put this file. * * The service file should list your service along with an absolute path to the * uninstalled service executable in your source tree. Using autotools we would * achieve this by adding a file such as `my-server.service.in` in the services * directory and have it processed by configure. * |[ * [D-BUS Service] * Name=org.gtk.GDBus.Examples.ObjectManager * Exec=@abs_top_builddir@/gio/tests/gdbus-example-objectmanager-server * ]| * You will also need to indicate this service directory in your test * fixtures, so you will need to pass the path while compiling your * test cases. Typically this is done with autotools with an added * preprocessor flag specified to compile your tests such as: * |[ * -DTEST_SERVICES=\""$(abs_top_builddir)/tests/services"\" * ]| * Once you have a service definition file which is local to your source tree, * you can proceed to set up a GTest fixture using the #GTestDBus scaffolding. * * An example of a test fixture for D-Bus services can be found * here: * [gdbus-test-fixture.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-test-fixture.c) * * Note that these examples only deal with isolating the D-Bus aspect of your * service. To successfully run isolated unit tests on your service you may need * some additional modifications to your test case fixture. For example; if your * service uses GSettings and installs a schema then it is important that your test service * not load the schema in the ordinary installed location (chances are that your service * and schema files are not yet installed, or worse; there is an older version of the * schema file sitting in the install location). * * Most of the time we can work around these obstacles using the * environment. Since the environment is inherited by the D-Bus daemon * created by #GTestDBus and then in turn inherited by any services the * D-Bus daemon activates, using the setup routine for your fixture is * a practical place to help sandbox your runtime environment. For the * rather typical GSettings case we can work around this by setting * `GSETTINGS_SCHEMA_DIR` to the in tree directory holding your schemas * in the above fixture_setup() routine. * * The GSettings schemas need to be locally pre-compiled for this to work. This can be achieved * by compiling the schemas locally as a step before running test cases, an autotools setup might * do the following in the directory holding schemas: * |[ * all-am: * $(GLIB_COMPILE_SCHEMAS) . * * CLEANFILES += gschemas.compiled * ]| * * Since: 2.34 */ public class TestDBus : ObjectG { /** the main Gtk struct */ protected GTestDBus* gTestDBus; /** Get the main Gtk struct */ public GTestDBus* getTestDBusStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTestDBus; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTestDBus; } protected override void setStruct(GObject* obj) { gTestDBus = cast(GTestDBus*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTestDBus* gTestDBus, bool ownedRef = false) { this.gTestDBus = gTestDBus; super(cast(GObject*)gTestDBus, ownedRef); } /** */ public static GType getType() { return g_test_dbus_get_type(); } /** * Create a new #GTestDBus object. * * Params: * flags = a #GTestDBusFlags * * Returns: a new #GTestDBus. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GTestDBusFlags flags) { auto p = g_test_dbus_new(flags); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GTestDBus*) p, true); } /** * Unset DISPLAY and DBUS_SESSION_BUS_ADDRESS env variables to ensure the test * won't use user's session bus. * * This is useful for unit tests that want to verify behaviour when no session * bus is running. It is not necessary to call this if unit test already calls * g_test_dbus_up() before acquiring the session bus. */ public static void unset() { g_test_dbus_unset(); } /** * Add a path where dbus-daemon will look up .service files. This can't be * called after g_test_dbus_up(). * * Params: * path = path to a directory containing .service files */ public void addServiceDir(string path) { g_test_dbus_add_service_dir(gTestDBus, Str.toStringz(path)); } /** * Stop the session bus started by g_test_dbus_up(). * * This will wait for the singleton returned by g_bus_get() or g_bus_get_sync() * is destroyed. This is done to ensure that the next unit test won't get a * leaked singleton from this test. */ public void down() { g_test_dbus_down(gTestDBus); } /** * Get the address on which dbus-daemon is running. If g_test_dbus_up() has not * been called yet, %NULL is returned. This can be used with * g_dbus_connection_new_for_address(). * * Returns: the address of the bus, or %NULL. */ public string getBusAddress() { return Str.toString(g_test_dbus_get_bus_address(gTestDBus)); } /** * Get the flags of the #GTestDBus object. * * Returns: the value of #GTestDBus:flags property */ public GTestDBusFlags getFlags() { return g_test_dbus_get_flags(gTestDBus); } /** * Stop the session bus started by g_test_dbus_up(). * * Unlike g_test_dbus_down(), this won't verify the #GDBusConnection * singleton returned by g_bus_get() or g_bus_get_sync() is destroyed. Unit * tests wanting to verify behaviour after the session bus has been stopped * can use this function but should still call g_test_dbus_down() when done. */ public void stop() { g_test_dbus_stop(gTestDBus); } /** * Start a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After this * call, it is safe for unit tests to start sending messages on the session bus. * * If this function is called from setup callback of g_test_add(), * g_test_dbus_down() must be called in its teardown callback. * * If this function is called from unit test's main(), then g_test_dbus_down() * must be called after g_test_run(). */ public void up() { g_test_dbus_up(gTestDBus); } } GtkD-3.7.5/generated/gtkd/gio/ThemedIcon.d000066400000000000000000000115761324604450400202240ustar00rootroot00000000000000/* * 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 gio.ThemedIcon; private import gio.IconIF; private import gio.IconT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GThemedIcon is an implementation of #GIcon that supports icon themes. * #GThemedIcon contains a list of all of the icons present in an icon * theme, so that icons can be looked up quickly. #GThemedIcon does * not provide actual pixmaps for icons, just the icon names. * Ideally something like gtk_icon_theme_choose_icon() should be used to * resolve the list of names so that fallback icons work nicely with * themes that inherit other themes. */ public class ThemedIcon : ObjectG, IconIF { /** the main Gtk struct */ protected GThemedIcon* gThemedIcon; /** Get the main Gtk struct */ public GThemedIcon* getThemedIconStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gThemedIcon; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gThemedIcon; } protected override void setStruct(GObject* obj) { gThemedIcon = cast(GThemedIcon*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GThemedIcon* gThemedIcon, bool ownedRef = false) { this.gThemedIcon = gThemedIcon; super(cast(GObject*)gThemedIcon, ownedRef); } // add the Icon capabilities mixin IconT!(GThemedIcon); /** */ public static GType getType() { return g_themed_icon_get_type(); } /** * Creates a new themed icon for @iconnames. * * Params: * iconnames = an array of strings containing icon names. * * Returns: a new #GThemedIcon * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string[] iconnames) { auto p = g_themed_icon_new_from_names(Str.toStringzArray(iconnames), cast(int)iconnames.length); if(p is null) { throw new ConstructionException("null returned by new_from_names"); } this(cast(GThemedIcon*) p, true); } /** * Creates a new themed icon for @iconname, and all the names * that can be created by shortening @iconname at '-' characters. * * In the following example, @icon1 and @icon2 are equivalent: * |[ * const char *names[] = { * "gnome-dev-cdrom-audio", * "gnome-dev-cdrom", * "gnome-dev", * "gnome" * }; * * icon1 = g_themed_icon_new_from_names (names, 4); * icon2 = g_themed_icon_new_with_default_fallbacks ("gnome-dev-cdrom-audio"); * ]| * * Params: * iconname = a string containing an icon name * * Returns: a new #GThemedIcon. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string iconname) { auto p = g_themed_icon_new_with_default_fallbacks(Str.toStringz(iconname)); if(p is null) { throw new ConstructionException("null returned by new_with_default_fallbacks"); } this(cast(GThemedIcon*) p, true); } /** * Append a name to the list of icons from within @icon. * * Note that doing so invalidates the hash computed by prior calls * to g_icon_hash(). * * Params: * iconname = name of icon to append to list of icons from within @icon. */ public void appendName(string iconname) { g_themed_icon_append_name(gThemedIcon, Str.toStringz(iconname)); } /** * Gets the names of icons from within @icon. * * Returns: a list of icon names. */ public string[] getNames() { return Str.toStringArray(g_themed_icon_get_names(gThemedIcon)); } /** * Prepend a name to the list of icons from within @icon. * * Note that doing so invalidates the hash computed by prior calls * to g_icon_hash(). * * Params: * iconname = name of icon to prepend to list of icons from within @icon. * * Since: 2.18 */ public void prependName(string iconname) { g_themed_icon_prepend_name(gThemedIcon, Str.toStringz(iconname)); } } GtkD-3.7.5/generated/gtkd/gio/ThreadedSocketService.d000066400000000000000000000127461324604450400224170ustar00rootroot00000000000000/* * 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 gio.ThreadedSocketService; private import gio.SocketConnection; private import gio.SocketService; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * A #GThreadedSocketService is a simple subclass of #GSocketService * that handles incoming connections by creating a worker thread and * dispatching the connection to it by emitting the * #GThreadedSocketService::run signal in the new thread. * * The signal handler may perform blocking IO and need not return * until the connection is closed. * * The service is implemented using a thread pool, so there is a * limited amount of threads available to serve incoming requests. * The service automatically stops the #GSocketService from accepting * new connections when all threads are busy. * * As with #GSocketService, you may connect to #GThreadedSocketService::run, * or subclass and override the default handler. * * Since: 2.22 */ public class ThreadedSocketService : SocketService { /** the main Gtk struct */ protected GThreadedSocketService* gThreadedSocketService; /** Get the main Gtk struct */ public GThreadedSocketService* getThreadedSocketServiceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gThreadedSocketService; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gThreadedSocketService; } protected override void setStruct(GObject* obj) { gThreadedSocketService = cast(GThreadedSocketService*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GThreadedSocketService* gThreadedSocketService, bool ownedRef = false) { this.gThreadedSocketService = gThreadedSocketService; super(cast(GSocketService*)gThreadedSocketService, ownedRef); } /** */ public static GType getType() { return g_threaded_socket_service_get_type(); } /** * Creates a new #GThreadedSocketService with no listeners. Listeners * must be added with one of the #GSocketListener "add" methods. * * Params: * maxThreads = the maximal number of threads to execute concurrently * handling incoming clients, -1 means no limit * * Returns: a new #GSocketService. * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int maxThreads) { auto p = g_threaded_socket_service_new(maxThreads); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GThreadedSocketService*) p, true); } protected class OnRunDelegateWrapper { bool delegate(SocketConnection, ObjectG, ThreadedSocketService) dlg; gulong handlerId; this(bool delegate(SocketConnection, ObjectG, ThreadedSocketService) dlg) { this.dlg = dlg; onRunListeners ~= this; } void remove(OnRunDelegateWrapper source) { foreach(index, wrapper; onRunListeners) { if (wrapper.handlerId == source.handlerId) { onRunListeners[index] = null; onRunListeners = std.algorithm.remove(onRunListeners, index); break; } } } } OnRunDelegateWrapper[] onRunListeners; /** * The ::run signal is emitted in a worker thread in response to an * incoming connection. This thread is dedicated to handling * @connection and may perform blocking IO. The signal handler need * not return until the connection is closed. * * Params: * connection = a new #GSocketConnection object. * sourceObject = the source_object passed to g_socket_listener_add_address(). * * Returns: %TRUE to stop further signal handlers from being called */ gulong addOnRun(bool delegate(SocketConnection, ObjectG, ThreadedSocketService) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnRunDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "run", cast(GCallback)&callBackRun, cast(void*)wrapper, cast(GClosureNotify)&callBackRunDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackRun(GThreadedSocketService* threadedsocketserviceStruct, GSocketConnection* connection, GObject* sourceObject, OnRunDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(SocketConnection)(connection), ObjectG.getDObject!(ObjectG)(sourceObject), wrapper.outer); } extern(C) static void callBackRunDestroy(OnRunDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/TlsBackendIF.d000066400000000000000000000075301324604450400204310ustar00rootroot00000000000000/* * 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 gio.TlsBackendIF; private import gio.TlsBackendIF; private import gio.TlsDatabase; private import gio.c.functions; public import gio.c.types; private import gobject.ObjectG; public import gtkc.giotypes; /** * TLS (Transport Layer Security, aka SSL) and DTLS backend. * * Since: 2.28 */ public interface TlsBackendIF{ /** Get the main Gtk struct */ public GTlsBackend* getTlsBackendStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_tls_backend_get_type(); } /** * Gets the default #GTlsBackend for the system. * * Returns: a #GTlsBackend * * Since: 2.28 */ public static TlsBackendIF getDefault() { auto p = g_tls_backend_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(TlsBackendIF)(cast(GTlsBackend*) p); } /** * Gets the #GType of @backend's #GTlsCertificate implementation. * * Returns: the #GType of @backend's #GTlsCertificate * implementation. * * Since: 2.28 */ public GType getCertificateType(); /** * Gets the #GType of @backend's #GTlsClientConnection implementation. * * Returns: the #GType of @backend's #GTlsClientConnection * implementation. * * Since: 2.28 */ public GType getClientConnectionType(); /** * Gets the default #GTlsDatabase used to verify TLS connections. * * Returns: the default database, which should be * unreffed when done. * * Since: 2.30 */ public TlsDatabase getDefaultDatabase(); /** * Gets the #GType of @backend’s #GDtlsClientConnection implementation. * * Returns: the #GType of @backend’s #GDtlsClientConnection * implementation. * * Since: 2.48 */ public GType getDtlsClientConnectionType(); /** * Gets the #GType of @backend’s #GDtlsServerConnection implementation. * * Returns: the #GType of @backend’s #GDtlsServerConnection * implementation. * * Since: 2.48 */ public GType getDtlsServerConnectionType(); /** * Gets the #GType of @backend's #GTlsFileDatabase implementation. * * Returns: the #GType of backend's #GTlsFileDatabase implementation. * * Since: 2.30 */ public GType getFileDatabaseType(); /** * Gets the #GType of @backend's #GTlsServerConnection implementation. * * Returns: the #GType of @backend's #GTlsServerConnection * implementation. * * Since: 2.28 */ public GType getServerConnectionType(); /** * Checks if DTLS is supported. DTLS support may not be available even if TLS * support is available, and vice-versa. * * Returns: whether DTLS is supported * * Since: 2.48 */ public bool supportsDtls(); /** * Checks if TLS is supported; if this returns %FALSE for the default * #GTlsBackend, it means no "real" TLS backend is available. * * Returns: whether or not TLS is supported * * Since: 2.28 */ public bool supportsTls(); } GtkD-3.7.5/generated/gtkd/gio/TlsBackendT.d000066400000000000000000000104231324604450400203310ustar00rootroot00000000000000/* * 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 gio.TlsBackendT; public import gio.TlsBackendIF; public import gio.TlsDatabase; public import gio.c.functions; public import gio.c.types; public import gobject.ObjectG; public import gtkc.giotypes; /** * TLS (Transport Layer Security, aka SSL) and DTLS backend. * * Since: 2.28 */ public template TlsBackendT(TStruct) { /** Get the main Gtk struct */ public GTlsBackend* getTlsBackendStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GTlsBackend*)getStruct(); } /** * Gets the #GType of @backend's #GTlsCertificate implementation. * * Returns: the #GType of @backend's #GTlsCertificate * implementation. * * Since: 2.28 */ public GType getCertificateType() { return g_tls_backend_get_certificate_type(getTlsBackendStruct()); } /** * Gets the #GType of @backend's #GTlsClientConnection implementation. * * Returns: the #GType of @backend's #GTlsClientConnection * implementation. * * Since: 2.28 */ public GType getClientConnectionType() { return g_tls_backend_get_client_connection_type(getTlsBackendStruct()); } /** * Gets the default #GTlsDatabase used to verify TLS connections. * * Returns: the default database, which should be * unreffed when done. * * Since: 2.30 */ public TlsDatabase getDefaultDatabase() { auto p = g_tls_backend_get_default_database(getTlsBackendStruct()); if(p is null) { return null; } return ObjectG.getDObject!(TlsDatabase)(cast(GTlsDatabase*) p, true); } /** * Gets the #GType of @backend’s #GDtlsClientConnection implementation. * * Returns: the #GType of @backend’s #GDtlsClientConnection * implementation. * * Since: 2.48 */ public GType getDtlsClientConnectionType() { return g_tls_backend_get_dtls_client_connection_type(getTlsBackendStruct()); } /** * Gets the #GType of @backend’s #GDtlsServerConnection implementation. * * Returns: the #GType of @backend’s #GDtlsServerConnection * implementation. * * Since: 2.48 */ public GType getDtlsServerConnectionType() { return g_tls_backend_get_dtls_server_connection_type(getTlsBackendStruct()); } /** * Gets the #GType of @backend's #GTlsFileDatabase implementation. * * Returns: the #GType of backend's #GTlsFileDatabase implementation. * * Since: 2.30 */ public GType getFileDatabaseType() { return g_tls_backend_get_file_database_type(getTlsBackendStruct()); } /** * Gets the #GType of @backend's #GTlsServerConnection implementation. * * Returns: the #GType of @backend's #GTlsServerConnection * implementation. * * Since: 2.28 */ public GType getServerConnectionType() { return g_tls_backend_get_server_connection_type(getTlsBackendStruct()); } /** * Checks if DTLS is supported. DTLS support may not be available even if TLS * support is available, and vice-versa. * * Returns: whether DTLS is supported * * Since: 2.48 */ public bool supportsDtls() { return g_tls_backend_supports_dtls(getTlsBackendStruct()) != 0; } /** * Checks if TLS is supported; if this returns %FALSE for the default * #GTlsBackend, it means no "real" TLS backend is available. * * Returns: whether or not TLS is supported * * Since: 2.28 */ public bool supportsTls() { return g_tls_backend_supports_tls(getTlsBackendStruct()) != 0; } } GtkD-3.7.5/generated/gtkd/gio/TlsCertificate.d000066400000000000000000000242131324604450400211020ustar00rootroot00000000000000/* * 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 gio.TlsCertificate; private import gio.SocketConnectableIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * A certificate used for TLS authentication and encryption. * This can represent either a certificate only (eg, the certificate * received by a client from a server), or the combination of * a certificate and a private key (which is needed when acting as a * #GTlsServerConnection). * * Since: 2.28 */ public class TlsCertificate : ObjectG { /** the main Gtk struct */ protected GTlsCertificate* gTlsCertificate; /** Get the main Gtk struct */ public GTlsCertificate* getTlsCertificateStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTlsCertificate; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTlsCertificate; } protected override void setStruct(GObject* obj) { gTlsCertificate = cast(GTlsCertificate*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTlsCertificate* gTlsCertificate, bool ownedRef = false) { this.gTlsCertificate = gTlsCertificate; super(cast(GObject*)gTlsCertificate, ownedRef); } /** */ public static GType getType() { return g_tls_certificate_get_type(); } /** * Creates a #GTlsCertificate from the PEM-encoded data in @file. The * returned certificate will be the first certificate found in @file. As * of GLib 2.44, if @file contains more certificates it will try to load * a certificate chain. All certificates will be verified in the order * found (top-level certificate should be the last one in the file) and * the #GTlsCertificate:issuer property of each certificate will be set * accordingly if the verification succeeds. If any certificate in the * chain cannot be verified, the first certificate in the file will * still be returned. * * If @file cannot be read or parsed, the function will return %NULL and * set @error. Otherwise, this behaves like * g_tls_certificate_new_from_pem(). * * Params: * file = file containing a PEM-encoded certificate to import * * Returns: the new certificate, or %NULL on error * * Since: 2.28 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string file) { GError* err = null; auto p = g_tls_certificate_new_from_file(Str.toStringz(file), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_file"); } this(cast(GTlsCertificate*) p, true); } /** * Creates a #GTlsCertificate from the PEM-encoded data in @cert_file * and @key_file. The returned certificate will be the first certificate * found in @cert_file. As of GLib 2.44, if @cert_file contains more * certificates it will try to load a certificate chain. All * certificates will be verified in the order found (top-level * certificate should be the last one in the file) and the * #GTlsCertificate:issuer property of each certificate will be set * accordingly if the verification succeeds. If any certificate in the * chain cannot be verified, the first certificate in the file will * still be returned. * * If either file cannot be read or parsed, the function will return * %NULL and set @error. Otherwise, this behaves like * g_tls_certificate_new_from_pem(). * * Params: * certFile = file containing one or more PEM-encoded * certificates to import * keyFile = file containing a PEM-encoded private key * to import * * Returns: the new certificate, or %NULL on error * * Since: 2.28 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string certFile, string keyFile) { GError* err = null; auto p = g_tls_certificate_new_from_files(Str.toStringz(certFile), Str.toStringz(keyFile), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_files"); } this(cast(GTlsCertificate*) p, true); } /** * Creates a #GTlsCertificate from the PEM-encoded data in @data. If * @data includes both a certificate and a private key, then the * returned certificate will include the private key data as well. (See * the #GTlsCertificate:private-key-pem property for information about * supported formats.) * * The returned certificate will be the first certificate found in * @data. As of GLib 2.44, if @data contains more certificates it will * try to load a certificate chain. All certificates will be verified in * the order found (top-level certificate should be the last one in the * file) and the #GTlsCertificate:issuer property of each certificate * will be set accordingly if the verification succeeds. If any * certificate in the chain cannot be verified, the first certificate in * the file will still be returned. * * Params: * data = PEM-encoded certificate data * length = the length of @data, or -1 if it's 0-terminated. * * Returns: the new certificate, or %NULL if @data is invalid * * Since: 2.28 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string data, ptrdiff_t length) { GError* err = null; auto p = g_tls_certificate_new_from_pem(Str.toStringz(data), length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_pem"); } this(cast(GTlsCertificate*) p, true); } /** * Creates one or more #GTlsCertificates from the PEM-encoded * data in @file. If @file cannot be read or parsed, the function will * return %NULL and set @error. If @file does not contain any * PEM-encoded certificates, this will return an empty list and not * set @error. * * Params: * file = file containing PEM-encoded certificates to import * * Returns: a * #GList containing #GTlsCertificate objects. You must free the list * and its contents when you are done with it. * * Since: 2.28 * * Throws: GException on failure. */ public static ListG listNewFromFile(string file) { GError* err = null; auto p = g_tls_certificate_list_new_from_file(Str.toStringz(file), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Gets the #GTlsCertificate representing @cert's issuer, if known * * Returns: The certificate of @cert's issuer, * or %NULL if @cert is self-signed or signed with an unknown * certificate. * * Since: 2.28 */ public TlsCertificate getIssuer() { auto p = g_tls_certificate_get_issuer(gTlsCertificate); if(p is null) { return null; } return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) p); } /** * Check if two #GTlsCertificate objects represent the same certificate. * The raw DER byte data of the two certificates are checked for equality. * This has the effect that two certificates may compare equal even if * their #GTlsCertificate:issuer, #GTlsCertificate:private-key, or * #GTlsCertificate:private-key-pem properties differ. * * Params: * certTwo = second certificate to compare * * Returns: whether the same or not * * Since: 2.34 */ public bool isSame(TlsCertificate certTwo) { return g_tls_certificate_is_same(gTlsCertificate, (certTwo is null) ? null : certTwo.getTlsCertificateStruct()) != 0; } /** * This verifies @cert and returns a set of #GTlsCertificateFlags * indicating any problems found with it. This can be used to verify a * certificate outside the context of making a connection, or to * check a certificate against a CA that is not part of the system * CA database. * * If @identity is not %NULL, @cert's name(s) will be compared against * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return * value if it does not match. If @identity is %NULL, that bit will * never be set in the return value. * * If @trusted_ca is not %NULL, then @cert (or one of the certificates * in its chain) must be signed by it, or else * %G_TLS_CERTIFICATE_UNKNOWN_CA will be set in the return value. If * @trusted_ca is %NULL, that bit will never be set in the return * value. * * (All other #GTlsCertificateFlags values will always be set or unset * as appropriate.) * * Params: * identity = the expected peer identity * trustedCa = the certificate of a trusted authority * * Returns: the appropriate #GTlsCertificateFlags * * Since: 2.28 */ public GTlsCertificateFlags verify(SocketConnectableIF identity, TlsCertificate trustedCa) { return g_tls_certificate_verify(gTlsCertificate, (identity is null) ? null : identity.getSocketConnectableStruct(), (trustedCa is null) ? null : trustedCa.getTlsCertificateStruct()); } } GtkD-3.7.5/generated/gtkd/gio/TlsClientConnectionIF.d000066400000000000000000000112701324604450400223340ustar00rootroot00000000000000/* * 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 gio.TlsClientConnectionIF; private import gio.IOStream; private import gio.SocketConnectableIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GTlsClientConnection is the client-side subclass of * #GTlsConnection, representing a client-side TLS connection. * * Since: 2.28 */ public interface TlsClientConnectionIF{ /** Get the main Gtk struct */ public GTlsClientConnection* getTlsClientConnectionStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_tls_client_connection_get_type(); } /** * Copies session state from one connection to another. This is * not normally needed, but may be used when the same session * needs to be used between different endpoints as is required * by some protocols such as FTP over TLS. @source should have * already completed a handshake, and @conn should not have * completed a handshake. * * Params: * source = a #GTlsClientConnection * * Since: 2.46 */ public void copySessionState(TlsClientConnectionIF source); /** * Gets the list of distinguished names of the Certificate Authorities * that the server will accept certificates from. This will be set * during the TLS handshake if the server requests a certificate. * Otherwise, it will be %NULL. * * Each item in the list is a #GByteArray which contains the complete * subject DN of the certificate authority. * * Returns: the list of * CA DNs. You should unref each element with g_byte_array_unref() and then * the free the list with g_list_free(). * * Since: 2.28 */ public ListG getAcceptedCas(); /** * Gets @conn's expected server identity * * Returns: a #GSocketConnectable describing the * expected server identity, or %NULL if the expected identity is not * known. * * Since: 2.28 */ public SocketConnectableIF getServerIdentity(); /** * Gets whether @conn will use SSL 3.0 rather than the * highest-supported version of TLS; see * g_tls_client_connection_set_use_ssl3(). * * Returns: whether @conn will use SSL 3.0 * * Since: 2.28 */ public bool getUseSsl3(); /** * Gets @conn's validation flags * * Returns: the validation flags * * Since: 2.28 */ public GTlsCertificateFlags getValidationFlags(); /** * Sets @conn's expected server identity, which is used both to tell * servers on virtual hosts which certificate to present, and also * to let @conn know what name to look for in the certificate when * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. * * Params: * identity = a #GSocketConnectable describing the expected server identity * * Since: 2.28 */ public void setServerIdentity(SocketConnectableIF identity); /** * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than * trying to properly negotiate the right version of TLS or SSL to use. * This can be used when talking to servers that do not implement the * fallbacks correctly and which will therefore fail to handshake with * a "modern" TLS handshake attempt. * * Params: * useSsl3 = whether to use SSL 3.0 * * Since: 2.28 */ public void setUseSsl3(bool useSsl3); /** * Sets @conn's validation flags, to override the default set of * checks performed when validating a server certificate. By default, * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. * * Params: * flags = the #GTlsCertificateFlags to use * * Since: 2.28 */ public void setValidationFlags(GTlsCertificateFlags flags); } GtkD-3.7.5/generated/gtkd/gio/TlsClientConnectionT.d000066400000000000000000000132311324604450400222400ustar00rootroot00000000000000/* * 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 gio.TlsClientConnectionT; public import gio.IOStream; public import gio.SocketConnectableIF; public import gio.c.functions; public import gio.c.types; public import glib.ConstructionException; public import glib.ErrorG; public import glib.GException; public import glib.ListG; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GTlsClientConnection is the client-side subclass of * #GTlsConnection, representing a client-side TLS connection. * * Since: 2.28 */ public template TlsClientConnectionT(TStruct) { /** Get the main Gtk struct */ public GTlsClientConnection* getTlsClientConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GTlsClientConnection*)getStruct(); } /** * Copies session state from one connection to another. This is * not normally needed, but may be used when the same session * needs to be used between different endpoints as is required * by some protocols such as FTP over TLS. @source should have * already completed a handshake, and @conn should not have * completed a handshake. * * Params: * source = a #GTlsClientConnection * * Since: 2.46 */ public void copySessionState(TlsClientConnectionIF source) { g_tls_client_connection_copy_session_state(getTlsClientConnectionStruct(), (source is null) ? null : source.getTlsClientConnectionStruct()); } /** * Gets the list of distinguished names of the Certificate Authorities * that the server will accept certificates from. This will be set * during the TLS handshake if the server requests a certificate. * Otherwise, it will be %NULL. * * Each item in the list is a #GByteArray which contains the complete * subject DN of the certificate authority. * * Returns: the list of * CA DNs. You should unref each element with g_byte_array_unref() and then * the free the list with g_list_free(). * * Since: 2.28 */ public ListG getAcceptedCas() { auto p = g_tls_client_connection_get_accepted_cas(getTlsClientConnectionStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Gets @conn's expected server identity * * Returns: a #GSocketConnectable describing the * expected server identity, or %NULL if the expected identity is not * known. * * Since: 2.28 */ public SocketConnectableIF getServerIdentity() { auto p = g_tls_client_connection_get_server_identity(getTlsClientConnectionStruct()); if(p is null) { return null; } return ObjectG.getDObject!(SocketConnectableIF)(cast(GSocketConnectable*) p); } /** * Gets whether @conn will use SSL 3.0 rather than the * highest-supported version of TLS; see * g_tls_client_connection_set_use_ssl3(). * * Returns: whether @conn will use SSL 3.0 * * Since: 2.28 */ public bool getUseSsl3() { return g_tls_client_connection_get_use_ssl3(getTlsClientConnectionStruct()) != 0; } /** * Gets @conn's validation flags * * Returns: the validation flags * * Since: 2.28 */ public GTlsCertificateFlags getValidationFlags() { return g_tls_client_connection_get_validation_flags(getTlsClientConnectionStruct()); } /** * Sets @conn's expected server identity, which is used both to tell * servers on virtual hosts which certificate to present, and also * to let @conn know what name to look for in the certificate when * performing %G_TLS_CERTIFICATE_BAD_IDENTITY validation, if enabled. * * Params: * identity = a #GSocketConnectable describing the expected server identity * * Since: 2.28 */ public void setServerIdentity(SocketConnectableIF identity) { g_tls_client_connection_set_server_identity(getTlsClientConnectionStruct(), (identity is null) ? null : identity.getSocketConnectableStruct()); } /** * If @use_ssl3 is %TRUE, this forces @conn to use SSL 3.0 rather than * trying to properly negotiate the right version of TLS or SSL to use. * This can be used when talking to servers that do not implement the * fallbacks correctly and which will therefore fail to handshake with * a "modern" TLS handshake attempt. * * Params: * useSsl3 = whether to use SSL 3.0 * * Since: 2.28 */ public void setUseSsl3(bool useSsl3) { g_tls_client_connection_set_use_ssl3(getTlsClientConnectionStruct(), useSsl3); } /** * Sets @conn's validation flags, to override the default set of * checks performed when validating a server certificate. By default, * %G_TLS_CERTIFICATE_VALIDATE_ALL is used. * * Params: * flags = the #GTlsCertificateFlags to use * * Since: 2.28 */ public void setValidationFlags(GTlsCertificateFlags flags) { g_tls_client_connection_set_validation_flags(getTlsClientConnectionStruct(), flags); } } GtkD-3.7.5/generated/gtkd/gio/TlsConnection.d000066400000000000000000000464131324604450400207650ustar00rootroot00000000000000/* * 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 gio.TlsConnection; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.IOStream; private import gio.TlsCertificate; private import gio.TlsDatabase; private import gio.TlsInteraction; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GTlsConnection is the base TLS connection class type, which wraps * a #GIOStream and provides TLS encryption on top of it. Its * subclasses, #GTlsClientConnection and #GTlsServerConnection, * implement client-side and server-side TLS, respectively. * * For DTLS (Datagram TLS) support, see #GDtlsConnection. * * Since: 2.28 */ public class TlsConnection : IOStream { /** the main Gtk struct */ protected GTlsConnection* gTlsConnection; /** Get the main Gtk struct */ public GTlsConnection* getTlsConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTlsConnection; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTlsConnection; } protected override void setStruct(GObject* obj) { gTlsConnection = cast(GTlsConnection*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTlsConnection* gTlsConnection, bool ownedRef = false) { this.gTlsConnection = gTlsConnection; super(cast(GIOStream*)gTlsConnection, ownedRef); } /** */ public static GType getType() { return g_tls_connection_get_type(); } /** * Used by #GTlsConnection implementations to emit the * #GTlsConnection::accept-certificate signal. * * Params: * peerCert = the peer's #GTlsCertificate * errors = the problems with @peer_cert * * Returns: %TRUE if one of the signal handlers has returned * %TRUE to accept @peer_cert * * Since: 2.28 */ public bool emitAcceptCertificate(TlsCertificate peerCert, GTlsCertificateFlags errors) { return g_tls_connection_emit_accept_certificate(gTlsConnection, (peerCert is null) ? null : peerCert.getTlsCertificateStruct(), errors) != 0; } /** * Gets @conn's certificate, as set by * g_tls_connection_set_certificate(). * * Returns: @conn's certificate, or %NULL * * Since: 2.28 */ public TlsCertificate getCertificate() { auto p = g_tls_connection_get_certificate(gTlsConnection); if(p is null) { return null; } return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) p); } /** * Gets the certificate database that @conn uses to verify * peer certificates. See g_tls_connection_set_database(). * * Returns: the certificate database that @conn uses or %NULL * * Since: 2.30 */ public TlsDatabase getDatabase() { auto p = g_tls_connection_get_database(gTlsConnection); if(p is null) { return null; } return ObjectG.getDObject!(TlsDatabase)(cast(GTlsDatabase*) p); } /** * Get the object that will be used to interact with the user. It will be used * for things like prompting the user for passwords. If %NULL is returned, then * no user interaction will occur for this connection. * * Returns: The interaction object. * * Since: 2.30 */ public TlsInteraction getInteraction() { auto p = g_tls_connection_get_interaction(gTlsConnection); if(p is null) { return null; } return ObjectG.getDObject!(TlsInteraction)(cast(GTlsInteraction*) p); } /** * Gets @conn's peer's certificate after the handshake has completed. * (It is not set during the emission of * #GTlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate, or %NULL * * Since: 2.28 */ public TlsCertificate getPeerCertificate() { auto p = g_tls_connection_get_peer_certificate(gTlsConnection); if(p is null) { return null; } return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) p); } /** * Gets the errors associated with validating @conn's peer's * certificate, after the handshake has completed. (It is not set * during the emission of #GTlsConnection::accept-certificate.) * * Returns: @conn's peer's certificate errors * * Since: 2.28 */ public GTlsCertificateFlags getPeerCertificateErrors() { return g_tls_connection_get_peer_certificate_errors(gTlsConnection); } /** * Gets @conn rehandshaking mode. See * g_tls_connection_set_rehandshake_mode() for details. * * Returns: @conn's rehandshaking mode * * Since: 2.28 */ public GTlsRehandshakeMode getRehandshakeMode() { return g_tls_connection_get_rehandshake_mode(gTlsConnection); } /** * Tests whether or not @conn expects a proper TLS close notification * when the connection is closed. See * g_tls_connection_set_require_close_notify() for details. * * Returns: %TRUE if @conn requires a proper TLS close * notification. * * Since: 2.28 */ public bool getRequireCloseNotify() { return g_tls_connection_get_require_close_notify(gTlsConnection) != 0; } /** * Gets whether @conn uses the system certificate database to verify * peer certificates. See g_tls_connection_set_use_system_certdb(). * * Deprecated: Use g_tls_connection_get_database() instead * * Returns: whether @conn uses the system certificate database */ public bool getUseSystemCertdb() { return g_tls_connection_get_use_system_certdb(gTlsConnection) != 0; } /** * Attempts a TLS handshake on @conn. * * On the client side, it is never necessary to call this method; * although the connection needs to perform a handshake after * connecting (or after sending a "STARTTLS"-type command) and may * need to rehandshake later if the server requests it, * #GTlsConnection will handle this for you automatically when you try * to send or receive data on the connection. However, you can call * g_tls_connection_handshake() manually if you want to know for sure * whether the initial handshake succeeded or failed (as opposed to * just immediately trying to write to @conn's output stream, in which * case if it fails, it may not be possible to tell if it failed * before or after completing the handshake). * * Likewise, on the server side, although a handshake is necessary at * the beginning of the communication, you do not need to call this * function explicitly unless you want clearer error reporting. * However, you may call g_tls_connection_handshake() later on to * renegotiate parameters (encryption methods, etc) with the client. * * #GTlsConnection::accept_certificate may be emitted during the * handshake. * * Params: * cancellable = a #GCancellable, or %NULL * * Returns: success or failure * * Since: 2.28 * * Throws: GException on failure. */ public bool handshake(Cancellable cancellable) { GError* err = null; auto p = g_tls_connection_handshake(gTlsConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously performs a TLS handshake on @conn. See * g_tls_connection_handshake() for more information. * * Params: * ioPriority = the [I/O priority][io-priority] of the request * cancellable = a #GCancellable, or %NULL * callback = callback to call when the handshake is complete * userData = the data to pass to the callback function * * Since: 2.28 */ public void handshakeAsync(int ioPriority, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_tls_connection_handshake_async(gTlsConnection, ioPriority, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous TLS handshake operation. See * g_tls_connection_handshake() for more information. * * Params: * result = a #GAsyncResult. * * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set. * * Since: 2.28 * * Throws: GException on failure. */ public bool handshakeFinish(AsyncResultIF result) { GError* err = null; auto p = g_tls_connection_handshake_finish(gTlsConnection, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This sets the certificate that @conn will present to its peer * during the TLS handshake. For a #GTlsServerConnection, it is * mandatory to set this, and that will normally be done at construct * time. * * For a #GTlsClientConnection, this is optional. If a handshake fails * with %G_TLS_ERROR_CERTIFICATE_REQUIRED, that means that the server * requires a certificate, and if you try connecting again, you should * call this method first. You can call * g_tls_client_connection_get_accepted_cas() on the failed connection * to get a list of Certificate Authorities that the server will * accept certificates from. * * (It is also possible that a server will allow the connection with * or without a certificate; in that case, if you don't provide a * certificate, you can tell that the server requested one by the fact * that g_tls_client_connection_get_accepted_cas() will return * non-%NULL.) * * Params: * certificate = the certificate to use for @conn * * Since: 2.28 */ public void setCertificate(TlsCertificate certificate) { g_tls_connection_set_certificate(gTlsConnection, (certificate is null) ? null : certificate.getTlsCertificateStruct()); } /** * Sets the certificate database that is used to verify peer certificates. * This is set to the default database by default. See * g_tls_backend_get_default_database(). If set to %NULL, then * peer certificate validation will always set the * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning * #GTlsConnection::accept-certificate will always be emitted on * client-side connections, unless that bit is not set in * #GTlsClientConnection:validation-flags). * * Params: * database = a #GTlsDatabase * * Since: 2.30 */ public void setDatabase(TlsDatabase database) { g_tls_connection_set_database(gTlsConnection, (database is null) ? null : database.getTlsDatabaseStruct()); } /** * Set the object that will be used to interact with the user. It will be used * for things like prompting the user for passwords. * * The @interaction argument will normally be a derived subclass of * #GTlsInteraction. %NULL can also be provided if no user interaction * should occur for this connection. * * Params: * interaction = an interaction object, or %NULL * * Since: 2.30 */ public void setInteraction(TlsInteraction interaction) { g_tls_connection_set_interaction(gTlsConnection, (interaction is null) ? null : interaction.getTlsInteractionStruct()); } /** * Sets how @conn behaves with respect to rehandshaking requests. * * %G_TLS_REHANDSHAKE_NEVER means that it will never agree to * rehandshake after the initial handshake is complete. (For a client, * this means it will refuse rehandshake requests from the server, and * for a server, this means it will close the connection with an error * if the client attempts to rehandshake.) * * %G_TLS_REHANDSHAKE_SAFELY means that the connection will allow a * rehandshake only if the other end of the connection supports the * TLS `renegotiation_info` extension. This is the default behavior, * but means that rehandshaking will not work against older * implementations that do not support that extension. * * %G_TLS_REHANDSHAKE_UNSAFELY means that the connection will allow * rehandshaking even without the `renegotiation_info` extension. On * the server side in particular, this is not recommended, since it * leaves the server open to certain attacks. However, this mode is * necessary if you need to allow renegotiation with older client * software. * * Params: * mode = the rehandshaking mode * * Since: 2.28 */ public void setRehandshakeMode(GTlsRehandshakeMode mode) { g_tls_connection_set_rehandshake_mode(gTlsConnection, mode); } /** * Sets whether or not @conn expects a proper TLS close notification * before the connection is closed. If this is %TRUE (the default), * then @conn will expect to receive a TLS close notification from its * peer before the connection is closed, and will return a * %G_TLS_ERROR_EOF error if the connection is closed without proper * notification (since this may indicate a network error, or * man-in-the-middle attack). * * In some protocols, the application will know whether or not the * connection was closed cleanly based on application-level data * (because the application-level data includes a length field, or is * somehow self-delimiting); in this case, the close notify is * redundant and sometimes omitted. (TLS 1.1 explicitly allows this; * in TLS 1.0 it is technically an error, but often done anyway.) You * can use g_tls_connection_set_require_close_notify() to tell @conn * to allow an "unannounced" connection close, in which case the close * will show up as a 0-length read, as in a non-TLS * #GSocketConnection, and it is up to the application to check that * the data has been fully received. * * Note that this only affects the behavior when the peer closes the * connection; when the application calls g_io_stream_close() itself * on @conn, this will send a close notification regardless of the * setting of this property. If you explicitly want to do an unclean * close, you can close @conn's #GTlsConnection:base-io-stream rather * than closing @conn itself, but note that this may only be done when no other * operations are pending on @conn or the base I/O stream. * * Params: * requireCloseNotify = whether or not to require close notification * * Since: 2.28 */ public void setRequireCloseNotify(bool requireCloseNotify) { g_tls_connection_set_require_close_notify(gTlsConnection, requireCloseNotify); } /** * Sets whether @conn uses the system certificate database to verify * peer certificates. This is %TRUE by default. If set to %FALSE, then * peer certificate validation will always set the * %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning * #GTlsConnection::accept-certificate will always be emitted on * client-side connections, unless that bit is not set in * #GTlsClientConnection:validation-flags). * * Deprecated: Use g_tls_connection_set_database() instead * * Params: * useSystemCertdb = whether to use the system certificate database */ public void setUseSystemCertdb(bool useSystemCertdb) { g_tls_connection_set_use_system_certdb(gTlsConnection, useSystemCertdb); } protected class OnAcceptCertificateDelegateWrapper { bool delegate(TlsCertificate, GTlsCertificateFlags, TlsConnection) dlg; gulong handlerId; this(bool delegate(TlsCertificate, GTlsCertificateFlags, TlsConnection) dlg) { this.dlg = dlg; onAcceptCertificateListeners ~= this; } void remove(OnAcceptCertificateDelegateWrapper source) { foreach(index, wrapper; onAcceptCertificateListeners) { if (wrapper.handlerId == source.handlerId) { onAcceptCertificateListeners[index] = null; onAcceptCertificateListeners = std.algorithm.remove(onAcceptCertificateListeners, index); break; } } } } OnAcceptCertificateDelegateWrapper[] onAcceptCertificateListeners; /** * Emitted during the TLS handshake after the peer certificate has * been received. You can examine @peer_cert's certification path by * calling g_tls_certificate_get_issuer() on it. * * For a client-side connection, @peer_cert is the server's * certificate, and the signal will only be emitted if the * certificate was not acceptable according to @conn's * #GTlsClientConnection:validation_flags. If you would like the * certificate to be accepted despite @errors, return %TRUE from the * signal handler. Otherwise, if no handler accepts the certificate, * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE. * * For a server-side connection, @peer_cert is the certificate * presented by the client, if this was requested via the server's * #GTlsServerConnection:authentication_mode. On the server side, * the signal is always emitted when the client presents a * certificate, and the certificate will only be accepted if a * handler returns %TRUE. * * Note that if this signal is emitted as part of asynchronous I/O * in the main thread, then you should not attempt to interact with * the user before returning from the signal handler. If you want to * let the user decide whether or not to accept the certificate, you * would have to return %FALSE from the signal handler on the first * attempt, and then after the connection attempt returns a * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if * the user decides to accept the certificate, remember that fact, * create a new connection, and return %TRUE from the signal handler * the next time. * * If you are doing I/O in another thread, you do not * need to worry about this, and can simply block in the signal * handler until the UI thread returns an answer. * * Params: * peerCert = the peer's #GTlsCertificate * errors = the problems with @peer_cert. * * Returns: %TRUE to accept @peer_cert (which will also * immediately end the signal emission). %FALSE to allow the signal * emission to continue, which will cause the handshake to fail if * no one else overrides it. * * Since: 2.28 */ gulong addOnAcceptCertificate(bool delegate(TlsCertificate, GTlsCertificateFlags, TlsConnection) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAcceptCertificateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "accept-certificate", cast(GCallback)&callBackAcceptCertificate, cast(void*)wrapper, cast(GClosureNotify)&callBackAcceptCertificateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackAcceptCertificate(GTlsConnection* tlsconnectionStruct, GTlsCertificate* peerCert, GTlsCertificateFlags errors, OnAcceptCertificateDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(TlsCertificate)(peerCert), errors, wrapper.outer); } extern(C) static void callBackAcceptCertificateDestroy(OnAcceptCertificateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/TlsDatabase.d000066400000000000000000000451131324604450400203660ustar00rootroot00000000000000/* * 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 gio.TlsDatabase; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.SocketConnectableIF; private import gio.TlsCertificate; private import gio.TlsInteraction; private import gio.c.functions; public import gio.c.types; private import glib.ByteArray; private import glib.ErrorG; private import glib.GException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GTlsDatabase is used to lookup certificates and other information * from a certificate or key store. It is an abstract base class which * TLS library specific subtypes override. * * Most common client applications will not directly interact with * #GTlsDatabase. It is used internally by #GTlsConnection. * * Since: 2.30 */ public class TlsDatabase : ObjectG { /** the main Gtk struct */ protected GTlsDatabase* gTlsDatabase; /** Get the main Gtk struct */ public GTlsDatabase* getTlsDatabaseStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTlsDatabase; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTlsDatabase; } protected override void setStruct(GObject* obj) { gTlsDatabase = cast(GTlsDatabase*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTlsDatabase* gTlsDatabase, bool ownedRef = false) { this.gTlsDatabase = gTlsDatabase; super(cast(GObject*)gTlsDatabase, ownedRef); } /** */ public static GType getType() { return g_tls_database_get_type(); } /** * Create a handle string for the certificate. The database will only be able * to create a handle for certificates that originate from the database. In * cases where the database cannot create a handle for a certificate, %NULL * will be returned. * * This handle should be stable across various instances of the application, * and between applications. If a certificate is modified in the database, * then it is not guaranteed that this handle will continue to point to it. * * Params: * certificate = certificate for which to create a handle. * * Returns: a newly allocated string containing the * handle. * * Since: 2.30 */ public string createCertificateHandle(TlsCertificate certificate) { auto retStr = g_tls_database_create_certificate_handle(gTlsDatabase, (certificate is null) ? null : certificate.getTlsCertificateStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Lookup a certificate by its handle. * * The handle should have been created by calling * g_tls_database_create_certificate_handle() on a #GTlsDatabase object of * the same TLS backend. The handle is designed to remain valid across * instantiations of the database. * * If the handle is no longer valid, or does not point to a certificate in * this database, then %NULL will be returned. * * This function can block, use g_tls_database_lookup_certificate_for_handle_async() to perform * the lookup operation asynchronously. * * Params: * handle = a certificate handle * interaction = used to interact with the user if necessary * flags = Flags which affect the lookup. * cancellable = a #GCancellable, or %NULL * * Returns: a newly allocated * #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. * * Since: 2.30 * * Throws: GException on failure. */ public TlsCertificate lookupCertificateForHandle(string handle, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_tls_database_lookup_certificate_for_handle(gTlsDatabase, Str.toStringz(handle), (interaction is null) ? null : interaction.getTlsInteractionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) p, true); } /** * Asynchronously lookup a certificate by its handle in the database. See * g_tls_database_lookup_certificate_for_handle() for more information. * * Params: * handle = a certificate handle * interaction = used to interact with the user if necessary * flags = Flags which affect the lookup. * cancellable = a #GCancellable, or %NULL * callback = callback to call when the operation completes * userData = the data to pass to the callback function * * Since: 2.30 */ public void lookupCertificateForHandleAsync(string handle, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_tls_database_lookup_certificate_for_handle_async(gTlsDatabase, Str.toStringz(handle), (interaction is null) ? null : interaction.getTlsInteractionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous lookup of a certificate by its handle. See * g_tls_database_lookup_certificate_handle() for more information. * * If the handle is no longer valid, or does not point to a certificate in * this database, then %NULL will be returned. * * Params: * result = a #GAsyncResult. * * Returns: a newly allocated #GTlsCertificate object. * Use g_object_unref() to release the certificate. * * Since: 2.30 * * Throws: GException on failure. */ public TlsCertificate lookupCertificateForHandleFinish(AsyncResultIF result) { GError* err = null; auto p = g_tls_database_lookup_certificate_for_handle_finish(gTlsDatabase, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) p, true); } /** * Lookup the issuer of @certificate in the database. * * The %issuer property * of @certificate is not modified, and the two certificates are not hooked * into a chain. * * This function can block, use g_tls_database_lookup_certificate_issuer_async() to perform * the lookup operation asynchronously. * * Params: * certificate = a #GTlsCertificate * interaction = used to interact with the user if necessary * flags = flags which affect the lookup operation * cancellable = a #GCancellable, or %NULL * * Returns: a newly allocated issuer #GTlsCertificate, * or %NULL. Use g_object_unref() to release the certificate. * * Since: 2.30 * * Throws: GException on failure. */ public TlsCertificate lookupCertificateIssuer(TlsCertificate certificate, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_tls_database_lookup_certificate_issuer(gTlsDatabase, (certificate is null) ? null : certificate.getTlsCertificateStruct(), (interaction is null) ? null : interaction.getTlsInteractionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) p, true); } /** * Asynchronously lookup the issuer of @certificate in the database. See * g_tls_database_lookup_certificate_issuer() for more information. * * Params: * certificate = a #GTlsCertificate * interaction = used to interact with the user if necessary * flags = flags which affect the lookup operation * cancellable = a #GCancellable, or %NULL * callback = callback to call when the operation completes * userData = the data to pass to the callback function * * Since: 2.30 */ public void lookupCertificateIssuerAsync(TlsCertificate certificate, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_tls_database_lookup_certificate_issuer_async(gTlsDatabase, (certificate is null) ? null : certificate.getTlsCertificateStruct(), (interaction is null) ? null : interaction.getTlsInteractionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous lookup issuer operation. See * g_tls_database_lookup_certificate_issuer() for more information. * * Params: * result = a #GAsyncResult. * * Returns: a newly allocated issuer #GTlsCertificate, * or %NULL. Use g_object_unref() to release the certificate. * * Since: 2.30 * * Throws: GException on failure. */ public TlsCertificate lookupCertificateIssuerFinish(AsyncResultIF result) { GError* err = null; auto p = g_tls_database_lookup_certificate_issuer_finish(gTlsDatabase, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(TlsCertificate)(cast(GTlsCertificate*) p, true); } /** * Lookup certificates issued by this issuer in the database. * * This function can block, use g_tls_database_lookup_certificates_issued_by_async() to perform * the lookup operation asynchronously. * * Params: * issuerRawDn = a #GByteArray which holds the DER encoded issuer DN. * interaction = used to interact with the user if necessary * flags = Flags which affect the lookup operation. * cancellable = a #GCancellable, or %NULL * * Returns: a newly allocated list of #GTlsCertificate * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. * * Since: 2.30 * * Throws: GException on failure. */ public ListG lookupCertificatesIssuedBy(ByteArray issuerRawDn, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_tls_database_lookup_certificates_issued_by(gTlsDatabase, (issuerRawDn is null) ? null : issuerRawDn.getByteArrayStruct(), (interaction is null) ? null : interaction.getTlsInteractionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Asynchronously lookup certificates issued by this issuer in the database. See * g_tls_database_lookup_certificates_issued_by() for more information. * * The database may choose to hold a reference to the issuer byte array for the duration * of of this asynchronous operation. The byte array should not be modified during * this time. * * Params: * issuerRawDn = a #GByteArray which holds the DER encoded issuer DN. * interaction = used to interact with the user if necessary * flags = Flags which affect the lookup operation. * cancellable = a #GCancellable, or %NULL * callback = callback to call when the operation completes * userData = the data to pass to the callback function * * Since: 2.30 */ public void lookupCertificatesIssuedByAsync(ByteArray issuerRawDn, TlsInteraction interaction, GTlsDatabaseLookupFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_tls_database_lookup_certificates_issued_by_async(gTlsDatabase, (issuerRawDn is null) ? null : issuerRawDn.getByteArrayStruct(), (interaction is null) ? null : interaction.getTlsInteractionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous lookup of certificates. See * g_tls_database_lookup_certificates_issued_by() for more information. * * Params: * result = a #GAsyncResult. * * Returns: a newly allocated list of #GTlsCertificate * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. * * Since: 2.30 * * Throws: GException on failure. */ public ListG lookupCertificatesIssuedByFinish(AsyncResultIF result) { GError* err = null; auto p = g_tls_database_lookup_certificates_issued_by_finish(gTlsDatabase, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Determines the validity of a certificate chain after looking up and * adding any missing certificates to the chain. * * @chain is a chain of #GTlsCertificate objects each pointing to the next * certificate in the chain by its %issuer property. The chain may initially * consist of one or more certificates. After the verification process is * complete, @chain may be modified by adding missing certificates, or removing * extra certificates. If a certificate anchor was found, then it is added to * the @chain. * * @purpose describes the purpose (or usage) for which the certificate * is being used. Typically @purpose will be set to #G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER * which means that the certificate is being used to authenticate a server * (and we are acting as the client). * * The @identity is used to check for pinned certificates (trust exceptions) * in the database. These will override the normal verification process on a * host by host basis. * * Currently there are no @flags, and %G_TLS_DATABASE_VERIFY_NONE should be * used. * * If @chain is found to be valid, then the return value will be 0. If * @chain is found to be invalid, then the return value will indicate * the problems found. If the function is unable to determine whether * @chain is valid or not (eg, because @cancellable is triggered * before it completes) then the return value will be * %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set * accordingly. @error is not set when @chain is successfully analyzed * but found to be invalid. * * This function can block, use g_tls_database_verify_chain_async() to perform * the verification operation asynchronously. * * Params: * chain = a #GTlsCertificate chain * purpose = the purpose that this certificate chain will be used for. * identity = the expected peer identity * interaction = used to interact with the user if necessary * flags = additional verify flags * cancellable = a #GCancellable, or %NULL * * Returns: the appropriate #GTlsCertificateFlags which represents the * result of verification. * * Since: 2.30 * * Throws: GException on failure. */ public GTlsCertificateFlags verifyChain(TlsCertificate chain, string purpose, SocketConnectableIF identity, TlsInteraction interaction, GTlsDatabaseVerifyFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_tls_database_verify_chain(gTlsDatabase, (chain is null) ? null : chain.getTlsCertificateStruct(), Str.toStringz(purpose), (identity is null) ? null : identity.getSocketConnectableStruct(), (interaction is null) ? null : interaction.getTlsInteractionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously determines the validity of a certificate chain after * looking up and adding any missing certificates to the chain. See * g_tls_database_verify_chain() for more information. * * Params: * chain = a #GTlsCertificate chain * purpose = the purpose that this certificate chain will be used for. * identity = the expected peer identity * interaction = used to interact with the user if necessary * flags = additional verify flags * cancellable = a #GCancellable, or %NULL * callback = callback to call when the operation completes * userData = the data to pass to the callback function * * Since: 2.30 */ public void verifyChainAsync(TlsCertificate chain, string purpose, SocketConnectableIF identity, TlsInteraction interaction, GTlsDatabaseVerifyFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_tls_database_verify_chain_async(gTlsDatabase, (chain is null) ? null : chain.getTlsCertificateStruct(), Str.toStringz(purpose), (identity is null) ? null : identity.getSocketConnectableStruct(), (interaction is null) ? null : interaction.getTlsInteractionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finish an asynchronous verify chain operation. See * g_tls_database_verify_chain() for more information. * * If @chain is found to be valid, then the return value will be 0. If * @chain is found to be invalid, then the return value will indicate * the problems found. If the function is unable to determine whether * @chain is valid or not (eg, because @cancellable is triggered * before it completes) then the return value will be * %G_TLS_CERTIFICATE_GENERIC_ERROR and @error will be set * accordingly. @error is not set when @chain is successfully analyzed * but found to be invalid. * * Params: * result = a #GAsyncResult. * * Returns: the appropriate #GTlsCertificateFlags which represents the * result of verification. * * Since: 2.30 * * Throws: GException on failure. */ public GTlsCertificateFlags verifyChainFinish(AsyncResultIF result) { GError* err = null; auto p = g_tls_database_verify_chain_finish(gTlsDatabase, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/TlsFileDatabaseIF.d000066400000000000000000000033521324604450400214040ustar00rootroot00000000000000/* * 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 gio.TlsFileDatabaseIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GTlsFileDatabase is implemented by #GTlsDatabase objects which load * their certificate information from a file. It is an interface which * TLS library specific subtypes implement. * * Since: 2.30 */ public interface TlsFileDatabaseIF{ /** Get the main Gtk struct */ public GTlsFileDatabase* getTlsFileDatabaseStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_tls_file_database_get_type(); } } GtkD-3.7.5/generated/gtkd/gio/TlsFileDatabaseT.d000066400000000000000000000032641324604450400213130ustar00rootroot00000000000000/* * 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 gio.TlsFileDatabaseT; public import gio.c.functions; public import gio.c.types; public import glib.ConstructionException; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GTlsFileDatabase is implemented by #GTlsDatabase objects which load * their certificate information from a file. It is an interface which * TLS library specific subtypes implement. * * Since: 2.30 */ public template TlsFileDatabaseT(TStruct) { /** Get the main Gtk struct */ public GTlsFileDatabase* getTlsFileDatabaseStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GTlsFileDatabase*)getStruct(); } } GtkD-3.7.5/generated/gtkd/gio/TlsInteraction.d000066400000000000000000000350521324604450400211420ustar00rootroot00000000000000/* * 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 gio.TlsInteraction; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.TlsConnection; private import gio.TlsPassword; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GTlsInteraction provides a mechanism for the TLS connection and database * code to interact with the user. It can be used to ask the user for passwords. * * To use a #GTlsInteraction with a TLS connection use * g_tls_connection_set_interaction(). * * Callers should instantiate a derived class that implements the various * interaction methods to show the required dialogs. * * Callers should use the 'invoke' functions like * g_tls_interaction_invoke_ask_password() to run interaction methods. These * functions make sure that the interaction is invoked in the main loop * and not in the current thread, if the current thread is not running the * main loop. * * Derived classes can choose to implement whichever interactions methods they'd * like to support by overriding those virtual methods in their class * initialization function. Any interactions not implemented will return * %G_TLS_INTERACTION_UNHANDLED. If a derived class implements an async method, * it must also implement the corresponding finish method. * * Since: 2.30 */ public class TlsInteraction : ObjectG { /** the main Gtk struct */ protected GTlsInteraction* gTlsInteraction; /** Get the main Gtk struct */ public GTlsInteraction* getTlsInteractionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTlsInteraction; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTlsInteraction; } protected override void setStruct(GObject* obj) { gTlsInteraction = cast(GTlsInteraction*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTlsInteraction* gTlsInteraction, bool ownedRef = false) { this.gTlsInteraction = gTlsInteraction; super(cast(GObject*)gTlsInteraction, ownedRef); } /** */ public static GType getType() { return g_tls_interaction_get_type(); } /** * Run synchronous interaction to ask the user for a password. In general, * g_tls_interaction_invoke_ask_password() should be used instead of this * function. * * Derived subclasses usually implement a password prompt, although they may * also choose to provide a password from elsewhere. The @password value will * be filled in and then @callback will be called. Alternatively the user may * abort this password request, which will usually abort the TLS connection. * * If the interaction is cancelled by the cancellation object, or by the * user then %G_TLS_INTERACTION_FAILED will be returned with an error that * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may * not support immediate cancellation. * * Params: * password = a #GTlsPassword object * cancellable = an optional #GCancellable cancellation object * * Returns: The status of the ask password interaction. * * Since: 2.30 * * Throws: GException on failure. */ public GTlsInteractionResult askPassword(TlsPassword password, Cancellable cancellable) { GError* err = null; auto p = g_tls_interaction_ask_password(gTlsInteraction, (password is null) ? null : password.getTlsPasswordStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Run asynchronous interaction to ask the user for a password. In general, * g_tls_interaction_invoke_ask_password() should be used instead of this * function. * * Derived subclasses usually implement a password prompt, although they may * also choose to provide a password from elsewhere. The @password value will * be filled in and then @callback will be called. Alternatively the user may * abort this password request, which will usually abort the TLS connection. * * If the interaction is cancelled by the cancellation object, or by the * user then %G_TLS_INTERACTION_FAILED will be returned with an error that * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may * not support immediate cancellation. * * Certain implementations may not support immediate cancellation. * * Params: * password = a #GTlsPassword object * cancellable = an optional #GCancellable cancellation object * callback = will be called when the interaction completes * userData = data to pass to the @callback * * Since: 2.30 */ public void askPasswordAsync(TlsPassword password, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_tls_interaction_ask_password_async(gTlsInteraction, (password is null) ? null : password.getTlsPasswordStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Complete an ask password user interaction request. This should be once * the g_tls_interaction_ask_password_async() completion callback is called. * * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsPassword passed * to g_tls_interaction_ask_password() will have its password filled in. * * If the interaction is cancelled by the cancellation object, or by the * user then %G_TLS_INTERACTION_FAILED will be returned with an error that * contains a %G_IO_ERROR_CANCELLED error code. * * Params: * result = the result passed to the callback * * Returns: The status of the ask password interaction. * * Since: 2.30 * * Throws: GException on failure. */ public GTlsInteractionResult askPasswordFinish(AsyncResultIF result) { GError* err = null; auto p = g_tls_interaction_ask_password_finish(gTlsInteraction, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Invoke the interaction to ask the user for a password. It invokes this * interaction in the main loop, specifically the #GMainContext returned by * g_main_context_get_thread_default() when the interaction is created. This * is called by called by #GTlsConnection or #GTlsDatabase to ask the user * for a password. * * Derived subclasses usually implement a password prompt, although they may * also choose to provide a password from elsewhere. The @password value will * be filled in and then @callback will be called. Alternatively the user may * abort this password request, which will usually abort the TLS connection. * * The implementation can either be a synchronous (eg: modal dialog) or an * asynchronous one (eg: modeless dialog). This function will take care of * calling which ever one correctly. * * If the interaction is cancelled by the cancellation object, or by the * user then %G_TLS_INTERACTION_FAILED will be returned with an error that * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may * not support immediate cancellation. * * Params: * password = a #GTlsPassword object * cancellable = an optional #GCancellable cancellation object * * Returns: The status of the ask password interaction. * * Since: 2.30 * * Throws: GException on failure. */ public GTlsInteractionResult invokeAskPassword(TlsPassword password, Cancellable cancellable) { GError* err = null; auto p = g_tls_interaction_invoke_ask_password(gTlsInteraction, (password is null) ? null : password.getTlsPasswordStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Invoke the interaction to ask the user to choose a certificate to * use with the connection. It invokes this interaction in the main * loop, specifically the #GMainContext returned by * g_main_context_get_thread_default() when the interaction is * created. This is called by called by #GTlsConnection when the peer * requests a certificate during the handshake. * * Derived subclasses usually implement a certificate selector, * although they may also choose to provide a certificate from * elsewhere. Alternatively the user may abort this certificate * request, which may or may not abort the TLS connection. * * The implementation can either be a synchronous (eg: modal dialog) or an * asynchronous one (eg: modeless dialog). This function will take care of * calling which ever one correctly. * * If the interaction is cancelled by the cancellation object, or by the * user then %G_TLS_INTERACTION_FAILED will be returned with an error that * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may * not support immediate cancellation. * * Params: * connection = a #GTlsConnection object * flags = flags providing more information about the request * cancellable = an optional #GCancellable cancellation object * * Returns: The status of the certificate request interaction. * * Since: 2.40 * * Throws: GException on failure. */ public GTlsInteractionResult invokeRequestCertificate(TlsConnection connection, GTlsCertificateRequestFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_tls_interaction_invoke_request_certificate(gTlsInteraction, (connection is null) ? null : connection.getTlsConnectionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Run synchronous interaction to ask the user to choose a certificate to use * with the connection. In general, g_tls_interaction_invoke_request_certificate() * should be used instead of this function. * * Derived subclasses usually implement a certificate selector, although they may * also choose to provide a certificate from elsewhere. Alternatively the user may * abort this certificate request, which will usually abort the TLS connection. * * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection * passed to g_tls_interaction_request_certificate() will have had its * #GTlsConnection:certificate filled in. * * If the interaction is cancelled by the cancellation object, or by the * user then %G_TLS_INTERACTION_FAILED will be returned with an error that * contains a %G_IO_ERROR_CANCELLED error code. Certain implementations may * not support immediate cancellation. * * Params: * connection = a #GTlsConnection object * flags = flags providing more information about the request * cancellable = an optional #GCancellable cancellation object * * Returns: The status of the request certificate interaction. * * Since: 2.40 * * Throws: GException on failure. */ public GTlsInteractionResult requestCertificate(TlsConnection connection, GTlsCertificateRequestFlags flags, Cancellable cancellable) { GError* err = null; auto p = g_tls_interaction_request_certificate(gTlsInteraction, (connection is null) ? null : connection.getTlsConnectionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Run asynchronous interaction to ask the user for a certificate to use with * the connection. In general, g_tls_interaction_invoke_request_certificate() should * be used instead of this function. * * Derived subclasses usually implement a certificate selector, although they may * also choose to provide a certificate from elsewhere. @callback will be called * when the operation completes. Alternatively the user may abort this certificate * request, which will usually abort the TLS connection. * * Params: * connection = a #GTlsConnection object * flags = flags providing more information about the request * cancellable = an optional #GCancellable cancellation object * callback = will be called when the interaction completes * userData = data to pass to the @callback * * Since: 2.40 */ public void requestCertificateAsync(TlsConnection connection, GTlsCertificateRequestFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_tls_interaction_request_certificate_async(gTlsInteraction, (connection is null) ? null : connection.getTlsConnectionStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Complete an request certificate user interaction request. This should be once * the g_tls_interaction_request_certificate_async() completion callback is called. * * If %G_TLS_INTERACTION_HANDLED is returned, then the #GTlsConnection * passed to g_tls_interaction_request_certificate_async() will have had its * #GTlsConnection:certificate filled in. * * If the interaction is cancelled by the cancellation object, or by the * user then %G_TLS_INTERACTION_FAILED will be returned with an error that * contains a %G_IO_ERROR_CANCELLED error code. * * Params: * result = the result passed to the callback * * Returns: The status of the request certificate interaction. * * Since: 2.40 * * Throws: GException on failure. */ public GTlsInteractionResult requestCertificateFinish(AsyncResultIF result) { GError* err = null; auto p = g_tls_interaction_request_certificate_finish(gTlsInteraction, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/TlsPassword.d000066400000000000000000000137441324604450400204710ustar00rootroot00000000000000/* * 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 gio.TlsPassword; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Holds a password used in TLS. * * Since: 2.30 */ public class TlsPassword : ObjectG { /** the main Gtk struct */ protected GTlsPassword* gTlsPassword; /** Get the main Gtk struct */ public GTlsPassword* getTlsPasswordStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTlsPassword; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTlsPassword; } protected override void setStruct(GObject* obj) { gTlsPassword = cast(GTlsPassword*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTlsPassword* gTlsPassword, bool ownedRef = false) { this.gTlsPassword = gTlsPassword; super(cast(GObject*)gTlsPassword, ownedRef); } /** */ public static GType getType() { return g_tls_password_get_type(); } /** * Create a new #GTlsPassword object. * * Params: * flags = the password flags * description = description of what the password is for * * Returns: The newly allocated password object * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GTlsPasswordFlags flags, string description) { auto p = g_tls_password_new(flags, Str.toStringz(description)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GTlsPassword*) p, true); } /** * Get a description string about what the password will be used for. * * Returns: The description of the password. * * Since: 2.30 */ public string getDescription() { return Str.toString(g_tls_password_get_description(gTlsPassword)); } /** * Get flags about the password. * * Returns: The flags about the password. * * Since: 2.30 */ public GTlsPasswordFlags getFlags() { return g_tls_password_get_flags(gTlsPassword); } /** * Get the password value. If @length is not %NULL then it will be * filled in with the length of the password value. (Note that the * password value is not nul-terminated, so you can only pass %NULL * for @length in contexts where you know the password will have a * certain fixed length.) * * Returns: The password value (owned by the password object). * * Since: 2.30 */ public char[] getValue() { size_t length; auto p = g_tls_password_get_value(gTlsPassword, &length); return p[0 .. length]; } /** * Get a user readable translated warning. Usually this warning is a * representation of the password flags returned from * g_tls_password_get_flags(). * * Returns: The warning. * * Since: 2.30 */ public string getWarning() { return Str.toString(g_tls_password_get_warning(gTlsPassword)); } /** * Set a description string about what the password will be used for. * * Params: * description = The description of the password * * Since: 2.30 */ public void setDescription(string description) { g_tls_password_set_description(gTlsPassword, Str.toStringz(description)); } /** * Set flags about the password. * * Params: * flags = The flags about the password * * Since: 2.30 */ public void setFlags(GTlsPasswordFlags flags) { g_tls_password_set_flags(gTlsPassword, flags); } /** * Set the value for this password. The @value will be copied by the password * object. * * Specify the @length, for a non-nul-terminated password. Pass -1 as * @length if using a nul-terminated password, and @length will be * calculated automatically. (Note that the terminating nul is not * considered part of the password in this case.) * * Params: * value = the new password value * * Since: 2.30 */ public void setValue(char[] value) { g_tls_password_set_value(gTlsPassword, value.ptr, cast(ptrdiff_t)value.length); } /** * Provide the value for this password. * * The @value will be owned by the password object, and later freed using * the @destroy function callback. * * Specify the @length, for a non-nul-terminated password. Pass -1 as * @length if using a nul-terminated password, and @length will be * calculated automatically. (Note that the terminating nul is not * considered part of the password in this case.) * * Params: * value = the value for the password * destroy = a function to use to free the password. * * Since: 2.30 */ public void setValueFull(char[] value, GDestroyNotify destroy) { g_tls_password_set_value_full(gTlsPassword, value.ptr, cast(ptrdiff_t)value.length, destroy); } /** * Set a user readable translated warning. Usually this warning is a * representation of the password flags returned from * g_tls_password_get_flags(). * * Params: * warning = The user readable warning * * Since: 2.30 */ public void setWarning(string warning) { g_tls_password_set_warning(gTlsPassword, Str.toStringz(warning)); } } GtkD-3.7.5/generated/gtkd/gio/TlsServerConnectionIF.d000066400000000000000000000033411324604450400223640ustar00rootroot00000000000000/* * 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 gio.TlsServerConnectionIF; private import gio.IOStream; private import gio.TlsCertificate; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GTlsServerConnection is the server-side subclass of #GTlsConnection, * representing a server-side TLS connection. * * Since: 2.28 */ public interface TlsServerConnectionIF{ /** Get the main Gtk struct */ public GTlsServerConnection* getTlsServerConnectionStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_tls_server_connection_get_type(); } } GtkD-3.7.5/generated/gtkd/gio/TlsServerConnectionT.d000066400000000000000000000032531324604450400222730ustar00rootroot00000000000000/* * 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 gio.TlsServerConnectionT; public import gio.IOStream; public import gio.TlsCertificate; public import gio.c.functions; public import gio.c.types; public import glib.ConstructionException; public import glib.ErrorG; public import glib.GException; public import gobject.ObjectG; public import gtkc.giotypes; /** * #GTlsServerConnection is the server-side subclass of #GTlsConnection, * representing a server-side TLS connection. * * Since: 2.28 */ public template TlsServerConnectionT(TStruct) { /** Get the main Gtk struct */ public GTlsServerConnection* getTlsServerConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GTlsServerConnection*)getStruct(); } } GtkD-3.7.5/generated/gtkd/gio/UnixConnection.d000066400000000000000000000225521324604450400211440ustar00rootroot00000000000000/* * 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 gio.UnixConnection; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.Credentials; private import gio.SocketConnection; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * This is the subclass of #GSocketConnection that is created * for UNIX domain sockets. * * It contains functions to do some of the UNIX socket specific * functionality like passing file descriptors. * * Note that `` belongs to the UNIX-specific * GIO interfaces, thus you have to use the `gio-unix-2.0.pc` * pkg-config file when using it. */ public class UnixConnection : SocketConnection { /** the main Gtk struct */ protected GUnixConnection* gUnixConnection; /** Get the main Gtk struct */ public GUnixConnection* getUnixConnectionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixConnection; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gUnixConnection; } protected override void setStruct(GObject* obj) { gUnixConnection = cast(GUnixConnection*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixConnection* gUnixConnection, bool ownedRef = false) { this.gUnixConnection = gUnixConnection; super(cast(GSocketConnection*)gUnixConnection, ownedRef); } /** */ public static GType getType() { return g_unix_connection_get_type(); } /** * Receives credentials from the sending end of the connection. The * sending end has to call g_unix_connection_send_credentials() (or * similar) for this to work. * * As well as reading the credentials this also reads (and discards) a * single byte from the stream, as this is required for credentials * passing to work on some implementations. * * Other ways to exchange credentials with a foreign peer includes the * #GUnixCredentialsMessage type and g_socket_get_credentials() function. * * Params: * cancellable = A #GCancellable or %NULL. * * Returns: Received credentials on success (free with * g_object_unref()), %NULL if @error is set. * * Since: 2.26 * * Throws: GException on failure. */ public Credentials receiveCredentials(Cancellable cancellable) { GError* err = null; auto p = g_unix_connection_receive_credentials(gUnixConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Credentials)(cast(GCredentials*) p, true); } /** * Asynchronously receive credentials. * * For more details, see g_unix_connection_receive_credentials() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. You can then call * g_unix_connection_receive_credentials_finish() to get the result of the operation. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.32 */ public void receiveCredentialsAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_unix_connection_receive_credentials_async(gUnixConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous receive credentials operation started with * g_unix_connection_receive_credentials_async(). * * Params: * result = a #GAsyncResult. * * Returns: a #GCredentials, or %NULL on error. * Free the returned object with g_object_unref(). * * Since: 2.32 * * Throws: GException on failure. */ public Credentials receiveCredentialsFinish(AsyncResultIF result) { GError* err = null; auto p = g_unix_connection_receive_credentials_finish(gUnixConnection, (result is null) ? null : result.getAsyncResultStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return ObjectG.getDObject!(Credentials)(cast(GCredentials*) p, true); } /** * Receives a file descriptor from the sending end of the connection. * The sending end has to call g_unix_connection_send_fd() for this * to work. * * As well as reading the fd this also reads a single byte from the * stream, as this is required for fd passing to work on some * implementations. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore * * Returns: a file descriptor on success, -1 on error. * * Since: 2.22 * * Throws: GException on failure. */ public int receiveFd(Cancellable cancellable) { GError* err = null; auto p = g_unix_connection_receive_fd(gUnixConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Passes the credentials of the current user the receiving side * of the connection. The receiving end has to call * g_unix_connection_receive_credentials() (or similar) to accept the * credentials. * * As well as sending the credentials this also writes a single NUL * byte to the stream, as this is required for credentials passing to * work on some implementations. * * Other ways to exchange credentials with a foreign peer includes the * #GUnixCredentialsMessage type and g_socket_get_credentials() function. * * Params: * cancellable = A #GCancellable or %NULL. * * Returns: %TRUE on success, %FALSE if @error is set. * * Since: 2.26 * * Throws: GException on failure. */ public bool sendCredentials(Cancellable cancellable) { GError* err = null; auto p = g_unix_connection_send_credentials(gUnixConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Asynchronously send credentials. * * For more details, see g_unix_connection_send_credentials() which is * the synchronous version of this call. * * When the operation is finished, @callback will be called. You can then call * g_unix_connection_send_credentials_finish() to get the result of the operation. * * Params: * cancellable = optional #GCancellable object, %NULL to ignore. * callback = a #GAsyncReadyCallback to call when the request is satisfied * userData = the data to pass to callback function * * Since: 2.32 */ public void sendCredentialsAsync(Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_unix_connection_send_credentials_async(gUnixConnection, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes an asynchronous send credentials operation started with * g_unix_connection_send_credentials_async(). * * Params: * result = a #GAsyncResult. * * Returns: %TRUE if the operation was successful, otherwise %FALSE. * * Since: 2.32 * * Throws: GException on failure. */ public bool sendCredentialsFinish(AsyncResultIF result) { GError* err = null; auto p = g_unix_connection_send_credentials_finish(gUnixConnection, (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Passes a file descriptor to the receiving side of the * connection. The receiving end has to call g_unix_connection_receive_fd() * to accept the file descriptor. * * As well as sending the fd this also writes a single byte to the * stream, as this is required for fd passing to work on some * implementations. * * Params: * fd = a file descriptor * cancellable = optional #GCancellable object, %NULL to ignore. * * Returns: a %TRUE on success, %NULL on error. * * Since: 2.22 * * Throws: GException on failure. */ public bool sendFd(int fd, Cancellable cancellable) { GError* err = null; auto p = g_unix_connection_send_fd(gUnixConnection, fd, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/gio/UnixCredentialsMessage.d000066400000000000000000000106411324604450400226030ustar00rootroot00000000000000/* * 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 gio.UnixCredentialsMessage; private import gio.Credentials; private import gio.SocketControlMessage; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * This #GSocketControlMessage contains a #GCredentials instance. It * may be sent using g_socket_send_message() and received using * g_socket_receive_message() over UNIX sockets (ie: sockets in the * %G_SOCKET_FAMILY_UNIX family). * * For an easier way to send and receive credentials over * stream-oriented UNIX sockets, see * g_unix_connection_send_credentials() and * g_unix_connection_receive_credentials(). To receive credentials of * a foreign process connected to a socket, use * g_socket_get_credentials(). * * Since: 2.26 */ public class UnixCredentialsMessage : SocketControlMessage { /** the main Gtk struct */ protected GUnixCredentialsMessage* gUnixCredentialsMessage; /** Get the main Gtk struct */ public GUnixCredentialsMessage* getUnixCredentialsMessageStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixCredentialsMessage; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gUnixCredentialsMessage; } protected override void setStruct(GObject* obj) { gUnixCredentialsMessage = cast(GUnixCredentialsMessage*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixCredentialsMessage* gUnixCredentialsMessage, bool ownedRef = false) { this.gUnixCredentialsMessage = gUnixCredentialsMessage; super(cast(GSocketControlMessage*)gUnixCredentialsMessage, ownedRef); } /** */ public static GType getType() { return g_unix_credentials_message_get_type(); } /** * Creates a new #GUnixCredentialsMessage with credentials matching the current processes. * * Returns: a new #GUnixCredentialsMessage * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_unix_credentials_message_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GUnixCredentialsMessage*) p, true); } /** * Creates a new #GUnixCredentialsMessage holding @credentials. * * Params: * credentials = A #GCredentials object. * * Returns: a new #GUnixCredentialsMessage * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Credentials credentials) { auto p = g_unix_credentials_message_new_with_credentials((credentials is null) ? null : credentials.getCredentialsStruct()); if(p is null) { throw new ConstructionException("null returned by new_with_credentials"); } this(cast(GUnixCredentialsMessage*) p, true); } /** * Checks if passing #GCredentials on a #GSocket is supported on this platform. * * Returns: %TRUE if supported, %FALSE otherwise * * Since: 2.26 */ public static bool isSupported() { return g_unix_credentials_message_is_supported() != 0; } /** * Gets the credentials stored in @message. * * Returns: A #GCredentials instance. Do not free, it is owned by @message. * * Since: 2.26 */ public Credentials getCredentials() { auto p = g_unix_credentials_message_get_credentials(gUnixCredentialsMessage); if(p is null) { return null; } return ObjectG.getDObject!(Credentials)(cast(GCredentials*) p); } } GtkD-3.7.5/generated/gtkd/gio/UnixFDList.d000066400000000000000000000165301324604450400201710ustar00rootroot00000000000000/* * 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 gio.UnixFDList; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * A #GUnixFDList contains a list of file descriptors. It owns the file * descriptors that it contains, closing them when finalized. * * It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message() * and received using g_socket_receive_message(). * * Note that `` belongs to the UNIX-specific GIO * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config * file when using it. */ public class UnixFDList : ObjectG { /** the main Gtk struct */ protected GUnixFDList* gUnixFDList; /** Get the main Gtk struct */ public GUnixFDList* getUnixFDListStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixFDList; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gUnixFDList; } protected override void setStruct(GObject* obj) { gUnixFDList = cast(GUnixFDList*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixFDList* gUnixFDList, bool ownedRef = false) { this.gUnixFDList = gUnixFDList; super(cast(GObject*)gUnixFDList, ownedRef); } /** */ public static GType getType() { return g_unix_fd_list_get_type(); } /** * Creates a new #GUnixFDList containing no file descriptors. * * Returns: a new #GUnixFDList * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_unix_fd_list_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GUnixFDList*) p, true); } /** * Creates a new #GUnixFDList containing the file descriptors given in * @fds. The file descriptors become the property of the new list and * may no longer be used by the caller. The array itself is owned by * the caller. * * Each file descriptor in the array should be set to close-on-exec. * * If @n_fds is -1 then @fds must be terminated with -1. * * Params: * fds = the initial list of file descriptors * * Returns: a new #GUnixFDList * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int[] fds) { auto p = g_unix_fd_list_new_from_array(fds.ptr, cast(int)fds.length); if(p is null) { throw new ConstructionException("null returned by new_from_array"); } this(cast(GUnixFDList*) p, true); } /** * Adds a file descriptor to @list. * * The file descriptor is duplicated using dup(). You keep your copy * of the descriptor and the copy contained in @list will be closed * when @list is finalized. * * A possible cause of failure is exceeding the per-process or * system-wide file descriptor limit. * * The index of the file descriptor in the list is returned. If you use * this index with g_unix_fd_list_get() then you will receive back a * duplicated copy of the same file descriptor. * * Params: * fd = a valid open file descriptor * * Returns: the index of the appended fd in case of success, else -1 * (and @error is set) * * Since: 2.24 * * Throws: GException on failure. */ public int append(int fd) { GError* err = null; auto p = g_unix_fd_list_append(gUnixFDList, fd, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets a file descriptor out of @list. * * @index_ specifies the index of the file descriptor to get. It is a * programmer error for @index_ to be out of range; see * g_unix_fd_list_get_length(). * * The file descriptor is duplicated using dup() and set as * close-on-exec before being returned. You must call close() on it * when you are done. * * A possible cause of failure is exceeding the per-process or * system-wide file descriptor limit. * * Params: * index = the index into the list * * Returns: the file descriptor, or -1 in case of error * * Since: 2.24 * * Throws: GException on failure. */ public int get(int index) { GError* err = null; auto p = g_unix_fd_list_get(gUnixFDList, index, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the length of @list (ie: the number of file descriptors * contained within). * * Returns: the length of @list * * Since: 2.24 */ public int getLength() { return g_unix_fd_list_get_length(gUnixFDList); } /** * Returns the array of file descriptors that is contained in this * object. * * After this call, the descriptors remain the property of @list. The * caller must not close them and must not free the array. The array is * valid only until @list is changed in any way. * * If @length is non-%NULL then it is set to the number of file * descriptors in the returned array. The returned array is also * terminated with -1. * * This function never returns %NULL. In case there are no file * descriptors contained in @list, an empty array is returned. * * Returns: an array of file * descriptors * * Since: 2.24 */ public int[] peekFds() { int length; auto p = g_unix_fd_list_peek_fds(gUnixFDList, &length); return p[0 .. length]; } /** * Returns the array of file descriptors that is contained in this * object. * * After this call, the descriptors are no longer contained in * @list. Further calls will return an empty list (unless more * descriptors have been added). * * The return result of this function must be freed with g_free(). * The caller is also responsible for closing all of the file * descriptors. The file descriptors in the array are set to * close-on-exec. * * If @length is non-%NULL then it is set to the number of file * descriptors in the returned array. The returned array is also * terminated with -1. * * This function never returns %NULL. In case there are no file * descriptors contained in @list, an empty array is returned. * * Returns: an array of file * descriptors * * Since: 2.24 */ public int[] stealFds() { int length; auto p = g_unix_fd_list_steal_fds(gUnixFDList, &length); return p[0 .. length]; } } GtkD-3.7.5/generated/gtkd/gio/UnixFDMessage.d000066400000000000000000000133471324604450400206450ustar00rootroot00000000000000/* * 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 gio.UnixFDMessage; private import gio.SocketControlMessage; private import gio.UnixFDList; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import gobject.ObjectG; public import gtkc.giotypes; /** * This #GSocketControlMessage contains a #GUnixFDList. * It may be sent using g_socket_send_message() and received using * g_socket_receive_message() over UNIX sockets (ie: sockets in the * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied * between processes by the kernel. * * For an easier way to send and receive file descriptors over * stream-oriented UNIX sockets, see g_unix_connection_send_fd() and * g_unix_connection_receive_fd(). * * Note that `` belongs to the UNIX-specific GIO * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config * file when using it. */ public class UnixFDMessage : SocketControlMessage { /** the main Gtk struct */ protected GUnixFDMessage* gUnixFDMessage; /** Get the main Gtk struct */ public GUnixFDMessage* getUnixFDMessageStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixFDMessage; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gUnixFDMessage; } protected override void setStruct(GObject* obj) { gUnixFDMessage = cast(GUnixFDMessage*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixFDMessage* gUnixFDMessage, bool ownedRef = false) { this.gUnixFDMessage = gUnixFDMessage; super(cast(GSocketControlMessage*)gUnixFDMessage, ownedRef); } /** */ public static GType getType() { return g_unix_fd_message_get_type(); } /** * Creates a new #GUnixFDMessage containing an empty file descriptor * list. * * Returns: a new #GUnixFDMessage * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_unix_fd_message_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GUnixFDMessage*) p, true); } /** * Creates a new #GUnixFDMessage containing @list. * * Params: * fdList = a #GUnixFDList * * Returns: a new #GUnixFDMessage * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(UnixFDList fdList) { auto p = g_unix_fd_message_new_with_fd_list((fdList is null) ? null : fdList.getUnixFDListStruct()); if(p is null) { throw new ConstructionException("null returned by new_with_fd_list"); } this(cast(GUnixFDMessage*) p, true); } /** * Adds a file descriptor to @message. * * The file descriptor is duplicated using dup(). You keep your copy * of the descriptor and the copy contained in @message will be closed * when @message is finalized. * * A possible cause of failure is exceeding the per-process or * system-wide file descriptor limit. * * Params: * fd = a valid open file descriptor * * Returns: %TRUE in case of success, else %FALSE (and @error is set) * * Since: 2.22 * * Throws: GException on failure. */ public bool appendFd(int fd) { GError* err = null; auto p = g_unix_fd_message_append_fd(gUnixFDMessage, fd, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the #GUnixFDList contained in @message. This function does not * return a reference to the caller, but the returned list is valid for * the lifetime of @message. * * Returns: the #GUnixFDList from @message * * Since: 2.24 */ public UnixFDList getFdList() { auto p = g_unix_fd_message_get_fd_list(gUnixFDMessage); if(p is null) { return null; } return ObjectG.getDObject!(UnixFDList)(cast(GUnixFDList*) p); } /** * Returns the array of file descriptors that is contained in this * object. * * After this call, the descriptors are no longer contained in * @message. Further calls will return an empty list (unless more * descriptors have been added). * * The return result of this function must be freed with g_free(). * The caller is also responsible for closing all of the file * descriptors. * * If @length is non-%NULL then it is set to the number of file * descriptors in the returned array. The returned array is also * terminated with -1. * * This function never returns %NULL. In case there are no file * descriptors contained in @message, an empty array is returned. * * Returns: an array of file * descriptors * * Since: 2.22 */ public int[] stealFds() { int length; auto p = g_unix_fd_message_steal_fds(gUnixFDMessage, &length); return p[0 .. length]; } } GtkD-3.7.5/generated/gtkd/gio/UnixInputStream.d000066400000000000000000000105231324604450400213130ustar00rootroot00000000000000/* * 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 gio.UnixInputStream; private import gio.FileDescriptorBasedIF; private import gio.FileDescriptorBasedT; private import gio.InputStream; private import gio.PollableInputStreamIF; private import gio.PollableInputStreamT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GUnixInputStream implements #GInputStream for reading from a UNIX * file descriptor, including asynchronous operations. (If the file * descriptor refers to a socket or pipe, this will use poll() to do * asynchronous I/O. If it refers to a regular file, it will fall back * to doing asynchronous I/O in another thread.) * * Note that `` belongs to the UNIX-specific GIO * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config * file when using it. */ public class UnixInputStream : InputStream, FileDescriptorBasedIF, PollableInputStreamIF { /** the main Gtk struct */ protected GUnixInputStream* gUnixInputStream; /** Get the main Gtk struct */ public GUnixInputStream* getUnixInputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixInputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gUnixInputStream; } protected override void setStruct(GObject* obj) { gUnixInputStream = cast(GUnixInputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixInputStream* gUnixInputStream, bool ownedRef = false) { this.gUnixInputStream = gUnixInputStream; super(cast(GInputStream*)gUnixInputStream, ownedRef); } // add the FileDescriptorBased capabilities mixin FileDescriptorBasedT!(GUnixInputStream); // add the PollableInputStream capabilities mixin PollableInputStreamT!(GUnixInputStream); /** */ public static GType getType() { return g_unix_input_stream_get_type(); } /** * Creates a new #GUnixInputStream for the given @fd. * * If @close_fd is %TRUE, the file descriptor will be closed * when the stream is closed. * * Params: * fd = a UNIX file descriptor * closeFd = %TRUE to close the file descriptor when done * * Returns: a new #GUnixInputStream * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int fd, bool closeFd) { auto p = g_unix_input_stream_new(fd, closeFd); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GUnixInputStream*) p, true); } /** * Returns whether the file descriptor of @stream will be * closed when the stream is closed. * * Returns: %TRUE if the file descriptor is closed when done * * Since: 2.20 */ public bool getCloseFd() { return g_unix_input_stream_get_close_fd(gUnixInputStream) != 0; } /** * Return the UNIX file descriptor that the stream reads from. * * Returns: The file descriptor of @stream * * Since: 2.20 */ public int getFd() { return g_unix_input_stream_get_fd(gUnixInputStream); } /** * Sets whether the file descriptor of @stream shall be closed * when the stream is closed. * * Params: * closeFd = %TRUE to close the file descriptor when done * * Since: 2.20 */ public void setCloseFd(bool closeFd) { g_unix_input_stream_set_close_fd(gUnixInputStream, closeFd); } } GtkD-3.7.5/generated/gtkd/gio/UnixMountEntry.d000066400000000000000000000212561324604450400211710ustar00rootroot00000000000000/* * 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 gio.UnixMountEntry; private import gio.IconIF; private import gio.c.functions; public import gio.c.types; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Defines a Unix mount entry (e.g. /media/cdrom). * This corresponds roughly to a mtab entry. */ public class UnixMountEntry { /** the main Gtk struct */ protected GUnixMountEntry* gUnixMountEntry; protected bool ownedRef; /** Get the main Gtk struct */ public GUnixMountEntry* getUnixMountEntryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixMountEntry; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gUnixMountEntry; } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixMountEntry* gUnixMountEntry, bool ownedRef = false) { this.gUnixMountEntry = gUnixMountEntry; this.ownedRef = ownedRef; } /** */ public static GType getType() { return g_unix_mount_entry_get_type(); } /** * Determines if @mount_path is considered an implementation of the * OS. This is primarily used for hiding mountable and mounted volumes * that only are used in the OS and has little to no relevance to the * casual user. * * Params: * mountPath = a mount path, e.g. `/media/disk` or `/usr` * * Returns: %TRUE if @mount_path is considered an implementation detail * of the OS. */ public static bool isMountPathSystemInternal(string mountPath) { return g_unix_is_mount_path_system_internal(Str.toStringz(mountPath)) != 0; } /** * Gets a #GUnixMountEntry for a given mount path. If @time_read * is set, it will be filled with a unix timestamp for checking * if the mounts have changed since with g_unix_mounts_changed_since(). * * Params: * mountPath = path for a possible unix mount. * timeRead = guint64 to contain a timestamp. * * Returns: a #GUnixMountEntry. */ public static UnixMountEntry at(string mountPath, out ulong timeRead) { auto p = g_unix_mount_at(Str.toStringz(mountPath), &timeRead); if(p is null) { return null; } return ObjectG.getDObject!(UnixMountEntry)(cast(GUnixMountEntry*) p, true); } /** * Compares two unix mounts. * * Params: * mount2 = second #GUnixMountEntry to compare. * * Returns: 1, 0 or -1 if @mount1 is greater than, equal to, * or less than @mount2, respectively. */ public int compare(UnixMountEntry mount2) { return g_unix_mount_compare(gUnixMountEntry, (mount2 is null) ? null : mount2.getUnixMountEntryStruct()); } /** * Frees a unix mount. */ public void free() { g_unix_mount_free(gUnixMountEntry); } /** * Gets the device path for a unix mount. * * Returns: a string containing the device path. */ public string getDevicePath() { return Str.toString(g_unix_mount_get_device_path(gUnixMountEntry)); } /** * Gets the filesystem type for the unix mount. * * Returns: a string containing the file system type. */ public string getFsType() { return Str.toString(g_unix_mount_get_fs_type(gUnixMountEntry)); } /** * Gets the mount path for a unix mount. * * Returns: the mount path for @mount_entry. */ public string getMountPath() { return Str.toString(g_unix_mount_get_mount_path(gUnixMountEntry)); } /** * Guesses whether a Unix mount can be ejected. * * Returns: %TRUE if @mount_entry is deemed to be ejectable. */ public bool guessCanEject() { return g_unix_mount_guess_can_eject(gUnixMountEntry) != 0; } /** * Guesses the icon of a Unix mount. * * Returns: a #GIcon */ public IconIF guessIcon() { auto p = g_unix_mount_guess_icon(gUnixMountEntry); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Guesses the name of a Unix mount. * The result is a translated string. * * Returns: A newly allocated string that must * be freed with g_free() */ public string guessName() { auto retStr = g_unix_mount_guess_name(gUnixMountEntry); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Guesses whether a Unix mount should be displayed in the UI. * * Returns: %TRUE if @mount_entry is deemed to be displayable. */ public bool guessShouldDisplay() { return g_unix_mount_guess_should_display(gUnixMountEntry) != 0; } /** * Guesses the symbolic icon of a Unix mount. * * Returns: a #GIcon * * Since: 2.34 */ public IconIF guessSymbolicIcon() { auto p = g_unix_mount_guess_symbolic_icon(gUnixMountEntry); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Checks if a unix mount is mounted read only. * * Returns: %TRUE if @mount_entry is read only. */ public bool isReadonly() { return g_unix_mount_is_readonly(gUnixMountEntry) != 0; } /** * Checks if a unix mount is a system path. * * Returns: %TRUE if the unix mount is for a system path. */ public bool isSystemInternal() { return g_unix_mount_is_system_internal(gUnixMountEntry) != 0; } /** * Checks if the unix mount points have changed since a given unix time. * * Params: * time = guint64 to contain a timestamp. * * Returns: %TRUE if the mount points have changed since @time. */ public static bool pointsChangedSince(ulong time) { return g_unix_mount_points_changed_since(time) != 0; } /** * Gets a #GList of #GUnixMountPoint containing the unix mount points. * If @time_read is set, it will be filled with the mount timestamp, * allowing for checking if the mounts have changed with * g_unix_mount_points_changed_since(). * * Params: * timeRead = guint64 to contain a timestamp. * * Returns: a #GList of the UNIX mountpoints. */ public static ListG mountPointsGet(out ulong timeRead) { auto p = g_unix_mount_points_get(&timeRead); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Checks if the unix mounts have changed since a given unix time. * * Params: * time = guint64 to contain a timestamp. * * Returns: %TRUE if the mounts have changed since @time. */ public static bool mountsChangedSince(ulong time) { return g_unix_mounts_changed_since(time) != 0; } /** * Gets a #GList of #GUnixMountEntry containing the unix mounts. * If @time_read is set, it will be filled with the mount * timestamp, allowing for checking if the mounts have changed * with g_unix_mounts_changed_since(). * * Params: * timeRead = guint64 to contain a timestamp, or %NULL * * Returns: a #GList of the UNIX mounts. */ public static ListG mountsGet(out ulong timeRead) { auto p = g_unix_mounts_get(&timeRead); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Makes a copy of @mount_entry. * * Returns: a new #GUnixMountEntry * * Since: 2.54 */ public UnixMountEntry copy() { auto p = g_unix_mount_copy(gUnixMountEntry); if(p is null) { return null; } return ObjectG.getDObject!(UnixMountEntry)(cast(GUnixMountEntry*) p, true); } /** * Gets a #GUnixMountEntry for a given file path. If @time_read * is set, it will be filled with a unix timestamp for checking * if the mounts have changed since with g_unix_mounts_changed_since(). * * Params: * filePath = file path on some unix mount. * timeRead = guint64 to contain a timestamp. * * Returns: a #GUnixMountEntry. * * Since: 2.52 */ public static UnixMountEntry mountFor(string filePath, out ulong timeRead) { auto p = g_unix_mount_for(Str.toStringz(filePath), &timeRead); if(p is null) { return null; } return ObjectG.getDObject!(UnixMountEntry)(cast(GUnixMountEntry*) p, true); } } GtkD-3.7.5/generated/gtkd/gio/UnixMountMonitor.d000066400000000000000000000153251324604450400215170ustar00rootroot00000000000000/* * 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 gio.UnixMountMonitor; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * Watches #GUnixMounts for changes. */ public class UnixMountMonitor : ObjectG { /** the main Gtk struct */ protected GUnixMountMonitor* gUnixMountMonitor; /** Get the main Gtk struct */ public GUnixMountMonitor* getUnixMountMonitorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixMountMonitor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gUnixMountMonitor; } protected override void setStruct(GObject* obj) { gUnixMountMonitor = cast(GUnixMountMonitor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixMountMonitor* gUnixMountMonitor, bool ownedRef = false) { this.gUnixMountMonitor = gUnixMountMonitor; super(cast(GObject*)gUnixMountMonitor, ownedRef); } /** */ public static GType getType() { return g_unix_mount_monitor_get_type(); } /** * Deprecated alias for g_unix_mount_monitor_get(). * * This function was never a true constructor, which is why it was * renamed. * * Deprecated: Use g_unix_mount_monitor_get() instead. * * Returns: a #GUnixMountMonitor. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_unix_mount_monitor_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GUnixMountMonitor*) p, true); } /** * Gets the #GUnixMountMonitor for the current thread-default main * context. * * The mount monitor can be used to monitor for changes to the list of * mounted filesystems as well as the list of mount points (ie: fstab * entries). * * You must only call g_object_unref() on the return value from under * the same main context as you called this function. * * Returns: the #GUnixMountMonitor. * * Since: 2.44 */ public static UnixMountMonitor get() { auto p = g_unix_mount_monitor_get(); if(p is null) { return null; } return ObjectG.getDObject!(UnixMountMonitor)(cast(GUnixMountMonitor*) p, true); } /** * This function does nothing. * * Before 2.44, this was a partially-effective way of controlling the * rate at which events would be reported under some uncommon * circumstances. Since @mount_monitor is a singleton, it also meant * that calling this function would have side effects for other users of * the monitor. * * Deprecated: This function does nothing. Don't call it. * * Params: * limitMsec = a integer with the limit in milliseconds to * poll for changes. * * Since: 2.18 */ public void setRateLimit(int limitMsec) { g_unix_mount_monitor_set_rate_limit(gUnixMountMonitor, limitMsec); } protected class OnMountpointsChangedDelegateWrapper { void delegate(UnixMountMonitor) dlg; gulong handlerId; this(void delegate(UnixMountMonitor) dlg) { this.dlg = dlg; onMountpointsChangedListeners ~= this; } void remove(OnMountpointsChangedDelegateWrapper source) { foreach(index, wrapper; onMountpointsChangedListeners) { if (wrapper.handlerId == source.handlerId) { onMountpointsChangedListeners[index] = null; onMountpointsChangedListeners = std.algorithm.remove(onMountpointsChangedListeners, index); break; } } } } OnMountpointsChangedDelegateWrapper[] onMountpointsChangedListeners; /** * Emitted when the unix mount points have changed. */ gulong addOnMountpointsChanged(void delegate(UnixMountMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMountpointsChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "mountpoints-changed", cast(GCallback)&callBackMountpointsChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackMountpointsChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMountpointsChanged(GUnixMountMonitor* unixmountmonitorStruct, OnMountpointsChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackMountpointsChangedDestroy(OnMountpointsChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMountsChangedDelegateWrapper { void delegate(UnixMountMonitor) dlg; gulong handlerId; this(void delegate(UnixMountMonitor) dlg) { this.dlg = dlg; onMountsChangedListeners ~= this; } void remove(OnMountsChangedDelegateWrapper source) { foreach(index, wrapper; onMountsChangedListeners) { if (wrapper.handlerId == source.handlerId) { onMountsChangedListeners[index] = null; onMountsChangedListeners = std.algorithm.remove(onMountsChangedListeners, index); break; } } } } OnMountsChangedDelegateWrapper[] onMountsChangedListeners; /** * Emitted when the unix mounts have changed. */ gulong addOnMountsChanged(void delegate(UnixMountMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMountsChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "mounts-changed", cast(GCallback)&callBackMountsChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackMountsChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMountsChanged(GUnixMountMonitor* unixmountmonitorStruct, OnMountsChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackMountsChangedDestroy(OnMountsChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/UnixMountPoint.d000066400000000000000000000131501324604450400211530ustar00rootroot00000000000000/* * 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 gio.UnixMountPoint; private import gio.IconIF; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; private import gtkd.Loader; /** * Defines a Unix mount point (e.g. /dev). * This corresponds roughly to a fstab entry. */ public class UnixMountPoint { /** the main Gtk struct */ protected GUnixMountPoint* gUnixMountPoint; protected bool ownedRef; /** Get the main Gtk struct */ public GUnixMountPoint* getUnixMountPointStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixMountPoint; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gUnixMountPoint; } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixMountPoint* gUnixMountPoint, bool ownedRef = false) { this.gUnixMountPoint = gUnixMountPoint; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GIO) && ownedRef ) g_unix_mount_point_free(gUnixMountPoint); } /** */ public static GType getType() { return g_unix_mount_point_get_type(); } /** * Compares two unix mount points. * * Params: * mount2 = a #GUnixMount. * * Returns: 1, 0 or -1 if @mount1 is greater than, equal to, * or less than @mount2, respectively. */ public int compare(UnixMountPoint mount2) { return g_unix_mount_point_compare(gUnixMountPoint, (mount2 is null) ? null : mount2.getUnixMountPointStruct()); } /** * Makes a copy of @mount_point. * * Returns: a new #GUnixMountPoint * * Since: 2.54 */ public UnixMountPoint copy() { auto p = g_unix_mount_point_copy(gUnixMountPoint); if(p is null) { return null; } return ObjectG.getDObject!(UnixMountPoint)(cast(GUnixMountPoint*) p, true); } /** * Frees a unix mount point. */ public void free() { g_unix_mount_point_free(gUnixMountPoint); ownedRef = false; } /** * Gets the device path for a unix mount point. * * Returns: a string containing the device path. */ public string getDevicePath() { return Str.toString(g_unix_mount_point_get_device_path(gUnixMountPoint)); } /** * Gets the file system type for the mount point. * * Returns: a string containing the file system type. */ public string getFsType() { return Str.toString(g_unix_mount_point_get_fs_type(gUnixMountPoint)); } /** * Gets the mount path for a unix mount point. * * Returns: a string containing the mount path. */ public string getMountPath() { return Str.toString(g_unix_mount_point_get_mount_path(gUnixMountPoint)); } /** * Gets the options for the mount point. * * Returns: a string containing the options. * * Since: 2.32 */ public string getOptions() { return Str.toString(g_unix_mount_point_get_options(gUnixMountPoint)); } /** * Guesses whether a Unix mount point can be ejected. * * Returns: %TRUE if @mount_point is deemed to be ejectable. */ public bool guessCanEject() { return g_unix_mount_point_guess_can_eject(gUnixMountPoint) != 0; } /** * Guesses the icon of a Unix mount point. * * Returns: a #GIcon */ public IconIF guessIcon() { auto p = g_unix_mount_point_guess_icon(gUnixMountPoint); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Guesses the name of a Unix mount point. * The result is a translated string. * * Returns: A newly allocated string that must * be freed with g_free() */ public string guessName() { auto retStr = g_unix_mount_point_guess_name(gUnixMountPoint); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Guesses the symbolic icon of a Unix mount point. * * Returns: a #GIcon * * Since: 2.34 */ public IconIF guessSymbolicIcon() { auto p = g_unix_mount_point_guess_symbolic_icon(gUnixMountPoint); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Checks if a unix mount point is a loopback device. * * Returns: %TRUE if the mount point is a loopback. %FALSE otherwise. */ public bool isLoopback() { return g_unix_mount_point_is_loopback(gUnixMountPoint) != 0; } /** * Checks if a unix mount point is read only. * * Returns: %TRUE if a mount point is read only. */ public bool isReadonly() { return g_unix_mount_point_is_readonly(gUnixMountPoint) != 0; } /** * Checks if a unix mount point is mountable by the user. * * Returns: %TRUE if the mount point is user mountable. */ public bool isUserMountable() { return g_unix_mount_point_is_user_mountable(gUnixMountPoint) != 0; } } GtkD-3.7.5/generated/gtkd/gio/UnixOutputStream.d000066400000000000000000000105761324604450400215240ustar00rootroot00000000000000/* * 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 gio.UnixOutputStream; private import gio.FileDescriptorBasedIF; private import gio.FileDescriptorBasedT; private import gio.OutputStream; private import gio.PollableOutputStreamIF; private import gio.PollableOutputStreamT; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * #GUnixOutputStream implements #GOutputStream for writing to a UNIX * file descriptor, including asynchronous operations. (If the file * descriptor refers to a socket or pipe, this will use poll() to do * asynchronous I/O. If it refers to a regular file, it will fall back * to doing asynchronous I/O in another thread.) * * Note that `` belongs to the UNIX-specific GIO * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file * when using it. */ public class UnixOutputStream : OutputStream, FileDescriptorBasedIF, PollableOutputStreamIF { /** the main Gtk struct */ protected GUnixOutputStream* gUnixOutputStream; /** Get the main Gtk struct */ public GUnixOutputStream* getUnixOutputStreamStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixOutputStream; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gUnixOutputStream; } protected override void setStruct(GObject* obj) { gUnixOutputStream = cast(GUnixOutputStream*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixOutputStream* gUnixOutputStream, bool ownedRef = false) { this.gUnixOutputStream = gUnixOutputStream; super(cast(GOutputStream*)gUnixOutputStream, ownedRef); } // add the FileDescriptorBased capabilities mixin FileDescriptorBasedT!(GUnixOutputStream); // add the PollableOutputStream capabilities mixin PollableOutputStreamT!(GUnixOutputStream); /** */ public static GType getType() { return g_unix_output_stream_get_type(); } /** * Creates a new #GUnixOutputStream for the given @fd. * * If @close_fd, is %TRUE, the file descriptor will be closed when * the output stream is destroyed. * * Params: * fd = a UNIX file descriptor * closeFd = %TRUE to close the file descriptor when done * * Returns: a new #GOutputStream * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int fd, bool closeFd) { auto p = g_unix_output_stream_new(fd, closeFd); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GUnixOutputStream*) p, true); } /** * Returns whether the file descriptor of @stream will be * closed when the stream is closed. * * Returns: %TRUE if the file descriptor is closed when done * * Since: 2.20 */ public bool getCloseFd() { return g_unix_output_stream_get_close_fd(gUnixOutputStream) != 0; } /** * Return the UNIX file descriptor that the stream writes to. * * Returns: The file descriptor of @stream * * Since: 2.20 */ public int getFd() { return g_unix_output_stream_get_fd(gUnixOutputStream); } /** * Sets whether the file descriptor of @stream shall be closed * when the stream is closed. * * Params: * closeFd = %TRUE to close the file descriptor when done * * Since: 2.20 */ public void setCloseFd(bool closeFd) { g_unix_output_stream_set_close_fd(gUnixOutputStream, closeFd); } } GtkD-3.7.5/generated/gtkd/gio/UnixSocketAddress.d000066400000000000000000000157401324604450400216040ustar00rootroot00000000000000/* * 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 gio.UnixSocketAddress; private import gio.SocketAddress; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Support for UNIX-domain (also known as local) sockets. * * UNIX domain sockets are generally visible in the filesystem. * However, some systems support abstract socket names which are not * visible in the filesystem and not affected by the filesystem * permissions, visibility, etc. Currently this is only supported * under Linux. If you attempt to use abstract sockets on other * systems, function calls may return %G_IO_ERROR_NOT_SUPPORTED * errors. You can use g_unix_socket_address_abstract_names_supported() * to see if abstract names are supported. * * Note that `` belongs to the UNIX-specific GIO * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config file * when using it. */ public class UnixSocketAddress : SocketAddress { /** the main Gtk struct */ protected GUnixSocketAddress* gUnixSocketAddress; /** Get the main Gtk struct */ public GUnixSocketAddress* getUnixSocketAddressStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gUnixSocketAddress; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gUnixSocketAddress; } protected override void setStruct(GObject* obj) { gUnixSocketAddress = cast(GUnixSocketAddress*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GUnixSocketAddress* gUnixSocketAddress, bool ownedRef = false) { this.gUnixSocketAddress = gUnixSocketAddress; super(cast(GSocketAddress*)gUnixSocketAddress, ownedRef); } /** */ public static GType getType() { return g_unix_socket_address_get_type(); } /** * Creates a new #GUnixSocketAddress for @path. * * To create abstract socket addresses, on systems that support that, * use g_unix_socket_address_new_abstract(). * * Params: * path = the socket path * * Returns: a new #GUnixSocketAddress * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string path) { auto p = g_unix_socket_address_new(Str.toStringz(path)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GUnixSocketAddress*) p, true); } /** * Creates a new #GUnixSocketAddress of type @type with name @path. * * If @type is %G_UNIX_SOCKET_ADDRESS_PATH, this is equivalent to * calling g_unix_socket_address_new(). * * If @type is %G_UNIX_SOCKET_ADDRESS_ANONYMOUS, @path and @path_len will be * ignored. * * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT, then @path_len * bytes of @path will be copied to the socket's path, and only those * bytes will be considered part of the name. (If @path_len is -1, * then @path is assumed to be NUL-terminated.) For example, if @path * was "test", then calling g_socket_address_get_native_size() on the * returned socket would return 7 (2 bytes of overhead, 1 byte for the * abstract-socket indicator byte, and 4 bytes for the name "test"). * * If @path_type is %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED, then * @path_len bytes of @path will be copied to the socket's path, the * rest of the path will be padded with 0 bytes, and the entire * zero-padded buffer will be considered the name. (As above, if * @path_len is -1, then @path is assumed to be NUL-terminated.) In * this case, g_socket_address_get_native_size() will always return * the full size of a `struct sockaddr_un`, although * g_unix_socket_address_get_path_len() will still return just the * length of @path. * * %G_UNIX_SOCKET_ADDRESS_ABSTRACT is preferred over * %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED for new programs. Of course, * when connecting to a server created by another process, you must * use the appropriate type corresponding to how that process created * its listening socket. * * Params: * path = the name * type = a #GUnixSocketAddressType * * Returns: a new #GUnixSocketAddress * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string path, GUnixSocketAddressType type) { auto p = g_unix_socket_address_new_with_type(Str.toStringz(path), cast(int)path.length, type); if(p is null) { throw new ConstructionException("null returned by new_with_type"); } this(cast(GUnixSocketAddress*) p, true); } /** * Checks if abstract UNIX domain socket names are supported. * * Returns: %TRUE if supported, %FALSE otherwise * * Since: 2.22 */ public static bool abstractNamesSupported() { return g_unix_socket_address_abstract_names_supported() != 0; } /** * Gets @address's type. * * Returns: a #GUnixSocketAddressType * * Since: 2.26 */ public GUnixSocketAddressType getAddressType() { return g_unix_socket_address_get_address_type(gUnixSocketAddress); } /** * Tests if @address is abstract. * * Deprecated: Use g_unix_socket_address_get_address_type() * * Returns: %TRUE if the address is abstract, %FALSE otherwise * * Since: 2.22 */ public bool getIsAbstract() { return g_unix_socket_address_get_is_abstract(gUnixSocketAddress) != 0; } /** * Gets @address's path, or for abstract sockets the "name". * * Guaranteed to be zero-terminated, but an abstract socket * may contain embedded zeros, and thus you should use * g_unix_socket_address_get_path_len() to get the true length * of this string. * * Returns: the path for @address * * Since: 2.22 */ public string getPath() { return Str.toString(g_unix_socket_address_get_path(gUnixSocketAddress)); } /** * Gets the length of @address's path. * * For details, see g_unix_socket_address_get_path(). * * Returns: the length of the path * * Since: 2.22 */ public size_t getPathLen() { return g_unix_socket_address_get_path_len(gUnixSocketAddress); } } GtkD-3.7.5/generated/gtkd/gio/Vfs.d000066400000000000000000000162541324604450400167410ustar00rootroot00000000000000/* * 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 gio.Vfs; private import gio.FileIF; private import gio.c.functions; public import gio.c.types; private import glib.Str; private import gobject.ObjectG; public import gtkc.giotypes; /** * Entry point for using GIO functionality. */ public class Vfs : ObjectG { /** the main Gtk struct */ protected GVfs* gVfs; /** Get the main Gtk struct */ public GVfs* getVfsStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gVfs; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gVfs; } protected override void setStruct(GObject* obj) { gVfs = cast(GVfs*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GVfs* gVfs, bool ownedRef = false) { this.gVfs = gVfs; super(cast(GObject*)gVfs, ownedRef); } /** */ public static GType getType() { return g_vfs_get_type(); } /** * Gets the default #GVfs for the system. * * Returns: a #GVfs. */ public static Vfs getDefault() { auto p = g_vfs_get_default(); if(p is null) { return null; } return ObjectG.getDObject!(Vfs)(cast(GVfs*) p); } /** * Gets the local #GVfs for the system. * * Returns: a #GVfs. */ public static Vfs getLocal() { auto p = g_vfs_get_local(); if(p is null) { return null; } return ObjectG.getDObject!(Vfs)(cast(GVfs*) p); } /** * Gets a #GFile for @path. * * Params: * path = a string containing a VFS path. * * Returns: a #GFile. * Free the returned object with g_object_unref(). */ public FileIF getFileForPath(string path) { auto p = g_vfs_get_file_for_path(gVfs, Str.toStringz(path)); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets a #GFile for @uri. * * This operation never fails, but the returned object * might not support any I/O operation if the URI * is malformed or if the URI scheme is not supported. * * Params: * uri = a string containing a URI * * Returns: a #GFile. * Free the returned object with g_object_unref(). */ public FileIF getFileForUri(string uri) { auto p = g_vfs_get_file_for_uri(gVfs, Str.toStringz(uri)); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets a list of URI schemes supported by @vfs. * * Returns: a %NULL-terminated array of strings. * The returned array belongs to GIO and must * not be freed or modified. */ public string[] getSupportedUriSchemes() { return Str.toStringArray(g_vfs_get_supported_uri_schemes(gVfs)); } /** * Checks if the VFS is active. * * Returns: %TRUE if construction of the @vfs was successful * and it is now active. */ public bool isActive() { return g_vfs_is_active(gVfs) != 0; } /** * This operation never fails, but the returned object might * not support any I/O operations if the @parse_name cannot * be parsed by the #GVfs module. * * Params: * parseName = a string to be parsed by the VFS module. * * Returns: a #GFile for the given @parse_name. * Free the returned object with g_object_unref(). */ public FileIF parseName(string parseName) { auto p = g_vfs_parse_name(gVfs, Str.toStringz(parseName)); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Registers @uri_func and @parse_name_func as the #GFile URI and parse name * lookup functions for URIs with a scheme matching @scheme. * Note that @scheme is registered only within the running application, as * opposed to desktop-wide as it happens with GVfs backends. * * When a #GFile is requested with an URI containing @scheme (e.g. through * g_file_new_for_uri()), @uri_func will be called to allow a custom * constructor. The implementation of @uri_func should not be blocking, and * must not call g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme(). * * When g_file_parse_name() is called with a parse name obtained from such file, * @parse_name_func will be called to allow the #GFile to be created again. In * that case, it's responsibility of @parse_name_func to make sure the parse * name matches what the custom #GFile implementation returned when * g_file_get_parse_name() was previously called. The implementation of * @parse_name_func should not be blocking, and must not call * g_vfs_register_uri_scheme() or g_vfs_unregister_uri_scheme(). * * It's an error to call this function twice with the same scheme. To unregister * a custom URI scheme, use g_vfs_unregister_uri_scheme(). * * Params: * scheme = an URI scheme, e.g. "http" * uriFunc = a #GVfsFileLookupFunc * uriData = custom data passed to be passed to @uri_func, or %NULL * uriDestroy = function to be called when unregistering the * URI scheme, or when @vfs is disposed, to free the resources used * by the URI lookup function * parseNameFunc = a #GVfsFileLookupFunc * parseNameData = custom data passed to be passed to * @parse_name_func, or %NULL * parseNameDestroy = function to be called when unregistering the * URI scheme, or when @vfs is disposed, to free the resources used * by the parse name lookup function * * Returns: %TRUE if @scheme was successfully registered, or %FALSE if a handler * for @scheme already exists. * * Since: 2.50 */ public bool registerUriScheme(string scheme, GVfsFileLookupFunc uriFunc, void* uriData, GDestroyNotify uriDestroy, GVfsFileLookupFunc parseNameFunc, void* parseNameData, GDestroyNotify parseNameDestroy) { return g_vfs_register_uri_scheme(gVfs, Str.toStringz(scheme), uriFunc, uriData, uriDestroy, parseNameFunc, parseNameData, parseNameDestroy) != 0; } /** * Unregisters the URI handler for @scheme previously registered with * g_vfs_register_uri_scheme(). * * Params: * scheme = an URI scheme, e.g. "http" * * Returns: %TRUE if @scheme was successfully unregistered, or %FALSE if a * handler for @scheme does not exist. * * Since: 2.50 */ public bool unregisterUriScheme(string scheme) { return g_vfs_unregister_uri_scheme(gVfs, Str.toStringz(scheme)) != 0; } } GtkD-3.7.5/generated/gtkd/gio/VolumeIF.d000066400000000000000000000272331324604450400176700ustar00rootroot00000000000000/* * 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 gio.VolumeIF; private import gio.AsyncResultIF; private import gio.Cancellable; private import gio.DriveIF; private import gio.FileIF; private import gio.IconIF; private import gio.MountIF; private import gio.MountOperation; private import gio.c.functions; public import gio.c.types; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * The #GVolume interface represents user-visible objects that can be * mounted. Note, when porting from GnomeVFS, #GVolume is the moral * equivalent of #GnomeVFSDrive. * * Mounting a #GVolume instance is an asynchronous operation. For more * information about asynchronous operations, see #GAsyncResult and * #GTask. To mount a #GVolume, first call g_volume_mount() with (at * least) the #GVolume instance, optionally a #GMountOperation object * and a #GAsyncReadyCallback. * * Typically, one will only want to pass %NULL for the * #GMountOperation if automounting all volumes when a desktop session * starts since it's not desirable to put up a lot of dialogs asking * for credentials. * * The callback will be fired when the operation has resolved (either * with success or failure), and a #GAsyncReady structure will be * passed to the callback. That callback should then call * g_volume_mount_finish() with the #GVolume instance and the * #GAsyncReady data to see if the operation was completed * successfully. If an @error is present when g_volume_mount_finish() * is called, then it will be filled with any error information. * * ## Volume Identifiers # {#volume-identifier} * * It is sometimes necessary to directly access the underlying * operating system object behind a volume (e.g. for passing a volume * to an application via the commandline). For this purpose, GIO * allows to obtain an 'identifier' for the volume. There can be * different kinds of identifiers, such as Hal UDIs, filesystem labels, * traditional Unix devices (e.g. `/dev/sda2`), UUIDs. GIO uses predefined * strings as names for the different kinds of identifiers: * #G_VOLUME_IDENTIFIER_KIND_HAL_UDI, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. * Use g_volume_get_identifier() to obtain an identifier for a volume. * * * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available * when the gvfs hal volume monitor is in use. Other volume monitors * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE * identifier, which can be used to obtain a hal device by means of * libhal_manager_find_device_string_match(). */ public interface VolumeIF{ /** Get the main Gtk struct */ public GVolume* getVolumeStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_volume_get_type(); } /** * Checks if a volume can be ejected. * * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise */ public bool canEject(); /** * Checks if a volume can be mounted. * * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise */ public bool canMount(); /** * Ejects a volume. This is an asynchronous operation, and is * finished by calling g_volume_eject_finish() with the @volume * and #GAsyncResult returned in the @callback. * * Deprecated: Use g_volume_eject_with_operation() instead. * * Params: * flags = flags affecting the unmount if required for eject * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback, or %NULL * userData = user data that gets passed to @callback */ public void eject(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes ejecting a volume. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Deprecated: Use g_volume_eject_with_operation_finish() instead. * * Params: * result = a #GAsyncResult * * Returns: %TRUE, %FALSE if operation failed * * Throws: GException on failure. */ public bool ejectFinish(AsyncResultIF result); /** * Ejects a volume. This is an asynchronous operation, and is * finished by calling g_volume_eject_with_operation_finish() with the @volume * and #GAsyncResult data returned in the @callback. * * Params: * flags = flags affecting the unmount if required for eject * mountOperation = a #GMountOperation or %NULL to * avoid user interaction * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback, or %NULL * userData = user data passed to @callback * * Since: 2.22 */ public void ejectWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes ejecting a volume. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise * * Since: 2.22 * * Throws: GException on failure. */ public bool ejectWithOperationFinish(AsyncResultIF result); /** * Gets the kinds of [identifiers][volume-identifier] that @volume has. * Use g_volume_get_identifier() to obtain the identifiers themselves. * * Returns: a %NULL-terminated array * of strings containing kinds of identifiers. Use g_strfreev() to free. */ public string[] enumerateIdentifiers(); /** * Gets the activation root for a #GVolume if it is known ahead of * mount time. Returns %NULL otherwise. If not %NULL and if @volume * is mounted, then the result of g_mount_get_root() on the * #GMount object obtained from g_volume_get_mount() will always * either be equal or a prefix of what this function returns. In * other words, in code * * |[ * GMount *mount; * GFile *mount_root * GFile *volume_activation_root; * * mount = g_volume_get_mount (volume); // mounted, so never NULL * mount_root = g_mount_get_root (mount); * volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL * ]| * then the expression * |[ * (g_file_has_prefix (volume_activation_root, mount_root) || * g_file_equal (volume_activation_root, mount_root)) * ]| * will always be %TRUE. * * Activation roots are typically used in #GVolumeMonitor * implementations to find the underlying mount to shadow, see * g_mount_is_shadowed() for more details. * * Returns: the activation root of @volume * or %NULL. Use g_object_unref() to free. * * Since: 2.18 */ public FileIF getActivationRoot(); /** * Gets the drive for the @volume. * * Returns: a #GDrive or %NULL if @volume is not * associated with a drive. The returned object should be unreffed * with g_object_unref() when no longer needed. */ public DriveIF getDrive(); /** * Gets the icon for @volume. * * Returns: a #GIcon. * The returned object should be unreffed with g_object_unref() * when no longer needed. */ public IconIF getIcon(); /** * Gets the identifier of the given kind for @volume. * See the [introduction][volume-identifier] for more * information about volume identifiers. * * Params: * kind = the kind of identifier to return * * Returns: a newly allocated string containing the * requested identfier, or %NULL if the #GVolume * doesn't have this kind of identifier */ public string getIdentifier(string kind); /** * Gets the mount for the @volume. * * Returns: a #GMount or %NULL if @volume isn't mounted. * The returned object should be unreffed with g_object_unref() * when no longer needed. */ public MountIF getMount(); /** * Gets the name of @volume. * * Returns: the name for the given @volume. The returned string should * be freed with g_free() when no longer needed. */ public string getName(); /** * Gets the sort key for @volume, if any. * * Returns: Sorting key for @volume or %NULL if no such key is available * * Since: 2.32 */ public string getSortKey(); /** * Gets the symbolic icon for @volume. * * Returns: a #GIcon. * The returned object should be unreffed with g_object_unref() * when no longer needed. * * Since: 2.34 */ public IconIF getSymbolicIcon(); /** * Gets the UUID for the @volume. The reference is typically based on * the file system UUID for the volume in question and should be * considered an opaque string. Returns %NULL if there is no UUID * available. * * Returns: the UUID for @volume or %NULL if no UUID can be computed. * The returned string should be freed with g_free() * when no longer needed. */ public string getUuid(); /** * Mounts a volume. This is an asynchronous operation, and is * finished by calling g_volume_mount_finish() with the @volume * and #GAsyncResult returned in the @callback. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation or %NULL to avoid user interaction * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback, or %NULL * userData = user data that gets passed to @callback */ public void mount(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData); /** * Finishes mounting a volume. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * If the mount operation succeeded, g_volume_get_mount() on @volume * is guaranteed to return the mount right after calling this * function; there's no need to listen for the 'mount-added' signal on * #GVolumeMonitor. * * Params: * result = a #GAsyncResult * * Returns: %TRUE, %FALSE if operation failed * * Throws: GException on failure. */ public bool mountFinish(AsyncResultIF result); /** * Returns whether the volume should be automatically mounted. * * Returns: %TRUE if the volume should be automatically mounted */ public bool shouldAutomount(); /** * Emitted when the volume has been changed. */ gulong addOnChanged(void delegate(VolumeIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); /** * This signal is emitted when the #GVolume have been removed. If * the recipient is holding references to the object they should * release them so the object can be finalized. */ gulong addOnRemoved(void delegate(VolumeIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); } GtkD-3.7.5/generated/gtkd/gio/VolumeMonitor.d000066400000000000000000000623611324604450400210220ustar00rootroot00000000000000/* * 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 gio.VolumeMonitor; private import gio.DriveIF; private import gio.MountIF; private import gio.VolumeIF; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; public import gtkc.giotypes; private import std.algorithm; /** * #GVolumeMonitor is for listing the user interesting devices and volumes * on the computer. In other words, what a file selector or file manager * would show in a sidebar. * * #GVolumeMonitor is not * [thread-default-context aware][g-main-context-push-thread-default], * and so should not be used other than from the main thread, with no * thread-default-context active. */ public class VolumeMonitor : ObjectG { /** the main Gtk struct */ protected GVolumeMonitor* gVolumeMonitor; /** Get the main Gtk struct */ public GVolumeMonitor* getVolumeMonitorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gVolumeMonitor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gVolumeMonitor; } protected override void setStruct(GObject* obj) { gVolumeMonitor = cast(GVolumeMonitor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GVolumeMonitor* gVolumeMonitor, bool ownedRef = false) { this.gVolumeMonitor = gVolumeMonitor; super(cast(GObject*)gVolumeMonitor, ownedRef); } /** * Gets the volume monitor used by gio. * * Return: a reference to the #GVolumeMonitor used by gio. Call * g_object_unref() when done with it. */ public this() { auto p = g_volume_monitor_get(); if(p is null) { throw new ConstructionException("g_volume_monitor_get()"); } this(cast(GVolumeMonitor*) p, true); } /** */ /** */ public static GType getType() { return g_volume_monitor_get_type(); } /** * This function should be called by any #GVolumeMonitor * implementation when a new #GMount object is created that is not * associated with a #GVolume object. It must be called just before * emitting the @mount_added signal. * * If the return value is not %NULL, the caller must associate the * returned #GVolume object with the #GMount. This involves returning * it in its g_mount_get_volume() implementation. The caller must * also listen for the "removed" signal on the returned object * and give up its reference when handling that signal * * Similary, if implementing g_volume_monitor_adopt_orphan_mount(), * the implementor must take a reference to @mount and return it in * its g_volume_get_mount() implemented. Also, the implementor must * listen for the "unmounted" signal on @mount and give up its * reference upon handling that signal. * * There are two main use cases for this function. * * One is when implementing a user space file system driver that reads * blocks of a block device that is already represented by the native * volume monitor (for example a CD Audio file system driver). Such * a driver will generate its own #GMount object that needs to be * associated with the #GVolume object that represents the volume. * * The other is for implementing a #GVolumeMonitor whose sole purpose * is to return #GVolume objects representing entries in the users * "favorite servers" list or similar. * * Deprecated: Instead of using this function, #GVolumeMonitor * implementations should instead create shadow mounts with the URI of * the mount they intend to adopt. See the proxy volume monitor in * gvfs for an example of this. Also see g_mount_is_shadowed(), * g_mount_shadow() and g_mount_unshadow() functions. * * Params: * mount = a #GMount object to find a parent for * * Returns: the #GVolume object that is the parent for @mount or %NULL * if no wants to adopt the #GMount. */ public static VolumeIF adoptOrphanMount(MountIF mount) { auto p = g_volume_monitor_adopt_orphan_mount((mount is null) ? null : mount.getMountStruct()); if(p is null) { return null; } return ObjectG.getDObject!(VolumeIF)(cast(GVolume*) p, true); } /** * Gets a list of drives connected to the system. * * The returned list should be freed with g_list_free(), after * its elements have been unreffed with g_object_unref(). * * Returns: a #GList of connected #GDrive objects. */ public ListG getConnectedDrives() { auto p = g_volume_monitor_get_connected_drives(gVolumeMonitor); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Finds a #GMount object by its UUID (see g_mount_get_uuid()) * * Params: * uuid = the UUID to look for * * Returns: a #GMount or %NULL if no such mount is available. * Free the returned object with g_object_unref(). */ public MountIF getMountForUuid(string uuid) { auto p = g_volume_monitor_get_mount_for_uuid(gVolumeMonitor, Str.toStringz(uuid)); if(p is null) { return null; } return ObjectG.getDObject!(MountIF)(cast(GMount*) p, true); } /** * Gets a list of the mounts on the system. * * The returned list should be freed with g_list_free(), after * its elements have been unreffed with g_object_unref(). * * Returns: a #GList of #GMount objects. */ public ListG getMounts() { auto p = g_volume_monitor_get_mounts(gVolumeMonitor); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } /** * Finds a #GVolume object by its UUID (see g_volume_get_uuid()) * * Params: * uuid = the UUID to look for * * Returns: a #GVolume or %NULL if no such volume is available. * Free the returned object with g_object_unref(). */ public VolumeIF getVolumeForUuid(string uuid) { auto p = g_volume_monitor_get_volume_for_uuid(gVolumeMonitor, Str.toStringz(uuid)); if(p is null) { return null; } return ObjectG.getDObject!(VolumeIF)(cast(GVolume*) p, true); } /** * Gets a list of the volumes on the system. * * The returned list should be freed with g_list_free(), after * its elements have been unreffed with g_object_unref(). * * Returns: a #GList of #GVolume objects. */ public ListG getVolumes() { auto p = g_volume_monitor_get_volumes(gVolumeMonitor); if(p is null) { return null; } return new ListG(cast(GList*) p, true); } protected class OnDriveChangedDelegateWrapper { void delegate(DriveIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(DriveIF, VolumeMonitor) dlg) { this.dlg = dlg; onDriveChangedListeners ~= this; } void remove(OnDriveChangedDelegateWrapper source) { foreach(index, wrapper; onDriveChangedListeners) { if (wrapper.handlerId == source.handlerId) { onDriveChangedListeners[index] = null; onDriveChangedListeners = std.algorithm.remove(onDriveChangedListeners, index); break; } } } } OnDriveChangedDelegateWrapper[] onDriveChangedListeners; /** * Emitted when a drive changes. * * Params: * drive = the drive that changed */ gulong addOnDriveChanged(void delegate(DriveIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDriveChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "drive-changed", cast(GCallback)&callBackDriveChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackDriveChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDriveChanged(GVolumeMonitor* volumemonitorStruct, GDrive* drive, OnDriveChangedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DriveIF)(drive), wrapper.outer); } extern(C) static void callBackDriveChangedDestroy(OnDriveChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDriveConnectedDelegateWrapper { void delegate(DriveIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(DriveIF, VolumeMonitor) dlg) { this.dlg = dlg; onDriveConnectedListeners ~= this; } void remove(OnDriveConnectedDelegateWrapper source) { foreach(index, wrapper; onDriveConnectedListeners) { if (wrapper.handlerId == source.handlerId) { onDriveConnectedListeners[index] = null; onDriveConnectedListeners = std.algorithm.remove(onDriveConnectedListeners, index); break; } } } } OnDriveConnectedDelegateWrapper[] onDriveConnectedListeners; /** * Emitted when a drive is connected to the system. * * Params: * drive = a #GDrive that was connected. */ gulong addOnDriveConnected(void delegate(DriveIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDriveConnectedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "drive-connected", cast(GCallback)&callBackDriveConnected, cast(void*)wrapper, cast(GClosureNotify)&callBackDriveConnectedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDriveConnected(GVolumeMonitor* volumemonitorStruct, GDrive* drive, OnDriveConnectedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DriveIF)(drive), wrapper.outer); } extern(C) static void callBackDriveConnectedDestroy(OnDriveConnectedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDriveDisconnectedDelegateWrapper { void delegate(DriveIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(DriveIF, VolumeMonitor) dlg) { this.dlg = dlg; onDriveDisconnectedListeners ~= this; } void remove(OnDriveDisconnectedDelegateWrapper source) { foreach(index, wrapper; onDriveDisconnectedListeners) { if (wrapper.handlerId == source.handlerId) { onDriveDisconnectedListeners[index] = null; onDriveDisconnectedListeners = std.algorithm.remove(onDriveDisconnectedListeners, index); break; } } } } OnDriveDisconnectedDelegateWrapper[] onDriveDisconnectedListeners; /** * Emitted when a drive is disconnected from the system. * * Params: * drive = a #GDrive that was disconnected. */ gulong addOnDriveDisconnected(void delegate(DriveIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDriveDisconnectedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "drive-disconnected", cast(GCallback)&callBackDriveDisconnected, cast(void*)wrapper, cast(GClosureNotify)&callBackDriveDisconnectedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDriveDisconnected(GVolumeMonitor* volumemonitorStruct, GDrive* drive, OnDriveDisconnectedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DriveIF)(drive), wrapper.outer); } extern(C) static void callBackDriveDisconnectedDestroy(OnDriveDisconnectedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDriveEjectButtonDelegateWrapper { void delegate(DriveIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(DriveIF, VolumeMonitor) dlg) { this.dlg = dlg; onDriveEjectButtonListeners ~= this; } void remove(OnDriveEjectButtonDelegateWrapper source) { foreach(index, wrapper; onDriveEjectButtonListeners) { if (wrapper.handlerId == source.handlerId) { onDriveEjectButtonListeners[index] = null; onDriveEjectButtonListeners = std.algorithm.remove(onDriveEjectButtonListeners, index); break; } } } } OnDriveEjectButtonDelegateWrapper[] onDriveEjectButtonListeners; /** * Emitted when the eject button is pressed on @drive. * * Params: * drive = the drive where the eject button was pressed * * Since: 2.18 */ gulong addOnDriveEjectButton(void delegate(DriveIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDriveEjectButtonDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "drive-eject-button", cast(GCallback)&callBackDriveEjectButton, cast(void*)wrapper, cast(GClosureNotify)&callBackDriveEjectButtonDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDriveEjectButton(GVolumeMonitor* volumemonitorStruct, GDrive* drive, OnDriveEjectButtonDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DriveIF)(drive), wrapper.outer); } extern(C) static void callBackDriveEjectButtonDestroy(OnDriveEjectButtonDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDriveStopButtonDelegateWrapper { void delegate(DriveIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(DriveIF, VolumeMonitor) dlg) { this.dlg = dlg; onDriveStopButtonListeners ~= this; } void remove(OnDriveStopButtonDelegateWrapper source) { foreach(index, wrapper; onDriveStopButtonListeners) { if (wrapper.handlerId == source.handlerId) { onDriveStopButtonListeners[index] = null; onDriveStopButtonListeners = std.algorithm.remove(onDriveStopButtonListeners, index); break; } } } } OnDriveStopButtonDelegateWrapper[] onDriveStopButtonListeners; /** * Emitted when the stop button is pressed on @drive. * * Params: * drive = the drive where the stop button was pressed * * Since: 2.22 */ gulong addOnDriveStopButton(void delegate(DriveIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDriveStopButtonDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "drive-stop-button", cast(GCallback)&callBackDriveStopButton, cast(void*)wrapper, cast(GClosureNotify)&callBackDriveStopButtonDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDriveStopButton(GVolumeMonitor* volumemonitorStruct, GDrive* drive, OnDriveStopButtonDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(DriveIF)(drive), wrapper.outer); } extern(C) static void callBackDriveStopButtonDestroy(OnDriveStopButtonDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMountAddedDelegateWrapper { void delegate(MountIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(MountIF, VolumeMonitor) dlg) { this.dlg = dlg; onMountAddedListeners ~= this; } void remove(OnMountAddedDelegateWrapper source) { foreach(index, wrapper; onMountAddedListeners) { if (wrapper.handlerId == source.handlerId) { onMountAddedListeners[index] = null; onMountAddedListeners = std.algorithm.remove(onMountAddedListeners, index); break; } } } } OnMountAddedDelegateWrapper[] onMountAddedListeners; /** * Emitted when a mount is added. * * Params: * mount = a #GMount that was added. */ gulong addOnMountAdded(void delegate(MountIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMountAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "mount-added", cast(GCallback)&callBackMountAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackMountAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMountAdded(GVolumeMonitor* volumemonitorStruct, GMount* mount, OnMountAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(MountIF)(mount), wrapper.outer); } extern(C) static void callBackMountAddedDestroy(OnMountAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMountChangedDelegateWrapper { void delegate(MountIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(MountIF, VolumeMonitor) dlg) { this.dlg = dlg; onMountChangedListeners ~= this; } void remove(OnMountChangedDelegateWrapper source) { foreach(index, wrapper; onMountChangedListeners) { if (wrapper.handlerId == source.handlerId) { onMountChangedListeners[index] = null; onMountChangedListeners = std.algorithm.remove(onMountChangedListeners, index); break; } } } } OnMountChangedDelegateWrapper[] onMountChangedListeners; /** * Emitted when a mount changes. * * Params: * mount = a #GMount that changed. */ gulong addOnMountChanged(void delegate(MountIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMountChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "mount-changed", cast(GCallback)&callBackMountChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackMountChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMountChanged(GVolumeMonitor* volumemonitorStruct, GMount* mount, OnMountChangedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(MountIF)(mount), wrapper.outer); } extern(C) static void callBackMountChangedDestroy(OnMountChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMountPreUnmountDelegateWrapper { void delegate(MountIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(MountIF, VolumeMonitor) dlg) { this.dlg = dlg; onMountPreUnmountListeners ~= this; } void remove(OnMountPreUnmountDelegateWrapper source) { foreach(index, wrapper; onMountPreUnmountListeners) { if (wrapper.handlerId == source.handlerId) { onMountPreUnmountListeners[index] = null; onMountPreUnmountListeners = std.algorithm.remove(onMountPreUnmountListeners, index); break; } } } } OnMountPreUnmountDelegateWrapper[] onMountPreUnmountListeners; /** * Emitted when a mount is about to be removed. * * Params: * mount = a #GMount that is being unmounted. */ gulong addOnMountPreUnmount(void delegate(MountIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMountPreUnmountDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "mount-pre-unmount", cast(GCallback)&callBackMountPreUnmount, cast(void*)wrapper, cast(GClosureNotify)&callBackMountPreUnmountDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMountPreUnmount(GVolumeMonitor* volumemonitorStruct, GMount* mount, OnMountPreUnmountDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(MountIF)(mount), wrapper.outer); } extern(C) static void callBackMountPreUnmountDestroy(OnMountPreUnmountDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnMountRemovedDelegateWrapper { void delegate(MountIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(MountIF, VolumeMonitor) dlg) { this.dlg = dlg; onMountRemovedListeners ~= this; } void remove(OnMountRemovedDelegateWrapper source) { foreach(index, wrapper; onMountRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onMountRemovedListeners[index] = null; onMountRemovedListeners = std.algorithm.remove(onMountRemovedListeners, index); break; } } } } OnMountRemovedDelegateWrapper[] onMountRemovedListeners; /** * Emitted when a mount is removed. * * Params: * mount = a #GMount that was removed. */ gulong addOnMountRemoved(void delegate(MountIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnMountRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "mount-removed", cast(GCallback)&callBackMountRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackMountRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackMountRemoved(GVolumeMonitor* volumemonitorStruct, GMount* mount, OnMountRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(MountIF)(mount), wrapper.outer); } extern(C) static void callBackMountRemovedDestroy(OnMountRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnVolumeAddedDelegateWrapper { void delegate(VolumeIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(VolumeIF, VolumeMonitor) dlg) { this.dlg = dlg; onVolumeAddedListeners ~= this; } void remove(OnVolumeAddedDelegateWrapper source) { foreach(index, wrapper; onVolumeAddedListeners) { if (wrapper.handlerId == source.handlerId) { onVolumeAddedListeners[index] = null; onVolumeAddedListeners = std.algorithm.remove(onVolumeAddedListeners, index); break; } } } } OnVolumeAddedDelegateWrapper[] onVolumeAddedListeners; /** * Emitted when a mountable volume is added to the system. * * Params: * volume = a #GVolume that was added. */ gulong addOnVolumeAdded(void delegate(VolumeIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnVolumeAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "volume-added", cast(GCallback)&callBackVolumeAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackVolumeAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackVolumeAdded(GVolumeMonitor* volumemonitorStruct, GVolume* volume, OnVolumeAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(VolumeIF)(volume), wrapper.outer); } extern(C) static void callBackVolumeAddedDestroy(OnVolumeAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnVolumeChangedDelegateWrapper { void delegate(VolumeIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(VolumeIF, VolumeMonitor) dlg) { this.dlg = dlg; onVolumeChangedListeners ~= this; } void remove(OnVolumeChangedDelegateWrapper source) { foreach(index, wrapper; onVolumeChangedListeners) { if (wrapper.handlerId == source.handlerId) { onVolumeChangedListeners[index] = null; onVolumeChangedListeners = std.algorithm.remove(onVolumeChangedListeners, index); break; } } } } OnVolumeChangedDelegateWrapper[] onVolumeChangedListeners; /** * Emitted when mountable volume is changed. * * Params: * volume = a #GVolume that changed. */ gulong addOnVolumeChanged(void delegate(VolumeIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnVolumeChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "volume-changed", cast(GCallback)&callBackVolumeChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackVolumeChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackVolumeChanged(GVolumeMonitor* volumemonitorStruct, GVolume* volume, OnVolumeChangedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(VolumeIF)(volume), wrapper.outer); } extern(C) static void callBackVolumeChangedDestroy(OnVolumeChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnVolumeRemovedDelegateWrapper { void delegate(VolumeIF, VolumeMonitor) dlg; gulong handlerId; this(void delegate(VolumeIF, VolumeMonitor) dlg) { this.dlg = dlg; onVolumeRemovedListeners ~= this; } void remove(OnVolumeRemovedDelegateWrapper source) { foreach(index, wrapper; onVolumeRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onVolumeRemovedListeners[index] = null; onVolumeRemovedListeners = std.algorithm.remove(onVolumeRemovedListeners, index); break; } } } } OnVolumeRemovedDelegateWrapper[] onVolumeRemovedListeners; /** * Emitted when a mountable volume is removed from the system. * * Params: * volume = a #GVolume that was removed. */ gulong addOnVolumeRemoved(void delegate(VolumeIF, VolumeMonitor) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnVolumeRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "volume-removed", cast(GCallback)&callBackVolumeRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackVolumeRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackVolumeRemoved(GVolumeMonitor* volumemonitorStruct, GVolume* volume, OnVolumeRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(VolumeIF)(volume), wrapper.outer); } extern(C) static void callBackVolumeRemovedDestroy(OnVolumeRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/VolumeT.d000066400000000000000000000411031324604450400175650ustar00rootroot00000000000000/* * 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 gio.VolumeT; public import gio.AsyncResultIF; public import gio.Cancellable; public import gio.DriveIF; public import gio.FileIF; public import gio.IconIF; public import gio.MountIF; public import gio.MountOperation; public import gio.c.functions; public import gio.c.types; public import glib.ErrorG; public import glib.GException; public import glib.Str; public import gobject.ObjectG; public import gobject.Signals; public import gtkc.giotypes; public import std.algorithm; /** * The #GVolume interface represents user-visible objects that can be * mounted. Note, when porting from GnomeVFS, #GVolume is the moral * equivalent of #GnomeVFSDrive. * * Mounting a #GVolume instance is an asynchronous operation. For more * information about asynchronous operations, see #GAsyncResult and * #GTask. To mount a #GVolume, first call g_volume_mount() with (at * least) the #GVolume instance, optionally a #GMountOperation object * and a #GAsyncReadyCallback. * * Typically, one will only want to pass %NULL for the * #GMountOperation if automounting all volumes when a desktop session * starts since it's not desirable to put up a lot of dialogs asking * for credentials. * * The callback will be fired when the operation has resolved (either * with success or failure), and a #GAsyncReady structure will be * passed to the callback. That callback should then call * g_volume_mount_finish() with the #GVolume instance and the * #GAsyncReady data to see if the operation was completed * successfully. If an @error is present when g_volume_mount_finish() * is called, then it will be filled with any error information. * * ## Volume Identifiers # {#volume-identifier} * * It is sometimes necessary to directly access the underlying * operating system object behind a volume (e.g. for passing a volume * to an application via the commandline). For this purpose, GIO * allows to obtain an 'identifier' for the volume. There can be * different kinds of identifiers, such as Hal UDIs, filesystem labels, * traditional Unix devices (e.g. `/dev/sda2`), UUIDs. GIO uses predefined * strings as names for the different kinds of identifiers: * #G_VOLUME_IDENTIFIER_KIND_HAL_UDI, #G_VOLUME_IDENTIFIER_KIND_LABEL, etc. * Use g_volume_get_identifier() to obtain an identifier for a volume. * * * Note that #G_VOLUME_IDENTIFIER_KIND_HAL_UDI will only be available * when the gvfs hal volume monitor is in use. Other volume monitors * will generally be able to provide the #G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE * identifier, which can be used to obtain a hal device by means of * libhal_manager_find_device_string_match(). */ public template VolumeT(TStruct) { /** Get the main Gtk struct */ public GVolume* getVolumeStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GVolume*)getStruct(); } /** * Checks if a volume can be ejected. * * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise */ public bool canEject() { return g_volume_can_eject(getVolumeStruct()) != 0; } /** * Checks if a volume can be mounted. * * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise */ public bool canMount() { return g_volume_can_mount(getVolumeStruct()) != 0; } /** * Ejects a volume. This is an asynchronous operation, and is * finished by calling g_volume_eject_finish() with the @volume * and #GAsyncResult returned in the @callback. * * Deprecated: Use g_volume_eject_with_operation() instead. * * Params: * flags = flags affecting the unmount if required for eject * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback, or %NULL * userData = user data that gets passed to @callback */ public void eject(GMountUnmountFlags flags, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_volume_eject(getVolumeStruct(), flags, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes ejecting a volume. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Deprecated: Use g_volume_eject_with_operation_finish() instead. * * Params: * result = a #GAsyncResult * * Returns: %TRUE, %FALSE if operation failed * * Throws: GException on failure. */ public bool ejectFinish(AsyncResultIF result) { GError* err = null; auto p = g_volume_eject_finish(getVolumeStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Ejects a volume. This is an asynchronous operation, and is * finished by calling g_volume_eject_with_operation_finish() with the @volume * and #GAsyncResult data returned in the @callback. * * Params: * flags = flags affecting the unmount if required for eject * mountOperation = a #GMountOperation or %NULL to * avoid user interaction * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback, or %NULL * userData = user data passed to @callback * * Since: 2.22 */ public void ejectWithOperation(GMountUnmountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_volume_eject_with_operation(getVolumeStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes ejecting a volume. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * Params: * result = a #GAsyncResult * * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise * * Since: 2.22 * * Throws: GException on failure. */ public bool ejectWithOperationFinish(AsyncResultIF result) { GError* err = null; auto p = g_volume_eject_with_operation_finish(getVolumeStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the kinds of [identifiers][volume-identifier] that @volume has. * Use g_volume_get_identifier() to obtain the identifiers themselves. * * Returns: a %NULL-terminated array * of strings containing kinds of identifiers. Use g_strfreev() to free. */ public string[] enumerateIdentifiers() { auto retStr = g_volume_enumerate_identifiers(getVolumeStruct()); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Gets the activation root for a #GVolume if it is known ahead of * mount time. Returns %NULL otherwise. If not %NULL and if @volume * is mounted, then the result of g_mount_get_root() on the * #GMount object obtained from g_volume_get_mount() will always * either be equal or a prefix of what this function returns. In * other words, in code * * |[ * GMount *mount; * GFile *mount_root * GFile *volume_activation_root; * * mount = g_volume_get_mount (volume); // mounted, so never NULL * mount_root = g_mount_get_root (mount); * volume_activation_root = g_volume_get_activation_root (volume); // assume not NULL * ]| * then the expression * |[ * (g_file_has_prefix (volume_activation_root, mount_root) || * g_file_equal (volume_activation_root, mount_root)) * ]| * will always be %TRUE. * * Activation roots are typically used in #GVolumeMonitor * implementations to find the underlying mount to shadow, see * g_mount_is_shadowed() for more details. * * Returns: the activation root of @volume * or %NULL. Use g_object_unref() to free. * * Since: 2.18 */ public FileIF getActivationRoot() { auto p = g_volume_get_activation_root(getVolumeStruct()); if(p is null) { return null; } return ObjectG.getDObject!(FileIF)(cast(GFile*) p, true); } /** * Gets the drive for the @volume. * * Returns: a #GDrive or %NULL if @volume is not * associated with a drive. The returned object should be unreffed * with g_object_unref() when no longer needed. */ public DriveIF getDrive() { auto p = g_volume_get_drive(getVolumeStruct()); if(p is null) { return null; } return ObjectG.getDObject!(DriveIF)(cast(GDrive*) p, true); } /** * Gets the icon for @volume. * * Returns: a #GIcon. * The returned object should be unreffed with g_object_unref() * when no longer needed. */ public IconIF getIcon() { auto p = g_volume_get_icon(getVolumeStruct()); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Gets the identifier of the given kind for @volume. * See the [introduction][volume-identifier] for more * information about volume identifiers. * * Params: * kind = the kind of identifier to return * * Returns: a newly allocated string containing the * requested identfier, or %NULL if the #GVolume * doesn't have this kind of identifier */ public string getIdentifier(string kind) { auto retStr = g_volume_get_identifier(getVolumeStruct(), Str.toStringz(kind)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the mount for the @volume. * * Returns: a #GMount or %NULL if @volume isn't mounted. * The returned object should be unreffed with g_object_unref() * when no longer needed. */ public MountIF getMount() { auto p = g_volume_get_mount(getVolumeStruct()); if(p is null) { return null; } return ObjectG.getDObject!(MountIF)(cast(GMount*) p, true); } /** * Gets the name of @volume. * * Returns: the name for the given @volume. The returned string should * be freed with g_free() when no longer needed. */ public string getName() { auto retStr = g_volume_get_name(getVolumeStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the sort key for @volume, if any. * * Returns: Sorting key for @volume or %NULL if no such key is available * * Since: 2.32 */ public string getSortKey() { return Str.toString(g_volume_get_sort_key(getVolumeStruct())); } /** * Gets the symbolic icon for @volume. * * Returns: a #GIcon. * The returned object should be unreffed with g_object_unref() * when no longer needed. * * Since: 2.34 */ public IconIF getSymbolicIcon() { auto p = g_volume_get_symbolic_icon(getVolumeStruct()); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p, true); } /** * Gets the UUID for the @volume. The reference is typically based on * the file system UUID for the volume in question and should be * considered an opaque string. Returns %NULL if there is no UUID * available. * * Returns: the UUID for @volume or %NULL if no UUID can be computed. * The returned string should be freed with g_free() * when no longer needed. */ public string getUuid() { auto retStr = g_volume_get_uuid(getVolumeStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Mounts a volume. This is an asynchronous operation, and is * finished by calling g_volume_mount_finish() with the @volume * and #GAsyncResult returned in the @callback. * * Params: * flags = flags affecting the operation * mountOperation = a #GMountOperation or %NULL to avoid user interaction * cancellable = optional #GCancellable object, %NULL to ignore * callback = a #GAsyncReadyCallback, or %NULL * userData = user data that gets passed to @callback */ public void mount(GMountMountFlags flags, MountOperation mountOperation, Cancellable cancellable, GAsyncReadyCallback callback, void* userData) { g_volume_mount(getVolumeStruct(), flags, (mountOperation is null) ? null : mountOperation.getMountOperationStruct(), (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData); } /** * Finishes mounting a volume. If any errors occurred during the operation, * @error will be set to contain the errors and %FALSE will be returned. * * If the mount operation succeeded, g_volume_get_mount() on @volume * is guaranteed to return the mount right after calling this * function; there's no need to listen for the 'mount-added' signal on * #GVolumeMonitor. * * Params: * result = a #GAsyncResult * * Returns: %TRUE, %FALSE if operation failed * * Throws: GException on failure. */ public bool mountFinish(AsyncResultIF result) { GError* err = null; auto p = g_volume_mount_finish(getVolumeStruct(), (result is null) ? null : result.getAsyncResultStruct(), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Returns whether the volume should be automatically mounted. * * Returns: %TRUE if the volume should be automatically mounted */ public bool shouldAutomount() { return g_volume_should_automount(getVolumeStruct()) != 0; } protected class OnChangedDelegateWrapper { void delegate(VolumeIF) dlg; gulong handlerId; this(void delegate(VolumeIF) dlg) { this.dlg = dlg; onChangedListeners ~= this; } void remove(OnChangedDelegateWrapper source) { foreach(index, wrapper; onChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChangedListeners[index] = null; onChangedListeners = std.algorithm.remove(onChangedListeners, index); break; } } } } OnChangedDelegateWrapper[] onChangedListeners; /** * Emitted when the volume has been changed. */ gulong addOnChanged(void delegate(VolumeIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "changed", cast(GCallback)&callBackChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChanged(GVolume* volumeStruct, OnChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackChangedDestroy(OnChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnRemovedDelegateWrapper { void delegate(VolumeIF) dlg; gulong handlerId; this(void delegate(VolumeIF) dlg) { this.dlg = dlg; onRemovedListeners ~= this; } void remove(OnRemovedDelegateWrapper source) { foreach(index, wrapper; onRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onRemovedListeners[index] = null; onRemovedListeners = std.algorithm.remove(onRemovedListeners, index); break; } } } } OnRemovedDelegateWrapper[] onRemovedListeners; /** * This signal is emitted when the #GVolume have been removed. If * the recipient is holding references to the object they should * release them so the object can be finalized. */ gulong addOnRemoved(void delegate(VolumeIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "removed", cast(GCallback)&callBackRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackRemoved(GVolume* volumeStruct, OnRemovedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackRemovedDestroy(OnRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gio/ZlibCompressor.d000066400000000000000000000073431324604450400211570ustar00rootroot00000000000000/* * 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 gio.ZlibCompressor; private import gio.ConverterIF; private import gio.ConverterT; private import gio.FileInfo; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * Zlib decompression */ public class ZlibCompressor : ObjectG, ConverterIF { /** the main Gtk struct */ protected GZlibCompressor* gZlibCompressor; /** Get the main Gtk struct */ public GZlibCompressor* getZlibCompressorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gZlibCompressor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gZlibCompressor; } protected override void setStruct(GObject* obj) { gZlibCompressor = cast(GZlibCompressor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GZlibCompressor* gZlibCompressor, bool ownedRef = false) { this.gZlibCompressor = gZlibCompressor; super(cast(GObject*)gZlibCompressor, ownedRef); } // add the Converter capabilities mixin ConverterT!(GZlibCompressor); /** */ public static GType getType() { return g_zlib_compressor_get_type(); } /** * Creates a new #GZlibCompressor. * * Params: * format = The format to use for the compressed data * level = compression level (0-9), -1 for default * * Returns: a new #GZlibCompressor * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GZlibCompressorFormat format, int level) { auto p = g_zlib_compressor_new(format, level); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GZlibCompressor*) p, true); } /** * Returns the #GZlibCompressor:file-info property. * * Returns: a #GFileInfo, or %NULL * * Since: 2.26 */ public FileInfo getFileInfo() { auto p = g_zlib_compressor_get_file_info(gZlibCompressor); if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p); } /** * Sets @file_info in @compressor. If non-%NULL, and @compressor's * #GZlibCompressor:format property is %G_ZLIB_COMPRESSOR_FORMAT_GZIP, * it will be used to set the file name and modification time in * the GZIP header of the compressed data. * * Note: it is an error to call this function while a compression is in * progress; it may only be called immediately after creation of @compressor, * or after resetting it with g_converter_reset(). * * Params: * fileInfo = a #GFileInfo * * Since: 2.26 */ public void setFileInfo(FileInfo fileInfo) { g_zlib_compressor_set_file_info(gZlibCompressor, (fileInfo is null) ? null : fileInfo.getFileInfoStruct()); } } GtkD-3.7.5/generated/gtkd/gio/ZlibDecompressor.d000066400000000000000000000064341324604450400214700ustar00rootroot00000000000000/* * 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 gio.ZlibDecompressor; private import gio.ConverterIF; private import gio.ConverterT; private import gio.FileInfo; private import gio.c.functions; public import gio.c.types; private import glib.ConstructionException; private import gobject.ObjectG; public import gtkc.giotypes; /** * Zlib decompression */ public class ZlibDecompressor : ObjectG, ConverterIF { /** the main Gtk struct */ protected GZlibDecompressor* gZlibDecompressor; /** Get the main Gtk struct */ public GZlibDecompressor* getZlibDecompressorStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gZlibDecompressor; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gZlibDecompressor; } protected override void setStruct(GObject* obj) { gZlibDecompressor = cast(GZlibDecompressor*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GZlibDecompressor* gZlibDecompressor, bool ownedRef = false) { this.gZlibDecompressor = gZlibDecompressor; super(cast(GObject*)gZlibDecompressor, ownedRef); } // add the Converter capabilities mixin ConverterT!(GZlibDecompressor); /** */ public static GType getType() { return g_zlib_decompressor_get_type(); } /** * Creates a new #GZlibDecompressor. * * Params: * format = The format to use for the compressed data * * Returns: a new #GZlibDecompressor * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GZlibCompressorFormat format) { auto p = g_zlib_decompressor_new(format); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GZlibDecompressor*) p, true); } /** * Retrieves the #GFileInfo constructed from the GZIP header data * of compressed data processed by @compressor, or %NULL if @decompressor's * #GZlibDecompressor:format property is not %G_ZLIB_COMPRESSOR_FORMAT_GZIP, * or the header data was not fully processed yet, or it not present in the * data stream at all. * * Returns: a #GFileInfo, or %NULL * * Since: 2.26 */ public FileInfo getFileInfo() { auto p = g_zlib_decompressor_get_file_info(gZlibDecompressor); if(p is null) { return null; } return ObjectG.getDObject!(FileInfo)(cast(GFileInfo*) p); } } GtkD-3.7.5/generated/gtkd/gio/c/000077500000000000000000000000001324604450400162505ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gio/c/functions.d000066400000000000000000017027471324604450400204470ustar00rootroot00000000000000/* * 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 gio.c.functions; import std.stdio; import gio.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GIO = ["libgio-2.0-0.dll"]; else version (OSX) static immutable LIBRARY_GIO = ["libgio-2.0.0.dylib"]; else static immutable LIBRARY_GIO = ["libgio-2.0.so.0"]; shared static this() { // gio.Action Linker.link(g_action_get_type, "g_action_get_type", LIBRARY_GIO); Linker.link(g_action_name_is_valid, "g_action_name_is_valid", LIBRARY_GIO); Linker.link(g_action_parse_detailed_name, "g_action_parse_detailed_name", LIBRARY_GIO); Linker.link(g_action_print_detailed_name, "g_action_print_detailed_name", LIBRARY_GIO); Linker.link(g_action_activate, "g_action_activate", LIBRARY_GIO); Linker.link(g_action_change_state, "g_action_change_state", LIBRARY_GIO); Linker.link(g_action_get_enabled, "g_action_get_enabled", LIBRARY_GIO); Linker.link(g_action_get_name, "g_action_get_name", LIBRARY_GIO); Linker.link(g_action_get_parameter_type, "g_action_get_parameter_type", LIBRARY_GIO); Linker.link(g_action_get_state, "g_action_get_state", LIBRARY_GIO); Linker.link(g_action_get_state_hint, "g_action_get_state_hint", LIBRARY_GIO); Linker.link(g_action_get_state_type, "g_action_get_state_type", LIBRARY_GIO); // gio.ActionGroup Linker.link(g_action_group_get_type, "g_action_group_get_type", LIBRARY_GIO); Linker.link(g_action_group_action_added, "g_action_group_action_added", LIBRARY_GIO); Linker.link(g_action_group_action_enabled_changed, "g_action_group_action_enabled_changed", LIBRARY_GIO); Linker.link(g_action_group_action_removed, "g_action_group_action_removed", LIBRARY_GIO); Linker.link(g_action_group_action_state_changed, "g_action_group_action_state_changed", LIBRARY_GIO); Linker.link(g_action_group_activate_action, "g_action_group_activate_action", LIBRARY_GIO); Linker.link(g_action_group_change_action_state, "g_action_group_change_action_state", LIBRARY_GIO); Linker.link(g_action_group_get_action_enabled, "g_action_group_get_action_enabled", LIBRARY_GIO); Linker.link(g_action_group_get_action_parameter_type, "g_action_group_get_action_parameter_type", LIBRARY_GIO); Linker.link(g_action_group_get_action_state, "g_action_group_get_action_state", LIBRARY_GIO); Linker.link(g_action_group_get_action_state_hint, "g_action_group_get_action_state_hint", LIBRARY_GIO); Linker.link(g_action_group_get_action_state_type, "g_action_group_get_action_state_type", LIBRARY_GIO); Linker.link(g_action_group_has_action, "g_action_group_has_action", LIBRARY_GIO); Linker.link(g_action_group_list_actions, "g_action_group_list_actions", LIBRARY_GIO); Linker.link(g_action_group_query_action, "g_action_group_query_action", LIBRARY_GIO); // gio.ActionMap Linker.link(g_action_map_get_type, "g_action_map_get_type", LIBRARY_GIO); Linker.link(g_action_map_add_action, "g_action_map_add_action", LIBRARY_GIO); Linker.link(g_action_map_add_action_entries, "g_action_map_add_action_entries", LIBRARY_GIO); Linker.link(g_action_map_lookup_action, "g_action_map_lookup_action", LIBRARY_GIO); Linker.link(g_action_map_remove_action, "g_action_map_remove_action", LIBRARY_GIO); // gio.AppInfo Linker.link(g_app_info_get_type, "g_app_info_get_type", LIBRARY_GIO); Linker.link(g_app_info_create_from_commandline, "g_app_info_create_from_commandline", LIBRARY_GIO); Linker.link(g_app_info_get_all, "g_app_info_get_all", LIBRARY_GIO); Linker.link(g_app_info_get_all_for_type, "g_app_info_get_all_for_type", LIBRARY_GIO); Linker.link(g_app_info_get_default_for_type, "g_app_info_get_default_for_type", LIBRARY_GIO); Linker.link(g_app_info_get_default_for_uri_scheme, "g_app_info_get_default_for_uri_scheme", LIBRARY_GIO); Linker.link(g_app_info_get_fallback_for_type, "g_app_info_get_fallback_for_type", LIBRARY_GIO); Linker.link(g_app_info_get_recommended_for_type, "g_app_info_get_recommended_for_type", LIBRARY_GIO); Linker.link(g_app_info_launch_default_for_uri, "g_app_info_launch_default_for_uri", LIBRARY_GIO); Linker.link(g_app_info_launch_default_for_uri_async, "g_app_info_launch_default_for_uri_async", LIBRARY_GIO); Linker.link(g_app_info_launch_default_for_uri_finish, "g_app_info_launch_default_for_uri_finish", LIBRARY_GIO); Linker.link(g_app_info_reset_type_associations, "g_app_info_reset_type_associations", LIBRARY_GIO); Linker.link(g_app_info_add_supports_type, "g_app_info_add_supports_type", LIBRARY_GIO); Linker.link(g_app_info_can_delete, "g_app_info_can_delete", LIBRARY_GIO); Linker.link(g_app_info_can_remove_supports_type, "g_app_info_can_remove_supports_type", LIBRARY_GIO); Linker.link(g_app_info_delete, "g_app_info_delete", LIBRARY_GIO); Linker.link(g_app_info_dup, "g_app_info_dup", LIBRARY_GIO); Linker.link(g_app_info_equal, "g_app_info_equal", LIBRARY_GIO); Linker.link(g_app_info_get_commandline, "g_app_info_get_commandline", LIBRARY_GIO); Linker.link(g_app_info_get_description, "g_app_info_get_description", LIBRARY_GIO); Linker.link(g_app_info_get_display_name, "g_app_info_get_display_name", LIBRARY_GIO); Linker.link(g_app_info_get_executable, "g_app_info_get_executable", LIBRARY_GIO); Linker.link(g_app_info_get_icon, "g_app_info_get_icon", LIBRARY_GIO); Linker.link(g_app_info_get_id, "g_app_info_get_id", LIBRARY_GIO); Linker.link(g_app_info_get_name, "g_app_info_get_name", LIBRARY_GIO); Linker.link(g_app_info_get_supported_types, "g_app_info_get_supported_types", LIBRARY_GIO); Linker.link(g_app_info_launch, "g_app_info_launch", LIBRARY_GIO); Linker.link(g_app_info_launch_uris, "g_app_info_launch_uris", LIBRARY_GIO); Linker.link(g_app_info_remove_supports_type, "g_app_info_remove_supports_type", LIBRARY_GIO); Linker.link(g_app_info_set_as_default_for_extension, "g_app_info_set_as_default_for_extension", LIBRARY_GIO); Linker.link(g_app_info_set_as_default_for_type, "g_app_info_set_as_default_for_type", LIBRARY_GIO); Linker.link(g_app_info_set_as_last_used_for_type, "g_app_info_set_as_last_used_for_type", LIBRARY_GIO); Linker.link(g_app_info_should_show, "g_app_info_should_show", LIBRARY_GIO); Linker.link(g_app_info_supports_files, "g_app_info_supports_files", LIBRARY_GIO); Linker.link(g_app_info_supports_uris, "g_app_info_supports_uris", LIBRARY_GIO); // gio.AppInfoMonitor Linker.link(g_app_info_monitor_get_type, "g_app_info_monitor_get_type", LIBRARY_GIO); Linker.link(g_app_info_monitor_get, "g_app_info_monitor_get", LIBRARY_GIO); // gio.AppLaunchContext Linker.link(g_app_launch_context_get_type, "g_app_launch_context_get_type", LIBRARY_GIO); Linker.link(g_app_launch_context_new, "g_app_launch_context_new", LIBRARY_GIO); Linker.link(g_app_launch_context_get_display, "g_app_launch_context_get_display", LIBRARY_GIO); Linker.link(g_app_launch_context_get_environment, "g_app_launch_context_get_environment", LIBRARY_GIO); Linker.link(g_app_launch_context_get_startup_notify_id, "g_app_launch_context_get_startup_notify_id", LIBRARY_GIO); Linker.link(g_app_launch_context_launch_failed, "g_app_launch_context_launch_failed", LIBRARY_GIO); Linker.link(g_app_launch_context_setenv, "g_app_launch_context_setenv", LIBRARY_GIO); Linker.link(g_app_launch_context_unsetenv, "g_app_launch_context_unsetenv", LIBRARY_GIO); // gio.Application Linker.link(g_application_get_type, "g_application_get_type", LIBRARY_GIO); Linker.link(g_application_new, "g_application_new", LIBRARY_GIO); Linker.link(g_application_get_default, "g_application_get_default", LIBRARY_GIO); Linker.link(g_application_id_is_valid, "g_application_id_is_valid", LIBRARY_GIO); Linker.link(g_application_activate, "g_application_activate", LIBRARY_GIO); Linker.link(g_application_add_main_option, "g_application_add_main_option", LIBRARY_GIO); Linker.link(g_application_add_main_option_entries, "g_application_add_main_option_entries", LIBRARY_GIO); Linker.link(g_application_add_option_group, "g_application_add_option_group", LIBRARY_GIO); Linker.link(g_application_bind_busy_property, "g_application_bind_busy_property", LIBRARY_GIO); Linker.link(g_application_get_application_id, "g_application_get_application_id", LIBRARY_GIO); Linker.link(g_application_get_dbus_connection, "g_application_get_dbus_connection", LIBRARY_GIO); Linker.link(g_application_get_dbus_object_path, "g_application_get_dbus_object_path", LIBRARY_GIO); Linker.link(g_application_get_flags, "g_application_get_flags", LIBRARY_GIO); Linker.link(g_application_get_inactivity_timeout, "g_application_get_inactivity_timeout", LIBRARY_GIO); Linker.link(g_application_get_is_busy, "g_application_get_is_busy", LIBRARY_GIO); Linker.link(g_application_get_is_registered, "g_application_get_is_registered", LIBRARY_GIO); Linker.link(g_application_get_is_remote, "g_application_get_is_remote", LIBRARY_GIO); Linker.link(g_application_get_resource_base_path, "g_application_get_resource_base_path", LIBRARY_GIO); Linker.link(g_application_hold, "g_application_hold", LIBRARY_GIO); Linker.link(g_application_mark_busy, "g_application_mark_busy", LIBRARY_GIO); Linker.link(g_application_open, "g_application_open", LIBRARY_GIO); Linker.link(g_application_quit, "g_application_quit", LIBRARY_GIO); Linker.link(g_application_register, "g_application_register", LIBRARY_GIO); Linker.link(g_application_release, "g_application_release", LIBRARY_GIO); Linker.link(g_application_run, "g_application_run", LIBRARY_GIO); Linker.link(g_application_send_notification, "g_application_send_notification", LIBRARY_GIO); Linker.link(g_application_set_action_group, "g_application_set_action_group", LIBRARY_GIO); Linker.link(g_application_set_application_id, "g_application_set_application_id", LIBRARY_GIO); Linker.link(g_application_set_default, "g_application_set_default", LIBRARY_GIO); Linker.link(g_application_set_flags, "g_application_set_flags", LIBRARY_GIO); Linker.link(g_application_set_inactivity_timeout, "g_application_set_inactivity_timeout", LIBRARY_GIO); Linker.link(g_application_set_resource_base_path, "g_application_set_resource_base_path", LIBRARY_GIO); Linker.link(g_application_unbind_busy_property, "g_application_unbind_busy_property", LIBRARY_GIO); Linker.link(g_application_unmark_busy, "g_application_unmark_busy", LIBRARY_GIO); Linker.link(g_application_withdraw_notification, "g_application_withdraw_notification", LIBRARY_GIO); // gio.ApplicationCommandLine Linker.link(g_application_command_line_get_type, "g_application_command_line_get_type", LIBRARY_GIO); Linker.link(g_application_command_line_create_file_for_arg, "g_application_command_line_create_file_for_arg", LIBRARY_GIO); Linker.link(g_application_command_line_get_arguments, "g_application_command_line_get_arguments", LIBRARY_GIO); Linker.link(g_application_command_line_get_cwd, "g_application_command_line_get_cwd", LIBRARY_GIO); Linker.link(g_application_command_line_get_environ, "g_application_command_line_get_environ", LIBRARY_GIO); Linker.link(g_application_command_line_get_exit_status, "g_application_command_line_get_exit_status", LIBRARY_GIO); Linker.link(g_application_command_line_get_is_remote, "g_application_command_line_get_is_remote", LIBRARY_GIO); Linker.link(g_application_command_line_get_options_dict, "g_application_command_line_get_options_dict", LIBRARY_GIO); Linker.link(g_application_command_line_get_platform_data, "g_application_command_line_get_platform_data", LIBRARY_GIO); Linker.link(g_application_command_line_get_stdin, "g_application_command_line_get_stdin", LIBRARY_GIO); Linker.link(g_application_command_line_getenv, "g_application_command_line_getenv", LIBRARY_GIO); Linker.link(g_application_command_line_print, "g_application_command_line_print", LIBRARY_GIO); Linker.link(g_application_command_line_printerr, "g_application_command_line_printerr", LIBRARY_GIO); Linker.link(g_application_command_line_set_exit_status, "g_application_command_line_set_exit_status", LIBRARY_GIO); // gio.AsyncInitable Linker.link(g_async_initable_get_type, "g_async_initable_get_type", LIBRARY_GIO); Linker.link(g_async_initable_new_async, "g_async_initable_new_async", LIBRARY_GIO); Linker.link(g_async_initable_new_valist_async, "g_async_initable_new_valist_async", LIBRARY_GIO); Linker.link(g_async_initable_newv_async, "g_async_initable_newv_async", LIBRARY_GIO); Linker.link(g_async_initable_init_async, "g_async_initable_init_async", LIBRARY_GIO); Linker.link(g_async_initable_init_finish, "g_async_initable_init_finish", LIBRARY_GIO); Linker.link(g_async_initable_new_finish, "g_async_initable_new_finish", LIBRARY_GIO); // gio.AsyncResult Linker.link(g_async_result_get_type, "g_async_result_get_type", LIBRARY_GIO); Linker.link(g_async_result_get_source_object, "g_async_result_get_source_object", LIBRARY_GIO); Linker.link(g_async_result_get_user_data, "g_async_result_get_user_data", LIBRARY_GIO); Linker.link(g_async_result_is_tagged, "g_async_result_is_tagged", LIBRARY_GIO); Linker.link(g_async_result_legacy_propagate_error, "g_async_result_legacy_propagate_error", LIBRARY_GIO); // gio.BufferedInputStream Linker.link(g_buffered_input_stream_get_type, "g_buffered_input_stream_get_type", LIBRARY_GIO); Linker.link(g_buffered_input_stream_new, "g_buffered_input_stream_new", LIBRARY_GIO); Linker.link(g_buffered_input_stream_new_sized, "g_buffered_input_stream_new_sized", LIBRARY_GIO); Linker.link(g_buffered_input_stream_fill, "g_buffered_input_stream_fill", LIBRARY_GIO); Linker.link(g_buffered_input_stream_fill_async, "g_buffered_input_stream_fill_async", LIBRARY_GIO); Linker.link(g_buffered_input_stream_fill_finish, "g_buffered_input_stream_fill_finish", LIBRARY_GIO); Linker.link(g_buffered_input_stream_get_available, "g_buffered_input_stream_get_available", LIBRARY_GIO); Linker.link(g_buffered_input_stream_get_buffer_size, "g_buffered_input_stream_get_buffer_size", LIBRARY_GIO); Linker.link(g_buffered_input_stream_peek, "g_buffered_input_stream_peek", LIBRARY_GIO); Linker.link(g_buffered_input_stream_peek_buffer, "g_buffered_input_stream_peek_buffer", LIBRARY_GIO); Linker.link(g_buffered_input_stream_read_byte, "g_buffered_input_stream_read_byte", LIBRARY_GIO); Linker.link(g_buffered_input_stream_set_buffer_size, "g_buffered_input_stream_set_buffer_size", LIBRARY_GIO); // gio.BufferedOutputStream Linker.link(g_buffered_output_stream_get_type, "g_buffered_output_stream_get_type", LIBRARY_GIO); Linker.link(g_buffered_output_stream_new, "g_buffered_output_stream_new", LIBRARY_GIO); Linker.link(g_buffered_output_stream_new_sized, "g_buffered_output_stream_new_sized", LIBRARY_GIO); Linker.link(g_buffered_output_stream_get_auto_grow, "g_buffered_output_stream_get_auto_grow", LIBRARY_GIO); Linker.link(g_buffered_output_stream_get_buffer_size, "g_buffered_output_stream_get_buffer_size", LIBRARY_GIO); Linker.link(g_buffered_output_stream_set_auto_grow, "g_buffered_output_stream_set_auto_grow", LIBRARY_GIO); Linker.link(g_buffered_output_stream_set_buffer_size, "g_buffered_output_stream_set_buffer_size", LIBRARY_GIO); // gio.BytesIcon Linker.link(g_bytes_icon_get_type, "g_bytes_icon_get_type", LIBRARY_GIO); Linker.link(g_bytes_icon_new, "g_bytes_icon_new", LIBRARY_GIO); Linker.link(g_bytes_icon_get_bytes, "g_bytes_icon_get_bytes", LIBRARY_GIO); // gio.Cancellable Linker.link(g_cancellable_get_type, "g_cancellable_get_type", LIBRARY_GIO); Linker.link(g_cancellable_new, "g_cancellable_new", LIBRARY_GIO); Linker.link(g_cancellable_get_current, "g_cancellable_get_current", LIBRARY_GIO); Linker.link(g_cancellable_cancel, "g_cancellable_cancel", LIBRARY_GIO); Linker.link(g_cancellable_connect, "g_cancellable_connect", LIBRARY_GIO); Linker.link(g_cancellable_disconnect, "g_cancellable_disconnect", LIBRARY_GIO); Linker.link(g_cancellable_get_fd, "g_cancellable_get_fd", LIBRARY_GIO); Linker.link(g_cancellable_is_cancelled, "g_cancellable_is_cancelled", LIBRARY_GIO); Linker.link(g_cancellable_make_pollfd, "g_cancellable_make_pollfd", LIBRARY_GIO); Linker.link(g_cancellable_pop_current, "g_cancellable_pop_current", LIBRARY_GIO); Linker.link(g_cancellable_push_current, "g_cancellable_push_current", LIBRARY_GIO); Linker.link(g_cancellable_release_fd, "g_cancellable_release_fd", LIBRARY_GIO); Linker.link(g_cancellable_reset, "g_cancellable_reset", LIBRARY_GIO); Linker.link(g_cancellable_set_error_if_cancelled, "g_cancellable_set_error_if_cancelled", LIBRARY_GIO); Linker.link(g_cancellable_source_new, "g_cancellable_source_new", LIBRARY_GIO); // gio.CharsetConverter Linker.link(g_charset_converter_get_type, "g_charset_converter_get_type", LIBRARY_GIO); Linker.link(g_charset_converter_new, "g_charset_converter_new", LIBRARY_GIO); Linker.link(g_charset_converter_get_num_fallbacks, "g_charset_converter_get_num_fallbacks", LIBRARY_GIO); Linker.link(g_charset_converter_get_use_fallback, "g_charset_converter_get_use_fallback", LIBRARY_GIO); Linker.link(g_charset_converter_set_use_fallback, "g_charset_converter_set_use_fallback", LIBRARY_GIO); // gio.Converter Linker.link(g_converter_get_type, "g_converter_get_type", LIBRARY_GIO); Linker.link(g_converter_convert, "g_converter_convert", LIBRARY_GIO); Linker.link(g_converter_reset, "g_converter_reset", LIBRARY_GIO); // gio.ConverterInputStream Linker.link(g_converter_input_stream_get_type, "g_converter_input_stream_get_type", LIBRARY_GIO); Linker.link(g_converter_input_stream_new, "g_converter_input_stream_new", LIBRARY_GIO); Linker.link(g_converter_input_stream_get_converter, "g_converter_input_stream_get_converter", LIBRARY_GIO); // gio.ConverterOutputStream Linker.link(g_converter_output_stream_get_type, "g_converter_output_stream_get_type", LIBRARY_GIO); Linker.link(g_converter_output_stream_new, "g_converter_output_stream_new", LIBRARY_GIO); Linker.link(g_converter_output_stream_get_converter, "g_converter_output_stream_get_converter", LIBRARY_GIO); // gio.Credentials Linker.link(g_credentials_get_type, "g_credentials_get_type", LIBRARY_GIO); Linker.link(g_credentials_new, "g_credentials_new", LIBRARY_GIO); Linker.link(g_credentials_get_native, "g_credentials_get_native", LIBRARY_GIO); Linker.link(g_credentials_get_unix_pid, "g_credentials_get_unix_pid", LIBRARY_GIO); Linker.link(g_credentials_get_unix_user, "g_credentials_get_unix_user", LIBRARY_GIO); Linker.link(g_credentials_is_same_user, "g_credentials_is_same_user", LIBRARY_GIO); Linker.link(g_credentials_set_native, "g_credentials_set_native", LIBRARY_GIO); Linker.link(g_credentials_set_unix_user, "g_credentials_set_unix_user", LIBRARY_GIO); Linker.link(g_credentials_to_string, "g_credentials_to_string", LIBRARY_GIO); // gio.DBusActionGroup Linker.link(g_dbus_action_group_get_type, "g_dbus_action_group_get_type", LIBRARY_GIO); Linker.link(g_dbus_action_group_get, "g_dbus_action_group_get", LIBRARY_GIO); // gio.DBusAnnotationInfo Linker.link(g_dbus_annotation_info_get_type, "g_dbus_annotation_info_get_type", LIBRARY_GIO); Linker.link(g_dbus_annotation_info_ref, "g_dbus_annotation_info_ref", LIBRARY_GIO); Linker.link(g_dbus_annotation_info_unref, "g_dbus_annotation_info_unref", LIBRARY_GIO); Linker.link(g_dbus_annotation_info_lookup, "g_dbus_annotation_info_lookup", LIBRARY_GIO); // gio.DBusArgInfo Linker.link(g_dbus_arg_info_get_type, "g_dbus_arg_info_get_type", LIBRARY_GIO); Linker.link(g_dbus_arg_info_ref, "g_dbus_arg_info_ref", LIBRARY_GIO); Linker.link(g_dbus_arg_info_unref, "g_dbus_arg_info_unref", LIBRARY_GIO); // gio.DBusAuthObserver Linker.link(g_dbus_auth_observer_get_type, "g_dbus_auth_observer_get_type", LIBRARY_GIO); Linker.link(g_dbus_auth_observer_new, "g_dbus_auth_observer_new", LIBRARY_GIO); Linker.link(g_dbus_auth_observer_allow_mechanism, "g_dbus_auth_observer_allow_mechanism", LIBRARY_GIO); Linker.link(g_dbus_auth_observer_authorize_authenticated_peer, "g_dbus_auth_observer_authorize_authenticated_peer", LIBRARY_GIO); // gio.DBusConnection Linker.link(g_dbus_connection_get_type, "g_dbus_connection_get_type", LIBRARY_GIO); Linker.link(g_dbus_connection_new_finish, "g_dbus_connection_new_finish", LIBRARY_GIO); Linker.link(g_dbus_connection_new_for_address_finish, "g_dbus_connection_new_for_address_finish", LIBRARY_GIO); Linker.link(g_dbus_connection_new_for_address_sync, "g_dbus_connection_new_for_address_sync", LIBRARY_GIO); Linker.link(g_dbus_connection_new_sync, "g_dbus_connection_new_sync", LIBRARY_GIO); Linker.link(g_dbus_connection_new, "g_dbus_connection_new", LIBRARY_GIO); Linker.link(g_dbus_connection_new_for_address, "g_dbus_connection_new_for_address", LIBRARY_GIO); Linker.link(g_dbus_connection_add_filter, "g_dbus_connection_add_filter", LIBRARY_GIO); Linker.link(g_dbus_connection_call, "g_dbus_connection_call", LIBRARY_GIO); Linker.link(g_dbus_connection_call_finish, "g_dbus_connection_call_finish", LIBRARY_GIO); Linker.link(g_dbus_connection_call_sync, "g_dbus_connection_call_sync", LIBRARY_GIO); Linker.link(g_dbus_connection_call_with_unix_fd_list, "g_dbus_connection_call_with_unix_fd_list", LIBRARY_GIO); Linker.link(g_dbus_connection_call_with_unix_fd_list_finish, "g_dbus_connection_call_with_unix_fd_list_finish", LIBRARY_GIO); Linker.link(g_dbus_connection_call_with_unix_fd_list_sync, "g_dbus_connection_call_with_unix_fd_list_sync", LIBRARY_GIO); Linker.link(g_dbus_connection_close, "g_dbus_connection_close", LIBRARY_GIO); Linker.link(g_dbus_connection_close_finish, "g_dbus_connection_close_finish", LIBRARY_GIO); Linker.link(g_dbus_connection_close_sync, "g_dbus_connection_close_sync", LIBRARY_GIO); Linker.link(g_dbus_connection_emit_signal, "g_dbus_connection_emit_signal", LIBRARY_GIO); Linker.link(g_dbus_connection_export_action_group, "g_dbus_connection_export_action_group", LIBRARY_GIO); Linker.link(g_dbus_connection_export_menu_model, "g_dbus_connection_export_menu_model", LIBRARY_GIO); Linker.link(g_dbus_connection_flush, "g_dbus_connection_flush", LIBRARY_GIO); Linker.link(g_dbus_connection_flush_finish, "g_dbus_connection_flush_finish", LIBRARY_GIO); Linker.link(g_dbus_connection_flush_sync, "g_dbus_connection_flush_sync", LIBRARY_GIO); Linker.link(g_dbus_connection_get_capabilities, "g_dbus_connection_get_capabilities", LIBRARY_GIO); Linker.link(g_dbus_connection_get_exit_on_close, "g_dbus_connection_get_exit_on_close", LIBRARY_GIO); Linker.link(g_dbus_connection_get_guid, "g_dbus_connection_get_guid", LIBRARY_GIO); Linker.link(g_dbus_connection_get_last_serial, "g_dbus_connection_get_last_serial", LIBRARY_GIO); Linker.link(g_dbus_connection_get_peer_credentials, "g_dbus_connection_get_peer_credentials", LIBRARY_GIO); Linker.link(g_dbus_connection_get_stream, "g_dbus_connection_get_stream", LIBRARY_GIO); Linker.link(g_dbus_connection_get_unique_name, "g_dbus_connection_get_unique_name", LIBRARY_GIO); Linker.link(g_dbus_connection_is_closed, "g_dbus_connection_is_closed", LIBRARY_GIO); Linker.link(g_dbus_connection_register_object, "g_dbus_connection_register_object", LIBRARY_GIO); Linker.link(g_dbus_connection_register_object_with_closures, "g_dbus_connection_register_object_with_closures", LIBRARY_GIO); Linker.link(g_dbus_connection_register_subtree, "g_dbus_connection_register_subtree", LIBRARY_GIO); Linker.link(g_dbus_connection_remove_filter, "g_dbus_connection_remove_filter", LIBRARY_GIO); Linker.link(g_dbus_connection_send_message, "g_dbus_connection_send_message", LIBRARY_GIO); Linker.link(g_dbus_connection_send_message_with_reply, "g_dbus_connection_send_message_with_reply", LIBRARY_GIO); Linker.link(g_dbus_connection_send_message_with_reply_finish, "g_dbus_connection_send_message_with_reply_finish", LIBRARY_GIO); Linker.link(g_dbus_connection_send_message_with_reply_sync, "g_dbus_connection_send_message_with_reply_sync", LIBRARY_GIO); Linker.link(g_dbus_connection_set_exit_on_close, "g_dbus_connection_set_exit_on_close", LIBRARY_GIO); Linker.link(g_dbus_connection_signal_subscribe, "g_dbus_connection_signal_subscribe", LIBRARY_GIO); Linker.link(g_dbus_connection_signal_unsubscribe, "g_dbus_connection_signal_unsubscribe", LIBRARY_GIO); Linker.link(g_dbus_connection_start_message_processing, "g_dbus_connection_start_message_processing", LIBRARY_GIO); Linker.link(g_dbus_connection_unexport_action_group, "g_dbus_connection_unexport_action_group", LIBRARY_GIO); Linker.link(g_dbus_connection_unexport_menu_model, "g_dbus_connection_unexport_menu_model", LIBRARY_GIO); Linker.link(g_dbus_connection_unregister_object, "g_dbus_connection_unregister_object", LIBRARY_GIO); Linker.link(g_dbus_connection_unregister_subtree, "g_dbus_connection_unregister_subtree", LIBRARY_GIO); Linker.link(g_bus_get, "g_bus_get", LIBRARY_GIO); Linker.link(g_bus_get_finish, "g_bus_get_finish", LIBRARY_GIO); Linker.link(g_bus_get_sync, "g_bus_get_sync", LIBRARY_GIO); // gio.DBusInterface Linker.link(g_dbus_interface_get_type, "g_dbus_interface_get_type", LIBRARY_GIO); Linker.link(g_dbus_interface_dup_object, "g_dbus_interface_dup_object", LIBRARY_GIO); Linker.link(g_dbus_interface_get_info, "g_dbus_interface_get_info", LIBRARY_GIO); Linker.link(g_dbus_interface_get_object, "g_dbus_interface_get_object", LIBRARY_GIO); Linker.link(g_dbus_interface_set_object, "g_dbus_interface_set_object", LIBRARY_GIO); // gio.DBusInterfaceInfo Linker.link(g_dbus_interface_info_get_type, "g_dbus_interface_info_get_type", LIBRARY_GIO); Linker.link(g_dbus_interface_info_cache_build, "g_dbus_interface_info_cache_build", LIBRARY_GIO); Linker.link(g_dbus_interface_info_cache_release, "g_dbus_interface_info_cache_release", LIBRARY_GIO); Linker.link(g_dbus_interface_info_generate_xml, "g_dbus_interface_info_generate_xml", LIBRARY_GIO); Linker.link(g_dbus_interface_info_lookup_method, "g_dbus_interface_info_lookup_method", LIBRARY_GIO); Linker.link(g_dbus_interface_info_lookup_property, "g_dbus_interface_info_lookup_property", LIBRARY_GIO); Linker.link(g_dbus_interface_info_lookup_signal, "g_dbus_interface_info_lookup_signal", LIBRARY_GIO); Linker.link(g_dbus_interface_info_ref, "g_dbus_interface_info_ref", LIBRARY_GIO); Linker.link(g_dbus_interface_info_unref, "g_dbus_interface_info_unref", LIBRARY_GIO); // gio.DBusInterfaceSkeleton Linker.link(g_dbus_interface_skeleton_get_type, "g_dbus_interface_skeleton_get_type", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_export, "g_dbus_interface_skeleton_export", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_flush, "g_dbus_interface_skeleton_flush", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_get_connection, "g_dbus_interface_skeleton_get_connection", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_get_connections, "g_dbus_interface_skeleton_get_connections", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_get_flags, "g_dbus_interface_skeleton_get_flags", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_get_info, "g_dbus_interface_skeleton_get_info", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_get_object_path, "g_dbus_interface_skeleton_get_object_path", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_get_properties, "g_dbus_interface_skeleton_get_properties", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_get_vtable, "g_dbus_interface_skeleton_get_vtable", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_has_connection, "g_dbus_interface_skeleton_has_connection", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_set_flags, "g_dbus_interface_skeleton_set_flags", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_unexport, "g_dbus_interface_skeleton_unexport", LIBRARY_GIO); Linker.link(g_dbus_interface_skeleton_unexport_from_connection, "g_dbus_interface_skeleton_unexport_from_connection", LIBRARY_GIO); // gio.DBusMenuModel Linker.link(g_dbus_menu_model_get_type, "g_dbus_menu_model_get_type", LIBRARY_GIO); Linker.link(g_dbus_menu_model_get, "g_dbus_menu_model_get", LIBRARY_GIO); // gio.DBusMessage Linker.link(g_dbus_message_get_type, "g_dbus_message_get_type", LIBRARY_GIO); Linker.link(g_dbus_message_new, "g_dbus_message_new", LIBRARY_GIO); Linker.link(g_dbus_message_new_from_blob, "g_dbus_message_new_from_blob", LIBRARY_GIO); Linker.link(g_dbus_message_new_method_call, "g_dbus_message_new_method_call", LIBRARY_GIO); Linker.link(g_dbus_message_new_signal, "g_dbus_message_new_signal", LIBRARY_GIO); Linker.link(g_dbus_message_bytes_needed, "g_dbus_message_bytes_needed", LIBRARY_GIO); Linker.link(g_dbus_message_copy, "g_dbus_message_copy", LIBRARY_GIO); Linker.link(g_dbus_message_get_arg0, "g_dbus_message_get_arg0", LIBRARY_GIO); Linker.link(g_dbus_message_get_body, "g_dbus_message_get_body", LIBRARY_GIO); Linker.link(g_dbus_message_get_byte_order, "g_dbus_message_get_byte_order", LIBRARY_GIO); Linker.link(g_dbus_message_get_destination, "g_dbus_message_get_destination", LIBRARY_GIO); Linker.link(g_dbus_message_get_error_name, "g_dbus_message_get_error_name", LIBRARY_GIO); Linker.link(g_dbus_message_get_flags, "g_dbus_message_get_flags", LIBRARY_GIO); Linker.link(g_dbus_message_get_header, "g_dbus_message_get_header", LIBRARY_GIO); Linker.link(g_dbus_message_get_header_fields, "g_dbus_message_get_header_fields", LIBRARY_GIO); Linker.link(g_dbus_message_get_interface, "g_dbus_message_get_interface", LIBRARY_GIO); Linker.link(g_dbus_message_get_locked, "g_dbus_message_get_locked", LIBRARY_GIO); Linker.link(g_dbus_message_get_member, "g_dbus_message_get_member", LIBRARY_GIO); Linker.link(g_dbus_message_get_message_type, "g_dbus_message_get_message_type", LIBRARY_GIO); Linker.link(g_dbus_message_get_num_unix_fds, "g_dbus_message_get_num_unix_fds", LIBRARY_GIO); Linker.link(g_dbus_message_get_path, "g_dbus_message_get_path", LIBRARY_GIO); Linker.link(g_dbus_message_get_reply_serial, "g_dbus_message_get_reply_serial", LIBRARY_GIO); Linker.link(g_dbus_message_get_sender, "g_dbus_message_get_sender", LIBRARY_GIO); Linker.link(g_dbus_message_get_serial, "g_dbus_message_get_serial", LIBRARY_GIO); Linker.link(g_dbus_message_get_signature, "g_dbus_message_get_signature", LIBRARY_GIO); Linker.link(g_dbus_message_get_unix_fd_list, "g_dbus_message_get_unix_fd_list", LIBRARY_GIO); Linker.link(g_dbus_message_lock, "g_dbus_message_lock", LIBRARY_GIO); Linker.link(g_dbus_message_new_method_error, "g_dbus_message_new_method_error", LIBRARY_GIO); Linker.link(g_dbus_message_new_method_error_literal, "g_dbus_message_new_method_error_literal", LIBRARY_GIO); Linker.link(g_dbus_message_new_method_error_valist, "g_dbus_message_new_method_error_valist", LIBRARY_GIO); Linker.link(g_dbus_message_new_method_reply, "g_dbus_message_new_method_reply", LIBRARY_GIO); Linker.link(g_dbus_message_print, "g_dbus_message_print", LIBRARY_GIO); Linker.link(g_dbus_message_set_body, "g_dbus_message_set_body", LIBRARY_GIO); Linker.link(g_dbus_message_set_byte_order, "g_dbus_message_set_byte_order", LIBRARY_GIO); Linker.link(g_dbus_message_set_destination, "g_dbus_message_set_destination", LIBRARY_GIO); Linker.link(g_dbus_message_set_error_name, "g_dbus_message_set_error_name", LIBRARY_GIO); Linker.link(g_dbus_message_set_flags, "g_dbus_message_set_flags", LIBRARY_GIO); Linker.link(g_dbus_message_set_header, "g_dbus_message_set_header", LIBRARY_GIO); Linker.link(g_dbus_message_set_interface, "g_dbus_message_set_interface", LIBRARY_GIO); Linker.link(g_dbus_message_set_member, "g_dbus_message_set_member", LIBRARY_GIO); Linker.link(g_dbus_message_set_message_type, "g_dbus_message_set_message_type", LIBRARY_GIO); Linker.link(g_dbus_message_set_num_unix_fds, "g_dbus_message_set_num_unix_fds", LIBRARY_GIO); Linker.link(g_dbus_message_set_path, "g_dbus_message_set_path", LIBRARY_GIO); Linker.link(g_dbus_message_set_reply_serial, "g_dbus_message_set_reply_serial", LIBRARY_GIO); Linker.link(g_dbus_message_set_sender, "g_dbus_message_set_sender", LIBRARY_GIO); Linker.link(g_dbus_message_set_serial, "g_dbus_message_set_serial", LIBRARY_GIO); Linker.link(g_dbus_message_set_signature, "g_dbus_message_set_signature", LIBRARY_GIO); Linker.link(g_dbus_message_set_unix_fd_list, "g_dbus_message_set_unix_fd_list", LIBRARY_GIO); Linker.link(g_dbus_message_to_blob, "g_dbus_message_to_blob", LIBRARY_GIO); Linker.link(g_dbus_message_to_gerror, "g_dbus_message_to_gerror", LIBRARY_GIO); // gio.DBusMethodInfo Linker.link(g_dbus_method_info_get_type, "g_dbus_method_info_get_type", LIBRARY_GIO); Linker.link(g_dbus_method_info_ref, "g_dbus_method_info_ref", LIBRARY_GIO); Linker.link(g_dbus_method_info_unref, "g_dbus_method_info_unref", LIBRARY_GIO); // gio.DBusMethodInvocation Linker.link(g_dbus_method_invocation_get_type, "g_dbus_method_invocation_get_type", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_connection, "g_dbus_method_invocation_get_connection", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_interface_name, "g_dbus_method_invocation_get_interface_name", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_message, "g_dbus_method_invocation_get_message", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_method_info, "g_dbus_method_invocation_get_method_info", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_method_name, "g_dbus_method_invocation_get_method_name", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_object_path, "g_dbus_method_invocation_get_object_path", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_parameters, "g_dbus_method_invocation_get_parameters", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_property_info, "g_dbus_method_invocation_get_property_info", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_sender, "g_dbus_method_invocation_get_sender", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_get_user_data, "g_dbus_method_invocation_get_user_data", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_return_dbus_error, "g_dbus_method_invocation_return_dbus_error", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_return_error, "g_dbus_method_invocation_return_error", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_return_error_literal, "g_dbus_method_invocation_return_error_literal", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_return_error_valist, "g_dbus_method_invocation_return_error_valist", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_return_gerror, "g_dbus_method_invocation_return_gerror", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_return_value, "g_dbus_method_invocation_return_value", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_return_value_with_unix_fd_list, "g_dbus_method_invocation_return_value_with_unix_fd_list", LIBRARY_GIO); Linker.link(g_dbus_method_invocation_take_error, "g_dbus_method_invocation_take_error", LIBRARY_GIO); // gio.DBusNodeInfo Linker.link(g_dbus_node_info_get_type, "g_dbus_node_info_get_type", LIBRARY_GIO); Linker.link(g_dbus_node_info_new_for_xml, "g_dbus_node_info_new_for_xml", LIBRARY_GIO); Linker.link(g_dbus_node_info_generate_xml, "g_dbus_node_info_generate_xml", LIBRARY_GIO); Linker.link(g_dbus_node_info_lookup_interface, "g_dbus_node_info_lookup_interface", LIBRARY_GIO); Linker.link(g_dbus_node_info_ref, "g_dbus_node_info_ref", LIBRARY_GIO); Linker.link(g_dbus_node_info_unref, "g_dbus_node_info_unref", LIBRARY_GIO); // gio.DBusObject Linker.link(g_dbus_object_get_type, "g_dbus_object_get_type", LIBRARY_GIO); Linker.link(g_dbus_object_get_interface, "g_dbus_object_get_interface", LIBRARY_GIO); Linker.link(g_dbus_object_get_interfaces, "g_dbus_object_get_interfaces", LIBRARY_GIO); Linker.link(g_dbus_object_get_object_path, "g_dbus_object_get_object_path", LIBRARY_GIO); // gio.DBusObjectManager Linker.link(g_dbus_object_manager_get_type, "g_dbus_object_manager_get_type", LIBRARY_GIO); Linker.link(g_dbus_object_manager_get_interface, "g_dbus_object_manager_get_interface", LIBRARY_GIO); Linker.link(g_dbus_object_manager_get_object, "g_dbus_object_manager_get_object", LIBRARY_GIO); Linker.link(g_dbus_object_manager_get_object_path, "g_dbus_object_manager_get_object_path", LIBRARY_GIO); Linker.link(g_dbus_object_manager_get_objects, "g_dbus_object_manager_get_objects", LIBRARY_GIO); // gio.DBusObjectManagerClient Linker.link(g_dbus_object_manager_client_get_type, "g_dbus_object_manager_client_get_type", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_new_finish, "g_dbus_object_manager_client_new_finish", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_new_for_bus_finish, "g_dbus_object_manager_client_new_for_bus_finish", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_new_for_bus_sync, "g_dbus_object_manager_client_new_for_bus_sync", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_new_sync, "g_dbus_object_manager_client_new_sync", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_new, "g_dbus_object_manager_client_new", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_new_for_bus, "g_dbus_object_manager_client_new_for_bus", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_get_connection, "g_dbus_object_manager_client_get_connection", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_get_flags, "g_dbus_object_manager_client_get_flags", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_get_name, "g_dbus_object_manager_client_get_name", LIBRARY_GIO); Linker.link(g_dbus_object_manager_client_get_name_owner, "g_dbus_object_manager_client_get_name_owner", LIBRARY_GIO); // gio.DBusObjectManagerServer Linker.link(g_dbus_object_manager_server_get_type, "g_dbus_object_manager_server_get_type", LIBRARY_GIO); Linker.link(g_dbus_object_manager_server_new, "g_dbus_object_manager_server_new", LIBRARY_GIO); Linker.link(g_dbus_object_manager_server_export, "g_dbus_object_manager_server_export", LIBRARY_GIO); Linker.link(g_dbus_object_manager_server_export_uniquely, "g_dbus_object_manager_server_export_uniquely", LIBRARY_GIO); Linker.link(g_dbus_object_manager_server_get_connection, "g_dbus_object_manager_server_get_connection", LIBRARY_GIO); Linker.link(g_dbus_object_manager_server_is_exported, "g_dbus_object_manager_server_is_exported", LIBRARY_GIO); Linker.link(g_dbus_object_manager_server_set_connection, "g_dbus_object_manager_server_set_connection", LIBRARY_GIO); Linker.link(g_dbus_object_manager_server_unexport, "g_dbus_object_manager_server_unexport", LIBRARY_GIO); // gio.DBusObjectProxy Linker.link(g_dbus_object_proxy_get_type, "g_dbus_object_proxy_get_type", LIBRARY_GIO); Linker.link(g_dbus_object_proxy_new, "g_dbus_object_proxy_new", LIBRARY_GIO); Linker.link(g_dbus_object_proxy_get_connection, "g_dbus_object_proxy_get_connection", LIBRARY_GIO); // gio.DBusObjectSkeleton Linker.link(g_dbus_object_skeleton_get_type, "g_dbus_object_skeleton_get_type", LIBRARY_GIO); Linker.link(g_dbus_object_skeleton_new, "g_dbus_object_skeleton_new", LIBRARY_GIO); Linker.link(g_dbus_object_skeleton_add_interface, "g_dbus_object_skeleton_add_interface", LIBRARY_GIO); Linker.link(g_dbus_object_skeleton_flush, "g_dbus_object_skeleton_flush", LIBRARY_GIO); Linker.link(g_dbus_object_skeleton_remove_interface, "g_dbus_object_skeleton_remove_interface", LIBRARY_GIO); Linker.link(g_dbus_object_skeleton_remove_interface_by_name, "g_dbus_object_skeleton_remove_interface_by_name", LIBRARY_GIO); Linker.link(g_dbus_object_skeleton_set_object_path, "g_dbus_object_skeleton_set_object_path", LIBRARY_GIO); // gio.DBusPropertyInfo Linker.link(g_dbus_property_info_get_type, "g_dbus_property_info_get_type", LIBRARY_GIO); Linker.link(g_dbus_property_info_ref, "g_dbus_property_info_ref", LIBRARY_GIO); Linker.link(g_dbus_property_info_unref, "g_dbus_property_info_unref", LIBRARY_GIO); // gio.DBusProxy Linker.link(g_dbus_proxy_get_type, "g_dbus_proxy_get_type", LIBRARY_GIO); Linker.link(g_dbus_proxy_new_finish, "g_dbus_proxy_new_finish", LIBRARY_GIO); Linker.link(g_dbus_proxy_new_for_bus_finish, "g_dbus_proxy_new_for_bus_finish", LIBRARY_GIO); Linker.link(g_dbus_proxy_new_for_bus_sync, "g_dbus_proxy_new_for_bus_sync", LIBRARY_GIO); Linker.link(g_dbus_proxy_new_sync, "g_dbus_proxy_new_sync", LIBRARY_GIO); Linker.link(g_dbus_proxy_new, "g_dbus_proxy_new", LIBRARY_GIO); Linker.link(g_dbus_proxy_new_for_bus, "g_dbus_proxy_new_for_bus", LIBRARY_GIO); Linker.link(g_dbus_proxy_call, "g_dbus_proxy_call", LIBRARY_GIO); Linker.link(g_dbus_proxy_call_finish, "g_dbus_proxy_call_finish", LIBRARY_GIO); Linker.link(g_dbus_proxy_call_sync, "g_dbus_proxy_call_sync", LIBRARY_GIO); Linker.link(g_dbus_proxy_call_with_unix_fd_list, "g_dbus_proxy_call_with_unix_fd_list", LIBRARY_GIO); Linker.link(g_dbus_proxy_call_with_unix_fd_list_finish, "g_dbus_proxy_call_with_unix_fd_list_finish", LIBRARY_GIO); Linker.link(g_dbus_proxy_call_with_unix_fd_list_sync, "g_dbus_proxy_call_with_unix_fd_list_sync", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_cached_property, "g_dbus_proxy_get_cached_property", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_cached_property_names, "g_dbus_proxy_get_cached_property_names", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_connection, "g_dbus_proxy_get_connection", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_default_timeout, "g_dbus_proxy_get_default_timeout", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_flags, "g_dbus_proxy_get_flags", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_interface_info, "g_dbus_proxy_get_interface_info", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_interface_name, "g_dbus_proxy_get_interface_name", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_name, "g_dbus_proxy_get_name", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_name_owner, "g_dbus_proxy_get_name_owner", LIBRARY_GIO); Linker.link(g_dbus_proxy_get_object_path, "g_dbus_proxy_get_object_path", LIBRARY_GIO); Linker.link(g_dbus_proxy_set_cached_property, "g_dbus_proxy_set_cached_property", LIBRARY_GIO); Linker.link(g_dbus_proxy_set_default_timeout, "g_dbus_proxy_set_default_timeout", LIBRARY_GIO); Linker.link(g_dbus_proxy_set_interface_info, "g_dbus_proxy_set_interface_info", LIBRARY_GIO); // gio.DBusServer Linker.link(g_dbus_server_get_type, "g_dbus_server_get_type", LIBRARY_GIO); Linker.link(g_dbus_server_new_sync, "g_dbus_server_new_sync", LIBRARY_GIO); Linker.link(g_dbus_server_get_client_address, "g_dbus_server_get_client_address", LIBRARY_GIO); Linker.link(g_dbus_server_get_flags, "g_dbus_server_get_flags", LIBRARY_GIO); Linker.link(g_dbus_server_get_guid, "g_dbus_server_get_guid", LIBRARY_GIO); Linker.link(g_dbus_server_is_active, "g_dbus_server_is_active", LIBRARY_GIO); Linker.link(g_dbus_server_start, "g_dbus_server_start", LIBRARY_GIO); Linker.link(g_dbus_server_stop, "g_dbus_server_stop", LIBRARY_GIO); // gio.DBusSignalInfo Linker.link(g_dbus_signal_info_get_type, "g_dbus_signal_info_get_type", LIBRARY_GIO); Linker.link(g_dbus_signal_info_ref, "g_dbus_signal_info_ref", LIBRARY_GIO); Linker.link(g_dbus_signal_info_unref, "g_dbus_signal_info_unref", LIBRARY_GIO); // gio.DataInputStream Linker.link(g_data_input_stream_get_type, "g_data_input_stream_get_type", LIBRARY_GIO); Linker.link(g_data_input_stream_new, "g_data_input_stream_new", LIBRARY_GIO); Linker.link(g_data_input_stream_get_byte_order, "g_data_input_stream_get_byte_order", LIBRARY_GIO); Linker.link(g_data_input_stream_get_newline_type, "g_data_input_stream_get_newline_type", LIBRARY_GIO); Linker.link(g_data_input_stream_read_byte, "g_data_input_stream_read_byte", LIBRARY_GIO); Linker.link(g_data_input_stream_read_int16, "g_data_input_stream_read_int16", LIBRARY_GIO); Linker.link(g_data_input_stream_read_int32, "g_data_input_stream_read_int32", LIBRARY_GIO); Linker.link(g_data_input_stream_read_int64, "g_data_input_stream_read_int64", LIBRARY_GIO); Linker.link(g_data_input_stream_read_line, "g_data_input_stream_read_line", LIBRARY_GIO); Linker.link(g_data_input_stream_read_line_async, "g_data_input_stream_read_line_async", LIBRARY_GIO); Linker.link(g_data_input_stream_read_line_finish, "g_data_input_stream_read_line_finish", LIBRARY_GIO); Linker.link(g_data_input_stream_read_line_finish_utf8, "g_data_input_stream_read_line_finish_utf8", LIBRARY_GIO); Linker.link(g_data_input_stream_read_line_utf8, "g_data_input_stream_read_line_utf8", LIBRARY_GIO); Linker.link(g_data_input_stream_read_uint16, "g_data_input_stream_read_uint16", LIBRARY_GIO); Linker.link(g_data_input_stream_read_uint32, "g_data_input_stream_read_uint32", LIBRARY_GIO); Linker.link(g_data_input_stream_read_uint64, "g_data_input_stream_read_uint64", LIBRARY_GIO); Linker.link(g_data_input_stream_read_until, "g_data_input_stream_read_until", LIBRARY_GIO); Linker.link(g_data_input_stream_read_until_async, "g_data_input_stream_read_until_async", LIBRARY_GIO); Linker.link(g_data_input_stream_read_until_finish, "g_data_input_stream_read_until_finish", LIBRARY_GIO); Linker.link(g_data_input_stream_read_upto, "g_data_input_stream_read_upto", LIBRARY_GIO); Linker.link(g_data_input_stream_read_upto_async, "g_data_input_stream_read_upto_async", LIBRARY_GIO); Linker.link(g_data_input_stream_read_upto_finish, "g_data_input_stream_read_upto_finish", LIBRARY_GIO); Linker.link(g_data_input_stream_set_byte_order, "g_data_input_stream_set_byte_order", LIBRARY_GIO); Linker.link(g_data_input_stream_set_newline_type, "g_data_input_stream_set_newline_type", LIBRARY_GIO); // gio.DataOutputStream Linker.link(g_data_output_stream_get_type, "g_data_output_stream_get_type", LIBRARY_GIO); Linker.link(g_data_output_stream_new, "g_data_output_stream_new", LIBRARY_GIO); Linker.link(g_data_output_stream_get_byte_order, "g_data_output_stream_get_byte_order", LIBRARY_GIO); Linker.link(g_data_output_stream_put_byte, "g_data_output_stream_put_byte", LIBRARY_GIO); Linker.link(g_data_output_stream_put_int16, "g_data_output_stream_put_int16", LIBRARY_GIO); Linker.link(g_data_output_stream_put_int32, "g_data_output_stream_put_int32", LIBRARY_GIO); Linker.link(g_data_output_stream_put_int64, "g_data_output_stream_put_int64", LIBRARY_GIO); Linker.link(g_data_output_stream_put_string, "g_data_output_stream_put_string", LIBRARY_GIO); Linker.link(g_data_output_stream_put_uint16, "g_data_output_stream_put_uint16", LIBRARY_GIO); Linker.link(g_data_output_stream_put_uint32, "g_data_output_stream_put_uint32", LIBRARY_GIO); Linker.link(g_data_output_stream_put_uint64, "g_data_output_stream_put_uint64", LIBRARY_GIO); Linker.link(g_data_output_stream_set_byte_order, "g_data_output_stream_set_byte_order", LIBRARY_GIO); // gio.DatagramBased Linker.link(g_datagram_based_get_type, "g_datagram_based_get_type", LIBRARY_GIO); Linker.link(g_datagram_based_condition_check, "g_datagram_based_condition_check", LIBRARY_GIO); Linker.link(g_datagram_based_condition_wait, "g_datagram_based_condition_wait", LIBRARY_GIO); Linker.link(g_datagram_based_create_source, "g_datagram_based_create_source", LIBRARY_GIO); Linker.link(g_datagram_based_receive_messages, "g_datagram_based_receive_messages", LIBRARY_GIO); Linker.link(g_datagram_based_send_messages, "g_datagram_based_send_messages", LIBRARY_GIO); // gio.DesktopAppInfo Linker.link(g_desktop_app_info_get_type, "g_desktop_app_info_get_type", LIBRARY_GIO); Linker.link(g_desktop_app_info_new, "g_desktop_app_info_new", LIBRARY_GIO); Linker.link(g_desktop_app_info_new_from_filename, "g_desktop_app_info_new_from_filename", LIBRARY_GIO); Linker.link(g_desktop_app_info_new_from_keyfile, "g_desktop_app_info_new_from_keyfile", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_implementations, "g_desktop_app_info_get_implementations", LIBRARY_GIO); Linker.link(g_desktop_app_info_search, "g_desktop_app_info_search", LIBRARY_GIO); Linker.link(g_desktop_app_info_set_desktop_env, "g_desktop_app_info_set_desktop_env", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_action_name, "g_desktop_app_info_get_action_name", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_boolean, "g_desktop_app_info_get_boolean", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_categories, "g_desktop_app_info_get_categories", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_filename, "g_desktop_app_info_get_filename", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_generic_name, "g_desktop_app_info_get_generic_name", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_is_hidden, "g_desktop_app_info_get_is_hidden", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_keywords, "g_desktop_app_info_get_keywords", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_nodisplay, "g_desktop_app_info_get_nodisplay", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_show_in, "g_desktop_app_info_get_show_in", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_startup_wm_class, "g_desktop_app_info_get_startup_wm_class", LIBRARY_GIO); Linker.link(g_desktop_app_info_get_string, "g_desktop_app_info_get_string", LIBRARY_GIO); Linker.link(g_desktop_app_info_has_key, "g_desktop_app_info_has_key", LIBRARY_GIO); Linker.link(g_desktop_app_info_launch_action, "g_desktop_app_info_launch_action", LIBRARY_GIO); Linker.link(g_desktop_app_info_launch_uris_as_manager, "g_desktop_app_info_launch_uris_as_manager", LIBRARY_GIO); Linker.link(g_desktop_app_info_list_actions, "g_desktop_app_info_list_actions", LIBRARY_GIO); // gio.DesktopAppInfoLookup Linker.link(g_desktop_app_info_lookup_get_type, "g_desktop_app_info_lookup_get_type", LIBRARY_GIO); Linker.link(g_desktop_app_info_lookup_get_default_for_uri_scheme, "g_desktop_app_info_lookup_get_default_for_uri_scheme", LIBRARY_GIO); // gio.Drive Linker.link(g_drive_get_type, "g_drive_get_type", LIBRARY_GIO); Linker.link(g_drive_can_eject, "g_drive_can_eject", LIBRARY_GIO); Linker.link(g_drive_can_poll_for_media, "g_drive_can_poll_for_media", LIBRARY_GIO); Linker.link(g_drive_can_start, "g_drive_can_start", LIBRARY_GIO); Linker.link(g_drive_can_start_degraded, "g_drive_can_start_degraded", LIBRARY_GIO); Linker.link(g_drive_can_stop, "g_drive_can_stop", LIBRARY_GIO); Linker.link(g_drive_eject, "g_drive_eject", LIBRARY_GIO); Linker.link(g_drive_eject_finish, "g_drive_eject_finish", LIBRARY_GIO); Linker.link(g_drive_eject_with_operation, "g_drive_eject_with_operation", LIBRARY_GIO); Linker.link(g_drive_eject_with_operation_finish, "g_drive_eject_with_operation_finish", LIBRARY_GIO); Linker.link(g_drive_enumerate_identifiers, "g_drive_enumerate_identifiers", LIBRARY_GIO); Linker.link(g_drive_get_icon, "g_drive_get_icon", LIBRARY_GIO); Linker.link(g_drive_get_identifier, "g_drive_get_identifier", LIBRARY_GIO); Linker.link(g_drive_get_name, "g_drive_get_name", LIBRARY_GIO); Linker.link(g_drive_get_sort_key, "g_drive_get_sort_key", LIBRARY_GIO); Linker.link(g_drive_get_start_stop_type, "g_drive_get_start_stop_type", LIBRARY_GIO); Linker.link(g_drive_get_symbolic_icon, "g_drive_get_symbolic_icon", LIBRARY_GIO); Linker.link(g_drive_get_volumes, "g_drive_get_volumes", LIBRARY_GIO); Linker.link(g_drive_has_media, "g_drive_has_media", LIBRARY_GIO); Linker.link(g_drive_has_volumes, "g_drive_has_volumes", LIBRARY_GIO); Linker.link(g_drive_is_media_check_automatic, "g_drive_is_media_check_automatic", LIBRARY_GIO); Linker.link(g_drive_is_media_removable, "g_drive_is_media_removable", LIBRARY_GIO); Linker.link(g_drive_is_removable, "g_drive_is_removable", LIBRARY_GIO); Linker.link(g_drive_poll_for_media, "g_drive_poll_for_media", LIBRARY_GIO); Linker.link(g_drive_poll_for_media_finish, "g_drive_poll_for_media_finish", LIBRARY_GIO); Linker.link(g_drive_start, "g_drive_start", LIBRARY_GIO); Linker.link(g_drive_start_finish, "g_drive_start_finish", LIBRARY_GIO); Linker.link(g_drive_stop, "g_drive_stop", LIBRARY_GIO); Linker.link(g_drive_stop_finish, "g_drive_stop_finish", LIBRARY_GIO); // gio.DtlsClientConnection Linker.link(g_dtls_client_connection_get_type, "g_dtls_client_connection_get_type", LIBRARY_GIO); Linker.link(g_dtls_client_connection_new, "g_dtls_client_connection_new", LIBRARY_GIO); Linker.link(g_dtls_client_connection_get_accepted_cas, "g_dtls_client_connection_get_accepted_cas", LIBRARY_GIO); Linker.link(g_dtls_client_connection_get_server_identity, "g_dtls_client_connection_get_server_identity", LIBRARY_GIO); Linker.link(g_dtls_client_connection_get_validation_flags, "g_dtls_client_connection_get_validation_flags", LIBRARY_GIO); Linker.link(g_dtls_client_connection_set_server_identity, "g_dtls_client_connection_set_server_identity", LIBRARY_GIO); Linker.link(g_dtls_client_connection_set_validation_flags, "g_dtls_client_connection_set_validation_flags", LIBRARY_GIO); // gio.DtlsConnection Linker.link(g_dtls_connection_get_type, "g_dtls_connection_get_type", LIBRARY_GIO); Linker.link(g_dtls_connection_close, "g_dtls_connection_close", LIBRARY_GIO); Linker.link(g_dtls_connection_close_async, "g_dtls_connection_close_async", LIBRARY_GIO); Linker.link(g_dtls_connection_close_finish, "g_dtls_connection_close_finish", LIBRARY_GIO); Linker.link(g_dtls_connection_emit_accept_certificate, "g_dtls_connection_emit_accept_certificate", LIBRARY_GIO); Linker.link(g_dtls_connection_get_certificate, "g_dtls_connection_get_certificate", LIBRARY_GIO); Linker.link(g_dtls_connection_get_database, "g_dtls_connection_get_database", LIBRARY_GIO); Linker.link(g_dtls_connection_get_interaction, "g_dtls_connection_get_interaction", LIBRARY_GIO); Linker.link(g_dtls_connection_get_peer_certificate, "g_dtls_connection_get_peer_certificate", LIBRARY_GIO); Linker.link(g_dtls_connection_get_peer_certificate_errors, "g_dtls_connection_get_peer_certificate_errors", LIBRARY_GIO); Linker.link(g_dtls_connection_get_rehandshake_mode, "g_dtls_connection_get_rehandshake_mode", LIBRARY_GIO); Linker.link(g_dtls_connection_get_require_close_notify, "g_dtls_connection_get_require_close_notify", LIBRARY_GIO); Linker.link(g_dtls_connection_handshake, "g_dtls_connection_handshake", LIBRARY_GIO); Linker.link(g_dtls_connection_handshake_async, "g_dtls_connection_handshake_async", LIBRARY_GIO); Linker.link(g_dtls_connection_handshake_finish, "g_dtls_connection_handshake_finish", LIBRARY_GIO); Linker.link(g_dtls_connection_set_certificate, "g_dtls_connection_set_certificate", LIBRARY_GIO); Linker.link(g_dtls_connection_set_database, "g_dtls_connection_set_database", LIBRARY_GIO); Linker.link(g_dtls_connection_set_interaction, "g_dtls_connection_set_interaction", LIBRARY_GIO); Linker.link(g_dtls_connection_set_rehandshake_mode, "g_dtls_connection_set_rehandshake_mode", LIBRARY_GIO); Linker.link(g_dtls_connection_set_require_close_notify, "g_dtls_connection_set_require_close_notify", LIBRARY_GIO); Linker.link(g_dtls_connection_shutdown, "g_dtls_connection_shutdown", LIBRARY_GIO); Linker.link(g_dtls_connection_shutdown_async, "g_dtls_connection_shutdown_async", LIBRARY_GIO); Linker.link(g_dtls_connection_shutdown_finish, "g_dtls_connection_shutdown_finish", LIBRARY_GIO); // gio.DtlsServerConnection Linker.link(g_dtls_server_connection_get_type, "g_dtls_server_connection_get_type", LIBRARY_GIO); Linker.link(g_dtls_server_connection_new, "g_dtls_server_connection_new", LIBRARY_GIO); // gio.Emblem Linker.link(g_emblem_get_type, "g_emblem_get_type", LIBRARY_GIO); Linker.link(g_emblem_new, "g_emblem_new", LIBRARY_GIO); Linker.link(g_emblem_new_with_origin, "g_emblem_new_with_origin", LIBRARY_GIO); Linker.link(g_emblem_get_icon, "g_emblem_get_icon", LIBRARY_GIO); Linker.link(g_emblem_get_origin, "g_emblem_get_origin", LIBRARY_GIO); // gio.EmblemedIcon Linker.link(g_emblemed_icon_get_type, "g_emblemed_icon_get_type", LIBRARY_GIO); Linker.link(g_emblemed_icon_new, "g_emblemed_icon_new", LIBRARY_GIO); Linker.link(g_emblemed_icon_add_emblem, "g_emblemed_icon_add_emblem", LIBRARY_GIO); Linker.link(g_emblemed_icon_clear_emblems, "g_emblemed_icon_clear_emblems", LIBRARY_GIO); Linker.link(g_emblemed_icon_get_emblems, "g_emblemed_icon_get_emblems", LIBRARY_GIO); Linker.link(g_emblemed_icon_get_icon, "g_emblemed_icon_get_icon", LIBRARY_GIO); // gio.File Linker.link(g_file_get_type, "g_file_get_type", LIBRARY_GIO); Linker.link(g_file_new_for_commandline_arg, "g_file_new_for_commandline_arg", LIBRARY_GIO); Linker.link(g_file_new_for_commandline_arg_and_cwd, "g_file_new_for_commandline_arg_and_cwd", LIBRARY_GIO); Linker.link(g_file_new_for_path, "g_file_new_for_path", LIBRARY_GIO); Linker.link(g_file_new_for_uri, "g_file_new_for_uri", LIBRARY_GIO); Linker.link(g_file_new_tmp, "g_file_new_tmp", LIBRARY_GIO); Linker.link(g_file_parse_name, "g_file_parse_name", LIBRARY_GIO); Linker.link(g_file_append_to, "g_file_append_to", LIBRARY_GIO); Linker.link(g_file_append_to_async, "g_file_append_to_async", LIBRARY_GIO); Linker.link(g_file_append_to_finish, "g_file_append_to_finish", LIBRARY_GIO); Linker.link(g_file_copy, "g_file_copy", LIBRARY_GIO); Linker.link(g_file_copy_async, "g_file_copy_async", LIBRARY_GIO); Linker.link(g_file_copy_attributes, "g_file_copy_attributes", LIBRARY_GIO); Linker.link(g_file_copy_finish, "g_file_copy_finish", LIBRARY_GIO); Linker.link(g_file_create, "g_file_create", LIBRARY_GIO); Linker.link(g_file_create_async, "g_file_create_async", LIBRARY_GIO); Linker.link(g_file_create_finish, "g_file_create_finish", LIBRARY_GIO); Linker.link(g_file_create_readwrite, "g_file_create_readwrite", LIBRARY_GIO); Linker.link(g_file_create_readwrite_async, "g_file_create_readwrite_async", LIBRARY_GIO); Linker.link(g_file_create_readwrite_finish, "g_file_create_readwrite_finish", LIBRARY_GIO); Linker.link(g_file_delete, "g_file_delete", LIBRARY_GIO); Linker.link(g_file_delete_async, "g_file_delete_async", LIBRARY_GIO); Linker.link(g_file_delete_finish, "g_file_delete_finish", LIBRARY_GIO); Linker.link(g_file_dup, "g_file_dup", LIBRARY_GIO); Linker.link(g_file_eject_mountable, "g_file_eject_mountable", LIBRARY_GIO); Linker.link(g_file_eject_mountable_finish, "g_file_eject_mountable_finish", LIBRARY_GIO); Linker.link(g_file_eject_mountable_with_operation, "g_file_eject_mountable_with_operation", LIBRARY_GIO); Linker.link(g_file_eject_mountable_with_operation_finish, "g_file_eject_mountable_with_operation_finish", LIBRARY_GIO); Linker.link(g_file_enumerate_children, "g_file_enumerate_children", LIBRARY_GIO); Linker.link(g_file_enumerate_children_async, "g_file_enumerate_children_async", LIBRARY_GIO); Linker.link(g_file_enumerate_children_finish, "g_file_enumerate_children_finish", LIBRARY_GIO); Linker.link(g_file_equal, "g_file_equal", LIBRARY_GIO); Linker.link(g_file_find_enclosing_mount, "g_file_find_enclosing_mount", LIBRARY_GIO); Linker.link(g_file_find_enclosing_mount_async, "g_file_find_enclosing_mount_async", LIBRARY_GIO); Linker.link(g_file_find_enclosing_mount_finish, "g_file_find_enclosing_mount_finish", LIBRARY_GIO); Linker.link(g_file_get_basename, "g_file_get_basename", LIBRARY_GIO); Linker.link(g_file_get_child, "g_file_get_child", LIBRARY_GIO); Linker.link(g_file_get_child_for_display_name, "g_file_get_child_for_display_name", LIBRARY_GIO); Linker.link(g_file_get_parent, "g_file_get_parent", LIBRARY_GIO); Linker.link(g_file_get_parse_name, "g_file_get_parse_name", LIBRARY_GIO); Linker.link(g_file_get_path, "g_file_get_path", LIBRARY_GIO); Linker.link(g_file_get_relative_path, "g_file_get_relative_path", LIBRARY_GIO); Linker.link(g_file_get_uri, "g_file_get_uri", LIBRARY_GIO); Linker.link(g_file_get_uri_scheme, "g_file_get_uri_scheme", LIBRARY_GIO); Linker.link(g_file_has_parent, "g_file_has_parent", LIBRARY_GIO); Linker.link(g_file_has_prefix, "g_file_has_prefix", LIBRARY_GIO); Linker.link(g_file_has_uri_scheme, "g_file_has_uri_scheme", LIBRARY_GIO); Linker.link(g_file_hash, "g_file_hash", LIBRARY_GIO); Linker.link(g_file_is_native, "g_file_is_native", LIBRARY_GIO); Linker.link(g_file_load_contents, "g_file_load_contents", LIBRARY_GIO); Linker.link(g_file_load_contents_async, "g_file_load_contents_async", LIBRARY_GIO); Linker.link(g_file_load_contents_finish, "g_file_load_contents_finish", LIBRARY_GIO); Linker.link(g_file_load_partial_contents_async, "g_file_load_partial_contents_async", LIBRARY_GIO); Linker.link(g_file_load_partial_contents_finish, "g_file_load_partial_contents_finish", LIBRARY_GIO); Linker.link(g_file_make_directory, "g_file_make_directory", LIBRARY_GIO); Linker.link(g_file_make_directory_async, "g_file_make_directory_async", LIBRARY_GIO); Linker.link(g_file_make_directory_finish, "g_file_make_directory_finish", LIBRARY_GIO); Linker.link(g_file_make_directory_with_parents, "g_file_make_directory_with_parents", LIBRARY_GIO); Linker.link(g_file_make_symbolic_link, "g_file_make_symbolic_link", LIBRARY_GIO); Linker.link(g_file_measure_disk_usage, "g_file_measure_disk_usage", LIBRARY_GIO); Linker.link(g_file_measure_disk_usage_async, "g_file_measure_disk_usage_async", LIBRARY_GIO); Linker.link(g_file_measure_disk_usage_finish, "g_file_measure_disk_usage_finish", LIBRARY_GIO); Linker.link(g_file_monitor, "g_file_monitor", LIBRARY_GIO); Linker.link(g_file_monitor_directory, "g_file_monitor_directory", LIBRARY_GIO); Linker.link(g_file_monitor_file, "g_file_monitor_file", LIBRARY_GIO); Linker.link(g_file_mount_enclosing_volume, "g_file_mount_enclosing_volume", LIBRARY_GIO); Linker.link(g_file_mount_enclosing_volume_finish, "g_file_mount_enclosing_volume_finish", LIBRARY_GIO); Linker.link(g_file_mount_mountable, "g_file_mount_mountable", LIBRARY_GIO); Linker.link(g_file_mount_mountable_finish, "g_file_mount_mountable_finish", LIBRARY_GIO); Linker.link(g_file_move, "g_file_move", LIBRARY_GIO); Linker.link(g_file_open_readwrite, "g_file_open_readwrite", LIBRARY_GIO); Linker.link(g_file_open_readwrite_async, "g_file_open_readwrite_async", LIBRARY_GIO); Linker.link(g_file_open_readwrite_finish, "g_file_open_readwrite_finish", LIBRARY_GIO); Linker.link(g_file_poll_mountable, "g_file_poll_mountable", LIBRARY_GIO); Linker.link(g_file_poll_mountable_finish, "g_file_poll_mountable_finish", LIBRARY_GIO); Linker.link(g_file_query_default_handler, "g_file_query_default_handler", LIBRARY_GIO); Linker.link(g_file_query_exists, "g_file_query_exists", LIBRARY_GIO); Linker.link(g_file_query_file_type, "g_file_query_file_type", LIBRARY_GIO); Linker.link(g_file_query_filesystem_info, "g_file_query_filesystem_info", LIBRARY_GIO); Linker.link(g_file_query_filesystem_info_async, "g_file_query_filesystem_info_async", LIBRARY_GIO); Linker.link(g_file_query_filesystem_info_finish, "g_file_query_filesystem_info_finish", LIBRARY_GIO); Linker.link(g_file_query_info, "g_file_query_info", LIBRARY_GIO); Linker.link(g_file_query_info_async, "g_file_query_info_async", LIBRARY_GIO); Linker.link(g_file_query_info_finish, "g_file_query_info_finish", LIBRARY_GIO); Linker.link(g_file_query_settable_attributes, "g_file_query_settable_attributes", LIBRARY_GIO); Linker.link(g_file_query_writable_namespaces, "g_file_query_writable_namespaces", LIBRARY_GIO); Linker.link(g_file_read, "g_file_read", LIBRARY_GIO); Linker.link(g_file_read_async, "g_file_read_async", LIBRARY_GIO); Linker.link(g_file_read_finish, "g_file_read_finish", LIBRARY_GIO); Linker.link(g_file_replace, "g_file_replace", LIBRARY_GIO); Linker.link(g_file_replace_async, "g_file_replace_async", LIBRARY_GIO); Linker.link(g_file_replace_contents, "g_file_replace_contents", LIBRARY_GIO); Linker.link(g_file_replace_contents_async, "g_file_replace_contents_async", LIBRARY_GIO); Linker.link(g_file_replace_contents_bytes_async, "g_file_replace_contents_bytes_async", LIBRARY_GIO); Linker.link(g_file_replace_contents_finish, "g_file_replace_contents_finish", LIBRARY_GIO); Linker.link(g_file_replace_finish, "g_file_replace_finish", LIBRARY_GIO); Linker.link(g_file_replace_readwrite, "g_file_replace_readwrite", LIBRARY_GIO); Linker.link(g_file_replace_readwrite_async, "g_file_replace_readwrite_async", LIBRARY_GIO); Linker.link(g_file_replace_readwrite_finish, "g_file_replace_readwrite_finish", LIBRARY_GIO); Linker.link(g_file_resolve_relative_path, "g_file_resolve_relative_path", LIBRARY_GIO); Linker.link(g_file_set_attribute, "g_file_set_attribute", LIBRARY_GIO); Linker.link(g_file_set_attribute_byte_string, "g_file_set_attribute_byte_string", LIBRARY_GIO); Linker.link(g_file_set_attribute_int32, "g_file_set_attribute_int32", LIBRARY_GIO); Linker.link(g_file_set_attribute_int64, "g_file_set_attribute_int64", LIBRARY_GIO); Linker.link(g_file_set_attribute_string, "g_file_set_attribute_string", LIBRARY_GIO); Linker.link(g_file_set_attribute_uint32, "g_file_set_attribute_uint32", LIBRARY_GIO); Linker.link(g_file_set_attribute_uint64, "g_file_set_attribute_uint64", LIBRARY_GIO); Linker.link(g_file_set_attributes_async, "g_file_set_attributes_async", LIBRARY_GIO); Linker.link(g_file_set_attributes_finish, "g_file_set_attributes_finish", LIBRARY_GIO); Linker.link(g_file_set_attributes_from_info, "g_file_set_attributes_from_info", LIBRARY_GIO); Linker.link(g_file_set_display_name, "g_file_set_display_name", LIBRARY_GIO); Linker.link(g_file_set_display_name_async, "g_file_set_display_name_async", LIBRARY_GIO); Linker.link(g_file_set_display_name_finish, "g_file_set_display_name_finish", LIBRARY_GIO); Linker.link(g_file_start_mountable, "g_file_start_mountable", LIBRARY_GIO); Linker.link(g_file_start_mountable_finish, "g_file_start_mountable_finish", LIBRARY_GIO); Linker.link(g_file_stop_mountable, "g_file_stop_mountable", LIBRARY_GIO); Linker.link(g_file_stop_mountable_finish, "g_file_stop_mountable_finish", LIBRARY_GIO); Linker.link(g_file_supports_thread_contexts, "g_file_supports_thread_contexts", LIBRARY_GIO); Linker.link(g_file_trash, "g_file_trash", LIBRARY_GIO); Linker.link(g_file_trash_async, "g_file_trash_async", LIBRARY_GIO); Linker.link(g_file_trash_finish, "g_file_trash_finish", LIBRARY_GIO); Linker.link(g_file_unmount_mountable, "g_file_unmount_mountable", LIBRARY_GIO); Linker.link(g_file_unmount_mountable_finish, "g_file_unmount_mountable_finish", LIBRARY_GIO); Linker.link(g_file_unmount_mountable_with_operation, "g_file_unmount_mountable_with_operation", LIBRARY_GIO); Linker.link(g_file_unmount_mountable_with_operation_finish, "g_file_unmount_mountable_with_operation_finish", LIBRARY_GIO); // gio.FileAttributeInfoList Linker.link(g_file_attribute_info_list_get_type, "g_file_attribute_info_list_get_type", LIBRARY_GIO); Linker.link(g_file_attribute_info_list_new, "g_file_attribute_info_list_new", LIBRARY_GIO); Linker.link(g_file_attribute_info_list_add, "g_file_attribute_info_list_add", LIBRARY_GIO); Linker.link(g_file_attribute_info_list_dup, "g_file_attribute_info_list_dup", LIBRARY_GIO); Linker.link(g_file_attribute_info_list_lookup, "g_file_attribute_info_list_lookup", LIBRARY_GIO); Linker.link(g_file_attribute_info_list_ref, "g_file_attribute_info_list_ref", LIBRARY_GIO); Linker.link(g_file_attribute_info_list_unref, "g_file_attribute_info_list_unref", LIBRARY_GIO); // gio.FileAttributeMatcher Linker.link(g_file_attribute_matcher_get_type, "g_file_attribute_matcher_get_type", LIBRARY_GIO); Linker.link(g_file_attribute_matcher_new, "g_file_attribute_matcher_new", LIBRARY_GIO); Linker.link(g_file_attribute_matcher_enumerate_namespace, "g_file_attribute_matcher_enumerate_namespace", LIBRARY_GIO); Linker.link(g_file_attribute_matcher_enumerate_next, "g_file_attribute_matcher_enumerate_next", LIBRARY_GIO); Linker.link(g_file_attribute_matcher_matches, "g_file_attribute_matcher_matches", LIBRARY_GIO); Linker.link(g_file_attribute_matcher_matches_only, "g_file_attribute_matcher_matches_only", LIBRARY_GIO); Linker.link(g_file_attribute_matcher_ref, "g_file_attribute_matcher_ref", LIBRARY_GIO); Linker.link(g_file_attribute_matcher_subtract, "g_file_attribute_matcher_subtract", LIBRARY_GIO); Linker.link(g_file_attribute_matcher_to_string, "g_file_attribute_matcher_to_string", LIBRARY_GIO); Linker.link(g_file_attribute_matcher_unref, "g_file_attribute_matcher_unref", LIBRARY_GIO); // gio.FileDescriptorBased Linker.link(g_file_descriptor_based_get_type, "g_file_descriptor_based_get_type", LIBRARY_GIO); Linker.link(g_file_descriptor_based_get_fd, "g_file_descriptor_based_get_fd", LIBRARY_GIO); // gio.FileEnumerator Linker.link(g_file_enumerator_get_type, "g_file_enumerator_get_type", LIBRARY_GIO); Linker.link(g_file_enumerator_close, "g_file_enumerator_close", LIBRARY_GIO); Linker.link(g_file_enumerator_close_async, "g_file_enumerator_close_async", LIBRARY_GIO); Linker.link(g_file_enumerator_close_finish, "g_file_enumerator_close_finish", LIBRARY_GIO); Linker.link(g_file_enumerator_get_child, "g_file_enumerator_get_child", LIBRARY_GIO); Linker.link(g_file_enumerator_get_container, "g_file_enumerator_get_container", LIBRARY_GIO); Linker.link(g_file_enumerator_has_pending, "g_file_enumerator_has_pending", LIBRARY_GIO); Linker.link(g_file_enumerator_is_closed, "g_file_enumerator_is_closed", LIBRARY_GIO); Linker.link(g_file_enumerator_iterate, "g_file_enumerator_iterate", LIBRARY_GIO); Linker.link(g_file_enumerator_next_file, "g_file_enumerator_next_file", LIBRARY_GIO); Linker.link(g_file_enumerator_next_files_async, "g_file_enumerator_next_files_async", LIBRARY_GIO); Linker.link(g_file_enumerator_next_files_finish, "g_file_enumerator_next_files_finish", LIBRARY_GIO); Linker.link(g_file_enumerator_set_pending, "g_file_enumerator_set_pending", LIBRARY_GIO); // gio.FileIOStream Linker.link(g_file_io_stream_get_type, "g_file_io_stream_get_type", LIBRARY_GIO); Linker.link(g_file_io_stream_get_etag, "g_file_io_stream_get_etag", LIBRARY_GIO); Linker.link(g_file_io_stream_query_info, "g_file_io_stream_query_info", LIBRARY_GIO); Linker.link(g_file_io_stream_query_info_async, "g_file_io_stream_query_info_async", LIBRARY_GIO); Linker.link(g_file_io_stream_query_info_finish, "g_file_io_stream_query_info_finish", LIBRARY_GIO); // gio.FileIcon Linker.link(g_file_icon_get_type, "g_file_icon_get_type", LIBRARY_GIO); Linker.link(g_file_icon_new, "g_file_icon_new", LIBRARY_GIO); Linker.link(g_file_icon_get_file, "g_file_icon_get_file", LIBRARY_GIO); // gio.FileInfo Linker.link(g_file_info_get_type, "g_file_info_get_type", LIBRARY_GIO); Linker.link(g_file_info_new, "g_file_info_new", LIBRARY_GIO); Linker.link(g_file_info_clear_status, "g_file_info_clear_status", LIBRARY_GIO); Linker.link(g_file_info_copy_into, "g_file_info_copy_into", LIBRARY_GIO); Linker.link(g_file_info_dup, "g_file_info_dup", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_as_string, "g_file_info_get_attribute_as_string", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_boolean, "g_file_info_get_attribute_boolean", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_byte_string, "g_file_info_get_attribute_byte_string", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_data, "g_file_info_get_attribute_data", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_int32, "g_file_info_get_attribute_int32", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_int64, "g_file_info_get_attribute_int64", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_object, "g_file_info_get_attribute_object", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_status, "g_file_info_get_attribute_status", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_string, "g_file_info_get_attribute_string", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_stringv, "g_file_info_get_attribute_stringv", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_type, "g_file_info_get_attribute_type", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_uint32, "g_file_info_get_attribute_uint32", LIBRARY_GIO); Linker.link(g_file_info_get_attribute_uint64, "g_file_info_get_attribute_uint64", LIBRARY_GIO); Linker.link(g_file_info_get_content_type, "g_file_info_get_content_type", LIBRARY_GIO); Linker.link(g_file_info_get_deletion_date, "g_file_info_get_deletion_date", LIBRARY_GIO); Linker.link(g_file_info_get_display_name, "g_file_info_get_display_name", LIBRARY_GIO); Linker.link(g_file_info_get_edit_name, "g_file_info_get_edit_name", LIBRARY_GIO); Linker.link(g_file_info_get_etag, "g_file_info_get_etag", LIBRARY_GIO); Linker.link(g_file_info_get_file_type, "g_file_info_get_file_type", LIBRARY_GIO); Linker.link(g_file_info_get_icon, "g_file_info_get_icon", LIBRARY_GIO); Linker.link(g_file_info_get_is_backup, "g_file_info_get_is_backup", LIBRARY_GIO); Linker.link(g_file_info_get_is_hidden, "g_file_info_get_is_hidden", LIBRARY_GIO); Linker.link(g_file_info_get_is_symlink, "g_file_info_get_is_symlink", LIBRARY_GIO); Linker.link(g_file_info_get_modification_time, "g_file_info_get_modification_time", LIBRARY_GIO); Linker.link(g_file_info_get_name, "g_file_info_get_name", LIBRARY_GIO); Linker.link(g_file_info_get_size, "g_file_info_get_size", LIBRARY_GIO); Linker.link(g_file_info_get_sort_order, "g_file_info_get_sort_order", LIBRARY_GIO); Linker.link(g_file_info_get_symbolic_icon, "g_file_info_get_symbolic_icon", LIBRARY_GIO); Linker.link(g_file_info_get_symlink_target, "g_file_info_get_symlink_target", LIBRARY_GIO); Linker.link(g_file_info_has_attribute, "g_file_info_has_attribute", LIBRARY_GIO); Linker.link(g_file_info_has_namespace, "g_file_info_has_namespace", LIBRARY_GIO); Linker.link(g_file_info_list_attributes, "g_file_info_list_attributes", LIBRARY_GIO); Linker.link(g_file_info_remove_attribute, "g_file_info_remove_attribute", LIBRARY_GIO); Linker.link(g_file_info_set_attribute, "g_file_info_set_attribute", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_boolean, "g_file_info_set_attribute_boolean", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_byte_string, "g_file_info_set_attribute_byte_string", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_int32, "g_file_info_set_attribute_int32", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_int64, "g_file_info_set_attribute_int64", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_mask, "g_file_info_set_attribute_mask", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_object, "g_file_info_set_attribute_object", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_status, "g_file_info_set_attribute_status", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_string, "g_file_info_set_attribute_string", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_stringv, "g_file_info_set_attribute_stringv", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_uint32, "g_file_info_set_attribute_uint32", LIBRARY_GIO); Linker.link(g_file_info_set_attribute_uint64, "g_file_info_set_attribute_uint64", LIBRARY_GIO); Linker.link(g_file_info_set_content_type, "g_file_info_set_content_type", LIBRARY_GIO); Linker.link(g_file_info_set_display_name, "g_file_info_set_display_name", LIBRARY_GIO); Linker.link(g_file_info_set_edit_name, "g_file_info_set_edit_name", LIBRARY_GIO); Linker.link(g_file_info_set_file_type, "g_file_info_set_file_type", LIBRARY_GIO); Linker.link(g_file_info_set_icon, "g_file_info_set_icon", LIBRARY_GIO); Linker.link(g_file_info_set_is_hidden, "g_file_info_set_is_hidden", LIBRARY_GIO); Linker.link(g_file_info_set_is_symlink, "g_file_info_set_is_symlink", LIBRARY_GIO); Linker.link(g_file_info_set_modification_time, "g_file_info_set_modification_time", LIBRARY_GIO); Linker.link(g_file_info_set_name, "g_file_info_set_name", LIBRARY_GIO); Linker.link(g_file_info_set_size, "g_file_info_set_size", LIBRARY_GIO); Linker.link(g_file_info_set_sort_order, "g_file_info_set_sort_order", LIBRARY_GIO); Linker.link(g_file_info_set_symbolic_icon, "g_file_info_set_symbolic_icon", LIBRARY_GIO); Linker.link(g_file_info_set_symlink_target, "g_file_info_set_symlink_target", LIBRARY_GIO); Linker.link(g_file_info_unset_attribute_mask, "g_file_info_unset_attribute_mask", LIBRARY_GIO); // gio.FileInputStream Linker.link(g_file_input_stream_get_type, "g_file_input_stream_get_type", LIBRARY_GIO); Linker.link(g_file_input_stream_query_info, "g_file_input_stream_query_info", LIBRARY_GIO); Linker.link(g_file_input_stream_query_info_async, "g_file_input_stream_query_info_async", LIBRARY_GIO); Linker.link(g_file_input_stream_query_info_finish, "g_file_input_stream_query_info_finish", LIBRARY_GIO); // gio.FileMonitor Linker.link(g_file_monitor_get_type, "g_file_monitor_get_type", LIBRARY_GIO); Linker.link(g_file_monitor_cancel, "g_file_monitor_cancel", LIBRARY_GIO); Linker.link(g_file_monitor_emit_event, "g_file_monitor_emit_event", LIBRARY_GIO); Linker.link(g_file_monitor_is_cancelled, "g_file_monitor_is_cancelled", LIBRARY_GIO); Linker.link(g_file_monitor_set_rate_limit, "g_file_monitor_set_rate_limit", LIBRARY_GIO); // gio.FileOutputStream Linker.link(g_file_output_stream_get_type, "g_file_output_stream_get_type", LIBRARY_GIO); Linker.link(g_file_output_stream_get_etag, "g_file_output_stream_get_etag", LIBRARY_GIO); Linker.link(g_file_output_stream_query_info, "g_file_output_stream_query_info", LIBRARY_GIO); Linker.link(g_file_output_stream_query_info_async, "g_file_output_stream_query_info_async", LIBRARY_GIO); Linker.link(g_file_output_stream_query_info_finish, "g_file_output_stream_query_info_finish", LIBRARY_GIO); // gio.FilenameCompleter Linker.link(g_filename_completer_get_type, "g_filename_completer_get_type", LIBRARY_GIO); Linker.link(g_filename_completer_new, "g_filename_completer_new", LIBRARY_GIO); Linker.link(g_filename_completer_get_completion_suffix, "g_filename_completer_get_completion_suffix", LIBRARY_GIO); Linker.link(g_filename_completer_get_completions, "g_filename_completer_get_completions", LIBRARY_GIO); Linker.link(g_filename_completer_set_dirs_only, "g_filename_completer_set_dirs_only", LIBRARY_GIO); // gio.FilterInputStream Linker.link(g_filter_input_stream_get_type, "g_filter_input_stream_get_type", LIBRARY_GIO); Linker.link(g_filter_input_stream_get_base_stream, "g_filter_input_stream_get_base_stream", LIBRARY_GIO); Linker.link(g_filter_input_stream_get_close_base_stream, "g_filter_input_stream_get_close_base_stream", LIBRARY_GIO); Linker.link(g_filter_input_stream_set_close_base_stream, "g_filter_input_stream_set_close_base_stream", LIBRARY_GIO); // gio.FilterOutputStream Linker.link(g_filter_output_stream_get_type, "g_filter_output_stream_get_type", LIBRARY_GIO); Linker.link(g_filter_output_stream_get_base_stream, "g_filter_output_stream_get_base_stream", LIBRARY_GIO); Linker.link(g_filter_output_stream_get_close_base_stream, "g_filter_output_stream_get_close_base_stream", LIBRARY_GIO); Linker.link(g_filter_output_stream_set_close_base_stream, "g_filter_output_stream_set_close_base_stream", LIBRARY_GIO); // gio.IOExtension Linker.link(g_io_extension_get_name, "g_io_extension_get_name", LIBRARY_GIO); Linker.link(g_io_extension_get_priority, "g_io_extension_get_priority", LIBRARY_GIO); Linker.link(g_io_extension_get_type, "g_io_extension_get_type", LIBRARY_GIO); Linker.link(g_io_extension_ref_class, "g_io_extension_ref_class", LIBRARY_GIO); // gio.IOExtensionPoint Linker.link(g_io_extension_point_get_extension_by_name, "g_io_extension_point_get_extension_by_name", LIBRARY_GIO); Linker.link(g_io_extension_point_get_extensions, "g_io_extension_point_get_extensions", LIBRARY_GIO); Linker.link(g_io_extension_point_get_required_type, "g_io_extension_point_get_required_type", LIBRARY_GIO); Linker.link(g_io_extension_point_set_required_type, "g_io_extension_point_set_required_type", LIBRARY_GIO); Linker.link(g_io_extension_point_implement, "g_io_extension_point_implement", LIBRARY_GIO); Linker.link(g_io_extension_point_lookup, "g_io_extension_point_lookup", LIBRARY_GIO); Linker.link(g_io_extension_point_register, "g_io_extension_point_register", LIBRARY_GIO); // gio.IOModule Linker.link(g_io_module_get_type, "g_io_module_get_type", LIBRARY_GIO); Linker.link(g_io_module_new, "g_io_module_new", LIBRARY_GIO); Linker.link(g_io_modules_load_all_in_directory, "g_io_modules_load_all_in_directory", LIBRARY_GIO); Linker.link(g_io_modules_load_all_in_directory_with_scope, "g_io_modules_load_all_in_directory_with_scope", LIBRARY_GIO); Linker.link(g_io_modules_scan_all_in_directory, "g_io_modules_scan_all_in_directory", LIBRARY_GIO); Linker.link(g_io_modules_scan_all_in_directory_with_scope, "g_io_modules_scan_all_in_directory_with_scope", LIBRARY_GIO); // gio.IOModuleScope Linker.link(g_io_module_scope_block, "g_io_module_scope_block", LIBRARY_GIO); Linker.link(g_io_module_scope_free, "g_io_module_scope_free", LIBRARY_GIO); Linker.link(g_io_module_scope_new, "g_io_module_scope_new", LIBRARY_GIO); // gio.IOSchedulerJob Linker.link(g_io_scheduler_job_send_to_mainloop, "g_io_scheduler_job_send_to_mainloop", LIBRARY_GIO); Linker.link(g_io_scheduler_job_send_to_mainloop_async, "g_io_scheduler_job_send_to_mainloop_async", LIBRARY_GIO); Linker.link(g_io_scheduler_cancel_all_jobs, "g_io_scheduler_cancel_all_jobs", LIBRARY_GIO); Linker.link(g_io_scheduler_push_job, "g_io_scheduler_push_job", LIBRARY_GIO); // gio.IOStream Linker.link(g_io_stream_get_type, "g_io_stream_get_type", LIBRARY_GIO); Linker.link(g_io_stream_splice_finish, "g_io_stream_splice_finish", LIBRARY_GIO); Linker.link(g_io_stream_clear_pending, "g_io_stream_clear_pending", LIBRARY_GIO); Linker.link(g_io_stream_close, "g_io_stream_close", LIBRARY_GIO); Linker.link(g_io_stream_close_async, "g_io_stream_close_async", LIBRARY_GIO); Linker.link(g_io_stream_close_finish, "g_io_stream_close_finish", LIBRARY_GIO); Linker.link(g_io_stream_get_input_stream, "g_io_stream_get_input_stream", LIBRARY_GIO); Linker.link(g_io_stream_get_output_stream, "g_io_stream_get_output_stream", LIBRARY_GIO); Linker.link(g_io_stream_has_pending, "g_io_stream_has_pending", LIBRARY_GIO); Linker.link(g_io_stream_is_closed, "g_io_stream_is_closed", LIBRARY_GIO); Linker.link(g_io_stream_set_pending, "g_io_stream_set_pending", LIBRARY_GIO); Linker.link(g_io_stream_splice_async, "g_io_stream_splice_async", LIBRARY_GIO); // gio.Icon Linker.link(g_icon_get_type, "g_icon_get_type", LIBRARY_GIO); Linker.link(g_icon_deserialize, "g_icon_deserialize", LIBRARY_GIO); Linker.link(g_icon_hash, "g_icon_hash", LIBRARY_GIO); Linker.link(g_icon_new_for_string, "g_icon_new_for_string", LIBRARY_GIO); Linker.link(g_icon_equal, "g_icon_equal", LIBRARY_GIO); Linker.link(g_icon_serialize, "g_icon_serialize", LIBRARY_GIO); Linker.link(g_icon_to_string, "g_icon_to_string", LIBRARY_GIO); // gio.InetAddress Linker.link(g_inet_address_get_type, "g_inet_address_get_type", LIBRARY_GIO); Linker.link(g_inet_address_new_any, "g_inet_address_new_any", LIBRARY_GIO); Linker.link(g_inet_address_new_from_bytes, "g_inet_address_new_from_bytes", LIBRARY_GIO); Linker.link(g_inet_address_new_from_string, "g_inet_address_new_from_string", LIBRARY_GIO); Linker.link(g_inet_address_new_loopback, "g_inet_address_new_loopback", LIBRARY_GIO); Linker.link(g_inet_address_equal, "g_inet_address_equal", LIBRARY_GIO); Linker.link(g_inet_address_get_family, "g_inet_address_get_family", LIBRARY_GIO); Linker.link(g_inet_address_get_is_any, "g_inet_address_get_is_any", LIBRARY_GIO); Linker.link(g_inet_address_get_is_link_local, "g_inet_address_get_is_link_local", LIBRARY_GIO); Linker.link(g_inet_address_get_is_loopback, "g_inet_address_get_is_loopback", LIBRARY_GIO); Linker.link(g_inet_address_get_is_mc_global, "g_inet_address_get_is_mc_global", LIBRARY_GIO); Linker.link(g_inet_address_get_is_mc_link_local, "g_inet_address_get_is_mc_link_local", LIBRARY_GIO); Linker.link(g_inet_address_get_is_mc_node_local, "g_inet_address_get_is_mc_node_local", LIBRARY_GIO); Linker.link(g_inet_address_get_is_mc_org_local, "g_inet_address_get_is_mc_org_local", LIBRARY_GIO); Linker.link(g_inet_address_get_is_mc_site_local, "g_inet_address_get_is_mc_site_local", LIBRARY_GIO); Linker.link(g_inet_address_get_is_multicast, "g_inet_address_get_is_multicast", LIBRARY_GIO); Linker.link(g_inet_address_get_is_site_local, "g_inet_address_get_is_site_local", LIBRARY_GIO); Linker.link(g_inet_address_get_native_size, "g_inet_address_get_native_size", LIBRARY_GIO); Linker.link(g_inet_address_to_bytes, "g_inet_address_to_bytes", LIBRARY_GIO); Linker.link(g_inet_address_to_string, "g_inet_address_to_string", LIBRARY_GIO); // gio.InetAddressMask Linker.link(g_inet_address_mask_get_type, "g_inet_address_mask_get_type", LIBRARY_GIO); Linker.link(g_inet_address_mask_new, "g_inet_address_mask_new", LIBRARY_GIO); Linker.link(g_inet_address_mask_new_from_string, "g_inet_address_mask_new_from_string", LIBRARY_GIO); Linker.link(g_inet_address_mask_equal, "g_inet_address_mask_equal", LIBRARY_GIO); Linker.link(g_inet_address_mask_get_address, "g_inet_address_mask_get_address", LIBRARY_GIO); Linker.link(g_inet_address_mask_get_family, "g_inet_address_mask_get_family", LIBRARY_GIO); Linker.link(g_inet_address_mask_get_length, "g_inet_address_mask_get_length", LIBRARY_GIO); Linker.link(g_inet_address_mask_matches, "g_inet_address_mask_matches", LIBRARY_GIO); Linker.link(g_inet_address_mask_to_string, "g_inet_address_mask_to_string", LIBRARY_GIO); // gio.InetSocketAddress Linker.link(g_inet_socket_address_get_type, "g_inet_socket_address_get_type", LIBRARY_GIO); Linker.link(g_inet_socket_address_new, "g_inet_socket_address_new", LIBRARY_GIO); Linker.link(g_inet_socket_address_new_from_string, "g_inet_socket_address_new_from_string", LIBRARY_GIO); Linker.link(g_inet_socket_address_get_address, "g_inet_socket_address_get_address", LIBRARY_GIO); Linker.link(g_inet_socket_address_get_flowinfo, "g_inet_socket_address_get_flowinfo", LIBRARY_GIO); Linker.link(g_inet_socket_address_get_port, "g_inet_socket_address_get_port", LIBRARY_GIO); Linker.link(g_inet_socket_address_get_scope_id, "g_inet_socket_address_get_scope_id", LIBRARY_GIO); // gio.Initable Linker.link(g_initable_get_type, "g_initable_get_type", LIBRARY_GIO); Linker.link(g_initable_new, "g_initable_new", LIBRARY_GIO); Linker.link(g_initable_new_valist, "g_initable_new_valist", LIBRARY_GIO); Linker.link(g_initable_newv, "g_initable_newv", LIBRARY_GIO); Linker.link(g_initable_init, "g_initable_init", LIBRARY_GIO); // gio.InputStream Linker.link(g_input_stream_get_type, "g_input_stream_get_type", LIBRARY_GIO); Linker.link(g_input_stream_clear_pending, "g_input_stream_clear_pending", LIBRARY_GIO); Linker.link(g_input_stream_close, "g_input_stream_close", LIBRARY_GIO); Linker.link(g_input_stream_close_async, "g_input_stream_close_async", LIBRARY_GIO); Linker.link(g_input_stream_close_finish, "g_input_stream_close_finish", LIBRARY_GIO); Linker.link(g_input_stream_has_pending, "g_input_stream_has_pending", LIBRARY_GIO); Linker.link(g_input_stream_is_closed, "g_input_stream_is_closed", LIBRARY_GIO); Linker.link(g_input_stream_read, "g_input_stream_read", LIBRARY_GIO); Linker.link(g_input_stream_read_all, "g_input_stream_read_all", LIBRARY_GIO); Linker.link(g_input_stream_read_all_async, "g_input_stream_read_all_async", LIBRARY_GIO); Linker.link(g_input_stream_read_all_finish, "g_input_stream_read_all_finish", LIBRARY_GIO); Linker.link(g_input_stream_read_async, "g_input_stream_read_async", LIBRARY_GIO); Linker.link(g_input_stream_read_bytes, "g_input_stream_read_bytes", LIBRARY_GIO); Linker.link(g_input_stream_read_bytes_async, "g_input_stream_read_bytes_async", LIBRARY_GIO); Linker.link(g_input_stream_read_bytes_finish, "g_input_stream_read_bytes_finish", LIBRARY_GIO); Linker.link(g_input_stream_read_finish, "g_input_stream_read_finish", LIBRARY_GIO); Linker.link(g_input_stream_set_pending, "g_input_stream_set_pending", LIBRARY_GIO); Linker.link(g_input_stream_skip, "g_input_stream_skip", LIBRARY_GIO); Linker.link(g_input_stream_skip_async, "g_input_stream_skip_async", LIBRARY_GIO); Linker.link(g_input_stream_skip_finish, "g_input_stream_skip_finish", LIBRARY_GIO); // gio.ListModel Linker.link(g_list_model_get_type, "g_list_model_get_type", LIBRARY_GIO); Linker.link(g_list_model_get_item, "g_list_model_get_item", LIBRARY_GIO); Linker.link(g_list_model_get_item_type, "g_list_model_get_item_type", LIBRARY_GIO); Linker.link(g_list_model_get_n_items, "g_list_model_get_n_items", LIBRARY_GIO); Linker.link(g_list_model_get_object, "g_list_model_get_object", LIBRARY_GIO); Linker.link(g_list_model_items_changed, "g_list_model_items_changed", LIBRARY_GIO); // gio.ListStore Linker.link(g_list_store_get_type, "g_list_store_get_type", LIBRARY_GIO); Linker.link(g_list_store_new, "g_list_store_new", LIBRARY_GIO); Linker.link(g_list_store_append, "g_list_store_append", LIBRARY_GIO); Linker.link(g_list_store_insert, "g_list_store_insert", LIBRARY_GIO); Linker.link(g_list_store_insert_sorted, "g_list_store_insert_sorted", LIBRARY_GIO); Linker.link(g_list_store_remove, "g_list_store_remove", LIBRARY_GIO); Linker.link(g_list_store_remove_all, "g_list_store_remove_all", LIBRARY_GIO); Linker.link(g_list_store_sort, "g_list_store_sort", LIBRARY_GIO); Linker.link(g_list_store_splice, "g_list_store_splice", LIBRARY_GIO); // gio.LoadableIcon Linker.link(g_loadable_icon_get_type, "g_loadable_icon_get_type", LIBRARY_GIO); Linker.link(g_loadable_icon_load, "g_loadable_icon_load", LIBRARY_GIO); Linker.link(g_loadable_icon_load_async, "g_loadable_icon_load_async", LIBRARY_GIO); Linker.link(g_loadable_icon_load_finish, "g_loadable_icon_load_finish", LIBRARY_GIO); // gio.MemoryInputStream Linker.link(g_memory_input_stream_get_type, "g_memory_input_stream_get_type", LIBRARY_GIO); Linker.link(g_memory_input_stream_new, "g_memory_input_stream_new", LIBRARY_GIO); Linker.link(g_memory_input_stream_new_from_bytes, "g_memory_input_stream_new_from_bytes", LIBRARY_GIO); Linker.link(g_memory_input_stream_new_from_data, "g_memory_input_stream_new_from_data", LIBRARY_GIO); Linker.link(g_memory_input_stream_add_bytes, "g_memory_input_stream_add_bytes", LIBRARY_GIO); Linker.link(g_memory_input_stream_add_data, "g_memory_input_stream_add_data", LIBRARY_GIO); // gio.MemoryOutputStream Linker.link(g_memory_output_stream_get_type, "g_memory_output_stream_get_type", LIBRARY_GIO); Linker.link(g_memory_output_stream_new, "g_memory_output_stream_new", LIBRARY_GIO); Linker.link(g_memory_output_stream_new_resizable, "g_memory_output_stream_new_resizable", LIBRARY_GIO); Linker.link(g_memory_output_stream_get_data, "g_memory_output_stream_get_data", LIBRARY_GIO); Linker.link(g_memory_output_stream_get_data_size, "g_memory_output_stream_get_data_size", LIBRARY_GIO); Linker.link(g_memory_output_stream_get_size, "g_memory_output_stream_get_size", LIBRARY_GIO); Linker.link(g_memory_output_stream_steal_as_bytes, "g_memory_output_stream_steal_as_bytes", LIBRARY_GIO); Linker.link(g_memory_output_stream_steal_data, "g_memory_output_stream_steal_data", LIBRARY_GIO); // gio.Menu Linker.link(g_menu_get_type, "g_menu_get_type", LIBRARY_GIO); Linker.link(g_menu_new, "g_menu_new", LIBRARY_GIO); Linker.link(g_menu_append, "g_menu_append", LIBRARY_GIO); Linker.link(g_menu_append_item, "g_menu_append_item", LIBRARY_GIO); Linker.link(g_menu_append_section, "g_menu_append_section", LIBRARY_GIO); Linker.link(g_menu_append_submenu, "g_menu_append_submenu", LIBRARY_GIO); Linker.link(g_menu_freeze, "g_menu_freeze", LIBRARY_GIO); Linker.link(g_menu_insert, "g_menu_insert", LIBRARY_GIO); Linker.link(g_menu_insert_item, "g_menu_insert_item", LIBRARY_GIO); Linker.link(g_menu_insert_section, "g_menu_insert_section", LIBRARY_GIO); Linker.link(g_menu_insert_submenu, "g_menu_insert_submenu", LIBRARY_GIO); Linker.link(g_menu_prepend, "g_menu_prepend", LIBRARY_GIO); Linker.link(g_menu_prepend_item, "g_menu_prepend_item", LIBRARY_GIO); Linker.link(g_menu_prepend_section, "g_menu_prepend_section", LIBRARY_GIO); Linker.link(g_menu_prepend_submenu, "g_menu_prepend_submenu", LIBRARY_GIO); Linker.link(g_menu_remove, "g_menu_remove", LIBRARY_GIO); Linker.link(g_menu_remove_all, "g_menu_remove_all", LIBRARY_GIO); // gio.MenuAttributeIter Linker.link(g_menu_attribute_iter_get_type, "g_menu_attribute_iter_get_type", LIBRARY_GIO); Linker.link(g_menu_attribute_iter_get_name, "g_menu_attribute_iter_get_name", LIBRARY_GIO); Linker.link(g_menu_attribute_iter_get_next, "g_menu_attribute_iter_get_next", LIBRARY_GIO); Linker.link(g_menu_attribute_iter_get_value, "g_menu_attribute_iter_get_value", LIBRARY_GIO); Linker.link(g_menu_attribute_iter_next, "g_menu_attribute_iter_next", LIBRARY_GIO); // gio.MenuItem Linker.link(g_menu_item_get_type, "g_menu_item_get_type", LIBRARY_GIO); Linker.link(g_menu_item_new, "g_menu_item_new", LIBRARY_GIO); Linker.link(g_menu_item_new_from_model, "g_menu_item_new_from_model", LIBRARY_GIO); Linker.link(g_menu_item_new_section, "g_menu_item_new_section", LIBRARY_GIO); Linker.link(g_menu_item_new_submenu, "g_menu_item_new_submenu", LIBRARY_GIO); Linker.link(g_menu_item_get_attribute, "g_menu_item_get_attribute", LIBRARY_GIO); Linker.link(g_menu_item_get_attribute_value, "g_menu_item_get_attribute_value", LIBRARY_GIO); Linker.link(g_menu_item_get_link, "g_menu_item_get_link", LIBRARY_GIO); Linker.link(g_menu_item_set_action_and_target, "g_menu_item_set_action_and_target", LIBRARY_GIO); Linker.link(g_menu_item_set_action_and_target_value, "g_menu_item_set_action_and_target_value", LIBRARY_GIO); Linker.link(g_menu_item_set_attribute, "g_menu_item_set_attribute", LIBRARY_GIO); Linker.link(g_menu_item_set_attribute_value, "g_menu_item_set_attribute_value", LIBRARY_GIO); Linker.link(g_menu_item_set_detailed_action, "g_menu_item_set_detailed_action", LIBRARY_GIO); Linker.link(g_menu_item_set_icon, "g_menu_item_set_icon", LIBRARY_GIO); Linker.link(g_menu_item_set_label, "g_menu_item_set_label", LIBRARY_GIO); Linker.link(g_menu_item_set_link, "g_menu_item_set_link", LIBRARY_GIO); Linker.link(g_menu_item_set_section, "g_menu_item_set_section", LIBRARY_GIO); Linker.link(g_menu_item_set_submenu, "g_menu_item_set_submenu", LIBRARY_GIO); // gio.MenuLinkIter Linker.link(g_menu_link_iter_get_type, "g_menu_link_iter_get_type", LIBRARY_GIO); Linker.link(g_menu_link_iter_get_name, "g_menu_link_iter_get_name", LIBRARY_GIO); Linker.link(g_menu_link_iter_get_next, "g_menu_link_iter_get_next", LIBRARY_GIO); Linker.link(g_menu_link_iter_get_value, "g_menu_link_iter_get_value", LIBRARY_GIO); Linker.link(g_menu_link_iter_next, "g_menu_link_iter_next", LIBRARY_GIO); // gio.MenuModel Linker.link(g_menu_model_get_type, "g_menu_model_get_type", LIBRARY_GIO); Linker.link(g_menu_model_get_item_attribute, "g_menu_model_get_item_attribute", LIBRARY_GIO); Linker.link(g_menu_model_get_item_attribute_value, "g_menu_model_get_item_attribute_value", LIBRARY_GIO); Linker.link(g_menu_model_get_item_link, "g_menu_model_get_item_link", LIBRARY_GIO); Linker.link(g_menu_model_get_n_items, "g_menu_model_get_n_items", LIBRARY_GIO); Linker.link(g_menu_model_is_mutable, "g_menu_model_is_mutable", LIBRARY_GIO); Linker.link(g_menu_model_items_changed, "g_menu_model_items_changed", LIBRARY_GIO); Linker.link(g_menu_model_iterate_item_attributes, "g_menu_model_iterate_item_attributes", LIBRARY_GIO); Linker.link(g_menu_model_iterate_item_links, "g_menu_model_iterate_item_links", LIBRARY_GIO); // gio.Mount Linker.link(g_mount_get_type, "g_mount_get_type", LIBRARY_GIO); Linker.link(g_mount_can_eject, "g_mount_can_eject", LIBRARY_GIO); Linker.link(g_mount_can_unmount, "g_mount_can_unmount", LIBRARY_GIO); Linker.link(g_mount_eject, "g_mount_eject", LIBRARY_GIO); Linker.link(g_mount_eject_finish, "g_mount_eject_finish", LIBRARY_GIO); Linker.link(g_mount_eject_with_operation, "g_mount_eject_with_operation", LIBRARY_GIO); Linker.link(g_mount_eject_with_operation_finish, "g_mount_eject_with_operation_finish", LIBRARY_GIO); Linker.link(g_mount_get_default_location, "g_mount_get_default_location", LIBRARY_GIO); Linker.link(g_mount_get_drive, "g_mount_get_drive", LIBRARY_GIO); Linker.link(g_mount_get_icon, "g_mount_get_icon", LIBRARY_GIO); Linker.link(g_mount_get_name, "g_mount_get_name", LIBRARY_GIO); Linker.link(g_mount_get_root, "g_mount_get_root", LIBRARY_GIO); Linker.link(g_mount_get_sort_key, "g_mount_get_sort_key", LIBRARY_GIO); Linker.link(g_mount_get_symbolic_icon, "g_mount_get_symbolic_icon", LIBRARY_GIO); Linker.link(g_mount_get_uuid, "g_mount_get_uuid", LIBRARY_GIO); Linker.link(g_mount_get_volume, "g_mount_get_volume", LIBRARY_GIO); Linker.link(g_mount_guess_content_type, "g_mount_guess_content_type", LIBRARY_GIO); Linker.link(g_mount_guess_content_type_finish, "g_mount_guess_content_type_finish", LIBRARY_GIO); Linker.link(g_mount_guess_content_type_sync, "g_mount_guess_content_type_sync", LIBRARY_GIO); Linker.link(g_mount_is_shadowed, "g_mount_is_shadowed", LIBRARY_GIO); Linker.link(g_mount_remount, "g_mount_remount", LIBRARY_GIO); Linker.link(g_mount_remount_finish, "g_mount_remount_finish", LIBRARY_GIO); Linker.link(g_mount_shadow, "g_mount_shadow", LIBRARY_GIO); Linker.link(g_mount_unmount, "g_mount_unmount", LIBRARY_GIO); Linker.link(g_mount_unmount_finish, "g_mount_unmount_finish", LIBRARY_GIO); Linker.link(g_mount_unmount_with_operation, "g_mount_unmount_with_operation", LIBRARY_GIO); Linker.link(g_mount_unmount_with_operation_finish, "g_mount_unmount_with_operation_finish", LIBRARY_GIO); Linker.link(g_mount_unshadow, "g_mount_unshadow", LIBRARY_GIO); // gio.MountOperation Linker.link(g_mount_operation_get_type, "g_mount_operation_get_type", LIBRARY_GIO); Linker.link(g_mount_operation_new, "g_mount_operation_new", LIBRARY_GIO); Linker.link(g_mount_operation_get_anonymous, "g_mount_operation_get_anonymous", LIBRARY_GIO); Linker.link(g_mount_operation_get_choice, "g_mount_operation_get_choice", LIBRARY_GIO); Linker.link(g_mount_operation_get_domain, "g_mount_operation_get_domain", LIBRARY_GIO); Linker.link(g_mount_operation_get_password, "g_mount_operation_get_password", LIBRARY_GIO); Linker.link(g_mount_operation_get_password_save, "g_mount_operation_get_password_save", LIBRARY_GIO); Linker.link(g_mount_operation_get_username, "g_mount_operation_get_username", LIBRARY_GIO); Linker.link(g_mount_operation_reply, "g_mount_operation_reply", LIBRARY_GIO); Linker.link(g_mount_operation_set_anonymous, "g_mount_operation_set_anonymous", LIBRARY_GIO); Linker.link(g_mount_operation_set_choice, "g_mount_operation_set_choice", LIBRARY_GIO); Linker.link(g_mount_operation_set_domain, "g_mount_operation_set_domain", LIBRARY_GIO); Linker.link(g_mount_operation_set_password, "g_mount_operation_set_password", LIBRARY_GIO); Linker.link(g_mount_operation_set_password_save, "g_mount_operation_set_password_save", LIBRARY_GIO); Linker.link(g_mount_operation_set_username, "g_mount_operation_set_username", LIBRARY_GIO); // gio.NativeVolumeMonitor Linker.link(g_native_volume_monitor_get_type, "g_native_volume_monitor_get_type", LIBRARY_GIO); // gio.NetworkAddress Linker.link(g_network_address_get_type, "g_network_address_get_type", LIBRARY_GIO); Linker.link(g_network_address_new, "g_network_address_new", LIBRARY_GIO); Linker.link(g_network_address_new_loopback, "g_network_address_new_loopback", LIBRARY_GIO); Linker.link(g_network_address_parse, "g_network_address_parse", LIBRARY_GIO); Linker.link(g_network_address_parse_uri, "g_network_address_parse_uri", LIBRARY_GIO); Linker.link(g_network_address_get_hostname, "g_network_address_get_hostname", LIBRARY_GIO); Linker.link(g_network_address_get_port, "g_network_address_get_port", LIBRARY_GIO); Linker.link(g_network_address_get_scheme, "g_network_address_get_scheme", LIBRARY_GIO); // gio.NetworkMonitor Linker.link(g_network_monitor_get_type, "g_network_monitor_get_type", LIBRARY_GIO); Linker.link(g_network_monitor_get_default, "g_network_monitor_get_default", LIBRARY_GIO); Linker.link(g_network_monitor_can_reach, "g_network_monitor_can_reach", LIBRARY_GIO); Linker.link(g_network_monitor_can_reach_async, "g_network_monitor_can_reach_async", LIBRARY_GIO); Linker.link(g_network_monitor_can_reach_finish, "g_network_monitor_can_reach_finish", LIBRARY_GIO); Linker.link(g_network_monitor_get_connectivity, "g_network_monitor_get_connectivity", LIBRARY_GIO); Linker.link(g_network_monitor_get_network_available, "g_network_monitor_get_network_available", LIBRARY_GIO); Linker.link(g_network_monitor_get_network_metered, "g_network_monitor_get_network_metered", LIBRARY_GIO); // gio.NetworkService Linker.link(g_network_service_get_type, "g_network_service_get_type", LIBRARY_GIO); Linker.link(g_network_service_new, "g_network_service_new", LIBRARY_GIO); Linker.link(g_network_service_get_domain, "g_network_service_get_domain", LIBRARY_GIO); Linker.link(g_network_service_get_protocol, "g_network_service_get_protocol", LIBRARY_GIO); Linker.link(g_network_service_get_scheme, "g_network_service_get_scheme", LIBRARY_GIO); Linker.link(g_network_service_get_service, "g_network_service_get_service", LIBRARY_GIO); Linker.link(g_network_service_set_scheme, "g_network_service_set_scheme", LIBRARY_GIO); // gio.Notification Linker.link(g_notification_get_type, "g_notification_get_type", LIBRARY_GIO); Linker.link(g_notification_new, "g_notification_new", LIBRARY_GIO); Linker.link(g_notification_add_button, "g_notification_add_button", LIBRARY_GIO); Linker.link(g_notification_add_button_with_target, "g_notification_add_button_with_target", LIBRARY_GIO); Linker.link(g_notification_add_button_with_target_value, "g_notification_add_button_with_target_value", LIBRARY_GIO); Linker.link(g_notification_set_body, "g_notification_set_body", LIBRARY_GIO); Linker.link(g_notification_set_default_action, "g_notification_set_default_action", LIBRARY_GIO); Linker.link(g_notification_set_default_action_and_target, "g_notification_set_default_action_and_target", LIBRARY_GIO); Linker.link(g_notification_set_default_action_and_target_value, "g_notification_set_default_action_and_target_value", LIBRARY_GIO); Linker.link(g_notification_set_icon, "g_notification_set_icon", LIBRARY_GIO); Linker.link(g_notification_set_priority, "g_notification_set_priority", LIBRARY_GIO); Linker.link(g_notification_set_title, "g_notification_set_title", LIBRARY_GIO); Linker.link(g_notification_set_urgent, "g_notification_set_urgent", LIBRARY_GIO); // gio.OutputStream Linker.link(g_output_stream_get_type, "g_output_stream_get_type", LIBRARY_GIO); Linker.link(g_output_stream_clear_pending, "g_output_stream_clear_pending", LIBRARY_GIO); Linker.link(g_output_stream_close, "g_output_stream_close", LIBRARY_GIO); Linker.link(g_output_stream_close_async, "g_output_stream_close_async", LIBRARY_GIO); Linker.link(g_output_stream_close_finish, "g_output_stream_close_finish", LIBRARY_GIO); Linker.link(g_output_stream_flush, "g_output_stream_flush", LIBRARY_GIO); Linker.link(g_output_stream_flush_async, "g_output_stream_flush_async", LIBRARY_GIO); Linker.link(g_output_stream_flush_finish, "g_output_stream_flush_finish", LIBRARY_GIO); Linker.link(g_output_stream_has_pending, "g_output_stream_has_pending", LIBRARY_GIO); Linker.link(g_output_stream_is_closed, "g_output_stream_is_closed", LIBRARY_GIO); Linker.link(g_output_stream_is_closing, "g_output_stream_is_closing", LIBRARY_GIO); Linker.link(g_output_stream_printf, "g_output_stream_printf", LIBRARY_GIO); Linker.link(g_output_stream_set_pending, "g_output_stream_set_pending", LIBRARY_GIO); Linker.link(g_output_stream_splice, "g_output_stream_splice", LIBRARY_GIO); Linker.link(g_output_stream_splice_async, "g_output_stream_splice_async", LIBRARY_GIO); Linker.link(g_output_stream_splice_finish, "g_output_stream_splice_finish", LIBRARY_GIO); Linker.link(g_output_stream_vprintf, "g_output_stream_vprintf", LIBRARY_GIO); Linker.link(g_output_stream_write, "g_output_stream_write", LIBRARY_GIO); Linker.link(g_output_stream_write_all, "g_output_stream_write_all", LIBRARY_GIO); Linker.link(g_output_stream_write_all_async, "g_output_stream_write_all_async", LIBRARY_GIO); Linker.link(g_output_stream_write_all_finish, "g_output_stream_write_all_finish", LIBRARY_GIO); Linker.link(g_output_stream_write_async, "g_output_stream_write_async", LIBRARY_GIO); Linker.link(g_output_stream_write_bytes, "g_output_stream_write_bytes", LIBRARY_GIO); Linker.link(g_output_stream_write_bytes_async, "g_output_stream_write_bytes_async", LIBRARY_GIO); Linker.link(g_output_stream_write_bytes_finish, "g_output_stream_write_bytes_finish", LIBRARY_GIO); Linker.link(g_output_stream_write_finish, "g_output_stream_write_finish", LIBRARY_GIO); // gio.Permission Linker.link(g_permission_get_type, "g_permission_get_type", LIBRARY_GIO); Linker.link(g_permission_acquire, "g_permission_acquire", LIBRARY_GIO); Linker.link(g_permission_acquire_async, "g_permission_acquire_async", LIBRARY_GIO); Linker.link(g_permission_acquire_finish, "g_permission_acquire_finish", LIBRARY_GIO); Linker.link(g_permission_get_allowed, "g_permission_get_allowed", LIBRARY_GIO); Linker.link(g_permission_get_can_acquire, "g_permission_get_can_acquire", LIBRARY_GIO); Linker.link(g_permission_get_can_release, "g_permission_get_can_release", LIBRARY_GIO); Linker.link(g_permission_impl_update, "g_permission_impl_update", LIBRARY_GIO); Linker.link(g_permission_release, "g_permission_release", LIBRARY_GIO); Linker.link(g_permission_release_async, "g_permission_release_async", LIBRARY_GIO); Linker.link(g_permission_release_finish, "g_permission_release_finish", LIBRARY_GIO); // gio.PollableInputStream Linker.link(g_pollable_input_stream_get_type, "g_pollable_input_stream_get_type", LIBRARY_GIO); Linker.link(g_pollable_input_stream_can_poll, "g_pollable_input_stream_can_poll", LIBRARY_GIO); Linker.link(g_pollable_input_stream_create_source, "g_pollable_input_stream_create_source", LIBRARY_GIO); Linker.link(g_pollable_input_stream_is_readable, "g_pollable_input_stream_is_readable", LIBRARY_GIO); Linker.link(g_pollable_input_stream_read_nonblocking, "g_pollable_input_stream_read_nonblocking", LIBRARY_GIO); // gio.PollableOutputStream Linker.link(g_pollable_output_stream_get_type, "g_pollable_output_stream_get_type", LIBRARY_GIO); Linker.link(g_pollable_output_stream_can_poll, "g_pollable_output_stream_can_poll", LIBRARY_GIO); Linker.link(g_pollable_output_stream_create_source, "g_pollable_output_stream_create_source", LIBRARY_GIO); Linker.link(g_pollable_output_stream_is_writable, "g_pollable_output_stream_is_writable", LIBRARY_GIO); Linker.link(g_pollable_output_stream_write_nonblocking, "g_pollable_output_stream_write_nonblocking", LIBRARY_GIO); // gio.PropertyAction Linker.link(g_property_action_get_type, "g_property_action_get_type", LIBRARY_GIO); Linker.link(g_property_action_new, "g_property_action_new", LIBRARY_GIO); // gio.Proxy Linker.link(g_proxy_get_type, "g_proxy_get_type", LIBRARY_GIO); Linker.link(g_proxy_get_default_for_protocol, "g_proxy_get_default_for_protocol", LIBRARY_GIO); Linker.link(g_proxy_connect, "g_proxy_connect", LIBRARY_GIO); Linker.link(g_proxy_connect_async, "g_proxy_connect_async", LIBRARY_GIO); Linker.link(g_proxy_connect_finish, "g_proxy_connect_finish", LIBRARY_GIO); Linker.link(g_proxy_supports_hostname, "g_proxy_supports_hostname", LIBRARY_GIO); // gio.ProxyAddress Linker.link(g_proxy_address_get_type, "g_proxy_address_get_type", LIBRARY_GIO); Linker.link(g_proxy_address_new, "g_proxy_address_new", LIBRARY_GIO); Linker.link(g_proxy_address_get_destination_hostname, "g_proxy_address_get_destination_hostname", LIBRARY_GIO); Linker.link(g_proxy_address_get_destination_port, "g_proxy_address_get_destination_port", LIBRARY_GIO); Linker.link(g_proxy_address_get_destination_protocol, "g_proxy_address_get_destination_protocol", LIBRARY_GIO); Linker.link(g_proxy_address_get_password, "g_proxy_address_get_password", LIBRARY_GIO); Linker.link(g_proxy_address_get_protocol, "g_proxy_address_get_protocol", LIBRARY_GIO); Linker.link(g_proxy_address_get_uri, "g_proxy_address_get_uri", LIBRARY_GIO); Linker.link(g_proxy_address_get_username, "g_proxy_address_get_username", LIBRARY_GIO); // gio.ProxyAddressEnumerator Linker.link(g_proxy_address_enumerator_get_type, "g_proxy_address_enumerator_get_type", LIBRARY_GIO); // gio.ProxyResolver Linker.link(g_proxy_resolver_get_type, "g_proxy_resolver_get_type", LIBRARY_GIO); Linker.link(g_proxy_resolver_get_default, "g_proxy_resolver_get_default", LIBRARY_GIO); Linker.link(g_proxy_resolver_is_supported, "g_proxy_resolver_is_supported", LIBRARY_GIO); Linker.link(g_proxy_resolver_lookup, "g_proxy_resolver_lookup", LIBRARY_GIO); Linker.link(g_proxy_resolver_lookup_async, "g_proxy_resolver_lookup_async", LIBRARY_GIO); Linker.link(g_proxy_resolver_lookup_finish, "g_proxy_resolver_lookup_finish", LIBRARY_GIO); // gio.RemoteActionGroup Linker.link(g_remote_action_group_get_type, "g_remote_action_group_get_type", LIBRARY_GIO); Linker.link(g_remote_action_group_activate_action_full, "g_remote_action_group_activate_action_full", LIBRARY_GIO); Linker.link(g_remote_action_group_change_action_state_full, "g_remote_action_group_change_action_state_full", LIBRARY_GIO); // gio.Resolver Linker.link(g_resolver_get_type, "g_resolver_get_type", LIBRARY_GIO); Linker.link(g_resolver_free_addresses, "g_resolver_free_addresses", LIBRARY_GIO); Linker.link(g_resolver_free_targets, "g_resolver_free_targets", LIBRARY_GIO); Linker.link(g_resolver_get_default, "g_resolver_get_default", LIBRARY_GIO); Linker.link(g_resolver_lookup_by_address, "g_resolver_lookup_by_address", LIBRARY_GIO); Linker.link(g_resolver_lookup_by_address_async, "g_resolver_lookup_by_address_async", LIBRARY_GIO); Linker.link(g_resolver_lookup_by_address_finish, "g_resolver_lookup_by_address_finish", LIBRARY_GIO); Linker.link(g_resolver_lookup_by_name, "g_resolver_lookup_by_name", LIBRARY_GIO); Linker.link(g_resolver_lookup_by_name_async, "g_resolver_lookup_by_name_async", LIBRARY_GIO); Linker.link(g_resolver_lookup_by_name_finish, "g_resolver_lookup_by_name_finish", LIBRARY_GIO); Linker.link(g_resolver_lookup_records, "g_resolver_lookup_records", LIBRARY_GIO); Linker.link(g_resolver_lookup_records_async, "g_resolver_lookup_records_async", LIBRARY_GIO); Linker.link(g_resolver_lookup_records_finish, "g_resolver_lookup_records_finish", LIBRARY_GIO); Linker.link(g_resolver_lookup_service, "g_resolver_lookup_service", LIBRARY_GIO); Linker.link(g_resolver_lookup_service_async, "g_resolver_lookup_service_async", LIBRARY_GIO); Linker.link(g_resolver_lookup_service_finish, "g_resolver_lookup_service_finish", LIBRARY_GIO); Linker.link(g_resolver_set_default, "g_resolver_set_default", LIBRARY_GIO); // gio.Resource Linker.link(g_resource_get_type, "g_resource_get_type", LIBRARY_GIO); Linker.link(g_resource_new_from_data, "g_resource_new_from_data", LIBRARY_GIO); Linker.link(g_resources_register, "g_resources_register", LIBRARY_GIO); Linker.link(g_resources_unregister, "g_resources_unregister", LIBRARY_GIO); Linker.link(g_resource_enumerate_children, "g_resource_enumerate_children", LIBRARY_GIO); Linker.link(g_resource_get_info, "g_resource_get_info", LIBRARY_GIO); Linker.link(g_resource_lookup_data, "g_resource_lookup_data", LIBRARY_GIO); Linker.link(g_resource_open_stream, "g_resource_open_stream", LIBRARY_GIO); Linker.link(g_resource_ref, "g_resource_ref", LIBRARY_GIO); Linker.link(g_resource_unref, "g_resource_unref", LIBRARY_GIO); Linker.link(g_resource_load, "g_resource_load", LIBRARY_GIO); Linker.link(g_resources_enumerate_children, "g_resources_enumerate_children", LIBRARY_GIO); Linker.link(g_resources_get_info, "g_resources_get_info", LIBRARY_GIO); Linker.link(g_resources_lookup_data, "g_resources_lookup_data", LIBRARY_GIO); Linker.link(g_resources_open_stream, "g_resources_open_stream", LIBRARY_GIO); // gio.Seekable Linker.link(g_seekable_get_type, "g_seekable_get_type", LIBRARY_GIO); Linker.link(g_seekable_can_seek, "g_seekable_can_seek", LIBRARY_GIO); Linker.link(g_seekable_can_truncate, "g_seekable_can_truncate", LIBRARY_GIO); Linker.link(g_seekable_seek, "g_seekable_seek", LIBRARY_GIO); Linker.link(g_seekable_tell, "g_seekable_tell", LIBRARY_GIO); Linker.link(g_seekable_truncate, "g_seekable_truncate", LIBRARY_GIO); // gio.Settings Linker.link(g_settings_get_type, "g_settings_get_type", LIBRARY_GIO); Linker.link(g_settings_new, "g_settings_new", LIBRARY_GIO); Linker.link(g_settings_new_full, "g_settings_new_full", LIBRARY_GIO); Linker.link(g_settings_new_with_backend, "g_settings_new_with_backend", LIBRARY_GIO); Linker.link(g_settings_new_with_backend_and_path, "g_settings_new_with_backend_and_path", LIBRARY_GIO); Linker.link(g_settings_new_with_path, "g_settings_new_with_path", LIBRARY_GIO); Linker.link(g_settings_list_relocatable_schemas, "g_settings_list_relocatable_schemas", LIBRARY_GIO); Linker.link(g_settings_list_schemas, "g_settings_list_schemas", LIBRARY_GIO); Linker.link(g_settings_sync, "g_settings_sync", LIBRARY_GIO); Linker.link(g_settings_unbind, "g_settings_unbind", LIBRARY_GIO); Linker.link(g_settings_apply, "g_settings_apply", LIBRARY_GIO); Linker.link(g_settings_bind, "g_settings_bind", LIBRARY_GIO); Linker.link(g_settings_bind_with_mapping, "g_settings_bind_with_mapping", LIBRARY_GIO); Linker.link(g_settings_bind_writable, "g_settings_bind_writable", LIBRARY_GIO); Linker.link(g_settings_create_action, "g_settings_create_action", LIBRARY_GIO); Linker.link(g_settings_delay, "g_settings_delay", LIBRARY_GIO); Linker.link(g_settings_get, "g_settings_get", LIBRARY_GIO); Linker.link(g_settings_get_boolean, "g_settings_get_boolean", LIBRARY_GIO); Linker.link(g_settings_get_child, "g_settings_get_child", LIBRARY_GIO); Linker.link(g_settings_get_default_value, "g_settings_get_default_value", LIBRARY_GIO); Linker.link(g_settings_get_double, "g_settings_get_double", LIBRARY_GIO); Linker.link(g_settings_get_enum, "g_settings_get_enum", LIBRARY_GIO); Linker.link(g_settings_get_flags, "g_settings_get_flags", LIBRARY_GIO); Linker.link(g_settings_get_has_unapplied, "g_settings_get_has_unapplied", LIBRARY_GIO); Linker.link(g_settings_get_int, "g_settings_get_int", LIBRARY_GIO); Linker.link(g_settings_get_int64, "g_settings_get_int64", LIBRARY_GIO); Linker.link(g_settings_get_mapped, "g_settings_get_mapped", LIBRARY_GIO); Linker.link(g_settings_get_range, "g_settings_get_range", LIBRARY_GIO); Linker.link(g_settings_get_string, "g_settings_get_string", LIBRARY_GIO); Linker.link(g_settings_get_strv, "g_settings_get_strv", LIBRARY_GIO); Linker.link(g_settings_get_uint, "g_settings_get_uint", LIBRARY_GIO); Linker.link(g_settings_get_uint64, "g_settings_get_uint64", LIBRARY_GIO); Linker.link(g_settings_get_user_value, "g_settings_get_user_value", LIBRARY_GIO); Linker.link(g_settings_get_value, "g_settings_get_value", LIBRARY_GIO); Linker.link(g_settings_is_writable, "g_settings_is_writable", LIBRARY_GIO); Linker.link(g_settings_list_children, "g_settings_list_children", LIBRARY_GIO); Linker.link(g_settings_list_keys, "g_settings_list_keys", LIBRARY_GIO); Linker.link(g_settings_range_check, "g_settings_range_check", LIBRARY_GIO); Linker.link(g_settings_reset, "g_settings_reset", LIBRARY_GIO); Linker.link(g_settings_revert, "g_settings_revert", LIBRARY_GIO); Linker.link(g_settings_set, "g_settings_set", LIBRARY_GIO); Linker.link(g_settings_set_boolean, "g_settings_set_boolean", LIBRARY_GIO); Linker.link(g_settings_set_double, "g_settings_set_double", LIBRARY_GIO); Linker.link(g_settings_set_enum, "g_settings_set_enum", LIBRARY_GIO); Linker.link(g_settings_set_flags, "g_settings_set_flags", LIBRARY_GIO); Linker.link(g_settings_set_int, "g_settings_set_int", LIBRARY_GIO); Linker.link(g_settings_set_int64, "g_settings_set_int64", LIBRARY_GIO); Linker.link(g_settings_set_string, "g_settings_set_string", LIBRARY_GIO); Linker.link(g_settings_set_strv, "g_settings_set_strv", LIBRARY_GIO); Linker.link(g_settings_set_uint, "g_settings_set_uint", LIBRARY_GIO); Linker.link(g_settings_set_uint64, "g_settings_set_uint64", LIBRARY_GIO); Linker.link(g_settings_set_value, "g_settings_set_value", LIBRARY_GIO); // gio.SettingsBackend Linker.link(g_settings_backend_get_type, "g_settings_backend_get_type", LIBRARY_GIO); Linker.link(g_settings_backend_flatten_tree, "g_settings_backend_flatten_tree", LIBRARY_GIO); Linker.link(g_settings_backend_get_default, "g_settings_backend_get_default", LIBRARY_GIO); Linker.link(g_settings_backend_changed, "g_settings_backend_changed", LIBRARY_GIO); Linker.link(g_settings_backend_changed_tree, "g_settings_backend_changed_tree", LIBRARY_GIO); Linker.link(g_settings_backend_keys_changed, "g_settings_backend_keys_changed", LIBRARY_GIO); Linker.link(g_settings_backend_path_changed, "g_settings_backend_path_changed", LIBRARY_GIO); Linker.link(g_settings_backend_path_writable_changed, "g_settings_backend_path_writable_changed", LIBRARY_GIO); Linker.link(g_settings_backend_writable_changed, "g_settings_backend_writable_changed", LIBRARY_GIO); Linker.link(g_keyfile_settings_backend_new, "g_keyfile_settings_backend_new", LIBRARY_GIO); Linker.link(g_memory_settings_backend_new, "g_memory_settings_backend_new", LIBRARY_GIO); Linker.link(g_null_settings_backend_new, "g_null_settings_backend_new", LIBRARY_GIO); // gio.SettingsSchema Linker.link(g_settings_schema_get_type, "g_settings_schema_get_type", LIBRARY_GIO); Linker.link(g_settings_schema_get_id, "g_settings_schema_get_id", LIBRARY_GIO); Linker.link(g_settings_schema_get_key, "g_settings_schema_get_key", LIBRARY_GIO); Linker.link(g_settings_schema_get_path, "g_settings_schema_get_path", LIBRARY_GIO); Linker.link(g_settings_schema_has_key, "g_settings_schema_has_key", LIBRARY_GIO); Linker.link(g_settings_schema_list_children, "g_settings_schema_list_children", LIBRARY_GIO); Linker.link(g_settings_schema_list_keys, "g_settings_schema_list_keys", LIBRARY_GIO); Linker.link(g_settings_schema_ref, "g_settings_schema_ref", LIBRARY_GIO); Linker.link(g_settings_schema_unref, "g_settings_schema_unref", LIBRARY_GIO); // gio.SettingsSchemaKey Linker.link(g_settings_schema_key_get_type, "g_settings_schema_key_get_type", LIBRARY_GIO); Linker.link(g_settings_schema_key_get_default_value, "g_settings_schema_key_get_default_value", LIBRARY_GIO); Linker.link(g_settings_schema_key_get_description, "g_settings_schema_key_get_description", LIBRARY_GIO); Linker.link(g_settings_schema_key_get_name, "g_settings_schema_key_get_name", LIBRARY_GIO); Linker.link(g_settings_schema_key_get_range, "g_settings_schema_key_get_range", LIBRARY_GIO); Linker.link(g_settings_schema_key_get_summary, "g_settings_schema_key_get_summary", LIBRARY_GIO); Linker.link(g_settings_schema_key_get_value_type, "g_settings_schema_key_get_value_type", LIBRARY_GIO); Linker.link(g_settings_schema_key_range_check, "g_settings_schema_key_range_check", LIBRARY_GIO); Linker.link(g_settings_schema_key_ref, "g_settings_schema_key_ref", LIBRARY_GIO); Linker.link(g_settings_schema_key_unref, "g_settings_schema_key_unref", LIBRARY_GIO); // gio.SettingsSchemaSource Linker.link(g_settings_schema_source_get_type, "g_settings_schema_source_get_type", LIBRARY_GIO); Linker.link(g_settings_schema_source_new_from_directory, "g_settings_schema_source_new_from_directory", LIBRARY_GIO); Linker.link(g_settings_schema_source_list_schemas, "g_settings_schema_source_list_schemas", LIBRARY_GIO); Linker.link(g_settings_schema_source_lookup, "g_settings_schema_source_lookup", LIBRARY_GIO); Linker.link(g_settings_schema_source_ref, "g_settings_schema_source_ref", LIBRARY_GIO); Linker.link(g_settings_schema_source_unref, "g_settings_schema_source_unref", LIBRARY_GIO); Linker.link(g_settings_schema_source_get_default, "g_settings_schema_source_get_default", LIBRARY_GIO); // gio.SimpleAction Linker.link(g_simple_action_get_type, "g_simple_action_get_type", LIBRARY_GIO); Linker.link(g_simple_action_new, "g_simple_action_new", LIBRARY_GIO); Linker.link(g_simple_action_new_stateful, "g_simple_action_new_stateful", LIBRARY_GIO); Linker.link(g_simple_action_set_enabled, "g_simple_action_set_enabled", LIBRARY_GIO); Linker.link(g_simple_action_set_state, "g_simple_action_set_state", LIBRARY_GIO); Linker.link(g_simple_action_set_state_hint, "g_simple_action_set_state_hint", LIBRARY_GIO); // gio.SimpleActionGroup Linker.link(g_simple_action_group_get_type, "g_simple_action_group_get_type", LIBRARY_GIO); Linker.link(g_simple_action_group_new, "g_simple_action_group_new", LIBRARY_GIO); Linker.link(g_simple_action_group_add_entries, "g_simple_action_group_add_entries", LIBRARY_GIO); Linker.link(g_simple_action_group_insert, "g_simple_action_group_insert", LIBRARY_GIO); Linker.link(g_simple_action_group_lookup, "g_simple_action_group_lookup", LIBRARY_GIO); Linker.link(g_simple_action_group_remove, "g_simple_action_group_remove", LIBRARY_GIO); // gio.SimpleAsyncResult Linker.link(g_simple_async_result_get_type, "g_simple_async_result_get_type", LIBRARY_GIO); Linker.link(g_simple_async_result_new, "g_simple_async_result_new", LIBRARY_GIO); Linker.link(g_simple_async_result_new_error, "g_simple_async_result_new_error", LIBRARY_GIO); Linker.link(g_simple_async_result_new_from_error, "g_simple_async_result_new_from_error", LIBRARY_GIO); Linker.link(g_simple_async_result_new_take_error, "g_simple_async_result_new_take_error", LIBRARY_GIO); Linker.link(g_simple_async_result_is_valid, "g_simple_async_result_is_valid", LIBRARY_GIO); Linker.link(g_simple_async_result_complete, "g_simple_async_result_complete", LIBRARY_GIO); Linker.link(g_simple_async_result_complete_in_idle, "g_simple_async_result_complete_in_idle", LIBRARY_GIO); Linker.link(g_simple_async_result_get_op_res_gboolean, "g_simple_async_result_get_op_res_gboolean", LIBRARY_GIO); Linker.link(g_simple_async_result_get_op_res_gpointer, "g_simple_async_result_get_op_res_gpointer", LIBRARY_GIO); Linker.link(g_simple_async_result_get_op_res_gssize, "g_simple_async_result_get_op_res_gssize", LIBRARY_GIO); Linker.link(g_simple_async_result_get_source_tag, "g_simple_async_result_get_source_tag", LIBRARY_GIO); Linker.link(g_simple_async_result_propagate_error, "g_simple_async_result_propagate_error", LIBRARY_GIO); Linker.link(g_simple_async_result_run_in_thread, "g_simple_async_result_run_in_thread", LIBRARY_GIO); Linker.link(g_simple_async_result_set_check_cancellable, "g_simple_async_result_set_check_cancellable", LIBRARY_GIO); Linker.link(g_simple_async_result_set_error, "g_simple_async_result_set_error", LIBRARY_GIO); Linker.link(g_simple_async_result_set_error_va, "g_simple_async_result_set_error_va", LIBRARY_GIO); Linker.link(g_simple_async_result_set_from_error, "g_simple_async_result_set_from_error", LIBRARY_GIO); Linker.link(g_simple_async_result_set_handle_cancellation, "g_simple_async_result_set_handle_cancellation", LIBRARY_GIO); Linker.link(g_simple_async_result_set_op_res_gboolean, "g_simple_async_result_set_op_res_gboolean", LIBRARY_GIO); Linker.link(g_simple_async_result_set_op_res_gpointer, "g_simple_async_result_set_op_res_gpointer", LIBRARY_GIO); Linker.link(g_simple_async_result_set_op_res_gssize, "g_simple_async_result_set_op_res_gssize", LIBRARY_GIO); Linker.link(g_simple_async_result_take_error, "g_simple_async_result_take_error", LIBRARY_GIO); Linker.link(g_simple_async_report_error_in_idle, "g_simple_async_report_error_in_idle", LIBRARY_GIO); Linker.link(g_simple_async_report_gerror_in_idle, "g_simple_async_report_gerror_in_idle", LIBRARY_GIO); Linker.link(g_simple_async_report_take_gerror_in_idle, "g_simple_async_report_take_gerror_in_idle", LIBRARY_GIO); // gio.SimpleIOStream Linker.link(g_simple_io_stream_get_type, "g_simple_io_stream_get_type", LIBRARY_GIO); Linker.link(g_simple_io_stream_new, "g_simple_io_stream_new", LIBRARY_GIO); // gio.SimplePermission Linker.link(g_simple_permission_get_type, "g_simple_permission_get_type", LIBRARY_GIO); Linker.link(g_simple_permission_new, "g_simple_permission_new", LIBRARY_GIO); // gio.SimpleProxyResolver Linker.link(g_simple_proxy_resolver_get_type, "g_simple_proxy_resolver_get_type", LIBRARY_GIO); Linker.link(g_simple_proxy_resolver_new, "g_simple_proxy_resolver_new", LIBRARY_GIO); Linker.link(g_simple_proxy_resolver_set_default_proxy, "g_simple_proxy_resolver_set_default_proxy", LIBRARY_GIO); Linker.link(g_simple_proxy_resolver_set_ignore_hosts, "g_simple_proxy_resolver_set_ignore_hosts", LIBRARY_GIO); Linker.link(g_simple_proxy_resolver_set_uri_proxy, "g_simple_proxy_resolver_set_uri_proxy", LIBRARY_GIO); // gio.Socket Linker.link(g_socket_get_type, "g_socket_get_type", LIBRARY_GIO); Linker.link(g_socket_new, "g_socket_new", LIBRARY_GIO); Linker.link(g_socket_new_from_fd, "g_socket_new_from_fd", LIBRARY_GIO); Linker.link(g_socket_accept, "g_socket_accept", LIBRARY_GIO); Linker.link(g_socket_bind, "g_socket_bind", LIBRARY_GIO); Linker.link(g_socket_check_connect_result, "g_socket_check_connect_result", LIBRARY_GIO); Linker.link(g_socket_close, "g_socket_close", LIBRARY_GIO); Linker.link(g_socket_condition_check, "g_socket_condition_check", LIBRARY_GIO); Linker.link(g_socket_condition_timed_wait, "g_socket_condition_timed_wait", LIBRARY_GIO); Linker.link(g_socket_condition_wait, "g_socket_condition_wait", LIBRARY_GIO); Linker.link(g_socket_connect, "g_socket_connect", LIBRARY_GIO); Linker.link(g_socket_connection_factory_create_connection, "g_socket_connection_factory_create_connection", LIBRARY_GIO); Linker.link(g_socket_create_source, "g_socket_create_source", LIBRARY_GIO); Linker.link(g_socket_get_available_bytes, "g_socket_get_available_bytes", LIBRARY_GIO); Linker.link(g_socket_get_blocking, "g_socket_get_blocking", LIBRARY_GIO); Linker.link(g_socket_get_broadcast, "g_socket_get_broadcast", LIBRARY_GIO); Linker.link(g_socket_get_credentials, "g_socket_get_credentials", LIBRARY_GIO); Linker.link(g_socket_get_family, "g_socket_get_family", LIBRARY_GIO); Linker.link(g_socket_get_fd, "g_socket_get_fd", LIBRARY_GIO); Linker.link(g_socket_get_keepalive, "g_socket_get_keepalive", LIBRARY_GIO); Linker.link(g_socket_get_listen_backlog, "g_socket_get_listen_backlog", LIBRARY_GIO); Linker.link(g_socket_get_local_address, "g_socket_get_local_address", LIBRARY_GIO); Linker.link(g_socket_get_multicast_loopback, "g_socket_get_multicast_loopback", LIBRARY_GIO); Linker.link(g_socket_get_multicast_ttl, "g_socket_get_multicast_ttl", LIBRARY_GIO); Linker.link(g_socket_get_option, "g_socket_get_option", LIBRARY_GIO); Linker.link(g_socket_get_protocol, "g_socket_get_protocol", LIBRARY_GIO); Linker.link(g_socket_get_remote_address, "g_socket_get_remote_address", LIBRARY_GIO); Linker.link(g_socket_get_socket_type, "g_socket_get_socket_type", LIBRARY_GIO); Linker.link(g_socket_get_timeout, "g_socket_get_timeout", LIBRARY_GIO); Linker.link(g_socket_get_ttl, "g_socket_get_ttl", LIBRARY_GIO); Linker.link(g_socket_is_closed, "g_socket_is_closed", LIBRARY_GIO); Linker.link(g_socket_is_connected, "g_socket_is_connected", LIBRARY_GIO); Linker.link(g_socket_join_multicast_group, "g_socket_join_multicast_group", LIBRARY_GIO); Linker.link(g_socket_leave_multicast_group, "g_socket_leave_multicast_group", LIBRARY_GIO); Linker.link(g_socket_listen, "g_socket_listen", LIBRARY_GIO); Linker.link(g_socket_receive, "g_socket_receive", LIBRARY_GIO); Linker.link(g_socket_receive_from, "g_socket_receive_from", LIBRARY_GIO); Linker.link(g_socket_receive_message, "g_socket_receive_message", LIBRARY_GIO); Linker.link(g_socket_receive_messages, "g_socket_receive_messages", LIBRARY_GIO); Linker.link(g_socket_receive_with_blocking, "g_socket_receive_with_blocking", LIBRARY_GIO); Linker.link(g_socket_send, "g_socket_send", LIBRARY_GIO); Linker.link(g_socket_send_message, "g_socket_send_message", LIBRARY_GIO); Linker.link(g_socket_send_messages, "g_socket_send_messages", LIBRARY_GIO); Linker.link(g_socket_send_to, "g_socket_send_to", LIBRARY_GIO); Linker.link(g_socket_send_with_blocking, "g_socket_send_with_blocking", LIBRARY_GIO); Linker.link(g_socket_set_blocking, "g_socket_set_blocking", LIBRARY_GIO); Linker.link(g_socket_set_broadcast, "g_socket_set_broadcast", LIBRARY_GIO); Linker.link(g_socket_set_keepalive, "g_socket_set_keepalive", LIBRARY_GIO); Linker.link(g_socket_set_listen_backlog, "g_socket_set_listen_backlog", LIBRARY_GIO); Linker.link(g_socket_set_multicast_loopback, "g_socket_set_multicast_loopback", LIBRARY_GIO); Linker.link(g_socket_set_multicast_ttl, "g_socket_set_multicast_ttl", LIBRARY_GIO); Linker.link(g_socket_set_option, "g_socket_set_option", LIBRARY_GIO); Linker.link(g_socket_set_timeout, "g_socket_set_timeout", LIBRARY_GIO); Linker.link(g_socket_set_ttl, "g_socket_set_ttl", LIBRARY_GIO); Linker.link(g_socket_shutdown, "g_socket_shutdown", LIBRARY_GIO); Linker.link(g_socket_speaks_ipv4, "g_socket_speaks_ipv4", LIBRARY_GIO); // gio.SocketAddress Linker.link(g_socket_address_get_type, "g_socket_address_get_type", LIBRARY_GIO); Linker.link(g_socket_address_new_from_native, "g_socket_address_new_from_native", LIBRARY_GIO); Linker.link(g_socket_address_get_family, "g_socket_address_get_family", LIBRARY_GIO); Linker.link(g_socket_address_get_native_size, "g_socket_address_get_native_size", LIBRARY_GIO); Linker.link(g_socket_address_to_native, "g_socket_address_to_native", LIBRARY_GIO); // gio.SocketAddressEnumerator Linker.link(g_socket_address_enumerator_get_type, "g_socket_address_enumerator_get_type", LIBRARY_GIO); Linker.link(g_socket_address_enumerator_next, "g_socket_address_enumerator_next", LIBRARY_GIO); Linker.link(g_socket_address_enumerator_next_async, "g_socket_address_enumerator_next_async", LIBRARY_GIO); Linker.link(g_socket_address_enumerator_next_finish, "g_socket_address_enumerator_next_finish", LIBRARY_GIO); // gio.SocketClient Linker.link(g_socket_client_get_type, "g_socket_client_get_type", LIBRARY_GIO); Linker.link(g_socket_client_new, "g_socket_client_new", LIBRARY_GIO); Linker.link(g_socket_client_add_application_proxy, "g_socket_client_add_application_proxy", LIBRARY_GIO); Linker.link(g_socket_client_connect, "g_socket_client_connect", LIBRARY_GIO); Linker.link(g_socket_client_connect_async, "g_socket_client_connect_async", LIBRARY_GIO); Linker.link(g_socket_client_connect_finish, "g_socket_client_connect_finish", LIBRARY_GIO); Linker.link(g_socket_client_connect_to_host, "g_socket_client_connect_to_host", LIBRARY_GIO); Linker.link(g_socket_client_connect_to_host_async, "g_socket_client_connect_to_host_async", LIBRARY_GIO); Linker.link(g_socket_client_connect_to_host_finish, "g_socket_client_connect_to_host_finish", LIBRARY_GIO); Linker.link(g_socket_client_connect_to_service, "g_socket_client_connect_to_service", LIBRARY_GIO); Linker.link(g_socket_client_connect_to_service_async, "g_socket_client_connect_to_service_async", LIBRARY_GIO); Linker.link(g_socket_client_connect_to_service_finish, "g_socket_client_connect_to_service_finish", LIBRARY_GIO); Linker.link(g_socket_client_connect_to_uri, "g_socket_client_connect_to_uri", LIBRARY_GIO); Linker.link(g_socket_client_connect_to_uri_async, "g_socket_client_connect_to_uri_async", LIBRARY_GIO); Linker.link(g_socket_client_connect_to_uri_finish, "g_socket_client_connect_to_uri_finish", LIBRARY_GIO); Linker.link(g_socket_client_get_enable_proxy, "g_socket_client_get_enable_proxy", LIBRARY_GIO); Linker.link(g_socket_client_get_family, "g_socket_client_get_family", LIBRARY_GIO); Linker.link(g_socket_client_get_local_address, "g_socket_client_get_local_address", LIBRARY_GIO); Linker.link(g_socket_client_get_protocol, "g_socket_client_get_protocol", LIBRARY_GIO); Linker.link(g_socket_client_get_proxy_resolver, "g_socket_client_get_proxy_resolver", LIBRARY_GIO); Linker.link(g_socket_client_get_socket_type, "g_socket_client_get_socket_type", LIBRARY_GIO); Linker.link(g_socket_client_get_timeout, "g_socket_client_get_timeout", LIBRARY_GIO); Linker.link(g_socket_client_get_tls, "g_socket_client_get_tls", LIBRARY_GIO); Linker.link(g_socket_client_get_tls_validation_flags, "g_socket_client_get_tls_validation_flags", LIBRARY_GIO); Linker.link(g_socket_client_set_enable_proxy, "g_socket_client_set_enable_proxy", LIBRARY_GIO); Linker.link(g_socket_client_set_family, "g_socket_client_set_family", LIBRARY_GIO); Linker.link(g_socket_client_set_local_address, "g_socket_client_set_local_address", LIBRARY_GIO); Linker.link(g_socket_client_set_protocol, "g_socket_client_set_protocol", LIBRARY_GIO); Linker.link(g_socket_client_set_proxy_resolver, "g_socket_client_set_proxy_resolver", LIBRARY_GIO); Linker.link(g_socket_client_set_socket_type, "g_socket_client_set_socket_type", LIBRARY_GIO); Linker.link(g_socket_client_set_timeout, "g_socket_client_set_timeout", LIBRARY_GIO); Linker.link(g_socket_client_set_tls, "g_socket_client_set_tls", LIBRARY_GIO); Linker.link(g_socket_client_set_tls_validation_flags, "g_socket_client_set_tls_validation_flags", LIBRARY_GIO); // gio.SocketConnectable Linker.link(g_socket_connectable_get_type, "g_socket_connectable_get_type", LIBRARY_GIO); Linker.link(g_socket_connectable_enumerate, "g_socket_connectable_enumerate", LIBRARY_GIO); Linker.link(g_socket_connectable_proxy_enumerate, "g_socket_connectable_proxy_enumerate", LIBRARY_GIO); Linker.link(g_socket_connectable_to_string, "g_socket_connectable_to_string", LIBRARY_GIO); // gio.SocketConnection Linker.link(g_socket_connection_get_type, "g_socket_connection_get_type", LIBRARY_GIO); Linker.link(g_socket_connection_factory_lookup_type, "g_socket_connection_factory_lookup_type", LIBRARY_GIO); Linker.link(g_socket_connection_factory_register_type, "g_socket_connection_factory_register_type", LIBRARY_GIO); Linker.link(g_socket_connection_connect, "g_socket_connection_connect", LIBRARY_GIO); Linker.link(g_socket_connection_connect_async, "g_socket_connection_connect_async", LIBRARY_GIO); Linker.link(g_socket_connection_connect_finish, "g_socket_connection_connect_finish", LIBRARY_GIO); Linker.link(g_socket_connection_get_local_address, "g_socket_connection_get_local_address", LIBRARY_GIO); Linker.link(g_socket_connection_get_remote_address, "g_socket_connection_get_remote_address", LIBRARY_GIO); Linker.link(g_socket_connection_get_socket, "g_socket_connection_get_socket", LIBRARY_GIO); Linker.link(g_socket_connection_is_connected, "g_socket_connection_is_connected", LIBRARY_GIO); // gio.SocketControlMessage Linker.link(g_socket_control_message_get_type, "g_socket_control_message_get_type", LIBRARY_GIO); Linker.link(g_socket_control_message_deserialize, "g_socket_control_message_deserialize", LIBRARY_GIO); Linker.link(g_socket_control_message_get_level, "g_socket_control_message_get_level", LIBRARY_GIO); Linker.link(g_socket_control_message_get_msg_type, "g_socket_control_message_get_msg_type", LIBRARY_GIO); Linker.link(g_socket_control_message_get_size, "g_socket_control_message_get_size", LIBRARY_GIO); Linker.link(g_socket_control_message_serialize, "g_socket_control_message_serialize", LIBRARY_GIO); // gio.SocketListener Linker.link(g_socket_listener_get_type, "g_socket_listener_get_type", LIBRARY_GIO); Linker.link(g_socket_listener_new, "g_socket_listener_new", LIBRARY_GIO); Linker.link(g_socket_listener_accept, "g_socket_listener_accept", LIBRARY_GIO); Linker.link(g_socket_listener_accept_async, "g_socket_listener_accept_async", LIBRARY_GIO); Linker.link(g_socket_listener_accept_finish, "g_socket_listener_accept_finish", LIBRARY_GIO); Linker.link(g_socket_listener_accept_socket, "g_socket_listener_accept_socket", LIBRARY_GIO); Linker.link(g_socket_listener_accept_socket_async, "g_socket_listener_accept_socket_async", LIBRARY_GIO); Linker.link(g_socket_listener_accept_socket_finish, "g_socket_listener_accept_socket_finish", LIBRARY_GIO); Linker.link(g_socket_listener_add_address, "g_socket_listener_add_address", LIBRARY_GIO); Linker.link(g_socket_listener_add_any_inet_port, "g_socket_listener_add_any_inet_port", LIBRARY_GIO); Linker.link(g_socket_listener_add_inet_port, "g_socket_listener_add_inet_port", LIBRARY_GIO); Linker.link(g_socket_listener_add_socket, "g_socket_listener_add_socket", LIBRARY_GIO); Linker.link(g_socket_listener_close, "g_socket_listener_close", LIBRARY_GIO); Linker.link(g_socket_listener_set_backlog, "g_socket_listener_set_backlog", LIBRARY_GIO); // gio.SocketService Linker.link(g_socket_service_get_type, "g_socket_service_get_type", LIBRARY_GIO); Linker.link(g_socket_service_new, "g_socket_service_new", LIBRARY_GIO); Linker.link(g_socket_service_is_active, "g_socket_service_is_active", LIBRARY_GIO); Linker.link(g_socket_service_start, "g_socket_service_start", LIBRARY_GIO); Linker.link(g_socket_service_stop, "g_socket_service_stop", LIBRARY_GIO); // gio.SrvTarget Linker.link(g_srv_target_get_type, "g_srv_target_get_type", LIBRARY_GIO); Linker.link(g_srv_target_new, "g_srv_target_new", LIBRARY_GIO); Linker.link(g_srv_target_copy, "g_srv_target_copy", LIBRARY_GIO); Linker.link(g_srv_target_free, "g_srv_target_free", LIBRARY_GIO); Linker.link(g_srv_target_get_hostname, "g_srv_target_get_hostname", LIBRARY_GIO); Linker.link(g_srv_target_get_port, "g_srv_target_get_port", LIBRARY_GIO); Linker.link(g_srv_target_get_priority, "g_srv_target_get_priority", LIBRARY_GIO); Linker.link(g_srv_target_get_weight, "g_srv_target_get_weight", LIBRARY_GIO); Linker.link(g_srv_target_list_sort, "g_srv_target_list_sort", LIBRARY_GIO); // gio.StaticResource Linker.link(g_static_resource_fini, "g_static_resource_fini", LIBRARY_GIO); Linker.link(g_static_resource_get_resource, "g_static_resource_get_resource", LIBRARY_GIO); Linker.link(g_static_resource_init, "g_static_resource_init", LIBRARY_GIO); // gio.Subprocess Linker.link(g_subprocess_get_type, "g_subprocess_get_type", LIBRARY_GIO); Linker.link(g_subprocess_new, "g_subprocess_new", LIBRARY_GIO); Linker.link(g_subprocess_newv, "g_subprocess_newv", LIBRARY_GIO); Linker.link(g_subprocess_communicate, "g_subprocess_communicate", LIBRARY_GIO); Linker.link(g_subprocess_communicate_async, "g_subprocess_communicate_async", LIBRARY_GIO); Linker.link(g_subprocess_communicate_finish, "g_subprocess_communicate_finish", LIBRARY_GIO); Linker.link(g_subprocess_communicate_utf8, "g_subprocess_communicate_utf8", LIBRARY_GIO); Linker.link(g_subprocess_communicate_utf8_async, "g_subprocess_communicate_utf8_async", LIBRARY_GIO); Linker.link(g_subprocess_communicate_utf8_finish, "g_subprocess_communicate_utf8_finish", LIBRARY_GIO); Linker.link(g_subprocess_force_exit, "g_subprocess_force_exit", LIBRARY_GIO); Linker.link(g_subprocess_get_exit_status, "g_subprocess_get_exit_status", LIBRARY_GIO); Linker.link(g_subprocess_get_identifier, "g_subprocess_get_identifier", LIBRARY_GIO); Linker.link(g_subprocess_get_if_exited, "g_subprocess_get_if_exited", LIBRARY_GIO); Linker.link(g_subprocess_get_if_signaled, "g_subprocess_get_if_signaled", LIBRARY_GIO); Linker.link(g_subprocess_get_status, "g_subprocess_get_status", LIBRARY_GIO); Linker.link(g_subprocess_get_stderr_pipe, "g_subprocess_get_stderr_pipe", LIBRARY_GIO); Linker.link(g_subprocess_get_stdin_pipe, "g_subprocess_get_stdin_pipe", LIBRARY_GIO); Linker.link(g_subprocess_get_stdout_pipe, "g_subprocess_get_stdout_pipe", LIBRARY_GIO); Linker.link(g_subprocess_get_successful, "g_subprocess_get_successful", LIBRARY_GIO); Linker.link(g_subprocess_get_term_sig, "g_subprocess_get_term_sig", LIBRARY_GIO); Linker.link(g_subprocess_send_signal, "g_subprocess_send_signal", LIBRARY_GIO); Linker.link(g_subprocess_wait, "g_subprocess_wait", LIBRARY_GIO); Linker.link(g_subprocess_wait_async, "g_subprocess_wait_async", LIBRARY_GIO); Linker.link(g_subprocess_wait_check, "g_subprocess_wait_check", LIBRARY_GIO); Linker.link(g_subprocess_wait_check_async, "g_subprocess_wait_check_async", LIBRARY_GIO); Linker.link(g_subprocess_wait_check_finish, "g_subprocess_wait_check_finish", LIBRARY_GIO); Linker.link(g_subprocess_wait_finish, "g_subprocess_wait_finish", LIBRARY_GIO); // gio.SubprocessLauncher Linker.link(g_subprocess_launcher_get_type, "g_subprocess_launcher_get_type", LIBRARY_GIO); Linker.link(g_subprocess_launcher_new, "g_subprocess_launcher_new", LIBRARY_GIO); Linker.link(g_subprocess_launcher_getenv, "g_subprocess_launcher_getenv", LIBRARY_GIO); Linker.link(g_subprocess_launcher_set_child_setup, "g_subprocess_launcher_set_child_setup", LIBRARY_GIO); Linker.link(g_subprocess_launcher_set_cwd, "g_subprocess_launcher_set_cwd", LIBRARY_GIO); Linker.link(g_subprocess_launcher_set_environ, "g_subprocess_launcher_set_environ", LIBRARY_GIO); Linker.link(g_subprocess_launcher_set_flags, "g_subprocess_launcher_set_flags", LIBRARY_GIO); Linker.link(g_subprocess_launcher_set_stderr_file_path, "g_subprocess_launcher_set_stderr_file_path", LIBRARY_GIO); Linker.link(g_subprocess_launcher_set_stdin_file_path, "g_subprocess_launcher_set_stdin_file_path", LIBRARY_GIO); Linker.link(g_subprocess_launcher_set_stdout_file_path, "g_subprocess_launcher_set_stdout_file_path", LIBRARY_GIO); Linker.link(g_subprocess_launcher_setenv, "g_subprocess_launcher_setenv", LIBRARY_GIO); Linker.link(g_subprocess_launcher_spawn, "g_subprocess_launcher_spawn", LIBRARY_GIO); Linker.link(g_subprocess_launcher_spawnv, "g_subprocess_launcher_spawnv", LIBRARY_GIO); Linker.link(g_subprocess_launcher_take_fd, "g_subprocess_launcher_take_fd", LIBRARY_GIO); Linker.link(g_subprocess_launcher_take_stderr_fd, "g_subprocess_launcher_take_stderr_fd", LIBRARY_GIO); Linker.link(g_subprocess_launcher_take_stdin_fd, "g_subprocess_launcher_take_stdin_fd", LIBRARY_GIO); Linker.link(g_subprocess_launcher_take_stdout_fd, "g_subprocess_launcher_take_stdout_fd", LIBRARY_GIO); Linker.link(g_subprocess_launcher_unsetenv, "g_subprocess_launcher_unsetenv", LIBRARY_GIO); // gio.Task Linker.link(g_task_get_type, "g_task_get_type", LIBRARY_GIO); Linker.link(g_task_new, "g_task_new", LIBRARY_GIO); Linker.link(g_task_is_valid, "g_task_is_valid", LIBRARY_GIO); Linker.link(g_task_report_error, "g_task_report_error", LIBRARY_GIO); Linker.link(g_task_report_new_error, "g_task_report_new_error", LIBRARY_GIO); Linker.link(g_task_attach_source, "g_task_attach_source", LIBRARY_GIO); Linker.link(g_task_get_cancellable, "g_task_get_cancellable", LIBRARY_GIO); Linker.link(g_task_get_check_cancellable, "g_task_get_check_cancellable", LIBRARY_GIO); Linker.link(g_task_get_completed, "g_task_get_completed", LIBRARY_GIO); Linker.link(g_task_get_context, "g_task_get_context", LIBRARY_GIO); Linker.link(g_task_get_priority, "g_task_get_priority", LIBRARY_GIO); Linker.link(g_task_get_return_on_cancel, "g_task_get_return_on_cancel", LIBRARY_GIO); Linker.link(g_task_get_source_object, "g_task_get_source_object", LIBRARY_GIO); Linker.link(g_task_get_source_tag, "g_task_get_source_tag", LIBRARY_GIO); Linker.link(g_task_get_task_data, "g_task_get_task_data", LIBRARY_GIO); Linker.link(g_task_had_error, "g_task_had_error", LIBRARY_GIO); Linker.link(g_task_propagate_boolean, "g_task_propagate_boolean", LIBRARY_GIO); Linker.link(g_task_propagate_int, "g_task_propagate_int", LIBRARY_GIO); Linker.link(g_task_propagate_pointer, "g_task_propagate_pointer", LIBRARY_GIO); Linker.link(g_task_return_boolean, "g_task_return_boolean", LIBRARY_GIO); Linker.link(g_task_return_error, "g_task_return_error", LIBRARY_GIO); Linker.link(g_task_return_error_if_cancelled, "g_task_return_error_if_cancelled", LIBRARY_GIO); Linker.link(g_task_return_int, "g_task_return_int", LIBRARY_GIO); Linker.link(g_task_return_new_error, "g_task_return_new_error", LIBRARY_GIO); Linker.link(g_task_return_pointer, "g_task_return_pointer", LIBRARY_GIO); Linker.link(g_task_run_in_thread, "g_task_run_in_thread", LIBRARY_GIO); Linker.link(g_task_run_in_thread_sync, "g_task_run_in_thread_sync", LIBRARY_GIO); Linker.link(g_task_set_check_cancellable, "g_task_set_check_cancellable", LIBRARY_GIO); Linker.link(g_task_set_priority, "g_task_set_priority", LIBRARY_GIO); Linker.link(g_task_set_return_on_cancel, "g_task_set_return_on_cancel", LIBRARY_GIO); Linker.link(g_task_set_source_tag, "g_task_set_source_tag", LIBRARY_GIO); Linker.link(g_task_set_task_data, "g_task_set_task_data", LIBRARY_GIO); // gio.TcpConnection Linker.link(g_tcp_connection_get_type, "g_tcp_connection_get_type", LIBRARY_GIO); Linker.link(g_tcp_connection_get_graceful_disconnect, "g_tcp_connection_get_graceful_disconnect", LIBRARY_GIO); Linker.link(g_tcp_connection_set_graceful_disconnect, "g_tcp_connection_set_graceful_disconnect", LIBRARY_GIO); // gio.TcpWrapperConnection Linker.link(g_tcp_wrapper_connection_get_type, "g_tcp_wrapper_connection_get_type", LIBRARY_GIO); Linker.link(g_tcp_wrapper_connection_new, "g_tcp_wrapper_connection_new", LIBRARY_GIO); Linker.link(g_tcp_wrapper_connection_get_base_io_stream, "g_tcp_wrapper_connection_get_base_io_stream", LIBRARY_GIO); // gio.TestDBus Linker.link(g_test_dbus_get_type, "g_test_dbus_get_type", LIBRARY_GIO); Linker.link(g_test_dbus_new, "g_test_dbus_new", LIBRARY_GIO); Linker.link(g_test_dbus_unset, "g_test_dbus_unset", LIBRARY_GIO); Linker.link(g_test_dbus_add_service_dir, "g_test_dbus_add_service_dir", LIBRARY_GIO); Linker.link(g_test_dbus_down, "g_test_dbus_down", LIBRARY_GIO); Linker.link(g_test_dbus_get_bus_address, "g_test_dbus_get_bus_address", LIBRARY_GIO); Linker.link(g_test_dbus_get_flags, "g_test_dbus_get_flags", LIBRARY_GIO); Linker.link(g_test_dbus_stop, "g_test_dbus_stop", LIBRARY_GIO); Linker.link(g_test_dbus_up, "g_test_dbus_up", LIBRARY_GIO); // gio.ThemedIcon Linker.link(g_themed_icon_get_type, "g_themed_icon_get_type", LIBRARY_GIO); Linker.link(g_themed_icon_new, "g_themed_icon_new", LIBRARY_GIO); Linker.link(g_themed_icon_new_from_names, "g_themed_icon_new_from_names", LIBRARY_GIO); Linker.link(g_themed_icon_new_with_default_fallbacks, "g_themed_icon_new_with_default_fallbacks", LIBRARY_GIO); Linker.link(g_themed_icon_append_name, "g_themed_icon_append_name", LIBRARY_GIO); Linker.link(g_themed_icon_get_names, "g_themed_icon_get_names", LIBRARY_GIO); Linker.link(g_themed_icon_prepend_name, "g_themed_icon_prepend_name", LIBRARY_GIO); // gio.ThreadedSocketService Linker.link(g_threaded_socket_service_get_type, "g_threaded_socket_service_get_type", LIBRARY_GIO); Linker.link(g_threaded_socket_service_new, "g_threaded_socket_service_new", LIBRARY_GIO); // gio.TlsBackend Linker.link(g_tls_backend_get_type, "g_tls_backend_get_type", LIBRARY_GIO); Linker.link(g_tls_backend_get_default, "g_tls_backend_get_default", LIBRARY_GIO); Linker.link(g_tls_backend_get_certificate_type, "g_tls_backend_get_certificate_type", LIBRARY_GIO); Linker.link(g_tls_backend_get_client_connection_type, "g_tls_backend_get_client_connection_type", LIBRARY_GIO); Linker.link(g_tls_backend_get_default_database, "g_tls_backend_get_default_database", LIBRARY_GIO); Linker.link(g_tls_backend_get_dtls_client_connection_type, "g_tls_backend_get_dtls_client_connection_type", LIBRARY_GIO); Linker.link(g_tls_backend_get_dtls_server_connection_type, "g_tls_backend_get_dtls_server_connection_type", LIBRARY_GIO); Linker.link(g_tls_backend_get_file_database_type, "g_tls_backend_get_file_database_type", LIBRARY_GIO); Linker.link(g_tls_backend_get_server_connection_type, "g_tls_backend_get_server_connection_type", LIBRARY_GIO); Linker.link(g_tls_backend_supports_dtls, "g_tls_backend_supports_dtls", LIBRARY_GIO); Linker.link(g_tls_backend_supports_tls, "g_tls_backend_supports_tls", LIBRARY_GIO); // gio.TlsCertificate Linker.link(g_tls_certificate_get_type, "g_tls_certificate_get_type", LIBRARY_GIO); Linker.link(g_tls_certificate_new_from_file, "g_tls_certificate_new_from_file", LIBRARY_GIO); Linker.link(g_tls_certificate_new_from_files, "g_tls_certificate_new_from_files", LIBRARY_GIO); Linker.link(g_tls_certificate_new_from_pem, "g_tls_certificate_new_from_pem", LIBRARY_GIO); Linker.link(g_tls_certificate_list_new_from_file, "g_tls_certificate_list_new_from_file", LIBRARY_GIO); Linker.link(g_tls_certificate_get_issuer, "g_tls_certificate_get_issuer", LIBRARY_GIO); Linker.link(g_tls_certificate_is_same, "g_tls_certificate_is_same", LIBRARY_GIO); Linker.link(g_tls_certificate_verify, "g_tls_certificate_verify", LIBRARY_GIO); // gio.TlsClientConnection Linker.link(g_tls_client_connection_get_type, "g_tls_client_connection_get_type", LIBRARY_GIO); Linker.link(g_tls_client_connection_new, "g_tls_client_connection_new", LIBRARY_GIO); Linker.link(g_tls_client_connection_copy_session_state, "g_tls_client_connection_copy_session_state", LIBRARY_GIO); Linker.link(g_tls_client_connection_get_accepted_cas, "g_tls_client_connection_get_accepted_cas", LIBRARY_GIO); Linker.link(g_tls_client_connection_get_server_identity, "g_tls_client_connection_get_server_identity", LIBRARY_GIO); Linker.link(g_tls_client_connection_get_use_ssl3, "g_tls_client_connection_get_use_ssl3", LIBRARY_GIO); Linker.link(g_tls_client_connection_get_validation_flags, "g_tls_client_connection_get_validation_flags", LIBRARY_GIO); Linker.link(g_tls_client_connection_set_server_identity, "g_tls_client_connection_set_server_identity", LIBRARY_GIO); Linker.link(g_tls_client_connection_set_use_ssl3, "g_tls_client_connection_set_use_ssl3", LIBRARY_GIO); Linker.link(g_tls_client_connection_set_validation_flags, "g_tls_client_connection_set_validation_flags", LIBRARY_GIO); // gio.TlsConnection Linker.link(g_tls_connection_get_type, "g_tls_connection_get_type", LIBRARY_GIO); Linker.link(g_tls_connection_emit_accept_certificate, "g_tls_connection_emit_accept_certificate", LIBRARY_GIO); Linker.link(g_tls_connection_get_certificate, "g_tls_connection_get_certificate", LIBRARY_GIO); Linker.link(g_tls_connection_get_database, "g_tls_connection_get_database", LIBRARY_GIO); Linker.link(g_tls_connection_get_interaction, "g_tls_connection_get_interaction", LIBRARY_GIO); Linker.link(g_tls_connection_get_peer_certificate, "g_tls_connection_get_peer_certificate", LIBRARY_GIO); Linker.link(g_tls_connection_get_peer_certificate_errors, "g_tls_connection_get_peer_certificate_errors", LIBRARY_GIO); Linker.link(g_tls_connection_get_rehandshake_mode, "g_tls_connection_get_rehandshake_mode", LIBRARY_GIO); Linker.link(g_tls_connection_get_require_close_notify, "g_tls_connection_get_require_close_notify", LIBRARY_GIO); Linker.link(g_tls_connection_get_use_system_certdb, "g_tls_connection_get_use_system_certdb", LIBRARY_GIO); Linker.link(g_tls_connection_handshake, "g_tls_connection_handshake", LIBRARY_GIO); Linker.link(g_tls_connection_handshake_async, "g_tls_connection_handshake_async", LIBRARY_GIO); Linker.link(g_tls_connection_handshake_finish, "g_tls_connection_handshake_finish", LIBRARY_GIO); Linker.link(g_tls_connection_set_certificate, "g_tls_connection_set_certificate", LIBRARY_GIO); Linker.link(g_tls_connection_set_database, "g_tls_connection_set_database", LIBRARY_GIO); Linker.link(g_tls_connection_set_interaction, "g_tls_connection_set_interaction", LIBRARY_GIO); Linker.link(g_tls_connection_set_rehandshake_mode, "g_tls_connection_set_rehandshake_mode", LIBRARY_GIO); Linker.link(g_tls_connection_set_require_close_notify, "g_tls_connection_set_require_close_notify", LIBRARY_GIO); Linker.link(g_tls_connection_set_use_system_certdb, "g_tls_connection_set_use_system_certdb", LIBRARY_GIO); // gio.TlsDatabase Linker.link(g_tls_database_get_type, "g_tls_database_get_type", LIBRARY_GIO); Linker.link(g_tls_database_create_certificate_handle, "g_tls_database_create_certificate_handle", LIBRARY_GIO); Linker.link(g_tls_database_lookup_certificate_for_handle, "g_tls_database_lookup_certificate_for_handle", LIBRARY_GIO); Linker.link(g_tls_database_lookup_certificate_for_handle_async, "g_tls_database_lookup_certificate_for_handle_async", LIBRARY_GIO); Linker.link(g_tls_database_lookup_certificate_for_handle_finish, "g_tls_database_lookup_certificate_for_handle_finish", LIBRARY_GIO); Linker.link(g_tls_database_lookup_certificate_issuer, "g_tls_database_lookup_certificate_issuer", LIBRARY_GIO); Linker.link(g_tls_database_lookup_certificate_issuer_async, "g_tls_database_lookup_certificate_issuer_async", LIBRARY_GIO); Linker.link(g_tls_database_lookup_certificate_issuer_finish, "g_tls_database_lookup_certificate_issuer_finish", LIBRARY_GIO); Linker.link(g_tls_database_lookup_certificates_issued_by, "g_tls_database_lookup_certificates_issued_by", LIBRARY_GIO); Linker.link(g_tls_database_lookup_certificates_issued_by_async, "g_tls_database_lookup_certificates_issued_by_async", LIBRARY_GIO); Linker.link(g_tls_database_lookup_certificates_issued_by_finish, "g_tls_database_lookup_certificates_issued_by_finish", LIBRARY_GIO); Linker.link(g_tls_database_verify_chain, "g_tls_database_verify_chain", LIBRARY_GIO); Linker.link(g_tls_database_verify_chain_async, "g_tls_database_verify_chain_async", LIBRARY_GIO); Linker.link(g_tls_database_verify_chain_finish, "g_tls_database_verify_chain_finish", LIBRARY_GIO); // gio.TlsFileDatabase Linker.link(g_tls_file_database_get_type, "g_tls_file_database_get_type", LIBRARY_GIO); Linker.link(g_tls_file_database_new, "g_tls_file_database_new", LIBRARY_GIO); // gio.TlsInteraction Linker.link(g_tls_interaction_get_type, "g_tls_interaction_get_type", LIBRARY_GIO); Linker.link(g_tls_interaction_ask_password, "g_tls_interaction_ask_password", LIBRARY_GIO); Linker.link(g_tls_interaction_ask_password_async, "g_tls_interaction_ask_password_async", LIBRARY_GIO); Linker.link(g_tls_interaction_ask_password_finish, "g_tls_interaction_ask_password_finish", LIBRARY_GIO); Linker.link(g_tls_interaction_invoke_ask_password, "g_tls_interaction_invoke_ask_password", LIBRARY_GIO); Linker.link(g_tls_interaction_invoke_request_certificate, "g_tls_interaction_invoke_request_certificate", LIBRARY_GIO); Linker.link(g_tls_interaction_request_certificate, "g_tls_interaction_request_certificate", LIBRARY_GIO); Linker.link(g_tls_interaction_request_certificate_async, "g_tls_interaction_request_certificate_async", LIBRARY_GIO); Linker.link(g_tls_interaction_request_certificate_finish, "g_tls_interaction_request_certificate_finish", LIBRARY_GIO); // gio.TlsPassword Linker.link(g_tls_password_get_type, "g_tls_password_get_type", LIBRARY_GIO); Linker.link(g_tls_password_new, "g_tls_password_new", LIBRARY_GIO); Linker.link(g_tls_password_get_description, "g_tls_password_get_description", LIBRARY_GIO); Linker.link(g_tls_password_get_flags, "g_tls_password_get_flags", LIBRARY_GIO); Linker.link(g_tls_password_get_value, "g_tls_password_get_value", LIBRARY_GIO); Linker.link(g_tls_password_get_warning, "g_tls_password_get_warning", LIBRARY_GIO); Linker.link(g_tls_password_set_description, "g_tls_password_set_description", LIBRARY_GIO); Linker.link(g_tls_password_set_flags, "g_tls_password_set_flags", LIBRARY_GIO); Linker.link(g_tls_password_set_value, "g_tls_password_set_value", LIBRARY_GIO); Linker.link(g_tls_password_set_value_full, "g_tls_password_set_value_full", LIBRARY_GIO); Linker.link(g_tls_password_set_warning, "g_tls_password_set_warning", LIBRARY_GIO); // gio.TlsServerConnection Linker.link(g_tls_server_connection_get_type, "g_tls_server_connection_get_type", LIBRARY_GIO); Linker.link(g_tls_server_connection_new, "g_tls_server_connection_new", LIBRARY_GIO); // gio.UnixConnection Linker.link(g_unix_connection_get_type, "g_unix_connection_get_type", LIBRARY_GIO); Linker.link(g_unix_connection_receive_credentials, "g_unix_connection_receive_credentials", LIBRARY_GIO); Linker.link(g_unix_connection_receive_credentials_async, "g_unix_connection_receive_credentials_async", LIBRARY_GIO); Linker.link(g_unix_connection_receive_credentials_finish, "g_unix_connection_receive_credentials_finish", LIBRARY_GIO); Linker.link(g_unix_connection_receive_fd, "g_unix_connection_receive_fd", LIBRARY_GIO); Linker.link(g_unix_connection_send_credentials, "g_unix_connection_send_credentials", LIBRARY_GIO); Linker.link(g_unix_connection_send_credentials_async, "g_unix_connection_send_credentials_async", LIBRARY_GIO); Linker.link(g_unix_connection_send_credentials_finish, "g_unix_connection_send_credentials_finish", LIBRARY_GIO); Linker.link(g_unix_connection_send_fd, "g_unix_connection_send_fd", LIBRARY_GIO); // gio.UnixCredentialsMessage Linker.link(g_unix_credentials_message_get_type, "g_unix_credentials_message_get_type", LIBRARY_GIO); Linker.link(g_unix_credentials_message_new, "g_unix_credentials_message_new", LIBRARY_GIO); Linker.link(g_unix_credentials_message_new_with_credentials, "g_unix_credentials_message_new_with_credentials", LIBRARY_GIO); Linker.link(g_unix_credentials_message_is_supported, "g_unix_credentials_message_is_supported", LIBRARY_GIO); Linker.link(g_unix_credentials_message_get_credentials, "g_unix_credentials_message_get_credentials", LIBRARY_GIO); // gio.UnixFDList Linker.link(g_unix_fd_list_get_type, "g_unix_fd_list_get_type", LIBRARY_GIO); Linker.link(g_unix_fd_list_new, "g_unix_fd_list_new", LIBRARY_GIO); Linker.link(g_unix_fd_list_new_from_array, "g_unix_fd_list_new_from_array", LIBRARY_GIO); Linker.link(g_unix_fd_list_append, "g_unix_fd_list_append", LIBRARY_GIO); Linker.link(g_unix_fd_list_get, "g_unix_fd_list_get", LIBRARY_GIO); Linker.link(g_unix_fd_list_get_length, "g_unix_fd_list_get_length", LIBRARY_GIO); Linker.link(g_unix_fd_list_peek_fds, "g_unix_fd_list_peek_fds", LIBRARY_GIO); Linker.link(g_unix_fd_list_steal_fds, "g_unix_fd_list_steal_fds", LIBRARY_GIO); // gio.UnixFDMessage Linker.link(g_unix_fd_message_get_type, "g_unix_fd_message_get_type", LIBRARY_GIO); Linker.link(g_unix_fd_message_new, "g_unix_fd_message_new", LIBRARY_GIO); Linker.link(g_unix_fd_message_new_with_fd_list, "g_unix_fd_message_new_with_fd_list", LIBRARY_GIO); Linker.link(g_unix_fd_message_append_fd, "g_unix_fd_message_append_fd", LIBRARY_GIO); Linker.link(g_unix_fd_message_get_fd_list, "g_unix_fd_message_get_fd_list", LIBRARY_GIO); Linker.link(g_unix_fd_message_steal_fds, "g_unix_fd_message_steal_fds", LIBRARY_GIO); // gio.UnixInputStream Linker.link(g_unix_input_stream_get_type, "g_unix_input_stream_get_type", LIBRARY_GIO); Linker.link(g_unix_input_stream_new, "g_unix_input_stream_new", LIBRARY_GIO); Linker.link(g_unix_input_stream_get_close_fd, "g_unix_input_stream_get_close_fd", LIBRARY_GIO); Linker.link(g_unix_input_stream_get_fd, "g_unix_input_stream_get_fd", LIBRARY_GIO); Linker.link(g_unix_input_stream_set_close_fd, "g_unix_input_stream_set_close_fd", LIBRARY_GIO); // gio.UnixMountEntry Linker.link(g_unix_mount_entry_get_type, "g_unix_mount_entry_get_type", LIBRARY_GIO); Linker.link(g_unix_is_mount_path_system_internal, "g_unix_is_mount_path_system_internal", LIBRARY_GIO); Linker.link(g_unix_mount_at, "g_unix_mount_at", LIBRARY_GIO); Linker.link(g_unix_mount_compare, "g_unix_mount_compare", LIBRARY_GIO); Linker.link(g_unix_mount_free, "g_unix_mount_free", LIBRARY_GIO); Linker.link(g_unix_mount_get_device_path, "g_unix_mount_get_device_path", LIBRARY_GIO); Linker.link(g_unix_mount_get_fs_type, "g_unix_mount_get_fs_type", LIBRARY_GIO); Linker.link(g_unix_mount_get_mount_path, "g_unix_mount_get_mount_path", LIBRARY_GIO); Linker.link(g_unix_mount_guess_can_eject, "g_unix_mount_guess_can_eject", LIBRARY_GIO); Linker.link(g_unix_mount_guess_icon, "g_unix_mount_guess_icon", LIBRARY_GIO); Linker.link(g_unix_mount_guess_name, "g_unix_mount_guess_name", LIBRARY_GIO); Linker.link(g_unix_mount_guess_should_display, "g_unix_mount_guess_should_display", LIBRARY_GIO); Linker.link(g_unix_mount_guess_symbolic_icon, "g_unix_mount_guess_symbolic_icon", LIBRARY_GIO); Linker.link(g_unix_mount_is_readonly, "g_unix_mount_is_readonly", LIBRARY_GIO); Linker.link(g_unix_mount_is_system_internal, "g_unix_mount_is_system_internal", LIBRARY_GIO); Linker.link(g_unix_mount_points_changed_since, "g_unix_mount_points_changed_since", LIBRARY_GIO); Linker.link(g_unix_mount_points_get, "g_unix_mount_points_get", LIBRARY_GIO); Linker.link(g_unix_mounts_changed_since, "g_unix_mounts_changed_since", LIBRARY_GIO); Linker.link(g_unix_mounts_get, "g_unix_mounts_get", LIBRARY_GIO); Linker.link(g_unix_mount_copy, "g_unix_mount_copy", LIBRARY_GIO); Linker.link(g_unix_mount_for, "g_unix_mount_for", LIBRARY_GIO); // gio.UnixMountMonitor Linker.link(g_unix_mount_monitor_get_type, "g_unix_mount_monitor_get_type", LIBRARY_GIO); Linker.link(g_unix_mount_monitor_new, "g_unix_mount_monitor_new", LIBRARY_GIO); Linker.link(g_unix_mount_monitor_get, "g_unix_mount_monitor_get", LIBRARY_GIO); Linker.link(g_unix_mount_monitor_set_rate_limit, "g_unix_mount_monitor_set_rate_limit", LIBRARY_GIO); // gio.UnixMountPoint Linker.link(g_unix_mount_point_get_type, "g_unix_mount_point_get_type", LIBRARY_GIO); Linker.link(g_unix_mount_point_compare, "g_unix_mount_point_compare", LIBRARY_GIO); Linker.link(g_unix_mount_point_copy, "g_unix_mount_point_copy", LIBRARY_GIO); Linker.link(g_unix_mount_point_free, "g_unix_mount_point_free", LIBRARY_GIO); Linker.link(g_unix_mount_point_get_device_path, "g_unix_mount_point_get_device_path", LIBRARY_GIO); Linker.link(g_unix_mount_point_get_fs_type, "g_unix_mount_point_get_fs_type", LIBRARY_GIO); Linker.link(g_unix_mount_point_get_mount_path, "g_unix_mount_point_get_mount_path", LIBRARY_GIO); Linker.link(g_unix_mount_point_get_options, "g_unix_mount_point_get_options", LIBRARY_GIO); Linker.link(g_unix_mount_point_guess_can_eject, "g_unix_mount_point_guess_can_eject", LIBRARY_GIO); Linker.link(g_unix_mount_point_guess_icon, "g_unix_mount_point_guess_icon", LIBRARY_GIO); Linker.link(g_unix_mount_point_guess_name, "g_unix_mount_point_guess_name", LIBRARY_GIO); Linker.link(g_unix_mount_point_guess_symbolic_icon, "g_unix_mount_point_guess_symbolic_icon", LIBRARY_GIO); Linker.link(g_unix_mount_point_is_loopback, "g_unix_mount_point_is_loopback", LIBRARY_GIO); Linker.link(g_unix_mount_point_is_readonly, "g_unix_mount_point_is_readonly", LIBRARY_GIO); Linker.link(g_unix_mount_point_is_user_mountable, "g_unix_mount_point_is_user_mountable", LIBRARY_GIO); // gio.UnixOutputStream Linker.link(g_unix_output_stream_get_type, "g_unix_output_stream_get_type", LIBRARY_GIO); Linker.link(g_unix_output_stream_new, "g_unix_output_stream_new", LIBRARY_GIO); Linker.link(g_unix_output_stream_get_close_fd, "g_unix_output_stream_get_close_fd", LIBRARY_GIO); Linker.link(g_unix_output_stream_get_fd, "g_unix_output_stream_get_fd", LIBRARY_GIO); Linker.link(g_unix_output_stream_set_close_fd, "g_unix_output_stream_set_close_fd", LIBRARY_GIO); // gio.UnixSocketAddress Linker.link(g_unix_socket_address_get_type, "g_unix_socket_address_get_type", LIBRARY_GIO); Linker.link(g_unix_socket_address_new, "g_unix_socket_address_new", LIBRARY_GIO); Linker.link(g_unix_socket_address_new_abstract, "g_unix_socket_address_new_abstract", LIBRARY_GIO); Linker.link(g_unix_socket_address_new_with_type, "g_unix_socket_address_new_with_type", LIBRARY_GIO); Linker.link(g_unix_socket_address_abstract_names_supported, "g_unix_socket_address_abstract_names_supported", LIBRARY_GIO); Linker.link(g_unix_socket_address_get_address_type, "g_unix_socket_address_get_address_type", LIBRARY_GIO); Linker.link(g_unix_socket_address_get_is_abstract, "g_unix_socket_address_get_is_abstract", LIBRARY_GIO); Linker.link(g_unix_socket_address_get_path, "g_unix_socket_address_get_path", LIBRARY_GIO); Linker.link(g_unix_socket_address_get_path_len, "g_unix_socket_address_get_path_len", LIBRARY_GIO); // gio.Vfs Linker.link(g_vfs_get_type, "g_vfs_get_type", LIBRARY_GIO); Linker.link(g_vfs_get_default, "g_vfs_get_default", LIBRARY_GIO); Linker.link(g_vfs_get_local, "g_vfs_get_local", LIBRARY_GIO); Linker.link(g_vfs_get_file_for_path, "g_vfs_get_file_for_path", LIBRARY_GIO); Linker.link(g_vfs_get_file_for_uri, "g_vfs_get_file_for_uri", LIBRARY_GIO); Linker.link(g_vfs_get_supported_uri_schemes, "g_vfs_get_supported_uri_schemes", LIBRARY_GIO); Linker.link(g_vfs_is_active, "g_vfs_is_active", LIBRARY_GIO); Linker.link(g_vfs_parse_name, "g_vfs_parse_name", LIBRARY_GIO); Linker.link(g_vfs_register_uri_scheme, "g_vfs_register_uri_scheme", LIBRARY_GIO); Linker.link(g_vfs_unregister_uri_scheme, "g_vfs_unregister_uri_scheme", LIBRARY_GIO); // gio.Volume Linker.link(g_volume_get_type, "g_volume_get_type", LIBRARY_GIO); Linker.link(g_volume_can_eject, "g_volume_can_eject", LIBRARY_GIO); Linker.link(g_volume_can_mount, "g_volume_can_mount", LIBRARY_GIO); Linker.link(g_volume_eject, "g_volume_eject", LIBRARY_GIO); Linker.link(g_volume_eject_finish, "g_volume_eject_finish", LIBRARY_GIO); Linker.link(g_volume_eject_with_operation, "g_volume_eject_with_operation", LIBRARY_GIO); Linker.link(g_volume_eject_with_operation_finish, "g_volume_eject_with_operation_finish", LIBRARY_GIO); Linker.link(g_volume_enumerate_identifiers, "g_volume_enumerate_identifiers", LIBRARY_GIO); Linker.link(g_volume_get_activation_root, "g_volume_get_activation_root", LIBRARY_GIO); Linker.link(g_volume_get_drive, "g_volume_get_drive", LIBRARY_GIO); Linker.link(g_volume_get_icon, "g_volume_get_icon", LIBRARY_GIO); Linker.link(g_volume_get_identifier, "g_volume_get_identifier", LIBRARY_GIO); Linker.link(g_volume_get_mount, "g_volume_get_mount", LIBRARY_GIO); Linker.link(g_volume_get_name, "g_volume_get_name", LIBRARY_GIO); Linker.link(g_volume_get_sort_key, "g_volume_get_sort_key", LIBRARY_GIO); Linker.link(g_volume_get_symbolic_icon, "g_volume_get_symbolic_icon", LIBRARY_GIO); Linker.link(g_volume_get_uuid, "g_volume_get_uuid", LIBRARY_GIO); Linker.link(g_volume_mount, "g_volume_mount", LIBRARY_GIO); Linker.link(g_volume_mount_finish, "g_volume_mount_finish", LIBRARY_GIO); Linker.link(g_volume_should_automount, "g_volume_should_automount", LIBRARY_GIO); // gio.VolumeMonitor Linker.link(g_volume_monitor_get_type, "g_volume_monitor_get_type", LIBRARY_GIO); Linker.link(g_volume_monitor_adopt_orphan_mount, "g_volume_monitor_adopt_orphan_mount", LIBRARY_GIO); Linker.link(g_volume_monitor_get, "g_volume_monitor_get", LIBRARY_GIO); Linker.link(g_volume_monitor_get_connected_drives, "g_volume_monitor_get_connected_drives", LIBRARY_GIO); Linker.link(g_volume_monitor_get_mount_for_uuid, "g_volume_monitor_get_mount_for_uuid", LIBRARY_GIO); Linker.link(g_volume_monitor_get_mounts, "g_volume_monitor_get_mounts", LIBRARY_GIO); Linker.link(g_volume_monitor_get_volume_for_uuid, "g_volume_monitor_get_volume_for_uuid", LIBRARY_GIO); Linker.link(g_volume_monitor_get_volumes, "g_volume_monitor_get_volumes", LIBRARY_GIO); // gio.ZlibCompressor Linker.link(g_zlib_compressor_get_type, "g_zlib_compressor_get_type", LIBRARY_GIO); Linker.link(g_zlib_compressor_new, "g_zlib_compressor_new", LIBRARY_GIO); Linker.link(g_zlib_compressor_get_file_info, "g_zlib_compressor_get_file_info", LIBRARY_GIO); Linker.link(g_zlib_compressor_set_file_info, "g_zlib_compressor_set_file_info", LIBRARY_GIO); // gio.ZlibDecompressor Linker.link(g_zlib_decompressor_get_type, "g_zlib_decompressor_get_type", LIBRARY_GIO); Linker.link(g_zlib_decompressor_new, "g_zlib_decompressor_new", LIBRARY_GIO); Linker.link(g_zlib_decompressor_get_file_info, "g_zlib_decompressor_get_file_info", LIBRARY_GIO); // gio.PollableUtils Linker.link(g_pollable_source_new, "g_pollable_source_new", LIBRARY_GIO); Linker.link(g_pollable_source_new_full, "g_pollable_source_new_full", LIBRARY_GIO); Linker.link(g_pollable_stream_read, "g_pollable_stream_read", LIBRARY_GIO); Linker.link(g_pollable_stream_write, "g_pollable_stream_write", LIBRARY_GIO); Linker.link(g_pollable_stream_write_all, "g_pollable_stream_write_all", LIBRARY_GIO); // gio.DBusNames Linker.link(g_bus_own_name, "g_bus_own_name", LIBRARY_GIO); Linker.link(g_bus_own_name_on_connection, "g_bus_own_name_on_connection", LIBRARY_GIO); Linker.link(g_bus_own_name_on_connection_with_closures, "g_bus_own_name_on_connection_with_closures", LIBRARY_GIO); Linker.link(g_bus_own_name_with_closures, "g_bus_own_name_with_closures", LIBRARY_GIO); Linker.link(g_bus_unown_name, "g_bus_unown_name", LIBRARY_GIO); Linker.link(g_bus_unwatch_name, "g_bus_unwatch_name", LIBRARY_GIO); Linker.link(g_bus_watch_name, "g_bus_watch_name", LIBRARY_GIO); Linker.link(g_bus_watch_name_on_connection, "g_bus_watch_name_on_connection", LIBRARY_GIO); Linker.link(g_bus_watch_name_on_connection_with_closures, "g_bus_watch_name_on_connection_with_closures", LIBRARY_GIO); Linker.link(g_bus_watch_name_with_closures, "g_bus_watch_name_with_closures", LIBRARY_GIO); // gio.ContentType Linker.link(g_content_type_can_be_executable, "g_content_type_can_be_executable", LIBRARY_GIO); Linker.link(g_content_type_equals, "g_content_type_equals", LIBRARY_GIO); Linker.link(g_content_type_from_mime_type, "g_content_type_from_mime_type", LIBRARY_GIO); Linker.link(g_content_type_get_description, "g_content_type_get_description", LIBRARY_GIO); Linker.link(g_content_type_get_generic_icon_name, "g_content_type_get_generic_icon_name", LIBRARY_GIO); Linker.link(g_content_type_get_icon, "g_content_type_get_icon", LIBRARY_GIO); Linker.link(g_content_type_get_mime_type, "g_content_type_get_mime_type", LIBRARY_GIO); Linker.link(g_content_type_get_symbolic_icon, "g_content_type_get_symbolic_icon", LIBRARY_GIO); Linker.link(g_content_type_guess, "g_content_type_guess", LIBRARY_GIO); Linker.link(g_content_type_guess_for_tree, "g_content_type_guess_for_tree", LIBRARY_GIO); Linker.link(g_content_type_is_a, "g_content_type_is_a", LIBRARY_GIO); Linker.link(g_content_type_is_unknown, "g_content_type_is_unknown", LIBRARY_GIO); Linker.link(g_content_types_get_registered, "g_content_types_get_registered", LIBRARY_GIO); Linker.link(g_content_type_is_mime_type, "g_content_type_is_mime_type", LIBRARY_GIO); // gio.DBusError Linker.link(g_dbus_error_encode_gerror, "g_dbus_error_encode_gerror", LIBRARY_GIO); Linker.link(g_dbus_error_get_remote_error, "g_dbus_error_get_remote_error", LIBRARY_GIO); Linker.link(g_dbus_error_is_remote_error, "g_dbus_error_is_remote_error", LIBRARY_GIO); Linker.link(g_dbus_error_new_for_dbus_error, "g_dbus_error_new_for_dbus_error", LIBRARY_GIO); Linker.link(g_dbus_error_quark, "g_dbus_error_quark", LIBRARY_GIO); Linker.link(g_dbus_error_register_error, "g_dbus_error_register_error", LIBRARY_GIO); Linker.link(g_dbus_error_register_error_domain, "g_dbus_error_register_error_domain", LIBRARY_GIO); Linker.link(g_dbus_error_strip_remote_error, "g_dbus_error_strip_remote_error", LIBRARY_GIO); Linker.link(g_dbus_error_unregister_error, "g_dbus_error_unregister_error", LIBRARY_GIO); // gio.DBusUtilities Linker.link(g_dbus_address_escape_value, "g_dbus_address_escape_value", LIBRARY_GIO); Linker.link(g_dbus_address_get_for_bus_sync, "g_dbus_address_get_for_bus_sync", LIBRARY_GIO); Linker.link(g_dbus_address_get_stream, "g_dbus_address_get_stream", LIBRARY_GIO); Linker.link(g_dbus_address_get_stream_finish, "g_dbus_address_get_stream_finish", LIBRARY_GIO); Linker.link(g_dbus_address_get_stream_sync, "g_dbus_address_get_stream_sync", LIBRARY_GIO); Linker.link(g_dbus_generate_guid, "g_dbus_generate_guid", LIBRARY_GIO); Linker.link(g_dbus_gvalue_to_gvariant, "g_dbus_gvalue_to_gvariant", LIBRARY_GIO); Linker.link(g_dbus_gvariant_to_gvalue, "g_dbus_gvariant_to_gvalue", LIBRARY_GIO); Linker.link(g_dbus_is_address, "g_dbus_is_address", LIBRARY_GIO); Linker.link(g_dbus_is_guid, "g_dbus_is_guid", LIBRARY_GIO); Linker.link(g_dbus_is_interface_name, "g_dbus_is_interface_name", LIBRARY_GIO); Linker.link(g_dbus_is_member_name, "g_dbus_is_member_name", LIBRARY_GIO); Linker.link(g_dbus_is_name, "g_dbus_is_name", LIBRARY_GIO); Linker.link(g_dbus_is_supported_address, "g_dbus_is_supported_address", LIBRARY_GIO); Linker.link(g_dbus_is_unique_name, "g_dbus_is_unique_name", LIBRARY_GIO); // gio.ErrorGIO Linker.link(g_io_error_from_errno, "g_io_error_from_errno", LIBRARY_GIO); Linker.link(g_io_error_quark, "g_io_error_quark", LIBRARY_GIO); } __gshared extern(C) { // gio.Action GType function() c_g_action_get_type; int function(const(char)* actionName) c_g_action_name_is_valid; int function(const(char)* detailedName, char** actionName, GVariant** targetValue, GError** err) c_g_action_parse_detailed_name; char* function(const(char)* actionName, GVariant* targetValue) c_g_action_print_detailed_name; void function(GAction* action, GVariant* parameter) c_g_action_activate; void function(GAction* action, GVariant* value) c_g_action_change_state; int function(GAction* action) c_g_action_get_enabled; const(char)* function(GAction* action) c_g_action_get_name; GVariantType* function(GAction* action) c_g_action_get_parameter_type; GVariant* function(GAction* action) c_g_action_get_state; GVariant* function(GAction* action) c_g_action_get_state_hint; GVariantType* function(GAction* action) c_g_action_get_state_type; // gio.ActionGroup GType function() c_g_action_group_get_type; void function(GActionGroup* actionGroup, const(char)* actionName) c_g_action_group_action_added; void function(GActionGroup* actionGroup, const(char)* actionName, int enabled) c_g_action_group_action_enabled_changed; void function(GActionGroup* actionGroup, const(char)* actionName) c_g_action_group_action_removed; void function(GActionGroup* actionGroup, const(char)* actionName, GVariant* state) c_g_action_group_action_state_changed; void function(GActionGroup* actionGroup, const(char)* actionName, GVariant* parameter) c_g_action_group_activate_action; void function(GActionGroup* actionGroup, const(char)* actionName, GVariant* value) c_g_action_group_change_action_state; int function(GActionGroup* actionGroup, const(char)* actionName) c_g_action_group_get_action_enabled; GVariantType* function(GActionGroup* actionGroup, const(char)* actionName) c_g_action_group_get_action_parameter_type; GVariant* function(GActionGroup* actionGroup, const(char)* actionName) c_g_action_group_get_action_state; GVariant* function(GActionGroup* actionGroup, const(char)* actionName) c_g_action_group_get_action_state_hint; GVariantType* function(GActionGroup* actionGroup, const(char)* actionName) c_g_action_group_get_action_state_type; int function(GActionGroup* actionGroup, const(char)* actionName) c_g_action_group_has_action; char** function(GActionGroup* actionGroup) c_g_action_group_list_actions; int function(GActionGroup* actionGroup, const(char)* actionName, int* enabled, GVariantType** parameterType, GVariantType** stateType, GVariant** stateHint, GVariant** state) c_g_action_group_query_action; // gio.ActionMap GType function() c_g_action_map_get_type; void function(GActionMap* actionMap, GAction* action) c_g_action_map_add_action; void function(GActionMap* actionMap, GActionEntry* entries, int nEntries, void* userData) c_g_action_map_add_action_entries; GAction* function(GActionMap* actionMap, const(char)* actionName) c_g_action_map_lookup_action; void function(GActionMap* actionMap, const(char)* actionName) c_g_action_map_remove_action; // gio.AppInfo GType function() c_g_app_info_get_type; GAppInfo* function(const(char)* commandline, const(char)* applicationName, GAppInfoCreateFlags flags, GError** err) c_g_app_info_create_from_commandline; GList* function() c_g_app_info_get_all; GList* function(const(char)* contentType) c_g_app_info_get_all_for_type; GAppInfo* function(const(char)* contentType, int mustSupportUris) c_g_app_info_get_default_for_type; GAppInfo* function(const(char)* uriScheme) c_g_app_info_get_default_for_uri_scheme; GList* function(const(char)* contentType) c_g_app_info_get_fallback_for_type; GList* function(const(char)* contentType) c_g_app_info_get_recommended_for_type; int function(const(char)* uri, GAppLaunchContext* launchContext, GError** err) c_g_app_info_launch_default_for_uri; void function(const(char)* uri, GAppLaunchContext* launchContext, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_app_info_launch_default_for_uri_async; int function(GAsyncResult* result, GError** err) c_g_app_info_launch_default_for_uri_finish; void function(const(char)* contentType) c_g_app_info_reset_type_associations; int function(GAppInfo* appinfo, const(char)* contentType, GError** err) c_g_app_info_add_supports_type; int function(GAppInfo* appinfo) c_g_app_info_can_delete; int function(GAppInfo* appinfo) c_g_app_info_can_remove_supports_type; int function(GAppInfo* appinfo) c_g_app_info_delete; GAppInfo* function(GAppInfo* appinfo) c_g_app_info_dup; int function(GAppInfo* appinfo1, GAppInfo* appinfo2) c_g_app_info_equal; char* function(GAppInfo* appinfo) c_g_app_info_get_commandline; const(char)* function(GAppInfo* appinfo) c_g_app_info_get_description; const(char)* function(GAppInfo* appinfo) c_g_app_info_get_display_name; char* function(GAppInfo* appinfo) c_g_app_info_get_executable; GIcon* function(GAppInfo* appinfo) c_g_app_info_get_icon; const(char)* function(GAppInfo* appinfo) c_g_app_info_get_id; const(char)* function(GAppInfo* appinfo) c_g_app_info_get_name; char** function(GAppInfo* appinfo) c_g_app_info_get_supported_types; int function(GAppInfo* appinfo, GList* files, GAppLaunchContext* launchContext, GError** err) c_g_app_info_launch; int function(GAppInfo* appinfo, GList* uris, GAppLaunchContext* launchContext, GError** err) c_g_app_info_launch_uris; int function(GAppInfo* appinfo, const(char)* contentType, GError** err) c_g_app_info_remove_supports_type; int function(GAppInfo* appinfo, char* extension, GError** err) c_g_app_info_set_as_default_for_extension; int function(GAppInfo* appinfo, const(char)* contentType, GError** err) c_g_app_info_set_as_default_for_type; int function(GAppInfo* appinfo, const(char)* contentType, GError** err) c_g_app_info_set_as_last_used_for_type; int function(GAppInfo* appinfo) c_g_app_info_should_show; int function(GAppInfo* appinfo) c_g_app_info_supports_files; int function(GAppInfo* appinfo) c_g_app_info_supports_uris; // gio.AppInfoMonitor GType function() c_g_app_info_monitor_get_type; GAppInfoMonitor* function() c_g_app_info_monitor_get; // gio.AppLaunchContext GType function() c_g_app_launch_context_get_type; GAppLaunchContext* function() c_g_app_launch_context_new; char* function(GAppLaunchContext* context, GAppInfo* info, GList* files) c_g_app_launch_context_get_display; char** function(GAppLaunchContext* context) c_g_app_launch_context_get_environment; char* function(GAppLaunchContext* context, GAppInfo* info, GList* files) c_g_app_launch_context_get_startup_notify_id; void function(GAppLaunchContext* context, const(char)* startupNotifyId) c_g_app_launch_context_launch_failed; void function(GAppLaunchContext* context, const(char)* variable, const(char)* value) c_g_app_launch_context_setenv; void function(GAppLaunchContext* context, const(char)* variable) c_g_app_launch_context_unsetenv; // gio.Application GType function() c_g_application_get_type; GApplication* function(const(char)* applicationId, GApplicationFlags flags) c_g_application_new; GApplication* function() c_g_application_get_default; int function(const(char)* applicationId) c_g_application_id_is_valid; void function(GApplication* application) c_g_application_activate; void function(GApplication* application, const(char)* longName, char shortName, GOptionFlags flags, GOptionArg arg, const(char)* description, const(char)* argDescription) c_g_application_add_main_option; void function(GApplication* application, GOptionEntry* entries) c_g_application_add_main_option_entries; void function(GApplication* application, GOptionGroup* group) c_g_application_add_option_group; void function(GApplication* application, void* object, const(char)* property) c_g_application_bind_busy_property; const(char)* function(GApplication* application) c_g_application_get_application_id; GDBusConnection* function(GApplication* application) c_g_application_get_dbus_connection; const(char)* function(GApplication* application) c_g_application_get_dbus_object_path; GApplicationFlags function(GApplication* application) c_g_application_get_flags; uint function(GApplication* application) c_g_application_get_inactivity_timeout; int function(GApplication* application) c_g_application_get_is_busy; int function(GApplication* application) c_g_application_get_is_registered; int function(GApplication* application) c_g_application_get_is_remote; const(char)* function(GApplication* application) c_g_application_get_resource_base_path; void function(GApplication* application) c_g_application_hold; void function(GApplication* application) c_g_application_mark_busy; void function(GApplication* application, GFile** files, int nFiles, const(char)* hint) c_g_application_open; void function(GApplication* application) c_g_application_quit; int function(GApplication* application, GCancellable* cancellable, GError** err) c_g_application_register; void function(GApplication* application) c_g_application_release; int function(GApplication* application, int argc, char** argv) c_g_application_run; void function(GApplication* application, const(char)* id, GNotification* notification) c_g_application_send_notification; void function(GApplication* application, GActionGroup* actionGroup) c_g_application_set_action_group; void function(GApplication* application, const(char)* applicationId) c_g_application_set_application_id; void function(GApplication* application) c_g_application_set_default; void function(GApplication* application, GApplicationFlags flags) c_g_application_set_flags; void function(GApplication* application, uint inactivityTimeout) c_g_application_set_inactivity_timeout; void function(GApplication* application, const(char)* resourcePath) c_g_application_set_resource_base_path; void function(GApplication* application, void* object, const(char)* property) c_g_application_unbind_busy_property; void function(GApplication* application) c_g_application_unmark_busy; void function(GApplication* application, const(char)* id) c_g_application_withdraw_notification; // gio.ApplicationCommandLine GType function() c_g_application_command_line_get_type; GFile* function(GApplicationCommandLine* cmdline, const(char)* arg) c_g_application_command_line_create_file_for_arg; char** function(GApplicationCommandLine* cmdline, int* argc) c_g_application_command_line_get_arguments; char* function(GApplicationCommandLine* cmdline) c_g_application_command_line_get_cwd; char** function(GApplicationCommandLine* cmdline) c_g_application_command_line_get_environ; int function(GApplicationCommandLine* cmdline) c_g_application_command_line_get_exit_status; int function(GApplicationCommandLine* cmdline) c_g_application_command_line_get_is_remote; GVariantDict* function(GApplicationCommandLine* cmdline) c_g_application_command_line_get_options_dict; GVariant* function(GApplicationCommandLine* cmdline) c_g_application_command_line_get_platform_data; GInputStream* function(GApplicationCommandLine* cmdline) c_g_application_command_line_get_stdin; const(char)* function(GApplicationCommandLine* cmdline, const(char)* name) c_g_application_command_line_getenv; void function(GApplicationCommandLine* cmdline, const(char)* format, ... ) c_g_application_command_line_print; void function(GApplicationCommandLine* cmdline, const(char)* format, ... ) c_g_application_command_line_printerr; void function(GApplicationCommandLine* cmdline, int exitStatus) c_g_application_command_line_set_exit_status; // gio.AsyncInitable GType function() c_g_async_initable_get_type; void function(GType objectType, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData, const(char)* firstPropertyName, ... ) c_g_async_initable_new_async; void function(GType objectType, const(char)* firstPropertyName, void* varArgs, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_async_initable_new_valist_async; void function(GType objectType, uint nParameters, GParameter* parameters, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_async_initable_newv_async; void function(GAsyncInitable* initable, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_async_initable_init_async; int function(GAsyncInitable* initable, GAsyncResult* res, GError** err) c_g_async_initable_init_finish; GObject* function(GAsyncInitable* initable, GAsyncResult* res, GError** err) c_g_async_initable_new_finish; // gio.AsyncResult GType function() c_g_async_result_get_type; GObject* function(GAsyncResult* res) c_g_async_result_get_source_object; void* function(GAsyncResult* res) c_g_async_result_get_user_data; int function(GAsyncResult* res, void* sourceTag) c_g_async_result_is_tagged; int function(GAsyncResult* res, GError** err) c_g_async_result_legacy_propagate_error; // gio.BufferedInputStream GType function() c_g_buffered_input_stream_get_type; GInputStream* function(GInputStream* baseStream) c_g_buffered_input_stream_new; GInputStream* function(GInputStream* baseStream, size_t size) c_g_buffered_input_stream_new_sized; ptrdiff_t function(GBufferedInputStream* stream, ptrdiff_t count, GCancellable* cancellable, GError** err) c_g_buffered_input_stream_fill; void function(GBufferedInputStream* stream, ptrdiff_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_buffered_input_stream_fill_async; ptrdiff_t function(GBufferedInputStream* stream, GAsyncResult* result, GError** err) c_g_buffered_input_stream_fill_finish; size_t function(GBufferedInputStream* stream) c_g_buffered_input_stream_get_available; size_t function(GBufferedInputStream* stream) c_g_buffered_input_stream_get_buffer_size; size_t function(GBufferedInputStream* stream, void* buffer, size_t offset, size_t count) c_g_buffered_input_stream_peek; void* function(GBufferedInputStream* stream, size_t* count) c_g_buffered_input_stream_peek_buffer; int function(GBufferedInputStream* stream, GCancellable* cancellable, GError** err) c_g_buffered_input_stream_read_byte; void function(GBufferedInputStream* stream, size_t size) c_g_buffered_input_stream_set_buffer_size; // gio.BufferedOutputStream GType function() c_g_buffered_output_stream_get_type; GOutputStream* function(GOutputStream* baseStream) c_g_buffered_output_stream_new; GOutputStream* function(GOutputStream* baseStream, size_t size) c_g_buffered_output_stream_new_sized; int function(GBufferedOutputStream* stream) c_g_buffered_output_stream_get_auto_grow; size_t function(GBufferedOutputStream* stream) c_g_buffered_output_stream_get_buffer_size; void function(GBufferedOutputStream* stream, int autoGrow) c_g_buffered_output_stream_set_auto_grow; void function(GBufferedOutputStream* stream, size_t size) c_g_buffered_output_stream_set_buffer_size; // gio.BytesIcon GType function() c_g_bytes_icon_get_type; GIcon* function(GBytes* bytes) c_g_bytes_icon_new; GBytes* function(GBytesIcon* icon) c_g_bytes_icon_get_bytes; // gio.Cancellable GType function() c_g_cancellable_get_type; GCancellable* function() c_g_cancellable_new; GCancellable* function() c_g_cancellable_get_current; void function(GCancellable* cancellable) c_g_cancellable_cancel; gulong function(GCancellable* cancellable, GCallback callback, void* data, GDestroyNotify dataDestroyFunc) c_g_cancellable_connect; void function(GCancellable* cancellable, gulong handlerId) c_g_cancellable_disconnect; int function(GCancellable* cancellable) c_g_cancellable_get_fd; int function(GCancellable* cancellable) c_g_cancellable_is_cancelled; int function(GCancellable* cancellable, GPollFD* pollfd) c_g_cancellable_make_pollfd; void function(GCancellable* cancellable) c_g_cancellable_pop_current; void function(GCancellable* cancellable) c_g_cancellable_push_current; void function(GCancellable* cancellable) c_g_cancellable_release_fd; void function(GCancellable* cancellable) c_g_cancellable_reset; int function(GCancellable* cancellable, GError** err) c_g_cancellable_set_error_if_cancelled; GSource* function(GCancellable* cancellable) c_g_cancellable_source_new; // gio.CharsetConverter GType function() c_g_charset_converter_get_type; GCharsetConverter* function(const(char)* toCharset, const(char)* fromCharset, GError** err) c_g_charset_converter_new; uint function(GCharsetConverter* converter) c_g_charset_converter_get_num_fallbacks; int function(GCharsetConverter* converter) c_g_charset_converter_get_use_fallback; void function(GCharsetConverter* converter, int useFallback) c_g_charset_converter_set_use_fallback; // gio.Converter GType function() c_g_converter_get_type; GConverterResult function(GConverter* converter, void* inbuf, size_t inbufSize, void* outbuf, size_t outbufSize, GConverterFlags flags, size_t* bytesRead, size_t* bytesWritten, GError** err) c_g_converter_convert; void function(GConverter* converter) c_g_converter_reset; // gio.ConverterInputStream GType function() c_g_converter_input_stream_get_type; GInputStream* function(GInputStream* baseStream, GConverter* converter) c_g_converter_input_stream_new; GConverter* function(GConverterInputStream* converterStream) c_g_converter_input_stream_get_converter; // gio.ConverterOutputStream GType function() c_g_converter_output_stream_get_type; GOutputStream* function(GOutputStream* baseStream, GConverter* converter) c_g_converter_output_stream_new; GConverter* function(GConverterOutputStream* converterStream) c_g_converter_output_stream_get_converter; // gio.Credentials GType function() c_g_credentials_get_type; GCredentials* function() c_g_credentials_new; void* function(GCredentials* credentials, GCredentialsType nativeType) c_g_credentials_get_native; pid_t function(GCredentials* credentials, GError** err) c_g_credentials_get_unix_pid; uid_t function(GCredentials* credentials, GError** err) c_g_credentials_get_unix_user; int function(GCredentials* credentials, GCredentials* otherCredentials, GError** err) c_g_credentials_is_same_user; void function(GCredentials* credentials, GCredentialsType nativeType, void* native) c_g_credentials_set_native; int function(GCredentials* credentials, uid_t uid, GError** err) c_g_credentials_set_unix_user; char* function(GCredentials* credentials) c_g_credentials_to_string; // gio.DBusActionGroup GType function() c_g_dbus_action_group_get_type; GDBusActionGroup* function(GDBusConnection* connection, const(char)* busName, const(char)* objectPath) c_g_dbus_action_group_get; // gio.DBusAnnotationInfo GType function() c_g_dbus_annotation_info_get_type; GDBusAnnotationInfo* function(GDBusAnnotationInfo* info) c_g_dbus_annotation_info_ref; void function(GDBusAnnotationInfo* info) c_g_dbus_annotation_info_unref; const(char)* function(GDBusAnnotationInfo** annotations, const(char)* name) c_g_dbus_annotation_info_lookup; // gio.DBusArgInfo GType function() c_g_dbus_arg_info_get_type; GDBusArgInfo* function(GDBusArgInfo* info) c_g_dbus_arg_info_ref; void function(GDBusArgInfo* info) c_g_dbus_arg_info_unref; // gio.DBusAuthObserver GType function() c_g_dbus_auth_observer_get_type; GDBusAuthObserver* function() c_g_dbus_auth_observer_new; int function(GDBusAuthObserver* observer, const(char)* mechanism) c_g_dbus_auth_observer_allow_mechanism; int function(GDBusAuthObserver* observer, GIOStream* stream, GCredentials* credentials) c_g_dbus_auth_observer_authorize_authenticated_peer; // gio.DBusConnection GType function() c_g_dbus_connection_get_type; GDBusConnection* function(GAsyncResult* res, GError** err) c_g_dbus_connection_new_finish; GDBusConnection* function(GAsyncResult* res, GError** err) c_g_dbus_connection_new_for_address_finish; GDBusConnection* function(const(char)* address, GDBusConnectionFlags flags, GDBusAuthObserver* observer, GCancellable* cancellable, GError** err) c_g_dbus_connection_new_for_address_sync; GDBusConnection* function(GIOStream* stream, const(char)* guid, GDBusConnectionFlags flags, GDBusAuthObserver* observer, GCancellable* cancellable, GError** err) c_g_dbus_connection_new_sync; void function(GIOStream* stream, const(char)* guid, GDBusConnectionFlags flags, GDBusAuthObserver* observer, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_connection_new; void function(const(char)* address, GDBusConnectionFlags flags, GDBusAuthObserver* observer, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_connection_new_for_address; uint function(GDBusConnection* connection, GDBusMessageFilterFunction filterFunction, void* userData, GDestroyNotify userDataFreeFunc) c_g_dbus_connection_add_filter; void function(GDBusConnection* connection, const(char)* busName, const(char)* objectPath, const(char)* interfaceName, const(char)* methodName, GVariant* parameters, GVariantType* replyType, GDBusCallFlags flags, int timeoutMsec, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_connection_call; GVariant* function(GDBusConnection* connection, GAsyncResult* res, GError** err) c_g_dbus_connection_call_finish; GVariant* function(GDBusConnection* connection, const(char)* busName, const(char)* objectPath, const(char)* interfaceName, const(char)* methodName, GVariant* parameters, GVariantType* replyType, GDBusCallFlags flags, int timeoutMsec, GCancellable* cancellable, GError** err) c_g_dbus_connection_call_sync; void function(GDBusConnection* connection, const(char)* busName, const(char)* objectPath, const(char)* interfaceName, const(char)* methodName, GVariant* parameters, GVariantType* replyType, GDBusCallFlags flags, int timeoutMsec, GUnixFDList* fdList, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_connection_call_with_unix_fd_list; GVariant* function(GDBusConnection* connection, GUnixFDList** outFdList, GAsyncResult* res, GError** err) c_g_dbus_connection_call_with_unix_fd_list_finish; GVariant* function(GDBusConnection* connection, const(char)* busName, const(char)* objectPath, const(char)* interfaceName, const(char)* methodName, GVariant* parameters, GVariantType* replyType, GDBusCallFlags flags, int timeoutMsec, GUnixFDList* fdList, GUnixFDList** outFdList, GCancellable* cancellable, GError** err) c_g_dbus_connection_call_with_unix_fd_list_sync; void function(GDBusConnection* connection, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_connection_close; int function(GDBusConnection* connection, GAsyncResult* res, GError** err) c_g_dbus_connection_close_finish; int function(GDBusConnection* connection, GCancellable* cancellable, GError** err) c_g_dbus_connection_close_sync; int function(GDBusConnection* connection, const(char)* destinationBusName, const(char)* objectPath, const(char)* interfaceName, const(char)* signalName, GVariant* parameters, GError** err) c_g_dbus_connection_emit_signal; uint function(GDBusConnection* connection, const(char)* objectPath, GActionGroup* actionGroup, GError** err) c_g_dbus_connection_export_action_group; uint function(GDBusConnection* connection, const(char)* objectPath, GMenuModel* menu, GError** err) c_g_dbus_connection_export_menu_model; void function(GDBusConnection* connection, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_connection_flush; int function(GDBusConnection* connection, GAsyncResult* res, GError** err) c_g_dbus_connection_flush_finish; int function(GDBusConnection* connection, GCancellable* cancellable, GError** err) c_g_dbus_connection_flush_sync; GDBusCapabilityFlags function(GDBusConnection* connection) c_g_dbus_connection_get_capabilities; int function(GDBusConnection* connection) c_g_dbus_connection_get_exit_on_close; const(char)* function(GDBusConnection* connection) c_g_dbus_connection_get_guid; uint function(GDBusConnection* connection) c_g_dbus_connection_get_last_serial; GCredentials* function(GDBusConnection* connection) c_g_dbus_connection_get_peer_credentials; GIOStream* function(GDBusConnection* connection) c_g_dbus_connection_get_stream; const(char)* function(GDBusConnection* connection) c_g_dbus_connection_get_unique_name; int function(GDBusConnection* connection) c_g_dbus_connection_is_closed; uint function(GDBusConnection* connection, const(char)* objectPath, GDBusInterfaceInfo* interfaceInfo, GDBusInterfaceVTable* vtable, void* userData, GDestroyNotify userDataFreeFunc, GError** err) c_g_dbus_connection_register_object; uint function(GDBusConnection* connection, const(char)* objectPath, GDBusInterfaceInfo* interfaceInfo, GClosure* methodCallClosure, GClosure* getPropertyClosure, GClosure* setPropertyClosure, GError** err) c_g_dbus_connection_register_object_with_closures; uint function(GDBusConnection* connection, const(char)* objectPath, GDBusSubtreeVTable* vtable, GDBusSubtreeFlags flags, void* userData, GDestroyNotify userDataFreeFunc, GError** err) c_g_dbus_connection_register_subtree; void function(GDBusConnection* connection, uint filterId) c_g_dbus_connection_remove_filter; int function(GDBusConnection* connection, GDBusMessage* message, GDBusSendMessageFlags flags, uint* outSerial, GError** err) c_g_dbus_connection_send_message; void function(GDBusConnection* connection, GDBusMessage* message, GDBusSendMessageFlags flags, int timeoutMsec, uint* outSerial, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_connection_send_message_with_reply; GDBusMessage* function(GDBusConnection* connection, GAsyncResult* res, GError** err) c_g_dbus_connection_send_message_with_reply_finish; GDBusMessage* function(GDBusConnection* connection, GDBusMessage* message, GDBusSendMessageFlags flags, int timeoutMsec, uint* outSerial, GCancellable* cancellable, GError** err) c_g_dbus_connection_send_message_with_reply_sync; void function(GDBusConnection* connection, int exitOnClose) c_g_dbus_connection_set_exit_on_close; uint function(GDBusConnection* connection, const(char)* sender, const(char)* interfaceName, const(char)* member, const(char)* objectPath, const(char)* arg0, GDBusSignalFlags flags, GDBusSignalCallback callback, void* userData, GDestroyNotify userDataFreeFunc) c_g_dbus_connection_signal_subscribe; void function(GDBusConnection* connection, uint subscriptionId) c_g_dbus_connection_signal_unsubscribe; void function(GDBusConnection* connection) c_g_dbus_connection_start_message_processing; void function(GDBusConnection* connection, uint exportId) c_g_dbus_connection_unexport_action_group; void function(GDBusConnection* connection, uint exportId) c_g_dbus_connection_unexport_menu_model; int function(GDBusConnection* connection, uint registrationId) c_g_dbus_connection_unregister_object; int function(GDBusConnection* connection, uint registrationId) c_g_dbus_connection_unregister_subtree; void function(GBusType busType, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_bus_get; GDBusConnection* function(GAsyncResult* res, GError** err) c_g_bus_get_finish; GDBusConnection* function(GBusType busType, GCancellable* cancellable, GError** err) c_g_bus_get_sync; // gio.DBusInterface GType function() c_g_dbus_interface_get_type; GDBusObject* function(GDBusInterface* iface) c_g_dbus_interface_dup_object; GDBusInterfaceInfo* function(GDBusInterface* iface) c_g_dbus_interface_get_info; GDBusObject* function(GDBusInterface* iface) c_g_dbus_interface_get_object; void function(GDBusInterface* iface, GDBusObject* object) c_g_dbus_interface_set_object; // gio.DBusInterfaceInfo GType function() c_g_dbus_interface_info_get_type; void function(GDBusInterfaceInfo* info) c_g_dbus_interface_info_cache_build; void function(GDBusInterfaceInfo* info) c_g_dbus_interface_info_cache_release; void function(GDBusInterfaceInfo* info, uint indent, GString* stringBuilder) c_g_dbus_interface_info_generate_xml; GDBusMethodInfo* function(GDBusInterfaceInfo* info, const(char)* name) c_g_dbus_interface_info_lookup_method; GDBusPropertyInfo* function(GDBusInterfaceInfo* info, const(char)* name) c_g_dbus_interface_info_lookup_property; GDBusSignalInfo* function(GDBusInterfaceInfo* info, const(char)* name) c_g_dbus_interface_info_lookup_signal; GDBusInterfaceInfo* function(GDBusInterfaceInfo* info) c_g_dbus_interface_info_ref; void function(GDBusInterfaceInfo* info) c_g_dbus_interface_info_unref; // gio.DBusInterfaceSkeleton GType function() c_g_dbus_interface_skeleton_get_type; int function(GDBusInterfaceSkeleton* iface, GDBusConnection* connection, const(char)* objectPath, GError** err) c_g_dbus_interface_skeleton_export; void function(GDBusInterfaceSkeleton* iface) c_g_dbus_interface_skeleton_flush; GDBusConnection* function(GDBusInterfaceSkeleton* iface) c_g_dbus_interface_skeleton_get_connection; GList* function(GDBusInterfaceSkeleton* iface) c_g_dbus_interface_skeleton_get_connections; GDBusInterfaceSkeletonFlags function(GDBusInterfaceSkeleton* iface) c_g_dbus_interface_skeleton_get_flags; GDBusInterfaceInfo* function(GDBusInterfaceSkeleton* iface) c_g_dbus_interface_skeleton_get_info; const(char)* function(GDBusInterfaceSkeleton* iface) c_g_dbus_interface_skeleton_get_object_path; GVariant* function(GDBusInterfaceSkeleton* iface) c_g_dbus_interface_skeleton_get_properties; GDBusInterfaceVTable* function(GDBusInterfaceSkeleton* iface) c_g_dbus_interface_skeleton_get_vtable; int function(GDBusInterfaceSkeleton* iface, GDBusConnection* connection) c_g_dbus_interface_skeleton_has_connection; void function(GDBusInterfaceSkeleton* iface, GDBusInterfaceSkeletonFlags flags) c_g_dbus_interface_skeleton_set_flags; void function(GDBusInterfaceSkeleton* iface) c_g_dbus_interface_skeleton_unexport; void function(GDBusInterfaceSkeleton* iface, GDBusConnection* connection) c_g_dbus_interface_skeleton_unexport_from_connection; // gio.DBusMenuModel GType function() c_g_dbus_menu_model_get_type; GDBusMenuModel* function(GDBusConnection* connection, const(char)* busName, const(char)* objectPath) c_g_dbus_menu_model_get; // gio.DBusMessage GType function() c_g_dbus_message_get_type; GDBusMessage* function() c_g_dbus_message_new; GDBusMessage* function(char* blob, size_t blobLen, GDBusCapabilityFlags capabilities, GError** err) c_g_dbus_message_new_from_blob; GDBusMessage* function(const(char)* name, const(char)* path, const(char)* iface, const(char)* method) c_g_dbus_message_new_method_call; GDBusMessage* function(const(char)* path, const(char)* iface, const(char)* signal) c_g_dbus_message_new_signal; ptrdiff_t function(char* blob, size_t blobLen, GError** err) c_g_dbus_message_bytes_needed; GDBusMessage* function(GDBusMessage* message, GError** err) c_g_dbus_message_copy; const(char)* function(GDBusMessage* message) c_g_dbus_message_get_arg0; GVariant* function(GDBusMessage* message) c_g_dbus_message_get_body; GDBusMessageByteOrder function(GDBusMessage* message) c_g_dbus_message_get_byte_order; const(char)* function(GDBusMessage* message) c_g_dbus_message_get_destination; const(char)* function(GDBusMessage* message) c_g_dbus_message_get_error_name; GDBusMessageFlags function(GDBusMessage* message) c_g_dbus_message_get_flags; GVariant* function(GDBusMessage* message, GDBusMessageHeaderField headerField) c_g_dbus_message_get_header; char* function(GDBusMessage* message) c_g_dbus_message_get_header_fields; const(char)* function(GDBusMessage* message) c_g_dbus_message_get_interface; int function(GDBusMessage* message) c_g_dbus_message_get_locked; const(char)* function(GDBusMessage* message) c_g_dbus_message_get_member; GDBusMessageType function(GDBusMessage* message) c_g_dbus_message_get_message_type; uint function(GDBusMessage* message) c_g_dbus_message_get_num_unix_fds; const(char)* function(GDBusMessage* message) c_g_dbus_message_get_path; uint function(GDBusMessage* message) c_g_dbus_message_get_reply_serial; const(char)* function(GDBusMessage* message) c_g_dbus_message_get_sender; uint function(GDBusMessage* message) c_g_dbus_message_get_serial; const(char)* function(GDBusMessage* message) c_g_dbus_message_get_signature; GUnixFDList* function(GDBusMessage* message) c_g_dbus_message_get_unix_fd_list; void function(GDBusMessage* message) c_g_dbus_message_lock; GDBusMessage* function(GDBusMessage* methodCallMessage, const(char)* errorName, const(char)* errorMessageFormat, ... ) c_g_dbus_message_new_method_error; GDBusMessage* function(GDBusMessage* methodCallMessage, const(char)* errorName, const(char)* errorMessage) c_g_dbus_message_new_method_error_literal; GDBusMessage* function(GDBusMessage* methodCallMessage, const(char)* errorName, const(char)* errorMessageFormat, void* varArgs) c_g_dbus_message_new_method_error_valist; GDBusMessage* function(GDBusMessage* methodCallMessage) c_g_dbus_message_new_method_reply; char* function(GDBusMessage* message, uint indent) c_g_dbus_message_print; void function(GDBusMessage* message, GVariant* bod) c_g_dbus_message_set_body; void function(GDBusMessage* message, GDBusMessageByteOrder byteOrder) c_g_dbus_message_set_byte_order; void function(GDBusMessage* message, const(char)* value) c_g_dbus_message_set_destination; void function(GDBusMessage* message, const(char)* value) c_g_dbus_message_set_error_name; void function(GDBusMessage* message, GDBusMessageFlags flags) c_g_dbus_message_set_flags; void function(GDBusMessage* message, GDBusMessageHeaderField headerField, GVariant* value) c_g_dbus_message_set_header; void function(GDBusMessage* message, const(char)* value) c_g_dbus_message_set_interface; void function(GDBusMessage* message, const(char)* value) c_g_dbus_message_set_member; void function(GDBusMessage* message, GDBusMessageType type) c_g_dbus_message_set_message_type; void function(GDBusMessage* message, uint value) c_g_dbus_message_set_num_unix_fds; void function(GDBusMessage* message, const(char)* value) c_g_dbus_message_set_path; void function(GDBusMessage* message, uint value) c_g_dbus_message_set_reply_serial; void function(GDBusMessage* message, const(char)* value) c_g_dbus_message_set_sender; void function(GDBusMessage* message, uint serial) c_g_dbus_message_set_serial; void function(GDBusMessage* message, const(char)* value) c_g_dbus_message_set_signature; void function(GDBusMessage* message, GUnixFDList* fdList) c_g_dbus_message_set_unix_fd_list; char* function(GDBusMessage* message, size_t* outSize, GDBusCapabilityFlags capabilities, GError** err) c_g_dbus_message_to_blob; int function(GDBusMessage* message, GError** err) c_g_dbus_message_to_gerror; // gio.DBusMethodInfo GType function() c_g_dbus_method_info_get_type; GDBusMethodInfo* function(GDBusMethodInfo* info) c_g_dbus_method_info_ref; void function(GDBusMethodInfo* info) c_g_dbus_method_info_unref; // gio.DBusMethodInvocation GType function() c_g_dbus_method_invocation_get_type; GDBusConnection* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_connection; const(char)* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_interface_name; GDBusMessage* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_message; GDBusMethodInfo* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_method_info; const(char)* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_method_name; const(char)* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_object_path; GVariant* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_parameters; GDBusPropertyInfo* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_property_info; const(char)* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_sender; void* function(GDBusMethodInvocation* invocation) c_g_dbus_method_invocation_get_user_data; void function(GDBusMethodInvocation* invocation, const(char)* errorName, const(char)* errorMessage) c_g_dbus_method_invocation_return_dbus_error; void function(GDBusMethodInvocation* invocation, GQuark domain, int code, const(char)* format, ... ) c_g_dbus_method_invocation_return_error; void function(GDBusMethodInvocation* invocation, GQuark domain, int code, const(char)* message) c_g_dbus_method_invocation_return_error_literal; void function(GDBusMethodInvocation* invocation, GQuark domain, int code, const(char)* format, void* varArgs) c_g_dbus_method_invocation_return_error_valist; void function(GDBusMethodInvocation* invocation, GError* error) c_g_dbus_method_invocation_return_gerror; void function(GDBusMethodInvocation* invocation, GVariant* parameters) c_g_dbus_method_invocation_return_value; void function(GDBusMethodInvocation* invocation, GVariant* parameters, GUnixFDList* fdList) c_g_dbus_method_invocation_return_value_with_unix_fd_list; void function(GDBusMethodInvocation* invocation, GError* error) c_g_dbus_method_invocation_take_error; // gio.DBusNodeInfo GType function() c_g_dbus_node_info_get_type; GDBusNodeInfo* function(const(char)* xmlData, GError** err) c_g_dbus_node_info_new_for_xml; void function(GDBusNodeInfo* info, uint indent, GString* stringBuilder) c_g_dbus_node_info_generate_xml; GDBusInterfaceInfo* function(GDBusNodeInfo* info, const(char)* name) c_g_dbus_node_info_lookup_interface; GDBusNodeInfo* function(GDBusNodeInfo* info) c_g_dbus_node_info_ref; void function(GDBusNodeInfo* info) c_g_dbus_node_info_unref; // gio.DBusObject GType function() c_g_dbus_object_get_type; GDBusInterface* function(GDBusObject* object, const(char)* interfaceName) c_g_dbus_object_get_interface; GList* function(GDBusObject* object) c_g_dbus_object_get_interfaces; const(char)* function(GDBusObject* object) c_g_dbus_object_get_object_path; // gio.DBusObjectManager GType function() c_g_dbus_object_manager_get_type; GDBusInterface* function(GDBusObjectManager* manager, const(char)* objectPath, const(char)* interfaceName) c_g_dbus_object_manager_get_interface; GDBusObject* function(GDBusObjectManager* manager, const(char)* objectPath) c_g_dbus_object_manager_get_object; const(char)* function(GDBusObjectManager* manager) c_g_dbus_object_manager_get_object_path; GList* function(GDBusObjectManager* manager) c_g_dbus_object_manager_get_objects; // gio.DBusObjectManagerClient GType function() c_g_dbus_object_manager_client_get_type; GDBusObjectManager* function(GAsyncResult* res, GError** err) c_g_dbus_object_manager_client_new_finish; GDBusObjectManager* function(GAsyncResult* res, GError** err) c_g_dbus_object_manager_client_new_for_bus_finish; GDBusObjectManager* function(GBusType busType, GDBusObjectManagerClientFlags flags, const(char)* name, const(char)* objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, GCancellable* cancellable, GError** err) c_g_dbus_object_manager_client_new_for_bus_sync; GDBusObjectManager* function(GDBusConnection* connection, GDBusObjectManagerClientFlags flags, const(char)* name, const(char)* objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, GCancellable* cancellable, GError** err) c_g_dbus_object_manager_client_new_sync; void function(GDBusConnection* connection, GDBusObjectManagerClientFlags flags, const(char)* name, const(char)* objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_object_manager_client_new; void function(GBusType busType, GDBusObjectManagerClientFlags flags, const(char)* name, const(char)* objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_object_manager_client_new_for_bus; GDBusConnection* function(GDBusObjectManagerClient* manager) c_g_dbus_object_manager_client_get_connection; GDBusObjectManagerClientFlags function(GDBusObjectManagerClient* manager) c_g_dbus_object_manager_client_get_flags; const(char)* function(GDBusObjectManagerClient* manager) c_g_dbus_object_manager_client_get_name; char* function(GDBusObjectManagerClient* manager) c_g_dbus_object_manager_client_get_name_owner; // gio.DBusObjectManagerServer GType function() c_g_dbus_object_manager_server_get_type; GDBusObjectManagerServer* function(const(char)* objectPath) c_g_dbus_object_manager_server_new; void function(GDBusObjectManagerServer* manager, GDBusObjectSkeleton* object) c_g_dbus_object_manager_server_export; void function(GDBusObjectManagerServer* manager, GDBusObjectSkeleton* object) c_g_dbus_object_manager_server_export_uniquely; GDBusConnection* function(GDBusObjectManagerServer* manager) c_g_dbus_object_manager_server_get_connection; int function(GDBusObjectManagerServer* manager, GDBusObjectSkeleton* object) c_g_dbus_object_manager_server_is_exported; void function(GDBusObjectManagerServer* manager, GDBusConnection* connection) c_g_dbus_object_manager_server_set_connection; int function(GDBusObjectManagerServer* manager, const(char)* objectPath) c_g_dbus_object_manager_server_unexport; // gio.DBusObjectProxy GType function() c_g_dbus_object_proxy_get_type; GDBusObjectProxy* function(GDBusConnection* connection, const(char)* objectPath) c_g_dbus_object_proxy_new; GDBusConnection* function(GDBusObjectProxy* proxy) c_g_dbus_object_proxy_get_connection; // gio.DBusObjectSkeleton GType function() c_g_dbus_object_skeleton_get_type; GDBusObjectSkeleton* function(const(char)* objectPath) c_g_dbus_object_skeleton_new; void function(GDBusObjectSkeleton* object, GDBusInterfaceSkeleton* iface) c_g_dbus_object_skeleton_add_interface; void function(GDBusObjectSkeleton* object) c_g_dbus_object_skeleton_flush; void function(GDBusObjectSkeleton* object, GDBusInterfaceSkeleton* iface) c_g_dbus_object_skeleton_remove_interface; void function(GDBusObjectSkeleton* object, const(char)* interfaceName) c_g_dbus_object_skeleton_remove_interface_by_name; void function(GDBusObjectSkeleton* object, const(char)* objectPath) c_g_dbus_object_skeleton_set_object_path; // gio.DBusPropertyInfo GType function() c_g_dbus_property_info_get_type; GDBusPropertyInfo* function(GDBusPropertyInfo* info) c_g_dbus_property_info_ref; void function(GDBusPropertyInfo* info) c_g_dbus_property_info_unref; // gio.DBusProxy GType function() c_g_dbus_proxy_get_type; GDBusProxy* function(GAsyncResult* res, GError** err) c_g_dbus_proxy_new_finish; GDBusProxy* function(GAsyncResult* res, GError** err) c_g_dbus_proxy_new_for_bus_finish; GDBusProxy* function(GBusType busType, GDBusProxyFlags flags, GDBusInterfaceInfo* info, const(char)* name, const(char)* objectPath, const(char)* interfaceName, GCancellable* cancellable, GError** err) c_g_dbus_proxy_new_for_bus_sync; GDBusProxy* function(GDBusConnection* connection, GDBusProxyFlags flags, GDBusInterfaceInfo* info, const(char)* name, const(char)* objectPath, const(char)* interfaceName, GCancellable* cancellable, GError** err) c_g_dbus_proxy_new_sync; void function(GDBusConnection* connection, GDBusProxyFlags flags, GDBusInterfaceInfo* info, const(char)* name, const(char)* objectPath, const(char)* interfaceName, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_proxy_new; void function(GBusType busType, GDBusProxyFlags flags, GDBusInterfaceInfo* info, const(char)* name, const(char)* objectPath, const(char)* interfaceName, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_proxy_new_for_bus; void function(GDBusProxy* proxy, const(char)* methodName, GVariant* parameters, GDBusCallFlags flags, int timeoutMsec, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_proxy_call; GVariant* function(GDBusProxy* proxy, GAsyncResult* res, GError** err) c_g_dbus_proxy_call_finish; GVariant* function(GDBusProxy* proxy, const(char)* methodName, GVariant* parameters, GDBusCallFlags flags, int timeoutMsec, GCancellable* cancellable, GError** err) c_g_dbus_proxy_call_sync; void function(GDBusProxy* proxy, const(char)* methodName, GVariant* parameters, GDBusCallFlags flags, int timeoutMsec, GUnixFDList* fdList, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_proxy_call_with_unix_fd_list; GVariant* function(GDBusProxy* proxy, GUnixFDList** outFdList, GAsyncResult* res, GError** err) c_g_dbus_proxy_call_with_unix_fd_list_finish; GVariant* function(GDBusProxy* proxy, const(char)* methodName, GVariant* parameters, GDBusCallFlags flags, int timeoutMsec, GUnixFDList* fdList, GUnixFDList** outFdList, GCancellable* cancellable, GError** err) c_g_dbus_proxy_call_with_unix_fd_list_sync; GVariant* function(GDBusProxy* proxy, const(char)* propertyName) c_g_dbus_proxy_get_cached_property; char** function(GDBusProxy* proxy) c_g_dbus_proxy_get_cached_property_names; GDBusConnection* function(GDBusProxy* proxy) c_g_dbus_proxy_get_connection; int function(GDBusProxy* proxy) c_g_dbus_proxy_get_default_timeout; GDBusProxyFlags function(GDBusProxy* proxy) c_g_dbus_proxy_get_flags; GDBusInterfaceInfo* function(GDBusProxy* proxy) c_g_dbus_proxy_get_interface_info; const(char)* function(GDBusProxy* proxy) c_g_dbus_proxy_get_interface_name; const(char)* function(GDBusProxy* proxy) c_g_dbus_proxy_get_name; char* function(GDBusProxy* proxy) c_g_dbus_proxy_get_name_owner; const(char)* function(GDBusProxy* proxy) c_g_dbus_proxy_get_object_path; void function(GDBusProxy* proxy, const(char)* propertyName, GVariant* value) c_g_dbus_proxy_set_cached_property; void function(GDBusProxy* proxy, int timeoutMsec) c_g_dbus_proxy_set_default_timeout; void function(GDBusProxy* proxy, GDBusInterfaceInfo* info) c_g_dbus_proxy_set_interface_info; // gio.DBusServer GType function() c_g_dbus_server_get_type; GDBusServer* function(const(char)* address, GDBusServerFlags flags, const(char)* guid, GDBusAuthObserver* observer, GCancellable* cancellable, GError** err) c_g_dbus_server_new_sync; const(char)* function(GDBusServer* server) c_g_dbus_server_get_client_address; GDBusServerFlags function(GDBusServer* server) c_g_dbus_server_get_flags; const(char)* function(GDBusServer* server) c_g_dbus_server_get_guid; int function(GDBusServer* server) c_g_dbus_server_is_active; void function(GDBusServer* server) c_g_dbus_server_start; void function(GDBusServer* server) c_g_dbus_server_stop; // gio.DBusSignalInfo GType function() c_g_dbus_signal_info_get_type; GDBusSignalInfo* function(GDBusSignalInfo* info) c_g_dbus_signal_info_ref; void function(GDBusSignalInfo* info) c_g_dbus_signal_info_unref; // gio.DataInputStream GType function() c_g_data_input_stream_get_type; GDataInputStream* function(GInputStream* baseStream) c_g_data_input_stream_new; GDataStreamByteOrder function(GDataInputStream* stream) c_g_data_input_stream_get_byte_order; GDataStreamNewlineType function(GDataInputStream* stream) c_g_data_input_stream_get_newline_type; char function(GDataInputStream* stream, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_byte; short function(GDataInputStream* stream, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_int16; int function(GDataInputStream* stream, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_int32; long function(GDataInputStream* stream, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_int64; char* function(GDataInputStream* stream, size_t* length, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_line; void function(GDataInputStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_data_input_stream_read_line_async; char* function(GDataInputStream* stream, GAsyncResult* result, size_t* length, GError** err) c_g_data_input_stream_read_line_finish; char* function(GDataInputStream* stream, GAsyncResult* result, size_t* length, GError** err) c_g_data_input_stream_read_line_finish_utf8; char* function(GDataInputStream* stream, size_t* length, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_line_utf8; ushort function(GDataInputStream* stream, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_uint16; uint function(GDataInputStream* stream, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_uint32; ulong function(GDataInputStream* stream, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_uint64; char* function(GDataInputStream* stream, const(char)* stopChars, size_t* length, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_until; void function(GDataInputStream* stream, const(char)* stopChars, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_data_input_stream_read_until_async; char* function(GDataInputStream* stream, GAsyncResult* result, size_t* length, GError** err) c_g_data_input_stream_read_until_finish; char* function(GDataInputStream* stream, const(char)* stopChars, ptrdiff_t stopCharsLen, size_t* length, GCancellable* cancellable, GError** err) c_g_data_input_stream_read_upto; void function(GDataInputStream* stream, const(char)* stopChars, ptrdiff_t stopCharsLen, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_data_input_stream_read_upto_async; char* function(GDataInputStream* stream, GAsyncResult* result, size_t* length, GError** err) c_g_data_input_stream_read_upto_finish; void function(GDataInputStream* stream, GDataStreamByteOrder order) c_g_data_input_stream_set_byte_order; void function(GDataInputStream* stream, GDataStreamNewlineType type) c_g_data_input_stream_set_newline_type; // gio.DataOutputStream GType function() c_g_data_output_stream_get_type; GDataOutputStream* function(GOutputStream* baseStream) c_g_data_output_stream_new; GDataStreamByteOrder function(GDataOutputStream* stream) c_g_data_output_stream_get_byte_order; int function(GDataOutputStream* stream, char data, GCancellable* cancellable, GError** err) c_g_data_output_stream_put_byte; int function(GDataOutputStream* stream, short data, GCancellable* cancellable, GError** err) c_g_data_output_stream_put_int16; int function(GDataOutputStream* stream, int data, GCancellable* cancellable, GError** err) c_g_data_output_stream_put_int32; int function(GDataOutputStream* stream, long data, GCancellable* cancellable, GError** err) c_g_data_output_stream_put_int64; int function(GDataOutputStream* stream, const(char)* str, GCancellable* cancellable, GError** err) c_g_data_output_stream_put_string; int function(GDataOutputStream* stream, ushort data, GCancellable* cancellable, GError** err) c_g_data_output_stream_put_uint16; int function(GDataOutputStream* stream, uint data, GCancellable* cancellable, GError** err) c_g_data_output_stream_put_uint32; int function(GDataOutputStream* stream, ulong data, GCancellable* cancellable, GError** err) c_g_data_output_stream_put_uint64; void function(GDataOutputStream* stream, GDataStreamByteOrder order) c_g_data_output_stream_set_byte_order; // gio.DatagramBased GType function() c_g_datagram_based_get_type; GIOCondition function(GDatagramBased* datagramBased, GIOCondition condition) c_g_datagram_based_condition_check; int function(GDatagramBased* datagramBased, GIOCondition condition, long timeout, GCancellable* cancellable, GError** err) c_g_datagram_based_condition_wait; GSource* function(GDatagramBased* datagramBased, GIOCondition condition, GCancellable* cancellable) c_g_datagram_based_create_source; int function(GDatagramBased* datagramBased, GInputMessage* messages, uint numMessages, int flags, long timeout, GCancellable* cancellable, GError** err) c_g_datagram_based_receive_messages; int function(GDatagramBased* datagramBased, GOutputMessage* messages, uint numMessages, int flags, long timeout, GCancellable* cancellable, GError** err) c_g_datagram_based_send_messages; // gio.DesktopAppInfo GType function() c_g_desktop_app_info_get_type; GDesktopAppInfo* function(const(char)* desktopId) c_g_desktop_app_info_new; GDesktopAppInfo* function(char* filename) c_g_desktop_app_info_new_from_filename; GDesktopAppInfo* function(GKeyFile* keyFile) c_g_desktop_app_info_new_from_keyfile; GList* function(const(char)* iface) c_g_desktop_app_info_get_implementations; char*** function(const(char)* searchString) c_g_desktop_app_info_search; void function(const(char)* desktopEnv) c_g_desktop_app_info_set_desktop_env; char* function(GDesktopAppInfo* info, const(char)* actionName) c_g_desktop_app_info_get_action_name; int function(GDesktopAppInfo* info, const(char)* key) c_g_desktop_app_info_get_boolean; const(char)* function(GDesktopAppInfo* info) c_g_desktop_app_info_get_categories; char* function(GDesktopAppInfo* info) c_g_desktop_app_info_get_filename; const(char)* function(GDesktopAppInfo* info) c_g_desktop_app_info_get_generic_name; int function(GDesktopAppInfo* info) c_g_desktop_app_info_get_is_hidden; char** function(GDesktopAppInfo* info) c_g_desktop_app_info_get_keywords; int function(GDesktopAppInfo* info) c_g_desktop_app_info_get_nodisplay; int function(GDesktopAppInfo* info, const(char)* desktopEnv) c_g_desktop_app_info_get_show_in; const(char)* function(GDesktopAppInfo* info) c_g_desktop_app_info_get_startup_wm_class; char* function(GDesktopAppInfo* info, const(char)* key) c_g_desktop_app_info_get_string; int function(GDesktopAppInfo* info, const(char)* key) c_g_desktop_app_info_has_key; void function(GDesktopAppInfo* info, const(char)* actionName, GAppLaunchContext* launchContext) c_g_desktop_app_info_launch_action; int function(GDesktopAppInfo* appinfo, GList* uris, GAppLaunchContext* launchContext, GSpawnFlags spawnFlags, GSpawnChildSetupFunc userSetup, void* userSetupData, GDesktopAppLaunchCallback pidCallback, void* pidCallbackData, GError** err) c_g_desktop_app_info_launch_uris_as_manager; char** function(GDesktopAppInfo* info) c_g_desktop_app_info_list_actions; // gio.DesktopAppInfoLookup GType function() c_g_desktop_app_info_lookup_get_type; GAppInfo* function(GDesktopAppInfoLookup* lookup, const(char)* uriScheme) c_g_desktop_app_info_lookup_get_default_for_uri_scheme; // gio.Drive GType function() c_g_drive_get_type; int function(GDrive* drive) c_g_drive_can_eject; int function(GDrive* drive) c_g_drive_can_poll_for_media; int function(GDrive* drive) c_g_drive_can_start; int function(GDrive* drive) c_g_drive_can_start_degraded; int function(GDrive* drive) c_g_drive_can_stop; void function(GDrive* drive, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_drive_eject; int function(GDrive* drive, GAsyncResult* result, GError** err) c_g_drive_eject_finish; void function(GDrive* drive, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_drive_eject_with_operation; int function(GDrive* drive, GAsyncResult* result, GError** err) c_g_drive_eject_with_operation_finish; char** function(GDrive* drive) c_g_drive_enumerate_identifiers; GIcon* function(GDrive* drive) c_g_drive_get_icon; char* function(GDrive* drive, const(char)* kind) c_g_drive_get_identifier; char* function(GDrive* drive) c_g_drive_get_name; const(char)* function(GDrive* drive) c_g_drive_get_sort_key; GDriveStartStopType function(GDrive* drive) c_g_drive_get_start_stop_type; GIcon* function(GDrive* drive) c_g_drive_get_symbolic_icon; GList* function(GDrive* drive) c_g_drive_get_volumes; int function(GDrive* drive) c_g_drive_has_media; int function(GDrive* drive) c_g_drive_has_volumes; int function(GDrive* drive) c_g_drive_is_media_check_automatic; int function(GDrive* drive) c_g_drive_is_media_removable; int function(GDrive* drive) c_g_drive_is_removable; void function(GDrive* drive, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_drive_poll_for_media; int function(GDrive* drive, GAsyncResult* result, GError** err) c_g_drive_poll_for_media_finish; void function(GDrive* drive, GDriveStartFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_drive_start; int function(GDrive* drive, GAsyncResult* result, GError** err) c_g_drive_start_finish; void function(GDrive* drive, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_drive_stop; int function(GDrive* drive, GAsyncResult* result, GError** err) c_g_drive_stop_finish; // gio.DtlsClientConnection GType function() c_g_dtls_client_connection_get_type; GDatagramBased* function(GDatagramBased* baseSocket, GSocketConnectable* serverIdentity, GError** err) c_g_dtls_client_connection_new; GList* function(GDtlsClientConnection* conn) c_g_dtls_client_connection_get_accepted_cas; GSocketConnectable* function(GDtlsClientConnection* conn) c_g_dtls_client_connection_get_server_identity; GTlsCertificateFlags function(GDtlsClientConnection* conn) c_g_dtls_client_connection_get_validation_flags; void function(GDtlsClientConnection* conn, GSocketConnectable* identity) c_g_dtls_client_connection_set_server_identity; void function(GDtlsClientConnection* conn, GTlsCertificateFlags flags) c_g_dtls_client_connection_set_validation_flags; // gio.DtlsConnection GType function() c_g_dtls_connection_get_type; int function(GDtlsConnection* conn, GCancellable* cancellable, GError** err) c_g_dtls_connection_close; void function(GDtlsConnection* conn, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dtls_connection_close_async; int function(GDtlsConnection* conn, GAsyncResult* result, GError** err) c_g_dtls_connection_close_finish; int function(GDtlsConnection* conn, GTlsCertificate* peerCert, GTlsCertificateFlags errors) c_g_dtls_connection_emit_accept_certificate; GTlsCertificate* function(GDtlsConnection* conn) c_g_dtls_connection_get_certificate; GTlsDatabase* function(GDtlsConnection* conn) c_g_dtls_connection_get_database; GTlsInteraction* function(GDtlsConnection* conn) c_g_dtls_connection_get_interaction; GTlsCertificate* function(GDtlsConnection* conn) c_g_dtls_connection_get_peer_certificate; GTlsCertificateFlags function(GDtlsConnection* conn) c_g_dtls_connection_get_peer_certificate_errors; GTlsRehandshakeMode function(GDtlsConnection* conn) c_g_dtls_connection_get_rehandshake_mode; int function(GDtlsConnection* conn) c_g_dtls_connection_get_require_close_notify; int function(GDtlsConnection* conn, GCancellable* cancellable, GError** err) c_g_dtls_connection_handshake; void function(GDtlsConnection* conn, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dtls_connection_handshake_async; int function(GDtlsConnection* conn, GAsyncResult* result, GError** err) c_g_dtls_connection_handshake_finish; void function(GDtlsConnection* conn, GTlsCertificate* certificate) c_g_dtls_connection_set_certificate; void function(GDtlsConnection* conn, GTlsDatabase* database) c_g_dtls_connection_set_database; void function(GDtlsConnection* conn, GTlsInteraction* interaction) c_g_dtls_connection_set_interaction; void function(GDtlsConnection* conn, GTlsRehandshakeMode mode) c_g_dtls_connection_set_rehandshake_mode; void function(GDtlsConnection* conn, int requireCloseNotify) c_g_dtls_connection_set_require_close_notify; int function(GDtlsConnection* conn, int shutdownRead, int shutdownWrite, GCancellable* cancellable, GError** err) c_g_dtls_connection_shutdown; void function(GDtlsConnection* conn, int shutdownRead, int shutdownWrite, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dtls_connection_shutdown_async; int function(GDtlsConnection* conn, GAsyncResult* result, GError** err) c_g_dtls_connection_shutdown_finish; // gio.DtlsServerConnection GType function() c_g_dtls_server_connection_get_type; GDatagramBased* function(GDatagramBased* baseSocket, GTlsCertificate* certificate, GError** err) c_g_dtls_server_connection_new; // gio.Emblem GType function() c_g_emblem_get_type; GEmblem* function(GIcon* icon) c_g_emblem_new; GEmblem* function(GIcon* icon, GEmblemOrigin origin) c_g_emblem_new_with_origin; GIcon* function(GEmblem* emblem) c_g_emblem_get_icon; GEmblemOrigin function(GEmblem* emblem) c_g_emblem_get_origin; // gio.EmblemedIcon GType function() c_g_emblemed_icon_get_type; GIcon* function(GIcon* icon, GEmblem* emblem) c_g_emblemed_icon_new; void function(GEmblemedIcon* emblemed, GEmblem* emblem) c_g_emblemed_icon_add_emblem; void function(GEmblemedIcon* emblemed) c_g_emblemed_icon_clear_emblems; GList* function(GEmblemedIcon* emblemed) c_g_emblemed_icon_get_emblems; GIcon* function(GEmblemedIcon* emblemed) c_g_emblemed_icon_get_icon; // gio.File GType function() c_g_file_get_type; GFile* function(const(char)* arg) c_g_file_new_for_commandline_arg; GFile* function(const(char)* arg, char* cwd) c_g_file_new_for_commandline_arg_and_cwd; GFile* function(char* path) c_g_file_new_for_path; GFile* function(const(char)* uri) c_g_file_new_for_uri; GFile* function(char* tmpl, GFileIOStream** iostream, GError** err) c_g_file_new_tmp; GFile* function(const(char)* parseName) c_g_file_parse_name; GFileOutputStream* function(GFile* file, GFileCreateFlags flags, GCancellable* cancellable, GError** err) c_g_file_append_to; void function(GFile* file, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_append_to_async; GFileOutputStream* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_append_to_finish; int function(GFile* source, GFile* destination, GFileCopyFlags flags, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GError** err) c_g_file_copy; void function(GFile* source, GFile* destination, GFileCopyFlags flags, int ioPriority, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData) c_g_file_copy_async; int function(GFile* source, GFile* destination, GFileCopyFlags flags, GCancellable* cancellable, GError** err) c_g_file_copy_attributes; int function(GFile* file, GAsyncResult* res, GError** err) c_g_file_copy_finish; GFileOutputStream* function(GFile* file, GFileCreateFlags flags, GCancellable* cancellable, GError** err) c_g_file_create; void function(GFile* file, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_create_async; GFileOutputStream* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_create_finish; GFileIOStream* function(GFile* file, GFileCreateFlags flags, GCancellable* cancellable, GError** err) c_g_file_create_readwrite; void function(GFile* file, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_create_readwrite_async; GFileIOStream* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_create_readwrite_finish; int function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_delete; void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_delete_async; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_delete_finish; GFile* function(GFile* file) c_g_file_dup; void function(GFile* file, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_eject_mountable; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_eject_mountable_finish; void function(GFile* file, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_eject_mountable_with_operation; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_eject_mountable_with_operation_finish; GFileEnumerator* function(GFile* file, const(char)* attributes, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_enumerate_children; void function(GFile* file, const(char)* attributes, GFileQueryInfoFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_enumerate_children_async; GFileEnumerator* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_enumerate_children_finish; int function(GFile* file1, GFile* file2) c_g_file_equal; GMount* function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_find_enclosing_mount; void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_find_enclosing_mount_async; GMount* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_find_enclosing_mount_finish; char* function(GFile* file) c_g_file_get_basename; GFile* function(GFile* file, char* name) c_g_file_get_child; GFile* function(GFile* file, const(char)* displayName, GError** err) c_g_file_get_child_for_display_name; GFile* function(GFile* file) c_g_file_get_parent; char* function(GFile* file) c_g_file_get_parse_name; char* function(GFile* file) c_g_file_get_path; char* function(GFile* parent, GFile* descendant) c_g_file_get_relative_path; char* function(GFile* file) c_g_file_get_uri; char* function(GFile* file) c_g_file_get_uri_scheme; int function(GFile* file, GFile* parent) c_g_file_has_parent; int function(GFile* file, GFile* prefix) c_g_file_has_prefix; int function(GFile* file, const(char)* uriScheme) c_g_file_has_uri_scheme; uint function(void* file) c_g_file_hash; int function(GFile* file) c_g_file_is_native; int function(GFile* file, GCancellable* cancellable, char** contents, size_t* length, char** etagOut, GError** err) c_g_file_load_contents; void function(GFile* file, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_load_contents_async; int function(GFile* file, GAsyncResult* res, char** contents, size_t* length, char** etagOut, GError** err) c_g_file_load_contents_finish; void function(GFile* file, GCancellable* cancellable, GFileReadMoreCallback readMoreCallback, GAsyncReadyCallback callback, void* userData) c_g_file_load_partial_contents_async; int function(GFile* file, GAsyncResult* res, char** contents, size_t* length, char** etagOut, GError** err) c_g_file_load_partial_contents_finish; int function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_make_directory; void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_make_directory_async; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_make_directory_finish; int function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_make_directory_with_parents; int function(GFile* file, char* symlinkValue, GCancellable* cancellable, GError** err) c_g_file_make_symbolic_link; int function(GFile* file, GFileMeasureFlags flags, GCancellable* cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, ulong* diskUsage, ulong* numDirs, ulong* numFiles, GError** err) c_g_file_measure_disk_usage; void function(GFile* file, GFileMeasureFlags flags, int ioPriority, GCancellable* cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, GAsyncReadyCallback callback, void* userData) c_g_file_measure_disk_usage_async; int function(GFile* file, GAsyncResult* result, ulong* diskUsage, ulong* numDirs, ulong* numFiles, GError** err) c_g_file_measure_disk_usage_finish; GFileMonitor* function(GFile* file, GFileMonitorFlags flags, GCancellable* cancellable, GError** err) c_g_file_monitor; GFileMonitor* function(GFile* file, GFileMonitorFlags flags, GCancellable* cancellable, GError** err) c_g_file_monitor_directory; GFileMonitor* function(GFile* file, GFileMonitorFlags flags, GCancellable* cancellable, GError** err) c_g_file_monitor_file; void function(GFile* location, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_mount_enclosing_volume; int function(GFile* location, GAsyncResult* result, GError** err) c_g_file_mount_enclosing_volume_finish; void function(GFile* file, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_mount_mountable; GFile* function(GFile* file, GAsyncResult* result, GError** err) c_g_file_mount_mountable_finish; int function(GFile* source, GFile* destination, GFileCopyFlags flags, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GError** err) c_g_file_move; GFileIOStream* function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_open_readwrite; void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_open_readwrite_async; GFileIOStream* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_open_readwrite_finish; void function(GFile* file, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_poll_mountable; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_poll_mountable_finish; GAppInfo* function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_query_default_handler; int function(GFile* file, GCancellable* cancellable) c_g_file_query_exists; GFileType function(GFile* file, GFileQueryInfoFlags flags, GCancellable* cancellable) c_g_file_query_file_type; GFileInfo* function(GFile* file, const(char)* attributes, GCancellable* cancellable, GError** err) c_g_file_query_filesystem_info; void function(GFile* file, const(char)* attributes, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_query_filesystem_info_async; GFileInfo* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_query_filesystem_info_finish; GFileInfo* function(GFile* file, const(char)* attributes, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_query_info; void function(GFile* file, const(char)* attributes, GFileQueryInfoFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_query_info_async; GFileInfo* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_query_info_finish; GFileAttributeInfoList* function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_query_settable_attributes; GFileAttributeInfoList* function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_query_writable_namespaces; GFileInputStream* function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_read; void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_read_async; GFileInputStream* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_read_finish; GFileOutputStream* function(GFile* file, const(char)* etag, int makeBackup, GFileCreateFlags flags, GCancellable* cancellable, GError** err) c_g_file_replace; void function(GFile* file, const(char)* etag, int makeBackup, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_replace_async; int function(GFile* file, char* contents, size_t length, const(char)* etag, int makeBackup, GFileCreateFlags flags, char** newEtag, GCancellable* cancellable, GError** err) c_g_file_replace_contents; void function(GFile* file, char* contents, size_t length, const(char)* etag, int makeBackup, GFileCreateFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_replace_contents_async; void function(GFile* file, GBytes* contents, const(char)* etag, int makeBackup, GFileCreateFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_replace_contents_bytes_async; int function(GFile* file, GAsyncResult* res, char** newEtag, GError** err) c_g_file_replace_contents_finish; GFileOutputStream* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_replace_finish; GFileIOStream* function(GFile* file, const(char)* etag, int makeBackup, GFileCreateFlags flags, GCancellable* cancellable, GError** err) c_g_file_replace_readwrite; void function(GFile* file, const(char)* etag, int makeBackup, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_replace_readwrite_async; GFileIOStream* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_replace_readwrite_finish; GFile* function(GFile* file, char* relativePath) c_g_file_resolve_relative_path; int function(GFile* file, const(char)* attribute, GFileAttributeType type, void* valueP, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_set_attribute; int function(GFile* file, const(char)* attribute, const(char)* value, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_set_attribute_byte_string; int function(GFile* file, const(char)* attribute, int value, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_set_attribute_int32; int function(GFile* file, const(char)* attribute, long value, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_set_attribute_int64; int function(GFile* file, const(char)* attribute, const(char)* value, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_set_attribute_string; int function(GFile* file, const(char)* attribute, uint value, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_set_attribute_uint32; int function(GFile* file, const(char)* attribute, ulong value, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_set_attribute_uint64; void function(GFile* file, GFileInfo* info, GFileQueryInfoFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_set_attributes_async; int function(GFile* file, GAsyncResult* result, GFileInfo** info, GError** err) c_g_file_set_attributes_finish; int function(GFile* file, GFileInfo* info, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) c_g_file_set_attributes_from_info; GFile* function(GFile* file, const(char)* displayName, GCancellable* cancellable, GError** err) c_g_file_set_display_name; void function(GFile* file, const(char)* displayName, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_set_display_name_async; GFile* function(GFile* file, GAsyncResult* res, GError** err) c_g_file_set_display_name_finish; void function(GFile* file, GDriveStartFlags flags, GMountOperation* startOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_start_mountable; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_start_mountable_finish; void function(GFile* file, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_stop_mountable; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_stop_mountable_finish; int function(GFile* file) c_g_file_supports_thread_contexts; int function(GFile* file, GCancellable* cancellable, GError** err) c_g_file_trash; void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_trash_async; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_trash_finish; void function(GFile* file, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_unmount_mountable; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_unmount_mountable_finish; void function(GFile* file, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_unmount_mountable_with_operation; int function(GFile* file, GAsyncResult* result, GError** err) c_g_file_unmount_mountable_with_operation_finish; // gio.FileAttributeInfoList GType function() c_g_file_attribute_info_list_get_type; GFileAttributeInfoList* function() c_g_file_attribute_info_list_new; void function(GFileAttributeInfoList* list, const(char)* name, GFileAttributeType type, GFileAttributeInfoFlags flags) c_g_file_attribute_info_list_add; GFileAttributeInfoList* function(GFileAttributeInfoList* list) c_g_file_attribute_info_list_dup; GFileAttributeInfo* function(GFileAttributeInfoList* list, const(char)* name) c_g_file_attribute_info_list_lookup; GFileAttributeInfoList* function(GFileAttributeInfoList* list) c_g_file_attribute_info_list_ref; void function(GFileAttributeInfoList* list) c_g_file_attribute_info_list_unref; // gio.FileAttributeMatcher GType function() c_g_file_attribute_matcher_get_type; GFileAttributeMatcher* function(const(char)* attributes) c_g_file_attribute_matcher_new; int function(GFileAttributeMatcher* matcher, const(char)* ns) c_g_file_attribute_matcher_enumerate_namespace; const(char)* function(GFileAttributeMatcher* matcher) c_g_file_attribute_matcher_enumerate_next; int function(GFileAttributeMatcher* matcher, const(char)* attribute) c_g_file_attribute_matcher_matches; int function(GFileAttributeMatcher* matcher, const(char)* attribute) c_g_file_attribute_matcher_matches_only; GFileAttributeMatcher* function(GFileAttributeMatcher* matcher) c_g_file_attribute_matcher_ref; GFileAttributeMatcher* function(GFileAttributeMatcher* matcher, GFileAttributeMatcher* subtract) c_g_file_attribute_matcher_subtract; char* function(GFileAttributeMatcher* matcher) c_g_file_attribute_matcher_to_string; void function(GFileAttributeMatcher* matcher) c_g_file_attribute_matcher_unref; // gio.FileDescriptorBased GType function() c_g_file_descriptor_based_get_type; int function(GFileDescriptorBased* fdBased) c_g_file_descriptor_based_get_fd; // gio.FileEnumerator GType function() c_g_file_enumerator_get_type; int function(GFileEnumerator* enumerator, GCancellable* cancellable, GError** err) c_g_file_enumerator_close; void function(GFileEnumerator* enumerator, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_enumerator_close_async; int function(GFileEnumerator* enumerator, GAsyncResult* result, GError** err) c_g_file_enumerator_close_finish; GFile* function(GFileEnumerator* enumerator, GFileInfo* info) c_g_file_enumerator_get_child; GFile* function(GFileEnumerator* enumerator) c_g_file_enumerator_get_container; int function(GFileEnumerator* enumerator) c_g_file_enumerator_has_pending; int function(GFileEnumerator* enumerator) c_g_file_enumerator_is_closed; int function(GFileEnumerator* direnum, GFileInfo** outInfo, GFile** outChild, GCancellable* cancellable, GError** err) c_g_file_enumerator_iterate; GFileInfo* function(GFileEnumerator* enumerator, GCancellable* cancellable, GError** err) c_g_file_enumerator_next_file; void function(GFileEnumerator* enumerator, int numFiles, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_enumerator_next_files_async; GList* function(GFileEnumerator* enumerator, GAsyncResult* result, GError** err) c_g_file_enumerator_next_files_finish; void function(GFileEnumerator* enumerator, int pending) c_g_file_enumerator_set_pending; // gio.FileIOStream GType function() c_g_file_io_stream_get_type; char* function(GFileIOStream* stream) c_g_file_io_stream_get_etag; GFileInfo* function(GFileIOStream* stream, const(char)* attributes, GCancellable* cancellable, GError** err) c_g_file_io_stream_query_info; void function(GFileIOStream* stream, const(char)* attributes, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_io_stream_query_info_async; GFileInfo* function(GFileIOStream* stream, GAsyncResult* result, GError** err) c_g_file_io_stream_query_info_finish; // gio.FileIcon GType function() c_g_file_icon_get_type; GIcon* function(GFile* file) c_g_file_icon_new; GFile* function(GFileIcon* icon) c_g_file_icon_get_file; // gio.FileInfo GType function() c_g_file_info_get_type; GFileInfo* function() c_g_file_info_new; void function(GFileInfo* info) c_g_file_info_clear_status; void function(GFileInfo* srcInfo, GFileInfo* destInfo) c_g_file_info_copy_into; GFileInfo* function(GFileInfo* other) c_g_file_info_dup; char* function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_as_string; int function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_boolean; const(char)* function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_byte_string; int function(GFileInfo* info, const(char)* attribute, GFileAttributeType* type, void** valuePp, GFileAttributeStatus* status) c_g_file_info_get_attribute_data; int function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_int32; long function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_int64; GObject* function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_object; GFileAttributeStatus function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_status; const(char)* function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_string; char** function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_stringv; GFileAttributeType function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_type; uint function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_uint32; ulong function(GFileInfo* info, const(char)* attribute) c_g_file_info_get_attribute_uint64; const(char)* function(GFileInfo* info) c_g_file_info_get_content_type; GDateTime* function(GFileInfo* info) c_g_file_info_get_deletion_date; const(char)* function(GFileInfo* info) c_g_file_info_get_display_name; const(char)* function(GFileInfo* info) c_g_file_info_get_edit_name; const(char)* function(GFileInfo* info) c_g_file_info_get_etag; GFileType function(GFileInfo* info) c_g_file_info_get_file_type; GIcon* function(GFileInfo* info) c_g_file_info_get_icon; int function(GFileInfo* info) c_g_file_info_get_is_backup; int function(GFileInfo* info) c_g_file_info_get_is_hidden; int function(GFileInfo* info) c_g_file_info_get_is_symlink; void function(GFileInfo* info, GTimeVal* result) c_g_file_info_get_modification_time; char* function(GFileInfo* info) c_g_file_info_get_name; long function(GFileInfo* info) c_g_file_info_get_size; int function(GFileInfo* info) c_g_file_info_get_sort_order; GIcon* function(GFileInfo* info) c_g_file_info_get_symbolic_icon; const(char)* function(GFileInfo* info) c_g_file_info_get_symlink_target; int function(GFileInfo* info, const(char)* attribute) c_g_file_info_has_attribute; int function(GFileInfo* info, const(char)* nameSpace) c_g_file_info_has_namespace; char** function(GFileInfo* info, const(char)* nameSpace) c_g_file_info_list_attributes; void function(GFileInfo* info, const(char)* attribute) c_g_file_info_remove_attribute; void function(GFileInfo* info, const(char)* attribute, GFileAttributeType type, void* valueP) c_g_file_info_set_attribute; void function(GFileInfo* info, const(char)* attribute, int attrValue) c_g_file_info_set_attribute_boolean; void function(GFileInfo* info, const(char)* attribute, const(char)* attrValue) c_g_file_info_set_attribute_byte_string; void function(GFileInfo* info, const(char)* attribute, int attrValue) c_g_file_info_set_attribute_int32; void function(GFileInfo* info, const(char)* attribute, long attrValue) c_g_file_info_set_attribute_int64; void function(GFileInfo* info, GFileAttributeMatcher* mask) c_g_file_info_set_attribute_mask; void function(GFileInfo* info, const(char)* attribute, GObject* attrValue) c_g_file_info_set_attribute_object; int function(GFileInfo* info, const(char)* attribute, GFileAttributeStatus status) c_g_file_info_set_attribute_status; void function(GFileInfo* info, const(char)* attribute, const(char)* attrValue) c_g_file_info_set_attribute_string; void function(GFileInfo* info, const(char)* attribute, char** attrValue) c_g_file_info_set_attribute_stringv; void function(GFileInfo* info, const(char)* attribute, uint attrValue) c_g_file_info_set_attribute_uint32; void function(GFileInfo* info, const(char)* attribute, ulong attrValue) c_g_file_info_set_attribute_uint64; void function(GFileInfo* info, const(char)* contentType) c_g_file_info_set_content_type; void function(GFileInfo* info, const(char)* displayName) c_g_file_info_set_display_name; void function(GFileInfo* info, const(char)* editName) c_g_file_info_set_edit_name; void function(GFileInfo* info, GFileType type) c_g_file_info_set_file_type; void function(GFileInfo* info, GIcon* icon) c_g_file_info_set_icon; void function(GFileInfo* info, int isHidden) c_g_file_info_set_is_hidden; void function(GFileInfo* info, int isSymlink) c_g_file_info_set_is_symlink; void function(GFileInfo* info, GTimeVal* mtime) c_g_file_info_set_modification_time; void function(GFileInfo* info, char* name) c_g_file_info_set_name; void function(GFileInfo* info, long size) c_g_file_info_set_size; void function(GFileInfo* info, int sortOrder) c_g_file_info_set_sort_order; void function(GFileInfo* info, GIcon* icon) c_g_file_info_set_symbolic_icon; void function(GFileInfo* info, const(char)* symlinkTarget) c_g_file_info_set_symlink_target; void function(GFileInfo* info) c_g_file_info_unset_attribute_mask; // gio.FileInputStream GType function() c_g_file_input_stream_get_type; GFileInfo* function(GFileInputStream* stream, const(char)* attributes, GCancellable* cancellable, GError** err) c_g_file_input_stream_query_info; void function(GFileInputStream* stream, const(char)* attributes, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_input_stream_query_info_async; GFileInfo* function(GFileInputStream* stream, GAsyncResult* result, GError** err) c_g_file_input_stream_query_info_finish; // gio.FileMonitor GType function() c_g_file_monitor_get_type; int function(GFileMonitor* monitor) c_g_file_monitor_cancel; void function(GFileMonitor* monitor, GFile* child, GFile* otherFile, GFileMonitorEvent eventType) c_g_file_monitor_emit_event; int function(GFileMonitor* monitor) c_g_file_monitor_is_cancelled; void function(GFileMonitor* monitor, int limitMsecs) c_g_file_monitor_set_rate_limit; // gio.FileOutputStream GType function() c_g_file_output_stream_get_type; char* function(GFileOutputStream* stream) c_g_file_output_stream_get_etag; GFileInfo* function(GFileOutputStream* stream, const(char)* attributes, GCancellable* cancellable, GError** err) c_g_file_output_stream_query_info; void function(GFileOutputStream* stream, const(char)* attributes, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_file_output_stream_query_info_async; GFileInfo* function(GFileOutputStream* stream, GAsyncResult* result, GError** err) c_g_file_output_stream_query_info_finish; // gio.FilenameCompleter GType function() c_g_filename_completer_get_type; GFilenameCompleter* function() c_g_filename_completer_new; char* function(GFilenameCompleter* completer, const(char)* initialText) c_g_filename_completer_get_completion_suffix; char** function(GFilenameCompleter* completer, const(char)* initialText) c_g_filename_completer_get_completions; void function(GFilenameCompleter* completer, int dirsOnly) c_g_filename_completer_set_dirs_only; // gio.FilterInputStream GType function() c_g_filter_input_stream_get_type; GInputStream* function(GFilterInputStream* stream) c_g_filter_input_stream_get_base_stream; int function(GFilterInputStream* stream) c_g_filter_input_stream_get_close_base_stream; void function(GFilterInputStream* stream, int closeBase) c_g_filter_input_stream_set_close_base_stream; // gio.FilterOutputStream GType function() c_g_filter_output_stream_get_type; GOutputStream* function(GFilterOutputStream* stream) c_g_filter_output_stream_get_base_stream; int function(GFilterOutputStream* stream) c_g_filter_output_stream_get_close_base_stream; void function(GFilterOutputStream* stream, int closeBase) c_g_filter_output_stream_set_close_base_stream; // gio.IOExtension const(char)* function(GIOExtension* extension) c_g_io_extension_get_name; int function(GIOExtension* extension) c_g_io_extension_get_priority; GType function(GIOExtension* extension) c_g_io_extension_get_type; GTypeClass* function(GIOExtension* extension) c_g_io_extension_ref_class; // gio.IOExtensionPoint GIOExtension* function(GIOExtensionPoint* extensionPoint, const(char)* name) c_g_io_extension_point_get_extension_by_name; GList* function(GIOExtensionPoint* extensionPoint) c_g_io_extension_point_get_extensions; GType function(GIOExtensionPoint* extensionPoint) c_g_io_extension_point_get_required_type; void function(GIOExtensionPoint* extensionPoint, GType type) c_g_io_extension_point_set_required_type; GIOExtension* function(const(char)* extensionPointName, GType type, const(char)* extensionName, int priority) c_g_io_extension_point_implement; GIOExtensionPoint* function(const(char)* name) c_g_io_extension_point_lookup; GIOExtensionPoint* function(const(char)* name) c_g_io_extension_point_register; // gio.IOModule GType function() c_g_io_module_get_type; GIOModule* function(char* filename) c_g_io_module_new; GList* function(char* dirname) c_g_io_modules_load_all_in_directory; GList* function(char* dirname, GIOModuleScope* scop) c_g_io_modules_load_all_in_directory_with_scope; void function(char* dirname) c_g_io_modules_scan_all_in_directory; void function(char* dirname, GIOModuleScope* scop) c_g_io_modules_scan_all_in_directory_with_scope; // gio.IOModuleScope void function(GIOModuleScope* scop, const(char)* basename) c_g_io_module_scope_block; void function(GIOModuleScope* scop) c_g_io_module_scope_free; GIOModuleScope* function(GIOModuleScopeFlags flags) c_g_io_module_scope_new; // gio.IOSchedulerJob int function(GIOSchedulerJob* job, GSourceFunc func, void* userData, GDestroyNotify notify) c_g_io_scheduler_job_send_to_mainloop; void function(GIOSchedulerJob* job, GSourceFunc func, void* userData, GDestroyNotify notify) c_g_io_scheduler_job_send_to_mainloop_async; void function() c_g_io_scheduler_cancel_all_jobs; void function(GIOSchedulerJobFunc jobFunc, void* userData, GDestroyNotify notify, int ioPriority, GCancellable* cancellable) c_g_io_scheduler_push_job; // gio.IOStream GType function() c_g_io_stream_get_type; int function(GAsyncResult* result, GError** err) c_g_io_stream_splice_finish; void function(GIOStream* stream) c_g_io_stream_clear_pending; int function(GIOStream* stream, GCancellable* cancellable, GError** err) c_g_io_stream_close; void function(GIOStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_io_stream_close_async; int function(GIOStream* stream, GAsyncResult* result, GError** err) c_g_io_stream_close_finish; GInputStream* function(GIOStream* stream) c_g_io_stream_get_input_stream; GOutputStream* function(GIOStream* stream) c_g_io_stream_get_output_stream; int function(GIOStream* stream) c_g_io_stream_has_pending; int function(GIOStream* stream) c_g_io_stream_is_closed; int function(GIOStream* stream, GError** err) c_g_io_stream_set_pending; void function(GIOStream* stream1, GIOStream* stream2, GIOStreamSpliceFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_io_stream_splice_async; // gio.Icon GType function() c_g_icon_get_type; GIcon* function(GVariant* value) c_g_icon_deserialize; uint function(void* icon) c_g_icon_hash; GIcon* function(const(char)* str, GError** err) c_g_icon_new_for_string; int function(GIcon* icon1, GIcon* icon2) c_g_icon_equal; GVariant* function(GIcon* icon) c_g_icon_serialize; char* function(GIcon* icon) c_g_icon_to_string; // gio.InetAddress GType function() c_g_inet_address_get_type; GInetAddress* function(GSocketFamily family) c_g_inet_address_new_any; GInetAddress* function(ubyte* bytes, GSocketFamily family) c_g_inet_address_new_from_bytes; GInetAddress* function(const(char)* str) c_g_inet_address_new_from_string; GInetAddress* function(GSocketFamily family) c_g_inet_address_new_loopback; int function(GInetAddress* address, GInetAddress* otherAddress) c_g_inet_address_equal; GSocketFamily function(GInetAddress* address) c_g_inet_address_get_family; int function(GInetAddress* address) c_g_inet_address_get_is_any; int function(GInetAddress* address) c_g_inet_address_get_is_link_local; int function(GInetAddress* address) c_g_inet_address_get_is_loopback; int function(GInetAddress* address) c_g_inet_address_get_is_mc_global; int function(GInetAddress* address) c_g_inet_address_get_is_mc_link_local; int function(GInetAddress* address) c_g_inet_address_get_is_mc_node_local; int function(GInetAddress* address) c_g_inet_address_get_is_mc_org_local; int function(GInetAddress* address) c_g_inet_address_get_is_mc_site_local; int function(GInetAddress* address) c_g_inet_address_get_is_multicast; int function(GInetAddress* address) c_g_inet_address_get_is_site_local; size_t function(GInetAddress* address) c_g_inet_address_get_native_size; ubyte* function(GInetAddress* address) c_g_inet_address_to_bytes; char* function(GInetAddress* address) c_g_inet_address_to_string; // gio.InetAddressMask GType function() c_g_inet_address_mask_get_type; GInetAddressMask* function(GInetAddress* addr, uint length, GError** err) c_g_inet_address_mask_new; GInetAddressMask* function(const(char)* maskString, GError** err) c_g_inet_address_mask_new_from_string; int function(GInetAddressMask* mask, GInetAddressMask* mask2) c_g_inet_address_mask_equal; GInetAddress* function(GInetAddressMask* mask) c_g_inet_address_mask_get_address; GSocketFamily function(GInetAddressMask* mask) c_g_inet_address_mask_get_family; uint function(GInetAddressMask* mask) c_g_inet_address_mask_get_length; int function(GInetAddressMask* mask, GInetAddress* address) c_g_inet_address_mask_matches; char* function(GInetAddressMask* mask) c_g_inet_address_mask_to_string; // gio.InetSocketAddress GType function() c_g_inet_socket_address_get_type; GSocketAddress* function(GInetAddress* address, ushort port) c_g_inet_socket_address_new; GSocketAddress* function(const(char)* address, uint port) c_g_inet_socket_address_new_from_string; GInetAddress* function(GInetSocketAddress* address) c_g_inet_socket_address_get_address; uint function(GInetSocketAddress* address) c_g_inet_socket_address_get_flowinfo; ushort function(GInetSocketAddress* address) c_g_inet_socket_address_get_port; uint function(GInetSocketAddress* address) c_g_inet_socket_address_get_scope_id; // gio.Initable GType function() c_g_initable_get_type; void* function(GType objectType, GCancellable* cancellable, GError** error, const(char)* firstPropertyName, ... ) c_g_initable_new; GObject* function(GType objectType, const(char)* firstPropertyName, void* varArgs, GCancellable* cancellable, GError** err) c_g_initable_new_valist; void* function(GType objectType, uint nParameters, GParameter* parameters, GCancellable* cancellable, GError** err) c_g_initable_newv; int function(GInitable* initable, GCancellable* cancellable, GError** err) c_g_initable_init; // gio.InputStream GType function() c_g_input_stream_get_type; void function(GInputStream* stream) c_g_input_stream_clear_pending; int function(GInputStream* stream, GCancellable* cancellable, GError** err) c_g_input_stream_close; void function(GInputStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_input_stream_close_async; int function(GInputStream* stream, GAsyncResult* result, GError** err) c_g_input_stream_close_finish; int function(GInputStream* stream) c_g_input_stream_has_pending; int function(GInputStream* stream) c_g_input_stream_is_closed; ptrdiff_t function(GInputStream* stream, void* buffer, size_t count, GCancellable* cancellable, GError** err) c_g_input_stream_read; int function(GInputStream* stream, void* buffer, size_t count, size_t* bytesRead, GCancellable* cancellable, GError** err) c_g_input_stream_read_all; void function(GInputStream* stream, void* buffer, size_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_input_stream_read_all_async; int function(GInputStream* stream, GAsyncResult* result, size_t* bytesRead, GError** err) c_g_input_stream_read_all_finish; void function(GInputStream* stream, void* buffer, size_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_input_stream_read_async; GBytes* function(GInputStream* stream, size_t count, GCancellable* cancellable, GError** err) c_g_input_stream_read_bytes; void function(GInputStream* stream, size_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_input_stream_read_bytes_async; GBytes* function(GInputStream* stream, GAsyncResult* result, GError** err) c_g_input_stream_read_bytes_finish; ptrdiff_t function(GInputStream* stream, GAsyncResult* result, GError** err) c_g_input_stream_read_finish; int function(GInputStream* stream, GError** err) c_g_input_stream_set_pending; ptrdiff_t function(GInputStream* stream, size_t count, GCancellable* cancellable, GError** err) c_g_input_stream_skip; void function(GInputStream* stream, size_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_input_stream_skip_async; ptrdiff_t function(GInputStream* stream, GAsyncResult* result, GError** err) c_g_input_stream_skip_finish; // gio.ListModel GType function() c_g_list_model_get_type; void* function(GListModel* list, uint position) c_g_list_model_get_item; GType function(GListModel* list) c_g_list_model_get_item_type; uint function(GListModel* list) c_g_list_model_get_n_items; GObject* function(GListModel* list, uint position) c_g_list_model_get_object; void function(GListModel* list, uint position, uint removed, uint added) c_g_list_model_items_changed; // gio.ListStore GType function() c_g_list_store_get_type; GListStore* function(GType itemType) c_g_list_store_new; void function(GListStore* store, void* item) c_g_list_store_append; void function(GListStore* store, uint position, void* item) c_g_list_store_insert; uint function(GListStore* store, void* item, GCompareDataFunc compareFunc, void* userData) c_g_list_store_insert_sorted; void function(GListStore* store, uint position) c_g_list_store_remove; void function(GListStore* store) c_g_list_store_remove_all; void function(GListStore* store, GCompareDataFunc compareFunc, void* userData) c_g_list_store_sort; void function(GListStore* store, uint position, uint nRemovals, void** additions, uint nAdditions) c_g_list_store_splice; // gio.LoadableIcon GType function() c_g_loadable_icon_get_type; GInputStream* function(GLoadableIcon* icon, int size, char** type, GCancellable* cancellable, GError** err) c_g_loadable_icon_load; void function(GLoadableIcon* icon, int size, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_loadable_icon_load_async; GInputStream* function(GLoadableIcon* icon, GAsyncResult* res, char** type, GError** err) c_g_loadable_icon_load_finish; // gio.MemoryInputStream GType function() c_g_memory_input_stream_get_type; GInputStream* function() c_g_memory_input_stream_new; GInputStream* function(GBytes* bytes) c_g_memory_input_stream_new_from_bytes; GInputStream* function(void* data, ptrdiff_t len, GDestroyNotify destroy) c_g_memory_input_stream_new_from_data; void function(GMemoryInputStream* stream, GBytes* bytes) c_g_memory_input_stream_add_bytes; void function(GMemoryInputStream* stream, void* data, ptrdiff_t len, GDestroyNotify destroy) c_g_memory_input_stream_add_data; // gio.MemoryOutputStream GType function() c_g_memory_output_stream_get_type; GOutputStream* function(void* data, size_t size, GReallocFunc reallocFunction, GDestroyNotify destroyFunction) c_g_memory_output_stream_new; GOutputStream* function() c_g_memory_output_stream_new_resizable; void* function(GMemoryOutputStream* ostream) c_g_memory_output_stream_get_data; size_t function(GMemoryOutputStream* ostream) c_g_memory_output_stream_get_data_size; size_t function(GMemoryOutputStream* ostream) c_g_memory_output_stream_get_size; GBytes* function(GMemoryOutputStream* ostream) c_g_memory_output_stream_steal_as_bytes; void* function(GMemoryOutputStream* ostream) c_g_memory_output_stream_steal_data; // gio.Menu GType function() c_g_menu_get_type; GMenu* function() c_g_menu_new; void function(GMenu* menu, const(char)* label, const(char)* detailedAction) c_g_menu_append; void function(GMenu* menu, GMenuItem* item) c_g_menu_append_item; void function(GMenu* menu, const(char)* label, GMenuModel* section) c_g_menu_append_section; void function(GMenu* menu, const(char)* label, GMenuModel* submenu) c_g_menu_append_submenu; void function(GMenu* menu) c_g_menu_freeze; void function(GMenu* menu, int position, const(char)* label, const(char)* detailedAction) c_g_menu_insert; void function(GMenu* menu, int position, GMenuItem* item) c_g_menu_insert_item; void function(GMenu* menu, int position, const(char)* label, GMenuModel* section) c_g_menu_insert_section; void function(GMenu* menu, int position, const(char)* label, GMenuModel* submenu) c_g_menu_insert_submenu; void function(GMenu* menu, const(char)* label, const(char)* detailedAction) c_g_menu_prepend; void function(GMenu* menu, GMenuItem* item) c_g_menu_prepend_item; void function(GMenu* menu, const(char)* label, GMenuModel* section) c_g_menu_prepend_section; void function(GMenu* menu, const(char)* label, GMenuModel* submenu) c_g_menu_prepend_submenu; void function(GMenu* menu, int position) c_g_menu_remove; void function(GMenu* menu) c_g_menu_remove_all; // gio.MenuAttributeIter GType function() c_g_menu_attribute_iter_get_type; const(char)* function(GMenuAttributeIter* iter) c_g_menu_attribute_iter_get_name; int function(GMenuAttributeIter* iter, char** outName, GVariant** value) c_g_menu_attribute_iter_get_next; GVariant* function(GMenuAttributeIter* iter) c_g_menu_attribute_iter_get_value; int function(GMenuAttributeIter* iter) c_g_menu_attribute_iter_next; // gio.MenuItem GType function() c_g_menu_item_get_type; GMenuItem* function(const(char)* label, const(char)* detailedAction) c_g_menu_item_new; GMenuItem* function(GMenuModel* model, int itemIndex) c_g_menu_item_new_from_model; GMenuItem* function(const(char)* label, GMenuModel* section) c_g_menu_item_new_section; GMenuItem* function(const(char)* label, GMenuModel* submenu) c_g_menu_item_new_submenu; int function(GMenuItem* menuItem, const(char)* attribute, const(char)* formatString, ... ) c_g_menu_item_get_attribute; GVariant* function(GMenuItem* menuItem, const(char)* attribute, GVariantType* expectedType) c_g_menu_item_get_attribute_value; GMenuModel* function(GMenuItem* menuItem, const(char)* link) c_g_menu_item_get_link; void function(GMenuItem* menuItem, const(char)* action, const(char)* formatString, ... ) c_g_menu_item_set_action_and_target; void function(GMenuItem* menuItem, const(char)* action, GVariant* targetValue) c_g_menu_item_set_action_and_target_value; void function(GMenuItem* menuItem, const(char)* attribute, const(char)* formatString, ... ) c_g_menu_item_set_attribute; void function(GMenuItem* menuItem, const(char)* attribute, GVariant* value) c_g_menu_item_set_attribute_value; void function(GMenuItem* menuItem, const(char)* detailedAction) c_g_menu_item_set_detailed_action; void function(GMenuItem* menuItem, GIcon* icon) c_g_menu_item_set_icon; void function(GMenuItem* menuItem, const(char)* label) c_g_menu_item_set_label; void function(GMenuItem* menuItem, const(char)* link, GMenuModel* model) c_g_menu_item_set_link; void function(GMenuItem* menuItem, GMenuModel* section) c_g_menu_item_set_section; void function(GMenuItem* menuItem, GMenuModel* submenu) c_g_menu_item_set_submenu; // gio.MenuLinkIter GType function() c_g_menu_link_iter_get_type; const(char)* function(GMenuLinkIter* iter) c_g_menu_link_iter_get_name; int function(GMenuLinkIter* iter, char** outLink, GMenuModel** value) c_g_menu_link_iter_get_next; GMenuModel* function(GMenuLinkIter* iter) c_g_menu_link_iter_get_value; int function(GMenuLinkIter* iter) c_g_menu_link_iter_next; // gio.MenuModel GType function() c_g_menu_model_get_type; int function(GMenuModel* model, int itemIndex, const(char)* attribute, const(char)* formatString, ... ) c_g_menu_model_get_item_attribute; GVariant* function(GMenuModel* model, int itemIndex, const(char)* attribute, GVariantType* expectedType) c_g_menu_model_get_item_attribute_value; GMenuModel* function(GMenuModel* model, int itemIndex, const(char)* link) c_g_menu_model_get_item_link; int function(GMenuModel* model) c_g_menu_model_get_n_items; int function(GMenuModel* model) c_g_menu_model_is_mutable; void function(GMenuModel* model, int position, int removed, int added) c_g_menu_model_items_changed; GMenuAttributeIter* function(GMenuModel* model, int itemIndex) c_g_menu_model_iterate_item_attributes; GMenuLinkIter* function(GMenuModel* model, int itemIndex) c_g_menu_model_iterate_item_links; // gio.Mount GType function() c_g_mount_get_type; int function(GMount* mount) c_g_mount_can_eject; int function(GMount* mount) c_g_mount_can_unmount; void function(GMount* mount, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_mount_eject; int function(GMount* mount, GAsyncResult* result, GError** err) c_g_mount_eject_finish; void function(GMount* mount, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_mount_eject_with_operation; int function(GMount* mount, GAsyncResult* result, GError** err) c_g_mount_eject_with_operation_finish; GFile* function(GMount* mount) c_g_mount_get_default_location; GDrive* function(GMount* mount) c_g_mount_get_drive; GIcon* function(GMount* mount) c_g_mount_get_icon; char* function(GMount* mount) c_g_mount_get_name; GFile* function(GMount* mount) c_g_mount_get_root; const(char)* function(GMount* mount) c_g_mount_get_sort_key; GIcon* function(GMount* mount) c_g_mount_get_symbolic_icon; char* function(GMount* mount) c_g_mount_get_uuid; GVolume* function(GMount* mount) c_g_mount_get_volume; void function(GMount* mount, int forceRescan, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_mount_guess_content_type; char** function(GMount* mount, GAsyncResult* result, GError** err) c_g_mount_guess_content_type_finish; char** function(GMount* mount, int forceRescan, GCancellable* cancellable, GError** err) c_g_mount_guess_content_type_sync; int function(GMount* mount) c_g_mount_is_shadowed; void function(GMount* mount, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_mount_remount; int function(GMount* mount, GAsyncResult* result, GError** err) c_g_mount_remount_finish; void function(GMount* mount) c_g_mount_shadow; void function(GMount* mount, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_mount_unmount; int function(GMount* mount, GAsyncResult* result, GError** err) c_g_mount_unmount_finish; void function(GMount* mount, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_mount_unmount_with_operation; int function(GMount* mount, GAsyncResult* result, GError** err) c_g_mount_unmount_with_operation_finish; void function(GMount* mount) c_g_mount_unshadow; // gio.MountOperation GType function() c_g_mount_operation_get_type; GMountOperation* function() c_g_mount_operation_new; int function(GMountOperation* op) c_g_mount_operation_get_anonymous; int function(GMountOperation* op) c_g_mount_operation_get_choice; const(char)* function(GMountOperation* op) c_g_mount_operation_get_domain; const(char)* function(GMountOperation* op) c_g_mount_operation_get_password; GPasswordSave function(GMountOperation* op) c_g_mount_operation_get_password_save; const(char)* function(GMountOperation* op) c_g_mount_operation_get_username; void function(GMountOperation* op, GMountOperationResult result) c_g_mount_operation_reply; void function(GMountOperation* op, int anonymous) c_g_mount_operation_set_anonymous; void function(GMountOperation* op, int choice) c_g_mount_operation_set_choice; void function(GMountOperation* op, const(char)* domain) c_g_mount_operation_set_domain; void function(GMountOperation* op, const(char)* password) c_g_mount_operation_set_password; void function(GMountOperation* op, GPasswordSave save) c_g_mount_operation_set_password_save; void function(GMountOperation* op, const(char)* username) c_g_mount_operation_set_username; // gio.NativeVolumeMonitor GType function() c_g_native_volume_monitor_get_type; // gio.NetworkAddress GType function() c_g_network_address_get_type; GSocketConnectable* function(const(char)* hostname, ushort port) c_g_network_address_new; GSocketConnectable* function(ushort port) c_g_network_address_new_loopback; GSocketConnectable* function(const(char)* hostAndPort, ushort defaultPort, GError** err) c_g_network_address_parse; GSocketConnectable* function(const(char)* uri, ushort defaultPort, GError** err) c_g_network_address_parse_uri; const(char)* function(GNetworkAddress* addr) c_g_network_address_get_hostname; ushort function(GNetworkAddress* addr) c_g_network_address_get_port; const(char)* function(GNetworkAddress* addr) c_g_network_address_get_scheme; // gio.NetworkMonitor GType function() c_g_network_monitor_get_type; GNetworkMonitor* function() c_g_network_monitor_get_default; int function(GNetworkMonitor* monitor, GSocketConnectable* connectable, GCancellable* cancellable, GError** err) c_g_network_monitor_can_reach; void function(GNetworkMonitor* monitor, GSocketConnectable* connectable, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_network_monitor_can_reach_async; int function(GNetworkMonitor* monitor, GAsyncResult* result, GError** err) c_g_network_monitor_can_reach_finish; GNetworkConnectivity function(GNetworkMonitor* monitor) c_g_network_monitor_get_connectivity; int function(GNetworkMonitor* monitor) c_g_network_monitor_get_network_available; int function(GNetworkMonitor* monitor) c_g_network_monitor_get_network_metered; // gio.NetworkService GType function() c_g_network_service_get_type; GSocketConnectable* function(const(char)* service, const(char)* protocol, const(char)* domain) c_g_network_service_new; const(char)* function(GNetworkService* srv) c_g_network_service_get_domain; const(char)* function(GNetworkService* srv) c_g_network_service_get_protocol; const(char)* function(GNetworkService* srv) c_g_network_service_get_scheme; const(char)* function(GNetworkService* srv) c_g_network_service_get_service; void function(GNetworkService* srv, const(char)* scheme) c_g_network_service_set_scheme; // gio.Notification GType function() c_g_notification_get_type; GNotification* function(const(char)* title) c_g_notification_new; void function(GNotification* notification, const(char)* label, const(char)* detailedAction) c_g_notification_add_button; void function(GNotification* notification, const(char)* label, const(char)* action, const(char)* targetFormat, ... ) c_g_notification_add_button_with_target; void function(GNotification* notification, const(char)* label, const(char)* action, GVariant* target) c_g_notification_add_button_with_target_value; void function(GNotification* notification, const(char)* bod) c_g_notification_set_body; void function(GNotification* notification, const(char)* detailedAction) c_g_notification_set_default_action; void function(GNotification* notification, const(char)* action, const(char)* targetFormat, ... ) c_g_notification_set_default_action_and_target; void function(GNotification* notification, const(char)* action, GVariant* target) c_g_notification_set_default_action_and_target_value; void function(GNotification* notification, GIcon* icon) c_g_notification_set_icon; void function(GNotification* notification, GNotificationPriority priority) c_g_notification_set_priority; void function(GNotification* notification, const(char)* title) c_g_notification_set_title; void function(GNotification* notification, int urgent) c_g_notification_set_urgent; // gio.OutputStream GType function() c_g_output_stream_get_type; void function(GOutputStream* stream) c_g_output_stream_clear_pending; int function(GOutputStream* stream, GCancellable* cancellable, GError** err) c_g_output_stream_close; void function(GOutputStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_output_stream_close_async; int function(GOutputStream* stream, GAsyncResult* result, GError** err) c_g_output_stream_close_finish; int function(GOutputStream* stream, GCancellable* cancellable, GError** err) c_g_output_stream_flush; void function(GOutputStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_output_stream_flush_async; int function(GOutputStream* stream, GAsyncResult* result, GError** err) c_g_output_stream_flush_finish; int function(GOutputStream* stream) c_g_output_stream_has_pending; int function(GOutputStream* stream) c_g_output_stream_is_closed; int function(GOutputStream* stream) c_g_output_stream_is_closing; int function(GOutputStream* stream, size_t* bytesWritten, GCancellable* cancellable, GError** error, const(char)* format, ... ) c_g_output_stream_printf; int function(GOutputStream* stream, GError** err) c_g_output_stream_set_pending; ptrdiff_t function(GOutputStream* stream, GInputStream* source, GOutputStreamSpliceFlags flags, GCancellable* cancellable, GError** err) c_g_output_stream_splice; void function(GOutputStream* stream, GInputStream* source, GOutputStreamSpliceFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_output_stream_splice_async; ptrdiff_t function(GOutputStream* stream, GAsyncResult* result, GError** err) c_g_output_stream_splice_finish; int function(GOutputStream* stream, size_t* bytesWritten, GCancellable* cancellable, GError** error, const(char)* format, void* args) c_g_output_stream_vprintf; ptrdiff_t function(GOutputStream* stream, void* buffer, size_t count, GCancellable* cancellable, GError** err) c_g_output_stream_write; int function(GOutputStream* stream, void* buffer, size_t count, size_t* bytesWritten, GCancellable* cancellable, GError** err) c_g_output_stream_write_all; void function(GOutputStream* stream, void* buffer, size_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_output_stream_write_all_async; int function(GOutputStream* stream, GAsyncResult* result, size_t* bytesWritten, GError** err) c_g_output_stream_write_all_finish; void function(GOutputStream* stream, void* buffer, size_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_output_stream_write_async; ptrdiff_t function(GOutputStream* stream, GBytes* bytes, GCancellable* cancellable, GError** err) c_g_output_stream_write_bytes; void function(GOutputStream* stream, GBytes* bytes, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_output_stream_write_bytes_async; ptrdiff_t function(GOutputStream* stream, GAsyncResult* result, GError** err) c_g_output_stream_write_bytes_finish; ptrdiff_t function(GOutputStream* stream, GAsyncResult* result, GError** err) c_g_output_stream_write_finish; // gio.Permission GType function() c_g_permission_get_type; int function(GPermission* permission, GCancellable* cancellable, GError** err) c_g_permission_acquire; void function(GPermission* permission, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_permission_acquire_async; int function(GPermission* permission, GAsyncResult* result, GError** err) c_g_permission_acquire_finish; int function(GPermission* permission) c_g_permission_get_allowed; int function(GPermission* permission) c_g_permission_get_can_acquire; int function(GPermission* permission) c_g_permission_get_can_release; void function(GPermission* permission, int allowed, int canAcquire, int canRelease) c_g_permission_impl_update; int function(GPermission* permission, GCancellable* cancellable, GError** err) c_g_permission_release; void function(GPermission* permission, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_permission_release_async; int function(GPermission* permission, GAsyncResult* result, GError** err) c_g_permission_release_finish; // gio.PollableInputStream GType function() c_g_pollable_input_stream_get_type; int function(GPollableInputStream* stream) c_g_pollable_input_stream_can_poll; GSource* function(GPollableInputStream* stream, GCancellable* cancellable) c_g_pollable_input_stream_create_source; int function(GPollableInputStream* stream) c_g_pollable_input_stream_is_readable; ptrdiff_t function(GPollableInputStream* stream, void* buffer, size_t count, GCancellable* cancellable, GError** err) c_g_pollable_input_stream_read_nonblocking; // gio.PollableOutputStream GType function() c_g_pollable_output_stream_get_type; int function(GPollableOutputStream* stream) c_g_pollable_output_stream_can_poll; GSource* function(GPollableOutputStream* stream, GCancellable* cancellable) c_g_pollable_output_stream_create_source; int function(GPollableOutputStream* stream) c_g_pollable_output_stream_is_writable; ptrdiff_t function(GPollableOutputStream* stream, void* buffer, size_t count, GCancellable* cancellable, GError** err) c_g_pollable_output_stream_write_nonblocking; // gio.PropertyAction GType function() c_g_property_action_get_type; GPropertyAction* function(const(char)* name, void* object, const(char)* propertyName) c_g_property_action_new; // gio.Proxy GType function() c_g_proxy_get_type; GProxy* function(const(char)* protocol) c_g_proxy_get_default_for_protocol; GIOStream* function(GProxy* proxy, GIOStream* connection, GProxyAddress* proxyAddress, GCancellable* cancellable, GError** err) c_g_proxy_connect; void function(GProxy* proxy, GIOStream* connection, GProxyAddress* proxyAddress, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_proxy_connect_async; GIOStream* function(GProxy* proxy, GAsyncResult* result, GError** err) c_g_proxy_connect_finish; int function(GProxy* proxy) c_g_proxy_supports_hostname; // gio.ProxyAddress GType function() c_g_proxy_address_get_type; GSocketAddress* function(GInetAddress* inetaddr, ushort port, const(char)* protocol, const(char)* destHostname, ushort destPort, const(char)* username, const(char)* password) c_g_proxy_address_new; const(char)* function(GProxyAddress* proxy) c_g_proxy_address_get_destination_hostname; ushort function(GProxyAddress* proxy) c_g_proxy_address_get_destination_port; const(char)* function(GProxyAddress* proxy) c_g_proxy_address_get_destination_protocol; const(char)* function(GProxyAddress* proxy) c_g_proxy_address_get_password; const(char)* function(GProxyAddress* proxy) c_g_proxy_address_get_protocol; const(char)* function(GProxyAddress* proxy) c_g_proxy_address_get_uri; const(char)* function(GProxyAddress* proxy) c_g_proxy_address_get_username; // gio.ProxyAddressEnumerator GType function() c_g_proxy_address_enumerator_get_type; // gio.ProxyResolver GType function() c_g_proxy_resolver_get_type; GProxyResolver* function() c_g_proxy_resolver_get_default; int function(GProxyResolver* resolver) c_g_proxy_resolver_is_supported; char** function(GProxyResolver* resolver, const(char)* uri, GCancellable* cancellable, GError** err) c_g_proxy_resolver_lookup; void function(GProxyResolver* resolver, const(char)* uri, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_proxy_resolver_lookup_async; char** function(GProxyResolver* resolver, GAsyncResult* result, GError** err) c_g_proxy_resolver_lookup_finish; // gio.RemoteActionGroup GType function() c_g_remote_action_group_get_type; void function(GRemoteActionGroup* remote, const(char)* actionName, GVariant* parameter, GVariant* platformData) c_g_remote_action_group_activate_action_full; void function(GRemoteActionGroup* remote, const(char)* actionName, GVariant* value, GVariant* platformData) c_g_remote_action_group_change_action_state_full; // gio.Resolver GType function() c_g_resolver_get_type; void function(GList* addresses) c_g_resolver_free_addresses; void function(GList* targets) c_g_resolver_free_targets; GResolver* function() c_g_resolver_get_default; char* function(GResolver* resolver, GInetAddress* address, GCancellable* cancellable, GError** err) c_g_resolver_lookup_by_address; void function(GResolver* resolver, GInetAddress* address, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_resolver_lookup_by_address_async; char* function(GResolver* resolver, GAsyncResult* result, GError** err) c_g_resolver_lookup_by_address_finish; GList* function(GResolver* resolver, const(char)* hostname, GCancellable* cancellable, GError** err) c_g_resolver_lookup_by_name; void function(GResolver* resolver, const(char)* hostname, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_resolver_lookup_by_name_async; GList* function(GResolver* resolver, GAsyncResult* result, GError** err) c_g_resolver_lookup_by_name_finish; GList* function(GResolver* resolver, const(char)* rrname, GResolverRecordType recordType, GCancellable* cancellable, GError** err) c_g_resolver_lookup_records; void function(GResolver* resolver, const(char)* rrname, GResolverRecordType recordType, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_resolver_lookup_records_async; GList* function(GResolver* resolver, GAsyncResult* result, GError** err) c_g_resolver_lookup_records_finish; GList* function(GResolver* resolver, const(char)* service, const(char)* protocol, const(char)* domain, GCancellable* cancellable, GError** err) c_g_resolver_lookup_service; void function(GResolver* resolver, const(char)* service, const(char)* protocol, const(char)* domain, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_resolver_lookup_service_async; GList* function(GResolver* resolver, GAsyncResult* result, GError** err) c_g_resolver_lookup_service_finish; void function(GResolver* resolver) c_g_resolver_set_default; // gio.Resource GType function() c_g_resource_get_type; GResource* function(GBytes* data, GError** err) c_g_resource_new_from_data; void function(GResource* resource) c_g_resources_register; void function(GResource* resource) c_g_resources_unregister; char** function(GResource* resource, const(char)* path, GResourceLookupFlags lookupFlags, GError** err) c_g_resource_enumerate_children; int function(GResource* resource, const(char)* path, GResourceLookupFlags lookupFlags, size_t* size, uint* flags, GError** err) c_g_resource_get_info; GBytes* function(GResource* resource, const(char)* path, GResourceLookupFlags lookupFlags, GError** err) c_g_resource_lookup_data; GInputStream* function(GResource* resource, const(char)* path, GResourceLookupFlags lookupFlags, GError** err) c_g_resource_open_stream; GResource* function(GResource* resource) c_g_resource_ref; void function(GResource* resource) c_g_resource_unref; GResource* function(char* filename, GError** err) c_g_resource_load; char** function(const(char)* path, GResourceLookupFlags lookupFlags, GError** err) c_g_resources_enumerate_children; int function(const(char)* path, GResourceLookupFlags lookupFlags, size_t* size, uint* flags, GError** err) c_g_resources_get_info; GBytes* function(const(char)* path, GResourceLookupFlags lookupFlags, GError** err) c_g_resources_lookup_data; GInputStream* function(const(char)* path, GResourceLookupFlags lookupFlags, GError** err) c_g_resources_open_stream; // gio.Seekable GType function() c_g_seekable_get_type; int function(GSeekable* seekable) c_g_seekable_can_seek; int function(GSeekable* seekable) c_g_seekable_can_truncate; int function(GSeekable* seekable, long offset, GSeekType type, GCancellable* cancellable, GError** err) c_g_seekable_seek; long function(GSeekable* seekable) c_g_seekable_tell; int function(GSeekable* seekable, long offset, GCancellable* cancellable, GError** err) c_g_seekable_truncate; // gio.Settings GType function() c_g_settings_get_type; GSettings* function(const(char)* schemaId) c_g_settings_new; GSettings* function(GSettingsSchema* schema, GSettingsBackend* backend, const(char)* path) c_g_settings_new_full; GSettings* function(const(char)* schemaId, GSettingsBackend* backend) c_g_settings_new_with_backend; GSettings* function(const(char)* schemaId, GSettingsBackend* backend, const(char)* path) c_g_settings_new_with_backend_and_path; GSettings* function(const(char)* schemaId, const(char)* path) c_g_settings_new_with_path; char** function() c_g_settings_list_relocatable_schemas; char** function() c_g_settings_list_schemas; void function() c_g_settings_sync; void function(void* object, const(char)* property) c_g_settings_unbind; void function(GSettings* settings) c_g_settings_apply; void function(GSettings* settings, const(char)* key, void* object, const(char)* property, GSettingsBindFlags flags) c_g_settings_bind; void function(GSettings* settings, const(char)* key, void* object, const(char)* property, GSettingsBindFlags flags, GSettingsBindGetMapping getMapping, GSettingsBindSetMapping setMapping, void* userData, GDestroyNotify destroy) c_g_settings_bind_with_mapping; void function(GSettings* settings, const(char)* key, void* object, const(char)* property, int inverted) c_g_settings_bind_writable; GAction* function(GSettings* settings, const(char)* key) c_g_settings_create_action; void function(GSettings* settings) c_g_settings_delay; void function(GSettings* settings, const(char)* key, const(char)* format, ... ) c_g_settings_get; int function(GSettings* settings, const(char)* key) c_g_settings_get_boolean; GSettings* function(GSettings* settings, const(char)* name) c_g_settings_get_child; GVariant* function(GSettings* settings, const(char)* key) c_g_settings_get_default_value; double function(GSettings* settings, const(char)* key) c_g_settings_get_double; int function(GSettings* settings, const(char)* key) c_g_settings_get_enum; uint function(GSettings* settings, const(char)* key) c_g_settings_get_flags; int function(GSettings* settings) c_g_settings_get_has_unapplied; int function(GSettings* settings, const(char)* key) c_g_settings_get_int; long function(GSettings* settings, const(char)* key) c_g_settings_get_int64; void* function(GSettings* settings, const(char)* key, GSettingsGetMapping mapping, void* userData) c_g_settings_get_mapped; GVariant* function(GSettings* settings, const(char)* key) c_g_settings_get_range; char* function(GSettings* settings, const(char)* key) c_g_settings_get_string; char** function(GSettings* settings, const(char)* key) c_g_settings_get_strv; uint function(GSettings* settings, const(char)* key) c_g_settings_get_uint; ulong function(GSettings* settings, const(char)* key) c_g_settings_get_uint64; GVariant* function(GSettings* settings, const(char)* key) c_g_settings_get_user_value; GVariant* function(GSettings* settings, const(char)* key) c_g_settings_get_value; int function(GSettings* settings, const(char)* name) c_g_settings_is_writable; char** function(GSettings* settings) c_g_settings_list_children; char** function(GSettings* settings) c_g_settings_list_keys; int function(GSettings* settings, const(char)* key, GVariant* value) c_g_settings_range_check; void function(GSettings* settings, const(char)* key) c_g_settings_reset; void function(GSettings* settings) c_g_settings_revert; int function(GSettings* settings, const(char)* key, const(char)* format, ... ) c_g_settings_set; int function(GSettings* settings, const(char)* key, int value) c_g_settings_set_boolean; int function(GSettings* settings, const(char)* key, double value) c_g_settings_set_double; int function(GSettings* settings, const(char)* key, int value) c_g_settings_set_enum; int function(GSettings* settings, const(char)* key, uint value) c_g_settings_set_flags; int function(GSettings* settings, const(char)* key, int value) c_g_settings_set_int; int function(GSettings* settings, const(char)* key, long value) c_g_settings_set_int64; int function(GSettings* settings, const(char)* key, const(char)* value) c_g_settings_set_string; int function(GSettings* settings, const(char)* key, char** value) c_g_settings_set_strv; int function(GSettings* settings, const(char)* key, uint value) c_g_settings_set_uint; int function(GSettings* settings, const(char)* key, ulong value) c_g_settings_set_uint64; int function(GSettings* settings, const(char)* key, GVariant* value) c_g_settings_set_value; // gio.SettingsBackend GType function() c_g_settings_backend_get_type; void function(GTree* tree, char** path, char*** keys, GVariant*** values) c_g_settings_backend_flatten_tree; GSettingsBackend* function() c_g_settings_backend_get_default; void function(GSettingsBackend* backend, const(char)* key, void* originTag) c_g_settings_backend_changed; void function(GSettingsBackend* backend, GTree* tree, void* originTag) c_g_settings_backend_changed_tree; void function(GSettingsBackend* backend, const(char)* path, char** items, void* originTag) c_g_settings_backend_keys_changed; void function(GSettingsBackend* backend, const(char)* path, void* originTag) c_g_settings_backend_path_changed; void function(GSettingsBackend* backend, const(char)* path) c_g_settings_backend_path_writable_changed; void function(GSettingsBackend* backend, const(char)* key) c_g_settings_backend_writable_changed; GSettingsBackend* function(const(char)* filename, const(char)* rootPath, const(char)* rootGroup) c_g_keyfile_settings_backend_new; GSettingsBackend* function() c_g_memory_settings_backend_new; GSettingsBackend* function() c_g_null_settings_backend_new; // gio.SettingsSchema GType function() c_g_settings_schema_get_type; const(char)* function(GSettingsSchema* schema) c_g_settings_schema_get_id; GSettingsSchemaKey* function(GSettingsSchema* schema, const(char)* name) c_g_settings_schema_get_key; const(char)* function(GSettingsSchema* schema) c_g_settings_schema_get_path; int function(GSettingsSchema* schema, const(char)* name) c_g_settings_schema_has_key; char** function(GSettingsSchema* schema) c_g_settings_schema_list_children; char** function(GSettingsSchema* schema) c_g_settings_schema_list_keys; GSettingsSchema* function(GSettingsSchema* schema) c_g_settings_schema_ref; void function(GSettingsSchema* schema) c_g_settings_schema_unref; // gio.SettingsSchemaKey GType function() c_g_settings_schema_key_get_type; GVariant* function(GSettingsSchemaKey* key) c_g_settings_schema_key_get_default_value; const(char)* function(GSettingsSchemaKey* key) c_g_settings_schema_key_get_description; const(char)* function(GSettingsSchemaKey* key) c_g_settings_schema_key_get_name; GVariant* function(GSettingsSchemaKey* key) c_g_settings_schema_key_get_range; const(char)* function(GSettingsSchemaKey* key) c_g_settings_schema_key_get_summary; GVariantType* function(GSettingsSchemaKey* key) c_g_settings_schema_key_get_value_type; int function(GSettingsSchemaKey* key, GVariant* value) c_g_settings_schema_key_range_check; GSettingsSchemaKey* function(GSettingsSchemaKey* key) c_g_settings_schema_key_ref; void function(GSettingsSchemaKey* key) c_g_settings_schema_key_unref; // gio.SettingsSchemaSource GType function() c_g_settings_schema_source_get_type; GSettingsSchemaSource* function(char* directory, GSettingsSchemaSource* parent, int trusted, GError** err) c_g_settings_schema_source_new_from_directory; void function(GSettingsSchemaSource* source, int recursive, char*** nonRelocatable, char*** relocatable) c_g_settings_schema_source_list_schemas; GSettingsSchema* function(GSettingsSchemaSource* source, const(char)* schemaId, int recursive) c_g_settings_schema_source_lookup; GSettingsSchemaSource* function(GSettingsSchemaSource* source) c_g_settings_schema_source_ref; void function(GSettingsSchemaSource* source) c_g_settings_schema_source_unref; GSettingsSchemaSource* function() c_g_settings_schema_source_get_default; // gio.SimpleAction GType function() c_g_simple_action_get_type; GSimpleAction* function(const(char)* name, GVariantType* parameterType) c_g_simple_action_new; GSimpleAction* function(const(char)* name, GVariantType* parameterType, GVariant* state) c_g_simple_action_new_stateful; void function(GSimpleAction* simple, int enabled) c_g_simple_action_set_enabled; void function(GSimpleAction* simple, GVariant* value) c_g_simple_action_set_state; void function(GSimpleAction* simple, GVariant* stateHint) c_g_simple_action_set_state_hint; // gio.SimpleActionGroup GType function() c_g_simple_action_group_get_type; GSimpleActionGroup* function() c_g_simple_action_group_new; void function(GSimpleActionGroup* simple, GActionEntry* entries, int nEntries, void* userData) c_g_simple_action_group_add_entries; void function(GSimpleActionGroup* simple, GAction* action) c_g_simple_action_group_insert; GAction* function(GSimpleActionGroup* simple, const(char)* actionName) c_g_simple_action_group_lookup; void function(GSimpleActionGroup* simple, const(char)* actionName) c_g_simple_action_group_remove; // gio.SimpleAsyncResult GType function() c_g_simple_async_result_get_type; GSimpleAsyncResult* function(GObject* sourceObject, GAsyncReadyCallback callback, void* userData, void* sourceTag) c_g_simple_async_result_new; GSimpleAsyncResult* function(GObject* sourceObject, GAsyncReadyCallback callback, void* userData, GQuark domain, int code, const(char)* format, ... ) c_g_simple_async_result_new_error; GSimpleAsyncResult* function(GObject* sourceObject, GAsyncReadyCallback callback, void* userData, GError* error) c_g_simple_async_result_new_from_error; GSimpleAsyncResult* function(GObject* sourceObject, GAsyncReadyCallback callback, void* userData, GError* error) c_g_simple_async_result_new_take_error; int function(GAsyncResult* result, GObject* source, void* sourceTag) c_g_simple_async_result_is_valid; void function(GSimpleAsyncResult* simple) c_g_simple_async_result_complete; void function(GSimpleAsyncResult* simple) c_g_simple_async_result_complete_in_idle; int function(GSimpleAsyncResult* simple) c_g_simple_async_result_get_op_res_gboolean; void* function(GSimpleAsyncResult* simple) c_g_simple_async_result_get_op_res_gpointer; ptrdiff_t function(GSimpleAsyncResult* simple) c_g_simple_async_result_get_op_res_gssize; void* function(GSimpleAsyncResult* simple) c_g_simple_async_result_get_source_tag; int function(GSimpleAsyncResult* simple, GError** err) c_g_simple_async_result_propagate_error; void function(GSimpleAsyncResult* simple, GSimpleAsyncThreadFunc func, int ioPriority, GCancellable* cancellable) c_g_simple_async_result_run_in_thread; void function(GSimpleAsyncResult* simple, GCancellable* checkCancellable) c_g_simple_async_result_set_check_cancellable; void function(GSimpleAsyncResult* simple, GQuark domain, int code, const(char)* format, ... ) c_g_simple_async_result_set_error; void function(GSimpleAsyncResult* simple, GQuark domain, int code, const(char)* format, void* args) c_g_simple_async_result_set_error_va; void function(GSimpleAsyncResult* simple, GError* error) c_g_simple_async_result_set_from_error; void function(GSimpleAsyncResult* simple, int handleCancellation) c_g_simple_async_result_set_handle_cancellation; void function(GSimpleAsyncResult* simple, int opRes) c_g_simple_async_result_set_op_res_gboolean; void function(GSimpleAsyncResult* simple, void* opRes, GDestroyNotify destroyOpRes) c_g_simple_async_result_set_op_res_gpointer; void function(GSimpleAsyncResult* simple, ptrdiff_t opRes) c_g_simple_async_result_set_op_res_gssize; void function(GSimpleAsyncResult* simple, GError* error) c_g_simple_async_result_take_error; void function(GObject* object, GAsyncReadyCallback callback, void* userData, GQuark domain, int code, const(char)* format, ... ) c_g_simple_async_report_error_in_idle; void function(GObject* object, GAsyncReadyCallback callback, void* userData, GError* error) c_g_simple_async_report_gerror_in_idle; void function(GObject* object, GAsyncReadyCallback callback, void* userData, GError* error) c_g_simple_async_report_take_gerror_in_idle; // gio.SimpleIOStream GType function() c_g_simple_io_stream_get_type; GIOStream* function(GInputStream* inputStream, GOutputStream* outputStream) c_g_simple_io_stream_new; // gio.SimplePermission GType function() c_g_simple_permission_get_type; GPermission* function(int allowed) c_g_simple_permission_new; // gio.SimpleProxyResolver GType function() c_g_simple_proxy_resolver_get_type; GProxyResolver* function(const(char)* defaultProxy, char** ignoreHosts) c_g_simple_proxy_resolver_new; void function(GSimpleProxyResolver* resolver, const(char)* defaultProxy) c_g_simple_proxy_resolver_set_default_proxy; void function(GSimpleProxyResolver* resolver, char** ignoreHosts) c_g_simple_proxy_resolver_set_ignore_hosts; void function(GSimpleProxyResolver* resolver, const(char)* uriScheme, const(char)* proxy) c_g_simple_proxy_resolver_set_uri_proxy; // gio.Socket GType function() c_g_socket_get_type; GSocket* function(GSocketFamily family, GSocketType type, GSocketProtocol protocol, GError** err) c_g_socket_new; GSocket* function(int fd, GError** err) c_g_socket_new_from_fd; GSocket* function(GSocket* socket, GCancellable* cancellable, GError** err) c_g_socket_accept; int function(GSocket* socket, GSocketAddress* address, int allowReuse, GError** err) c_g_socket_bind; int function(GSocket* socket, GError** err) c_g_socket_check_connect_result; int function(GSocket* socket, GError** err) c_g_socket_close; GIOCondition function(GSocket* socket, GIOCondition condition) c_g_socket_condition_check; int function(GSocket* socket, GIOCondition condition, long timeout, GCancellable* cancellable, GError** err) c_g_socket_condition_timed_wait; int function(GSocket* socket, GIOCondition condition, GCancellable* cancellable, GError** err) c_g_socket_condition_wait; int function(GSocket* socket, GSocketAddress* address, GCancellable* cancellable, GError** err) c_g_socket_connect; GSocketConnection* function(GSocket* socket) c_g_socket_connection_factory_create_connection; GSource* function(GSocket* socket, GIOCondition condition, GCancellable* cancellable) c_g_socket_create_source; ptrdiff_t function(GSocket* socket) c_g_socket_get_available_bytes; int function(GSocket* socket) c_g_socket_get_blocking; int function(GSocket* socket) c_g_socket_get_broadcast; GCredentials* function(GSocket* socket, GError** err) c_g_socket_get_credentials; GSocketFamily function(GSocket* socket) c_g_socket_get_family; int function(GSocket* socket) c_g_socket_get_fd; int function(GSocket* socket) c_g_socket_get_keepalive; int function(GSocket* socket) c_g_socket_get_listen_backlog; GSocketAddress* function(GSocket* socket, GError** err) c_g_socket_get_local_address; int function(GSocket* socket) c_g_socket_get_multicast_loopback; uint function(GSocket* socket) c_g_socket_get_multicast_ttl; int function(GSocket* socket, int level, int optname, int* value, GError** err) c_g_socket_get_option; GSocketProtocol function(GSocket* socket) c_g_socket_get_protocol; GSocketAddress* function(GSocket* socket, GError** err) c_g_socket_get_remote_address; GSocketType function(GSocket* socket) c_g_socket_get_socket_type; uint function(GSocket* socket) c_g_socket_get_timeout; uint function(GSocket* socket) c_g_socket_get_ttl; int function(GSocket* socket) c_g_socket_is_closed; int function(GSocket* socket) c_g_socket_is_connected; int function(GSocket* socket, GInetAddress* group, int sourceSpecific, const(char)* iface, GError** err) c_g_socket_join_multicast_group; int function(GSocket* socket, GInetAddress* group, int sourceSpecific, const(char)* iface, GError** err) c_g_socket_leave_multicast_group; int function(GSocket* socket, GError** err) c_g_socket_listen; ptrdiff_t function(GSocket* socket, char* buffer, size_t size, GCancellable* cancellable, GError** err) c_g_socket_receive; ptrdiff_t function(GSocket* socket, GSocketAddress** address, char* buffer, size_t size, GCancellable* cancellable, GError** err) c_g_socket_receive_from; ptrdiff_t function(GSocket* socket, GSocketAddress** address, GInputVector* vectors, int numVectors, GSocketControlMessage*** messages, int* numMessages, int* flags, GCancellable* cancellable, GError** err) c_g_socket_receive_message; int function(GSocket* socket, GInputMessage* messages, uint numMessages, int flags, GCancellable* cancellable, GError** err) c_g_socket_receive_messages; ptrdiff_t function(GSocket* socket, char* buffer, size_t size, int blocking, GCancellable* cancellable, GError** err) c_g_socket_receive_with_blocking; ptrdiff_t function(GSocket* socket, char* buffer, size_t size, GCancellable* cancellable, GError** err) c_g_socket_send; ptrdiff_t function(GSocket* socket, GSocketAddress* address, GOutputVector* vectors, int numVectors, GSocketControlMessage** messages, int numMessages, int flags, GCancellable* cancellable, GError** err) c_g_socket_send_message; int function(GSocket* socket, GOutputMessage* messages, uint numMessages, int flags, GCancellable* cancellable, GError** err) c_g_socket_send_messages; ptrdiff_t function(GSocket* socket, GSocketAddress* address, char* buffer, size_t size, GCancellable* cancellable, GError** err) c_g_socket_send_to; ptrdiff_t function(GSocket* socket, char* buffer, size_t size, int blocking, GCancellable* cancellable, GError** err) c_g_socket_send_with_blocking; void function(GSocket* socket, int blocking) c_g_socket_set_blocking; void function(GSocket* socket, int broadcast) c_g_socket_set_broadcast; void function(GSocket* socket, int keepalive) c_g_socket_set_keepalive; void function(GSocket* socket, int backlog) c_g_socket_set_listen_backlog; void function(GSocket* socket, int loopback) c_g_socket_set_multicast_loopback; void function(GSocket* socket, uint ttl) c_g_socket_set_multicast_ttl; int function(GSocket* socket, int level, int optname, int value, GError** err) c_g_socket_set_option; void function(GSocket* socket, uint timeout) c_g_socket_set_timeout; void function(GSocket* socket, uint ttl) c_g_socket_set_ttl; int function(GSocket* socket, int shutdownRead, int shutdownWrite, GError** err) c_g_socket_shutdown; int function(GSocket* socket) c_g_socket_speaks_ipv4; // gio.SocketAddress GType function() c_g_socket_address_get_type; GSocketAddress* function(void* native, size_t len) c_g_socket_address_new_from_native; GSocketFamily function(GSocketAddress* address) c_g_socket_address_get_family; ptrdiff_t function(GSocketAddress* address) c_g_socket_address_get_native_size; int function(GSocketAddress* address, void* dest, size_t destlen, GError** err) c_g_socket_address_to_native; // gio.SocketAddressEnumerator GType function() c_g_socket_address_enumerator_get_type; GSocketAddress* function(GSocketAddressEnumerator* enumerator, GCancellable* cancellable, GError** err) c_g_socket_address_enumerator_next; void function(GSocketAddressEnumerator* enumerator, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_socket_address_enumerator_next_async; GSocketAddress* function(GSocketAddressEnumerator* enumerator, GAsyncResult* result, GError** err) c_g_socket_address_enumerator_next_finish; // gio.SocketClient GType function() c_g_socket_client_get_type; GSocketClient* function() c_g_socket_client_new; void function(GSocketClient* client, const(char)* protocol) c_g_socket_client_add_application_proxy; GSocketConnection* function(GSocketClient* client, GSocketConnectable* connectable, GCancellable* cancellable, GError** err) c_g_socket_client_connect; void function(GSocketClient* client, GSocketConnectable* connectable, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_socket_client_connect_async; GSocketConnection* function(GSocketClient* client, GAsyncResult* result, GError** err) c_g_socket_client_connect_finish; GSocketConnection* function(GSocketClient* client, const(char)* hostAndPort, ushort defaultPort, GCancellable* cancellable, GError** err) c_g_socket_client_connect_to_host; void function(GSocketClient* client, const(char)* hostAndPort, ushort defaultPort, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_socket_client_connect_to_host_async; GSocketConnection* function(GSocketClient* client, GAsyncResult* result, GError** err) c_g_socket_client_connect_to_host_finish; GSocketConnection* function(GSocketClient* client, const(char)* domain, const(char)* service, GCancellable* cancellable, GError** err) c_g_socket_client_connect_to_service; void function(GSocketClient* client, const(char)* domain, const(char)* service, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_socket_client_connect_to_service_async; GSocketConnection* function(GSocketClient* client, GAsyncResult* result, GError** err) c_g_socket_client_connect_to_service_finish; GSocketConnection* function(GSocketClient* client, const(char)* uri, ushort defaultPort, GCancellable* cancellable, GError** err) c_g_socket_client_connect_to_uri; void function(GSocketClient* client, const(char)* uri, ushort defaultPort, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_socket_client_connect_to_uri_async; GSocketConnection* function(GSocketClient* client, GAsyncResult* result, GError** err) c_g_socket_client_connect_to_uri_finish; int function(GSocketClient* client) c_g_socket_client_get_enable_proxy; GSocketFamily function(GSocketClient* client) c_g_socket_client_get_family; GSocketAddress* function(GSocketClient* client) c_g_socket_client_get_local_address; GSocketProtocol function(GSocketClient* client) c_g_socket_client_get_protocol; GProxyResolver* function(GSocketClient* client) c_g_socket_client_get_proxy_resolver; GSocketType function(GSocketClient* client) c_g_socket_client_get_socket_type; uint function(GSocketClient* client) c_g_socket_client_get_timeout; int function(GSocketClient* client) c_g_socket_client_get_tls; GTlsCertificateFlags function(GSocketClient* client) c_g_socket_client_get_tls_validation_flags; void function(GSocketClient* client, int enable) c_g_socket_client_set_enable_proxy; void function(GSocketClient* client, GSocketFamily family) c_g_socket_client_set_family; void function(GSocketClient* client, GSocketAddress* address) c_g_socket_client_set_local_address; void function(GSocketClient* client, GSocketProtocol protocol) c_g_socket_client_set_protocol; void function(GSocketClient* client, GProxyResolver* proxyResolver) c_g_socket_client_set_proxy_resolver; void function(GSocketClient* client, GSocketType type) c_g_socket_client_set_socket_type; void function(GSocketClient* client, uint timeout) c_g_socket_client_set_timeout; void function(GSocketClient* client, int tls) c_g_socket_client_set_tls; void function(GSocketClient* client, GTlsCertificateFlags flags) c_g_socket_client_set_tls_validation_flags; // gio.SocketConnectable GType function() c_g_socket_connectable_get_type; GSocketAddressEnumerator* function(GSocketConnectable* connectable) c_g_socket_connectable_enumerate; GSocketAddressEnumerator* function(GSocketConnectable* connectable) c_g_socket_connectable_proxy_enumerate; char* function(GSocketConnectable* connectable) c_g_socket_connectable_to_string; // gio.SocketConnection GType function() c_g_socket_connection_get_type; GType function(GSocketFamily family, GSocketType type, int protocolId) c_g_socket_connection_factory_lookup_type; void function(GType gType, GSocketFamily family, GSocketType type, int protocol) c_g_socket_connection_factory_register_type; int function(GSocketConnection* connection, GSocketAddress* address, GCancellable* cancellable, GError** err) c_g_socket_connection_connect; void function(GSocketConnection* connection, GSocketAddress* address, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_socket_connection_connect_async; int function(GSocketConnection* connection, GAsyncResult* result, GError** err) c_g_socket_connection_connect_finish; GSocketAddress* function(GSocketConnection* connection, GError** err) c_g_socket_connection_get_local_address; GSocketAddress* function(GSocketConnection* connection, GError** err) c_g_socket_connection_get_remote_address; GSocket* function(GSocketConnection* connection) c_g_socket_connection_get_socket; int function(GSocketConnection* connection) c_g_socket_connection_is_connected; // gio.SocketControlMessage GType function() c_g_socket_control_message_get_type; GSocketControlMessage* function(int level, int type, size_t size, void* data) c_g_socket_control_message_deserialize; int function(GSocketControlMessage* message) c_g_socket_control_message_get_level; int function(GSocketControlMessage* message) c_g_socket_control_message_get_msg_type; size_t function(GSocketControlMessage* message) c_g_socket_control_message_get_size; void function(GSocketControlMessage* message, void* data) c_g_socket_control_message_serialize; // gio.SocketListener GType function() c_g_socket_listener_get_type; GSocketListener* function() c_g_socket_listener_new; GSocketConnection* function(GSocketListener* listener, GObject** sourceObject, GCancellable* cancellable, GError** err) c_g_socket_listener_accept; void function(GSocketListener* listener, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_socket_listener_accept_async; GSocketConnection* function(GSocketListener* listener, GAsyncResult* result, GObject** sourceObject, GError** err) c_g_socket_listener_accept_finish; GSocket* function(GSocketListener* listener, GObject** sourceObject, GCancellable* cancellable, GError** err) c_g_socket_listener_accept_socket; void function(GSocketListener* listener, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_socket_listener_accept_socket_async; GSocket* function(GSocketListener* listener, GAsyncResult* result, GObject** sourceObject, GError** err) c_g_socket_listener_accept_socket_finish; int function(GSocketListener* listener, GSocketAddress* address, GSocketType type, GSocketProtocol protocol, GObject* sourceObject, GSocketAddress** effectiveAddress, GError** err) c_g_socket_listener_add_address; ushort function(GSocketListener* listener, GObject* sourceObject, GError** err) c_g_socket_listener_add_any_inet_port; int function(GSocketListener* listener, ushort port, GObject* sourceObject, GError** err) c_g_socket_listener_add_inet_port; int function(GSocketListener* listener, GSocket* socket, GObject* sourceObject, GError** err) c_g_socket_listener_add_socket; void function(GSocketListener* listener) c_g_socket_listener_close; void function(GSocketListener* listener, int listenBacklog) c_g_socket_listener_set_backlog; // gio.SocketService GType function() c_g_socket_service_get_type; GSocketService* function() c_g_socket_service_new; int function(GSocketService* service) c_g_socket_service_is_active; void function(GSocketService* service) c_g_socket_service_start; void function(GSocketService* service) c_g_socket_service_stop; // gio.SrvTarget GType function() c_g_srv_target_get_type; GSrvTarget* function(const(char)* hostname, ushort port, ushort priority, ushort weight) c_g_srv_target_new; GSrvTarget* function(GSrvTarget* target) c_g_srv_target_copy; void function(GSrvTarget* target) c_g_srv_target_free; const(char)* function(GSrvTarget* target) c_g_srv_target_get_hostname; ushort function(GSrvTarget* target) c_g_srv_target_get_port; ushort function(GSrvTarget* target) c_g_srv_target_get_priority; ushort function(GSrvTarget* target) c_g_srv_target_get_weight; GList* function(GList* targets) c_g_srv_target_list_sort; // gio.StaticResource void function(GStaticResource* staticResource) c_g_static_resource_fini; GResource* function(GStaticResource* staticResource) c_g_static_resource_get_resource; void function(GStaticResource* staticResource) c_g_static_resource_init; // gio.Subprocess GType function() c_g_subprocess_get_type; GSubprocess* function(GSubprocessFlags flags, GError** error, const(char)* argv0, ... ) c_g_subprocess_new; GSubprocess* function(char** argv, GSubprocessFlags flags, GError** err) c_g_subprocess_newv; int function(GSubprocess* subprocess, GBytes* stdinBuf, GCancellable* cancellable, GBytes** stdoutBuf, GBytes** stderrBuf, GError** err) c_g_subprocess_communicate; void function(GSubprocess* subprocess, GBytes* stdinBuf, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_subprocess_communicate_async; int function(GSubprocess* subprocess, GAsyncResult* result, GBytes** stdoutBuf, GBytes** stderrBuf, GError** err) c_g_subprocess_communicate_finish; int function(GSubprocess* subprocess, const(char)* stdinBuf, GCancellable* cancellable, char** stdoutBuf, char** stderrBuf, GError** err) c_g_subprocess_communicate_utf8; void function(GSubprocess* subprocess, const(char)* stdinBuf, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_subprocess_communicate_utf8_async; int function(GSubprocess* subprocess, GAsyncResult* result, char** stdoutBuf, char** stderrBuf, GError** err) c_g_subprocess_communicate_utf8_finish; void function(GSubprocess* subprocess) c_g_subprocess_force_exit; int function(GSubprocess* subprocess) c_g_subprocess_get_exit_status; const(char)* function(GSubprocess* subprocess) c_g_subprocess_get_identifier; int function(GSubprocess* subprocess) c_g_subprocess_get_if_exited; int function(GSubprocess* subprocess) c_g_subprocess_get_if_signaled; int function(GSubprocess* subprocess) c_g_subprocess_get_status; GInputStream* function(GSubprocess* subprocess) c_g_subprocess_get_stderr_pipe; GOutputStream* function(GSubprocess* subprocess) c_g_subprocess_get_stdin_pipe; GInputStream* function(GSubprocess* subprocess) c_g_subprocess_get_stdout_pipe; int function(GSubprocess* subprocess) c_g_subprocess_get_successful; int function(GSubprocess* subprocess) c_g_subprocess_get_term_sig; void function(GSubprocess* subprocess, int signalNum) c_g_subprocess_send_signal; int function(GSubprocess* subprocess, GCancellable* cancellable, GError** err) c_g_subprocess_wait; void function(GSubprocess* subprocess, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_subprocess_wait_async; int function(GSubprocess* subprocess, GCancellable* cancellable, GError** err) c_g_subprocess_wait_check; void function(GSubprocess* subprocess, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_subprocess_wait_check_async; int function(GSubprocess* subprocess, GAsyncResult* result, GError** err) c_g_subprocess_wait_check_finish; int function(GSubprocess* subprocess, GAsyncResult* result, GError** err) c_g_subprocess_wait_finish; // gio.SubprocessLauncher GType function() c_g_subprocess_launcher_get_type; GSubprocessLauncher* function(GSubprocessFlags flags) c_g_subprocess_launcher_new; const(char)* function(GSubprocessLauncher* self, const(char)* variable) c_g_subprocess_launcher_getenv; void function(GSubprocessLauncher* self, GSpawnChildSetupFunc childSetup, void* userData, GDestroyNotify destroyNotify) c_g_subprocess_launcher_set_child_setup; void function(GSubprocessLauncher* self, char* cwd) c_g_subprocess_launcher_set_cwd; void function(GSubprocessLauncher* self, char** env) c_g_subprocess_launcher_set_environ; void function(GSubprocessLauncher* self, GSubprocessFlags flags) c_g_subprocess_launcher_set_flags; void function(GSubprocessLauncher* self, char* path) c_g_subprocess_launcher_set_stderr_file_path; void function(GSubprocessLauncher* self, const(char)* path) c_g_subprocess_launcher_set_stdin_file_path; void function(GSubprocessLauncher* self, char* path) c_g_subprocess_launcher_set_stdout_file_path; void function(GSubprocessLauncher* self, const(char)* variable, const(char)* value, int overwrite) c_g_subprocess_launcher_setenv; GSubprocess* function(GSubprocessLauncher* self, GError** error, const(char)* argv0, ... ) c_g_subprocess_launcher_spawn; GSubprocess* function(GSubprocessLauncher* self, char** argv, GError** err) c_g_subprocess_launcher_spawnv; void function(GSubprocessLauncher* self, int sourceFd, int targetFd) c_g_subprocess_launcher_take_fd; void function(GSubprocessLauncher* self, int fd) c_g_subprocess_launcher_take_stderr_fd; void function(GSubprocessLauncher* self, int fd) c_g_subprocess_launcher_take_stdin_fd; void function(GSubprocessLauncher* self, int fd) c_g_subprocess_launcher_take_stdout_fd; void function(GSubprocessLauncher* self, const(char)* variable) c_g_subprocess_launcher_unsetenv; // gio.Task GType function() c_g_task_get_type; GTask* function(void* sourceObject, GCancellable* cancellable, GAsyncReadyCallback callback, void* callbackData) c_g_task_new; int function(void* result, void* sourceObject) c_g_task_is_valid; void function(void* sourceObject, GAsyncReadyCallback callback, void* callbackData, void* sourceTag, GError* error) c_g_task_report_error; void function(void* sourceObject, GAsyncReadyCallback callback, void* callbackData, void* sourceTag, GQuark domain, int code, const(char)* format, ... ) c_g_task_report_new_error; void function(GTask* task, GSource* source, GSourceFunc callback) c_g_task_attach_source; GCancellable* function(GTask* task) c_g_task_get_cancellable; int function(GTask* task) c_g_task_get_check_cancellable; int function(GTask* task) c_g_task_get_completed; GMainContext* function(GTask* task) c_g_task_get_context; int function(GTask* task) c_g_task_get_priority; int function(GTask* task) c_g_task_get_return_on_cancel; void* function(GTask* task) c_g_task_get_source_object; void* function(GTask* task) c_g_task_get_source_tag; void* function(GTask* task) c_g_task_get_task_data; int function(GTask* task) c_g_task_had_error; int function(GTask* task, GError** err) c_g_task_propagate_boolean; ptrdiff_t function(GTask* task, GError** err) c_g_task_propagate_int; void* function(GTask* task, GError** err) c_g_task_propagate_pointer; void function(GTask* task, int result) c_g_task_return_boolean; void function(GTask* task, GError* error) c_g_task_return_error; int function(GTask* task) c_g_task_return_error_if_cancelled; void function(GTask* task, ptrdiff_t result) c_g_task_return_int; void function(GTask* task, GQuark domain, int code, const(char)* format, ... ) c_g_task_return_new_error; void function(GTask* task, void* result, GDestroyNotify resultDestroy) c_g_task_return_pointer; void function(GTask* task, GTaskThreadFunc taskFunc) c_g_task_run_in_thread; void function(GTask* task, GTaskThreadFunc taskFunc) c_g_task_run_in_thread_sync; void function(GTask* task, int checkCancellable) c_g_task_set_check_cancellable; void function(GTask* task, int priority) c_g_task_set_priority; int function(GTask* task, int returnOnCancel) c_g_task_set_return_on_cancel; void function(GTask* task, void* sourceTag) c_g_task_set_source_tag; void function(GTask* task, void* taskData, GDestroyNotify taskDataDestroy) c_g_task_set_task_data; // gio.TcpConnection GType function() c_g_tcp_connection_get_type; int function(GTcpConnection* connection) c_g_tcp_connection_get_graceful_disconnect; void function(GTcpConnection* connection, int gracefulDisconnect) c_g_tcp_connection_set_graceful_disconnect; // gio.TcpWrapperConnection GType function() c_g_tcp_wrapper_connection_get_type; GSocketConnection* function(GIOStream* baseIoStream, GSocket* socket) c_g_tcp_wrapper_connection_new; GIOStream* function(GTcpWrapperConnection* conn) c_g_tcp_wrapper_connection_get_base_io_stream; // gio.TestDBus GType function() c_g_test_dbus_get_type; GTestDBus* function(GTestDBusFlags flags) c_g_test_dbus_new; void function() c_g_test_dbus_unset; void function(GTestDBus* self, const(char)* path) c_g_test_dbus_add_service_dir; void function(GTestDBus* self) c_g_test_dbus_down; const(char)* function(GTestDBus* self) c_g_test_dbus_get_bus_address; GTestDBusFlags function(GTestDBus* self) c_g_test_dbus_get_flags; void function(GTestDBus* self) c_g_test_dbus_stop; void function(GTestDBus* self) c_g_test_dbus_up; // gio.ThemedIcon GType function() c_g_themed_icon_get_type; GIcon* function(const(char)* iconname) c_g_themed_icon_new; GIcon* function(char** iconnames, int len) c_g_themed_icon_new_from_names; GIcon* function(const(char)* iconname) c_g_themed_icon_new_with_default_fallbacks; void function(GThemedIcon* icon, const(char)* iconname) c_g_themed_icon_append_name; char** function(GThemedIcon* icon) c_g_themed_icon_get_names; void function(GThemedIcon* icon, const(char)* iconname) c_g_themed_icon_prepend_name; // gio.ThreadedSocketService GType function() c_g_threaded_socket_service_get_type; GSocketService* function(int maxThreads) c_g_threaded_socket_service_new; // gio.TlsBackend GType function() c_g_tls_backend_get_type; GTlsBackend* function() c_g_tls_backend_get_default; GType function(GTlsBackend* backend) c_g_tls_backend_get_certificate_type; GType function(GTlsBackend* backend) c_g_tls_backend_get_client_connection_type; GTlsDatabase* function(GTlsBackend* backend) c_g_tls_backend_get_default_database; GType function(GTlsBackend* backend) c_g_tls_backend_get_dtls_client_connection_type; GType function(GTlsBackend* backend) c_g_tls_backend_get_dtls_server_connection_type; GType function(GTlsBackend* backend) c_g_tls_backend_get_file_database_type; GType function(GTlsBackend* backend) c_g_tls_backend_get_server_connection_type; int function(GTlsBackend* backend) c_g_tls_backend_supports_dtls; int function(GTlsBackend* backend) c_g_tls_backend_supports_tls; // gio.TlsCertificate GType function() c_g_tls_certificate_get_type; GTlsCertificate* function(char* file, GError** err) c_g_tls_certificate_new_from_file; GTlsCertificate* function(char* certFile, char* keyFile, GError** err) c_g_tls_certificate_new_from_files; GTlsCertificate* function(const(char)* data, ptrdiff_t length, GError** err) c_g_tls_certificate_new_from_pem; GList* function(char* file, GError** err) c_g_tls_certificate_list_new_from_file; GTlsCertificate* function(GTlsCertificate* cert) c_g_tls_certificate_get_issuer; int function(GTlsCertificate* certOne, GTlsCertificate* certTwo) c_g_tls_certificate_is_same; GTlsCertificateFlags function(GTlsCertificate* cert, GSocketConnectable* identity, GTlsCertificate* trustedCa) c_g_tls_certificate_verify; // gio.TlsClientConnection GType function() c_g_tls_client_connection_get_type; GIOStream* function(GIOStream* baseIoStream, GSocketConnectable* serverIdentity, GError** err) c_g_tls_client_connection_new; void function(GTlsClientConnection* conn, GTlsClientConnection* source) c_g_tls_client_connection_copy_session_state; GList* function(GTlsClientConnection* conn) c_g_tls_client_connection_get_accepted_cas; GSocketConnectable* function(GTlsClientConnection* conn) c_g_tls_client_connection_get_server_identity; int function(GTlsClientConnection* conn) c_g_tls_client_connection_get_use_ssl3; GTlsCertificateFlags function(GTlsClientConnection* conn) c_g_tls_client_connection_get_validation_flags; void function(GTlsClientConnection* conn, GSocketConnectable* identity) c_g_tls_client_connection_set_server_identity; void function(GTlsClientConnection* conn, int useSsl3) c_g_tls_client_connection_set_use_ssl3; void function(GTlsClientConnection* conn, GTlsCertificateFlags flags) c_g_tls_client_connection_set_validation_flags; // gio.TlsConnection GType function() c_g_tls_connection_get_type; int function(GTlsConnection* conn, GTlsCertificate* peerCert, GTlsCertificateFlags errors) c_g_tls_connection_emit_accept_certificate; GTlsCertificate* function(GTlsConnection* conn) c_g_tls_connection_get_certificate; GTlsDatabase* function(GTlsConnection* conn) c_g_tls_connection_get_database; GTlsInteraction* function(GTlsConnection* conn) c_g_tls_connection_get_interaction; GTlsCertificate* function(GTlsConnection* conn) c_g_tls_connection_get_peer_certificate; GTlsCertificateFlags function(GTlsConnection* conn) c_g_tls_connection_get_peer_certificate_errors; GTlsRehandshakeMode function(GTlsConnection* conn) c_g_tls_connection_get_rehandshake_mode; int function(GTlsConnection* conn) c_g_tls_connection_get_require_close_notify; int function(GTlsConnection* conn) c_g_tls_connection_get_use_system_certdb; int function(GTlsConnection* conn, GCancellable* cancellable, GError** err) c_g_tls_connection_handshake; void function(GTlsConnection* conn, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_tls_connection_handshake_async; int function(GTlsConnection* conn, GAsyncResult* result, GError** err) c_g_tls_connection_handshake_finish; void function(GTlsConnection* conn, GTlsCertificate* certificate) c_g_tls_connection_set_certificate; void function(GTlsConnection* conn, GTlsDatabase* database) c_g_tls_connection_set_database; void function(GTlsConnection* conn, GTlsInteraction* interaction) c_g_tls_connection_set_interaction; void function(GTlsConnection* conn, GTlsRehandshakeMode mode) c_g_tls_connection_set_rehandshake_mode; void function(GTlsConnection* conn, int requireCloseNotify) c_g_tls_connection_set_require_close_notify; void function(GTlsConnection* conn, int useSystemCertdb) c_g_tls_connection_set_use_system_certdb; // gio.TlsDatabase GType function() c_g_tls_database_get_type; char* function(GTlsDatabase* self, GTlsCertificate* certificate) c_g_tls_database_create_certificate_handle; GTlsCertificate* function(GTlsDatabase* self, const(char)* handle, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** err) c_g_tls_database_lookup_certificate_for_handle; void function(GTlsDatabase* self, const(char)* handle, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_tls_database_lookup_certificate_for_handle_async; GTlsCertificate* function(GTlsDatabase* self, GAsyncResult* result, GError** err) c_g_tls_database_lookup_certificate_for_handle_finish; GTlsCertificate* function(GTlsDatabase* self, GTlsCertificate* certificate, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** err) c_g_tls_database_lookup_certificate_issuer; void function(GTlsDatabase* self, GTlsCertificate* certificate, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_tls_database_lookup_certificate_issuer_async; GTlsCertificate* function(GTlsDatabase* self, GAsyncResult* result, GError** err) c_g_tls_database_lookup_certificate_issuer_finish; GList* function(GTlsDatabase* self, GByteArray* issuerRawDn, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** err) c_g_tls_database_lookup_certificates_issued_by; void function(GTlsDatabase* self, GByteArray* issuerRawDn, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_tls_database_lookup_certificates_issued_by_async; GList* function(GTlsDatabase* self, GAsyncResult* result, GError** err) c_g_tls_database_lookup_certificates_issued_by_finish; GTlsCertificateFlags function(GTlsDatabase* self, GTlsCertificate* chain, const(char)* purpose, GSocketConnectable* identity, GTlsInteraction* interaction, GTlsDatabaseVerifyFlags flags, GCancellable* cancellable, GError** err) c_g_tls_database_verify_chain; void function(GTlsDatabase* self, GTlsCertificate* chain, const(char)* purpose, GSocketConnectable* identity, GTlsInteraction* interaction, GTlsDatabaseVerifyFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_tls_database_verify_chain_async; GTlsCertificateFlags function(GTlsDatabase* self, GAsyncResult* result, GError** err) c_g_tls_database_verify_chain_finish; // gio.TlsFileDatabase GType function() c_g_tls_file_database_get_type; GTlsDatabase* function(char* anchors, GError** err) c_g_tls_file_database_new; // gio.TlsInteraction GType function() c_g_tls_interaction_get_type; GTlsInteractionResult function(GTlsInteraction* interaction, GTlsPassword* password, GCancellable* cancellable, GError** err) c_g_tls_interaction_ask_password; void function(GTlsInteraction* interaction, GTlsPassword* password, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_tls_interaction_ask_password_async; GTlsInteractionResult function(GTlsInteraction* interaction, GAsyncResult* result, GError** err) c_g_tls_interaction_ask_password_finish; GTlsInteractionResult function(GTlsInteraction* interaction, GTlsPassword* password, GCancellable* cancellable, GError** err) c_g_tls_interaction_invoke_ask_password; GTlsInteractionResult function(GTlsInteraction* interaction, GTlsConnection* connection, GTlsCertificateRequestFlags flags, GCancellable* cancellable, GError** err) c_g_tls_interaction_invoke_request_certificate; GTlsInteractionResult function(GTlsInteraction* interaction, GTlsConnection* connection, GTlsCertificateRequestFlags flags, GCancellable* cancellable, GError** err) c_g_tls_interaction_request_certificate; void function(GTlsInteraction* interaction, GTlsConnection* connection, GTlsCertificateRequestFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_tls_interaction_request_certificate_async; GTlsInteractionResult function(GTlsInteraction* interaction, GAsyncResult* result, GError** err) c_g_tls_interaction_request_certificate_finish; // gio.TlsPassword GType function() c_g_tls_password_get_type; GTlsPassword* function(GTlsPasswordFlags flags, const(char)* description) c_g_tls_password_new; const(char)* function(GTlsPassword* password) c_g_tls_password_get_description; GTlsPasswordFlags function(GTlsPassword* password) c_g_tls_password_get_flags; char* function(GTlsPassword* password, size_t* length) c_g_tls_password_get_value; const(char)* function(GTlsPassword* password) c_g_tls_password_get_warning; void function(GTlsPassword* password, const(char)* description) c_g_tls_password_set_description; void function(GTlsPassword* password, GTlsPasswordFlags flags) c_g_tls_password_set_flags; void function(GTlsPassword* password, char* value, ptrdiff_t length) c_g_tls_password_set_value; void function(GTlsPassword* password, char* value, ptrdiff_t length, GDestroyNotify destroy) c_g_tls_password_set_value_full; void function(GTlsPassword* password, const(char)* warning) c_g_tls_password_set_warning; // gio.TlsServerConnection GType function() c_g_tls_server_connection_get_type; GIOStream* function(GIOStream* baseIoStream, GTlsCertificate* certificate, GError** err) c_g_tls_server_connection_new; // gio.UnixConnection GType function() c_g_unix_connection_get_type; GCredentials* function(GUnixConnection* connection, GCancellable* cancellable, GError** err) c_g_unix_connection_receive_credentials; void function(GUnixConnection* connection, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_unix_connection_receive_credentials_async; GCredentials* function(GUnixConnection* connection, GAsyncResult* result, GError** err) c_g_unix_connection_receive_credentials_finish; int function(GUnixConnection* connection, GCancellable* cancellable, GError** err) c_g_unix_connection_receive_fd; int function(GUnixConnection* connection, GCancellable* cancellable, GError** err) c_g_unix_connection_send_credentials; void function(GUnixConnection* connection, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_unix_connection_send_credentials_async; int function(GUnixConnection* connection, GAsyncResult* result, GError** err) c_g_unix_connection_send_credentials_finish; int function(GUnixConnection* connection, int fd, GCancellable* cancellable, GError** err) c_g_unix_connection_send_fd; // gio.UnixCredentialsMessage GType function() c_g_unix_credentials_message_get_type; GSocketControlMessage* function() c_g_unix_credentials_message_new; GSocketControlMessage* function(GCredentials* credentials) c_g_unix_credentials_message_new_with_credentials; int function() c_g_unix_credentials_message_is_supported; GCredentials* function(GUnixCredentialsMessage* message) c_g_unix_credentials_message_get_credentials; // gio.UnixFDList GType function() c_g_unix_fd_list_get_type; GUnixFDList* function() c_g_unix_fd_list_new; GUnixFDList* function(int* fds, int nFds) c_g_unix_fd_list_new_from_array; int function(GUnixFDList* list, int fd, GError** err) c_g_unix_fd_list_append; int function(GUnixFDList* list, int index, GError** err) c_g_unix_fd_list_get; int function(GUnixFDList* list) c_g_unix_fd_list_get_length; int* function(GUnixFDList* list, int* length) c_g_unix_fd_list_peek_fds; int* function(GUnixFDList* list, int* length) c_g_unix_fd_list_steal_fds; // gio.UnixFDMessage GType function() c_g_unix_fd_message_get_type; GSocketControlMessage* function() c_g_unix_fd_message_new; GSocketControlMessage* function(GUnixFDList* fdList) c_g_unix_fd_message_new_with_fd_list; int function(GUnixFDMessage* message, int fd, GError** err) c_g_unix_fd_message_append_fd; GUnixFDList* function(GUnixFDMessage* message) c_g_unix_fd_message_get_fd_list; int* function(GUnixFDMessage* message, int* length) c_g_unix_fd_message_steal_fds; // gio.UnixInputStream GType function() c_g_unix_input_stream_get_type; GInputStream* function(int fd, int closeFd) c_g_unix_input_stream_new; int function(GUnixInputStream* stream) c_g_unix_input_stream_get_close_fd; int function(GUnixInputStream* stream) c_g_unix_input_stream_get_fd; void function(GUnixInputStream* stream, int closeFd) c_g_unix_input_stream_set_close_fd; // gio.UnixMountEntry GType function() c_g_unix_mount_entry_get_type; int function(char* mountPath) c_g_unix_is_mount_path_system_internal; GUnixMountEntry* function(char* mountPath, ulong* timeRead) c_g_unix_mount_at; int function(GUnixMountEntry* mount1, GUnixMountEntry* mount2) c_g_unix_mount_compare; void function(GUnixMountEntry* mountEntry) c_g_unix_mount_free; char* function(GUnixMountEntry* mountEntry) c_g_unix_mount_get_device_path; const(char)* function(GUnixMountEntry* mountEntry) c_g_unix_mount_get_fs_type; char* function(GUnixMountEntry* mountEntry) c_g_unix_mount_get_mount_path; int function(GUnixMountEntry* mountEntry) c_g_unix_mount_guess_can_eject; GIcon* function(GUnixMountEntry* mountEntry) c_g_unix_mount_guess_icon; char* function(GUnixMountEntry* mountEntry) c_g_unix_mount_guess_name; int function(GUnixMountEntry* mountEntry) c_g_unix_mount_guess_should_display; GIcon* function(GUnixMountEntry* mountEntry) c_g_unix_mount_guess_symbolic_icon; int function(GUnixMountEntry* mountEntry) c_g_unix_mount_is_readonly; int function(GUnixMountEntry* mountEntry) c_g_unix_mount_is_system_internal; int function(ulong time) c_g_unix_mount_points_changed_since; GList* function(ulong* timeRead) c_g_unix_mount_points_get; int function(ulong time) c_g_unix_mounts_changed_since; GList* function(ulong* timeRead) c_g_unix_mounts_get; GUnixMountEntry* function(GUnixMountEntry* mountEntry) c_g_unix_mount_copy; GUnixMountEntry* function(char* filePath, ulong* timeRead) c_g_unix_mount_for; // gio.UnixMountMonitor GType function() c_g_unix_mount_monitor_get_type; GUnixMountMonitor* function() c_g_unix_mount_monitor_new; GUnixMountMonitor* function() c_g_unix_mount_monitor_get; void function(GUnixMountMonitor* mountMonitor, int limitMsec) c_g_unix_mount_monitor_set_rate_limit; // gio.UnixMountPoint GType function() c_g_unix_mount_point_get_type; int function(GUnixMountPoint* mount1, GUnixMountPoint* mount2) c_g_unix_mount_point_compare; GUnixMountPoint* function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_copy; void function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_free; char* function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_get_device_path; const(char)* function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_get_fs_type; char* function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_get_mount_path; const(char)* function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_get_options; int function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_guess_can_eject; GIcon* function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_guess_icon; char* function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_guess_name; GIcon* function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_guess_symbolic_icon; int function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_is_loopback; int function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_is_readonly; int function(GUnixMountPoint* mountPoint) c_g_unix_mount_point_is_user_mountable; // gio.UnixOutputStream GType function() c_g_unix_output_stream_get_type; GOutputStream* function(int fd, int closeFd) c_g_unix_output_stream_new; int function(GUnixOutputStream* stream) c_g_unix_output_stream_get_close_fd; int function(GUnixOutputStream* stream) c_g_unix_output_stream_get_fd; void function(GUnixOutputStream* stream, int closeFd) c_g_unix_output_stream_set_close_fd; // gio.UnixSocketAddress GType function() c_g_unix_socket_address_get_type; GSocketAddress* function(const(char)* path) c_g_unix_socket_address_new; GSocketAddress* function(char* path, int pathLen) c_g_unix_socket_address_new_abstract; GSocketAddress* function(char* path, int pathLen, GUnixSocketAddressType type) c_g_unix_socket_address_new_with_type; int function() c_g_unix_socket_address_abstract_names_supported; GUnixSocketAddressType function(GUnixSocketAddress* address) c_g_unix_socket_address_get_address_type; int function(GUnixSocketAddress* address) c_g_unix_socket_address_get_is_abstract; const(char)* function(GUnixSocketAddress* address) c_g_unix_socket_address_get_path; size_t function(GUnixSocketAddress* address) c_g_unix_socket_address_get_path_len; // gio.Vfs GType function() c_g_vfs_get_type; GVfs* function() c_g_vfs_get_default; GVfs* function() c_g_vfs_get_local; GFile* function(GVfs* vfs, const(char)* path) c_g_vfs_get_file_for_path; GFile* function(GVfs* vfs, const(char)* uri) c_g_vfs_get_file_for_uri; char** function(GVfs* vfs) c_g_vfs_get_supported_uri_schemes; int function(GVfs* vfs) c_g_vfs_is_active; GFile* function(GVfs* vfs, const(char)* parseName) c_g_vfs_parse_name; int function(GVfs* vfs, const(char)* scheme, GVfsFileLookupFunc uriFunc, void* uriData, GDestroyNotify uriDestroy, GVfsFileLookupFunc parseNameFunc, void* parseNameData, GDestroyNotify parseNameDestroy) c_g_vfs_register_uri_scheme; int function(GVfs* vfs, const(char)* scheme) c_g_vfs_unregister_uri_scheme; // gio.Volume GType function() c_g_volume_get_type; int function(GVolume* volume) c_g_volume_can_eject; int function(GVolume* volume) c_g_volume_can_mount; void function(GVolume* volume, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_volume_eject; int function(GVolume* volume, GAsyncResult* result, GError** err) c_g_volume_eject_finish; void function(GVolume* volume, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_volume_eject_with_operation; int function(GVolume* volume, GAsyncResult* result, GError** err) c_g_volume_eject_with_operation_finish; char** function(GVolume* volume) c_g_volume_enumerate_identifiers; GFile* function(GVolume* volume) c_g_volume_get_activation_root; GDrive* function(GVolume* volume) c_g_volume_get_drive; GIcon* function(GVolume* volume) c_g_volume_get_icon; char* function(GVolume* volume, const(char)* kind) c_g_volume_get_identifier; GMount* function(GVolume* volume) c_g_volume_get_mount; char* function(GVolume* volume) c_g_volume_get_name; const(char)* function(GVolume* volume) c_g_volume_get_sort_key; GIcon* function(GVolume* volume) c_g_volume_get_symbolic_icon; char* function(GVolume* volume) c_g_volume_get_uuid; void function(GVolume* volume, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_volume_mount; int function(GVolume* volume, GAsyncResult* result, GError** err) c_g_volume_mount_finish; int function(GVolume* volume) c_g_volume_should_automount; // gio.VolumeMonitor GType function() c_g_volume_monitor_get_type; GVolume* function(GMount* mount) c_g_volume_monitor_adopt_orphan_mount; GVolumeMonitor* function() c_g_volume_monitor_get; GList* function(GVolumeMonitor* volumeMonitor) c_g_volume_monitor_get_connected_drives; GMount* function(GVolumeMonitor* volumeMonitor, const(char)* uuid) c_g_volume_monitor_get_mount_for_uuid; GList* function(GVolumeMonitor* volumeMonitor) c_g_volume_monitor_get_mounts; GVolume* function(GVolumeMonitor* volumeMonitor, const(char)* uuid) c_g_volume_monitor_get_volume_for_uuid; GList* function(GVolumeMonitor* volumeMonitor) c_g_volume_monitor_get_volumes; // gio.ZlibCompressor GType function() c_g_zlib_compressor_get_type; GZlibCompressor* function(GZlibCompressorFormat format, int level) c_g_zlib_compressor_new; GFileInfo* function(GZlibCompressor* compressor) c_g_zlib_compressor_get_file_info; void function(GZlibCompressor* compressor, GFileInfo* fileInfo) c_g_zlib_compressor_set_file_info; // gio.ZlibDecompressor GType function() c_g_zlib_decompressor_get_type; GZlibDecompressor* function(GZlibCompressorFormat format) c_g_zlib_decompressor_new; GFileInfo* function(GZlibDecompressor* decompressor) c_g_zlib_decompressor_get_file_info; // gio.PollableUtils GSource* function(GObject* pollableStream) c_g_pollable_source_new; GSource* function(void* pollableStream, GSource* childSource, GCancellable* cancellable) c_g_pollable_source_new_full; ptrdiff_t function(GInputStream* stream, void* buffer, size_t count, int blocking, GCancellable* cancellable, GError** err) c_g_pollable_stream_read; ptrdiff_t function(GOutputStream* stream, void* buffer, size_t count, int blocking, GCancellable* cancellable, GError** err) c_g_pollable_stream_write; int function(GOutputStream* stream, void* buffer, size_t count, int blocking, size_t* bytesWritten, GCancellable* cancellable, GError** err) c_g_pollable_stream_write_all; // gio.DBusNames uint function(GBusType busType, const(char)* name, GBusNameOwnerFlags flags, GBusAcquiredCallback busAcquiredHandler, GBusNameAcquiredCallback nameAcquiredHandler, GBusNameLostCallback nameLostHandler, void* userData, GDestroyNotify userDataFreeFunc) c_g_bus_own_name; uint function(GDBusConnection* connection, const(char)* name, GBusNameOwnerFlags flags, GBusNameAcquiredCallback nameAcquiredHandler, GBusNameLostCallback nameLostHandler, void* userData, GDestroyNotify userDataFreeFunc) c_g_bus_own_name_on_connection; uint function(GDBusConnection* connection, const(char)* name, GBusNameOwnerFlags flags, GClosure* nameAcquiredClosure, GClosure* nameLostClosure) c_g_bus_own_name_on_connection_with_closures; uint function(GBusType busType, const(char)* name, GBusNameOwnerFlags flags, GClosure* busAcquiredClosure, GClosure* nameAcquiredClosure, GClosure* nameLostClosure) c_g_bus_own_name_with_closures; void function(uint ownerId) c_g_bus_unown_name; void function(uint watcherId) c_g_bus_unwatch_name; uint function(GBusType busType, const(char)* name, GBusNameWatcherFlags flags, GBusNameAppearedCallback nameAppearedHandler, GBusNameVanishedCallback nameVanishedHandler, void* userData, GDestroyNotify userDataFreeFunc) c_g_bus_watch_name; uint function(GDBusConnection* connection, const(char)* name, GBusNameWatcherFlags flags, GBusNameAppearedCallback nameAppearedHandler, GBusNameVanishedCallback nameVanishedHandler, void* userData, GDestroyNotify userDataFreeFunc) c_g_bus_watch_name_on_connection; uint function(GDBusConnection* connection, const(char)* name, GBusNameWatcherFlags flags, GClosure* nameAppearedClosure, GClosure* nameVanishedClosure) c_g_bus_watch_name_on_connection_with_closures; uint function(GBusType busType, const(char)* name, GBusNameWatcherFlags flags, GClosure* nameAppearedClosure, GClosure* nameVanishedClosure) c_g_bus_watch_name_with_closures; // gio.ContentType int function(const(char)* type) c_g_content_type_can_be_executable; int function(const(char)* type1, const(char)* type2) c_g_content_type_equals; char* function(const(char)* mimeType) c_g_content_type_from_mime_type; char* function(const(char)* type) c_g_content_type_get_description; char* function(const(char)* type) c_g_content_type_get_generic_icon_name; GIcon* function(const(char)* type) c_g_content_type_get_icon; char* function(const(char)* type) c_g_content_type_get_mime_type; GIcon* function(const(char)* type) c_g_content_type_get_symbolic_icon; char* function(const(char)* filename, char* data, size_t dataSize, int* resultUncertain) c_g_content_type_guess; char** function(GFile* root) c_g_content_type_guess_for_tree; int function(const(char)* type, const(char)* supertype) c_g_content_type_is_a; int function(const(char)* type) c_g_content_type_is_unknown; GList* function() c_g_content_types_get_registered; int function(const(char)* type, const(char)* mimeType) c_g_content_type_is_mime_type; // gio.DBusError char* function(GError* error) c_g_dbus_error_encode_gerror; char* function(GError* error) c_g_dbus_error_get_remote_error; int function(GError* error) c_g_dbus_error_is_remote_error; GError* function(const(char)* dbusErrorName, const(char)* dbusErrorMessage) c_g_dbus_error_new_for_dbus_error; GQuark function() c_g_dbus_error_quark; int function(GQuark errorDomain, int errorCode, const(char)* dbusErrorName) c_g_dbus_error_register_error; void function(const(char)* errorDomainQuarkName, size_t* quarkVolatile, GDBusErrorEntry* entries, uint numEntries) c_g_dbus_error_register_error_domain; int function(GError* error) c_g_dbus_error_strip_remote_error; int function(GQuark errorDomain, int errorCode, const(char)* dbusErrorName) c_g_dbus_error_unregister_error; // gio.DBusUtilities char* function(const(char)* str) c_g_dbus_address_escape_value; char* function(GBusType busType, GCancellable* cancellable, GError** err) c_g_dbus_address_get_for_bus_sync; void function(const(char)* address, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) c_g_dbus_address_get_stream; GIOStream* function(GAsyncResult* res, char** outGuid, GError** err) c_g_dbus_address_get_stream_finish; GIOStream* function(const(char)* address, char** outGuid, GCancellable* cancellable, GError** err) c_g_dbus_address_get_stream_sync; char* function() c_g_dbus_generate_guid; GVariant* function(GValue* gvalue, GVariantType* type) c_g_dbus_gvalue_to_gvariant; void function(GVariant* value, GValue* outGvalue) c_g_dbus_gvariant_to_gvalue; int function(const(char)* str) c_g_dbus_is_address; int function(const(char)* str) c_g_dbus_is_guid; int function(const(char)* str) c_g_dbus_is_interface_name; int function(const(char)* str) c_g_dbus_is_member_name; int function(const(char)* str) c_g_dbus_is_name; int function(const(char)* str, GError** err) c_g_dbus_is_supported_address; int function(const(char)* str) c_g_dbus_is_unique_name; // gio.ErrorGIO GIOErrorEnum function(int errNo) c_g_io_error_from_errno; GQuark function() c_g_io_error_quark; } // gio.Action alias c_g_action_get_type g_action_get_type; alias c_g_action_name_is_valid g_action_name_is_valid; alias c_g_action_parse_detailed_name g_action_parse_detailed_name; alias c_g_action_print_detailed_name g_action_print_detailed_name; alias c_g_action_activate g_action_activate; alias c_g_action_change_state g_action_change_state; alias c_g_action_get_enabled g_action_get_enabled; alias c_g_action_get_name g_action_get_name; alias c_g_action_get_parameter_type g_action_get_parameter_type; alias c_g_action_get_state g_action_get_state; alias c_g_action_get_state_hint g_action_get_state_hint; alias c_g_action_get_state_type g_action_get_state_type; // gio.ActionGroup alias c_g_action_group_get_type g_action_group_get_type; alias c_g_action_group_action_added g_action_group_action_added; alias c_g_action_group_action_enabled_changed g_action_group_action_enabled_changed; alias c_g_action_group_action_removed g_action_group_action_removed; alias c_g_action_group_action_state_changed g_action_group_action_state_changed; alias c_g_action_group_activate_action g_action_group_activate_action; alias c_g_action_group_change_action_state g_action_group_change_action_state; alias c_g_action_group_get_action_enabled g_action_group_get_action_enabled; alias c_g_action_group_get_action_parameter_type g_action_group_get_action_parameter_type; alias c_g_action_group_get_action_state g_action_group_get_action_state; alias c_g_action_group_get_action_state_hint g_action_group_get_action_state_hint; alias c_g_action_group_get_action_state_type g_action_group_get_action_state_type; alias c_g_action_group_has_action g_action_group_has_action; alias c_g_action_group_list_actions g_action_group_list_actions; alias c_g_action_group_query_action g_action_group_query_action; // gio.ActionMap alias c_g_action_map_get_type g_action_map_get_type; alias c_g_action_map_add_action g_action_map_add_action; alias c_g_action_map_add_action_entries g_action_map_add_action_entries; alias c_g_action_map_lookup_action g_action_map_lookup_action; alias c_g_action_map_remove_action g_action_map_remove_action; // gio.AppInfo alias c_g_app_info_get_type g_app_info_get_type; alias c_g_app_info_create_from_commandline g_app_info_create_from_commandline; alias c_g_app_info_get_all g_app_info_get_all; alias c_g_app_info_get_all_for_type g_app_info_get_all_for_type; alias c_g_app_info_get_default_for_type g_app_info_get_default_for_type; alias c_g_app_info_get_default_for_uri_scheme g_app_info_get_default_for_uri_scheme; alias c_g_app_info_get_fallback_for_type g_app_info_get_fallback_for_type; alias c_g_app_info_get_recommended_for_type g_app_info_get_recommended_for_type; alias c_g_app_info_launch_default_for_uri g_app_info_launch_default_for_uri; alias c_g_app_info_launch_default_for_uri_async g_app_info_launch_default_for_uri_async; alias c_g_app_info_launch_default_for_uri_finish g_app_info_launch_default_for_uri_finish; alias c_g_app_info_reset_type_associations g_app_info_reset_type_associations; alias c_g_app_info_add_supports_type g_app_info_add_supports_type; alias c_g_app_info_can_delete g_app_info_can_delete; alias c_g_app_info_can_remove_supports_type g_app_info_can_remove_supports_type; alias c_g_app_info_delete g_app_info_delete; alias c_g_app_info_dup g_app_info_dup; alias c_g_app_info_equal g_app_info_equal; alias c_g_app_info_get_commandline g_app_info_get_commandline; alias c_g_app_info_get_description g_app_info_get_description; alias c_g_app_info_get_display_name g_app_info_get_display_name; alias c_g_app_info_get_executable g_app_info_get_executable; alias c_g_app_info_get_icon g_app_info_get_icon; alias c_g_app_info_get_id g_app_info_get_id; alias c_g_app_info_get_name g_app_info_get_name; alias c_g_app_info_get_supported_types g_app_info_get_supported_types; alias c_g_app_info_launch g_app_info_launch; alias c_g_app_info_launch_uris g_app_info_launch_uris; alias c_g_app_info_remove_supports_type g_app_info_remove_supports_type; alias c_g_app_info_set_as_default_for_extension g_app_info_set_as_default_for_extension; alias c_g_app_info_set_as_default_for_type g_app_info_set_as_default_for_type; alias c_g_app_info_set_as_last_used_for_type g_app_info_set_as_last_used_for_type; alias c_g_app_info_should_show g_app_info_should_show; alias c_g_app_info_supports_files g_app_info_supports_files; alias c_g_app_info_supports_uris g_app_info_supports_uris; // gio.AppInfoMonitor alias c_g_app_info_monitor_get_type g_app_info_monitor_get_type; alias c_g_app_info_monitor_get g_app_info_monitor_get; // gio.AppLaunchContext alias c_g_app_launch_context_get_type g_app_launch_context_get_type; alias c_g_app_launch_context_new g_app_launch_context_new; alias c_g_app_launch_context_get_display g_app_launch_context_get_display; alias c_g_app_launch_context_get_environment g_app_launch_context_get_environment; alias c_g_app_launch_context_get_startup_notify_id g_app_launch_context_get_startup_notify_id; alias c_g_app_launch_context_launch_failed g_app_launch_context_launch_failed; alias c_g_app_launch_context_setenv g_app_launch_context_setenv; alias c_g_app_launch_context_unsetenv g_app_launch_context_unsetenv; // gio.Application alias c_g_application_get_type g_application_get_type; alias c_g_application_new g_application_new; alias c_g_application_get_default g_application_get_default; alias c_g_application_id_is_valid g_application_id_is_valid; alias c_g_application_activate g_application_activate; alias c_g_application_add_main_option g_application_add_main_option; alias c_g_application_add_main_option_entries g_application_add_main_option_entries; alias c_g_application_add_option_group g_application_add_option_group; alias c_g_application_bind_busy_property g_application_bind_busy_property; alias c_g_application_get_application_id g_application_get_application_id; alias c_g_application_get_dbus_connection g_application_get_dbus_connection; alias c_g_application_get_dbus_object_path g_application_get_dbus_object_path; alias c_g_application_get_flags g_application_get_flags; alias c_g_application_get_inactivity_timeout g_application_get_inactivity_timeout; alias c_g_application_get_is_busy g_application_get_is_busy; alias c_g_application_get_is_registered g_application_get_is_registered; alias c_g_application_get_is_remote g_application_get_is_remote; alias c_g_application_get_resource_base_path g_application_get_resource_base_path; alias c_g_application_hold g_application_hold; alias c_g_application_mark_busy g_application_mark_busy; alias c_g_application_open g_application_open; alias c_g_application_quit g_application_quit; alias c_g_application_register g_application_register; alias c_g_application_release g_application_release; alias c_g_application_run g_application_run; alias c_g_application_send_notification g_application_send_notification; alias c_g_application_set_action_group g_application_set_action_group; alias c_g_application_set_application_id g_application_set_application_id; alias c_g_application_set_default g_application_set_default; alias c_g_application_set_flags g_application_set_flags; alias c_g_application_set_inactivity_timeout g_application_set_inactivity_timeout; alias c_g_application_set_resource_base_path g_application_set_resource_base_path; alias c_g_application_unbind_busy_property g_application_unbind_busy_property; alias c_g_application_unmark_busy g_application_unmark_busy; alias c_g_application_withdraw_notification g_application_withdraw_notification; // gio.ApplicationCommandLine alias c_g_application_command_line_get_type g_application_command_line_get_type; alias c_g_application_command_line_create_file_for_arg g_application_command_line_create_file_for_arg; alias c_g_application_command_line_get_arguments g_application_command_line_get_arguments; alias c_g_application_command_line_get_cwd g_application_command_line_get_cwd; alias c_g_application_command_line_get_environ g_application_command_line_get_environ; alias c_g_application_command_line_get_exit_status g_application_command_line_get_exit_status; alias c_g_application_command_line_get_is_remote g_application_command_line_get_is_remote; alias c_g_application_command_line_get_options_dict g_application_command_line_get_options_dict; alias c_g_application_command_line_get_platform_data g_application_command_line_get_platform_data; alias c_g_application_command_line_get_stdin g_application_command_line_get_stdin; alias c_g_application_command_line_getenv g_application_command_line_getenv; alias c_g_application_command_line_print g_application_command_line_print; alias c_g_application_command_line_printerr g_application_command_line_printerr; alias c_g_application_command_line_set_exit_status g_application_command_line_set_exit_status; // gio.AsyncInitable alias c_g_async_initable_get_type g_async_initable_get_type; alias c_g_async_initable_new_async g_async_initable_new_async; alias c_g_async_initable_new_valist_async g_async_initable_new_valist_async; alias c_g_async_initable_newv_async g_async_initable_newv_async; alias c_g_async_initable_init_async g_async_initable_init_async; alias c_g_async_initable_init_finish g_async_initable_init_finish; alias c_g_async_initable_new_finish g_async_initable_new_finish; // gio.AsyncResult alias c_g_async_result_get_type g_async_result_get_type; alias c_g_async_result_get_source_object g_async_result_get_source_object; alias c_g_async_result_get_user_data g_async_result_get_user_data; alias c_g_async_result_is_tagged g_async_result_is_tagged; alias c_g_async_result_legacy_propagate_error g_async_result_legacy_propagate_error; // gio.BufferedInputStream alias c_g_buffered_input_stream_get_type g_buffered_input_stream_get_type; alias c_g_buffered_input_stream_new g_buffered_input_stream_new; alias c_g_buffered_input_stream_new_sized g_buffered_input_stream_new_sized; alias c_g_buffered_input_stream_fill g_buffered_input_stream_fill; alias c_g_buffered_input_stream_fill_async g_buffered_input_stream_fill_async; alias c_g_buffered_input_stream_fill_finish g_buffered_input_stream_fill_finish; alias c_g_buffered_input_stream_get_available g_buffered_input_stream_get_available; alias c_g_buffered_input_stream_get_buffer_size g_buffered_input_stream_get_buffer_size; alias c_g_buffered_input_stream_peek g_buffered_input_stream_peek; alias c_g_buffered_input_stream_peek_buffer g_buffered_input_stream_peek_buffer; alias c_g_buffered_input_stream_read_byte g_buffered_input_stream_read_byte; alias c_g_buffered_input_stream_set_buffer_size g_buffered_input_stream_set_buffer_size; // gio.BufferedOutputStream alias c_g_buffered_output_stream_get_type g_buffered_output_stream_get_type; alias c_g_buffered_output_stream_new g_buffered_output_stream_new; alias c_g_buffered_output_stream_new_sized g_buffered_output_stream_new_sized; alias c_g_buffered_output_stream_get_auto_grow g_buffered_output_stream_get_auto_grow; alias c_g_buffered_output_stream_get_buffer_size g_buffered_output_stream_get_buffer_size; alias c_g_buffered_output_stream_set_auto_grow g_buffered_output_stream_set_auto_grow; alias c_g_buffered_output_stream_set_buffer_size g_buffered_output_stream_set_buffer_size; // gio.BytesIcon alias c_g_bytes_icon_get_type g_bytes_icon_get_type; alias c_g_bytes_icon_new g_bytes_icon_new; alias c_g_bytes_icon_get_bytes g_bytes_icon_get_bytes; // gio.Cancellable alias c_g_cancellable_get_type g_cancellable_get_type; alias c_g_cancellable_new g_cancellable_new; alias c_g_cancellable_get_current g_cancellable_get_current; alias c_g_cancellable_cancel g_cancellable_cancel; alias c_g_cancellable_connect g_cancellable_connect; alias c_g_cancellable_disconnect g_cancellable_disconnect; alias c_g_cancellable_get_fd g_cancellable_get_fd; alias c_g_cancellable_is_cancelled g_cancellable_is_cancelled; alias c_g_cancellable_make_pollfd g_cancellable_make_pollfd; alias c_g_cancellable_pop_current g_cancellable_pop_current; alias c_g_cancellable_push_current g_cancellable_push_current; alias c_g_cancellable_release_fd g_cancellable_release_fd; alias c_g_cancellable_reset g_cancellable_reset; alias c_g_cancellable_set_error_if_cancelled g_cancellable_set_error_if_cancelled; alias c_g_cancellable_source_new g_cancellable_source_new; // gio.CharsetConverter alias c_g_charset_converter_get_type g_charset_converter_get_type; alias c_g_charset_converter_new g_charset_converter_new; alias c_g_charset_converter_get_num_fallbacks g_charset_converter_get_num_fallbacks; alias c_g_charset_converter_get_use_fallback g_charset_converter_get_use_fallback; alias c_g_charset_converter_set_use_fallback g_charset_converter_set_use_fallback; // gio.Converter alias c_g_converter_get_type g_converter_get_type; alias c_g_converter_convert g_converter_convert; alias c_g_converter_reset g_converter_reset; // gio.ConverterInputStream alias c_g_converter_input_stream_get_type g_converter_input_stream_get_type; alias c_g_converter_input_stream_new g_converter_input_stream_new; alias c_g_converter_input_stream_get_converter g_converter_input_stream_get_converter; // gio.ConverterOutputStream alias c_g_converter_output_stream_get_type g_converter_output_stream_get_type; alias c_g_converter_output_stream_new g_converter_output_stream_new; alias c_g_converter_output_stream_get_converter g_converter_output_stream_get_converter; // gio.Credentials alias c_g_credentials_get_type g_credentials_get_type; alias c_g_credentials_new g_credentials_new; alias c_g_credentials_get_native g_credentials_get_native; alias c_g_credentials_get_unix_pid g_credentials_get_unix_pid; alias c_g_credentials_get_unix_user g_credentials_get_unix_user; alias c_g_credentials_is_same_user g_credentials_is_same_user; alias c_g_credentials_set_native g_credentials_set_native; alias c_g_credentials_set_unix_user g_credentials_set_unix_user; alias c_g_credentials_to_string g_credentials_to_string; // gio.DBusActionGroup alias c_g_dbus_action_group_get_type g_dbus_action_group_get_type; alias c_g_dbus_action_group_get g_dbus_action_group_get; // gio.DBusAnnotationInfo alias c_g_dbus_annotation_info_get_type g_dbus_annotation_info_get_type; alias c_g_dbus_annotation_info_ref g_dbus_annotation_info_ref; alias c_g_dbus_annotation_info_unref g_dbus_annotation_info_unref; alias c_g_dbus_annotation_info_lookup g_dbus_annotation_info_lookup; // gio.DBusArgInfo alias c_g_dbus_arg_info_get_type g_dbus_arg_info_get_type; alias c_g_dbus_arg_info_ref g_dbus_arg_info_ref; alias c_g_dbus_arg_info_unref g_dbus_arg_info_unref; // gio.DBusAuthObserver alias c_g_dbus_auth_observer_get_type g_dbus_auth_observer_get_type; alias c_g_dbus_auth_observer_new g_dbus_auth_observer_new; alias c_g_dbus_auth_observer_allow_mechanism g_dbus_auth_observer_allow_mechanism; alias c_g_dbus_auth_observer_authorize_authenticated_peer g_dbus_auth_observer_authorize_authenticated_peer; // gio.DBusConnection alias c_g_dbus_connection_get_type g_dbus_connection_get_type; alias c_g_dbus_connection_new_finish g_dbus_connection_new_finish; alias c_g_dbus_connection_new_for_address_finish g_dbus_connection_new_for_address_finish; alias c_g_dbus_connection_new_for_address_sync g_dbus_connection_new_for_address_sync; alias c_g_dbus_connection_new_sync g_dbus_connection_new_sync; alias c_g_dbus_connection_new g_dbus_connection_new; alias c_g_dbus_connection_new_for_address g_dbus_connection_new_for_address; alias c_g_dbus_connection_add_filter g_dbus_connection_add_filter; alias c_g_dbus_connection_call g_dbus_connection_call; alias c_g_dbus_connection_call_finish g_dbus_connection_call_finish; alias c_g_dbus_connection_call_sync g_dbus_connection_call_sync; alias c_g_dbus_connection_call_with_unix_fd_list g_dbus_connection_call_with_unix_fd_list; alias c_g_dbus_connection_call_with_unix_fd_list_finish g_dbus_connection_call_with_unix_fd_list_finish; alias c_g_dbus_connection_call_with_unix_fd_list_sync g_dbus_connection_call_with_unix_fd_list_sync; alias c_g_dbus_connection_close g_dbus_connection_close; alias c_g_dbus_connection_close_finish g_dbus_connection_close_finish; alias c_g_dbus_connection_close_sync g_dbus_connection_close_sync; alias c_g_dbus_connection_emit_signal g_dbus_connection_emit_signal; alias c_g_dbus_connection_export_action_group g_dbus_connection_export_action_group; alias c_g_dbus_connection_export_menu_model g_dbus_connection_export_menu_model; alias c_g_dbus_connection_flush g_dbus_connection_flush; alias c_g_dbus_connection_flush_finish g_dbus_connection_flush_finish; alias c_g_dbus_connection_flush_sync g_dbus_connection_flush_sync; alias c_g_dbus_connection_get_capabilities g_dbus_connection_get_capabilities; alias c_g_dbus_connection_get_exit_on_close g_dbus_connection_get_exit_on_close; alias c_g_dbus_connection_get_guid g_dbus_connection_get_guid; alias c_g_dbus_connection_get_last_serial g_dbus_connection_get_last_serial; alias c_g_dbus_connection_get_peer_credentials g_dbus_connection_get_peer_credentials; alias c_g_dbus_connection_get_stream g_dbus_connection_get_stream; alias c_g_dbus_connection_get_unique_name g_dbus_connection_get_unique_name; alias c_g_dbus_connection_is_closed g_dbus_connection_is_closed; alias c_g_dbus_connection_register_object g_dbus_connection_register_object; alias c_g_dbus_connection_register_object_with_closures g_dbus_connection_register_object_with_closures; alias c_g_dbus_connection_register_subtree g_dbus_connection_register_subtree; alias c_g_dbus_connection_remove_filter g_dbus_connection_remove_filter; alias c_g_dbus_connection_send_message g_dbus_connection_send_message; alias c_g_dbus_connection_send_message_with_reply g_dbus_connection_send_message_with_reply; alias c_g_dbus_connection_send_message_with_reply_finish g_dbus_connection_send_message_with_reply_finish; alias c_g_dbus_connection_send_message_with_reply_sync g_dbus_connection_send_message_with_reply_sync; alias c_g_dbus_connection_set_exit_on_close g_dbus_connection_set_exit_on_close; alias c_g_dbus_connection_signal_subscribe g_dbus_connection_signal_subscribe; alias c_g_dbus_connection_signal_unsubscribe g_dbus_connection_signal_unsubscribe; alias c_g_dbus_connection_start_message_processing g_dbus_connection_start_message_processing; alias c_g_dbus_connection_unexport_action_group g_dbus_connection_unexport_action_group; alias c_g_dbus_connection_unexport_menu_model g_dbus_connection_unexport_menu_model; alias c_g_dbus_connection_unregister_object g_dbus_connection_unregister_object; alias c_g_dbus_connection_unregister_subtree g_dbus_connection_unregister_subtree; alias c_g_bus_get g_bus_get; alias c_g_bus_get_finish g_bus_get_finish; alias c_g_bus_get_sync g_bus_get_sync; // gio.DBusInterface alias c_g_dbus_interface_get_type g_dbus_interface_get_type; alias c_g_dbus_interface_dup_object g_dbus_interface_dup_object; alias c_g_dbus_interface_get_info g_dbus_interface_get_info; alias c_g_dbus_interface_get_object g_dbus_interface_get_object; alias c_g_dbus_interface_set_object g_dbus_interface_set_object; // gio.DBusInterfaceInfo alias c_g_dbus_interface_info_get_type g_dbus_interface_info_get_type; alias c_g_dbus_interface_info_cache_build g_dbus_interface_info_cache_build; alias c_g_dbus_interface_info_cache_release g_dbus_interface_info_cache_release; alias c_g_dbus_interface_info_generate_xml g_dbus_interface_info_generate_xml; alias c_g_dbus_interface_info_lookup_method g_dbus_interface_info_lookup_method; alias c_g_dbus_interface_info_lookup_property g_dbus_interface_info_lookup_property; alias c_g_dbus_interface_info_lookup_signal g_dbus_interface_info_lookup_signal; alias c_g_dbus_interface_info_ref g_dbus_interface_info_ref; alias c_g_dbus_interface_info_unref g_dbus_interface_info_unref; // gio.DBusInterfaceSkeleton alias c_g_dbus_interface_skeleton_get_type g_dbus_interface_skeleton_get_type; alias c_g_dbus_interface_skeleton_export g_dbus_interface_skeleton_export; alias c_g_dbus_interface_skeleton_flush g_dbus_interface_skeleton_flush; alias c_g_dbus_interface_skeleton_get_connection g_dbus_interface_skeleton_get_connection; alias c_g_dbus_interface_skeleton_get_connections g_dbus_interface_skeleton_get_connections; alias c_g_dbus_interface_skeleton_get_flags g_dbus_interface_skeleton_get_flags; alias c_g_dbus_interface_skeleton_get_info g_dbus_interface_skeleton_get_info; alias c_g_dbus_interface_skeleton_get_object_path g_dbus_interface_skeleton_get_object_path; alias c_g_dbus_interface_skeleton_get_properties g_dbus_interface_skeleton_get_properties; alias c_g_dbus_interface_skeleton_get_vtable g_dbus_interface_skeleton_get_vtable; alias c_g_dbus_interface_skeleton_has_connection g_dbus_interface_skeleton_has_connection; alias c_g_dbus_interface_skeleton_set_flags g_dbus_interface_skeleton_set_flags; alias c_g_dbus_interface_skeleton_unexport g_dbus_interface_skeleton_unexport; alias c_g_dbus_interface_skeleton_unexport_from_connection g_dbus_interface_skeleton_unexport_from_connection; // gio.DBusMenuModel alias c_g_dbus_menu_model_get_type g_dbus_menu_model_get_type; alias c_g_dbus_menu_model_get g_dbus_menu_model_get; // gio.DBusMessage alias c_g_dbus_message_get_type g_dbus_message_get_type; alias c_g_dbus_message_new g_dbus_message_new; alias c_g_dbus_message_new_from_blob g_dbus_message_new_from_blob; alias c_g_dbus_message_new_method_call g_dbus_message_new_method_call; alias c_g_dbus_message_new_signal g_dbus_message_new_signal; alias c_g_dbus_message_bytes_needed g_dbus_message_bytes_needed; alias c_g_dbus_message_copy g_dbus_message_copy; alias c_g_dbus_message_get_arg0 g_dbus_message_get_arg0; alias c_g_dbus_message_get_body g_dbus_message_get_body; alias c_g_dbus_message_get_byte_order g_dbus_message_get_byte_order; alias c_g_dbus_message_get_destination g_dbus_message_get_destination; alias c_g_dbus_message_get_error_name g_dbus_message_get_error_name; alias c_g_dbus_message_get_flags g_dbus_message_get_flags; alias c_g_dbus_message_get_header g_dbus_message_get_header; alias c_g_dbus_message_get_header_fields g_dbus_message_get_header_fields; alias c_g_dbus_message_get_interface g_dbus_message_get_interface; alias c_g_dbus_message_get_locked g_dbus_message_get_locked; alias c_g_dbus_message_get_member g_dbus_message_get_member; alias c_g_dbus_message_get_message_type g_dbus_message_get_message_type; alias c_g_dbus_message_get_num_unix_fds g_dbus_message_get_num_unix_fds; alias c_g_dbus_message_get_path g_dbus_message_get_path; alias c_g_dbus_message_get_reply_serial g_dbus_message_get_reply_serial; alias c_g_dbus_message_get_sender g_dbus_message_get_sender; alias c_g_dbus_message_get_serial g_dbus_message_get_serial; alias c_g_dbus_message_get_signature g_dbus_message_get_signature; alias c_g_dbus_message_get_unix_fd_list g_dbus_message_get_unix_fd_list; alias c_g_dbus_message_lock g_dbus_message_lock; alias c_g_dbus_message_new_method_error g_dbus_message_new_method_error; alias c_g_dbus_message_new_method_error_literal g_dbus_message_new_method_error_literal; alias c_g_dbus_message_new_method_error_valist g_dbus_message_new_method_error_valist; alias c_g_dbus_message_new_method_reply g_dbus_message_new_method_reply; alias c_g_dbus_message_print g_dbus_message_print; alias c_g_dbus_message_set_body g_dbus_message_set_body; alias c_g_dbus_message_set_byte_order g_dbus_message_set_byte_order; alias c_g_dbus_message_set_destination g_dbus_message_set_destination; alias c_g_dbus_message_set_error_name g_dbus_message_set_error_name; alias c_g_dbus_message_set_flags g_dbus_message_set_flags; alias c_g_dbus_message_set_header g_dbus_message_set_header; alias c_g_dbus_message_set_interface g_dbus_message_set_interface; alias c_g_dbus_message_set_member g_dbus_message_set_member; alias c_g_dbus_message_set_message_type g_dbus_message_set_message_type; alias c_g_dbus_message_set_num_unix_fds g_dbus_message_set_num_unix_fds; alias c_g_dbus_message_set_path g_dbus_message_set_path; alias c_g_dbus_message_set_reply_serial g_dbus_message_set_reply_serial; alias c_g_dbus_message_set_sender g_dbus_message_set_sender; alias c_g_dbus_message_set_serial g_dbus_message_set_serial; alias c_g_dbus_message_set_signature g_dbus_message_set_signature; alias c_g_dbus_message_set_unix_fd_list g_dbus_message_set_unix_fd_list; alias c_g_dbus_message_to_blob g_dbus_message_to_blob; alias c_g_dbus_message_to_gerror g_dbus_message_to_gerror; // gio.DBusMethodInfo alias c_g_dbus_method_info_get_type g_dbus_method_info_get_type; alias c_g_dbus_method_info_ref g_dbus_method_info_ref; alias c_g_dbus_method_info_unref g_dbus_method_info_unref; // gio.DBusMethodInvocation alias c_g_dbus_method_invocation_get_type g_dbus_method_invocation_get_type; alias c_g_dbus_method_invocation_get_connection g_dbus_method_invocation_get_connection; alias c_g_dbus_method_invocation_get_interface_name g_dbus_method_invocation_get_interface_name; alias c_g_dbus_method_invocation_get_message g_dbus_method_invocation_get_message; alias c_g_dbus_method_invocation_get_method_info g_dbus_method_invocation_get_method_info; alias c_g_dbus_method_invocation_get_method_name g_dbus_method_invocation_get_method_name; alias c_g_dbus_method_invocation_get_object_path g_dbus_method_invocation_get_object_path; alias c_g_dbus_method_invocation_get_parameters g_dbus_method_invocation_get_parameters; alias c_g_dbus_method_invocation_get_property_info g_dbus_method_invocation_get_property_info; alias c_g_dbus_method_invocation_get_sender g_dbus_method_invocation_get_sender; alias c_g_dbus_method_invocation_get_user_data g_dbus_method_invocation_get_user_data; alias c_g_dbus_method_invocation_return_dbus_error g_dbus_method_invocation_return_dbus_error; alias c_g_dbus_method_invocation_return_error g_dbus_method_invocation_return_error; alias c_g_dbus_method_invocation_return_error_literal g_dbus_method_invocation_return_error_literal; alias c_g_dbus_method_invocation_return_error_valist g_dbus_method_invocation_return_error_valist; alias c_g_dbus_method_invocation_return_gerror g_dbus_method_invocation_return_gerror; alias c_g_dbus_method_invocation_return_value g_dbus_method_invocation_return_value; alias c_g_dbus_method_invocation_return_value_with_unix_fd_list g_dbus_method_invocation_return_value_with_unix_fd_list; alias c_g_dbus_method_invocation_take_error g_dbus_method_invocation_take_error; // gio.DBusNodeInfo alias c_g_dbus_node_info_get_type g_dbus_node_info_get_type; alias c_g_dbus_node_info_new_for_xml g_dbus_node_info_new_for_xml; alias c_g_dbus_node_info_generate_xml g_dbus_node_info_generate_xml; alias c_g_dbus_node_info_lookup_interface g_dbus_node_info_lookup_interface; alias c_g_dbus_node_info_ref g_dbus_node_info_ref; alias c_g_dbus_node_info_unref g_dbus_node_info_unref; // gio.DBusObject alias c_g_dbus_object_get_type g_dbus_object_get_type; alias c_g_dbus_object_get_interface g_dbus_object_get_interface; alias c_g_dbus_object_get_interfaces g_dbus_object_get_interfaces; alias c_g_dbus_object_get_object_path g_dbus_object_get_object_path; // gio.DBusObjectManager alias c_g_dbus_object_manager_get_type g_dbus_object_manager_get_type; alias c_g_dbus_object_manager_get_interface g_dbus_object_manager_get_interface; alias c_g_dbus_object_manager_get_object g_dbus_object_manager_get_object; alias c_g_dbus_object_manager_get_object_path g_dbus_object_manager_get_object_path; alias c_g_dbus_object_manager_get_objects g_dbus_object_manager_get_objects; // gio.DBusObjectManagerClient alias c_g_dbus_object_manager_client_get_type g_dbus_object_manager_client_get_type; alias c_g_dbus_object_manager_client_new_finish g_dbus_object_manager_client_new_finish; alias c_g_dbus_object_manager_client_new_for_bus_finish g_dbus_object_manager_client_new_for_bus_finish; alias c_g_dbus_object_manager_client_new_for_bus_sync g_dbus_object_manager_client_new_for_bus_sync; alias c_g_dbus_object_manager_client_new_sync g_dbus_object_manager_client_new_sync; alias c_g_dbus_object_manager_client_new g_dbus_object_manager_client_new; alias c_g_dbus_object_manager_client_new_for_bus g_dbus_object_manager_client_new_for_bus; alias c_g_dbus_object_manager_client_get_connection g_dbus_object_manager_client_get_connection; alias c_g_dbus_object_manager_client_get_flags g_dbus_object_manager_client_get_flags; alias c_g_dbus_object_manager_client_get_name g_dbus_object_manager_client_get_name; alias c_g_dbus_object_manager_client_get_name_owner g_dbus_object_manager_client_get_name_owner; // gio.DBusObjectManagerServer alias c_g_dbus_object_manager_server_get_type g_dbus_object_manager_server_get_type; alias c_g_dbus_object_manager_server_new g_dbus_object_manager_server_new; alias c_g_dbus_object_manager_server_export g_dbus_object_manager_server_export; alias c_g_dbus_object_manager_server_export_uniquely g_dbus_object_manager_server_export_uniquely; alias c_g_dbus_object_manager_server_get_connection g_dbus_object_manager_server_get_connection; alias c_g_dbus_object_manager_server_is_exported g_dbus_object_manager_server_is_exported; alias c_g_dbus_object_manager_server_set_connection g_dbus_object_manager_server_set_connection; alias c_g_dbus_object_manager_server_unexport g_dbus_object_manager_server_unexport; // gio.DBusObjectProxy alias c_g_dbus_object_proxy_get_type g_dbus_object_proxy_get_type; alias c_g_dbus_object_proxy_new g_dbus_object_proxy_new; alias c_g_dbus_object_proxy_get_connection g_dbus_object_proxy_get_connection; // gio.DBusObjectSkeleton alias c_g_dbus_object_skeleton_get_type g_dbus_object_skeleton_get_type; alias c_g_dbus_object_skeleton_new g_dbus_object_skeleton_new; alias c_g_dbus_object_skeleton_add_interface g_dbus_object_skeleton_add_interface; alias c_g_dbus_object_skeleton_flush g_dbus_object_skeleton_flush; alias c_g_dbus_object_skeleton_remove_interface g_dbus_object_skeleton_remove_interface; alias c_g_dbus_object_skeleton_remove_interface_by_name g_dbus_object_skeleton_remove_interface_by_name; alias c_g_dbus_object_skeleton_set_object_path g_dbus_object_skeleton_set_object_path; // gio.DBusPropertyInfo alias c_g_dbus_property_info_get_type g_dbus_property_info_get_type; alias c_g_dbus_property_info_ref g_dbus_property_info_ref; alias c_g_dbus_property_info_unref g_dbus_property_info_unref; // gio.DBusProxy alias c_g_dbus_proxy_get_type g_dbus_proxy_get_type; alias c_g_dbus_proxy_new_finish g_dbus_proxy_new_finish; alias c_g_dbus_proxy_new_for_bus_finish g_dbus_proxy_new_for_bus_finish; alias c_g_dbus_proxy_new_for_bus_sync g_dbus_proxy_new_for_bus_sync; alias c_g_dbus_proxy_new_sync g_dbus_proxy_new_sync; alias c_g_dbus_proxy_new g_dbus_proxy_new; alias c_g_dbus_proxy_new_for_bus g_dbus_proxy_new_for_bus; alias c_g_dbus_proxy_call g_dbus_proxy_call; alias c_g_dbus_proxy_call_finish g_dbus_proxy_call_finish; alias c_g_dbus_proxy_call_sync g_dbus_proxy_call_sync; alias c_g_dbus_proxy_call_with_unix_fd_list g_dbus_proxy_call_with_unix_fd_list; alias c_g_dbus_proxy_call_with_unix_fd_list_finish g_dbus_proxy_call_with_unix_fd_list_finish; alias c_g_dbus_proxy_call_with_unix_fd_list_sync g_dbus_proxy_call_with_unix_fd_list_sync; alias c_g_dbus_proxy_get_cached_property g_dbus_proxy_get_cached_property; alias c_g_dbus_proxy_get_cached_property_names g_dbus_proxy_get_cached_property_names; alias c_g_dbus_proxy_get_connection g_dbus_proxy_get_connection; alias c_g_dbus_proxy_get_default_timeout g_dbus_proxy_get_default_timeout; alias c_g_dbus_proxy_get_flags g_dbus_proxy_get_flags; alias c_g_dbus_proxy_get_interface_info g_dbus_proxy_get_interface_info; alias c_g_dbus_proxy_get_interface_name g_dbus_proxy_get_interface_name; alias c_g_dbus_proxy_get_name g_dbus_proxy_get_name; alias c_g_dbus_proxy_get_name_owner g_dbus_proxy_get_name_owner; alias c_g_dbus_proxy_get_object_path g_dbus_proxy_get_object_path; alias c_g_dbus_proxy_set_cached_property g_dbus_proxy_set_cached_property; alias c_g_dbus_proxy_set_default_timeout g_dbus_proxy_set_default_timeout; alias c_g_dbus_proxy_set_interface_info g_dbus_proxy_set_interface_info; // gio.DBusServer alias c_g_dbus_server_get_type g_dbus_server_get_type; alias c_g_dbus_server_new_sync g_dbus_server_new_sync; alias c_g_dbus_server_get_client_address g_dbus_server_get_client_address; alias c_g_dbus_server_get_flags g_dbus_server_get_flags; alias c_g_dbus_server_get_guid g_dbus_server_get_guid; alias c_g_dbus_server_is_active g_dbus_server_is_active; alias c_g_dbus_server_start g_dbus_server_start; alias c_g_dbus_server_stop g_dbus_server_stop; // gio.DBusSignalInfo alias c_g_dbus_signal_info_get_type g_dbus_signal_info_get_type; alias c_g_dbus_signal_info_ref g_dbus_signal_info_ref; alias c_g_dbus_signal_info_unref g_dbus_signal_info_unref; // gio.DataInputStream alias c_g_data_input_stream_get_type g_data_input_stream_get_type; alias c_g_data_input_stream_new g_data_input_stream_new; alias c_g_data_input_stream_get_byte_order g_data_input_stream_get_byte_order; alias c_g_data_input_stream_get_newline_type g_data_input_stream_get_newline_type; alias c_g_data_input_stream_read_byte g_data_input_stream_read_byte; alias c_g_data_input_stream_read_int16 g_data_input_stream_read_int16; alias c_g_data_input_stream_read_int32 g_data_input_stream_read_int32; alias c_g_data_input_stream_read_int64 g_data_input_stream_read_int64; alias c_g_data_input_stream_read_line g_data_input_stream_read_line; alias c_g_data_input_stream_read_line_async g_data_input_stream_read_line_async; alias c_g_data_input_stream_read_line_finish g_data_input_stream_read_line_finish; alias c_g_data_input_stream_read_line_finish_utf8 g_data_input_stream_read_line_finish_utf8; alias c_g_data_input_stream_read_line_utf8 g_data_input_stream_read_line_utf8; alias c_g_data_input_stream_read_uint16 g_data_input_stream_read_uint16; alias c_g_data_input_stream_read_uint32 g_data_input_stream_read_uint32; alias c_g_data_input_stream_read_uint64 g_data_input_stream_read_uint64; alias c_g_data_input_stream_read_until g_data_input_stream_read_until; alias c_g_data_input_stream_read_until_async g_data_input_stream_read_until_async; alias c_g_data_input_stream_read_until_finish g_data_input_stream_read_until_finish; alias c_g_data_input_stream_read_upto g_data_input_stream_read_upto; alias c_g_data_input_stream_read_upto_async g_data_input_stream_read_upto_async; alias c_g_data_input_stream_read_upto_finish g_data_input_stream_read_upto_finish; alias c_g_data_input_stream_set_byte_order g_data_input_stream_set_byte_order; alias c_g_data_input_stream_set_newline_type g_data_input_stream_set_newline_type; // gio.DataOutputStream alias c_g_data_output_stream_get_type g_data_output_stream_get_type; alias c_g_data_output_stream_new g_data_output_stream_new; alias c_g_data_output_stream_get_byte_order g_data_output_stream_get_byte_order; alias c_g_data_output_stream_put_byte g_data_output_stream_put_byte; alias c_g_data_output_stream_put_int16 g_data_output_stream_put_int16; alias c_g_data_output_stream_put_int32 g_data_output_stream_put_int32; alias c_g_data_output_stream_put_int64 g_data_output_stream_put_int64; alias c_g_data_output_stream_put_string g_data_output_stream_put_string; alias c_g_data_output_stream_put_uint16 g_data_output_stream_put_uint16; alias c_g_data_output_stream_put_uint32 g_data_output_stream_put_uint32; alias c_g_data_output_stream_put_uint64 g_data_output_stream_put_uint64; alias c_g_data_output_stream_set_byte_order g_data_output_stream_set_byte_order; // gio.DatagramBased alias c_g_datagram_based_get_type g_datagram_based_get_type; alias c_g_datagram_based_condition_check g_datagram_based_condition_check; alias c_g_datagram_based_condition_wait g_datagram_based_condition_wait; alias c_g_datagram_based_create_source g_datagram_based_create_source; alias c_g_datagram_based_receive_messages g_datagram_based_receive_messages; alias c_g_datagram_based_send_messages g_datagram_based_send_messages; // gio.DesktopAppInfo alias c_g_desktop_app_info_get_type g_desktop_app_info_get_type; alias c_g_desktop_app_info_new g_desktop_app_info_new; alias c_g_desktop_app_info_new_from_filename g_desktop_app_info_new_from_filename; alias c_g_desktop_app_info_new_from_keyfile g_desktop_app_info_new_from_keyfile; alias c_g_desktop_app_info_get_implementations g_desktop_app_info_get_implementations; alias c_g_desktop_app_info_search g_desktop_app_info_search; alias c_g_desktop_app_info_set_desktop_env g_desktop_app_info_set_desktop_env; alias c_g_desktop_app_info_get_action_name g_desktop_app_info_get_action_name; alias c_g_desktop_app_info_get_boolean g_desktop_app_info_get_boolean; alias c_g_desktop_app_info_get_categories g_desktop_app_info_get_categories; alias c_g_desktop_app_info_get_filename g_desktop_app_info_get_filename; alias c_g_desktop_app_info_get_generic_name g_desktop_app_info_get_generic_name; alias c_g_desktop_app_info_get_is_hidden g_desktop_app_info_get_is_hidden; alias c_g_desktop_app_info_get_keywords g_desktop_app_info_get_keywords; alias c_g_desktop_app_info_get_nodisplay g_desktop_app_info_get_nodisplay; alias c_g_desktop_app_info_get_show_in g_desktop_app_info_get_show_in; alias c_g_desktop_app_info_get_startup_wm_class g_desktop_app_info_get_startup_wm_class; alias c_g_desktop_app_info_get_string g_desktop_app_info_get_string; alias c_g_desktop_app_info_has_key g_desktop_app_info_has_key; alias c_g_desktop_app_info_launch_action g_desktop_app_info_launch_action; alias c_g_desktop_app_info_launch_uris_as_manager g_desktop_app_info_launch_uris_as_manager; alias c_g_desktop_app_info_list_actions g_desktop_app_info_list_actions; // gio.DesktopAppInfoLookup alias c_g_desktop_app_info_lookup_get_type g_desktop_app_info_lookup_get_type; alias c_g_desktop_app_info_lookup_get_default_for_uri_scheme g_desktop_app_info_lookup_get_default_for_uri_scheme; // gio.Drive alias c_g_drive_get_type g_drive_get_type; alias c_g_drive_can_eject g_drive_can_eject; alias c_g_drive_can_poll_for_media g_drive_can_poll_for_media; alias c_g_drive_can_start g_drive_can_start; alias c_g_drive_can_start_degraded g_drive_can_start_degraded; alias c_g_drive_can_stop g_drive_can_stop; alias c_g_drive_eject g_drive_eject; alias c_g_drive_eject_finish g_drive_eject_finish; alias c_g_drive_eject_with_operation g_drive_eject_with_operation; alias c_g_drive_eject_with_operation_finish g_drive_eject_with_operation_finish; alias c_g_drive_enumerate_identifiers g_drive_enumerate_identifiers; alias c_g_drive_get_icon g_drive_get_icon; alias c_g_drive_get_identifier g_drive_get_identifier; alias c_g_drive_get_name g_drive_get_name; alias c_g_drive_get_sort_key g_drive_get_sort_key; alias c_g_drive_get_start_stop_type g_drive_get_start_stop_type; alias c_g_drive_get_symbolic_icon g_drive_get_symbolic_icon; alias c_g_drive_get_volumes g_drive_get_volumes; alias c_g_drive_has_media g_drive_has_media; alias c_g_drive_has_volumes g_drive_has_volumes; alias c_g_drive_is_media_check_automatic g_drive_is_media_check_automatic; alias c_g_drive_is_media_removable g_drive_is_media_removable; alias c_g_drive_is_removable g_drive_is_removable; alias c_g_drive_poll_for_media g_drive_poll_for_media; alias c_g_drive_poll_for_media_finish g_drive_poll_for_media_finish; alias c_g_drive_start g_drive_start; alias c_g_drive_start_finish g_drive_start_finish; alias c_g_drive_stop g_drive_stop; alias c_g_drive_stop_finish g_drive_stop_finish; // gio.DtlsClientConnection alias c_g_dtls_client_connection_get_type g_dtls_client_connection_get_type; alias c_g_dtls_client_connection_new g_dtls_client_connection_new; alias c_g_dtls_client_connection_get_accepted_cas g_dtls_client_connection_get_accepted_cas; alias c_g_dtls_client_connection_get_server_identity g_dtls_client_connection_get_server_identity; alias c_g_dtls_client_connection_get_validation_flags g_dtls_client_connection_get_validation_flags; alias c_g_dtls_client_connection_set_server_identity g_dtls_client_connection_set_server_identity; alias c_g_dtls_client_connection_set_validation_flags g_dtls_client_connection_set_validation_flags; // gio.DtlsConnection alias c_g_dtls_connection_get_type g_dtls_connection_get_type; alias c_g_dtls_connection_close g_dtls_connection_close; alias c_g_dtls_connection_close_async g_dtls_connection_close_async; alias c_g_dtls_connection_close_finish g_dtls_connection_close_finish; alias c_g_dtls_connection_emit_accept_certificate g_dtls_connection_emit_accept_certificate; alias c_g_dtls_connection_get_certificate g_dtls_connection_get_certificate; alias c_g_dtls_connection_get_database g_dtls_connection_get_database; alias c_g_dtls_connection_get_interaction g_dtls_connection_get_interaction; alias c_g_dtls_connection_get_peer_certificate g_dtls_connection_get_peer_certificate; alias c_g_dtls_connection_get_peer_certificate_errors g_dtls_connection_get_peer_certificate_errors; alias c_g_dtls_connection_get_rehandshake_mode g_dtls_connection_get_rehandshake_mode; alias c_g_dtls_connection_get_require_close_notify g_dtls_connection_get_require_close_notify; alias c_g_dtls_connection_handshake g_dtls_connection_handshake; alias c_g_dtls_connection_handshake_async g_dtls_connection_handshake_async; alias c_g_dtls_connection_handshake_finish g_dtls_connection_handshake_finish; alias c_g_dtls_connection_set_certificate g_dtls_connection_set_certificate; alias c_g_dtls_connection_set_database g_dtls_connection_set_database; alias c_g_dtls_connection_set_interaction g_dtls_connection_set_interaction; alias c_g_dtls_connection_set_rehandshake_mode g_dtls_connection_set_rehandshake_mode; alias c_g_dtls_connection_set_require_close_notify g_dtls_connection_set_require_close_notify; alias c_g_dtls_connection_shutdown g_dtls_connection_shutdown; alias c_g_dtls_connection_shutdown_async g_dtls_connection_shutdown_async; alias c_g_dtls_connection_shutdown_finish g_dtls_connection_shutdown_finish; // gio.DtlsServerConnection alias c_g_dtls_server_connection_get_type g_dtls_server_connection_get_type; alias c_g_dtls_server_connection_new g_dtls_server_connection_new; // gio.Emblem alias c_g_emblem_get_type g_emblem_get_type; alias c_g_emblem_new g_emblem_new; alias c_g_emblem_new_with_origin g_emblem_new_with_origin; alias c_g_emblem_get_icon g_emblem_get_icon; alias c_g_emblem_get_origin g_emblem_get_origin; // gio.EmblemedIcon alias c_g_emblemed_icon_get_type g_emblemed_icon_get_type; alias c_g_emblemed_icon_new g_emblemed_icon_new; alias c_g_emblemed_icon_add_emblem g_emblemed_icon_add_emblem; alias c_g_emblemed_icon_clear_emblems g_emblemed_icon_clear_emblems; alias c_g_emblemed_icon_get_emblems g_emblemed_icon_get_emblems; alias c_g_emblemed_icon_get_icon g_emblemed_icon_get_icon; // gio.File alias c_g_file_get_type g_file_get_type; alias c_g_file_new_for_commandline_arg g_file_new_for_commandline_arg; alias c_g_file_new_for_commandline_arg_and_cwd g_file_new_for_commandline_arg_and_cwd; alias c_g_file_new_for_path g_file_new_for_path; alias c_g_file_new_for_uri g_file_new_for_uri; alias c_g_file_new_tmp g_file_new_tmp; alias c_g_file_parse_name g_file_parse_name; alias c_g_file_append_to g_file_append_to; alias c_g_file_append_to_async g_file_append_to_async; alias c_g_file_append_to_finish g_file_append_to_finish; alias c_g_file_copy g_file_copy; alias c_g_file_copy_async g_file_copy_async; alias c_g_file_copy_attributes g_file_copy_attributes; alias c_g_file_copy_finish g_file_copy_finish; alias c_g_file_create g_file_create; alias c_g_file_create_async g_file_create_async; alias c_g_file_create_finish g_file_create_finish; alias c_g_file_create_readwrite g_file_create_readwrite; alias c_g_file_create_readwrite_async g_file_create_readwrite_async; alias c_g_file_create_readwrite_finish g_file_create_readwrite_finish; alias c_g_file_delete g_file_delete; alias c_g_file_delete_async g_file_delete_async; alias c_g_file_delete_finish g_file_delete_finish; alias c_g_file_dup g_file_dup; alias c_g_file_eject_mountable g_file_eject_mountable; alias c_g_file_eject_mountable_finish g_file_eject_mountable_finish; alias c_g_file_eject_mountable_with_operation g_file_eject_mountable_with_operation; alias c_g_file_eject_mountable_with_operation_finish g_file_eject_mountable_with_operation_finish; alias c_g_file_enumerate_children g_file_enumerate_children; alias c_g_file_enumerate_children_async g_file_enumerate_children_async; alias c_g_file_enumerate_children_finish g_file_enumerate_children_finish; alias c_g_file_equal g_file_equal; alias c_g_file_find_enclosing_mount g_file_find_enclosing_mount; alias c_g_file_find_enclosing_mount_async g_file_find_enclosing_mount_async; alias c_g_file_find_enclosing_mount_finish g_file_find_enclosing_mount_finish; alias c_g_file_get_basename g_file_get_basename; alias c_g_file_get_child g_file_get_child; alias c_g_file_get_child_for_display_name g_file_get_child_for_display_name; alias c_g_file_get_parent g_file_get_parent; alias c_g_file_get_parse_name g_file_get_parse_name; alias c_g_file_get_path g_file_get_path; alias c_g_file_get_relative_path g_file_get_relative_path; alias c_g_file_get_uri g_file_get_uri; alias c_g_file_get_uri_scheme g_file_get_uri_scheme; alias c_g_file_has_parent g_file_has_parent; alias c_g_file_has_prefix g_file_has_prefix; alias c_g_file_has_uri_scheme g_file_has_uri_scheme; alias c_g_file_hash g_file_hash; alias c_g_file_is_native g_file_is_native; alias c_g_file_load_contents g_file_load_contents; alias c_g_file_load_contents_async g_file_load_contents_async; alias c_g_file_load_contents_finish g_file_load_contents_finish; alias c_g_file_load_partial_contents_async g_file_load_partial_contents_async; alias c_g_file_load_partial_contents_finish g_file_load_partial_contents_finish; alias c_g_file_make_directory g_file_make_directory; alias c_g_file_make_directory_async g_file_make_directory_async; alias c_g_file_make_directory_finish g_file_make_directory_finish; alias c_g_file_make_directory_with_parents g_file_make_directory_with_parents; alias c_g_file_make_symbolic_link g_file_make_symbolic_link; alias c_g_file_measure_disk_usage g_file_measure_disk_usage; alias c_g_file_measure_disk_usage_async g_file_measure_disk_usage_async; alias c_g_file_measure_disk_usage_finish g_file_measure_disk_usage_finish; alias c_g_file_monitor g_file_monitor; alias c_g_file_monitor_directory g_file_monitor_directory; alias c_g_file_monitor_file g_file_monitor_file; alias c_g_file_mount_enclosing_volume g_file_mount_enclosing_volume; alias c_g_file_mount_enclosing_volume_finish g_file_mount_enclosing_volume_finish; alias c_g_file_mount_mountable g_file_mount_mountable; alias c_g_file_mount_mountable_finish g_file_mount_mountable_finish; alias c_g_file_move g_file_move; alias c_g_file_open_readwrite g_file_open_readwrite; alias c_g_file_open_readwrite_async g_file_open_readwrite_async; alias c_g_file_open_readwrite_finish g_file_open_readwrite_finish; alias c_g_file_poll_mountable g_file_poll_mountable; alias c_g_file_poll_mountable_finish g_file_poll_mountable_finish; alias c_g_file_query_default_handler g_file_query_default_handler; alias c_g_file_query_exists g_file_query_exists; alias c_g_file_query_file_type g_file_query_file_type; alias c_g_file_query_filesystem_info g_file_query_filesystem_info; alias c_g_file_query_filesystem_info_async g_file_query_filesystem_info_async; alias c_g_file_query_filesystem_info_finish g_file_query_filesystem_info_finish; alias c_g_file_query_info g_file_query_info; alias c_g_file_query_info_async g_file_query_info_async; alias c_g_file_query_info_finish g_file_query_info_finish; alias c_g_file_query_settable_attributes g_file_query_settable_attributes; alias c_g_file_query_writable_namespaces g_file_query_writable_namespaces; alias c_g_file_read g_file_read; alias c_g_file_read_async g_file_read_async; alias c_g_file_read_finish g_file_read_finish; alias c_g_file_replace g_file_replace; alias c_g_file_replace_async g_file_replace_async; alias c_g_file_replace_contents g_file_replace_contents; alias c_g_file_replace_contents_async g_file_replace_contents_async; alias c_g_file_replace_contents_bytes_async g_file_replace_contents_bytes_async; alias c_g_file_replace_contents_finish g_file_replace_contents_finish; alias c_g_file_replace_finish g_file_replace_finish; alias c_g_file_replace_readwrite g_file_replace_readwrite; alias c_g_file_replace_readwrite_async g_file_replace_readwrite_async; alias c_g_file_replace_readwrite_finish g_file_replace_readwrite_finish; alias c_g_file_resolve_relative_path g_file_resolve_relative_path; alias c_g_file_set_attribute g_file_set_attribute; alias c_g_file_set_attribute_byte_string g_file_set_attribute_byte_string; alias c_g_file_set_attribute_int32 g_file_set_attribute_int32; alias c_g_file_set_attribute_int64 g_file_set_attribute_int64; alias c_g_file_set_attribute_string g_file_set_attribute_string; alias c_g_file_set_attribute_uint32 g_file_set_attribute_uint32; alias c_g_file_set_attribute_uint64 g_file_set_attribute_uint64; alias c_g_file_set_attributes_async g_file_set_attributes_async; alias c_g_file_set_attributes_finish g_file_set_attributes_finish; alias c_g_file_set_attributes_from_info g_file_set_attributes_from_info; alias c_g_file_set_display_name g_file_set_display_name; alias c_g_file_set_display_name_async g_file_set_display_name_async; alias c_g_file_set_display_name_finish g_file_set_display_name_finish; alias c_g_file_start_mountable g_file_start_mountable; alias c_g_file_start_mountable_finish g_file_start_mountable_finish; alias c_g_file_stop_mountable g_file_stop_mountable; alias c_g_file_stop_mountable_finish g_file_stop_mountable_finish; alias c_g_file_supports_thread_contexts g_file_supports_thread_contexts; alias c_g_file_trash g_file_trash; alias c_g_file_trash_async g_file_trash_async; alias c_g_file_trash_finish g_file_trash_finish; alias c_g_file_unmount_mountable g_file_unmount_mountable; alias c_g_file_unmount_mountable_finish g_file_unmount_mountable_finish; alias c_g_file_unmount_mountable_with_operation g_file_unmount_mountable_with_operation; alias c_g_file_unmount_mountable_with_operation_finish g_file_unmount_mountable_with_operation_finish; // gio.FileAttributeInfoList alias c_g_file_attribute_info_list_get_type g_file_attribute_info_list_get_type; alias c_g_file_attribute_info_list_new g_file_attribute_info_list_new; alias c_g_file_attribute_info_list_add g_file_attribute_info_list_add; alias c_g_file_attribute_info_list_dup g_file_attribute_info_list_dup; alias c_g_file_attribute_info_list_lookup g_file_attribute_info_list_lookup; alias c_g_file_attribute_info_list_ref g_file_attribute_info_list_ref; alias c_g_file_attribute_info_list_unref g_file_attribute_info_list_unref; // gio.FileAttributeMatcher alias c_g_file_attribute_matcher_get_type g_file_attribute_matcher_get_type; alias c_g_file_attribute_matcher_new g_file_attribute_matcher_new; alias c_g_file_attribute_matcher_enumerate_namespace g_file_attribute_matcher_enumerate_namespace; alias c_g_file_attribute_matcher_enumerate_next g_file_attribute_matcher_enumerate_next; alias c_g_file_attribute_matcher_matches g_file_attribute_matcher_matches; alias c_g_file_attribute_matcher_matches_only g_file_attribute_matcher_matches_only; alias c_g_file_attribute_matcher_ref g_file_attribute_matcher_ref; alias c_g_file_attribute_matcher_subtract g_file_attribute_matcher_subtract; alias c_g_file_attribute_matcher_to_string g_file_attribute_matcher_to_string; alias c_g_file_attribute_matcher_unref g_file_attribute_matcher_unref; // gio.FileDescriptorBased alias c_g_file_descriptor_based_get_type g_file_descriptor_based_get_type; alias c_g_file_descriptor_based_get_fd g_file_descriptor_based_get_fd; // gio.FileEnumerator alias c_g_file_enumerator_get_type g_file_enumerator_get_type; alias c_g_file_enumerator_close g_file_enumerator_close; alias c_g_file_enumerator_close_async g_file_enumerator_close_async; alias c_g_file_enumerator_close_finish g_file_enumerator_close_finish; alias c_g_file_enumerator_get_child g_file_enumerator_get_child; alias c_g_file_enumerator_get_container g_file_enumerator_get_container; alias c_g_file_enumerator_has_pending g_file_enumerator_has_pending; alias c_g_file_enumerator_is_closed g_file_enumerator_is_closed; alias c_g_file_enumerator_iterate g_file_enumerator_iterate; alias c_g_file_enumerator_next_file g_file_enumerator_next_file; alias c_g_file_enumerator_next_files_async g_file_enumerator_next_files_async; alias c_g_file_enumerator_next_files_finish g_file_enumerator_next_files_finish; alias c_g_file_enumerator_set_pending g_file_enumerator_set_pending; // gio.FileIOStream alias c_g_file_io_stream_get_type g_file_io_stream_get_type; alias c_g_file_io_stream_get_etag g_file_io_stream_get_etag; alias c_g_file_io_stream_query_info g_file_io_stream_query_info; alias c_g_file_io_stream_query_info_async g_file_io_stream_query_info_async; alias c_g_file_io_stream_query_info_finish g_file_io_stream_query_info_finish; // gio.FileIcon alias c_g_file_icon_get_type g_file_icon_get_type; alias c_g_file_icon_new g_file_icon_new; alias c_g_file_icon_get_file g_file_icon_get_file; // gio.FileInfo alias c_g_file_info_get_type g_file_info_get_type; alias c_g_file_info_new g_file_info_new; alias c_g_file_info_clear_status g_file_info_clear_status; alias c_g_file_info_copy_into g_file_info_copy_into; alias c_g_file_info_dup g_file_info_dup; alias c_g_file_info_get_attribute_as_string g_file_info_get_attribute_as_string; alias c_g_file_info_get_attribute_boolean g_file_info_get_attribute_boolean; alias c_g_file_info_get_attribute_byte_string g_file_info_get_attribute_byte_string; alias c_g_file_info_get_attribute_data g_file_info_get_attribute_data; alias c_g_file_info_get_attribute_int32 g_file_info_get_attribute_int32; alias c_g_file_info_get_attribute_int64 g_file_info_get_attribute_int64; alias c_g_file_info_get_attribute_object g_file_info_get_attribute_object; alias c_g_file_info_get_attribute_status g_file_info_get_attribute_status; alias c_g_file_info_get_attribute_string g_file_info_get_attribute_string; alias c_g_file_info_get_attribute_stringv g_file_info_get_attribute_stringv; alias c_g_file_info_get_attribute_type g_file_info_get_attribute_type; alias c_g_file_info_get_attribute_uint32 g_file_info_get_attribute_uint32; alias c_g_file_info_get_attribute_uint64 g_file_info_get_attribute_uint64; alias c_g_file_info_get_content_type g_file_info_get_content_type; alias c_g_file_info_get_deletion_date g_file_info_get_deletion_date; alias c_g_file_info_get_display_name g_file_info_get_display_name; alias c_g_file_info_get_edit_name g_file_info_get_edit_name; alias c_g_file_info_get_etag g_file_info_get_etag; alias c_g_file_info_get_file_type g_file_info_get_file_type; alias c_g_file_info_get_icon g_file_info_get_icon; alias c_g_file_info_get_is_backup g_file_info_get_is_backup; alias c_g_file_info_get_is_hidden g_file_info_get_is_hidden; alias c_g_file_info_get_is_symlink g_file_info_get_is_symlink; alias c_g_file_info_get_modification_time g_file_info_get_modification_time; alias c_g_file_info_get_name g_file_info_get_name; alias c_g_file_info_get_size g_file_info_get_size; alias c_g_file_info_get_sort_order g_file_info_get_sort_order; alias c_g_file_info_get_symbolic_icon g_file_info_get_symbolic_icon; alias c_g_file_info_get_symlink_target g_file_info_get_symlink_target; alias c_g_file_info_has_attribute g_file_info_has_attribute; alias c_g_file_info_has_namespace g_file_info_has_namespace; alias c_g_file_info_list_attributes g_file_info_list_attributes; alias c_g_file_info_remove_attribute g_file_info_remove_attribute; alias c_g_file_info_set_attribute g_file_info_set_attribute; alias c_g_file_info_set_attribute_boolean g_file_info_set_attribute_boolean; alias c_g_file_info_set_attribute_byte_string g_file_info_set_attribute_byte_string; alias c_g_file_info_set_attribute_int32 g_file_info_set_attribute_int32; alias c_g_file_info_set_attribute_int64 g_file_info_set_attribute_int64; alias c_g_file_info_set_attribute_mask g_file_info_set_attribute_mask; alias c_g_file_info_set_attribute_object g_file_info_set_attribute_object; alias c_g_file_info_set_attribute_status g_file_info_set_attribute_status; alias c_g_file_info_set_attribute_string g_file_info_set_attribute_string; alias c_g_file_info_set_attribute_stringv g_file_info_set_attribute_stringv; alias c_g_file_info_set_attribute_uint32 g_file_info_set_attribute_uint32; alias c_g_file_info_set_attribute_uint64 g_file_info_set_attribute_uint64; alias c_g_file_info_set_content_type g_file_info_set_content_type; alias c_g_file_info_set_display_name g_file_info_set_display_name; alias c_g_file_info_set_edit_name g_file_info_set_edit_name; alias c_g_file_info_set_file_type g_file_info_set_file_type; alias c_g_file_info_set_icon g_file_info_set_icon; alias c_g_file_info_set_is_hidden g_file_info_set_is_hidden; alias c_g_file_info_set_is_symlink g_file_info_set_is_symlink; alias c_g_file_info_set_modification_time g_file_info_set_modification_time; alias c_g_file_info_set_name g_file_info_set_name; alias c_g_file_info_set_size g_file_info_set_size; alias c_g_file_info_set_sort_order g_file_info_set_sort_order; alias c_g_file_info_set_symbolic_icon g_file_info_set_symbolic_icon; alias c_g_file_info_set_symlink_target g_file_info_set_symlink_target; alias c_g_file_info_unset_attribute_mask g_file_info_unset_attribute_mask; // gio.FileInputStream alias c_g_file_input_stream_get_type g_file_input_stream_get_type; alias c_g_file_input_stream_query_info g_file_input_stream_query_info; alias c_g_file_input_stream_query_info_async g_file_input_stream_query_info_async; alias c_g_file_input_stream_query_info_finish g_file_input_stream_query_info_finish; // gio.FileMonitor alias c_g_file_monitor_get_type g_file_monitor_get_type; alias c_g_file_monitor_cancel g_file_monitor_cancel; alias c_g_file_monitor_emit_event g_file_monitor_emit_event; alias c_g_file_monitor_is_cancelled g_file_monitor_is_cancelled; alias c_g_file_monitor_set_rate_limit g_file_monitor_set_rate_limit; // gio.FileOutputStream alias c_g_file_output_stream_get_type g_file_output_stream_get_type; alias c_g_file_output_stream_get_etag g_file_output_stream_get_etag; alias c_g_file_output_stream_query_info g_file_output_stream_query_info; alias c_g_file_output_stream_query_info_async g_file_output_stream_query_info_async; alias c_g_file_output_stream_query_info_finish g_file_output_stream_query_info_finish; // gio.FilenameCompleter alias c_g_filename_completer_get_type g_filename_completer_get_type; alias c_g_filename_completer_new g_filename_completer_new; alias c_g_filename_completer_get_completion_suffix g_filename_completer_get_completion_suffix; alias c_g_filename_completer_get_completions g_filename_completer_get_completions; alias c_g_filename_completer_set_dirs_only g_filename_completer_set_dirs_only; // gio.FilterInputStream alias c_g_filter_input_stream_get_type g_filter_input_stream_get_type; alias c_g_filter_input_stream_get_base_stream g_filter_input_stream_get_base_stream; alias c_g_filter_input_stream_get_close_base_stream g_filter_input_stream_get_close_base_stream; alias c_g_filter_input_stream_set_close_base_stream g_filter_input_stream_set_close_base_stream; // gio.FilterOutputStream alias c_g_filter_output_stream_get_type g_filter_output_stream_get_type; alias c_g_filter_output_stream_get_base_stream g_filter_output_stream_get_base_stream; alias c_g_filter_output_stream_get_close_base_stream g_filter_output_stream_get_close_base_stream; alias c_g_filter_output_stream_set_close_base_stream g_filter_output_stream_set_close_base_stream; // gio.IOExtension alias c_g_io_extension_get_name g_io_extension_get_name; alias c_g_io_extension_get_priority g_io_extension_get_priority; alias c_g_io_extension_get_type g_io_extension_get_type; alias c_g_io_extension_ref_class g_io_extension_ref_class; // gio.IOExtensionPoint alias c_g_io_extension_point_get_extension_by_name g_io_extension_point_get_extension_by_name; alias c_g_io_extension_point_get_extensions g_io_extension_point_get_extensions; alias c_g_io_extension_point_get_required_type g_io_extension_point_get_required_type; alias c_g_io_extension_point_set_required_type g_io_extension_point_set_required_type; alias c_g_io_extension_point_implement g_io_extension_point_implement; alias c_g_io_extension_point_lookup g_io_extension_point_lookup; alias c_g_io_extension_point_register g_io_extension_point_register; // gio.IOModule alias c_g_io_module_get_type g_io_module_get_type; alias c_g_io_module_new g_io_module_new; alias c_g_io_modules_load_all_in_directory g_io_modules_load_all_in_directory; alias c_g_io_modules_load_all_in_directory_with_scope g_io_modules_load_all_in_directory_with_scope; alias c_g_io_modules_scan_all_in_directory g_io_modules_scan_all_in_directory; alias c_g_io_modules_scan_all_in_directory_with_scope g_io_modules_scan_all_in_directory_with_scope; // gio.IOModuleScope alias c_g_io_module_scope_block g_io_module_scope_block; alias c_g_io_module_scope_free g_io_module_scope_free; alias c_g_io_module_scope_new g_io_module_scope_new; // gio.IOSchedulerJob alias c_g_io_scheduler_job_send_to_mainloop g_io_scheduler_job_send_to_mainloop; alias c_g_io_scheduler_job_send_to_mainloop_async g_io_scheduler_job_send_to_mainloop_async; alias c_g_io_scheduler_cancel_all_jobs g_io_scheduler_cancel_all_jobs; alias c_g_io_scheduler_push_job g_io_scheduler_push_job; // gio.IOStream alias c_g_io_stream_get_type g_io_stream_get_type; alias c_g_io_stream_splice_finish g_io_stream_splice_finish; alias c_g_io_stream_clear_pending g_io_stream_clear_pending; alias c_g_io_stream_close g_io_stream_close; alias c_g_io_stream_close_async g_io_stream_close_async; alias c_g_io_stream_close_finish g_io_stream_close_finish; alias c_g_io_stream_get_input_stream g_io_stream_get_input_stream; alias c_g_io_stream_get_output_stream g_io_stream_get_output_stream; alias c_g_io_stream_has_pending g_io_stream_has_pending; alias c_g_io_stream_is_closed g_io_stream_is_closed; alias c_g_io_stream_set_pending g_io_stream_set_pending; alias c_g_io_stream_splice_async g_io_stream_splice_async; // gio.Icon alias c_g_icon_get_type g_icon_get_type; alias c_g_icon_deserialize g_icon_deserialize; alias c_g_icon_hash g_icon_hash; alias c_g_icon_new_for_string g_icon_new_for_string; alias c_g_icon_equal g_icon_equal; alias c_g_icon_serialize g_icon_serialize; alias c_g_icon_to_string g_icon_to_string; // gio.InetAddress alias c_g_inet_address_get_type g_inet_address_get_type; alias c_g_inet_address_new_any g_inet_address_new_any; alias c_g_inet_address_new_from_bytes g_inet_address_new_from_bytes; alias c_g_inet_address_new_from_string g_inet_address_new_from_string; alias c_g_inet_address_new_loopback g_inet_address_new_loopback; alias c_g_inet_address_equal g_inet_address_equal; alias c_g_inet_address_get_family g_inet_address_get_family; alias c_g_inet_address_get_is_any g_inet_address_get_is_any; alias c_g_inet_address_get_is_link_local g_inet_address_get_is_link_local; alias c_g_inet_address_get_is_loopback g_inet_address_get_is_loopback; alias c_g_inet_address_get_is_mc_global g_inet_address_get_is_mc_global; alias c_g_inet_address_get_is_mc_link_local g_inet_address_get_is_mc_link_local; alias c_g_inet_address_get_is_mc_node_local g_inet_address_get_is_mc_node_local; alias c_g_inet_address_get_is_mc_org_local g_inet_address_get_is_mc_org_local; alias c_g_inet_address_get_is_mc_site_local g_inet_address_get_is_mc_site_local; alias c_g_inet_address_get_is_multicast g_inet_address_get_is_multicast; alias c_g_inet_address_get_is_site_local g_inet_address_get_is_site_local; alias c_g_inet_address_get_native_size g_inet_address_get_native_size; alias c_g_inet_address_to_bytes g_inet_address_to_bytes; alias c_g_inet_address_to_string g_inet_address_to_string; // gio.InetAddressMask alias c_g_inet_address_mask_get_type g_inet_address_mask_get_type; alias c_g_inet_address_mask_new g_inet_address_mask_new; alias c_g_inet_address_mask_new_from_string g_inet_address_mask_new_from_string; alias c_g_inet_address_mask_equal g_inet_address_mask_equal; alias c_g_inet_address_mask_get_address g_inet_address_mask_get_address; alias c_g_inet_address_mask_get_family g_inet_address_mask_get_family; alias c_g_inet_address_mask_get_length g_inet_address_mask_get_length; alias c_g_inet_address_mask_matches g_inet_address_mask_matches; alias c_g_inet_address_mask_to_string g_inet_address_mask_to_string; // gio.InetSocketAddress alias c_g_inet_socket_address_get_type g_inet_socket_address_get_type; alias c_g_inet_socket_address_new g_inet_socket_address_new; alias c_g_inet_socket_address_new_from_string g_inet_socket_address_new_from_string; alias c_g_inet_socket_address_get_address g_inet_socket_address_get_address; alias c_g_inet_socket_address_get_flowinfo g_inet_socket_address_get_flowinfo; alias c_g_inet_socket_address_get_port g_inet_socket_address_get_port; alias c_g_inet_socket_address_get_scope_id g_inet_socket_address_get_scope_id; // gio.Initable alias c_g_initable_get_type g_initable_get_type; alias c_g_initable_new g_initable_new; alias c_g_initable_new_valist g_initable_new_valist; alias c_g_initable_newv g_initable_newv; alias c_g_initable_init g_initable_init; // gio.InputStream alias c_g_input_stream_get_type g_input_stream_get_type; alias c_g_input_stream_clear_pending g_input_stream_clear_pending; alias c_g_input_stream_close g_input_stream_close; alias c_g_input_stream_close_async g_input_stream_close_async; alias c_g_input_stream_close_finish g_input_stream_close_finish; alias c_g_input_stream_has_pending g_input_stream_has_pending; alias c_g_input_stream_is_closed g_input_stream_is_closed; alias c_g_input_stream_read g_input_stream_read; alias c_g_input_stream_read_all g_input_stream_read_all; alias c_g_input_stream_read_all_async g_input_stream_read_all_async; alias c_g_input_stream_read_all_finish g_input_stream_read_all_finish; alias c_g_input_stream_read_async g_input_stream_read_async; alias c_g_input_stream_read_bytes g_input_stream_read_bytes; alias c_g_input_stream_read_bytes_async g_input_stream_read_bytes_async; alias c_g_input_stream_read_bytes_finish g_input_stream_read_bytes_finish; alias c_g_input_stream_read_finish g_input_stream_read_finish; alias c_g_input_stream_set_pending g_input_stream_set_pending; alias c_g_input_stream_skip g_input_stream_skip; alias c_g_input_stream_skip_async g_input_stream_skip_async; alias c_g_input_stream_skip_finish g_input_stream_skip_finish; // gio.ListModel alias c_g_list_model_get_type g_list_model_get_type; alias c_g_list_model_get_item g_list_model_get_item; alias c_g_list_model_get_item_type g_list_model_get_item_type; alias c_g_list_model_get_n_items g_list_model_get_n_items; alias c_g_list_model_get_object g_list_model_get_object; alias c_g_list_model_items_changed g_list_model_items_changed; // gio.ListStore alias c_g_list_store_get_type g_list_store_get_type; alias c_g_list_store_new g_list_store_new; alias c_g_list_store_append g_list_store_append; alias c_g_list_store_insert g_list_store_insert; alias c_g_list_store_insert_sorted g_list_store_insert_sorted; alias c_g_list_store_remove g_list_store_remove; alias c_g_list_store_remove_all g_list_store_remove_all; alias c_g_list_store_sort g_list_store_sort; alias c_g_list_store_splice g_list_store_splice; // gio.LoadableIcon alias c_g_loadable_icon_get_type g_loadable_icon_get_type; alias c_g_loadable_icon_load g_loadable_icon_load; alias c_g_loadable_icon_load_async g_loadable_icon_load_async; alias c_g_loadable_icon_load_finish g_loadable_icon_load_finish; // gio.MemoryInputStream alias c_g_memory_input_stream_get_type g_memory_input_stream_get_type; alias c_g_memory_input_stream_new g_memory_input_stream_new; alias c_g_memory_input_stream_new_from_bytes g_memory_input_stream_new_from_bytes; alias c_g_memory_input_stream_new_from_data g_memory_input_stream_new_from_data; alias c_g_memory_input_stream_add_bytes g_memory_input_stream_add_bytes; alias c_g_memory_input_stream_add_data g_memory_input_stream_add_data; // gio.MemoryOutputStream alias c_g_memory_output_stream_get_type g_memory_output_stream_get_type; alias c_g_memory_output_stream_new g_memory_output_stream_new; alias c_g_memory_output_stream_new_resizable g_memory_output_stream_new_resizable; alias c_g_memory_output_stream_get_data g_memory_output_stream_get_data; alias c_g_memory_output_stream_get_data_size g_memory_output_stream_get_data_size; alias c_g_memory_output_stream_get_size g_memory_output_stream_get_size; alias c_g_memory_output_stream_steal_as_bytes g_memory_output_stream_steal_as_bytes; alias c_g_memory_output_stream_steal_data g_memory_output_stream_steal_data; // gio.Menu alias c_g_menu_get_type g_menu_get_type; alias c_g_menu_new g_menu_new; alias c_g_menu_append g_menu_append; alias c_g_menu_append_item g_menu_append_item; alias c_g_menu_append_section g_menu_append_section; alias c_g_menu_append_submenu g_menu_append_submenu; alias c_g_menu_freeze g_menu_freeze; alias c_g_menu_insert g_menu_insert; alias c_g_menu_insert_item g_menu_insert_item; alias c_g_menu_insert_section g_menu_insert_section; alias c_g_menu_insert_submenu g_menu_insert_submenu; alias c_g_menu_prepend g_menu_prepend; alias c_g_menu_prepend_item g_menu_prepend_item; alias c_g_menu_prepend_section g_menu_prepend_section; alias c_g_menu_prepend_submenu g_menu_prepend_submenu; alias c_g_menu_remove g_menu_remove; alias c_g_menu_remove_all g_menu_remove_all; // gio.MenuAttributeIter alias c_g_menu_attribute_iter_get_type g_menu_attribute_iter_get_type; alias c_g_menu_attribute_iter_get_name g_menu_attribute_iter_get_name; alias c_g_menu_attribute_iter_get_next g_menu_attribute_iter_get_next; alias c_g_menu_attribute_iter_get_value g_menu_attribute_iter_get_value; alias c_g_menu_attribute_iter_next g_menu_attribute_iter_next; // gio.MenuItem alias c_g_menu_item_get_type g_menu_item_get_type; alias c_g_menu_item_new g_menu_item_new; alias c_g_menu_item_new_from_model g_menu_item_new_from_model; alias c_g_menu_item_new_section g_menu_item_new_section; alias c_g_menu_item_new_submenu g_menu_item_new_submenu; alias c_g_menu_item_get_attribute g_menu_item_get_attribute; alias c_g_menu_item_get_attribute_value g_menu_item_get_attribute_value; alias c_g_menu_item_get_link g_menu_item_get_link; alias c_g_menu_item_set_action_and_target g_menu_item_set_action_and_target; alias c_g_menu_item_set_action_and_target_value g_menu_item_set_action_and_target_value; alias c_g_menu_item_set_attribute g_menu_item_set_attribute; alias c_g_menu_item_set_attribute_value g_menu_item_set_attribute_value; alias c_g_menu_item_set_detailed_action g_menu_item_set_detailed_action; alias c_g_menu_item_set_icon g_menu_item_set_icon; alias c_g_menu_item_set_label g_menu_item_set_label; alias c_g_menu_item_set_link g_menu_item_set_link; alias c_g_menu_item_set_section g_menu_item_set_section; alias c_g_menu_item_set_submenu g_menu_item_set_submenu; // gio.MenuLinkIter alias c_g_menu_link_iter_get_type g_menu_link_iter_get_type; alias c_g_menu_link_iter_get_name g_menu_link_iter_get_name; alias c_g_menu_link_iter_get_next g_menu_link_iter_get_next; alias c_g_menu_link_iter_get_value g_menu_link_iter_get_value; alias c_g_menu_link_iter_next g_menu_link_iter_next; // gio.MenuModel alias c_g_menu_model_get_type g_menu_model_get_type; alias c_g_menu_model_get_item_attribute g_menu_model_get_item_attribute; alias c_g_menu_model_get_item_attribute_value g_menu_model_get_item_attribute_value; alias c_g_menu_model_get_item_link g_menu_model_get_item_link; alias c_g_menu_model_get_n_items g_menu_model_get_n_items; alias c_g_menu_model_is_mutable g_menu_model_is_mutable; alias c_g_menu_model_items_changed g_menu_model_items_changed; alias c_g_menu_model_iterate_item_attributes g_menu_model_iterate_item_attributes; alias c_g_menu_model_iterate_item_links g_menu_model_iterate_item_links; // gio.Mount alias c_g_mount_get_type g_mount_get_type; alias c_g_mount_can_eject g_mount_can_eject; alias c_g_mount_can_unmount g_mount_can_unmount; alias c_g_mount_eject g_mount_eject; alias c_g_mount_eject_finish g_mount_eject_finish; alias c_g_mount_eject_with_operation g_mount_eject_with_operation; alias c_g_mount_eject_with_operation_finish g_mount_eject_with_operation_finish; alias c_g_mount_get_default_location g_mount_get_default_location; alias c_g_mount_get_drive g_mount_get_drive; alias c_g_mount_get_icon g_mount_get_icon; alias c_g_mount_get_name g_mount_get_name; alias c_g_mount_get_root g_mount_get_root; alias c_g_mount_get_sort_key g_mount_get_sort_key; alias c_g_mount_get_symbolic_icon g_mount_get_symbolic_icon; alias c_g_mount_get_uuid g_mount_get_uuid; alias c_g_mount_get_volume g_mount_get_volume; alias c_g_mount_guess_content_type g_mount_guess_content_type; alias c_g_mount_guess_content_type_finish g_mount_guess_content_type_finish; alias c_g_mount_guess_content_type_sync g_mount_guess_content_type_sync; alias c_g_mount_is_shadowed g_mount_is_shadowed; alias c_g_mount_remount g_mount_remount; alias c_g_mount_remount_finish g_mount_remount_finish; alias c_g_mount_shadow g_mount_shadow; alias c_g_mount_unmount g_mount_unmount; alias c_g_mount_unmount_finish g_mount_unmount_finish; alias c_g_mount_unmount_with_operation g_mount_unmount_with_operation; alias c_g_mount_unmount_with_operation_finish g_mount_unmount_with_operation_finish; alias c_g_mount_unshadow g_mount_unshadow; // gio.MountOperation alias c_g_mount_operation_get_type g_mount_operation_get_type; alias c_g_mount_operation_new g_mount_operation_new; alias c_g_mount_operation_get_anonymous g_mount_operation_get_anonymous; alias c_g_mount_operation_get_choice g_mount_operation_get_choice; alias c_g_mount_operation_get_domain g_mount_operation_get_domain; alias c_g_mount_operation_get_password g_mount_operation_get_password; alias c_g_mount_operation_get_password_save g_mount_operation_get_password_save; alias c_g_mount_operation_get_username g_mount_operation_get_username; alias c_g_mount_operation_reply g_mount_operation_reply; alias c_g_mount_operation_set_anonymous g_mount_operation_set_anonymous; alias c_g_mount_operation_set_choice g_mount_operation_set_choice; alias c_g_mount_operation_set_domain g_mount_operation_set_domain; alias c_g_mount_operation_set_password g_mount_operation_set_password; alias c_g_mount_operation_set_password_save g_mount_operation_set_password_save; alias c_g_mount_operation_set_username g_mount_operation_set_username; // gio.NativeVolumeMonitor alias c_g_native_volume_monitor_get_type g_native_volume_monitor_get_type; // gio.NetworkAddress alias c_g_network_address_get_type g_network_address_get_type; alias c_g_network_address_new g_network_address_new; alias c_g_network_address_new_loopback g_network_address_new_loopback; alias c_g_network_address_parse g_network_address_parse; alias c_g_network_address_parse_uri g_network_address_parse_uri; alias c_g_network_address_get_hostname g_network_address_get_hostname; alias c_g_network_address_get_port g_network_address_get_port; alias c_g_network_address_get_scheme g_network_address_get_scheme; // gio.NetworkMonitor alias c_g_network_monitor_get_type g_network_monitor_get_type; alias c_g_network_monitor_get_default g_network_monitor_get_default; alias c_g_network_monitor_can_reach g_network_monitor_can_reach; alias c_g_network_monitor_can_reach_async g_network_monitor_can_reach_async; alias c_g_network_monitor_can_reach_finish g_network_monitor_can_reach_finish; alias c_g_network_monitor_get_connectivity g_network_monitor_get_connectivity; alias c_g_network_monitor_get_network_available g_network_monitor_get_network_available; alias c_g_network_monitor_get_network_metered g_network_monitor_get_network_metered; // gio.NetworkService alias c_g_network_service_get_type g_network_service_get_type; alias c_g_network_service_new g_network_service_new; alias c_g_network_service_get_domain g_network_service_get_domain; alias c_g_network_service_get_protocol g_network_service_get_protocol; alias c_g_network_service_get_scheme g_network_service_get_scheme; alias c_g_network_service_get_service g_network_service_get_service; alias c_g_network_service_set_scheme g_network_service_set_scheme; // gio.Notification alias c_g_notification_get_type g_notification_get_type; alias c_g_notification_new g_notification_new; alias c_g_notification_add_button g_notification_add_button; alias c_g_notification_add_button_with_target g_notification_add_button_with_target; alias c_g_notification_add_button_with_target_value g_notification_add_button_with_target_value; alias c_g_notification_set_body g_notification_set_body; alias c_g_notification_set_default_action g_notification_set_default_action; alias c_g_notification_set_default_action_and_target g_notification_set_default_action_and_target; alias c_g_notification_set_default_action_and_target_value g_notification_set_default_action_and_target_value; alias c_g_notification_set_icon g_notification_set_icon; alias c_g_notification_set_priority g_notification_set_priority; alias c_g_notification_set_title g_notification_set_title; alias c_g_notification_set_urgent g_notification_set_urgent; // gio.OutputStream alias c_g_output_stream_get_type g_output_stream_get_type; alias c_g_output_stream_clear_pending g_output_stream_clear_pending; alias c_g_output_stream_close g_output_stream_close; alias c_g_output_stream_close_async g_output_stream_close_async; alias c_g_output_stream_close_finish g_output_stream_close_finish; alias c_g_output_stream_flush g_output_stream_flush; alias c_g_output_stream_flush_async g_output_stream_flush_async; alias c_g_output_stream_flush_finish g_output_stream_flush_finish; alias c_g_output_stream_has_pending g_output_stream_has_pending; alias c_g_output_stream_is_closed g_output_stream_is_closed; alias c_g_output_stream_is_closing g_output_stream_is_closing; alias c_g_output_stream_printf g_output_stream_printf; alias c_g_output_stream_set_pending g_output_stream_set_pending; alias c_g_output_stream_splice g_output_stream_splice; alias c_g_output_stream_splice_async g_output_stream_splice_async; alias c_g_output_stream_splice_finish g_output_stream_splice_finish; alias c_g_output_stream_vprintf g_output_stream_vprintf; alias c_g_output_stream_write g_output_stream_write; alias c_g_output_stream_write_all g_output_stream_write_all; alias c_g_output_stream_write_all_async g_output_stream_write_all_async; alias c_g_output_stream_write_all_finish g_output_stream_write_all_finish; alias c_g_output_stream_write_async g_output_stream_write_async; alias c_g_output_stream_write_bytes g_output_stream_write_bytes; alias c_g_output_stream_write_bytes_async g_output_stream_write_bytes_async; alias c_g_output_stream_write_bytes_finish g_output_stream_write_bytes_finish; alias c_g_output_stream_write_finish g_output_stream_write_finish; // gio.Permission alias c_g_permission_get_type g_permission_get_type; alias c_g_permission_acquire g_permission_acquire; alias c_g_permission_acquire_async g_permission_acquire_async; alias c_g_permission_acquire_finish g_permission_acquire_finish; alias c_g_permission_get_allowed g_permission_get_allowed; alias c_g_permission_get_can_acquire g_permission_get_can_acquire; alias c_g_permission_get_can_release g_permission_get_can_release; alias c_g_permission_impl_update g_permission_impl_update; alias c_g_permission_release g_permission_release; alias c_g_permission_release_async g_permission_release_async; alias c_g_permission_release_finish g_permission_release_finish; // gio.PollableInputStream alias c_g_pollable_input_stream_get_type g_pollable_input_stream_get_type; alias c_g_pollable_input_stream_can_poll g_pollable_input_stream_can_poll; alias c_g_pollable_input_stream_create_source g_pollable_input_stream_create_source; alias c_g_pollable_input_stream_is_readable g_pollable_input_stream_is_readable; alias c_g_pollable_input_stream_read_nonblocking g_pollable_input_stream_read_nonblocking; // gio.PollableOutputStream alias c_g_pollable_output_stream_get_type g_pollable_output_stream_get_type; alias c_g_pollable_output_stream_can_poll g_pollable_output_stream_can_poll; alias c_g_pollable_output_stream_create_source g_pollable_output_stream_create_source; alias c_g_pollable_output_stream_is_writable g_pollable_output_stream_is_writable; alias c_g_pollable_output_stream_write_nonblocking g_pollable_output_stream_write_nonblocking; // gio.PropertyAction alias c_g_property_action_get_type g_property_action_get_type; alias c_g_property_action_new g_property_action_new; // gio.Proxy alias c_g_proxy_get_type g_proxy_get_type; alias c_g_proxy_get_default_for_protocol g_proxy_get_default_for_protocol; alias c_g_proxy_connect g_proxy_connect; alias c_g_proxy_connect_async g_proxy_connect_async; alias c_g_proxy_connect_finish g_proxy_connect_finish; alias c_g_proxy_supports_hostname g_proxy_supports_hostname; // gio.ProxyAddress alias c_g_proxy_address_get_type g_proxy_address_get_type; alias c_g_proxy_address_new g_proxy_address_new; alias c_g_proxy_address_get_destination_hostname g_proxy_address_get_destination_hostname; alias c_g_proxy_address_get_destination_port g_proxy_address_get_destination_port; alias c_g_proxy_address_get_destination_protocol g_proxy_address_get_destination_protocol; alias c_g_proxy_address_get_password g_proxy_address_get_password; alias c_g_proxy_address_get_protocol g_proxy_address_get_protocol; alias c_g_proxy_address_get_uri g_proxy_address_get_uri; alias c_g_proxy_address_get_username g_proxy_address_get_username; // gio.ProxyAddressEnumerator alias c_g_proxy_address_enumerator_get_type g_proxy_address_enumerator_get_type; // gio.ProxyResolver alias c_g_proxy_resolver_get_type g_proxy_resolver_get_type; alias c_g_proxy_resolver_get_default g_proxy_resolver_get_default; alias c_g_proxy_resolver_is_supported g_proxy_resolver_is_supported; alias c_g_proxy_resolver_lookup g_proxy_resolver_lookup; alias c_g_proxy_resolver_lookup_async g_proxy_resolver_lookup_async; alias c_g_proxy_resolver_lookup_finish g_proxy_resolver_lookup_finish; // gio.RemoteActionGroup alias c_g_remote_action_group_get_type g_remote_action_group_get_type; alias c_g_remote_action_group_activate_action_full g_remote_action_group_activate_action_full; alias c_g_remote_action_group_change_action_state_full g_remote_action_group_change_action_state_full; // gio.Resolver alias c_g_resolver_get_type g_resolver_get_type; alias c_g_resolver_free_addresses g_resolver_free_addresses; alias c_g_resolver_free_targets g_resolver_free_targets; alias c_g_resolver_get_default g_resolver_get_default; alias c_g_resolver_lookup_by_address g_resolver_lookup_by_address; alias c_g_resolver_lookup_by_address_async g_resolver_lookup_by_address_async; alias c_g_resolver_lookup_by_address_finish g_resolver_lookup_by_address_finish; alias c_g_resolver_lookup_by_name g_resolver_lookup_by_name; alias c_g_resolver_lookup_by_name_async g_resolver_lookup_by_name_async; alias c_g_resolver_lookup_by_name_finish g_resolver_lookup_by_name_finish; alias c_g_resolver_lookup_records g_resolver_lookup_records; alias c_g_resolver_lookup_records_async g_resolver_lookup_records_async; alias c_g_resolver_lookup_records_finish g_resolver_lookup_records_finish; alias c_g_resolver_lookup_service g_resolver_lookup_service; alias c_g_resolver_lookup_service_async g_resolver_lookup_service_async; alias c_g_resolver_lookup_service_finish g_resolver_lookup_service_finish; alias c_g_resolver_set_default g_resolver_set_default; // gio.Resource alias c_g_resource_get_type g_resource_get_type; alias c_g_resource_new_from_data g_resource_new_from_data; alias c_g_resources_register g_resources_register; alias c_g_resources_unregister g_resources_unregister; alias c_g_resource_enumerate_children g_resource_enumerate_children; alias c_g_resource_get_info g_resource_get_info; alias c_g_resource_lookup_data g_resource_lookup_data; alias c_g_resource_open_stream g_resource_open_stream; alias c_g_resource_ref g_resource_ref; alias c_g_resource_unref g_resource_unref; alias c_g_resource_load g_resource_load; alias c_g_resources_enumerate_children g_resources_enumerate_children; alias c_g_resources_get_info g_resources_get_info; alias c_g_resources_lookup_data g_resources_lookup_data; alias c_g_resources_open_stream g_resources_open_stream; // gio.Seekable alias c_g_seekable_get_type g_seekable_get_type; alias c_g_seekable_can_seek g_seekable_can_seek; alias c_g_seekable_can_truncate g_seekable_can_truncate; alias c_g_seekable_seek g_seekable_seek; alias c_g_seekable_tell g_seekable_tell; alias c_g_seekable_truncate g_seekable_truncate; // gio.Settings alias c_g_settings_get_type g_settings_get_type; alias c_g_settings_new g_settings_new; alias c_g_settings_new_full g_settings_new_full; alias c_g_settings_new_with_backend g_settings_new_with_backend; alias c_g_settings_new_with_backend_and_path g_settings_new_with_backend_and_path; alias c_g_settings_new_with_path g_settings_new_with_path; alias c_g_settings_list_relocatable_schemas g_settings_list_relocatable_schemas; alias c_g_settings_list_schemas g_settings_list_schemas; alias c_g_settings_sync g_settings_sync; alias c_g_settings_unbind g_settings_unbind; alias c_g_settings_apply g_settings_apply; alias c_g_settings_bind g_settings_bind; alias c_g_settings_bind_with_mapping g_settings_bind_with_mapping; alias c_g_settings_bind_writable g_settings_bind_writable; alias c_g_settings_create_action g_settings_create_action; alias c_g_settings_delay g_settings_delay; alias c_g_settings_get g_settings_get; alias c_g_settings_get_boolean g_settings_get_boolean; alias c_g_settings_get_child g_settings_get_child; alias c_g_settings_get_default_value g_settings_get_default_value; alias c_g_settings_get_double g_settings_get_double; alias c_g_settings_get_enum g_settings_get_enum; alias c_g_settings_get_flags g_settings_get_flags; alias c_g_settings_get_has_unapplied g_settings_get_has_unapplied; alias c_g_settings_get_int g_settings_get_int; alias c_g_settings_get_int64 g_settings_get_int64; alias c_g_settings_get_mapped g_settings_get_mapped; alias c_g_settings_get_range g_settings_get_range; alias c_g_settings_get_string g_settings_get_string; alias c_g_settings_get_strv g_settings_get_strv; alias c_g_settings_get_uint g_settings_get_uint; alias c_g_settings_get_uint64 g_settings_get_uint64; alias c_g_settings_get_user_value g_settings_get_user_value; alias c_g_settings_get_value g_settings_get_value; alias c_g_settings_is_writable g_settings_is_writable; alias c_g_settings_list_children g_settings_list_children; alias c_g_settings_list_keys g_settings_list_keys; alias c_g_settings_range_check g_settings_range_check; alias c_g_settings_reset g_settings_reset; alias c_g_settings_revert g_settings_revert; alias c_g_settings_set g_settings_set; alias c_g_settings_set_boolean g_settings_set_boolean; alias c_g_settings_set_double g_settings_set_double; alias c_g_settings_set_enum g_settings_set_enum; alias c_g_settings_set_flags g_settings_set_flags; alias c_g_settings_set_int g_settings_set_int; alias c_g_settings_set_int64 g_settings_set_int64; alias c_g_settings_set_string g_settings_set_string; alias c_g_settings_set_strv g_settings_set_strv; alias c_g_settings_set_uint g_settings_set_uint; alias c_g_settings_set_uint64 g_settings_set_uint64; alias c_g_settings_set_value g_settings_set_value; // gio.SettingsBackend alias c_g_settings_backend_get_type g_settings_backend_get_type; alias c_g_settings_backend_flatten_tree g_settings_backend_flatten_tree; alias c_g_settings_backend_get_default g_settings_backend_get_default; alias c_g_settings_backend_changed g_settings_backend_changed; alias c_g_settings_backend_changed_tree g_settings_backend_changed_tree; alias c_g_settings_backend_keys_changed g_settings_backend_keys_changed; alias c_g_settings_backend_path_changed g_settings_backend_path_changed; alias c_g_settings_backend_path_writable_changed g_settings_backend_path_writable_changed; alias c_g_settings_backend_writable_changed g_settings_backend_writable_changed; alias c_g_keyfile_settings_backend_new g_keyfile_settings_backend_new; alias c_g_memory_settings_backend_new g_memory_settings_backend_new; alias c_g_null_settings_backend_new g_null_settings_backend_new; // gio.SettingsSchema alias c_g_settings_schema_get_type g_settings_schema_get_type; alias c_g_settings_schema_get_id g_settings_schema_get_id; alias c_g_settings_schema_get_key g_settings_schema_get_key; alias c_g_settings_schema_get_path g_settings_schema_get_path; alias c_g_settings_schema_has_key g_settings_schema_has_key; alias c_g_settings_schema_list_children g_settings_schema_list_children; alias c_g_settings_schema_list_keys g_settings_schema_list_keys; alias c_g_settings_schema_ref g_settings_schema_ref; alias c_g_settings_schema_unref g_settings_schema_unref; // gio.SettingsSchemaKey alias c_g_settings_schema_key_get_type g_settings_schema_key_get_type; alias c_g_settings_schema_key_get_default_value g_settings_schema_key_get_default_value; alias c_g_settings_schema_key_get_description g_settings_schema_key_get_description; alias c_g_settings_schema_key_get_name g_settings_schema_key_get_name; alias c_g_settings_schema_key_get_range g_settings_schema_key_get_range; alias c_g_settings_schema_key_get_summary g_settings_schema_key_get_summary; alias c_g_settings_schema_key_get_value_type g_settings_schema_key_get_value_type; alias c_g_settings_schema_key_range_check g_settings_schema_key_range_check; alias c_g_settings_schema_key_ref g_settings_schema_key_ref; alias c_g_settings_schema_key_unref g_settings_schema_key_unref; // gio.SettingsSchemaSource alias c_g_settings_schema_source_get_type g_settings_schema_source_get_type; alias c_g_settings_schema_source_new_from_directory g_settings_schema_source_new_from_directory; alias c_g_settings_schema_source_list_schemas g_settings_schema_source_list_schemas; alias c_g_settings_schema_source_lookup g_settings_schema_source_lookup; alias c_g_settings_schema_source_ref g_settings_schema_source_ref; alias c_g_settings_schema_source_unref g_settings_schema_source_unref; alias c_g_settings_schema_source_get_default g_settings_schema_source_get_default; // gio.SimpleAction alias c_g_simple_action_get_type g_simple_action_get_type; alias c_g_simple_action_new g_simple_action_new; alias c_g_simple_action_new_stateful g_simple_action_new_stateful; alias c_g_simple_action_set_enabled g_simple_action_set_enabled; alias c_g_simple_action_set_state g_simple_action_set_state; alias c_g_simple_action_set_state_hint g_simple_action_set_state_hint; // gio.SimpleActionGroup alias c_g_simple_action_group_get_type g_simple_action_group_get_type; alias c_g_simple_action_group_new g_simple_action_group_new; alias c_g_simple_action_group_add_entries g_simple_action_group_add_entries; alias c_g_simple_action_group_insert g_simple_action_group_insert; alias c_g_simple_action_group_lookup g_simple_action_group_lookup; alias c_g_simple_action_group_remove g_simple_action_group_remove; // gio.SimpleAsyncResult alias c_g_simple_async_result_get_type g_simple_async_result_get_type; alias c_g_simple_async_result_new g_simple_async_result_new; alias c_g_simple_async_result_new_error g_simple_async_result_new_error; alias c_g_simple_async_result_new_from_error g_simple_async_result_new_from_error; alias c_g_simple_async_result_new_take_error g_simple_async_result_new_take_error; alias c_g_simple_async_result_is_valid g_simple_async_result_is_valid; alias c_g_simple_async_result_complete g_simple_async_result_complete; alias c_g_simple_async_result_complete_in_idle g_simple_async_result_complete_in_idle; alias c_g_simple_async_result_get_op_res_gboolean g_simple_async_result_get_op_res_gboolean; alias c_g_simple_async_result_get_op_res_gpointer g_simple_async_result_get_op_res_gpointer; alias c_g_simple_async_result_get_op_res_gssize g_simple_async_result_get_op_res_gssize; alias c_g_simple_async_result_get_source_tag g_simple_async_result_get_source_tag; alias c_g_simple_async_result_propagate_error g_simple_async_result_propagate_error; alias c_g_simple_async_result_run_in_thread g_simple_async_result_run_in_thread; alias c_g_simple_async_result_set_check_cancellable g_simple_async_result_set_check_cancellable; alias c_g_simple_async_result_set_error g_simple_async_result_set_error; alias c_g_simple_async_result_set_error_va g_simple_async_result_set_error_va; alias c_g_simple_async_result_set_from_error g_simple_async_result_set_from_error; alias c_g_simple_async_result_set_handle_cancellation g_simple_async_result_set_handle_cancellation; alias c_g_simple_async_result_set_op_res_gboolean g_simple_async_result_set_op_res_gboolean; alias c_g_simple_async_result_set_op_res_gpointer g_simple_async_result_set_op_res_gpointer; alias c_g_simple_async_result_set_op_res_gssize g_simple_async_result_set_op_res_gssize; alias c_g_simple_async_result_take_error g_simple_async_result_take_error; alias c_g_simple_async_report_error_in_idle g_simple_async_report_error_in_idle; alias c_g_simple_async_report_gerror_in_idle g_simple_async_report_gerror_in_idle; alias c_g_simple_async_report_take_gerror_in_idle g_simple_async_report_take_gerror_in_idle; // gio.SimpleIOStream alias c_g_simple_io_stream_get_type g_simple_io_stream_get_type; alias c_g_simple_io_stream_new g_simple_io_stream_new; // gio.SimplePermission alias c_g_simple_permission_get_type g_simple_permission_get_type; alias c_g_simple_permission_new g_simple_permission_new; // gio.SimpleProxyResolver alias c_g_simple_proxy_resolver_get_type g_simple_proxy_resolver_get_type; alias c_g_simple_proxy_resolver_new g_simple_proxy_resolver_new; alias c_g_simple_proxy_resolver_set_default_proxy g_simple_proxy_resolver_set_default_proxy; alias c_g_simple_proxy_resolver_set_ignore_hosts g_simple_proxy_resolver_set_ignore_hosts; alias c_g_simple_proxy_resolver_set_uri_proxy g_simple_proxy_resolver_set_uri_proxy; // gio.Socket alias c_g_socket_get_type g_socket_get_type; alias c_g_socket_new g_socket_new; alias c_g_socket_new_from_fd g_socket_new_from_fd; alias c_g_socket_accept g_socket_accept; alias c_g_socket_bind g_socket_bind; alias c_g_socket_check_connect_result g_socket_check_connect_result; alias c_g_socket_close g_socket_close; alias c_g_socket_condition_check g_socket_condition_check; alias c_g_socket_condition_timed_wait g_socket_condition_timed_wait; alias c_g_socket_condition_wait g_socket_condition_wait; alias c_g_socket_connect g_socket_connect; alias c_g_socket_connection_factory_create_connection g_socket_connection_factory_create_connection; alias c_g_socket_create_source g_socket_create_source; alias c_g_socket_get_available_bytes g_socket_get_available_bytes; alias c_g_socket_get_blocking g_socket_get_blocking; alias c_g_socket_get_broadcast g_socket_get_broadcast; alias c_g_socket_get_credentials g_socket_get_credentials; alias c_g_socket_get_family g_socket_get_family; alias c_g_socket_get_fd g_socket_get_fd; alias c_g_socket_get_keepalive g_socket_get_keepalive; alias c_g_socket_get_listen_backlog g_socket_get_listen_backlog; alias c_g_socket_get_local_address g_socket_get_local_address; alias c_g_socket_get_multicast_loopback g_socket_get_multicast_loopback; alias c_g_socket_get_multicast_ttl g_socket_get_multicast_ttl; alias c_g_socket_get_option g_socket_get_option; alias c_g_socket_get_protocol g_socket_get_protocol; alias c_g_socket_get_remote_address g_socket_get_remote_address; alias c_g_socket_get_socket_type g_socket_get_socket_type; alias c_g_socket_get_timeout g_socket_get_timeout; alias c_g_socket_get_ttl g_socket_get_ttl; alias c_g_socket_is_closed g_socket_is_closed; alias c_g_socket_is_connected g_socket_is_connected; alias c_g_socket_join_multicast_group g_socket_join_multicast_group; alias c_g_socket_leave_multicast_group g_socket_leave_multicast_group; alias c_g_socket_listen g_socket_listen; alias c_g_socket_receive g_socket_receive; alias c_g_socket_receive_from g_socket_receive_from; alias c_g_socket_receive_message g_socket_receive_message; alias c_g_socket_receive_messages g_socket_receive_messages; alias c_g_socket_receive_with_blocking g_socket_receive_with_blocking; alias c_g_socket_send g_socket_send; alias c_g_socket_send_message g_socket_send_message; alias c_g_socket_send_messages g_socket_send_messages; alias c_g_socket_send_to g_socket_send_to; alias c_g_socket_send_with_blocking g_socket_send_with_blocking; alias c_g_socket_set_blocking g_socket_set_blocking; alias c_g_socket_set_broadcast g_socket_set_broadcast; alias c_g_socket_set_keepalive g_socket_set_keepalive; alias c_g_socket_set_listen_backlog g_socket_set_listen_backlog; alias c_g_socket_set_multicast_loopback g_socket_set_multicast_loopback; alias c_g_socket_set_multicast_ttl g_socket_set_multicast_ttl; alias c_g_socket_set_option g_socket_set_option; alias c_g_socket_set_timeout g_socket_set_timeout; alias c_g_socket_set_ttl g_socket_set_ttl; alias c_g_socket_shutdown g_socket_shutdown; alias c_g_socket_speaks_ipv4 g_socket_speaks_ipv4; // gio.SocketAddress alias c_g_socket_address_get_type g_socket_address_get_type; alias c_g_socket_address_new_from_native g_socket_address_new_from_native; alias c_g_socket_address_get_family g_socket_address_get_family; alias c_g_socket_address_get_native_size g_socket_address_get_native_size; alias c_g_socket_address_to_native g_socket_address_to_native; // gio.SocketAddressEnumerator alias c_g_socket_address_enumerator_get_type g_socket_address_enumerator_get_type; alias c_g_socket_address_enumerator_next g_socket_address_enumerator_next; alias c_g_socket_address_enumerator_next_async g_socket_address_enumerator_next_async; alias c_g_socket_address_enumerator_next_finish g_socket_address_enumerator_next_finish; // gio.SocketClient alias c_g_socket_client_get_type g_socket_client_get_type; alias c_g_socket_client_new g_socket_client_new; alias c_g_socket_client_add_application_proxy g_socket_client_add_application_proxy; alias c_g_socket_client_connect g_socket_client_connect; alias c_g_socket_client_connect_async g_socket_client_connect_async; alias c_g_socket_client_connect_finish g_socket_client_connect_finish; alias c_g_socket_client_connect_to_host g_socket_client_connect_to_host; alias c_g_socket_client_connect_to_host_async g_socket_client_connect_to_host_async; alias c_g_socket_client_connect_to_host_finish g_socket_client_connect_to_host_finish; alias c_g_socket_client_connect_to_service g_socket_client_connect_to_service; alias c_g_socket_client_connect_to_service_async g_socket_client_connect_to_service_async; alias c_g_socket_client_connect_to_service_finish g_socket_client_connect_to_service_finish; alias c_g_socket_client_connect_to_uri g_socket_client_connect_to_uri; alias c_g_socket_client_connect_to_uri_async g_socket_client_connect_to_uri_async; alias c_g_socket_client_connect_to_uri_finish g_socket_client_connect_to_uri_finish; alias c_g_socket_client_get_enable_proxy g_socket_client_get_enable_proxy; alias c_g_socket_client_get_family g_socket_client_get_family; alias c_g_socket_client_get_local_address g_socket_client_get_local_address; alias c_g_socket_client_get_protocol g_socket_client_get_protocol; alias c_g_socket_client_get_proxy_resolver g_socket_client_get_proxy_resolver; alias c_g_socket_client_get_socket_type g_socket_client_get_socket_type; alias c_g_socket_client_get_timeout g_socket_client_get_timeout; alias c_g_socket_client_get_tls g_socket_client_get_tls; alias c_g_socket_client_get_tls_validation_flags g_socket_client_get_tls_validation_flags; alias c_g_socket_client_set_enable_proxy g_socket_client_set_enable_proxy; alias c_g_socket_client_set_family g_socket_client_set_family; alias c_g_socket_client_set_local_address g_socket_client_set_local_address; alias c_g_socket_client_set_protocol g_socket_client_set_protocol; alias c_g_socket_client_set_proxy_resolver g_socket_client_set_proxy_resolver; alias c_g_socket_client_set_socket_type g_socket_client_set_socket_type; alias c_g_socket_client_set_timeout g_socket_client_set_timeout; alias c_g_socket_client_set_tls g_socket_client_set_tls; alias c_g_socket_client_set_tls_validation_flags g_socket_client_set_tls_validation_flags; // gio.SocketConnectable alias c_g_socket_connectable_get_type g_socket_connectable_get_type; alias c_g_socket_connectable_enumerate g_socket_connectable_enumerate; alias c_g_socket_connectable_proxy_enumerate g_socket_connectable_proxy_enumerate; alias c_g_socket_connectable_to_string g_socket_connectable_to_string; // gio.SocketConnection alias c_g_socket_connection_get_type g_socket_connection_get_type; alias c_g_socket_connection_factory_lookup_type g_socket_connection_factory_lookup_type; alias c_g_socket_connection_factory_register_type g_socket_connection_factory_register_type; alias c_g_socket_connection_connect g_socket_connection_connect; alias c_g_socket_connection_connect_async g_socket_connection_connect_async; alias c_g_socket_connection_connect_finish g_socket_connection_connect_finish; alias c_g_socket_connection_get_local_address g_socket_connection_get_local_address; alias c_g_socket_connection_get_remote_address g_socket_connection_get_remote_address; alias c_g_socket_connection_get_socket g_socket_connection_get_socket; alias c_g_socket_connection_is_connected g_socket_connection_is_connected; // gio.SocketControlMessage alias c_g_socket_control_message_get_type g_socket_control_message_get_type; alias c_g_socket_control_message_deserialize g_socket_control_message_deserialize; alias c_g_socket_control_message_get_level g_socket_control_message_get_level; alias c_g_socket_control_message_get_msg_type g_socket_control_message_get_msg_type; alias c_g_socket_control_message_get_size g_socket_control_message_get_size; alias c_g_socket_control_message_serialize g_socket_control_message_serialize; // gio.SocketListener alias c_g_socket_listener_get_type g_socket_listener_get_type; alias c_g_socket_listener_new g_socket_listener_new; alias c_g_socket_listener_accept g_socket_listener_accept; alias c_g_socket_listener_accept_async g_socket_listener_accept_async; alias c_g_socket_listener_accept_finish g_socket_listener_accept_finish; alias c_g_socket_listener_accept_socket g_socket_listener_accept_socket; alias c_g_socket_listener_accept_socket_async g_socket_listener_accept_socket_async; alias c_g_socket_listener_accept_socket_finish g_socket_listener_accept_socket_finish; alias c_g_socket_listener_add_address g_socket_listener_add_address; alias c_g_socket_listener_add_any_inet_port g_socket_listener_add_any_inet_port; alias c_g_socket_listener_add_inet_port g_socket_listener_add_inet_port; alias c_g_socket_listener_add_socket g_socket_listener_add_socket; alias c_g_socket_listener_close g_socket_listener_close; alias c_g_socket_listener_set_backlog g_socket_listener_set_backlog; // gio.SocketService alias c_g_socket_service_get_type g_socket_service_get_type; alias c_g_socket_service_new g_socket_service_new; alias c_g_socket_service_is_active g_socket_service_is_active; alias c_g_socket_service_start g_socket_service_start; alias c_g_socket_service_stop g_socket_service_stop; // gio.SrvTarget alias c_g_srv_target_get_type g_srv_target_get_type; alias c_g_srv_target_new g_srv_target_new; alias c_g_srv_target_copy g_srv_target_copy; alias c_g_srv_target_free g_srv_target_free; alias c_g_srv_target_get_hostname g_srv_target_get_hostname; alias c_g_srv_target_get_port g_srv_target_get_port; alias c_g_srv_target_get_priority g_srv_target_get_priority; alias c_g_srv_target_get_weight g_srv_target_get_weight; alias c_g_srv_target_list_sort g_srv_target_list_sort; // gio.StaticResource alias c_g_static_resource_fini g_static_resource_fini; alias c_g_static_resource_get_resource g_static_resource_get_resource; alias c_g_static_resource_init g_static_resource_init; // gio.Subprocess alias c_g_subprocess_get_type g_subprocess_get_type; alias c_g_subprocess_new g_subprocess_new; alias c_g_subprocess_newv g_subprocess_newv; alias c_g_subprocess_communicate g_subprocess_communicate; alias c_g_subprocess_communicate_async g_subprocess_communicate_async; alias c_g_subprocess_communicate_finish g_subprocess_communicate_finish; alias c_g_subprocess_communicate_utf8 g_subprocess_communicate_utf8; alias c_g_subprocess_communicate_utf8_async g_subprocess_communicate_utf8_async; alias c_g_subprocess_communicate_utf8_finish g_subprocess_communicate_utf8_finish; alias c_g_subprocess_force_exit g_subprocess_force_exit; alias c_g_subprocess_get_exit_status g_subprocess_get_exit_status; alias c_g_subprocess_get_identifier g_subprocess_get_identifier; alias c_g_subprocess_get_if_exited g_subprocess_get_if_exited; alias c_g_subprocess_get_if_signaled g_subprocess_get_if_signaled; alias c_g_subprocess_get_status g_subprocess_get_status; alias c_g_subprocess_get_stderr_pipe g_subprocess_get_stderr_pipe; alias c_g_subprocess_get_stdin_pipe g_subprocess_get_stdin_pipe; alias c_g_subprocess_get_stdout_pipe g_subprocess_get_stdout_pipe; alias c_g_subprocess_get_successful g_subprocess_get_successful; alias c_g_subprocess_get_term_sig g_subprocess_get_term_sig; alias c_g_subprocess_send_signal g_subprocess_send_signal; alias c_g_subprocess_wait g_subprocess_wait; alias c_g_subprocess_wait_async g_subprocess_wait_async; alias c_g_subprocess_wait_check g_subprocess_wait_check; alias c_g_subprocess_wait_check_async g_subprocess_wait_check_async; alias c_g_subprocess_wait_check_finish g_subprocess_wait_check_finish; alias c_g_subprocess_wait_finish g_subprocess_wait_finish; // gio.SubprocessLauncher alias c_g_subprocess_launcher_get_type g_subprocess_launcher_get_type; alias c_g_subprocess_launcher_new g_subprocess_launcher_new; alias c_g_subprocess_launcher_getenv g_subprocess_launcher_getenv; alias c_g_subprocess_launcher_set_child_setup g_subprocess_launcher_set_child_setup; alias c_g_subprocess_launcher_set_cwd g_subprocess_launcher_set_cwd; alias c_g_subprocess_launcher_set_environ g_subprocess_launcher_set_environ; alias c_g_subprocess_launcher_set_flags g_subprocess_launcher_set_flags; alias c_g_subprocess_launcher_set_stderr_file_path g_subprocess_launcher_set_stderr_file_path; alias c_g_subprocess_launcher_set_stdin_file_path g_subprocess_launcher_set_stdin_file_path; alias c_g_subprocess_launcher_set_stdout_file_path g_subprocess_launcher_set_stdout_file_path; alias c_g_subprocess_launcher_setenv g_subprocess_launcher_setenv; alias c_g_subprocess_launcher_spawn g_subprocess_launcher_spawn; alias c_g_subprocess_launcher_spawnv g_subprocess_launcher_spawnv; alias c_g_subprocess_launcher_take_fd g_subprocess_launcher_take_fd; alias c_g_subprocess_launcher_take_stderr_fd g_subprocess_launcher_take_stderr_fd; alias c_g_subprocess_launcher_take_stdin_fd g_subprocess_launcher_take_stdin_fd; alias c_g_subprocess_launcher_take_stdout_fd g_subprocess_launcher_take_stdout_fd; alias c_g_subprocess_launcher_unsetenv g_subprocess_launcher_unsetenv; // gio.Task alias c_g_task_get_type g_task_get_type; alias c_g_task_new g_task_new; alias c_g_task_is_valid g_task_is_valid; alias c_g_task_report_error g_task_report_error; alias c_g_task_report_new_error g_task_report_new_error; alias c_g_task_attach_source g_task_attach_source; alias c_g_task_get_cancellable g_task_get_cancellable; alias c_g_task_get_check_cancellable g_task_get_check_cancellable; alias c_g_task_get_completed g_task_get_completed; alias c_g_task_get_context g_task_get_context; alias c_g_task_get_priority g_task_get_priority; alias c_g_task_get_return_on_cancel g_task_get_return_on_cancel; alias c_g_task_get_source_object g_task_get_source_object; alias c_g_task_get_source_tag g_task_get_source_tag; alias c_g_task_get_task_data g_task_get_task_data; alias c_g_task_had_error g_task_had_error; alias c_g_task_propagate_boolean g_task_propagate_boolean; alias c_g_task_propagate_int g_task_propagate_int; alias c_g_task_propagate_pointer g_task_propagate_pointer; alias c_g_task_return_boolean g_task_return_boolean; alias c_g_task_return_error g_task_return_error; alias c_g_task_return_error_if_cancelled g_task_return_error_if_cancelled; alias c_g_task_return_int g_task_return_int; alias c_g_task_return_new_error g_task_return_new_error; alias c_g_task_return_pointer g_task_return_pointer; alias c_g_task_run_in_thread g_task_run_in_thread; alias c_g_task_run_in_thread_sync g_task_run_in_thread_sync; alias c_g_task_set_check_cancellable g_task_set_check_cancellable; alias c_g_task_set_priority g_task_set_priority; alias c_g_task_set_return_on_cancel g_task_set_return_on_cancel; alias c_g_task_set_source_tag g_task_set_source_tag; alias c_g_task_set_task_data g_task_set_task_data; // gio.TcpConnection alias c_g_tcp_connection_get_type g_tcp_connection_get_type; alias c_g_tcp_connection_get_graceful_disconnect g_tcp_connection_get_graceful_disconnect; alias c_g_tcp_connection_set_graceful_disconnect g_tcp_connection_set_graceful_disconnect; // gio.TcpWrapperConnection alias c_g_tcp_wrapper_connection_get_type g_tcp_wrapper_connection_get_type; alias c_g_tcp_wrapper_connection_new g_tcp_wrapper_connection_new; alias c_g_tcp_wrapper_connection_get_base_io_stream g_tcp_wrapper_connection_get_base_io_stream; // gio.TestDBus alias c_g_test_dbus_get_type g_test_dbus_get_type; alias c_g_test_dbus_new g_test_dbus_new; alias c_g_test_dbus_unset g_test_dbus_unset; alias c_g_test_dbus_add_service_dir g_test_dbus_add_service_dir; alias c_g_test_dbus_down g_test_dbus_down; alias c_g_test_dbus_get_bus_address g_test_dbus_get_bus_address; alias c_g_test_dbus_get_flags g_test_dbus_get_flags; alias c_g_test_dbus_stop g_test_dbus_stop; alias c_g_test_dbus_up g_test_dbus_up; // gio.ThemedIcon alias c_g_themed_icon_get_type g_themed_icon_get_type; alias c_g_themed_icon_new g_themed_icon_new; alias c_g_themed_icon_new_from_names g_themed_icon_new_from_names; alias c_g_themed_icon_new_with_default_fallbacks g_themed_icon_new_with_default_fallbacks; alias c_g_themed_icon_append_name g_themed_icon_append_name; alias c_g_themed_icon_get_names g_themed_icon_get_names; alias c_g_themed_icon_prepend_name g_themed_icon_prepend_name; // gio.ThreadedSocketService alias c_g_threaded_socket_service_get_type g_threaded_socket_service_get_type; alias c_g_threaded_socket_service_new g_threaded_socket_service_new; // gio.TlsBackend alias c_g_tls_backend_get_type g_tls_backend_get_type; alias c_g_tls_backend_get_default g_tls_backend_get_default; alias c_g_tls_backend_get_certificate_type g_tls_backend_get_certificate_type; alias c_g_tls_backend_get_client_connection_type g_tls_backend_get_client_connection_type; alias c_g_tls_backend_get_default_database g_tls_backend_get_default_database; alias c_g_tls_backend_get_dtls_client_connection_type g_tls_backend_get_dtls_client_connection_type; alias c_g_tls_backend_get_dtls_server_connection_type g_tls_backend_get_dtls_server_connection_type; alias c_g_tls_backend_get_file_database_type g_tls_backend_get_file_database_type; alias c_g_tls_backend_get_server_connection_type g_tls_backend_get_server_connection_type; alias c_g_tls_backend_supports_dtls g_tls_backend_supports_dtls; alias c_g_tls_backend_supports_tls g_tls_backend_supports_tls; // gio.TlsCertificate alias c_g_tls_certificate_get_type g_tls_certificate_get_type; alias c_g_tls_certificate_new_from_file g_tls_certificate_new_from_file; alias c_g_tls_certificate_new_from_files g_tls_certificate_new_from_files; alias c_g_tls_certificate_new_from_pem g_tls_certificate_new_from_pem; alias c_g_tls_certificate_list_new_from_file g_tls_certificate_list_new_from_file; alias c_g_tls_certificate_get_issuer g_tls_certificate_get_issuer; alias c_g_tls_certificate_is_same g_tls_certificate_is_same; alias c_g_tls_certificate_verify g_tls_certificate_verify; // gio.TlsClientConnection alias c_g_tls_client_connection_get_type g_tls_client_connection_get_type; alias c_g_tls_client_connection_new g_tls_client_connection_new; alias c_g_tls_client_connection_copy_session_state g_tls_client_connection_copy_session_state; alias c_g_tls_client_connection_get_accepted_cas g_tls_client_connection_get_accepted_cas; alias c_g_tls_client_connection_get_server_identity g_tls_client_connection_get_server_identity; alias c_g_tls_client_connection_get_use_ssl3 g_tls_client_connection_get_use_ssl3; alias c_g_tls_client_connection_get_validation_flags g_tls_client_connection_get_validation_flags; alias c_g_tls_client_connection_set_server_identity g_tls_client_connection_set_server_identity; alias c_g_tls_client_connection_set_use_ssl3 g_tls_client_connection_set_use_ssl3; alias c_g_tls_client_connection_set_validation_flags g_tls_client_connection_set_validation_flags; // gio.TlsConnection alias c_g_tls_connection_get_type g_tls_connection_get_type; alias c_g_tls_connection_emit_accept_certificate g_tls_connection_emit_accept_certificate; alias c_g_tls_connection_get_certificate g_tls_connection_get_certificate; alias c_g_tls_connection_get_database g_tls_connection_get_database; alias c_g_tls_connection_get_interaction g_tls_connection_get_interaction; alias c_g_tls_connection_get_peer_certificate g_tls_connection_get_peer_certificate; alias c_g_tls_connection_get_peer_certificate_errors g_tls_connection_get_peer_certificate_errors; alias c_g_tls_connection_get_rehandshake_mode g_tls_connection_get_rehandshake_mode; alias c_g_tls_connection_get_require_close_notify g_tls_connection_get_require_close_notify; alias c_g_tls_connection_get_use_system_certdb g_tls_connection_get_use_system_certdb; alias c_g_tls_connection_handshake g_tls_connection_handshake; alias c_g_tls_connection_handshake_async g_tls_connection_handshake_async; alias c_g_tls_connection_handshake_finish g_tls_connection_handshake_finish; alias c_g_tls_connection_set_certificate g_tls_connection_set_certificate; alias c_g_tls_connection_set_database g_tls_connection_set_database; alias c_g_tls_connection_set_interaction g_tls_connection_set_interaction; alias c_g_tls_connection_set_rehandshake_mode g_tls_connection_set_rehandshake_mode; alias c_g_tls_connection_set_require_close_notify g_tls_connection_set_require_close_notify; alias c_g_tls_connection_set_use_system_certdb g_tls_connection_set_use_system_certdb; // gio.TlsDatabase alias c_g_tls_database_get_type g_tls_database_get_type; alias c_g_tls_database_create_certificate_handle g_tls_database_create_certificate_handle; alias c_g_tls_database_lookup_certificate_for_handle g_tls_database_lookup_certificate_for_handle; alias c_g_tls_database_lookup_certificate_for_handle_async g_tls_database_lookup_certificate_for_handle_async; alias c_g_tls_database_lookup_certificate_for_handle_finish g_tls_database_lookup_certificate_for_handle_finish; alias c_g_tls_database_lookup_certificate_issuer g_tls_database_lookup_certificate_issuer; alias c_g_tls_database_lookup_certificate_issuer_async g_tls_database_lookup_certificate_issuer_async; alias c_g_tls_database_lookup_certificate_issuer_finish g_tls_database_lookup_certificate_issuer_finish; alias c_g_tls_database_lookup_certificates_issued_by g_tls_database_lookup_certificates_issued_by; alias c_g_tls_database_lookup_certificates_issued_by_async g_tls_database_lookup_certificates_issued_by_async; alias c_g_tls_database_lookup_certificates_issued_by_finish g_tls_database_lookup_certificates_issued_by_finish; alias c_g_tls_database_verify_chain g_tls_database_verify_chain; alias c_g_tls_database_verify_chain_async g_tls_database_verify_chain_async; alias c_g_tls_database_verify_chain_finish g_tls_database_verify_chain_finish; // gio.TlsFileDatabase alias c_g_tls_file_database_get_type g_tls_file_database_get_type; alias c_g_tls_file_database_new g_tls_file_database_new; // gio.TlsInteraction alias c_g_tls_interaction_get_type g_tls_interaction_get_type; alias c_g_tls_interaction_ask_password g_tls_interaction_ask_password; alias c_g_tls_interaction_ask_password_async g_tls_interaction_ask_password_async; alias c_g_tls_interaction_ask_password_finish g_tls_interaction_ask_password_finish; alias c_g_tls_interaction_invoke_ask_password g_tls_interaction_invoke_ask_password; alias c_g_tls_interaction_invoke_request_certificate g_tls_interaction_invoke_request_certificate; alias c_g_tls_interaction_request_certificate g_tls_interaction_request_certificate; alias c_g_tls_interaction_request_certificate_async g_tls_interaction_request_certificate_async; alias c_g_tls_interaction_request_certificate_finish g_tls_interaction_request_certificate_finish; // gio.TlsPassword alias c_g_tls_password_get_type g_tls_password_get_type; alias c_g_tls_password_new g_tls_password_new; alias c_g_tls_password_get_description g_tls_password_get_description; alias c_g_tls_password_get_flags g_tls_password_get_flags; alias c_g_tls_password_get_value g_tls_password_get_value; alias c_g_tls_password_get_warning g_tls_password_get_warning; alias c_g_tls_password_set_description g_tls_password_set_description; alias c_g_tls_password_set_flags g_tls_password_set_flags; alias c_g_tls_password_set_value g_tls_password_set_value; alias c_g_tls_password_set_value_full g_tls_password_set_value_full; alias c_g_tls_password_set_warning g_tls_password_set_warning; // gio.TlsServerConnection alias c_g_tls_server_connection_get_type g_tls_server_connection_get_type; alias c_g_tls_server_connection_new g_tls_server_connection_new; // gio.UnixConnection alias c_g_unix_connection_get_type g_unix_connection_get_type; alias c_g_unix_connection_receive_credentials g_unix_connection_receive_credentials; alias c_g_unix_connection_receive_credentials_async g_unix_connection_receive_credentials_async; alias c_g_unix_connection_receive_credentials_finish g_unix_connection_receive_credentials_finish; alias c_g_unix_connection_receive_fd g_unix_connection_receive_fd; alias c_g_unix_connection_send_credentials g_unix_connection_send_credentials; alias c_g_unix_connection_send_credentials_async g_unix_connection_send_credentials_async; alias c_g_unix_connection_send_credentials_finish g_unix_connection_send_credentials_finish; alias c_g_unix_connection_send_fd g_unix_connection_send_fd; // gio.UnixCredentialsMessage alias c_g_unix_credentials_message_get_type g_unix_credentials_message_get_type; alias c_g_unix_credentials_message_new g_unix_credentials_message_new; alias c_g_unix_credentials_message_new_with_credentials g_unix_credentials_message_new_with_credentials; alias c_g_unix_credentials_message_is_supported g_unix_credentials_message_is_supported; alias c_g_unix_credentials_message_get_credentials g_unix_credentials_message_get_credentials; // gio.UnixFDList alias c_g_unix_fd_list_get_type g_unix_fd_list_get_type; alias c_g_unix_fd_list_new g_unix_fd_list_new; alias c_g_unix_fd_list_new_from_array g_unix_fd_list_new_from_array; alias c_g_unix_fd_list_append g_unix_fd_list_append; alias c_g_unix_fd_list_get g_unix_fd_list_get; alias c_g_unix_fd_list_get_length g_unix_fd_list_get_length; alias c_g_unix_fd_list_peek_fds g_unix_fd_list_peek_fds; alias c_g_unix_fd_list_steal_fds g_unix_fd_list_steal_fds; // gio.UnixFDMessage alias c_g_unix_fd_message_get_type g_unix_fd_message_get_type; alias c_g_unix_fd_message_new g_unix_fd_message_new; alias c_g_unix_fd_message_new_with_fd_list g_unix_fd_message_new_with_fd_list; alias c_g_unix_fd_message_append_fd g_unix_fd_message_append_fd; alias c_g_unix_fd_message_get_fd_list g_unix_fd_message_get_fd_list; alias c_g_unix_fd_message_steal_fds g_unix_fd_message_steal_fds; // gio.UnixInputStream alias c_g_unix_input_stream_get_type g_unix_input_stream_get_type; alias c_g_unix_input_stream_new g_unix_input_stream_new; alias c_g_unix_input_stream_get_close_fd g_unix_input_stream_get_close_fd; alias c_g_unix_input_stream_get_fd g_unix_input_stream_get_fd; alias c_g_unix_input_stream_set_close_fd g_unix_input_stream_set_close_fd; // gio.UnixMountEntry alias c_g_unix_mount_entry_get_type g_unix_mount_entry_get_type; alias c_g_unix_is_mount_path_system_internal g_unix_is_mount_path_system_internal; alias c_g_unix_mount_at g_unix_mount_at; alias c_g_unix_mount_compare g_unix_mount_compare; alias c_g_unix_mount_free g_unix_mount_free; alias c_g_unix_mount_get_device_path g_unix_mount_get_device_path; alias c_g_unix_mount_get_fs_type g_unix_mount_get_fs_type; alias c_g_unix_mount_get_mount_path g_unix_mount_get_mount_path; alias c_g_unix_mount_guess_can_eject g_unix_mount_guess_can_eject; alias c_g_unix_mount_guess_icon g_unix_mount_guess_icon; alias c_g_unix_mount_guess_name g_unix_mount_guess_name; alias c_g_unix_mount_guess_should_display g_unix_mount_guess_should_display; alias c_g_unix_mount_guess_symbolic_icon g_unix_mount_guess_symbolic_icon; alias c_g_unix_mount_is_readonly g_unix_mount_is_readonly; alias c_g_unix_mount_is_system_internal g_unix_mount_is_system_internal; alias c_g_unix_mount_points_changed_since g_unix_mount_points_changed_since; alias c_g_unix_mount_points_get g_unix_mount_points_get; alias c_g_unix_mounts_changed_since g_unix_mounts_changed_since; alias c_g_unix_mounts_get g_unix_mounts_get; alias c_g_unix_mount_copy g_unix_mount_copy; alias c_g_unix_mount_for g_unix_mount_for; // gio.UnixMountMonitor alias c_g_unix_mount_monitor_get_type g_unix_mount_monitor_get_type; alias c_g_unix_mount_monitor_new g_unix_mount_monitor_new; alias c_g_unix_mount_monitor_get g_unix_mount_monitor_get; alias c_g_unix_mount_monitor_set_rate_limit g_unix_mount_monitor_set_rate_limit; // gio.UnixMountPoint alias c_g_unix_mount_point_get_type g_unix_mount_point_get_type; alias c_g_unix_mount_point_compare g_unix_mount_point_compare; alias c_g_unix_mount_point_copy g_unix_mount_point_copy; alias c_g_unix_mount_point_free g_unix_mount_point_free; alias c_g_unix_mount_point_get_device_path g_unix_mount_point_get_device_path; alias c_g_unix_mount_point_get_fs_type g_unix_mount_point_get_fs_type; alias c_g_unix_mount_point_get_mount_path g_unix_mount_point_get_mount_path; alias c_g_unix_mount_point_get_options g_unix_mount_point_get_options; alias c_g_unix_mount_point_guess_can_eject g_unix_mount_point_guess_can_eject; alias c_g_unix_mount_point_guess_icon g_unix_mount_point_guess_icon; alias c_g_unix_mount_point_guess_name g_unix_mount_point_guess_name; alias c_g_unix_mount_point_guess_symbolic_icon g_unix_mount_point_guess_symbolic_icon; alias c_g_unix_mount_point_is_loopback g_unix_mount_point_is_loopback; alias c_g_unix_mount_point_is_readonly g_unix_mount_point_is_readonly; alias c_g_unix_mount_point_is_user_mountable g_unix_mount_point_is_user_mountable; // gio.UnixOutputStream alias c_g_unix_output_stream_get_type g_unix_output_stream_get_type; alias c_g_unix_output_stream_new g_unix_output_stream_new; alias c_g_unix_output_stream_get_close_fd g_unix_output_stream_get_close_fd; alias c_g_unix_output_stream_get_fd g_unix_output_stream_get_fd; alias c_g_unix_output_stream_set_close_fd g_unix_output_stream_set_close_fd; // gio.UnixSocketAddress alias c_g_unix_socket_address_get_type g_unix_socket_address_get_type; alias c_g_unix_socket_address_new g_unix_socket_address_new; alias c_g_unix_socket_address_new_abstract g_unix_socket_address_new_abstract; alias c_g_unix_socket_address_new_with_type g_unix_socket_address_new_with_type; alias c_g_unix_socket_address_abstract_names_supported g_unix_socket_address_abstract_names_supported; alias c_g_unix_socket_address_get_address_type g_unix_socket_address_get_address_type; alias c_g_unix_socket_address_get_is_abstract g_unix_socket_address_get_is_abstract; alias c_g_unix_socket_address_get_path g_unix_socket_address_get_path; alias c_g_unix_socket_address_get_path_len g_unix_socket_address_get_path_len; // gio.Vfs alias c_g_vfs_get_type g_vfs_get_type; alias c_g_vfs_get_default g_vfs_get_default; alias c_g_vfs_get_local g_vfs_get_local; alias c_g_vfs_get_file_for_path g_vfs_get_file_for_path; alias c_g_vfs_get_file_for_uri g_vfs_get_file_for_uri; alias c_g_vfs_get_supported_uri_schemes g_vfs_get_supported_uri_schemes; alias c_g_vfs_is_active g_vfs_is_active; alias c_g_vfs_parse_name g_vfs_parse_name; alias c_g_vfs_register_uri_scheme g_vfs_register_uri_scheme; alias c_g_vfs_unregister_uri_scheme g_vfs_unregister_uri_scheme; // gio.Volume alias c_g_volume_get_type g_volume_get_type; alias c_g_volume_can_eject g_volume_can_eject; alias c_g_volume_can_mount g_volume_can_mount; alias c_g_volume_eject g_volume_eject; alias c_g_volume_eject_finish g_volume_eject_finish; alias c_g_volume_eject_with_operation g_volume_eject_with_operation; alias c_g_volume_eject_with_operation_finish g_volume_eject_with_operation_finish; alias c_g_volume_enumerate_identifiers g_volume_enumerate_identifiers; alias c_g_volume_get_activation_root g_volume_get_activation_root; alias c_g_volume_get_drive g_volume_get_drive; alias c_g_volume_get_icon g_volume_get_icon; alias c_g_volume_get_identifier g_volume_get_identifier; alias c_g_volume_get_mount g_volume_get_mount; alias c_g_volume_get_name g_volume_get_name; alias c_g_volume_get_sort_key g_volume_get_sort_key; alias c_g_volume_get_symbolic_icon g_volume_get_symbolic_icon; alias c_g_volume_get_uuid g_volume_get_uuid; alias c_g_volume_mount g_volume_mount; alias c_g_volume_mount_finish g_volume_mount_finish; alias c_g_volume_should_automount g_volume_should_automount; // gio.VolumeMonitor alias c_g_volume_monitor_get_type g_volume_monitor_get_type; alias c_g_volume_monitor_adopt_orphan_mount g_volume_monitor_adopt_orphan_mount; alias c_g_volume_monitor_get g_volume_monitor_get; alias c_g_volume_monitor_get_connected_drives g_volume_monitor_get_connected_drives; alias c_g_volume_monitor_get_mount_for_uuid g_volume_monitor_get_mount_for_uuid; alias c_g_volume_monitor_get_mounts g_volume_monitor_get_mounts; alias c_g_volume_monitor_get_volume_for_uuid g_volume_monitor_get_volume_for_uuid; alias c_g_volume_monitor_get_volumes g_volume_monitor_get_volumes; // gio.ZlibCompressor alias c_g_zlib_compressor_get_type g_zlib_compressor_get_type; alias c_g_zlib_compressor_new g_zlib_compressor_new; alias c_g_zlib_compressor_get_file_info g_zlib_compressor_get_file_info; alias c_g_zlib_compressor_set_file_info g_zlib_compressor_set_file_info; // gio.ZlibDecompressor alias c_g_zlib_decompressor_get_type g_zlib_decompressor_get_type; alias c_g_zlib_decompressor_new g_zlib_decompressor_new; alias c_g_zlib_decompressor_get_file_info g_zlib_decompressor_get_file_info; // gio.PollableUtils alias c_g_pollable_source_new g_pollable_source_new; alias c_g_pollable_source_new_full g_pollable_source_new_full; alias c_g_pollable_stream_read g_pollable_stream_read; alias c_g_pollable_stream_write g_pollable_stream_write; alias c_g_pollable_stream_write_all g_pollable_stream_write_all; // gio.DBusNames alias c_g_bus_own_name g_bus_own_name; alias c_g_bus_own_name_on_connection g_bus_own_name_on_connection; alias c_g_bus_own_name_on_connection_with_closures g_bus_own_name_on_connection_with_closures; alias c_g_bus_own_name_with_closures g_bus_own_name_with_closures; alias c_g_bus_unown_name g_bus_unown_name; alias c_g_bus_unwatch_name g_bus_unwatch_name; alias c_g_bus_watch_name g_bus_watch_name; alias c_g_bus_watch_name_on_connection g_bus_watch_name_on_connection; alias c_g_bus_watch_name_on_connection_with_closures g_bus_watch_name_on_connection_with_closures; alias c_g_bus_watch_name_with_closures g_bus_watch_name_with_closures; // gio.ContentType alias c_g_content_type_can_be_executable g_content_type_can_be_executable; alias c_g_content_type_equals g_content_type_equals; alias c_g_content_type_from_mime_type g_content_type_from_mime_type; alias c_g_content_type_get_description g_content_type_get_description; alias c_g_content_type_get_generic_icon_name g_content_type_get_generic_icon_name; alias c_g_content_type_get_icon g_content_type_get_icon; alias c_g_content_type_get_mime_type g_content_type_get_mime_type; alias c_g_content_type_get_symbolic_icon g_content_type_get_symbolic_icon; alias c_g_content_type_guess g_content_type_guess; alias c_g_content_type_guess_for_tree g_content_type_guess_for_tree; alias c_g_content_type_is_a g_content_type_is_a; alias c_g_content_type_is_unknown g_content_type_is_unknown; alias c_g_content_types_get_registered g_content_types_get_registered; alias c_g_content_type_is_mime_type g_content_type_is_mime_type; // gio.DBusError alias c_g_dbus_error_encode_gerror g_dbus_error_encode_gerror; alias c_g_dbus_error_get_remote_error g_dbus_error_get_remote_error; alias c_g_dbus_error_is_remote_error g_dbus_error_is_remote_error; alias c_g_dbus_error_new_for_dbus_error g_dbus_error_new_for_dbus_error; alias c_g_dbus_error_quark g_dbus_error_quark; alias c_g_dbus_error_register_error g_dbus_error_register_error; alias c_g_dbus_error_register_error_domain g_dbus_error_register_error_domain; alias c_g_dbus_error_strip_remote_error g_dbus_error_strip_remote_error; alias c_g_dbus_error_unregister_error g_dbus_error_unregister_error; // gio.DBusUtilities alias c_g_dbus_address_escape_value g_dbus_address_escape_value; alias c_g_dbus_address_get_for_bus_sync g_dbus_address_get_for_bus_sync; alias c_g_dbus_address_get_stream g_dbus_address_get_stream; alias c_g_dbus_address_get_stream_finish g_dbus_address_get_stream_finish; alias c_g_dbus_address_get_stream_sync g_dbus_address_get_stream_sync; alias c_g_dbus_generate_guid g_dbus_generate_guid; alias c_g_dbus_gvalue_to_gvariant g_dbus_gvalue_to_gvariant; alias c_g_dbus_gvariant_to_gvalue g_dbus_gvariant_to_gvalue; alias c_g_dbus_is_address g_dbus_is_address; alias c_g_dbus_is_guid g_dbus_is_guid; alias c_g_dbus_is_interface_name g_dbus_is_interface_name; alias c_g_dbus_is_member_name g_dbus_is_member_name; alias c_g_dbus_is_name g_dbus_is_name; alias c_g_dbus_is_supported_address g_dbus_is_supported_address; alias c_g_dbus_is_unique_name g_dbus_is_unique_name; // gio.ErrorGIO alias c_g_io_error_from_errno g_io_error_from_errno; alias c_g_io_error_quark g_io_error_quark; GtkD-3.7.5/generated/gtkd/gio/c/types.d000066400000000000000000010660501324604450400175710ustar00rootroot00000000000000/* * 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 gio.c.types; public import glib.c.types; public import gobject.c.types; /** * Flags used when creating a #GAppInfo. */ public enum GAppInfoCreateFlags { /** * No flags. */ NONE = 0, /** * Application opens in a terminal window. */ NEEDS_TERMINAL = 1, /** * Application supports URI arguments. */ SUPPORTS_URIS = 2, /** * Application supports startup notification. Since 2.26 */ SUPPORTS_STARTUP_NOTIFICATION = 4, } alias GAppInfoCreateFlags AppInfoCreateFlags; /** * Flags used to define the behaviour of a #GApplication. * * Since: 2.28 */ public enum GApplicationFlags { /** * Default */ FLAGS_NONE = 0, /** * Run as a service. In this mode, registration * fails if the service is already running, and the application * will initially wait up to 10 seconds for an initial activation * message to arrive. */ IS_SERVICE = 1, /** * Don't try to become the primary instance. */ IS_LAUNCHER = 2, /** * This application handles opening files (in * the primary instance). Note that this flag only affects the default * implementation of local_command_line(), and has no effect if * %G_APPLICATION_HANDLES_COMMAND_LINE is given. * See g_application_run() for details. */ HANDLES_OPEN = 4, /** * This application handles command line * arguments (in the primary instance). Note that this flag only affect * the default implementation of local_command_line(). * See g_application_run() for details. */ HANDLES_COMMAND_LINE = 8, /** * Send the environment of the * launching process to the primary instance. Set this flag if your * application is expected to behave differently depending on certain * environment variables. For instance, an editor might be expected * to use the `GIT_COMMITTER_NAME` environment variable * when editing a git commit message. The environment is available * to the #GApplication::command-line signal handler, via * g_application_command_line_getenv(). */ SEND_ENVIRONMENT = 16, /** * Make no attempts to do any of the typical * single-instance application negotiation, even if the application * ID is given. The application neither attempts to become the * owner of the application ID nor does it check if an existing * owner already exists. Everything occurs in the local process. * Since: 2.30. */ NON_UNIQUE = 32, /** * Allow users to override the * application ID from the command line with `--gapplication-app-id`. * Since: 2.48 */ CAN_OVERRIDE_APP_ID = 64, } alias GApplicationFlags ApplicationFlags; /** * #GAskPasswordFlags are used to request specific information from the * user, or to notify the user of their choices in an authentication * situation. */ public enum GAskPasswordFlags { /** * operation requires a password. */ NEED_PASSWORD = 1, /** * operation requires a username. */ NEED_USERNAME = 2, /** * operation requires a domain. */ NEED_DOMAIN = 4, /** * operation supports saving settings. */ SAVING_SUPPORTED = 8, /** * operation supports anonymous users. */ ANONYMOUS_SUPPORTED = 16, } alias GAskPasswordFlags AskPasswordFlags; /** * Flags used in g_bus_own_name(). * * Since: 2.26 */ public enum GBusNameOwnerFlags { /** * No flags set. */ NONE = 0, /** * Allow another message bus connection to claim the name. */ ALLOW_REPLACEMENT = 1, /** * If another message bus connection owns the name and have * specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection. */ REPLACE = 2, /** * If another message bus connection owns the name, immediately * return an error from g_bus_own_name() rather than entering the waiting queue for that name. (Since 2.54) */ DO_NOT_QUEUE = 4, } alias GBusNameOwnerFlags BusNameOwnerFlags; /** * Flags used in g_bus_watch_name(). * * Since: 2.26 */ public enum GBusNameWatcherFlags { /** * No flags set. */ NONE = 0, /** * If no-one owns the name when * beginning to watch the name, ask the bus to launch an owner for the * name. */ AUTO_START = 1, } alias GBusNameWatcherFlags BusNameWatcherFlags; /** * An enumeration for well-known message buses. * * Since: 2.26 */ public enum GBusType { /** * An alias for the message bus that activated the process, if any. */ STARTER = -1, /** * Not a message bus. */ NONE = 0, /** * The system-wide message bus. */ SYSTEM = 1, /** * The login session message bus. */ SESSION = 2, } alias GBusType BusType; /** * Flags used when calling a g_converter_convert(). * * Since: 2.24 */ public enum GConverterFlags { /** * No flags. */ NONE = 0, /** * At end of input data */ INPUT_AT_END = 1, /** * Flush data */ FLUSH = 2, } alias GConverterFlags ConverterFlags; /** * Results returned from g_converter_convert(). * * Since: 2.24 */ public enum GConverterResult { /** * There was an error during conversion. */ ERROR = 0, /** * Some data was consumed or produced */ CONVERTED = 1, /** * The conversion is finished */ FINISHED = 2, /** * Flushing is finished */ FLUSHED = 3, } alias GConverterResult ConverterResult; /** * Enumeration describing different kinds of native credential types. * * Since: 2.26 */ public enum GCredentialsType { /** * Indicates an invalid native credential type. */ INVALID = 0, /** * The native credentials type is a struct ucred. */ LINUX_UCRED = 1, /** * The native credentials type is a struct cmsgcred. */ FREEBSD_CMSGCRED = 2, /** * The native credentials type is a struct sockpeercred. Added in 2.30. */ OPENBSD_SOCKPEERCRED = 3, /** * The native credentials type is a ucred_t. Added in 2.40. */ SOLARIS_UCRED = 4, /** * The native credentials type is a struct unpcbid. */ NETBSD_UNPCBID = 5, } alias GCredentialsType CredentialsType; /** * Flags used in g_dbus_connection_call() and similar APIs. * * Since: 2.26 */ public enum GDBusCallFlags { /** * No flags set. */ NONE = 0, /** * The bus must not launch * an owner for the destination name in response to this method * invocation. */ NO_AUTO_START = 1, /** * the caller is prepared to * wait for interactive authorization. Since 2.46. */ ALLOW_INTERACTIVE_AUTHORIZATION = 2, } alias GDBusCallFlags DBusCallFlags; /** * Capabilities negotiated with the remote peer. * * Since: 2.26 */ public enum GDBusCapabilityFlags { /** * No flags set. */ NONE = 0, /** * The connection * supports exchanging UNIX file descriptors with the remote peer. */ UNIX_FD_PASSING = 1, } alias GDBusCapabilityFlags DBusCapabilityFlags; /** * Flags used when creating a new #GDBusConnection. * * Since: 2.26 */ public enum GDBusConnectionFlags { /** * No flags set. */ NONE = 0, /** * Perform authentication against server. */ AUTHENTICATION_CLIENT = 1, /** * Perform authentication against client. */ AUTHENTICATION_SERVER = 2, /** * When * authenticating as a server, allow the anonymous authentication * method. */ AUTHENTICATION_ALLOW_ANONYMOUS = 4, /** * Pass this flag if connecting to a peer that is a * message bus. This means that the Hello() method will be invoked as part of the connection setup. */ MESSAGE_BUS_CONNECTION = 8, /** * If set, processing of D-Bus messages is * delayed until g_dbus_connection_start_message_processing() is called. */ DELAY_MESSAGE_PROCESSING = 16, } alias GDBusConnectionFlags DBusConnectionFlags; /** * Error codes for the %G_DBUS_ERROR error domain. * * Since: 2.26 */ public enum GDBusError { /** * A generic error; "something went wrong" - see the error message for * more. */ FAILED = 0, /** * There was not enough memory to complete an operation. */ NO_MEMORY = 1, /** * The bus doesn't know how to launch a service to supply the bus name * you wanted. */ SERVICE_UNKNOWN = 2, /** * The bus name you referenced doesn't exist (i.e. no application owns * it). */ NAME_HAS_NO_OWNER = 3, /** * No reply to a message expecting one, usually means a timeout occurred. */ NO_REPLY = 4, /** * Something went wrong reading or writing to a socket, for example. */ IO_ERROR = 5, /** * A D-Bus bus address was malformed. */ BAD_ADDRESS = 6, /** * Requested operation isn't supported (like ENOSYS on UNIX). */ NOT_SUPPORTED = 7, /** * Some limited resource is exhausted. */ LIMITS_EXCEEDED = 8, /** * Security restrictions don't allow doing what you're trying to do. */ ACCESS_DENIED = 9, /** * Authentication didn't work. */ AUTH_FAILED = 10, /** * Unable to connect to server (probably caused by ECONNREFUSED on a * socket). */ NO_SERVER = 11, /** * Certain timeout errors, possibly ETIMEDOUT on a socket. Note that * %G_DBUS_ERROR_NO_REPLY is used for message reply timeouts. Warning: * this is confusingly-named given that %G_DBUS_ERROR_TIMED_OUT also * exists. We can't fix it for compatibility reasons so just be * careful. */ TIMEOUT = 12, /** * No network access (probably ENETUNREACH on a socket). */ NO_NETWORK = 13, /** * Can't bind a socket since its address is in use (i.e. EADDRINUSE). */ ADDRESS_IN_USE = 14, /** * The connection is disconnected and you're trying to use it. */ DISCONNECTED = 15, /** * Invalid arguments passed to a method call. */ INVALID_ARGS = 16, /** * Missing file. */ FILE_NOT_FOUND = 17, /** * Existing file and the operation you're using does not silently overwrite. */ FILE_EXISTS = 18, /** * Method name you invoked isn't known by the object you invoked it on. */ UNKNOWN_METHOD = 19, /** * Certain timeout errors, e.g. while starting a service. Warning: this is * confusingly-named given that %G_DBUS_ERROR_TIMEOUT also exists. We * can't fix it for compatibility reasons so just be careful. */ TIMED_OUT = 20, /** * Tried to remove or modify a match rule that didn't exist. */ MATCH_RULE_NOT_FOUND = 21, /** * The match rule isn't syntactically valid. */ MATCH_RULE_INVALID = 22, /** * While starting a new process, the exec() call failed. */ SPAWN_EXEC_FAILED = 23, /** * While starting a new process, the fork() call failed. */ SPAWN_FORK_FAILED = 24, /** * While starting a new process, the child exited with a status code. */ SPAWN_CHILD_EXITED = 25, /** * While starting a new process, the child exited on a signal. */ SPAWN_CHILD_SIGNALED = 26, /** * While starting a new process, something went wrong. */ SPAWN_FAILED = 27, /** * We failed to setup the environment correctly. */ SPAWN_SETUP_FAILED = 28, /** * We failed to setup the config parser correctly. */ SPAWN_CONFIG_INVALID = 29, /** * Bus name was not valid. */ SPAWN_SERVICE_INVALID = 30, /** * Service file not found in system-services directory. */ SPAWN_SERVICE_NOT_FOUND = 31, /** * Permissions are incorrect on the setuid helper. */ SPAWN_PERMISSIONS_INVALID = 32, /** * Service file invalid (Name, User or Exec missing). */ SPAWN_FILE_INVALID = 33, /** * Tried to get a UNIX process ID and it wasn't available. */ SPAWN_NO_MEMORY = 34, /** * Tried to get a UNIX process ID and it wasn't available. */ UNIX_PROCESS_ID_UNKNOWN = 35, /** * A type signature is not valid. */ INVALID_SIGNATURE = 36, /** * A file contains invalid syntax or is otherwise broken. */ INVALID_FILE_CONTENT = 37, /** * Asked for SELinux security context and it wasn't available. */ SELINUX_SECURITY_CONTEXT_UNKNOWN = 38, /** * Asked for ADT audit data and it wasn't available. */ ADT_AUDIT_DATA_UNKNOWN = 39, /** * There's already an object with the requested object path. */ OBJECT_PATH_IN_USE = 40, /** * Object you invoked a method on isn't known. Since 2.42 */ UNKNOWN_OBJECT = 41, /** * Interface you invoked a method on isn't known by the object. Since 2.42 */ UNKNOWN_INTERFACE = 42, /** * Property you tried to access isn't known by the object. Since 2.42 */ UNKNOWN_PROPERTY = 43, /** * Property you tried to set is read-only. Since 2.42 */ PROPERTY_READ_ONLY = 44, } alias GDBusError DBusError; /** * Flags describing the behavior of a #GDBusInterfaceSkeleton instance. * * Since: 2.30 */ public enum GDBusInterfaceSkeletonFlags { /** * No flags set. */ NONE = 0, /** * Each method invocation is handled in * a thread dedicated to the invocation. This means that the method implementation can use blocking IO * without blocking any other part of the process. It also means that the method implementation must * use locking to access data structures used by other threads. */ HANDLE_METHOD_INVOCATIONS_IN_THREAD = 1, } alias GDBusInterfaceSkeletonFlags DBusInterfaceSkeletonFlags; /** * Enumeration used to describe the byte order of a D-Bus message. * * Since: 2.26 */ public enum GDBusMessageByteOrder { /** * The byte order is big endian. */ BIG_ENDIAN = 66, /** * The byte order is little endian. */ LITTLE_ENDIAN = 108, } alias GDBusMessageByteOrder DBusMessageByteOrder; /** * Message flags used in #GDBusMessage. * * Since: 2.26 */ public enum GDBusMessageFlags { /** * No flags set. */ NONE = 0, /** * A reply is not expected. */ NO_REPLY_EXPECTED = 1, /** * The bus must not launch an * owner for the destination name in response to this message. */ NO_AUTO_START = 2, /** * If set on a method * call, this flag means that the caller is prepared to wait for interactive * authorization. Since 2.46. */ ALLOW_INTERACTIVE_AUTHORIZATION = 4, } alias GDBusMessageFlags DBusMessageFlags; /** * Header fields used in #GDBusMessage. * * Since: 2.26 */ public enum GDBusMessageHeaderField { /** * Not a valid header field. */ INVALID = 0, /** * The object path. */ PATH = 1, /** * The interface name. */ INTERFACE = 2, /** * The method or signal name. */ MEMBER = 3, /** * The name of the error that occurred. */ ERROR_NAME = 4, /** * The serial number the message is a reply to. */ REPLY_SERIAL = 5, /** * The name the message is intended for. */ DESTINATION = 6, /** * Unique name of the sender of the message (filled in by the bus). */ SENDER = 7, /** * The signature of the message body. */ SIGNATURE = 8, /** * The number of UNIX file descriptors that accompany the message. */ NUM_UNIX_FDS = 9, } alias GDBusMessageHeaderField DBusMessageHeaderField; /** * Message types used in #GDBusMessage. * * Since: 2.26 */ public enum GDBusMessageType { /** * Message is of invalid type. */ INVALID = 0, /** * Method call. */ METHOD_CALL = 1, /** * Method reply. */ METHOD_RETURN = 2, /** * Error reply. */ ERROR = 3, /** * Signal emission. */ SIGNAL = 4, } alias GDBusMessageType DBusMessageType; /** * Flags used when constructing a #GDBusObjectManagerClient. * * Since: 2.30 */ public enum GDBusObjectManagerClientFlags { /** * No flags set. */ NONE = 0, /** * If not set and the * manager is for a well-known name, then request the bus to launch * an owner for the name if no-one owns the name. This flag can only * be used in managers for well-known names. */ DO_NOT_AUTO_START = 1, } alias GDBusObjectManagerClientFlags DBusObjectManagerClientFlags; /** * Flags describing the access control of a D-Bus property. * * Since: 2.26 */ public enum GDBusPropertyInfoFlags { /** * No flags set. */ NONE = 0, /** * Property is readable. */ READABLE = 1, /** * Property is writable. */ WRITABLE = 2, } alias GDBusPropertyInfoFlags DBusPropertyInfoFlags; /** * Flags used when constructing an instance of a #GDBusProxy derived class. * * Since: 2.26 */ public enum GDBusProxyFlags { /** * No flags set. */ NONE = 0, /** * Don't load properties. */ DO_NOT_LOAD_PROPERTIES = 1, /** * Don't connect to signals on the remote object. */ DO_NOT_CONNECT_SIGNALS = 2, /** * If the proxy is for a well-known name, * do not ask the bus to launch an owner during proxy initialization or a method call. * This flag is only meaningful in proxies for well-known names. */ DO_NOT_AUTO_START = 4, /** * If set, the property value for any __invalidated property__ will be (asynchronously) retrieved upon receiving the [`PropertiesChanged`](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties) D-Bus signal and the property will not cause emission of the #GDBusProxy::g-properties-changed signal. When the value is received the #GDBusProxy::g-properties-changed signal is emitted for the property along with the retrieved value. Since 2.32. */ GET_INVALIDATED_PROPERTIES = 8, /** * If the proxy is for a well-known name, * do not ask the bus to launch an owner during proxy initialization, but allow it to be * autostarted by a method call. This flag is only meaningful in proxies for well-known names, * and only if %G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START is not also specified. */ DO_NOT_AUTO_START_AT_CONSTRUCTION = 16, } alias GDBusProxyFlags DBusProxyFlags; /** * Flags used when sending #GDBusMessages on a #GDBusConnection. * * Since: 2.26 */ public enum GDBusSendMessageFlags { /** * No flags set. */ NONE = 0, /** * Do not automatically * assign a serial number from the #GDBusConnection object when * sending a message. */ PRESERVE_SERIAL = 1, } alias GDBusSendMessageFlags DBusSendMessageFlags; /** * Flags used when creating a #GDBusServer. * * Since: 2.26 */ public enum GDBusServerFlags { /** * No flags set. */ NONE = 0, /** * All #GDBusServer::new-connection * signals will run in separated dedicated threads (see signal for * details). */ RUN_IN_THREAD = 1, /** * Allow the anonymous * authentication method. */ AUTHENTICATION_ALLOW_ANONYMOUS = 2, } alias GDBusServerFlags DBusServerFlags; /** * Flags used when subscribing to signals via g_dbus_connection_signal_subscribe(). * * Since: 2.26 */ public enum GDBusSignalFlags { /** * No flags set. */ NONE = 0, /** * Don't actually send the AddMatch * D-Bus call for this signal subscription. This gives you more control * over which match rules you add (but you must add them manually). */ NO_MATCH_RULE = 1, /** * Match first arguments that * contain a bus or interface name with the given namespace. */ MATCH_ARG0_NAMESPACE = 2, /** * Match first arguments that * contain an object path that is either equivalent to the given path, * or one of the paths is a subpath of the other. */ MATCH_ARG0_PATH = 4, } alias GDBusSignalFlags DBusSignalFlags; /** * Flags passed to g_dbus_connection_register_subtree(). * * Since: 2.26 */ public enum GDBusSubtreeFlags { /** * No flags set. */ NONE = 0, /** * Method calls to objects not in the enumerated range * will still be dispatched. This is useful if you want * to dynamically spawn objects in the subtree. */ DISPATCH_TO_UNENUMERATED_NODES = 1, } alias GDBusSubtreeFlags DBusSubtreeFlags; /** * #GDataStreamByteOrder is used to ensure proper endianness of streaming data sources * across various machine architectures. */ public enum GDataStreamByteOrder { /** * Selects Big Endian byte order. */ BIG_ENDIAN = 0, /** * Selects Little Endian byte order. */ LITTLE_ENDIAN = 1, /** * Selects endianness based on host machine's architecture. */ HOST_ENDIAN = 2, } alias GDataStreamByteOrder DataStreamByteOrder; /** * #GDataStreamNewlineType is used when checking for or setting the line endings for a given file. */ public enum GDataStreamNewlineType { /** * Selects "LF" line endings, common on most modern UNIX platforms. */ LF = 0, /** * Selects "CR" line endings. */ CR = 1, /** * Selects "CR, LF" line ending, common on Microsoft Windows. */ CR_LF = 2, /** * Automatically try to handle any line ending type. */ ANY = 3, } alias GDataStreamNewlineType DataStreamNewlineType; /** * Flags used when starting a drive. * * Since: 2.22 */ public enum GDriveStartFlags { /** * No flags set. */ NONE = 0, } alias GDriveStartFlags DriveStartFlags; /** * Enumeration describing how a drive can be started/stopped. * * Since: 2.22 */ public enum GDriveStartStopType { /** * Unknown or drive doesn't support * start/stop. */ UNKNOWN = 0, /** * The stop method will physically * shut down the drive and e.g. power down the port the drive is * attached to. */ SHUTDOWN = 1, /** * The start/stop methods are used * for connecting/disconnect to the drive over the network. */ NETWORK = 2, /** * The start/stop methods will * assemble/disassemble a virtual drive from several physical * drives. */ MULTIDISK = 3, /** * The start/stop methods will * unlock/lock the disk (for example using the ATA SECURITY * UNLOCK DEVICE command) */ PASSWORD = 4, } alias GDriveStartStopType DriveStartStopType; /** * GEmblemOrigin is used to add information about the origin of the emblem * to #GEmblem. * * Since: 2.18 */ public enum GEmblemOrigin { /** * Emblem of unknown origin */ UNKNOWN = 0, /** * Emblem adds device-specific information */ DEVICE = 1, /** * Emblem depicts live metadata, such as "readonly" */ LIVEMETADATA = 2, /** * Emblem comes from a user-defined tag, e.g. set by nautilus (in the future) */ TAG = 3, } alias GEmblemOrigin EmblemOrigin; /** * Flags specifying the behaviour of an attribute. */ public enum GFileAttributeInfoFlags { /** * no flags set. */ NONE = 0, /** * copy the attribute values when the file is copied. */ COPY_WITH_FILE = 1, /** * copy the attribute values when the file is moved. */ COPY_WHEN_MOVED = 2, } alias GFileAttributeInfoFlags FileAttributeInfoFlags; /** * Used by g_file_set_attributes_from_info() when setting file attributes. */ public enum GFileAttributeStatus { /** * Attribute value is unset (empty). */ UNSET = 0, /** * Attribute value is set. */ SET = 1, /** * Indicates an error in setting the value. */ ERROR_SETTING = 2, } alias GFileAttributeStatus FileAttributeStatus; /** * The data types for file attributes. */ public enum GFileAttributeType { /** * indicates an invalid or uninitalized type. */ INVALID = 0, /** * a null terminated UTF8 string. */ STRING = 1, /** * a zero terminated string of non-zero bytes. */ BYTE_STRING = 2, /** * a boolean value. */ BOOLEAN = 3, /** * an unsigned 4-byte/32-bit integer. */ UINT32 = 4, /** * a signed 4-byte/32-bit integer. */ INT32 = 5, /** * an unsigned 8-byte/64-bit integer. */ UINT64 = 6, /** * a signed 8-byte/64-bit integer. */ INT64 = 7, /** * a #GObject. */ OBJECT = 8, /** * a %NULL terminated char **. Since 2.22 */ STRINGV = 9, } alias GFileAttributeType FileAttributeType; /** * Flags used when copying or moving files. */ public enum GFileCopyFlags { /** * No flags set. */ NONE = 0, /** * Overwrite any existing files */ OVERWRITE = 1, /** * Make a backup of any existing files. */ BACKUP = 2, /** * Don't follow symlinks. */ NOFOLLOW_SYMLINKS = 4, /** * Copy all file metadata instead of just default set used for copy (see #GFileInfo). */ ALL_METADATA = 8, /** * Don't use copy and delete fallback if native move not supported. */ NO_FALLBACK_FOR_MOVE = 16, /** * Leaves target file with default perms, instead of setting the source file perms. */ TARGET_DEFAULT_PERMS = 32, } alias GFileCopyFlags FileCopyFlags; /** * Flags used when an operation may create a file. */ public enum GFileCreateFlags { /** * No flags set. */ NONE = 0, /** * Create a file that can only be * accessed by the current user. */ PRIVATE = 1, /** * Replace the destination * as if it didn't exist before. Don't try to keep any old * permissions, replace instead of following links. This * is generally useful if you're doing a "copy over" * rather than a "save new version of" replace operation. * You can think of it as "unlink destination" before * writing to it, although the implementation may not * be exactly like that. Since 2.20 */ REPLACE_DESTINATION = 2, } alias GFileCreateFlags FileCreateFlags; /** * Flags that can be used with g_file_measure_disk_usage(). * * Since: 2.38 */ public enum GFileMeasureFlags { /** * No flags set. */ NONE = 0, /** * Report any error encountered * while traversing the directory tree. Normally errors are only * reported for the toplevel file. */ REPORT_ANY_ERROR = 2, /** * Tally usage based on apparent file * sizes. Normally, the block-size is used, if available, as this is a * more accurate representation of disk space used. * Compare with `du --apparent-size`. */ APPARENT_SIZE = 4, /** * Do not cross mount point boundaries. * Compare with `du -x`. */ NO_XDEV = 8, } alias GFileMeasureFlags FileMeasureFlags; /** * Specifies what type of event a monitor event is. */ public enum GFileMonitorEvent { /** * a file changed. */ CHANGED = 0, /** * a hint that this was probably the last change in a set of changes. */ CHANGES_DONE_HINT = 1, /** * a file was deleted. */ DELETED = 2, /** * a file was created. */ CREATED = 3, /** * a file attribute was changed. */ ATTRIBUTE_CHANGED = 4, /** * the file location will soon be unmounted. */ PRE_UNMOUNT = 5, /** * the file location was unmounted. */ UNMOUNTED = 6, /** * the file was moved -- only sent if the * (deprecated) %G_FILE_MONITOR_SEND_MOVED flag is set */ MOVED = 7, /** * the file was renamed within the * current directory -- only sent if the %G_FILE_MONITOR_WATCH_MOVES * flag is set. Since: 2.46. */ RENAMED = 8, /** * the file was moved into the * monitored directory from another location -- only sent if the * %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46. */ MOVED_IN = 9, /** * the file was moved out of the * monitored directory to another location -- only sent if the * %G_FILE_MONITOR_WATCH_MOVES flag is set. Since: 2.46 */ MOVED_OUT = 10, } alias GFileMonitorEvent FileMonitorEvent; /** * Flags used to set what a #GFileMonitor will watch for. */ public enum GFileMonitorFlags { /** * No flags set. */ NONE = 0, /** * Watch for mount events. */ WATCH_MOUNTS = 1, /** * Pair DELETED and CREATED events caused * by file renames (moves) and send a single G_FILE_MONITOR_EVENT_MOVED * event instead (NB: not supported on all backends; the default * behaviour -without specifying this flag- is to send single DELETED * and CREATED events). Deprecated since 2.46: use * %G_FILE_MONITOR_WATCH_MOVES instead. */ SEND_MOVED = 2, /** * Watch for changes to the file made * via another hard link. Since 2.36. */ WATCH_HARD_LINKS = 4, /** * Watch for rename operations on a * monitored directory. This causes %G_FILE_MONITOR_EVENT_RENAMED, * %G_FILE_MONITOR_EVENT_MOVED_IN and %G_FILE_MONITOR_EVENT_MOVED_OUT * events to be emitted when possible. Since: 2.46. */ WATCH_MOVES = 8, } alias GFileMonitorFlags FileMonitorFlags; /** * Flags used when querying a #GFileInfo. */ public enum GFileQueryInfoFlags { /** * No flags set. */ NONE = 0, /** * Don't follow symlinks. */ NOFOLLOW_SYMLINKS = 1, } alias GFileQueryInfoFlags FileQueryInfoFlags; /** * Indicates the file's on-disk type. */ public enum GFileType { /** * File's type is unknown. */ UNKNOWN = 0, /** * File handle represents a regular file. */ REGULAR = 1, /** * File handle represents a directory. */ DIRECTORY = 2, /** * File handle represents a symbolic link * (Unix systems). */ SYMBOLIC_LINK = 3, /** * File is a "special" file, such as a socket, fifo, * block device, or character device. */ SPECIAL = 4, /** * File is a shortcut (Windows systems). */ SHORTCUT = 5, /** * File is a mountable location. */ MOUNTABLE = 6, } alias GFileType FileType; /** * Indicates a hint from the file system whether files should be * previewed in a file manager. Returned as the value of the key * #G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW. */ public enum GFilesystemPreviewType { /** * Only preview files if user has explicitly requested it. */ IF_ALWAYS = 0, /** * Preview files if user has requested preview of "local" files. */ IF_LOCAL = 1, /** * Never preview files. */ NEVER = 2, } alias GFilesystemPreviewType FilesystemPreviewType; /** * Error codes returned by GIO functions. * * Note that this domain may be extended in future GLib releases. In * general, new error codes either only apply to new APIs, or else * replace %G_IO_ERROR_FAILED in cases that were not explicitly * distinguished before. You should therefore avoid writing code like * |[ * if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_FAILED)) * { * // Assume that this is EPRINTERONFIRE * ... * } * ]| * but should instead treat all unrecognized error codes the same as * #G_IO_ERROR_FAILED. */ public enum GIOErrorEnum { /** * Generic error condition for when an operation fails * and no more specific #GIOErrorEnum value is defined. */ FAILED = 0, /** * File not found. */ NOT_FOUND = 1, /** * File already exists. */ EXISTS = 2, /** * File is a directory. */ IS_DIRECTORY = 3, /** * File is not a directory. */ NOT_DIRECTORY = 4, /** * File is a directory that isn't empty. */ NOT_EMPTY = 5, /** * File is not a regular file. */ NOT_REGULAR_FILE = 6, /** * File is not a symbolic link. */ NOT_SYMBOLIC_LINK = 7, /** * File cannot be mounted. */ NOT_MOUNTABLE_FILE = 8, /** * Filename is too many characters. */ FILENAME_TOO_LONG = 9, /** * Filename is invalid or contains invalid characters. */ INVALID_FILENAME = 10, /** * File contains too many symbolic links. */ TOO_MANY_LINKS = 11, /** * No space left on drive. */ NO_SPACE = 12, /** * Invalid argument. */ INVALID_ARGUMENT = 13, /** * Permission denied. */ PERMISSION_DENIED = 14, /** * Operation (or one of its parameters) not supported */ NOT_SUPPORTED = 15, /** * File isn't mounted. */ NOT_MOUNTED = 16, /** * File is already mounted. */ ALREADY_MOUNTED = 17, /** * File was closed. */ CLOSED = 18, /** * Operation was cancelled. See #GCancellable. */ CANCELLED = 19, /** * Operations are still pending. */ PENDING = 20, /** * File is read only. */ READ_ONLY = 21, /** * Backup couldn't be created. */ CANT_CREATE_BACKUP = 22, /** * File's Entity Tag was incorrect. */ WRONG_ETAG = 23, /** * Operation timed out. */ TIMED_OUT = 24, /** * Operation would be recursive. */ WOULD_RECURSE = 25, /** * File is busy. */ BUSY = 26, /** * Operation would block. */ WOULD_BLOCK = 27, /** * Host couldn't be found (remote operations). */ HOST_NOT_FOUND = 28, /** * Operation would merge files. */ WOULD_MERGE = 29, /** * Operation failed and a helper program has * already interacted with the user. Do not display any error dialog. */ FAILED_HANDLED = 30, /** * The current process has too many files * open and can't open any more. Duplicate descriptors do count toward * this limit. Since 2.20 */ TOO_MANY_OPEN_FILES = 31, /** * The object has not been initialized. Since 2.22 */ NOT_INITIALIZED = 32, /** * The requested address is already in use. Since 2.22 */ ADDRESS_IN_USE = 33, /** * Need more input to finish operation. Since 2.24 */ PARTIAL_INPUT = 34, /** * The input data was invalid. Since 2.24 */ INVALID_DATA = 35, /** * A remote object generated an error that * doesn't correspond to a locally registered #GError error * domain. Use g_dbus_error_get_remote_error() to extract the D-Bus * error name and g_dbus_error_strip_remote_error() to fix up the * message so it matches what was received on the wire. Since 2.26. */ DBUS_ERROR = 36, /** * Host unreachable. Since 2.26 */ HOST_UNREACHABLE = 37, /** * Network unreachable. Since 2.26 */ NETWORK_UNREACHABLE = 38, /** * Connection refused. Since 2.26 */ CONNECTION_REFUSED = 39, /** * Connection to proxy server failed. Since 2.26 */ PROXY_FAILED = 40, /** * Proxy authentication failed. Since 2.26 */ PROXY_AUTH_FAILED = 41, /** * Proxy server needs authentication. Since 2.26 */ PROXY_NEED_AUTH = 42, /** * Proxy connection is not allowed by ruleset. * Since 2.26 */ PROXY_NOT_ALLOWED = 43, /** * Broken pipe. Since 2.36 */ BROKEN_PIPE = 44, /** * Connection closed by peer. Note that this * is the same code as %G_IO_ERROR_BROKEN_PIPE; before 2.44 some * "connection closed" errors returned %G_IO_ERROR_BROKEN_PIPE, but others * returned %G_IO_ERROR_FAILED. Now they should all return the same * value, which has this more logical name. Since 2.44. */ CONNECTION_CLOSED = 44, /** * Transport endpoint is not connected. Since 2.44 */ NOT_CONNECTED = 45, /** * Message too large. Since 2.48. */ MESSAGE_TOO_LARGE = 46, } alias GIOErrorEnum IOErrorEnum; /** * Flags for use with g_io_module_scope_new(). * * Since: 2.30 */ public enum GIOModuleScopeFlags { /** * No module scan flags */ NONE = 0, /** * When using this scope to load or * scan modules, automatically block a modules which has the same base * basename as previously loaded module. */ BLOCK_DUPLICATES = 1, } alias GIOModuleScopeFlags IOModuleScopeFlags; /** * GIOStreamSpliceFlags determine how streams should be spliced. * * Since: 2.28 */ public enum GIOStreamSpliceFlags { /** * Do not close either stream. */ NONE = 0, /** * Close the first stream after * the splice. */ CLOSE_STREAM1 = 1, /** * Close the second stream after * the splice. */ CLOSE_STREAM2 = 2, /** * Wait for both splice operations to finish * before calling the callback. */ WAIT_FOR_BOTH = 4, } alias GIOStreamSpliceFlags IOStreamSpliceFlags; /** * Flags used when mounting a mount. */ public enum GMountMountFlags { /** * No flags set. */ NONE = 0, } alias GMountMountFlags MountMountFlags; /** * #GMountOperationResult is returned as a result when a request for * information is send by the mounting operation. */ public enum GMountOperationResult { /** * The request was fulfilled and the * user specified data is now available */ HANDLED = 0, /** * The user requested the mount operation * to be aborted */ ABORTED = 1, /** * The request was unhandled (i.e. not * implemented) */ UNHANDLED = 2, } alias GMountOperationResult MountOperationResult; /** * Flags used when an unmounting a mount. */ public enum GMountUnmountFlags { /** * No flags set. */ NONE = 0, /** * Unmount even if there are outstanding * file operations on the mount. */ FORCE = 1, } alias GMountUnmountFlags MountUnmountFlags; /** * The host's network connectivity state, as reported by #GNetworkMonitor. * * Since: 2.44 */ public enum GNetworkConnectivity { /** * The host is not configured with a * route to the Internet; it may or may not be connected to a local * network. */ LOCAL = 1, /** * The host is connected to a network, but * does not appear to be able to reach the full Internet, perhaps * due to upstream network problems. */ LIMITED = 2, /** * The host is behind a captive portal and * cannot reach the full Internet. */ PORTAL = 3, /** * The host is connected to a network, and * appears to be able to reach the full Internet. */ FULL = 4, } alias GNetworkConnectivity NetworkConnectivity; /** * Priority levels for #GNotifications. * * Since: 2.42 */ public enum GNotificationPriority { /** * the default priority, to be used for the * majority of notifications (for example email messages, software updates, * completed download/sync operations) */ NORMAL = 0, /** * for notifications that do not require * immediate attention - typically used for contextual background * information, such as contact birthdays or local weather */ LOW = 1, /** * for events that require more attention, * usually because responses are time-sensitive (for example chat and SMS * messages or alarms) */ HIGH = 2, /** * for urgent notifications, or notifications * that require a response in a short space of time (for example phone calls * or emergency warnings) */ URGENT = 3, } alias GNotificationPriority NotificationPriority; /** * GOutputStreamSpliceFlags determine how streams should be spliced. */ public enum GOutputStreamSpliceFlags { /** * Do not close either stream. */ NONE = 0, /** * Close the source stream after * the splice. */ CLOSE_SOURCE = 1, /** * Close the target stream after * the splice. */ CLOSE_TARGET = 2, } alias GOutputStreamSpliceFlags OutputStreamSpliceFlags; /** * #GPasswordSave is used to indicate the lifespan of a saved password. * * #Gvfs stores passwords in the Gnome keyring when this flag allows it * to, and later retrieves it again from there. */ public enum GPasswordSave { /** * never save a password. */ NEVER = 0, /** * save a password for the session. */ FOR_SESSION = 1, /** * save a password permanently. */ PERMANENTLY = 2, } alias GPasswordSave PasswordSave; /** * An error code used with %G_RESOLVER_ERROR in a #GError returned * from a #GResolver routine. * * Since: 2.22 */ public enum GResolverError { /** * the requested name/address/service was not * found */ NOT_FOUND = 0, /** * the requested information could not * be looked up due to a network error or similar problem */ TEMPORARY_FAILURE = 1, /** * unknown error */ INTERNAL = 2, } alias GResolverError ResolverError; /** * The type of record that g_resolver_lookup_records() or * g_resolver_lookup_records_async() should retrieve. The records are returned * as lists of #GVariant tuples. Each record type has different values in * the variant tuples returned. * * %G_RESOLVER_RECORD_SRV records are returned as variants with the signature * '(qqqs)', containing a guint16 with the priority, a guint16 with the * weight, a guint16 with the port, and a string of the hostname. * * %G_RESOLVER_RECORD_MX records are returned as variants with the signature * '(qs)', representing a guint16 with the preference, and a string containing * the mail exchanger hostname. * * %G_RESOLVER_RECORD_TXT records are returned as variants with the signature * '(as)', representing an array of the strings in the text record. * * %G_RESOLVER_RECORD_SOA records are returned as variants with the signature * '(ssuuuuu)', representing a string containing the primary name server, a * string containing the administrator, the serial as a guint32, the refresh * interval as guint32, the retry interval as a guint32, the expire timeout * as a guint32, and the ttl as a guint32. * * %G_RESOLVER_RECORD_NS records are returned as variants with the signature * '(s)', representing a string of the hostname of the name server. * * Since: 2.34 */ public enum GResolverRecordType { /** * lookup DNS SRV records for a domain */ SRV = 1, /** * lookup DNS MX records for a domain */ MX = 2, /** * lookup DNS TXT records for a name */ TXT = 3, /** * lookup DNS SOA records for a zone */ SOA = 4, /** * lookup DNS NS records for a domain */ NS = 5, } alias GResolverRecordType ResolverRecordType; /** * An error code used with %G_RESOURCE_ERROR in a #GError returned * from a #GResource routine. * * Since: 2.32 */ public enum GResourceError { /** * no file was found at the requested path */ NOT_FOUND = 0, /** * unknown error */ INTERNAL = 1, } alias GResourceError ResourceError; /** * GResourceFlags give information about a particular file inside a resource * bundle. * * Since: 2.32 */ public enum GResourceFlags { /** * No flags set. */ NONE = 0, /** * The file is compressed. */ COMPRESSED = 1, } alias GResourceFlags ResourceFlags; /** * GResourceLookupFlags determine how resource path lookups are handled. * * Since: 2.32 */ public enum GResourceLookupFlags { /** * No flags set. */ NONE = 0, } alias GResourceLookupFlags ResourceLookupFlags; /** * Flags used when creating a binding. These flags determine in which * direction the binding works. The default is to synchronize in both * directions. */ public enum GSettingsBindFlags { /** * Equivalent to `G_SETTINGS_BIND_GET|G_SETTINGS_BIND_SET` */ DEFAULT = 0, /** * Update the #GObject property when the setting changes. * It is an error to use this flag if the property is not writable. */ GET = 1, /** * Update the setting when the #GObject property changes. * It is an error to use this flag if the property is not readable. */ SET = 2, /** * Do not try to bind a "sensitivity" property to the writability of the setting */ NO_SENSITIVITY = 4, /** * When set in addition to #G_SETTINGS_BIND_GET, set the #GObject property * value initially from the setting, but do not listen for changes of the setting */ GET_NO_CHANGES = 8, /** * When passed to g_settings_bind(), uses a pair of mapping functions that invert * the boolean value when mapping between the setting and the property. The setting and property must both * be booleans. You cannot pass this flag to g_settings_bind_with_mapping(). */ INVERT_BOOLEAN = 16, } alias GSettingsBindFlags SettingsBindFlags; /** * Describes an event occurring on a #GSocketClient. See the * #GSocketClient::event signal for more details. * * Additional values may be added to this type in the future. * * Since: 2.32 */ public enum GSocketClientEvent { /** * The client is doing a DNS lookup. */ RESOLVING = 0, /** * The client has completed a DNS lookup. */ RESOLVED = 1, /** * The client is connecting to a remote * host (either a proxy or the destination server). */ CONNECTING = 2, /** * The client has connected to a remote * host. */ CONNECTED = 3, /** * The client is negotiating * with a proxy to connect to the destination server. */ PROXY_NEGOTIATING = 4, /** * The client has negotiated * with the proxy server. */ PROXY_NEGOTIATED = 5, /** * The client is performing a * TLS handshake. */ TLS_HANDSHAKING = 6, /** * The client has performed a * TLS handshake. */ TLS_HANDSHAKED = 7, /** * The client is done with a particular * #GSocketConnectable. */ COMPLETE = 8, } alias GSocketClientEvent SocketClientEvent; /** * The protocol family of a #GSocketAddress. (These values are * identical to the system defines %AF_INET, %AF_INET6 and %AF_UNIX, * if available.) * * Since: 2.22 */ public enum GSocketFamily { /** * no address family */ INVALID = 0, /** * the UNIX domain family */ UNIX = 1, /** * the IPv4 family */ IPV4 = 2, /** * the IPv6 family */ IPV6 = 10, } alias GSocketFamily SocketFamily; /** * Describes an event occurring on a #GSocketListener. See the * #GSocketListener::event signal for more details. * * Additional values may be added to this type in the future. * * Since: 2.46 */ public enum GSocketListenerEvent { /** * The listener is about to bind a socket. */ BINDING = 0, /** * The listener has bound a socket. */ BOUND = 1, /** * The listener is about to start * listening on this socket. */ LISTENING = 2, /** * The listener is now listening on * this socket. */ LISTENED = 3, } alias GSocketListenerEvent SocketListenerEvent; /** * Flags used in g_socket_receive_message() and g_socket_send_message(). * The flags listed in the enum are some commonly available flags, but the * values used for them are the same as on the platform, and any other flags * are passed in/out as is. So to use a platform specific flag, just include * the right system header and pass in the flag. * * Since: 2.22 */ public enum GSocketMsgFlags { /** * No flags. */ NONE = 0, /** * Request to send/receive out of band data. */ OOB = 1, /** * Read data from the socket without removing it from * the queue. */ PEEK = 2, /** * Don't use a gateway to send out the packet, * only send to hosts on directly connected networks. */ DONTROUTE = 4, } alias GSocketMsgFlags SocketMsgFlags; /** * A protocol identifier is specified when creating a #GSocket, which is a * family/type specific identifier, where 0 means the default protocol for * the particular family/type. * * This enum contains a set of commonly available and used protocols. You * can also pass any other identifiers handled by the platform in order to * use protocols not listed here. * * Since: 2.22 */ public enum GSocketProtocol { /** * The protocol type is unknown */ UNKNOWN = -1, /** * The default protocol for the family/type */ DEFAULT = 0, /** * TCP over IP */ TCP = 6, /** * UDP over IP */ UDP = 17, /** * SCTP over IP */ SCTP = 132, } alias GSocketProtocol SocketProtocol; /** * Flags used when creating a #GSocket. Some protocols may not implement * all the socket types. * * Since: 2.22 */ public enum GSocketType { /** * Type unknown or wrong */ INVALID = 0, /** * Reliable connection-based byte streams (e.g. TCP). */ STREAM = 1, /** * Connectionless, unreliable datagram passing. * (e.g. UDP) */ DATAGRAM = 2, /** * Reliable connection-based passing of datagrams * of fixed maximum length (e.g. SCTP). */ SEQPACKET = 3, } alias GSocketType SocketType; /** * Flags to define the behaviour of a #GSubprocess. * * Note that the default for stdin is to redirect from /dev/null. For * stdout and stderr the default are for them to inherit the * corresponding descriptor from the calling process. * * Note that it is a programmer error to mix 'incompatible' flags. For * example, you may not request both %G_SUBPROCESS_FLAGS_STDOUT_PIPE and * %G_SUBPROCESS_FLAGS_STDOUT_SILENCE. * * Since: 2.40 */ public enum GSubprocessFlags { /** * No flags. */ NONE = 0, /** * create a pipe for the stdin of the * spawned process that can be accessed with * g_subprocess_get_stdin_pipe(). */ STDIN_PIPE = 1, /** * stdin is inherited from the * calling process. */ STDIN_INHERIT = 2, /** * create a pipe for the stdout of the * spawned process that can be accessed with * g_subprocess_get_stdout_pipe(). */ STDOUT_PIPE = 4, /** * silence the stdout of the spawned * process (ie: redirect to /dev/null). */ STDOUT_SILENCE = 8, /** * create a pipe for the stderr of the * spawned process that can be accessed with * g_subprocess_get_stderr_pipe(). */ STDERR_PIPE = 16, /** * silence the stderr of the spawned * process (ie: redirect to /dev/null). */ STDERR_SILENCE = 32, /** * merge the stderr of the spawned * process with whatever the stdout happens to be. This is a good way * of directing both streams to a common log file, for example. */ STDERR_MERGE = 64, /** * spawned processes will inherit the * file descriptors of their parent, unless those descriptors have * been explicitly marked as close-on-exec. This flag has no effect * over the "standard" file descriptors (stdin, stdout, stderr). */ INHERIT_FDS = 128, } alias GSubprocessFlags SubprocessFlags; /** * Flags to define future #GTestDBus behaviour. * * Since: 2.34 */ public enum GTestDBusFlags { /** * No flags. */ NONE = 0, } alias GTestDBusFlags TestDBusFlags; /** * The client authentication mode for a #GTlsServerConnection. * * Since: 2.28 */ public enum GTlsAuthenticationMode { /** * client authentication not required */ NONE = 0, /** * client authentication is requested */ REQUESTED = 1, /** * client authentication is required */ REQUIRED = 2, } alias GTlsAuthenticationMode TlsAuthenticationMode; /** * A set of flags describing TLS certification validation. This can be * used to set which validation steps to perform (eg, with * g_tls_client_connection_set_validation_flags()), or to describe why * a particular certificate was rejected (eg, in * #GTlsConnection::accept-certificate). * * Since: 2.28 */ public enum GTlsCertificateFlags { /** * The signing certificate authority is * not known. */ UNKNOWN_CA = 1, /** * The certificate does not match the * expected identity of the site that it was retrieved from. */ BAD_IDENTITY = 2, /** * The certificate's activation time * is still in the future */ NOT_ACTIVATED = 4, /** * The certificate has expired */ EXPIRED = 8, /** * The certificate has been revoked * according to the #GTlsConnection's certificate revocation list. */ REVOKED = 16, /** * The certificate's algorithm is * considered insecure. */ INSECURE = 32, /** * Some other error occurred validating * the certificate */ GENERIC_ERROR = 64, /** * the combination of all of the above * flags */ VALIDATE_ALL = 127, } alias GTlsCertificateFlags TlsCertificateFlags; /** * Flags for g_tls_interaction_request_certificate(), * g_tls_interaction_request_certificate_async(), and * g_tls_interaction_invoke_request_certificate(). * * Since: 2.40 */ public enum GTlsCertificateRequestFlags { /** * No flags */ NONE = 0, } alias GTlsCertificateRequestFlags TlsCertificateRequestFlags; /** * Flags for g_tls_database_lookup_certificate_handle(), * g_tls_database_lookup_certificate_issuer(), * and g_tls_database_lookup_certificates_issued_by(). * * Since: 2.30 */ public enum GTlsDatabaseLookupFlags { /** * No lookup flags */ NONE = 0, /** * Restrict lookup to certificates that have * a private key. */ KEYPAIR = 1, } alias GTlsDatabaseLookupFlags TlsDatabaseLookupFlags; /** * Flags for g_tls_database_verify_chain(). * * Since: 2.30 */ public enum GTlsDatabaseVerifyFlags { /** * No verification flags */ NONE = 0, } alias GTlsDatabaseVerifyFlags TlsDatabaseVerifyFlags; /** * An error code used with %G_TLS_ERROR in a #GError returned from a * TLS-related routine. * * Since: 2.28 */ public enum GTlsError { /** * No TLS provider is available */ UNAVAILABLE = 0, /** * Miscellaneous TLS error */ MISC = 1, /** * A certificate could not be parsed */ BAD_CERTIFICATE = 2, /** * The TLS handshake failed because the * peer does not seem to be a TLS server. */ NOT_TLS = 3, /** * The TLS handshake failed because the * peer's certificate was not acceptable. */ HANDSHAKE = 4, /** * The TLS handshake failed because * the server requested a client-side certificate, but none was * provided. See g_tls_connection_set_certificate(). */ CERTIFICATE_REQUIRED = 5, /** * The TLS connection was closed without proper * notice, which may indicate an attack. See * g_tls_connection_set_require_close_notify(). */ EOF = 6, } alias GTlsError TlsError; /** * #GTlsInteractionResult is returned by various functions in #GTlsInteraction * when finishing an interaction request. * * Since: 2.30 */ public enum GTlsInteractionResult { /** * The interaction was unhandled (i.e. not * implemented). */ UNHANDLED = 0, /** * The interaction completed, and resulting data * is available. */ HANDLED = 1, /** * The interaction has failed, or was cancelled. * and the operation should be aborted. */ FAILED = 2, } alias GTlsInteractionResult TlsInteractionResult; /** * Various flags for the password. * * Since: 2.30 */ public enum GTlsPasswordFlags { /** * No flags */ NONE = 0, /** * The password was wrong, and the user should retry. */ RETRY = 2, /** * Hint to the user that the password has been * wrong many times, and the user may not have many chances left. */ MANY_TRIES = 4, /** * Hint to the user that this is the last try to get * this password right. */ FINAL_TRY = 8, } alias GTlsPasswordFlags TlsPasswordFlags; /** * When to allow rehandshaking. See * g_tls_connection_set_rehandshake_mode(). * * Since: 2.28 */ public enum GTlsRehandshakeMode { /** * Never allow rehandshaking */ NEVER = 0, /** * Allow safe rehandshaking only */ SAFELY = 1, /** * Allow unsafe rehandshaking */ UNSAFELY = 2, } alias GTlsRehandshakeMode TlsRehandshakeMode; /** * The type of name used by a #GUnixSocketAddress. * %G_UNIX_SOCKET_ADDRESS_PATH indicates a traditional unix domain * socket bound to a filesystem path. %G_UNIX_SOCKET_ADDRESS_ANONYMOUS * indicates a socket not bound to any name (eg, a client-side socket, * or a socket created with socketpair()). * * For abstract sockets, there are two incompatible ways of naming * them; the man pages suggest using the entire `struct sockaddr_un` * as the name, padding the unused parts of the %sun_path field with * zeroes; this corresponds to %G_UNIX_SOCKET_ADDRESS_ABSTRACT_PADDED. * However, many programs instead just use a portion of %sun_path, and * pass an appropriate smaller length to bind() or connect(). This is * %G_UNIX_SOCKET_ADDRESS_ABSTRACT. * * Since: 2.26 */ public enum GUnixSocketAddressType { /** * invalid */ INVALID = 0, /** * anonymous */ ANONYMOUS = 1, /** * a filesystem path */ PATH = 2, /** * an abstract name */ ABSTRACT = 3, /** * an abstract name, 0-padded * to the full length of a unix socket name */ ABSTRACT_PADDED = 4, } alias GUnixSocketAddressType UnixSocketAddressType; /** * Used to select the type of data format to use for #GZlibDecompressor * and #GZlibCompressor. * * Since: 2.24 */ public enum GZlibCompressorFormat { /** * deflate compression with zlib header */ ZLIB = 0, /** * gzip file format */ GZIP = 1, /** * deflate compression with no header */ RAW = 2, } alias GZlibCompressorFormat ZlibCompressorFormat; struct GAction; /** * This struct defines a single action. It is for use with * g_action_map_add_action_entries(). * * The order of the items in the structure are intended to reflect * frequency of use. It is permissible to use an incomplete initialiser * in order to leave some of the later values as %NULL. All values * after @name are optional. Additional optional fields may be added in * the future. * * See g_action_map_add_action_entries() for an example. */ struct GActionEntry { /** * the name of the action */ const(char)* name; /** */ extern(C) void function(GSimpleAction* action, GVariant* parameter, void* userData) activate; /** * the type of the parameter that must be passed to the * activate function for this action, given as a single * GVariant type string (or %NULL for no parameter) */ const(char)* parameterType; /** * the initial state for this action, given in * [GVariant text format][gvariant-text]. The state is parsed * with no extra type information, so type tags must be added to * the string if they are necessary. Stateless actions should * give %NULL here. */ const(char)* state; /** */ extern(C) void function(GSimpleAction* action, GVariant* value, void* userData) changeState; size_t[3] padding; } struct GActionGroup; /** * The virtual function table for #GActionGroup. * * Since: 2.28 */ struct GActionGroupInterface { GTypeInterface gIface; /** * * Params: * actionGroup = a #GActionGroup * actionName = the name of the action to check for * Returns: whether the named action exists */ extern(C) int function(GActionGroup* actionGroup, const(char)* actionName) hasAction; /** * * Params: * actionGroup = a #GActionGroup * Returns: a %NULL-terminated array of the names of the * actions in the group */ extern(C) char** function(GActionGroup* actionGroup) listActions; /** * * Params: * actionGroup = a #GActionGroup * actionName = the name of the action to query * Returns: whether or not the action is currently enabled */ extern(C) int function(GActionGroup* actionGroup, const(char)* actionName) getActionEnabled; /** * * Params: * actionGroup = a #GActionGroup * actionName = the name of the action to query * Returns: the parameter type */ extern(C) GVariantType* function(GActionGroup* actionGroup, const(char)* actionName) getActionParameterType; /** * * Params: * actionGroup = a #GActionGroup * actionName = the name of the action to query * Returns: the state type, if the action is stateful */ extern(C) GVariantType* function(GActionGroup* actionGroup, const(char)* actionName) getActionStateType; /** * * Params: * actionGroup = a #GActionGroup * actionName = the name of the action to query * Returns: the state range hint */ extern(C) GVariant* function(GActionGroup* actionGroup, const(char)* actionName) getActionStateHint; /** * * Params: * actionGroup = a #GActionGroup * actionName = the name of the action to query * Returns: the current state of the action */ extern(C) GVariant* function(GActionGroup* actionGroup, const(char)* actionName) getActionState; /** */ extern(C) void function(GActionGroup* actionGroup, const(char)* actionName, GVariant* value) changeActionState; /** */ extern(C) void function(GActionGroup* actionGroup, const(char)* actionName, GVariant* parameter) activateAction; /** */ extern(C) void function(GActionGroup* actionGroup, const(char)* actionName) actionAdded; /** */ extern(C) void function(GActionGroup* actionGroup, const(char)* actionName) actionRemoved; /** */ extern(C) void function(GActionGroup* actionGroup, const(char)* actionName, int enabled) actionEnabledChanged; /** */ extern(C) void function(GActionGroup* actionGroup, const(char)* actionName, GVariant* state) actionStateChanged; /** * * Params: * actionGroup = a #GActionGroup * actionName = the name of an action in the group * enabled = if the action is presently enabled * parameterType = the parameter type, or %NULL if none needed * stateType = the state type, or %NULL if stateless * stateHint = the state hint, or %NULL if none * state = the current state, or %NULL if stateless * Returns: %TRUE if the action exists, else %FALSE */ extern(C) int function(GActionGroup* actionGroup, const(char)* actionName, int* enabled, GVariantType** parameterType, GVariantType** stateType, GVariant** stateHint, GVariant** state) queryAction; } /** * The virtual function table for #GAction. * * Since: 2.28 */ struct GActionInterface { GTypeInterface gIface; /** * * Params: * action = a #GAction * Returns: the name of the action */ extern(C) const(char)* function(GAction* action) getName; /** * * Params: * action = a #GAction * Returns: the parameter type */ extern(C) GVariantType* function(GAction* action) getParameterType; /** * * Params: * action = a #GAction * Returns: the state type, if the action is stateful */ extern(C) GVariantType* function(GAction* action) getStateType; /** * * Params: * action = a #GAction * Returns: the state range hint */ extern(C) GVariant* function(GAction* action) getStateHint; /** * * Params: * action = a #GAction * Returns: whether the action is enabled */ extern(C) int function(GAction* action) getEnabled; /** * * Params: * action = a #GAction * Returns: the current state of the action */ extern(C) GVariant* function(GAction* action) getState; /** */ extern(C) void function(GAction* action, GVariant* value) changeState; /** */ extern(C) void function(GAction* action, GVariant* parameter) activate; } struct GActionMap; /** * The virtual function table for #GActionMap. * * Since: 2.32 */ struct GActionMapInterface { GTypeInterface gIface; /** * * Params: * actionMap = a #GActionMap * actionName = the name of an action * Returns: a #GAction, or %NULL */ extern(C) GAction* function(GActionMap* actionMap, const(char)* actionName) lookupAction; /** */ extern(C) void function(GActionMap* actionMap, GAction* action) addAction; /** */ extern(C) void function(GActionMap* actionMap, const(char)* actionName) removeAction; } struct GAppInfo; /** * Application Information interface, for operating system portability. */ struct GAppInfoIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * appinfo = a #GAppInfo. * Returns: a duplicate of @appinfo. */ extern(C) GAppInfo* function(GAppInfo* appinfo) dup; /** * * Params: * appinfo1 = the first #GAppInfo. * appinfo2 = the second #GAppInfo. * Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise. */ extern(C) int function(GAppInfo* appinfo1, GAppInfo* appinfo2) equal; /** * * Params: * appinfo = a #GAppInfo. * Returns: a string containing the application's ID. */ extern(C) const(char)* function(GAppInfo* appinfo) getId; /** * * Params: * appinfo = a #GAppInfo. * Returns: the name of the application for @appinfo. */ extern(C) const(char)* function(GAppInfo* appinfo) getName; /** * * Params: * appinfo = a #GAppInfo. * Returns: a string containing a description of the * application @appinfo, or %NULL if none. */ extern(C) const(char)* function(GAppInfo* appinfo) getDescription; /** */ extern(C) const(char)* function(GAppInfo* appinfo) getExecutable; /** * * Params: * appinfo = a #GAppInfo. * Returns: the default #GIcon for @appinfo or %NULL * if there is no default icon. */ extern(C) GIcon* function(GAppInfo* appinfo) getIcon; /** * * Params: * appinfo = a #GAppInfo * files = a #GList of #GFile objects * launchContext = a #GAppLaunchContext or %NULL * Returns: %TRUE on successful launch, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GAppInfo* appinfo, GList* files, GAppLaunchContext* launchContext, GError** err) launch; /** * * Params: * appinfo = a #GAppInfo. * Returns: %TRUE if the @appinfo supports URIs. */ extern(C) int function(GAppInfo* appinfo) supportsUris; /** * * Params: * appinfo = a #GAppInfo. * Returns: %TRUE if the @appinfo supports files. */ extern(C) int function(GAppInfo* appinfo) supportsFiles; /** * * Params: * appinfo = a #GAppInfo * uris = a #GList containing URIs to launch. * launchContext = a #GAppLaunchContext or %NULL * Returns: %TRUE on successful launch, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GAppInfo* appinfo, GList* uris, GAppLaunchContext* launchContext, GError** err) launchUris; /** * * Params: * appinfo = a #GAppInfo. * Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise. */ extern(C) int function(GAppInfo* appinfo) shouldShow; /** * * Params: * appinfo = a #GAppInfo. * contentType = the content type. * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ extern(C) int function(GAppInfo* appinfo, const(char)* contentType, GError** err) setAsDefaultForType; /** * * Params: * appinfo = a #GAppInfo. * extension = a string containing the file extension * (without the dot). * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ extern(C) int function(GAppInfo* appinfo, char* extension, GError** err) setAsDefaultForExtension; /** * * Params: * appinfo = a #GAppInfo. * contentType = a string. * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ extern(C) int function(GAppInfo* appinfo, const(char)* contentType, GError** err) addSupportsType; /** * * Params: * appinfo = a #GAppInfo. * Returns: %TRUE if it is possible to remove supported * content types from a given @appinfo, %FALSE if not. */ extern(C) int function(GAppInfo* appinfo) canRemoveSupportsType; /** * * Params: * appinfo = a #GAppInfo. * contentType = a string. * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ extern(C) int function(GAppInfo* appinfo, const(char)* contentType, GError** err) removeSupportsType; /** * * Params: * appinfo = a #GAppInfo * Returns: %TRUE if @appinfo can be deleted */ extern(C) int function(GAppInfo* appinfo) canDelete; /** * * Params: * appinfo = a #GAppInfo * Returns: %TRUE if @appinfo has been deleted */ extern(C) int function(GAppInfo* appinfo) doDelete; /** */ extern(C) const(char)* function(GAppInfo* appinfo) getCommandline; /** * * Params: * appinfo = a #GAppInfo. * Returns: the display name of the application for @appinfo, or the name if * no display name is available. */ extern(C) const(char)* function(GAppInfo* appinfo) getDisplayName; /** * * Params: * appinfo = a #GAppInfo. * contentType = the content type. * Returns: %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ extern(C) int function(GAppInfo* appinfo, const(char)* contentType, GError** err) setAsLastUsedForType; /** * * Params: * appinfo = a #GAppInfo that can handle files * Returns: a list of content types. */ extern(C) char** function(GAppInfo* appinfo) getSupportedTypes; } struct GAppInfoMonitor; struct GAppLaunchContext { GObject parentInstance; GAppLaunchContextPrivate* priv; } struct GAppLaunchContextClass { GObjectClass parentClass; /** * * Params: * context = a #GAppLaunchContext * info = a #GAppInfo * files = a #GList of #GFile objects * Returns: a display string for the display. */ extern(C) char* function(GAppLaunchContext* context, GAppInfo* info, GList* files) getDisplay; /** * * Params: * context = a #GAppLaunchContext * info = a #GAppInfo * files = a #GList of of #GFile objects * Returns: a startup notification ID for the application, or %NULL if * not supported. */ extern(C) char* function(GAppLaunchContext* context, GAppInfo* info, GList* files) getStartupNotifyId; /** */ extern(C) void function(GAppLaunchContext* context, const(char)* startupNotifyId) launchFailed; /** */ extern(C) void function(GAppLaunchContext* context, GAppInfo* info, GVariant* platformData) launched; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; } struct GAppLaunchContextPrivate; struct GApplication { GObject parentInstance; GApplicationPrivate* priv; } /** * Virtual function table for #GApplication. * * Since: 2.28 */ struct GApplicationClass { GObjectClass parentClass; /** */ extern(C) void function(GApplication* application) startup; /** */ extern(C) void function(GApplication* application) activate; /** */ extern(C) void function(GApplication* application, GFile** files, int nFiles, const(char)* hint) open; /** */ extern(C) int function(GApplication* application, GApplicationCommandLine* commandLine) commandLine; /** * * Params: * application = a #GApplication * arguments = array of command line arguments * exitStatus = exit status to fill after processing the command line. * Returns: %TRUE if the commandline has been completely handled */ extern(C) int function(GApplication* application, char*** arguments, int* exitStatus) localCommandLine; /** */ extern(C) void function(GApplication* application, GVariant* platformData) beforeEmit; /** */ extern(C) void function(GApplication* application, GVariant* platformData) afterEmit; /** */ extern(C) void function(GApplication* application, GVariantBuilder* builder) addPlatformData; /** */ extern(C) void function(GApplication* application) quitMainloop; /** */ extern(C) void function(GApplication* application) runMainloop; /** */ extern(C) void function(GApplication* application) shutdown; /** */ extern(C) int function(GApplication* application, GDBusConnection* connection, const(char)* objectPath, GError** err) dbusRegister; /** */ extern(C) void function(GApplication* application, GDBusConnection* connection, const(char)* objectPath) dbusUnregister; /** */ extern(C) int function(GApplication* application, GVariantDict* options) handleLocalOptions; void*[8] padding; } struct GApplicationCommandLine { GObject parentInstance; GApplicationCommandLinePrivate* priv; } /** * The #GApplicationCommandLineClass-struct * contains private data only. * * Since: 2.28 */ struct GApplicationCommandLineClass { GObjectClass parentClass; /** */ extern(C) void function(GApplicationCommandLine* cmdline, const(char)* message) printLiteral; /** */ extern(C) void function(GApplicationCommandLine* cmdline, const(char)* message) printerrLiteral; /** * * Params: * cmdline = a #GApplicationCommandLine * Returns: a #GInputStream for stdin */ extern(C) GInputStream* function(GApplicationCommandLine* cmdline) getStdin; void*[11] padding; } struct GApplicationCommandLinePrivate; struct GApplicationPrivate; struct GAsyncInitable; /** * Provides an interface for asynchronous initializing object such that * initialization may fail. * * Since: 2.22 */ struct GAsyncInitableIface { /** * The parent interface. */ GTypeInterface gIface; /** */ extern(C) void function(GAsyncInitable* initable, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) initAsync; /** * * Params: * initable = a #GAsyncInitable. * res = a #GAsyncResult. * Returns: %TRUE if successful. If an error has occurred, this function * will return %FALSE and set @error appropriately if present. * * Throws: GException on failure. */ extern(C) int function(GAsyncInitable* initable, GAsyncResult* res, GError** err) initFinish; } struct GAsyncResult; /** * Interface definition for #GAsyncResult. */ struct GAsyncResultIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * res = a #GAsyncResult. * Returns: the user data for @res. */ extern(C) void* function(GAsyncResult* res) getUserData; /** * * Params: * res = a #GAsyncResult * Returns: a new reference to the source object for the @res, * or %NULL if there is none. */ extern(C) GObject* function(GAsyncResult* res) getSourceObject; /** * * Params: * res = a #GAsyncResult * sourceTag = an application-defined tag * Returns: %TRUE if @res has the indicated @source_tag, %FALSE if * not. */ extern(C) int function(GAsyncResult* res, void* sourceTag) isTagged; } struct GBufferedInputStream { GFilterInputStream parentInstance; GBufferedInputStreamPrivate* priv; } struct GBufferedInputStreamClass { GFilterInputStreamClass parentClass; /** * * Params: * stream = a #GBufferedInputStream * count = the number of bytes that will be read from the stream * cancellable = optional #GCancellable object, %NULL to ignore * Returns: the number of bytes read into @stream's buffer, up to @count, * or -1 on error. * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GBufferedInputStream* stream, ptrdiff_t count, GCancellable* cancellable, GError** err) fill; /** */ extern(C) void function(GBufferedInputStream* stream, ptrdiff_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) fillAsync; /** * * Params: * stream = a #GBufferedInputStream * result = a #GAsyncResult * Returns: a #gssize of the read stream, or %-1 on an error. * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GBufferedInputStream* stream, GAsyncResult* result, GError** err) fillFinish; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GBufferedInputStreamPrivate; struct GBufferedOutputStream { GFilterOutputStream parentInstance; GBufferedOutputStreamPrivate* priv; } struct GBufferedOutputStreamClass { GFilterOutputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; } struct GBufferedOutputStreamPrivate; struct GBytesIcon; struct GCancellable { GObject parentInstance; GCancellablePrivate* priv; } struct GCancellableClass { GObjectClass parentClass; /** */ extern(C) void function(GCancellable* cancellable) cancelled; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GCancellablePrivate; struct GCharsetConverter; struct GCharsetConverterClass { GObjectClass parentClass; } struct GConverter; /** * Provides an interface for converting data from one type * to another type. The conversion can be stateful * and may fail at any place. * * Since: 2.24 */ struct GConverterIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * converter = a #GConverter. * inbuf = the buffer * containing the data to convert. * inbufSize = the number of bytes in @inbuf * outbuf = a buffer to write * converted data in. * outbufSize = the number of bytes in @outbuf, must be at least one * flags = a #GConverterFlags controlling the conversion details * bytesRead = will be set to the number of bytes read from @inbuf on success * bytesWritten = will be set to the number of bytes written to @outbuf on success * Returns: a #GConverterResult, %G_CONVERTER_ERROR on error. * * Throws: GException on failure. */ extern(C) GConverterResult function(GConverter* converter, void* inbuf, size_t inbufSize, void* outbuf, size_t outbufSize, GConverterFlags flags, size_t* bytesRead, size_t* bytesWritten, GError** err) convert; /** */ extern(C) void function(GConverter* converter) reset; } struct GConverterInputStream { GFilterInputStream parentInstance; GConverterInputStreamPrivate* priv; } struct GConverterInputStreamClass { GFilterInputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GConverterInputStreamPrivate; struct GConverterOutputStream { GFilterOutputStream parentInstance; GConverterOutputStreamPrivate* priv; } struct GConverterOutputStreamClass { GFilterOutputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GConverterOutputStreamPrivate; struct GCredentials; /** * Class structure for #GCredentials. * * Since: 2.26 */ struct GCredentialsClass; struct GDBusActionGroup; struct GDBusAnnotationInfo { /** * The reference count or -1 if statically allocated. */ int refCount; /** * The name of the annotation, e.g. "org.freedesktop.DBus.Deprecated". */ char* key; /** * The value of the annotation. */ char* value; /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ GDBusAnnotationInfo** annotations; } struct GDBusArgInfo { /** * The reference count or -1 if statically allocated. */ int refCount; /** * Name of the argument, e.g. @unix_user_id. */ char* name; /** * D-Bus signature of the argument (a single complete type). */ char* signature; /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ GDBusAnnotationInfo** annotations; } struct GDBusAuthObserver; struct GDBusConnection; /** * Struct used in g_dbus_error_register_error_domain(). * * Since: 2.26 */ struct GDBusErrorEntry { /** * An error code. */ int errorCode; /** * The D-Bus error name to associate with @error_code. */ const(char)* dbusErrorName; } struct GDBusInterface; /** * Base type for D-Bus interfaces. * * Since: 2.30 */ struct GDBusInterfaceIface { /** * The parent interface. */ GTypeInterface parentIface; /** * * Params: * iface = An exported D-Bus interface. * Returns: A #GDBusInterfaceInfo. Do not free. */ extern(C) GDBusInterfaceInfo* function(GDBusInterface* iface) getInfo; /** * * Params: * iface = An exported D-Bus interface * Returns: A #GDBusObject or %NULL. The returned * reference belongs to @interface_ and should not be freed. */ extern(C) GDBusObject* function(GDBusInterface* iface) getObject; /** */ extern(C) void function(GDBusInterface* iface, GDBusObject* object) setObject; /** * * Params: * iface = An exported D-Bus interface. * Returns: A #GDBusObject or %NULL. The returned * reference should be freed with g_object_unref(). */ extern(C) GDBusObject* function(GDBusInterface* iface) dupObject; } struct GDBusInterfaceInfo { /** * The reference count or -1 if statically allocated. */ int refCount; /** * The name of the D-Bus interface, e.g. "org.freedesktop.DBus.Properties". */ char* name; /** * A pointer to a %NULL-terminated array of pointers to #GDBusMethodInfo structures or %NULL if there are no methods. */ GDBusMethodInfo** methods; /** * A pointer to a %NULL-terminated array of pointers to #GDBusSignalInfo structures or %NULL if there are no signals. */ GDBusSignalInfo** signals; /** * A pointer to a %NULL-terminated array of pointers to #GDBusPropertyInfo structures or %NULL if there are no properties. */ GDBusPropertyInfo** properties; /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ GDBusAnnotationInfo** annotations; } struct GDBusInterfaceSkeleton { GObject parentInstance; GDBusInterfaceSkeletonPrivate* priv; } /** * Class structure for #GDBusInterfaceSkeleton. * * Since: 2.30 */ struct GDBusInterfaceSkeletonClass { /** * The parent class. */ GObjectClass parentClass; /** * * Params: * iface = A #GDBusInterfaceSkeleton. * Returns: A #GDBusInterfaceInfo (never %NULL). Do not free. */ extern(C) GDBusInterfaceInfo* function(GDBusInterfaceSkeleton* iface) getInfo; /** * * Params: * iface = A #GDBusInterfaceSkeleton. * Returns: A #GDBusInterfaceVTable (never %NULL). */ extern(C) GDBusInterfaceVTable* function(GDBusInterfaceSkeleton* iface) getVtable; /** * * Params: * iface = A #GDBusInterfaceSkeleton. * Returns: A #GVariant of type * ['a{sv}'][G-VARIANT-TYPE-VARDICT:CAPS]. * Free with g_variant_unref(). */ extern(C) GVariant* function(GDBusInterfaceSkeleton* iface) getProperties; /** */ extern(C) void function(GDBusInterfaceSkeleton* iface) flush; void*[8] vfuncPadding; /** */ extern(C) int function(GDBusInterfaceSkeleton* iface, GDBusMethodInvocation* invocation) gAuthorizeMethod; void*[8] signalPadding; } struct GDBusInterfaceSkeletonPrivate; /** * Virtual table for handling properties and method calls for a D-Bus * interface. * * Since 2.38, if you want to handle getting/setting D-Bus properties * asynchronously, give %NULL as your get_property() or set_property() * function. The D-Bus call will be directed to your @method_call function, * with the provided @interface_name set to "org.freedesktop.DBus.Properties". * * Ownership of the #GDBusMethodInvocation object passed to the * method_call() function is transferred to your handler; you must * call one of the methods of #GDBusMethodInvocation to return a reply * (possibly empty), or an error. These functions also take ownership * of the passed-in invocation object, so unless the invocation * object has otherwise been referenced, it will be then be freed. * Calling one of these functions may be done within your * method_call() implementation but it also can be done at a later * point to handle the method asynchronously. * * The usual checks on the validity of the calls is performed. For * `Get` calls, an error is automatically returned if the property does * not exist or the permissions do not allow access. The same checks are * performed for `Set` calls, and the provided value is also checked for * being the correct type. * * For both `Get` and `Set` calls, the #GDBusMethodInvocation * passed to the @method_call handler can be queried with * g_dbus_method_invocation_get_property_info() to get a pointer * to the #GDBusPropertyInfo of the property. * * If you have readable properties specified in your interface info, * you must ensure that you either provide a non-%NULL @get_property() * function or provide implementations of both the `Get` and `GetAll` * methods on org.freedesktop.DBus.Properties interface in your @method_call * function. Note that the required return type of the `Get` call is * `(v)`, not the type of the property. `GetAll` expects a return value * of type `a{sv}`. * * If you have writable properties specified in your interface info, * you must ensure that you either provide a non-%NULL @set_property() * function or provide an implementation of the `Set` call. If implementing * the call, you must return the value of type %G_VARIANT_TYPE_UNIT. * * Since: 2.26 */ struct GDBusInterfaceVTable { /** * Function for handling incoming method calls. */ GDBusInterfaceMethodCallFunc methodCall; /** * Function for getting a property. */ GDBusInterfaceGetPropertyFunc getProperty; /** * Function for setting a property. */ GDBusInterfaceSetPropertyFunc setProperty; void*[8] padding; } struct GDBusMenuModel; struct GDBusMessage; struct GDBusMethodInfo { /** * The reference count or -1 if statically allocated. */ int refCount; /** * The name of the D-Bus method, e.g. @RequestName. */ char* name; /** * A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no in arguments. */ GDBusArgInfo** inArgs; /** * A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no out arguments. */ GDBusArgInfo** outArgs; /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ GDBusAnnotationInfo** annotations; } struct GDBusMethodInvocation; struct GDBusNodeInfo { /** * The reference count or -1 if statically allocated. */ int refCount; /** * The path of the node or %NULL if omitted. Note that this may be a relative path. See the D-Bus specification for more details. */ char* path; /** * A pointer to a %NULL-terminated array of pointers to #GDBusInterfaceInfo structures or %NULL if there are no interfaces. */ GDBusInterfaceInfo** interfaces; /** * A pointer to a %NULL-terminated array of pointers to #GDBusNodeInfo structures or %NULL if there are no nodes. */ GDBusNodeInfo** nodes; /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ GDBusAnnotationInfo** annotations; } struct GDBusObject; /** * Base object type for D-Bus objects. * * Since: 2.30 */ struct GDBusObjectIface { /** * The parent interface. */ GTypeInterface parentIface; /** * * Params: * object = A #GDBusObject. * Returns: A string owned by @object. Do not free. */ extern(C) const(char)* function(GDBusObject* object) getObjectPath; /** * * Params: * object = A #GDBusObject. * Returns: A list of #GDBusInterface instances. * The returned list must be freed by g_list_free() after each element has been freed * with g_object_unref(). */ extern(C) GList* function(GDBusObject* object) getInterfaces; /** * * Params: * object = A #GDBusObject. * interfaceName = A D-Bus interface name. * Returns: %NULL if not found, otherwise a * #GDBusInterface that must be freed with g_object_unref(). */ extern(C) GDBusInterface* function(GDBusObject* object, const(char)* interfaceName) getInterface; /** */ extern(C) void function(GDBusObject* object, GDBusInterface* iface) interfaceAdded; /** */ extern(C) void function(GDBusObject* object, GDBusInterface* iface) interfaceRemoved; } struct GDBusObjectManager; struct GDBusObjectManagerClient { GObject parentInstance; GDBusObjectManagerClientPrivate* priv; } /** * Class structure for #GDBusObjectManagerClient. * * Since: 2.30 */ struct GDBusObjectManagerClientClass { /** * The parent class. */ GObjectClass parentClass; /** */ extern(C) void function(GDBusObjectManagerClient* manager, GDBusObjectProxy* objectProxy, GDBusProxy* interfaceProxy, const(char)* senderName, const(char)* signalName, GVariant* parameters) interfaceProxySignal; /** */ extern(C) void function(GDBusObjectManagerClient* manager, GDBusObjectProxy* objectProxy, GDBusProxy* interfaceProxy, GVariant* changedProperties, const(char)* invalidatedProperties) interfaceProxyPropertiesChanged; void*[8] padding; } struct GDBusObjectManagerClientPrivate; /** * Base type for D-Bus object managers. * * Since: 2.30 */ struct GDBusObjectManagerIface { /** * The parent interface. */ GTypeInterface parentIface; /** * * Params: * manager = A #GDBusObjectManager. * Returns: A string owned by @manager. Do not free. */ extern(C) const(char)* function(GDBusObjectManager* manager) getObjectPath; /** * * Params: * manager = A #GDBusObjectManager. * Returns: A list of * #GDBusObject objects. The returned list should be freed with * g_list_free() after each element has been freed with * g_object_unref(). */ extern(C) GList* function(GDBusObjectManager* manager) getObjects; /** * * Params: * manager = A #GDBusObjectManager. * objectPath = Object path to lookup. * Returns: A #GDBusObject or %NULL. Free with * g_object_unref(). */ extern(C) GDBusObject* function(GDBusObjectManager* manager, const(char)* objectPath) getObject; /** * * Params: * manager = A #GDBusObjectManager. * objectPath = Object path to lookup. * interfaceName = D-Bus interface name to lookup. * Returns: A #GDBusInterface instance or %NULL. Free * with g_object_unref(). */ extern(C) GDBusInterface* function(GDBusObjectManager* manager, const(char)* objectPath, const(char)* interfaceName) getInterface; /** */ extern(C) void function(GDBusObjectManager* manager, GDBusObject* object) objectAdded; /** */ extern(C) void function(GDBusObjectManager* manager, GDBusObject* object) objectRemoved; /** */ extern(C) void function(GDBusObjectManager* manager, GDBusObject* object, GDBusInterface* iface) interfaceAdded; /** */ extern(C) void function(GDBusObjectManager* manager, GDBusObject* object, GDBusInterface* iface) interfaceRemoved; } struct GDBusObjectManagerServer { GObject parentInstance; GDBusObjectManagerServerPrivate* priv; } /** * Class structure for #GDBusObjectManagerServer. * * Since: 2.30 */ struct GDBusObjectManagerServerClass { /** * The parent class. */ GObjectClass parentClass; void*[8] padding; } struct GDBusObjectManagerServerPrivate; struct GDBusObjectProxy { GObject parentInstance; GDBusObjectProxyPrivate* priv; } /** * Class structure for #GDBusObjectProxy. * * Since: 2.30 */ struct GDBusObjectProxyClass { /** * The parent class. */ GObjectClass parentClass; void*[8] padding; } struct GDBusObjectProxyPrivate; struct GDBusObjectSkeleton { GObject parentInstance; GDBusObjectSkeletonPrivate* priv; } /** * Class structure for #GDBusObjectSkeleton. * * Since: 2.30 */ struct GDBusObjectSkeletonClass { /** * The parent class. */ GObjectClass parentClass; /** */ extern(C) int function(GDBusObjectSkeleton* object, GDBusInterfaceSkeleton* iface, GDBusMethodInvocation* invocation) authorizeMethod; void*[8] padding; } struct GDBusObjectSkeletonPrivate; struct GDBusPropertyInfo { /** * The reference count or -1 if statically allocated. */ int refCount; /** * The name of the D-Bus property, e.g. "SupportedFilesystems". */ char* name; /** * The D-Bus signature of the property (a single complete type). */ char* signature; /** * Access control flags for the property. */ GDBusPropertyInfoFlags flags; /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ GDBusAnnotationInfo** annotations; } struct GDBusProxy { GObject parentInstance; GDBusProxyPrivate* priv; } /** * Class structure for #GDBusProxy. * * Since: 2.26 */ struct GDBusProxyClass { GObjectClass parentClass; /** */ extern(C) void function(GDBusProxy* proxy, GVariant* changedProperties, const(char)* invalidatedProperties) gPropertiesChanged; /** */ extern(C) void function(GDBusProxy* proxy, const(char)* senderName, const(char)* signalName, GVariant* parameters) gSignal; void*[32] padding; } struct GDBusProxyPrivate; struct GDBusServer; struct GDBusSignalInfo { /** * The reference count or -1 if statically allocated. */ int refCount; /** * The name of the D-Bus signal, e.g. "NameOwnerChanged". */ char* name; /** * A pointer to a %NULL-terminated array of pointers to #GDBusArgInfo structures or %NULL if there are no arguments. */ GDBusArgInfo** args; /** * A pointer to a %NULL-terminated array of pointers to #GDBusAnnotationInfo structures or %NULL if there are no annotations. */ GDBusAnnotationInfo** annotations; } /** * Virtual table for handling subtrees registered with g_dbus_connection_register_subtree(). * * Since: 2.26 */ struct GDBusSubtreeVTable { /** * Function for enumerating child nodes. */ GDBusSubtreeEnumerateFunc enumerate; /** * Function for introspecting a child node. */ GDBusSubtreeIntrospectFunc introspect; /** * Function for dispatching a remote call on a child node. */ GDBusSubtreeDispatchFunc dispatch; void*[8] padding; } struct GDataInputStream { GBufferedInputStream parentInstance; GDataInputStreamPrivate* priv; } struct GDataInputStreamClass { GBufferedInputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GDataInputStreamPrivate; struct GDataOutputStream { GFilterOutputStream parentInstance; GDataOutputStreamPrivate* priv; } struct GDataOutputStreamClass { GFilterOutputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GDataOutputStreamPrivate; struct GDatagramBased; /** * Provides an interface for socket-like objects which have datagram semantics, * following the Berkeley sockets API. The interface methods are thin wrappers * around the corresponding virtual methods, and no pre-processing of inputs is * implemented — so implementations of this API must handle all functionality * documented in the interface methods. * * Since: 2.48 */ struct GDatagramBasedInterface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * datagramBased = a #GDatagramBased * messages = an array of #GInputMessage structs * numMessages = the number of elements in @messages * flags = an int containing #GSocketMsgFlags flags for the overall operation * timeout = the maximum time (in microseconds) to wait, 0 to not block, or -1 * to block indefinitely * cancellable = a %GCancellable * Returns: number of messages received, or -1 on error. Note that the number * of messages received may be smaller than @num_messages if @timeout is * zero or positive, if the peer closed the connection, or if @num_messages * was larger than `UIO_MAXIOV` (1024), in which case the caller may re-try * to receive the remaining messages. * * Throws: GException on failure. */ extern(C) int function(GDatagramBased* datagramBased, GInputMessage* messages, uint numMessages, int flags, long timeout, GCancellable* cancellable, GError** err) receiveMessages; /** * * Params: * datagramBased = a #GDatagramBased * messages = an array of #GOutputMessage structs * numMessages = the number of elements in @messages * flags = an int containing #GSocketMsgFlags flags * timeout = the maximum time (in microseconds) to wait, 0 to not block, or -1 * to block indefinitely * cancellable = a %GCancellable * Returns: number of messages sent, or -1 on error. Note that the number of * messages sent may be smaller than @num_messages if @timeout is zero * or positive, or if @num_messages was larger than `UIO_MAXIOV` (1024), in * which case the caller may re-try to send the remaining messages. * * Throws: GException on failure. */ extern(C) int function(GDatagramBased* datagramBased, GOutputMessage* messages, uint numMessages, int flags, long timeout, GCancellable* cancellable, GError** err) sendMessages; /** * * Params: * datagramBased = a #GDatagramBased * condition = a #GIOCondition mask to monitor * cancellable = a #GCancellable * Returns: a newly allocated #GSource */ extern(C) GSource* function(GDatagramBased* datagramBased, GIOCondition condition, GCancellable* cancellable) createSource; /** * * Params: * datagramBased = a #GDatagramBased * condition = a #GIOCondition mask to check * Returns: the #GIOCondition mask of the current state */ extern(C) GIOCondition function(GDatagramBased* datagramBased, GIOCondition condition) conditionCheck; /** * * Params: * datagramBased = a #GDatagramBased * condition = a #GIOCondition mask to wait for * timeout = the maximum time (in microseconds) to wait, 0 to not block, or -1 * to block indefinitely * cancellable = a #GCancellable * Returns: %TRUE if the condition was met, %FALSE otherwise * * Throws: GException on failure. */ extern(C) int function(GDatagramBased* datagramBased, GIOCondition condition, long timeout, GCancellable* cancellable, GError** err) conditionWait; } struct GDesktopAppInfo; struct GDesktopAppInfoClass { GObjectClass parentClass; } struct GDesktopAppInfoLookup; /** * Interface that is used by backends to associate default * handlers with URI schemes. */ struct GDesktopAppInfoLookupIface { GTypeInterface gIface; /** * * Params: * lookup = a #GDesktopAppInfoLookup * uriScheme = a string containing a URI scheme. * Returns: #GAppInfo for given @uri_scheme or %NULL on error. */ extern(C) GAppInfo* function(GDesktopAppInfoLookup* lookup, const(char)* uriScheme) getDefaultForUriScheme; } struct GDrive; /** * Interface for creating #GDrive implementations. */ struct GDriveIface { /** * The parent interface. */ GTypeInterface gIface; /** */ extern(C) void function(GDrive* drive) changed; /** */ extern(C) void function(GDrive* drive) disconnected; /** */ extern(C) void function(GDrive* drive) ejectButton; /** * * Params: * drive = a #GDrive. * Returns: a string containing @drive's name. The returned * string should be freed when no longer needed. */ extern(C) char* function(GDrive* drive) getName; /** * * Params: * drive = a #GDrive. * Returns: #GIcon for the @drive. * Free the returned object with g_object_unref(). */ extern(C) GIcon* function(GDrive* drive) getIcon; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if the @drive contains volumes, %FALSE otherwise. */ extern(C) int function(GDrive* drive) hasVolumes; /** * * Params: * drive = a #GDrive. * Returns: #GList containing any #GVolume objects on the given @drive. */ extern(C) GList* function(GDrive* drive) getVolumes; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if @drive supports removable media, %FALSE otherwise. */ extern(C) int function(GDrive* drive) isMediaRemovable; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if @drive has media, %FALSE otherwise. */ extern(C) int function(GDrive* drive) hasMedia; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if the @drive is capabable of automatically detecting * media changes, %FALSE otherwise. */ extern(C) int function(GDrive* drive) isMediaCheckAutomatic; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if the @drive can be ejected, %FALSE otherwise. */ extern(C) int function(GDrive* drive) canEject; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if the @drive can be polled for media changes, * %FALSE otherwise. */ extern(C) int function(GDrive* drive) canPollForMedia; /** */ extern(C) void function(GDrive* drive, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) eject; /** * * Params: * drive = a #GDrive. * result = a #GAsyncResult. * Returns: %TRUE if the drive has been ejected successfully, * %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GDrive* drive, GAsyncResult* result, GError** err) ejectFinish; /** */ extern(C) void function(GDrive* drive, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) pollForMedia; /** * * Params: * drive = a #GDrive. * result = a #GAsyncResult. * Returns: %TRUE if the drive has been poll_for_mediaed successfully, * %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GDrive* drive, GAsyncResult* result, GError** err) pollForMediaFinish; /** * * Params: * drive = a #GDrive * kind = the kind of identifier to return * Returns: a newly allocated string containing the * requested identfier, or %NULL if the #GDrive * doesn't have this kind of identifier. */ extern(C) char* function(GDrive* drive, const(char)* kind) getIdentifier; /** * * Params: * drive = a #GDrive * Returns: a %NULL-terminated * array of strings containing kinds of identifiers. Use g_strfreev() * to free. */ extern(C) char** function(GDrive* drive) enumerateIdentifiers; /** * * Params: * drive = a #GDrive. * Returns: A value from the #GDriveStartStopType enumeration. */ extern(C) GDriveStartStopType function(GDrive* drive) getStartStopType; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if the @drive can be started, %FALSE otherwise. */ extern(C) int function(GDrive* drive) canStart; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if the @drive can be started degraded, %FALSE otherwise. */ extern(C) int function(GDrive* drive) canStartDegraded; /** */ extern(C) void function(GDrive* drive, GDriveStartFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) start; /** * * Params: * drive = a #GDrive. * result = a #GAsyncResult. * Returns: %TRUE if the drive has been started successfully, * %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GDrive* drive, GAsyncResult* result, GError** err) startFinish; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if the @drive can be stopped, %FALSE otherwise. */ extern(C) int function(GDrive* drive) canStop; /** */ extern(C) void function(GDrive* drive, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) stop; /** * * Params: * drive = a #GDrive. * result = a #GAsyncResult. * Returns: %TRUE if the drive has been stopped successfully, * %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GDrive* drive, GAsyncResult* result, GError** err) stopFinish; /** */ extern(C) void function(GDrive* drive) stopButton; /** */ extern(C) void function(GDrive* drive, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) ejectWithOperation; /** * * Params: * drive = a #GDrive. * result = a #GAsyncResult. * Returns: %TRUE if the drive was successfully ejected. %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GDrive* drive, GAsyncResult* result, GError** err) ejectWithOperationFinish; /** * * Params: * drive = A #GDrive. * Returns: Sorting key for @drive or %NULL if no such key is available. */ extern(C) const(char)* function(GDrive* drive) getSortKey; /** * * Params: * drive = a #GDrive. * Returns: symbolic #GIcon for the @drive. * Free the returned object with g_object_unref(). */ extern(C) GIcon* function(GDrive* drive) getSymbolicIcon; /** * * Params: * drive = a #GDrive. * Returns: %TRUE if @drive and/or its media is considered removable, %FALSE otherwise. */ extern(C) int function(GDrive* drive) isRemovable; } struct GDtlsClientConnection; /** * vtable for a #GDtlsClientConnection implementation. * * Since: 2.48 */ struct GDtlsClientConnectionInterface { /** * The parent interface. */ GTypeInterface gIface; } struct GDtlsConnection; /** * Virtual method table for a #GDtlsConnection implementation. * * Since: 2.48 */ struct GDtlsConnectionInterface { /** * The parent interface. */ GTypeInterface gIface; /** */ extern(C) int function(GDtlsConnection* connection, GTlsCertificate* peerCert, GTlsCertificateFlags errors) acceptCertificate; /** * * Params: * conn = a #GDtlsConnection * cancellable = a #GCancellable, or %NULL * Returns: success or failure * * Throws: GException on failure. */ extern(C) int function(GDtlsConnection* conn, GCancellable* cancellable, GError** err) handshake; /** */ extern(C) void function(GDtlsConnection* conn, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) handshakeAsync; /** * * Params: * conn = a #GDtlsConnection * result = a #GAsyncResult. * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set. * * Throws: GException on failure. */ extern(C) int function(GDtlsConnection* conn, GAsyncResult* result, GError** err) handshakeFinish; /** * * Params: * conn = a #GDtlsConnection * shutdownRead = %TRUE to stop reception of incoming datagrams * shutdownWrite = %TRUE to stop sending outgoing datagrams * cancellable = a #GCancellable, or %NULL * Returns: %TRUE on success, %FALSE otherwise * * Throws: GException on failure. */ extern(C) int function(GDtlsConnection* conn, int shutdownRead, int shutdownWrite, GCancellable* cancellable, GError** err) shutdown; /** */ extern(C) void function(GDtlsConnection* conn, int shutdownRead, int shutdownWrite, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) shutdownAsync; /** * * Params: * conn = a #GDtlsConnection * result = a #GAsyncResult * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set * * Throws: GException on failure. */ extern(C) int function(GDtlsConnection* conn, GAsyncResult* result, GError** err) shutdownFinish; } struct GDtlsServerConnection; /** * vtable for a #GDtlsServerConnection implementation. * * Since: 2.48 */ struct GDtlsServerConnectionInterface { /** * The parent interface. */ GTypeInterface gIface; } struct GEmblem; struct GEmblemClass; struct GEmblemedIcon { GObject parentInstance; GEmblemedIconPrivate* priv; } struct GEmblemedIconClass { GObjectClass parentClass; } struct GEmblemedIconPrivate; struct GFile; /** * Information about a specific attribute. */ struct GFileAttributeInfo { /** * the name of the attribute. */ char* name; /** * the #GFileAttributeType type of the attribute. */ GFileAttributeType type; /** * a set of #GFileAttributeInfoFlags. */ GFileAttributeInfoFlags flags; } struct GFileAttributeInfoList { /** * an array of #GFileAttributeInfos. */ GFileAttributeInfo* infos; /** * the number of values in the array. */ int nInfos; } struct GFileAttributeMatcher; struct GFileDescriptorBased; /** * An interface for file descriptor based io objects. */ struct GFileDescriptorBasedIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * fdBased = a #GFileDescriptorBased. * Returns: The file descriptor */ extern(C) int function(GFileDescriptorBased* fdBased) getFd; } struct GFileEnumerator { GObject parentInstance; GFileEnumeratorPrivate* priv; } struct GFileEnumeratorClass { GObjectClass parentClass; /** * * Params: * enumerator = a #GFileEnumerator. * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: A #GFileInfo or %NULL on error * or end of enumerator. Free the returned object with * g_object_unref() when no longer needed. * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFileEnumerator* enumerator, GCancellable* cancellable, GError** err) nextFile; /** */ extern(C) int function(GFileEnumerator* enumerator, GCancellable* cancellable, GError** err) closeFn; /** */ extern(C) void function(GFileEnumerator* enumerator, int numFiles, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) nextFilesAsync; /** * * Params: * enumerator = a #GFileEnumerator. * result = a #GAsyncResult. * Returns: a #GList of #GFileInfos. You must free the list with * g_list_free() and unref the infos with g_object_unref() when you're * done with them. * * Throws: GException on failure. */ extern(C) GList* function(GFileEnumerator* enumerator, GAsyncResult* result, GError** err) nextFilesFinish; /** */ extern(C) void function(GFileEnumerator* enumerator, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) closeAsync; /** * * Params: * enumerator = a #GFileEnumerator. * result = a #GAsyncResult. * Returns: %TRUE if the close operation has finished successfully. * * Throws: GException on failure. */ extern(C) int function(GFileEnumerator* enumerator, GAsyncResult* result, GError** err) closeFinish; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; /** */ extern(C) void function() GReserved7; } struct GFileEnumeratorPrivate; struct GFileIOStream { GIOStream parentInstance; GFileIOStreamPrivate* priv; } struct GFileIOStreamClass { GIOStreamClass parentClass; /** */ extern(C) long function(GFileIOStream* stream) tell; /** */ extern(C) int function(GFileIOStream* stream) canSeek; /** */ extern(C) int function(GFileIOStream* stream, long offset, GSeekType type, GCancellable* cancellable, GError** err) seek; /** */ extern(C) int function(GFileIOStream* stream) canTruncate; /** */ extern(C) int function(GFileIOStream* stream, long size, GCancellable* cancellable, GError** err) truncateFn; /** * * Params: * stream = a #GFileIOStream. * attributes = a file attribute query string. * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: a #GFileInfo for the @stream, or %NULL on error. * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFileIOStream* stream, const(char)* attributes, GCancellable* cancellable, GError** err) queryInfo; /** */ extern(C) void function(GFileIOStream* stream, const(char)* attributes, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) queryInfoAsync; /** * * Params: * stream = a #GFileIOStream. * result = a #GAsyncResult. * Returns: A #GFileInfo for the finished query. * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFileIOStream* stream, GAsyncResult* result, GError** err) queryInfoFinish; /** * * Params: * stream = a #GFileIOStream. * Returns: the entity tag for the stream. */ extern(C) char* function(GFileIOStream* stream) getEtag; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GFileIOStreamPrivate; struct GFileIcon; struct GFileIconClass; /** * An interface for writing VFS file handles. */ struct GFileIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * file = input #GFile * Returns: a new #GFile that is a duplicate * of the given #GFile. */ extern(C) GFile* function(GFile* file) dup; /** * * Params: * file = #gconstpointer to a #GFile * Returns: 0 if @file is not a valid #GFile, otherwise an * integer that can be used as hash value for the #GFile. * This function is intended for easily hashing a #GFile to * add to a #GHashTable or similar data structure. */ extern(C) uint function(GFile* file) hash; /** * * Params: * file1 = the first #GFile * file2 = the second #GFile * Returns: %TRUE if @file1 and @file2 are equal. */ extern(C) int function(GFile* file1, GFile* file2) equal; /** * * Params: * file = input #GFile * Returns: %TRUE if @file is native */ extern(C) int function(GFile* file) isNative; /** * * Params: * file = input #GFile * uriScheme = a string containing a URI scheme * Returns: %TRUE if #GFile's backend supports the * given URI scheme, %FALSE if URI scheme is %NULL, * not supported, or #GFile is invalid. */ extern(C) int function(GFile* file, const(char)* uriScheme) hasUriScheme; /** * * Params: * file = input #GFile * Returns: a string containing the URI scheme for the given * #GFile. The returned string should be freed with g_free() * when no longer needed. */ extern(C) char* function(GFile* file) getUriScheme; /** */ extern(C) char* function(GFile* file) getBasename; /** */ extern(C) char* function(GFile* file) getPath; /** * * Params: * file = input #GFile * Returns: a string containing the #GFile's URI. * The returned string should be freed with g_free() * when no longer needed. */ extern(C) char* function(GFile* file) getUri; /** * * Params: * file = input #GFile * Returns: a string containing the #GFile's parse name. * The returned string should be freed with g_free() * when no longer needed. */ extern(C) char* function(GFile* file) getParseName; /** * * Params: * file = input #GFile * Returns: a #GFile structure to the * parent of the given #GFile or %NULL if there is no parent. Free * the returned object with g_object_unref(). */ extern(C) GFile* function(GFile* file) getParent; /** * * Params: * prefix = input #GFile * file = input #GFile * Returns: %TRUE if the @files's parent, grandparent, etc is @prefix, * %FALSE otherwise. */ extern(C) int function(GFile* prefix, GFile* file) prefixMatches; /** */ extern(C) char* function(GFile* parent, GFile* descendant) getRelativePath; /** * * Params: * file = input #GFile * relativePath = a given relative path string * Returns: #GFile to the resolved path. * %NULL if @relative_path is %NULL or if @file is invalid. * Free the returned object with g_object_unref(). */ extern(C) GFile* function(GFile* file, char* relativePath) resolveRelativePath; /** * * Params: * file = input #GFile * displayName = string to a possible child * Returns: a #GFile to the specified child, or * %NULL if the display name couldn't be converted. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFile* function(GFile* file, const(char)* displayName, GError** err) getChildForDisplayName; /** * * Params: * file = input #GFile * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: A #GFileEnumerator if successful, * %NULL on error. Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileEnumerator* function(GFile* file, const(char)* attributes, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) enumerateChildren; /** */ extern(C) void function(GFile* file, const(char)* attributes, GFileQueryInfoFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) enumerateChildrenAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: a #GFileEnumerator or %NULL * if an error occurred. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileEnumerator* function(GFile* file, GAsyncResult* res, GError** err) enumerateChildrenFinish; /** * * Params: * file = input #GFile * attributes = an attribute query string * flags = a set of #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileInfo for the given @file, or %NULL * on error. Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFile* file, const(char)* attributes, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) queryInfo; /** */ extern(C) void function(GFile* file, const(char)* attributes, GFileQueryInfoFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) queryInfoAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: #GFileInfo for given @file * or %NULL on error. Free the returned object with * g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFile* file, GAsyncResult* res, GError** err) queryInfoFinish; /** * * Params: * file = input #GFile * attributes = an attribute query string * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileInfo or %NULL if there was an error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFile* file, const(char)* attributes, GCancellable* cancellable, GError** err) queryFilesystemInfo; /** */ extern(C) void function(GFile* file, const(char)* attributes, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) queryFilesystemInfoAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: #GFileInfo for given @file * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFile* file, GAsyncResult* res, GError** err) queryFilesystemInfoFinish; /** * * Params: * file = input #GFile * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GMount where the @file is located * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GMount* function(GFile* file, GCancellable* cancellable, GError** err) findEnclosingMount; /** */ extern(C) void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) findEnclosingMountAsync; /** * * Params: * file = a #GFile * res = a #GAsyncResult * Returns: #GMount for given @file or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GMount* function(GFile* file, GAsyncResult* res, GError** err) findEnclosingMountFinish; /** * * Params: * file = input #GFile * displayName = a string * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFile specifying what @file was renamed to, * or %NULL if there was an error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFile* function(GFile* file, const(char)* displayName, GCancellable* cancellable, GError** err) setDisplayName; /** */ extern(C) void function(GFile* file, const(char)* displayName, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) setDisplayNameAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: a #GFile or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFile* function(GFile* file, GAsyncResult* res, GError** err) setDisplayNameFinish; /** * * Params: * file = input #GFile * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileAttributeInfoList describing the settable attributes. * When you are done with it, release it with * g_file_attribute_info_list_unref() * * Throws: GException on failure. */ extern(C) GFileAttributeInfoList* function(GFile* file, GCancellable* cancellable, GError** err) querySettableAttributes; /** */ extern(C) void function() QuerySettableAttributesAsync; /** */ extern(C) void function() QuerySettableAttributesFinish; /** * * Params: * file = input #GFile * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileAttributeInfoList describing the writable namespaces. * When you are done with it, release it with * g_file_attribute_info_list_unref() * * Throws: GException on failure. */ extern(C) GFileAttributeInfoList* function(GFile* file, GCancellable* cancellable, GError** err) queryWritableNamespaces; /** */ extern(C) void function() QueryWritableNamespacesAsync; /** */ extern(C) void function() QueryWritableNamespacesFinish; /** * * Params: * file = input #GFile * attribute = a string containing the attribute's name * type = The type of the attribute * valueP = a pointer to the value (or the pointer * itself if the type is a pointer type) * flags = a set of #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: %TRUE if the attribute was set, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, const(char)* attribute, GFileAttributeType type, void* valueP, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) setAttribute; /** * * Params: * file = input #GFile * info = a #GFileInfo * flags = #GFileQueryInfoFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: %FALSE if there was any error, %TRUE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GFileInfo* info, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) setAttributesFromInfo; /** */ extern(C) void function(GFile* file, GFileInfo* info, GFileQueryInfoFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) setAttributesAsync; /** * * Params: * file = input #GFile * result = a #GAsyncResult * info = a #GFileInfo * Returns: %TRUE if the attributes were set correctly, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GFileInfo** info, GError** err) setAttributesFinish; /** * * Params: * file = #GFile to read * cancellable = a #GCancellable * Returns: #GFileInputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileInputStream* function(GFile* file, GCancellable* cancellable, GError** err) readFn; /** */ extern(C) void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) readAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: a #GFileInputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileInputStream* function(GFile* file, GAsyncResult* res, GError** err) readFinish; /** * * Params: * file = input #GFile * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileOutputStream, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileOutputStream* function(GFile* file, GFileCreateFlags flags, GCancellable* cancellable, GError** err) appendTo; /** */ extern(C) void function(GFile* file, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) appendToAsync; /** * * Params: * file = input #GFile * res = #GAsyncResult * Returns: a valid #GFileOutputStream * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileOutputStream* function(GFile* file, GAsyncResult* res, GError** err) appendToFinish; /** * * Params: * file = input #GFile * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileOutputStream for the newly created * file, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileOutputStream* function(GFile* file, GFileCreateFlags flags, GCancellable* cancellable, GError** err) create; /** */ extern(C) void function(GFile* file, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) createAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: a #GFileOutputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileOutputStream* function(GFile* file, GAsyncResult* res, GError** err) createFinish; /** * * Params: * file = input #GFile * etag = an optional [entity tag][gfile-etag] * for the current #GFile, or #NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileOutputStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileOutputStream* function(GFile* file, const(char)* etag, int makeBackup, GFileCreateFlags flags, GCancellable* cancellable, GError** err) replace; /** */ extern(C) void function(GFile* file, const(char)* etag, int makeBackup, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) replaceAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: a #GFileOutputStream, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileOutputStream* function(GFile* file, GAsyncResult* res, GError** err) replaceFinish; /** * * Params: * file = input #GFile * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: %TRUE if the file was deleted. %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GCancellable* cancellable, GError** err) deleteFile; /** */ extern(C) void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) deleteFileAsync; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE if the file was deleted. %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) deleteFileFinish; /** * * Params: * file = #GFile to send to trash * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: %TRUE on successful trash, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GCancellable* cancellable, GError** err) trash; /** */ extern(C) void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) trashAsync; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE on successful trash, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) trashFinish; /** * * Params: * file = input #GFile * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: %TRUE on successful creation, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GCancellable* cancellable, GError** err) makeDirectory; /** */ extern(C) void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) makeDirectoryAsync; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE on successful directory creation, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) makeDirectoryFinish; /** * * Params: * file = a #GFile with the name of the symlink to create * symlinkValue = a string with the path for the target * of the new symlink * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: %TRUE on the creation of a new symlink, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, char* symlinkValue, GCancellable* cancellable, GError** err) makeSymbolicLink; /** */ extern(C) void function() MakeSymbolicLinkAsync; /** */ extern(C) void function() MakeSymbolicLinkFinish; /** * * Params: * source = input #GFile * destination = destination #GFile * flags = set of #GFileCopyFlags * cancellable = optional #GCancellable object, * %NULL to ignore * progressCallback = function to callback with * progress information, or %NULL if progress information is not needed * progressCallbackData = user data to pass to @progress_callback * Returns: %TRUE on success, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* source, GFile* destination, GFileCopyFlags flags, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GError** err) copy; /** */ extern(C) void function(GFile* source, GFile* destination, GFileCopyFlags flags, int ioPriority, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GAsyncReadyCallback callback, void* userData) copyAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: a %TRUE on success, %FALSE on error. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* res, GError** err) copyFinish; /** * * Params: * source = #GFile pointing to the source location * destination = #GFile pointing to the destination location * flags = set of #GFileCopyFlags * cancellable = optional #GCancellable object, * %NULL to ignore * progressCallback = #GFileProgressCallback * function for updates * progressCallbackData = gpointer to user data for * the callback function * Returns: %TRUE on successful move, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* source, GFile* destination, GFileCopyFlags flags, GCancellable* cancellable, GFileProgressCallback progressCallback, void* progressCallbackData, GError** err) move; /** */ extern(C) void function() MoveAsync; /** */ extern(C) void function() MoveFinish; /** */ extern(C) void function(GFile* file, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) mountMountable; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: a #GFile or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFile* function(GFile* file, GAsyncResult* result, GError** err) mountMountableFinish; /** */ extern(C) void function(GFile* file, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) unmountMountable; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE if the operation finished successfully. * %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) unmountMountableFinish; /** */ extern(C) void function(GFile* file, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) ejectMountable; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE if the @file was ejected successfully. * %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) ejectMountableFinish; /** */ extern(C) void function(GFile* location, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) mountEnclosingVolume; /** * * Params: * location = input #GFile * result = a #GAsyncResult * Returns: %TRUE if successful. If an error has occurred, * this function will return %FALSE and set @error * appropriately if present. * * Throws: GException on failure. */ extern(C) int function(GFile* location, GAsyncResult* result, GError** err) mountEnclosingVolumeFinish; /** * * Params: * file = input #GFile * flags = a set of #GFileMonitorFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileMonitor for the given @file, * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileMonitor* function(GFile* file, GFileMonitorFlags flags, GCancellable* cancellable, GError** err) monitorDir; /** * * Params: * file = input #GFile * flags = a set of #GFileMonitorFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileMonitor for the given @file, * or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileMonitor* function(GFile* file, GFileMonitorFlags flags, GCancellable* cancellable, GError** err) monitorFile; /** * * Params: * file = #GFile to open * cancellable = a #GCancellable * Returns: #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileIOStream* function(GFile* file, GCancellable* cancellable, GError** err) openReadwrite; /** */ extern(C) void function(GFile* file, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) openReadwriteAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileIOStream* function(GFile* file, GAsyncResult* res, GError** err) openReadwriteFinish; /** * * Params: * file = a #GFile * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileIOStream for the newly created * file, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileIOStream* function(GFile* file, GFileCreateFlags flags, GCancellable* cancellable, GError** err) createReadwrite; /** */ extern(C) void function(GFile* file, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) createReadwriteAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileIOStream* function(GFile* file, GAsyncResult* res, GError** err) createReadwriteFinish; /** * * Params: * file = a #GFile * etag = an optional [entity tag][gfile-etag] * for the current #GFile, or #NULL to ignore * makeBackup = %TRUE if a backup should be created * flags = a set of #GFileCreateFlags * cancellable = optional #GCancellable object, * %NULL to ignore * Returns: a #GFileIOStream or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileIOStream* function(GFile* file, const(char)* etag, int makeBackup, GFileCreateFlags flags, GCancellable* cancellable, GError** err) replaceReadwrite; /** */ extern(C) void function(GFile* file, const(char)* etag, int makeBackup, GFileCreateFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) replaceReadwriteAsync; /** * * Params: * file = input #GFile * res = a #GAsyncResult * Returns: a #GFileIOStream, or %NULL on error. * Free the returned object with g_object_unref(). * * Throws: GException on failure. */ extern(C) GFileIOStream* function(GFile* file, GAsyncResult* res, GError** err) replaceReadwriteFinish; /** */ extern(C) void function(GFile* file, GDriveStartFlags flags, GMountOperation* startOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) startMountable; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE if the operation finished successfully. %FALSE * otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) startMountableFinish; /** */ extern(C) void function(GFile* file, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) stopMountable; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE if the operation finished successfully. * %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) stopMountableFinish; /** * a boolean that indicates whether the #GFile implementation supports thread-default contexts. Since 2.22. */ bool supportsThreadContexts; /** */ extern(C) void function(GFile* file, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) unmountMountableWithOperation; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE if the operation finished successfully. * %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) unmountMountableWithOperationFinish; /** */ extern(C) void function(GFile* file, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) ejectMountableWithOperation; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE if the @file was ejected successfully. * %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) ejectMountableWithOperationFinish; /** */ extern(C) void function(GFile* file, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) pollMountable; /** * * Params: * file = input #GFile * result = a #GAsyncResult * Returns: %TRUE if the operation finished successfully. %FALSE * otherwise. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, GError** err) pollMountableFinish; /** * * Params: * file = a #GFile * flags = #GFileMeasureFlags * cancellable = optional #GCancellable * progressCallback = a #GFileMeasureProgressCallback * progressData = user_data for @progress_callback * diskUsage = the number of bytes of disk space used * numDirs = the number of directories encountered * numFiles = the number of non-directories encountered * Returns: %TRUE if successful, with the out parameters set. * %FALSE otherwise, with @error set. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GFileMeasureFlags flags, GCancellable* cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, ulong* diskUsage, ulong* numDirs, ulong* numFiles, GError** err) measureDiskUsage; /** */ extern(C) void function(GFile* file, GFileMeasureFlags flags, int ioPriority, GCancellable* cancellable, GFileMeasureProgressCallback progressCallback, void* progressData, GAsyncReadyCallback callback, void* userData) measureDiskUsageAsync; /** * * Params: * file = a #GFile * result = the #GAsyncResult passed to your #GAsyncReadyCallback * diskUsage = the number of bytes of disk space used * numDirs = the number of directories encountered * numFiles = the number of non-directories encountered * Returns: %TRUE if successful, with the out parameters set. * %FALSE otherwise, with @error set. * * Throws: GException on failure. */ extern(C) int function(GFile* file, GAsyncResult* result, ulong* diskUsage, ulong* numDirs, ulong* numFiles, GError** err) measureDiskUsageFinish; } struct GFileInfo; struct GFileInfoClass; struct GFileInputStream { GInputStream parentInstance; GFileInputStreamPrivate* priv; } struct GFileInputStreamClass { GInputStreamClass parentClass; /** */ extern(C) long function(GFileInputStream* stream) tell; /** */ extern(C) int function(GFileInputStream* stream) canSeek; /** */ extern(C) int function(GFileInputStream* stream, long offset, GSeekType type, GCancellable* cancellable, GError** err) seek; /** * * Params: * stream = a #GFileInputStream. * attributes = a file attribute query string. * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: a #GFileInfo, or %NULL on error. * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFileInputStream* stream, const(char)* attributes, GCancellable* cancellable, GError** err) queryInfo; /** */ extern(C) void function(GFileInputStream* stream, const(char)* attributes, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) queryInfoAsync; /** * * Params: * stream = a #GFileInputStream. * result = a #GAsyncResult. * Returns: #GFileInfo. * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFileInputStream* stream, GAsyncResult* result, GError** err) queryInfoFinish; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GFileInputStreamPrivate; struct GFileMonitor { GObject parentInstance; GFileMonitorPrivate* priv; } struct GFileMonitorClass { GObjectClass parentClass; /** */ extern(C) void function(GFileMonitor* monitor, GFile* file, GFile* otherFile, GFileMonitorEvent eventType) changed; /** * * Params: * monitor = a #GFileMonitor. * Returns: always %TRUE */ extern(C) int function(GFileMonitor* monitor) cancel; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GFileMonitorPrivate; struct GFileOutputStream { GOutputStream parentInstance; GFileOutputStreamPrivate* priv; } struct GFileOutputStreamClass { GOutputStreamClass parentClass; /** */ extern(C) long function(GFileOutputStream* stream) tell; /** */ extern(C) int function(GFileOutputStream* stream) canSeek; /** */ extern(C) int function(GFileOutputStream* stream, long offset, GSeekType type, GCancellable* cancellable, GError** err) seek; /** */ extern(C) int function(GFileOutputStream* stream) canTruncate; /** */ extern(C) int function(GFileOutputStream* stream, long size, GCancellable* cancellable, GError** err) truncateFn; /** * * Params: * stream = a #GFileOutputStream. * attributes = a file attribute query string. * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: a #GFileInfo for the @stream, or %NULL on error. * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFileOutputStream* stream, const(char)* attributes, GCancellable* cancellable, GError** err) queryInfo; /** */ extern(C) void function(GFileOutputStream* stream, const(char)* attributes, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) queryInfoAsync; /** * * Params: * stream = a #GFileOutputStream. * result = a #GAsyncResult. * Returns: A #GFileInfo for the finished query. * * Throws: GException on failure. */ extern(C) GFileInfo* function(GFileOutputStream* stream, GAsyncResult* result, GError** err) queryInfoFinish; /** * * Params: * stream = a #GFileOutputStream. * Returns: the entity tag for the stream. */ extern(C) char* function(GFileOutputStream* stream) getEtag; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GFileOutputStreamPrivate; struct GFilenameCompleter; struct GFilenameCompleterClass { GObjectClass parentClass; /** */ extern(C) void function(GFilenameCompleter* filenameCompleter) gotCompletionData; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; } struct GFilterInputStream { GInputStream parentInstance; GInputStream* baseStream; } struct GFilterInputStreamClass { GInputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; } struct GFilterOutputStream { GOutputStream parentInstance; GOutputStream* baseStream; } struct GFilterOutputStreamClass { GOutputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; } struct GIOExtension; struct GIOExtensionPoint; struct GIOModule; struct GIOModuleClass; struct GIOModuleScope; struct GIOSchedulerJob; struct GIOStream { GObject parentInstance; GIOStreamPrivate* priv; } struct GIOStreamAdapter; struct GIOStreamClass { GObjectClass parentClass; /** * * Params: * stream = a #GIOStream * Returns: a #GInputStream, owned by the #GIOStream. * Do not free. */ extern(C) GInputStream* function(GIOStream* stream) getInputStream; /** * * Params: * stream = a #GIOStream * Returns: a #GOutputStream, owned by the #GIOStream. * Do not free. */ extern(C) GOutputStream* function(GIOStream* stream) getOutputStream; /** */ extern(C) int function(GIOStream* stream, GCancellable* cancellable, GError** err) closeFn; /** */ extern(C) void function(GIOStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) closeAsync; /** * * Params: * stream = a #GIOStream * result = a #GAsyncResult * Returns: %TRUE if stream was successfully closed, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GIOStream* stream, GAsyncResult* result, GError** err) closeFinish; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; /** */ extern(C) void function() GReserved7; /** */ extern(C) void function() GReserved8; /** */ extern(C) void function() GReserved9; /** */ extern(C) void function() GReserved10; } struct GIOStreamPrivate; struct GIcon; /** * GIconIface is used to implement GIcon types for various * different systems. See #GThemedIcon and #GLoadableIcon for * examples of how to implement this interface. */ struct GIconIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * icon = #gconstpointer to an icon object. * Returns: a #guint containing a hash for the @icon, suitable for * use in a #GHashTable or similar data structure. */ extern(C) uint function(GIcon* icon) hash; /** * * Params: * icon1 = pointer to the first #GIcon. * icon2 = pointer to the second #GIcon. * Returns: %TRUE if @icon1 is equal to @icon2. %FALSE otherwise. */ extern(C) int function(GIcon* icon1, GIcon* icon2) equal; /** * * Params: * icon = a #GIcon. * Returns: An allocated NUL-terminated UTF8 string or * %NULL if @icon can't be serialized. Use g_free() to free. */ extern(C) int function(GIcon* icon, GPtrArray* tokens, int* outVersion) toTokens; /** */ extern(C) GIcon* function(char** tokens, int numTokens, int versio, GError** err) fromTokens; /** * * Params: * icon = a #GIcon * Returns: a #GVariant, or %NULL when serialization fails. */ extern(C) GVariant* function(GIcon* icon) serialize; } struct GInetAddress { GObject parentInstance; GInetAddressPrivate* priv; } struct GInetAddressClass { GObjectClass parentClass; /** * * Params: * address = a #GInetAddress * Returns: a representation of @address as a string, which should be * freed after use. */ extern(C) char* function(GInetAddress* address) toString; /** * * Params: * address = a #GInetAddress * Returns: a pointer to an internal array of the bytes in @address, * which should not be modified, stored, or freed. The size of this * array can be gotten with g_inet_address_get_native_size(). */ extern(C) ubyte* function(GInetAddress* address) toBytes; } struct GInetAddressMask { GObject parentInstance; GInetAddressMaskPrivate* priv; } struct GInetAddressMaskClass { GObjectClass parentClass; } struct GInetAddressMaskPrivate; struct GInetAddressPrivate; struct GInetSocketAddress { GSocketAddress parentInstance; GInetSocketAddressPrivate* priv; } struct GInetSocketAddressClass { GSocketAddressClass parentClass; } struct GInetSocketAddressPrivate; struct GInitable; /** * Provides an interface for initializing object such that initialization * may fail. * * Since: 2.22 */ struct GInitableIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * initable = a #GInitable. * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: %TRUE if successful. If an error has occurred, this function will * return %FALSE and set @error appropriately if present. * * Throws: GException on failure. */ extern(C) int function(GInitable* initable, GCancellable* cancellable, GError** err) init; } /** * Structure used for scatter/gather data input when receiving multiple * messages or packets in one go. You generally pass in an array of empty * #GInputVectors and the operation will use all the buffers as if they * were one buffer, and will set @bytes_received to the total number of bytes * received across all #GInputVectors. * * This structure closely mirrors `struct mmsghdr` and `struct msghdr` from * the POSIX sockets API (see `man 2 recvmmsg`). * * If @address is non-%NULL then it is set to the source address the message * was received from, and the caller must free it afterwards. * * If @control_messages is non-%NULL then it is set to an array of control * messages received with the message (if any), and the caller must free it * afterwards. @num_control_messages is set to the number of elements in * this array, which may be zero. * * Flags relevant to this message will be returned in @flags. For example, * `MSG_EOR` or `MSG_TRUNC`. * * Since: 2.48 */ struct GInputMessage { /** * return location * for a #GSocketAddress, or %NULL */ GSocketAddress** address; /** * pointer to an * array of input vectors */ GInputVector* vectors; /** * the number of input vectors pointed to by @vectors */ uint numVectors; /** * will be set to the number of bytes that have been * received */ size_t bytesReceived; /** * collection of #GSocketMsgFlags for the received message, * outputted by the call */ int flags; /** * return location for a * caller-allocated array of #GSocketControlMessages, or %NULL */ GSocketControlMessage*** controlMessages; /** * return location for the number of * elements in @control_messages */ uint* numControlMessages; } struct GInputStream { GObject parentInstance; GInputStreamPrivate* priv; } struct GInputStreamClass { GObjectClass parentClass; /** */ extern(C) ptrdiff_t function(GInputStream* stream, void* buffer, size_t count, GCancellable* cancellable, GError** err) readFn; /** * * Params: * stream = a #GInputStream. * count = the number of bytes that will be skipped from the stream * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: Number of bytes skipped, or -1 on error * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GInputStream* stream, size_t count, GCancellable* cancellable, GError** err) skip; /** */ extern(C) int function(GInputStream* stream, GCancellable* cancellable, GError** err) closeFn; /** */ extern(C) void function(GInputStream* stream, void* buffer, size_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) readAsync; /** * * Params: * stream = a #GInputStream. * result = a #GAsyncResult. * Returns: number of bytes read in, or -1 on error, or 0 on end of file. * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GInputStream* stream, GAsyncResult* result, GError** err) readFinish; /** */ extern(C) void function(GInputStream* stream, size_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) skipAsync; /** * * Params: * stream = a #GInputStream. * result = a #GAsyncResult. * Returns: the size of the bytes skipped, or %-1 on error. * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GInputStream* stream, GAsyncResult* result, GError** err) skipFinish; /** */ extern(C) void function(GInputStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) closeAsync; /** * * Params: * stream = a #GInputStream. * result = a #GAsyncResult. * Returns: %TRUE if the stream was closed successfully. * * Throws: GException on failure. */ extern(C) int function(GInputStream* stream, GAsyncResult* result, GError** err) closeFinish; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GInputStreamPrivate; /** * Structure used for scatter/gather data input. * You generally pass in an array of #GInputVectors * and the operation will store the read data starting in the * first buffer, switching to the next as needed. * * Since: 2.22 */ struct GInputVector { /** * Pointer to a buffer where data will be written. */ void* buffer; /** * the available size in @buffer. */ size_t size; } struct GListModel; /** * The virtual function table for #GListModel. * * Since: 2.44 */ struct GListModelInterface { /** * parent #GTypeInterface */ GTypeInterface gIface; /** * * Params: * list = a #GListModel * Returns: the #GType of the items contained in @list. */ extern(C) GType function(GListModel* list) getItemType; /** * * Params: * list = a #GListModel * Returns: the number of items in @list. */ extern(C) uint function(GListModel* list) getNItems; /** */ extern(C) void* function(GListModel* list, uint position) getItem; } struct GListStore; struct GListStoreClass { GObjectClass parentClass; } struct GLoadableIcon; /** * Interface for icons that can be loaded as a stream. */ struct GLoadableIconIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * icon = a #GLoadableIcon. * size = an integer. * type = a location to store the type of the loaded * icon, %NULL to ignore. * cancellable = optional #GCancellable object, %NULL to * ignore. * Returns: a #GInputStream to read the icon from. * * Throws: GException on failure. */ extern(C) GInputStream* function(GLoadableIcon* icon, int size, char** type, GCancellable* cancellable, GError** err) load; /** */ extern(C) void function(GLoadableIcon* icon, int size, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) loadAsync; /** * * Params: * icon = a #GLoadableIcon. * res = a #GAsyncResult. * type = a location to store the type of the loaded * icon, %NULL to ignore. * Returns: a #GInputStream to read the icon from. * * Throws: GException on failure. */ extern(C) GInputStream* function(GLoadableIcon* icon, GAsyncResult* res, char** type, GError** err) loadFinish; } struct GMemoryInputStream { GInputStream parentInstance; GMemoryInputStreamPrivate* priv; } struct GMemoryInputStreamClass { GInputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GMemoryInputStreamPrivate; struct GMemoryOutputStream { GOutputStream parentInstance; GMemoryOutputStreamPrivate* priv; } struct GMemoryOutputStreamClass { GOutputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GMemoryOutputStreamPrivate; struct GMenu; struct GMenuAttributeIter { GObject parentInstance; GMenuAttributeIterPrivate* priv; } struct GMenuAttributeIterClass { GObjectClass parentClass; /** * * Params: * iter = a #GMenuAttributeIter * outName = the type of the attribute * value = the attribute value * Returns: %TRUE on success, or %FALSE if there is no additional * attribute */ extern(C) int function(GMenuAttributeIter* iter, char** outName, GVariant** value) getNext; } struct GMenuAttributeIterPrivate; struct GMenuItem; struct GMenuLinkIter { GObject parentInstance; GMenuLinkIterPrivate* priv; } struct GMenuLinkIterClass { GObjectClass parentClass; /** * * Params: * iter = a #GMenuLinkIter * outLink = the name of the link * value = the linked #GMenuModel * Returns: %TRUE on success, or %FALSE if there is no additional link */ extern(C) int function(GMenuLinkIter* iter, char** outLink, GMenuModel** value) getNext; } struct GMenuLinkIterPrivate; struct GMenuModel { GObject parentInstance; GMenuModelPrivate* priv; } struct GMenuModelClass { GObjectClass parentClass; /** * * Params: * model = a #GMenuModel * Returns: %TRUE if the model is mutable (ie: "items-changed" may be * emitted). */ extern(C) int function(GMenuModel* model) isMutable; /** * * Params: * model = a #GMenuModel * Returns: the number of items */ extern(C) int function(GMenuModel* model) getNItems; /** */ extern(C) void function(GMenuModel* model, int itemIndex, GHashTable** attributes) getItemAttributes; /** * * Params: * model = a #GMenuModel * itemIndex = the index of the item * Returns: a new #GMenuAttributeIter */ extern(C) GMenuAttributeIter* function(GMenuModel* model, int itemIndex) iterateItemAttributes; /** * * Params: * model = a #GMenuModel * itemIndex = the index of the item * attribute = the attribute to query * expectedType = the expected type of the attribute, or * %NULL * Returns: the value of the attribute */ extern(C) GVariant* function(GMenuModel* model, int itemIndex, const(char)* attribute, GVariantType* expectedType) getItemAttributeValue; /** */ extern(C) void function(GMenuModel* model, int itemIndex, GHashTable** links) getItemLinks; /** * * Params: * model = a #GMenuModel * itemIndex = the index of the item * Returns: a new #GMenuLinkIter */ extern(C) GMenuLinkIter* function(GMenuModel* model, int itemIndex) iterateItemLinks; /** * * Params: * model = a #GMenuModel * itemIndex = the index of the item * link = the link to query * Returns: the linked #GMenuModel, or %NULL */ extern(C) GMenuModel* function(GMenuModel* model, int itemIndex, const(char)* link) getItemLink; } struct GMenuModelPrivate; struct GMount; /** * Interface for implementing operations for mounts. */ struct GMountIface { /** * The parent interface. */ GTypeInterface gIface; /** */ extern(C) void function(GMount* mount) changed; /** */ extern(C) void function(GMount* mount) unmounted; /** * * Params: * mount = a #GMount. * Returns: a #GFile. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ extern(C) GFile* function(GMount* mount) getRoot; /** * * Params: * mount = a #GMount. * Returns: the name for the given @mount. * The returned string should be freed with g_free() * when no longer needed. */ extern(C) char* function(GMount* mount) getName; /** * * Params: * mount = a #GMount. * Returns: a #GIcon. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ extern(C) GIcon* function(GMount* mount) getIcon; /** * * Params: * mount = a #GMount. * Returns: the UUID for @mount or %NULL if no UUID can be computed. * The returned string should be freed with g_free() * when no longer needed. */ extern(C) char* function(GMount* mount) getUuid; /** * * Params: * mount = a #GMount. * Returns: a #GVolume or %NULL if @mount is not associated with a volume. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ extern(C) GVolume* function(GMount* mount) getVolume; /** * * Params: * mount = a #GMount. * Returns: a #GDrive or %NULL if @mount is not associated with a volume or a drive. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ extern(C) GDrive* function(GMount* mount) getDrive; /** * * Params: * mount = a #GMount. * Returns: %TRUE if the @mount can be unmounted. */ extern(C) int function(GMount* mount) canUnmount; /** * * Params: * mount = a #GMount. * Returns: %TRUE if the @mount can be ejected. */ extern(C) int function(GMount* mount) canEject; /** */ extern(C) void function(GMount* mount, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) unmount; /** * * Params: * mount = a #GMount. * result = a #GAsyncResult. * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GMount* mount, GAsyncResult* result, GError** err) unmountFinish; /** */ extern(C) void function(GMount* mount, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) eject; /** * * Params: * mount = a #GMount. * result = a #GAsyncResult. * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GMount* mount, GAsyncResult* result, GError** err) ejectFinish; /** */ extern(C) void function(GMount* mount, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) remount; /** * * Params: * mount = a #GMount. * result = a #GAsyncResult. * Returns: %TRUE if the mount was successfully remounted. %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GMount* mount, GAsyncResult* result, GError** err) remountFinish; /** */ extern(C) void function(GMount* mount, int forceRescan, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) guessContentType; /** * * Params: * mount = a #GMount * result = a #GAsyncResult * Returns: a %NULL-terminated array of content types or %NULL on error. * Caller should free this array with g_strfreev() when done with it. * * Throws: GException on failure. */ extern(C) char** function(GMount* mount, GAsyncResult* result, GError** err) guessContentTypeFinish; /** * * Params: * mount = a #GMount * forceRescan = Whether to force a rescan of the content. * Otherwise a cached result will be used if available * cancellable = optional #GCancellable object, %NULL to ignore * Returns: a %NULL-terminated array of content types or %NULL on error. * Caller should free this array with g_strfreev() when done with it. * * Throws: GException on failure. */ extern(C) char** function(GMount* mount, int forceRescan, GCancellable* cancellable, GError** err) guessContentTypeSync; /** */ extern(C) void function(GMount* mount) preUnmount; /** */ extern(C) void function(GMount* mount, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) unmountWithOperation; /** * * Params: * mount = a #GMount. * result = a #GAsyncResult. * Returns: %TRUE if the mount was successfully unmounted. %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GMount* mount, GAsyncResult* result, GError** err) unmountWithOperationFinish; /** */ extern(C) void function(GMount* mount, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) ejectWithOperation; /** * * Params: * mount = a #GMount. * result = a #GAsyncResult. * Returns: %TRUE if the mount was successfully ejected. %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GMount* mount, GAsyncResult* result, GError** err) ejectWithOperationFinish; /** * * Params: * mount = a #GMount. * Returns: a #GFile. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ extern(C) GFile* function(GMount* mount) getDefaultLocation; /** * * Params: * mount = A #GMount. * Returns: Sorting key for @mount or %NULL if no such key is available. */ extern(C) const(char)* function(GMount* mount) getSortKey; /** * * Params: * mount = a #GMount. * Returns: a #GIcon. * The returned object should be unreffed with * g_object_unref() when no longer needed. */ extern(C) GIcon* function(GMount* mount) getSymbolicIcon; } struct GMountOperation { GObject parentInstance; GMountOperationPrivate* priv; } struct GMountOperationClass { GObjectClass parentClass; /** */ extern(C) void function(GMountOperation* op, const(char)* message, const(char)* defaultUser, const(char)* defaultDomain, GAskPasswordFlags flags) askPassword; /** */ extern(C) void function(GMountOperation* op, const(char)* message, const(char)* choices) askQuestion; /** */ extern(C) void function(GMountOperation* op, GMountOperationResult result) reply; /** */ extern(C) void function(GMountOperation* op) aborted; /** */ extern(C) void function(GMountOperation* op, const(char)* message, GArray* processes, const(char)* choices) showProcesses; /** */ extern(C) void function(GMountOperation* op, const(char)* message, long timeLeft, long bytesLeft) showUnmountProgress; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; /** */ extern(C) void function() GReserved7; /** */ extern(C) void function() GReserved8; /** */ extern(C) void function() GReserved9; } struct GMountOperationPrivate; /** * An socket address of some unknown native type. */ struct GNativeSocketAddress; struct GNativeVolumeMonitor { GVolumeMonitor parentInstance; } struct GNativeVolumeMonitorClass { GVolumeMonitorClass parentClass; /** */ extern(C) GMount* function(const(char)* mountPath, GCancellable* cancellable) getMountForMountPath; } struct GNetworkAddress { GObject parentInstance; GNetworkAddressPrivate* priv; } struct GNetworkAddressClass { GObjectClass parentClass; } struct GNetworkAddressPrivate; struct GNetworkMonitor; /** * The virtual function table for #GNetworkMonitor. * * Since: 2.32 */ struct GNetworkMonitorInterface { /** * The parent interface. */ GTypeInterface gIface; /** */ extern(C) void function(GNetworkMonitor* monitor, int available) networkChanged; /** * * Params: * monitor = a #GNetworkMonitor * connectable = a #GSocketConnectable * cancellable = a #GCancellable, or %NULL * Returns: %TRUE if @connectable is reachable, %FALSE if not. * * Throws: GException on failure. */ extern(C) int function(GNetworkMonitor* monitor, GSocketConnectable* connectable, GCancellable* cancellable, GError** err) canReach; /** */ extern(C) void function(GNetworkMonitor* monitor, GSocketConnectable* connectable, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) canReachAsync; /** * * Params: * monitor = a #GNetworkMonitor * result = a #GAsyncResult * Returns: %TRUE if network is reachable, %FALSE if not. * * Throws: GException on failure. */ extern(C) int function(GNetworkMonitor* monitor, GAsyncResult* result, GError** err) canReachFinish; } struct GNetworkService { GObject parentInstance; GNetworkServicePrivate* priv; } struct GNetworkServiceClass { GObjectClass parentClass; } struct GNetworkServicePrivate; struct GNotification; /** * Structure used for scatter/gather data output when sending multiple * messages or packets in one go. You generally pass in an array of * #GOutputVectors and the operation will use all the buffers as if they * were one buffer. * * If @address is %NULL then the message is sent to the default receiver * (as previously set by g_socket_connect()). * * Since: 2.44 */ struct GOutputMessage { /** * a #GSocketAddress, or %NULL */ GSocketAddress* address; /** * pointer to an array of output vectors */ GOutputVector* vectors; /** * the number of output vectors pointed to by @vectors. */ uint numVectors; /** * initialize to 0. Will be set to the number of bytes * that have been sent */ uint bytesSent; /** * a pointer * to an array of #GSocketControlMessages, or %NULL. */ GSocketControlMessage** controlMessages; /** * number of elements in @control_messages. */ uint numControlMessages; } struct GOutputStream { GObject parentInstance; GOutputStreamPrivate* priv; } struct GOutputStreamClass { GObjectClass parentClass; /** * * Params: * stream = a #GOutputStream. * buffer = the buffer containing the data to write. * count = the number of bytes to write * cancellable = optional cancellable object * Returns: Number of bytes written, or -1 on error * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GOutputStream* stream, void* buffer, size_t count, GCancellable* cancellable, GError** err) writeFn; /** * * Params: * stream = a #GOutputStream. * source = a #GInputStream. * flags = a set of #GOutputStreamSpliceFlags. * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: a #gssize containing the size of the data spliced, or * -1 if an error occurred. Note that if the number of bytes * spliced is greater than %G_MAXSSIZE, then that will be * returned, and there is no way to determine the actual number * of bytes spliced. * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GOutputStream* stream, GInputStream* source, GOutputStreamSpliceFlags flags, GCancellable* cancellable, GError** err) splice; /** * * Params: * stream = a #GOutputStream. * cancellable = optional cancellable object * Returns: %TRUE on success, %FALSE on error * * Throws: GException on failure. */ extern(C) int function(GOutputStream* stream, GCancellable* cancellable, GError** err) flush; /** */ extern(C) int function(GOutputStream* stream, GCancellable* cancellable, GError** err) closeFn; /** */ extern(C) void function(GOutputStream* stream, void* buffer, size_t count, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) writeAsync; /** * * Params: * stream = a #GOutputStream. * result = a #GAsyncResult. * Returns: a #gssize containing the number of bytes written to the stream. * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GOutputStream* stream, GAsyncResult* result, GError** err) writeFinish; /** */ extern(C) void function(GOutputStream* stream, GInputStream* source, GOutputStreamSpliceFlags flags, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) spliceAsync; /** * * Params: * stream = a #GOutputStream. * result = a #GAsyncResult. * Returns: a #gssize of the number of bytes spliced. Note that if the * number of bytes spliced is greater than %G_MAXSSIZE, then that * will be returned, and there is no way to determine the actual * number of bytes spliced. * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GOutputStream* stream, GAsyncResult* result, GError** err) spliceFinish; /** */ extern(C) void function(GOutputStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) flushAsync; /** * * Params: * stream = a #GOutputStream. * result = a GAsyncResult. * Returns: %TRUE if flush operation succeeded, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GOutputStream* stream, GAsyncResult* result, GError** err) flushFinish; /** */ extern(C) void function(GOutputStream* stream, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) closeAsync; /** * * Params: * stream = a #GOutputStream. * result = a #GAsyncResult. * Returns: %TRUE if stream was successfully closed, %FALSE otherwise. * * Throws: GException on failure. */ extern(C) int function(GOutputStream* stream, GAsyncResult* result, GError** err) closeFinish; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; /** */ extern(C) void function() GReserved7; /** */ extern(C) void function() GReserved8; } struct GOutputStreamPrivate; /** * Structure used for scatter/gather data output. * You generally pass in an array of #GOutputVectors * and the operation will use all the buffers as if they were * one buffer. * * Since: 2.22 */ struct GOutputVector { /** * Pointer to a buffer of data to read. */ void* buffer; /** * the size of @buffer. */ size_t size; } struct GPermission { GObject parentInstance; GPermissionPrivate* priv; } struct GPermissionClass { GObjectClass parentClass; /** * * Params: * permission = a #GPermission instance * cancellable = a #GCancellable, or %NULL * Returns: %TRUE if the permission was successfully acquired * * Throws: GException on failure. */ extern(C) int function(GPermission* permission, GCancellable* cancellable, GError** err) acquire; /** */ extern(C) void function(GPermission* permission, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) acquireAsync; /** * * Params: * permission = a #GPermission instance * result = the #GAsyncResult given to the #GAsyncReadyCallback * Returns: %TRUE if the permission was successfully acquired * * Throws: GException on failure. */ extern(C) int function(GPermission* permission, GAsyncResult* result, GError** err) acquireFinish; /** * * Params: * permission = a #GPermission instance * cancellable = a #GCancellable, or %NULL * Returns: %TRUE if the permission was successfully released * * Throws: GException on failure. */ extern(C) int function(GPermission* permission, GCancellable* cancellable, GError** err) release; /** */ extern(C) void function(GPermission* permission, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) releaseAsync; /** * * Params: * permission = a #GPermission instance * result = the #GAsyncResult given to the #GAsyncReadyCallback * Returns: %TRUE if the permission was successfully released * * Throws: GException on failure. */ extern(C) int function(GPermission* permission, GAsyncResult* result, GError** err) releaseFinish; void*[16] reserved; } struct GPermissionPrivate; struct GPollableInputStream; /** * The interface for pollable input streams. * * The default implementation of @can_poll always returns %TRUE. * * The default implementation of @read_nonblocking calls * g_pollable_input_stream_is_readable(), and then calls * g_input_stream_read() if it returns %TRUE. This means you only need * to override it if it is possible that your @is_readable * implementation may return %TRUE when the stream is not actually * readable. * * Since: 2.28 */ struct GPollableInputStreamInterface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * stream = a #GPollableInputStream. * Returns: %TRUE if @stream is pollable, %FALSE if not. */ extern(C) int function(GPollableInputStream* stream) canPoll; /** * * Params: * stream = a #GPollableInputStream. * Returns: %TRUE if @stream is readable, %FALSE if not. If an error * has occurred on @stream, this will result in * g_pollable_input_stream_is_readable() returning %TRUE, and the * next attempt to read will return the error. */ extern(C) int function(GPollableInputStream* stream) isReadable; /** * * Params: * stream = a #GPollableInputStream. * cancellable = a #GCancellable, or %NULL * Returns: a new #GSource */ extern(C) GSource* function(GPollableInputStream* stream, GCancellable* cancellable) createSource; /** * * Params: * stream = a #GPollableInputStream * buffer = a buffer to * read data into (which should be at least @count bytes long). * count = the number of bytes you want to read * Returns: the number of bytes read, or -1 on error (including * %G_IO_ERROR_WOULD_BLOCK). * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GPollableInputStream* stream, void* buffer, size_t count, GError** err) readNonblocking; } struct GPollableOutputStream; /** * The interface for pollable output streams. * * The default implementation of @can_poll always returns %TRUE. * * The default implementation of @write_nonblocking calls * g_pollable_output_stream_is_writable(), and then calls * g_output_stream_write() if it returns %TRUE. This means you only * need to override it if it is possible that your @is_writable * implementation may return %TRUE when the stream is not actually * writable. * * Since: 2.28 */ struct GPollableOutputStreamInterface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * stream = a #GPollableOutputStream. * Returns: %TRUE if @stream is pollable, %FALSE if not. */ extern(C) int function(GPollableOutputStream* stream) canPoll; /** * * Params: * stream = a #GPollableOutputStream. * Returns: %TRUE if @stream is writable, %FALSE if not. If an error * has occurred on @stream, this will result in * g_pollable_output_stream_is_writable() returning %TRUE, and the * next attempt to write will return the error. */ extern(C) int function(GPollableOutputStream* stream) isWritable; /** * * Params: * stream = a #GPollableOutputStream. * cancellable = a #GCancellable, or %NULL * Returns: a new #GSource */ extern(C) GSource* function(GPollableOutputStream* stream, GCancellable* cancellable) createSource; /** * * Params: * stream = a #GPollableOutputStream * buffer = a buffer to write * data from * count = the number of bytes you want to write * Returns: the number of bytes written, or -1 on error (including * %G_IO_ERROR_WOULD_BLOCK). * * Throws: GException on failure. */ extern(C) ptrdiff_t function(GPollableOutputStream* stream, void* buffer, size_t count, GError** err) writeNonblocking; } struct GPropertyAction; struct GProxy; struct GProxyAddress { GInetSocketAddress parentInstance; GProxyAddressPrivate* priv; } /** * Class structure for #GProxyAddress. * * Since: 2.26 */ struct GProxyAddressClass { GInetSocketAddressClass parentClass; } struct GProxyAddressEnumerator { GSocketAddressEnumerator parentInstance; GProxyAddressEnumeratorPrivate* priv; } struct GProxyAddressEnumeratorClass { GSocketAddressEnumeratorClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; /** */ extern(C) void function() GReserved7; } struct GProxyAddressEnumeratorPrivate; struct GProxyAddressPrivate; /** * Provides an interface for handling proxy connection and payload. * * Since: 2.26 */ struct GProxyInterface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * proxy = a #GProxy * connection = a #GIOStream * proxyAddress = a #GProxyAddress * cancellable = a #GCancellable * Returns: a #GIOStream that will replace @connection. This might * be the same as @connection, in which case a reference * will be added. * * Throws: GException on failure. */ extern(C) GIOStream* function(GProxy* proxy, GIOStream* connection, GProxyAddress* proxyAddress, GCancellable* cancellable, GError** err) connect; /** */ extern(C) void function(GProxy* proxy, GIOStream* connection, GProxyAddress* proxyAddress, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) connectAsync; /** * * Params: * proxy = a #GProxy * result = a #GAsyncResult * Returns: a #GIOStream. * * Throws: GException on failure. */ extern(C) GIOStream* function(GProxy* proxy, GAsyncResult* result, GError** err) connectFinish; /** * * Params: * proxy = a #GProxy * Returns: %TRUE if hostname resolution is supported. */ extern(C) int function(GProxy* proxy) supportsHostname; } struct GProxyResolver; /** * The virtual function table for #GProxyResolver. */ struct GProxyResolverInterface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * resolver = a #GProxyResolver * Returns: %TRUE if @resolver is supported. */ extern(C) int function(GProxyResolver* resolver) isSupported; /** * * Params: * resolver = a #GProxyResolver * uri = a URI representing the destination to connect to * cancellable = a #GCancellable, or %NULL * Returns: A * NULL-terminated array of proxy URIs. Must be freed * with g_strfreev(). * * Throws: GException on failure. */ extern(C) char** function(GProxyResolver* resolver, const(char)* uri, GCancellable* cancellable, GError** err) lookup; /** */ extern(C) void function(GProxyResolver* resolver, const(char)* uri, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) lookupAsync; /** * * Params: * resolver = a #GProxyResolver * result = the result passed to your #GAsyncReadyCallback * Returns: A * NULL-terminated array of proxy URIs. Must be freed * with g_strfreev(). * * Throws: GException on failure. */ extern(C) char** function(GProxyResolver* resolver, GAsyncResult* result, GError** err) lookupFinish; } struct GRemoteActionGroup; /** * The virtual function table for #GRemoteActionGroup. * * Since: 2.32 */ struct GRemoteActionGroupInterface { GTypeInterface gIface; /** */ extern(C) void function(GRemoteActionGroup* remote, const(char)* actionName, GVariant* parameter, GVariant* platformData) activateActionFull; /** */ extern(C) void function(GRemoteActionGroup* remote, const(char)* actionName, GVariant* value, GVariant* platformData) changeActionStateFull; } struct GResolver { GObject parentInstance; GResolverPrivate* priv; } struct GResolverClass { GObjectClass parentClass; /** */ extern(C) void function(GResolver* resolver) reload; /** * * Params: * resolver = a #GResolver * hostname = the hostname to look up * cancellable = a #GCancellable, or %NULL * Returns: a non-empty #GList * of #GInetAddress, or %NULL on error. You * must unref each of the addresses and free the list when you are * done with it. (You can use g_resolver_free_addresses() to do this.) * * Throws: GException on failure. */ extern(C) GList* function(GResolver* resolver, const(char)* hostname, GCancellable* cancellable, GError** err) lookupByName; /** */ extern(C) void function(GResolver* resolver, const(char)* hostname, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) lookupByNameAsync; /** * * Params: * resolver = a #GResolver * result = the result passed to your #GAsyncReadyCallback * Returns: a #GList * of #GInetAddress, or %NULL on error. See g_resolver_lookup_by_name() * for more details. * * Throws: GException on failure. */ extern(C) GList* function(GResolver* resolver, GAsyncResult* result, GError** err) lookupByNameFinish; /** * * Params: * resolver = a #GResolver * address = the address to reverse-resolve * cancellable = a #GCancellable, or %NULL * Returns: a hostname (either ASCII-only, or in ASCII-encoded * form), or %NULL on error. * * Throws: GException on failure. */ extern(C) char* function(GResolver* resolver, GInetAddress* address, GCancellable* cancellable, GError** err) lookupByAddress; /** */ extern(C) void function(GResolver* resolver, GInetAddress* address, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) lookupByAddressAsync; /** * * Params: * resolver = a #GResolver * result = the result passed to your #GAsyncReadyCallback * Returns: a hostname (either ASCII-only, or in ASCII-encoded * form), or %NULL on error. * * Throws: GException on failure. */ extern(C) char* function(GResolver* resolver, GAsyncResult* result, GError** err) lookupByAddressFinish; /** */ extern(C) GList* function(GResolver* resolver, const(char)* rrname, GCancellable* cancellable, GError** err) lookupService; /** */ extern(C) void function(GResolver* resolver, const(char)* rrname, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) lookupServiceAsync; /** * * Params: * resolver = a #GResolver * result = the result passed to your #GAsyncReadyCallback * Returns: a non-empty #GList of * #GSrvTarget, or %NULL on error. See g_resolver_lookup_service() for more * details. * * Throws: GException on failure. */ extern(C) GList* function(GResolver* resolver, GAsyncResult* result, GError** err) lookupServiceFinish; /** * * Params: * resolver = a #GResolver * rrname = the DNS name to lookup the record for * recordType = the type of DNS record to lookup * cancellable = a #GCancellable, or %NULL * Returns: a non-empty #GList of * #GVariant, or %NULL on error. You must free each of the records and the list * when you are done with it. (You can use g_list_free_full() with * g_variant_unref() to do this.) * * Throws: GException on failure. */ extern(C) GList* function(GResolver* resolver, const(char)* rrname, GResolverRecordType recordType, GCancellable* cancellable, GError** err) lookupRecords; /** */ extern(C) void function(GResolver* resolver, const(char)* rrname, GResolverRecordType recordType, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) lookupRecordsAsync; /** * * Params: * resolver = a #GResolver * result = the result passed to your #GAsyncReadyCallback * Returns: a non-empty #GList of * #GVariant, or %NULL on error. You must free each of the records and the list * when you are done with it. (You can use g_list_free_full() with * g_variant_unref() to do this.) * * Throws: GException on failure. */ extern(C) GList* function(GResolver* resolver, GAsyncResult* result, GError** err) lookupRecordsFinish; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; } struct GResolverPrivate; struct GResource; struct GSeekable; /** * Provides an interface for implementing seekable functionality on I/O Streams. */ struct GSeekableIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * seekable = a #GSeekable. * Returns: the offset from the beginning of the buffer. */ extern(C) long function(GSeekable* seekable) tell; /** * * Params: * seekable = a #GSeekable. * Returns: %TRUE if @seekable can be seeked. %FALSE otherwise. */ extern(C) int function(GSeekable* seekable) canSeek; /** * * Params: * seekable = a #GSeekable. * offset = a #goffset. * type = a #GSeekType. * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: %TRUE if successful. If an error * has occurred, this function will return %FALSE and set @error * appropriately if present. * * Throws: GException on failure. */ extern(C) int function(GSeekable* seekable, long offset, GSeekType type, GCancellable* cancellable, GError** err) seek; /** * * Params: * seekable = a #GSeekable. * Returns: %TRUE if the stream can be truncated, %FALSE otherwise. */ extern(C) int function(GSeekable* seekable) canTruncate; /** * * Params: * seekable = a #GSeekable. * offset = a #goffset. * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: %TRUE if successful. If an error * has occurred, this function will return %FALSE and set @error * appropriately if present. * * Throws: GException on failure. */ extern(C) int function(GSeekable* seekable, long offset, GCancellable* cancellable, GError** err) truncateFn; } struct GSettings { GObject parentInstance; GSettingsPrivate* priv; } struct GSettingsBackend { GObject parentInstance; GSettingsBackendPrivate* priv; } /** * Class structure for #GSettingsBackend. */ struct GSettingsBackendClass { GObjectClass parentClass; /** */ extern(C) GVariant* function(GSettingsBackend* backend, const(char)* key, GVariantType* expectedType, int defaultValue) read; /** */ extern(C) int function(GSettingsBackend* backend, const(char)* key) getWritable; /** */ extern(C) int function(GSettingsBackend* backend, const(char)* key, GVariant* value, void* originTag) write; /** */ extern(C) int function(GSettingsBackend* backend, GTree* tree, void* originTag) writeTree; /** */ extern(C) void function(GSettingsBackend* backend, const(char)* key, void* originTag) reset; /** */ extern(C) void function(GSettingsBackend* backend, const(char)* name) subscribe; /** */ extern(C) void function(GSettingsBackend* backend, const(char)* name) unsubscribe; /** */ extern(C) void function(GSettingsBackend* backend) sync; /** */ extern(C) GPermission* function(GSettingsBackend* backend, const(char)* path) getPermission; /** */ extern(C) GVariant* function(GSettingsBackend* backend, const(char)* key, GVariantType* expectedType) readUserValue; void*[23] padding; } struct GSettingsBackendPrivate; struct GSettingsClass { GObjectClass parentClass; /** */ extern(C) void function(GSettings* settings, const(char)* key) writableChanged; /** */ extern(C) void function(GSettings* settings, const(char)* key) changed; /** */ extern(C) int function(GSettings* settings, GQuark key) writableChangeEvent; /** */ extern(C) int function(GSettings* settings, GQuark* keys, int nKeys) changeEvent; void*[20] padding; } struct GSettingsPrivate; struct GSettingsSchema; struct GSettingsSchemaKey; struct GSettingsSchemaSource; struct GSimpleAction; struct GSimpleActionGroup { GObject parentInstance; GSimpleActionGroupPrivate* priv; } struct GSimpleActionGroupClass { GObjectClass parentClass; void*[12] padding; } struct GSimpleActionGroupPrivate; struct GSimpleAsyncResult; struct GSimpleAsyncResultClass; struct GSimpleIOStream; struct GSimplePermission; struct GSimpleProxyResolver { GObject parentInstance; GSimpleProxyResolverPrivate* priv; } struct GSimpleProxyResolverClass { GObjectClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GSimpleProxyResolverPrivate; struct GSocket { GObject parentInstance; GSocketPrivate* priv; } struct GSocketAddress { GObject parentInstance; } struct GSocketAddressClass { GObjectClass parentClass; /** * * Params: * address = a #GSocketAddress * Returns: the socket family type of @address */ extern(C) GSocketFamily function(GSocketAddress* address) getFamily; /** * * Params: * address = a #GSocketAddress * Returns: the size of the native struct sockaddr that * @address represents */ extern(C) ptrdiff_t function(GSocketAddress* address) getNativeSize; /** * * Params: * address = a #GSocketAddress * dest = a pointer to a memory location that will contain the native * struct sockaddr * destlen = the size of @dest. Must be at least as large as * g_socket_address_get_native_size() * Returns: %TRUE if @dest was filled in, %FALSE on error * * Throws: GException on failure. */ extern(C) int function(GSocketAddress* address, void* dest, size_t destlen, GError** err) toNative; } struct GSocketAddressEnumerator { GObject parentInstance; } struct GSocketAddressEnumeratorClass { GObjectClass parentClass; /** * * Params: * enumerator = a #GSocketAddressEnumerator * cancellable = optional #GCancellable object, %NULL to ignore. * Returns: a #GSocketAddress (owned by the caller), or %NULL on * error (in which case *@error will be set) or if there are no * more addresses. * * Throws: GException on failure. */ extern(C) GSocketAddress* function(GSocketAddressEnumerator* enumerator, GCancellable* cancellable, GError** err) next; /** */ extern(C) void function(GSocketAddressEnumerator* enumerator, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) nextAsync; /** * * Params: * enumerator = a #GSocketAddressEnumerator * result = a #GAsyncResult * Returns: a #GSocketAddress (owned by the caller), or %NULL on * error (in which case *@error will be set) or if there are no * more addresses. * * Throws: GException on failure. */ extern(C) GSocketAddress* function(GSocketAddressEnumerator* enumerator, GAsyncResult* result, GError** err) nextFinish; } struct GSocketClass { GObjectClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; /** */ extern(C) void function() GReserved7; /** */ extern(C) void function() GReserved8; /** */ extern(C) void function() GReserved9; /** */ extern(C) void function() GReserved10; } struct GSocketClient { GObject parentInstance; GSocketClientPrivate* priv; } struct GSocketClientClass { GObjectClass parentClass; /** */ extern(C) void function(GSocketClient* client, GSocketClientEvent event, GSocketConnectable* connectable, GIOStream* connection) event; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; } struct GSocketClientPrivate; struct GSocketConnectable; /** * Provides an interface for returning a #GSocketAddressEnumerator * and #GProxyAddressEnumerator */ struct GSocketConnectableIface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * connectable = a #GSocketConnectable * Returns: a new #GSocketAddressEnumerator. */ extern(C) GSocketAddressEnumerator* function(GSocketConnectable* connectable) enumerate; /** * * Params: * connectable = a #GSocketConnectable * Returns: a new #GSocketAddressEnumerator. */ extern(C) GSocketAddressEnumerator* function(GSocketConnectable* connectable) proxyEnumerate; /** * * Params: * connectable = a #GSocketConnectable * Returns: the formatted string */ extern(C) char* function(GSocketConnectable* connectable) toString; } struct GSocketConnection { GIOStream parentInstance; GSocketConnectionPrivate* priv; } struct GSocketConnectionClass { GIOStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; } struct GSocketConnectionPrivate; struct GSocketControlMessage { GObject parentInstance; GSocketControlMessagePrivate* priv; } /** * Class structure for #GSocketControlMessage. */ struct GSocketControlMessageClass { GObjectClass parentClass; /** * * Params: * message = a #GSocketControlMessage * Returns: The number of bytes required. */ extern(C) size_t function(GSocketControlMessage* message) getSize; /** * * Params: * message = a #GSocketControlMessage * Returns: an integer describing the level */ extern(C) int function(GSocketControlMessage* message) getLevel; /** */ extern(C) int function(GSocketControlMessage* message) getType; /** */ extern(C) void function(GSocketControlMessage* message, void* data) serialize; /** */ extern(C) GSocketControlMessage* function(int level, int type, size_t size, void* data) deserialize; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GSocketControlMessagePrivate; struct GSocketListener { GObject parentInstance; GSocketListenerPrivate* priv; } /** * Class structure for #GSocketListener. */ struct GSocketListenerClass { GObjectClass parentClass; /** */ extern(C) void function(GSocketListener* listener) changed; /** */ extern(C) void function(GSocketListener* listener, GSocketListenerEvent* event, GSocket* socket) event; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; } struct GSocketListenerPrivate; struct GSocketPrivate; struct GSocketService { GSocketListener parentInstance; GSocketServicePrivate* priv; } /** * Class structure for #GSocketService. */ struct GSocketServiceClass { GSocketListenerClass parentClass; /** */ extern(C) int function(GSocketService* service, GSocketConnection* connection, GObject* sourceObject) incoming; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; } struct GSocketServicePrivate; struct GSrvTarget; struct GStaticResource { ubyte* data; size_t dataLen; GResource* resource; GStaticResource* next; void* padding; } struct GSubprocess; struct GSubprocessLauncher; struct GTask; struct GTaskClass; struct GTcpConnection { GSocketConnection parentInstance; GTcpConnectionPrivate* priv; } struct GTcpConnectionClass { GSocketConnectionClass parentClass; } struct GTcpConnectionPrivate; struct GTcpWrapperConnection { GTcpConnection parentInstance; GTcpWrapperConnectionPrivate* priv; } struct GTcpWrapperConnectionClass { GTcpConnectionClass parentClass; } struct GTcpWrapperConnectionPrivate; struct GTestDBus; struct GThemedIcon; struct GThemedIconClass; struct GThreadedSocketService { GSocketService parentInstance; GThreadedSocketServicePrivate* priv; } struct GThreadedSocketServiceClass { GSocketServiceClass parentClass; /** */ extern(C) int function(GThreadedSocketService* service, GSocketConnection* connection, GObject* sourceObject) run; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GThreadedSocketServicePrivate; struct GTlsBackend; /** * Provides an interface for describing TLS-related types. * * Since: 2.28 */ struct GTlsBackendInterface { /** * The parent interface. */ GTypeInterface gIface; /** * * Params: * backend = the #GTlsBackend * Returns: whether or not TLS is supported */ extern(C) int function(GTlsBackend* backend) supportsTls; /** */ extern(C) GType function() getCertificateType; /** */ extern(C) GType function() getClientConnectionType; /** */ extern(C) GType function() getServerConnectionType; /** */ extern(C) GType function() getFileDatabaseType; /** * * Params: * backend = the #GTlsBackend * Returns: the default database, which should be * unreffed when done. */ extern(C) GTlsDatabase* function(GTlsBackend* backend) getDefaultDatabase; /** * * Params: * backend = the #GTlsBackend * Returns: whether DTLS is supported */ extern(C) int function(GTlsBackend* backend) supportsDtls; /** */ extern(C) GType function() getDtlsClientConnectionType; /** */ extern(C) GType function() getDtlsServerConnectionType; } struct GTlsCertificate { GObject parentInstance; GTlsCertificatePrivate* priv; } struct GTlsCertificateClass { GObjectClass parentClass; /** * * Params: * cert = a #GTlsCertificate * identity = the expected peer identity * trustedCa = the certificate of a trusted authority * Returns: the appropriate #GTlsCertificateFlags */ extern(C) GTlsCertificateFlags function(GTlsCertificate* cert, GSocketConnectable* identity, GTlsCertificate* trustedCa) verify; void*[8] padding; } struct GTlsCertificatePrivate; struct GTlsClientConnection; /** * vtable for a #GTlsClientConnection implementation. * * Since: 2.26 */ struct GTlsClientConnectionInterface { /** * The parent interface. */ GTypeInterface gIface; /** */ extern(C) void function(GTlsClientConnection* conn, GTlsClientConnection* source) copySessionState; } struct GTlsConnection { GIOStream parentInstance; GTlsConnectionPrivate* priv; } struct GTlsConnectionClass { GIOStreamClass parentClass; /** */ extern(C) int function(GTlsConnection* connection, GTlsCertificate* peerCert, GTlsCertificateFlags errors) acceptCertificate; /** * * Params: * conn = a #GTlsConnection * cancellable = a #GCancellable, or %NULL * Returns: success or failure * * Throws: GException on failure. */ extern(C) int function(GTlsConnection* conn, GCancellable* cancellable, GError** err) handshake; /** */ extern(C) void function(GTlsConnection* conn, int ioPriority, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) handshakeAsync; /** * * Params: * conn = a #GTlsConnection * result = a #GAsyncResult. * Returns: %TRUE on success, %FALSE on failure, in which * case @error will be set. * * Throws: GException on failure. */ extern(C) int function(GTlsConnection* conn, GAsyncResult* result, GError** err) handshakeFinish; void*[8] padding; } struct GTlsConnectionPrivate; struct GTlsDatabase { GObject parentInstance; GTlsDatabasePrivate* priv; } /** * The class for #GTlsDatabase. Derived classes should implement the various * virtual methods. _async and _finish methods have a default * implementation that runs the corresponding sync method in a thread. * * Since: 2.30 */ struct GTlsDatabaseClass { GObjectClass parentClass; /** * * Params: * self = a #GTlsDatabase * chain = a #GTlsCertificate chain * purpose = the purpose that this certificate chain will be used for. * identity = the expected peer identity * interaction = used to interact with the user if necessary * flags = additional verify flags * cancellable = a #GCancellable, or %NULL * Returns: the appropriate #GTlsCertificateFlags which represents the * result of verification. * * Throws: GException on failure. */ extern(C) GTlsCertificateFlags function(GTlsDatabase* self, GTlsCertificate* chain, const(char)* purpose, GSocketConnectable* identity, GTlsInteraction* interaction, GTlsDatabaseVerifyFlags flags, GCancellable* cancellable, GError** err) verifyChain; /** */ extern(C) void function(GTlsDatabase* self, GTlsCertificate* chain, const(char)* purpose, GSocketConnectable* identity, GTlsInteraction* interaction, GTlsDatabaseVerifyFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) verifyChainAsync; /** * * Params: * self = a #GTlsDatabase * result = a #GAsyncResult. * Returns: the appropriate #GTlsCertificateFlags which represents the * result of verification. * * Throws: GException on failure. */ extern(C) GTlsCertificateFlags function(GTlsDatabase* self, GAsyncResult* result, GError** err) verifyChainFinish; /** * * Params: * self = a #GTlsDatabase * certificate = certificate for which to create a handle. * Returns: a newly allocated string containing the * handle. */ extern(C) char* function(GTlsDatabase* self, GTlsCertificate* certificate) createCertificateHandle; /** * * Params: * self = a #GTlsDatabase * handle = a certificate handle * interaction = used to interact with the user if necessary * flags = Flags which affect the lookup. * cancellable = a #GCancellable, or %NULL * Returns: a newly allocated * #GTlsCertificate, or %NULL. Use g_object_unref() to release the certificate. * * Throws: GException on failure. */ extern(C) GTlsCertificate* function(GTlsDatabase* self, const(char)* handle, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** err) lookupCertificateForHandle; /** */ extern(C) void function(GTlsDatabase* self, const(char)* handle, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) lookupCertificateForHandleAsync; /** * * Params: * self = a #GTlsDatabase * result = a #GAsyncResult. * Returns: a newly allocated #GTlsCertificate object. * Use g_object_unref() to release the certificate. * * Throws: GException on failure. */ extern(C) GTlsCertificate* function(GTlsDatabase* self, GAsyncResult* result, GError** err) lookupCertificateForHandleFinish; /** * * Params: * self = a #GTlsDatabase * certificate = a #GTlsCertificate * interaction = used to interact with the user if necessary * flags = flags which affect the lookup operation * cancellable = a #GCancellable, or %NULL * Returns: a newly allocated issuer #GTlsCertificate, * or %NULL. Use g_object_unref() to release the certificate. * * Throws: GException on failure. */ extern(C) GTlsCertificate* function(GTlsDatabase* self, GTlsCertificate* certificate, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** err) lookupCertificateIssuer; /** */ extern(C) void function(GTlsDatabase* self, GTlsCertificate* certificate, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) lookupCertificateIssuerAsync; /** * * Params: * self = a #GTlsDatabase * result = a #GAsyncResult. * Returns: a newly allocated issuer #GTlsCertificate, * or %NULL. Use g_object_unref() to release the certificate. * * Throws: GException on failure. */ extern(C) GTlsCertificate* function(GTlsDatabase* self, GAsyncResult* result, GError** err) lookupCertificateIssuerFinish; /** * * Params: * self = a #GTlsDatabase * issuerRawDn = a #GByteArray which holds the DER encoded issuer DN. * interaction = used to interact with the user if necessary * flags = Flags which affect the lookup operation. * cancellable = a #GCancellable, or %NULL * Returns: a newly allocated list of #GTlsCertificate * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. * * Throws: GException on failure. */ extern(C) GList* function(GTlsDatabase* self, GByteArray* issuerRawDn, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GError** err) lookupCertificatesIssuedBy; /** */ extern(C) void function(GTlsDatabase* self, GByteArray* issuerRawDn, GTlsInteraction* interaction, GTlsDatabaseLookupFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) lookupCertificatesIssuedByAsync; /** * * Params: * self = a #GTlsDatabase * result = a #GAsyncResult. * Returns: a newly allocated list of #GTlsCertificate * objects. Use g_object_unref() on each certificate, and g_list_free() on the release the list. * * Throws: GException on failure. */ extern(C) GList* function(GTlsDatabase* self, GAsyncResult* result, GError** err) lookupCertificatesIssuedByFinish; void*[16] padding; } struct GTlsDatabasePrivate; struct GTlsFileDatabase; /** * Provides an interface for #GTlsFileDatabase implementations. */ struct GTlsFileDatabaseInterface { /** * The parent interface. */ GTypeInterface gIface; void*[8] padding; } struct GTlsInteraction { GObject parentInstance; GTlsInteractionPrivate* priv; } /** * The class for #GTlsInteraction. Derived classes implement the various * virtual interaction methods to handle TLS interactions. * * Derived classes can choose to implement whichever interactions methods they'd * like to support by overriding those virtual methods in their class * initialization function. If a derived class implements an async method, * it must also implement the corresponding finish method. * * The synchronous interaction methods should implement to display modal dialogs, * and the asynchronous methods to display modeless dialogs. * * If the user cancels an interaction, then the result should be * %G_TLS_INTERACTION_FAILED and the error should be set with a domain of * %G_IO_ERROR and code of %G_IO_ERROR_CANCELLED. * * Since: 2.30 */ struct GTlsInteractionClass { GObjectClass parentClass; /** * * Params: * interaction = a #GTlsInteraction object * password = a #GTlsPassword object * cancellable = an optional #GCancellable cancellation object * Returns: The status of the ask password interaction. * * Throws: GException on failure. */ extern(C) GTlsInteractionResult function(GTlsInteraction* interaction, GTlsPassword* password, GCancellable* cancellable, GError** err) askPassword; /** */ extern(C) void function(GTlsInteraction* interaction, GTlsPassword* password, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) askPasswordAsync; /** * * Params: * interaction = a #GTlsInteraction object * result = the result passed to the callback * Returns: The status of the ask password interaction. * * Throws: GException on failure. */ extern(C) GTlsInteractionResult function(GTlsInteraction* interaction, GAsyncResult* result, GError** err) askPasswordFinish; /** * * Params: * interaction = a #GTlsInteraction object * connection = a #GTlsConnection object * flags = flags providing more information about the request * cancellable = an optional #GCancellable cancellation object * Returns: The status of the request certificate interaction. * * Throws: GException on failure. */ extern(C) GTlsInteractionResult function(GTlsInteraction* interaction, GTlsConnection* connection, GTlsCertificateRequestFlags flags, GCancellable* cancellable, GError** err) requestCertificate; /** */ extern(C) void function(GTlsInteraction* interaction, GTlsConnection* connection, GTlsCertificateRequestFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) requestCertificateAsync; /** * * Params: * interaction = a #GTlsInteraction object * result = the result passed to the callback * Returns: The status of the request certificate interaction. * * Throws: GException on failure. */ extern(C) GTlsInteractionResult function(GTlsInteraction* interaction, GAsyncResult* result, GError** err) requestCertificateFinish; void*[21] padding; } struct GTlsInteractionPrivate; struct GTlsPassword { GObject parentInstance; GTlsPasswordPrivate* priv; } /** * Class structure for #GTlsPassword. */ struct GTlsPasswordClass { GObjectClass parentClass; /** * * Params: * password = a #GTlsPassword object * length = location to place the length of the password. * Returns: The password value (owned by the password object). */ extern(C) char* function(GTlsPassword* password, size_t* length) getValue; /** */ extern(C) void function(GTlsPassword* password, char* value, ptrdiff_t length, GDestroyNotify destroy) setValue; /** */ extern(C) const(char)* function(GTlsPassword* password) getDefaultWarning; void*[4] padding; } struct GTlsPasswordPrivate; struct GTlsServerConnection; /** * vtable for a #GTlsServerConnection implementation. * * Since: 2.26 */ struct GTlsServerConnectionInterface { /** * The parent interface. */ GTypeInterface gIface; } struct GUnixConnection { GSocketConnection parentInstance; GUnixConnectionPrivate* priv; } struct GUnixConnectionClass { GSocketConnectionClass parentClass; } struct GUnixConnectionPrivate; struct GUnixCredentialsMessage { GSocketControlMessage parentInstance; GUnixCredentialsMessagePrivate* priv; } /** * Class structure for #GUnixCredentialsMessage. * * Since: 2.26 */ struct GUnixCredentialsMessageClass { GSocketControlMessageClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; } struct GUnixCredentialsMessagePrivate; struct GUnixFDList { GObject parentInstance; GUnixFDListPrivate* priv; } struct GUnixFDListClass { GObjectClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GUnixFDListPrivate; struct GUnixFDMessage { GSocketControlMessage parentInstance; GUnixFDMessagePrivate* priv; } struct GUnixFDMessageClass { GSocketControlMessageClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; } struct GUnixFDMessagePrivate; struct GUnixInputStream { GInputStream parentInstance; GUnixInputStreamPrivate* priv; } struct GUnixInputStreamClass { GInputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GUnixInputStreamPrivate; /** * Defines a Unix mount entry (e.g. /media/cdrom). * This corresponds roughly to a mtab entry. */ struct GUnixMountEntry; struct GUnixMountMonitor; struct GUnixMountMonitorClass; struct GUnixMountPoint; struct GUnixOutputStream { GOutputStream parentInstance; GUnixOutputStreamPrivate* priv; } struct GUnixOutputStreamClass { GOutputStreamClass parentClass; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; } struct GUnixOutputStreamPrivate; struct GUnixSocketAddress { GSocketAddress parentInstance; GUnixSocketAddressPrivate* priv; } struct GUnixSocketAddressClass { GSocketAddressClass parentClass; } struct GUnixSocketAddressPrivate; struct GVfs { GObject parentInstance; } struct GVfsClass { GObjectClass parentClass; /** * * Params: * vfs = a #GVfs. * Returns: %TRUE if construction of the @vfs was successful * and it is now active. */ extern(C) int function(GVfs* vfs) isActive; /** * * Params: * vfs = a #GVfs. * path = a string containing a VFS path. * Returns: a #GFile. * Free the returned object with g_object_unref(). */ extern(C) GFile* function(GVfs* vfs, const(char)* path) getFileForPath; /** * * Params: * vfs = a#GVfs. * uri = a string containing a URI * Returns: a #GFile. * Free the returned object with g_object_unref(). */ extern(C) GFile* function(GVfs* vfs, const(char)* uri) getFileForUri; /** * * Params: * vfs = a #GVfs. * Returns: a %NULL-terminated array of strings. * The returned array belongs to GIO and must * not be freed or modified. */ extern(C) char** function(GVfs* vfs) getSupportedUriSchemes; /** * * Params: * vfs = a #GVfs. * parseName = a string to be parsed by the VFS module. * Returns: a #GFile for the given @parse_name. * Free the returned object with g_object_unref(). */ extern(C) GFile* function(GVfs* vfs, const(char)* parseName) parseName; /** */ extern(C) void function(GVfs* vfs, const(char)* filename, ulong device, GFileAttributeMatcher* attributeMatcher, GFileInfo* info, GCancellable* cancellable, void** extraData, GDestroyNotify* freeExtraData) localFileAddInfo; /** */ extern(C) void function(GVfs* vfs, GFileAttributeInfoList* list) addWritableNamespaces; /** */ extern(C) int function(GVfs* vfs, const(char)* filename, GFileInfo* info, GFileQueryInfoFlags flags, GCancellable* cancellable, GError** err) localFileSetAttributes; /** */ extern(C) void function(GVfs* vfs, const(char)* filename) localFileRemoved; /** */ extern(C) void function(GVfs* vfs, const(char)* source, const(char)* dest) localFileMoved; /** */ extern(C) GIcon* function(GVfs* vfs, GVariant* value) deserializeIcon; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; } struct GVolume; /** * Interface for implementing operations for mountable volumes. */ struct GVolumeIface { /** * The parent interface. */ GTypeInterface gIface; /** */ extern(C) void function(GVolume* volume) changed; /** */ extern(C) void function(GVolume* volume) removed; /** * * Params: * volume = a #GVolume * Returns: the name for the given @volume. The returned string should * be freed with g_free() when no longer needed. */ extern(C) char* function(GVolume* volume) getName; /** * * Params: * volume = a #GVolume * Returns: a #GIcon. * The returned object should be unreffed with g_object_unref() * when no longer needed. */ extern(C) GIcon* function(GVolume* volume) getIcon; /** * * Params: * volume = a #GVolume * Returns: the UUID for @volume or %NULL if no UUID can be computed. * The returned string should be freed with g_free() * when no longer needed. */ extern(C) char* function(GVolume* volume) getUuid; /** * * Params: * volume = a #GVolume * Returns: a #GDrive or %NULL if @volume is not * associated with a drive. The returned object should be unreffed * with g_object_unref() when no longer needed. */ extern(C) GDrive* function(GVolume* volume) getDrive; /** * * Params: * volume = a #GVolume * Returns: a #GMount or %NULL if @volume isn't mounted. * The returned object should be unreffed with g_object_unref() * when no longer needed. */ extern(C) GMount* function(GVolume* volume) getMount; /** * * Params: * volume = a #GVolume * Returns: %TRUE if the @volume can be mounted. %FALSE otherwise */ extern(C) int function(GVolume* volume) canMount; /** * * Params: * volume = a #GVolume * Returns: %TRUE if the @volume can be ejected. %FALSE otherwise */ extern(C) int function(GVolume* volume) canEject; /** */ extern(C) void function(GVolume* volume, GMountMountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) mountFn; /** * * Params: * volume = a #GVolume * result = a #GAsyncResult * Returns: %TRUE, %FALSE if operation failed * * Throws: GException on failure. */ extern(C) int function(GVolume* volume, GAsyncResult* result, GError** err) mountFinish; /** */ extern(C) void function(GVolume* volume, GMountUnmountFlags flags, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) eject; /** * * Params: * volume = pointer to a #GVolume * result = a #GAsyncResult * Returns: %TRUE, %FALSE if operation failed * * Throws: GException on failure. */ extern(C) int function(GVolume* volume, GAsyncResult* result, GError** err) ejectFinish; /** * * Params: * volume = a #GVolume * kind = the kind of identifier to return * Returns: a newly allocated string containing the * requested identfier, or %NULL if the #GVolume * doesn't have this kind of identifier */ extern(C) char* function(GVolume* volume, const(char)* kind) getIdentifier; /** * * Params: * volume = a #GVolume * Returns: a %NULL-terminated array * of strings containing kinds of identifiers. Use g_strfreev() to free. */ extern(C) char** function(GVolume* volume) enumerateIdentifiers; /** * * Params: * volume = a #GVolume * Returns: %TRUE if the volume should be automatically mounted */ extern(C) int function(GVolume* volume) shouldAutomount; /** * * Params: * volume = a #GVolume * Returns: the activation root of @volume * or %NULL. Use g_object_unref() to free. */ extern(C) GFile* function(GVolume* volume) getActivationRoot; /** */ extern(C) void function(GVolume* volume, GMountUnmountFlags flags, GMountOperation* mountOperation, GCancellable* cancellable, GAsyncReadyCallback callback, void* userData) ejectWithOperation; /** * * Params: * volume = a #GVolume * result = a #GAsyncResult * Returns: %TRUE if the volume was successfully ejected. %FALSE otherwise * * Throws: GException on failure. */ extern(C) int function(GVolume* volume, GAsyncResult* result, GError** err) ejectWithOperationFinish; /** * * Params: * volume = a #GVolume * Returns: Sorting key for @volume or %NULL if no such key is available */ extern(C) const(char)* function(GVolume* volume) getSortKey; /** * * Params: * volume = a #GVolume * Returns: a #GIcon. * The returned object should be unreffed with g_object_unref() * when no longer needed. */ extern(C) GIcon* function(GVolume* volume) getSymbolicIcon; } struct GVolumeMonitor { GObject parentInstance; void* priv; } struct GVolumeMonitorClass { GObjectClass parentClass; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GVolume* volume) volumeAdded; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GVolume* volume) volumeRemoved; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GVolume* volume) volumeChanged; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GMount* mount) mountAdded; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GMount* mount) mountRemoved; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GMount* mount) mountPreUnmount; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GMount* mount) mountChanged; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GDrive* drive) driveConnected; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GDrive* drive) driveDisconnected; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GDrive* drive) driveChanged; /** */ extern(C) int function() isSupported; /** * * Params: * volumeMonitor = a #GVolumeMonitor. * Returns: a #GList of connected #GDrive objects. */ extern(C) GList* function(GVolumeMonitor* volumeMonitor) getConnectedDrives; /** * * Params: * volumeMonitor = a #GVolumeMonitor. * Returns: a #GList of #GVolume objects. */ extern(C) GList* function(GVolumeMonitor* volumeMonitor) getVolumes; /** * * Params: * volumeMonitor = a #GVolumeMonitor. * Returns: a #GList of #GMount objects. */ extern(C) GList* function(GVolumeMonitor* volumeMonitor) getMounts; /** * * Params: * volumeMonitor = a #GVolumeMonitor. * uuid = the UUID to look for * Returns: a #GVolume or %NULL if no such volume is available. * Free the returned object with g_object_unref(). */ extern(C) GVolume* function(GVolumeMonitor* volumeMonitor, const(char)* uuid) getVolumeForUuid; /** * * Params: * volumeMonitor = a #GVolumeMonitor. * uuid = the UUID to look for * Returns: a #GMount or %NULL if no such mount is available. * Free the returned object with g_object_unref(). */ extern(C) GMount* function(GVolumeMonitor* volumeMonitor, const(char)* uuid) getMountForUuid; /** */ extern(C) GVolume* function(GMount* mount, GVolumeMonitor* volumeMonitor) adoptOrphanMount; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GDrive* drive) driveEjectButton; /** */ extern(C) void function(GVolumeMonitor* volumeMonitor, GDrive* drive) driveStopButton; /** */ extern(C) void function() GReserved1; /** */ extern(C) void function() GReserved2; /** */ extern(C) void function() GReserved3; /** */ extern(C) void function() GReserved4; /** */ extern(C) void function() GReserved5; /** */ extern(C) void function() GReserved6; } struct GZlibCompressor; struct GZlibCompressorClass { GObjectClass parentClass; } struct GZlibDecompressor; struct GZlibDecompressorClass { GObjectClass parentClass; } /** * Type definition for a function that will be called back when an asynchronous * operation within GIO has been completed. * * Params: * sourceObject = the object the asynchronous operation was started with. * res = a #GAsyncResult. * userData = user data passed to the callback. */ public alias extern(C) void function(GObject* sourceObject, GAsyncResult* res, void* userData) GAsyncReadyCallback; /** * Invoked when a connection to a message bus has been obtained. * * Params: * connection = The #GDBusConnection to a message bus. * name = The name that is requested to be owned. * userData = User data passed to g_bus_own_name(). * * Since: 2.26 */ public alias extern(C) void function(GDBusConnection* connection, const(char)* name, void* userData) GBusAcquiredCallback; /** * Invoked when the name is acquired. * * Params: * connection = The #GDBusConnection on which to acquired the name. * name = The name being owned. * userData = User data passed to g_bus_own_name() or g_bus_own_name_on_connection(). * * Since: 2.26 */ public alias extern(C) void function(GDBusConnection* connection, const(char)* name, void* userData) GBusNameAcquiredCallback; /** * Invoked when the name being watched is known to have to have a owner. * * Params: * connection = The #GDBusConnection the name is being watched on. * name = The name being watched. * nameOwner = Unique name of the owner of the name being watched. * userData = User data passed to g_bus_watch_name(). * * Since: 2.26 */ public alias extern(C) void function(GDBusConnection* connection, const(char)* name, const(char)* nameOwner, void* userData) GBusNameAppearedCallback; /** * Invoked when the name is lost or @connection has been closed. * * Params: * connection = The #GDBusConnection on which to acquire the name or %NULL if * the connection was disconnected. * name = The name being owned. * userData = User data passed to g_bus_own_name() or g_bus_own_name_on_connection(). * * Since: 2.26 */ public alias extern(C) void function(GDBusConnection* connection, const(char)* name, void* userData) GBusNameLostCallback; /** * Invoked when the name being watched is known not to have to have a owner. * * This is also invoked when the #GDBusConection on which the watch was * established has been closed. In that case, @connection will be * %NULL. * * Params: * connection = The #GDBusConnection the name is being watched on, or * %NULL. * name = The name being watched. * userData = User data passed to g_bus_watch_name(). * * Since: 2.26 */ public alias extern(C) void function(GDBusConnection* connection, const(char)* name, void* userData) GBusNameVanishedCallback; /** * This is the function type of the callback used for the #GSource * returned by g_cancellable_source_new(). * * Params: * cancellable = the #GCancellable * userData = data passed in by the user. * * Returns: it should return %FALSE if the source should be removed. * * Since: 2.28 */ public alias extern(C) int function(GCancellable* cancellable, void* userData) GCancellableSourceFunc; /** * The type of the @get_property function in #GDBusInterfaceVTable. * * Params: * connection = A #GDBusConnection. * sender = The unique bus name of the remote caller. * objectPath = The object path that the method was invoked on. * interfaceName = The D-Bus interface name for the property. * propertyName = The name of the property to get the value of. * error = Return location for error. * userData = The @user_data #gpointer passed to g_dbus_connection_register_object(). * * Returns: A #GVariant with the value for @property_name or %NULL if * @error is set. If the returned #GVariant is floating, it is * consumed - otherwise its reference count is decreased by one. * * Since: 2.26 */ public alias extern(C) GVariant* function(GDBusConnection* connection, const(char)* sender, const(char)* objectPath, const(char)* interfaceName, const(char)* propertyName, GError** error, void* userData) GDBusInterfaceGetPropertyFunc; /** * The type of the @method_call function in #GDBusInterfaceVTable. * * Params: * connection = A #GDBusConnection. * sender = The unique bus name of the remote caller. * objectPath = The object path that the method was invoked on. * interfaceName = The D-Bus interface name the method was invoked on. * methodName = The name of the method that was invoked. * parameters = A #GVariant tuple with parameters. * invocation = A #GDBusMethodInvocation object that must be used to return a value or error. * userData = The @user_data #gpointer passed to g_dbus_connection_register_object(). * * Since: 2.26 */ public alias extern(C) void function(GDBusConnection* connection, const(char)* sender, const(char)* objectPath, const(char)* interfaceName, const(char)* methodName, GVariant* parameters, GDBusMethodInvocation* invocation, void* userData) GDBusInterfaceMethodCallFunc; /** * The type of the @set_property function in #GDBusInterfaceVTable. * * Params: * connection = A #GDBusConnection. * sender = The unique bus name of the remote caller. * objectPath = The object path that the method was invoked on. * interfaceName = The D-Bus interface name for the property. * propertyName = The name of the property to get the value of. * value = The value to set the property to. * error = Return location for error. * userData = The @user_data #gpointer passed to g_dbus_connection_register_object(). * * Returns: %TRUE if the property was set to @value, %FALSE if @error is set. * * Since: 2.26 */ public alias extern(C) int function(GDBusConnection* connection, const(char)* sender, const(char)* objectPath, const(char)* interfaceName, const(char)* propertyName, GVariant* value, GError** error, void* userData) GDBusInterfaceSetPropertyFunc; /** * Signature for function used in g_dbus_connection_add_filter(). * * A filter function is passed a #GDBusMessage and expected to return * a #GDBusMessage too. Passive filter functions that don't modify the * message can simply return the @message object: * |[ * static GDBusMessage * * passive_filter (GDBusConnection *connection * GDBusMessage *message, * gboolean incoming, * gpointer user_data) * { * /* inspect @message */ * return message; * } * ]| * Filter functions that wants to drop a message can simply return %NULL: * |[ * static GDBusMessage * * drop_filter (GDBusConnection *connection * GDBusMessage *message, * gboolean incoming, * gpointer user_data) * { * if (should_drop_message) * { * g_object_unref (message); * message = NULL; * } * return message; * } * ]| * Finally, a filter function may modify a message by copying it: * |[ * static GDBusMessage * * modifying_filter (GDBusConnection *connection * GDBusMessage *message, * gboolean incoming, * gpointer user_data) * { * GDBusMessage *copy; * GError *error; * * error = NULL; * copy = g_dbus_message_copy (message, &error); * /* handle @error being is set */ * g_object_unref (message); * * /* modify @copy */ * * return copy; * } * ]| * If the returned #GDBusMessage is different from @message and cannot * be sent on @connection (it could use features, such as file * descriptors, not compatible with @connection), then a warning is * logged to standard error. Applications can * check this ahead of time using g_dbus_message_to_blob() passing a * #GDBusCapabilityFlags value obtained from @connection. * * Params: * connection = A #GDBusConnection. * message = A locked #GDBusMessage that the filter function takes ownership of. * incoming = %TRUE if it is a message received from the other peer, %FALSE if it is * a message to be sent to the other peer. * userData = User data passed when adding the filter. * * Returns: A #GDBusMessage that will be freed with * g_object_unref() or %NULL to drop the message. Passive filter * functions can simply return the passed @message object. * * Since: 2.26 */ public alias extern(C) GDBusMessage* function(GDBusConnection* connection, GDBusMessage* message, int incoming, void* userData) GDBusMessageFilterFunction; /** * Function signature for a function used to determine the #GType to * use for an interface proxy (if @interface_name is not %NULL) or * object proxy (if @interface_name is %NULL). * * This function is called in the * [thread-default main loop][g-main-context-push-thread-default] * that @manager was constructed in. * * Params: * manager = A #GDBusObjectManagerClient. * objectPath = The object path of the remote object. * interfaceName = The interface name of the remote object or %NULL if a #GDBusObjectProxy #GType is requested. * userData = User data. * * Returns: A #GType to use for the remote object. The returned type * must be a #GDBusProxy or #GDBusObjectProxy -derived * type. * * Since: 2.30 */ public alias extern(C) GType function(GDBusObjectManagerClient* manager, const(char)* objectPath, const(char)* interfaceName, void* userData) GDBusProxyTypeFunc; /** * Signature for callback function used in g_dbus_connection_signal_subscribe(). * * Params: * connection = A #GDBusConnection. * senderName = The unique bus name of the sender of the signal. * objectPath = The object path that the signal was emitted on. * interfaceName = The name of the interface. * signalName = The name of the signal. * parameters = A #GVariant tuple with parameters for the signal. * userData = User data passed when subscribing to the signal. * * Since: 2.26 */ public alias extern(C) void function(GDBusConnection* connection, const(char)* senderName, const(char)* objectPath, const(char)* interfaceName, const(char)* signalName, GVariant* parameters, void* userData) GDBusSignalCallback; /** * The type of the @dispatch function in #GDBusSubtreeVTable. * * Subtrees are flat. @node, if non-%NULL, is always exactly one * segment of the object path (ie: it never contains a slash). * * Params: * connection = A #GDBusConnection. * sender = The unique bus name of the remote caller. * objectPath = The object path that was registered with g_dbus_connection_register_subtree(). * interfaceName = The D-Bus interface name that the method call or property access is for. * node = A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree. * outUserData = Return location for user data to pass to functions in the returned #GDBusInterfaceVTable (never %NULL). * userData = The @user_data #gpointer passed to g_dbus_connection_register_subtree(). * * Returns: A #GDBusInterfaceVTable or %NULL if you don't want to handle the methods. * * Since: 2.26 */ public alias extern(C) GDBusInterfaceVTable* function(GDBusConnection* connection, const(char)* sender, const(char)* objectPath, const(char)* interfaceName, const(char)* node, void** outUserData, void* userData) GDBusSubtreeDispatchFunc; /** * The type of the @enumerate function in #GDBusSubtreeVTable. * * This function is called when generating introspection data and also * when preparing to dispatch incoming messages in the event that the * %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not * specified (ie: to verify that the object path is valid). * * Hierarchies are not supported; the items that you return should not * contain the '/' character. * * The return value will be freed with g_strfreev(). * * Params: * connection = A #GDBusConnection. * sender = The unique bus name of the remote caller. * objectPath = The object path that was registered with g_dbus_connection_register_subtree(). * userData = The @user_data #gpointer passed to g_dbus_connection_register_subtree(). * * Returns: A newly allocated array of strings for node names that are children of @object_path. * * Since: 2.26 */ public alias extern(C) char** function(GDBusConnection* connection, const(char)* sender, const(char)* objectPath, void* userData) GDBusSubtreeEnumerateFunc; /** * The type of the @introspect function in #GDBusSubtreeVTable. * * Subtrees are flat. @node, if non-%NULL, is always exactly one * segment of the object path (ie: it never contains a slash). * * This function should return %NULL to indicate that there is no object * at this node. * * If this function returns non-%NULL, the return value is expected to * be a %NULL-terminated array of pointers to #GDBusInterfaceInfo * structures describing the interfaces implemented by @node. This * array will have g_dbus_interface_info_unref() called on each item * before being freed with g_free(). * * The difference between returning %NULL and an array containing zero * items is that the standard DBus interfaces will returned to the * remote introspector in the empty array case, but not in the %NULL * case. * * Params: * connection = A #GDBusConnection. * sender = The unique bus name of the remote caller. * objectPath = The object path that was registered with g_dbus_connection_register_subtree(). * node = A node that is a child of @object_path (relative to @object_path) or %NULL for the root of the subtree. * userData = The @user_data #gpointer passed to g_dbus_connection_register_subtree(). * * Returns: A %NULL-terminated array of pointers to #GDBusInterfaceInfo, or %NULL. * * Since: 2.26 */ public alias extern(C) GDBusInterfaceInfo** function(GDBusConnection* connection, const(char)* sender, const(char)* objectPath, const(char)* node, void* userData) GDBusSubtreeIntrospectFunc; /** * This is the function type of the callback used for the #GSource * returned by g_datagram_based_create_source(). * * Params: * datagramBased = the #GDatagramBased * condition = the current condition at the source fired * userData = data passed in by the user * * Returns: %G_SOURCE_REMOVE if the source should be removed, * %G_SOURCE_CONTINUE otherwise * * Since: 2.48 */ public alias extern(C) int function(GDatagramBased* datagramBased, GIOCondition condition, void* userData) GDatagramBasedSourceFunc; /** * During invocation, g_desktop_app_info_launch_uris_as_manager() may * create one or more child processes. This callback is invoked once * for each, providing the process ID. * * Params: * appinfo = a #GDesktopAppInfo * pid = Process identifier * userData = User data */ public alias extern(C) void function(GDesktopAppInfo* appinfo, GPid pid, void* userData) GDesktopAppLaunchCallback; /** * This callback type is used by g_file_measure_disk_usage() to make * periodic progress reports when measuring the amount of disk spaced * used by a directory. * * These calls are made on a best-effort basis and not all types of * #GFile will support them. At the minimum, however, one call will * always be made immediately. * * In the case that there is no support, @reporting will be set to * %FALSE (and the other values undefined) and no further calls will be * made. Otherwise, the @reporting will be %TRUE and the other values * all-zeros during the first (immediate) call. In this way, you can * know which type of progress UI to show without a delay. * * For g_file_measure_disk_usage() the callback is made directly. For * g_file_measure_disk_usage_async() the callback is made via the * default main context of the calling thread (ie: the same way that the * final async result would be reported). * * @current_size is in the same units as requested by the operation (see * %G_FILE_DISK_USAGE_APPARENT_SIZE). * * The frequency of the updates is implementation defined, but is * ideally about once every 200ms. * * The last progress callback may or may not be equal to the final * result. Always check the async result to get the final value. * * Params: * reporting = %TRUE if more reports will come * currentSize = the current cumulative size measurement * numDirs = the number of directories visited so far * numFiles = the number of non-directory files encountered * userData = the data passed to the original request for this callback * * Since: 2.38 */ public alias extern(C) void function(int reporting, ulong currentSize, ulong numDirs, ulong numFiles, void* userData) GFileMeasureProgressCallback; /** * When doing file operations that may take a while, such as moving * a file or copying a file, a progress callback is used to pass how * far along that operation is to the application. * * Params: * currentNumBytes = the current number of bytes in the operation. * totalNumBytes = the total number of bytes in the operation. * userData = user data passed to the callback. */ public alias extern(C) void function(long currentNumBytes, long totalNumBytes, void* userData) GFileProgressCallback; /** * When loading the partial contents of a file with g_file_load_partial_contents_async(), * it may become necessary to determine if any more data from the file should be loaded. * A #GFileReadMoreCallback function facilitates this by returning %TRUE if more data * should be read, or %FALSE otherwise. * * Params: * fileContents = the data as currently read. * fileSize = the size of the data currently read. * callbackData = data passed to the callback. * * Returns: %TRUE if more data should be read back. %FALSE otherwise. */ public alias extern(C) int function(const(char)* fileContents, long fileSize, void* callbackData) GFileReadMoreCallback; /** * I/O Job function. * * Long-running jobs should periodically check the @cancellable * to see if they have been cancelled. * * Params: * job = a #GIOSchedulerJob. * cancellable = optional #GCancellable object, %NULL to ignore. * userData = the data to pass to callback function * * Returns: %TRUE if this function should be called again to * complete the job, %FALSE if the job is complete (or cancelled) */ public alias extern(C) int function(GIOSchedulerJob* job, GCancellable* cancellable, void* userData) GIOSchedulerJobFunc; /** * This is the function type of the callback used for the #GSource * returned by g_pollable_input_stream_create_source() and * g_pollable_output_stream_create_source(). * * Params: * pollableStream = the #GPollableInputStream or #GPollableOutputStream * userData = data passed in by the user. * * Returns: it should return %FALSE if the source should be removed. * * Since: 2.28 */ public alias extern(C) int function(GObject* pollableStream, void* userData) GPollableSourceFunc; /** * Changes the size of the memory block pointed to by @data to * @size bytes. * * The function should have the same semantics as realloc(). * * Params: * data = memory block to reallocate * size = size to reallocate @data to * * Returns: a pointer to the reallocated memory */ public alias extern(C) void* function(void* data, size_t size) GReallocFunc; /** * The type for the function that is used to convert from #GSettings to * an object property. The @value is already initialized to hold values * of the appropriate type. * * Params: * value = return location for the property value * variant = the #GVariant * userData = user data that was specified when the binding was created * * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error */ public alias extern(C) int function(GValue* value, GVariant* variant, void* userData) GSettingsBindGetMapping; /** * The type for the function that is used to convert an object property * value to a #GVariant for storing it in #GSettings. * * Params: * value = a #GValue containing the property value to map * expectedType = the #GVariantType to create * userData = user data that was specified when the binding was created * * Returns: a new #GVariant holding the data from @value, * or %NULL in case of an error */ public alias extern(C) GVariant* function(GValue* value, GVariantType* expectedType, void* userData) GSettingsBindSetMapping; /** * The type of the function that is used to convert from a value stored * in a #GSettings to a value that is useful to the application. * * If the value is successfully mapped, the result should be stored at * @result and %TRUE returned. If mapping fails (for example, if @value * is not in the right format) then %FALSE should be returned. * * If @value is %NULL then it means that the mapping function is being * given a "last chance" to successfully return a valid value. %TRUE * must be returned in this case. * * Params: * value = the #GVariant to map, or %NULL * result = the result of the mapping * userData = the user data that was passed to * g_settings_get_mapped() * * Returns: %TRUE if the conversion succeeded, %FALSE in case of an error */ public alias extern(C) int function(GVariant* value, void** result, void* userData) GSettingsGetMapping; /** * Simple thread function that runs an asynchronous operation and * checks for cancellation. * * Params: * res = a #GSimpleAsyncResult. * object = a #GObject. * cancellable = optional #GCancellable object, %NULL to ignore. */ public alias extern(C) void function(GSimpleAsyncResult* res, GObject* object, GCancellable* cancellable) GSimpleAsyncThreadFunc; /** * This is the function type of the callback used for the #GSource * returned by g_socket_create_source(). * * Params: * socket = the #GSocket * condition = the current condition at the source fired. * userData = data passed in by the user. * * Returns: it should return %FALSE if the source should be removed. * * Since: 2.22 */ public alias extern(C) int function(GSocket* socket, GIOCondition condition, void* userData) GSocketSourceFunc; /** * The prototype for a task function to be run in a thread via * g_task_run_in_thread() or g_task_run_in_thread_sync(). * * If the return-on-cancel flag is set on @task, and @cancellable gets * cancelled, then the #GTask will be completed immediately (as though * g_task_return_error_if_cancelled() had been called), without * waiting for the task function to complete. However, the task * function will continue running in its thread in the background. The * function therefore needs to be careful about how it uses * externally-visible state in this case. See * g_task_set_return_on_cancel() for more details. * * Other than in that case, @task will be completed when the * #GTaskThreadFunc returns, not when it calls a * `g_task_return_` function. * * Params: * task = the #GTask * sourceObject = @task's source object * taskData = @task's task data * cancellable = @task's #GCancellable, or %NULL * * Since: 2.36 */ public alias extern(C) void function(GTask* task, void* sourceObject, void* taskData, GCancellable* cancellable) GTaskThreadFunc; /** * This function type is used by g_vfs_register_uri_scheme() to make it * possible for a client to associate an URI scheme to a different #GFile * implementation. * * The client should return a reference to the new file that has been * created for @uri, or %NULL to continue with the default implementation. * * Params: * vfs = a #GVfs * identifier = the identifier to lookup a #GFile for. This can either * be an URI or a parse name as returned by g_file_get_parse_name() * userData = user data passed to the function * * Returns: a #GFile for @identifier. * * Since: 2.50 */ public alias extern(C) GFile* function(GVfs* vfs, const(char)* identifier, void* userData) GVfsFileLookupFunc; /** * Extension point for default handler to URI association. See * [Extending GIO][extending-gio]. */ enum DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME = "gio-desktop-app-info-lookup"; alias G_DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME = DESKTOP_APP_INFO_LOOKUP_EXTENSION_POINT_NAME; /** * A key in the "access" namespace for checking deletion privileges. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to delete the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_DELETE = "access::can-delete"; alias G_FILE_ATTRIBUTE_ACCESS_CAN_DELETE = FILE_ATTRIBUTE_ACCESS_CAN_DELETE; /** * A key in the "access" namespace for getting execution privileges. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to execute the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE = "access::can-execute"; alias G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE = FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE; /** * A key in the "access" namespace for getting read privileges. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to read the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_READ = "access::can-read"; alias G_FILE_ATTRIBUTE_ACCESS_CAN_READ = FILE_ATTRIBUTE_ACCESS_CAN_READ; /** * A key in the "access" namespace for checking renaming privileges. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to rename the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_RENAME = "access::can-rename"; alias G_FILE_ATTRIBUTE_ACCESS_CAN_RENAME = FILE_ATTRIBUTE_ACCESS_CAN_RENAME; /** * A key in the "access" namespace for checking trashing privileges. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to move the file to * the trash. */ enum FILE_ATTRIBUTE_ACCESS_CAN_TRASH = "access::can-trash"; alias G_FILE_ATTRIBUTE_ACCESS_CAN_TRASH = FILE_ATTRIBUTE_ACCESS_CAN_TRASH; /** * A key in the "access" namespace for getting write privileges. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. * This attribute will be %TRUE if the user is able to write to the file. */ enum FILE_ATTRIBUTE_ACCESS_CAN_WRITE = "access::can-write"; alias G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE = FILE_ATTRIBUTE_ACCESS_CAN_WRITE; /** * A key in the "dos" namespace for checking if the file's archive flag * is set. This attribute is %TRUE if the archive flag is set. This attribute * is only available for DOS file systems. Corresponding #GFileAttributeType * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_DOS_IS_ARCHIVE = "dos::is-archive"; alias G_FILE_ATTRIBUTE_DOS_IS_ARCHIVE = FILE_ATTRIBUTE_DOS_IS_ARCHIVE; /** * A key in the "dos" namespace for checking if the file's backup flag * is set. This attribute is %TRUE if the backup flag is set. This attribute * is only available for DOS file systems. Corresponding #GFileAttributeType * is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_DOS_IS_SYSTEM = "dos::is-system"; alias G_FILE_ATTRIBUTE_DOS_IS_SYSTEM = FILE_ATTRIBUTE_DOS_IS_SYSTEM; /** * A key in the "etag" namespace for getting the value of the file's * entity tag. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_ETAG_VALUE = "etag::value"; alias G_FILE_ATTRIBUTE_ETAG_VALUE = FILE_ATTRIBUTE_ETAG_VALUE; /** * A key in the "filesystem" namespace for getting the number of bytes of free space left on the * file system. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_FILESYSTEM_FREE = "filesystem::free"; alias G_FILE_ATTRIBUTE_FILESYSTEM_FREE = FILE_ATTRIBUTE_FILESYSTEM_FREE; /** * A key in the "filesystem" namespace for checking if the file system * is read only. Is set to %TRUE if the file system is read only. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_FILESYSTEM_READONLY = "filesystem::readonly"; alias G_FILE_ATTRIBUTE_FILESYSTEM_READONLY = FILE_ATTRIBUTE_FILESYSTEM_READONLY; /** * A key in the "filesystem" namespace for checking if the file system * is remote. Is set to %TRUE if the file system is remote. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_FILESYSTEM_REMOTE = "filesystem::remote"; alias G_FILE_ATTRIBUTE_FILESYSTEM_REMOTE = FILE_ATTRIBUTE_FILESYSTEM_REMOTE; /** * A key in the "filesystem" namespace for getting the total size (in bytes) of the file system, * used in g_file_query_filesystem_info(). Corresponding #GFileAttributeType * is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_FILESYSTEM_SIZE = "filesystem::size"; alias G_FILE_ATTRIBUTE_FILESYSTEM_SIZE = FILE_ATTRIBUTE_FILESYSTEM_SIZE; /** * A key in the "filesystem" namespace for getting the file system's type. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_FILESYSTEM_TYPE = "filesystem::type"; alias G_FILE_ATTRIBUTE_FILESYSTEM_TYPE = FILE_ATTRIBUTE_FILESYSTEM_TYPE; /** * A key in the "filesystem" namespace for getting the number of bytes of used on the * file system. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_FILESYSTEM_USED = "filesystem::used"; alias G_FILE_ATTRIBUTE_FILESYSTEM_USED = FILE_ATTRIBUTE_FILESYSTEM_USED; /** * A key in the "filesystem" namespace for hinting a file manager * application whether it should preview (e.g. thumbnail) files on the * file system. The value for this key contain a * #GFilesystemPreviewType. */ enum FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW = "filesystem::use-preview"; alias G_FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW = FILE_ATTRIBUTE_FILESYSTEM_USE_PREVIEW; /** * A key in the "gvfs" namespace that gets the name of the current * GVFS backend in use. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_GVFS_BACKEND = "gvfs::backend"; alias G_FILE_ATTRIBUTE_GVFS_BACKEND = FILE_ATTRIBUTE_GVFS_BACKEND; /** * A key in the "id" namespace for getting a file identifier. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * An example use would be during listing files, to avoid recursive * directory scanning. */ enum FILE_ATTRIBUTE_ID_FILE = "id::file"; alias G_FILE_ATTRIBUTE_ID_FILE = FILE_ATTRIBUTE_ID_FILE; /** * A key in the "id" namespace for getting the file system identifier. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * An example use would be during drag and drop to see if the source * and target are on the same filesystem (default to move) or not (default * to copy). */ enum FILE_ATTRIBUTE_ID_FILESYSTEM = "id::filesystem"; alias G_FILE_ATTRIBUTE_ID_FILESYSTEM = FILE_ATTRIBUTE_ID_FILESYSTEM; /** * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be ejected. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT = "mountable::can-eject"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT = FILE_ATTRIBUTE_MOUNTABLE_CAN_EJECT; /** * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is mountable. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT = "mountable::can-mount"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT = FILE_ATTRIBUTE_MOUNTABLE_CAN_MOUNT; /** * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be polled. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL = "mountable::can-poll"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL = FILE_ATTRIBUTE_MOUNTABLE_CAN_POLL; /** * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_START = "mountable::can-start"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START = FILE_ATTRIBUTE_MOUNTABLE_CAN_START; /** * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be started * degraded. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED = "mountable::can-start-degraded"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED = FILE_ATTRIBUTE_MOUNTABLE_CAN_START_DEGRADED; /** * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) can be stopped. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP = "mountable::can-stop"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP = FILE_ATTRIBUTE_MOUNTABLE_CAN_STOP; /** * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) is unmountable. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT = "mountable::can-unmount"; alias G_FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT = FILE_ATTRIBUTE_MOUNTABLE_CAN_UNMOUNT; /** * A key in the "mountable" namespace for getting the HAL UDI for the mountable * file. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI = "mountable::hal-udi"; alias G_FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI = FILE_ATTRIBUTE_MOUNTABLE_HAL_UDI; /** * A key in the "mountable" namespace for checking if a file (of type G_FILE_TYPE_MOUNTABLE) * is automatically polled for media. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC = "mountable::is-media-check-automatic"; alias G_FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC = FILE_ATTRIBUTE_MOUNTABLE_IS_MEDIA_CHECK_AUTOMATIC; /** * A key in the "mountable" namespace for getting the #GDriveStartStopType. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE = "mountable::start-stop-type"; alias G_FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE = FILE_ATTRIBUTE_MOUNTABLE_START_STOP_TYPE; /** * A key in the "mountable" namespace for getting the unix device. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE = "mountable::unix-device"; alias G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE = FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE; /** * A key in the "mountable" namespace for getting the unix device file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE = "mountable::unix-device-file"; alias G_FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE = FILE_ATTRIBUTE_MOUNTABLE_UNIX_DEVICE_FILE; /** * A key in the "owner" namespace for getting the file owner's group. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_OWNER_GROUP = "owner::group"; alias G_FILE_ATTRIBUTE_OWNER_GROUP = FILE_ATTRIBUTE_OWNER_GROUP; /** * A key in the "owner" namespace for getting the user name of the * file's owner. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_OWNER_USER = "owner::user"; alias G_FILE_ATTRIBUTE_OWNER_USER = FILE_ATTRIBUTE_OWNER_USER; /** * A key in the "owner" namespace for getting the real name of the * user that owns the file. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_OWNER_USER_REAL = "owner::user-real"; alias G_FILE_ATTRIBUTE_OWNER_USER_REAL = FILE_ATTRIBUTE_OWNER_USER_REAL; /** * A key in the "preview" namespace for getting a #GIcon that can be * used to get preview of the file. For example, it may be a low * resolution thumbnail without metadata. Corresponding * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. The value * for this key should contain a #GIcon. */ enum FILE_ATTRIBUTE_PREVIEW_ICON = "preview::icon"; alias G_FILE_ATTRIBUTE_PREVIEW_ICON = FILE_ATTRIBUTE_PREVIEW_ICON; /** * A key in the "recent" namespace for getting time, when the metadata for the * file in `recent:///` was last changed. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_INT64. */ enum FILE_ATTRIBUTE_RECENT_MODIFIED = "recent::modified"; alias G_FILE_ATTRIBUTE_RECENT_MODIFIED = FILE_ATTRIBUTE_RECENT_MODIFIED; /** * A key in the "selinux" namespace for getting the file's SELinux * context. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_STRING. Note that this attribute is only * available if GLib has been built with SELinux support. */ enum FILE_ATTRIBUTE_SELINUX_CONTEXT = "selinux::context"; alias G_FILE_ATTRIBUTE_SELINUX_CONTEXT = FILE_ATTRIBUTE_SELINUX_CONTEXT; /** * A key in the "standard" namespace for getting the amount of disk space * that is consumed by the file (in bytes). This will generally be larger * than the file size (due to block size overhead) but can occasionally be * smaller (for example, for sparse files). * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE = "standard::allocated-size"; alias G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE = FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE; /** * A key in the "standard" namespace for getting the content type of the file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. * The value for this key should contain a valid content type. */ enum FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE = "standard::content-type"; alias G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE = FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE; /** * A key in the "standard" namespace for getting the copy name of the file. * The copy name is an optional version of the name. If available it's always * in UTF8, and corresponds directly to the original filename (only transcoded to * UTF8). This is useful if you want to copy the file to another filesystem that * might have a different encoding. If the filename is not a valid string in the * encoding selected for the filesystem it is in then the copy name will not be set. * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_COPY_NAME = "standard::copy-name"; alias G_FILE_ATTRIBUTE_STANDARD_COPY_NAME = FILE_ATTRIBUTE_STANDARD_COPY_NAME; /** * A key in the "standard" namespace for getting the description of the file. * The description is a utf8 string that describes the file, generally containing * the filename, but can also contain furter information. Example descriptions * could be "filename (on hostname)" for a remote file or "filename (in trash)" * for a file in the trash. This is useful for instance as the window title * when displaying a directory or for a bookmarks menu. * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_DESCRIPTION = "standard::description"; alias G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION = FILE_ATTRIBUTE_STANDARD_DESCRIPTION; /** * A key in the "standard" namespace for getting the display name of the file. * A display name is guaranteed to be in UTF8 and can thus be displayed in * the UI. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME = "standard::display-name"; alias G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME = FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME; /** * A key in the "standard" namespace for edit name of the file. * An edit name is similar to the display name, but it is meant to be * used when you want to rename the file in the UI. The display name * might contain information you don't want in the new filename (such as * "(invalid unicode)" if the filename was in an invalid encoding). * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_EDIT_NAME = "standard::edit-name"; alias G_FILE_ATTRIBUTE_STANDARD_EDIT_NAME = FILE_ATTRIBUTE_STANDARD_EDIT_NAME; /** * A key in the "standard" namespace for getting the fast content type. * The fast content type isn't as reliable as the regular one, as it * only uses the filename to guess it, but it is faster to calculate than the * regular content type. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE = "standard::fast-content-type"; alias G_FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE = FILE_ATTRIBUTE_STANDARD_FAST_CONTENT_TYPE; /** * A key in the "standard" namespace for getting the icon for the file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. * The value for this key should contain a #GIcon. */ enum FILE_ATTRIBUTE_STANDARD_ICON = "standard::icon"; alias G_FILE_ATTRIBUTE_STANDARD_ICON = FILE_ATTRIBUTE_STANDARD_ICON; /** * A key in the "standard" namespace for checking if a file is a backup file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_STANDARD_IS_BACKUP = "standard::is-backup"; alias G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP = FILE_ATTRIBUTE_STANDARD_IS_BACKUP; /** * A key in the "standard" namespace for checking if a file is hidden. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_STANDARD_IS_HIDDEN = "standard::is-hidden"; alias G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN = FILE_ATTRIBUTE_STANDARD_IS_HIDDEN; /** * A key in the "standard" namespace for checking if the file is a symlink. * Typically the actual type is something else, if we followed the symlink * to get the type. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_STANDARD_IS_SYMLINK = "standard::is-symlink"; alias G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK = FILE_ATTRIBUTE_STANDARD_IS_SYMLINK; /** * A key in the "standard" namespace for checking if a file is virtual. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL = "standard::is-virtual"; alias G_FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL = FILE_ATTRIBUTE_STANDARD_IS_VIRTUAL; /** * A key in the "standard" namespace for checking if a file is * volatile. This is meant for opaque, non-POSIX-like backends to * indicate that the URI is not persistent. Applications should look * at #G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET for the persistent URI. * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_STANDARD_IS_VOLATILE = "standard::is-volatile"; alias G_FILE_ATTRIBUTE_STANDARD_IS_VOLATILE = FILE_ATTRIBUTE_STANDARD_IS_VOLATILE; /** * A key in the "standard" namespace for getting the name of the file. * The name is the on-disk filename which may not be in any known encoding, * and can thus not be generally displayed as is. * Use #G_FILE_ATTRIBUTE_STANDARD_DISPLAY_NAME if you need to display the * name in a user interface. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_NAME = "standard::name"; alias G_FILE_ATTRIBUTE_STANDARD_NAME = FILE_ATTRIBUTE_STANDARD_NAME; /** * A key in the "standard" namespace for getting the file's size (in bytes). * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_STANDARD_SIZE = "standard::size"; alias G_FILE_ATTRIBUTE_STANDARD_SIZE = FILE_ATTRIBUTE_STANDARD_SIZE; /** * A key in the "standard" namespace for setting the sort order of a file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_INT32. * An example use would be in file managers, which would use this key * to set the order files are displayed. Files with smaller sort order * should be sorted first, and files without sort order as if sort order * was zero. */ enum FILE_ATTRIBUTE_STANDARD_SORT_ORDER = "standard::sort-order"; alias G_FILE_ATTRIBUTE_STANDARD_SORT_ORDER = FILE_ATTRIBUTE_STANDARD_SORT_ORDER; /** * A key in the "standard" namespace for getting the symbolic icon for the file. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_OBJECT. * The value for this key should contain a #GIcon. */ enum FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON = "standard::symbolic-icon"; alias G_FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON = FILE_ATTRIBUTE_STANDARD_SYMBOLIC_ICON; /** * A key in the "standard" namespace for getting the symlink target, if the file * is a symlink. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET = "standard::symlink-target"; alias G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET = FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET; /** * A key in the "standard" namespace for getting the target URI for the file, in * the case of %G_FILE_TYPE_SHORTCUT or %G_FILE_TYPE_MOUNTABLE files. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_STANDARD_TARGET_URI = "standard::target-uri"; alias G_FILE_ATTRIBUTE_STANDARD_TARGET_URI = FILE_ATTRIBUTE_STANDARD_TARGET_URI; /** * A key in the "standard" namespace for storing file types. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. * The value for this key should contain a #GFileType. */ enum FILE_ATTRIBUTE_STANDARD_TYPE = "standard::type"; alias G_FILE_ATTRIBUTE_STANDARD_TYPE = FILE_ATTRIBUTE_STANDARD_TYPE; /** * A key in the "thumbnail" namespace for checking if thumbnailing failed. * This attribute is %TRUE if thumbnailing failed. Corresponding * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_THUMBNAILING_FAILED = "thumbnail::failed"; alias G_FILE_ATTRIBUTE_THUMBNAILING_FAILED = FILE_ATTRIBUTE_THUMBNAILING_FAILED; /** * A key in the "thumbnail" namespace for checking whether the thumbnail is outdated. * This attribute is %TRUE if the thumbnail is up-to-date with the file it represents, * and %FALSE if the file has been modified since the thumbnail was generated. * * If %G_FILE_ATTRIBUTE_THUMBNAILING_FAILED is %TRUE and this attribute is %FALSE, * it indicates that thumbnailing may be attempted again and may succeed. * * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_THUMBNAIL_IS_VALID = "thumbnail::is-valid"; alias G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID = FILE_ATTRIBUTE_THUMBNAIL_IS_VALID; /** * A key in the "thumbnail" namespace for getting the path to the thumbnail * image. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. */ enum FILE_ATTRIBUTE_THUMBNAIL_PATH = "thumbnail::path"; alias G_FILE_ATTRIBUTE_THUMBNAIL_PATH = FILE_ATTRIBUTE_THUMBNAIL_PATH; /** * A key in the "time" namespace for getting the time the file was last * accessed. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the * file was last accessed, in seconds since the UNIX epoch. */ enum FILE_ATTRIBUTE_TIME_ACCESS = "time::access"; alias G_FILE_ATTRIBUTE_TIME_ACCESS = FILE_ATTRIBUTE_TIME_ACCESS; /** * A key in the "time" namespace for getting the microseconds of the time * the file was last accessed. This should be used in conjunction with * #G_FILE_ATTRIBUTE_TIME_ACCESS. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TIME_ACCESS_USEC = "time::access-usec"; alias G_FILE_ATTRIBUTE_TIME_ACCESS_USEC = FILE_ATTRIBUTE_TIME_ACCESS_USEC; /** * A key in the "time" namespace for getting the time the file was last * changed. Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, * and contains the time since the file was last changed, in seconds since the * UNIX epoch. * * This corresponds to the traditional UNIX ctime. */ enum FILE_ATTRIBUTE_TIME_CHANGED = "time::changed"; alias G_FILE_ATTRIBUTE_TIME_CHANGED = FILE_ATTRIBUTE_TIME_CHANGED; /** * A key in the "time" namespace for getting the microseconds of the time * the file was last changed. This should be used in conjunction with * #G_FILE_ATTRIBUTE_TIME_CHANGED. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TIME_CHANGED_USEC = "time::changed-usec"; alias G_FILE_ATTRIBUTE_TIME_CHANGED_USEC = FILE_ATTRIBUTE_TIME_CHANGED_USEC; /** * A key in the "time" namespace for getting the time the file was created. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64, * and contains the time since the file was created, in seconds since the UNIX * epoch. * * This corresponds to the NTFS ctime. */ enum FILE_ATTRIBUTE_TIME_CREATED = "time::created"; alias G_FILE_ATTRIBUTE_TIME_CREATED = FILE_ATTRIBUTE_TIME_CREATED; /** * A key in the "time" namespace for getting the microseconds of the time * the file was created. This should be used in conjunction with * #G_FILE_ATTRIBUTE_TIME_CREATED. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TIME_CREATED_USEC = "time::created-usec"; alias G_FILE_ATTRIBUTE_TIME_CREATED_USEC = FILE_ATTRIBUTE_TIME_CREATED_USEC; /** * A key in the "time" namespace for getting the time the file was last * modified. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT64, and contains the time since the * file was modified, in seconds since the UNIX epoch. */ enum FILE_ATTRIBUTE_TIME_MODIFIED = "time::modified"; alias G_FILE_ATTRIBUTE_TIME_MODIFIED = FILE_ATTRIBUTE_TIME_MODIFIED; /** * A key in the "time" namespace for getting the microseconds of the time * the file was last modified. This should be used in conjunction with * #G_FILE_ATTRIBUTE_TIME_MODIFIED. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TIME_MODIFIED_USEC = "time::modified-usec"; alias G_FILE_ATTRIBUTE_TIME_MODIFIED_USEC = FILE_ATTRIBUTE_TIME_MODIFIED_USEC; /** * A key in the "trash" namespace. When requested against * items in `trash:///`, will return the date and time when the file * was trashed. The format of the returned string is YYYY-MM-DDThh:mm:ss. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_STRING. */ enum FILE_ATTRIBUTE_TRASH_DELETION_DATE = "trash::deletion-date"; alias G_FILE_ATTRIBUTE_TRASH_DELETION_DATE = FILE_ATTRIBUTE_TRASH_DELETION_DATE; /** * A key in the "trash" namespace. When requested against * `trash:///` returns the number of (toplevel) items in the trash folder. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_TRASH_ITEM_COUNT = "trash::item-count"; alias G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT = FILE_ATTRIBUTE_TRASH_ITEM_COUNT; /** * A key in the "trash" namespace. When requested against * items in `trash:///`, will return the original path to the file before it * was trashed. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_BYTE_STRING. */ enum FILE_ATTRIBUTE_TRASH_ORIG_PATH = "trash::orig-path"; alias G_FILE_ATTRIBUTE_TRASH_ORIG_PATH = FILE_ATTRIBUTE_TRASH_ORIG_PATH; /** * A key in the "unix" namespace for getting the number of blocks allocated * for the file. This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_UNIX_BLOCKS = "unix::blocks"; alias G_FILE_ATTRIBUTE_UNIX_BLOCKS = FILE_ATTRIBUTE_UNIX_BLOCKS; /** * A key in the "unix" namespace for getting the block size for the file * system. This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_BLOCK_SIZE = "unix::block-size"; alias G_FILE_ATTRIBUTE_UNIX_BLOCK_SIZE = FILE_ATTRIBUTE_UNIX_BLOCK_SIZE; /** * A key in the "unix" namespace for getting the device id of the device the * file is located on (see stat() documentation). This attribute is only * available for UNIX file systems. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_DEVICE = "unix::device"; alias G_FILE_ATTRIBUTE_UNIX_DEVICE = FILE_ATTRIBUTE_UNIX_DEVICE; /** * A key in the "unix" namespace for getting the group ID for the file. * This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_GID = "unix::gid"; alias G_FILE_ATTRIBUTE_UNIX_GID = FILE_ATTRIBUTE_UNIX_GID; /** * A key in the "unix" namespace for getting the inode of the file. * This attribute is only available for UNIX file systems. Corresponding * #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT64. */ enum FILE_ATTRIBUTE_UNIX_INODE = "unix::inode"; alias G_FILE_ATTRIBUTE_UNIX_INODE = FILE_ATTRIBUTE_UNIX_INODE; /** * A key in the "unix" namespace for checking if the file represents a * UNIX mount point. This attribute is %TRUE if the file is a UNIX mount * point. This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN. */ enum FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT = "unix::is-mountpoint"; alias G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT = FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT; /** * A key in the "unix" namespace for getting the mode of the file * (e.g. whether the file is a regular file, symlink, etc). See lstat() * documentation. This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_MODE = "unix::mode"; alias G_FILE_ATTRIBUTE_UNIX_MODE = FILE_ATTRIBUTE_UNIX_MODE; /** * A key in the "unix" namespace for getting the number of hard links * for a file. See lstat() documentation. This attribute is only available * for UNIX file systems. Corresponding #GFileAttributeType is * %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_NLINK = "unix::nlink"; alias G_FILE_ATTRIBUTE_UNIX_NLINK = FILE_ATTRIBUTE_UNIX_NLINK; /** * A key in the "unix" namespace for getting the device ID for the file * (if it is a special file). See lstat() documentation. This attribute * is only available for UNIX file systems. Corresponding #GFileAttributeType * is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_RDEV = "unix::rdev"; alias G_FILE_ATTRIBUTE_UNIX_RDEV = FILE_ATTRIBUTE_UNIX_RDEV; /** * A key in the "unix" namespace for getting the user ID for the file. * This attribute is only available for UNIX file systems. * Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_UINT32. */ enum FILE_ATTRIBUTE_UNIX_UID = "unix::uid"; alias G_FILE_ATTRIBUTE_UNIX_UID = FILE_ATTRIBUTE_UNIX_UID; /** * The menu item attribute which holds the action name of the item. Action * names are namespaced with an identifier for the action group in which the * action resides. For example, "win." for window-specific actions and "app." * for application-wide actions. * * See also g_menu_model_get_item_attribute() and g_menu_item_set_attribute(). */ enum MENU_ATTRIBUTE_ACTION = "action"; alias G_MENU_ATTRIBUTE_ACTION = MENU_ATTRIBUTE_ACTION; /** * The menu item attribute that holds the namespace for all action names in * menus that are linked from this item. */ enum MENU_ATTRIBUTE_ACTION_NAMESPACE = "action-namespace"; alias G_MENU_ATTRIBUTE_ACTION_NAMESPACE = MENU_ATTRIBUTE_ACTION_NAMESPACE; /** * The menu item attribute which holds the icon of the item. * * The icon is stored in the format returned by g_icon_serialize(). * * This attribute is intended only to represent 'noun' icons such as * favicons for a webpage, or application icons. It should not be used * for 'verbs' (ie: stock icons). */ enum MENU_ATTRIBUTE_ICON = "icon"; alias G_MENU_ATTRIBUTE_ICON = MENU_ATTRIBUTE_ICON; /** * The menu item attribute which holds the label of the item. */ enum MENU_ATTRIBUTE_LABEL = "label"; alias G_MENU_ATTRIBUTE_LABEL = MENU_ATTRIBUTE_LABEL; /** * The menu item attribute which holds the target with which the item's action * will be activated. * * See also g_menu_item_set_action_and_target() */ enum MENU_ATTRIBUTE_TARGET = "target"; alias G_MENU_ATTRIBUTE_TARGET = MENU_ATTRIBUTE_TARGET; /** * The name of the link that associates a menu item with a section. The linked * menu will usually be shown in place of the menu item, using the item's label * as a header. * * See also g_menu_item_set_link(). */ enum MENU_LINK_SECTION = "section"; alias G_MENU_LINK_SECTION = MENU_LINK_SECTION; /** * The name of the link that associates a menu item with a submenu. * * See also g_menu_item_set_link(). */ enum MENU_LINK_SUBMENU = "submenu"; alias G_MENU_LINK_SUBMENU = MENU_LINK_SUBMENU; enum NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME = "gio-native-volume-monitor"; alias G_NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME = NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME; /** * Extension point for network status monitoring functionality. * See [Extending GIO][extending-gio]. */ enum NETWORK_MONITOR_EXTENSION_POINT_NAME = "gio-network-monitor"; alias G_NETWORK_MONITOR_EXTENSION_POINT_NAME = NETWORK_MONITOR_EXTENSION_POINT_NAME; /** * Extension point for proxy functionality. * See [Extending GIO][extending-gio]. */ enum PROXY_EXTENSION_POINT_NAME = "gio-proxy"; alias G_PROXY_EXTENSION_POINT_NAME = PROXY_EXTENSION_POINT_NAME; /** * Extension point for proxy resolving functionality. * See [Extending GIO][extending-gio]. */ enum PROXY_RESOLVER_EXTENSION_POINT_NAME = "gio-proxy-resolver"; alias G_PROXY_RESOLVER_EXTENSION_POINT_NAME = PROXY_RESOLVER_EXTENSION_POINT_NAME; /** * Extension point for #GSettingsBackend functionality. */ enum SETTINGS_BACKEND_EXTENSION_POINT_NAME = "gsettings-backend"; alias G_SETTINGS_BACKEND_EXTENSION_POINT_NAME = SETTINGS_BACKEND_EXTENSION_POINT_NAME; /** * Extension point for TLS functionality via #GTlsBackend. * See [Extending GIO][extending-gio]. */ enum TLS_BACKEND_EXTENSION_POINT_NAME = "gio-tls-backend"; alias G_TLS_BACKEND_EXTENSION_POINT_NAME = TLS_BACKEND_EXTENSION_POINT_NAME; /** * The purpose used to verify the client certificate in a TLS connection. * Used by TLS servers. */ enum TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT = "1.3.6.1.5.5.7.3.2"; alias G_TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT = TLS_DATABASE_PURPOSE_AUTHENTICATE_CLIENT; /** * The purpose used to verify the server certificate in a TLS connection. This * is the most common purpose in use. Used by TLS clients. */ enum TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER = "1.3.6.1.5.5.7.3.1"; alias G_TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER = TLS_DATABASE_PURPOSE_AUTHENTICATE_SERVER; /** * Extension point for #GVfs functionality. * See [Extending GIO][extending-gio]. */ enum VFS_EXTENSION_POINT_NAME = "gio-vfs"; alias G_VFS_EXTENSION_POINT_NAME = VFS_EXTENSION_POINT_NAME; /** * The string used to obtain the volume class with g_volume_get_identifier(). * * Known volume classes include `device` and `network`. Other classes may * be added in the future. * * This is intended to be used by applications to classify #GVolume * instances into different sections - for example a file manager or * file chooser can use this information to show `network` volumes under * a "Network" heading and `device` volumes under a "Devices" heading. */ enum VOLUME_IDENTIFIER_KIND_CLASS = "class"; alias G_VOLUME_IDENTIFIER_KIND_CLASS = VOLUME_IDENTIFIER_KIND_CLASS; /** * The string used to obtain a Hal UDI with g_volume_get_identifier(). */ enum VOLUME_IDENTIFIER_KIND_HAL_UDI = "hal-udi"; alias G_VOLUME_IDENTIFIER_KIND_HAL_UDI = VOLUME_IDENTIFIER_KIND_HAL_UDI; /** * The string used to obtain a filesystem label with g_volume_get_identifier(). */ enum VOLUME_IDENTIFIER_KIND_LABEL = "label"; alias G_VOLUME_IDENTIFIER_KIND_LABEL = VOLUME_IDENTIFIER_KIND_LABEL; /** * The string used to obtain a NFS mount with g_volume_get_identifier(). */ enum VOLUME_IDENTIFIER_KIND_NFS_MOUNT = "nfs-mount"; alias G_VOLUME_IDENTIFIER_KIND_NFS_MOUNT = VOLUME_IDENTIFIER_KIND_NFS_MOUNT; /** * The string used to obtain a Unix device path with g_volume_get_identifier(). */ enum VOLUME_IDENTIFIER_KIND_UNIX_DEVICE = "unix-device"; alias G_VOLUME_IDENTIFIER_KIND_UNIX_DEVICE = VOLUME_IDENTIFIER_KIND_UNIX_DEVICE; /** * The string used to obtain a UUID with g_volume_get_identifier(). */ enum VOLUME_IDENTIFIER_KIND_UUID = "uuid"; alias G_VOLUME_IDENTIFIER_KIND_UUID = VOLUME_IDENTIFIER_KIND_UUID; /** * Extension point for volume monitor functionality. * See [Extending GIO][extending-gio]. */ enum VOLUME_MONITOR_EXTENSION_POINT_NAME = "gio-volume-monitor"; alias G_VOLUME_MONITOR_EXTENSION_POINT_NAME = VOLUME_MONITOR_EXTENSION_POINT_NAME; GtkD-3.7.5/generated/gtkd/glib/000077500000000000000000000000001324604450400161655ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/glib/ArrayG.d000066400000000000000000000241611324604450400175230ustar00rootroot00000000000000/* * 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 glib.ArrayG; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * Contains the public fields of a GArray. */ public class ArrayG { /** the main Gtk struct */ protected GArray* gArray; protected bool ownedRef; /** Get the main Gtk struct */ public GArray* getArrayGStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gArray; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gArray; } /** * Sets our main struct and passes it to the parent class. */ public this (GArray* gArray, bool ownedRef = false) { this.gArray = gArray; this.ownedRef = ownedRef; } /** * Adds @len elements onto the end of the array. * * Params: * data = a pointer to the elements to append to the end of the array * len = the number of elements to append * * Returns: the #GArray */ public ArrayG appendVals(void* data, uint len) { auto p = g_array_append_vals(gArray, data, len); if(p is null) { return null; } return new ArrayG(cast(GArray*) p); } /** * Frees the memory allocated for the #GArray. If @free_segment is * %TRUE it frees the memory block holding the elements as well and * also each element if @array has a @element_free_func set. Pass * %FALSE if you want to free the #GArray wrapper but preserve the * underlying array for use elsewhere. If the reference count of @array * is greater than one, the #GArray wrapper is preserved but the size * of @array will be set to zero. * * If array elements contain dynamically-allocated memory, they should * be freed separately. * * This function is not thread-safe. If using a #GArray from multiple * threads, use only the atomic g_array_ref() and g_array_unref() * functions. * * Params: * freeSegment = if %TRUE the actual element data is freed as well * * Returns: the element data if @free_segment is %FALSE, otherwise * %NULL. The element data should be freed using g_free(). */ public string free(bool freeSegment) { auto retStr = g_array_free(gArray, freeSegment); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the size of the elements in @array. * * Returns: Size of each element, in bytes * * Since: 2.22 */ public uint getElementSize() { return g_array_get_element_size(gArray); } /** * Inserts @len elements into a #GArray at the given index. * * Params: * index = the index to place the elements at * data = a pointer to the elements to insert * len = the number of elements to insert * * Returns: the #GArray */ public ArrayG insertVals(uint index, void* data, uint len) { auto p = g_array_insert_vals(gArray, index, data, len); if(p is null) { return null; } return new ArrayG(cast(GArray*) p); } /** * Creates a new #GArray with a reference count of 1. * * Params: * zeroTerminated = %TRUE if the array should have an extra element at * the end which is set to 0 * clear = %TRUE if #GArray elements should be automatically cleared * to 0 when they are allocated * elementSize = the size of each element in bytes * * Returns: the new #GArray * * Throws: ConstructionException GTK+ fails to create the object. */ public this(bool zeroTerminated, bool clear, uint elementSize) { auto p = g_array_new(zeroTerminated, clear, elementSize); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GArray*) p); } /** * Adds @len elements onto the start of the array. * * This operation is slower than g_array_append_vals() since the * existing elements in the array have to be moved to make space for * the new elements. * * Params: * data = a pointer to the elements to prepend to the start of the array * len = the number of elements to prepend * * Returns: the #GArray */ public ArrayG prependVals(void* data, uint len) { auto p = g_array_prepend_vals(gArray, data, len); if(p is null) { return null; } return new ArrayG(cast(GArray*) p); } /** * Atomically increments the reference count of @array by one. * This function is thread-safe and may be called from any thread. * * Returns: The passed in #GArray * * Since: 2.22 */ public ArrayG doref() { auto p = g_array_ref(gArray); if(p is null) { return null; } return new ArrayG(cast(GArray*) p); } /** * Removes the element at the given index from a #GArray. The following * elements are moved down one place. * * Params: * index = the index of the element to remove * * Returns: the #GArray */ public ArrayG removeIndex(uint index) { auto p = g_array_remove_index(gArray, index); if(p is null) { return null; } return new ArrayG(cast(GArray*) p); } /** * Removes the element at the given index from a #GArray. The last * element in the array is used to fill in the space, so this function * does not preserve the order of the #GArray. But it is faster than * g_array_remove_index(). * * Params: * index = the index of the element to remove * * Returns: the #GArray */ public ArrayG removeIndexFast(uint index) { auto p = g_array_remove_index_fast(gArray, index); if(p is null) { return null; } return new ArrayG(cast(GArray*) p); } /** * Removes the given number of elements starting at the given index * from a #GArray. The following elements are moved to close the gap. * * Params: * index = the index of the first element to remove * length = the number of elements to remove * * Returns: the #GArray * * Since: 2.4 */ public ArrayG removeRange(uint index, uint length) { auto p = g_array_remove_range(gArray, index, length); if(p is null) { return null; } return new ArrayG(cast(GArray*) p); } /** * Sets a function to clear an element of @array. * * The @clear_func will be called when an element in the array * data segment is removed and when the array is freed and data * segment is deallocated as well. * * Note that in contrast with other uses of #GDestroyNotify * functions, @clear_func is expected to clear the contents of * the array element it is given, but not free the element itself. * * Params: * clearFunc = a function to clear an element of @array * * Since: 2.32 */ public void setClearFunc(GDestroyNotify clearFunc) { g_array_set_clear_func(gArray, clearFunc); } /** * Sets the size of the array, expanding it if necessary. If the array * was created with @clear_ set to %TRUE, the new elements are set to 0. * * Params: * length = the new size of the #GArray * * Returns: the #GArray */ public ArrayG setSize(uint length) { auto p = g_array_set_size(gArray, length); if(p is null) { return null; } return new ArrayG(cast(GArray*) p); } /** * Creates a new #GArray with @reserved_size elements preallocated and * a reference count of 1. This avoids frequent reallocation, if you * are going to add many elements to the array. Note however that the * size of the array is still 0. * * Params: * zeroTerminated = %TRUE if the array should have an extra element at * the end with all bits cleared * clear = %TRUE if all bits in the array should be cleared to 0 on * allocation * elementSize = size of each element in the array * reservedSize = number of elements preallocated * * Returns: the new #GArray */ public static ArrayG sizedNew(bool zeroTerminated, bool clear, uint elementSize, uint reservedSize) { auto p = g_array_sized_new(zeroTerminated, clear, elementSize, reservedSize); if(p is null) { return null; } return new ArrayG(cast(GArray*) p); } /** * Sorts a #GArray using @compare_func which should be a qsort()-style * comparison function (returns less than zero for first arg is less * than second arg, zero for equal, greater zero if first arg is * greater than second arg). * * This is guaranteed to be a stable sort since version 2.32. * * Params: * compareFunc = comparison function */ public void sort(GCompareFunc compareFunc) { g_array_sort(gArray, compareFunc); } /** * Like g_array_sort(), but the comparison function receives an extra * user data argument. * * This is guaranteed to be a stable sort since version 2.32. * * There used to be a comment here about making the sort stable by * using the addresses of the elements in the comparison function. * This did not actually work, so any such code should be removed. * * Params: * compareFunc = comparison function * userData = data to pass to @compare_func */ public void sortWithData(GCompareDataFunc compareFunc, void* userData) { g_array_sort_with_data(gArray, compareFunc, userData); } /** * Atomically decrements the reference count of @array by one. If the * reference count drops to 0, all memory allocated by the array is * released. This function is thread-safe and may be called from any * thread. * * Since: 2.22 */ public void unref() { g_array_unref(gArray); } } GtkD-3.7.5/generated/gtkd/glib/AsyncQueue.d000066400000000000000000000363161324604450400204250ustar00rootroot00000000000000/* * 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 glib.AsyncQueue; private import glib.ConstructionException; private import glib.TimeVal; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The GAsyncQueue struct is an opaque data structure which represents * an asynchronous queue. It should only be accessed through the * g_async_queue_* functions. */ public class AsyncQueue { /** the main Gtk struct */ protected GAsyncQueue* gAsyncQueue; protected bool ownedRef; /** Get the main Gtk struct */ public GAsyncQueue* getAsyncQueueStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gAsyncQueue; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gAsyncQueue; } /** * Sets our main struct and passes it to the parent class. */ public this (GAsyncQueue* gAsyncQueue, bool ownedRef = false) { this.gAsyncQueue = gAsyncQueue; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_async_queue_unref(gAsyncQueue); } /** * Returns the length of the queue. * * Actually this function returns the number of data items in * the queue minus the number of waiting threads, so a negative * value means waiting threads, and a positive value means available * entries in the @queue. A return value of 0 could mean n entries * in the queue and n threads waiting. This can happen due to locking * of the queue or due to scheduling. * * Returns: the length of the @queue */ public int length() { return g_async_queue_length(gAsyncQueue); } /** * Returns the length of the queue. * * Actually this function returns the number of data items in * the queue minus the number of waiting threads, so a negative * value means waiting threads, and a positive value means available * entries in the @queue. A return value of 0 could mean n entries * in the queue and n threads waiting. This can happen due to locking * of the queue or due to scheduling. * * This function must be called while holding the @queue's lock. * * Returns: the length of the @queue. */ public int lengthUnlocked() { return g_async_queue_length_unlocked(gAsyncQueue); } /** * Acquires the @queue's lock. If another thread is already * holding the lock, this call will block until the lock * becomes available. * * Call g_async_queue_unlock() to drop the lock again. * * While holding the lock, you can only call the * g_async_queue_*_unlocked() functions on @queue. Otherwise, * deadlock may occur. */ public void lock() { g_async_queue_lock(gAsyncQueue); } /** * Pops data from the @queue. If @queue is empty, this function * blocks until data becomes available. * * Returns: data from the queue */ public void* pop() { return g_async_queue_pop(gAsyncQueue); } /** * Pops data from the @queue. If @queue is empty, this function * blocks until data becomes available. * * This function must be called while holding the @queue's lock. * * Returns: data from the queue. */ public void* popUnlocked() { return g_async_queue_pop_unlocked(gAsyncQueue); } /** * Pushes the @data into the @queue. @data must not be %NULL. * * Params: * data = @data to push into the @queue */ public void push(void* data) { g_async_queue_push(gAsyncQueue, data); } /** * Pushes the @item into the @queue. @item must not be %NULL. * In contrast to g_async_queue_push(), this function * pushes the new item ahead of the items already in the queue, * so that it will be the next one to be popped off the queue. * * Params: * item = data to push into the @queue * * Since: 2.46 */ public void pushFront(void* item) { g_async_queue_push_front(gAsyncQueue, item); } /** * Pushes the @item into the @queue. @item must not be %NULL. * In contrast to g_async_queue_push_unlocked(), this function * pushes the new item ahead of the items already in the queue, * so that it will be the next one to be popped off the queue. * * This function must be called while holding the @queue's lock. * * Params: * item = data to push into the @queue * * Since: 2.46 */ public void pushFrontUnlocked(void* item) { g_async_queue_push_front_unlocked(gAsyncQueue, item); } /** * Inserts @data into @queue using @func to determine the new * position. * * This function requires that the @queue is sorted before pushing on * new elements, see g_async_queue_sort(). * * This function will lock @queue before it sorts the queue and unlock * it when it is finished. * * For an example of @func see g_async_queue_sort(). * * Params: * data = the @data to push into the @queue * func = the #GCompareDataFunc is used to sort @queue * userData = user data passed to @func. * * Since: 2.10 */ public void pushSorted(void* data, GCompareDataFunc func, void* userData) { g_async_queue_push_sorted(gAsyncQueue, data, func, userData); } /** * Inserts @data into @queue using @func to determine the new * position. * * The sort function @func is passed two elements of the @queue. * It should return 0 if they are equal, a negative value if the * first element should be higher in the @queue or a positive value * if the first element should be lower in the @queue than the second * element. * * This function requires that the @queue is sorted before pushing on * new elements, see g_async_queue_sort(). * * This function must be called while holding the @queue's lock. * * For an example of @func see g_async_queue_sort(). * * Params: * data = the @data to push into the @queue * func = the #GCompareDataFunc is used to sort @queue * userData = user data passed to @func. * * Since: 2.10 */ public void pushSortedUnlocked(void* data, GCompareDataFunc func, void* userData) { g_async_queue_push_sorted_unlocked(gAsyncQueue, data, func, userData); } /** * Pushes the @data into the @queue. @data must not be %NULL. * * This function must be called while holding the @queue's lock. * * Params: * data = @data to push into the @queue */ public void pushUnlocked(void* data) { g_async_queue_push_unlocked(gAsyncQueue, data); } /** * Increases the reference count of the asynchronous @queue by 1. * You do not need to hold the lock to call this function. * * Returns: the @queue that was passed in (since 2.6) */ public AsyncQueue doref() { auto p = g_async_queue_ref(gAsyncQueue); if(p is null) { return null; } return new AsyncQueue(cast(GAsyncQueue*) p); } /** * Increases the reference count of the asynchronous @queue by 1. * * Deprecated: Reference counting is done atomically. * so g_async_queue_ref() can be used regardless of the @queue's * lock. */ public void refUnlocked() { g_async_queue_ref_unlocked(gAsyncQueue); } /** * Remove an item from the queue. * * Params: * item = the data to remove from the @queue * * Returns: %TRUE if the item was removed * * Since: 2.46 */ public bool remove(void* item) { return g_async_queue_remove(gAsyncQueue, item) != 0; } /** * Remove an item from the queue. * * This function must be called while holding the @queue's lock. * * Params: * item = the data to remove from the @queue * * Returns: %TRUE if the item was removed * * Since: 2.46 */ public bool removeUnlocked(void* item) { return g_async_queue_remove_unlocked(gAsyncQueue, item) != 0; } /** * Sorts @queue using @func. * * The sort function @func is passed two elements of the @queue. * It should return 0 if they are equal, a negative value if the * first element should be higher in the @queue or a positive value * if the first element should be lower in the @queue than the second * element. * * This function will lock @queue before it sorts the queue and unlock * it when it is finished. * * If you were sorting a list of priority numbers to make sure the * lowest priority would be at the top of the queue, you could use: * |[ * gint32 id1; * gint32 id2; * * id1 = GPOINTER_TO_INT (element1); * id2 = GPOINTER_TO_INT (element2); * * return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1); * ]| * * Params: * func = the #GCompareDataFunc is used to sort @queue * userData = user data passed to @func * * Since: 2.10 */ public void sort(GCompareDataFunc func, void* userData) { g_async_queue_sort(gAsyncQueue, func, userData); } /** * Sorts @queue using @func. * * The sort function @func is passed two elements of the @queue. * It should return 0 if they are equal, a negative value if the * first element should be higher in the @queue or a positive value * if the first element should be lower in the @queue than the second * element. * * This function must be called while holding the @queue's lock. * * Params: * func = the #GCompareDataFunc is used to sort @queue * userData = user data passed to @func * * Since: 2.10 */ public void sortUnlocked(GCompareDataFunc func, void* userData) { g_async_queue_sort_unlocked(gAsyncQueue, func, userData); } /** * Pops data from the @queue. If the queue is empty, blocks until * @end_time or until data becomes available. * * If no data is received before @end_time, %NULL is returned. * * To easily calculate @end_time, a combination of g_get_current_time() * and g_time_val_add() can be used. * * Deprecated: use g_async_queue_timeout_pop(). * * Params: * endTime = a #GTimeVal, determining the final time * * Returns: data from the queue or %NULL, when no data is * received before @end_time. */ public void* timedPop(TimeVal endTime) { return g_async_queue_timed_pop(gAsyncQueue, (endTime is null) ? null : endTime.getTimeValStruct()); } /** * Pops data from the @queue. If the queue is empty, blocks until * @end_time or until data becomes available. * * If no data is received before @end_time, %NULL is returned. * * To easily calculate @end_time, a combination of g_get_current_time() * and g_time_val_add() can be used. * * This function must be called while holding the @queue's lock. * * Deprecated: use g_async_queue_timeout_pop_unlocked(). * * Params: * endTime = a #GTimeVal, determining the final time * * Returns: data from the queue or %NULL, when no data is * received before @end_time. */ public void* timedPopUnlocked(TimeVal endTime) { return g_async_queue_timed_pop_unlocked(gAsyncQueue, (endTime is null) ? null : endTime.getTimeValStruct()); } /** * Pops data from the @queue. If the queue is empty, blocks for * @timeout microseconds, or until data becomes available. * * If no data is received before the timeout, %NULL is returned. * * Params: * timeout = the number of microseconds to wait * * Returns: data from the queue or %NULL, when no data is * received before the timeout. */ public void* timeoutPop(ulong timeout) { return g_async_queue_timeout_pop(gAsyncQueue, timeout); } /** * Pops data from the @queue. If the queue is empty, blocks for * @timeout microseconds, or until data becomes available. * * If no data is received before the timeout, %NULL is returned. * * This function must be called while holding the @queue's lock. * * Params: * timeout = the number of microseconds to wait * * Returns: data from the queue or %NULL, when no data is * received before the timeout. */ public void* timeoutPopUnlocked(ulong timeout) { return g_async_queue_timeout_pop_unlocked(gAsyncQueue, timeout); } /** * Tries to pop data from the @queue. If no data is available, * %NULL is returned. * * Returns: data from the queue or %NULL, when no data is * available immediately. */ public void* tryPop() { return g_async_queue_try_pop(gAsyncQueue); } /** * Tries to pop data from the @queue. If no data is available, * %NULL is returned. * * This function must be called while holding the @queue's lock. * * Returns: data from the queue or %NULL, when no data is * available immediately. */ public void* tryPopUnlocked() { return g_async_queue_try_pop_unlocked(gAsyncQueue); } /** * Releases the queue's lock. * * Calling this function when you have not acquired * the with g_async_queue_lock() leads to undefined * behaviour. */ public void unlock() { g_async_queue_unlock(gAsyncQueue); } /** * Decreases the reference count of the asynchronous @queue by 1. * * If the reference count went to 0, the @queue will be destroyed * and the memory allocated will be freed. So you are not allowed * to use the @queue afterwards, as it might have disappeared. * You do not need to hold the lock to call this function. */ public void unref() { g_async_queue_unref(gAsyncQueue); } /** * Decreases the reference count of the asynchronous @queue by 1 * and releases the lock. This function must be called while holding * the @queue's lock. If the reference count went to 0, the @queue * will be destroyed and the memory allocated will be freed. * * Deprecated: Reference counting is done atomically. * so g_async_queue_unref() can be used regardless of the @queue's * lock. */ public void unrefAndUnlock() { g_async_queue_unref_and_unlock(gAsyncQueue); } /** * Creates a new asynchronous queue. * * Returns: a new #GAsyncQueue. Free with g_async_queue_unref() * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_async_queue_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GAsyncQueue*) p); } /** * Creates a new asynchronous queue and sets up a destroy notify * function that is used to free any remaining queue items when * the queue is destroyed after the final unref. * * Params: * itemFreeFunc = function to free queue elements * * Returns: a new #GAsyncQueue. Free with g_async_queue_unref() * * Since: 2.16 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GDestroyNotify itemFreeFunc) { auto p = g_async_queue_new_full(itemFreeFunc); if(p is null) { throw new ConstructionException("null returned by new_full"); } this(cast(GAsyncQueue*) p); } } GtkD-3.7.5/generated/gtkd/glib/Atomic.d000066400000000000000000000241021324604450400175450ustar00rootroot00000000000000/* * 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 glib.Atomic; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Atomic { /** * Atomically adds @val to the value of @atomic. * * Think of this operation as an atomic version of * `{ tmp = *atomic; *atomic += val; return tmp; }`. * * This call acts as a full compiler and hardware memory barrier. * * Before version 2.30, this function did not return a value * (but g_atomic_int_exchange_and_add() did, and had the same meaning). * * Params: * atomic = a pointer to a #gint or #guint * val = the value to add * * Returns: the value of @atomic before the add, signed * * Since: 2.4 */ public static int intAdd(int* atomic, int val) { return g_atomic_int_add(atomic, val); } /** * Performs an atomic bitwise 'and' of the value of @atomic and @val, * storing the result back in @atomic. * * This call acts as a full compiler and hardware memory barrier. * * Think of this operation as an atomic version of * `{ tmp = *atomic; *atomic &= val; return tmp; }`. * * Params: * atomic = a pointer to a #gint or #guint * val = the value to 'and' * * Returns: the value of @atomic before the operation, unsigned * * Since: 2.30 */ public static uint intAnd(uint* atomic, uint val) { return g_atomic_int_and(atomic, val); } /** * Compares @atomic to @oldval and, if equal, sets it to @newval. * If @atomic was not equal to @oldval then no change occurs. * * This compare and exchange is done atomically. * * Think of this operation as an atomic version of * `{ if (*atomic == oldval) { *atomic = newval; return TRUE; } else return FALSE; }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gint or #guint * oldval = the value to compare with * newval = the value to conditionally replace with * * Returns: %TRUE if the exchange took place * * Since: 2.4 */ public static bool intCompareAndExchange(int* atomic, int oldval, int newval) { return g_atomic_int_compare_and_exchange(atomic, oldval, newval) != 0; } /** * Decrements the value of @atomic by 1. * * Think of this operation as an atomic version of * `{ *atomic -= 1; return (*atomic == 0); }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gint or #guint * * Returns: %TRUE if the resultant value is zero * * Since: 2.4 */ public static bool intDecAndTest(int* atomic) { return g_atomic_int_dec_and_test(atomic) != 0; } /** * This function existed before g_atomic_int_add() returned the prior * value of the integer (which it now does). It is retained only for * compatibility reasons. Don't use this function in new code. * * Deprecated: Use g_atomic_int_add() instead. * * Params: * atomic = a pointer to a #gint * val = the value to add * * Returns: the value of @atomic before the add, signed * * Since: 2.4 */ public static int intExchangeAndAdd(int* atomic, int val) { return g_atomic_int_exchange_and_add(atomic, val); } /** * Gets the current value of @atomic. * * This call acts as a full compiler and hardware * memory barrier (before the get). * * Params: * atomic = a pointer to a #gint or #guint * * Returns: the value of the integer * * Since: 2.4 */ public static int intGet(int* atomic) { return g_atomic_int_get(atomic); } /** * Increments the value of @atomic by 1. * * Think of this operation as an atomic version of `{ *atomic += 1; }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gint or #guint * * Since: 2.4 */ public static void intInc(int* atomic) { g_atomic_int_inc(atomic); } /** * Performs an atomic bitwise 'or' of the value of @atomic and @val, * storing the result back in @atomic. * * Think of this operation as an atomic version of * `{ tmp = *atomic; *atomic |= val; return tmp; }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gint or #guint * val = the value to 'or' * * Returns: the value of @atomic before the operation, unsigned * * Since: 2.30 */ public static uint intOr(uint* atomic, uint val) { return g_atomic_int_or(atomic, val); } /** * Sets the value of @atomic to @newval. * * This call acts as a full compiler and hardware * memory barrier (after the set). * * Params: * atomic = a pointer to a #gint or #guint * newval = a new value to store * * Since: 2.4 */ public static void intSet(int* atomic, int newval) { g_atomic_int_set(atomic, newval); } /** * Performs an atomic bitwise 'xor' of the value of @atomic and @val, * storing the result back in @atomic. * * Think of this operation as an atomic version of * `{ tmp = *atomic; *atomic ^= val; return tmp; }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gint or #guint * val = the value to 'xor' * * Returns: the value of @atomic before the operation, unsigned * * Since: 2.30 */ public static uint intXor(uint* atomic, uint val) { return g_atomic_int_xor(atomic, val); } /** * Atomically adds @val to the value of @atomic. * * Think of this operation as an atomic version of * `{ tmp = *atomic; *atomic += val; return tmp; }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gpointer-sized value * val = the value to add * * Returns: the value of @atomic before the add, signed * * Since: 2.30 */ public static ptrdiff_t pointerAdd(void* atomic, ptrdiff_t val) { return g_atomic_pointer_add(atomic, val); } /** * Performs an atomic bitwise 'and' of the value of @atomic and @val, * storing the result back in @atomic. * * Think of this operation as an atomic version of * `{ tmp = *atomic; *atomic &= val; return tmp; }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gpointer-sized value * val = the value to 'and' * * Returns: the value of @atomic before the operation, unsigned * * Since: 2.30 */ public static size_t pointerAnd(void* atomic, size_t val) { return g_atomic_pointer_and(atomic, val); } /** * Compares @atomic to @oldval and, if equal, sets it to @newval. * If @atomic was not equal to @oldval then no change occurs. * * This compare and exchange is done atomically. * * Think of this operation as an atomic version of * `{ if (*atomic == oldval) { *atomic = newval; return TRUE; } else return FALSE; }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gpointer-sized value * oldval = the value to compare with * newval = the value to conditionally replace with * * Returns: %TRUE if the exchange took place * * Since: 2.4 */ public static bool pointerCompareAndExchange(void* atomic, void* oldval, void* newval) { return g_atomic_pointer_compare_and_exchange(atomic, oldval, newval) != 0; } /** * Gets the current value of @atomic. * * This call acts as a full compiler and hardware * memory barrier (before the get). * * Params: * atomic = a pointer to a #gpointer-sized value * * Returns: the value of the pointer * * Since: 2.4 */ public static void* pointerGet(void* atomic) { return g_atomic_pointer_get(atomic); } /** * Performs an atomic bitwise 'or' of the value of @atomic and @val, * storing the result back in @atomic. * * Think of this operation as an atomic version of * `{ tmp = *atomic; *atomic |= val; return tmp; }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gpointer-sized value * val = the value to 'or' * * Returns: the value of @atomic before the operation, unsigned * * Since: 2.30 */ public static size_t pointerOr(void* atomic, size_t val) { return g_atomic_pointer_or(atomic, val); } /** * Sets the value of @atomic to @newval. * * This call acts as a full compiler and hardware * memory barrier (after the set). * * Params: * atomic = a pointer to a #gpointer-sized value * newval = a new value to store * * Since: 2.4 */ public static void pointerSet(void* atomic, void* newval) { g_atomic_pointer_set(atomic, newval); } /** * Performs an atomic bitwise 'xor' of the value of @atomic and @val, * storing the result back in @atomic. * * Think of this operation as an atomic version of * `{ tmp = *atomic; *atomic ^= val; return tmp; }`. * * This call acts as a full compiler and hardware memory barrier. * * Params: * atomic = a pointer to a #gpointer-sized value * val = the value to 'xor' * * Returns: the value of @atomic before the operation, unsigned * * Since: 2.30 */ public static size_t pointerXor(void* atomic, size_t val) { return g_atomic_pointer_xor(atomic, val); } } GtkD-3.7.5/generated/gtkd/glib/BBTree.d000066400000000000000000000276051324604450400174470ustar00rootroot00000000000000/* * 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 glib.BBTree; private import glib.ConstructionException; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The GTree struct is an opaque data structure representing a * [balanced binary tree][glib-Balanced-Binary-Trees]. It should be * accessed only by using the following functions. */ public class BBTree { /** the main Gtk struct */ protected GTree* gTree; protected bool ownedRef; /** Get the main Gtk struct */ public GTree* getBBTreeStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTree; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gTree; } /** * Sets our main struct and passes it to the parent class. */ public this (GTree* gTree, bool ownedRef = false) { this.gTree = gTree; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_tree_unref(gTree); } /** * Removes all keys and values from the #GTree and decreases its * reference count by one. If keys and/or values are dynamically * allocated, you should either free them first or create the #GTree * using g_tree_new_full(). In the latter case the destroy functions * you supplied will be called on all keys and values before destroying * the #GTree. */ public void destroy() { g_tree_destroy(gTree); } /** * Calls the given function for each of the key/value pairs in the #GTree. * The function is passed the key and value of each pair, and the given * @data parameter. The tree is traversed in sorted order. * * The tree may not be modified while iterating over it (you can't * add/remove items). To remove all items matching a predicate, you need * to add each item to a list in your #GTraverseFunc as you walk over * the tree, then walk the list and remove each item. * * Params: * func = the function to call for each node visited. * If this function returns %TRUE, the traversal is stopped. * userData = user data to pass to the function */ public void foreac(GTraverseFunc func, void* userData) { g_tree_foreach(gTree, func, userData); } /** * Gets the height of a #GTree. * * If the #GTree contains no nodes, the height is 0. * If the #GTree contains only one root node the height is 1. * If the root node has children the height is 2, etc. * * Returns: the height of @tree */ public int height() { return g_tree_height(gTree); } /** * Inserts a key/value pair into a #GTree. * * If the given key already exists in the #GTree its corresponding value * is set to the new value. If you supplied a @value_destroy_func when * creating the #GTree, the old value is freed using that function. If * you supplied a @key_destroy_func when creating the #GTree, the passed * key is freed using that function. * * The tree is automatically 'balanced' as new key/value pairs are added, * so that the distance from the root to every leaf is as small as possible. * * Params: * key = the key to insert * value = the value corresponding to the key */ public void insert(void* key, void* value) { g_tree_insert(gTree, key, value); } /** * Gets the value corresponding to the given key. Since a #GTree is * automatically balanced as key/value pairs are added, key lookup * is O(log n) (where n is the number of key/value pairs in the tree). * * Params: * key = the key to look up * * Returns: the value corresponding to the key, or %NULL * if the key was not found */ public void* lookup(void* key) { return g_tree_lookup(gTree, key); } /** * Looks up a key in the #GTree, returning the original key and the * associated value. This is useful if you need to free the memory * allocated for the original key, for example before calling * g_tree_remove(). * * Params: * lookupKey = the key to look up * origKey = returns the original key * value = returns the value associated with the key * * Returns: %TRUE if the key was found in the #GTree */ public bool lookupExtended(void* lookupKey, void** origKey, void** value) { return g_tree_lookup_extended(gTree, lookupKey, origKey, value) != 0; } /** * Gets the number of nodes in a #GTree. * * Returns: the number of nodes in @tree */ public int nnodes() { return g_tree_nnodes(gTree); } /** * Increments the reference count of @tree by one. * * It is safe to call this function from any thread. * * Returns: the passed in #GTree * * Since: 2.22 */ public BBTree doref() { auto p = g_tree_ref(gTree); if(p is null) { return null; } return new BBTree(cast(GTree*) p); } /** * Removes a key/value pair from a #GTree. * * If the #GTree was created using g_tree_new_full(), the key and value * are freed using the supplied destroy functions, otherwise you have to * make sure that any dynamically allocated values are freed yourself. * If the key does not exist in the #GTree, the function does nothing. * * Params: * key = the key to remove * * Returns: %TRUE if the key was found (prior to 2.8, this function * returned nothing) */ public bool remove(void* key) { return g_tree_remove(gTree, key) != 0; } /** * Inserts a new key and value into a #GTree similar to g_tree_insert(). * The difference is that if the key already exists in the #GTree, it gets * replaced by the new key. If you supplied a @value_destroy_func when * creating the #GTree, the old value is freed using that function. If you * supplied a @key_destroy_func when creating the #GTree, the old key is * freed using that function. * * The tree is automatically 'balanced' as new key/value pairs are added, * so that the distance from the root to every leaf is as small as possible. * * Params: * key = the key to insert * value = the value corresponding to the key */ public void replace(void* key, void* value) { g_tree_replace(gTree, key, value); } /** * Searches a #GTree using @search_func. * * The @search_func is called with a pointer to the key of a key/value * pair in the tree, and the passed in @user_data. If @search_func returns * 0 for a key/value pair, then the corresponding value is returned as * the result of g_tree_search(). If @search_func returns -1, searching * will proceed among the key/value pairs that have a smaller key; if * @search_func returns 1, searching will proceed among the key/value * pairs that have a larger key. * * Params: * searchFunc = a function used to search the #GTree * userData = the data passed as the second argument to @search_func * * Returns: the value corresponding to the found key, or %NULL * if the key was not found */ public void* search(GCompareFunc searchFunc, void* userData) { return g_tree_search(gTree, searchFunc, userData); } /** * Removes a key and its associated value from a #GTree without calling * the key and value destroy functions. * * If the key does not exist in the #GTree, the function does nothing. * * Params: * key = the key to remove * * Returns: %TRUE if the key was found (prior to 2.8, this function * returned nothing) */ public bool steal(void* key) { return g_tree_steal(gTree, key) != 0; } /** * Calls the given function for each node in the #GTree. * * Deprecated: The order of a balanced tree is somewhat arbitrary. * If you just want to visit all nodes in sorted order, use * g_tree_foreach() instead. If you really need to visit nodes in * a different order, consider using an [n-ary tree][glib-N-ary-Trees]. * * Params: * traverseFunc = the function to call for each node visited. If this * function returns %TRUE, the traversal is stopped. * traverseType = the order in which nodes are visited, one of %G_IN_ORDER, * %G_PRE_ORDER and %G_POST_ORDER * userData = user data to pass to the function */ public void traverse(GTraverseFunc traverseFunc, GTraverseType traverseType, void* userData) { g_tree_traverse(gTree, traverseFunc, traverseType, userData); } /** * Decrements the reference count of @tree by one. * If the reference count drops to 0, all keys and values will * be destroyed (if destroy functions were specified) and all * memory allocated by @tree will be released. * * It is safe to call this function from any thread. * * Since: 2.22 */ public void unref() { g_tree_unref(gTree); } /** * Creates a new #GTree. * * Params: * keyCompareFunc = the function used to order the nodes in the #GTree. * It should return values similar to the standard strcmp() function - * 0 if the two arguments are equal, a negative value if the first argument * comes before the second, or a positive value if the first argument comes * after the second. * * Returns: a newly allocated #GTree * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GCompareFunc keyCompareFunc) { auto p = g_tree_new(keyCompareFunc); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GTree*) p); } /** * Creates a new #GTree like g_tree_new() and allows to specify functions * to free the memory allocated for the key and value that get called when * removing the entry from the #GTree. * * Params: * keyCompareFunc = qsort()-style comparison function * keyCompareData = data to pass to comparison function * keyDestroyFunc = a function to free the memory allocated for the key * used when removing the entry from the #GTree or %NULL if you don't * want to supply such a function * valueDestroyFunc = a function to free the memory allocated for the * value used when removing the entry from the #GTree or %NULL if you * don't want to supply such a function * * Returns: a newly allocated #GTree * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GCompareDataFunc keyCompareFunc, void* keyCompareData, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc) { auto p = g_tree_new_full(keyCompareFunc, keyCompareData, keyDestroyFunc, valueDestroyFunc); if(p is null) { throw new ConstructionException("null returned by new_full"); } this(cast(GTree*) p); } /** * Creates a new #GTree with a comparison function that accepts user data. * See g_tree_new() for more details. * * Params: * keyCompareFunc = qsort()-style comparison function * keyCompareData = data to pass to comparison function * * Returns: a newly allocated #GTree * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GCompareDataFunc keyCompareFunc, void* keyCompareData) { auto p = g_tree_new_with_data(keyCompareFunc, keyCompareData); if(p is null) { throw new ConstructionException("null returned by new_with_data"); } this(cast(GTree*) p); } } GtkD-3.7.5/generated/gtkd/glib/Base64.d000066400000000000000000000143231324604450400173610ustar00rootroot00000000000000/* * 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 glib.Base64; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Base64 { /** * Incrementally decode a sequence of binary data from its Base-64 stringified * representation. By calling this function multiple times you can convert * data in chunks to avoid having to have the full encoded data in memory. * * The output buffer must be large enough to fit all the data that will * be written to it. Since base64 encodes 3 bytes in 4 chars you need * at least: (@len / 4) * 3 + 3 bytes (+ 3 may be needed in case of non-zero * state). * * Params: * inn = binary input data * len = max length of @in data to decode * output = output buffer * state = Saved state between steps, initialize to 0 * save = Saved state between steps, initialize to 0 * * Return: The number of bytes of output that was written * * Since: 2.12 */ public static size_t decodeStep(string inn, ref ubyte[] output, ref int state, ref uint save) { auto p = g_base64_decode_step(Str.toStringz(inn), cast(int)inn.length, cast(char*)output.ptr, &state, &save); return p; } /** */ /** * Decode a sequence of Base-64 encoded text into binary data * by overwriting the input data. * * Params: * text = zero-terminated * string with base64 text to decode * * Returns: The binary data that @text responds. This pointer * is the same as the input @text. * * Since: 2.20 */ public static char[] decodeInplace(ref char[] text) { size_t outLen = cast(size_t)text.length; auto p = g_base64_decode_inplace(text.ptr, &outLen); text = text[0..outLen]; return p[0 .. outLen]; } /** * Decode a sequence of Base-64 encoded text into binary data. Note * that the returned binary data is not necessarily zero-terminated, * so it should not be used as a character string. * * Params: * text = zero-terminated string with base64 text to decode * * Returns: newly allocated buffer containing the binary data * that @text represents. The returned buffer must * be freed with g_free(). * * Since: 2.12 */ public static char[] decode(string text) { size_t outLen; auto p = g_base64_decode(Str.toStringz(text), &outLen); return cast(char[])p[0 .. outLen]; } /** * Encode a sequence of binary data into its Base-64 stringified * representation. * * Params: * data = the binary data to encode * * Returns: a newly allocated, zero-terminated Base-64 * encoded string representing @data. The returned string must * be freed with g_free(). * * Since: 2.12 */ public static string encode(char[] data) { auto retStr = g_base64_encode(data.ptr, cast(size_t)data.length); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Flush the status from a sequence of calls to g_base64_encode_step(). * * The output buffer must be large enough to fit all the data that will * be written to it. It will need up to 4 bytes, or up to 5 bytes if * line-breaking is enabled. * * The @out array will not be automatically nul-terminated. * * Params: * breakLines = whether to break long lines * output = pointer to destination buffer * state = Saved state from g_base64_encode_step() * save = Saved state from g_base64_encode_step() * * Returns: The number of bytes of output that was written * * Since: 2.12 */ public static size_t encodeClose(bool breakLines, out char[] output, ref int state, ref int save) { return g_base64_encode_close(breakLines, output.ptr, &state, &save); } /** * Incrementally encode a sequence of binary data into its Base-64 stringified * representation. By calling this function multiple times you can convert * data in chunks to avoid having to have the full encoded data in memory. * * When all of the data has been converted you must call * g_base64_encode_close() to flush the saved state. * * The output buffer must be large enough to fit all the data that will * be written to it. Due to the way base64 encodes you will need * at least: (@len / 3 + 1) * 4 + 4 bytes (+ 4 may be needed in case of * non-zero state). If you enable line-breaking you will need at least: * ((@len / 3 + 1) * 4 + 4) / 72 + 1 bytes of extra space. * * @break_lines is typically used when putting base64-encoded data in emails. * It breaks the lines at 72 columns instead of putting all of the text on * the same line. This avoids problems with long lines in the email system. * Note however that it breaks the lines with `LF` characters, not * `CR LF` sequences, so the result cannot be passed directly to SMTP * or certain other protocols. * * Params: * inn = the binary data to encode * breakLines = whether to break long lines * output = pointer to destination buffer * state = Saved state between steps, initialize to 0 * save = Saved state between steps, initialize to 0 * * Returns: The number of bytes of output that was written * * Since: 2.12 */ public static size_t encodeStep(char[] inn, bool breakLines, out char[] output, ref int state, ref int save) { return g_base64_encode_step(inn.ptr, cast(size_t)inn.length, breakLines, output.ptr, &state, &save); } } GtkD-3.7.5/generated/gtkd/glib/BookmarkFile.d000066400000000000000000000714471324604450400207140ustar00rootroot00000000000000/* * 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 glib.BookmarkFile; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The `GBookmarkFile` structure contains only * private data and should not be directly accessed. */ public class BookmarkFile { /** the main Gtk struct */ protected GBookmarkFile* gBookmarkFile; protected bool ownedRef; /** Get the main Gtk struct */ public GBookmarkFile* getBookmarkFileStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gBookmarkFile; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gBookmarkFile; } /** * Sets our main struct and passes it to the parent class. */ public this (GBookmarkFile* gBookmarkFile, bool ownedRef = false) { this.gBookmarkFile = gBookmarkFile; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_bookmark_file_free(gBookmarkFile); } /** * Adds the application with @name and @exec to the list of * applications that have registered a bookmark for @uri into * @bookmark. * * Every bookmark inside a #GBookmarkFile must have at least an * application registered. Each application must provide a name, a * command line useful for launching the bookmark, the number of times * the bookmark has been registered by the application and the last * time the application registered this bookmark. * * If @name is %NULL, the name of the application will be the * same returned by g_get_application_name(); if @exec is %NULL, the * command line will be a composition of the program name as * returned by g_get_prgname() and the "\%u" modifier, which will be * expanded to the bookmark's URI. * * This function will automatically take care of updating the * registrations count and timestamping in case an application * with the same @name had already registered a bookmark for * @uri inside @bookmark. * * If no bookmark for @uri is found, one is created. * * Params: * uri = a valid URI * name = the name of the application registering the bookmark * or %NULL * exec = command line to be used to launch the bookmark or %NULL * * Since: 2.12 */ public void addApplication(string uri, string name, string exec) { g_bookmark_file_add_application(gBookmarkFile, Str.toStringz(uri), Str.toStringz(name), Str.toStringz(exec)); } /** * Adds @group to the list of groups to which the bookmark for @uri * belongs to. * * If no bookmark for @uri is found then it is created. * * Params: * uri = a valid URI * group = the group name to be added * * Since: 2.12 */ public void addGroup(string uri, string group) { g_bookmark_file_add_group(gBookmarkFile, Str.toStringz(uri), Str.toStringz(group)); } /** * Frees a #GBookmarkFile. * * Since: 2.12 */ public void free() { g_bookmark_file_free(gBookmarkFile); ownedRef = false; } /** * Gets the time the bookmark for @uri was added to @bookmark * * In the event the URI cannot be found, -1 is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI * * Returns: a timestamp * * Since: 2.12 * * Throws: GException on failure. */ public uint getAdded(string uri) { GError* err = null; auto p = g_bookmark_file_get_added(gBookmarkFile, Str.toStringz(uri), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the registration informations of @app_name for the bookmark for * @uri. See g_bookmark_file_set_app_info() for more informations about * the returned data. * * The string returned in @app_exec must be freed. * * In the event the URI cannot be found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the * event that no application with name @app_name has registered a bookmark * for @uri, %FALSE is returned and error is set to * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. In the event that unquoting * the command line fails, an error of the #G_SHELL_ERROR domain is * set and %FALSE is returned. * * Params: * uri = a valid URI * name = an application's name * exec = return location for the command line of the application, or %NULL * count = return location for the registration count, or %NULL * stamp = return location for the last registration time, or %NULL * * Returns: %TRUE on success. * * Since: 2.12 * * Throws: GException on failure. */ public bool getAppInfo(string uri, string name, out string exec, out uint count, out uint stamp) { char* outexec = null; GError* err = null; auto p = g_bookmark_file_get_app_info(gBookmarkFile, Str.toStringz(uri), Str.toStringz(name), &outexec, &count, &stamp, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } exec = Str.toString(outexec); return p; } /** * Retrieves the names of the applications that have registered the * bookmark for @uri. * * In the event the URI cannot be found, %NULL is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI * * Returns: a newly allocated %NULL-terminated array of strings. * Use g_strfreev() to free it. * * Since: 2.12 * * Throws: GException on failure. */ public string[] getApplications(string uri) { size_t length; GError* err = null; auto retStr = g_bookmark_file_get_applications(gBookmarkFile, Str.toStringz(uri), &length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr, length); } /** * Retrieves the description of the bookmark for @uri. * * In the event the URI cannot be found, %NULL is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI * * Returns: a newly allocated string or %NULL if the specified * URI cannot be found. * * Since: 2.12 * * Throws: GException on failure. */ public string getDescription(string uri) { GError* err = null; auto retStr = g_bookmark_file_get_description(gBookmarkFile, Str.toStringz(uri), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Retrieves the list of group names of the bookmark for @uri. * * In the event the URI cannot be found, %NULL is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * The returned array is %NULL terminated, so @length may optionally * be %NULL. * * Params: * uri = a valid URI * * Returns: a newly allocated %NULL-terminated array of group names. * Use g_strfreev() to free it. * * Since: 2.12 * * Throws: GException on failure. */ public string[] getGroups(string uri) { size_t length; GError* err = null; auto retStr = g_bookmark_file_get_groups(gBookmarkFile, Str.toStringz(uri), &length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr, length); } /** * Gets the icon of the bookmark for @uri. * * In the event the URI cannot be found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI * href = return location for the icon's location or %NULL * mimeType = return location for the icon's MIME type or %NULL * * Returns: %TRUE if the icon for the bookmark for the URI was found. * You should free the returned strings. * * Since: 2.12 * * Throws: GException on failure. */ public bool getIcon(string uri, out string href, out string mimeType) { char* outhref = null; char* outmimeType = null; GError* err = null; auto p = g_bookmark_file_get_icon(gBookmarkFile, Str.toStringz(uri), &outhref, &outmimeType, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } href = Str.toString(outhref); mimeType = Str.toString(outmimeType); return p; } /** * Gets whether the private flag of the bookmark for @uri is set. * * In the event the URI cannot be found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the * event that the private flag cannot be found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. * * Params: * uri = a valid URI * * Returns: %TRUE if the private flag is set, %FALSE otherwise. * * Since: 2.12 * * Throws: GException on failure. */ public bool getIsPrivate(string uri) { GError* err = null; auto p = g_bookmark_file_get_is_private(gBookmarkFile, Str.toStringz(uri), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Retrieves the MIME type of the resource pointed by @uri. * * In the event the URI cannot be found, %NULL is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. In the * event that the MIME type cannot be found, %NULL is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. * * Params: * uri = a valid URI * * Returns: a newly allocated string or %NULL if the specified * URI cannot be found. * * Since: 2.12 * * Throws: GException on failure. */ public string getMimeType(string uri) { GError* err = null; auto retStr = g_bookmark_file_get_mime_type(gBookmarkFile, Str.toStringz(uri), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the time when the bookmark for @uri was last modified. * * In the event the URI cannot be found, -1 is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI * * Returns: a timestamp * * Since: 2.12 * * Throws: GException on failure. */ public uint getModified(string uri) { GError* err = null; auto p = g_bookmark_file_get_modified(gBookmarkFile, Str.toStringz(uri), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets the number of bookmarks inside @bookmark. * * Returns: the number of bookmarks * * Since: 2.12 */ public int getSize() { return g_bookmark_file_get_size(gBookmarkFile); } /** * Returns the title of the bookmark for @uri. * * If @uri is %NULL, the title of @bookmark is returned. * * In the event the URI cannot be found, %NULL is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI or %NULL * * Returns: a newly allocated string or %NULL if the specified * URI cannot be found. * * Since: 2.12 * * Throws: GException on failure. */ public string getTitle(string uri) { GError* err = null; auto retStr = g_bookmark_file_get_title(gBookmarkFile, Str.toStringz(uri), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns all URIs of the bookmarks in the bookmark file @bookmark. * The array of returned URIs will be %NULL-terminated, so @length may * optionally be %NULL. * * Returns: a newly allocated %NULL-terminated array of strings. * Use g_strfreev() to free it. * * Since: 2.12 */ public string[] getUris() { size_t length; auto retStr = g_bookmark_file_get_uris(gBookmarkFile, &length); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr, length); } /** * Gets the time the bookmark for @uri was last visited. * * In the event the URI cannot be found, -1 is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI * * Returns: a timestamp. * * Since: 2.12 * * Throws: GException on failure. */ public uint getVisited(string uri) { GError* err = null; auto p = g_bookmark_file_get_visited(gBookmarkFile, Str.toStringz(uri), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks whether the bookmark for @uri inside @bookmark has been * registered by application @name. * * In the event the URI cannot be found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI * name = the name of the application * * Returns: %TRUE if the application @name was found * * Since: 2.12 * * Throws: GException on failure. */ public bool hasApplication(string uri, string name) { GError* err = null; auto p = g_bookmark_file_has_application(gBookmarkFile, Str.toStringz(uri), Str.toStringz(name), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Checks whether @group appears in the list of groups to which * the bookmark for @uri belongs to. * * In the event the URI cannot be found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * uri = a valid URI * group = the group name to be searched * * Returns: %TRUE if @group was found. * * Since: 2.12 * * Throws: GException on failure. */ public bool hasGroup(string uri, string group) { GError* err = null; auto p = g_bookmark_file_has_group(gBookmarkFile, Str.toStringz(uri), Str.toStringz(group), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Looks whether the desktop bookmark has an item with its URI set to @uri. * * Params: * uri = a valid URI * * Returns: %TRUE if @uri is inside @bookmark, %FALSE otherwise * * Since: 2.12 */ public bool hasItem(string uri) { return g_bookmark_file_has_item(gBookmarkFile, Str.toStringz(uri)) != 0; } /** * Loads a bookmark file from memory into an empty #GBookmarkFile * structure. If the object cannot be created then @error is set to a * #GBookmarkFileError. * * Params: * data = desktop bookmarks loaded in memory * length = the length of @data in bytes * * Returns: %TRUE if a desktop bookmark could be loaded. * * Since: 2.12 * * Throws: GException on failure. */ public bool loadFromData(string data, size_t length) { GError* err = null; auto p = g_bookmark_file_load_from_data(gBookmarkFile, Str.toStringz(data), length, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This function looks for a desktop bookmark file named @file in the * paths returned from g_get_user_data_dir() and g_get_system_data_dirs(), * loads the file into @bookmark and returns the file's full path in * @full_path. If the file could not be loaded then an %error is * set to either a #GFileError or #GBookmarkFileError. * * Params: * file = a relative path to a filename to open and parse * fullPath = return location for a string * containing the full path of the file, or %NULL * * Returns: %TRUE if a key file could be loaded, %FALSE otherwise * * Since: 2.12 * * Throws: GException on failure. */ public bool loadFromDataDirs(string file, out string fullPath) { char* outfullPath = null; GError* err = null; auto p = g_bookmark_file_load_from_data_dirs(gBookmarkFile, Str.toStringz(file), &outfullPath, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } fullPath = Str.toString(outfullPath); return p; } /** * Loads a desktop bookmark file into an empty #GBookmarkFile structure. * If the file could not be loaded then @error is set to either a #GFileError * or #GBookmarkFileError. * * Params: * filename = the path of a filename to load, in the * GLib file name encoding * * Returns: %TRUE if a desktop bookmark file could be loaded * * Since: 2.12 * * Throws: GException on failure. */ public bool loadFromFile(string filename) { GError* err = null; auto p = g_bookmark_file_load_from_file(gBookmarkFile, Str.toStringz(filename), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Changes the URI of a bookmark item from @old_uri to @new_uri. Any * existing bookmark for @new_uri will be overwritten. If @new_uri is * %NULL, then the bookmark is removed. * * In the event the URI cannot be found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * * Params: * oldUri = a valid URI * newUri = a valid URI, or %NULL * * Returns: %TRUE if the URI was successfully changed * * Since: 2.12 * * Throws: GException on failure. */ public bool moveItem(string oldUri, string newUri) { GError* err = null; auto p = g_bookmark_file_move_item(gBookmarkFile, Str.toStringz(oldUri), Str.toStringz(newUri), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Removes application registered with @name from the list of applications * that have registered a bookmark for @uri inside @bookmark. * * In the event the URI cannot be found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * In the event that no application with name @app_name has registered * a bookmark for @uri, %FALSE is returned and error is set to * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. * * Params: * uri = a valid URI * name = the name of the application * * Returns: %TRUE if the application was successfully removed. * * Since: 2.12 * * Throws: GException on failure. */ public bool removeApplication(string uri, string name) { GError* err = null; auto p = g_bookmark_file_remove_application(gBookmarkFile, Str.toStringz(uri), Str.toStringz(name), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Removes @group from the list of groups to which the bookmark * for @uri belongs to. * * In the event the URI cannot be found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND. * In the event no group was defined, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_INVALID_VALUE. * * Params: * uri = a valid URI * group = the group name to be removed * * Returns: %TRUE if @group was successfully removed. * * Since: 2.12 * * Throws: GException on failure. */ public bool removeGroup(string uri, string group) { GError* err = null; auto p = g_bookmark_file_remove_group(gBookmarkFile, Str.toStringz(uri), Str.toStringz(group), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Removes the bookmark for @uri from the bookmark file @bookmark. * * Params: * uri = a valid URI * * Returns: %TRUE if the bookmark was removed successfully. * * Since: 2.12 * * Throws: GException on failure. */ public bool removeItem(string uri) { GError* err = null; auto p = g_bookmark_file_remove_item(gBookmarkFile, Str.toStringz(uri), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the time the bookmark for @uri was added into @bookmark. * * If no bookmark for @uri is found then it is created. * * Params: * uri = a valid URI * added = a timestamp or -1 to use the current time * * Since: 2.12 */ public void setAdded(string uri, uint added) { g_bookmark_file_set_added(gBookmarkFile, Str.toStringz(uri), added); } /** * Sets the meta-data of application @name inside the list of * applications that have registered a bookmark for @uri inside * @bookmark. * * You should rarely use this function; use g_bookmark_file_add_application() * and g_bookmark_file_remove_application() instead. * * @name can be any UTF-8 encoded string used to identify an * application. * @exec can have one of these two modifiers: "\%f", which will * be expanded as the local file name retrieved from the bookmark's * URI; "\%u", which will be expanded as the bookmark's URI. * The expansion is done automatically when retrieving the stored * command line using the g_bookmark_file_get_app_info() function. * @count is the number of times the application has registered the * bookmark; if is < 0, the current registration count will be increased * by one, if is 0, the application with @name will be removed from * the list of registered applications. * @stamp is the Unix time of the last registration; if it is -1, the * current time will be used. * * If you try to remove an application by setting its registration count to * zero, and no bookmark for @uri is found, %FALSE is returned and * @error is set to #G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND; similarly, * in the event that no application @name has registered a bookmark * for @uri, %FALSE is returned and error is set to * #G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED. Otherwise, if no bookmark * for @uri is found, one is created. * * Params: * uri = a valid URI * name = an application's name * exec = an application's command line * count = the number of registrations done for this application * stamp = the time of the last registration for this application * * Returns: %TRUE if the application's meta-data was successfully * changed. * * Since: 2.12 * * Throws: GException on failure. */ public bool setAppInfo(string uri, string name, string exec, int count, uint stamp) { GError* err = null; auto p = g_bookmark_file_set_app_info(gBookmarkFile, Str.toStringz(uri), Str.toStringz(name), Str.toStringz(exec), count, stamp, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets @description as the description of the bookmark for @uri. * * If @uri is %NULL, the description of @bookmark is set. * * If a bookmark for @uri cannot be found then it is created. * * Params: * uri = a valid URI or %NULL * description = a string * * Since: 2.12 */ public void setDescription(string uri, string description) { g_bookmark_file_set_description(gBookmarkFile, Str.toStringz(uri), Str.toStringz(description)); } /** * Sets a list of group names for the item with URI @uri. Each previously * set group name list is removed. * * If @uri cannot be found then an item for it is created. * * Params: * uri = an item's URI * groups = an array of group names, or %NULL to remove all groups * * Since: 2.12 */ public void setGroups(string uri, string[] groups) { g_bookmark_file_set_groups(gBookmarkFile, Str.toStringz(uri), Str.toStringzArray(groups), cast(size_t)groups.length); } /** * Sets the icon for the bookmark for @uri. If @href is %NULL, unsets * the currently set icon. @href can either be a full URL for the icon * file or the icon name following the Icon Naming specification. * * If no bookmark for @uri is found one is created. * * Params: * uri = a valid URI * href = the URI of the icon for the bookmark, or %NULL * mimeType = the MIME type of the icon for the bookmark * * Since: 2.12 */ public void setIcon(string uri, string href, string mimeType) { g_bookmark_file_set_icon(gBookmarkFile, Str.toStringz(uri), Str.toStringz(href), Str.toStringz(mimeType)); } /** * Sets the private flag of the bookmark for @uri. * * If a bookmark for @uri cannot be found then it is created. * * Params: * uri = a valid URI * isPrivate = %TRUE if the bookmark should be marked as private * * Since: 2.12 */ public void setIsPrivate(string uri, bool isPrivate) { g_bookmark_file_set_is_private(gBookmarkFile, Str.toStringz(uri), isPrivate); } /** * Sets @mime_type as the MIME type of the bookmark for @uri. * * If a bookmark for @uri cannot be found then it is created. * * Params: * uri = a valid URI * mimeType = a MIME type * * Since: 2.12 */ public void setMimeType(string uri, string mimeType) { g_bookmark_file_set_mime_type(gBookmarkFile, Str.toStringz(uri), Str.toStringz(mimeType)); } /** * Sets the last time the bookmark for @uri was last modified. * * If no bookmark for @uri is found then it is created. * * The "modified" time should only be set when the bookmark's meta-data * was actually changed. Every function of #GBookmarkFile that * modifies a bookmark also changes the modification time, except for * g_bookmark_file_set_visited(). * * Params: * uri = a valid URI * modified = a timestamp or -1 to use the current time * * Since: 2.12 */ public void setModified(string uri, uint modified) { g_bookmark_file_set_modified(gBookmarkFile, Str.toStringz(uri), modified); } /** * Sets @title as the title of the bookmark for @uri inside the * bookmark file @bookmark. * * If @uri is %NULL, the title of @bookmark is set. * * If a bookmark for @uri cannot be found then it is created. * * Params: * uri = a valid URI or %NULL * title = a UTF-8 encoded string * * Since: 2.12 */ public void setTitle(string uri, string title) { g_bookmark_file_set_title(gBookmarkFile, Str.toStringz(uri), Str.toStringz(title)); } /** * Sets the time the bookmark for @uri was last visited. * * If no bookmark for @uri is found then it is created. * * The "visited" time should only be set if the bookmark was launched, * either using the command line retrieved by g_bookmark_file_get_app_info() * or by the default application for the bookmark's MIME type, retrieved * using g_bookmark_file_get_mime_type(). Changing the "visited" time * does not affect the "modified" time. * * Params: * uri = a valid URI * visited = a timestamp or -1 to use the current time * * Since: 2.12 */ public void setVisited(string uri, uint visited) { g_bookmark_file_set_visited(gBookmarkFile, Str.toStringz(uri), visited); } /** * This function outputs @bookmark as a string. * * Params: * length = return location for the length of the returned string, or %NULL * * Returns: a newly allocated string holding * the contents of the #GBookmarkFile * * Since: 2.12 * * Throws: GException on failure. */ public string toData(out size_t length) { GError* err = null; auto retStr = g_bookmark_file_to_data(gBookmarkFile, &length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * This function outputs @bookmark into a file. The write process is * guaranteed to be atomic by using g_file_set_contents() internally. * * Params: * filename = path of the output file * * Returns: %TRUE if the file was successfully written. * * Since: 2.12 * * Throws: GException on failure. */ public bool toFile(string filename) { GError* err = null; auto p = g_bookmark_file_to_file(gBookmarkFile, Str.toStringz(filename), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** */ public static GQuark errorQuark() { return g_bookmark_file_error_quark(); } /** * Creates a new empty #GBookmarkFile object. * * Use g_bookmark_file_load_from_file(), g_bookmark_file_load_from_data() * or g_bookmark_file_load_from_data_dirs() to read an existing bookmark * file. * * Returns: an empty #GBookmarkFile * * Since: 2.12 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_bookmark_file_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GBookmarkFile*) p); } } GtkD-3.7.5/generated/gtkd/glib/ByteArray.d000066400000000000000000000214701324604450400202400ustar00rootroot00000000000000/* * 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 glib.ByteArray; private import glib.Bytes; private import glib.ConstructionException; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * Contains the public fields of a GByteArray. */ public class ByteArray { /** the main Gtk struct */ protected GByteArray* gByteArray; protected bool ownedRef; /** Get the main Gtk struct */ public GByteArray* getByteArrayStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gByteArray; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gByteArray; } /** * Sets our main struct and passes it to the parent class. */ public this (GByteArray* gByteArray, bool ownedRef = false) { this.gByteArray = gByteArray; this.ownedRef = ownedRef; } /** * Adds the given bytes to the end of the #GByteArray. * The array will grow in size automatically if necessary. * * Params: * data = the byte data to be added * len = the number of bytes to add * * Returns: the #GByteArray */ public ByteArray append(ubyte* data, uint len) { auto p = g_byte_array_append(gByteArray, data, len); if(p is null) { return null; } return new ByteArray(cast(GByteArray*) p); } /** * Frees the memory allocated by the #GByteArray. If @free_segment is * %TRUE it frees the actual byte data. If the reference count of * @array is greater than one, the #GByteArray wrapper is preserved but * the size of @array will be set to zero. * * Params: * freeSegment = if %TRUE the actual byte data is freed as well * * Returns: the element data if @free_segment is %FALSE, otherwise * %NULL. The element data should be freed using g_free(). */ public ubyte* free(bool freeSegment) { return g_byte_array_free(gByteArray, freeSegment); } /** * Transfers the data from the #GByteArray into a new immutable #GBytes. * * The #GByteArray is freed unless the reference count of @array is greater * than one, the #GByteArray wrapper is preserved but the size of @array * will be set to zero. * * This is identical to using g_bytes_new_take() and g_byte_array_free() * together. * * Returns: a new immutable #GBytes representing same * byte data that was in the array * * Since: 2.32 */ public Bytes freeToBytes() { auto p = g_byte_array_free_to_bytes(gByteArray); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Creates a new #GByteArray with a reference count of 1. * * Returns: the new #GByteArray * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_byte_array_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GByteArray*) p); } /** * Create byte array containing the data. The data will be owned by the array * and will be freed with g_free(), i.e. it could be allocated using g_strdup(). * * Params: * data = byte data for the array * * Returns: a new #GByteArray * * Since: 2.32 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] data) { auto p = g_byte_array_new_take(data.ptr, cast(size_t)data.length); if(p is null) { throw new ConstructionException("null returned by new_take"); } this(cast(GByteArray*) p); } /** * Adds the given data to the start of the #GByteArray. * The array will grow in size automatically if necessary. * * Params: * data = the byte data to be added * len = the number of bytes to add * * Returns: the #GByteArray */ public ByteArray prepend(ubyte* data, uint len) { auto p = g_byte_array_prepend(gByteArray, data, len); if(p is null) { return null; } return new ByteArray(cast(GByteArray*) p); } /** * Atomically increments the reference count of @array by one. * This function is thread-safe and may be called from any thread. * * Returns: The passed in #GByteArray * * Since: 2.22 */ public ByteArray doref() { auto p = g_byte_array_ref(gByteArray); if(p is null) { return null; } return new ByteArray(cast(GByteArray*) p); } /** * Removes the byte at the given index from a #GByteArray. * The following bytes are moved down one place. * * Params: * index = the index of the byte to remove * * Returns: the #GByteArray */ public ByteArray removeIndex(uint index) { auto p = g_byte_array_remove_index(gByteArray, index); if(p is null) { return null; } return new ByteArray(cast(GByteArray*) p); } /** * Removes the byte at the given index from a #GByteArray. The last * element in the array is used to fill in the space, so this function * does not preserve the order of the #GByteArray. But it is faster * than g_byte_array_remove_index(). * * Params: * index = the index of the byte to remove * * Returns: the #GByteArray */ public ByteArray removeIndexFast(uint index) { auto p = g_byte_array_remove_index_fast(gByteArray, index); if(p is null) { return null; } return new ByteArray(cast(GByteArray*) p); } /** * Removes the given number of bytes starting at the given index from a * #GByteArray. The following elements are moved to close the gap. * * Params: * index = the index of the first byte to remove * length = the number of bytes to remove * * Returns: the #GByteArray * * Since: 2.4 */ public ByteArray removeRange(uint index, uint length) { auto p = g_byte_array_remove_range(gByteArray, index, length); if(p is null) { return null; } return new ByteArray(cast(GByteArray*) p); } /** * Sets the size of the #GByteArray, expanding it if necessary. * * Params: * length = the new size of the #GByteArray * * Returns: the #GByteArray */ public ByteArray setSize(uint length) { auto p = g_byte_array_set_size(gByteArray, length); if(p is null) { return null; } return new ByteArray(cast(GByteArray*) p); } /** * Creates a new #GByteArray with @reserved_size bytes preallocated. * This avoids frequent reallocation, if you are going to add many * bytes to the array. Note however that the size of the array is still * 0. * * Params: * reservedSize = number of bytes preallocated * * Returns: the new #GByteArray */ public static ByteArray sizedNew(uint reservedSize) { auto p = g_byte_array_sized_new(reservedSize); if(p is null) { return null; } return new ByteArray(cast(GByteArray*) p); } /** * Sorts a byte array, using @compare_func which should be a * qsort()-style comparison function (returns less than zero for first * arg is less than second arg, zero for equal, greater than zero if * first arg is greater than second arg). * * If two array elements compare equal, their order in the sorted array * is undefined. If you want equal elements to keep their order (i.e. * you want a stable sort) you can write a comparison function that, * if two elements would otherwise compare equal, compares them by * their addresses. * * Params: * compareFunc = comparison function */ public void sort(GCompareFunc compareFunc) { g_byte_array_sort(gByteArray, compareFunc); } /** * Like g_byte_array_sort(), but the comparison function takes an extra * user data argument. * * Params: * compareFunc = comparison function * userData = data to pass to @compare_func */ public void sortWithData(GCompareDataFunc compareFunc, void* userData) { g_byte_array_sort_with_data(gByteArray, compareFunc, userData); } /** * Atomically decrements the reference count of @array by one. If the * reference count drops to 0, all memory allocated by the array is * released. This function is thread-safe and may be called from any * thread. * * Since: 2.22 */ public void unref() { g_byte_array_unref(gByteArray); } } GtkD-3.7.5/generated/gtkd/glib/Bytes.d000066400000000000000000000216461324604450400174310ustar00rootroot00000000000000/* * 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 glib.Bytes; private import glib.ByteArray; private import glib.ConstructionException; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * A simple refcounted data type representing an immutable sequence of zero or * more bytes from an unspecified origin. * * The purpose of a #GBytes is to keep the memory region that it holds * alive for as long as anyone holds a reference to the bytes. When * the last reference count is dropped, the memory is released. Multiple * unrelated callers can use byte data in the #GBytes without coordinating * their activities, resting assured that the byte data will not change or * move while they hold a reference. * * A #GBytes can come from many different origins that may have * different procedures for freeing the memory region. Examples are * memory from g_malloc(), from memory slices, from a #GMappedFile or * memory from other allocators. * * #GBytes work well as keys in #GHashTable. Use g_bytes_equal() and * g_bytes_hash() as parameters to g_hash_table_new() or g_hash_table_new_full(). * #GBytes can also be used as keys in a #GTree by passing the g_bytes_compare() * function to g_tree_new(). * * The data pointed to by this bytes must not be modified. For a mutable * array of bytes see #GByteArray. Use g_bytes_unref_to_array() to create a * mutable array for a #GBytes sequence. To create an immutable #GBytes from * a mutable #GByteArray, use the g_byte_array_free_to_bytes() function. * * Since: 2.32 */ public class Bytes { /** the main Gtk struct */ protected GBytes* gBytes; protected bool ownedRef; /** Get the main Gtk struct */ public GBytes* getBytesStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gBytes; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gBytes; } /** * Sets our main struct and passes it to the parent class. */ public this (GBytes* gBytes, bool ownedRef = false) { this.gBytes = gBytes; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_bytes_unref(gBytes); } /** * Creates a new #GBytes from @data. * * @data is copied. If @size is 0, @data may be %NULL. * * Params: * data = the data to be used for the bytes * * Returns: a new #GBytes * * Since: 2.32 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] data) { auto p = g_bytes_new(data.ptr, cast(size_t)data.length); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GBytes*) p); } /** * Creates a #GBytes from @data. * * When the last reference is dropped, @free_func will be called with the * @user_data argument. * * @data must not be modified after this call is made until @free_func has * been called to indicate that the bytes is no longer in use. * * @data may be %NULL if @size is 0. * * Params: * data = the data to be used for the bytes * freeFunc = the function to call to release the data * userData = data to pass to @free_func * * Returns: a new #GBytes * * Since: 2.32 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ubyte[] data, GDestroyNotify freeFunc, void* userData) { auto p = g_bytes_new_with_free_func(data.ptr, cast(size_t)data.length, freeFunc, userData); if(p is null) { throw new ConstructionException("null returned by new_with_free_func"); } this(cast(GBytes*) p); } /** * Compares the two #GBytes values. * * This function can be used to sort GBytes instances in lexographical order. * * Params: * bytes2 = a pointer to a #GBytes to compare with @bytes1 * * Returns: a negative value if bytes2 is lesser, a positive value if bytes2 is * greater, and zero if bytes2 is equal to bytes1 * * Since: 2.32 */ public int compare(Bytes bytes2) { return g_bytes_compare(gBytes, (bytes2 is null) ? null : bytes2.getBytesStruct()); } /** * Compares the two #GBytes values being pointed to and returns * %TRUE if they are equal. * * This function can be passed to g_hash_table_new() as the @key_equal_func * parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable. * * Params: * bytes2 = a pointer to a #GBytes to compare with @bytes1 * * Returns: %TRUE if the two keys match. * * Since: 2.32 */ public bool equal(Bytes bytes2) { return g_bytes_equal(gBytes, (bytes2 is null) ? null : bytes2.getBytesStruct()) != 0; } /** * Get the byte data in the #GBytes. This data should not be modified. * * This function will always return the same pointer for a given #GBytes. * * %NULL may be returned if @size is 0. This is not guaranteed, as the #GBytes * may represent an empty string with @data non-%NULL and @size as 0. %NULL will * not be returned if @size is non-zero. * * Returns: a pointer to the byte data, or %NULL * * Since: 2.32 */ public ubyte[] getData() { size_t size; auto p = g_bytes_get_data(gBytes, &size); return cast(ubyte[])p[0 .. size]; } /** * Get the size of the byte data in the #GBytes. * * This function will always return the same value for a given #GBytes. * * Returns: the size * * Since: 2.32 */ public size_t getSize() { return g_bytes_get_size(gBytes); } /** * Creates an integer hash code for the byte data in the #GBytes. * * This function can be passed to g_hash_table_new() as the @key_hash_func * parameter, when using non-%NULL #GBytes pointers as keys in a #GHashTable. * * Returns: a hash value corresponding to the key. * * Since: 2.32 */ public uint hash() { return g_bytes_hash(gBytes); } /** * Creates a #GBytes which is a subsection of another #GBytes. The @offset + * @length may not be longer than the size of @bytes. * * A reference to @bytes will be held by the newly created #GBytes until * the byte data is no longer needed. * * Params: * offset = offset which subsection starts at * length = length of subsection * * Returns: a new #GBytes * * Since: 2.32 */ public Bytes newFromBytes(size_t offset, size_t length) { auto p = g_bytes_new_from_bytes(gBytes, offset, length); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Increase the reference count on @bytes. * * Returns: the #GBytes * * Since: 2.32 */ public Bytes doref() { auto p = g_bytes_ref(gBytes); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Releases a reference on @bytes. This may result in the bytes being * freed. * * Since: 2.32 */ public void unref() { g_bytes_unref(gBytes); } /** * Unreferences the bytes, and returns a new mutable #GByteArray containing * the same byte data. * * As an optimization, the byte data is transferred to the array without copying * if this was the last reference to bytes and bytes was created with * g_bytes_new(), g_bytes_new_take() or g_byte_array_free_to_bytes(). In all * other cases the data is copied. * * Returns: a new mutable #GByteArray containing the same byte data * * Since: 2.32 */ public ByteArray unrefToArray() { auto p = g_bytes_unref_to_array(gBytes); if(p is null) { return null; } return new ByteArray(cast(GByteArray*) p, true); } /** * Unreferences the bytes, and returns a pointer the same byte data * contents. * * As an optimization, the byte data is returned without copying if this was * the last reference to bytes and bytes was created with g_bytes_new(), * g_bytes_new_take() or g_byte_array_free_to_bytes(). In all other cases the * data is copied. * * Returns: a pointer to the same byte data, which should be * freed with g_free() * * Since: 2.32 */ public ubyte[] unrefToData() { size_t size; auto p = g_bytes_unref_to_data(gBytes, &size); return cast(ubyte[])p[0 .. size]; } } GtkD-3.7.5/generated/gtkd/glib/CharacterSet.d000066400000000000000000000514001324604450400207020ustar00rootroot00000000000000/* * 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 glib.CharacterSet; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct CharacterSet { /** * Converts a string from one character set to another. * * Note that you should use g_iconv() for streaming conversions. * Despite the fact that @byes_read can return information about partial * characters, the g_convert_... functions are not generally suitable * for streaming. If the underlying converter maintains internal state, * then this won't be preserved across successive calls to g_convert(), * g_convert_with_iconv() or g_convert_with_fallback(). (An example of * this is the GNU C converter for CP1255 which does not emit a base * character until it knows that the next character is not a mark that * could combine with the base character.) * * Using extensions such as "//TRANSLIT" may not work (or may not work * well) on many platforms. Consider using g_str_to_ascii() instead. * * Params: * str = the string to convert * len = the length of the string in bytes, or -1 if the string is * nul-terminated (Note that some encodings may allow nul * bytes to occur inside strings. In that case, using -1 * for the @len parameter is unsafe) * toCodeset = name of character set into which to convert @str * fromCodeset = character set of @str. * bytesRead = location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters * at the end of the input. If the error * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will the byte offset after the last valid * input sequence. * bytesWritten = the number of bytes stored in the output buffer (not * including the terminating nul). * * Returns: If the conversion was successful, a newly allocated * nul-terminated string, which must be freed with * g_free(). Otherwise %NULL and @error will be set. * * Throws: GException on failure. */ public static string convert(string str, ptrdiff_t len, string toCodeset, string fromCodeset, out size_t bytesRead, out size_t bytesWritten) { GError* err = null; auto retStr = g_convert(Str.toStringz(str), len, Str.toStringz(toCodeset), Str.toStringz(fromCodeset), &bytesRead, &bytesWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** */ public static GQuark convertErrorQuark() { return g_convert_error_quark(); } /** * Converts a string from one character set to another, possibly * including fallback sequences for characters not representable * in the output. Note that it is not guaranteed that the specification * for the fallback sequences in @fallback will be honored. Some * systems may do an approximate conversion from @from_codeset * to @to_codeset in their iconv() functions, * in which case GLib will simply return that approximate conversion. * * Note that you should use g_iconv() for streaming conversions. * Despite the fact that @byes_read can return information about partial * characters, the g_convert_... functions are not generally suitable * for streaming. If the underlying converter maintains internal state, * then this won't be preserved across successive calls to g_convert(), * g_convert_with_iconv() or g_convert_with_fallback(). (An example of * this is the GNU C converter for CP1255 which does not emit a base * character until it knows that the next character is not a mark that * could combine with the base character.) * * Params: * str = the string to convert * len = the length of the string in bytes, or -1 if the string is * nul-terminated (Note that some encodings may allow nul * bytes to occur inside strings. In that case, using -1 * for the @len parameter is unsafe) * toCodeset = name of character set into which to convert @str * fromCodeset = character set of @str. * fallback = UTF-8 string to use in place of character not * present in the target encoding. (The string must be * representable in the target encoding). * If %NULL, characters not in the target encoding will * be represented as Unicode escapes \uxxxx or \Uxxxxyyyy. * bytesRead = location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters * at the end of the input. * bytesWritten = the number of bytes stored in the output buffer (not * including the terminating nul). * * Returns: If the conversion was successful, a newly allocated * nul-terminated string, which must be freed with * g_free(). Otherwise %NULL and @error will be set. * * Throws: GException on failure. */ public static string convertWithFallback(string str, ptrdiff_t len, string toCodeset, string fromCodeset, string fallback, size_t* bytesRead, size_t* bytesWritten) { GError* err = null; auto retStr = g_convert_with_fallback(Str.toStringz(str), len, Str.toStringz(toCodeset), Str.toStringz(fromCodeset), Str.toStringz(fallback), bytesRead, bytesWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a string from one character set to another. * * Note that you should use g_iconv() for streaming conversions. * Despite the fact that @byes_read can return information about partial * characters, the g_convert_... functions are not generally suitable * for streaming. If the underlying converter maintains internal state, * then this won't be preserved across successive calls to g_convert(), * g_convert_with_iconv() or g_convert_with_fallback(). (An example of * this is the GNU C converter for CP1255 which does not emit a base * character until it knows that the next character is not a mark that * could combine with the base character.) * * Params: * str = the string to convert * len = the length of the string in bytes, or -1 if the string is * nul-terminated (Note that some encodings may allow nul * bytes to occur inside strings. In that case, using -1 * for the @len parameter is unsafe) * converter = conversion descriptor from g_iconv_open() * bytesRead = location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters * at the end of the input. If the error * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will the byte offset after the last valid * input sequence. * bytesWritten = the number of bytes stored in the output buffer (not * including the terminating nul). * * Returns: If the conversion was successful, a newly allocated * nul-terminated string, which must be freed with * g_free(). Otherwise %NULL and @error will be set. * * Throws: GException on failure. */ public static string convertWithIconv(string str, ptrdiff_t len, GIConv converter, size_t* bytesRead, size_t* bytesWritten) { GError* err = null; auto retStr = g_convert_with_iconv(Str.toStringz(str), len, converter, bytesRead, bytesWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns the display basename for the particular filename, guaranteed * to be valid UTF-8. The display name might not be identical to the filename, * for instance there might be problems converting it to UTF-8, and some files * can be translated in the display. * * If GLib cannot make sense of the encoding of @filename, as a last resort it * replaces unknown characters with U+FFFD, the Unicode replacement character. * You can search the result for the UTF-8 encoding of this character (which is * "\357\277\275" in octal notation) to find out if @filename was in an invalid * encoding. * * You must pass the whole absolute pathname to this functions so that * translation of well known locations can be done. * * This function is preferred over g_filename_display_name() if you know the * whole path, as it allows translation. * * Params: * filename = an absolute pathname in the * GLib file name encoding * * Returns: a newly allocated string containing * a rendition of the basename of the filename in valid UTF-8 * * Since: 2.6 */ public static string filenameDisplayBasename(string filename) { auto retStr = g_filename_display_basename(Str.toStringz(filename)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a filename into a valid UTF-8 string. The conversion is * not necessarily reversible, so you should keep the original around * and use the return value of this function only for display purposes. * Unlike g_filename_to_utf8(), the result is guaranteed to be non-%NULL * even if the filename actually isn't in the GLib file name encoding. * * If GLib cannot make sense of the encoding of @filename, as a last resort it * replaces unknown characters with U+FFFD, the Unicode replacement character. * You can search the result for the UTF-8 encoding of this character (which is * "\357\277\275" in octal notation) to find out if @filename was in an invalid * encoding. * * If you know the whole pathname of the file you should use * g_filename_display_basename(), since that allows location-based * translation of filenames. * * Params: * filename = a pathname hopefully in the * GLib file name encoding * * Returns: a newly allocated string containing * a rendition of the filename in valid UTF-8 * * Since: 2.6 */ public static string filenameDisplayName(string filename) { auto retStr = g_filename_display_name(Str.toStringz(filename)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a string from UTF-8 to the encoding GLib uses for * filenames. Note that on Windows GLib uses UTF-8 for filenames; * on other platforms, this function indirectly depends on the * [current locale][setlocale]. * * Params: * utf8string = a UTF-8 encoded string. * len = the length of the string, or -1 if the string is * nul-terminated. * bytesRead = location to store the number of bytes in * the input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters * at the end of the input. If the error * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will the byte offset after the last valid * input sequence. * * Returns: The converted string, or %NULL on an error. * * Throws: GException on failure. */ public static string filenameFromUtf8(string utf8string, ptrdiff_t len, out size_t bytesRead) { size_t bytesWritten; GError* err = null; auto retStr = g_filename_from_utf8(Str.toStringz(utf8string), len, &bytesRead, &bytesWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr, bytesWritten); } /** * Converts a string which is in the encoding used by GLib for * filenames into a UTF-8 string. Note that on Windows GLib uses UTF-8 * for filenames; on other platforms, this function indirectly depends on * the [current locale][setlocale]. * * Params: * opsysstring = a string in the encoding for filenames * len = the length of the string, or -1 if the string is * nul-terminated (Note that some encodings may allow nul * bytes to occur inside strings. In that case, using -1 * for the @len parameter is unsafe) * bytesRead = location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters * at the end of the input. If the error * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will the byte offset after the last valid * input sequence. * bytesWritten = the number of bytes stored in the output * buffer (not including the terminating nul). * * Returns: The converted string, or %NULL on an error. * * Throws: GException on failure. */ public static string filenameToUtf8(string opsysstring, ptrdiff_t len, out size_t bytesRead, out size_t bytesWritten) { GError* err = null; auto retStr = g_filename_to_utf8(Str.toStringz(opsysstring), len, &bytesRead, &bytesWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Obtains the character set for the [current locale][setlocale]; you * might use this character set as an argument to g_convert(), to convert * from the current locale's encoding to some other encoding. (Frequently * g_locale_to_utf8() and g_locale_from_utf8() are nice shortcuts, though.) * * On Windows the character set returned by this function is the * so-called system default ANSI code-page. That is the character set * used by the "narrow" versions of C library and Win32 functions that * handle file names. It might be different from the character set * used by the C library's current locale. * * The return value is %TRUE if the locale's encoding is UTF-8, in that * case you can perhaps avoid calling g_convert(). * * The string returned in @charset is not allocated, and should not be * freed. * * Params: * charset = return location for character set * name, or %NULL. * * Returns: %TRUE if the returned charset is UTF-8 */ public static bool getCharset(out string charset) { char* outcharset = null; auto p = g_get_charset(&outcharset) != 0; charset = Str.toString(outcharset); return p; } /** * Gets the character set for the current locale. * * Returns: a newly allocated string containing the name * of the character set. This string must be freed with g_free(). */ public static string getCodeset() { auto retStr = g_get_codeset(); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Determines the preferred character sets used for filenames. * The first character set from the @charsets is the filename encoding, the * subsequent character sets are used when trying to generate a displayable * representation of a filename, see g_filename_display_name(). * * On Unix, the character sets are determined by consulting the * environment variables `G_FILENAME_ENCODING` and `G_BROKEN_FILENAMES`. * On Windows, the character set used in the GLib API is always UTF-8 * and said environment variables have no effect. * * `G_FILENAME_ENCODING` may be set to a comma-separated list of * character set names. The special token "\@locale" is taken * to mean the character set for the [current locale][setlocale]. * If `G_FILENAME_ENCODING` is not set, but `G_BROKEN_FILENAMES` is, * the character set of the current locale is taken as the filename * encoding. If neither environment variable is set, UTF-8 is taken * as the filename encoding, but the character set of the current locale * is also put in the list of encodings. * * The returned @charsets belong to GLib and must not be freed. * * Note that on Unix, regardless of the locale character set or * `G_FILENAME_ENCODING` value, the actual file names present * on a system might be in any random encoding or just gibberish. * * Params: * charsets = return location for the %NULL-terminated list of encoding names * * Returns: %TRUE if the filename encoding is UTF-8. * * Since: 2.6 */ public static bool getFilenameCharsets(string[][] charsets) { return g_get_filename_charsets(Str.toStringzArray(charsets)) != 0; } /** * Converts a string from UTF-8 to the encoding used for strings by * the C runtime (usually the same as that used by the operating * system) in the [current locale][setlocale]. On Windows this means * the system codepage. * * Params: * utf8string = a UTF-8 encoded string * len = the length of the string, or -1 if the string is * nul-terminated (Note that some encodings may allow nul * bytes to occur inside strings. In that case, using -1 * for the @len parameter is unsafe) * bytesRead = location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters * at the end of the input. If the error * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will the byte offset after the last valid * input sequence. * bytesWritten = the number of bytes stored in the output * buffer (not including the terminating nul). * * Returns: A newly-allocated buffer containing the converted string, * or %NULL on an error, and error will be set. * * Throws: GException on failure. */ public static string localeFromUtf8(string utf8string, ptrdiff_t len, out size_t bytesRead, out size_t bytesWritten) { GError* err = null; auto retStr = g_locale_from_utf8(Str.toStringz(utf8string), len, &bytesRead, &bytesWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a string which is in the encoding used for strings by * the C runtime (usually the same as that used by the operating * system) in the [current locale][setlocale] into a UTF-8 string. * * Params: * opsysstring = a string in the encoding of the current locale. On Windows * this means the system codepage. * len = the length of the string, or -1 if the string is * nul-terminated (Note that some encodings may allow nul * bytes to occur inside strings. In that case, using -1 * for the @len parameter is unsafe) * bytesRead = location to store the number of bytes in the * input string that were successfully converted, or %NULL. * Even if the conversion was successful, this may be * less than @len if there were partial characters * at the end of the input. If the error * #G_CONVERT_ERROR_ILLEGAL_SEQUENCE occurs, the value * stored will the byte offset after the last valid * input sequence. * bytesWritten = the number of bytes stored in the output * buffer (not including the terminating nul). * * Returns: A newly-allocated buffer containing the converted string, * or %NULL on an error, and error will be set. * * Throws: GException on failure. */ public static string localeToUtf8(string opsysstring, ptrdiff_t len, out size_t bytesRead, out size_t bytesWritten) { GError* err = null; auto retStr = g_locale_to_utf8(Str.toStringz(opsysstring), len, &bytesRead, &bytesWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/glib/Checksum.d000066400000000000000000000202411324604450400200730ustar00rootroot00000000000000/* * 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 glib.Checksum; private import glib.Bytes; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * An opaque structure representing a checksumming operation. * To create a new GChecksum, use g_checksum_new(). To free * a GChecksum, use g_checksum_free(). * * Since: 2.16 */ public class Checksum { /** the main Gtk struct */ protected GChecksum* gChecksum; protected bool ownedRef; /** Get the main Gtk struct */ public GChecksum* getChecksumStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gChecksum; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gChecksum; } /** * Sets our main struct and passes it to the parent class. */ public this (GChecksum* gChecksum, bool ownedRef = false) { this.gChecksum = gChecksum; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_checksum_free(gChecksum); } /** * Gets the digest from checksum as a raw binary vector and places it * into buffer. The size of the digest depends on the type of checksum. * * Once this function has been called, the Checksum is closed and can * no longer be updated with update(). * * Params: * buffer = output buffer * digestLen = an inout parameter. The caller initializes it to the size of buffer. * After the call it contains the length of the digest. * * Since: 2.16 */ public void getDigest(ref ubyte[] buffer) { size_t digestLen = buffer.length; g_checksum_get_digest(gChecksum, buffer.ptr, &digestLen); buffer = buffer[0 .. digestLen]; } /** */ /** * Creates a new #GChecksum, using the checksum algorithm @checksum_type. * If the @checksum_type is not known, %NULL is returned. * A #GChecksum can be used to compute the checksum, or digest, of an * arbitrary binary blob, using different hashing algorithms. * * A #GChecksum works by feeding a binary blob through g_checksum_update() * until there is data to be checked; the digest can then be extracted * using g_checksum_get_string(), which will return the checksum as a * hexadecimal string; or g_checksum_get_digest(), which will return a * vector of raw bytes. Once either g_checksum_get_string() or * g_checksum_get_digest() have been called on a #GChecksum, the checksum * will be closed and it won't be possible to call g_checksum_update() * on it anymore. * * Params: * checksumType = the desired type of checksum * * Returns: the newly created #GChecksum, or %NULL. * Use g_checksum_free() to free the memory allocated by it. * * Since: 2.16 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GChecksumType checksumType) { auto p = g_checksum_new(checksumType); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GChecksum*) p); } /** * Copies a #GChecksum. If @checksum has been closed, by calling * g_checksum_get_string() or g_checksum_get_digest(), the copied * checksum will be closed as well. * * Returns: the copy of the passed #GChecksum. Use g_checksum_free() * when finished using it. * * Since: 2.16 */ public Checksum copy() { auto p = g_checksum_copy(gChecksum); if(p is null) { return null; } return new Checksum(cast(GChecksum*) p, true); } /** * Frees the memory allocated for @checksum. * * Since: 2.16 */ public void free() { g_checksum_free(gChecksum); ownedRef = false; } /** * Gets the digest as an hexadecimal string. * * Once this function has been called the #GChecksum can no longer be * updated with g_checksum_update(). * * The hexadecimal characters will be lower case. * * Returns: the hexadecimal representation of the checksum. The * returned string is owned by the checksum and should not be modified * or freed. * * Since: 2.16 */ public string getString() { return Str.toString(g_checksum_get_string(gChecksum)); } /** * Resets the state of the @checksum back to its initial state. * * Since: 2.18 */ public void reset() { g_checksum_reset(gChecksum); } /** * Feeds @data into an existing #GChecksum. The checksum must still be * open, that is g_checksum_get_string() or g_checksum_get_digest() must * not have been called on @checksum. * * Params: * data = buffer used to compute the checksum * * Since: 2.16 */ public void update(char[] data) { g_checksum_update(gChecksum, data.ptr, cast(ptrdiff_t)data.length); } /** * Gets the length in bytes of digests of type @checksum_type * * Params: * checksumType = a #GChecksumType * * Returns: the checksum length, or -1 if @checksum_type is * not supported. * * Since: 2.16 */ public static ptrdiff_t typeGetLength(GChecksumType checksumType) { return g_checksum_type_get_length(checksumType); } /** * Computes the checksum for a binary @data. This is a * convenience wrapper for g_checksum_new(), g_checksum_get_string() * and g_checksum_free(). * * The hexadecimal string returned will be in lower case. * * Params: * checksumType = a #GChecksumType * data = binary blob to compute the digest of * * Returns: the digest of the binary data as a string in hexadecimal. * The returned string should be freed with g_free() when done using it. * * Since: 2.34 */ public static string computeChecksumForBytes(GChecksumType checksumType, Bytes data) { auto retStr = g_compute_checksum_for_bytes(checksumType, (data is null) ? null : data.getBytesStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Computes the checksum for a binary @data of @length. This is a * convenience wrapper for g_checksum_new(), g_checksum_get_string() * and g_checksum_free(). * * The hexadecimal string returned will be in lower case. * * Params: * checksumType = a #GChecksumType * data = binary blob to compute the digest of * * Returns: the digest of the binary data as a string in hexadecimal. * The returned string should be freed with g_free() when done using it. * * Since: 2.16 */ public static string computeChecksumForData(GChecksumType checksumType, char[] data) { auto retStr = g_compute_checksum_for_data(checksumType, data.ptr, cast(size_t)data.length); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Computes the checksum of a string. * * The hexadecimal string returned will be in lower case. * * Params: * checksumType = a #GChecksumType * str = the string to compute the checksum of * length = the length of the string, or -1 if the string is null-terminated. * * Returns: the checksum as a hexadecimal string. The returned string * should be freed with g_free() when done using it. * * Since: 2.16 */ public static string computeChecksumForString(GChecksumType checksumType, string str, ptrdiff_t length) { auto retStr = g_compute_checksum_for_string(checksumType, Str.toStringz(str), length); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/glib/Child.d000066400000000000000000000131761324604450400173650ustar00rootroot00000000000000/* * 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 glib.Child; private import glib.Source; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Child { /** * Sets a function to be called when the child indicated by @pid * exits, at a default priority, #G_PRIORITY_DEFAULT. * * If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes() * you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to * the spawn function for the child watching to work. * * Note that on platforms where #GPid must be explicitly closed * (see g_spawn_close_pid()) @pid must not be closed while the * source is still active. Typically, you will want to call * g_spawn_close_pid() in the callback function for the source. * * GLib supports only a single callback per process id. * * This internally creates a main loop source using * g_child_watch_source_new() and attaches it to the main loop context * using g_source_attach(). You can do these steps manually if you * need greater control. * * Params: * pid = process id to watch. On POSIX the positive pid of a child * process. On Windows a handle for a process (which doesn't have to be * a child). * funct = function to call * data = data to pass to @function * * Returns: the ID (greater than 0) of the event source. * * Since: 2.4 */ public static uint childWatchAdd(GPid pid, GChildWatchFunc funct, void* data) { return g_child_watch_add(pid, funct, data); } /** * Sets a function to be called when the child indicated by @pid * exits, at the priority @priority. * * If you obtain @pid from g_spawn_async() or g_spawn_async_with_pipes() * you will need to pass #G_SPAWN_DO_NOT_REAP_CHILD as flag to * the spawn function for the child watching to work. * * In many programs, you will want to call g_spawn_check_exit_status() * in the callback to determine whether or not the child exited * successfully. * * Also, note that on platforms where #GPid must be explicitly closed * (see g_spawn_close_pid()) @pid must not be closed while the source * is still active. Typically, you should invoke g_spawn_close_pid() * in the callback function for the source. * * GLib supports only a single callback per process id. * * This internally creates a main loop source using * g_child_watch_source_new() and attaches it to the main loop context * using g_source_attach(). You can do these steps manually if you * need greater control. * * Params: * priority = the priority of the idle source. Typically this will be in the * range between #G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE. * pid = process to watch. On POSIX the positive pid of a child process. On * Windows a handle for a process (which doesn't have to be a child). * funct = function to call * data = data to pass to @function * notify = function to call when the idle is removed, or %NULL * * Returns: the ID (greater than 0) of the event source. * * Since: 2.4 */ public static uint childWatchAddFull(int priority, GPid pid, GChildWatchFunc funct, void* data, GDestroyNotify notify) { return g_child_watch_add_full(priority, pid, funct, data, notify); } /** * Creates a new child_watch source. * * The source will not initially be associated with any #GMainContext * and must be added to one with g_source_attach() before it will be * executed. * * Note that child watch sources can only be used in conjunction with * `g_spawn...` when the %G_SPAWN_DO_NOT_REAP_CHILD flag is used. * * Note that on platforms where #GPid must be explicitly closed * (see g_spawn_close_pid()) @pid must not be closed while the * source is still active. Typically, you will want to call * g_spawn_close_pid() in the callback function for the source. * * Note further that using g_child_watch_source_new() is not * compatible with calling `waitpid` with a nonpositive first * argument in the application. Calling waitpid() for individual * pids will still work fine. * * Similarly, on POSIX platforms, the @pid passed to this function must * be greater than 0 (i.e. this function must wait for a specific child, * and cannot wait for one of many children by using a nonpositive argument). * * Params: * pid = process to watch. On POSIX the positive pid of a child process. On * Windows a handle for a process (which doesn't have to be a child). * * Returns: the newly-created child watch source * * Since: 2.4 */ public static Source childWatchSourceNew(GPid pid) { auto p = g_child_watch_source_new(pid); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } } GtkD-3.7.5/generated/gtkd/glib/Cond.d000066400000000000000000000203051324604450400172150ustar00rootroot00000000000000/* * 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 glib.Cond; private import glib.Mutex; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The #GCond struct is an opaque data structure that represents a * condition. Threads can block on a #GCond if they find a certain * condition to be false. If other threads change the state of this * condition they signal the #GCond, and that causes the waiting * threads to be woken up. * * Consider the following example of a shared variable. One or more * threads can wait for data to be published to the variable and when * another thread publishes the data, it can signal one of the waiting * threads to wake up to collect the data. * * Here is an example for using GCond to block a thread until a condition * is satisfied: * |[ * gpointer current_data = NULL; * GMutex data_mutex; * GCond data_cond; * * void * push_data (gpointer data) * { * g_mutex_lock (&data_mutex); * current_data = data; * g_cond_signal (&data_cond); * g_mutex_unlock (&data_mutex); * } * * gpointer * pop_data (void) * { * gpointer data; * * g_mutex_lock (&data_mutex); * while (!current_data) * g_cond_wait (&data_cond, &data_mutex); * data = current_data; * current_data = NULL; * g_mutex_unlock (&data_mutex); * * return data; * } * ]| * Whenever a thread calls pop_data() now, it will wait until * current_data is non-%NULL, i.e. until some other thread * has called push_data(). * * The example shows that use of a condition variable must always be * paired with a mutex. Without the use of a mutex, there would be a * race between the check of @current_data by the while loop in * pop_data() and waiting. Specifically, another thread could set * @current_data after the check, and signal the cond (with nobody * waiting on it) before the first thread goes to sleep. #GCond is * specifically useful for its ability to release the mutex and go * to sleep atomically. * * It is also important to use the g_cond_wait() and g_cond_wait_until() * functions only inside a loop which checks for the condition to be * true. See g_cond_wait() for an explanation of why the condition may * not be true even after it returns. * * If a #GCond is allocated in static storage then it can be used * without initialisation. Otherwise, you should call g_cond_init() * on it and g_cond_clear() when done. * * A #GCond should only be accessed via the g_cond_ functions. */ public class Cond { /** the main Gtk struct */ protected GCond* gCond; protected bool ownedRef; /** Get the main Gtk struct */ public GCond* getCondStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gCond; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gCond; } /** * Sets our main struct and passes it to the parent class. */ public this (GCond* gCond, bool ownedRef = false) { this.gCond = gCond; this.ownedRef = ownedRef; } /** * If threads are waiting for @cond, all of them are unblocked. * If no threads are waiting for @cond, this function has no effect. * It is good practice to lock the same mutex as the waiting threads * while calling this function, though not required. */ public void broadcast() { g_cond_broadcast(gCond); } /** * Frees the resources allocated to a #GCond with g_cond_init(). * * This function should not be used with a #GCond that has been * statically allocated. * * Calling g_cond_clear() for a #GCond on which threads are * blocking leads to undefined behaviour. * * Since: 2.32 */ public void clear() { g_cond_clear(gCond); } /** * Initialises a #GCond so that it can be used. * * This function is useful to initialise a #GCond that has been * allocated as part of a larger structure. It is not necessary to * initialise a #GCond that has been statically allocated. * * To undo the effect of g_cond_init() when a #GCond is no longer * needed, use g_cond_clear(). * * Calling g_cond_init() on an already-initialised #GCond leads * to undefined behaviour. * * Since: 2.32 */ public void init() { g_cond_init(gCond); } /** * If threads are waiting for @cond, at least one of them is unblocked. * If no threads are waiting for @cond, this function has no effect. * It is good practice to hold the same lock as the waiting thread * while calling this function, though not required. */ public void signal() { g_cond_signal(gCond); } /** * Atomically releases @mutex and waits until @cond is signalled. * When this function returns, @mutex is locked again and owned by the * calling thread. * * When using condition variables, it is possible that a spurious wakeup * may occur (ie: g_cond_wait() returns even though g_cond_signal() was * not called). It's also possible that a stolen wakeup may occur. * This is when g_cond_signal() is called, but another thread acquires * @mutex before this thread and modifies the state of the program in * such a way that when g_cond_wait() is able to return, the expected * condition is no longer met. * * For this reason, g_cond_wait() must always be used in a loop. See * the documentation for #GCond for a complete example. * * Params: * mutex = a #GMutex that is currently locked */ public void wait(Mutex mutex) { g_cond_wait(gCond, (mutex is null) ? null : mutex.getMutexStruct()); } /** * Waits until either @cond is signalled or @end_time has passed. * * As with g_cond_wait() it is possible that a spurious or stolen wakeup * could occur. For that reason, waiting on a condition variable should * always be in a loop, based on an explicitly-checked predicate. * * %TRUE is returned if the condition variable was signalled (or in the * case of a spurious wakeup). %FALSE is returned if @end_time has * passed. * * The following code shows how to correctly perform a timed wait on a * condition variable (extending the example presented in the * documentation for #GCond): * * |[ * gpointer * pop_data_timed (void) * { * gint64 end_time; * gpointer data; * * g_mutex_lock (&data_mutex); * * end_time = g_get_monotonic_time () + 5 * G_TIME_SPAN_SECOND; * while (!current_data) * if (!g_cond_wait_until (&data_cond, &data_mutex, end_time)) * { * // timeout has passed. * g_mutex_unlock (&data_mutex); * return NULL; * } * * // there is data for us * data = current_data; * current_data = NULL; * * g_mutex_unlock (&data_mutex); * * return data; * } * ]| * * Notice that the end time is calculated once, before entering the * loop and reused. This is the motivation behind the use of absolute * time on this API -- if a relative time of 5 seconds were passed * directly to the call and a spurious wakeup occurred, the program would * have to start over waiting again (which would lead to a total wait * time of more than 5 seconds). * * Params: * mutex = a #GMutex that is currently locked * endTime = the monotonic time to wait until * * Returns: %TRUE on a signal, %FALSE on a timeout * * Since: 2.32 */ public bool waitUntil(Mutex mutex, long endTime) { return g_cond_wait_until(gCond, (mutex is null) ? null : mutex.getMutexStruct(), endTime) != 0; } } GtkD-3.7.5/generated/gtkd/glib/ConstructionException.d000066400000000000000000000023731324604450400227100ustar00rootroot00000000000000/* * 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 glib.ConstructionException; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ class ConstructionException : Exception { this(string message) { super(message); } override string toString() { return "Construction failure, " ~ msg; } } /** */ GtkD-3.7.5/generated/gtkd/glib/DataList.d000066400000000000000000000207411324604450400200430ustar00rootroot00000000000000/* * 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 glib.DataList; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct DataList { /** * Frees all the data elements of the datalist. * The data elements' destroy functions are called * if they have been set. * * Params: * datalist = a datalist. */ public static void clear(GData** datalist) { g_datalist_clear(datalist); } /** * Calls the given function for each data element of the datalist. The * function is called with each data element's #GQuark id and data, * together with the given @user_data parameter. Note that this * function is NOT thread-safe. So unless @datalist can be protected * from any modifications during invocation of this function, it should * not be called. * * Params: * datalist = a datalist. * func = the function to call for each data element. * userData = user data to pass to the function. */ public static void foreac(GData** datalist, GDataForeachFunc func, void* userData) { g_datalist_foreach(datalist, func, userData); } /** * Gets a data element, using its string identifier. This is slower than * g_datalist_id_get_data() because it compares strings. * * Params: * datalist = a datalist. * key = the string identifying a data element. * * Returns: the data element, or %NULL if it is not found. */ public static void* getData(GData** datalist, string key) { return g_datalist_get_data(datalist, Str.toStringz(key)); } /** * Gets flags values packed in together with the datalist. * See g_datalist_set_flags(). * * Params: * datalist = pointer to the location that holds a list * * Returns: the flags of the datalist * * Since: 2.8 */ public static uint getFlags(GData** datalist) { return g_datalist_get_flags(datalist); } /** * This is a variant of g_datalist_id_get_data() which * returns a 'duplicate' of the value. @dup_func defines the * meaning of 'duplicate' in this context, it could e.g. * take a reference on a ref-counted object. * * If the @key_id is not set in the datalist then @dup_func * will be called with a %NULL argument. * * Note that @dup_func is called while the datalist is locked, so it * is not allowed to read or modify the datalist. * * This function can be useful to avoid races when multiple * threads are using the same datalist and the same key. * * Params: * datalist = location of a datalist * keyId = the #GQuark identifying a data element * dupFunc = function to duplicate the old value * userData = passed as user_data to @dup_func * * Returns: the result of calling @dup_func on the value * associated with @key_id in @datalist, or %NULL if not set. * If @dup_func is %NULL, the value is returned unmodified. * * Since: 2.34 */ public static void* idDupData(GData** datalist, GQuark keyId, GDuplicateFunc dupFunc, void* userData) { return g_datalist_id_dup_data(datalist, keyId, dupFunc, userData); } /** * Retrieves the data element corresponding to @key_id. * * Params: * datalist = a datalist. * keyId = the #GQuark identifying a data element. * * Returns: the data element, or %NULL if it is not found. */ public static void* idGetData(GData** datalist, GQuark keyId) { return g_datalist_id_get_data(datalist, keyId); } /** * Removes an element, without calling its destroy notification * function. * * Params: * datalist = a datalist. * keyId = the #GQuark identifying a data element. * * Returns: the data previously stored at @key_id, or %NULL if none. */ public static void* idRemoveNoNotify(GData** datalist, GQuark keyId) { return g_datalist_id_remove_no_notify(datalist, keyId); } /** * Compares the member that is associated with @key_id in * @datalist to @oldval, and if they are the same, replace * @oldval with @newval. * * This is like a typical atomic compare-and-exchange * operation, for a member of @datalist. * * If the previous value was replaced then ownership of the * old value (@oldval) is passed to the caller, including * the registred destroy notify for it (passed out in @old_destroy). * Its up to the caller to free this as he wishes, which may * or may not include using @old_destroy as sometimes replacement * should not destroy the object in the normal way. * * Params: * datalist = location of a datalist * keyId = the #GQuark identifying a data element * oldval = the old value to compare against * newval = the new value to replace it with * destroy = destroy notify for the new value * oldDestroy = destroy notify for the existing value * * Returns: %TRUE if the existing value for @key_id was replaced * by @newval, %FALSE otherwise. * * Since: 2.34 */ public static bool idReplaceData(GData** datalist, GQuark keyId, void* oldval, void* newval, GDestroyNotify destroy, GDestroyNotify* oldDestroy) { return g_datalist_id_replace_data(datalist, keyId, oldval, newval, destroy, oldDestroy) != 0; } /** * Sets the data corresponding to the given #GQuark id, and the * function to be called when the element is removed from the datalist. * Any previous data with the same key is removed, and its destroy * function is called. * * Params: * datalist = a datalist. * keyId = the #GQuark to identify the data element. * data = the data element or %NULL to remove any previous element * corresponding to @key_id. * destroyFunc = the function to call when the data element is * removed. This function will be called with the data * element and can be used to free any memory allocated * for it. If @data is %NULL, then @destroy_func must * also be %NULL. */ public static void idSetDataFull(GData** datalist, GQuark keyId, void* data, GDestroyNotify destroyFunc) { g_datalist_id_set_data_full(datalist, keyId, data, destroyFunc); } /** * Resets the datalist to %NULL. It does not free any memory or call * any destroy functions. * * Params: * datalist = a pointer to a pointer to a datalist. */ public static void init(GData** datalist) { g_datalist_init(datalist); } /** * Turns on flag values for a data list. This function is used * to keep a small number of boolean flags in an object with * a data list without using any additional space. It is * not generally useful except in circumstances where space * is very tight. (It is used in the base #GObject type, for * example.) * * Params: * datalist = pointer to the location that holds a list * flags = the flags to turn on. The values of the flags are * restricted by %G_DATALIST_FLAGS_MASK (currently * 3; giving two possible boolean flags). * A value for @flags that doesn't fit within the mask is * an error. * * Since: 2.8 */ public static void setFlags(GData** datalist, uint flags) { g_datalist_set_flags(datalist, flags); } /** * Turns off flag values for a data list. See g_datalist_unset_flags() * * Params: * datalist = pointer to the location that holds a list * flags = the flags to turn off. The values of the flags are * restricted by %G_DATALIST_FLAGS_MASK (currently * 3: giving two possible boolean flags). * A value for @flags that doesn't fit within the mask is * an error. * * Since: 2.8 */ public static void unsetFlags(GData** datalist, uint flags) { g_datalist_unset_flags(datalist, flags); } } GtkD-3.7.5/generated/gtkd/glib/DataSet.d000066400000000000000000000072421324604450400176640ustar00rootroot00000000000000/* * 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 glib.DataSet; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct DataSet { /** * Destroys the dataset, freeing all memory allocated, and calling any * destroy functions set for data elements. * * Params: * datasetLocation = the location identifying the dataset. */ public static void destroy(void* datasetLocation) { g_dataset_destroy(datasetLocation); } /** * Calls the given function for each data element which is associated * with the given location. Note that this function is NOT thread-safe. * So unless @datalist can be protected from any modifications during * invocation of this function, it should not be called. * * Params: * datasetLocation = the location identifying the dataset. * func = the function to call for each data element. * userData = user data to pass to the function. */ public static void foreac(void* datasetLocation, GDataForeachFunc func, void* userData) { g_dataset_foreach(datasetLocation, func, userData); } /** * Gets the data element corresponding to a #GQuark. * * Params: * datasetLocation = the location identifying the dataset. * keyId = the #GQuark id to identify the data element. * * Returns: the data element corresponding to the #GQuark, or %NULL if * it is not found. */ public static void* idGetData(void* datasetLocation, GQuark keyId) { return g_dataset_id_get_data(datasetLocation, keyId); } /** * Removes an element, without calling its destroy notification * function. * * Params: * datasetLocation = the location identifying the dataset. * keyId = the #GQuark ID identifying the data element. * * Returns: the data previously stored at @key_id, or %NULL if none. */ public static void* idRemoveNoNotify(void* datasetLocation, GQuark keyId) { return g_dataset_id_remove_no_notify(datasetLocation, keyId); } /** * Sets the data element associated with the given #GQuark id, and also * the function to call when the data element is destroyed. Any * previous data with the same key is removed, and its destroy function * is called. * * Params: * datasetLocation = the location identifying the dataset. * keyId = the #GQuark id to identify the data element. * data = the data element. * destroyFunc = the function to call when the data element is * removed. This function will be called with the data * element and can be used to free any memory allocated * for it. */ public static void idSetDataFull(void* datasetLocation, GQuark keyId, void* data, GDestroyNotify destroyFunc) { g_dataset_id_set_data_full(datasetLocation, keyId, data, destroyFunc); } } GtkD-3.7.5/generated/gtkd/glib/Date.d000066400000000000000000000523471324604450400172220ustar00rootroot00000000000000/* * 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 glib.Date; private import glib.ConstructionException; private import glib.Str; private import glib.TimeVal; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * Represents a day between January 1, Year 1 and a few thousand years in * the future. None of its members should be accessed directly. * * If the #GDate-struct is obtained from g_date_new(), it will be safe * to mutate but invalid and thus not safe for calendrical computations. * * If it's declared on the stack, it will contain garbage so must be * initialized with g_date_clear(). g_date_clear() makes the date invalid * but sane. An invalid date doesn't represent a day, it's "empty." A date * becomes valid after you set it to a Julian day or you set a day, month, * and year. */ public final class Date { /** the main Gtk struct */ protected GDate* gDate; protected bool ownedRef; /** Get the main Gtk struct */ public GDate* getDateStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDate; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDate; } /** * Sets our main struct and passes it to the parent class. */ public this (GDate* gDate, bool ownedRef = false) { this.gDate = gDate; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_date_free(gDate); } /** * the Julian representation of the date */ public @property uint julianDays() { return gDate.julianDays; } /** Ditto */ public @property void julianDays(uint value) { gDate.julianDays = value; } /** * this bit is set if @julian_days is valid */ public @property uint julian() { return gDate.julian; } /** Ditto */ public @property void julian(uint value) { gDate.julian = value; } /** * this is set if @day, @month and @year are valid */ public @property uint dmy() { return gDate.dmy; } /** Ditto */ public @property void dmy(uint value) { gDate.dmy = value; } /** * the day of the day-month-year representation of the date, * as a number between 1 and 31 */ public @property uint day() { return gDate.day; } /** Ditto */ public @property void day(uint value) { gDate.day = value; } /** * the day of the day-month-year representation of the date, * as a number between 1 and 12 */ public @property uint month() { return gDate.month; } /** Ditto */ public @property void month(uint value) { gDate.month = value; } /** * the day of the day-month-year representation of the date */ public @property uint year() { return gDate.year; } /** Ditto */ public @property void year(uint value) { gDate.year = value; } /** * Allocates a #GDate and initializes * it to a sane state. The new date will * be cleared (as if you'd called g_date_clear()) but invalid (it won't * represent an existing day). Free the return value with g_date_free(). * * Returns: a newly-allocated #GDate * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_date_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDate*) p); } /** * Like g_date_new(), but also sets the value of the date. Assuming the * day-month-year triplet you pass in represents an existing day, the * returned date will be valid. * * Params: * day = day of the month * month = month of the year * year = year * * Returns: a newly-allocated #GDate initialized with @day, @month, and @year * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GDateDay day, GDateMonth month, GDateYear year) { auto p = g_date_new_dmy(day, month, year); if(p is null) { throw new ConstructionException("null returned by new_dmy"); } this(cast(GDate*) p); } /** * Like g_date_new(), but also sets the value of the date. Assuming the * Julian day number you pass in is valid (greater than 0, less than an * unreasonably large number), the returned date will be valid. * * Params: * julianDay = days since January 1, Year 1 * * Returns: a newly-allocated #GDate initialized with @julian_day * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint julianDay) { auto p = g_date_new_julian(julianDay); if(p is null) { throw new ConstructionException("null returned by new_julian"); } this(cast(GDate*) p); } /** * Increments a date some number of days. * To move forward by weeks, add weeks*7 days. * The date must be valid. * * Params: * nDays = number of days to move the date forward */ public void addDays(uint nDays) { g_date_add_days(gDate, nDays); } /** * Increments a date by some number of months. * If the day of the month is greater than 28, * this routine may change the day of the month * (because the destination month may not have * the current day in it). The date must be valid. * * Params: * nMonths = number of months to move forward */ public void addMonths(uint nMonths) { g_date_add_months(gDate, nMonths); } /** * Increments a date by some number of years. * If the date is February 29, and the destination * year is not a leap year, the date will be changed * to February 28. The date must be valid. * * Params: * nYears = number of years to move forward */ public void addYears(uint nYears) { g_date_add_years(gDate, nYears); } /** * If @date is prior to @min_date, sets @date equal to @min_date. * If @date falls after @max_date, sets @date equal to @max_date. * Otherwise, @date is unchanged. * Either of @min_date and @max_date may be %NULL. * All non-%NULL dates must be valid. * * Params: * minDate = minimum accepted value for @date * maxDate = maximum accepted value for @date */ public void clamp(Date minDate, Date maxDate) { g_date_clamp(gDate, (minDate is null) ? null : minDate.getDateStruct(), (maxDate is null) ? null : maxDate.getDateStruct()); } /** * Initializes one or more #GDate structs to a sane but invalid * state. The cleared dates will not represent an existing date, but will * not contain garbage. Useful to init a date declared on the stack. * Validity can be tested with g_date_valid(). * * Params: * nDates = number of dates to clear */ public void clear(uint nDates) { g_date_clear(gDate, nDates); } /** * qsort()-style comparison function for dates. * Both dates must be valid. * * Params: * rhs = second date to compare * * Returns: 0 for equal, less than zero if @lhs is less than @rhs, * greater than zero if @lhs is greater than @rhs */ public int compare(Date rhs) { return g_date_compare(gDate, (rhs is null) ? null : rhs.getDateStruct()); } /** * Computes the number of days between two dates. * If @date2 is prior to @date1, the returned value is negative. * Both dates must be valid. * * Params: * date2 = the second date * * Returns: the number of days between @date1 and @date2 */ public int daysBetween(Date date2) { return g_date_days_between(gDate, (date2 is null) ? null : date2.getDateStruct()); } /** * Frees a #GDate returned from g_date_new(). */ public void free() { g_date_free(gDate); ownedRef = false; } /** * Returns the day of the month. The date must be valid. * * Returns: day of the month */ public GDateDay getDay() { return g_date_get_day(gDate); } /** * Returns the day of the year, where Jan 1 is the first day of the * year. The date must be valid. * * Returns: day of the year */ public uint getDayOfYear() { return g_date_get_day_of_year(gDate); } /** * Returns the week of the year, where weeks are interpreted according * to ISO 8601. * * Returns: ISO 8601 week number of the year. * * Since: 2.6 */ public uint getIso8601WeekOfYear() { return g_date_get_iso8601_week_of_year(gDate); } /** * Returns the Julian day or "serial number" of the #GDate. The * Julian day is simply the number of days since January 1, Year 1; i.e., * January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2, * etc. The date must be valid. * * Returns: Julian day */ public uint getJulian() { return g_date_get_julian(gDate); } /** * Returns the week of the year, where weeks are understood to start on * Monday. If the date is before the first Monday of the year, return 0. * The date must be valid. * * Returns: week of the year */ public uint getMondayWeekOfYear() { return g_date_get_monday_week_of_year(gDate); } /** * Returns the month of the year. The date must be valid. * * Returns: month of the year as a #GDateMonth */ public GDateMonth getMonth() { return g_date_get_month(gDate); } /** * Returns the week of the year during which this date falls, if * weeks are understood to begin on Sunday. The date must be valid. * Can return 0 if the day is before the first Sunday of the year. * * Returns: week number */ public uint getSundayWeekOfYear() { return g_date_get_sunday_week_of_year(gDate); } /** * Returns the day of the week for a #GDate. The date must be valid. * * Returns: day of the week as a #GDateWeekday. */ public GDateWeekday getWeekday() { return g_date_get_weekday(gDate); } /** * Returns the year of a #GDate. The date must be valid. * * Returns: year in which the date falls */ public GDateYear getYear() { return g_date_get_year(gDate); } /** * Returns %TRUE if the date is on the first of a month. * The date must be valid. * * Returns: %TRUE if the date is the first of the month */ public bool isFirstOfMonth() { return g_date_is_first_of_month(gDate) != 0; } /** * Returns %TRUE if the date is the last day of the month. * The date must be valid. * * Returns: %TRUE if the date is the last day of the month */ public bool isLastOfMonth() { return g_date_is_last_of_month(gDate) != 0; } /** * Checks if @date1 is less than or equal to @date2, * and swap the values if this is not the case. * * Params: * date2 = the second date */ public void order(Date date2) { g_date_order(gDate, (date2 is null) ? null : date2.getDateStruct()); } /** * Sets the day of the month for a #GDate. If the resulting * day-month-year triplet is invalid, the date will be invalid. * * Params: * day = day to set */ public void setDay(GDateDay day) { g_date_set_day(gDate, day); } /** * Sets the value of a #GDate from a day, month, and year. * The day-month-year triplet must be valid; if you aren't * sure it is, call g_date_valid_dmy() to check before you * set it. * * Params: * day = day * month = month * y = year */ public void setDmy(GDateDay day, GDateMonth month, GDateYear y) { g_date_set_dmy(gDate, day, month, y); } /** * Sets the value of a #GDate from a Julian day number. * * Params: * julianDate = Julian day number (days since January 1, Year 1) */ public void setJulian(uint julianDate) { g_date_set_julian(gDate, julianDate); } /** * Sets the month of the year for a #GDate. If the resulting * day-month-year triplet is invalid, the date will be invalid. * * Params: * month = month to set */ public void setMonth(GDateMonth month) { g_date_set_month(gDate, month); } /** * Parses a user-inputted string @str, and try to figure out what date it * represents, taking the [current locale][setlocale] into account. If the * string is successfully parsed, the date will be valid after the call. * Otherwise, it will be invalid. You should check using g_date_valid() * to see whether the parsing succeeded. * * This function is not appropriate for file formats and the like; it * isn't very precise, and its exact behavior varies with the locale. * It's intended to be a heuristic routine that guesses what the user * means by a given string (and it does work pretty well in that * capacity). * * Params: * str = string to parse */ public void setParse(string str) { g_date_set_parse(gDate, Str.toStringz(str)); } /** * Sets the value of a date from a #GTime value. * The time to date conversion is done using the user's current timezone. * * Deprecated: Use g_date_set_time_t() instead. * * Params: * time = #GTime value to set. */ public void setTime(GTime time) { g_date_set_time(gDate, time); } /** * Sets the value of a date to the date corresponding to a time * specified as a time_t. The time to date conversion is done using * the user's current timezone. * * To set the value of a date to the current day, you could write: * |[ * g_date_set_time_t (date, time (NULL)); * ]| * * Params: * timet = time_t value to set * * Since: 2.10 */ public void setTimeT(uint timet) { g_date_set_time_t(gDate, timet); } /** * Sets the value of a date from a #GTimeVal value. Note that the * @tv_usec member is ignored, because #GDate can't make use of the * additional precision. * * The time to date conversion is done using the user's current timezone. * * Params: * timeval = #GTimeVal value to set * * Since: 2.10 */ public void setTimeVal(TimeVal timeval) { g_date_set_time_val(gDate, (timeval is null) ? null : timeval.getTimeValStruct()); } /** * Sets the year for a #GDate. If the resulting day-month-year * triplet is invalid, the date will be invalid. * * Params: * year = year to set */ public void setYear(GDateYear year) { g_date_set_year(gDate, year); } /** * Moves a date some number of days into the past. * To move by weeks, just move by weeks*7 days. * The date must be valid. * * Params: * nDays = number of days to move */ public void subtractDays(uint nDays) { g_date_subtract_days(gDate, nDays); } /** * Moves a date some number of months into the past. * If the current day of the month doesn't exist in * the destination month, the day of the month * may change. The date must be valid. * * Params: * nMonths = number of months to move */ public void subtractMonths(uint nMonths) { g_date_subtract_months(gDate, nMonths); } /** * Moves a date some number of years into the past. * If the current day doesn't exist in the destination * year (i.e. it's February 29 and you move to a non-leap-year) * then the day is changed to February 29. The date * must be valid. * * Params: * nYears = number of years to move */ public void subtractYears(uint nYears) { g_date_subtract_years(gDate, nYears); } /** * Fills in the date-related bits of a struct tm using the @date value. * Initializes the non-date parts with something sane but meaningless. * * Params: * tm = struct tm to fill */ public void toStructTm(void* tm) { g_date_to_struct_tm(gDate, tm); } /** * Returns %TRUE if the #GDate represents an existing day. The date must not * contain garbage; it should have been initialized with g_date_clear() * if it wasn't allocated by one of the g_date_new() variants. * * Returns: Whether the date is valid */ public bool valid() { return g_date_valid(gDate) != 0; } /** * Returns the number of days in a month, taking leap * years into account. * * Params: * month = month * year = year * * Returns: number of days in @month during the @year */ public static ubyte getDaysInMonth(GDateMonth month, GDateYear year) { return g_date_get_days_in_month(month, year); } /** * Returns the number of weeks in the year, where weeks * are taken to start on Monday. Will be 52 or 53. The * date must be valid. (Years always have 52 7-day periods, * plus 1 or 2 extra days depending on whether it's a leap * year. This function is basically telling you how many * Mondays are in the year, i.e. there are 53 Mondays if * one of the extra days happens to be a Monday.) * * Params: * year = a year * * Returns: number of Mondays in the year */ public static ubyte getMondayWeeksInYear(GDateYear year) { return g_date_get_monday_weeks_in_year(year); } /** * Returns the number of weeks in the year, where weeks * are taken to start on Sunday. Will be 52 or 53. The * date must be valid. (Years always have 52 7-day periods, * plus 1 or 2 extra days depending on whether it's a leap * year. This function is basically telling you how many * Sundays are in the year, i.e. there are 53 Sundays if * one of the extra days happens to be a Sunday.) * * Params: * year = year to count weeks in * * Returns: the number of weeks in @year */ public static ubyte getSundayWeeksInYear(GDateYear year) { return g_date_get_sunday_weeks_in_year(year); } /** * Returns %TRUE if the year is a leap year. * * For the purposes of this function, leap year is every year * divisible by 4 unless that year is divisible by 100. If it * is divisible by 100 it would be a leap year only if that year * is also divisible by 400. * * Params: * year = year to check * * Returns: %TRUE if the year is a leap year */ public static bool isLeapYear(GDateYear year) { return g_date_is_leap_year(year) != 0; } /** * Generates a printed representation of the date, in a * [locale][setlocale]-specific way. * Works just like the platform's C library strftime() function, * but only accepts date-related formats; time-related formats * give undefined results. Date must be valid. Unlike strftime() * (which uses the locale encoding), works on a UTF-8 format * string and stores a UTF-8 result. * * This function does not provide any conversion specifiers in * addition to those implemented by the platform's C library. * For example, don't expect that using g_date_strftime() would * make the \%F provided by the C99 strftime() work on Windows * where the C library only complies to C89. * * Params: * s = destination buffer * slen = buffer size * format = format string * date = valid #GDate * * Returns: number of characters written to the buffer, or 0 the buffer was too small */ public static size_t strftime(string s, size_t slen, string format, Date date) { return g_date_strftime(Str.toStringz(s), slen, Str.toStringz(format), (date is null) ? null : date.getDateStruct()); } /** * Returns %TRUE if the day of the month is valid (a day is valid if it's * between 1 and 31 inclusive). * * Params: * day = day to check * * Returns: %TRUE if the day is valid */ public static bool validDay(GDateDay day) { return g_date_valid_day(day) != 0; } /** * Returns %TRUE if the day-month-year triplet forms a valid, existing day * in the range of days #GDate understands (Year 1 or later, no more than * a few thousand years in the future). * * Params: * day = day * month = month * year = year * * Returns: %TRUE if the date is a valid one */ public static bool validDmy(GDateDay day, GDateMonth month, GDateYear year) { return g_date_valid_dmy(day, month, year) != 0; } /** * Returns %TRUE if the Julian day is valid. Anything greater than zero * is basically a valid Julian, though there is a 32-bit limit. * * Params: * julianDate = Julian day to check * * Returns: %TRUE if the Julian day is valid */ public static bool validJulian(uint julianDate) { return g_date_valid_julian(julianDate) != 0; } /** * Returns %TRUE if the month value is valid. The 12 #GDateMonth * enumeration values are the only valid months. * * Params: * month = month * * Returns: %TRUE if the month is valid */ public static bool validMonth(GDateMonth month) { return g_date_valid_month(month) != 0; } /** * Returns %TRUE if the weekday is valid. The seven #GDateWeekday enumeration * values are the only valid weekdays. * * Params: * weekday = weekday * * Returns: %TRUE if the weekday is valid */ public static bool validWeekday(GDateWeekday weekday) { return g_date_valid_weekday(weekday) != 0; } /** * Returns %TRUE if the year is valid. Any year greater than 0 is valid, * though there is a 16-bit limit to what #GDate will understand. * * Params: * year = year * * Returns: %TRUE if the year is valid */ public static bool validYear(GDateYear year) { return g_date_valid_year(year) != 0; } } GtkD-3.7.5/generated/gtkd/glib/DateTime.d000066400000000000000000000722651324604450400200420ustar00rootroot00000000000000/* * 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 glib.DateTime; private import glib.ConstructionException; private import glib.Str; private import glib.TimeVal; private import glib.TimeZone; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * `GDateTime` is an opaque structure whose members * cannot be accessed directly. * * Since: 2.26 */ public class DateTime { /** the main Gtk struct */ protected GDateTime* gDateTime; protected bool ownedRef; /** Get the main Gtk struct */ public GDateTime* getDateTimeStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDateTime; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDateTime; } /** * Sets our main struct and passes it to the parent class. */ public this (GDateTime* gDateTime, bool ownedRef = false) { this.gDateTime = gDateTime; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_date_time_unref(gDateTime); } /** * Creates a DateTime corresponding to the given Unix time t * Unix time is the number of seconds that have elapsed since 1970-01-01 * 00:00:00 UTC, regardless of the local time offset. * * This call can fail (ConstructionException) if t represents a time outside * of the supported range of GDateTime. * You should release the return value by calling unref() * when you are done with it * * Params: * t = the Unix time * utc = If true use utc else use the local timezone. * * Throws: ConstructionException GTK+ fails to create the object. * * Since: 2.26 */ public this (long t, bool utc = true) { GDateTime* p; if ( utc ) { p = g_date_time_new_from_unix_utc(t); } else { p = g_date_time_new_from_unix_local(t); } if(p is null) { throw new ConstructionException("null returned by g_date_time_new_from_unix_local(t)"); } this(cast(GDateTime*) p); } /** * Creates a DateTime corresponding to the given TimeVal tv. * The time contained in a TimeVal is always stored in the form of * seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the * local time offset. * * This call can fail (ConstructionException) if tv represents a time outside * of the supported range of DateTime. * You should release the return value by calling unref() * when you are done with it. * * Params: * tv = a GTimeVal * utc = If true use utc else use the local timezone. * * Throws: ConstructionException GTK+ fails to create the object. * * Since: 2.26 */ public this (ref GTimeVal tv, bool utc = true) { GDateTime* p; if ( utc ) { p = g_date_time_new_from_timeval_utc(&tv); } else { p = g_date_time_new_from_timeval_local(&tv); } if(p is null) { throw new ConstructionException("null returned by g_date_time_new_from_timeval_local((tv is null) ? null : tv.getTimeValStruct())"); } this(cast(GDateTime*) p); } /** */ override bool opEquals(Object rhs) { DateTime date = cast(DateTime)rhs; if ( date is null ) return false; return equal(this, date) != 0; } /** */ override int opCmp(Object rhs) { DateTime date = cast(DateTime)rhs; if ( date is null ) return int.min; return compare(this, date); } /** */ override nothrow @trusted hash_t toHash() { return hash(); } /** * Hashes datetime into a guint, suitable for use within GHashTable. * Since 2.26 * Params: * datetime = a GDateTime * Returns: a guint containing the hash */ public nothrow @trusted uint hash() { try { return g_date_time_hash(gDateTime); } catch(Exception e) { return 0; } } /** */ /** * Creates a new #GDateTime corresponding to the given date and time in * the time zone @tz. * * The @year must be between 1 and 9999, @month between 1 and 12 and @day * between 1 and 28, 29, 30 or 31 depending on the month and the year. * * @hour must be between 0 and 23 and @minute must be between 0 and 59. * * @seconds must be at least 0.0 and must be strictly less than 60.0. * It will be rounded down to the nearest microsecond. * * If the given time is not representable in the given time zone (for * example, 02:30 on March 14th 2010 in Toronto, due to daylight savings * time) then the time will be rounded up to the nearest existing time * (in this case, 03:00). If this matters to you then you should verify * the return value for containing the same as the numbers you gave. * * In the case that the given time is ambiguous in the given time zone * (for example, 01:30 on November 7th 2010 in Toronto, due to daylight * savings time) then the time falling within standard (ie: * non-daylight) time is taken. * * It not considered a programmer error for the values to this function * to be out of range, but in the case that they are, the function will * return %NULL. * * You should release the return value by calling g_date_time_unref() * when you are done with it. * * Params: * tz = a #GTimeZone * year = the year component of the date * month = the month component of the date * day = the day component of the date * hour = the hour component of the date * minute = the minute component of the date * seconds = the number of seconds past the minute * * Returns: a new #GDateTime, or %NULL * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(TimeZone tz, int year, int month, int day, int hour, int minute, double seconds) { auto p = g_date_time_new((tz is null) ? null : tz.getTimeZoneStruct(), year, month, day, hour, minute, seconds); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GDateTime*) p); } /** * Creates a #GDateTime corresponding to this exact instant in the given * time zone @tz. The time is as accurate as the system allows, to a * maximum accuracy of 1 microsecond. * * This function will always succeed unless the system clock is set to * truly insane values (or unless GLib is still being used after the * year 9999). * * You should release the return value by calling g_date_time_unref() * when you are done with it. * * Params: * tz = a #GTimeZone * * Returns: a new #GDateTime, or %NULL * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(TimeZone tz) { auto p = g_date_time_new_now((tz is null) ? null : tz.getTimeZoneStruct()); if(p is null) { throw new ConstructionException("null returned by new_now"); } this(cast(GDateTime*) p); } /** * Creates a copy of @datetime and adds the specified timespan to the copy. * * Params: * timespan = a #GTimeSpan * * Returns: the newly created #GDateTime which should be freed with * g_date_time_unref(). * * Since: 2.26 */ public DateTime add(GTimeSpan timespan) { auto p = g_date_time_add(gDateTime, timespan); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Creates a copy of @datetime and adds the specified number of days to the * copy. Add negative values to subtract days. * * Params: * days = the number of days * * Returns: the newly created #GDateTime which should be freed with * g_date_time_unref(). * * Since: 2.26 */ public DateTime addDays(int days) { auto p = g_date_time_add_days(gDateTime, days); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Creates a new #GDateTime adding the specified values to the current date and * time in @datetime. Add negative values to subtract. * * Params: * years = the number of years to add * months = the number of months to add * days = the number of days to add * hours = the number of hours to add * minutes = the number of minutes to add * seconds = the number of seconds to add * * Returns: the newly created #GDateTime that should be freed with * g_date_time_unref(). * * Since: 2.26 */ public DateTime addFull(int years, int months, int days, int hours, int minutes, double seconds) { auto p = g_date_time_add_full(gDateTime, years, months, days, hours, minutes, seconds); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Creates a copy of @datetime and adds the specified number of hours. * Add negative values to subtract hours. * * Params: * hours = the number of hours to add * * Returns: the newly created #GDateTime which should be freed with * g_date_time_unref(). * * Since: 2.26 */ public DateTime addHours(int hours) { auto p = g_date_time_add_hours(gDateTime, hours); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Creates a copy of @datetime adding the specified number of minutes. * Add negative values to subtract minutes. * * Params: * minutes = the number of minutes to add * * Returns: the newly created #GDateTime which should be freed with * g_date_time_unref(). * * Since: 2.26 */ public DateTime addMinutes(int minutes) { auto p = g_date_time_add_minutes(gDateTime, minutes); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Creates a copy of @datetime and adds the specified number of months to the * copy. Add negative values to subtract months. * * Params: * months = the number of months * * Returns: the newly created #GDateTime which should be freed with * g_date_time_unref(). * * Since: 2.26 */ public DateTime addMonths(int months) { auto p = g_date_time_add_months(gDateTime, months); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Creates a copy of @datetime and adds the specified number of seconds. * Add negative values to subtract seconds. * * Params: * seconds = the number of seconds to add * * Returns: the newly created #GDateTime which should be freed with * g_date_time_unref(). * * Since: 2.26 */ public DateTime addSeconds(double seconds) { auto p = g_date_time_add_seconds(gDateTime, seconds); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Creates a copy of @datetime and adds the specified number of weeks to the * copy. Add negative values to subtract weeks. * * Params: * weeks = the number of weeks * * Returns: the newly created #GDateTime which should be freed with * g_date_time_unref(). * * Since: 2.26 */ public DateTime addWeeks(int weeks) { auto p = g_date_time_add_weeks(gDateTime, weeks); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Creates a copy of @datetime and adds the specified number of years to the * copy. Add negative values to subtract years. * * Params: * years = the number of years * * Returns: the newly created #GDateTime which should be freed with * g_date_time_unref(). * * Since: 2.26 */ public DateTime addYears(int years) { auto p = g_date_time_add_years(gDateTime, years); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Calculates the difference in time between @end and @begin. The * #GTimeSpan that is returned is effectively @end - @begin (ie: * positive if the first parameter is larger). * * Params: * begin = a #GDateTime * * Returns: the difference between the two #GDateTime, as a time * span expressed in microseconds. * * Since: 2.26 */ public GTimeSpan difference(DateTime begin) { return g_date_time_difference(gDateTime, (begin is null) ? null : begin.getDateTimeStruct()); } /** * Creates a newly allocated string representing the requested @format. * * The format strings understood by this function are a subset of the * strftime() format language as specified by C99. The \%D, \%U and \%W * conversions are not supported, nor is the 'E' modifier. The GNU * extensions \%k, \%l, \%s and \%P are supported, however, as are the * '0', '_' and '-' modifiers. * * In contrast to strftime(), this function always produces a UTF-8 * string, regardless of the current locale. Note that the rendering of * many formats is locale-dependent and may not match the strftime() * output exactly. * * The following format specifiers are supported: * * - \%a: the abbreviated weekday name according to the current locale * - \%A: the full weekday name according to the current locale * - \%b: the abbreviated month name according to the current locale * - \%B: the full month name according to the current locale * - \%c: the preferred date and time representation for the current locale * - \%C: the century number (year/100) as a 2-digit integer (00-99) * - \%d: the day of the month as a decimal number (range 01 to 31) * - \%e: the day of the month as a decimal number (range 1 to 31) * - \%F: equivalent to `%Y-%m-%d` (the ISO 8601 date format) * - \%g: the last two digits of the ISO 8601 week-based year as a * decimal number (00-99). This works well with \%V and \%u. * - \%G: the ISO 8601 week-based year as a decimal number. This works * well with \%V and \%u. * - \%h: equivalent to \%b * - \%H: the hour as a decimal number using a 24-hour clock (range 00 to 23) * - \%I: the hour as a decimal number using a 12-hour clock (range 01 to 12) * - \%j: the day of the year as a decimal number (range 001 to 366) * - \%k: the hour (24-hour clock) as a decimal number (range 0 to 23); * single digits are preceded by a blank * - \%l: the hour (12-hour clock) as a decimal number (range 1 to 12); * single digits are preceded by a blank * - \%m: the month as a decimal number (range 01 to 12) * - \%M: the minute as a decimal number (range 00 to 59) * - \%p: either "AM" or "PM" according to the given time value, or the * corresponding strings for the current locale. Noon is treated as * "PM" and midnight as "AM". * - \%P: like \%p but lowercase: "am" or "pm" or a corresponding string for * the current locale * - \%r: the time in a.m. or p.m. notation * - \%R: the time in 24-hour notation (\%H:\%M) * - \%s: the number of seconds since the Epoch, that is, since 1970-01-01 * 00:00:00 UTC * - \%S: the second as a decimal number (range 00 to 60) * - \%t: a tab character * - \%T: the time in 24-hour notation with seconds (\%H:\%M:\%S) * - \%u: the ISO 8601 standard day of the week as a decimal, range 1 to 7, * Monday being 1. This works well with \%G and \%V. * - \%V: the ISO 8601 standard week number of the current year as a decimal * number, range 01 to 53, where week 1 is the first week that has at * least 4 days in the new year. See g_date_time_get_week_of_year(). * This works well with \%G and \%u. * - \%w: the day of the week as a decimal, range 0 to 6, Sunday being 0. * This is not the ISO 8601 standard format -- use \%u instead. * - \%x: the preferred date representation for the current locale without * the time * - \%X: the preferred time representation for the current locale without * the date * - \%y: the year as a decimal number without the century * - \%Y: the year as a decimal number including the century * - \%z: the time zone as an offset from UTC (+hhmm) * - \%:z: the time zone as an offset from UTC (+hh:mm). * This is a gnulib strftime() extension. Since: 2.38 * - \%::z: the time zone as an offset from UTC (+hh:mm:ss). This is a * gnulib strftime() extension. Since: 2.38 * - \%:::z: the time zone as an offset from UTC, with : to necessary * precision (e.g., -04, +05:30). This is a gnulib strftime() extension. Since: 2.38 * - \%Z: the time zone or name or abbreviation * - \%\%: a literal \% character * * Some conversion specifications can be modified by preceding the * conversion specifier by one or more modifier characters. The * following modifiers are supported for many of the numeric * conversions: * * - O: Use alternative numeric symbols, if the current locale supports those. * - _: Pad a numeric result with spaces. This overrides the default padding * for the specifier. * - -: Do not pad a numeric result. This overrides the default padding * for the specifier. * - 0: Pad a numeric result with zeros. This overrides the default padding * for the specifier. * * Params: * format = a valid UTF-8 string, containing the format for the * #GDateTime * * Returns: a newly allocated string formatted to the requested format * or %NULL in the case that there was an error. The string * should be freed with g_free(). * * Since: 2.26 */ public string format(string format) { auto retStr = g_date_time_format(gDateTime, Str.toStringz(format)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Retrieves the day of the month represented by @datetime in the gregorian * calendar. * * Returns: the day of the month * * Since: 2.26 */ public int getDayOfMonth() { return g_date_time_get_day_of_month(gDateTime); } /** * Retrieves the ISO 8601 day of the week on which @datetime falls (1 is * Monday, 2 is Tuesday... 7 is Sunday). * * Returns: the day of the week * * Since: 2.26 */ public int getDayOfWeek() { return g_date_time_get_day_of_week(gDateTime); } /** * Retrieves the day of the year represented by @datetime in the Gregorian * calendar. * * Returns: the day of the year * * Since: 2.26 */ public int getDayOfYear() { return g_date_time_get_day_of_year(gDateTime); } /** * Retrieves the hour of the day represented by @datetime * * Returns: the hour of the day * * Since: 2.26 */ public int getHour() { return g_date_time_get_hour(gDateTime); } /** * Retrieves the microsecond of the date represented by @datetime * * Returns: the microsecond of the second * * Since: 2.26 */ public int getMicrosecond() { return g_date_time_get_microsecond(gDateTime); } /** * Retrieves the minute of the hour represented by @datetime * * Returns: the minute of the hour * * Since: 2.26 */ public int getMinute() { return g_date_time_get_minute(gDateTime); } /** * Retrieves the month of the year represented by @datetime in the Gregorian * calendar. * * Returns: the month represented by @datetime * * Since: 2.26 */ public int getMonth() { return g_date_time_get_month(gDateTime); } /** * Retrieves the second of the minute represented by @datetime * * Returns: the second represented by @datetime * * Since: 2.26 */ public int getSecond() { return g_date_time_get_second(gDateTime); } /** * Retrieves the number of seconds since the start of the last minute, * including the fractional part. * * Returns: the number of seconds * * Since: 2.26 */ public double getSeconds() { return g_date_time_get_seconds(gDateTime); } /** * Determines the time zone abbreviation to be used at the time and in * the time zone of @datetime. * * For example, in Toronto this is currently "EST" during the winter * months and "EDT" during the summer months when daylight savings * time is in effect. * * Returns: the time zone abbreviation. The returned * string is owned by the #GDateTime and it should not be * modified or freed * * Since: 2.26 */ public string getTimezoneAbbreviation() { return Str.toString(g_date_time_get_timezone_abbreviation(gDateTime)); } /** * Determines the offset to UTC in effect at the time and in the time * zone of @datetime. * * The offset is the number of microseconds that you add to UTC time to * arrive at local time for the time zone (ie: negative numbers for time * zones west of GMT, positive numbers for east). * * If @datetime represents UTC time, then the offset is always zero. * * Returns: the number of microseconds that should be added to UTC to * get the local time * * Since: 2.26 */ public GTimeSpan getUtcOffset() { return g_date_time_get_utc_offset(gDateTime); } /** * Returns the ISO 8601 week-numbering year in which the week containing * @datetime falls. * * This function, taken together with g_date_time_get_week_of_year() and * g_date_time_get_day_of_week() can be used to determine the full ISO * week date on which @datetime falls. * * This is usually equal to the normal Gregorian year (as returned by * g_date_time_get_year()), except as detailed below: * * For Thursday, the week-numbering year is always equal to the usual * calendar year. For other days, the number is such that every day * within a complete week (Monday to Sunday) is contained within the * same week-numbering year. * * For Monday, Tuesday and Wednesday occurring near the end of the year, * this may mean that the week-numbering year is one greater than the * calendar year (so that these days have the same week-numbering year * as the Thursday occurring early in the next year). * * For Friday, Saturday and Sunday occurring near the start of the year, * this may mean that the week-numbering year is one less than the * calendar year (so that these days have the same week-numbering year * as the Thursday occurring late in the previous year). * * An equivalent description is that the week-numbering year is equal to * the calendar year containing the majority of the days in the current * week (Monday to Sunday). * * Note that January 1 0001 in the proleptic Gregorian calendar is a * Monday, so this function never returns 0. * * Returns: the ISO 8601 week-numbering year for @datetime * * Since: 2.26 */ public int getWeekNumberingYear() { return g_date_time_get_week_numbering_year(gDateTime); } /** * Returns the ISO 8601 week number for the week containing @datetime. * The ISO 8601 week number is the same for every day of the week (from * Moday through Sunday). That can produce some unusual results * (described below). * * The first week of the year is week 1. This is the week that contains * the first Thursday of the year. Equivalently, this is the first week * that has more than 4 of its days falling within the calendar year. * * The value 0 is never returned by this function. Days contained * within a year but occurring before the first ISO 8601 week of that * year are considered as being contained in the last week of the * previous year. Similarly, the final days of a calendar year may be * considered as being part of the first ISO 8601 week of the next year * if 4 or more days of that week are contained within the new year. * * Returns: the ISO 8601 week number for @datetime. * * Since: 2.26 */ public int getWeekOfYear() { return g_date_time_get_week_of_year(gDateTime); } /** * Retrieves the year represented by @datetime in the Gregorian calendar. * * Returns: the year represented by @datetime * * Since: 2.26 */ public int getYear() { return g_date_time_get_year(gDateTime); } /** * Retrieves the Gregorian day, month, and year of a given #GDateTime. * * Params: * year = the return location for the gregorian year, or %NULL. * month = the return location for the month of the year, or %NULL. * day = the return location for the day of the month, or %NULL. * * Since: 2.26 */ public void getYmd(out int year, out int month, out int day) { g_date_time_get_ymd(gDateTime, &year, &month, &day); } /** * Determines if daylight savings time is in effect at the time and in * the time zone of @datetime. * * Returns: %TRUE if daylight savings time is in effect * * Since: 2.26 */ public bool isDaylightSavings() { return g_date_time_is_daylight_savings(gDateTime) != 0; } /** * Atomically increments the reference count of @datetime by one. * * Returns: the #GDateTime with the reference count increased * * Since: 2.26 */ public DateTime doref() { auto p = g_date_time_ref(gDateTime); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Creates a new #GDateTime corresponding to the same instant in time as * @datetime, but in the local time zone. * * This call is equivalent to calling g_date_time_to_timezone() with the * time zone returned by g_time_zone_new_local(). * * Returns: the newly created #GDateTime * * Since: 2.26 */ public DateTime toLocal() { auto p = g_date_time_to_local(gDateTime); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Stores the instant in time that @datetime represents into @tv. * * The time contained in a #GTimeVal is always stored in the form of * seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the time * zone associated with @datetime. * * On systems where 'long' is 32bit (ie: all 32bit systems and all * Windows systems), a #GTimeVal is incapable of storing the entire * range of values that #GDateTime is capable of expressing. On those * systems, this function returns %FALSE to indicate that the time is * out of range. * * On systems where 'long' is 64bit, this function never fails. * * Params: * tv = a #GTimeVal to modify * * Returns: %TRUE if successful, else %FALSE * * Since: 2.26 */ public bool toTimeval(TimeVal tv) { return g_date_time_to_timeval(gDateTime, (tv is null) ? null : tv.getTimeValStruct()) != 0; } /** * Create a new #GDateTime corresponding to the same instant in time as * @datetime, but in the time zone @tz. * * This call can fail in the case that the time goes out of bounds. For * example, converting 0001-01-01 00:00:00 UTC to a time zone west of * Greenwich will fail (due to the year 0 being out of range). * * You should release the return value by calling g_date_time_unref() * when you are done with it. * * Params: * tz = the new #GTimeZone * * Returns: a new #GDateTime, or %NULL * * Since: 2.26 */ public DateTime toTimezone(TimeZone tz) { auto p = g_date_time_to_timezone(gDateTime, (tz is null) ? null : tz.getTimeZoneStruct()); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Gives the Unix time corresponding to @datetime, rounding down to the * nearest second. * * Unix time is the number of seconds that have elapsed since 1970-01-01 * 00:00:00 UTC, regardless of the time zone associated with @datetime. * * Returns: the Unix time corresponding to @datetime * * Since: 2.26 */ public long toUnix() { return g_date_time_to_unix(gDateTime); } /** * Creates a new #GDateTime corresponding to the same instant in time as * @datetime, but in UTC. * * This call is equivalent to calling g_date_time_to_timezone() with the * time zone returned by g_time_zone_new_utc(). * * Returns: the newly created #GDateTime * * Since: 2.26 */ public DateTime toUtc() { auto p = g_date_time_to_utc(gDateTime); if(p is null) { return null; } return new DateTime(cast(GDateTime*) p, true); } /** * Atomically decrements the reference count of @datetime by one. * * When the reference count reaches zero, the resources allocated by * @datetime are freed * * Since: 2.26 */ public void unref() { g_date_time_unref(gDateTime); } /** * A comparison function for #GDateTimes that is suitable * as a #GCompareFunc. Both #GDateTimes must be non-%NULL. * * Params: * dt1 = first #GDateTime to compare * dt2 = second #GDateTime to compare * * Returns: -1, 0 or 1 if @dt1 is less than, equal to or greater * than @dt2. * * Since: 2.26 */ public static int compare(DateTime dt1, DateTime dt2) { return g_date_time_compare((dt1 is null) ? null : dt1.getDateTimeStruct(), (dt2 is null) ? null : dt2.getDateTimeStruct()); } /** * Checks to see if @dt1 and @dt2 are equal. * * Equal here means that they represent the same moment after converting * them to the same time zone. * * Params: * dt1 = a #GDateTime * dt2 = a #GDateTime * * Returns: %TRUE if @dt1 and @dt2 are equal * * Since: 2.26 */ public static bool equal(DateTime dt1, DateTime dt2) { return g_date_time_equal((dt1 is null) ? null : dt1.getDateTimeStruct(), (dt2 is null) ? null : dt2.getDateTimeStruct()) != 0; } } GtkD-3.7.5/generated/gtkd/glib/Directory.d000066400000000000000000000117361324604450400203060ustar00rootroot00000000000000/* * 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 glib.Directory; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * An opaque structure representing an opened directory. */ public class Directory { /** the main Gtk struct */ protected GDir* gDir; protected bool ownedRef; /** Get the main Gtk struct */ public GDir* getDirectoryStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gDir; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gDir; } /** * Sets our main struct and passes it to the parent class. */ public this (GDir* gDir, bool ownedRef = false) { this.gDir = gDir; this.ownedRef = ownedRef; } /** * Closes the directory and deallocates all related resources. */ public void close() { g_dir_close(gDir); } /** * Retrieves the name of another entry in the directory, or %NULL. * The order of entries returned from this function is not defined, * and may vary by file system or other operating-system dependent * factors. * * %NULL may also be returned in case of errors. On Unix, you can * check `errno` to find out if %NULL was returned because of an error. * * On Unix, the '.' and '..' entries are omitted, and the returned * name is in the on-disk encoding. * * On Windows, as is true of all GLib functions which operate on * filenames, the returned name is in UTF-8. * * Returns: The entry's name or %NULL if there are no * more entries. The return value is owned by GLib and * must not be modified or freed. */ public string readName() { return Str.toString(g_dir_read_name(gDir)); } /** * Resets the given directory. The next call to g_dir_read_name() * will return the first entry again. */ public void rewind() { g_dir_rewind(gDir); } /** * Creates a subdirectory in the preferred directory for temporary * files (as returned by g_get_tmp_dir()). * * @tmpl should be a string in the GLib file name encoding containing * a sequence of six 'X' characters, as the parameter to g_mkstemp(). * However, unlike these functions, the template should only be a * basename, no directory components are allowed. If template is * %NULL, a default template is used. * * Note that in contrast to g_mkdtemp() (and mkdtemp()) @tmpl is not * modified, and might thus be a read-only literal string. * * Params: * tmpl = Template for directory name, * as in g_mkdtemp(), basename only, or %NULL for a default template * * Returns: The actual name used. This string * should be freed with g_free() when not needed any longer and is * is in the GLib file name encoding. In case of errors, %NULL is * returned and @error will be set. * * Since: 2.30 * * Throws: GException on failure. */ public static string makeTmp(string tmpl) { GError* err = null; auto retStr = g_dir_make_tmp(Str.toStringz(tmpl), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Opens a directory for reading. The names of the files in the * directory can then be retrieved using g_dir_read_name(). Note * that the ordering is not defined. * * Params: * path = the path to the directory you are interested in. On Unix * in the on-disk encoding. On Windows in UTF-8 * flags = Currently must be set to 0. Reserved for future use. * * Returns: a newly allocated #GDir on success, %NULL on failure. * If non-%NULL, you must free the result with g_dir_close() * when you are finished with it. * * Throws: GException on failure. */ public static Directory open(string path, uint flags) { GError* err = null; auto p = g_dir_open(Str.toStringz(path), flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Directory(cast(GDir*) p); } } GtkD-3.7.5/generated/gtkd/glib/ErrorG.d000066400000000000000000000132701324604450400175350ustar00rootroot00000000000000/* * 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 glib.ErrorG; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The `GError` structure contains information about * an error that has occurred. */ public class ErrorG { /** the main Gtk struct */ protected GError* gError; protected bool ownedRef; /** Get the main Gtk struct */ public GError* getErrorGStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gError; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gError; } /** * Sets our main struct and passes it to the parent class. */ public this (GError* gError, bool ownedRef = false) { this.gError = gError; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_error_free(gError); } /** * Creates a new #GError; unlike g_error_new(), @message is * not a printf()-style format string. Use this function if * @message contains text you don't have control over, * that could include printf() escape sequences. * * Params: * domain = error domain * code = error code * message = error message * * Returns: a new #GError * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GQuark domain, int code, string message) { auto p = g_error_new_literal(domain, code, Str.toStringz(message)); if(p is null) { throw new ConstructionException("null returned by new_literal"); } this(cast(GError*) p); } /** * Creates a new #GError with the given @domain and @code, * and a message formatted with @format. * * Params: * domain = error domain * code = error code * format = printf()-style format for error message * args = #va_list of parameters for the message format * * Returns: a new #GError * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GQuark domain, int code, string format, void* args) { auto p = g_error_new_valist(domain, code, Str.toStringz(format), args); if(p is null) { throw new ConstructionException("null returned by new_valist"); } this(cast(GError*) p); } /** * Makes a copy of @error. * * Returns: a new #GError */ public ErrorG copy() { auto p = g_error_copy(gError); if(p is null) { return null; } return new ErrorG(cast(GError*) p, true); } /** * Frees a #GError and associated resources. */ public void free() { g_error_free(gError); ownedRef = false; } /** * Returns %TRUE if @error matches @domain and @code, %FALSE * otherwise. In particular, when @error is %NULL, %FALSE will * be returned. * * If @domain contains a `FAILED` (or otherwise generic) error code, * you should generally not check for it explicitly, but should * instead treat any not-explicitly-recognized error code as being * equivalent to the `FAILED` code. This way, if the domain is * extended in the future to provide a more specific error code for * a certain case, your code will still work. * * Params: * domain = an error domain * code = an error code * * Returns: whether @error has @domain and @code */ public bool matches(GQuark domain, int code) { return g_error_matches(gError, domain, code) != 0; } /** * If @dest is %NULL, free @src; otherwise, moves @src into *@dest. * The error variable @dest points to must be %NULL. * * @src must be non-%NULL. * * Note that @src is no longer valid after this call. If you want * to keep using the same GError*, you need to set it to %NULL * after calling this function on it. * * Params: * dest = error return location * src = error to move into the return location */ public static void propagateError(out ErrorG dest, ErrorG src) { GError* outdest = null; g_propagate_error(&outdest, (src is null) ? null : src.getErrorGStruct(true)); dest = new ErrorG(outdest); } /** * Does nothing if @err is %NULL; if @err is non-%NULL, then *@err * must be %NULL. A new #GError is created and assigned to *@err. * Unlike g_set_error(), @message is not a printf()-style format string. * Use this function if @message contains text you don't have control over, * that could include printf() escape sequences. * * Params: * err = a return location for a #GError * domain = error domain * code = error code * message = error message * * Since: 2.18 */ public static void setErrorLiteral(out ErrorG err, GQuark domain, int code, string message) { GError* outerr = null; g_set_error_literal(&outerr, domain, code, Str.toStringz(message)); err = new ErrorG(outerr); } } GtkD-3.7.5/generated/gtkd/glib/FileUtils.d000066400000000000000000000443671324604450400202500ustar00rootroot00000000000000/* * 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 glib.FileUtils; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct FileUtils { /** * A wrapper for the POSIX access() function. This function is used to * test a pathname for one or several of read, write or execute * permissions, or just existence. * * On Windows, the file protection mechanism is not at all POSIX-like, * and the underlying function in the C library only checks the * FAT-style READONLY attribute, and does not look at the ACL of a * file at all. This function is this in practise almost useless on * Windows. Software that needs to handle file permissions on Windows * more exactly should use the Win32 API. * * See your C library manual for more details about access(). * * Params: * filename = a pathname in the GLib file name encoding * (UTF-8 on Windows) * mode = as in access() * * Returns: zero if the pathname refers to an existing file system * object that has all the tested permissions, or -1 otherwise * or on error. * * Since: 2.8 */ public static int access(string filename, int mode) { return g_access(Str.toStringz(filename), mode); } /** * A wrapper for the POSIX chdir() function. The function changes the * current directory of the process to @path. * * See your C library manual for more details about chdir(). * * Params: * path = a pathname in the GLib file name encoding * (UTF-8 on Windows) * * Returns: 0 on success, -1 if an error occurred. * * Since: 2.8 */ public static int chdir(string path) { return g_chdir(Str.toStringz(path)); } /** * This wraps the close() call; in case of error, %errno will be * preserved, but the error will also be stored as a #GError in @error. * * Besides using #GError, there is another major reason to prefer this * function over the call provided by the system; on Unix, it will * attempt to correctly handle %EINTR, which has platform-specific * semantics. * * Params: * fd = A file descriptor * * Returns: %TRUE on success, %FALSE if there was an error. * * Since: 2.36 * * Throws: GException on failure. */ public static bool close(int fd) { GError* err = null; auto p = g_close(fd, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Gets a #GFileError constant based on the passed-in @err_no. * For example, if you pass in `EEXIST` this function returns * #G_FILE_ERROR_EXIST. Unlike `errno` values, you can portably * assume that all #GFileError values will exist. * * Normally a #GFileError value goes into a #GError returned * from a function that manipulates files. So you would use * g_file_error_from_errno() when constructing a #GError. * * Params: * errNo = an "errno" value * * Returns: #GFileError corresponding to the given @errno */ public static GFileError fileErrorFromErrno(int errNo) { return g_file_error_from_errno(errNo); } /** */ public static GQuark fileErrorQuark() { return g_file_error_quark(); } /** * Reads an entire file into allocated memory, with good error * checking. * * If the call was successful, it returns %TRUE and sets @contents to the file * contents and @length to the length of the file contents in bytes. The string * stored in @contents will be nul-terminated, so for text files you can pass * %NULL for the @length argument. If the call was not successful, it returns * %FALSE and sets @error. The error domain is #G_FILE_ERROR. Possible error * codes are those in the #GFileError enumeration. In the error case, * @contents is set to %NULL and @length is set to zero. * * Params: * filename = name of a file to read contents from, in the GLib file name encoding * contents = location to store an allocated string, use g_free() to free * the returned string * * Returns: %TRUE on success, %FALSE if an error occurred * * Throws: GException on failure. */ public static bool fileGetContents(string filename, out string contents) { char* outcontents = null; size_t length; GError* err = null; auto p = g_file_get_contents(Str.toStringz(filename), &outcontents, &length, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } contents = Str.toString(outcontents, length); return p; } /** * Opens a file for writing in the preferred directory for temporary * files (as returned by g_get_tmp_dir()). * * @tmpl should be a string in the GLib file name encoding containing * a sequence of six 'X' characters, as the parameter to g_mkstemp(). * However, unlike these functions, the template should only be a * basename, no directory components are allowed. If template is * %NULL, a default template is used. * * Note that in contrast to g_mkstemp() (and mkstemp()) @tmpl is not * modified, and might thus be a read-only literal string. * * Upon success, and if @name_used is non-%NULL, the actual name used * is returned in @name_used. This string should be freed with g_free() * when not needed any longer. The returned name is in the GLib file * name encoding. * * Params: * tmpl = Template for file name, as in * g_mkstemp(), basename only, or %NULL for a default template * nameUsed = location to store actual name used, * or %NULL * * Returns: A file handle (as from open()) to the file opened for * reading and writing. The file is opened in binary mode on platforms * where there is a difference. The file handle should be closed with * close(). In case of errors, -1 is returned and @error will be set. * * Throws: GException on failure. */ public static int fileOpenTmp(string tmpl, out string nameUsed) { char* outnameUsed = null; GError* err = null; auto p = g_file_open_tmp(Str.toStringz(tmpl), &outnameUsed, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } nameUsed = Str.toString(outnameUsed); return p; } /** * Reads the contents of the symbolic link @filename like the POSIX * readlink() function. The returned string is in the encoding used * for filenames. Use g_filename_to_utf8() to convert it to UTF-8. * * Params: * filename = the symbolic link * * Returns: A newly-allocated string with the contents of * the symbolic link, or %NULL if an error occurred. * * Since: 2.4 * * Throws: GException on failure. */ public static string fileReadLink(string filename) { GError* err = null; auto retStr = g_file_read_link(Str.toStringz(filename), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Writes all of @contents to a file named @filename, with good error checking. * If a file called @filename already exists it will be overwritten. * * This write is atomic in the sense that it is first written to a temporary * file which is then renamed to the final name. Notes: * * - On UNIX, if @filename already exists hard links to @filename will break. * Also since the file is recreated, existing permissions, access control * lists, metadata etc. may be lost. If @filename is a symbolic link, * the link itself will be replaced, not the linked file. * * - On Windows renaming a file will not remove an existing file with the * new name, so on Windows there is a race condition between the existing * file being removed and the temporary file being renamed. * * - On Windows there is no way to remove a file that is open to some * process, or mapped into memory. Thus, this function will fail if * @filename already exists and is open. * * If the call was successful, it returns %TRUE. If the call was not successful, * it returns %FALSE and sets @error. The error domain is #G_FILE_ERROR. * Possible error codes are those in the #GFileError enumeration. * * Note that the name for the temporary file is constructed by appending up * to 7 characters to @filename. * * Params: * filename = name of a file to write @contents to, in the GLib file name * encoding * contents = string to write to the file * * Returns: %TRUE on success, %FALSE if an error occurred * * Since: 2.8 * * Throws: GException on failure. */ public static bool fileSetContents(string filename, string contents) { GError* err = null; auto p = g_file_set_contents(Str.toStringz(filename), Str.toStringz(contents), cast(ptrdiff_t)contents.length, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Returns %TRUE if any of the tests in the bitfield @test are * %TRUE. For example, `(G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)` * will return %TRUE if the file exists; the check whether it's a * directory doesn't matter since the existence test is %TRUE. With * the current set of available tests, there's no point passing in * more than one test at a time. * * Apart from %G_FILE_TEST_IS_SYMLINK all tests follow symbolic links, * so for a symbolic link to a regular file g_file_test() will return * %TRUE for both %G_FILE_TEST_IS_SYMLINK and %G_FILE_TEST_IS_REGULAR. * * Note, that for a dangling symbolic link g_file_test() will return * %TRUE for %G_FILE_TEST_IS_SYMLINK and %FALSE for all other flags. * * You should never use g_file_test() to test whether it is safe * to perform an operation, because there is always the possibility * of the condition changing before you actually perform the operation. * For example, you might think you could use %G_FILE_TEST_IS_SYMLINK * to know whether it is safe to write to a file without being * tricked into writing into a different location. It doesn't work! * |[ * // DON'T DO THIS * if (!g_file_test (filename, G_FILE_TEST_IS_SYMLINK)) * { * fd = g_open (filename, O_WRONLY); * // write to fd * } * ]| * * Another thing to note is that %G_FILE_TEST_EXISTS and * %G_FILE_TEST_IS_EXECUTABLE are implemented using the access() * system call. This usually doesn't matter, but if your program * is setuid or setgid it means that these tests will give you * the answer for the real user ID and group ID, rather than the * effective user ID and group ID. * * On Windows, there are no symlinks, so testing for * %G_FILE_TEST_IS_SYMLINK will always return %FALSE. Testing for * %G_FILE_TEST_IS_EXECUTABLE will just check that the file exists and * its name indicates that it is executable, checking for well-known * extensions and those listed in the `PATHEXT` environment variable. * * Params: * filename = a filename to test in the * GLib file name encoding * test = bitfield of #GFileTest flags * * Returns: whether a test was %TRUE */ public static bool fileTest(string filename, GFileTest test) { return g_file_test(Str.toStringz(filename), test) != 0; } /** * Create a directory if it doesn't already exist. Create intermediate * parent directories as needed, too. * * Params: * pathname = a pathname in the GLib file name encoding * mode = permissions to use for newly created directories * * Returns: 0 if the directory already exists, or was successfully * created. Returns -1 if an error occurred, with errno set. * * Since: 2.8 */ public static int mkdirWithParents(string pathname, int mode) { return g_mkdir_with_parents(Str.toStringz(pathname), mode); } /** * Creates a temporary directory. See the mkdtemp() documentation * on most UNIX-like systems. * * The parameter is a string that should follow the rules for * mkdtemp() templates, i.e. contain the string "XXXXXX". * g_mkdtemp() is slightly more flexible than mkdtemp() in that the * sequence does not have to occur at the very end of the template. * The X string will be modified to form the name of a directory that * didn't exist. * The string should be in the GLib file name encoding. Most importantly, * on Windows it should be in UTF-8. * * If you are going to be creating a temporary directory inside the * directory returned by g_get_tmp_dir(), you might want to use * g_dir_make_tmp() instead. * * Params: * tmpl = template directory name * * Returns: A pointer to @tmpl, which has been * modified to hold the directory name. In case of errors, %NULL is * returned and %errno will be set. * * Since: 2.30 */ public static string mkdtemp(string tmpl) { auto retStr = g_mkdtemp(Str.toStringz(tmpl)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Creates a temporary directory. See the mkdtemp() documentation * on most UNIX-like systems. * * The parameter is a string that should follow the rules for * mkdtemp() templates, i.e. contain the string "XXXXXX". * g_mkdtemp_full() is slightly more flexible than mkdtemp() in that the * sequence does not have to occur at the very end of the template * and you can pass a @mode. The X string will be modified to form * the name of a directory that didn't exist. The string should be * in the GLib file name encoding. Most importantly, on Windows it * should be in UTF-8. * * If you are going to be creating a temporary directory inside the * directory returned by g_get_tmp_dir(), you might want to use * g_dir_make_tmp() instead. * * Params: * tmpl = template directory name * mode = permissions to create the temporary directory with * * Returns: A pointer to @tmpl, which has been * modified to hold the directory name. In case of errors, %NULL is * returned, and %errno will be set. * * Since: 2.30 */ public static string mkdtempFull(string tmpl, int mode) { auto retStr = g_mkdtemp_full(Str.toStringz(tmpl), mode); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Opens a temporary file. See the mkstemp() documentation * on most UNIX-like systems. * * The parameter is a string that should follow the rules for * mkstemp() templates, i.e. contain the string "XXXXXX". * g_mkstemp() is slightly more flexible than mkstemp() in that the * sequence does not have to occur at the very end of the template. * The X string will be modified to form the name of a file that * didn't exist. The string should be in the GLib file name encoding. * Most importantly, on Windows it should be in UTF-8. * * Params: * tmpl = template filename * * Returns: A file handle (as from open()) to the file * opened for reading and writing. The file is opened in binary * mode on platforms where there is a difference. The file handle * should be closed with close(). In case of errors, -1 is * returned and %errno will be set. */ public static int mkstemp(string tmpl) { return g_mkstemp(Str.toStringz(tmpl)); } /** * Opens a temporary file. See the mkstemp() documentation * on most UNIX-like systems. * * The parameter is a string that should follow the rules for * mkstemp() templates, i.e. contain the string "XXXXXX". * g_mkstemp_full() is slightly more flexible than mkstemp() * in that the sequence does not have to occur at the very end of the * template and you can pass a @mode and additional @flags. The X * string will be modified to form the name of a file that didn't exist. * The string should be in the GLib file name encoding. Most importantly, * on Windows it should be in UTF-8. * * Params: * tmpl = template filename * flags = flags to pass to an open() call in addition to O_EXCL * and O_CREAT, which are passed automatically * mode = permissions to create the temporary file with * * Returns: A file handle (as from open()) to the file * opened for reading and writing. The file handle should be * closed with close(). In case of errors, -1 is returned * and %errno will be set. * * Since: 2.22 */ public static int mkstempFull(string tmpl, int flags, int mode) { return g_mkstemp_full(Str.toStringz(tmpl), flags, mode); } /** * A wrapper for the POSIX rmdir() function. The rmdir() function * deletes a directory from the filesystem. * * See your C library manual for more details about how rmdir() works * on your system. * * Params: * filename = a pathname in the GLib file name encoding * (UTF-8 on Windows) * * Returns: 0 if the directory was successfully removed, -1 if an error * occurred * * Since: 2.6 */ public static int rmdir(string filename) { return g_rmdir(Str.toStringz(filename)); } /** * A wrapper for the POSIX unlink() function. The unlink() function * deletes a name from the filesystem. If this was the last link to the * file and no processes have it opened, the diskspace occupied by the * file is freed. * * See your C library manual for more details about unlink(). Note * that on Windows, it is in general not possible to delete files that * are open to some process, or mapped into memory. * * Params: * filename = a pathname in the GLib file name encoding * (UTF-8 on Windows) * * Returns: 0 if the name was successfully deleted, -1 if an error * occurred * * Since: 2.6 */ public static int unlink(string filename) { return g_unlink(Str.toStringz(filename)); } } GtkD-3.7.5/generated/gtkd/glib/GException.d000066400000000000000000000024321324604450400204000ustar00rootroot00000000000000/* * 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 glib.GException; private import glib.ErrorG; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ class GException : Exception { ErrorG error; this(ErrorG error) { super( Str.toString(error.getErrorGStruct().message) ); this.error = error; } } /** */ GtkD-3.7.5/generated/gtkd/glib/GLib.d000066400000000000000000000022631324604450400171520ustar00rootroot00000000000000/* * 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 glib.GLib; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ static import glib.Version; deprecated("moves to the glib.Version module") alias glib.Version.Version Version; /** */ GtkD-3.7.5/generated/gtkd/glib/HashTable.d000066400000000000000000000553001324604450400201700ustar00rootroot00000000000000/* * 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 glib.HashTable; private import glib.ConstructionException; private import glib.ListG; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The #GHashTable struct is an opaque data structure to represent a * [Hash Table][glib-Hash-Tables]. It should only be accessed via the * following functions. */ public class HashTable { /** the main Gtk struct */ protected GHashTable* gHashTable; protected bool ownedRef; /** Get the main Gtk struct */ public GHashTable* getHashTableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gHashTable; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gHashTable; } /** * Sets our main struct and passes it to the parent class. */ public this (GHashTable* gHashTable, bool ownedRef = false) { this.gHashTable = gHashTable; this.ownedRef = ownedRef; } /** * This is a convenience function for using a #GHashTable as a set. It * is equivalent to calling g_hash_table_replace() with @key as both the * key and the value. * * When a hash table only ever contains keys that have themselves as the * corresponding value it is able to be stored more efficiently. See * the discussion in the section description. * * Params: * key = a key to insert * * Returns: %TRUE if the key did not exist yet * * Since: 2.32 */ public bool add(void* key) { return g_hash_table_add(gHashTable, key) != 0; } /** * Checks if @key is in @hash_table. * * Params: * key = a key to check * * Returns: %TRUE if @key is in @hash_table, %FALSE otherwise. * * Since: 2.32 */ public bool contains(void* key) { return g_hash_table_contains(gHashTable, key) != 0; } /** * Destroys all keys and values in the #GHashTable and decrements its * reference count by 1. If keys and/or values are dynamically allocated, * you should either free them first or create the #GHashTable with destroy * notifiers using g_hash_table_new_full(). In the latter case the destroy * functions you supplied will be called on all keys and values during the * destruction phase. */ public void destroy() { g_hash_table_destroy(gHashTable); } /** * Calls the given function for key/value pairs in the #GHashTable * until @predicate returns %TRUE. The function is passed the key * and value of each pair, and the given @user_data parameter. The * hash table may not be modified while iterating over it (you can't * add/remove items). * * Note, that hash tables are really only optimized for forward * lookups, i.e. g_hash_table_lookup(). So code that frequently issues * g_hash_table_find() or g_hash_table_foreach() (e.g. in the order of * once per every entry in a hash table) should probably be reworked * to use additional or different data structures for reverse lookups * (keep in mind that an O(n) find/foreach operation issued for all n * values in a hash table ends up needing O(n*n) operations). * * Params: * predicate = function to test the key/value pairs for a certain property * userData = user data to pass to the function * * Returns: The value of the first key/value pair is returned, * for which @predicate evaluates to %TRUE. If no pair with the * requested property is found, %NULL is returned. * * Since: 2.4 */ public void* find(GHRFunc predicate, void* userData) { return g_hash_table_find(gHashTable, predicate, userData); } /** * Calls the given function for each of the key/value pairs in the * #GHashTable. The function is passed the key and value of each * pair, and the given @user_data parameter. The hash table may not * be modified while iterating over it (you can't add/remove * items). To remove all items matching a predicate, use * g_hash_table_foreach_remove(). * * See g_hash_table_find() for performance caveats for linear * order searches in contrast to g_hash_table_lookup(). * * Params: * func = the function to call for each key/value pair * userData = user data to pass to the function */ public void foreac(GHFunc func, void* userData) { g_hash_table_foreach(gHashTable, func, userData); } /** * Calls the given function for each key/value pair in the * #GHashTable. If the function returns %TRUE, then the key/value * pair is removed from the #GHashTable. If you supplied key or * value destroy functions when creating the #GHashTable, they are * used to free the memory allocated for the removed keys and values. * * See #GHashTableIter for an alternative way to loop over the * key/value pairs in the hash table. * * Params: * func = the function to call for each key/value pair * userData = user data to pass to the function * * Returns: the number of key/value pairs removed */ public uint foreachRemove(GHRFunc func, void* userData) { return g_hash_table_foreach_remove(gHashTable, func, userData); } /** * Calls the given function for each key/value pair in the * #GHashTable. If the function returns %TRUE, then the key/value * pair is removed from the #GHashTable, but no key or value * destroy functions are called. * * See #GHashTableIter for an alternative way to loop over the * key/value pairs in the hash table. * * Params: * func = the function to call for each key/value pair * userData = user data to pass to the function * * Returns: the number of key/value pairs removed. */ public uint foreachSteal(GHRFunc func, void* userData) { return g_hash_table_foreach_steal(gHashTable, func, userData); } /** * Retrieves every key inside @hash_table. The returned data is valid * until changes to the hash release those keys. * * This iterates over every entry in the hash table to build its return value. * To iterate over the entries in a #GHashTable more efficiently, use a * #GHashTableIter. * * Returns: a #GList containing all the keys * inside the hash table. The content of the list is owned by the * hash table and should not be modified or freed. Use g_list_free() * when done using the list. * * Since: 2.14 */ public ListG getKeys() { auto p = g_hash_table_get_keys(gHashTable); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Retrieves every key inside @hash_table, as an array. * * The returned array is %NULL-terminated but may contain %NULL as a * key. Use @length to determine the true length if it's possible that * %NULL was used as the value for a key. * * Note: in the common case of a string-keyed #GHashTable, the return * value of this function can be conveniently cast to (const gchar **). * * This iterates over every entry in the hash table to build its return value. * To iterate over the entries in a #GHashTable more efficiently, use a * #GHashTableIter. * * You should always free the return result with g_free(). In the * above-mentioned case of a string-keyed hash table, it may be * appropriate to use g_strfreev() if you call g_hash_table_steal_all() * first to transfer ownership of the keys. * * Returns: a * %NULL-terminated array containing each key from the table. * * Since: 2.40 */ public void*[] getKeysAsArray() { uint length; auto p = g_hash_table_get_keys_as_array(gHashTable, &length); return p[0 .. length]; } /** * Retrieves every value inside @hash_table. The returned data * is valid until @hash_table is modified. * * This iterates over every entry in the hash table to build its return value. * To iterate over the entries in a #GHashTable more efficiently, use a * #GHashTableIter. * * Returns: a #GList containing all the values * inside the hash table. The content of the list is owned by the * hash table and should not be modified or freed. Use g_list_free() * when done using the list. * * Since: 2.14 */ public ListG getValues() { auto p = g_hash_table_get_values(gHashTable); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Inserts a new key and value into a #GHashTable. * * If the key already exists in the #GHashTable its current * value is replaced with the new value. If you supplied a * @value_destroy_func when creating the #GHashTable, the old * value is freed using that function. If you supplied a * @key_destroy_func when creating the #GHashTable, the passed * key is freed using that function. * * Params: * key = a key to insert * value = the value to associate with the key * * Returns: %TRUE if the key did not exist yet */ public bool insert(void* key, void* value) { return g_hash_table_insert(gHashTable, key, value) != 0; } /** * Looks up a key in a #GHashTable. Note that this function cannot * distinguish between a key that is not present and one which is present * and has the value %NULL. If you need this distinction, use * g_hash_table_lookup_extended(). * * Params: * key = the key to look up * * Returns: the associated value, or %NULL if the key is not found */ public void* lookup(void* key) { return g_hash_table_lookup(gHashTable, key); } /** * Looks up a key in the #GHashTable, returning the original key and the * associated value and a #gboolean which is %TRUE if the key was found. This * is useful if you need to free the memory allocated for the original key, * for example before calling g_hash_table_remove(). * * You can actually pass %NULL for @lookup_key to test * whether the %NULL key exists, provided the hash and equal functions * of @hash_table are %NULL-safe. * * Params: * lookupKey = the key to look up * origKey = return location for the original key * value = return location for the value associated * with the key * * Returns: %TRUE if the key was found in the #GHashTable */ public bool lookupExtended(void* lookupKey, out void* origKey, out void* value) { return g_hash_table_lookup_extended(gHashTable, lookupKey, &origKey, &value) != 0; } /** * Creates a new #GHashTable with a reference count of 1. * * Hash values returned by @hash_func are used to determine where keys * are stored within the #GHashTable data structure. The g_direct_hash(), * g_int_hash(), g_int64_hash(), g_double_hash() and g_str_hash() * functions are provided for some common types of keys. * If @hash_func is %NULL, g_direct_hash() is used. * * @key_equal_func is used when looking up keys in the #GHashTable. * The g_direct_equal(), g_int_equal(), g_int64_equal(), g_double_equal() * and g_str_equal() functions are provided for the most common types * of keys. If @key_equal_func is %NULL, keys are compared directly in * a similar fashion to g_direct_equal(), but without the overhead of * a function call. @key_equal_func is called with the key from the hash table * as its first parameter, and the user-provided key to check against as * its second. * * Params: * hashFunc = a function to create a hash value from a key * keyEqualFunc = a function to check two keys for equality * * Returns: a new #GHashTable * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GHashFunc hashFunc, GEqualFunc keyEqualFunc) { auto p = g_hash_table_new(hashFunc, keyEqualFunc); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GHashTable*) p); } /** * Creates a new #GHashTable like g_hash_table_new() with a reference * count of 1 and allows to specify functions to free the memory * allocated for the key and value that get called when removing the * entry from the #GHashTable. * * Since version 2.42 it is permissible for destroy notify functions to * recursively remove further items from the hash table. This is only * permissible if the application still holds a reference to the hash table. * This means that you may need to ensure that the hash table is empty by * calling g_hash_table_remove_all() before releasing the last reference using * g_hash_table_unref(). * * Params: * hashFunc = a function to create a hash value from a key * keyEqualFunc = a function to check two keys for equality * keyDestroyFunc = a function to free the memory allocated for the key * used when removing the entry from the #GHashTable, or %NULL * if you don't want to supply such a function. * valueDestroyFunc = a function to free the memory allocated for the * value used when removing the entry from the #GHashTable, or %NULL * if you don't want to supply such a function. * * Returns: a new #GHashTable * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GHashFunc hashFunc, GEqualFunc keyEqualFunc, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc) { auto p = g_hash_table_new_full(hashFunc, keyEqualFunc, keyDestroyFunc, valueDestroyFunc); if(p is null) { throw new ConstructionException("null returned by new_full"); } this(cast(GHashTable*) p); } /** * Atomically increments the reference count of @hash_table by one. * This function is MT-safe and may be called from any thread. * * Returns: the passed in #GHashTable * * Since: 2.10 */ public HashTable doref() { auto p = g_hash_table_ref(gHashTable); if(p is null) { return null; } return new HashTable(cast(GHashTable*) p); } /** * Removes a key and its associated value from a #GHashTable. * * If the #GHashTable was created using g_hash_table_new_full(), the * key and value are freed using the supplied destroy functions, otherwise * you have to make sure that any dynamically allocated values are freed * yourself. * * Params: * key = the key to remove * * Returns: %TRUE if the key was found and removed from the #GHashTable */ public bool remove(void* key) { return g_hash_table_remove(gHashTable, key) != 0; } /** * Removes all keys and their associated values from a #GHashTable. * * If the #GHashTable was created using g_hash_table_new_full(), * the keys and values are freed using the supplied destroy functions, * otherwise you have to make sure that any dynamically allocated * values are freed yourself. * * Since: 2.12 */ public void removeAll() { g_hash_table_remove_all(gHashTable); } /** * Inserts a new key and value into a #GHashTable similar to * g_hash_table_insert(). The difference is that if the key * already exists in the #GHashTable, it gets replaced by the * new key. If you supplied a @value_destroy_func when creating * the #GHashTable, the old value is freed using that function. * If you supplied a @key_destroy_func when creating the * #GHashTable, the old key is freed using that function. * * Params: * key = a key to insert * value = the value to associate with the key * * Returns: %TRUE if the key did not exist yet */ public bool replace(void* key, void* value) { return g_hash_table_replace(gHashTable, key, value) != 0; } /** * Returns the number of elements contained in the #GHashTable. * * Returns: the number of key/value pairs in the #GHashTable. */ public uint size() { return g_hash_table_size(gHashTable); } /** * Removes a key and its associated value from a #GHashTable without * calling the key and value destroy functions. * * Params: * key = the key to remove * * Returns: %TRUE if the key was found and removed from the #GHashTable */ public bool steal(void* key) { return g_hash_table_steal(gHashTable, key) != 0; } /** * Removes all keys and their associated values from a #GHashTable * without calling the key and value destroy functions. * * Since: 2.12 */ public void stealAll() { g_hash_table_steal_all(gHashTable); } /** * Atomically decrements the reference count of @hash_table by one. * If the reference count drops to 0, all keys and values will be * destroyed, and all memory allocated by the hash table is released. * This function is MT-safe and may be called from any thread. * * Since: 2.10 */ public void unref() { g_hash_table_unref(gHashTable); } /** * Compares two #gpointer arguments and returns %TRUE if they are equal. * It can be passed to g_hash_table_new() as the @key_equal_func * parameter, when using opaque pointers compared by pointer value as * keys in a #GHashTable. * * This equality function is also appropriate for keys that are integers * stored in pointers, such as `GINT_TO_POINTER (n)`. * * Params: * v1 = a key * v2 = a key to compare with @v1 * * Returns: %TRUE if the two keys match. */ public static bool directEqual(void* v1, void* v2) { return g_direct_equal(v1, v2) != 0; } /** * Converts a gpointer to a hash value. * It can be passed to g_hash_table_new() as the @hash_func parameter, * when using opaque pointers compared by pointer value as keys in a * #GHashTable. * * This hash function is also appropriate for keys that are integers * stored in pointers, such as `GINT_TO_POINTER (n)`. * * Params: * v = a #gpointer key * * Returns: a hash value corresponding to the key. */ public static uint directHash(void* v) { return g_direct_hash(v); } /** * Compares the two #gdouble values being pointed to and returns * %TRUE if they are equal. * It can be passed to g_hash_table_new() as the @key_equal_func * parameter, when using non-%NULL pointers to doubles as keys in a * #GHashTable. * * Params: * v1 = a pointer to a #gdouble key * v2 = a pointer to a #gdouble key to compare with @v1 * * Returns: %TRUE if the two keys match. * * Since: 2.22 */ public static bool doubleEqual(void* v1, void* v2) { return g_double_equal(v1, v2) != 0; } /** * Converts a pointer to a #gdouble to a hash value. * It can be passed to g_hash_table_new() as the @hash_func parameter, * It can be passed to g_hash_table_new() as the @hash_func parameter, * when using non-%NULL pointers to doubles as keys in a #GHashTable. * * Params: * v = a pointer to a #gdouble key * * Returns: a hash value corresponding to the key. * * Since: 2.22 */ public static uint doubleHash(void* v) { return g_double_hash(v); } /** * Compares the two #gint64 values being pointed to and returns * %TRUE if they are equal. * It can be passed to g_hash_table_new() as the @key_equal_func * parameter, when using non-%NULL pointers to 64-bit integers as keys in a * #GHashTable. * * Params: * v1 = a pointer to a #gint64 key * v2 = a pointer to a #gint64 key to compare with @v1 * * Returns: %TRUE if the two keys match. * * Since: 2.22 */ public static bool int64Equal(void* v1, void* v2) { return g_int64_equal(v1, v2) != 0; } /** * Converts a pointer to a #gint64 to a hash value. * * It can be passed to g_hash_table_new() as the @hash_func parameter, * when using non-%NULL pointers to 64-bit integer values as keys in a * #GHashTable. * * Params: * v = a pointer to a #gint64 key * * Returns: a hash value corresponding to the key. * * Since: 2.22 */ public static uint int64Hash(void* v) { return g_int64_hash(v); } /** * Compares the two #gint values being pointed to and returns * %TRUE if they are equal. * It can be passed to g_hash_table_new() as the @key_equal_func * parameter, when using non-%NULL pointers to integers as keys in a * #GHashTable. * * Note that this function acts on pointers to #gint, not on #gint * directly: if your hash table's keys are of the form * `GINT_TO_POINTER (n)`, use g_direct_equal() instead. * * Params: * v1 = a pointer to a #gint key * v2 = a pointer to a #gint key to compare with @v1 * * Returns: %TRUE if the two keys match. */ public static bool intEqual(void* v1, void* v2) { return g_int_equal(v1, v2) != 0; } /** * Converts a pointer to a #gint to a hash value. * It can be passed to g_hash_table_new() as the @hash_func parameter, * when using non-%NULL pointers to integer values as keys in a #GHashTable. * * Note that this function acts on pointers to #gint, not on #gint * directly: if your hash table's keys are of the form * `GINT_TO_POINTER (n)`, use g_direct_hash() instead. * * Params: * v = a pointer to a #gint key * * Returns: a hash value corresponding to the key. */ public static uint intHash(void* v) { return g_int_hash(v); } /** * Compares two strings for byte-by-byte equality and returns %TRUE * if they are equal. It can be passed to g_hash_table_new() as the * @key_equal_func parameter, when using non-%NULL strings as keys in a * #GHashTable. * * Note that this function is primarily meant as a hash table comparison * function. For a general-purpose, %NULL-safe string comparison function, * see g_strcmp0(). * * Params: * v1 = a key * v2 = a key to compare with @v1 * * Returns: %TRUE if the two keys match */ public static bool strEqual(void* v1, void* v2) { return g_str_equal(v1, v2) != 0; } /** * Converts a string to a hash value. * * This function implements the widely used "djb" hash apparently * posted by Daniel Bernstein to comp.lang.c some time ago. The 32 * bit unsigned hash value starts at 5381 and for each byte 'c' in * the string, is updated: `hash = hash * 33 + c`. This function * uses the signed value of each byte. * * It can be passed to g_hash_table_new() as the @hash_func parameter, * when using non-%NULL strings as keys in a #GHashTable. * * Note that this function may not be a perfect fit for all use cases. * For example, it produces some hash collisions with strings as short * as 2. * * Params: * v = a string key * * Returns: a hash value corresponding to the key */ public static uint strHash(void* v) { return g_str_hash(v); } } GtkD-3.7.5/generated/gtkd/glib/HashTableIter.d000066400000000000000000000121261324604450400210130ustar00rootroot00000000000000/* * 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 glib.HashTableIter; private import glib.HashTable; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * A GHashTableIter structure represents an iterator that can be used * to iterate over the elements of a #GHashTable. GHashTableIter * structures are typically allocated on the stack and then initialized * with g_hash_table_iter_init(). */ public class HashTableIter { /** the main Gtk struct */ protected GHashTableIter* gHashTableIter; protected bool ownedRef; /** Get the main Gtk struct */ public GHashTableIter* getHashTableIterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gHashTableIter; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gHashTableIter; } /** * Sets our main struct and passes it to the parent class. */ public this (GHashTableIter* gHashTableIter, bool ownedRef = false) { this.gHashTableIter = gHashTableIter; this.ownedRef = ownedRef; } /** * Returns the #GHashTable associated with @iter. * * Returns: the #GHashTable associated with @iter. * * Since: 2.16 */ public HashTable getHashTable() { auto p = g_hash_table_iter_get_hash_table(gHashTableIter); if(p is null) { return null; } return new HashTable(cast(GHashTable*) p); } /** * Initializes a key/value pair iterator and associates it with * @hash_table. Modifying the hash table after calling this function * invalidates the returned iterator. * |[ * GHashTableIter iter; * gpointer key, value; * * g_hash_table_iter_init (&iter, hash_table); * while (g_hash_table_iter_next (&iter, &key, &value)) * { * // do something with key and value * } * ]| * * Params: * hashTable = a #GHashTable * * Since: 2.16 */ public void init(HashTable hashTable) { g_hash_table_iter_init(gHashTableIter, (hashTable is null) ? null : hashTable.getHashTableStruct()); } /** * Advances @iter and retrieves the key and/or value that are now * pointed to as a result of this advancement. If %FALSE is returned, * @key and @value are not set, and the iterator becomes invalid. * * Params: * key = a location to store the key * value = a location to store the value * * Returns: %FALSE if the end of the #GHashTable has been reached. * * Since: 2.16 */ public bool next(out void* key, out void* value) { return g_hash_table_iter_next(gHashTableIter, &key, &value) != 0; } /** * Removes the key/value pair currently pointed to by the iterator * from its associated #GHashTable. Can only be called after * g_hash_table_iter_next() returned %TRUE, and cannot be called * more than once for the same key/value pair. * * If the #GHashTable was created using g_hash_table_new_full(), * the key and value are freed using the supplied destroy functions, * otherwise you have to make sure that any dynamically allocated * values are freed yourself. * * It is safe to continue iterating the #GHashTable afterward: * |[ * while (g_hash_table_iter_next (&iter, &key, &value)) * { * if (condition) * g_hash_table_iter_remove (&iter); * } * ]| * * Since: 2.16 */ public void remove() { g_hash_table_iter_remove(gHashTableIter); } /** * Replaces the value currently pointed to by the iterator * from its associated #GHashTable. Can only be called after * g_hash_table_iter_next() returned %TRUE. * * If you supplied a @value_destroy_func when creating the * #GHashTable, the old value is freed using that function. * * Params: * value = the value to replace with * * Since: 2.30 */ public void replace(void* value) { g_hash_table_iter_replace(gHashTableIter, value); } /** * Removes the key/value pair currently pointed to by the * iterator from its associated #GHashTable, without calling * the key and value destroy functions. Can only be called * after g_hash_table_iter_next() returned %TRUE, and cannot * be called more than once for the same key/value pair. * * Since: 2.16 */ public void steal() { g_hash_table_iter_steal(gHashTableIter); } } GtkD-3.7.5/generated/gtkd/glib/Hmac.d000066400000000000000000000202541324604450400172050ustar00rootroot00000000000000/* * 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 glib.Hmac; private import glib.Bytes; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * An opaque structure representing a HMAC operation. * To create a new GHmac, use g_hmac_new(). To free * a GHmac, use g_hmac_unref(). * * Since: 2.30 */ public class Hmac { /** the main Gtk struct */ protected GHmac* gHmac; protected bool ownedRef; /** Get the main Gtk struct */ public GHmac* getHmacStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gHmac; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gHmac; } /** * Sets our main struct and passes it to the parent class. */ public this (GHmac* gHmac, bool ownedRef = false) { this.gHmac = gHmac; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_hmac_unref(gHmac); } /** * Gets the digest from checksum as a raw binary array and places it * into buffer. The size of the digest depends on the type of checksum. * * Once this function has been called, the Hmac is closed and can * no longer be updated with update(). * * Params: * buffer = output buffer * * Since: 2.30 */ public void getDigest(ref ubyte[] buffer) { size_t digestLen = buffer.length; g_hmac_get_digest(gHmac, buffer.ptr, &digestLen); buffer = buffer[0 .. digestLen]; } /** */ /** * Copies a #GHmac. If @hmac has been closed, by calling * g_hmac_get_string() or g_hmac_get_digest(), the copied * HMAC will be closed as well. * * Returns: the copy of the passed #GHmac. Use g_hmac_unref() * when finished using it. * * Since: 2.30 */ public Hmac copy() { auto p = g_hmac_copy(gHmac); if(p is null) { return null; } return new Hmac(cast(GHmac*) p); } /** * Gets the HMAC as an hexadecimal string. * * Once this function has been called the #GHmac can no longer be * updated with g_hmac_update(). * * The hexadecimal characters will be lower case. * * Returns: the hexadecimal representation of the HMAC. The * returned string is owned by the HMAC and should not be modified * or freed. * * Since: 2.30 */ public string getString() { return Str.toString(g_hmac_get_string(gHmac)); } /** * Atomically increments the reference count of @hmac by one. * * This function is MT-safe and may be called from any thread. * * Returns: the passed in #GHmac. * * Since: 2.30 */ public Hmac doref() { auto p = g_hmac_ref(gHmac); if(p is null) { return null; } return new Hmac(cast(GHmac*) p); } /** * Atomically decrements the reference count of @hmac by one. * * If the reference count drops to 0, all keys and values will be * destroyed, and all memory allocated by the hash table is released. * This function is MT-safe and may be called from any thread. * Frees the memory allocated for @hmac. * * Since: 2.30 */ public void unref() { g_hmac_unref(gHmac); } /** * Feeds @data into an existing #GHmac. * * The HMAC must still be open, that is g_hmac_get_string() or * g_hmac_get_digest() must not have been called on @hmac. * * Params: * data = buffer used to compute the checksum * * Since: 2.30 */ public void update(char[] data) { g_hmac_update(gHmac, data.ptr, cast(ptrdiff_t)data.length); } /** * Creates a new #GHmac, using the digest algorithm @digest_type. * If the @digest_type is not known, %NULL is returned. * A #GHmac can be used to compute the HMAC of a key and an * arbitrary binary blob, using different hashing algorithms. * * A #GHmac works by feeding a binary blob through g_hmac_update() * until the data is complete; the digest can then be extracted * using g_hmac_get_string(), which will return the checksum as a * hexadecimal string; or g_hmac_get_digest(), which will return a * array of raw bytes. Once either g_hmac_get_string() or * g_hmac_get_digest() have been called on a #GHmac, the HMAC * will be closed and it won't be possible to call g_hmac_update() * on it anymore. * * Support for digests of type %G_CHECKSUM_SHA512 has been added in GLib 2.42. * Support for %G_CHECKSUM_SHA384 was added in GLib 2.52. * * Params: * digestType = the desired type of digest * key = the key for the HMAC * * Returns: the newly created #GHmac, or %NULL. * Use g_hmac_unref() to free the memory allocated by it. * * Since: 2.30 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GChecksumType digestType, char[] key) { auto p = g_hmac_new(digestType, key.ptr, cast(size_t)key.length); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GHmac*) p); } /** * Computes the HMAC for a binary @data of @length. This is a * convenience wrapper for g_hmac_new(), g_hmac_get_string() * and g_hmac_unref(). * * The hexadecimal string returned will be in lower case. * * Params: * digestType = a #GChecksumType to use for the HMAC * key = the key to use in the HMAC * data = binary blob to compute the HMAC of * * Returns: the HMAC of the binary data as a string in hexadecimal. * The returned string should be freed with g_free() when done using it. * * Since: 2.30 */ public static string computeHmacForData(GChecksumType digestType, char[] key, char[] data) { auto retStr = g_compute_hmac_for_data(digestType, key.ptr, cast(size_t)key.length, data.ptr, cast(size_t)data.length); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Computes the HMAC for a string. * * The hexadecimal string returned will be in lower case. * * Params: * digestType = a #GChecksumType to use for the HMAC * key = the key to use in the HMAC * str = the string to compute the HMAC for * * Returns: the HMAC as a hexadecimal string. * The returned string should be freed with g_free() * when done using it. * * Since: 2.30 */ public static string computeHmacForString(GChecksumType digestType, char[] key, string str) { auto retStr = g_compute_hmac_for_string(digestType, key.ptr, cast(size_t)key.length, Str.toStringz(str), cast(ptrdiff_t)str.length); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Computes the HMAC for a binary @data. This is a * convenience wrapper for g_hmac_new(), g_hmac_get_string() * and g_hmac_unref(). * * The hexadecimal string returned will be in lower case. * * Params: * digestType = a #GChecksumType to use for the HMAC * key = the key to use in the HMAC * data = binary blob to compute the HMAC of * * Returns: the HMAC of the binary data as a string in hexadecimal. * The returned string should be freed with g_free() when done using it. * * Since: 2.50 */ public static string computeHmacForBytes(GChecksumType digestType, Bytes key, Bytes data) { auto retStr = g_compute_hmac_for_bytes(digestType, (key is null) ? null : key.getBytesStruct(), (data is null) ? null : data.getBytesStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/glib/Hook.d000066400000000000000000000310131324604450400172300ustar00rootroot00000000000000/* * 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 glib.Hook; private import glib.HookList; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The #GHook struct represents a single hook function in a #GHookList. */ public final class Hook { /** the main Gtk struct */ protected GHook* gHook; protected bool ownedRef; /** Get the main Gtk struct */ public GHook* getHookStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gHook; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gHook; } /** * Sets our main struct and passes it to the parent class. */ public this (GHook* gHook, bool ownedRef = false) { this.gHook = gHook; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_free(gHook); } /** * data which is passed to func when this hook is invoked */ public @property void* data() { return gHook.data; } /** Ditto */ public @property void data(void* value) { gHook.data = value; } /** * pointer to the next hook in the list */ public @property Hook next() { return new Hook(gHook.next, false); } /** Ditto */ public @property void next(Hook value) { gHook.next = value.getHookStruct(); } /** * pointer to the previous hook in the list */ public @property Hook prev() { return new Hook(gHook.prev, false); } /** Ditto */ public @property void prev(Hook value) { gHook.prev = value.getHookStruct(); } /** * the reference count of this hook */ public @property uint refCount() { return gHook.refCount; } /** Ditto */ public @property void refCount(uint value) { gHook.refCount = value; } /** * the id of this hook, which is unique within its list */ public @property gulong hookId() { return gHook.hookId; } /** Ditto */ public @property void hookId(gulong value) { gHook.hookId = value; } /** * flags which are set for this hook. See #GHookFlagMask for * predefined flags */ public @property uint flags() { return gHook.flags; } /** Ditto */ public @property void flags(uint value) { gHook.flags = value; } /** * the function to call when this hook is invoked. The possible * signatures for this function are #GHookFunc and #GHookCheckFunc */ public @property void* func() { return gHook.func; } /** Ditto */ public @property void func(void* value) { gHook.func = value; } /** * the default @finalize_hook function of a #GHookList calls * this member of the hook that is being finalized */ public @property GDestroyNotify destroy() { return gHook.destroy; } /** Ditto */ public @property void destroy(GDestroyNotify value) { gHook.destroy = value; } /** * Compares the ids of two #GHook elements, returning a negative value * if the second id is greater than the first. * * Params: * sibling = a #GHook to compare with @new_hook * * Returns: a value <= 0 if the id of @sibling is >= the id of @new_hook */ public int compareIds(Hook sibling) { return g_hook_compare_ids(gHook, (sibling is null) ? null : sibling.getHookStruct()); } /** * Allocates space for a #GHook and initializes it. * * Params: * hookList = a #GHookList * * Returns: a new #GHook */ public static Hook alloc(HookList hookList) { auto p = g_hook_alloc((hookList is null) ? null : hookList.getHookListStruct()); if(p is null) { return null; } return new Hook(cast(GHook*) p); } /** * Destroys a #GHook, given its ID. * * Params: * hookList = a #GHookList * hookId = a hook ID * * Returns: %TRUE if the #GHook was found in the #GHookList and destroyed */ public static bool destroy(HookList hookList, gulong hookId) { return g_hook_destroy((hookList is null) ? null : hookList.getHookListStruct(), hookId) != 0; } /** * Removes one #GHook from a #GHookList, marking it * inactive and calling g_hook_unref() on it. * * Params: * hookList = a #GHookList * hook = the #GHook to remove */ public static void destroyLink(HookList hookList, Hook hook) { g_hook_destroy_link((hookList is null) ? null : hookList.getHookListStruct(), (hook is null) ? null : hook.getHookStruct()); } /** * Finds a #GHook in a #GHookList using the given function to * test for a match. * * Params: * hookList = a #GHookList * needValids = %TRUE if #GHook elements which have been destroyed * should be skipped * func = the function to call for each #GHook, which should return * %TRUE when the #GHook has been found * data = the data to pass to @func * * Returns: the found #GHook or %NULL if no matching #GHook is found */ public static Hook find(HookList hookList, bool needValids, GHookFindFunc func, void* data) { auto p = g_hook_find((hookList is null) ? null : hookList.getHookListStruct(), needValids, func, data); if(p is null) { return null; } return new Hook(cast(GHook*) p); } /** * Finds a #GHook in a #GHookList with the given data. * * Params: * hookList = a #GHookList * needValids = %TRUE if #GHook elements which have been destroyed * should be skipped * data = the data to find * * Returns: the #GHook with the given @data or %NULL if no matching * #GHook is found */ public static Hook findData(HookList hookList, bool needValids, void* data) { auto p = g_hook_find_data((hookList is null) ? null : hookList.getHookListStruct(), needValids, data); if(p is null) { return null; } return new Hook(cast(GHook*) p); } /** * Finds a #GHook in a #GHookList with the given function. * * Params: * hookList = a #GHookList * needValids = %TRUE if #GHook elements which have been destroyed * should be skipped * func = the function to find * * Returns: the #GHook with the given @func or %NULL if no matching * #GHook is found */ public static Hook findFunc(HookList hookList, bool needValids, void* func) { auto p = g_hook_find_func((hookList is null) ? null : hookList.getHookListStruct(), needValids, func); if(p is null) { return null; } return new Hook(cast(GHook*) p); } /** * Finds a #GHook in a #GHookList with the given function and data. * * Params: * hookList = a #GHookList * needValids = %TRUE if #GHook elements which have been destroyed * should be skipped * func = the function to find * data = the data to find * * Returns: the #GHook with the given @func and @data or %NULL if * no matching #GHook is found */ public static Hook findFuncData(HookList hookList, bool needValids, void* func, void* data) { auto p = g_hook_find_func_data((hookList is null) ? null : hookList.getHookListStruct(), needValids, func, data); if(p is null) { return null; } return new Hook(cast(GHook*) p); } /** * Returns the first #GHook in a #GHookList which has not been destroyed. * The reference count for the #GHook is incremented, so you must call * g_hook_unref() to restore it when no longer needed. (Or call * g_hook_next_valid() if you are stepping through the #GHookList.) * * Params: * hookList = a #GHookList * mayBeInCall = %TRUE if hooks which are currently running * (e.g. in another thread) are considered valid. If set to %FALSE, * these are skipped * * Returns: the first valid #GHook, or %NULL if none are valid */ public static Hook firstValid(HookList hookList, bool mayBeInCall) { auto p = g_hook_first_valid((hookList is null) ? null : hookList.getHookListStruct(), mayBeInCall); if(p is null) { return null; } return new Hook(cast(GHook*) p); } /** * Calls the #GHookList @finalize_hook function if it exists, * and frees the memory allocated for the #GHook. * * Params: * hookList = a #GHookList * hook = the #GHook to free */ public static void free(HookList hookList, Hook hook) { g_hook_free((hookList is null) ? null : hookList.getHookListStruct(), (hook is null) ? null : hook.getHookStruct()); } /** * Returns the #GHook with the given id, or %NULL if it is not found. * * Params: * hookList = a #GHookList * hookId = a hook id * * Returns: the #GHook with the given id, or %NULL if it is not found */ public static Hook get(HookList hookList, gulong hookId) { auto p = g_hook_get((hookList is null) ? null : hookList.getHookListStruct(), hookId); if(p is null) { return null; } return new Hook(cast(GHook*) p); } /** * Inserts a #GHook into a #GHookList, before a given #GHook. * * Params: * hookList = a #GHookList * sibling = the #GHook to insert the new #GHook before * hook = the #GHook to insert */ public static void insertBefore(HookList hookList, Hook sibling, Hook hook) { g_hook_insert_before((hookList is null) ? null : hookList.getHookListStruct(), (sibling is null) ? null : sibling.getHookStruct(), (hook is null) ? null : hook.getHookStruct()); } /** * Inserts a #GHook into a #GHookList, sorted by the given function. * * Params: * hookList = a #GHookList * hook = the #GHook to insert * func = the comparison function used to sort the #GHook elements */ public static void insertSorted(HookList hookList, Hook hook, GHookCompareFunc func) { g_hook_insert_sorted((hookList is null) ? null : hookList.getHookListStruct(), (hook is null) ? null : hook.getHookStruct(), func); } /** * Returns the next #GHook in a #GHookList which has not been destroyed. * The reference count for the #GHook is incremented, so you must call * g_hook_unref() to restore it when no longer needed. (Or continue to call * g_hook_next_valid() until %NULL is returned.) * * Params: * hookList = a #GHookList * hook = the current #GHook * mayBeInCall = %TRUE if hooks which are currently running * (e.g. in another thread) are considered valid. If set to %FALSE, * these are skipped * * Returns: the next valid #GHook, or %NULL if none are valid */ public static Hook nextValid(HookList hookList, Hook hook, bool mayBeInCall) { auto p = g_hook_next_valid((hookList is null) ? null : hookList.getHookListStruct(), (hook is null) ? null : hook.getHookStruct(), mayBeInCall); if(p is null) { return null; } return new Hook(cast(GHook*) p); } /** * Prepends a #GHook on the start of a #GHookList. * * Params: * hookList = a #GHookList * hook = the #GHook to add to the start of @hook_list */ public static void prepend(HookList hookList, Hook hook) { g_hook_prepend((hookList is null) ? null : hookList.getHookListStruct(), (hook is null) ? null : hook.getHookStruct()); } /** * Increments the reference count for a #GHook. * * Params: * hookList = a #GHookList * hook = the #GHook to increment the reference count of * * Returns: the @hook that was passed in (since 2.6) */ public static Hook doref(HookList hookList, Hook hook) { auto p = g_hook_ref((hookList is null) ? null : hookList.getHookListStruct(), (hook is null) ? null : hook.getHookStruct()); if(p is null) { return null; } return new Hook(cast(GHook*) p); } /** * Decrements the reference count of a #GHook. * If the reference count falls to 0, the #GHook is removed * from the #GHookList and g_hook_free() is called to free it. * * Params: * hookList = a #GHookList * hook = the #GHook to unref */ public static void unref(HookList hookList, Hook hook) { g_hook_unref((hookList is null) ? null : hookList.getHookListStruct(), (hook is null) ? null : hook.getHookStruct()); } } GtkD-3.7.5/generated/gtkd/glib/HookList.d000066400000000000000000000123601324604450400200700ustar00rootroot00000000000000/* * 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 glib.HookList; private import glib.Hook; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The #GHookList struct represents a list of hook functions. */ public final class HookList { /** the main Gtk struct */ protected GHookList* gHookList; protected bool ownedRef; /** Get the main Gtk struct */ public GHookList* getHookListStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gHookList; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gHookList; } /** * Sets our main struct and passes it to the parent class. */ public this (GHookList* gHookList, bool ownedRef = false) { this.gHookList = gHookList; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_free(gHookList); } /** * the next free #GHook id */ public @property gulong seqId() { return gHookList.seqId; } /** Ditto */ public @property void seqId(gulong value) { gHookList.seqId = value; } /** * the size of the #GHookList elements, in bytes */ public @property uint hookSize() { return gHookList.hookSize; } /** Ditto */ public @property void hookSize(uint value) { gHookList.hookSize = value; } /** * 1 if the #GHookList has been initialized */ public @property uint isSetup() { return gHookList.isSetup; } /** Ditto */ public @property void isSetup(uint value) { gHookList.isSetup = value; } /** * the first #GHook element in the list */ public @property Hook hooks() { return new Hook(gHookList.hooks, false); } /** Ditto */ public @property void hooks(Hook value) { gHookList.hooks = value.getHookStruct(); } /** * the function to call to finalize a #GHook element. * The default behaviour is to call the hooks @destroy function */ public @property GHookFinalizeFunc finalizeHook() { return gHookList.finalizeHook; } /** Ditto */ public @property void finalizeHook(GHookFinalizeFunc value) { gHookList.finalizeHook = value; } /** * Removes all the #GHook elements from a #GHookList. */ public void clear() { g_hook_list_clear(gHookList); } /** * Initializes a #GHookList. * This must be called before the #GHookList is used. * * Params: * hookSize = the size of each element in the #GHookList, * typically `sizeof (GHook)`. */ public void init(uint hookSize) { g_hook_list_init(gHookList, hookSize); } /** * Calls all of the #GHook functions in a #GHookList. * * Params: * mayRecurse = %TRUE if functions which are already running * (e.g. in another thread) can be called. If set to %FALSE, * these are skipped */ public void invoke(bool mayRecurse) { g_hook_list_invoke(gHookList, mayRecurse); } /** * Calls all of the #GHook functions in a #GHookList. * Any function which returns %FALSE is removed from the #GHookList. * * Params: * mayRecurse = %TRUE if functions which are already running * (e.g. in another thread) can be called. If set to %FALSE, * these are skipped */ public void invokeCheck(bool mayRecurse) { g_hook_list_invoke_check(gHookList, mayRecurse); } /** * Calls a function on each valid #GHook. * * Params: * mayRecurse = %TRUE if hooks which are currently running * (e.g. in another thread) are considered valid. If set to %FALSE, * these are skipped * marshaller = the function to call for each #GHook * marshalData = data to pass to @marshaller */ public void marshal(bool mayRecurse, GHookMarshaller marshaller, void* marshalData) { g_hook_list_marshal(gHookList, mayRecurse, marshaller, marshalData); } /** * Calls a function on each valid #GHook and destroys it if the * function returns %FALSE. * * Params: * mayRecurse = %TRUE if hooks which are currently running * (e.g. in another thread) are considered valid. If set to %FALSE, * these are skipped * marshaller = the function to call for each #GHook * marshalData = data to pass to @marshaller */ public void marshalCheck(bool mayRecurse, GHookCheckMarshaller marshaller, void* marshalData) { g_hook_list_marshal_check(gHookList, mayRecurse, marshaller, marshalData); } } GtkD-3.7.5/generated/gtkd/glib/Hostname.d000066400000000000000000000102061324604450400201070ustar00rootroot00000000000000/* * 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 glib.Hostname; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Hostname { /** * Tests if @hostname contains segments with an ASCII-compatible * encoding of an Internationalized Domain Name. If this returns * %TRUE, you should decode the hostname with g_hostname_to_unicode() * before displaying it to the user. * * Note that a hostname might contain a mix of encoded and unencoded * segments, and so it is possible for g_hostname_is_non_ascii() and * g_hostname_is_ascii_encoded() to both return %TRUE for a name. * * Params: * hostname = a hostname * * Returns: %TRUE if @hostname contains any ASCII-encoded * segments. * * Since: 2.22 */ public static bool isAsciiEncoded(string hostname) { return g_hostname_is_ascii_encoded(Str.toStringz(hostname)) != 0; } /** * Tests if @hostname is the string form of an IPv4 or IPv6 address. * (Eg, "192.168.0.1".) * * Params: * hostname = a hostname (or IP address in string form) * * Returns: %TRUE if @hostname is an IP address * * Since: 2.22 */ public static bool isIpAddress(string hostname) { return g_hostname_is_ip_address(Str.toStringz(hostname)) != 0; } /** * Tests if @hostname contains Unicode characters. If this returns * %TRUE, you need to encode the hostname with g_hostname_to_ascii() * before using it in non-IDN-aware contexts. * * Note that a hostname might contain a mix of encoded and unencoded * segments, and so it is possible for g_hostname_is_non_ascii() and * g_hostname_is_ascii_encoded() to both return %TRUE for a name. * * Params: * hostname = a hostname * * Returns: %TRUE if @hostname contains any non-ASCII characters * * Since: 2.22 */ public static bool isNonAscii(string hostname) { return g_hostname_is_non_ascii(Str.toStringz(hostname)) != 0; } /** * Converts @hostname to its canonical ASCII form; an ASCII-only * string containing no uppercase letters and not ending with a * trailing dot. * * Params: * hostname = a valid UTF-8 or ASCII hostname * * Returns: an ASCII hostname, which must be freed, or %NULL if * @hostname is in some way invalid. * * Since: 2.22 */ public static string toAscii(string hostname) { auto retStr = g_hostname_to_ascii(Str.toStringz(hostname)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts @hostname to its canonical presentation form; a UTF-8 * string in Unicode normalization form C, containing no uppercase * letters, no forbidden characters, and no ASCII-encoded segments, * and not ending with a trailing dot. * * Of course if @hostname is not an internationalized hostname, then * the canonical presentation form will be entirely ASCII. * * Params: * hostname = a valid UTF-8 or ASCII hostname * * Returns: a UTF-8 hostname, which must be freed, or %NULL if * @hostname is in some way invalid. * * Since: 2.22 */ public static string toUnicode(string hostname) { auto retStr = g_hostname_to_unicode(Str.toStringz(hostname)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/glib/IConv.d000066400000000000000000000061461324604450400173570ustar00rootroot00000000000000/* * 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 glib.IConv; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The GIConv struct wraps an iconv() conversion descriptor. It contains * private data and should only be accessed using the following functions. */ /** * Same as the standard UNIX routine iconv(), but * may be implemented via libiconv on UNIX flavors that lack * a native implementation. * * GLib provides g_convert() and g_locale_to_utf8() which are likely * more convenient than the raw iconv wrappers. * * Params: * inbuf = bytes to convert * outbuf = converted output bytes * * Returns: count of non-reversible conversions, or -1 on error */ public size_t iconv(GIConv converter, ref string inbuf, ref string outbuf) { char* outinbuf = Str.toStringz(inbuf); size_t inbytesLeft; char* outoutbuf = Str.toStringz(outbuf); size_t outbytesLeft; auto p = g_iconv(converter, &outinbuf, &inbytesLeft, &outoutbuf, &outbytesLeft); inbuf = Str.toString(outinbuf, inbytesLeft); outbuf = Str.toString(outoutbuf, outbytesLeft); return p; } /** * Same as the standard UNIX routine iconv_close(), but * may be implemented via libiconv on UNIX flavors that lack * a native implementation. Should be called to clean up * the conversion descriptor from g_iconv_open() when * you are done converting things. * * GLib provides g_convert() and g_locale_to_utf8() which are likely * more convenient than the raw iconv wrappers. * * Returns: -1 on error, 0 on success */ public int close(GIConv converter) { return g_iconv_close(converter); } /** * Same as the standard UNIX routine iconv_open(), but * may be implemented via libiconv on UNIX flavors that lack * a native implementation. * * GLib provides g_convert() and g_locale_to_utf8() which are likely * more convenient than the raw iconv wrappers. * * Params: * toCodeset = destination codeset * fromCodeset = source codeset * * Returns: a "conversion descriptor", or (GIConv)-1 if * opening the converter failed. */ public GIConv open(string toCodeset, string fromCodeset) { return g_iconv_open(Str.toStringz(toCodeset), Str.toStringz(fromCodeset)); } GtkD-3.7.5/generated/gtkd/glib/IOChannel.d000066400000000000000000000620551324604450400201420ustar00rootroot00000000000000/* * 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 glib.IOChannel; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Source; private import glib.Str; private import glib.StringG; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * A data structure representing an IO Channel. The fields should be * considered private and should only be accessed with the following * functions. */ public class IOChannel { /** the main Gtk struct */ protected GIOChannel* gIOChannel; protected bool ownedRef; /** Get the main Gtk struct */ public GIOChannel* getIOChannelStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gIOChannel; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gIOChannel; } /** * Sets our main struct and passes it to the parent class. */ public this (GIOChannel* gIOChannel, bool ownedRef = false) { this.gIOChannel = gIOChannel; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_io_channel_unref(gIOChannel); } /** * Open a file @filename as a #GIOChannel using mode @mode. This * channel will be closed when the last reference to it is dropped, * so there is no need to call g_io_channel_close() (though doing * so will not cause problems, as long as no attempt is made to * access the channel after it is closed). * * Params: * filename = A string containing the name of a file * mode = One of "r", "w", "a", "r+", "w+", "a+". These have * the same meaning as in fopen() * * Returns: A #GIOChannel on success, %NULL on failure. * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string filename, string mode) { GError* err = null; auto p = g_io_channel_new_file(Str.toStringz(filename), Str.toStringz(mode), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_file"); } this(cast(GIOChannel*) p); } /** * Creates a new #GIOChannel given a file descriptor. On UNIX systems * this works for plain files, pipes, and sockets. * * The returned #GIOChannel has a reference count of 1. * * The default encoding for #GIOChannel is UTF-8. If your application * is reading output from a command using via pipe, you may need to set * the encoding to the encoding of the current locale (see * g_get_charset()) with the g_io_channel_set_encoding() function. * By default, the fd passed will not be closed when the final reference * to the #GIOChannel data structure is dropped. * * If you want to read raw binary data without interpretation, then * call the g_io_channel_set_encoding() function with %NULL for the * encoding argument. * * This function is available in GLib on Windows, too, but you should * avoid using it on Windows. The domain of file descriptors and * sockets overlap. There is no way for GLib to know which one you mean * in case the argument you pass to this function happens to be both a * valid file descriptor and socket. If that happens a warning is * issued, and GLib assumes that it is the file descriptor you mean. * * Params: * fd = a file descriptor. * * Returns: a new #GIOChannel. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int fd) { auto p = g_io_channel_unix_new(fd); if(p is null) { throw new ConstructionException("null returned by unix_new"); } this(cast(GIOChannel*) p); } /** * Close an IO channel. Any pending data to be written will be * flushed, ignoring errors. The channel will not be freed until the * last reference is dropped using g_io_channel_unref(). * * Deprecated: Use g_io_channel_shutdown() instead. */ public void close() { g_io_channel_close(gIOChannel); } /** * Flushes the write buffer for the GIOChannel. * * Returns: the status of the operation: One of * #G_IO_STATUS_NORMAL, #G_IO_STATUS_AGAIN, or * #G_IO_STATUS_ERROR. * * Throws: GException on failure. */ public GIOStatus flush() { GError* err = null; auto p = g_io_channel_flush(gIOChannel, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This function returns a #GIOCondition depending on whether there * is data to be read/space to write data in the internal buffers in * the #GIOChannel. Only the flags %G_IO_IN and %G_IO_OUT may be set. * * Returns: A #GIOCondition */ public GIOCondition getBufferCondition() { return g_io_channel_get_buffer_condition(gIOChannel); } /** * Gets the buffer size. * * Returns: the size of the buffer. */ public size_t getBufferSize() { return g_io_channel_get_buffer_size(gIOChannel); } /** * Returns whether @channel is buffered. * * Returns: %TRUE if the @channel is buffered. */ public bool getBuffered() { return g_io_channel_get_buffered(gIOChannel) != 0; } /** * Returns whether the file/socket/whatever associated with @channel * will be closed when @channel receives its final unref and is * destroyed. The default value of this is %TRUE for channels created * by g_io_channel_new_file (), and %FALSE for all other channels. * * Returns: %TRUE if the channel will be closed, %FALSE otherwise. */ public bool getCloseOnUnref() { return g_io_channel_get_close_on_unref(gIOChannel) != 0; } /** * Gets the encoding for the input/output of the channel. * The internal encoding is always UTF-8. The encoding %NULL * makes the channel safe for binary data. * * Returns: A string containing the encoding, this string is * owned by GLib and must not be freed. */ public string getEncoding() { return Str.toString(g_io_channel_get_encoding(gIOChannel)); } /** * Gets the current flags for a #GIOChannel, including read-only * flags such as %G_IO_FLAG_IS_READABLE. * * The values of the flags %G_IO_FLAG_IS_READABLE and %G_IO_FLAG_IS_WRITABLE * are cached for internal use by the channel when it is created. * If they should change at some later point (e.g. partial shutdown * of a socket with the UNIX shutdown() function), the user * should immediately call g_io_channel_get_flags() to update * the internal values of these flags. * * Returns: the flags which are set on the channel */ public GIOFlags getFlags() { return g_io_channel_get_flags(gIOChannel); } /** * This returns the string that #GIOChannel uses to determine * where in the file a line break occurs. A value of %NULL * indicates autodetection. * * Params: * length = a location to return the length of the line terminator * * Returns: The line termination string. This value * is owned by GLib and must not be freed. */ public string getLineTerm(int* length) { return Str.toString(g_io_channel_get_line_term(gIOChannel, length)); } /** * Initializes a #GIOChannel struct. * * This is called by each of the above functions when creating a * #GIOChannel, and so is not often needed by the application * programmer (unless you are creating a new type of #GIOChannel). */ public void init() { g_io_channel_init(gIOChannel); } /** * Reads data from a #GIOChannel. * * Deprecated: Use g_io_channel_read_chars() instead. * * Params: * buf = a buffer to read the data into (which should be at least * count bytes long) * count = the number of bytes to read from the #GIOChannel * bytesRead = returns the number of bytes actually read * * Returns: %G_IO_ERROR_NONE if the operation was successful. */ public GIOError read(string buf, size_t count, size_t* bytesRead) { return g_io_channel_read(gIOChannel, Str.toStringz(buf), count, bytesRead); } /** * Replacement for g_io_channel_read() with the new API. * * Params: * buf = a buffer to read data into * bytesRead = The number of bytes read. This may be * zero even on success if count < 6 and the channel's encoding * is non-%NULL. This indicates that the next UTF-8 character is * too wide for the buffer. * * Returns: the status of the operation. * * Throws: GException on failure. */ public GIOStatus readChars(out char[] buf, out size_t bytesRead) { GError* err = null; auto p = g_io_channel_read_chars(gIOChannel, buf.ptr, cast(size_t)buf.length, &bytesRead, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Reads a line, including the terminating character(s), * from a #GIOChannel into a newly-allocated string. * @str_return will contain allocated memory if the return * is %G_IO_STATUS_NORMAL. * * Params: * strReturn = The line read from the #GIOChannel, including the * line terminator. This data should be freed with g_free() * when no longer needed. This is a nul-terminated string. * If a @length of zero is returned, this will be %NULL instead. * terminatorPos = location to store position of line terminator, or %NULL * * Returns: the status of the operation. * * Throws: GException on failure. */ public GIOStatus readLine(out string strReturn, out size_t terminatorPos) { char* outstrReturn = null; size_t length; GError* err = null; auto p = g_io_channel_read_line(gIOChannel, &outstrReturn, &length, &terminatorPos, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } strReturn = Str.toString(outstrReturn, length); return p; } /** * Reads a line from a #GIOChannel, using a #GString as a buffer. * * Params: * buffer = a #GString into which the line will be written. * If @buffer already contains data, the old data will * be overwritten. * terminatorPos = location to store position of line terminator, or %NULL * * Returns: the status of the operation. * * Throws: GException on failure. */ public GIOStatus readLineString(StringG buffer, out size_t terminatorPos) { GError* err = null; auto p = g_io_channel_read_line_string(gIOChannel, (buffer is null) ? null : buffer.getStringGStruct(), &terminatorPos, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Reads all the remaining data from the file. * * Params: * strReturn = Location to * store a pointer to a string holding the remaining data in the * #GIOChannel. This data should be freed with g_free() when no * longer needed. This data is terminated by an extra nul * character, but there may be other nuls in the intervening data. * * Returns: %G_IO_STATUS_NORMAL on success. * This function never returns %G_IO_STATUS_EOF. * * Throws: GException on failure. */ public GIOStatus readToEnd(out string strReturn) { char* outstrReturn = null; size_t length; GError* err = null; auto p = g_io_channel_read_to_end(gIOChannel, &outstrReturn, &length, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } strReturn = Str.toString(outstrReturn, length); return p; } /** * Reads a Unicode character from @channel. * This function cannot be called on a channel with %NULL encoding. * * Params: * thechar = a location to return a character * * Returns: a #GIOStatus * * Throws: GException on failure. */ public GIOStatus readUnichar(out dchar thechar) { GError* err = null; auto p = g_io_channel_read_unichar(gIOChannel, &thechar, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Increments the reference count of a #GIOChannel. * * Returns: the @channel that was passed in (since 2.6) */ public IOChannel doref() { auto p = g_io_channel_ref(gIOChannel); if(p is null) { return null; } return new IOChannel(cast(GIOChannel*) p, true); } /** * Sets the current position in the #GIOChannel, similar to the standard * library function fseek(). * * Deprecated: Use g_io_channel_seek_position() instead. * * Params: * offset = an offset, in bytes, which is added to the position specified * by @type * type = the position in the file, which can be %G_SEEK_CUR (the current * position), %G_SEEK_SET (the start of the file), or %G_SEEK_END * (the end of the file) * * Returns: %G_IO_ERROR_NONE if the operation was successful. */ public GIOError seek(long offset, GSeekType type) { return g_io_channel_seek(gIOChannel, offset, type); } /** * Replacement for g_io_channel_seek() with the new API. * * Params: * offset = The offset in bytes from the position specified by @type * type = a #GSeekType. The type %G_SEEK_CUR is only allowed in those * cases where a call to g_io_channel_set_encoding () * is allowed. See the documentation for * g_io_channel_set_encoding () for details. * * Returns: the status of the operation. * * Throws: GException on failure. */ public GIOStatus seekPosition(long offset, GSeekType type) { GError* err = null; auto p = g_io_channel_seek_position(gIOChannel, offset, type, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the buffer size. * * Params: * size = the size of the buffer, or 0 to let GLib pick a good size */ public void setBufferSize(size_t size) { g_io_channel_set_buffer_size(gIOChannel, size); } /** * The buffering state can only be set if the channel's encoding * is %NULL. For any other encoding, the channel must be buffered. * * A buffered channel can only be set unbuffered if the channel's * internal buffers have been flushed. Newly created channels or * channels which have returned %G_IO_STATUS_EOF * not require such a flush. For write-only channels, a call to * g_io_channel_flush () is sufficient. For all other channels, * the buffers may be flushed by a call to g_io_channel_seek_position (). * This includes the possibility of seeking with seek type %G_SEEK_CUR * and an offset of zero. Note that this means that socket-based * channels cannot be set unbuffered once they have had data * read from them. * * On unbuffered channels, it is safe to mix read and write * calls from the new and old APIs, if this is necessary for * maintaining old code. * * The default state of the channel is buffered. * * Params: * buffered = whether to set the channel buffered or unbuffered */ public void setBuffered(bool buffered) { g_io_channel_set_buffered(gIOChannel, buffered); } /** * Whether to close the channel on the final unref of the #GIOChannel * data structure. The default value of this is %TRUE for channels * created by g_io_channel_new_file (), and %FALSE for all other channels. * * Setting this flag to %TRUE for a channel you have already closed * can cause problems when the final reference to the #GIOChannel is dropped. * * Params: * doClose = Whether to close the channel on the final unref of * the GIOChannel data structure. */ public void setCloseOnUnref(bool doClose) { g_io_channel_set_close_on_unref(gIOChannel, doClose); } /** * Sets the encoding for the input/output of the channel. * The internal encoding is always UTF-8. The default encoding * for the external file is UTF-8. * * The encoding %NULL is safe to use with binary data. * * The encoding can only be set if one of the following conditions * is true: * * - The channel was just created, and has not been written to or read from yet. * * - The channel is write-only. * * - The channel is a file, and the file pointer was just repositioned * by a call to g_io_channel_seek_position(). (This flushes all the * internal buffers.) * * - The current encoding is %NULL or UTF-8. * * - One of the (new API) read functions has just returned %G_IO_STATUS_EOF * (or, in the case of g_io_channel_read_to_end(), %G_IO_STATUS_NORMAL). * * - One of the functions g_io_channel_read_chars() or * g_io_channel_read_unichar() has returned %G_IO_STATUS_AGAIN or * %G_IO_STATUS_ERROR. This may be useful in the case of * %G_CONVERT_ERROR_ILLEGAL_SEQUENCE. * Returning one of these statuses from g_io_channel_read_line(), * g_io_channel_read_line_string(), or g_io_channel_read_to_end() * does not guarantee that the encoding can be changed. * * Channels which do not meet one of the above conditions cannot call * g_io_channel_seek_position() with an offset of %G_SEEK_CUR, and, if * they are "seekable", cannot call g_io_channel_write_chars() after * calling one of the API "read" functions. * * Params: * encoding = the encoding type * * Returns: %G_IO_STATUS_NORMAL if the encoding was successfully set * * Throws: GException on failure. */ public GIOStatus setEncoding(string encoding) { GError* err = null; auto p = g_io_channel_set_encoding(gIOChannel, Str.toStringz(encoding), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the (writeable) flags in @channel to (@flags & %G_IO_FLAG_SET_MASK). * * Params: * flags = the flags to set on the IO channel * * Returns: the status of the operation. * * Throws: GException on failure. */ public GIOStatus setFlags(GIOFlags flags) { GError* err = null; auto p = g_io_channel_set_flags(gIOChannel, flags, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * This sets the string that #GIOChannel uses to determine * where in the file a line break occurs. * * Params: * lineTerm = The line termination string. Use %NULL for * autodetect. Autodetection breaks on "\n", "\r\n", "\r", "\0", * and the Unicode paragraph separator. Autodetection should not be * used for anything other than file-based channels. * length = The length of the termination string. If -1 is passed, the * string is assumed to be nul-terminated. This option allows * termination strings with embedded nuls. */ public void setLineTerm(string lineTerm, int length) { g_io_channel_set_line_term(gIOChannel, Str.toStringz(lineTerm), length); } /** * Close an IO channel. Any pending data to be written will be * flushed if @flush is %TRUE. The channel will not be freed until the * last reference is dropped using g_io_channel_unref(). * * Params: * flush = if %TRUE, flush pending * * Returns: the status of the operation. * * Throws: GException on failure. */ public GIOStatus shutdown(bool flush) { GError* err = null; auto p = g_io_channel_shutdown(gIOChannel, flush, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Returns the file descriptor of the #GIOChannel. * * On Windows this function returns the file descriptor or socket of * the #GIOChannel. * * Returns: the file descriptor of the #GIOChannel. */ public int unixGetFd() { return g_io_channel_unix_get_fd(gIOChannel); } /** * Decrements the reference count of a #GIOChannel. */ public void unref() { g_io_channel_unref(gIOChannel); } /** * Writes data to a #GIOChannel. * * Deprecated: Use g_io_channel_write_chars() instead. * * Params: * buf = the buffer containing the data to write * count = the number of bytes to write * bytesWritten = the number of bytes actually written * * Returns: %G_IO_ERROR_NONE if the operation was successful. */ public GIOError write(string buf, size_t count, size_t* bytesWritten) { return g_io_channel_write(gIOChannel, Str.toStringz(buf), count, bytesWritten); } /** * Replacement for g_io_channel_write() with the new API. * * On seekable channels with encodings other than %NULL or UTF-8, generic * mixing of reading and writing is not allowed. A call to g_io_channel_write_chars () * may only be made on a channel from which data has been read in the * cases described in the documentation for g_io_channel_set_encoding (). * * Params: * buf = a buffer to write data from * bytesWritten = The number of bytes written. This can be nonzero * even if the return value is not %G_IO_STATUS_NORMAL. * If the return value is %G_IO_STATUS_NORMAL and the * channel is blocking, this will always be equal * to @count if @count >= 0. * * Returns: the status of the operation. * * Throws: GException on failure. */ public GIOStatus writeChars(string buf, out size_t bytesWritten) { GError* err = null; auto p = g_io_channel_write_chars(gIOChannel, Str.toStringz(buf), cast(ptrdiff_t)buf.length, &bytesWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Writes a Unicode character to @channel. * This function cannot be called on a channel with %NULL encoding. * * Params: * thechar = a character * * Returns: a #GIOStatus * * Throws: GException on failure. */ public GIOStatus writeUnichar(dchar thechar) { GError* err = null; auto p = g_io_channel_write_unichar(gIOChannel, thechar, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Converts an `errno` error number to a #GIOChannelError. * * Params: * en = an `errno` error number, e.g. `EINVAL` * * Returns: a #GIOChannelError error number, e.g. * %G_IO_CHANNEL_ERROR_INVAL. */ public static GIOChannelError errorFromErrno(int en) { return g_io_channel_error_from_errno(en); } /** */ public static GQuark errorQuark() { return g_io_channel_error_quark(); } /** * Adds the #GIOChannel into the default main loop context * with the default priority. * * Params: * channel = a #GIOChannel * condition = the condition to watch for * func = the function to call when the condition is satisfied * userData = user data to pass to @func * * Returns: the event source id */ public static uint ioAddWatch(IOChannel channel, GIOCondition condition, GIOFunc func, void* userData) { return g_io_add_watch((channel is null) ? null : channel.getIOChannelStruct(), condition, func, userData); } /** * Adds the #GIOChannel into the default main loop context * with the given priority. * * This internally creates a main loop source using g_io_create_watch() * and attaches it to the main loop context with g_source_attach(). * You can do these steps manually if you need greater control. * * Params: * channel = a #GIOChannel * priority = the priority of the #GIOChannel source * condition = the condition to watch for * func = the function to call when the condition is satisfied * userData = user data to pass to @func * notify = the function to call when the source is removed * * Returns: the event source id */ public static uint ioAddWatchFull(IOChannel channel, int priority, GIOCondition condition, GIOFunc func, void* userData, GDestroyNotify notify) { return g_io_add_watch_full((channel is null) ? null : channel.getIOChannelStruct(), priority, condition, func, userData, notify); } /** * Creates a #GSource that's dispatched when @condition is met for the * given @channel. For example, if condition is #G_IO_IN, the source will * be dispatched when there's data available for reading. * * g_io_add_watch() is a simpler interface to this same functionality, for * the case where you want to add the source to the default main loop context * at the default priority. * * On Windows, polling a #GSource created to watch a channel for a socket * puts the socket in non-blocking mode. This is a side-effect of the * implementation and unavoidable. * * Params: * channel = a #GIOChannel to watch * condition = conditions to watch for * * Returns: a new #GSource */ public static Source ioCreateWatch(IOChannel channel, GIOCondition condition) { auto p = g_io_create_watch((channel is null) ? null : channel.getIOChannelStruct(), condition); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } } GtkD-3.7.5/generated/gtkd/glib/Idle.d000066400000000000000000000145571324604450400172230ustar00rootroot00000000000000/* * 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 glib.Idle; private import glib.Source; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public class Idle { /** Holds all idle delegates */ bool delegate()[] idleListeners; /** our idle ID */ uint idleID; /** * Creates a new idle cycle. * Params: * interval = the idle in milieconds * dlg = the delegate to be executed * fireNow = When true the delegate will be executed emmidiatly */ this(bool delegate() dlg, bool fireNow=false) { idleListeners ~= dlg; idleID = g_idle_add(cast(GSourceFunc)&idleCallback, cast(void*)this); if ( fireNow ) { if ( !dlg() ) { idleListeners.length = 0; } } } /** * Creates a new idle cycle. * Params: * dlg = the delegate to be executed * priority = Priority for the idle function * fireNow = When true the delegate will be executed emmidiatly */ this(bool delegate() dlg, GPriority priority, bool fireNow=false) { idleListeners ~= dlg; idleID = g_idle_add_full(priority, cast(GSourceFunc)&idleCallback, cast(void*)this, null); if ( fireNow ) { if ( !dlg() ) { idleListeners.length = 0; } } } /** */ public void stop() { if ( idleID > 0 ) { g_source_remove(idleID); } idleListeners.length = 0; } /** * Removes the idle from gtk */ ~this() { stop(); } /** * Adds a new delegate to this idle cycle * Params: * dlg = * fireNow = */ public void addListener(bool delegate() dlg, bool fireNow=false) { idleListeners ~= dlg; if ( fireNow ) { if ( !dlg() ) { idleListeners.length = idleListeners.length - 1; } } } /** * The callback execution from glib * Params: * idle = * Returns: */ extern(C) static bool idleCallback(Idle idle) { return idle.callAllListeners(); } /** * Executes all delegates on the execution list * Returns: */ private bool callAllListeners() { bool runAgain = false; int i = 0; while ( i * // Notice that these are initialized to the empty list. * GList *string_list = NULL, *number_list = NULL; * * // This is a list of strings. * string_list = g_list_append (string_list, "first"); * string_list = g_list_append (string_list, "second"); * * // This is a list of integers. * number_list = g_list_append (number_list, GINT_TO_POINTER (27)); * number_list = g_list_append (number_list, GINT_TO_POINTER (14)); * ]| * * Params: * data = the data for the new element * * Returns: either @list or the new start of the #GList if @list was %NULL */ public ListG append(void* data) { auto p = g_list_append(gList, data); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Adds the second #GList onto the end of the first #GList. * Note that the elements of the second #GList are not copied. * They are used directly. * * This function is for example used to move an element in the list. * The following example moves an element to the top of the list: * |[ * list = g_list_remove_link (list, llink); * list = g_list_concat (llink, list); * ]| * * Params: * list2 = the #GList to add to the end of the first #GList, * this must point to the top of the list * * Returns: the start of the new #GList, which equals @list1 if not %NULL */ public ListG concat(ListG list2) { auto p = g_list_concat(gList, (list2 is null) ? null : list2.getListGStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Copies a #GList. * * Note that this is a "shallow" copy. If the list elements * consist of pointers to data, the pointers are copied but * the actual data is not. See g_list_copy_deep() if you need * to copy the data as well. * * Returns: the start of the new list that holds the same data as @list */ public ListG copy() { auto p = g_list_copy(gList); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Makes a full (deep) copy of a #GList. * * In contrast with g_list_copy(), this function uses @func to make * a copy of each list element, in addition to copying the list * container itself. * * @func, as a #GCopyFunc, takes two arguments, the data to be copied * and a @user_data pointer. It's safe to pass %NULL as user_data, * if the copy function takes only one argument. * * For instance, if @list holds a list of GObjects, you can do: * |[ * another_list = g_list_copy_deep (list, (GCopyFunc) g_object_ref, NULL); * ]| * * And, to entirely free the new list, you could do: * |[ * g_list_free_full (another_list, g_object_unref); * ]| * * Params: * func = a copy function used to copy every element in the list * userData = user data passed to the copy function @func, or %NULL * * Returns: the start of the new list that holds a full copy of @list, * use g_list_free_full() to free it * * Since: 2.34 */ public ListG copyDeep(GCopyFunc func, void* userData) { auto p = g_list_copy_deep(gList, func, userData); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Removes the node link_ from the list and frees it. * Compare this to g_list_remove_link() which removes the node * without freeing it. * * Params: * link = node to delete from @list * * Returns: the (possibly changed) start of the #GList */ public ListG deleteLink(ListG link) { auto p = g_list_delete_link(gList, (link is null) ? null : link.getListGStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Finds the element in a #GList which contains the given data. * * Params: * data = the element data to find * * Returns: the found #GList element, or %NULL if it is not found */ public ListG find(void* data) { auto p = g_list_find(gList, data); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Finds an element in a #GList, using a supplied function to * find the desired element. It iterates over the list, calling * the given function which should return 0 when the desired * element is found. The function takes two #gconstpointer arguments, * the #GList element's data as the first argument and the * given user data. * * Params: * data = user data passed to the function * func = the function to call for each element. * It should return 0 when the desired element is found * * Returns: the found #GList element, or %NULL if it is not found */ public ListG findCustom(void* data, GCompareFunc func) { auto p = g_list_find_custom(gList, data, func); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the first element in a #GList. * * Returns: the first element in the #GList, * or %NULL if the #GList has no elements */ public ListG first() { auto p = g_list_first(gList); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Calls a function for each element of a #GList. * * Params: * func = the function to call with each element's data * userData = user data to pass to the function */ public void foreac(GFunc func, void* userData) { g_list_foreach(gList, func, userData); } /** * Frees all of the memory used by a #GList. * The freed elements are returned to the slice allocator. * * If list elements contain dynamically-allocated memory, you should * either use g_list_free_full() or free them manually first. */ public void free() { g_list_free(gList); } /** * Frees one #GList element, but does not update links from the next and * previous elements in the list, so you should not call this function on an * element that is currently part of a list. * * It is usually used after g_list_remove_link(). */ public void free1() { g_list_free_1(gList); } /** * Convenience method, which frees all the memory used by a #GList, * and calls @free_func on every element's data. * * Params: * freeFunc = the function to be called to free each element's data * * Since: 2.28 */ public void freeFull(GDestroyNotify freeFunc) { g_list_free_full(gList, freeFunc); } /** * Gets the position of the element containing * the given data (starting from 0). * * Params: * data = the data to find * * Returns: the index of the element containing the data, * or -1 if the data is not found */ public int index(void* data) { return g_list_index(gList, data); } /** * Inserts a new element into the list at the given position. * * Params: * data = the data for the new element * position = the position to insert the element. If this is * negative, or is larger than the number of elements in the * list, the new element is added on to the end of the list. * * Returns: the (possibly changed) start of the #GList */ public ListG insert(void* data, int position) { auto p = g_list_insert(gList, data, position); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Inserts a new element into the list before the given position. * * Params: * sibling = the list element before which the new element * is inserted or %NULL to insert at the end of the list * data = the data for the new element * * Returns: the (possibly changed) start of the #GList */ public ListG insertBefore(ListG sibling, void* data) { auto p = g_list_insert_before(gList, (sibling is null) ? null : sibling.getListGStruct(), data); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Inserts a new element into the list, using the given comparison * function to determine its position. * * If you are adding many new elements to a list, and the number of * new elements is much larger than the length of the list, use * g_list_prepend() to add the new items and sort the list afterwards * with g_list_sort(). * * Params: * data = the data for the new element * func = the function to compare elements in the list. It should * return a number > 0 if the first parameter comes after the * second parameter in the sort order. * * Returns: the (possibly changed) start of the #GList */ public ListG insertSorted(void* data, GCompareFunc func) { auto p = g_list_insert_sorted(gList, data, func); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Inserts a new element into the list, using the given comparison * function to determine its position. * * If you are adding many new elements to a list, and the number of * new elements is much larger than the length of the list, use * g_list_prepend() to add the new items and sort the list afterwards * with g_list_sort(). * * Params: * data = the data for the new element * func = the function to compare elements in the list. It should * return a number > 0 if the first parameter comes after the * second parameter in the sort order. * userData = user data to pass to comparison function * * Returns: the (possibly changed) start of the #GList * * Since: 2.10 */ public ListG insertSortedWithData(void* data, GCompareDataFunc func, void* userData) { auto p = g_list_insert_sorted_with_data(gList, data, func, userData); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the last element in a #GList. * * Returns: the last element in the #GList, * or %NULL if the #GList has no elements */ public ListG last() { auto p = g_list_last(gList); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the number of elements in a #GList. * * This function iterates over the whole list to count its elements. * Use a #GQueue instead of a GList if you regularly need the number * of items. To check whether the list is non-empty, it is faster to check * @list against %NULL. * * Returns: the number of elements in the #GList */ public uint length() { return g_list_length(gList); } /** * Gets the element at the given position in a #GList. * * This iterates over the list until it reaches the @n-th position. If you * intend to iterate over every element, it is better to use a for-loop as * described in the #GList introduction. * * Params: * n = the position of the element, counting from 0 * * Returns: the element, or %NULL if the position is off * the end of the #GList */ public ListG nth(uint n) { auto p = g_list_nth(gList, n); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the data of the element at the given position. * * This iterates over the list until it reaches the @n-th position. If you * intend to iterate over every element, it is better to use a for-loop as * described in the #GList introduction. * * Params: * n = the position of the element * * Returns: the element's data, or %NULL if the position * is off the end of the #GList */ public void* nthData(uint n) { return g_list_nth_data(gList, n); } /** * Gets the element @n places before @list. * * Params: * n = the position of the element, counting from 0 * * Returns: the element, or %NULL if the position is * off the end of the #GList */ public ListG nthPrev(uint n) { auto p = g_list_nth_prev(gList, n); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Gets the position of the given element * in the #GList (starting from 0). * * Params: * llink = an element in the #GList * * Returns: the position of the element in the #GList, * or -1 if the element is not found */ public int position(ListG llink) { return g_list_position(gList, (llink is null) ? null : llink.getListGStruct()); } /** * Prepends a new element on to the start of the list. * * Note that the return value is the new start of the list, * which will have changed, so make sure you store the new value. * * |[ * // Notice that it is initialized to the empty list. * GList *list = NULL; * * list = g_list_prepend (list, "last"); * list = g_list_prepend (list, "first"); * ]| * * Do not use this function to prepend a new element to a different * element than the start of the list. Use g_list_insert_before() instead. * * Params: * data = the data for the new element * * Returns: a pointer to the newly prepended element, which is the new * start of the #GList */ public ListG prepend(void* data) { auto p = g_list_prepend(gList, data); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Removes an element from a #GList. * If two elements contain the same data, only the first is removed. * If none of the elements contain the data, the #GList is unchanged. * * Params: * data = the data of the element to remove * * Returns: the (possibly changed) start of the #GList */ public ListG remove(void* data) { auto p = g_list_remove(gList, data); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Removes all list nodes with data equal to @data. * Returns the new head of the list. Contrast with * g_list_remove() which removes only the first node * matching the given data. * * Params: * data = data to remove * * Returns: the (possibly changed) start of the #GList */ public ListG removeAll(void* data) { auto p = g_list_remove_all(gList, data); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Removes an element from a #GList, without freeing the element. * The removed element's prev and next links are set to %NULL, so * that it becomes a self-contained list with one element. * * This function is for example used to move an element in the list * (see the example for g_list_concat()) or to remove an element in * the list before freeing its data: * |[ * list = g_list_remove_link (list, llink); * free_some_data_that_may_access_the_list_again (llink->data); * g_list_free (llink); * ]| * * Params: * llink = an element in the #GList * * Returns: the (possibly changed) start of the #GList */ public ListG removeLink(ListG llink) { auto p = g_list_remove_link(gList, (llink is null) ? null : llink.getListGStruct()); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Reverses a #GList. * It simply switches the next and prev pointers of each element. * * Returns: the start of the reversed #GList */ public ListG reverse() { auto p = g_list_reverse(gList); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Sorts a #GList using the given comparison function. The algorithm * used is a stable sort. * * Params: * compareFunc = the comparison function used to sort the #GList. * This function is passed the data from 2 elements of the #GList * and should return 0 if they are equal, a negative value if the * first element comes before the second, or a positive value if * the first element comes after the second. * * Returns: the (possibly changed) start of the #GList */ public ListG sort(GCompareFunc compareFunc) { auto p = g_list_sort(gList, compareFunc); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Like g_list_sort(), but the comparison function accepts * a user data argument. * * Params: * compareFunc = comparison function * userData = user data to pass to comparison function * * Returns: the (possibly changed) start of the #GList */ public ListG sortWithData(GCompareDataFunc compareFunc, void* userData) { auto p = g_list_sort_with_data(gList, compareFunc, userData); if(p is null) { return null; } return new ListG(cast(GList*) p); } } GtkD-3.7.5/generated/gtkd/glib/ListSG.d000066400000000000000000000436261324604450400175120ustar00rootroot00000000000000/* * 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 glib.ListSG; private import glib.Str; private import glib.c.functions; public import glib.c.types; private import gobject.ObjectG; public import gtkc.glibtypes; /** * The #GSList struct is used for each element in the singly-linked * list. */ public class ListSG { /** the main Gtk struct */ protected GSList* gSList; protected bool ownedRef; /** Get the main Gtk struct */ public GSList* getListSGStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSList; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gSList; } /** * Sets our main struct and passes it to the parent class. */ public this (GSList* gSList, bool ownedRef = false) { this.gSList = gSList; this.ownedRef = ownedRef; } /** */ @property void* data() { return gSList.data; } /** * get the next element * Returns: the next element, or NULL if there are no more elements. */ @property ListSG next() { if ( gSList.next is null ) { return null; } return new ListSG(gSList.next); } /** * Turn the list into a D array of the desiered type. * Type T wraps should match the type of the data. */ public T[] toArray(T, TC = getCType!T)() if ( is(T == class) ) { T[] arr = new T[length()]; ListSG list = this; size_t count; while(list !is null && count < arr.length) { arr[count] = ObjectG.getDObject!(T)(cast(TC)list.data); list = list.next(); count++; } return arr; } /** Ditto */ public T[] toArray(T)() if ( is ( T == string ) ) { T[] arr = new T[length()]; ListSG list = this; size_t count; while(list !is null && count < arr.length) { arr[count] = Str.toString(cast(char*)list.data); list = list.next(); count++; } return arr; } private template getCType(T) { static if ( is(T == class) ) alias getCType = typeof(T.tupleof[0]); else alias getCType = void*; } unittest { import gobject.Value; auto list = new ListSG(null); list = list.append(new Value(0).getValueStruct()); list = list.append(new Value(1).getValueStruct()); auto arr = list.toArray!Value(); assert(arr[0].getInt() == 0); assert(arr[1].getInt() == 1); list = new ListSG(null); list = list.append(cast(void*)"test\0".ptr); list = list.append(cast(void*)"test2\0".ptr); assert(["test", "test2"] == list.toArray!string()); } /** */ /** * Allocates space for one #GSList element. It is called by the * g_slist_append(), g_slist_prepend(), g_slist_insert() and * g_slist_insert_sorted() functions and so is rarely used on its own. * * Returns: a pointer to the newly-allocated #GSList element. */ public static ListSG alloc() { auto p = g_slist_alloc(); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Adds a new element on to the end of the list. * * The return value is the new start of the list, which may * have changed, so make sure you store the new value. * * Note that g_slist_append() has to traverse the entire list * to find the end, which is inefficient when adding multiple * elements. A common idiom to avoid the inefficiency is to prepend * the elements and reverse the list when all elements have been added. * * |[ * // Notice that these are initialized to the empty list. * GSList *list = NULL, *number_list = NULL; * * // This is a list of strings. * list = g_slist_append (list, "first"); * list = g_slist_append (list, "second"); * * // This is a list of integers. * number_list = g_slist_append (number_list, GINT_TO_POINTER (27)); * number_list = g_slist_append (number_list, GINT_TO_POINTER (14)); * ]| * * Params: * data = the data for the new element * * Returns: the new start of the #GSList */ public ListSG append(void* data) { auto p = g_slist_append(gSList, data); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Adds the second #GSList onto the end of the first #GSList. * Note that the elements of the second #GSList are not copied. * They are used directly. * * Params: * list2 = the #GSList to add to the end of the first #GSList * * Returns: the start of the new #GSList */ public ListSG concat(ListSG list2) { auto p = g_slist_concat(gSList, (list2 is null) ? null : list2.getListSGStruct()); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Copies a #GSList. * * Note that this is a "shallow" copy. If the list elements * consist of pointers to data, the pointers are copied but * the actual data isn't. See g_slist_copy_deep() if you need * to copy the data as well. * * Returns: a copy of @list */ public ListSG copy() { auto p = g_slist_copy(gSList); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Makes a full (deep) copy of a #GSList. * * In contrast with g_slist_copy(), this function uses @func to make a copy of * each list element, in addition to copying the list container itself. * * @func, as a #GCopyFunc, takes two arguments, the data to be copied and a user * pointer. It's safe to pass #NULL as user_data, if the copy function takes only * one argument. * * For instance, if @list holds a list of GObjects, you can do: * |[ * another_list = g_slist_copy_deep (list, (GCopyFunc) g_object_ref, NULL); * ]| * * And, to entirely free the new list, you could do: * |[ * g_slist_free_full (another_list, g_object_unref); * ]| * * Params: * func = a copy function used to copy every element in the list * userData = user data passed to the copy function @func, or #NULL * * Returns: a full copy of @list, use #g_slist_free_full to free it * * Since: 2.34 */ public ListSG copyDeep(GCopyFunc func, void* userData) { auto p = g_slist_copy_deep(gSList, func, userData); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Removes the node link_ from the list and frees it. * Compare this to g_slist_remove_link() which removes the node * without freeing it. * * Removing arbitrary nodes from a singly-linked list requires time * that is proportional to the length of the list (ie. O(n)). If you * find yourself using g_slist_delete_link() frequently, you should * consider a different data structure, such as the doubly-linked * #GList. * * Params: * link = node to delete * * Returns: the new head of @list */ public ListSG deleteLink(ListSG link) { auto p = g_slist_delete_link(gSList, (link is null) ? null : link.getListSGStruct()); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Finds the element in a #GSList which * contains the given data. * * Params: * data = the element data to find * * Returns: the found #GSList element, * or %NULL if it is not found */ public ListSG find(void* data) { auto p = g_slist_find(gSList, data); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Finds an element in a #GSList, using a supplied function to * find the desired element. It iterates over the list, calling * the given function which should return 0 when the desired * element is found. The function takes two #gconstpointer arguments, * the #GSList element's data as the first argument and the * given user data. * * Params: * data = user data passed to the function * func = the function to call for each element. * It should return 0 when the desired element is found * * Returns: the found #GSList element, or %NULL if it is not found */ public ListSG findCustom(void* data, GCompareFunc func) { auto p = g_slist_find_custom(gSList, data, func); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Calls a function for each element of a #GSList. * * Params: * func = the function to call with each element's data * userData = user data to pass to the function */ public void foreac(GFunc func, void* userData) { g_slist_foreach(gSList, func, userData); } /** * Frees all of the memory used by a #GSList. * The freed elements are returned to the slice allocator. * * If list elements contain dynamically-allocated memory, * you should either use g_slist_free_full() or free them manually * first. */ public void free() { g_slist_free(gSList); } /** * Frees one #GSList element. * It is usually used after g_slist_remove_link(). */ public void free1() { g_slist_free_1(gSList); } /** * Convenience method, which frees all the memory used by a #GSList, and * calls the specified destroy function on every element's data. * * Params: * freeFunc = the function to be called to free each element's data * * Since: 2.28 */ public void freeFull(GDestroyNotify freeFunc) { g_slist_free_full(gSList, freeFunc); } /** * Gets the position of the element containing * the given data (starting from 0). * * Params: * data = the data to find * * Returns: the index of the element containing the data, * or -1 if the data is not found */ public int index(void* data) { return g_slist_index(gSList, data); } /** * Inserts a new element into the list at the given position. * * Params: * data = the data for the new element * position = the position to insert the element. * If this is negative, or is larger than the number * of elements in the list, the new element is added on * to the end of the list. * * Returns: the new start of the #GSList */ public ListSG insert(void* data, int position) { auto p = g_slist_insert(gSList, data, position); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Inserts a node before @sibling containing @data. * * Params: * sibling = node to insert @data before * data = data to put in the newly-inserted node * * Returns: the new head of the list. */ public ListSG insertBefore(ListSG sibling, void* data) { auto p = g_slist_insert_before(gSList, (sibling is null) ? null : sibling.getListSGStruct(), data); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Inserts a new element into the list, using the given * comparison function to determine its position. * * Params: * data = the data for the new element * func = the function to compare elements in the list. * It should return a number > 0 if the first parameter * comes after the second parameter in the sort order. * * Returns: the new start of the #GSList */ public ListSG insertSorted(void* data, GCompareFunc func) { auto p = g_slist_insert_sorted(gSList, data, func); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Inserts a new element into the list, using the given * comparison function to determine its position. * * Params: * data = the data for the new element * func = the function to compare elements in the list. * It should return a number > 0 if the first parameter * comes after the second parameter in the sort order. * userData = data to pass to comparison function * * Returns: the new start of the #GSList * * Since: 2.10 */ public ListSG insertSortedWithData(void* data, GCompareDataFunc func, void* userData) { auto p = g_slist_insert_sorted_with_data(gSList, data, func, userData); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Gets the last element in a #GSList. * * This function iterates over the whole list. * * Returns: the last element in the #GSList, * or %NULL if the #GSList has no elements */ public ListSG last() { auto p = g_slist_last(gSList); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Gets the number of elements in a #GSList. * * This function iterates over the whole list to * count its elements. To check whether the list is non-empty, it is faster to * check @list against %NULL. * * Returns: the number of elements in the #GSList */ public uint length() { return g_slist_length(gSList); } /** * Gets the element at the given position in a #GSList. * * Params: * n = the position of the element, counting from 0 * * Returns: the element, or %NULL if the position is off * the end of the #GSList */ public ListSG nth(uint n) { auto p = g_slist_nth(gSList, n); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Gets the data of the element at the given position. * * Params: * n = the position of the element * * Returns: the element's data, or %NULL if the position * is off the end of the #GSList */ public void* nthData(uint n) { return g_slist_nth_data(gSList, n); } /** * Gets the position of the given element * in the #GSList (starting from 0). * * Params: * llink = an element in the #GSList * * Returns: the position of the element in the #GSList, * or -1 if the element is not found */ public int position(ListSG llink) { return g_slist_position(gSList, (llink is null) ? null : llink.getListSGStruct()); } /** * Adds a new element on to the start of the list. * * The return value is the new start of the list, which * may have changed, so make sure you store the new value. * * |[ * // Notice that it is initialized to the empty list. * GSList *list = NULL; * list = g_slist_prepend (list, "last"); * list = g_slist_prepend (list, "first"); * ]| * * Params: * data = the data for the new element * * Returns: the new start of the #GSList */ public ListSG prepend(void* data) { auto p = g_slist_prepend(gSList, data); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Removes an element from a #GSList. * If two elements contain the same data, only the first is removed. * If none of the elements contain the data, the #GSList is unchanged. * * Params: * data = the data of the element to remove * * Returns: the new start of the #GSList */ public ListSG remove(void* data) { auto p = g_slist_remove(gSList, data); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Removes all list nodes with data equal to @data. * Returns the new head of the list. Contrast with * g_slist_remove() which removes only the first node * matching the given data. * * Params: * data = data to remove * * Returns: new head of @list */ public ListSG removeAll(void* data) { auto p = g_slist_remove_all(gSList, data); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Removes an element from a #GSList, without * freeing the element. The removed element's next * link is set to %NULL, so that it becomes a * self-contained list with one element. * * Removing arbitrary nodes from a singly-linked list * requires time that is proportional to the length of the list * (ie. O(n)). If you find yourself using g_slist_remove_link() * frequently, you should consider a different data structure, * such as the doubly-linked #GList. * * Params: * link = an element in the #GSList * * Returns: the new start of the #GSList, without the element */ public ListSG removeLink(ListSG link) { auto p = g_slist_remove_link(gSList, (link is null) ? null : link.getListSGStruct()); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Reverses a #GSList. * * Returns: the start of the reversed #GSList */ public ListSG reverse() { auto p = g_slist_reverse(gSList); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Sorts a #GSList using the given comparison function. * * Params: * compareFunc = the comparison function used to sort the #GSList. * This function is passed the data from 2 elements of the #GSList * and should return 0 if they are equal, a negative value if the * first element comes before the second, or a positive value if * the first element comes after the second. * * Returns: the start of the sorted #GSList */ public ListSG sort(GCompareFunc compareFunc) { auto p = g_slist_sort(gSList, compareFunc); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Like g_slist_sort(), but the sort function accepts a user data argument. * * Params: * compareFunc = comparison function * userData = data to pass to comparison function * * Returns: new head of the list */ public ListSG sortWithData(GCompareDataFunc compareFunc, void* userData) { auto p = g_slist_sort_with_data(gSList, compareFunc, userData); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } } GtkD-3.7.5/generated/gtkd/glib/MainContext.d000066400000000000000000000473171324604450400205770ustar00rootroot00000000000000/* * 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 glib.MainContext; private import glib.Cond; private import glib.ConstructionException; private import glib.Mutex; private import glib.Source; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The `GMainContext` struct is an opaque data * type representing a set of sources to be handled in a main loop. */ public class MainContext { /** the main Gtk struct */ protected GMainContext* gMainContext; protected bool ownedRef; /** Get the main Gtk struct */ public GMainContext* getMainContextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMainContext; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gMainContext; } /** * Sets our main struct and passes it to the parent class. */ public this (GMainContext* gMainContext, bool ownedRef = false) { this.gMainContext = gMainContext; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_main_context_unref(gMainContext); } /** * Creates a new #GMainContext structure. * * Returns: the new #GMainContext * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_main_context_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GMainContext*) p); } /** * Tries to become the owner of the specified context. * If some other thread is the owner of the context, * returns %FALSE immediately. Ownership is properly * recursive: the owner can require ownership again * and will release ownership when g_main_context_release() * is called as many times as g_main_context_acquire(). * * You must be the owner of a context before you * can call g_main_context_prepare(), g_main_context_query(), * g_main_context_check(), g_main_context_dispatch(). * * Returns: %TRUE if the operation succeeded, and * this thread is now the owner of @context. */ public bool acquire() { return g_main_context_acquire(gMainContext) != 0; } /** * Adds a file descriptor to the set of file descriptors polled for * this context. This will very seldom be used directly. Instead * a typical event source will use g_source_add_unix_fd() instead. * * Params: * fd = a #GPollFD structure holding information about a file * descriptor to watch. * priority = the priority for this file descriptor which should be * the same as the priority used for g_source_attach() to ensure that the * file descriptor is polled whenever the results may be needed. */ public void addPoll(GPollFD* fd, int priority) { g_main_context_add_poll(gMainContext, fd, priority); } /** * Passes the results of polling back to the main loop. * * You must have successfully acquired the context with * g_main_context_acquire() before you may call this function. * * Params: * maxPriority = the maximum numerical priority of sources to check * fds = array of #GPollFD's that was passed to * the last call to g_main_context_query() * * Returns: %TRUE if some sources are ready to be dispatched. */ public bool check(int maxPriority, GPollFD[] fds) { return g_main_context_check(gMainContext, maxPriority, fds.ptr, cast(int)fds.length) != 0; } /** * Dispatches all pending sources. * * You must have successfully acquired the context with * g_main_context_acquire() before you may call this function. */ public void dispatch() { g_main_context_dispatch(gMainContext); } /** * Finds a source with the given source functions and user data. If * multiple sources exist with the same source function and user data, * the first one found will be returned. * * Params: * funcs = the @source_funcs passed to g_source_new(). * userData = the user data from the callback. * * Returns: the source, if one was found, otherwise %NULL */ public Source findSourceByFuncsUserData(GSourceFuncs* funcs, void* userData) { auto p = g_main_context_find_source_by_funcs_user_data(gMainContext, funcs, userData); if(p is null) { return null; } return new Source(cast(GSource*) p); } /** * Finds a #GSource given a pair of context and ID. * * It is a programmer error to attempt to lookup a non-existent source. * * More specifically: source IDs can be reissued after a source has been * destroyed and therefore it is never valid to use this function with a * source ID which may have already been removed. An example is when * scheduling an idle to run in another thread with g_idle_add(): the * idle may already have run and been removed by the time this function * is called on its (now invalid) source ID. This source ID may have * been reissued, leading to the operation being performed against the * wrong source. * * Params: * sourceId = the source ID, as returned by g_source_get_id(). * * Returns: the #GSource */ public Source findSourceById(uint sourceId) { auto p = g_main_context_find_source_by_id(gMainContext, sourceId); if(p is null) { return null; } return new Source(cast(GSource*) p); } /** * Finds a source with the given user data for the callback. If * multiple sources exist with the same user data, the first * one found will be returned. * * Params: * userData = the user_data for the callback. * * Returns: the source, if one was found, otherwise %NULL */ public Source findSourceByUserData(void* userData) { auto p = g_main_context_find_source_by_user_data(gMainContext, userData); if(p is null) { return null; } return new Source(cast(GSource*) p); } /** * Gets the poll function set by g_main_context_set_poll_func(). * * Returns: the poll function */ public GPollFunc getPollFunc() { return g_main_context_get_poll_func(gMainContext); } /** * Invokes a function in such a way that @context is owned during the * invocation of @function. * * If @context is %NULL then the global default main context — as * returned by g_main_context_default() — is used. * * If @context is owned by the current thread, @function is called * directly. Otherwise, if @context is the thread-default main context * of the current thread and g_main_context_acquire() succeeds, then * @function is called and g_main_context_release() is called * afterwards. * * In any other case, an idle source is created to call @function and * that source is attached to @context (presumably to be run in another * thread). The idle source is attached with #G_PRIORITY_DEFAULT * priority. If you want a different priority, use * g_main_context_invoke_full(). * * Note that, as with normal idle functions, @function should probably * return %FALSE. If it returns %TRUE, it will be continuously run in a * loop (and may prevent this call from returning). * * Params: * funct = function to call * data = data to pass to @function * * Since: 2.28 */ public void invoke(GSourceFunc funct, void* data) { g_main_context_invoke(gMainContext, funct, data); } /** * Invokes a function in such a way that @context is owned during the * invocation of @function. * * This function is the same as g_main_context_invoke() except that it * lets you specify the priority incase @function ends up being * scheduled as an idle and also lets you give a #GDestroyNotify for @data. * * @notify should not assume that it is called from any particular * thread or with any particular context acquired. * * Params: * priority = the priority at which to run @function * funct = function to call * data = data to pass to @function * notify = a function to call when @data is no longer in use, or %NULL. * * Since: 2.28 */ public void invokeFull(int priority, GSourceFunc funct, void* data, GDestroyNotify notify) { g_main_context_invoke_full(gMainContext, priority, funct, data, notify); } /** * Determines whether this thread holds the (recursive) * ownership of this #GMainContext. This is useful to * know before waiting on another thread that may be * blocking to get ownership of @context. * * Returns: %TRUE if current thread is owner of @context. * * Since: 2.10 */ public bool isOwner() { return g_main_context_is_owner(gMainContext) != 0; } /** * Runs a single iteration for the given main loop. This involves * checking to see if any event sources are ready to be processed, * then if no events sources are ready and @may_block is %TRUE, waiting * for a source to become ready, then dispatching the highest priority * events sources that are ready. Otherwise, if @may_block is %FALSE * sources are not waited to become ready, only those highest priority * events sources will be dispatched (if any), that are ready at this * given moment without further waiting. * * Note that even when @may_block is %TRUE, it is still possible for * g_main_context_iteration() to return %FALSE, since the wait may * be interrupted for other reasons than an event source becoming ready. * * Params: * mayBlock = whether the call may block. * * Returns: %TRUE if events were dispatched. */ public bool iteration(bool mayBlock) { return g_main_context_iteration(gMainContext, mayBlock) != 0; } /** * Checks if any sources have pending events for the given context. * * Returns: %TRUE if events are pending. */ public bool pending() { return g_main_context_pending(gMainContext) != 0; } /** * Pops @context off the thread-default context stack (verifying that * it was on the top of the stack). * * Since: 2.22 */ public void popThreadDefault() { g_main_context_pop_thread_default(gMainContext); } /** * Prepares to poll sources within a main loop. The resulting information * for polling is determined by calling g_main_context_query (). * * You must have successfully acquired the context with * g_main_context_acquire() before you may call this function. * * Params: * priority = location to store priority of highest priority * source already ready. * * Returns: %TRUE if some source is ready to be dispatched * prior to polling. */ public bool prepare(int* priority) { return g_main_context_prepare(gMainContext, priority) != 0; } /** * Acquires @context and sets it as the thread-default context for the * current thread. This will cause certain asynchronous operations * (such as most [gio][gio]-based I/O) which are * started in this thread to run under @context and deliver their * results to its main loop, rather than running under the global * default context in the main thread. Note that calling this function * changes the context returned by g_main_context_get_thread_default(), * not the one returned by g_main_context_default(), so it does not affect * the context used by functions like g_idle_add(). * * Normally you would call this function shortly after creating a new * thread, passing it a #GMainContext which will be run by a * #GMainLoop in that thread, to set a new default context for all * async operations in that thread. In this case you may not need to * ever call g_main_context_pop_thread_default(), assuming you want the * new #GMainContext to be the default for the whole lifecycle of the * thread. * * If you don't have control over how the new thread was created (e.g. * in the new thread isn't newly created, or if the thread life * cycle is managed by a #GThreadPool), it is always suggested to wrap * the logic that needs to use the new #GMainContext inside a * g_main_context_push_thread_default() / g_main_context_pop_thread_default() * pair, otherwise threads that are re-used will end up never explicitly * releasing the #GMainContext reference they hold. * * In some cases you may want to schedule a single operation in a * non-default context, or temporarily use a non-default context in * the main thread. In that case, you can wrap the call to the * asynchronous operation inside a * g_main_context_push_thread_default() / * g_main_context_pop_thread_default() pair, but it is up to you to * ensure that no other asynchronous operations accidentally get * started while the non-default context is active. * * Beware that libraries that predate this function may not correctly * handle being used from a thread with a thread-default context. Eg, * see g_file_supports_thread_contexts(). * * Since: 2.22 */ public void pushThreadDefault() { g_main_context_push_thread_default(gMainContext); } /** * Determines information necessary to poll this main loop. * * You must have successfully acquired the context with * g_main_context_acquire() before you may call this function. * * Params: * maxPriority = maximum priority source to check * timeout = location to store timeout to be used in polling * fds = location to * store #GPollFD records that need to be polled. * * Returns: the number of records actually stored in @fds, * or, if more than @n_fds records need to be stored, the number * of records that need to be stored. */ public int query(int maxPriority, out int timeout, GPollFD[] fds) { return g_main_context_query(gMainContext, maxPriority, &timeout, fds.ptr, cast(int)fds.length); } /** * Increases the reference count on a #GMainContext object by one. * * Returns: the @context that was passed in (since 2.6) */ public MainContext doref() { auto p = g_main_context_ref(gMainContext); if(p is null) { return null; } return new MainContext(cast(GMainContext*) p, true); } /** * Releases ownership of a context previously acquired by this thread * with g_main_context_acquire(). If the context was acquired multiple * times, the ownership will be released only when g_main_context_release() * is called as many times as it was acquired. */ public void release() { g_main_context_release(gMainContext); } /** * Removes file descriptor from the set of file descriptors to be * polled for a particular context. * * Params: * fd = a #GPollFD descriptor previously added with g_main_context_add_poll() */ public void removePoll(GPollFD* fd) { g_main_context_remove_poll(gMainContext, fd); } /** * Sets the function to use to handle polling of file descriptors. It * will be used instead of the poll() system call * (or GLib's replacement function, which is used where * poll() isn't available). * * This function could possibly be used to integrate the GLib event * loop with an external event loop. * * Params: * func = the function to call to poll all file descriptors */ public void setPollFunc(GPollFunc func) { g_main_context_set_poll_func(gMainContext, func); } /** * Decreases the reference count on a #GMainContext object by one. If * the result is zero, free the context and free all associated memory. */ public void unref() { g_main_context_unref(gMainContext); } /** * Tries to become the owner of the specified context, * as with g_main_context_acquire(). But if another thread * is the owner, atomically drop @mutex and wait on @cond until * that owner releases ownership or until @cond is signaled, then * try again (once) to become the owner. * * Params: * cond = a condition variable * mutex = a mutex, currently held * * Returns: %TRUE if the operation succeeded, and * this thread is now the owner of @context. */ public bool wait(Cond cond, Mutex mutex) { return g_main_context_wait(gMainContext, (cond is null) ? null : cond.getCondStruct(), (mutex is null) ? null : mutex.getMutexStruct()) != 0; } /** * If @context is currently blocking in g_main_context_iteration() * waiting for a source to become ready, cause it to stop blocking * and return. Otherwise, cause the next invocation of * g_main_context_iteration() to return without blocking. * * This API is useful for low-level control over #GMainContext; for * example, integrating it with main loop implementations such as * #GMainLoop. * * Another related use for this function is when implementing a main * loop with a termination condition, computed from multiple threads: * * |[ * #define NUM_TASKS 10 * static volatile gint tasks_remaining = NUM_TASKS; * ... * * while (g_atomic_int_get (&tasks_remaining) != 0) * g_main_context_iteration (NULL, TRUE); * ]| * * Then in a thread: * |[ * perform_work(); * * if (g_atomic_int_dec_and_test (&tasks_remaining)) * g_main_context_wakeup (NULL); * ]| */ public void wakeup() { g_main_context_wakeup(gMainContext); } /** * Returns the global default main context. This is the main context * used for main loop functions when a main loop is not explicitly * specified, and corresponds to the "main" main loop. See also * g_main_context_get_thread_default(). * * Returns: the global default main context. */ public static MainContext defaulx() { auto p = g_main_context_default(); if(p is null) { return null; } return new MainContext(cast(GMainContext*) p); } /** * Gets the thread-default #GMainContext for this thread. Asynchronous * operations that want to be able to be run in contexts other than * the default one should call this method or * g_main_context_ref_thread_default() to get a #GMainContext to add * their #GSources to. (Note that even in single-threaded * programs applications may sometimes want to temporarily push a * non-default context, so it is not safe to assume that this will * always return %NULL if you are running in the default thread.) * * If you need to hold a reference on the context, use * g_main_context_ref_thread_default() instead. * * Returns: the thread-default #GMainContext, or * %NULL if the thread-default context is the global default context. * * Since: 2.22 */ public static MainContext getThreadDefault() { auto p = g_main_context_get_thread_default(); if(p is null) { return null; } return new MainContext(cast(GMainContext*) p); } /** * Gets the thread-default #GMainContext for this thread, as with * g_main_context_get_thread_default(), but also adds a reference to * it with g_main_context_ref(). In addition, unlike * g_main_context_get_thread_default(), if the thread-default context * is the global default context, this will return that #GMainContext * (with a ref added to it) rather than returning %NULL. * * Returns: the thread-default #GMainContext. Unref * with g_main_context_unref() when you are done with it. * * Since: 2.32 */ public static MainContext refThreadDefault() { auto p = g_main_context_ref_thread_default(); if(p is null) { return null; } return new MainContext(cast(GMainContext*) p, true); } } GtkD-3.7.5/generated/gtkd/glib/MainLoop.d000066400000000000000000000222751324604450400200600ustar00rootroot00000000000000/* * 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 glib.MainLoop; private import glib.ConstructionException; private import glib.MainContext; private import glib.Source; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The `GMainLoop` struct is an opaque data type * representing the main event loop of a GLib or GTK+ application. */ public class MainLoop { /** the main Gtk struct */ protected GMainLoop* gMainLoop; protected bool ownedRef; /** Get the main Gtk struct */ public GMainLoop* getMainLoopStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMainLoop; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gMainLoop; } /** * Sets our main struct and passes it to the parent class. */ public this (GMainLoop* gMainLoop, bool ownedRef = false) { this.gMainLoop = gMainLoop; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_main_loop_unref(gMainLoop); } /** * Creates a new #GMainLoop structure. * * Params: * context = a #GMainContext (if %NULL, the default context will be used). * isRunning = set to %TRUE to indicate that the loop is running. This * is not very important since calling g_main_loop_run() will set this to * %TRUE anyway. * * Returns: a new #GMainLoop. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(MainContext context, bool isRunning) { auto p = g_main_loop_new((context is null) ? null : context.getMainContextStruct(), isRunning); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GMainLoop*) p); } /** * Returns the #GMainContext of @loop. * * Returns: the #GMainContext of @loop */ public MainContext getContext() { auto p = g_main_loop_get_context(gMainLoop); if(p is null) { return null; } return new MainContext(cast(GMainContext*) p); } /** * Checks to see if the main loop is currently being run via g_main_loop_run(). * * Returns: %TRUE if the mainloop is currently being run. */ public bool isRunning() { return g_main_loop_is_running(gMainLoop) != 0; } /** * Stops a #GMainLoop from running. Any calls to g_main_loop_run() * for the loop will return. * * Note that sources that have already been dispatched when * g_main_loop_quit() is called will still be executed. */ public void quit() { g_main_loop_quit(gMainLoop); } /** * Increases the reference count on a #GMainLoop object by one. * * Returns: @loop */ public MainLoop doref() { auto p = g_main_loop_ref(gMainLoop); if(p is null) { return null; } return new MainLoop(cast(GMainLoop*) p, true); } /** * Runs a main loop until g_main_loop_quit() is called on the loop. * If this is called for the thread of the loop's #GMainContext, * it will process events from the loop, otherwise it will * simply wait. */ public void run() { g_main_loop_run(gMainLoop); } /** * Decreases the reference count on a #GMainLoop object by one. If * the result is zero, free the loop and free all associated memory. */ public void unref() { g_main_loop_unref(gMainLoop); } /** * Returns the currently firing source for this thread. * * Returns: The currently firing source or %NULL. * * Since: 2.12 */ public static Source mainCurrentSource() { auto p = g_main_current_source(); if(p is null) { return null; } return new Source(cast(GSource*) p); } /** * Returns the depth of the stack of calls to * g_main_context_dispatch() on any #GMainContext in the current thread. * That is, when called from the toplevel, it gives 0. When * called from within a callback from g_main_context_iteration() * (or g_main_loop_run(), etc.) it returns 1. When called from within * a callback to a recursive call to g_main_context_iteration(), * it returns 2. And so forth. * * This function is useful in a situation like the following: * Imagine an extremely simple "garbage collected" system. * * |[ * static GList *free_list; * * gpointer * allocate_memory (gsize size) * { * gpointer result = g_malloc (size); * free_list = g_list_prepend (free_list, result); * return result; * } * * void * free_allocated_memory (void) * { * GList *l; * for (l = free_list; l; l = l->next); * g_free (l->data); * g_list_free (free_list); * free_list = NULL; * } * * [...] * * while (TRUE); * { * g_main_context_iteration (NULL, TRUE); * free_allocated_memory(); * } * ]| * * This works from an application, however, if you want to do the same * thing from a library, it gets more difficult, since you no longer * control the main loop. You might think you can simply use an idle * function to make the call to free_allocated_memory(), but that * doesn't work, since the idle function could be called from a * recursive callback. This can be fixed by using g_main_depth() * * |[ * gpointer * allocate_memory (gsize size) * { * FreeListBlock *block = g_new (FreeListBlock, 1); * block->mem = g_malloc (size); * block->depth = g_main_depth (); * free_list = g_list_prepend (free_list, block); * return block->mem; * } * * void * free_allocated_memory (void) * { * GList *l; * * int depth = g_main_depth (); * for (l = free_list; l; ); * { * GList *next = l->next; * FreeListBlock *block = l->data; * if (block->depth > depth) * { * g_free (block->mem); * g_free (block); * free_list = g_list_delete_link (free_list, l); * } * * l = next; * } * } * ]| * * There is a temptation to use g_main_depth() to solve * problems with reentrancy. For instance, while waiting for data * to be received from the network in response to a menu item, * the menu item might be selected again. It might seem that * one could make the menu item's callback return immediately * and do nothing if g_main_depth() returns a value greater than 1. * However, this should be avoided since the user then sees selecting * the menu item do nothing. Furthermore, you'll find yourself adding * these checks all over your code, since there are doubtless many, * many things that the user could do. Instead, you can use the * following techniques: * * 1. Use gtk_widget_set_sensitive() or modal dialogs to prevent * the user from interacting with elements while the main * loop is recursing. * * 2. Avoid main loop recursion in situations where you can't handle * arbitrary callbacks. Instead, structure your code so that you * simply return to the main loop and then get called again when * there is more work to do. * * Returns: The main loop recursion level in the current thread */ public static int mainDepth() { return g_main_depth(); } /** * Polls @fds, as with the poll() system call, but portably. (On * systems that don't have poll(), it is emulated using select().) * This is used internally by #GMainContext, but it can be called * directly if you need to block until a file descriptor is ready, but * don't want to run the full main loop. * * Each element of @fds is a #GPollFD describing a single file * descriptor to poll. The %fd field indicates the file descriptor, * and the %events field indicates the events to poll for. On return, * the %revents fields will be filled with the events that actually * occurred. * * On POSIX systems, the file descriptors in @fds can be any sort of * file descriptor, but the situation is much more complicated on * Windows. If you need to use g_poll() in code that has to run on * Windows, the easiest solution is to construct all of your * #GPollFDs with g_io_channel_win32_make_pollfd(). * * Params: * fds = file descriptors to poll * nfds = the number of file descriptors in @fds * timeout = amount of time to wait, in milliseconds, or -1 to wait forever * * Returns: the number of entries in @fds whose %revents fields * were filled in, or 0 if the operation timed out, or -1 on error or * if the call was interrupted. * * Since: 2.20 */ public static int poll(GPollFD* fds, uint nfds, int timeout) { return g_poll(fds, nfds, timeout); } } GtkD-3.7.5/generated/gtkd/glib/MappedFile.d000066400000000000000000000160321324604450400203420ustar00rootroot00000000000000/* * 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 glib.MappedFile; private import glib.Bytes; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The #GMappedFile represents a file mapping created with * g_mapped_file_new(). It has only private members and should * not be accessed directly. */ public class MappedFile { /** the main Gtk struct */ protected GMappedFile* gMappedFile; protected bool ownedRef; /** Get the main Gtk struct */ public GMappedFile* getMappedFileStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMappedFile; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gMappedFile; } /** * Sets our main struct and passes it to the parent class. */ public this (GMappedFile* gMappedFile, bool ownedRef = false) { this.gMappedFile = gMappedFile; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_mapped_file_unref(gMappedFile); } /** * Maps a file into memory. On UNIX, this is using the mmap() function. * * If @writable is %TRUE, the mapped buffer may be modified, otherwise * it is an error to modify the mapped buffer. Modifications to the buffer * are not visible to other processes mapping the same file, and are not * written back to the file. * * Note that modifications of the underlying file might affect the contents * of the #GMappedFile. Therefore, mapping should only be used if the file * will not be modified, or if all modifications of the file are done * atomically (e.g. using g_file_set_contents()). * * If @filename is the name of an empty, regular file, the function * will successfully return an empty #GMappedFile. In other cases of * size 0 (e.g. device files such as /dev/null), @error will be set * to the #GFileError value #G_FILE_ERROR_INVAL. * * Params: * filename = The path of the file to load, in the GLib * filename encoding * writable = whether the mapping should be writable * * Returns: a newly allocated #GMappedFile which must be unref'd * with g_mapped_file_unref(), or %NULL if the mapping failed. * * Since: 2.8 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string filename, bool writable) { GError* err = null; auto p = g_mapped_file_new(Str.toStringz(filename), writable, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GMappedFile*) p); } /** * Maps a file into memory. On UNIX, this is using the mmap() function. * * If @writable is %TRUE, the mapped buffer may be modified, otherwise * it is an error to modify the mapped buffer. Modifications to the buffer * are not visible to other processes mapping the same file, and are not * written back to the file. * * Note that modifications of the underlying file might affect the contents * of the #GMappedFile. Therefore, mapping should only be used if the file * will not be modified, or if all modifications of the file are done * atomically (e.g. using g_file_set_contents()). * * Params: * fd = The file descriptor of the file to load * writable = whether the mapping should be writable * * Returns: a newly allocated #GMappedFile which must be unref'd * with g_mapped_file_unref(), or %NULL if the mapping failed. * * Since: 2.32 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(int fd, bool writable) { GError* err = null; auto p = g_mapped_file_new_from_fd(fd, writable, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new_from_fd"); } this(cast(GMappedFile*) p); } /** * This call existed before #GMappedFile had refcounting and is currently * exactly the same as g_mapped_file_unref(). * * Deprecated: Use g_mapped_file_unref() instead. * * Since: 2.8 */ public void free() { g_mapped_file_free(gMappedFile); ownedRef = false; } /** * Creates a new #GBytes which references the data mapped from @file. * The mapped contents of the file must not be modified after creating this * bytes object, because a #GBytes should be immutable. * * Returns: A newly allocated #GBytes referencing data * from @file * * Since: 2.34 */ public Bytes getBytes() { auto p = g_mapped_file_get_bytes(gMappedFile); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Returns the contents of a #GMappedFile. * * Note that the contents may not be zero-terminated, * even if the #GMappedFile is backed by a text file. * * If the file is empty then %NULL is returned. * * Returns: the contents of @file, or %NULL. * * Since: 2.8 */ public string getContents() { auto retStr = g_mapped_file_get_contents(gMappedFile); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns the length of the contents of a #GMappedFile. * * Returns: the length of the contents of @file. * * Since: 2.8 */ public size_t getLength() { return g_mapped_file_get_length(gMappedFile); } /** * Increments the reference count of @file by one. It is safe to call * this function from any thread. * * Returns: the passed in #GMappedFile. * * Since: 2.22 */ public MappedFile doref() { auto p = g_mapped_file_ref(gMappedFile); if(p is null) { return null; } return new MappedFile(cast(GMappedFile*) p, true); } /** * Decrements the reference count of @file by one. If the reference count * drops to 0, unmaps the buffer of @file and frees it. * * It is safe to call this function from any thread. * * Since 2.22 */ public void unref() { g_mapped_file_unref(gMappedFile); } } GtkD-3.7.5/generated/gtkd/glib/MatchInfo.d000066400000000000000000000326631324604450400202140ustar00rootroot00000000000000/* * 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 glib.MatchInfo; private import glib.ErrorG; private import glib.GException; private import glib.Regex; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * A GMatchInfo is an opaque struct used to return information about * matches. */ public class MatchInfo { /** the main Gtk struct */ protected GMatchInfo* gMatchInfo; protected bool ownedRef; /** Get the main Gtk struct */ public GMatchInfo* getMatchInfoStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMatchInfo; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gMatchInfo; } /** * Sets our main struct and passes it to the parent class. */ public this (GMatchInfo* gMatchInfo, bool ownedRef = false) { this.gMatchInfo = gMatchInfo; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_match_info_unref(gMatchInfo); } /** * Returns a new string containing the text in @string_to_expand with * references and escape sequences expanded. References refer to the last * match done with @string against @regex and have the same syntax used by * g_regex_replace(). * * The @string_to_expand must be UTF-8 encoded even if #G_REGEX_RAW was * passed to g_regex_new(). * * The backreferences are extracted from the string passed to the match * function, so you cannot call this function after freeing the string. * * @match_info may be %NULL in which case @string_to_expand must not * contain references. For instance "foo\n" does not refer to an actual * pattern and '\n' merely will be replaced with \n character, * while to expand "\0" (whole match) one needs the result of a match. * Use g_regex_check_replacement() to find out whether @string_to_expand * contains references. * * Params: * stringToExpand = the string to expand * * Returns: the expanded string, or %NULL if an error occurred * * Since: 2.14 * * Throws: GException on failure. */ public string expandReferences(string stringToExpand) { GError* err = null; auto retStr = g_match_info_expand_references(gMatchInfo, Str.toStringz(stringToExpand), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Retrieves the text matching the @match_num'th capturing * parentheses. 0 is the full text of the match, 1 is the first paren * set, 2 the second, and so on. * * If @match_num is a valid sub pattern but it didn't match anything * (e.g. sub pattern 1, matching "b" against "(a)?b") then an empty * string is returned. * * If the match was obtained using the DFA algorithm, that is using * g_regex_match_all() or g_regex_match_all_full(), the retrieved * string is not that of a set of parentheses but that of a matched * substring. Substrings are matched in reverse order of length, so * 0 is the longest match. * * The string is fetched from the string passed to the match function, * so you cannot call this function after freeing the string. * * Params: * matchNum = number of the sub expression * * Returns: The matched substring, or %NULL if an error * occurred. You have to free the string yourself * * Since: 2.14 */ public string fetch(int matchNum) { auto retStr = g_match_info_fetch(gMatchInfo, matchNum); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Bundles up pointers to each of the matching substrings from a match * and stores them in an array of gchar pointers. The first element in * the returned array is the match number 0, i.e. the entire matched * text. * * If a sub pattern didn't match anything (e.g. sub pattern 1, matching * "b" against "(a)?b") then an empty string is inserted. * * If the last match was obtained using the DFA algorithm, that is using * g_regex_match_all() or g_regex_match_all_full(), the retrieved * strings are not that matched by sets of parentheses but that of the * matched substring. Substrings are matched in reverse order of length, * so the first one is the longest match. * * The strings are fetched from the string passed to the match function, * so you cannot call this function after freeing the string. * * Returns: a %NULL-terminated array of gchar * * pointers. It must be freed using g_strfreev(). If the previous * match failed %NULL is returned * * Since: 2.14 */ public string[] fetchAll() { auto retStr = g_match_info_fetch_all(gMatchInfo); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Retrieves the text matching the capturing parentheses named @name. * * If @name is a valid sub pattern name but it didn't match anything * (e.g. sub pattern "X", matching "b" against "(?Pa)?b") * then an empty string is returned. * * The string is fetched from the string passed to the match function, * so you cannot call this function after freeing the string. * * Params: * name = name of the subexpression * * Returns: The matched substring, or %NULL if an error * occurred. You have to free the string yourself * * Since: 2.14 */ public string fetchNamed(string name) { auto retStr = g_match_info_fetch_named(gMatchInfo, Str.toStringz(name)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Retrieves the position in bytes of the capturing parentheses named @name. * * If @name is a valid sub pattern name but it didn't match anything * (e.g. sub pattern "X", matching "b" against "(?Pa)?b") * then @start_pos and @end_pos are set to -1 and %TRUE is returned. * * Params: * name = name of the subexpression * startPos = pointer to location where to store * the start position, or %NULL * endPos = pointer to location where to store * the end position, or %NULL * * Returns: %TRUE if the position was fetched, %FALSE otherwise. * If the position cannot be fetched, @start_pos and @end_pos * are left unchanged. * * Since: 2.14 */ public bool fetchNamedPos(string name, out int startPos, out int endPos) { return g_match_info_fetch_named_pos(gMatchInfo, Str.toStringz(name), &startPos, &endPos) != 0; } /** * Retrieves the position in bytes of the @match_num'th capturing * parentheses. 0 is the full text of the match, 1 is the first * paren set, 2 the second, and so on. * * If @match_num is a valid sub pattern but it didn't match anything * (e.g. sub pattern 1, matching "b" against "(a)?b") then @start_pos * and @end_pos are set to -1 and %TRUE is returned. * * If the match was obtained using the DFA algorithm, that is using * g_regex_match_all() or g_regex_match_all_full(), the retrieved * position is not that of a set of parentheses but that of a matched * substring. Substrings are matched in reverse order of length, so * 0 is the longest match. * * Params: * matchNum = number of the sub expression * startPos = pointer to location where to store * the start position, or %NULL * endPos = pointer to location where to store * the end position, or %NULL * * Returns: %TRUE if the position was fetched, %FALSE otherwise. If * the position cannot be fetched, @start_pos and @end_pos are left * unchanged * * Since: 2.14 */ public bool fetchPos(int matchNum, out int startPos, out int endPos) { return g_match_info_fetch_pos(gMatchInfo, matchNum, &startPos, &endPos) != 0; } /** * If @match_info is not %NULL, calls g_match_info_unref(); otherwise does * nothing. * * Since: 2.14 */ public void free() { g_match_info_free(gMatchInfo); ownedRef = false; } /** * Retrieves the number of matched substrings (including substring 0, * that is the whole matched text), so 1 is returned if the pattern * has no substrings in it and 0 is returned if the match failed. * * If the last match was obtained using the DFA algorithm, that is * using g_regex_match_all() or g_regex_match_all_full(), the retrieved * count is not that of the number of capturing parentheses but that of * the number of matched substrings. * * Returns: Number of matched substrings, or -1 if an error occurred * * Since: 2.14 */ public int getMatchCount() { return g_match_info_get_match_count(gMatchInfo); } /** * Returns #GRegex object used in @match_info. It belongs to Glib * and must not be freed. Use g_regex_ref() if you need to keep it * after you free @match_info object. * * Returns: #GRegex object used in @match_info * * Since: 2.14 */ public Regex getRegex() { auto p = g_match_info_get_regex(gMatchInfo); if(p is null) { return null; } return new Regex(cast(GRegex*) p, true); } /** * Returns the string searched with @match_info. This is the * string passed to g_regex_match() or g_regex_replace() so * you may not free it before calling this function. * * Returns: the string searched with @match_info * * Since: 2.14 */ public string getString() { return Str.toString(g_match_info_get_string(gMatchInfo)); } /** * Usually if the string passed to g_regex_match*() matches as far as * it goes, but is too short to match the entire pattern, %FALSE is * returned. There are circumstances where it might be helpful to * distinguish this case from other cases in which there is no match. * * Consider, for example, an application where a human is required to * type in data for a field with specific formatting requirements. An * example might be a date in the form ddmmmyy, defined by the pattern * "^\d?\d(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\d\d$". * If the application sees the user’s keystrokes one by one, and can * check that what has been typed so far is potentially valid, it is * able to raise an error as soon as a mistake is made. * * GRegex supports the concept of partial matching by means of the * #G_REGEX_MATCH_PARTIAL_SOFT and #G_REGEX_MATCH_PARTIAL_HARD flags. * When they are used, the return code for * g_regex_match() or g_regex_match_full() is, as usual, %TRUE * for a complete match, %FALSE otherwise. But, when these functions * return %FALSE, you can check if the match was partial calling * g_match_info_is_partial_match(). * * The difference between #G_REGEX_MATCH_PARTIAL_SOFT and * #G_REGEX_MATCH_PARTIAL_HARD is that when a partial match is encountered * with #G_REGEX_MATCH_PARTIAL_SOFT, matching continues to search for a * possible complete match, while with #G_REGEX_MATCH_PARTIAL_HARD matching * stops at the partial match. * When both #G_REGEX_MATCH_PARTIAL_SOFT and #G_REGEX_MATCH_PARTIAL_HARD * are set, the latter takes precedence. * * There were formerly some restrictions on the pattern for partial matching. * The restrictions no longer apply. * * See pcrepartial(3) for more information on partial matching. * * Returns: %TRUE if the match was partial, %FALSE otherwise * * Since: 2.14 */ public bool isPartialMatch() { return g_match_info_is_partial_match(gMatchInfo) != 0; } /** * Returns whether the previous match operation succeeded. * * Returns: %TRUE if the previous match operation succeeded, * %FALSE otherwise * * Since: 2.14 */ public bool matches() { return g_match_info_matches(gMatchInfo) != 0; } /** * Scans for the next match using the same parameters of the previous * call to g_regex_match_full() or g_regex_match() that returned * @match_info. * * The match is done on the string passed to the match function, so you * cannot free it before calling this function. * * Returns: %TRUE is the string matched, %FALSE otherwise * * Since: 2.14 * * Throws: GException on failure. */ public bool next() { GError* err = null; auto p = g_match_info_next(gMatchInfo, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Increases reference count of @match_info by 1. * * Returns: @match_info * * Since: 2.30 */ public MatchInfo doref() { auto p = g_match_info_ref(gMatchInfo); if(p is null) { return null; } return new MatchInfo(cast(GMatchInfo*) p, true); } /** * Decreases reference count of @match_info by 1. When reference count drops * to zero, it frees all the memory associated with the match_info structure. * * Since: 2.30 */ public void unref() { g_match_info_unref(gMatchInfo); } } GtkD-3.7.5/generated/gtkd/glib/Memory.d000066400000000000000000000222441324604450400176060ustar00rootroot00000000000000/* * 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 glib.Memory; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Memory { /** * Clears a reference to a variable. * * @pp must not be %NULL. * * If the reference is %NULL then this function does nothing. * Otherwise, the variable is destroyed using @destroy and the * pointer is set to %NULL. * * A macro is also included that allows this function to be used without * pointer casts. * * Params: * pp = a pointer to a variable, struct member etc. holding a * pointer * destroy = a function to which a gpointer can be passed, to destroy *@pp * * Since: 2.34 */ public static void clearPointer(void** pp, GDestroyNotify destroy) { g_clear_pointer(pp, destroy); } /** * Frees the memory pointed to by @mem. * * If @mem is %NULL it simply returns, so there is no need to check @mem * against %NULL before calling this function. * * Params: * mem = the memory to free */ public static void free(void* mem) { g_free(mem); } /** * Allocates @n_bytes bytes of memory. * If @n_bytes is 0 it returns %NULL. * * Params: * nBytes = the number of bytes to allocate * * Returns: a pointer to the allocated memory */ public static void* malloc(size_t nBytes) { return g_malloc(nBytes); } /** * Allocates @n_bytes bytes of memory, initialized to 0's. * If @n_bytes is 0 it returns %NULL. * * Params: * nBytes = the number of bytes to allocate * * Returns: a pointer to the allocated memory */ public static void* malloc0(size_t nBytes) { return g_malloc0(nBytes); } /** * This function is similar to g_malloc0(), allocating (@n_blocks * @n_block_bytes) bytes, * but care is taken to detect possible overflow during multiplication. * * Params: * nBlocks = the number of blocks to allocate * nBlockBytes = the size of each block in bytes * * Returns: a pointer to the allocated memory * * Since: 2.24 */ public static void* malloc0N(size_t nBlocks, size_t nBlockBytes) { return g_malloc0_n(nBlocks, nBlockBytes); } /** * This function is similar to g_malloc(), allocating (@n_blocks * @n_block_bytes) bytes, * but care is taken to detect possible overflow during multiplication. * * Params: * nBlocks = the number of blocks to allocate * nBlockBytes = the size of each block in bytes * * Returns: a pointer to the allocated memory * * Since: 2.24 */ public static void* mallocN(size_t nBlocks, size_t nBlockBytes) { return g_malloc_n(nBlocks, nBlockBytes); } /** * Checks whether the allocator used by g_malloc() is the system's * malloc implementation. If it returns %TRUE memory allocated with * malloc() can be used interchangeable with memory allocated using g_malloc(). * This function is useful for avoiding an extra copy of allocated memory returned * by a non-GLib-based API. * * Deprecated: GLib always uses the system malloc, so this function always * returns %TRUE. * * Returns: if %TRUE, malloc() and g_malloc() can be mixed. */ public static bool memIsSystemMalloc() { return g_mem_is_system_malloc() != 0; } /** * GLib used to support some tools for memory profiling, but this * no longer works. There are many other useful tools for memory * profiling these days which can be used instead. * * Deprecated: Use other memory profiling tools instead */ public static void memProfile() { g_mem_profile(); } /** * This function used to let you override the memory allocation function. * However, its use was incompatible with the use of global constructors * in GLib and GIO, because those use the GLib allocators before main is * reached. Therefore this function is now deprecated and is just a stub. * * Deprecated: Use other memory profiling tools instead * * Params: * vtable = table of memory allocation routines. */ public static void memSetVtable(GMemVTable* vtable) { g_mem_set_vtable(vtable); } /** * Allocates @byte_size bytes of memory, and copies @byte_size bytes into it * from @mem. If @mem is %NULL it returns %NULL. * * Params: * mem = the memory to copy. * byteSize = the number of bytes to copy. * * Returns: a pointer to the newly-allocated copy of the memory, or %NULL if @mem * is %NULL. */ public static void* memdup(void* mem, uint byteSize) { return g_memdup(mem, byteSize); } /** * Reallocates the memory pointed to by @mem, so that it now has space for * @n_bytes bytes of memory. It returns the new address of the memory, which may * have been moved. @mem may be %NULL, in which case it's considered to * have zero-length. @n_bytes may be 0, in which case %NULL will be returned * and @mem will be freed unless it is %NULL. * * Params: * mem = the memory to reallocate * nBytes = new size of the memory in bytes * * Returns: the new address of the allocated memory */ public static void* realloc(void* mem, size_t nBytes) { return g_realloc(mem, nBytes); } /** * This function is similar to g_realloc(), allocating (@n_blocks * @n_block_bytes) bytes, * but care is taken to detect possible overflow during multiplication. * * Params: * mem = the memory to reallocate * nBlocks = the number of blocks to allocate * nBlockBytes = the size of each block in bytes * * Returns: the new address of the allocated memory * * Since: 2.24 */ public static void* reallocN(void* mem, size_t nBlocks, size_t nBlockBytes) { return g_realloc_n(mem, nBlocks, nBlockBytes); } /** * Attempts to allocate @n_bytes, and returns %NULL on failure. * Contrast with g_malloc(), which aborts the program on failure. * * Params: * nBytes = number of bytes to allocate. * * Returns: the allocated memory, or %NULL. */ public static void* tryMalloc(size_t nBytes) { return g_try_malloc(nBytes); } /** * Attempts to allocate @n_bytes, initialized to 0's, and returns %NULL on * failure. Contrast with g_malloc0(), which aborts the program on failure. * * Params: * nBytes = number of bytes to allocate * * Returns: the allocated memory, or %NULL * * Since: 2.8 */ public static void* tryMalloc0(size_t nBytes) { return g_try_malloc0(nBytes); } /** * This function is similar to g_try_malloc0(), allocating (@n_blocks * @n_block_bytes) bytes, * but care is taken to detect possible overflow during multiplication. * * Params: * nBlocks = the number of blocks to allocate * nBlockBytes = the size of each block in bytes * * Returns: the allocated memory, or %NULL * * Since: 2.24 */ public static void* tryMalloc0N(size_t nBlocks, size_t nBlockBytes) { return g_try_malloc0_n(nBlocks, nBlockBytes); } /** * This function is similar to g_try_malloc(), allocating (@n_blocks * @n_block_bytes) bytes, * but care is taken to detect possible overflow during multiplication. * * Params: * nBlocks = the number of blocks to allocate * nBlockBytes = the size of each block in bytes * * Returns: the allocated memory, or %NULL. * * Since: 2.24 */ public static void* tryMallocN(size_t nBlocks, size_t nBlockBytes) { return g_try_malloc_n(nBlocks, nBlockBytes); } /** * Attempts to realloc @mem to a new size, @n_bytes, and returns %NULL * on failure. Contrast with g_realloc(), which aborts the program * on failure. * * If @mem is %NULL, behaves the same as g_try_malloc(). * * Params: * mem = previously-allocated memory, or %NULL. * nBytes = number of bytes to allocate. * * Returns: the allocated memory, or %NULL. */ public static void* tryRealloc(void* mem, size_t nBytes) { return g_try_realloc(mem, nBytes); } /** * This function is similar to g_try_realloc(), allocating (@n_blocks * @n_block_bytes) bytes, * but care is taken to detect possible overflow during multiplication. * * Params: * mem = previously-allocated memory, or %NULL. * nBlocks = the number of blocks to allocate * nBlockBytes = the size of each block in bytes * * Returns: the allocated memory, or %NULL. * * Since: 2.24 */ public static void* tryReallocN(void* mem, size_t nBlocks, size_t nBlockBytes) { return g_try_realloc_n(mem, nBlocks, nBlockBytes); } } GtkD-3.7.5/generated/gtkd/glib/MemorySlice.d000066400000000000000000000125421324604450400205660ustar00rootroot00000000000000/* * 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 glib.MemorySlice; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public T* sliceNew(T)() { // We cant use sliceAlloc for the GLib array types. // the actual array structs are larger than the ones used in the API. static if ( is( T == GArray ) ) return g_array_new(false, false, 1); else static if ( is( T == GByteArray ) ) return g_byte_array_new(); else static if ( is( T == GPtrArray ) ) return g_ptr_array_new(); else return cast(T*)g_slice_alloc0(T.sizeof); } public T* sliceAlloc(T)() { return cast(T*)g_slice_alloc0(T.sizeof); } public T* sliceDup(T)(T* memBlock) { return cast(T*)g_slice_copy(T.sizeof, memBlock); } public void sliceFree(T)(T* memBlock) { g_slice_free1(T.sizeof, memBlock); } /** */ /** * Allocates a block of memory from the slice allocator. * The block adress handed out can be expected to be aligned * to at least 1 * sizeof (void*), * though in general slices are 2 * sizeof (void*) bytes aligned, * if a malloc() fallback implementation is used instead, * the alignment may be reduced in a libc dependent fashion. * Note that the underlying slice allocation mechanism can * be changed with the [`G_SLICE=always-malloc`][G_SLICE] * environment variable. * * Params: * blockSize = the number of bytes to allocate * * Returns: a pointer to the allocated memory block, which will be %NULL if and * only if @mem_size is 0 * * Since: 2.10 */ public void* sliceAlloc(size_t blockSize) { return g_slice_alloc(blockSize); } /** * Allocates a block of memory via g_slice_alloc() and initializes * the returned memory to 0. Note that the underlying slice allocation * mechanism can be changed with the [`G_SLICE=always-malloc`][G_SLICE] * environment variable. * * Params: * blockSize = the number of bytes to allocate * * Returns: a pointer to the allocated block, which will be %NULL if and only * if @mem_size is 0 * * Since: 2.10 */ public void* sliceAlloc0(size_t blockSize) { return g_slice_alloc0(blockSize); } /** * Allocates a block of memory from the slice allocator * and copies @block_size bytes into it from @mem_block. * * @mem_block must be non-%NULL if @block_size is non-zero. * * Params: * blockSize = the number of bytes to allocate * memBlock = the memory to copy * * Returns: a pointer to the allocated memory block, which will be %NULL if and * only if @mem_size is 0 * * Since: 2.14 */ public void* sliceCopy(size_t blockSize, void* memBlock) { return g_slice_copy(blockSize, memBlock); } /** * Frees a block of memory. * * The memory must have been allocated via g_slice_alloc() or * g_slice_alloc0() and the @block_size has to match the size * specified upon allocation. Note that the exact release behaviour * can be changed with the [`G_DEBUG=gc-friendly`][G_DEBUG] environment * variable, also see [`G_SLICE`][G_SLICE] for related debugging options. * * If @mem_block is %NULL, this function does nothing. * * Params: * blockSize = the size of the block * memBlock = a pointer to the block to free * * Since: 2.10 */ public void sliceFree1(size_t blockSize, void* memBlock) { g_slice_free1(blockSize, memBlock); } /** * Frees a linked list of memory blocks of structure type @type. * * The memory blocks must be equal-sized, allocated via * g_slice_alloc() or g_slice_alloc0() and linked together by a * @next pointer (similar to #GSList). The offset of the @next * field in each block is passed as third argument. * Note that the exact release behaviour can be changed with the * [`G_DEBUG=gc-friendly`][G_DEBUG] environment variable, also see * [`G_SLICE`][G_SLICE] for related debugging options. * * If @mem_chain is %NULL, this function does nothing. * * Params: * blockSize = the size of the blocks * memChain = a pointer to the first block of the chain * nextOffset = the offset of the @next field in the blocks * * Since: 2.10 */ public void sliceFreeChainWithOffset(size_t blockSize, void* memChain, size_t nextOffset) { g_slice_free_chain_with_offset(blockSize, memChain, nextOffset); } /** */ public long sliceGetConfig(GSliceConfig ckey) { return g_slice_get_config(ckey); } /** */ public long* sliceGetConfigState(GSliceConfig ckey, long address, uint* nValues) { return g_slice_get_config_state(ckey, address, nValues); } /** */ public void sliceSetConfig(GSliceConfig ckey, long value) { g_slice_set_config(ckey, value); } GtkD-3.7.5/generated/gtkd/glib/MessageLog.d000066400000000000000000000227621324604450400203710ustar00rootroot00000000000000/* * 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 glib.MessageLog; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct MessageLog { /** * The default log handler set up by GLib; g_log_set_default_handler() * allows to install an alternate default log handler. * This is used if no log handler has been set for the particular log * domain and log level combination. It outputs the message to stderr * or stdout and if the log level is fatal it calls abort(). It automatically * prints a new-line character after the message, so one does not need to be * manually included in @message. * * The behavior of this log handler can be influenced by a number of * environment variables: * * - `G_MESSAGES_PREFIXED`: A :-separated list of log levels for which * messages should be prefixed by the program name and PID of the * aplication. * * - `G_MESSAGES_DEBUG`: A space-separated list of log domains for * which debug and informational messages are printed. By default * these messages are not printed. * * stderr is used for levels %G_LOG_LEVEL_ERROR, %G_LOG_LEVEL_CRITICAL, * %G_LOG_LEVEL_WARNING and %G_LOG_LEVEL_MESSAGE. stdout is used for * the rest. * * This has no effect if structured logging is enabled; see * [Using Structured Logging][using-structured-logging]. * * Params: * logDomain = the log domain of the message, or %NULL for the * default "" application domain * logLevel = the level of the message * message = the message * unusedData = data passed from g_log() which is unused */ public static void logDefaultHandler(string logDomain, GLogLevelFlags logLevel, string message, void* unusedData) { g_log_default_handler(Str.toStringz(logDomain), logLevel, Str.toStringz(message), unusedData); } /** * Removes the log handler. * * This has no effect if structured logging is enabled; see * [Using Structured Logging][using-structured-logging]. * * Params: * logDomain = the log domain * handlerId = the id of the handler, which was returned * in g_log_set_handler() */ public static void logRemoveHandler(string logDomain, uint handlerId) { g_log_remove_handler(Str.toStringz(logDomain), handlerId); } /** * Sets the message levels which are always fatal, in any log domain. * When a message with any of these levels is logged the program terminates. * You can only set the levels defined by GLib to be fatal. * %G_LOG_LEVEL_ERROR is always fatal. * * You can also make some message levels fatal at runtime by setting * the `G_DEBUG` environment variable (see * [Running GLib Applications](glib-running.html)). * * Libraries should not call this function, as it affects all messages logged * by a process, including those from other libraries. * * Structured log messages (using g_log_structured() and * g_log_structured_array()) are fatal only if the default log writer is used; * otherwise it is up to the writer function to determine which log messages * are fatal. See [Using Structured Logging][using-structured-logging]. * * Params: * fatalMask = the mask containing bits set for each level * of error which is to be fatal * * Returns: the old fatal mask */ public static GLogLevelFlags logSetAlwaysFatal(GLogLevelFlags fatalMask) { return g_log_set_always_fatal(fatalMask); } /** * Installs a default log handler which is used if no * log handler has been set for the particular log domain * and log level combination. By default, GLib uses * g_log_default_handler() as default log handler. * * This has no effect if structured logging is enabled; see * [Using Structured Logging][using-structured-logging]. * * Params: * logFunc = the log handler function * userData = data passed to the log handler * * Returns: the previous default log handler * * Since: 2.6 */ public static GLogFunc logSetDefaultHandler(GLogFunc logFunc, void* userData) { return g_log_set_default_handler(logFunc, userData); } /** * Sets the log levels which are fatal in the given domain. * %G_LOG_LEVEL_ERROR is always fatal. * * This has no effect on structured log messages (using g_log_structured() or * g_log_structured_array()). To change the fatal behaviour for specific log * messages, programs must install a custom log writer function using * g_log_set_writer_func(). See * [Using Structured Logging][using-structured-logging]. * * Params: * logDomain = the log domain * fatalMask = the new fatal mask * * Returns: the old fatal mask for the log domain */ public static GLogLevelFlags logSetFatalMask(string logDomain, GLogLevelFlags fatalMask) { return g_log_set_fatal_mask(Str.toStringz(logDomain), fatalMask); } /** * Sets the log handler for a domain and a set of log levels. * To handle fatal and recursive messages the @log_levels parameter * must be combined with the #G_LOG_FLAG_FATAL and #G_LOG_FLAG_RECURSION * bit flags. * * Note that since the #G_LOG_LEVEL_ERROR log level is always fatal, if * you want to set a handler for this log level you must combine it with * #G_LOG_FLAG_FATAL. * * This has no effect if structured logging is enabled; see * [Using Structured Logging][using-structured-logging]. * * Here is an example for adding a log handler for all warning messages * in the default domain: * |[ * g_log_set_handler (NULL, G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL * | G_LOG_FLAG_RECURSION, my_log_handler, NULL); * ]| * * This example adds a log handler for all critical messages from GTK+: * |[ * g_log_set_handler ("Gtk", G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL * | G_LOG_FLAG_RECURSION, my_log_handler, NULL); * ]| * * This example adds a log handler for all messages from GLib: * |[ * g_log_set_handler ("GLib", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL * | G_LOG_FLAG_RECURSION, my_log_handler, NULL); * ]| * * Params: * logDomain = the log domain, or %NULL for the default "" * application domain * logLevels = the log levels to apply the log handler for. * To handle fatal and recursive messages as well, combine * the log levels with the #G_LOG_FLAG_FATAL and * #G_LOG_FLAG_RECURSION bit flags. * logFunc = the log handler function * userData = data passed to the log handler * * Returns: the id of the new handler */ public static uint logSetHandler(string logDomain, GLogLevelFlags logLevels, GLogFunc logFunc, void* userData) { return g_log_set_handler(Str.toStringz(logDomain), logLevels, logFunc, userData); } /** * Like g_log_sets_handler(), but takes a destroy notify for the @user_data. * * This has no effect if structured logging is enabled; see * [Using Structured Logging][using-structured-logging]. * * Params: * logDomain = the log domain, or %NULL for the default "" * application domain * logLevels = the log levels to apply the log handler for. * To handle fatal and recursive messages as well, combine * the log levels with the #G_LOG_FLAG_FATAL and * #G_LOG_FLAG_RECURSION bit flags. * logFunc = the log handler function * userData = data passed to the log handler * destroy = destroy notify for @user_data, or %NULL * * Returns: the id of the new handler * * Since: 2.46 */ public static uint logSetHandlerFull(string logDomain, GLogLevelFlags logLevels, GLogFunc logFunc, void* userData, GDestroyNotify destroy) { return g_log_set_handler_full(Str.toStringz(logDomain), logLevels, logFunc, userData, destroy); } /** * Logs an error or debugging message. * * If the log level has been set as fatal, the abort() * function is called to terminate the program. * * If g_log_default_handler() is used as the log handler function, a new-line * character will automatically be appended to @..., and need not be entered * manually. * * If [structured logging is enabled][using-structured-logging] this will * output via the structured log writer function (see g_log_set_writer_func()). * * Params: * logDomain = the log domain, or %NULL for the default "" * application domain * logLevel = the log level * format = the message format. See the printf() documentation * args = the parameters to insert into the format string */ public static void logv(string logDomain, GLogLevelFlags logLevel, string format, void* args) { g_logv(Str.toStringz(logDomain), logLevel, Str.toStringz(format), args); } } GtkD-3.7.5/generated/gtkd/glib/Messages.d000066400000000000000000000103661324604450400201070ustar00rootroot00000000000000/* * 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 glib.Messages; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Messages { /** * Prompts the user with * `[E]xit, [H]alt, show [S]tack trace or [P]roceed`. * This function is intended to be used for debugging use only. * The following example shows how it can be used together with * the g_log() functions. * * |[ * #include * * static void * log_handler (const gchar *log_domain, * GLogLevelFlags log_level, * const gchar *message, * gpointer user_data) * { * g_log_default_handler (log_domain, log_level, message, user_data); * * g_on_error_query (MY_PROGRAM_NAME); * } * * int * main (int argc, char *argv[]) * { * g_log_set_handler (MY_LOG_DOMAIN, * G_LOG_LEVEL_WARNING | * G_LOG_LEVEL_ERROR | * G_LOG_LEVEL_CRITICAL, * log_handler, * NULL); * ... * ]| * * If "[E]xit" is selected, the application terminates with a call * to _exit(0). * * If "[S]tack" trace is selected, g_on_error_stack_trace() is called. * This invokes gdb, which attaches to the current process and shows * a stack trace. The prompt is then shown again. * * If "[P]roceed" is selected, the function returns. * * This function may cause different actions on non-UNIX platforms. * * Params: * prgName = the program name, needed by gdb for the "[S]tack trace" * option. If @prg_name is %NULL, g_get_prgname() is called to get * the program name (which will work correctly if gdk_init() or * gtk_init() has been called) */ public static void onErrorQuery(string prgName) { g_on_error_query(Str.toStringz(prgName)); } /** * Invokes gdb, which attaches to the current process and shows a * stack trace. Called by g_on_error_query() when the "[S]tack trace" * option is selected. You can get the current process's program name * with g_get_prgname(), assuming that you have called gtk_init() or * gdk_init(). * * This function may cause different actions on non-UNIX platforms. * * Params: * prgName = the program name, needed by gdb for the "[S]tack trace" * option */ public static void onErrorStackTrace(string prgName) { g_on_error_stack_trace(Str.toStringz(prgName)); } /** * Sets the print handler. * * Any messages passed to g_print() will be output via * the new handler. The default handler simply outputs * the message to stdout. By providing your own handler * you can redirect the output, to a GTK+ widget or a * log file for example. * * Params: * func = the new print handler * * Returns: the old print handler */ public static GPrintFunc setPrintHandler(GPrintFunc func) { return g_set_print_handler(func); } /** * Sets the handler for printing error messages. * * Any messages passed to g_printerr() will be output via * the new handler. The default handler simply outputs the * message to stderr. By providing your own handler you can * redirect the output, to a GTK+ widget or a log file for * example. * * Params: * func = the new error message handler * * Returns: the old error message handler */ public static GPrintFunc setPrinterrHandler(GPrintFunc func) { return g_set_printerr_handler(func); } } GtkD-3.7.5/generated/gtkd/glib/Module.d000066400000000000000000000135371324604450400175700ustar00rootroot00000000000000/* * 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 glib.Module; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The #GModule struct is an opaque data structure to represent a * [dynamically-loaded module][glib-Dynamic-Loading-of-Modules]. * It should only be accessed via the following functions. */ public class Module { /** the main Gtk struct */ protected GModule* gModule; protected bool ownedRef; /** Get the main Gtk struct */ public GModule* getModuleStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gModule; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gModule; } /** * Sets our main struct and passes it to the parent class. */ public this (GModule* gModule, bool ownedRef = false) { this.gModule = gModule; this.ownedRef = ownedRef; } /** * Closes a module. * * Returns: %TRUE on success */ public bool close() { return g_module_close(gModule) != 0; } /** * Ensures that a module will never be unloaded. * Any future g_module_close() calls on the module will be ignored. */ public void makeResident() { g_module_make_resident(gModule); } /** * Returns the filename that the module was opened with. * * If @module refers to the application itself, "main" is returned. * * Returns: the filename of the module */ public string name() { return Str.toString(g_module_name(gModule)); } /** * Gets a symbol pointer from a module, such as one exported * by #G_MODULE_EXPORT. Note that a valid symbol can be %NULL. * * Params: * symbolName = the name of the symbol to find * symbol = returns the pointer to the symbol value * * Returns: %TRUE on success */ public bool symbol(string symbolName, void** symbol) { return g_module_symbol(gModule, Str.toStringz(symbolName), symbol) != 0; } /** * A portable way to build the filename of a module. The platform-specific * prefix and suffix are added to the filename, if needed, and the result * is added to the directory, using the correct separator character. * * The directory should specify the directory where the module can be found. * It can be %NULL or an empty string to indicate that the module is in a * standard platform-specific directory, though this is not recommended * since the wrong module may be found. * * For example, calling g_module_build_path() on a Linux system with a * @directory of `/lib` and a @module_name of "mylibrary" will return * `/lib/libmylibrary.so`. On a Windows system, using `\Windows` as the * directory it will return `\Windows\mylibrary.dll`. * * Params: * directory = the directory where the module is. This can be * %NULL or the empty string to indicate that the standard platform-specific * directories will be used, though that is not recommended * moduleName = the name of the module * * Returns: the complete path of the module, including the standard library * prefix and suffix. This should be freed when no longer needed */ public static string buildPath(string directory, string moduleName) { auto retStr = g_module_build_path(Str.toStringz(directory), Str.toStringz(moduleName)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets a string describing the last module error. * * Returns: a string describing the last module error */ public static string error() { return Str.toString(g_module_error()); } /** * Opens a module. If the module has already been opened, * its reference count is incremented. * * First of all g_module_open() tries to open @file_name as a module. * If that fails and @file_name has the ".la"-suffix (and is a libtool * archive) it tries to open the corresponding module. If that fails * and it doesn't have the proper module suffix for the platform * (#G_MODULE_SUFFIX), this suffix will be appended and the corresponding * module will be opended. If that fails and @file_name doesn't have the * ".la"-suffix, this suffix is appended and g_module_open() tries to open * the corresponding module. If eventually that fails as well, %NULL is * returned. * * Params: * fileName = the name of the file containing the module, or %NULL * to obtain a #GModule representing the main program itself * flags = the flags used for opening the module. This can be the * logical OR of any of the #GModuleFlags * * Returns: a #GModule on success, or %NULL on failure */ public static Module open(string fileName, GModuleFlags flags) { auto p = g_module_open(Str.toStringz(fileName), flags); if(p is null) { return null; } return new Module(cast(GModule*) p); } /** * Checks if modules are supported on the current platform. * * Returns: %TRUE if modules are supported */ public static bool supported() { return g_module_supported() != 0; } } GtkD-3.7.5/generated/gtkd/glib/Mutex.d000066400000000000000000000125271324604450400174430ustar00rootroot00000000000000/* * 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 glib.Mutex; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The #GMutex struct is an opaque data structure to represent a mutex * (mutual exclusion). It can be used to protect data against shared * access. * * Take for example the following function: * |[ * int * give_me_next_number (void) * { * static int current_number = 0; * * // now do a very complicated calculation to calculate the new * // number, this might for example be a random number generator * current_number = calc_next_number (current_number); * * return current_number; * } * ]| * It is easy to see that this won't work in a multi-threaded * application. There current_number must be protected against shared * access. A #GMutex can be used as a solution to this problem: * |[ * int * give_me_next_number (void) * { * static GMutex mutex; * static int current_number = 0; * int ret_val; * * g_mutex_lock (&mutex); * ret_val = current_number = calc_next_number (current_number); * g_mutex_unlock (&mutex); * * return ret_val; * } * ]| * Notice that the #GMutex is not initialised to any particular value. * Its placement in static storage ensures that it will be initialised * to all-zeros, which is appropriate. * * If a #GMutex is placed in other contexts (eg: embedded in a struct) * then it must be explicitly initialised using g_mutex_init(). * * A #GMutex should only be accessed via g_mutex_ functions. */ public class Mutex { /** the main Gtk struct */ protected GMutex* gMutex; protected bool ownedRef; /** Get the main Gtk struct */ public GMutex* getMutexStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMutex; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gMutex; } /** * Sets our main struct and passes it to the parent class. */ public this (GMutex* gMutex, bool ownedRef = false) { this.gMutex = gMutex; this.ownedRef = ownedRef; } /** * Frees the resources allocated to a mutex with g_mutex_init(). * * This function should not be used with a #GMutex that has been * statically allocated. * * Calling g_mutex_clear() on a locked mutex leads to undefined * behaviour. * * Sine: 2.32 */ public void clear() { g_mutex_clear(gMutex); } /** * Initializes a #GMutex so that it can be used. * * This function is useful to initialize a mutex that has been * allocated on the stack, or as part of a larger structure. * It is not necessary to initialize a mutex that has been * statically allocated. * * |[ * typedef struct { * GMutex m; * ... * } Blob; * * Blob *b; * * b = g_new (Blob, 1); * g_mutex_init (&b->m); * ]| * * To undo the effect of g_mutex_init() when a mutex is no longer * needed, use g_mutex_clear(). * * Calling g_mutex_init() on an already initialized #GMutex leads * to undefined behaviour. * * Since: 2.32 */ public void init() { g_mutex_init(gMutex); } /** * Locks @mutex. If @mutex is already locked by another thread, the * current thread will block until @mutex is unlocked by the other * thread. * * #GMutex is neither guaranteed to be recursive nor to be * non-recursive. As such, calling g_mutex_lock() on a #GMutex that has * already been locked by the same thread results in undefined behaviour * (including but not limited to deadlocks). */ public void lock() { g_mutex_lock(gMutex); } /** * Tries to lock @mutex. If @mutex is already locked by another thread, * it immediately returns %FALSE. Otherwise it locks @mutex and returns * %TRUE. * * #GMutex is neither guaranteed to be recursive nor to be * non-recursive. As such, calling g_mutex_lock() on a #GMutex that has * already been locked by the same thread results in undefined behaviour * (including but not limited to deadlocks or arbitrary return values). * * Returns: %TRUE if @mutex could be locked */ public bool trylock() { return g_mutex_trylock(gMutex) != 0; } /** * Unlocks @mutex. If another thread is blocked in a g_mutex_lock() * call for @mutex, it will become unblocked and can lock @mutex itself. * * Calling g_mutex_unlock() on a mutex that is not locked by the * current thread leads to undefined behaviour. */ public void unlock() { g_mutex_unlock(gMutex); } } GtkD-3.7.5/generated/gtkd/glib/Node.d000066400000000000000000000325011324604450400172200ustar00rootroot00000000000000/* * 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 glib.Node; private import glib.ConstructionException; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The #GNode struct represents one node in a [n-ary tree][glib-N-ary-Trees]. */ public final class Node { /** the main Gtk struct */ protected GNode* gNode; protected bool ownedRef; /** Get the main Gtk struct */ public GNode* getNodeStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gNode; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gNode; } /** * Sets our main struct and passes it to the parent class. */ public this (GNode* gNode, bool ownedRef = false) { this.gNode = gNode; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_free(gNode); } /** * contains the actual data of the node. */ public @property void* data() { return gNode.data; } /** Ditto */ public @property void data(void* value) { gNode.data = value; } /** * points to the node's next sibling (a sibling is another * #GNode with the same parent). */ public @property Node next() { return new Node(gNode.next, false); } /** Ditto */ public @property void next(Node value) { gNode.next = value.getNodeStruct(); } /** * points to the node's previous sibling. */ public @property Node prev() { return new Node(gNode.prev, false); } /** Ditto */ public @property void prev(Node value) { gNode.prev = value.getNodeStruct(); } /** * points to the parent of the #GNode, or is %NULL if the * #GNode is the root of the tree. */ public @property Node parent() { return new Node(gNode.parent, false); } /** Ditto */ public @property void parent(Node value) { gNode.parent = value.getNodeStruct(); } /** * points to the first child of the #GNode. The other * children are accessed by using the @next pointer of each * child. */ public @property Node children() { return new Node(gNode.children, false); } /** Ditto */ public @property void children(Node value) { gNode.children = value.getNodeStruct(); } /** * Gets the position of the first child of a #GNode * which contains the given data. * * Params: * data = the data to find * * Returns: the index of the child of @node which contains * @data, or -1 if the data is not found */ public int childIndex(void* data) { return g_node_child_index(gNode, data); } /** * Gets the position of a #GNode with respect to its siblings. * @child must be a child of @node. The first child is numbered 0, * the second 1, and so on. * * Params: * child = a child of @node * * Returns: the position of @child with respect to its siblings */ public int childPosition(Node child) { return g_node_child_position(gNode, (child is null) ? null : child.getNodeStruct()); } /** * Calls a function for each of the children of a #GNode. * Note that it doesn't descend beneath the child nodes. * * Params: * flags = which types of children are to be visited, one of * %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES * func = the function to call for each visited node * data = user data to pass to the function */ public void childrenForeach(GTraverseFlags flags, GNodeForeachFunc func, void* data) { g_node_children_foreach(gNode, flags, func, data); } /** * Recursively copies a #GNode (but does not deep-copy the data inside the * nodes, see g_node_copy_deep() if you need that). * * Returns: a new #GNode containing the same data pointers */ public Node copy() { auto p = g_node_copy(gNode); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Recursively copies a #GNode and its data. * * Params: * copyFunc = the function which is called to copy the data inside each node, * or %NULL to use the original data. * data = data to pass to @copy_func * * Returns: a new #GNode containing copies of the data in @node. * * Since: 2.4 */ public Node copyDeep(GCopyFunc copyFunc, void* data) { auto p = g_node_copy_deep(gNode, copyFunc, data); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Gets the depth of a #GNode. * * If @node is %NULL the depth is 0. The root node has a depth of 1. * For the children of the root node the depth is 2. And so on. * * Returns: the depth of the #GNode */ public uint depth() { return g_node_depth(gNode); } /** * Removes @root and its children from the tree, freeing any memory * allocated. */ public void destroy() { g_node_destroy(gNode); } /** * Finds a #GNode in a tree. * * Params: * order = the order in which nodes are visited - %G_IN_ORDER, * %G_PRE_ORDER, %G_POST_ORDER, or %G_LEVEL_ORDER * flags = which types of children are to be searched, one of * %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES * data = the data to find * * Returns: the found #GNode, or %NULL if the data is not found */ public Node find(GTraverseType order, GTraverseFlags flags, void* data) { auto p = g_node_find(gNode, order, flags, data); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Finds the first child of a #GNode with the given data. * * Params: * flags = which types of children are to be searched, one of * %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES * data = the data to find * * Returns: the found child #GNode, or %NULL if the data is not found */ public Node findChild(GTraverseFlags flags, void* data) { auto p = g_node_find_child(gNode, flags, data); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Gets the first sibling of a #GNode. * This could possibly be the node itself. * * Returns: the first sibling of @node */ public Node firstSibling() { auto p = g_node_first_sibling(gNode); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Gets the root of a tree. * * Returns: the root of the tree */ public Node getRoot() { auto p = g_node_get_root(gNode); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Inserts a #GNode beneath the parent at the given position. * * Params: * position = the position to place @node at, with respect to its siblings * If position is -1, @node is inserted as the last child of @parent * node = the #GNode to insert * * Returns: the inserted #GNode */ public Node insert(int position, Node node) { auto p = g_node_insert(gNode, position, (node is null) ? null : node.getNodeStruct()); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Inserts a #GNode beneath the parent after the given sibling. * * Params: * sibling = the sibling #GNode to place @node after. * If sibling is %NULL, the node is inserted as the first child of @parent. * node = the #GNode to insert * * Returns: the inserted #GNode */ public Node insertAfter(Node sibling, Node node) { auto p = g_node_insert_after(gNode, (sibling is null) ? null : sibling.getNodeStruct(), (node is null) ? null : node.getNodeStruct()); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Inserts a #GNode beneath the parent before the given sibling. * * Params: * sibling = the sibling #GNode to place @node before. * If sibling is %NULL, the node is inserted as the last child of @parent. * node = the #GNode to insert * * Returns: the inserted #GNode */ public Node insertBefore(Node sibling, Node node) { auto p = g_node_insert_before(gNode, (sibling is null) ? null : sibling.getNodeStruct(), (node is null) ? null : node.getNodeStruct()); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Returns %TRUE if @node is an ancestor of @descendant. * This is true if node is the parent of @descendant, * or if node is the grandparent of @descendant etc. * * Params: * descendant = a #GNode * * Returns: %TRUE if @node is an ancestor of @descendant */ public bool isAncestor(Node descendant) { return g_node_is_ancestor(gNode, (descendant is null) ? null : descendant.getNodeStruct()) != 0; } /** * Gets the last child of a #GNode. * * Returns: the last child of @node, or %NULL if @node has no children */ public Node lastChild() { auto p = g_node_last_child(gNode); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Gets the last sibling of a #GNode. * This could possibly be the node itself. * * Returns: the last sibling of @node */ public Node lastSibling() { auto p = g_node_last_sibling(gNode); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Gets the maximum height of all branches beneath a #GNode. * This is the maximum distance from the #GNode to all leaf nodes. * * If @root is %NULL, 0 is returned. If @root has no children, * 1 is returned. If @root has children, 2 is returned. And so on. * * Returns: the maximum height of the tree beneath @root */ public uint maxHeight() { return g_node_max_height(gNode); } /** * Gets the number of children of a #GNode. * * Returns: the number of children of @node */ public uint nChildren() { return g_node_n_children(gNode); } /** * Gets the number of nodes in a tree. * * Params: * flags = which types of children are to be counted, one of * %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES * * Returns: the number of nodes in the tree */ public uint nNodes(GTraverseFlags flags) { return g_node_n_nodes(gNode, flags); } /** * Gets a child of a #GNode, using the given index. * The first child is at index 0. If the index is * too big, %NULL is returned. * * Params: * n = the index of the desired child * * Returns: the child of @node at index @n */ public Node nthChild(uint n) { auto p = g_node_nth_child(gNode, n); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Inserts a #GNode as the first child of the given parent. * * Params: * node = the #GNode to insert * * Returns: the inserted #GNode */ public Node prepend(Node node) { auto p = g_node_prepend(gNode, (node is null) ? null : node.getNodeStruct()); if(p is null) { return null; } return new Node(cast(GNode*) p); } /** * Reverses the order of the children of a #GNode. * (It doesn't change the order of the grandchildren.) */ public void reverseChildren() { g_node_reverse_children(gNode); } /** * Traverses a tree starting at the given root #GNode. * It calls the given function for each node visited. * The traversal can be halted at any point by returning %TRUE from @func. * * Params: * order = the order in which nodes are visited - %G_IN_ORDER, * %G_PRE_ORDER, %G_POST_ORDER, or %G_LEVEL_ORDER. * flags = which types of children are to be visited, one of * %G_TRAVERSE_ALL, %G_TRAVERSE_LEAVES and %G_TRAVERSE_NON_LEAVES * maxDepth = the maximum depth of the traversal. Nodes below this * depth will not be visited. If max_depth is -1 all nodes in * the tree are visited. If depth is 1, only the root is visited. * If depth is 2, the root and its children are visited. And so on. * func = the function to call for each visited #GNode * data = user data to pass to the function */ public void traverse(GTraverseType order, GTraverseFlags flags, int maxDepth, GNodeTraverseFunc func, void* data) { g_node_traverse(gNode, order, flags, maxDepth, func, data); } /** * Unlinks a #GNode from a tree, resulting in two separate trees. */ public void unlink() { g_node_unlink(gNode); } /** * Creates a new #GNode containing the given data. * Used to create the first node in a tree. * * Params: * data = the data of the new node * * Returns: a new #GNode * * Throws: ConstructionException GTK+ fails to create the object. */ public this(void* data) { auto p = g_node_new(data); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GNode*) p); } } GtkD-3.7.5/generated/gtkd/glib/Once.d000066400000000000000000000102651324604450400172220ustar00rootroot00000000000000/* * 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 glib.Once; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * A #GOnce struct controls a one-time initialization function. Any * one-time initialization function must have its own unique #GOnce * struct. * * Since: 2.4 */ public final class Once { /** the main Gtk struct */ protected GOnce* gOnce; protected bool ownedRef; /** Get the main Gtk struct */ public GOnce* getOnceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gOnce; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gOnce; } /** * Sets our main struct and passes it to the parent class. */ public this (GOnce* gOnce, bool ownedRef = false) { this.gOnce = gOnce; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_free(gOnce); } /** * the status of the #GOnce */ public @property GOnceStatus status() { return gOnce.status; } /** Ditto */ public @property void status(GOnceStatus value) { gOnce.status = value; } /** * the value returned by the call to the function, if @status * is %G_ONCE_STATUS_READY */ public @property void* retval() { return gOnce.retval; } /** Ditto */ public @property void retval(void* value) { gOnce.retval = value; } /** */ public void* impl(GThreadFunc func, void* arg) { return g_once_impl(gOnce, func, arg); } /** * Function to be called when starting a critical initialization * section. The argument @location must point to a static * 0-initialized variable that will be set to a value other than 0 at * the end of the initialization section. In combination with * g_once_init_leave() and the unique address @value_location, it can * be ensured that an initialization section will be executed only once * during a program's life time, and that concurrent threads are * blocked until initialization completed. To be used in constructs * like this: * * |[ * static gsize initialization_value = 0; * * if (g_once_init_enter (&initialization_value)) * { * gsize setup_value = 42; // initialization code here * * g_once_init_leave (&initialization_value, setup_value); * } * * // use initialization_value here * ]| * * Params: * location = location of a static initializable variable * containing 0 * * Returns: %TRUE if the initialization section should be entered, * %FALSE and blocks otherwise * * Since: 2.14 */ public static bool initEnter(void* location) { return g_once_init_enter(location) != 0; } /** * Counterpart to g_once_init_enter(). Expects a location of a static * 0-initialized initialization variable, and an initialization value * other than 0. Sets the variable to the initialization value, and * releases concurrent threads blocking in g_once_init_enter() on this * initialization variable. * * Params: * location = location of a static initializable variable * containing 0 * result = new non-0 value for *@value_location * * Since: 2.14 */ public static void initLeave(void* location, size_t result) { g_once_init_leave(location, result); } } GtkD-3.7.5/generated/gtkd/glib/OptionContext.d000066400000000000000000000376411324604450400211620ustar00rootroot00000000000000/* * 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 glib.OptionContext; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.OptionGroup; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * A `GOptionContext` struct defines which options * are accepted by the commandline option parser. The struct has only private * fields and should not be directly accessed. */ public class OptionContext { /** the main Gtk struct */ protected GOptionContext* gOptionContext; protected bool ownedRef; /** Get the main Gtk struct */ public GOptionContext* getOptionContextStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gOptionContext; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gOptionContext; } /** * Sets our main struct and passes it to the parent class. */ public this (GOptionContext* gOptionContext, bool ownedRef = false) { this.gOptionContext = gOptionContext; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_option_context_free(gOptionContext); } /** * Adds a #GOptionGroup to the @context, so that parsing with @context * will recognize the options in the group. Note that this will take * ownership of the @group and thus the @group should not be freed. * * Params: * group = the group to add * * Since: 2.6 */ public void addGroup(OptionGroup group) { g_option_context_add_group(gOptionContext, (group is null) ? null : group.getOptionGroupStruct(true)); } /** * A convenience function which creates a main group if it doesn't * exist, adds the @entries to it and sets the translation domain. * * Params: * entries = a %NULL-terminated array of #GOptionEntrys * translationDomain = a translation domain to use for translating * the `--help` output for the options in @entries * with gettext(), or %NULL * * Since: 2.6 */ public void addMainEntries(GOptionEntry* entries, string translationDomain) { g_option_context_add_main_entries(gOptionContext, entries, Str.toStringz(translationDomain)); } /** * Frees context and all the groups which have been * added to it. * * Please note that parsed arguments need to be freed separately (see * #GOptionEntry). * * Since: 2.6 */ public void free() { g_option_context_free(gOptionContext); ownedRef = false; } /** * Returns the description. See g_option_context_set_description(). * * Returns: the description * * Since: 2.12 */ public string getDescription() { return Str.toString(g_option_context_get_description(gOptionContext)); } /** * Returns a formatted, translated help text for the given context. * To obtain the text produced by `--help`, call * `g_option_context_get_help (context, TRUE, NULL)`. * To obtain the text produced by `--help-all`, call * `g_option_context_get_help (context, FALSE, NULL)`. * To obtain the help text for an option group, call * `g_option_context_get_help (context, FALSE, group)`. * * Params: * mainHelp = if %TRUE, only include the main group * group = the #GOptionGroup to create help for, or %NULL * * Returns: A newly allocated string containing the help text * * Since: 2.14 */ public string getHelp(bool mainHelp, OptionGroup group) { auto retStr = g_option_context_get_help(gOptionContext, mainHelp, (group is null) ? null : group.getOptionGroupStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns whether automatic `--help` generation * is turned on for @context. See g_option_context_set_help_enabled(). * * Returns: %TRUE if automatic help generation is turned on. * * Since: 2.6 */ public bool getHelpEnabled() { return g_option_context_get_help_enabled(gOptionContext) != 0; } /** * Returns whether unknown options are ignored or not. See * g_option_context_set_ignore_unknown_options(). * * Returns: %TRUE if unknown options are ignored. * * Since: 2.6 */ public bool getIgnoreUnknownOptions() { return g_option_context_get_ignore_unknown_options(gOptionContext) != 0; } /** * Returns a pointer to the main group of @context. * * Returns: the main group of @context, or %NULL if * @context doesn't have a main group. Note that group belongs to * @context and should not be modified or freed. * * Since: 2.6 */ public OptionGroup getMainGroup() { auto p = g_option_context_get_main_group(gOptionContext); if(p is null) { return null; } return new OptionGroup(cast(GOptionGroup*) p); } /** * Returns whether strict POSIX code is enabled. * * See g_option_context_set_strict_posix() for more information. * * Returns: %TRUE if strict POSIX is enabled, %FALSE otherwise. * * Since: 2.44 */ public bool getStrictPosix() { return g_option_context_get_strict_posix(gOptionContext) != 0; } /** * Returns the summary. See g_option_context_set_summary(). * * Returns: the summary * * Since: 2.12 */ public string getSummary() { return Str.toString(g_option_context_get_summary(gOptionContext)); } /** * Parses the command line arguments, recognizing options * which have been added to @context. A side-effect of * calling this function is that g_set_prgname() will be * called. * * If the parsing is successful, any parsed arguments are * removed from the array and @argc and @argv are updated * accordingly. A '--' option is stripped from @argv * unless there are unparsed options before and after it, * or some of the options after it start with '-'. In case * of an error, @argc and @argv are left unmodified. * * If automatic `--help` support is enabled * (see g_option_context_set_help_enabled()), and the * @argv array contains one of the recognized help options, * this function will produce help output to stdout and * call `exit (0)`. * * Note that function depends on the [current locale][setlocale] for * automatic character set conversion of string and filename * arguments. * * Params: * argv = a pointer to the array of command line arguments * * Returns: %TRUE if the parsing was successful, * %FALSE if an error occurred * * Since: 2.6 * * Throws: GException on failure. */ public bool parse(ref string[] argv) { int argc = cast(int)argv.length; char** outargv = Str.toStringzArray(argv); GError* err = null; auto p = g_option_context_parse(gOptionContext, &argc, &outargv, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } argv = Str.toStringArray(outargv, argc); return p; } /** * Parses the command line arguments. * * This function is similar to g_option_context_parse() except that it * respects the normal memory rules when dealing with a strv instead of * assuming that the passed-in array is the argv of the main function. * * In particular, strings that are removed from the arguments list will * be freed using g_free(). * * On Windows, the strings are expected to be in UTF-8. This is in * contrast to g_option_context_parse() which expects them to be in the * system codepage, which is how they are passed as @argv to main(). * See g_win32_get_command_line() for a solution. * * This function is useful if you are trying to use #GOptionContext with * #GApplication. * * Params: * arguments = a pointer to the * command line arguments (which must be in UTF-8 on Windows) * * Returns: %TRUE if the parsing was successful, * %FALSE if an error occurred * * Since: 2.40 * * Throws: GException on failure. */ public bool parseStrv(ref string[] arguments) { char** outarguments = Str.toStringzArray(arguments); GError* err = null; auto p = g_option_context_parse_strv(gOptionContext, &outarguments, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } arguments = Str.toStringArray(outarguments); return p; } /** * Adds a string to be displayed in `--help` output after the list * of options. This text often includes a bug reporting address. * * Note that the summary is translated (see * g_option_context_set_translate_func()). * * Params: * description = a string to be shown in `--help` output * after the list of options, or %NULL * * Since: 2.12 */ public void setDescription(string description) { g_option_context_set_description(gOptionContext, Str.toStringz(description)); } /** * Enables or disables automatic generation of `--help` output. * By default, g_option_context_parse() recognizes `--help`, `-h`, * `-?`, `--help-all` and `--help-groupname` and creates suitable * output to stdout. * * Params: * helpEnabled = %TRUE to enable `--help`, %FALSE to disable it * * Since: 2.6 */ public void setHelpEnabled(bool helpEnabled) { g_option_context_set_help_enabled(gOptionContext, helpEnabled); } /** * Sets whether to ignore unknown options or not. If an argument is * ignored, it is left in the @argv array after parsing. By default, * g_option_context_parse() treats unknown options as error. * * This setting does not affect non-option arguments (i.e. arguments * which don't start with a dash). But note that GOption cannot reliably * determine whether a non-option belongs to a preceding unknown option. * * Params: * ignoreUnknown = %TRUE to ignore unknown options, %FALSE to produce * an error when unknown options are met * * Since: 2.6 */ public void setIgnoreUnknownOptions(bool ignoreUnknown) { g_option_context_set_ignore_unknown_options(gOptionContext, ignoreUnknown); } /** * Sets a #GOptionGroup as main group of the @context. * This has the same effect as calling g_option_context_add_group(), * the only difference is that the options in the main group are * treated differently when generating `--help` output. * * Params: * group = the group to set as main group * * Since: 2.6 */ public void setMainGroup(OptionGroup group) { g_option_context_set_main_group(gOptionContext, (group is null) ? null : group.getOptionGroupStruct(true)); } /** * Sets strict POSIX mode. * * By default, this mode is disabled. * * In strict POSIX mode, the first non-argument parameter encountered * (eg: filename) terminates argument processing. Remaining arguments * are treated as non-options and are not attempted to be parsed. * * If strict POSIX mode is disabled then parsing is done in the GNU way * where option arguments can be freely mixed with non-options. * * As an example, consider "ls foo -l". With GNU style parsing, this * will list "foo" in long mode. In strict POSIX style, this will list * the files named "foo" and "-l". * * It may be useful to force strict POSIX mode when creating "verb * style" command line tools. For example, the "gsettings" command line * tool supports the global option "--schemadir" as well as many * subcommands ("get", "set", etc.) which each have their own set of * arguments. Using strict POSIX mode will allow parsing the global * options up to the verb name while leaving the remaining options to be * parsed by the relevant subcommand (which can be determined by * examining the verb name, which should be present in argv[1] after * parsing). * * Params: * strictPosix = the new value * * Since: 2.44 */ public void setStrictPosix(bool strictPosix) { g_option_context_set_strict_posix(gOptionContext, strictPosix); } /** * Adds a string to be displayed in `--help` output before the list * of options. This is typically a summary of the program functionality. * * Note that the summary is translated (see * g_option_context_set_translate_func() and * g_option_context_set_translation_domain()). * * Params: * summary = a string to be shown in `--help` output * before the list of options, or %NULL * * Since: 2.12 */ public void setSummary(string summary) { g_option_context_set_summary(gOptionContext, Str.toStringz(summary)); } /** * Sets the function which is used to translate the contexts * user-visible strings, for `--help` output. If @func is %NULL, * strings are not translated. * * Note that option groups have their own translation functions, * this function only affects the @parameter_string (see g_option_context_new()), * the summary (see g_option_context_set_summary()) and the description * (see g_option_context_set_description()). * * If you are using gettext(), you only need to set the translation * domain, see g_option_context_set_translation_domain(). * * Params: * func = the #GTranslateFunc, or %NULL * data = user data to pass to @func, or %NULL * destroyNotify = a function which gets called to free @data, or %NULL * * Since: 2.12 */ public void setTranslateFunc(GTranslateFunc func, void* data, GDestroyNotify destroyNotify) { g_option_context_set_translate_func(gOptionContext, func, data, destroyNotify); } /** * A convenience function to use gettext() for translating * user-visible strings. * * Params: * domain = the domain to use * * Since: 2.12 */ public void setTranslationDomain(string domain) { g_option_context_set_translation_domain(gOptionContext, Str.toStringz(domain)); } /** * Creates a new option context. * * The @parameter_string can serve multiple purposes. It can be used * to add descriptions for "rest" arguments, which are not parsed by * the #GOptionContext, typically something like "FILES" or * "FILE1 FILE2...". If you are using #G_OPTION_REMAINING for * collecting "rest" arguments, GLib handles this automatically by * using the @arg_description of the corresponding #GOptionEntry in * the usage summary. * * Another usage is to give a short summary of the program * functionality, like " - frob the strings", which will be displayed * in the same line as the usage. For a longer description of the * program functionality that should be displayed as a paragraph * below the usage line, use g_option_context_set_summary(). * * Note that the @parameter_string is translated using the * function set with g_option_context_set_translate_func(), so * it should normally be passed untranslated. * * Params: * parameterString = a string which is displayed in * the first line of `--help` output, after the usage summary * `programname [OPTION...]` * * Returns: a newly created #GOptionContext, which must be * freed with g_option_context_free() after use. * * Since: 2.6 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string parameterString) { auto p = g_option_context_new(Str.toStringz(parameterString)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GOptionContext*) p); } /** */ public static GQuark optionErrorQuark() { return g_option_error_quark(); } } GtkD-3.7.5/generated/gtkd/glib/OptionGroup.d000066400000000000000000000156241324604450400206270ustar00rootroot00000000000000/* * 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 glib.OptionGroup; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * A `GOptionGroup` struct defines the options in a single * group. The struct has only private fields and should not be directly accessed. * * All options in a group share the same translation function. Libraries which * need to parse commandline options are expected to provide a function for * getting a `GOptionGroup` holding their options, which * the application can then add to its #GOptionContext. */ public class OptionGroup { /** the main Gtk struct */ protected GOptionGroup* gOptionGroup; protected bool ownedRef; /** Get the main Gtk struct */ public GOptionGroup* getOptionGroupStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gOptionGroup; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gOptionGroup; } /** * Sets our main struct and passes it to the parent class. */ public this (GOptionGroup* gOptionGroup, bool ownedRef = false) { this.gOptionGroup = gOptionGroup; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_option_group_unref(gOptionGroup); } /** * Creates a new #GOptionGroup. * * Params: * name = the name for the option group, this is used to provide * help for the options in this group with `--help-`@name * description = a description for this group to be shown in * `--help`. This string is translated using the translation * domain or translation function of the group * helpDescription = a description for the `--help-`@name option. * This string is translated using the translation domain or translation function * of the group * userData = user data that will be passed to the pre- and post-parse hooks, * the error hook and to callbacks of %G_OPTION_ARG_CALLBACK options, or %NULL * destroy = a function that will be called to free @user_data, or %NULL * * Returns: a newly created option group. It should be added * to a #GOptionContext or freed with g_option_group_unref(). * * Since: 2.6 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, string description, string helpDescription, void* userData, GDestroyNotify destroy) { auto p = g_option_group_new(Str.toStringz(name), Str.toStringz(description), Str.toStringz(helpDescription), userData, destroy); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GOptionGroup*) p); } /** * Adds the options specified in @entries to @group. * * Params: * entries = a %NULL-terminated array of #GOptionEntrys * * Since: 2.6 */ public void addEntries(GOptionEntry* entries) { g_option_group_add_entries(gOptionGroup, entries); } /** * Frees a #GOptionGroup. Note that you must not free groups * which have been added to a #GOptionContext. * * Deprecated: Use g_option_group_unref() instead. * * Since: 2.6 */ public void free() { g_option_group_free(gOptionGroup); ownedRef = false; } /** * Increments the reference count of @group by one. * * Returns: a #GoptionGroup * * Since: 2.44 */ public OptionGroup doref() { auto p = g_option_group_ref(gOptionGroup); if(p is null) { return null; } return new OptionGroup(cast(GOptionGroup*) p, true); } /** * Associates a function with @group which will be called * from g_option_context_parse() when an error occurs. * * Note that the user data to be passed to @error_func can be * specified when constructing the group with g_option_group_new(). * * Params: * errorFunc = a function to call when an error occurs * * Since: 2.6 */ public void setErrorHook(GOptionErrorFunc errorFunc) { g_option_group_set_error_hook(gOptionGroup, errorFunc); } /** * Associates two functions with @group which will be called * from g_option_context_parse() before the first option is parsed * and after the last option has been parsed, respectively. * * Note that the user data to be passed to @pre_parse_func and * @post_parse_func can be specified when constructing the group * with g_option_group_new(). * * Params: * preParseFunc = a function to call before parsing, or %NULL * postParseFunc = a function to call after parsing, or %NULL * * Since: 2.6 */ public void setParseHooks(GOptionParseFunc preParseFunc, GOptionParseFunc postParseFunc) { g_option_group_set_parse_hooks(gOptionGroup, preParseFunc, postParseFunc); } /** * Sets the function which is used to translate user-visible strings, * for `--help` output. Different groups can use different * #GTranslateFuncs. If @func is %NULL, strings are not translated. * * If you are using gettext(), you only need to set the translation * domain, see g_option_group_set_translation_domain(). * * Params: * func = the #GTranslateFunc, or %NULL * data = user data to pass to @func, or %NULL * destroyNotify = a function which gets called to free @data, or %NULL * * Since: 2.6 */ public void setTranslateFunc(GTranslateFunc func, void* data, GDestroyNotify destroyNotify) { g_option_group_set_translate_func(gOptionGroup, func, data, destroyNotify); } /** * A convenience function to use gettext() for translating * user-visible strings. * * Params: * domain = the domain to use * * Since: 2.6 */ public void setTranslationDomain(string domain) { g_option_group_set_translation_domain(gOptionGroup, Str.toStringz(domain)); } /** * Decrements the reference count of @group by one. * If the reference count drops to 0, the @group will be freed. * and all memory allocated by the @group is released. * * Since: 2.44 */ public void unref() { g_option_group_unref(gOptionGroup); } } GtkD-3.7.5/generated/gtkd/glib/Pattern.d000066400000000000000000000130451324604450400177520ustar00rootroot00000000000000/* * 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 glib.Pattern; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * A GPatternSpec struct is the 'compiled' form of a pattern. This * structure is opaque and its fields cannot be accessed directly. */ public class Pattern { /** the main Gtk struct */ protected GPatternSpec* gPatternSpec; protected bool ownedRef; /** Get the main Gtk struct */ public GPatternSpec* getPatternStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gPatternSpec; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gPatternSpec; } /** * Sets our main struct and passes it to the parent class. */ public this (GPatternSpec* gPatternSpec, bool ownedRef = false) { this.gPatternSpec = gPatternSpec; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_pattern_spec_free(gPatternSpec); } /** * Compares two compiled pattern specs and returns whether they will * match the same set of strings. * * Params: * pspec2 = another #GPatternSpec * * Returns: Whether the compiled patterns are equal */ public bool equal(Pattern pspec2) { return g_pattern_spec_equal(gPatternSpec, (pspec2 is null) ? null : pspec2.getPatternStruct()) != 0; } /** * Frees the memory allocated for the #GPatternSpec. */ public void free() { g_pattern_spec_free(gPatternSpec); ownedRef = false; } /** * Compiles a pattern to a #GPatternSpec. * * Params: * pattern = a zero-terminated UTF-8 encoded string * * Returns: a newly-allocated #GPatternSpec * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string pattern) { auto p = g_pattern_spec_new(Str.toStringz(pattern)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GPatternSpec*) p); } /** * Matches a string against a compiled pattern. Passing the correct * length of the string given is mandatory. The reversed string can be * omitted by passing %NULL, this is more efficient if the reversed * version of the string to be matched is not at hand, as * g_pattern_match() will only construct it if the compiled pattern * requires reverse matches. * * Note that, if the user code will (possibly) match a string against a * multitude of patterns containing wildcards, chances are high that * some patterns will require a reversed string. In this case, it's * more efficient to provide the reversed string to avoid multiple * constructions thereof in the various calls to g_pattern_match(). * * Note also that the reverse of a UTF-8 encoded string can in general * not be obtained by g_strreverse(). This works only if the string * does not contain any multibyte characters. GLib offers the * g_utf8_strreverse() function to reverse UTF-8 encoded strings. * * Params: * pspec = a #GPatternSpec * stringLength = the length of @string (in bytes, i.e. strlen(), * not g_utf8_strlen()) * str = the UTF-8 encoded string to match * stringReversed = the reverse of @string or %NULL * * Returns: %TRUE if @string matches @pspec */ public static bool patternMatch(Pattern pspec, uint stringLength, string str, string stringReversed) { return g_pattern_match((pspec is null) ? null : pspec.getPatternStruct(), stringLength, Str.toStringz(str), Str.toStringz(stringReversed)) != 0; } /** * Matches a string against a pattern given as a string. If this * function is to be called in a loop, it's more efficient to compile * the pattern once with g_pattern_spec_new() and call * g_pattern_match_string() repeatedly. * * Params: * pattern = the UTF-8 encoded pattern * str = the UTF-8 encoded string to match * * Returns: %TRUE if @string matches @pspec */ public static bool patternMatchSimple(string pattern, string str) { return g_pattern_match_simple(Str.toStringz(pattern), Str.toStringz(str)) != 0; } /** * Matches a string against a compiled pattern. If the string is to be * matched against more than one pattern, consider using * g_pattern_match() instead while supplying the reversed string. * * Params: * pspec = a #GPatternSpec * str = the UTF-8 encoded string to match * * Returns: %TRUE if @string matches @pspec */ public static bool patternMatchString(Pattern pspec, string str) { return g_pattern_match_string((pspec is null) ? null : pspec.getPatternStruct(), Str.toStringz(str)) != 0; } } GtkD-3.7.5/generated/gtkd/glib/Private.d000066400000000000000000000070151324604450400177470ustar00rootroot00000000000000/* * 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 glib.Private; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The #GPrivate struct is an opaque data structure to represent a * thread-local data key. It is approximately equivalent to the * pthread_setspecific()/pthread_getspecific() APIs on POSIX and to * TlsSetValue()/TlsGetValue() on Windows. * * If you don't already know why you might want this functionality, * then you probably don't need it. * * #GPrivate is a very limited resource (as far as 128 per program, * shared between all libraries). It is also not possible to destroy a * #GPrivate after it has been used. As such, it is only ever acceptable * to use #GPrivate in static scope, and even then sparingly so. * * See G_PRIVATE_INIT() for a couple of examples. * * The #GPrivate structure should be considered opaque. It should only * be accessed via the g_private_ functions. */ public class Private { /** the main Gtk struct */ protected GPrivate* gPrivate; protected bool ownedRef; /** Get the main Gtk struct */ public GPrivate* getPrivateStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gPrivate; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gPrivate; } /** * Sets our main struct and passes it to the parent class. */ public this (GPrivate* gPrivate, bool ownedRef = false) { this.gPrivate = gPrivate; this.ownedRef = ownedRef; } /** * Returns the current value of the thread local variable @key. * * If the value has not yet been set in this thread, %NULL is returned. * Values are never copied between threads (when a new thread is * created, for example). * * Returns: the thread-local value */ public void* get() { return g_private_get(gPrivate); } /** * Sets the thread local variable @key to have the value @value in the * current thread. * * This function differs from g_private_set() in the following way: if * the previous value was non-%NULL then the #GDestroyNotify handler for * @key is run on it. * * Params: * value = the new value * * Since: 2.32 */ public void replace(void* value) { g_private_replace(gPrivate, value); } /** * Sets the thread local variable @key to have the value @value in the * current thread. * * This function differs from g_private_replace() in the following way: * the #GDestroyNotify for @key is not called on the old value. * * Params: * value = the new value */ public void set(void* value) { g_private_set(gPrivate, value); } } GtkD-3.7.5/generated/gtkd/glib/PtrArray.d000066400000000000000000000334601324604450400201040ustar00rootroot00000000000000/* * 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 glib.PtrArray; private import glib.ConstructionException; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * Contains the public fields of a pointer array. */ public class PtrArray { /** the main Gtk struct */ protected GPtrArray* gPtrArray; protected bool ownedRef; /** Get the main Gtk struct */ public GPtrArray* getPtrArrayStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gPtrArray; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gPtrArray; } /** * Sets our main struct and passes it to the parent class. */ public this (GPtrArray* gPtrArray, bool ownedRef = false) { this.gPtrArray = gPtrArray; this.ownedRef = ownedRef; } /** * Adds a pointer to the end of the pointer array. The array will grow * in size automatically if necessary. * * Params: * data = the pointer to add */ public void add(void* data) { g_ptr_array_add(gPtrArray, data); } /** * Checks whether @needle exists in @haystack. If the element is found, %TRUE is * returned and the element’s index is returned in @index_ (if non-%NULL). * Otherwise, %FALSE is returned and @index_ is undefined. If @needle exists * multiple times in @haystack, the index of the first instance is returned. * * This does pointer comparisons only. If you want to use more complex equality * checks, such as string comparisons, use g_ptr_array_find_with_equal_func(). * * Params: * needle = pointer to look for * index = return location for the index of * the element, if found * * Returns: %TRUE if @needle is one of the elements of @haystack * * Since: 2.54 */ public bool find(void* needle, out uint index) { return g_ptr_array_find(gPtrArray, needle, &index) != 0; } /** * Checks whether @needle exists in @haystack, using the given @equal_func. * If the element is found, %TRUE is returned and the element’s index is * returned in @index_ (if non-%NULL). Otherwise, %FALSE is returned and @index_ * is undefined. If @needle exists multiple times in @haystack, the index of * the first instance is returned. * * @equal_func is called with the element from the array as its first parameter, * and @needle as its second parameter. If @equal_func is %NULL, pointer * equality is used. * * Params: * needle = pointer to look for * equalFunc = the function to call for each element, which should * return %TRUE when the desired element is found; or %NULL to use pointer * equality * index = return location for the index of * the element, if found * * Returns: %TRUE if @needle is one of the elements of @haystack * * Since: 2.54 */ public bool findWithEqualFunc(void* needle, GEqualFunc equalFunc, out uint index) { return g_ptr_array_find_with_equal_func(gPtrArray, needle, equalFunc, &index) != 0; } /** * Calls a function for each element of a #GPtrArray. * * Params: * func = the function to call for each array element * userData = user data to pass to the function * * Since: 2.4 */ public void foreac(GFunc func, void* userData) { g_ptr_array_foreach(gPtrArray, func, userData); } /** * Frees the memory allocated for the #GPtrArray. If @free_seg is %TRUE * it frees the memory block holding the elements as well. Pass %FALSE * if you want to free the #GPtrArray wrapper but preserve the * underlying array for use elsewhere. If the reference count of @array * is greater than one, the #GPtrArray wrapper is preserved but the * size of @array will be set to zero. * * If array contents point to dynamically-allocated memory, they should * be freed separately if @free_seg is %TRUE and no #GDestroyNotify * function has been set for @array. * * This function is not thread-safe. If using a #GPtrArray from multiple * threads, use only the atomic g_ptr_array_ref() and g_ptr_array_unref() * functions. * * Params: * freeSeg = if %TRUE the actual pointer array is freed as well * * Returns: the pointer array if @free_seg is %FALSE, otherwise %NULL. * The pointer array should be freed using g_free(). */ public void** free(bool freeSeg) { return g_ptr_array_free(gPtrArray, freeSeg); } /** * Inserts an element into the pointer array at the given index. The * array will grow in size automatically if necessary. * * Params: * index = the index to place the new element at, or -1 to append * data = the pointer to add. * * Since: 2.40 */ public void insert(int index, void* data) { g_ptr_array_insert(gPtrArray, index, data); } /** * Creates a new #GPtrArray with a reference count of 1. * * Returns: the new #GPtrArray * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_ptr_array_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GPtrArray*) p); } /** * Creates a new #GPtrArray with @reserved_size pointers preallocated * and a reference count of 1. This avoids frequent reallocation, if * you are going to add many pointers to the array. Note however that * the size of the array is still 0. It also set @element_free_func * for freeing each element when the array is destroyed either via * g_ptr_array_unref(), when g_ptr_array_free() is called with * @free_segment set to %TRUE or when removing elements. * * Params: * reservedSize = number of pointers preallocated * elementFreeFunc = A function to free elements with * destroy @array or %NULL * * Returns: A new #GPtrArray * * Since: 2.30 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint reservedSize, GDestroyNotify elementFreeFunc) { auto p = g_ptr_array_new_full(reservedSize, elementFreeFunc); if(p is null) { throw new ConstructionException("null returned by new_full"); } this(cast(GPtrArray*) p); } /** * Creates a new #GPtrArray with a reference count of 1 and use * @element_free_func for freeing each element when the array is destroyed * either via g_ptr_array_unref(), when g_ptr_array_free() is called with * @free_segment set to %TRUE or when removing elements. * * Params: * elementFreeFunc = A function to free elements with * destroy @array or %NULL * * Returns: A new #GPtrArray * * Since: 2.22 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GDestroyNotify elementFreeFunc) { auto p = g_ptr_array_new_with_free_func(elementFreeFunc); if(p is null) { throw new ConstructionException("null returned by new_with_free_func"); } this(cast(GPtrArray*) p); } /** * Atomically increments the reference count of @array by one. * This function is thread-safe and may be called from any thread. * * Returns: The passed in #GPtrArray * * Since: 2.22 */ public PtrArray doref() { auto p = g_ptr_array_ref(gPtrArray); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p); } /** * Removes the first occurrence of the given pointer from the pointer * array. The following elements are moved down one place. If @array * has a non-%NULL #GDestroyNotify function it is called for the * removed element. * * It returns %TRUE if the pointer was removed, or %FALSE if the * pointer was not found. * * Params: * data = the pointer to remove * * Returns: %TRUE if the pointer is removed, %FALSE if the pointer * is not found in the array */ public bool remove(void* data) { return g_ptr_array_remove(gPtrArray, data) != 0; } /** * Removes the first occurrence of the given pointer from the pointer * array. The last element in the array is used to fill in the space, * so this function does not preserve the order of the array. But it * is faster than g_ptr_array_remove(). If @array has a non-%NULL * #GDestroyNotify function it is called for the removed element. * * It returns %TRUE if the pointer was removed, or %FALSE if the * pointer was not found. * * Params: * data = the pointer to remove * * Returns: %TRUE if the pointer was found in the array */ public bool removeFast(void* data) { return g_ptr_array_remove_fast(gPtrArray, data) != 0; } /** * Removes the pointer at the given index from the pointer array. * The following elements are moved down one place. If @array has * a non-%NULL #GDestroyNotify function it is called for the removed * element. * * Params: * index = the index of the pointer to remove * * Returns: the pointer which was removed */ public void* removeIndex(uint index) { return g_ptr_array_remove_index(gPtrArray, index); } /** * Removes the pointer at the given index from the pointer array. * The last element in the array is used to fill in the space, so * this function does not preserve the order of the array. But it * is faster than g_ptr_array_remove_index(). If @array has a non-%NULL * #GDestroyNotify function it is called for the removed element. * * Params: * index = the index of the pointer to remove * * Returns: the pointer which was removed */ public void* removeIndexFast(uint index) { return g_ptr_array_remove_index_fast(gPtrArray, index); } /** * Removes the given number of pointers starting at the given index * from a #GPtrArray. The following elements are moved to close the * gap. If @array has a non-%NULL #GDestroyNotify function it is * called for the removed elements. * * Params: * index = the index of the first pointer to remove * length = the number of pointers to remove * * Returns: the @array * * Since: 2.4 */ public PtrArray removeRange(uint index, uint length) { auto p = g_ptr_array_remove_range(gPtrArray, index, length); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p); } /** * Sets a function for freeing each element when @array is destroyed * either via g_ptr_array_unref(), when g_ptr_array_free() is called * with @free_segment set to %TRUE or when removing elements. * * Params: * elementFreeFunc = A function to free elements with * destroy @array or %NULL * * Since: 2.22 */ public void setFreeFunc(GDestroyNotify elementFreeFunc) { g_ptr_array_set_free_func(gPtrArray, elementFreeFunc); } /** * Sets the size of the array. When making the array larger, * newly-added elements will be set to %NULL. When making it smaller, * if @array has a non-%NULL #GDestroyNotify function then it will be * called for the removed elements. * * Params: * length = the new length of the pointer array */ public void setSize(int length) { g_ptr_array_set_size(gPtrArray, length); } /** * Creates a new #GPtrArray with @reserved_size pointers preallocated * and a reference count of 1. This avoids frequent reallocation, if * you are going to add many pointers to the array. Note however that * the size of the array is still 0. * * Params: * reservedSize = number of pointers preallocated * * Returns: the new #GPtrArray */ public static PtrArray sizedNew(uint reservedSize) { auto p = g_ptr_array_sized_new(reservedSize); if(p is null) { return null; } return new PtrArray(cast(GPtrArray*) p); } /** * Sorts the array, using @compare_func which should be a qsort()-style * comparison function (returns less than zero for first arg is less * than second arg, zero for equal, greater than zero if irst arg is * greater than second arg). * * Note that the comparison function for g_ptr_array_sort() doesn't * take the pointers from the array as arguments, it takes pointers to * the pointers in the array. * * This is guaranteed to be a stable sort since version 2.32. * * Params: * compareFunc = comparison function */ public void sort(GCompareFunc compareFunc) { g_ptr_array_sort(gPtrArray, compareFunc); } /** * Like g_ptr_array_sort(), but the comparison function has an extra * user data argument. * * Note that the comparison function for g_ptr_array_sort_with_data() * doesn't take the pointers from the array as arguments, it takes * pointers to the pointers in the array. * * This is guaranteed to be a stable sort since version 2.32. * * Params: * compareFunc = comparison function * userData = data to pass to @compare_func */ public void sortWithData(GCompareDataFunc compareFunc, void* userData) { g_ptr_array_sort_with_data(gPtrArray, compareFunc, userData); } /** * Atomically decrements the reference count of @array by one. If the * reference count drops to 0, the effect is the same as calling * g_ptr_array_free() with @free_segment set to %TRUE. This function * is thread-safe and may be called from any thread. * * Since: 2.22 */ public void unref() { g_ptr_array_unref(gPtrArray); } } GtkD-3.7.5/generated/gtkd/glib/Quark.d000066400000000000000000000102221324604450400174120ustar00rootroot00000000000000/* * 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 glib.Quark; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Quark { /** * Returns a canonical representation for @string. Interned strings * can be compared for equality by comparing the pointers, instead of * using strcmp(). g_intern_static_string() does not copy the string, * therefore @string must not be freed or modified. * * Params: * str = a static string * * Returns: a canonical representation for the string * * Since: 2.10 */ public static string internStaticString(string str) { return Str.toString(g_intern_static_string(Str.toStringz(str))); } /** * Returns a canonical representation for @string. Interned strings * can be compared for equality by comparing the pointers, instead of * using strcmp(). * * Params: * str = a string * * Returns: a canonical representation for the string * * Since: 2.10 */ public static string internString(string str) { return Str.toString(g_intern_string(Str.toStringz(str))); } /** * Gets the #GQuark identifying the given (static) string. If the * string does not currently have an associated #GQuark, a new #GQuark * is created, linked to the given string. * * Note that this function is identical to g_quark_from_string() except * that if a new #GQuark is created the string itself is used rather * than a copy. This saves memory, but can only be used if the string * will continue to exist until the program terminates. It can be used * with statically allocated strings in the main program, but not with * statically allocated memory in dynamically loaded modules, if you * expect to ever unload the module again (e.g. do not use this * function in GTK+ theme engines). * * Params: * str = a string * * Returns: the #GQuark identifying the string, or 0 if @string is %NULL */ public static GQuark quarkFromStaticString(string str) { return g_quark_from_static_string(Str.toStringz(str)); } /** * Gets the #GQuark identifying the given string. If the string does * not currently have an associated #GQuark, a new #GQuark is created, * using a copy of the string. * * Params: * str = a string * * Returns: the #GQuark identifying the string, or 0 if @string is %NULL */ public static GQuark quarkFromString(string str) { return g_quark_from_string(Str.toStringz(str)); } /** * Gets the string associated with the given #GQuark. * * Params: * quark = a #GQuark. * * Returns: the string associated with the #GQuark */ public static string quarkToString(GQuark quark) { return Str.toString(g_quark_to_string(quark)); } /** * Gets the #GQuark associated with the given string, or 0 if string is * %NULL or it has no associated #GQuark. * * If you want the GQuark to be created if it doesn't already exist, * use g_quark_from_string() or g_quark_from_static_string(). * * Params: * str = a string * * Returns: the #GQuark associated with the string, or 0 if @string is * %NULL or there is no #GQuark associated with it */ public static GQuark quarkTryString(string str) { return g_quark_try_string(Str.toStringz(str)); } } GtkD-3.7.5/generated/gtkd/glib/QueueG.d000066400000000000000000000361121324604450400175300ustar00rootroot00000000000000/* * 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 glib.QueueG; private import glib.ConstructionException; private import glib.ListG; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * Contains the public fields of a * [Queue][glib-Double-ended-Queues]. */ public class QueueG { /** the main Gtk struct */ protected GQueue* gQueue; protected bool ownedRef; /** Get the main Gtk struct */ public GQueue* getQueueGStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gQueue; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gQueue; } /** * Sets our main struct and passes it to the parent class. */ public this (GQueue* gQueue, bool ownedRef = false) { this.gQueue = gQueue; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_queue_free(gQueue); } /** * Removes all the elements in @queue. If queue elements contain * dynamically-allocated memory, they should be freed first. * * Since: 2.14 */ public void clear() { g_queue_clear(gQueue); } /** * Copies a @queue. Note that is a shallow copy. If the elements in the * queue consist of pointers to data, the pointers are copied, but the * actual data is not. * * Returns: a copy of @queue * * Since: 2.4 */ public QueueG copy() { auto p = g_queue_copy(gQueue); if(p is null) { return null; } return new QueueG(cast(GQueue*) p); } /** * Removes @link_ from @queue and frees it. * * @link_ must be part of @queue. * * Params: * link = a #GList link that must be part of @queue * * Since: 2.4 */ public void deleteLink(ListG link) { g_queue_delete_link(gQueue, (link is null) ? null : link.getListGStruct()); } /** * Finds the first link in @queue which contains @data. * * Params: * data = data to find * * Returns: the first link in @queue which contains @data * * Since: 2.4 */ public ListG find(void* data) { auto p = g_queue_find(gQueue, data); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Finds an element in a #GQueue, using a supplied function to find the * desired element. It iterates over the queue, calling the given function * which should return 0 when the desired element is found. The function * takes two gconstpointer arguments, the #GQueue element's data as the * first argument and the given user data as the second argument. * * Params: * data = user data passed to @func * func = a #GCompareFunc to call for each element. It should return 0 * when the desired element is found * * Returns: the found link, or %NULL if it wasn't found * * Since: 2.4 */ public ListG findCustom(void* data, GCompareFunc func) { auto p = g_queue_find_custom(gQueue, data, func); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Calls @func for each element in the queue passing @user_data to the * function. * * Params: * func = the function to call for each element's data * userData = user data to pass to @func * * Since: 2.4 */ public void foreac(GFunc func, void* userData) { g_queue_foreach(gQueue, func, userData); } /** * Frees the memory allocated for the #GQueue. Only call this function * if @queue was created with g_queue_new(). If queue elements contain * dynamically-allocated memory, they should be freed first. * * If queue elements contain dynamically-allocated memory, you should * either use g_queue_free_full() or free them manually first. */ public void free() { g_queue_free(gQueue); ownedRef = false; } /** * Convenience method, which frees all the memory used by a #GQueue, * and calls the specified destroy function on every element's data. * * Params: * freeFunc = the function to be called to free each element's data * * Since: 2.32 */ public void freeFull(GDestroyNotify freeFunc) { g_queue_free_full(gQueue, freeFunc); } /** * Returns the number of items in @queue. * * Returns: the number of items in @queue * * Since: 2.4 */ public uint getLength() { return g_queue_get_length(gQueue); } /** * Returns the position of the first element in @queue which contains @data. * * Params: * data = the data to find * * Returns: the position of the first element in @queue which * contains @data, or -1 if no element in @queue contains @data * * Since: 2.4 */ public int index(void* data) { return g_queue_index(gQueue, data); } /** * A statically-allocated #GQueue must be initialized with this function * before it can be used. Alternatively you can initialize it with * #G_QUEUE_INIT. It is not necessary to initialize queues created with * g_queue_new(). * * Since: 2.14 */ public void init() { g_queue_init(gQueue); } /** * Inserts @data into @queue after @sibling. * * @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the * data at the head of the queue. * * Params: * sibling = a #GList link that must be part of @queue, or %NULL to * push at the head of the queue. * data = the data to insert * * Since: 2.4 */ public void insertAfter(ListG sibling, void* data) { g_queue_insert_after(gQueue, (sibling is null) ? null : sibling.getListGStruct(), data); } /** * Inserts @data into @queue before @sibling. * * @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the * data at the tail of the queue. * * Params: * sibling = a #GList link that must be part of @queue, or %NULL to * push at the tail of the queue. * data = the data to insert * * Since: 2.4 */ public void insertBefore(ListG sibling, void* data) { g_queue_insert_before(gQueue, (sibling is null) ? null : sibling.getListGStruct(), data); } /** * Inserts @data into @queue using @func to determine the new position. * * Params: * data = the data to insert * func = the #GCompareDataFunc used to compare elements in the queue. It is * called with two elements of the @queue and @user_data. It should * return 0 if the elements are equal, a negative value if the first * element comes before the second, and a positive value if the second * element comes before the first. * userData = user data passed to @func * * Since: 2.4 */ public void insertSorted(void* data, GCompareDataFunc func, void* userData) { g_queue_insert_sorted(gQueue, data, func, userData); } /** * Returns %TRUE if the queue is empty. * * Returns: %TRUE if the queue is empty */ public bool isEmpty() { return g_queue_is_empty(gQueue) != 0; } /** * Returns the position of @link_ in @queue. * * Params: * link = a #GList link * * Returns: the position of @link_, or -1 if the link is * not part of @queue * * Since: 2.4 */ public int linkIndex(ListG link) { return g_queue_link_index(gQueue, (link is null) ? null : link.getListGStruct()); } /** * Returns the first element of the queue. * * Returns: the data of the first element in the queue, or %NULL * if the queue is empty */ public void* peekHead() { return g_queue_peek_head(gQueue); } /** * Returns the first link in @queue. * * Returns: the first link in @queue, or %NULL if @queue is empty * * Since: 2.4 */ public ListG peekHeadLink() { auto p = g_queue_peek_head_link(gQueue); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Returns the @n'th element of @queue. * * Params: * n = the position of the element * * Returns: the data for the @n'th element of @queue, * or %NULL if @n is off the end of @queue * * Since: 2.4 */ public void* peekNth(uint n) { return g_queue_peek_nth(gQueue, n); } /** * Returns the link at the given position * * Params: * n = the position of the link * * Returns: the link at the @n'th position, or %NULL * if @n is off the end of the list * * Since: 2.4 */ public ListG peekNthLink(uint n) { auto p = g_queue_peek_nth_link(gQueue, n); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Returns the last element of the queue. * * Returns: the data of the last element in the queue, or %NULL * if the queue is empty */ public void* peekTail() { return g_queue_peek_tail(gQueue); } /** * Returns the last link in @queue. * * Returns: the last link in @queue, or %NULL if @queue is empty * * Since: 2.4 */ public ListG peekTailLink() { auto p = g_queue_peek_tail_link(gQueue); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Removes the first element of the queue and returns its data. * * Returns: the data of the first element in the queue, or %NULL * if the queue is empty */ public void* popHead() { return g_queue_pop_head(gQueue); } /** * Removes and returns the first element of the queue. * * Returns: the #GList element at the head of the queue, or %NULL * if the queue is empty */ public ListG popHeadLink() { auto p = g_queue_pop_head_link(gQueue); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Removes the @n'th element of @queue and returns its data. * * Params: * n = the position of the element * * Returns: the element's data, or %NULL if @n is off the end of @queue * * Since: 2.4 */ public void* popNth(uint n) { return g_queue_pop_nth(gQueue, n); } /** * Removes and returns the link at the given position. * * Params: * n = the link's position * * Returns: the @n'th link, or %NULL if @n is off the end of @queue * * Since: 2.4 */ public ListG popNthLink(uint n) { auto p = g_queue_pop_nth_link(gQueue, n); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Removes the last element of the queue and returns its data. * * Returns: the data of the last element in the queue, or %NULL * if the queue is empty */ public void* popTail() { return g_queue_pop_tail(gQueue); } /** * Removes and returns the last element of the queue. * * Returns: the #GList element at the tail of the queue, or %NULL * if the queue is empty */ public ListG popTailLink() { auto p = g_queue_pop_tail_link(gQueue); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Adds a new element at the head of the queue. * * Params: * data = the data for the new element. */ public void pushHead(void* data) { g_queue_push_head(gQueue, data); } /** * Adds a new element at the head of the queue. * * Params: * link = a single #GList element, not a list with more than one element */ public void pushHeadLink(ListG link) { g_queue_push_head_link(gQueue, (link is null) ? null : link.getListGStruct()); } /** * Inserts a new element into @queue at the given position. * * Params: * data = the data for the new element * n = the position to insert the new element. If @n is negative or * larger than the number of elements in the @queue, the element is * added to the end of the queue. * * Since: 2.4 */ public void pushNth(void* data, int n) { g_queue_push_nth(gQueue, data, n); } /** * Inserts @link into @queue at the given position. * * Params: * n = the position to insert the link. If this is negative or larger than * the number of elements in @queue, the link is added to the end of * @queue. * link = the link to add to @queue * * Since: 2.4 */ public void pushNthLink(int n, ListG link) { g_queue_push_nth_link(gQueue, n, (link is null) ? null : link.getListGStruct()); } /** * Adds a new element at the tail of the queue. * * Params: * data = the data for the new element */ public void pushTail(void* data) { g_queue_push_tail(gQueue, data); } /** * Adds a new element at the tail of the queue. * * Params: * link = a single #GList element, not a list with more than one element */ public void pushTailLink(ListG link) { g_queue_push_tail_link(gQueue, (link is null) ? null : link.getListGStruct()); } /** * Removes the first element in @queue that contains @data. * * Params: * data = the data to remove * * Returns: %TRUE if @data was found and removed from @queue * * Since: 2.4 */ public bool remove(void* data) { return g_queue_remove(gQueue, data) != 0; } /** * Remove all elements whose data equals @data from @queue. * * Params: * data = the data to remove * * Returns: the number of elements removed from @queue * * Since: 2.4 */ public uint removeAll(void* data) { return g_queue_remove_all(gQueue, data); } /** * Reverses the order of the items in @queue. * * Since: 2.4 */ public void reverse() { g_queue_reverse(gQueue); } /** * Sorts @queue using @compare_func. * * Params: * compareFunc = the #GCompareDataFunc used to sort @queue. This function * is passed two elements of the queue and should return 0 if they are * equal, a negative value if the first comes before the second, and * a positive value if the second comes before the first. * userData = user data passed to @compare_func * * Since: 2.4 */ public void sort(GCompareDataFunc compareFunc, void* userData) { g_queue_sort(gQueue, compareFunc, userData); } /** * Unlinks @link_ so that it will no longer be part of @queue. * The link is not freed. * * @link_ must be part of @queue. * * Params: * link = a #GList link that must be part of @queue * * Since: 2.4 */ public void unlink(ListG link) { g_queue_unlink(gQueue, (link is null) ? null : link.getListGStruct()); } /** * Creates a new #GQueue. * * Returns: a newly allocated #GQueue * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_queue_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GQueue*) p); } } GtkD-3.7.5/generated/gtkd/glib/RWLock.d000066400000000000000000000147331324604450400175030ustar00rootroot00000000000000/* * 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 glib.RWLock; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The GRWLock struct is an opaque data structure to represent a * reader-writer lock. It is similar to a #GMutex in that it allows * multiple threads to coordinate access to a shared resource. * * The difference to a mutex is that a reader-writer lock discriminates * between read-only ('reader') and full ('writer') access. While only * one thread at a time is allowed write access (by holding the 'writer' * lock via g_rw_lock_writer_lock()), multiple threads can gain * simultaneous read-only access (by holding the 'reader' lock via * g_rw_lock_reader_lock()). * * Here is an example for an array with access functions: * |[ * GRWLock lock; * GPtrArray *array; * * gpointer * my_array_get (guint index) * { * gpointer retval = NULL; * * if (!array) * return NULL; * * g_rw_lock_reader_lock (&lock); * if (index < array->len) * retval = g_ptr_array_index (array, index); * g_rw_lock_reader_unlock (&lock); * * return retval; * } * * void * my_array_set (guint index, gpointer data) * { * g_rw_lock_writer_lock (&lock); * * if (!array) * array = g_ptr_array_new (); * * if (index >= array->len) * g_ptr_array_set_size (array, index+1); * g_ptr_array_index (array, index) = data; * * g_rw_lock_writer_unlock (&lock); * } * ]| * This example shows an array which can be accessed by many readers * (the my_array_get() function) simultaneously, whereas the writers * (the my_array_set() function) will only be allowed one at a time * and only if no readers currently access the array. This is because * of the potentially dangerous resizing of the array. Using these * functions is fully multi-thread safe now. * * If a #GRWLock is allocated in static storage then it can be used * without initialisation. Otherwise, you should call * g_rw_lock_init() on it and g_rw_lock_clear() when done. * * A GRWLock should only be accessed with the g_rw_lock_ functions. * * Since: 2.32 */ public class RWLock { /** the main Gtk struct */ protected GRWLock* gRWLock; protected bool ownedRef; /** Get the main Gtk struct */ public GRWLock* getRWLockStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gRWLock; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gRWLock; } /** * Sets our main struct and passes it to the parent class. */ public this (GRWLock* gRWLock, bool ownedRef = false) { this.gRWLock = gRWLock; this.ownedRef = ownedRef; } /** * Frees the resources allocated to a lock with g_rw_lock_init(). * * This function should not be used with a #GRWLock that has been * statically allocated. * * Calling g_rw_lock_clear() when any thread holds the lock * leads to undefined behaviour. * * Sine: 2.32 */ public void clear() { g_rw_lock_clear(gRWLock); } /** * Initializes a #GRWLock so that it can be used. * * This function is useful to initialize a lock that has been * allocated on the stack, or as part of a larger structure. It is not * necessary to initialise a reader-writer lock that has been statically * allocated. * * |[ * typedef struct { * GRWLock l; * ... * } Blob; * * Blob *b; * * b = g_new (Blob, 1); * g_rw_lock_init (&b->l); * ]| * * To undo the effect of g_rw_lock_init() when a lock is no longer * needed, use g_rw_lock_clear(). * * Calling g_rw_lock_init() on an already initialized #GRWLock leads * to undefined behaviour. * * Since: 2.32 */ public void init() { g_rw_lock_init(gRWLock); } /** * Obtain a read lock on @rw_lock. If another thread currently holds * the write lock on @rw_lock or blocks waiting for it, the current * thread will block. Read locks can be taken recursively. * * It is implementation-defined how many threads are allowed to * hold read locks on the same lock simultaneously. * * Since: 2.32 */ public void readerLock() { g_rw_lock_reader_lock(gRWLock); } /** * Tries to obtain a read lock on @rw_lock and returns %TRUE if * the read lock was successfully obtained. Otherwise it * returns %FALSE. * * Returns: %TRUE if @rw_lock could be locked * * Since: 2.32 */ public bool readerTrylock() { return g_rw_lock_reader_trylock(gRWLock) != 0; } /** * Release a read lock on @rw_lock. * * Calling g_rw_lock_reader_unlock() on a lock that is not held * by the current thread leads to undefined behaviour. * * Since: 2.32 */ public void readerUnlock() { g_rw_lock_reader_unlock(gRWLock); } /** * Obtain a write lock on @rw_lock. If any thread already holds * a read or write lock on @rw_lock, the current thread will block * until all other threads have dropped their locks on @rw_lock. * * Since: 2.32 */ public void writerLock() { g_rw_lock_writer_lock(gRWLock); } /** * Tries to obtain a write lock on @rw_lock. If any other thread holds * a read or write lock on @rw_lock, it immediately returns %FALSE. * Otherwise it locks @rw_lock and returns %TRUE. * * Returns: %TRUE if @rw_lock could be locked * * Since: 2.32 */ public bool writerTrylock() { return g_rw_lock_writer_trylock(gRWLock) != 0; } /** * Release a write lock on @rw_lock. * * Calling g_rw_lock_writer_unlock() on a lock that is not held * by the current thread leads to undefined behaviour. * * Since: 2.32 */ public void writerUnlock() { g_rw_lock_writer_unlock(gRWLock); } } GtkD-3.7.5/generated/gtkd/glib/RandG.d000066400000000000000000000157141324604450400173350ustar00rootroot00000000000000/* * 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 glib.RandG; private import glib.ConstructionException; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The GRand struct is an opaque data structure. It should only be * accessed through the g_rand_* functions. */ public class RandG { /** the main Gtk struct */ protected GRand* gRand; protected bool ownedRef; /** Get the main Gtk struct */ public GRand* getRandGStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gRand; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gRand; } /** * Sets our main struct and passes it to the parent class. */ public this (GRand* gRand, bool ownedRef = false) { this.gRand = gRand; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_rand_free(gRand); } /** * Copies a #GRand into a new one with the same exact state as before. * This way you can take a snapshot of the random number generator for * replaying later. * * Returns: the new #GRand * * Since: 2.4 */ public RandG copy() { auto p = g_rand_copy(gRand); if(p is null) { return null; } return new RandG(cast(GRand*) p); } /** * Returns the next random #gdouble from @rand_ equally distributed over * the range [0..1). * * Returns: a random number */ public double randDouble() { return g_rand_double(gRand); } /** * Returns the next random #gdouble from @rand_ equally distributed over * the range [@begin..@end). * * Params: * begin = lower closed bound of the interval * end = upper open bound of the interval * * Returns: a random number */ public double doubleRange(double begin, double end) { return g_rand_double_range(gRand, begin, end); } /** * Frees the memory allocated for the #GRand. */ public void free() { g_rand_free(gRand); ownedRef = false; } /** * Returns the next random #guint32 from @rand_ equally distributed over * the range [0..2^32-1]. * * Returns: a random number */ public uint randInt() { return g_rand_int(gRand); } /** * Returns the next random #gint32 from @rand_ equally distributed over * the range [@begin..@end-1]. * * Params: * begin = lower closed bound of the interval * end = upper open bound of the interval * * Returns: a random number */ public int intRange(int begin, int end) { return g_rand_int_range(gRand, begin, end); } /** * Sets the seed for the random number generator #GRand to @seed. * * Params: * seed = a value to reinitialize the random number generator */ public void setSeed(uint seed) { g_rand_set_seed(gRand, seed); } /** * Initializes the random number generator by an array of longs. * Array can be of arbitrary size, though only the first 624 values * are taken. This function is useful if you have many low entropy * seeds, or if you require more then 32 bits of actual entropy for * your application. * * Params: * seed = array to initialize with * seedLength = length of array * * Since: 2.4 */ public void setSeedArray(uint* seed, uint seedLength) { g_rand_set_seed_array(gRand, seed, seedLength); } /** * Creates a new random number generator initialized with a seed taken * either from `/dev/urandom` (if existing) or from the current time * (as a fallback). * * On Windows, the seed is taken from rand_s(). * * Returns: the new #GRand * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_rand_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GRand*) p); } /** * Creates a new random number generator initialized with @seed. * * Params: * seed = a value to initialize the random number generator * * Returns: the new #GRand * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint seed) { auto p = g_rand_new_with_seed(seed); if(p is null) { throw new ConstructionException("null returned by new_with_seed"); } this(cast(GRand*) p); } /** * Creates a new random number generator initialized with @seed. * * Params: * seed = an array of seeds to initialize the random number generator * * Returns: the new #GRand * * Since: 2.4 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint[] seed) { auto p = g_rand_new_with_seed_array(seed.ptr, cast(uint)seed.length); if(p is null) { throw new ConstructionException("null returned by new_with_seed_array"); } this(cast(GRand*) p); } /** * Returns a random #gdouble equally distributed over the range [0..1). * * Returns: a random number */ public static double randomDouble() { return g_random_double(); } /** * Returns a random #gdouble equally distributed over the range * [@begin..@end). * * Params: * begin = lower closed bound of the interval * end = upper open bound of the interval * * Returns: a random number */ public static double randomDoubleRange(double begin, double end) { return g_random_double_range(begin, end); } /** * Return a random #guint32 equally distributed over the range * [0..2^32-1]. * * Returns: a random number */ public static uint randomInt() { return g_random_int(); } /** * Returns a random #gint32 equally distributed over the range * [@begin..@end-1]. * * Params: * begin = lower closed bound of the interval * end = upper open bound of the interval * * Returns: a random number */ public static int randomIntRange(int begin, int end) { return g_random_int_range(begin, end); } /** * Sets the seed for the global random number generator, which is used * by the g_random_* functions, to @seed. * * Params: * seed = a value to reinitialize the global random number generator */ public static void randomSetSeed(uint seed) { g_random_set_seed(seed); } } GtkD-3.7.5/generated/gtkd/glib/RecMutex.d000066400000000000000000000110271324604450400200670ustar00rootroot00000000000000/* * 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 glib.RecMutex; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The GRecMutex struct is an opaque data structure to represent a * recursive mutex. It is similar to a #GMutex with the difference * that it is possible to lock a GRecMutex multiple times in the same * thread without deadlock. When doing so, care has to be taken to * unlock the recursive mutex as often as it has been locked. * * If a #GRecMutex is allocated in static storage then it can be used * without initialisation. Otherwise, you should call * g_rec_mutex_init() on it and g_rec_mutex_clear() when done. * * A GRecMutex should only be accessed with the * g_rec_mutex_ functions. * * Since: 2.32 */ public class RecMutex { /** the main Gtk struct */ protected GRecMutex* gRecMutex; protected bool ownedRef; /** Get the main Gtk struct */ public GRecMutex* getRecMutexStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gRecMutex; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gRecMutex; } /** * Sets our main struct and passes it to the parent class. */ public this (GRecMutex* gRecMutex, bool ownedRef = false) { this.gRecMutex = gRecMutex; this.ownedRef = ownedRef; } /** * Frees the resources allocated to a recursive mutex with * g_rec_mutex_init(). * * This function should not be used with a #GRecMutex that has been * statically allocated. * * Calling g_rec_mutex_clear() on a locked recursive mutex leads * to undefined behaviour. * * Sine: 2.32 */ public void clear() { g_rec_mutex_clear(gRecMutex); } /** * Initializes a #GRecMutex so that it can be used. * * This function is useful to initialize a recursive mutex * that has been allocated on the stack, or as part of a larger * structure. * * It is not necessary to initialise a recursive mutex that has been * statically allocated. * * |[ * typedef struct { * GRecMutex m; * ... * } Blob; * * Blob *b; * * b = g_new (Blob, 1); * g_rec_mutex_init (&b->m); * ]| * * Calling g_rec_mutex_init() on an already initialized #GRecMutex * leads to undefined behaviour. * * To undo the effect of g_rec_mutex_init() when a recursive mutex * is no longer needed, use g_rec_mutex_clear(). * * Since: 2.32 */ public void init() { g_rec_mutex_init(gRecMutex); } /** * Locks @rec_mutex. If @rec_mutex is already locked by another * thread, the current thread will block until @rec_mutex is * unlocked by the other thread. If @rec_mutex is already locked * by the current thread, the 'lock count' of @rec_mutex is increased. * The mutex will only become available again when it is unlocked * as many times as it has been locked. * * Since: 2.32 */ public void lock() { g_rec_mutex_lock(gRecMutex); } /** * Tries to lock @rec_mutex. If @rec_mutex is already locked * by another thread, it immediately returns %FALSE. Otherwise * it locks @rec_mutex and returns %TRUE. * * Returns: %TRUE if @rec_mutex could be locked * * Since: 2.32 */ public bool trylock() { return g_rec_mutex_trylock(gRecMutex) != 0; } /** * Unlocks @rec_mutex. If another thread is blocked in a * g_rec_mutex_lock() call for @rec_mutex, it will become unblocked * and can lock @rec_mutex itself. * * Calling g_rec_mutex_unlock() on a recursive mutex that is not * locked by the current thread leads to undefined behaviour. * * Since: 2.32 */ public void unlock() { g_rec_mutex_unlock(gRecMutex); } } GtkD-3.7.5/generated/gtkd/glib/Regex.d000066400000000000000000001004131324604450400174030ustar00rootroot00000000000000/* * 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 glib.Regex; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.MatchInfo; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The g_regex_*() functions implement regular * expression pattern matching using syntax and semantics similar to * Perl regular expression. * * Some functions accept a @start_position argument, setting it differs * from just passing over a shortened string and setting #G_REGEX_MATCH_NOTBOL * in the case of a pattern that begins with any kind of lookbehind assertion. * For example, consider the pattern "\Biss\B" which finds occurrences of "iss" * in the middle of words. ("\B" matches only if the current position in the * subject is not a word boundary.) When applied to the string "Mississipi" * from the fourth byte, namely "issipi", it does not match, because "\B" is * always false at the start of the subject, which is deemed to be a word * boundary. However, if the entire string is passed , but with * @start_position set to 4, it finds the second occurrence of "iss" because * it is able to look behind the starting point to discover that it is * preceded by a letter. * * Note that, unless you set the #G_REGEX_RAW flag, all the strings passed * to these functions must be encoded in UTF-8. The lengths and the positions * inside the strings are in bytes and not in characters, so, for instance, * "\xc3\xa0" (i.e. "à") is two bytes long but it is treated as a * single character. If you set #G_REGEX_RAW the strings can be non-valid * UTF-8 strings and a byte is treated as a character, so "\xc3\xa0" is two * bytes and two characters long. * * When matching a pattern, "\n" matches only against a "\n" character in * the string, and "\r" matches only a "\r" character. To match any newline * sequence use "\R". This particular group matches either the two-character * sequence CR + LF ("\r\n"), or one of the single characters LF (linefeed, * U+000A, "\n"), VT vertical tab, U+000B, "\v"), FF (formfeed, U+000C, "\f"), * CR (carriage return, U+000D, "\r"), NEL (next line, U+0085), LS (line * separator, U+2028), or PS (paragraph separator, U+2029). * * The behaviour of the dot, circumflex, and dollar metacharacters are * affected by newline characters, the default is to recognize any newline * character (the same characters recognized by "\R"). This can be changed * with #G_REGEX_NEWLINE_CR, #G_REGEX_NEWLINE_LF and #G_REGEX_NEWLINE_CRLF * compile options, and with #G_REGEX_MATCH_NEWLINE_ANY, * #G_REGEX_MATCH_NEWLINE_CR, #G_REGEX_MATCH_NEWLINE_LF and * #G_REGEX_MATCH_NEWLINE_CRLF match options. These settings are also * relevant when compiling a pattern if #G_REGEX_EXTENDED is set, and an * unescaped "#" outside a character class is encountered. This indicates * a comment that lasts until after the next newline. * * When setting the %G_REGEX_JAVASCRIPT_COMPAT flag, pattern syntax and pattern * matching is changed to be compatible with the way that regular expressions * work in JavaScript. More precisely, a lonely ']' character in the pattern * is a syntax error; the '\x' escape only allows 0 to 2 hexadecimal digits, and * you must use the '\u' escape sequence with 4 hex digits to specify a unicode * codepoint instead of '\x' or 'x{....}'. If '\x' or '\u' are not followed by * the specified number of hex digits, they match 'x' and 'u' literally; also * '\U' always matches 'U' instead of being an error in the pattern. Finally, * pattern matching is modified so that back references to an unset subpattern * group produces a match with the empty string instead of an error. See * pcreapi(3) for more information. * * Creating and manipulating the same #GRegex structure from different * threads is not a problem as #GRegex does not modify its internal * state between creation and destruction, on the other hand #GMatchInfo * is not threadsafe. * * The regular expressions low-level functionalities are obtained through * the excellent * [PCRE](http://www.pcre.org/) * library written by Philip Hazel. * * Since: 2.14 */ public class Regex { /** the main Gtk struct */ protected GRegex* gRegex; protected bool ownedRef; /** Get the main Gtk struct */ public GRegex* getRegexStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gRegex; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gRegex; } /** * Sets our main struct and passes it to the parent class. */ public this (GRegex* gRegex, bool ownedRef = false) { this.gRegex = gRegex; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_regex_unref(gRegex); } /** * Compiles the regular expression to an internal form, and does * the initial setup of the #GRegex structure. * * Params: * pattern = the regular expression * compileOptions = compile options for the regular expression, or 0 * matchOptions = match options for the regular expression, or 0 * * Returns: a #GRegex structure or %NULL if an error occured. Call * g_regex_unref() when you are done with it * * Since: 2.14 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string pattern, GRegexCompileFlags compileOptions, GRegexMatchFlags matchOptions) { GError* err = null; auto p = g_regex_new(Str.toStringz(pattern), compileOptions, matchOptions, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GRegex*) p); } /** * Returns the number of capturing subpatterns in the pattern. * * Returns: the number of capturing subpatterns * * Since: 2.14 */ public int getCaptureCount() { return g_regex_get_capture_count(gRegex); } /** * Returns the compile options that @regex was created with. * * Depending on the version of PCRE that is used, this may or may not * include flags set by option expressions such as `(?i)` found at the * top-level within the compiled pattern. * * Returns: flags from #GRegexCompileFlags * * Since: 2.26 */ public GRegexCompileFlags getCompileFlags() { return g_regex_get_compile_flags(gRegex); } /** * Checks whether the pattern contains explicit CR or LF references. * * Returns: %TRUE if the pattern contains explicit CR or LF references * * Since: 2.34 */ public bool getHasCrOrLf() { return g_regex_get_has_cr_or_lf(gRegex) != 0; } /** * Returns the match options that @regex was created with. * * Returns: flags from #GRegexMatchFlags * * Since: 2.26 */ public GRegexMatchFlags getMatchFlags() { return g_regex_get_match_flags(gRegex); } /** * Returns the number of the highest back reference * in the pattern, or 0 if the pattern does not contain * back references. * * Returns: the number of the highest back reference * * Since: 2.14 */ public int getMaxBackref() { return g_regex_get_max_backref(gRegex); } /** * Gets the number of characters in the longest lookbehind assertion in the * pattern. This information is useful when doing multi-segment matching using * the partial matching facilities. * * Returns: the number of characters in the longest lookbehind assertion. * * Since: 2.38 */ public int getMaxLookbehind() { return g_regex_get_max_lookbehind(gRegex); } /** * Gets the pattern string associated with @regex, i.e. a copy of * the string passed to g_regex_new(). * * Returns: the pattern of @regex * * Since: 2.14 */ public string getPattern() { return Str.toString(g_regex_get_pattern(gRegex)); } /** * Retrieves the number of the subexpression named @name. * * Params: * name = name of the subexpression * * Returns: The number of the subexpression or -1 if @name * does not exists * * Since: 2.14 */ public int getStringNumber(string name) { return g_regex_get_string_number(gRegex, Str.toStringz(name)); } /** * Scans for a match in string for the pattern in @regex. * The @match_options are combined with the match options specified * when the @regex structure was created, letting you have more * flexibility in reusing #GRegex structures. * * A #GMatchInfo structure, used to get information on the match, * is stored in @match_info if not %NULL. Note that if @match_info * is not %NULL then it is created even if the function returns %FALSE, * i.e. you must free it regardless if regular expression actually matched. * * To retrieve all the non-overlapping matches of the pattern in * string you can use g_match_info_next(). * * |[ * static void * print_uppercase_words (const gchar *string) * { * // Print all uppercase-only words. * GRegex *regex; * GMatchInfo *match_info; * * regex = g_regex_new ("[A-Z]+", 0, 0, NULL); * g_regex_match (regex, string, 0, &match_info); * while (g_match_info_matches (match_info)) * { * gchar *word = g_match_info_fetch (match_info, 0); * g_print ("Found: %s\n", word); * g_free (word); * g_match_info_next (match_info, NULL); * } * g_match_info_free (match_info); * g_regex_unref (regex); * } * ]| * * @string is not copied and is used in #GMatchInfo internally. If * you use any #GMatchInfo method (except g_match_info_free()) after * freeing or modifying @string then the behaviour is undefined. * * Params: * str = the string to scan for matches * matchOptions = match options * matchInfo = pointer to location where to store * the #GMatchInfo, or %NULL if you do not need it * * Returns: %TRUE is the string matched, %FALSE otherwise * * Since: 2.14 */ public bool match(string str, GRegexMatchFlags matchOptions, out MatchInfo matchInfo) { GMatchInfo* outmatchInfo = null; auto p = g_regex_match(gRegex, Str.toStringz(str), matchOptions, &outmatchInfo) != 0; matchInfo = new MatchInfo(outmatchInfo); return p; } /** * Using the standard algorithm for regular expression matching only * the longest match in the string is retrieved. This function uses * a different algorithm so it can retrieve all the possible matches. * For more documentation see g_regex_match_all_full(). * * A #GMatchInfo structure, used to get information on the match, is * stored in @match_info if not %NULL. Note that if @match_info is * not %NULL then it is created even if the function returns %FALSE, * i.e. you must free it regardless if regular expression actually * matched. * * @string is not copied and is used in #GMatchInfo internally. If * you use any #GMatchInfo method (except g_match_info_free()) after * freeing or modifying @string then the behaviour is undefined. * * Params: * str = the string to scan for matches * matchOptions = match options * matchInfo = pointer to location where to store * the #GMatchInfo, or %NULL if you do not need it * * Returns: %TRUE is the string matched, %FALSE otherwise * * Since: 2.14 */ public bool matchAll(string str, GRegexMatchFlags matchOptions, out MatchInfo matchInfo) { GMatchInfo* outmatchInfo = null; auto p = g_regex_match_all(gRegex, Str.toStringz(str), matchOptions, &outmatchInfo) != 0; matchInfo = new MatchInfo(outmatchInfo); return p; } /** * Using the standard algorithm for regular expression matching only * the longest match in the string is retrieved, it is not possible * to obtain all the available matches. For instance matching * " " against the pattern "<.*>" * you get " ". * * This function uses a different algorithm (called DFA, i.e. deterministic * finite automaton), so it can retrieve all the possible matches, all * starting at the same point in the string. For instance matching * " " against the pattern "<.*>;" * you would obtain three matches: " ", * " " and "". * * The number of matched strings is retrieved using * g_match_info_get_match_count(). To obtain the matched strings and * their position you can use, respectively, g_match_info_fetch() and * g_match_info_fetch_pos(). Note that the strings are returned in * reverse order of length; that is, the longest matching string is * given first. * * Note that the DFA algorithm is slower than the standard one and it * is not able to capture substrings, so backreferences do not work. * * Setting @start_position differs from just passing over a shortened * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern * that begins with any kind of lookbehind assertion, such as "\b". * * A #GMatchInfo structure, used to get information on the match, is * stored in @match_info if not %NULL. Note that if @match_info is * not %NULL then it is created even if the function returns %FALSE, * i.e. you must free it regardless if regular expression actually * matched. * * @string is not copied and is used in #GMatchInfo internally. If * you use any #GMatchInfo method (except g_match_info_free()) after * freeing or modifying @string then the behaviour is undefined. * * Params: * str = the string to scan for matches * startPosition = starting index of the string to match, in bytes * matchOptions = match options * matchInfo = pointer to location where to store * the #GMatchInfo, or %NULL if you do not need it * * Returns: %TRUE is the string matched, %FALSE otherwise * * Since: 2.14 * * Throws: GException on failure. */ public bool matchAllFull(string str, int startPosition, GRegexMatchFlags matchOptions, out MatchInfo matchInfo) { GMatchInfo* outmatchInfo = null; GError* err = null; auto p = g_regex_match_all_full(gRegex, Str.toStringz(str), cast(ptrdiff_t)str.length, startPosition, matchOptions, &outmatchInfo, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } matchInfo = new MatchInfo(outmatchInfo); return p; } /** * Scans for a match in string for the pattern in @regex. * The @match_options are combined with the match options specified * when the @regex structure was created, letting you have more * flexibility in reusing #GRegex structures. * * Setting @start_position differs from just passing over a shortened * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern * that begins with any kind of lookbehind assertion, such as "\b". * * A #GMatchInfo structure, used to get information on the match, is * stored in @match_info if not %NULL. Note that if @match_info is * not %NULL then it is created even if the function returns %FALSE, * i.e. you must free it regardless if regular expression actually * matched. * * @string is not copied and is used in #GMatchInfo internally. If * you use any #GMatchInfo method (except g_match_info_free()) after * freeing or modifying @string then the behaviour is undefined. * * To retrieve all the non-overlapping matches of the pattern in * string you can use g_match_info_next(). * * |[ * static void * print_uppercase_words (const gchar *string) * { * // Print all uppercase-only words. * GRegex *regex; * GMatchInfo *match_info; * GError *error = NULL; * * regex = g_regex_new ("[A-Z]+", 0, 0, NULL); * g_regex_match_full (regex, string, -1, 0, 0, &match_info, &error); * while (g_match_info_matches (match_info)) * { * gchar *word = g_match_info_fetch (match_info, 0); * g_print ("Found: %s\n", word); * g_free (word); * g_match_info_next (match_info, &error); * } * g_match_info_free (match_info); * g_regex_unref (regex); * if (error != NULL) * { * g_printerr ("Error while matching: %s\n", error->message); * g_error_free (error); * } * } * ]| * * Params: * str = the string to scan for matches * startPosition = starting index of the string to match, in bytes * matchOptions = match options * matchInfo = pointer to location where to store * the #GMatchInfo, or %NULL if you do not need it * * Returns: %TRUE is the string matched, %FALSE otherwise * * Since: 2.14 * * Throws: GException on failure. */ public bool matchFull(string str, int startPosition, GRegexMatchFlags matchOptions, out MatchInfo matchInfo) { GMatchInfo* outmatchInfo = null; GError* err = null; auto p = g_regex_match_full(gRegex, Str.toStringz(str), cast(ptrdiff_t)str.length, startPosition, matchOptions, &outmatchInfo, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } matchInfo = new MatchInfo(outmatchInfo); return p; } /** * Increases reference count of @regex by 1. * * Returns: @regex * * Since: 2.14 */ public Regex doref() { auto p = g_regex_ref(gRegex); if(p is null) { return null; } return new Regex(cast(GRegex*) p, true); } /** * Replaces all occurrences of the pattern in @regex with the * replacement text. Backreferences of the form '\number' or * '\g' in the replacement text are interpolated by the * number-th captured subexpression of the match, '\g' refers * to the captured subexpression with the given name. '\0' refers * to the complete match, but '\0' followed by a number is the octal * representation of a character. To include a literal '\' in the * replacement, write '\\'. * * There are also escapes that changes the case of the following text: * * - \l: Convert to lower case the next character * - \u: Convert to upper case the next character * - \L: Convert to lower case till \E * - \U: Convert to upper case till \E * - \E: End case modification * * If you do not need to use backreferences use g_regex_replace_literal(). * * The @replacement string must be UTF-8 encoded even if #G_REGEX_RAW was * passed to g_regex_new(). If you want to use not UTF-8 encoded stings * you can use g_regex_replace_literal(). * * Setting @start_position differs from just passing over a shortened * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern that * begins with any kind of lookbehind assertion, such as "\b". * * Params: * str = the string to perform matches against * startPosition = starting index of the string to match, in bytes * replacement = text to replace each match with * matchOptions = options for the match * * Returns: a newly allocated string containing the replacements * * Since: 2.14 * * Throws: GException on failure. */ public string replace(string str, int startPosition, string replacement, GRegexMatchFlags matchOptions) { GError* err = null; auto retStr = g_regex_replace(gRegex, Str.toStringz(str), cast(ptrdiff_t)str.length, startPosition, Str.toStringz(replacement), matchOptions, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Replaces occurrences of the pattern in regex with the output of * @eval for that occurrence. * * Setting @start_position differs from just passing over a shortened * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern * that begins with any kind of lookbehind assertion, such as "\b". * * The following example uses g_regex_replace_eval() to replace multiple * strings at once: * |[ * static gboolean * eval_cb (const GMatchInfo *info, * GString *res, * gpointer data) * { * gchar *match; * gchar *r; * * match = g_match_info_fetch (info, 0); * r = g_hash_table_lookup ((GHashTable *)data, match); * g_string_append (res, r); * g_free (match); * * return FALSE; * } * * ... * * GRegex *reg; * GHashTable *h; * gchar *res; * * h = g_hash_table_new (g_str_hash, g_str_equal); * * g_hash_table_insert (h, "1", "ONE"); * g_hash_table_insert (h, "2", "TWO"); * g_hash_table_insert (h, "3", "THREE"); * g_hash_table_insert (h, "4", "FOUR"); * * reg = g_regex_new ("1|2|3|4", 0, 0, NULL); * res = g_regex_replace_eval (reg, text, -1, 0, 0, eval_cb, h, NULL); * g_hash_table_destroy (h); * * ... * ]| * * Params: * str = string to perform matches against * startPosition = starting index of the string to match, in bytes * matchOptions = options for the match * eval = a function to call for each match * userData = user data to pass to the function * * Returns: a newly allocated string containing the replacements * * Since: 2.14 * * Throws: GException on failure. */ public string replaceEval(string str, int startPosition, GRegexMatchFlags matchOptions, GRegexEvalCallback eval, void* userData) { GError* err = null; auto retStr = g_regex_replace_eval(gRegex, Str.toStringz(str), cast(ptrdiff_t)str.length, startPosition, matchOptions, eval, userData, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Replaces all occurrences of the pattern in @regex with the * replacement text. @replacement is replaced literally, to * include backreferences use g_regex_replace(). * * Setting @start_position differs from just passing over a * shortened string and setting #G_REGEX_MATCH_NOTBOL in the * case of a pattern that begins with any kind of lookbehind * assertion, such as "\b". * * Params: * str = the string to perform matches against * startPosition = starting index of the string to match, in bytes * replacement = text to replace each match with * matchOptions = options for the match * * Returns: a newly allocated string containing the replacements * * Since: 2.14 * * Throws: GException on failure. */ public string replaceLiteral(string str, int startPosition, string replacement, GRegexMatchFlags matchOptions) { GError* err = null; auto retStr = g_regex_replace_literal(gRegex, Str.toStringz(str), cast(ptrdiff_t)str.length, startPosition, Str.toStringz(replacement), matchOptions, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Breaks the string on the pattern, and returns an array of the tokens. * If the pattern contains capturing parentheses, then the text for each * of the substrings will also be returned. If the pattern does not match * anywhere in the string, then the whole string is returned as the first * token. * * As a special case, the result of splitting the empty string "" is an * empty vector, not a vector containing a single string. The reason for * this special case is that being able to represent a empty vector is * typically more useful than consistent handling of empty elements. If * you do need to represent empty elements, you'll need to check for the * empty string before calling this function. * * A pattern that can match empty strings splits @string into separate * characters wherever it matches the empty string between characters. * For example splitting "ab c" using as a separator "\s*", you will get * "a", "b" and "c". * * Params: * str = the string to split with the pattern * matchOptions = match time option flags * * Returns: a %NULL-terminated gchar ** array. Free * it using g_strfreev() * * Since: 2.14 */ public string[] split(string str, GRegexMatchFlags matchOptions) { auto retStr = g_regex_split(gRegex, Str.toStringz(str), matchOptions); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Breaks the string on the pattern, and returns an array of the tokens. * If the pattern contains capturing parentheses, then the text for each * of the substrings will also be returned. If the pattern does not match * anywhere in the string, then the whole string is returned as the first * token. * * As a special case, the result of splitting the empty string "" is an * empty vector, not a vector containing a single string. The reason for * this special case is that being able to represent a empty vector is * typically more useful than consistent handling of empty elements. If * you do need to represent empty elements, you'll need to check for the * empty string before calling this function. * * A pattern that can match empty strings splits @string into separate * characters wherever it matches the empty string between characters. * For example splitting "ab c" using as a separator "\s*", you will get * "a", "b" and "c". * * Setting @start_position differs from just passing over a shortened * string and setting #G_REGEX_MATCH_NOTBOL in the case of a pattern * that begins with any kind of lookbehind assertion, such as "\b". * * Params: * str = the string to split with the pattern * startPosition = starting index of the string to match, in bytes * matchOptions = match time option flags * maxTokens = the maximum number of tokens to split @string into. * If this is less than 1, the string is split completely * * Returns: a %NULL-terminated gchar ** array. Free * it using g_strfreev() * * Since: 2.14 * * Throws: GException on failure. */ public string[] splitFull(string str, int startPosition, GRegexMatchFlags matchOptions, int maxTokens) { GError* err = null; auto retStr = g_regex_split_full(gRegex, Str.toStringz(str), cast(ptrdiff_t)str.length, startPosition, matchOptions, maxTokens, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Decreases reference count of @regex by 1. When reference count drops * to zero, it frees all the memory associated with the regex structure. * * Since: 2.14 */ public void unref() { g_regex_unref(gRegex); } /** * Checks whether @replacement is a valid replacement string * (see g_regex_replace()), i.e. that all escape sequences in * it are valid. * * If @has_references is not %NULL then @replacement is checked * for pattern references. For instance, replacement text 'foo\n' * does not contain references and may be evaluated without information * about actual match, but '\0\1' (whole match followed by first * subpattern) requires valid #GMatchInfo object. * * Params: * replacement = the replacement string * hasReferences = location to store information about * references in @replacement or %NULL * * Returns: whether @replacement is a valid replacement string * * Since: 2.14 * * Throws: GException on failure. */ public static bool checkReplacement(string replacement, out bool hasReferences) { int outhasReferences; GError* err = null; auto p = g_regex_check_replacement(Str.toStringz(replacement), &outhasReferences, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } hasReferences = (outhasReferences == 1); return p; } /** */ public static GQuark errorQuark() { return g_regex_error_quark(); } /** * Escapes the nul characters in @string to "\x00". It can be used * to compile a regex with embedded nul characters. * * For completeness, @length can be -1 for a nul-terminated string. * In this case the output string will be of course equal to @string. * * Params: * str = the string to escape * length = the length of @string * * Returns: a newly-allocated escaped string * * Since: 2.30 */ public static string escapeNul(string str, int length) { auto retStr = g_regex_escape_nul(Str.toStringz(str), length); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Escapes the special characters used for regular expressions * in @string, for instance "a.b*c" becomes "a\.b\*c". This * function is useful to dynamically generate regular expressions. * * @string can contain nul characters that are replaced with "\0", * in this case remember to specify the correct length of @string * in @length. * * Params: * str = the string to escape * * Returns: a newly-allocated escaped string * * Since: 2.14 */ public static string escapeString(string str) { auto retStr = g_regex_escape_string(Str.toStringz(str), cast(int)str.length); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Scans for a match in @string for @pattern. * * This function is equivalent to g_regex_match() but it does not * require to compile the pattern with g_regex_new(), avoiding some * lines of code when you need just to do a match without extracting * substrings, capture counts, and so on. * * If this function is to be called on the same @pattern more than * once, it's more efficient to compile the pattern once with * g_regex_new() and then use g_regex_match(). * * Params: * pattern = the regular expression * str = the string to scan for matches * compileOptions = compile options for the regular expression, or 0 * matchOptions = match options, or 0 * * Returns: %TRUE if the string matched, %FALSE otherwise * * Since: 2.14 */ public static bool matchSimple(string pattern, string str, GRegexCompileFlags compileOptions, GRegexMatchFlags matchOptions) { return g_regex_match_simple(Str.toStringz(pattern), Str.toStringz(str), compileOptions, matchOptions) != 0; } /** * Breaks the string on the pattern, and returns an array of * the tokens. If the pattern contains capturing parentheses, * then the text for each of the substrings will also be returned. * If the pattern does not match anywhere in the string, then the * whole string is returned as the first token. * * This function is equivalent to g_regex_split() but it does * not require to compile the pattern with g_regex_new(), avoiding * some lines of code when you need just to do a split without * extracting substrings, capture counts, and so on. * * If this function is to be called on the same @pattern more than * once, it's more efficient to compile the pattern once with * g_regex_new() and then use g_regex_split(). * * As a special case, the result of splitting the empty string "" * is an empty vector, not a vector containing a single string. * The reason for this special case is that being able to represent * a empty vector is typically more useful than consistent handling * of empty elements. If you do need to represent empty elements, * you'll need to check for the empty string before calling this * function. * * A pattern that can match empty strings splits @string into * separate characters wherever it matches the empty string between * characters. For example splitting "ab c" using as a separator * "\s*", you will get "a", "b" and "c". * * Params: * pattern = the regular expression * str = the string to scan for matches * compileOptions = compile options for the regular expression, or 0 * matchOptions = match options, or 0 * * Returns: a %NULL-terminated array of strings. Free * it using g_strfreev() * * Since: 2.14 */ public static string[] splitSimple(string pattern, string str, GRegexCompileFlags compileOptions, GRegexMatchFlags matchOptions) { auto retStr = g_regex_split_simple(Str.toStringz(pattern), Str.toStringz(str), compileOptions, matchOptions); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } } GtkD-3.7.5/generated/gtkd/glib/ScannerG.d000066400000000000000000000236351324604450400200430ustar00rootroot00000000000000/* * 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 glib.ScannerG; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The data structure representing a lexical scanner. * * You should set @input_name after creating the scanner, since * it is used by the default message handler when displaying * warnings and errors. If you are scanning a file, the filename * would be a good choice. * * The @user_data and @max_parse_errors fields are not used. * If you need to associate extra data with the scanner you * can place them here. * * If you want to use your own message handler you can set the * @msg_handler field. The type of the message handler function * is declared by #GScannerMsgFunc. */ public class ScannerG { /** the main Gtk struct */ protected GScanner* gScanner; protected bool ownedRef; /** Get the main Gtk struct */ public GScanner* getScannerGStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gScanner; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gScanner; } /** * Sets our main struct and passes it to the parent class. */ public this (GScanner* gScanner, bool ownedRef = false) { this.gScanner = gScanner; this.ownedRef = ownedRef; } /** * Returns the current line in the input stream (counting * from 1). This is the line of the last token parsed via * g_scanner_get_next_token(). * * Returns: the current line */ public uint curLine() { return g_scanner_cur_line(gScanner); } /** * Returns the current position in the current line (counting * from 0). This is the position of the last token parsed via * g_scanner_get_next_token(). * * Returns: the current position on the line */ public uint curPosition() { return g_scanner_cur_position(gScanner); } /** * Gets the current token type. This is simply the @token * field in the #GScanner structure. * * Returns: the current token type */ public GTokenType curToken() { return g_scanner_cur_token(gScanner); } /** * Gets the current token value. This is simply the @value * field in the #GScanner structure. * * Returns: the current token value */ public GTokenValue curValue() { return g_scanner_cur_value(gScanner); } /** * Frees all memory used by the #GScanner. */ public void destroy() { g_scanner_destroy(gScanner); } /** * Returns %TRUE if the scanner has reached the end of * the file or text buffer. * * Returns: %TRUE if the scanner has reached the end of * the file or text buffer */ public bool eof() { return g_scanner_eof(gScanner) != 0; } /** * Parses the next token just like g_scanner_peek_next_token() * and also removes it from the input stream. The token data is * placed in the @token, @value, @line, and @position fields of * the #GScanner structure. * * Returns: the type of the token */ public GTokenType getNextToken() { return g_scanner_get_next_token(gScanner); } /** * Prepares to scan a file. * * Params: * inputFd = a file descriptor */ public void inputFile(int inputFd) { g_scanner_input_file(gScanner, inputFd); } /** * Prepares to scan a text buffer. * * Params: * text = the text buffer to scan * textLen = the length of the text buffer */ public void inputText(string text, uint textLen) { g_scanner_input_text(gScanner, Str.toStringz(text), textLen); } /** * Looks up a symbol in the current scope and return its value. * If the symbol is not bound in the current scope, %NULL is * returned. * * Params: * symbol = the symbol to look up * * Returns: the value of @symbol in the current scope, or %NULL * if @symbol is not bound in the current scope */ public void* lookupSymbol(string symbol) { return g_scanner_lookup_symbol(gScanner, Str.toStringz(symbol)); } /** * Parses the next token, without removing it from the input stream. * The token data is placed in the @next_token, @next_value, @next_line, * and @next_position fields of the #GScanner structure. * * Note that, while the token is not removed from the input stream * (i.e. the next call to g_scanner_get_next_token() will return the * same token), it will not be reevaluated. This can lead to surprising * results when changing scope or the scanner configuration after peeking * the next token. Getting the next token after switching the scope or * configuration will return whatever was peeked before, regardless of * any symbols that may have been added or removed in the new scope. * * Returns: the type of the token */ public GTokenType peekNextToken() { return g_scanner_peek_next_token(gScanner); } /** * Adds a symbol to the given scope. * * Params: * scopeId = the scope id * symbol = the symbol to add * value = the value of the symbol */ public void scopeAddSymbol(uint scopeId, string symbol, void* value) { g_scanner_scope_add_symbol(gScanner, scopeId, Str.toStringz(symbol), value); } /** * Calls the given function for each of the symbol/value pairs * in the given scope of the #GScanner. The function is passed * the symbol and value of each pair, and the given @user_data * parameter. * * Params: * scopeId = the scope id * func = the function to call for each symbol/value pair * userData = user data to pass to the function */ public void scopeForeachSymbol(uint scopeId, GHFunc func, void* userData) { g_scanner_scope_foreach_symbol(gScanner, scopeId, func, userData); } /** * Looks up a symbol in a scope and return its value. If the * symbol is not bound in the scope, %NULL is returned. * * Params: * scopeId = the scope id * symbol = the symbol to look up * * Returns: the value of @symbol in the given scope, or %NULL * if @symbol is not bound in the given scope. */ public void* scopeLookupSymbol(uint scopeId, string symbol) { return g_scanner_scope_lookup_symbol(gScanner, scopeId, Str.toStringz(symbol)); } /** * Removes a symbol from a scope. * * Params: * scopeId = the scope id * symbol = the symbol to remove */ public void scopeRemoveSymbol(uint scopeId, string symbol) { g_scanner_scope_remove_symbol(gScanner, scopeId, Str.toStringz(symbol)); } /** * Sets the current scope. * * Params: * scopeId = the new scope id * * Returns: the old scope id */ public uint setScope(uint scopeId) { return g_scanner_set_scope(gScanner, scopeId); } /** * Rewinds the filedescriptor to the current buffer position * and blows the file read ahead buffer. This is useful for * third party uses of the scanners filedescriptor, which hooks * onto the current scanning position. */ public void syncFileOffset() { g_scanner_sync_file_offset(gScanner); } /** * Outputs a message through the scanner's msg_handler, * resulting from an unexpected token in the input stream. * Note that you should not call g_scanner_peek_next_token() * followed by g_scanner_unexp_token() without an intermediate * call to g_scanner_get_next_token(), as g_scanner_unexp_token() * evaluates the scanner's current token (not the peeked token) * to construct part of the message. * * Params: * expectedToken = the expected token * identifierSpec = a string describing how the scanner's user * refers to identifiers (%NULL defaults to "identifier"). * This is used if @expected_token is %G_TOKEN_IDENTIFIER or * %G_TOKEN_IDENTIFIER_NULL. * symbolSpec = a string describing how the scanner's user refers * to symbols (%NULL defaults to "symbol"). This is used if * @expected_token is %G_TOKEN_SYMBOL or any token value greater * than %G_TOKEN_LAST. * symbolName = the name of the symbol, if the scanner's current * token is a symbol. * message = a message string to output at the end of the * warning/error, or %NULL. * isError = if %TRUE it is output as an error. If %FALSE it is * output as a warning. */ public void unexpToken(GTokenType expectedToken, string identifierSpec, string symbolSpec, string symbolName, string message, int isError) { g_scanner_unexp_token(gScanner, expectedToken, Str.toStringz(identifierSpec), Str.toStringz(symbolSpec), Str.toStringz(symbolName), Str.toStringz(message), isError); } /** * Creates a new #GScanner. * * The @config_templ structure specifies the initial settings * of the scanner, which are copied into the #GScanner * @config field. If you pass %NULL then the default settings * are used. * * Params: * configTempl = the initial scanner settings * * Returns: the new #GScanner * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GScannerConfig* configTempl) { auto p = g_scanner_new(configTempl); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GScanner*) p); } } GtkD-3.7.5/generated/gtkd/glib/Sequence.d000066400000000000000000000527001324604450400201060ustar00rootroot00000000000000/* * 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 glib.Sequence; private import glib.ConstructionException; private import glib.SequenceIter; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The #GSequence struct is an opaque data type representing a * [sequence][glib-Sequences] data type. */ public class Sequence { /** the main Gtk struct */ protected GSequence* gSequence; protected bool ownedRef; /** Get the main Gtk struct */ public GSequence* getSequenceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSequence; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gSequence; } /** * Sets our main struct and passes it to the parent class. */ public this (GSequence* gSequence, bool ownedRef = false) { this.gSequence = gSequence; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_sequence_free(gSequence); } /** * Adds a new item to the end of @seq. * * Params: * data = the data for the new item * * Returns: an iterator pointing to the new item * * Since: 2.14 */ public SequenceIter append(void* data) { auto p = g_sequence_append(gSequence, data); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Calls @func for each item in the sequence passing @user_data * to the function. * * Params: * func = the function to call for each item in @seq * userData = user data passed to @func * * Since: 2.14 */ public void foreac(GFunc func, void* userData) { g_sequence_foreach(gSequence, func, userData); } /** * Frees the memory allocated for @seq. If @seq has a data destroy * function associated with it, that function is called on all items * in @seq. * * Since: 2.14 */ public void free() { g_sequence_free(gSequence); ownedRef = false; } /** * Returns the begin iterator for @seq. * * Returns: the begin iterator for @seq. * * Since: 2.14 */ public SequenceIter getBeginIter() { auto p = g_sequence_get_begin_iter(gSequence); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Returns the end iterator for @seg * * Returns: the end iterator for @seq * * Since: 2.14 */ public SequenceIter getEndIter() { auto p = g_sequence_get_end_iter(gSequence); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Returns the iterator at position @pos. If @pos is negative or larger * than the number of items in @seq, the end iterator is returned. * * Params: * pos = a position in @seq, or -1 for the end * * Returns: The #GSequenceIter at position @pos * * Since: 2.14 */ public SequenceIter getIterAtPos(int pos) { auto p = g_sequence_get_iter_at_pos(gSequence, pos); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Returns the length of @seq. Note that this method is O(h) where `h' is the * height of the tree. It is thus more efficient to use g_sequence_is_empty() * when comparing the length to zero. * * Returns: the length of @seq * * Since: 2.14 */ public int getLength() { return g_sequence_get_length(gSequence); } /** * Inserts @data into @sequence using @func to determine the new * position. The sequence must already be sorted according to @cmp_func; * otherwise the new position of @data is undefined. * * @cmp_func is called with two items of the @seq and @user_data. * It should return 0 if the items are equal, a negative value * if the first item comes before the second, and a positive value * if the second item comes before the first. * * Params: * data = the data to insert * cmpFunc = the function used to compare items in the sequence * cmpData = user data passed to @cmp_func. * * Returns: a #GSequenceIter pointing to the new item. * * Since: 2.14 */ public SequenceIter insertSorted(void* data, GCompareDataFunc cmpFunc, void* cmpData) { auto p = g_sequence_insert_sorted(gSequence, data, cmpFunc, cmpData); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Like g_sequence_insert_sorted(), but uses * a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as * the compare function. * * @iter_cmp is called with two iterators pointing into @seq. * It should return 0 if the iterators are equal, a negative * value if the first iterator comes before the second, and a * positive value if the second iterator comes before the first. * * It is called with two iterators pointing into @seq. It should * return 0 if the iterators are equal, a negative value if the * first iterator comes before the second, and a positive value * if the second iterator comes before the first. * * Params: * data = data for the new item * iterCmp = the function used to compare iterators in the sequence * cmpData = user data passed to @cmp_func * * Returns: a #GSequenceIter pointing to the new item * * Since: 2.14 */ public SequenceIter insertSortedIter(void* data, GSequenceIterCompareFunc iterCmp, void* cmpData) { auto p = g_sequence_insert_sorted_iter(gSequence, data, iterCmp, cmpData); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Returns %TRUE if the sequence contains zero items. * * This function is functionally identical to checking the result of * g_sequence_get_length() being equal to zero. However this function is * implemented in O(1) running time. * * Returns: %TRUE if the sequence is empty, otherwise %FALSE. * * Since: 2.48 */ public bool isEmpty() { return g_sequence_is_empty(gSequence) != 0; } /** * Returns an iterator pointing to the position of the first item found * equal to @data according to @cmp_func and @cmp_data. If more than one * item is equal, it is not guaranteed that it is the first which is * returned. In that case, you can use g_sequence_iter_next() and * g_sequence_iter_prev() to get others. * * @cmp_func is called with two items of the @seq and @user_data. * It should return 0 if the items are equal, a negative value if * the first item comes before the second, and a positive value if * the second item comes before the first. * * This function will fail if the data contained in the sequence is * unsorted. Use g_sequence_insert_sorted() or * g_sequence_insert_sorted_iter() to add data to your sequence or, if * you want to add a large amount of data, call g_sequence_sort() after * doing unsorted insertions. * * Params: * data = data to lookup * cmpFunc = the function used to compare items in the sequence * cmpData = user data passed to @cmp_func * * Returns: an #GSequenceIter pointing to the position of the * first item found equal to @data according to @cmp_func and * @cmp_data, or %NULL if no such item exists * * Since: 2.28 */ public SequenceIter lookup(void* data, GCompareDataFunc cmpFunc, void* cmpData) { auto p = g_sequence_lookup(gSequence, data, cmpFunc, cmpData); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Like g_sequence_lookup(), but uses a #GSequenceIterCompareFunc * instead of a #GCompareDataFunc as the compare function. * * @iter_cmp is called with two iterators pointing into @seq. * It should return 0 if the iterators are equal, a negative value * if the first iterator comes before the second, and a positive * value if the second iterator comes before the first. * * This function will fail if the data contained in the sequence is * unsorted. Use g_sequence_insert_sorted() or * g_sequence_insert_sorted_iter() to add data to your sequence or, if * you want to add a large amount of data, call g_sequence_sort() after * doing unsorted insertions. * * Params: * data = data to lookup * iterCmp = the function used to compare iterators in the sequence * cmpData = user data passed to @iter_cmp * * Returns: an #GSequenceIter pointing to the position of * the first item found equal to @data according to @cmp_func * and @cmp_data, or %NULL if no such item exists * * Since: 2.28 */ public SequenceIter lookupIter(void* data, GSequenceIterCompareFunc iterCmp, void* cmpData) { auto p = g_sequence_lookup_iter(gSequence, data, iterCmp, cmpData); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Adds a new item to the front of @seq * * Params: * data = the data for the new item * * Returns: an iterator pointing to the new item * * Since: 2.14 */ public SequenceIter prepend(void* data) { auto p = g_sequence_prepend(gSequence, data); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Returns an iterator pointing to the position where @data would * be inserted according to @cmp_func and @cmp_data. * * @cmp_func is called with two items of the @seq and @user_data. * It should return 0 if the items are equal, a negative value if * the first item comes before the second, and a positive value if * the second item comes before the first. * * If you are simply searching for an existing element of the sequence, * consider using g_sequence_lookup(). * * This function will fail if the data contained in the sequence is * unsorted. Use g_sequence_insert_sorted() or * g_sequence_insert_sorted_iter() to add data to your sequence or, if * you want to add a large amount of data, call g_sequence_sort() after * doing unsorted insertions. * * Params: * data = data for the new item * cmpFunc = the function used to compare items in the sequence * cmpData = user data passed to @cmp_func * * Returns: an #GSequenceIter pointing to the position where @data * would have been inserted according to @cmp_func and @cmp_data * * Since: 2.14 */ public SequenceIter search(void* data, GCompareDataFunc cmpFunc, void* cmpData) { auto p = g_sequence_search(gSequence, data, cmpFunc, cmpData); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Like g_sequence_search(), but uses a #GSequenceIterCompareFunc * instead of a #GCompareDataFunc as the compare function. * * @iter_cmp is called with two iterators pointing into @seq. * It should return 0 if the iterators are equal, a negative value * if the first iterator comes before the second, and a positive * value if the second iterator comes before the first. * * If you are simply searching for an existing element of the sequence, * consider using g_sequence_lookup_iter(). * * This function will fail if the data contained in the sequence is * unsorted. Use g_sequence_insert_sorted() or * g_sequence_insert_sorted_iter() to add data to your sequence or, if * you want to add a large amount of data, call g_sequence_sort() after * doing unsorted insertions. * * Params: * data = data for the new item * iterCmp = the function used to compare iterators in the sequence * cmpData = user data passed to @iter_cmp * * Returns: a #GSequenceIter pointing to the position in @seq * where @data would have been inserted according to @iter_cmp * and @cmp_data * * Since: 2.14 */ public SequenceIter searchIter(void* data, GSequenceIterCompareFunc iterCmp, void* cmpData) { auto p = g_sequence_search_iter(gSequence, data, iterCmp, cmpData); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Sorts @seq using @cmp_func. * * @cmp_func is passed two items of @seq and should * return 0 if they are equal, a negative value if the * first comes before the second, and a positive value * if the second comes before the first. * * Params: * cmpFunc = the function used to sort the sequence * cmpData = user data passed to @cmp_func * * Since: 2.14 */ public void sort(GCompareDataFunc cmpFunc, void* cmpData) { g_sequence_sort(gSequence, cmpFunc, cmpData); } /** * Like g_sequence_sort(), but uses a #GSequenceIterCompareFunc instead * of a GCompareDataFunc as the compare function * * @cmp_func is called with two iterators pointing into @seq. It should * return 0 if the iterators are equal, a negative value if the first * iterator comes before the second, and a positive value if the second * iterator comes before the first. * * Params: * cmpFunc = the function used to compare iterators in the sequence * cmpData = user data passed to @cmp_func * * Since: 2.14 */ public void sortIter(GSequenceIterCompareFunc cmpFunc, void* cmpData) { g_sequence_sort_iter(gSequence, cmpFunc, cmpData); } /** * Calls @func for each item in the range (@begin, @end) passing * @user_data to the function. * * Params: * begin = a #GSequenceIter * end = a #GSequenceIter * func = a #GFunc * userData = user data passed to @func * * Since: 2.14 */ public static void foreachRange(SequenceIter begin, SequenceIter end, GFunc func, void* userData) { g_sequence_foreach_range((begin is null) ? null : begin.getSequenceIterStruct(), (end is null) ? null : end.getSequenceIterStruct(), func, userData); } /** * Returns the data that @iter points to. * * Params: * iter = a #GSequenceIter * * Returns: the data that @iter points to * * Since: 2.14 */ public static void* get(SequenceIter iter) { return g_sequence_get((iter is null) ? null : iter.getSequenceIterStruct()); } /** * Inserts a new item just before the item pointed to by @iter. * * Params: * iter = a #GSequenceIter * data = the data for the new item * * Returns: an iterator pointing to the new item * * Since: 2.14 */ public static SequenceIter insertBefore(SequenceIter iter, void* data) { auto p = g_sequence_insert_before((iter is null) ? null : iter.getSequenceIterStruct(), data); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Moves the item pointed to by @src to the position indicated by @dest. * After calling this function @dest will point to the position immediately * after @src. It is allowed for @src and @dest to point into different * sequences. * * Params: * src = a #GSequenceIter pointing to the item to move * dest = a #GSequenceIter pointing to the position to which * the item is moved * * Since: 2.14 */ public static void move(SequenceIter src, SequenceIter dest) { g_sequence_move((src is null) ? null : src.getSequenceIterStruct(), (dest is null) ? null : dest.getSequenceIterStruct()); } /** * Inserts the (@begin, @end) range at the destination pointed to by ptr. * The @begin and @end iters must point into the same sequence. It is * allowed for @dest to point to a different sequence than the one pointed * into by @begin and @end. * * If @dest is NULL, the range indicated by @begin and @end is * removed from the sequence. If @dest iter points to a place within * the (@begin, @end) range, the range does not move. * * Params: * dest = a #GSequenceIter * begin = a #GSequenceIter * end = a #GSequenceIter * * Since: 2.14 */ public static void moveRange(SequenceIter dest, SequenceIter begin, SequenceIter end) { g_sequence_move_range((dest is null) ? null : dest.getSequenceIterStruct(), (begin is null) ? null : begin.getSequenceIterStruct(), (end is null) ? null : end.getSequenceIterStruct()); } /** * Creates a new GSequence. The @data_destroy function, if non-%NULL will * be called on all items when the sequence is destroyed and on items that * are removed from the sequence. * * Params: * dataDestroy = a #GDestroyNotify function, or %NULL * * Returns: a new #GSequence * * Since: 2.14 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GDestroyNotify dataDestroy) { auto p = g_sequence_new(dataDestroy); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSequence*) p); } /** * Finds an iterator somewhere in the range (@begin, @end). This * iterator will be close to the middle of the range, but is not * guaranteed to be exactly in the middle. * * The @begin and @end iterators must both point to the same sequence * and @begin must come before or be equal to @end in the sequence. * * Params: * begin = a #GSequenceIter * end = a #GSequenceIter * * Returns: a #GSequenceIter pointing somewhere in the * (@begin, @end) range * * Since: 2.14 */ public static SequenceIter rangeGetMidpoint(SequenceIter begin, SequenceIter end) { auto p = g_sequence_range_get_midpoint((begin is null) ? null : begin.getSequenceIterStruct(), (end is null) ? null : end.getSequenceIterStruct()); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Removes the item pointed to by @iter. It is an error to pass the * end iterator to this function. * * If the sequence has a data destroy function associated with it, this * function is called on the data for the removed item. * * Params: * iter = a #GSequenceIter * * Since: 2.14 */ public static void remove(SequenceIter iter) { g_sequence_remove((iter is null) ? null : iter.getSequenceIterStruct()); } /** * Removes all items in the (@begin, @end) range. * * If the sequence has a data destroy function associated with it, this * function is called on the data for the removed items. * * Params: * begin = a #GSequenceIter * end = a #GSequenceIter * * Since: 2.14 */ public static void removeRange(SequenceIter begin, SequenceIter end) { g_sequence_remove_range((begin is null) ? null : begin.getSequenceIterStruct(), (end is null) ? null : end.getSequenceIterStruct()); } /** * Changes the data for the item pointed to by @iter to be @data. If * the sequence has a data destroy function associated with it, that * function is called on the existing data that @iter pointed to. * * Params: * iter = a #GSequenceIter * data = new data for the item * * Since: 2.14 */ public static void set(SequenceIter iter, void* data) { g_sequence_set((iter is null) ? null : iter.getSequenceIterStruct(), data); } /** * Moves the data pointed to a new position as indicated by @cmp_func. This * function should be called for items in a sequence already sorted according * to @cmp_func whenever some aspect of an item changes so that @cmp_func * may return different values for that item. * * @cmp_func is called with two items of the @seq and @user_data. * It should return 0 if the items are equal, a negative value if * the first item comes before the second, and a positive value if * the second item comes before the first. * * Params: * iter = A #GSequenceIter * cmpFunc = the function used to compare items in the sequence * cmpData = user data passed to @cmp_func. * * Since: 2.14 */ public static void sortChanged(SequenceIter iter, GCompareDataFunc cmpFunc, void* cmpData) { g_sequence_sort_changed((iter is null) ? null : iter.getSequenceIterStruct(), cmpFunc, cmpData); } /** * Like g_sequence_sort_changed(), but uses * a #GSequenceIterCompareFunc instead of a #GCompareDataFunc as * the compare function. * * @iter_cmp is called with two iterators pointing into @seq. It should * return 0 if the iterators are equal, a negative value if the first * iterator comes before the second, and a positive value if the second * iterator comes before the first. * * Params: * iter = a #GSequenceIter * iterCmp = the function used to compare iterators in the sequence * cmpData = user data passed to @cmp_func * * Since: 2.14 */ public static void sortChangedIter(SequenceIter iter, GSequenceIterCompareFunc iterCmp, void* cmpData) { g_sequence_sort_changed_iter((iter is null) ? null : iter.getSequenceIterStruct(), iterCmp, cmpData); } /** * Swaps the items pointed to by @a and @b. It is allowed for @a and @b * to point into difference sequences. * * Params: * a = a #GSequenceIter * b = a #GSequenceIter * * Since: 2.14 */ public static void swap(SequenceIter a, SequenceIter b) { g_sequence_swap((a is null) ? null : a.getSequenceIterStruct(), (b is null) ? null : b.getSequenceIterStruct()); } } GtkD-3.7.5/generated/gtkd/glib/SequenceIter.d000066400000000000000000000114701324604450400207310ustar00rootroot00000000000000/* * 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 glib.SequenceIter; private import glib.Sequence; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The #GSequenceIter struct is an opaque data type representing an * iterator pointing into a #GSequence. */ public class SequenceIter { /** the main Gtk struct */ protected GSequenceIter* gSequenceIter; protected bool ownedRef; /** Get the main Gtk struct */ public GSequenceIter* getSequenceIterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSequenceIter; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gSequenceIter; } /** * Sets our main struct and passes it to the parent class. */ public this (GSequenceIter* gSequenceIter, bool ownedRef = false) { this.gSequenceIter = gSequenceIter; this.ownedRef = ownedRef; } /** * Returns a negative number if @a comes before @b, 0 if they are equal, * and a positive number if @a comes after @b. * * The @a and @b iterators must point into the same sequence. * * Params: * b = a #GSequenceIter * * Returns: a negative number if @a comes before @b, 0 if they are * equal, and a positive number if @a comes after @b * * Since: 2.14 */ public int compare(SequenceIter b) { return g_sequence_iter_compare(gSequenceIter, (b is null) ? null : b.getSequenceIterStruct()); } /** * Returns the position of @iter * * Returns: the position of @iter * * Since: 2.14 */ public int getPosition() { return g_sequence_iter_get_position(gSequenceIter); } /** * Returns the #GSequence that @iter points into. * * Returns: the #GSequence that @iter points into * * Since: 2.14 */ public Sequence getSequence() { auto p = g_sequence_iter_get_sequence(gSequenceIter); if(p is null) { return null; } return new Sequence(cast(GSequence*) p); } /** * Returns whether @iter is the begin iterator * * Returns: whether @iter is the begin iterator * * Since: 2.14 */ public bool isBegin() { return g_sequence_iter_is_begin(gSequenceIter) != 0; } /** * Returns whether @iter is the end iterator * * Returns: Whether @iter is the end iterator * * Since: 2.14 */ public bool isEnd() { return g_sequence_iter_is_end(gSequenceIter) != 0; } /** * Returns the #GSequenceIter which is @delta positions away from @iter. * If @iter is closer than -@delta positions to the beginning of the sequence, * the begin iterator is returned. If @iter is closer than @delta positions * to the end of the sequence, the end iterator is returned. * * Params: * delta = A positive or negative number indicating how many positions away * from @iter the returned #GSequenceIter will be * * Returns: a #GSequenceIter which is @delta positions away from @iter * * Since: 2.14 */ public SequenceIter move(int delta) { auto p = g_sequence_iter_move(gSequenceIter, delta); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Returns an iterator pointing to the next position after @iter. * If @iter is the end iterator, the end iterator is returned. * * Returns: a #GSequenceIter pointing to the next position after @iter * * Since: 2.14 */ public SequenceIter next() { auto p = g_sequence_iter_next(gSequenceIter); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } /** * Returns an iterator pointing to the previous position before @iter. * If @iter is the begin iterator, the begin iterator is returned. * * Returns: a #GSequenceIter pointing to the previous position * before @iter * * Since: 2.14 */ public SequenceIter prev() { auto p = g_sequence_iter_prev(gSequenceIter); if(p is null) { return null; } return new SequenceIter(cast(GSequenceIter*) p); } } GtkD-3.7.5/generated/gtkd/glib/ShellUtils.d000066400000000000000000000113541324604450400204260ustar00rootroot00000000000000/* * 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 glib.ShellUtils; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct ShellUtils { /** */ public static GQuark shellErrorQuark() { return g_shell_error_quark(); } /** * Parses a command line into an argument vector, in much the same way * the shell would, but without many of the expansions the shell would * perform (variable expansion, globs, operators, filename expansion, * etc. are not supported). The results are defined to be the same as * those you would get from a UNIX98 /bin/sh, as long as the input * contains none of the unsupported shell expansions. If the input * does contain such expansions, they are passed through * literally. Possible errors are those from the #G_SHELL_ERROR * domain. Free the returned vector with g_strfreev(). * * Params: * commandLine = command line to parse * argvp = return * location for array of args * * Returns: %TRUE on success, %FALSE if error set * * Throws: GException on failure. */ public static bool shellParseArgv(string commandLine, out string[] argvp) { int argcp; char** outargvp = null; GError* err = null; auto p = g_shell_parse_argv(Str.toStringz(commandLine), &argcp, &outargvp, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } argvp = Str.toStringArray(outargvp, argcp); return p; } /** * Quotes a string so that the shell (/bin/sh) will interpret the * quoted string to mean @unquoted_string. If you pass a filename to * the shell, for example, you should first quote it with this * function. The return value must be freed with g_free(). The * quoting style used is undefined (single or double quotes may be * used). * * Params: * unquotedString = a literal string * * Returns: quoted string */ public static string shellQuote(string unquotedString) { auto retStr = g_shell_quote(Str.toStringz(unquotedString)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Unquotes a string as the shell (/bin/sh) would. Only handles * quotes; if a string contains file globs, arithmetic operators, * variables, backticks, redirections, or other special-to-the-shell * features, the result will be different from the result a real shell * would produce (the variables, backticks, etc. will be passed * through literally instead of being expanded). This function is * guaranteed to succeed if applied to the result of * g_shell_quote(). If it fails, it returns %NULL and sets the * error. The @quoted_string need not actually contain quoted or * escaped text; g_shell_unquote() simply goes through the string and * unquotes/unescapes anything that the shell would. Both single and * double quotes are handled, as are escapes including escaped * newlines. The return value must be freed with g_free(). Possible * errors are in the #G_SHELL_ERROR domain. * * Shell quoting rules are a bit strange. Single quotes preserve the * literal string exactly. escape sequences are not allowed; not even * \' - if you want a ' in the quoted text, you have to do something * like 'foo'\''bar'. Double quotes allow $, `, ", \, and newline to * be escaped with backslash. Otherwise double quotes preserve things * literally. * * Params: * quotedString = shell-quoted string * * Returns: an unquoted string * * Throws: GException on failure. */ public static string shellUnquote(string quotedString) { GError* err = null; auto retStr = g_shell_unquote(Str.toStringz(quotedString), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/glib/SimpleXML.d000066400000000000000000000344561324604450400201600ustar00rootroot00000000000000/* * 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 glib.SimpleXML; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.ListSG; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * A parse context is used to parse a stream of bytes that * you expect to contain marked-up text. * * See g_markup_parse_context_new(), #GMarkupParser, and so * on for more details. */ public class SimpleXML { /** the main Gtk struct */ protected GMarkupParseContext* gMarkupParseContext; protected bool ownedRef; /** Get the main Gtk struct */ public GMarkupParseContext* getSimpleXMLStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gMarkupParseContext; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gMarkupParseContext; } /** * Sets our main struct and passes it to the parent class. */ public this (GMarkupParseContext* gMarkupParseContext, bool ownedRef = false) { this.gMarkupParseContext = gMarkupParseContext; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_markup_parse_context_unref(gMarkupParseContext); } /** * Creates a new parse context. A parse context is used to parse * marked-up documents. You can feed any number of documents into * a context, as long as no errors occur; once an error occurs, * the parse context can't continue to parse text (you have to * free it and create a new parse context). * * Params: * parser = a #GMarkupParser * flags = one or more #GMarkupParseFlags * userData = user data to pass to #GMarkupParser functions * userDataDnotify = user data destroy notifier called when * the parse context is freed * * Returns: a new #GMarkupParseContext * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GMarkupParser* parser, GMarkupParseFlags flags, void* userData, GDestroyNotify userDataDnotify) { auto p = g_markup_parse_context_new(parser, flags, userData, userDataDnotify); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GMarkupParseContext*) p); } /** * Signals to the #GMarkupParseContext that all data has been * fed into the parse context with g_markup_parse_context_parse(). * * This function reports an error if the document isn't complete, * for example if elements are still open. * * Returns: %TRUE on success, %FALSE if an error was set * * Throws: GException on failure. */ public bool endParse() { GError* err = null; auto p = g_markup_parse_context_end_parse(gMarkupParseContext, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Frees a #GMarkupParseContext. * * This function can't be called from inside one of the * #GMarkupParser functions or while a subparser is pushed. */ public void free() { g_markup_parse_context_free(gMarkupParseContext); ownedRef = false; } /** * Retrieves the name of the currently open element. * * If called from the start_element or end_element handlers this will * give the element_name as passed to those functions. For the parent * elements, see g_markup_parse_context_get_element_stack(). * * Returns: the name of the currently open element, or %NULL * * Since: 2.2 */ public string getElement() { return Str.toString(g_markup_parse_context_get_element(gMarkupParseContext)); } /** * Retrieves the element stack from the internal state of the parser. * * The returned #GSList is a list of strings where the first item is * the currently open tag (as would be returned by * g_markup_parse_context_get_element()) and the next item is its * immediate parent. * * This function is intended to be used in the start_element and * end_element handlers where g_markup_parse_context_get_element() * would merely return the name of the element that is being * processed. * * Returns: the element stack, which must not be modified * * Since: 2.16 */ public ListSG getElementStack() { auto p = g_markup_parse_context_get_element_stack(gMarkupParseContext); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Retrieves the current line number and the number of the character on * that line. Intended for use in error messages; there are no strict * semantics for what constitutes the "current" line number other than * "the best number we could come up with for error messages." * * Params: * lineNumber = return location for a line number, or %NULL * charNumber = return location for a char-on-line number, or %NULL */ public void getPosition(int* lineNumber, int* charNumber) { g_markup_parse_context_get_position(gMarkupParseContext, lineNumber, charNumber); } /** * Returns the user_data associated with @context. * * This will either be the user_data that was provided to * g_markup_parse_context_new() or to the most recent call * of g_markup_parse_context_push(). * * Returns: the provided user_data. The returned data belongs to * the markup context and will be freed when * g_markup_parse_context_free() is called. * * Since: 2.18 */ public void* getUserData() { return g_markup_parse_context_get_user_data(gMarkupParseContext); } /** * Feed some data to the #GMarkupParseContext. * * The data need not be valid UTF-8; an error will be signaled if * it's invalid. The data need not be an entire document; you can * feed a document into the parser incrementally, via multiple calls * to this function. Typically, as you receive data from a network * connection or file, you feed each received chunk of data into this * function, aborting the process if an error occurs. Once an error * is reported, no further data may be fed to the #GMarkupParseContext; * all errors are fatal. * * Params: * text = chunk of text to parse * textLen = length of @text in bytes * * Returns: %FALSE if an error occurred, %TRUE on success * * Throws: GException on failure. */ public bool parse(string text, ptrdiff_t textLen) { GError* err = null; auto p = g_markup_parse_context_parse(gMarkupParseContext, Str.toStringz(text), textLen, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Completes the process of a temporary sub-parser redirection. * * This function exists to collect the user_data allocated by a * matching call to g_markup_parse_context_push(). It must be called * in the end_element handler corresponding to the start_element * handler during which g_markup_parse_context_push() was called. * You must not call this function from the error callback -- the * @user_data is provided directly to the callback in that case. * * This function is not intended to be directly called by users * interested in invoking subparsers. Instead, it is intended to * be used by the subparsers themselves to implement a higher-level * interface. * * Returns: the user data passed to g_markup_parse_context_push() * * Since: 2.18 */ public void* pop() { return g_markup_parse_context_pop(gMarkupParseContext); } /** * Temporarily redirects markup data to a sub-parser. * * This function may only be called from the start_element handler of * a #GMarkupParser. It must be matched with a corresponding call to * g_markup_parse_context_pop() in the matching end_element handler * (except in the case that the parser aborts due to an error). * * All tags, text and other data between the matching tags is * redirected to the subparser given by @parser. @user_data is used * as the user_data for that parser. @user_data is also passed to the * error callback in the event that an error occurs. This includes * errors that occur in subparsers of the subparser. * * The end tag matching the start tag for which this call was made is * handled by the previous parser (which is given its own user_data) * which is why g_markup_parse_context_pop() is provided to allow "one * last access" to the @user_data provided to this function. In the * case of error, the @user_data provided here is passed directly to * the error callback of the subparser and g_markup_parse_context_pop() * should not be called. In either case, if @user_data was allocated * then it ought to be freed from both of these locations. * * This function is not intended to be directly called by users * interested in invoking subparsers. Instead, it is intended to be * used by the subparsers themselves to implement a higher-level * interface. * * As an example, see the following implementation of a simple * parser that counts the number of tags encountered. * * |[ * typedef struct * { * gint tag_count; * } CounterData; * * static void * counter_start_element (GMarkupParseContext *context, * const gchar *element_name, * const gchar **attribute_names, * const gchar **attribute_values, * gpointer user_data, * GError **error) * { * CounterData *data = user_data; * * data->tag_count++; * } * * static void * counter_error (GMarkupParseContext *context, * GError *error, * gpointer user_data) * { * CounterData *data = user_data; * * g_slice_free (CounterData, data); * } * * static GMarkupParser counter_subparser = * { * counter_start_element, * NULL, * NULL, * NULL, * counter_error * }; * ]| * * In order to allow this parser to be easily used as a subparser, the * following interface is provided: * * |[ * void * start_counting (GMarkupParseContext *context) * { * CounterData *data = g_slice_new (CounterData); * * data->tag_count = 0; * g_markup_parse_context_push (context, &counter_subparser, data); * } * * gint * end_counting (GMarkupParseContext *context) * { * CounterData *data = g_markup_parse_context_pop (context); * int result; * * result = data->tag_count; * g_slice_free (CounterData, data); * * return result; * } * ]| * * The subparser would then be used as follows: * * |[ * static void start_element (context, element_name, ...) * { * if (strcmp (element_name, "count-these") == 0) * start_counting (context); * * // else, handle other tags... * } * * static void end_element (context, element_name, ...) * { * if (strcmp (element_name, "count-these") == 0) * g_print ("Counted %d tags\n", end_counting (context)); * * // else, handle other tags... * } * ]| * * Params: * parser = a #GMarkupParser * userData = user data to pass to #GMarkupParser functions * * Since: 2.18 */ public void push(GMarkupParser* parser, void* userData) { g_markup_parse_context_push(gMarkupParseContext, parser, userData); } /** * Increases the reference count of @context. * * Returns: the same @context * * Since: 2.36 */ public SimpleXML doref() { auto p = g_markup_parse_context_ref(gMarkupParseContext); if(p is null) { return null; } return new SimpleXML(cast(GMarkupParseContext*) p, true); } /** * Decreases the reference count of @context. When its reference count * drops to 0, it is freed. * * Since: 2.36 */ public void unref() { g_markup_parse_context_unref(gMarkupParseContext); } /** */ public static GQuark markupErrorQuark() { return g_markup_error_quark(); } /** * Escapes text so that the markup parser will parse it verbatim. * Less than, greater than, ampersand, etc. are replaced with the * corresponding entities. This function would typically be used * when writing out a file to be parsed with the markup parser. * * Note that this function doesn't protect whitespace and line endings * from being processed according to the XML rules for normalization * of line endings and attribute values. * * Note also that this function will produce character references in * the range of  ...  for all control sequences * except for tabstop, newline and carriage return. The character * references in this range are not valid XML 1.0, but they are * valid XML 1.1 and will be accepted by the GMarkup parser. * * Params: * text = some valid UTF-8 text * length = length of @text in bytes, or -1 if the text is nul-terminated * * Returns: a newly allocated string with the escaped text */ public static string markupEscapeText(string text, ptrdiff_t length) { auto retStr = g_markup_escape_text(Str.toStringz(text), length); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Formats the data in @args according to @format, escaping * all string and character arguments in the fashion * of g_markup_escape_text(). See g_markup_printf_escaped(). * * Params: * format = printf() style format string * args = variable argument list, similar to vprintf() * * Returns: newly allocated result from formatting * operation. Free with g_free(). * * Since: 2.4 */ public static string markupVprintfEscaped(string format, void* args) { auto retStr = g_markup_vprintf_escaped(Str.toStringz(format), args); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/glib/Source.d000066400000000000000000000560641324604450400176050ustar00rootroot00000000000000/* * 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 glib.Source; private import glib.ConstructionException; private import glib.MainContext; private import glib.Str; private import glib.TimeVal; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The `GSource` struct is an opaque data type * representing an event source. */ public class Source { /** the main Gtk struct */ protected GSource* gSource; protected bool ownedRef; /** Get the main Gtk struct */ public GSource* getSourceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gSource; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gSource; } /** * Sets our main struct and passes it to the parent class. */ public this (GSource* gSource, bool ownedRef = false) { this.gSource = gSource; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_source_unref(gSource); } /** * Creates a new #GSource structure. The size is specified to * allow creating structures derived from #GSource that contain * additional data. The size passed in must be at least * `sizeof (GSource)`. * * The source will not initially be associated with any #GMainContext * and must be added to one with g_source_attach() before it will be * executed. * * Params: * sourceFuncs = structure containing functions that implement * the sources behavior. * structSize = size of the #GSource structure to create. * * Returns: the newly-created #GSource. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GSourceFuncs* sourceFuncs, uint structSize) { auto p = g_source_new(sourceFuncs, structSize); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GSource*) p); } /** * Adds @child_source to @source as a "polled" source; when @source is * added to a #GMainContext, @child_source will be automatically added * with the same priority, when @child_source is triggered, it will * cause @source to dispatch (in addition to calling its own * callback), and when @source is destroyed, it will destroy * @child_source as well. (@source will also still be dispatched if * its own prepare/check functions indicate that it is ready.) * * If you don't need @child_source to do anything on its own when it * triggers, you can call g_source_set_dummy_callback() on it to set a * callback that does nothing (except return %TRUE if appropriate). * * @source will hold a reference on @child_source while @child_source * is attached to it. * * This API is only intended to be used by implementations of #GSource. * Do not call this API on a #GSource that you did not create. * * Params: * childSource = a second #GSource that @source should "poll" * * Since: 2.28 */ public void addChildSource(Source childSource) { g_source_add_child_source(gSource, (childSource is null) ? null : childSource.getSourceStruct()); } /** * Adds a file descriptor to the set of file descriptors polled for * this source. This is usually combined with g_source_new() to add an * event source. The event source's check function will typically test * the @revents field in the #GPollFD struct and return %TRUE if events need * to be processed. * * This API is only intended to be used by implementations of #GSource. * Do not call this API on a #GSource that you did not create. * * Using this API forces the linear scanning of event sources on each * main loop iteration. Newly-written event sources should try to use * g_source_add_unix_fd() instead of this API. * * Params: * fd = a #GPollFD structure holding information about a file * descriptor to watch. */ public void addPoll(GPollFD* fd) { g_source_add_poll(gSource, fd); } /** * Monitors @fd for the IO events in @events. * * The tag returned by this function can be used to remove or modify the * monitoring of the fd using g_source_remove_unix_fd() or * g_source_modify_unix_fd(). * * It is not necessary to remove the fd before destroying the source; it * will be cleaned up automatically. * * This API is only intended to be used by implementations of #GSource. * Do not call this API on a #GSource that you did not create. * * As the name suggests, this function is not available on Windows. * * Params: * fd = the fd to monitor * events = an event mask * * Returns: an opaque tag * * Since: 2.36 */ public void* addUnixFd(int fd, GIOCondition events) { return g_source_add_unix_fd(gSource, fd, events); } /** * Adds a #GSource to a @context so that it will be executed within * that context. Remove it by calling g_source_destroy(). * * Params: * context = a #GMainContext (if %NULL, the default context will be used) * * Returns: the ID (greater than 0) for the source within the * #GMainContext. */ public uint attach(MainContext context) { return g_source_attach(gSource, (context is null) ? null : context.getMainContextStruct()); } /** * Removes a source from its #GMainContext, if any, and mark it as * destroyed. The source cannot be subsequently added to another * context. It is safe to call this on sources which have already been * removed from their context. */ public void destroy() { g_source_destroy(gSource); } /** * Checks whether a source is allowed to be called recursively. * see g_source_set_can_recurse(). * * Returns: whether recursion is allowed. */ public bool getCanRecurse() { return g_source_get_can_recurse(gSource) != 0; } /** * Gets the #GMainContext with which the source is associated. * * You can call this on a source that has been destroyed, provided * that the #GMainContext it was attached to still exists (in which * case it will return that #GMainContext). In particular, you can * always call this function on the source returned from * g_main_current_source(). But calling this function on a source * whose #GMainContext has been destroyed is an error. * * Returns: the #GMainContext with which the * source is associated, or %NULL if the context has not * yet been added to a source. */ public MainContext getContext() { auto p = g_source_get_context(gSource); if(p is null) { return null; } return new MainContext(cast(GMainContext*) p); } /** * This function ignores @source and is otherwise the same as * g_get_current_time(). * * Deprecated: use g_source_get_time() instead * * Params: * timeval = #GTimeVal structure in which to store current time. */ public void getCurrentTime(TimeVal timeval) { g_source_get_current_time(gSource, (timeval is null) ? null : timeval.getTimeValStruct()); } /** * Returns the numeric ID for a particular source. The ID of a source * is a positive integer which is unique within a particular main loop * context. The reverse * mapping from ID to source is done by g_main_context_find_source_by_id(). * * Returns: the ID (greater than 0) for the source */ public uint getId() { return g_source_get_id(gSource); } /** * Gets a name for the source, used in debugging and profiling. The * name may be #NULL if it has never been set with g_source_set_name(). * * Returns: the name of the source * * Since: 2.26 */ public string getName() { return Str.toString(g_source_get_name(gSource)); } /** * Gets the priority of a source. * * Returns: the priority of the source */ public int getPriority() { return g_source_get_priority(gSource); } /** * Gets the "ready time" of @source, as set by * g_source_set_ready_time(). * * Any time before the current monotonic time (including 0) is an * indication that the source will fire immediately. * * Returns: the monotonic ready time, -1 for "never" */ public long getReadyTime() { return g_source_get_ready_time(gSource); } /** * Gets the time to be used when checking this source. The advantage of * calling this function over calling g_get_monotonic_time() directly is * that when checking multiple sources, GLib can cache a single value * instead of having to repeatedly get the system monotonic time. * * The time here is the system monotonic time, if available, or some * other reasonable alternative otherwise. See g_get_monotonic_time(). * * Returns: the monotonic time in microseconds * * Since: 2.28 */ public long getTime() { return g_source_get_time(gSource); } /** * Returns whether @source has been destroyed. * * This is important when you operate upon your objects * from within idle handlers, but may have freed the object * before the dispatch of your idle handler. * * |[ * static gboolean * idle_callback (gpointer data) * { * SomeWidget *self = data; * * GDK_THREADS_ENTER (); * // do stuff with self * self->idle_id = 0; * GDK_THREADS_LEAVE (); * * return G_SOURCE_REMOVE; * } * * static void * some_widget_do_stuff_later (SomeWidget *self) * { * self->idle_id = g_idle_add (idle_callback, self); * } * * static void * some_widget_finalize (GObject *object) * { * SomeWidget *self = SOME_WIDGET (object); * * if (self->idle_id) * g_source_remove (self->idle_id); * * G_OBJECT_CLASS (parent_class)->finalize (object); * } * ]| * * This will fail in a multi-threaded application if the * widget is destroyed before the idle handler fires due * to the use after free in the callback. A solution, to * this particular problem, is to check to if the source * has already been destroy within the callback. * * |[ * static gboolean * idle_callback (gpointer data) * { * SomeWidget *self = data; * * GDK_THREADS_ENTER (); * if (!g_source_is_destroyed (g_main_current_source ())) * { * // do stuff with self * } * GDK_THREADS_LEAVE (); * * return FALSE; * } * ]| * * Calls to this function from a thread other than the one acquired by the * #GMainContext the #GSource is attached to are typically redundant, as the * source could be destroyed immediately after this function returns. However, * once a source is destroyed it cannot be un-destroyed, so this function can be * used for opportunistic checks from any thread. * * Returns: %TRUE if the source has been destroyed * * Since: 2.12 */ public bool isDestroyed() { return g_source_is_destroyed(gSource) != 0; } /** * Updates the event mask to watch for the fd identified by @tag. * * @tag is the tag returned from g_source_add_unix_fd(). * * If you want to remove a fd, don't set its event mask to zero. * Instead, call g_source_remove_unix_fd(). * * This API is only intended to be used by implementations of #GSource. * Do not call this API on a #GSource that you did not create. * * As the name suggests, this function is not available on Windows. * * Params: * tag = the tag from g_source_add_unix_fd() * newEvents = the new event mask to watch * * Since: 2.36 */ public void modifyUnixFd(void* tag, GIOCondition newEvents) { g_source_modify_unix_fd(gSource, tag, newEvents); } /** * Queries the events reported for the fd corresponding to @tag on * @source during the last poll. * * The return value of this function is only defined when the function * is called from the check or dispatch functions for @source. * * This API is only intended to be used by implementations of #GSource. * Do not call this API on a #GSource that you did not create. * * As the name suggests, this function is not available on Windows. * * Params: * tag = the tag from g_source_add_unix_fd() * * Returns: the conditions reported on the fd * * Since: 2.36 */ public GIOCondition queryUnixFd(void* tag) { return g_source_query_unix_fd(gSource, tag); } /** * Increases the reference count on a source by one. * * Returns: @source */ public Source doref() { auto p = g_source_ref(gSource); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } /** * Detaches @child_source from @source and destroys it. * * This API is only intended to be used by implementations of #GSource. * Do not call this API on a #GSource that you did not create. * * Params: * childSource = a #GSource previously passed to * g_source_add_child_source(). * * Since: 2.28 */ public void removeChildSource(Source childSource) { g_source_remove_child_source(gSource, (childSource is null) ? null : childSource.getSourceStruct()); } /** * Removes a file descriptor from the set of file descriptors polled for * this source. * * This API is only intended to be used by implementations of #GSource. * Do not call this API on a #GSource that you did not create. * * Params: * fd = a #GPollFD structure previously passed to g_source_add_poll(). */ public void removePoll(GPollFD* fd) { g_source_remove_poll(gSource, fd); } /** * Reverses the effect of a previous call to g_source_add_unix_fd(). * * You only need to call this if you want to remove an fd from being * watched while keeping the same source around. In the normal case you * will just want to destroy the source. * * This API is only intended to be used by implementations of #GSource. * Do not call this API on a #GSource that you did not create. * * As the name suggests, this function is not available on Windows. * * Params: * tag = the tag from g_source_add_unix_fd() * * Since: 2.36 */ public void removeUnixFd(void* tag) { g_source_remove_unix_fd(gSource, tag); } /** * Sets the callback function for a source. The callback for a source is * called from the source's dispatch function. * * The exact type of @func depends on the type of source; ie. you * should not count on @func being called with @data as its first * parameter. * * See [memory management of sources][mainloop-memory-management] for details * on how to handle memory management of @data. * * Typically, you won't use this function. Instead use functions specific * to the type of source you are using. * * Params: * func = a callback function * data = the data to pass to callback function * notify = a function to call when @data is no longer in use, or %NULL. */ public void setCallback(GSourceFunc func, void* data, GDestroyNotify notify) { g_source_set_callback(gSource, func, data, notify); } /** * Sets the callback function storing the data as a refcounted callback * "object". This is used internally. Note that calling * g_source_set_callback_indirect() assumes * an initial reference count on @callback_data, and thus * @callback_funcs->unref will eventually be called once more * than @callback_funcs->ref. * * Params: * callbackData = pointer to callback data "object" * callbackFuncs = functions for reference counting @callback_data * and getting the callback and data */ public void setCallbackIndirect(void* callbackData, GSourceCallbackFuncs* callbackFuncs) { g_source_set_callback_indirect(gSource, callbackData, callbackFuncs); } /** * Sets whether a source can be called recursively. If @can_recurse is * %TRUE, then while the source is being dispatched then this source * will be processed normally. Otherwise, all processing of this * source is blocked until the dispatch function returns. * * Params: * canRecurse = whether recursion is allowed for this source */ public void setCanRecurse(bool canRecurse) { g_source_set_can_recurse(gSource, canRecurse); } /** * Sets the source functions (can be used to override * default implementations) of an unattached source. * * Params: * funcs = the new #GSourceFuncs * * Since: 2.12 */ public void setFuncs(GSourceFuncs* funcs) { g_source_set_funcs(gSource, funcs); } /** * Sets a name for the source, used in debugging and profiling. * The name defaults to #NULL. * * The source name should describe in a human-readable way * what the source does. For example, "X11 event queue" * or "GTK+ repaint idle handler" or whatever it is. * * It is permitted to call this function multiple times, but is not * recommended due to the potential performance impact. For example, * one could change the name in the "check" function of a #GSourceFuncs * to include details like the event type in the source name. * * Use caution if changing the name while another thread may be * accessing it with g_source_get_name(); that function does not copy * the value, and changing the value will free it while the other thread * may be attempting to use it. * * Params: * name = debug name for the source * * Since: 2.26 */ public void setName(string name) { g_source_set_name(gSource, Str.toStringz(name)); } /** * Sets the priority of a source. While the main loop is being run, a * source will be dispatched if it is ready to be dispatched and no * sources at a higher (numerically smaller) priority are ready to be * dispatched. * * A child source always has the same priority as its parent. It is not * permitted to change the priority of a source once it has been added * as a child of another source. * * Params: * priority = the new priority. */ public void setPriority(int priority) { g_source_set_priority(gSource, priority); } /** * Sets a #GSource to be dispatched when the given monotonic time is * reached (or passed). If the monotonic time is in the past (as it * always will be if @ready_time is 0) then the source will be * dispatched immediately. * * If @ready_time is -1 then the source is never woken up on the basis * of the passage of time. * * Dispatching the source does not reset the ready time. You should do * so yourself, from the source dispatch function. * * Note that if you have a pair of sources where the ready time of one * suggests that it will be delivered first but the priority for the * other suggests that it would be delivered first, and the ready time * for both sources is reached during the same main context iteration * then the order of dispatch is undefined. * * It is a no-op to call this function on a #GSource which has already been * destroyed with g_source_destroy(). * * This API is only intended to be used by implementations of #GSource. * Do not call this API on a #GSource that you did not create. * * Params: * readyTime = the monotonic time at which the source will be ready, * 0 for "immediately", -1 for "never" * * Since: 2.36 */ public void setReadyTime(long readyTime) { g_source_set_ready_time(gSource, readyTime); } /** * Decreases the reference count of a source by one. If the * resulting reference count is zero the source and associated * memory will be destroyed. */ public void unref() { g_source_unref(gSource); } /** * Removes the source with the given id from the default main context. * * The id of a #GSource is given by g_source_get_id(), or will be * returned by the functions g_source_attach(), g_idle_add(), * g_idle_add_full(), g_timeout_add(), g_timeout_add_full(), * g_child_watch_add(), g_child_watch_add_full(), g_io_add_watch(), and * g_io_add_watch_full(). * * See also g_source_destroy(). You must use g_source_destroy() for sources * added to a non-default main context. * * It is a programmer error to attempt to remove a non-existent source. * * More specifically: source IDs can be reissued after a source has been * destroyed and therefore it is never valid to use this function with a * source ID which may have already been removed. An example is when * scheduling an idle to run in another thread with g_idle_add(): the * idle may already have run and been removed by the time this function * is called on its (now invalid) source ID. This source ID may have * been reissued, leading to the operation being performed against the * wrong source. * * Params: * tag = the ID of the source to remove. * * Returns: For historical reasons, this function always returns %TRUE */ public static bool remove(uint tag) { return g_source_remove(tag) != 0; } /** * Removes a source from the default main loop context given the * source functions and user data. If multiple sources exist with the * same source functions and user data, only one will be destroyed. * * Params: * funcs = The @source_funcs passed to g_source_new() * userData = the user data for the callback * * Returns: %TRUE if a source was found and removed. */ public static bool removeByFuncsUserData(GSourceFuncs* funcs, void* userData) { return g_source_remove_by_funcs_user_data(funcs, userData) != 0; } /** * Removes a source from the default main loop context given the user * data for the callback. If multiple sources exist with the same user * data, only one will be destroyed. * * Params: * userData = the user_data for the callback. * * Returns: %TRUE if a source was found and removed. */ public static bool removeByUserData(void* userData) { return g_source_remove_by_user_data(userData) != 0; } /** * Sets the name of a source using its ID. * * This is a convenience utility to set source names from the return * value of g_idle_add(), g_timeout_add(), etc. * * It is a programmer error to attempt to set the name of a non-existent * source. * * More specifically: source IDs can be reissued after a source has been * destroyed and therefore it is never valid to use this function with a * source ID which may have already been removed. An example is when * scheduling an idle to run in another thread with g_idle_add(): the * idle may already have run and been removed by the time this function * is called on its (now invalid) source ID. This source ID may have * been reissued, leading to the operation being performed against the * wrong source. * * Params: * tag = a #GSource ID * name = debug name for the source * * Since: 2.26 */ public static void setNameById(uint tag, string name) { g_source_set_name_by_id(tag, Str.toStringz(name)); } } GtkD-3.7.5/generated/gtkd/glib/Spawn.d000066400000000000000000000406421324604450400174300ustar00rootroot00000000000000/* * 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 glib.Spawn; private import core.stdc.stdio; private import core.stdc.string; private import core.thread; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import std.string; private import std.traits; /** */ public class Spawn { //we need fdopen. version(Posix) { private import core.sys.posix.stdio; } //fdopen for Windows is defined in glib.c.types. string workingDirectory = "."; string[] argv; string[] envp; GSpawnFlags flags = SpawnFlags.SEARCH_PATH; GSpawnChildSetupFunc childSetup; void* userData; GPid childPid; FILE* standardInput; FILE* standardOutput; FILE* standardError; GError* error; int stdIn; int stdOut; int stdErr; // for commandLineSync int exitStatus; char* strOutput; char* strError; alias bool delegate(Spawn) ChildWatch; ChildWatch externalWatch; /** * Creates a Spawn for execution. */ public this(string program, string[] envp=null) { argv ~= program; this.envp = envp; } /** * Creates a Spawn for execution. */ public this(string[] program, string[] envp=null) { argv = program; this.envp = envp; } /** * Adds a delegate to be notified on the end of the child process. * Params: * dlg = */ public void addChildWatch(ChildWatch dlg) { externalWatch = dlg; } /** * Closes all open streams and child process. */ public void close() { if (stdIn != 0 ) { fclose(standardInput); stdIn = 0; } if (stdOut != 0 ) { fclose(standardOutput); stdOut = 0; } if (stdErr != 0 ) { fclose(standardError); stdErr = 0; } static if ( isPointer!(GPid) ) { if ( childPid !is null ) { closePid(childPid); childPid = null; } } else { if ( childPid != 0 ) { closePid(childPid); childPid = 0; } } } /** * Adds a parameter to the execution program */ public void addParm(string parm) { argv ~= parm; } /** * Gets the last error message */ public string getLastError() { if ( error != null ) { return Str.toString(error.message); } return ""; } /** * Executes the prepared process */ public int execAsyncWithPipes( ChildWatch externalWatch = null, bool delegate(string) readOutput = null, bool delegate(string) readError = null ) { int result = g_spawn_async_with_pipes( Str.toStringz(workingDirectory), Str.toStringzArray(argv), Str.toStringzArray(envp), flags, childSetup, userData, &childPid, &stdIn, &stdOut, &stdErr, &error ); if ( result != 0 ) { this.externalWatch = externalWatch; g_child_watch_add(childPid, cast(GChildWatchFunc)(&childWatchCallback), cast(void*)this); standardInput = fdopen(stdIn, Str.toStringz("w")); standardOutput = fdopen(stdOut, Str.toStringz("r")); standardError = fdopen(stdErr, Str.toStringz("r")); if ( readOutput !is null ) { (new ReadFile(standardOutput, readOutput)).start(); } if ( readError !is null ) { (new ReadFile(standardError, readError)).start(); } } return result; } class ReadFile : Thread { bool delegate(string) read; FILE* file; int lineCount; this(FILE* file, bool delegate (string) read ) { this.file = file; this.read = read; super(&run); } public void run() { string line = readLine(file); while( line !is null ) { ++lineCount; if ( read !is null ) { read(line); } line = readLine(file); } } } private string readLine(FILE* stream, int max=4096) { if ( feof(stream) ) { if ( externalWatch !is null ) { externalWatch(this); } return null; } string line; line.length = max+1; char* lineP = fgets(Str.toStringz(line), max, stream); if ( lineP is null ) { return ""; } size_t l = strlen(line.ptr); if ( l > 0 ) --l; return line[0..l]; } extern(C) static void childWatchCallback(int pid, int status, Spawn spawn) { //writefln("Spawn.childWatchCallback %s %s", pid, status); spawn.exitStatus = status; if ( spawn.externalWatch !is null ) { spawn.externalWatch(spawn); } spawn.close(); } public bool endOfOutput() { if ( standardOutput is null ) return true; return feof(standardOutput) != 0; } public bool endOfError() { if ( standardError is null ) return true; return feof(standardError) != 0; } string getOutputString() { return Str.toString(strOutput); } string getErrorString() { return Str.toString(strError); } int getExitStatus() { return exitStatus; } /** * Executes a command synchronasly and * optionally calls delegates for sysout, syserr and end of job * */ public int commandLineSync( ChildWatch externalWatch = null, bool delegate(string) readOutput = null, bool delegate(string) readError = null ) { string commandLine; foreach ( int count, string arg; argv) { if ( count > 0 ) { commandLine ~= ' '; } commandLine ~= arg; } int status = g_spawn_command_line_sync( Str.toStringz(commandLine), &strOutput, &strError, &exitStatus, &error); if ( readOutput != null ) { foreach ( string line ; splitLines(Str.toString(strOutput)) ) { readOutput(line); } } if ( readError != null ) { foreach ( string line ; splitLines(Str.toString(strError)) ) { readError(line); } } if ( externalWatch != null ) { externalWatch(this); } return status; } /** */ /** * See g_spawn_async_with_pipes() for a full description; this function * simply calls the g_spawn_async_with_pipes() without any pipes. * * You should call g_spawn_close_pid() on the returned child process * reference when you don't need it any more. * * If you are writing a GTK+ application, and the program you are spawning is a * graphical application too, then to ensure that the spawned program opens its * windows on the right screen, you may want to use #GdkAppLaunchContext, * #GAppLaunchcontext, or set the %DISPLAY environment variable. * * Note that the returned @child_pid on Windows is a handle to the child * process and not its identifier. Process handles and process identifiers * are different concepts on Windows. * * Params: * workingDirectory = child's current working directory, or %NULL to inherit parent's * argv = child's argument vector * envp = child's environment, or %NULL to inherit parent's * flags = flags from #GSpawnFlags * childSetup = function to run in the child just before exec() * userData = user data for @child_setup * childPid = return location for child process reference, or %NULL * * Returns: %TRUE on success, %FALSE if error is set * * Throws: GException on failure. */ public static bool async(string workingDirectory, string[] argv, string[] envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, out GPid childPid) { GError* err = null; auto p = g_spawn_async(Str.toStringz(workingDirectory), Str.toStringzArray(argv), Str.toStringzArray(envp), flags, childSetup, userData, &childPid, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Set @error if @exit_status indicates the child exited abnormally * (e.g. with a nonzero exit code, or via a fatal signal). * * The g_spawn_sync() and g_child_watch_add() family of APIs return an * exit status for subprocesses encoded in a platform-specific way. * On Unix, this is guaranteed to be in the same format waitpid() returns, * and on Windows it is guaranteed to be the result of GetExitCodeProcess(). * * Prior to the introduction of this function in GLib 2.34, interpreting * @exit_status required use of platform-specific APIs, which is problematic * for software using GLib as a cross-platform layer. * * Additionally, many programs simply want to determine whether or not * the child exited successfully, and either propagate a #GError or * print a message to standard error. In that common case, this function * can be used. Note that the error message in @error will contain * human-readable information about the exit status. * * The @domain and @code of @error have special semantics in the case * where the process has an "exit code", as opposed to being killed by * a signal. On Unix, this happens if WIFEXITED() would be true of * @exit_status. On Windows, it is always the case. * * The special semantics are that the actual exit code will be the * code set in @error, and the domain will be %G_SPAWN_EXIT_ERROR. * This allows you to differentiate between different exit codes. * * If the process was terminated by some means other than an exit * status, the domain will be %G_SPAWN_ERROR, and the code will be * %G_SPAWN_ERROR_FAILED. * * This function just offers convenience; you can of course also check * the available platform via a macro such as %G_OS_UNIX, and use * WIFEXITED() and WEXITSTATUS() on @exit_status directly. Do not attempt * to scan or parse the error message string; it may be translated and/or * change in future versions of GLib. * * Params: * exitStatus = An exit code as returned from g_spawn_sync() * * Returns: %TRUE if child exited successfully, %FALSE otherwise (and * @error will be set) * * Since: 2.34 * * Throws: GException on failure. */ public static bool checkExitStatus(int exitStatus) { GError* err = null; auto p = g_spawn_check_exit_status(exitStatus, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * On some platforms, notably Windows, the #GPid type represents a resource * which must be closed to prevent resource leaking. g_spawn_close_pid() * is provided for this purpose. It should be used on all platforms, even * though it doesn't do anything under UNIX. * * Params: * pid = The process reference to close */ public static void closePid(GPid pid) { g_spawn_close_pid(pid); } /** * A simple version of g_spawn_async() that parses a command line with * g_shell_parse_argv() and passes it to g_spawn_async(). Runs a * command line in the background. Unlike g_spawn_async(), the * %G_SPAWN_SEARCH_PATH flag is enabled, other flags are not. Note * that %G_SPAWN_SEARCH_PATH can have security implications, so * consider using g_spawn_async() directly if appropriate. Possible * errors are those from g_shell_parse_argv() and g_spawn_async(). * * The same concerns on Windows apply as for g_spawn_command_line_sync(). * * Params: * commandLine = a command line * * Returns: %TRUE on success, %FALSE if error is set * * Throws: GException on failure. */ public static bool commandLineAsync(string commandLine) { GError* err = null; auto p = g_spawn_command_line_async(Str.toStringz(commandLine), &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * A simple version of g_spawn_sync() with little-used parameters * removed, taking a command line instead of an argument vector. See * g_spawn_sync() for full details. @command_line will be parsed by * g_shell_parse_argv(). Unlike g_spawn_sync(), the %G_SPAWN_SEARCH_PATH flag * is enabled. Note that %G_SPAWN_SEARCH_PATH can have security * implications, so consider using g_spawn_sync() directly if * appropriate. Possible errors are those from g_spawn_sync() and those * from g_shell_parse_argv(). * * If @exit_status is non-%NULL, the platform-specific exit status of * the child is stored there; see the documentation of * g_spawn_check_exit_status() for how to use and interpret this. * * On Windows, please note the implications of g_shell_parse_argv() * parsing @command_line. Parsing is done according to Unix shell rules, not * Windows command interpreter rules. * Space is a separator, and backslashes are * special. Thus you cannot simply pass a @command_line containing * canonical Windows paths, like "c:\\program files\\app\\app.exe", as * the backslashes will be eaten, and the space will act as a * separator. You need to enclose such paths with single quotes, like * "'c:\\program files\\app\\app.exe' 'e:\\folder\\argument.txt'". * * Params: * commandLine = a command line * standardOutput = return location for child output * standardError = return location for child errors * exitStatus = return location for child exit status, as returned by waitpid() * * Returns: %TRUE on success, %FALSE if an error was set * * Throws: GException on failure. */ public static bool commandLineSync(string commandLine, out string standardOutput, out string standardError, out int exitStatus) { char* outstandardOutput = null; char* outstandardError = null; GError* err = null; auto p = g_spawn_command_line_sync(Str.toStringz(commandLine), &outstandardOutput, &outstandardError, &exitStatus, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } standardOutput = Str.toString(outstandardOutput); standardError = Str.toString(outstandardError); return p; } /** */ public static GQuark errorQuark() { return g_spawn_error_quark(); } /** */ public static GQuark exitErrorQuark() { return g_spawn_exit_error_quark(); } /** * Executes a child synchronously (waits for the child to exit before returning). * All output from the child is stored in @standard_output and @standard_error, * if those parameters are non-%NULL. Note that you must set the * %G_SPAWN_STDOUT_TO_DEV_NULL and %G_SPAWN_STDERR_TO_DEV_NULL flags when * passing %NULL for @standard_output and @standard_error. * * If @exit_status is non-%NULL, the platform-specific exit status of * the child is stored there; see the documentation of * g_spawn_check_exit_status() for how to use and interpret this. * Note that it is invalid to pass %G_SPAWN_DO_NOT_REAP_CHILD in * @flags. * * If an error occurs, no data is returned in @standard_output, * @standard_error, or @exit_status. * * This function calls g_spawn_async_with_pipes() internally; see that * function for full details on the other parameters and details on * how these functions work on Windows. * * Params: * workingDirectory = child's current working directory, or %NULL to inherit parent's * argv = child's argument vector * envp = child's environment, or %NULL to inherit parent's * flags = flags from #GSpawnFlags * childSetup = function to run in the child just before exec() * userData = user data for @child_setup * standardOutput = return location for child output, or %NULL * standardError = return location for child error messages, or %NULL * exitStatus = return location for child exit status, as returned by waitpid(), or %NULL * * Returns: %TRUE on success, %FALSE if an error was set * * Throws: GException on failure. */ public static bool sync(string workingDirectory, string[] argv, string[] envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, out string standardOutput, out string standardError, out int exitStatus) { char* outstandardOutput = null; char* outstandardError = null; GError* err = null; auto p = g_spawn_sync(Str.toStringz(workingDirectory), Str.toStringzArray(argv), Str.toStringzArray(envp), flags, childSetup, userData, &outstandardOutput, &outstandardError, &exitStatus, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } standardOutput = Str.toString(outstandardOutput); standardError = Str.toString(outstandardError); return p; } } GtkD-3.7.5/generated/gtkd/glib/Str.d000066400000000000000000001475741324604450400171240ustar00rootroot00000000000000/* * 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 glib.Str; private import core.stdc.stdio; private import core.stdc.string; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gobject.c.types; public import gtkc.glibtypes; /** */ public struct Str { /* * Convert C-style 0 terminated string s to char[] string. * copied from phobos */ public static string toString(const(char)* s, size_t len = 0) { if ( s is null ) return cast(string)null; if ( len == 0 ) len = strlen(s); return s[0 .. len].idup; } /* * Convert array of chars s[] to a C-style 0 terminated string. * copied from phobos */ public static char* toStringz(string s) { if ( s is null ) return null; char[] copy; if (s.length == 0) { copy = "\0".dup; } else { // Need to make a copy copy = new char[s.length + 1]; copy[0..s.length] = s[]; copy[s.length] = 0; } return copy.ptr; } /** */ public static char** toStringzArray(string[] args) { if ( args is null ) { return null; } char** argv = (new char*[args.length]).ptr; int argc = 0; foreach (string p; args) { argv[argc++] = cast(char*)(p.dup~'\0'); } argv[argc] = null; return argv; } /** */ public static char*** toStringzArray(string[][] args) { if ( args is null ) { return null; } char**[] argv = new char**[args.length]; int argc = 0; foreach( string[] p; args ) { argv[argc++] = toStringzArray(p); } argv[argc] = null; return argv.ptr; } /** */ public static string[] toStringArray(const(char*)* args) { if ( args is null ) { return null; } string[] argv; while ( *args !is null ) { argv ~= toString(*args); args++; } return argv; } /** */ public static string[] toStringArray(const(char*)* args, size_t len) { string[] argv = new string[len]; for ( int i; i < len; i++ ) { argv[i] = toString(args[i]); } return argv; } /** */ public static string[][] toStringArray(char*** args) { string[][] argv; if ( args is null ) { return null; } while ( *args !is null ) { argv ~= toStringArray(*args); args++; } return argv; } /** */ public static void freeString(char* str) { g_free(str); } /** */ public static void freeStringArray(char** str) { g_strfreev(str); } /** */ public static void freeStringArray(char*** str) { while ( *str !is null ) { g_strfreev(*str); str++; } g_free(str); } /** */ /** * Determines the numeric value of a character as a decimal digit. * Differs from g_unichar_digit_value() because it takes a char, so * there's no worry about sign extension if characters are signed. * * Params: * c = an ASCII character * * Returns: If @c is a decimal digit (according to g_ascii_isdigit()), * its numeric value. Otherwise, -1. */ public static int asciiDigitValue(char c) { return g_ascii_digit_value(c); } /** * Converts a #gdouble to a string, using the '.' as * decimal point. * * This function generates enough precision that converting * the string back using g_ascii_strtod() gives the same machine-number * (on machines with IEEE compatible 64bit doubles). It is * guaranteed that the size of the resulting string will never * be larger than @G_ASCII_DTOSTR_BUF_SIZE bytes, including the terminating * nul character, which is always added. * * Params: * buffer = A buffer to place the resulting string in * bufLen = The length of the buffer. * d = The #gdouble to convert * * Returns: The pointer to the buffer with the converted string. */ public static string asciiDtostr(string buffer, int bufLen, double d) { auto retStr = g_ascii_dtostr(Str.toStringz(buffer), bufLen, d); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a #gdouble to a string, using the '.' as * decimal point. To format the number you pass in * a printf()-style format string. Allowed conversion * specifiers are 'e', 'E', 'f', 'F', 'g' and 'G'. * * The returned buffer is guaranteed to be nul-terminated. * * If you just want to want to serialize the value into a * string, use g_ascii_dtostr(). * * Params: * buffer = A buffer to place the resulting string in * bufLen = The length of the buffer. * format = The printf()-style format to use for the * code to use for converting. * d = The #gdouble to convert * * Returns: The pointer to the buffer with the converted string. */ public static string asciiFormatd(string buffer, int bufLen, string format, double d) { auto retStr = g_ascii_formatd(Str.toStringz(buffer), bufLen, Str.toStringz(format), d); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Compare two strings, ignoring the case of ASCII characters. * * Unlike the BSD strcasecmp() function, this only recognizes standard * ASCII letters and ignores the locale, treating all non-ASCII * bytes as if they are not letters. * * This function should be used only on strings that are known to be * in encodings where the bytes corresponding to ASCII letters always * represent themselves. This includes UTF-8 and the ISO-8859-* * charsets, but not for instance double-byte encodings like the * Windows Codepage 932, where the trailing bytes of double-byte * characters include all ASCII letters. If you compare two CP932 * strings using this function, you will get false matches. * * Both @s1 and @s2 must be non-%NULL. * * Params: * s1 = string to compare with @s2 * s2 = string to compare with @s1 * * Returns: 0 if the strings match, a negative value if @s1 < @s2, * or a positive value if @s1 > @s2. */ public static int asciiStrcasecmp(string s1, string s2) { return g_ascii_strcasecmp(Str.toStringz(s1), Str.toStringz(s2)); } /** * Converts all upper case ASCII letters to lower case ASCII letters. * * Params: * str = a string * len = length of @str in bytes, or -1 if @str is nul-terminated * * Returns: a newly-allocated string, with all the upper case * characters in @str converted to lower case, with semantics that * exactly match g_ascii_tolower(). (Note that this is unlike the * old g_strdown(), which modified the string in place.) */ public static string asciiStrdown(string str, ptrdiff_t len) { auto retStr = g_ascii_strdown(Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Compare @s1 and @s2, ignoring the case of ASCII characters and any * characters after the first @n in each string. * * Unlike the BSD strcasecmp() function, this only recognizes standard * ASCII letters and ignores the locale, treating all non-ASCII * characters as if they are not letters. * * The same warning as in g_ascii_strcasecmp() applies: Use this * function only on strings known to be in encodings where bytes * corresponding to ASCII letters always represent themselves. * * Params: * s1 = string to compare with @s2 * s2 = string to compare with @s1 * n = number of characters to compare * * Returns: 0 if the strings match, a negative value if @s1 < @s2, * or a positive value if @s1 > @s2. */ public static int asciiStrncasecmp(string s1, string s2, size_t n) { return g_ascii_strncasecmp(Str.toStringz(s1), Str.toStringz(s2), n); } /** * Converts a string to a #gdouble value. * * This function behaves like the standard strtod() function * does in the C locale. It does this without actually changing * the current locale, since that would not be thread-safe. * A limitation of the implementation is that this function * will still accept localized versions of infinities and NANs. * * This function is typically used when reading configuration * files or other non-user input that should be locale independent. * To handle input from the user you should normally use the * locale-sensitive system strtod() function. * * To convert from a #gdouble to a string in a locale-insensitive * way, use g_ascii_dtostr(). * * If the correct value would cause overflow, plus or minus %HUGE_VAL * is returned (according to the sign of the value), and %ERANGE is * stored in %errno. If the correct value would cause underflow, * zero is returned and %ERANGE is stored in %errno. * * This function resets %errno before calling strtod() so that * you can reliably detect overflow and underflow. * * Params: * nptr = the string to convert to a numeric value. * endptr = if non-%NULL, it returns the * character after the last character used in the conversion. * * Returns: the #gdouble value. */ public static double asciiStrtod(string nptr, out string endptr) { char* outendptr = null; auto p = g_ascii_strtod(Str.toStringz(nptr), &outendptr); endptr = Str.toString(outendptr); return p; } /** * Converts a string to a #gint64 value. * This function behaves like the standard strtoll() function * does in the C locale. It does this without actually * changing the current locale, since that would not be * thread-safe. * * This function is typically used when reading configuration * files or other non-user input that should be locale independent. * To handle input from the user you should normally use the * locale-sensitive system strtoll() function. * * If the correct value would cause overflow, %G_MAXINT64 or %G_MININT64 * is returned, and `ERANGE` is stored in `errno`. * If the base is outside the valid range, zero is returned, and * `EINVAL` is stored in `errno`. If the * string conversion fails, zero is returned, and @endptr returns @nptr * (if @endptr is non-%NULL). * * Params: * nptr = the string to convert to a numeric value. * endptr = if non-%NULL, it returns the * character after the last character used in the conversion. * base = to be used for the conversion, 2..36 or 0 * * Returns: the #gint64 value or zero on error. * * Since: 2.12 */ public static long asciiStrtoll(string nptr, out string endptr, uint base) { char* outendptr = null; auto p = g_ascii_strtoll(Str.toStringz(nptr), &outendptr, base); endptr = Str.toString(outendptr); return p; } /** * Converts a string to a #guint64 value. * This function behaves like the standard strtoull() function * does in the C locale. It does this without actually * changing the current locale, since that would not be * thread-safe. * * This function is typically used when reading configuration * files or other non-user input that should be locale independent. * To handle input from the user you should normally use the * locale-sensitive system strtoull() function. * * If the correct value would cause overflow, %G_MAXUINT64 * is returned, and `ERANGE` is stored in `errno`. * If the base is outside the valid range, zero is returned, and * `EINVAL` is stored in `errno`. * If the string conversion fails, zero is returned, and @endptr returns * @nptr (if @endptr is non-%NULL). * * Params: * nptr = the string to convert to a numeric value. * endptr = if non-%NULL, it returns the * character after the last character used in the conversion. * base = to be used for the conversion, 2..36 or 0 * * Returns: the #guint64 value or zero on error. * * Since: 2.2 */ public static ulong asciiStrtoull(string nptr, out string endptr, uint base) { char* outendptr = null; auto p = g_ascii_strtoull(Str.toStringz(nptr), &outendptr, base); endptr = Str.toString(outendptr); return p; } /** * Converts all lower case ASCII letters to upper case ASCII letters. * * Params: * str = a string * len = length of @str in bytes, or -1 if @str is nul-terminated * * Returns: a newly allocated string, with all the lower case * characters in @str converted to upper case, with semantics that * exactly match g_ascii_toupper(). (Note that this is unlike the * old g_strup(), which modified the string in place.) */ public static string asciiStrup(string str, ptrdiff_t len) { auto retStr = g_ascii_strup(Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Convert a character to ASCII lower case. * * Unlike the standard C library tolower() function, this only * recognizes standard ASCII letters and ignores the locale, returning * all non-ASCII characters unchanged, even if they are lower case * letters in a particular character set. Also unlike the standard * library function, this takes and returns a char, not an int, so * don't call it on %EOF but no need to worry about casting to #guchar * before passing a possibly non-ASCII character in. * * Params: * c = any character * * Returns: the result of converting @c to lower case. If @c is * not an ASCII upper case letter, @c is returned unchanged. */ public static char asciiTolower(char c) { return g_ascii_tolower(c); } /** * Convert a character to ASCII upper case. * * Unlike the standard C library toupper() function, this only * recognizes standard ASCII letters and ignores the locale, returning * all non-ASCII characters unchanged, even if they are upper case * letters in a particular character set. Also unlike the standard * library function, this takes and returns a char, not an int, so * don't call it on %EOF but no need to worry about casting to #guchar * before passing a possibly non-ASCII character in. * * Params: * c = any character * * Returns: the result of converting @c to upper case. If @c is not * an ASCII lower case letter, @c is returned unchanged. */ public static char asciiToupper(char c) { return g_ascii_toupper(c); } /** * Determines the numeric value of a character as a hexidecimal * digit. Differs from g_unichar_xdigit_value() because it takes * a char, so there's no worry about sign extension if characters * are signed. * * Params: * c = an ASCII character. * * Returns: If @c is a hex digit (according to g_ascii_isxdigit()), * its numeric value. Otherwise, -1. */ public static int asciiXdigitValue(char c) { return g_ascii_xdigit_value(c); } /** * Calculates the maximum space needed to store the output * of the sprintf() function. * * Params: * format = the format string. See the printf() documentation * args = the parameters to be inserted into the format string * * Returns: the maximum space needed to store the formatted string */ public static size_t printfStringUpperBound(string format, void* args) { return g_printf_string_upper_bound(Str.toStringz(format), args); } /** * Copies a nul-terminated string into the dest buffer, include the * trailing nul, and return a pointer to the trailing nul byte. * This is useful for concatenating multiple strings together * without having to repeatedly scan for the end. * * Params: * dest = destination buffer. * src = source string. * * Returns: a pointer to trailing nul byte. */ public static string stpcpy(string dest, string src) { auto retStr = g_stpcpy(Str.toStringz(dest), Str.toStringz(src)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Looks whether the string @str begins with @prefix. * * Params: * str = a nul-terminated string * prefix = the nul-terminated prefix to look for * * Returns: %TRUE if @str begins with @prefix, %FALSE otherwise. * * Since: 2.2 */ public static bool hasPrefix(string str, string prefix) { return g_str_has_prefix(Str.toStringz(str), Str.toStringz(prefix)) != 0; } /** * Looks whether the string @str ends with @suffix. * * Params: * str = a nul-terminated string * suffix = the nul-terminated suffix to look for * * Returns: %TRUE if @str end with @suffix, %FALSE otherwise. * * Since: 2.2 */ public static bool hasSuffix(string str, string suffix) { return g_str_has_suffix(Str.toStringz(str), Str.toStringz(suffix)) != 0; } /** * Determines if a string is pure ASCII. A string is pure ASCII if it * contains no bytes with the high bit set. * * Params: * str = a string * * Returns: %TRUE if @str is ASCII * * Since: 2.40 */ public static bool isAscii(string str) { return g_str_is_ascii(Str.toStringz(str)) != 0; } /** * Checks if a search conducted for @search_term should match * @potential_hit. * * This function calls g_str_tokenize_and_fold() on both * @search_term and @potential_hit. ASCII alternates are never taken * for @search_term but will be taken for @potential_hit according to * the value of @accept_alternates. * * A hit occurs when each folded token in @search_term is a prefix of a * folded token from @potential_hit. * * Depending on how you're performing the search, it will typically be * faster to call g_str_tokenize_and_fold() on each string in * your corpus and build an index on the returned folded tokens, then * call g_str_tokenize_and_fold() on the search term and * perform lookups into that index. * * As some examples, searching for "fred" would match the potential hit * "Smith, Fred" and also "Frédéric". Searching for "Fréd" would match * "Frédéric" but not "Frederic" (due to the one-directional nature of * accent matching). Searching "fo" would match "Foo" and "Bar Foo * Baz", but not "SFO" (because no word as "fo" as a prefix). * * Params: * searchTerm = the search term from the user * potentialHit = the text that may be a hit * acceptAlternates = %TRUE to accept ASCII alternates * * Returns: %TRUE if @potential_hit is a hit * * Since: 2.40 */ public static bool matchString(string searchTerm, string potentialHit, bool acceptAlternates) { return g_str_match_string(Str.toStringz(searchTerm), Str.toStringz(potentialHit), acceptAlternates) != 0; } /** * Transliterate @str to plain ASCII. * * For best results, @str should be in composed normalised form. * * This function performs a reasonably good set of character * replacements. The particular set of replacements that is done may * change by version or even by runtime environment. * * If the source language of @str is known, it can used to improve the * accuracy of the translation by passing it as @from_locale. It should * be a valid POSIX locale string (of the form * "language[_territory][.codeset][@modifier]"). * * If @from_locale is %NULL then the current locale is used. * * If you want to do translation for no specific locale, and you want it * to be done independently of the currently locale, specify "C" for * @from_locale. * * Params: * str = a string, in UTF-8 * fromLocale = the source locale, if known * * Returns: a string in plain ASCII * * Since: 2.40 */ public static string toAscii(string str, string fromLocale) { auto retStr = g_str_to_ascii(Str.toStringz(str), Str.toStringz(fromLocale)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Tokenises @string and performs folding on each token. * * A token is a non-empty sequence of alphanumeric characters in the * source string, separated by non-alphanumeric characters. An * "alphanumeric" character for this purpose is one that matches * g_unichar_isalnum() or g_unichar_ismark(). * * Each token is then (Unicode) normalised and case-folded. If * @ascii_alternates is non-%NULL and some of the returned tokens * contain non-ASCII characters, ASCII alternatives will be generated. * * The number of ASCII alternatives that are generated and the method * for doing so is unspecified, but @translit_locale (if specified) may * improve the transliteration if the language of the source string is * known. * * Params: * str = a string * translitLocale = the language code (like 'de' or * 'en_GB') from which @string originates * asciiAlternates = a * return location for ASCII alternates * * Returns: the folded tokens * * Since: 2.40 */ public static string[] tokenizeAndFold(string str, string translitLocale, out string[] asciiAlternates) { char** outasciiAlternates = null; auto retStr = g_str_tokenize_and_fold(Str.toStringz(str), Str.toStringz(translitLocale), &outasciiAlternates); asciiAlternates = Str.toStringArray(outasciiAlternates); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * For each character in @string, if the character is not in @valid_chars, * replaces the character with @substitutor. Modifies @string in place, * and return @string itself, not a copy. The return value is to allow * nesting such as * |[ * g_ascii_strup (g_strcanon (str, "abc", '?')) * ]| * * Params: * str = a nul-terminated array of bytes * validChars = bytes permitted in @string * substitutor = replacement character for disallowed bytes * * Returns: @string */ public static string strcanon(string str, string validChars, char substitutor) { auto retStr = g_strcanon(Str.toStringz(str), Str.toStringz(validChars), substitutor); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * A case-insensitive string comparison, corresponding to the standard * strcasecmp() function on platforms which support it. * * Deprecated: See g_strncasecmp() for a discussion of why this * function is deprecated and how to replace it. * * Params: * s1 = a string * s2 = a string to compare with @s1 * * Returns: 0 if the strings match, a negative value if @s1 < @s2, * or a positive value if @s1 > @s2. */ public static int strcasecmp(string s1, string s2) { return g_strcasecmp(Str.toStringz(s1), Str.toStringz(s2)); } /** * Removes trailing whitespace from a string. * * This function doesn't allocate or reallocate any memory; * it modifies @string in place. Therefore, it cannot be used * on statically allocated strings. * * The pointer to @string is returned to allow the nesting of functions. * * Also see g_strchug() and g_strstrip(). * * Params: * str = a string to remove the trailing whitespace from * * Returns: @string */ public static string strchomp(string str) { auto retStr = g_strchomp(Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Removes leading whitespace from a string, by moving the rest * of the characters forward. * * This function doesn't allocate or reallocate any memory; * it modifies @string in place. Therefore, it cannot be used on * statically allocated strings. * * The pointer to @string is returned to allow the nesting of functions. * * Also see g_strchomp() and g_strstrip(). * * Params: * str = a string to remove the leading whitespace from * * Returns: @string */ public static string strchug(string str) { auto retStr = g_strchug(Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Compares @str1 and @str2 like strcmp(). Handles %NULL * gracefully by sorting it before non-%NULL strings. * Comparing two %NULL pointers returns 0. * * Params: * str1 = a C string or %NULL * str2 = another C string or %NULL * * Returns: an integer less than, equal to, or greater than zero, if @str1 is <, == or > than @str2. * * Since: 2.16 */ public static int strcmp0(string str1, string str2) { return g_strcmp0(Str.toStringz(str1), Str.toStringz(str2)); } /** * Replaces all escaped characters with their one byte equivalent. * * This function does the reverse conversion of g_strescape(). * * Params: * source = a string to compress * * Returns: a newly-allocated copy of @source with all escaped * character compressed */ public static string strcompress(string source) { auto retStr = g_strcompress(Str.toStringz(source)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts any delimiter characters in @string to @new_delimiter. * Any characters in @string which are found in @delimiters are * changed to the @new_delimiter character. Modifies @string in place, * and returns @string itself, not a copy. The return value is to * allow nesting such as * |[ * g_ascii_strup (g_strdelimit (str, "abc", '?')) * ]| * * Params: * str = the string to convert * delimiters = a string containing the current delimiters, * or %NULL to use the standard delimiters defined in #G_STR_DELIMITERS * newDelimiter = the new delimiter character * * Returns: @string */ public static string strdelimit(string str, string delimiters, char newDelimiter) { auto retStr = g_strdelimit(Str.toStringz(str), Str.toStringz(delimiters), newDelimiter); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a string to lower case. * * Deprecated: This function is totally broken for the reasons discussed * in the g_strncasecmp() docs - use g_ascii_strdown() or g_utf8_strdown() * instead. * * Params: * str = the string to convert. * * Returns: the string */ public static string strdown(string str) { auto retStr = g_strdown(Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Duplicates a string. If @str is %NULL it returns %NULL. * The returned string should be freed with g_free() * when no longer needed. * * Params: * str = the string to duplicate * * Returns: a newly-allocated copy of @str */ public static string strdup(string str) { auto retStr = g_strdup(Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Similar to the standard C vsprintf() function but safer, since it * calculates the maximum space required and allocates memory to hold * the result. The returned string should be freed with g_free() when * no longer needed. * * See also g_vasprintf(), which offers the same functionality, but * additionally returns the length of the allocated string. * * Params: * format = a standard printf() format string, but notice * [string precision pitfalls][string-precision] * args = the list of parameters to insert into the format string * * Returns: a newly-allocated string holding the result */ public static string strdupVprintf(string format, void* args) { auto retStr = g_strdup_vprintf(Str.toStringz(format), args); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Copies %NULL-terminated array of strings. The copy is a deep copy; * the new array should be freed by first freeing each string, then * the array itself. g_strfreev() does this for you. If called * on a %NULL value, g_strdupv() simply returns %NULL. * * Params: * strArray = a %NULL-terminated array of strings * * Returns: a new %NULL-terminated array of strings. */ public static string[] strdupv(string[] strArray) { return Str.toStringArray(g_strdupv(Str.toStringzArray(strArray))); } /** * Returns a string corresponding to the given error code, e.g. "no * such process". Unlike strerror(), this always returns a string in * UTF-8 encoding, and the pointer is guaranteed to remain valid for * the lifetime of the process. * * Note that the string may be translated according to the current locale. * * The value of %errno will not be changed by this function. However, it may * be changed by intermediate function calls, so you should save its value * as soon as the call returns: * |[ * int saved_errno; * * ret = read (blah); * saved_errno = errno; * * g_strerror (saved_errno); * ]| * * Params: * errnum = the system error number. See the standard C %errno * documentation * * Returns: a UTF-8 string describing the error code. If the error code * is unknown, it returns a string like "unknown error ()". */ public static string strerror(int errnum) { return Str.toString(g_strerror(errnum)); } /** * Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\' * and '"' in the string @source by inserting a '\' before * them. Additionally all characters in the range 0x01-0x1F (everything * below SPACE) and in the range 0x7F-0xFF (all non-ASCII chars) are * replaced with a '\' followed by their octal representation. * Characters supplied in @exceptions are not escaped. * * g_strcompress() does the reverse conversion. * * Params: * source = a string to escape * exceptions = a string of characters not to escape in @source * * Returns: a newly-allocated copy of @source with certain * characters escaped. See above. */ public static string strescape(string source, string exceptions) { auto retStr = g_strescape(Str.toStringz(source), Str.toStringz(exceptions)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Frees a %NULL-terminated array of strings, as well as each * string it contains. * * If @str_array is %NULL, this function simply returns. * * Params: * strArray = a %NULL-terminated array of strings to free */ public static void strfreev(string[] strArray) { g_strfreev(Str.toStringzArray(strArray)); } /** * Joins a number of strings together to form one long string, with the * optional @separator inserted between each of them. The returned string * should be freed with g_free(). * * If @str_array has no items, the return value will be an * empty string. If @str_array contains a single item, @separator will not * appear in the resulting string. * * Params: * separator = a string to insert between each of the * strings, or %NULL * strArray = a %NULL-terminated array of strings to join * * Returns: a newly-allocated string containing all of the strings joined * together, with @separator between them */ public static string strjoinv(string separator, string[] strArray) { auto retStr = g_strjoinv(Str.toStringz(separator), Str.toStringzArray(strArray)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Portability wrapper that calls strlcat() on systems which have it, * and emulates it otherwise. Appends nul-terminated @src string to @dest, * guaranteeing nul-termination for @dest. The total size of @dest won't * exceed @dest_size. * * At most @dest_size - 1 characters will be copied. Unlike strncat(), * @dest_size is the full size of dest, not the space left over. This * function does not allocate memory. It always nul-terminates (unless * @dest_size == 0 or there were no nul characters in the @dest_size * characters of dest to start with). * * Caveat: this is supposedly a more secure alternative to strcat() or * strncat(), but for real security g_strconcat() is harder to mess up. * * Params: * dest = destination buffer, already containing one nul-terminated string * src = source buffer * destSize = length of @dest buffer in bytes (not length of existing string * inside @dest) * * Returns: size of attempted result, which is MIN (dest_size, strlen * (original dest)) + strlen (src), so if retval >= dest_size, * truncation occurred. */ public static size_t strlcat(string dest, string src, size_t destSize) { return g_strlcat(Str.toStringz(dest), Str.toStringz(src), destSize); } /** * Portability wrapper that calls strlcpy() on systems which have it, * and emulates strlcpy() otherwise. Copies @src to @dest; @dest is * guaranteed to be nul-terminated; @src must be nul-terminated; * @dest_size is the buffer size, not the number of bytes to copy. * * At most @dest_size - 1 characters will be copied. Always nul-terminates * (unless @dest_size is 0). This function does not allocate memory. Unlike * strncpy(), this function doesn't pad @dest (so it's often faster). It * returns the size of the attempted result, strlen (src), so if * @retval >= @dest_size, truncation occurred. * * Caveat: strlcpy() is supposedly more secure than strcpy() or strncpy(), * but if you really want to avoid screwups, g_strdup() is an even better * idea. * * Params: * dest = destination buffer * src = source buffer * destSize = length of @dest in bytes * * Returns: length of @src */ public static size_t strlcpy(string dest, string src, size_t destSize) { return g_strlcpy(Str.toStringz(dest), Str.toStringz(src), destSize); } /** * A case-insensitive string comparison, corresponding to the standard * strncasecmp() function on platforms which support it. It is similar * to g_strcasecmp() except it only compares the first @n characters of * the strings. * * Deprecated: The problem with g_strncasecmp() is that it does * the comparison by calling toupper()/tolower(). These functions * are locale-specific and operate on single bytes. However, it is * impossible to handle things correctly from an internationalization * standpoint by operating on bytes, since characters may be multibyte. * Thus g_strncasecmp() is broken if your string is guaranteed to be * ASCII, since it is locale-sensitive, and it's broken if your string * is localized, since it doesn't work on many encodings at all, * including UTF-8, EUC-JP, etc. * * There are therefore two replacement techniques: g_ascii_strncasecmp(), * which only works on ASCII and is not locale-sensitive, and * g_utf8_casefold() followed by strcmp() on the resulting strings, * which is good for case-insensitive sorting of UTF-8. * * Params: * s1 = a string * s2 = a string to compare with @s1 * n = the maximum number of characters to compare * * Returns: 0 if the strings match, a negative value if @s1 < @s2, * or a positive value if @s1 > @s2. */ public static int strncasecmp(string s1, string s2, uint n) { return g_strncasecmp(Str.toStringz(s1), Str.toStringz(s2), n); } /** * Duplicates the first @n bytes of a string, returning a newly-allocated * buffer @n + 1 bytes long which will always be nul-terminated. If @str * is less than @n bytes long the buffer is padded with nuls. If @str is * %NULL it returns %NULL. The returned value should be freed when no longer * needed. * * To copy a number of characters from a UTF-8 encoded string, * use g_utf8_strncpy() instead. * * Params: * str = the string to duplicate * n = the maximum number of bytes to copy from @str * * Returns: a newly-allocated buffer containing the first @n bytes * of @str, nul-terminated */ public static string strndup(string str, size_t n) { auto retStr = g_strndup(Str.toStringz(str), n); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Creates a new string @length bytes long filled with @fill_char. * The returned string should be freed when no longer needed. * * Params: * length = the length of the new string * fillChar = the byte to fill the string with * * Returns: a newly-allocated string filled the @fill_char */ public static string strnfill(size_t length, char fillChar) { auto retStr = g_strnfill(length, fillChar); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Reverses all of the bytes in a string. For example, * `g_strreverse ("abcdef")` will result in "fedcba". * * Note that g_strreverse() doesn't work on UTF-8 strings * containing multibyte characters. For that purpose, use * g_utf8_strreverse(). * * Params: * str = the string to reverse * * Returns: the same pointer passed in as @string */ public static string strreverse(string str) { auto retStr = g_strreverse(Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Searches the string @haystack for the last occurrence * of the string @needle. * * Params: * haystack = a nul-terminated string * needle = the nul-terminated string to search for * * Returns: a pointer to the found occurrence, or * %NULL if not found. */ public static string strrstr(string haystack, string needle) { auto retStr = g_strrstr(Str.toStringz(haystack), Str.toStringz(needle)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Searches the string @haystack for the last occurrence * of the string @needle, limiting the length of the search * to @haystack_len. * * Params: * haystack = a nul-terminated string * haystackLen = the maximum length of @haystack * needle = the nul-terminated string to search for * * Returns: a pointer to the found occurrence, or * %NULL if not found. */ public static string strrstrLen(string haystack, ptrdiff_t haystackLen, string needle) { auto retStr = g_strrstr_len(Str.toStringz(haystack), haystackLen, Str.toStringz(needle)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns a string describing the given signal, e.g. "Segmentation fault". * You should use this function in preference to strsignal(), because it * returns a string in UTF-8 encoding, and since not all platforms support * the strsignal() function. * * Params: * signum = the signal number. See the `signal` documentation * * Returns: a UTF-8 string describing the signal. If the signal is unknown, * it returns "unknown signal ()". */ public static string strsignal(int signum) { return Str.toString(g_strsignal(signum)); } /** * Splits a string into a maximum of @max_tokens pieces, using the given * @delimiter. If @max_tokens is reached, the remainder of @string is * appended to the last token. * * As an example, the result of g_strsplit (":a:bc::d:", ":", -1) is a * %NULL-terminated vector containing the six strings "", "a", "bc", "", "d" * and "". * * As a special case, the result of splitting the empty string "" is an empty * vector, not a vector containing a single string. The reason for this * special case is that being able to represent a empty vector is typically * more useful than consistent handling of empty elements. If you do need * to represent empty elements, you'll need to check for the empty string * before calling g_strsplit(). * * Params: * str = a string to split * delimiter = a string which specifies the places at which to split * the string. The delimiter is not included in any of the resulting * strings, unless @max_tokens is reached. * maxTokens = the maximum number of pieces to split @string into. * If this is less than 1, the string is split completely. * * Returns: a newly-allocated %NULL-terminated array of strings. Use * g_strfreev() to free it. */ public static string[] strsplit(string str, string delimiter, int maxTokens) { return Str.toStringArray(g_strsplit(Str.toStringz(str), Str.toStringz(delimiter), maxTokens)); } /** * Splits @string into a number of tokens not containing any of the characters * in @delimiter. A token is the (possibly empty) longest string that does not * contain any of the characters in @delimiters. If @max_tokens is reached, the * remainder is appended to the last token. * * For example the result of g_strsplit_set ("abc:def/ghi", ":/", -1) is a * %NULL-terminated vector containing the three strings "abc", "def", * and "ghi". * * The result of g_strsplit_set (":def/ghi:", ":/", -1) is a %NULL-terminated * vector containing the four strings "", "def", "ghi", and "". * * As a special case, the result of splitting the empty string "" is an empty * vector, not a vector containing a single string. The reason for this * special case is that being able to represent a empty vector is typically * more useful than consistent handling of empty elements. If you do need * to represent empty elements, you'll need to check for the empty string * before calling g_strsplit_set(). * * Note that this function works on bytes not characters, so it can't be used * to delimit UTF-8 strings for anything but ASCII characters. * * Params: * str = The string to be tokenized * delimiters = A nul-terminated string containing bytes that are used * to split the string. * maxTokens = The maximum number of tokens to split @string into. * If this is less than 1, the string is split completely * * Returns: a newly-allocated %NULL-terminated array of strings. Use * g_strfreev() to free it. * * Since: 2.4 */ public static string[] strsplitSet(string str, string delimiters, int maxTokens) { return Str.toStringArray(g_strsplit_set(Str.toStringz(str), Str.toStringz(delimiters), maxTokens)); } /** * Searches the string @haystack for the first occurrence * of the string @needle, limiting the length of the search * to @haystack_len. * * Params: * haystack = a string * haystackLen = the maximum length of @haystack. Note that -1 is * a valid length, if @haystack is nul-terminated, meaning it will * search through the whole string. * needle = the string to search for * * Returns: a pointer to the found occurrence, or * %NULL if not found. */ public static string strstrLen(string haystack, ptrdiff_t haystackLen, string needle) { auto retStr = g_strstr_len(Str.toStringz(haystack), haystackLen, Str.toStringz(needle)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a string to a #gdouble value. * It calls the standard strtod() function to handle the conversion, but * if the string is not completely converted it attempts the conversion * again with g_ascii_strtod(), and returns the best match. * * This function should seldom be used. The normal situation when reading * numbers not for human consumption is to use g_ascii_strtod(). Only when * you know that you must expect both locale formatted and C formatted numbers * should you use this. Make sure that you don't pass strings such as comma * separated lists of values, since the commas may be interpreted as a decimal * point in some locales, causing unexpected results. * * Params: * nptr = the string to convert to a numeric value. * endptr = if non-%NULL, it returns the * character after the last character used in the conversion. * * Returns: the #gdouble value. */ public static double strtod(string nptr, out string endptr) { char* outendptr = null; auto p = g_strtod(Str.toStringz(nptr), &outendptr); endptr = Str.toString(outendptr); return p; } /** * Converts a string to upper case. * * Deprecated: This function is totally broken for the reasons * discussed in the g_strncasecmp() docs - use g_ascii_strup() * or g_utf8_strup() instead. * * Params: * str = the string to convert * * Returns: the string */ public static string strup(string str) { auto retStr = g_strup(Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** */ public static GType strvGetType() { return g_strv_get_type(); } /** * Returns the length of the given %NULL-terminated * string array @str_array. * * Params: * strArray = a %NULL-terminated array of strings * * Returns: length of @str_array. * * Since: 2.6 */ public static uint strvLength(string[] strArray) { return g_strv_length(Str.toStringzArray(strArray)); } /** * Checks if @strv contains @str. @strv must not be %NULL. * * Params: * strv = a %NULL-terminated array of strings * str = a string * * Returns: %TRUE if @str is an element of @strv, according to g_str_equal(). * * Since: 2.44 */ public static bool strvContains(string strv, string str) { return g_strv_contains(Str.toStringz(strv), Str.toStringz(str)) != 0; } /** * An implementation of the GNU vasprintf() function which supports * positional parameters, as specified in the Single Unix Specification. * This function is similar to g_vsprintf(), except that it allocates a * string to hold the output, instead of putting the output in a buffer * you allocate in advance. * * Params: * str = the return location for the newly-allocated string. * format = a standard printf() format string, but notice * [string precision pitfalls][string-precision] * args = the list of arguments to insert in the output. * * Returns: the number of bytes printed. * * Since: 2.4 */ public static int vasprintf(string[] str, string format, void* args) { return g_vasprintf(Str.toStringzArray(str), Str.toStringz(format), args); } /** * An implementation of the standard vprintf() function which supports * positional parameters, as specified in the Single Unix Specification. * * Params: * format = a standard printf() format string, but notice * [string precision pitfalls][string-precision] * args = the list of arguments to insert in the output. * * Returns: the number of bytes printed. * * Since: 2.2 */ public static int vprintf(string format, void* args) { return g_vprintf(Str.toStringz(format), args); } /** * A safer form of the standard vsprintf() function. The output is guaranteed * to not exceed @n characters (including the terminating nul character), so * it is easy to ensure that a buffer overflow cannot occur. * * See also g_strdup_vprintf(). * * In versions of GLib prior to 1.2.3, this function may return -1 if the * output was truncated, and the truncated string may not be nul-terminated. * In versions prior to 1.3.12, this function returns the length of the output * string. * * The return value of g_vsnprintf() conforms to the vsnprintf() function * as standardized in ISO C99. Note that this is different from traditional * vsnprintf(), which returns the length of the output string. * * The format string may contain positional parameters, as specified in * the Single Unix Specification. * * Params: * str = the buffer to hold the output. * n = the maximum number of bytes to produce (including the * terminating nul character). * format = a standard printf() format string, but notice * string precision pitfalls][string-precision] * args = the list of arguments to insert in the output. * * Returns: the number of bytes which would be produced if the buffer * was large enough. */ public static int vsnprintf(string str, gulong n, string format, void* args) { return g_vsnprintf(Str.toStringz(str), n, Str.toStringz(format), args); } /** * An implementation of the standard vsprintf() function which supports * positional parameters, as specified in the Single Unix Specification. * * Params: * str = the buffer to hold the output. * format = a standard printf() format string, but notice * [string precision pitfalls][string-precision] * args = the list of arguments to insert in the output. * * Returns: the number of bytes printed. * * Since: 2.2 */ public static int vsprintf(string str, string format, void* args) { return g_vsprintf(Str.toStringz(str), Str.toStringz(format), args); } /** * An implementation of the standard fprintf() function which supports * positional parameters, as specified in the Single Unix Specification. * * Params: * file = the stream to write to. * format = a standard printf() format string, but notice * [string precision pitfalls][string-precision] * args = the list of arguments to insert in the output. * * Returns: the number of bytes printed. * * Since: 2.2 */ public static int vfprintf(FILE* file, string format, void* args) { return g_vfprintf(file, Str.toStringz(format), args); } /** * A convenience function for converting a string to a signed number. * * This function assumes that @str contains only a number of the given * @base that is within inclusive bounds limited by @min and @max. If * this is true, then the converted number is stored in @out_num. An * empty string is not a valid input. A string with leading or * trailing whitespace is also an invalid input. * * @base can be between 2 and 36 inclusive. Hexadecimal numbers must * not be prefixed with "0x" or "0X". Such a problem does not exist * for octal numbers, since they were usually prefixed with a zero * which does not change the value of the parsed number. * * Parsing failures result in an error with the %G_NUMBER_PARSER_ERROR * domain. If the input is invalid, the error code will be * %G_NUMBER_PARSER_ERROR_INVALID. If the parsed number is out of * bounds - %G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS. * * See g_ascii_strtoll() if you have more complex needs such as * parsing a string which starts with a number, but then has other * characters. * * Params: * str = a string * base = base of a parsed number * min = a lower bound (inclusive) * max = an upper bound (inclusive) * outNum = a return location for a number * * Returns: %TRUE if @str was a number, otherwise %FALSE. * * Since: 2.54 * * Throws: GException on failure. */ public static bool asciiStringToSigned(string str, uint base, long min, long max, out long outNum) { GError* err = null; auto p = g_ascii_string_to_signed(Str.toStringz(str), base, min, max, &outNum, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * A convenience function for converting a string to an unsigned number. * * This function assumes that @str contains only a number of the given * @base that is within inclusive bounds limited by @min and @max. If * this is true, then the converted number is stored in @out_num. An * empty string is not a valid input. A string with leading or * trailing whitespace is also an invalid input. * * @base can be between 2 and 36 inclusive. Hexadecimal numbers must * not be prefixed with "0x" or "0X". Such a problem does not exist * for octal numbers, since they were usually prefixed with a zero * which does not change the value of the parsed number. * * Parsing failures result in an error with the %G_NUMBER_PARSER_ERROR * domain. If the input is invalid, the error code will be * %G_NUMBER_PARSER_ERROR_INVALID. If the parsed number is out of * bounds - %G_NUMBER_PARSER_ERROR_OUT_OF_BOUNDS. * * See g_ascii_strtoull() if you have more complex needs such as * parsing a string which starts with a number, but then has other * characters. * * Params: * str = a string * base = base of a parsed number * min = a lower bound (inclusive) * max = an upper bound (inclusive) * outNum = a return location for a number * * Returns: %TRUE if @str was a number, otherwise %FALSE. * * Since: 2.54 * * Throws: GException on failure. */ public static bool asciiStringToUnsigned(string str, uint base, ulong min, ulong max, out ulong outNum) { GError* err = null; auto p = g_ascii_string_to_unsigned(Str.toStringz(str), base, min, max, &outNum, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } } GtkD-3.7.5/generated/gtkd/glib/StringChunk.d000066400000000000000000000133071324604450400205750ustar00rootroot00000000000000/* * 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 glib.StringChunk; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * An opaque data structure representing String Chunks. * It should only be accessed by using the following functions. */ public class StringChunk { /** the main Gtk struct */ protected GStringChunk* gStringChunk; protected bool ownedRef; /** Get the main Gtk struct */ public GStringChunk* getStringChunkStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gStringChunk; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gStringChunk; } /** * Sets our main struct and passes it to the parent class. */ public this (GStringChunk* gStringChunk, bool ownedRef = false) { this.gStringChunk = gStringChunk; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_string_chunk_free(gStringChunk); } /** * Frees all strings contained within the #GStringChunk. * After calling g_string_chunk_clear() it is not safe to * access any of the strings which were contained within it. * * Since: 2.14 */ public void clear() { g_string_chunk_clear(gStringChunk); } /** * Frees all memory allocated by the #GStringChunk. * After calling g_string_chunk_free() it is not safe to * access any of the strings which were contained within it. */ public void free() { g_string_chunk_free(gStringChunk); ownedRef = false; } /** * Adds a copy of @string to the #GStringChunk. * It returns a pointer to the new copy of the string * in the #GStringChunk. The characters in the string * can be changed, if necessary, though you should not * change anything after the end of the string. * * Unlike g_string_chunk_insert_const(), this function * does not check for duplicates. Also strings added * with g_string_chunk_insert() will not be searched * by g_string_chunk_insert_const() when looking for * duplicates. * * Params: * str = the string to add * * Returns: a pointer to the copy of @string within * the #GStringChunk */ public string insert(string str) { auto retStr = g_string_chunk_insert(gStringChunk, Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Adds a copy of @string to the #GStringChunk, unless the same * string has already been added to the #GStringChunk with * g_string_chunk_insert_const(). * * This function is useful if you need to copy a large number * of strings but do not want to waste space storing duplicates. * But you must remember that there may be several pointers to * the same string, and so any changes made to the strings * should be done very carefully. * * Note that g_string_chunk_insert_const() will not return a * pointer to a string added with g_string_chunk_insert(), even * if they do match. * * Params: * str = the string to add * * Returns: a pointer to the new or existing copy of @string * within the #GStringChunk */ public string insertConst(string str) { auto retStr = g_string_chunk_insert_const(gStringChunk, Str.toStringz(str)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Adds a copy of the first @len bytes of @string to the #GStringChunk. * The copy is nul-terminated. * * Since this function does not stop at nul bytes, it is the caller's * responsibility to ensure that @string has at least @len addressable * bytes. * * The characters in the returned string can be changed, if necessary, * though you should not change anything after the end of the string. * * Params: * str = bytes to insert * len = number of bytes of @string to insert, or -1 to insert a * nul-terminated string * * Returns: a pointer to the copy of @string within the #GStringChunk * * Since: 2.4 */ public string insertLen(string str, ptrdiff_t len) { auto retStr = g_string_chunk_insert_len(gStringChunk, Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Creates a new #GStringChunk. * * Params: * size = the default size of the blocks of memory which are * allocated to store the strings. If a particular string * is larger than this default size, a larger block of * memory will be allocated for it. * * Returns: a new #GStringChunk * * Throws: ConstructionException GTK+ fails to create the object. */ public this(size_t size) { auto p = g_string_chunk_new(size); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GStringChunk*) p); } } GtkD-3.7.5/generated/gtkd/glib/StringG.d000066400000000000000000000412221324604450400177100ustar00rootroot00000000000000/* * 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 glib.StringG; private import glib.Bytes; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * The GString struct contains the public fields of a GString. */ public class StringG { /** the main Gtk struct */ protected GString* gString; protected bool ownedRef; /** Get the main Gtk struct */ public GString* getStringGStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gString; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gString; } /** * Sets our main struct and passes it to the parent class. */ public this (GString* gString, bool ownedRef = false) { this.gString = gString; this.ownedRef = ownedRef; } /** * Adds a string onto the end of a #GString, expanding * it if necessary. * * Params: * val = the string to append onto the end of @string * * Returns: @string */ public StringG append(string val) { auto p = g_string_append(gString, Str.toStringz(val)); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Adds a byte onto the end of a #GString, expanding * it if necessary. * * Params: * c = the byte to append onto the end of @string * * Returns: @string */ public StringG appendC(char c) { auto p = g_string_append_c(gString, c); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Appends @len bytes of @val to @string. Because @len is * provided, @val may contain embedded nuls and need not * be nul-terminated. * * Since this function does not stop at nul bytes, it is * the caller's responsibility to ensure that @val has at * least @len addressable bytes. * * Params: * val = bytes to append * len = number of bytes of @val to use * * Returns: @string */ public StringG appendLen(string val, ptrdiff_t len) { auto p = g_string_append_len(gString, Str.toStringz(val), len); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Converts a Unicode character into UTF-8, and appends it * to the string. * * Params: * wc = a Unicode character * * Returns: @string */ public StringG appendUnichar(dchar wc) { auto p = g_string_append_unichar(gString, wc); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Appends @unescaped to @string, escaped any characters that * are reserved in URIs using URI-style escape sequences. * * Params: * unescaped = a string * reservedCharsAllowed = a string of reserved characters allowed * to be used, or %NULL * allowUtf8 = set %TRUE if the escaped string may include UTF8 characters * * Returns: @string * * Since: 2.16 */ public StringG appendUriEscaped(string unescaped, string reservedCharsAllowed, bool allowUtf8) { auto p = g_string_append_uri_escaped(gString, Str.toStringz(unescaped), Str.toStringz(reservedCharsAllowed), allowUtf8); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Appends a formatted string onto the end of a #GString. * This function is similar to g_string_append_printf() * except that the arguments to the format string are passed * as a va_list. * * Params: * format = the string format. See the printf() documentation * args = the list of arguments to insert in the output * * Since: 2.14 */ public void appendVprintf(string format, void* args) { g_string_append_vprintf(gString, Str.toStringz(format), args); } /** * Converts all uppercase ASCII letters to lowercase ASCII letters. * * Returns: passed-in @string pointer, with all the * uppercase characters converted to lowercase in place, * with semantics that exactly match g_ascii_tolower(). */ public StringG asciiDown() { auto p = g_string_ascii_down(gString); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Converts all lowercase ASCII letters to uppercase ASCII letters. * * Returns: passed-in @string pointer, with all the * lowercase characters converted to uppercase in place, * with semantics that exactly match g_ascii_toupper(). */ public StringG asciiUp() { auto p = g_string_ascii_up(gString); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Copies the bytes from a string into a #GString, * destroying any previous contents. It is rather like * the standard strcpy() function, except that you do not * have to worry about having enough space to copy the string. * * Params: * rval = the string to copy into @string * * Returns: @string */ public StringG assign(string rval) { auto p = g_string_assign(gString, Str.toStringz(rval)); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Converts a #GString to lowercase. * * Deprecated: This function uses the locale-specific * tolower() function, which is almost never the right thing. * Use g_string_ascii_down() or g_utf8_strdown() instead. * * Returns: the #GString */ public StringG down() { auto p = g_string_down(gString); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Compares two strings for equality, returning %TRUE if they are equal. * For use with #GHashTable. * * Params: * v2 = another #GString * * Returns: %TRUE if the strings are the same length and contain the * same bytes */ public bool equal(StringG v2) { return g_string_equal(gString, (v2 is null) ? null : v2.getStringGStruct()) != 0; } /** * Removes @len bytes from a #GString, starting at position @pos. * The rest of the #GString is shifted down to fill the gap. * * Params: * pos = the position of the content to remove * len = the number of bytes to remove, or -1 to remove all * following bytes * * Returns: @string */ public StringG erase(ptrdiff_t pos, ptrdiff_t len) { auto p = g_string_erase(gString, pos, len); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Frees the memory allocated for the #GString. * If @free_segment is %TRUE it also frees the character data. If * it's %FALSE, the caller gains ownership of the buffer and must * free it after use with g_free(). * * Params: * freeSegment = if %TRUE, the actual character data is freed as well * * Returns: the character data of @string * (i.e. %NULL if @free_segment is %TRUE) */ public string free(bool freeSegment) { auto retStr = g_string_free(gString, freeSegment); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Transfers ownership of the contents of @string to a newly allocated * #GBytes. The #GString structure itself is deallocated, and it is * therefore invalid to use @string after invoking this function. * * Note that while #GString ensures that its buffer always has a * trailing nul character (not reflected in its "len"), the returned * #GBytes does not include this extra nul; i.e. it has length exactly * equal to the "len" member. * * Returns: A newly allocated #GBytes containing contents of @string; @string itself is freed * * Since: 2.34 */ public Bytes freeToBytes() { auto p = g_string_free_to_bytes(gString); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Creates a hash code for @str; for use with #GHashTable. * * Returns: hash code for @str */ public uint hash() { return g_string_hash(gString); } /** * Inserts a copy of a string into a #GString, * expanding it if necessary. * * Params: * pos = the position to insert the copy of the string * val = the string to insert * * Returns: @string */ public StringG insert(ptrdiff_t pos, string val) { auto p = g_string_insert(gString, pos, Str.toStringz(val)); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Inserts a byte into a #GString, expanding it if necessary. * * Params: * pos = the position to insert the byte * c = the byte to insert * * Returns: @string */ public StringG insertC(ptrdiff_t pos, char c) { auto p = g_string_insert_c(gString, pos, c); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Inserts @len bytes of @val into @string at @pos. * Because @len is provided, @val may contain embedded * nuls and need not be nul-terminated. If @pos is -1, * bytes are inserted at the end of the string. * * Since this function does not stop at nul bytes, it is * the caller's responsibility to ensure that @val has at * least @len addressable bytes. * * Params: * pos = position in @string where insertion should * happen, or -1 for at the end * val = bytes to insert * len = number of bytes of @val to insert * * Returns: @string */ public StringG insertLen(ptrdiff_t pos, string val, ptrdiff_t len) { auto p = g_string_insert_len(gString, pos, Str.toStringz(val), len); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Converts a Unicode character into UTF-8, and insert it * into the string at the given position. * * Params: * pos = the position at which to insert character, or -1 * to append at the end of the string * wc = a Unicode character * * Returns: @string */ public StringG insertUnichar(ptrdiff_t pos, dchar wc) { auto p = g_string_insert_unichar(gString, pos, wc); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Overwrites part of a string, lengthening it if necessary. * * Params: * pos = the position at which to start overwriting * val = the string that will overwrite the @string starting at @pos * * Returns: @string * * Since: 2.14 */ public StringG overwrite(size_t pos, string val) { auto p = g_string_overwrite(gString, pos, Str.toStringz(val)); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Overwrites part of a string, lengthening it if necessary. * This function will work with embedded nuls. * * Params: * pos = the position at which to start overwriting * val = the string that will overwrite the @string starting at @pos * len = the number of bytes to write from @val * * Returns: @string * * Since: 2.14 */ public StringG overwriteLen(size_t pos, string val, ptrdiff_t len) { auto p = g_string_overwrite_len(gString, pos, Str.toStringz(val), len); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Adds a string on to the start of a #GString, * expanding it if necessary. * * Params: * val = the string to prepend on the start of @string * * Returns: @string */ public StringG prepend(string val) { auto p = g_string_prepend(gString, Str.toStringz(val)); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Adds a byte onto the start of a #GString, * expanding it if necessary. * * Params: * c = the byte to prepend on the start of the #GString * * Returns: @string */ public StringG prependC(char c) { auto p = g_string_prepend_c(gString, c); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Prepends @len bytes of @val to @string. * Because @len is provided, @val may contain * embedded nuls and need not be nul-terminated. * * Since this function does not stop at nul bytes, * it is the caller's responsibility to ensure that * @val has at least @len addressable bytes. * * Params: * val = bytes to prepend * len = number of bytes in @val to prepend * * Returns: @string */ public StringG prependLen(string val, ptrdiff_t len) { auto p = g_string_prepend_len(gString, Str.toStringz(val), len); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Converts a Unicode character into UTF-8, and prepends it * to the string. * * Params: * wc = a Unicode character * * Returns: @string */ public StringG prependUnichar(dchar wc) { auto p = g_string_prepend_unichar(gString, wc); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Sets the length of a #GString. If the length is less than * the current length, the string will be truncated. If the * length is greater than the current length, the contents * of the newly added area are undefined. (However, as * always, string->str[string->len] will be a nul byte.) * * Params: * len = the new length * * Returns: @string */ public StringG setSize(size_t len) { auto p = g_string_set_size(gString, len); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Cuts off the end of the GString, leaving the first @len bytes. * * Params: * len = the new size of @string * * Returns: @string */ public StringG truncate(size_t len) { auto p = g_string_truncate(gString, len); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Converts a #GString to uppercase. * * Deprecated: This function uses the locale-specific * toupper() function, which is almost never the right thing. * Use g_string_ascii_up() or g_utf8_strup() instead. * * Returns: @string */ public StringG up() { auto p = g_string_up(gString); if(p is null) { return null; } return new StringG(cast(GString*) p); } /** * Writes a formatted string into a #GString. * This function is similar to g_string_printf() except that * the arguments to the format string are passed as a va_list. * * Params: * format = the string format. See the printf() documentation * args = the parameters to insert into the format string * * Since: 2.14 */ public void vprintf(string format, void* args) { g_string_vprintf(gString, Str.toStringz(format), args); } /** * Creates a new #GString, initialized with the given string. * * Params: * init = the initial text to copy into the string, or %NULL to * start with an empty string * * Returns: the new #GString */ public static StringG stringNew(string init) { auto p = g_string_new(Str.toStringz(init)); if(p is null) { return null; } return new StringG(cast(GString*) p, true); } /** * Creates a new #GString with @len bytes of the @init buffer. * Because a length is provided, @init need not be nul-terminated, * and can contain embedded nul bytes. * * Since this function does not stop at nul bytes, it is the caller's * responsibility to ensure that @init has at least @len addressable * bytes. * * Params: * init = initial contents of the string * len = length of @init to use * * Returns: a new #GString */ public static StringG stringNewLen(string init, ptrdiff_t len) { auto p = g_string_new_len(Str.toStringz(init), len); if(p is null) { return null; } return new StringG(cast(GString*) p, true); } /** * Creates a new #GString, with enough space for @dfl_size * bytes. This is useful if you are going to add a lot of * text to the string and don't want it to be reallocated * too often. * * Params: * dflSize = the default size of the space allocated to * hold the string * * Returns: the new #GString */ public static StringG stringSizedNew(size_t dflSize) { auto p = g_string_sized_new(dflSize); if(p is null) { return null; } return new StringG(cast(GString*) p, true); } } GtkD-3.7.5/generated/gtkd/glib/TestLogBuffer.d000066400000000000000000000056321324604450400210530ustar00rootroot00000000000000/* * 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 glib.TestLogBuffer; private import glib.ConstructionException; private import glib.TestLogMsg; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** */ public class TestLogBuffer { /** the main Gtk struct */ protected GTestLogBuffer* gTestLogBuffer; protected bool ownedRef; /** Get the main Gtk struct */ public GTestLogBuffer* getTestLogBufferStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTestLogBuffer; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gTestLogBuffer; } /** * Sets our main struct and passes it to the parent class. */ public this (GTestLogBuffer* gTestLogBuffer, bool ownedRef = false) { this.gTestLogBuffer = gTestLogBuffer; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_test_log_buffer_free(gTestLogBuffer); } /** * Internal function for gtester to free test log messages, no ABI guarantees provided. */ public void free() { g_test_log_buffer_free(gTestLogBuffer); ownedRef = false; } /** * Internal function for gtester to retrieve test log messages, no ABI guarantees provided. */ public TestLogMsg pop() { auto p = g_test_log_buffer_pop(gTestLogBuffer); if(p is null) { return null; } return new TestLogMsg(cast(GTestLogMsg*) p); } /** * Internal function for gtester to decode test log messages, no ABI guarantees provided. */ public void push(uint nBytes, ubyte* bytes) { g_test_log_buffer_push(gTestLogBuffer, nBytes, bytes); } /** * Internal function for gtester to decode test log messages, no ABI guarantees provided. * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = g_test_log_buffer_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GTestLogBuffer*) p); } } GtkD-3.7.5/generated/gtkd/glib/TestLogMsg.d000066400000000000000000000037361324604450400203730ustar00rootroot00000000000000/* * 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 glib.TestLogMsg; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** */ public class TestLogMsg { /** the main Gtk struct */ protected GTestLogMsg* gTestLogMsg; protected bool ownedRef; /** Get the main Gtk struct */ public GTestLogMsg* getTestLogMsgStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTestLogMsg; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gTestLogMsg; } /** * Sets our main struct and passes it to the parent class. */ public this (GTestLogMsg* gTestLogMsg, bool ownedRef = false) { this.gTestLogMsg = gTestLogMsg; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_test_log_msg_free(gTestLogMsg); } /** * Internal function for gtester to free test log messages, no ABI guarantees provided. */ public void free() { g_test_log_msg_free(gTestLogMsg); ownedRef = false; } } GtkD-3.7.5/generated/gtkd/glib/TestSuite.d000066400000000000000000000042421324604450400202650ustar00rootroot00000000000000/* * 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 glib.TestSuite; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** * An opaque structure representing a test suite. */ public class TestSuite { /** the main Gtk struct */ protected GTestSuite* gTestSuite; protected bool ownedRef; /** Get the main Gtk struct */ public GTestSuite* getTestSuiteStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTestSuite; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gTestSuite; } /** * Sets our main struct and passes it to the parent class. */ public this (GTestSuite* gTestSuite, bool ownedRef = false) { this.gTestSuite = gTestSuite; this.ownedRef = ownedRef; } /** * Adds @test_case to @suite. * * Params: * testCase = a #GTestCase * * Since: 2.16 */ public void add(GTestCase* testCase) { g_test_suite_add(gTestSuite, testCase); } /** * Adds @nestedsuite to @suite. * * Params: * nestedsuite = another #GTestSuite * * Since: 2.16 */ public void addSuite(TestSuite nestedsuite) { g_test_suite_add_suite(gTestSuite, (nestedsuite is null) ? null : nestedsuite.getTestSuiteStruct()); } } GtkD-3.7.5/generated/gtkd/glib/Thread.d000066400000000000000000000247431324604450400175530ustar00rootroot00000000000000/* * 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 glib.Thread; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The #GThread struct represents a running thread. This struct * is returned by g_thread_new() or g_thread_try_new(). You can * obtain the #GThread struct representing the current thread by * calling g_thread_self(). * * GThread is refcounted, see g_thread_ref() and g_thread_unref(). * The thread represented by it holds a reference while it is running, * and g_thread_join() consumes the reference that it is given, so * it is normally not necessary to manage GThread references * explicitly. * * The structure is opaque -- none of its fields may be directly * accessed. */ public class Thread { /** the main Gtk struct */ protected GThread* gThread; protected bool ownedRef; /** Get the main Gtk struct */ public GThread* getThreadStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gThread; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gThread; } /** * Sets our main struct and passes it to the parent class. */ public this (GThread* gThread, bool ownedRef = false) { this.gThread = gThread; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_thread_unref(gThread); } /** * This function is the same as g_thread_new() except that * it allows for the possibility of failure. * * If a thread can not be created (due to resource limits), * @error is set and %NULL is returned. * * Params: * name = an (optional) name for the new thread * func = a function to execute in the new thread * data = an argument to supply to the new thread * * Returns: the new #GThread, or %NULL if an error occurred * * Since: 2.32 * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, GThreadFunc func, void* data) { GError* err = null; auto p = g_thread_try_new(Str.toStringz(name), func, data, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by try_new"); } this(cast(GThread*) p); } /** * Waits until @thread finishes, i.e. the function @func, as * given to g_thread_new(), returns or g_thread_exit() is called. * If @thread has already terminated, then g_thread_join() * returns immediately. * * Any thread can wait for any other thread by calling g_thread_join(), * not just its 'creator'. Calling g_thread_join() from multiple threads * for the same @thread leads to undefined behaviour. * * The value returned by @func or given to g_thread_exit() is * returned by this function. * * g_thread_join() consumes the reference to the passed-in @thread. * This will usually cause the #GThread struct and associated resources * to be freed. Use g_thread_ref() to obtain an extra reference if you * want to keep the GThread alive beyond the g_thread_join() call. * * Returns: the return value of the thread */ public void* join() { return g_thread_join(gThread); } /** * Increase the reference count on @thread. * * Returns: a new reference to @thread * * Since: 2.32 */ public Thread doref() { auto p = g_thread_ref(gThread); if(p is null) { return null; } return new Thread(cast(GThread*) p, true); } /** * Decrease the reference count on @thread, possibly freeing all * resources associated with it. * * Note that each thread holds a reference to its #GThread while * it is running, so it is safe to drop your own reference to it * if you don't need it anymore. * * Since: 2.32 */ public void unref() { g_thread_unref(gThread); } /** */ public static GQuark errorQuark() { return g_thread_error_quark(); } /** * Terminates the current thread. * * If another thread is waiting for us using g_thread_join() then the * waiting thread will be woken up and get @retval as the return value * of g_thread_join(). * * Calling g_thread_exit() with a parameter @retval is equivalent to * returning @retval from the function @func, as given to g_thread_new(). * * You must only call g_thread_exit() from a thread that you created * yourself with g_thread_new() or related APIs. You must not call * this function from a thread created with another threading library * or or from within a #GThreadPool. * * Params: * retval = the return value of this thread */ public static void exit(void* retval) { g_thread_exit(retval); } /** * This function returns the #GThread corresponding to the * current thread. Note that this function does not increase * the reference count of the returned struct. * * This function will return a #GThread even for threads that * were not created by GLib (i.e. those created by other threading * APIs). This may be useful for thread identification purposes * (i.e. comparisons) but you must not use GLib functions (such * as g_thread_join()) on these threads. * * Returns: the #GThread representing the current thread */ public static Thread self() { auto p = g_thread_self(); if(p is null) { return null; } return new Thread(cast(GThread*) p, true); } /** * Causes the calling thread to voluntarily relinquish the CPU, so * that other threads can run. * * This function is often used as a method to make busy wait less evil. */ public static void yield() { g_thread_yield(); } /** * Sets the indicated @lock_bit in @address. If the bit is already * set, this call will block until g_bit_unlock() unsets the * corresponding bit. * * Attempting to lock on two different bits within the same integer is * not supported and will very probably cause deadlocks. * * The value of the bit that is set is (1u << @bit). If @bit is not * between 0 and 31 then the result is undefined. * * This function accesses @address atomically. All other accesses to * @address must be atomic in order for this function to work * reliably. * * Params: * address = a pointer to an integer * lockBit = a bit value between 0 and 31 * * Since: 2.24 */ public static void bitLock(int* address, int lockBit) { g_bit_lock(address, lockBit); } /** * Sets the indicated @lock_bit in @address, returning %TRUE if * successful. If the bit is already set, returns %FALSE immediately. * * Attempting to lock on two different bits within the same integer is * not supported. * * The value of the bit that is set is (1u << @bit). If @bit is not * between 0 and 31 then the result is undefined. * * This function accesses @address atomically. All other accesses to * @address must be atomic in order for this function to work * reliably. * * Params: * address = a pointer to an integer * lockBit = a bit value between 0 and 31 * * Returns: %TRUE if the lock was acquired * * Since: 2.24 */ public static bool bitTrylock(int* address, int lockBit) { return g_bit_trylock(address, lockBit) != 0; } /** * Clears the indicated @lock_bit in @address. If another thread is * currently blocked in g_bit_lock() on this same bit then it will be * woken up. * * This function accesses @address atomically. All other accesses to * @address must be atomic in order for this function to work * reliably. * * Params: * address = a pointer to an integer * lockBit = a bit value between 0 and 31 * * Since: 2.24 */ public static void bitUnlock(int* address, int lockBit) { g_bit_unlock(address, lockBit); } /** * Determine the approximate number of threads that the system will * schedule simultaneously for this process. This is intended to be * used as a parameter to g_thread_pool_new() for CPU bound tasks and * similar cases. * * Returns: Number of schedulable threads, always greater than 0 * * Since: 2.36 */ public static uint getNumProcessors() { return g_get_num_processors(); } /** * This is equivalent to g_bit_lock, but working on pointers (or other * pointer-sized values). * * For portability reasons, you may only lock on the bottom 32 bits of * the pointer. * * Params: * address = a pointer to a #gpointer-sized value * lockBit = a bit value between 0 and 31 * * Since: 2.30 */ public static void pointerBitLock(void* address, int lockBit) { g_pointer_bit_lock(address, lockBit); } /** * This is equivalent to g_bit_trylock, but working on pointers (or * other pointer-sized values). * * For portability reasons, you may only lock on the bottom 32 bits of * the pointer. * * Params: * address = a pointer to a #gpointer-sized value * lockBit = a bit value between 0 and 31 * * Returns: %TRUE if the lock was acquired * * Since: 2.30 */ public static bool pointerBitTrylock(void* address, int lockBit) { return g_pointer_bit_trylock(address, lockBit) != 0; } /** * This is equivalent to g_bit_unlock, but working on pointers (or other * pointer-sized values). * * For portability reasons, you may only lock on the bottom 32 bits of * the pointer. * * Params: * address = a pointer to a #gpointer-sized value * lockBit = a bit value between 0 and 31 * * Since: 2.30 */ public static void pointerBitUnlock(void* address, int lockBit) { g_pointer_bit_unlock(address, lockBit); } } GtkD-3.7.5/generated/gtkd/glib/ThreadPool.d000066400000000000000000000311511324604450400203740ustar00rootroot00000000000000/* * 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 glib.ThreadPool; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * The #GThreadPool struct represents a thread pool. It has three * public read-only members, but the underlying struct is bigger, * so you must not copy this struct. */ public final class ThreadPool { /** the main Gtk struct */ protected GThreadPool* gThreadPool; protected bool ownedRef; /** Get the main Gtk struct */ public GThreadPool* getThreadPoolStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gThreadPool; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gThreadPool; } /** * Sets our main struct and passes it to the parent class. */ public this (GThreadPool* gThreadPool, bool ownedRef = false) { this.gThreadPool = gThreadPool; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_free(gThreadPool); } /** * the function to execute in the threads of this pool */ public @property GFunc func() { return gThreadPool.func; } /** Ditto */ public @property void func(GFunc value) { gThreadPool.func = value; } /** * the user data for the threads of this pool */ public @property void* userData() { return gThreadPool.userData; } /** Ditto */ public @property void userData(void* value) { gThreadPool.userData = value; } /** * are all threads exclusive to this pool */ public @property bool exclusive() { return gThreadPool.exclusive != 0; } /** Ditto */ public @property void exclusive(bool value) { gThreadPool.exclusive = value; } /** * Frees all resources allocated for @pool. * * If @immediate is %TRUE, no new task is processed for @pool. * Otherwise @pool is not freed before the last task is processed. * Note however, that no thread of this pool is interrupted while * processing a task. Instead at least all still running threads * can finish their tasks before the @pool is freed. * * If @wait_ is %TRUE, the functions does not return before all * tasks to be processed (dependent on @immediate, whether all * or only the currently running) are ready. * Otherwise the function returns immediately. * * After calling this function @pool must not be used anymore. * * Params: * immediate = should @pool shut down immediately? * wait = should the function wait for all tasks to be finished? */ public void free(bool immediate, bool wait) { g_thread_pool_free(gThreadPool, immediate, wait); } /** * Returns the maximal number of threads for @pool. * * Returns: the maximal number of threads */ public int getMaxThreads() { return g_thread_pool_get_max_threads(gThreadPool); } /** * Returns the number of threads currently running in @pool. * * Returns: the number of threads currently running */ public uint getNumThreads() { return g_thread_pool_get_num_threads(gThreadPool); } /** * Moves the item to the front of the queue of unprocessed * items, so that it will be processed next. * * Params: * data = an unprocessed item in the pool * * Returns: %TRUE if the item was found and moved * * Since: 2.46 */ public bool moveToFront(void* data) { return g_thread_pool_move_to_front(gThreadPool, data) != 0; } /** * Inserts @data into the list of tasks to be executed by @pool. * * When the number of currently running threads is lower than the * maximal allowed number of threads, a new thread is started (or * reused) with the properties given to g_thread_pool_new(). * Otherwise, @data stays in the queue until a thread in this pool * finishes its previous task and processes @data. * * @error can be %NULL to ignore errors, or non-%NULL to report * errors. An error can only occur when a new thread couldn't be * created. In that case @data is simply appended to the queue of * work to do. * * Before version 2.32, this function did not return a success status. * * Params: * data = a new task for @pool * * Returns: %TRUE on success, %FALSE if an error occurred * * Throws: GException on failure. */ public bool push(void* data) { GError* err = null; auto p = g_thread_pool_push(gThreadPool, data, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the maximal allowed number of threads for @pool. * A value of -1 means that the maximal number of threads * is unlimited. If @pool is an exclusive thread pool, setting * the maximal number of threads to -1 is not allowed. * * Setting @max_threads to 0 means stopping all work for @pool. * It is effectively frozen until @max_threads is set to a non-zero * value again. * * A thread is never terminated while calling @func, as supplied by * g_thread_pool_new(). Instead the maximal number of threads only * has effect for the allocation of new threads in g_thread_pool_push(). * A new thread is allocated, whenever the number of currently * running threads in @pool is smaller than the maximal number. * * @error can be %NULL to ignore errors, or non-%NULL to report * errors. An error can only occur when a new thread couldn't be * created. * * Before version 2.32, this function did not return a success status. * * Params: * maxThreads = a new maximal number of threads for @pool, * or -1 for unlimited * * Returns: %TRUE on success, %FALSE if an error occurred * * Throws: GException on failure. */ public bool setMaxThreads(int maxThreads) { GError* err = null; auto p = g_thread_pool_set_max_threads(gThreadPool, maxThreads, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Sets the function used to sort the list of tasks. This allows the * tasks to be processed by a priority determined by @func, and not * just in the order in which they were added to the pool. * * Note, if the maximum number of threads is more than 1, the order * that threads are executed cannot be guaranteed 100%. Threads are * scheduled by the operating system and are executed at random. It * cannot be assumed that threads are executed in the order they are * created. * * Params: * func = the #GCompareDataFunc used to sort the list of tasks. * This function is passed two tasks. It should return * 0 if the order in which they are handled does not matter, * a negative value if the first task should be processed before * the second or a positive value if the second task should be * processed first. * userData = user data passed to @func * * Since: 2.10 */ public void setSortFunction(GCompareDataFunc func, void* userData) { g_thread_pool_set_sort_function(gThreadPool, func, userData); } /** * Returns the number of tasks still unprocessed in @pool. * * Returns: the number of unprocessed tasks */ public uint unprocessed() { return g_thread_pool_unprocessed(gThreadPool); } /** * This function will return the maximum @interval that a * thread will wait in the thread pool for new tasks before * being stopped. * * If this function returns 0, threads waiting in the thread * pool for new work are not stopped. * * Returns: the maximum @interval (milliseconds) to wait * for new tasks in the thread pool before stopping the * thread * * Since: 2.10 */ public static uint getMaxIdleTime() { return g_thread_pool_get_max_idle_time(); } /** * Returns the maximal allowed number of unused threads. * * Returns: the maximal number of unused threads */ public static int getMaxUnusedThreads() { return g_thread_pool_get_max_unused_threads(); } /** * Returns the number of currently unused threads. * * Returns: the number of currently unused threads */ public static uint getNumUnusedThreads() { return g_thread_pool_get_num_unused_threads(); } /** * This function creates a new thread pool. * * Whenever you call g_thread_pool_push(), either a new thread is * created or an unused one is reused. At most @max_threads threads * are running concurrently for this thread pool. @max_threads = -1 * allows unlimited threads to be created for this thread pool. The * newly created or reused thread now executes the function @func * with the two arguments. The first one is the parameter to * g_thread_pool_push() and the second one is @user_data. * * The parameter @exclusive determines whether the thread pool owns * all threads exclusive or shares them with other thread pools. * If @exclusive is %TRUE, @max_threads threads are started * immediately and they will run exclusively for this thread pool * until it is destroyed by g_thread_pool_free(). If @exclusive is * %FALSE, threads are created when needed and shared between all * non-exclusive thread pools. This implies that @max_threads may * not be -1 for exclusive thread pools. Besides, exclusive thread * pools are not affected by g_thread_pool_set_max_idle_time() * since their threads are never considered idle and returned to the * global pool. * * @error can be %NULL to ignore errors, or non-%NULL to report * errors. An error can only occur when @exclusive is set to %TRUE * and not all @max_threads threads could be created. * See #GThreadError for possible errors that may occur. * Note, even in case of error a valid #GThreadPool is returned. * * Params: * func = a function to execute in the threads of the new thread pool * userData = user data that is handed over to @func every time it * is called * maxThreads = the maximal number of threads to execute concurrently * in the new thread pool, -1 means no limit * exclusive = should this thread pool be exclusive? * * Returns: the new #GThreadPool * * Throws: GException on failure. * Throws: ConstructionException GTK+ fails to create the object. */ public this(GFunc func, void* userData, int maxThreads, bool exclusive) { GError* err = null; auto p = g_thread_pool_new(func, userData, maxThreads, exclusive, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GThreadPool*) p); } /** * This function will set the maximum @interval that a thread * waiting in the pool for new tasks can be idle for before * being stopped. This function is similar to calling * g_thread_pool_stop_unused_threads() on a regular timeout, * except this is done on a per thread basis. * * By setting @interval to 0, idle threads will not be stopped. * * The default value is 15000 (15 seconds). * * Params: * interval = the maximum @interval (in milliseconds) * a thread can be idle * * Since: 2.10 */ public static void setMaxIdleTime(uint interval) { g_thread_pool_set_max_idle_time(interval); } /** * Sets the maximal number of unused threads to @max_threads. * If @max_threads is -1, no limit is imposed on the number * of unused threads. * * The default value is 2. * * Params: * maxThreads = maximal number of unused threads */ public static void setMaxUnusedThreads(int maxThreads) { g_thread_pool_set_max_unused_threads(maxThreads); } /** * Stops all currently unused threads. This does not change the * maximal number of unused threads. This function can be used to * regularly stop all unused threads e.g. from g_timeout_add(). */ public static void stopUnusedThreads() { g_thread_pool_stop_unused_threads(); } } GtkD-3.7.5/generated/gtkd/glib/TimeVal.d000066400000000000000000000161321324604450400176760ustar00rootroot00000000000000/* * 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 glib.TimeVal; private import glib.MemorySlice; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * Represents a precise time, with seconds and microseconds. * Similar to the struct timeval returned by the gettimeofday() * UNIX system call. * * GLib is attempting to unify around the use of 64bit integers to * represent microsecond-precision time. As such, this type will be * removed from a future version of GLib. */ public final class TimeVal { /** the main Gtk struct */ protected GTimeVal* gTimeVal; protected bool ownedRef; /** Get the main Gtk struct */ public GTimeVal* getTimeValStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTimeVal; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gTimeVal; } /** * Sets our main struct and passes it to the parent class. */ public this (GTimeVal* gTimeVal, bool ownedRef = false) { this.gTimeVal = gTimeVal; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_free(gTimeVal); } /** * seconds */ public @property glong tvSec() { return gTimeVal.tvSec; } /** Ditto */ public @property void tvSec(glong value) { gTimeVal.tvSec = value; } /** * microseconds */ public @property glong tvUsec() { return gTimeVal.tvUsec; } /** Ditto */ public @property void tvUsec(glong value) { gTimeVal.tvUsec = value; } /** * Adds the given number of microseconds to @time_. @microseconds can * also be negative to decrease the value of @time_. * * Params: * microseconds = number of microseconds to add to @time */ public void add(glong microseconds) { g_time_val_add(gTimeVal, microseconds); } /** * Converts @time_ into an RFC 3339 encoded string, relative to the * Coordinated Universal Time (UTC). This is one of the many formats * allowed by ISO 8601. * * ISO 8601 allows a large number of date/time formats, with or without * punctuation and optional elements. The format returned by this function * is a complete date and time, with optional punctuation included, the * UTC time zone represented as "Z", and the @tv_usec part included if * and only if it is nonzero, i.e. either * "YYYY-MM-DDTHH:MM:SSZ" or "YYYY-MM-DDTHH:MM:SS.fffffZ". * * This corresponds to the Internet date/time format defined by * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt), * and to either of the two most-precise formats defined by * the W3C Note * [Date and Time Formats](http://www.w3.org/TR/NOTE-datetime-19980827). * Both of these documents are profiles of ISO 8601. * * Use g_date_time_format() or g_strdup_printf() if a different * variation of ISO 8601 format is required. * * If @time_ represents a date which is too large to fit into a `struct tm`, * %NULL will be returned. This is platform dependent, but it is safe to assume * years up to 3000 are supported. The return value of g_time_val_to_iso8601() * has been nullable since GLib 2.54; before then, GLib would crash under the * same conditions. * * Returns: a newly allocated string containing an ISO 8601 date, * or %NULL if @time_ was too large * * Since: 2.12 */ public string toIso8601() { auto retStr = g_time_val_to_iso8601(gTimeVal); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a string containing an ISO 8601 encoded date and time * to a #GTimeVal and puts it into @time_. * * @iso_date must include year, month, day, hours, minutes, and * seconds. It can optionally include fractions of a second and a time * zone indicator. (In the absence of any time zone indication, the * timestamp is assumed to be in local time.) * * Params: * isoDate = an ISO 8601 encoded date string * time = a #GTimeVal * * Returns: %TRUE if the conversion was successful. * * Since: 2.12 */ public static bool fromIso8601(string isoDate, out TimeVal time) { GTimeVal* outtime = sliceNew!GTimeVal(); auto p = g_time_val_from_iso8601(Str.toStringz(isoDate), outtime) != 0; time = new TimeVal(outtime, true); return p; } /** * Equivalent to the UNIX gettimeofday() function, but portable. * * You may find g_get_real_time() to be more convenient. * * Params: * result = #GTimeVal structure in which to store current time. */ public static void getCurrentTime(TimeVal result) { g_get_current_time((result is null) ? null : result.getTimeValStruct()); } /** * Queries the system monotonic time. * * The monotonic clock will always increase and doesn't suffer * discontinuities when the user (or NTP) changes the system time. It * may or may not continue to tick during times where the machine is * suspended. * * We try to use the clock that corresponds as closely as possible to * the passage of time as measured by system calls such as poll() but it * may not always be possible to do this. * * Returns: the monotonic time, in microseconds * * Since: 2.28 */ public static long getMonotonicTime() { return g_get_monotonic_time(); } /** * Queries the system wall-clock time. * * This call is functionally equivalent to g_get_current_time() except * that the return value is often more convenient than dealing with a * #GTimeVal. * * You should only use this call if you are actually interested in the real * wall-clock time. g_get_monotonic_time() is probably more useful for * measuring intervals. * * Returns: the number of microseconds since January 1, 1970 UTC. * * Since: 2.28 */ public static long getRealTime() { return g_get_real_time(); } /** * Pauses the current thread for the given number of microseconds. * * There are 1 million microseconds per second (represented by the * #G_USEC_PER_SEC macro). g_usleep() may have limited precision, * depending on hardware and operating system; don't rely on the exact * length of the sleep. * * Params: * microseconds = number of microseconds to pause */ public static void usleep(gulong microseconds) { g_usleep(microseconds); } } GtkD-3.7.5/generated/gtkd/glib/TimeZone.d000066400000000000000000000233201324604450400200640ustar00rootroot00000000000000/* * 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 glib.TimeZone; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * #GTimeZone is an opaque structure whose members cannot be accessed * directly. * * Since: 2.26 */ public class TimeZone { /** the main Gtk struct */ protected GTimeZone* gTimeZone; protected bool ownedRef; /** Get the main Gtk struct */ public GTimeZone* getTimeZoneStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTimeZone; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gTimeZone; } /** * Sets our main struct and passes it to the parent class. */ public this (GTimeZone* gTimeZone, bool ownedRef = false) { this.gTimeZone = gTimeZone; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_time_zone_unref(gTimeZone); } /** * Creates a #GTimeZone corresponding to @identifier. * * @identifier can either be an RFC3339/ISO 8601 time offset or * something that would pass as a valid value for the `TZ` environment * variable (including %NULL). * * In Windows, @identifier can also be the unlocalized name of a time * zone for standard time, for example "Pacific Standard Time". * * Valid RFC3339 time offsets are `"Z"` (for UTC) or * `"±hh:mm"`. ISO 8601 additionally specifies * `"±hhmm"` and `"±hh"`. Offsets are * time values to be added to Coordinated Universal Time (UTC) to get * the local time. * * In UNIX, the `TZ` environment variable typically corresponds * to the name of a file in the zoneinfo database, or string in * "std offset [dst [offset],start[/time],end[/time]]" (POSIX) format. * There are no spaces in the specification. The name of standard * and daylight savings time zone must be three or more alphabetic * characters. Offsets are time values to be added to local time to * get Coordinated Universal Time (UTC) and should be * `"[±]hh[[:]mm[:ss]]"`. Dates are either * `"Jn"` (Julian day with n between 1 and 365, leap * years not counted), `"n"` (zero-based Julian day * with n between 0 and 365) or `"Mm.w.d"` (day d * (0 <= d <= 6) of week w (1 <= w <= 5) of month m (1 <= m <= 12), day * 0 is a Sunday). Times are in local wall clock time, the default is * 02:00:00. * * In Windows, the "tzn[+|–]hh[:mm[:ss]][dzn]" format is used, but also * accepts POSIX format. The Windows format uses US rules for all time * zones; daylight savings time is 60 minutes behind the standard time * with date and time of change taken from Pacific Standard Time. * Offsets are time values to be added to the local time to get * Coordinated Universal Time (UTC). * * g_time_zone_new_local() calls this function with the value of the * `TZ` environment variable. This function itself is independent of * the value of `TZ`, but if @identifier is %NULL then `/etc/localtime` * will be consulted to discover the correct time zone on UNIX and the * registry will be consulted or GetTimeZoneInformation() will be used * to get the local time zone on Windows. * * If intervals are not available, only time zone rules from `TZ` * environment variable or other means, then they will be computed * from year 1900 to 2037. If the maximum year for the rules is * available and it is greater than 2037, then it will followed * instead. * * See * [RFC3339 §5.6](http://tools.ietf.org/html/rfc3339#section-5.6) * for a precise definition of valid RFC3339 time offsets * (the `time-offset` expansion) and ISO 8601 for the * full list of valid time offsets. See * [The GNU C Library manual](http://www.gnu.org/s/libc/manual/html_node/TZ-Variable.html) * for an explanation of the possible * values of the `TZ` environment variable. See * [Microsoft Time Zone Index Values](http://msdn.microsoft.com/en-us/library/ms912391%28v=winembedded.11%29.aspx) * for the list of time zones on Windows. * * You should release the return value by calling g_time_zone_unref() * when you are done with it. * * Params: * identifier = a timezone identifier * * Returns: the requested timezone * * Since: 2.26 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string identifier) { auto p = g_time_zone_new(Str.toStringz(identifier)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GTimeZone*) p); } /** * Finds an interval within @tz that corresponds to the given @time_, * possibly adjusting @time_ if required to fit into an interval. * The meaning of @time_ depends on @type. * * This function is similar to g_time_zone_find_interval(), with the * difference that it always succeeds (by making the adjustments * described below). * * In any of the cases where g_time_zone_find_interval() succeeds then * this function returns the same value, without modifying @time_. * * This function may, however, modify @time_ in order to deal with * non-existent times. If the non-existent local @time_ of 02:30 were * requested on March 14th 2010 in Toronto then this function would * adjust @time_ to be 03:00 and return the interval containing the * adjusted time. * * Params: * type = the #GTimeType of @time_ * time = a pointer to a number of seconds since January 1, 1970 * * Returns: the interval containing @time_, never -1 * * Since: 2.26 */ public int adjustTime(GTimeType type, long* time) { return g_time_zone_adjust_time(gTimeZone, type, time); } /** * Finds an the interval within @tz that corresponds to the given @time_. * The meaning of @time_ depends on @type. * * If @type is %G_TIME_TYPE_UNIVERSAL then this function will always * succeed (since universal time is monotonic and continuous). * * Otherwise @time_ is treated as local time. The distinction between * %G_TIME_TYPE_STANDARD and %G_TIME_TYPE_DAYLIGHT is ignored except in * the case that the given @time_ is ambiguous. In Toronto, for example, * 01:30 on November 7th 2010 occurred twice (once inside of daylight * savings time and the next, an hour later, outside of daylight savings * time). In this case, the different value of @type would result in a * different interval being returned. * * It is still possible for this function to fail. In Toronto, for * example, 02:00 on March 14th 2010 does not exist (due to the leap * forward to begin daylight savings time). -1 is returned in that * case. * * Params: * type = the #GTimeType of @time_ * time = a number of seconds since January 1, 1970 * * Returns: the interval containing @time_, or -1 in case of failure * * Since: 2.26 */ public int findInterval(GTimeType type, long time) { return g_time_zone_find_interval(gTimeZone, type, time); } /** * Determines the time zone abbreviation to be used during a particular * @interval of time in the time zone @tz. * * For example, in Toronto this is currently "EST" during the winter * months and "EDT" during the summer months when daylight savings time * is in effect. * * Params: * interval = an interval within the timezone * * Returns: the time zone abbreviation, which belongs to @tz * * Since: 2.26 */ public string getAbbreviation(int interval) { return Str.toString(g_time_zone_get_abbreviation(gTimeZone, interval)); } /** * Determines the offset to UTC in effect during a particular @interval * of time in the time zone @tz. * * The offset is the number of seconds that you add to UTC time to * arrive at local time for @tz (ie: negative numbers for time zones * west of GMT, positive numbers for east). * * Params: * interval = an interval within the timezone * * Returns: the number of seconds that should be added to UTC to get the * local time in @tz * * Since: 2.26 */ public int getOffset(int interval) { return g_time_zone_get_offset(gTimeZone, interval); } /** * Determines if daylight savings time is in effect during a particular * @interval of time in the time zone @tz. * * Params: * interval = an interval within the timezone * * Returns: %TRUE if daylight savings time is in effect * * Since: 2.26 */ public bool isDst(int interval) { return g_time_zone_is_dst(gTimeZone, interval) != 0; } /** * Increases the reference count on @tz. * * Returns: a new reference to @tz. * * Since: 2.26 */ public TimeZone doref() { auto p = g_time_zone_ref(gTimeZone); if(p is null) { return null; } return new TimeZone(cast(GTimeZone*) p, true); } /** * Decreases the reference count on @tz. * * Since: 2.26 */ public void unref() { g_time_zone_unref(gTimeZone); } } GtkD-3.7.5/generated/gtkd/glib/Timeout.d000066400000000000000000000342041324604450400177630ustar00rootroot00000000000000/* * 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 glib.Timeout; private import glib.Source; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public class Timeout { /** Holds all timeout delegates */ bool delegate()[] timeoutListeners; /** our gtk timeout ID */ uint timeoutID; /** * Creates a new timeout cycle with the default priority, GPriority.DEFAULT. * * Note that timeout functions may be delayed, due to the processing of other * event sources. Thus they should not be relied on for precise timing. * After each call to the timeout function, the time of the next timeout is * recalculated based on the current time and the given interval * (it does not try to 'catch up' time lost in delays). * Params: * interval = the timeout in milieconds * delegate() = the delegate to be executed * fireNow = When true the delegate will be executed emmidiatly */ this(uint interval, bool delegate() dlg, bool fireNow=false) { timeoutListeners ~= dlg; timeoutID = g_timeout_add(interval, cast(GSourceFunc)&timeoutCallback, cast(void*)this); if ( fireNow ) { if ( !dlg() ) { timeoutListeners.length = 0; } } } /** * Creates a new timeout cycle. * Params: * interval = the timeout in milieconds * delegate() = the delegate to be executed * priority = Priority for the timeout function * fireNow = When true the delegate will be executed emmidiatly */ this(uint interval, bool delegate() dlg, GPriority priority, bool fireNow=false) { timeoutListeners ~= dlg; timeoutID = g_timeout_add_full(priority, interval, cast(GSourceFunc)&timeoutCallback, cast(void*)this, null); if ( fireNow ) { if ( !dlg() ) { timeoutListeners.length = 0; } } } /** * Creates a new timeout cycle with the default priority, GPriority.DEFAULT. * Params: * delegate() = the delegate to be executed * seconds = interval in seconds. * fireNow = When true the delegate will be executed emmidiatly */ this(bool delegate() dlg, uint seconds, bool fireNow=false) { timeoutListeners ~= dlg; timeoutID = g_timeout_add_seconds(seconds, cast(GSourceFunc)&timeoutCallback, cast(void*)this); if ( fireNow ) { if ( !dlg() ) { timeoutListeners.length = 0; } } } /** * Creates a new timeout cycle. * Params: * delegate() = the delegate to be executed * seconds = interval in seconds. * priority = Priority for the timeout function * fireNow = When true the delegate will be executed emmidiatly */ this(bool delegate() dlg, uint seconds, GPriority priority, bool fireNow=false) { timeoutListeners ~= dlg; timeoutID = g_timeout_add_seconds_full(priority, seconds, cast(GSourceFunc)&timeoutCallback, cast(void*)this, null); if ( fireNow ) { if ( !dlg() ) { timeoutListeners.length = 0; } } } /** */ public void stop() { if ( timeoutID > 0 ) { g_source_remove(timeoutID); } timeoutID = 0; timeoutListeners.length = 0; } /** * Removes the timeout from gtk */ ~this() { stop(); } /** * Adds a new delegate to this timeout cycle * Params: * dlg = * fireNow = */ public void addListener(bool delegate() dlg, bool fireNow=false) { timeoutListeners ~= dlg; if ( fireNow ) { if ( !dlg() ) { timeoutListeners.length = timeoutListeners.length - 1; } } } /** * The callback execution from glib * Params: * timeout = * Returns: */ extern(C) static bool timeoutCallback(Timeout timeout) { return timeout.callAllListeners(); } /** * Executes all delegates on the execution list * Returns: */ private bool callAllListeners() { bool runAgain = false; int i = 0; while ( i. See the Unicode * Standard for the definition of Primary Composite. * * If @a and @b do not compose a new character, @ch is set to zero. * * See * [UAX#15](http://unicode.org/reports/tr15/) * for details. * * Params: * a = a Unicode character * b = a Unicode character * ch = return location for the composed character * * Returns: %TRUE if the characters could be composed * * Since: 2.30 */ public static bool unicharCompose(dchar a, dchar b, dchar* ch) { return g_unichar_compose(a, b, ch) != 0; } /** * Performs a single decomposition step of the * Unicode canonical decomposition algorithm. * * This function does not include compatibility * decompositions. It does, however, include algorithmic * Hangul Jamo decomposition, as well as 'singleton' * decompositions which replace a character by a single * other character. In the case of singletons *@b will * be set to zero. * * If @ch is not decomposable, *@a is set to @ch and *@b * is set to zero. * * Note that the way Unicode decomposition pairs are * defined, it is guaranteed that @b would not decompose * further, but @a may itself decompose. To get the full * canonical decomposition for @ch, one would need to * recursively call this function on @a. Or use * g_unichar_fully_decompose(). * * See * [UAX#15](http://unicode.org/reports/tr15/) * for details. * * Params: * ch = a Unicode character * a = return location for the first component of @ch * b = return location for the second component of @ch * * Returns: %TRUE if the character could be decomposed * * Since: 2.30 */ public static bool unicharDecompose(dchar ch, dchar* a, dchar* b) { return g_unichar_decompose(ch, a, b) != 0; } /** * Determines the numeric value of a character as a decimal * digit. * * Params: * c = a Unicode character * * Returns: If @c is a decimal digit (according to * g_unichar_isdigit()), its numeric value. Otherwise, -1. */ public static int unicharDigitValue(dchar c) { return g_unichar_digit_value(c); } /** * Computes the canonical or compatibility decomposition of a * Unicode character. For compatibility decomposition, * pass %TRUE for @compat; for canonical decomposition * pass %FALSE for @compat. * * The decomposed sequence is placed in @result. Only up to * @result_len characters are written into @result. The length * of the full decomposition (irrespective of @result_len) is * returned by the function. For canonical decomposition, * currently all decompositions are of length at most 4, but * this may change in the future (very unlikely though). * At any rate, Unicode does guarantee that a buffer of length * 18 is always enough for both compatibility and canonical * decompositions, so that is the size recommended. This is provided * as %G_UNICHAR_MAX_DECOMPOSITION_LENGTH. * * See * [UAX#15](http://unicode.org/reports/tr15/) * for details. * * Params: * ch = a Unicode character. * compat = whether perform canonical or compatibility decomposition * result = location to store decomposed result, or %NULL * resultLen = length of @result * * Returns: the length of the full decomposition. * * Since: 2.30 */ public static size_t unicharFullyDecompose(dchar ch, bool compat, dchar* result, size_t resultLen) { return g_unichar_fully_decompose(ch, compat, result, resultLen); } /** * In Unicode, some characters are "mirrored". This means that their * images are mirrored horizontally in text that is laid out from right * to left. For instance, "(" would become its mirror image, ")", in * right-to-left text. * * If @ch has the Unicode mirrored property and there is another unicode * character that typically has a glyph that is the mirror image of @ch's * glyph and @mirrored_ch is set, it puts that character in the address * pointed to by @mirrored_ch. Otherwise the original character is put. * * Params: * ch = a Unicode character * mirroredCh = location to store the mirrored character * * Returns: %TRUE if @ch has a mirrored character, %FALSE otherwise * * Since: 2.4 */ public static bool unicharGetMirrorChar(dchar ch, dchar* mirroredCh) { return g_unichar_get_mirror_char(ch, mirroredCh) != 0; } /** * Looks up the #GUnicodeScript for a particular character (as defined * by Unicode Standard Annex \#24). No check is made for @ch being a * valid Unicode character; if you pass in invalid character, the * result is undefined. * * This function is equivalent to pango_script_for_unichar() and the * two are interchangeable. * * Params: * ch = a Unicode character * * Returns: the #GUnicodeScript for the character. * * Since: 2.14 */ public static GUnicodeScript unicharGetScript(dchar ch) { return g_unichar_get_script(ch); } /** * Determines whether a character is alphanumeric. * Given some UTF-8 text, obtain a character value * with g_utf8_get_char(). * * Params: * c = a Unicode character * * Returns: %TRUE if @c is an alphanumeric character */ public static bool unicharIsalnum(dchar c) { return g_unichar_isalnum(c) != 0; } /** * Determines whether a character is alphabetic (i.e. a letter). * Given some UTF-8 text, obtain a character value with * g_utf8_get_char(). * * Params: * c = a Unicode character * * Returns: %TRUE if @c is an alphabetic character */ public static bool unicharIsalpha(dchar c) { return g_unichar_isalpha(c) != 0; } /** * Determines whether a character is a control character. * Given some UTF-8 text, obtain a character value with * g_utf8_get_char(). * * Params: * c = a Unicode character * * Returns: %TRUE if @c is a control character */ public static bool unicharIscntrl(dchar c) { return g_unichar_iscntrl(c) != 0; } /** * Determines if a given character is assigned in the Unicode * standard. * * Params: * c = a Unicode character * * Returns: %TRUE if the character has an assigned value */ public static bool unicharIsdefined(dchar c) { return g_unichar_isdefined(c) != 0; } /** * Determines whether a character is numeric (i.e. a digit). This * covers ASCII 0-9 and also digits in other languages/scripts. Given * some UTF-8 text, obtain a character value with g_utf8_get_char(). * * Params: * c = a Unicode character * * Returns: %TRUE if @c is a digit */ public static bool unicharIsdigit(dchar c) { return g_unichar_isdigit(c) != 0; } /** * Determines whether a character is printable and not a space * (returns %FALSE for control characters, format characters, and * spaces). g_unichar_isprint() is similar, but returns %TRUE for * spaces. Given some UTF-8 text, obtain a character value with * g_utf8_get_char(). * * Params: * c = a Unicode character * * Returns: %TRUE if @c is printable unless it's a space */ public static bool unicharIsgraph(dchar c) { return g_unichar_isgraph(c) != 0; } /** * Determines whether a character is a lowercase letter. * Given some UTF-8 text, obtain a character value with * g_utf8_get_char(). * * Params: * c = a Unicode character * * Returns: %TRUE if @c is a lowercase letter */ public static bool unicharIslower(dchar c) { return g_unichar_islower(c) != 0; } /** * Determines whether a character is a mark (non-spacing mark, * combining mark, or enclosing mark in Unicode speak). * Given some UTF-8 text, obtain a character value * with g_utf8_get_char(). * * Note: in most cases where isalpha characters are allowed, * ismark characters should be allowed to as they are essential * for writing most European languages as well as many non-Latin * scripts. * * Params: * c = a Unicode character * * Returns: %TRUE if @c is a mark character * * Since: 2.14 */ public static bool unicharIsmark(dchar c) { return g_unichar_ismark(c) != 0; } /** * Determines whether a character is printable. * Unlike g_unichar_isgraph(), returns %TRUE for spaces. * Given some UTF-8 text, obtain a character value with * g_utf8_get_char(). * * Params: * c = a Unicode character * * Returns: %TRUE if @c is printable */ public static bool unicharIsprint(dchar c) { return g_unichar_isprint(c) != 0; } /** * Determines whether a character is punctuation or a symbol. * Given some UTF-8 text, obtain a character value with * g_utf8_get_char(). * * Params: * c = a Unicode character * * Returns: %TRUE if @c is a punctuation or symbol character */ public static bool unicharIspunct(dchar c) { return g_unichar_ispunct(c) != 0; } /** * Determines whether a character is a space, tab, or line separator * (newline, carriage return, etc.). Given some UTF-8 text, obtain a * character value with g_utf8_get_char(). * * (Note: don't use this to do word breaking; you have to use * Pango or equivalent to get word breaking right, the algorithm * is fairly complex.) * * Params: * c = a Unicode character * * Returns: %TRUE if @c is a space character */ public static bool unicharIsspace(dchar c) { return g_unichar_isspace(c) != 0; } /** * Determines if a character is titlecase. Some characters in * Unicode which are composites, such as the DZ digraph * have three case variants instead of just two. The titlecase * form is used at the beginning of a word where only the * first letter is capitalized. The titlecase form of the DZ * digraph is U+01F2 LATIN CAPITAL LETTTER D WITH SMALL LETTER Z. * * Params: * c = a Unicode character * * Returns: %TRUE if the character is titlecase */ public static bool unicharIstitle(dchar c) { return g_unichar_istitle(c) != 0; } /** * Determines if a character is uppercase. * * Params: * c = a Unicode character * * Returns: %TRUE if @c is an uppercase character */ public static bool unicharIsupper(dchar c) { return g_unichar_isupper(c) != 0; } /** * Determines if a character is typically rendered in a double-width * cell. * * Params: * c = a Unicode character * * Returns: %TRUE if the character is wide */ public static bool unicharIswide(dchar c) { return g_unichar_iswide(c) != 0; } /** * Determines if a character is typically rendered in a double-width * cell under legacy East Asian locales. If a character is wide according to * g_unichar_iswide(), then it is also reported wide with this function, but * the converse is not necessarily true. See the * [Unicode Standard Annex #11](http://www.unicode.org/reports/tr11/) * for details. * * If a character passes the g_unichar_iswide() test then it will also pass * this test, but not the other way around. Note that some characters may * pass both this test and g_unichar_iszerowidth(). * * Params: * c = a Unicode character * * Returns: %TRUE if the character is wide in legacy East Asian locales * * Since: 2.12 */ public static bool unicharIswideCjk(dchar c) { return g_unichar_iswide_cjk(c) != 0; } /** * Determines if a character is a hexidecimal digit. * * Params: * c = a Unicode character. * * Returns: %TRUE if the character is a hexadecimal digit */ public static bool unicharIsxdigit(dchar c) { return g_unichar_isxdigit(c) != 0; } /** * Determines if a given character typically takes zero width when rendered. * The return value is %TRUE for all non-spacing and enclosing marks * (e.g., combining accents), format characters, zero-width * space, but not U+00AD SOFT HYPHEN. * * A typical use of this function is with one of g_unichar_iswide() or * g_unichar_iswide_cjk() to determine the number of cells a string occupies * when displayed on a grid display (terminals). However, note that not all * terminals support zero-width rendering of zero-width marks. * * Params: * c = a Unicode character * * Returns: %TRUE if the character has zero width * * Since: 2.14 */ public static bool unicharIszerowidth(dchar c) { return g_unichar_iszerowidth(c) != 0; } /** * Converts a single character to UTF-8. * * Params: * c = a Unicode character code * outbuf = output buffer, must have at * least 6 bytes of space. If %NULL, the length will be computed and * returned and nothing will be written to @outbuf. * * Returns: number of bytes written */ public static int unicharToUtf8(dchar c, out char[] outbuf) { return g_unichar_to_utf8(c, outbuf.ptr); } /** * Converts a character to lower case. * * Params: * c = a Unicode character. * * Returns: the result of converting @c to lower case. * If @c is not an upperlower or titlecase character, * or has no lowercase equivalent @c is returned unchanged. */ public static dchar unicharTolower(dchar c) { return g_unichar_tolower(c); } /** * Converts a character to the titlecase. * * Params: * c = a Unicode character * * Returns: the result of converting @c to titlecase. * If @c is not an uppercase or lowercase character, * @c is returned unchanged. */ public static dchar unicharTotitle(dchar c) { return g_unichar_totitle(c); } /** * Converts a character to uppercase. * * Params: * c = a Unicode character * * Returns: the result of converting @c to uppercase. * If @c is not an lowercase or titlecase character, * or has no upper case equivalent @c is returned unchanged. */ public static dchar unicharToupper(dchar c) { return g_unichar_toupper(c); } /** * Classifies a Unicode character by type. * * Params: * c = a Unicode character * * Returns: the type of the character. */ public static GUnicodeType unicharType(dchar c) { return g_unichar_type(c); } /** * Checks whether @ch is a valid Unicode character. Some possible * integer values of @ch will not be valid. 0 is considered a valid * character, though it's normally a string terminator. * * Params: * ch = a Unicode character * * Returns: %TRUE if @ch is a valid Unicode character */ public static bool unicharValidate(dchar ch) { return g_unichar_validate(ch) != 0; } /** * Determines the numeric value of a character as a hexidecimal * digit. * * Params: * c = a Unicode character * * Returns: If @c is a hex digit (according to * g_unichar_isxdigit()), its numeric value. Otherwise, -1. */ public static int unicharXdigitValue(dchar c) { return g_unichar_xdigit_value(c); } /** * Computes the canonical decomposition of a Unicode character. * * Deprecated: Use the more flexible g_unichar_fully_decompose() * instead. * * Params: * ch = a Unicode character. * resultLen = location to store the length of the return value. * * Returns: a newly allocated string of Unicode characters. * @result_len is set to the resulting length of the string. */ public static dchar* unicodeCanonicalDecomposition(dchar ch, size_t* resultLen) { return g_unicode_canonical_decomposition(ch, resultLen); } /** * Computes the canonical ordering of a string in-place. * This rearranges decomposed characters in the string * according to their combining classes. See the Unicode * manual for more information. * * Params: * str = a UCS-4 encoded string. * len = the maximum length of @string to use. */ public static void unicodeCanonicalOrdering(dchar* str, size_t len) { g_unicode_canonical_ordering(str, len); } /** * Looks up the Unicode script for @iso15924. ISO 15924 assigns four-letter * codes to scripts. For example, the code for Arabic is 'Arab'. * This function accepts four letter codes encoded as a @guint32 in a * big-endian fashion. That is, the code expected for Arabic is * 0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc). * * See * [Codes for the representation of names of scripts](http://unicode.org/iso15924/codelists.html) * for details. * * Params: * iso15924 = a Unicode script * * Returns: the Unicode script for @iso15924, or * of %G_UNICODE_SCRIPT_INVALID_CODE if @iso15924 is zero and * %G_UNICODE_SCRIPT_UNKNOWN if @iso15924 is unknown. * * Since: 2.30 */ public static GUnicodeScript unicodeScriptFromIso15924(uint iso15924) { return g_unicode_script_from_iso15924(iso15924); } /** * Looks up the ISO 15924 code for @script. ISO 15924 assigns four-letter * codes to scripts. For example, the code for Arabic is 'Arab'. The * four letter codes are encoded as a @guint32 by this function in a * big-endian fashion. That is, the code returned for Arabic is * 0x41726162 (0x41 is ASCII code for 'A', 0x72 is ASCII code for 'r', etc). * * See * [Codes for the representation of names of scripts](http://unicode.org/iso15924/codelists.html) * for details. * * Params: * script = a Unicode script * * Returns: the ISO 15924 code for @script, encoded as an integer, * of zero if @script is %G_UNICODE_SCRIPT_INVALID_CODE or * ISO 15924 code 'Zzzz' (script code for UNKNOWN) if @script is not understood. * * Since: 2.30 */ public static uint unicodeScriptToIso15924(GUnicodeScript script) { return g_unicode_script_to_iso15924(script); } /** * Convert a string from UTF-16 to UCS-4. The result will be * nul-terminated. * * Params: * str = a UTF-16 encoded string * len = the maximum length (number of #gunichar2) of @str to use. * If @len < 0, then the string is nul-terminated. * itemsRead = location to store number of * words read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will * be returned in case @str contains a trailing partial character. If * an error occurs then the index of the invalid input is stored here. * itemsWritten = location to store number * of characters written, or %NULL. The value stored here does not include * the trailing 0 character. * * Returns: a pointer to a newly allocated UCS-4 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. * * Throws: GException on failure. */ public static dchar* utf16ToUcs4(wchar* str, glong len, out glong itemsRead, out glong itemsWritten) { GError* err = null; auto p = g_utf16_to_ucs4(str, len, &itemsRead, &itemsWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Convert a string from UTF-16 to UTF-8. The result will be * terminated with a 0 byte. * * Note that the input is expected to be already in native endianness, * an initial byte-order-mark character is not handled specially. * g_convert() can be used to convert a byte buffer of UTF-16 data of * ambiguous endianess. * * Further note that this function does not validate the result * string; it may e.g. include embedded NUL characters. The only * validation done by this function is to ensure that the input can * be correctly interpreted as UTF-16, i.e. it doesn't contain * things unpaired surrogates. * * Params: * str = a UTF-16 encoded string * len = the maximum length (number of #gunichar2) of @str to use. * If @len < 0, then the string is nul-terminated. * itemsRead = location to store number of * words read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will * be returned in case @str contains a trailing partial character. If * an error occurs then the index of the invalid input is stored here. * itemsWritten = location to store number * of bytes written, or %NULL. The value stored here does not include the * trailing 0 byte. * * Returns: a pointer to a newly allocated UTF-8 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. * * Throws: GException on failure. */ public static string utf16ToUtf8(wchar* str, glong len, out glong itemsRead, out glong itemsWritten) { GError* err = null; auto retStr = g_utf16_to_utf8(str, len, &itemsRead, &itemsWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a string into a form that is independent of case. The * result will not correspond to any particular case, but can be * compared for equality or ordered with the results of calling * g_utf8_casefold() on other strings. * * Note that calling g_utf8_casefold() followed by g_utf8_collate() is * only an approximation to the correct linguistic case insensitive * ordering, though it is a fairly good one. Getting this exactly * right would require a more sophisticated collation function that * takes case sensitivity into account. GLib does not currently * provide such a function. * * Params: * str = a UTF-8 encoded string * len = length of @str, in bytes, or -1 if @str is nul-terminated. * * Returns: a newly allocated string, that is a * case independent form of @str. */ public static string utf8Casefold(string str, ptrdiff_t len) { auto retStr = g_utf8_casefold(Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Compares two strings for ordering using the linguistically * correct rules for the [current locale][setlocale]. * When sorting a large number of strings, it will be significantly * faster to obtain collation keys with g_utf8_collate_key() and * compare the keys with strcmp() when sorting instead of sorting * the original strings. * * Params: * str1 = a UTF-8 encoded string * str2 = a UTF-8 encoded string * * Returns: < 0 if @str1 compares before @str2, * 0 if they compare equal, > 0 if @str1 compares after @str2. */ public static int utf8Collate(string str1, string str2) { return g_utf8_collate(Str.toStringz(str1), Str.toStringz(str2)); } /** * Converts a string into a collation key that can be compared * with other collation keys produced by the same function using * strcmp(). * * The results of comparing the collation keys of two strings * with strcmp() will always be the same as comparing the two * original keys with g_utf8_collate(). * * Note that this function depends on the [current locale][setlocale]. * * Params: * str = a UTF-8 encoded string. * len = length of @str, in bytes, or -1 if @str is nul-terminated. * * Returns: a newly allocated string. This string should * be freed with g_free() when you are done with it. */ public static string utf8CollateKey(string str, ptrdiff_t len) { auto retStr = g_utf8_collate_key(Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a string into a collation key that can be compared * with other collation keys produced by the same function using strcmp(). * * In order to sort filenames correctly, this function treats the dot '.' * as a special case. Most dictionary orderings seem to consider it * insignificant, thus producing the ordering "event.c" "eventgenerator.c" * "event.h" instead of "event.c" "event.h" "eventgenerator.c". Also, we * would like to treat numbers intelligently so that "file1" "file10" "file5" * is sorted as "file1" "file5" "file10". * * Note that this function depends on the [current locale][setlocale]. * * Params: * str = a UTF-8 encoded string. * len = length of @str, in bytes, or -1 if @str is nul-terminated. * * Returns: a newly allocated string. This string should * be freed with g_free() when you are done with it. * * Since: 2.8 */ public static string utf8CollateKeyForFilename(string str, ptrdiff_t len) { auto retStr = g_utf8_collate_key_for_filename(Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Finds the start of the next UTF-8 character in the string after @p. * * @p does not have to be at the beginning of a UTF-8 character. No check * is made to see if the character found is actually valid other than * it starts with an appropriate byte. * * If @end is %NULL, the return value will never be %NULL: if the end of the * string is reached, a pointer to the terminating nul byte is returned. If * @end is non-%NULL, the return value will be %NULL if the end of the string * is reached. * * Params: * p = a pointer to a position within a UTF-8 encoded string * end = a pointer to the byte following the end of the string, * or %NULL to indicate that the string is nul-terminated * * Returns: a pointer to the found character or %NULL if @end is * set and is reached */ public static string utf8FindNextChar(string p, string end) { auto retStr = g_utf8_find_next_char(Str.toStringz(p), Str.toStringz(end)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Given a position @p with a UTF-8 encoded string @str, find the start * of the previous UTF-8 character starting before @p. Returns %NULL if no * UTF-8 characters are present in @str before @p. * * @p does not have to be at the beginning of a UTF-8 character. No check * is made to see if the character found is actually valid other than * it starts with an appropriate byte. * * Params: * str = pointer to the beginning of a UTF-8 encoded string * p = pointer to some position within @str * * Returns: a pointer to the found character or %NULL. */ public static string utf8FindPrevChar(string str, string p) { auto retStr = g_utf8_find_prev_char(Str.toStringz(str), Str.toStringz(p)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts a sequence of bytes encoded as UTF-8 to a Unicode character. * * If @p does not point to a valid UTF-8 encoded character, results * are undefined. If you are not sure that the bytes are complete * valid Unicode characters, you should use g_utf8_get_char_validated() * instead. * * Params: * p = a pointer to Unicode character encoded as UTF-8 * * Returns: the resulting character */ public static dchar utf8GetChar(string p) { return g_utf8_get_char(Str.toStringz(p)); } /** * Convert a sequence of bytes encoded as UTF-8 to a Unicode character. * This function checks for incomplete characters, for invalid characters * such as characters that are out of the range of Unicode, and for * overlong encodings of valid characters. * * Note that g_utf8_get_char_validated() returns (gunichar)-2 if * @max_len is positive and any of the bytes in the first UTF-8 character * sequence are nul. * * Params: * p = a pointer to Unicode character encoded as UTF-8 * maxLen = the maximum number of bytes to read, or -1 if @p is nul-terminated * * Returns: the resulting character. If @p points to a partial * sequence at the end of a string that could begin a valid * character (or if @max_len is zero), returns (gunichar)-2; * otherwise, if @p does not point to a valid UTF-8 encoded * Unicode character, returns (gunichar)-1. */ public static dchar utf8GetCharValidated(string p, ptrdiff_t maxLen) { return g_utf8_get_char_validated(Str.toStringz(p), maxLen); } /** * Converts a string into canonical form, standardizing * such issues as whether a character with an accent * is represented as a base character and combining * accent or as a single precomposed character. The * string has to be valid UTF-8, otherwise %NULL is * returned. You should generally call g_utf8_normalize() * before comparing two Unicode strings. * * The normalization mode %G_NORMALIZE_DEFAULT only * standardizes differences that do not affect the * text content, such as the above-mentioned accent * representation. %G_NORMALIZE_ALL also standardizes * the "compatibility" characters in Unicode, such * as SUPERSCRIPT THREE to the standard forms * (in this case DIGIT THREE). Formatting information * may be lost but for most text operations such * characters should be considered the same. * * %G_NORMALIZE_DEFAULT_COMPOSE and %G_NORMALIZE_ALL_COMPOSE * are like %G_NORMALIZE_DEFAULT and %G_NORMALIZE_ALL, * but returned a result with composed forms rather * than a maximally decomposed form. This is often * useful if you intend to convert the string to * a legacy encoding or pass it to a system with * less capable Unicode handling. * * Params: * str = a UTF-8 encoded string. * len = length of @str, in bytes, or -1 if @str is nul-terminated. * mode = the type of normalization to perform. * * Returns: a newly allocated string, that is the * normalized form of @str, or %NULL if @str is not * valid UTF-8. */ public static string utf8Normalize(string str, ptrdiff_t len, GNormalizeMode mode) { auto retStr = g_utf8_normalize(Str.toStringz(str), len, mode); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts from an integer character offset to a pointer to a position * within the string. * * Since 2.10, this function allows to pass a negative @offset to * step backwards. It is usually worth stepping backwards from the end * instead of forwards if @offset is in the last fourth of the string, * since moving forward is about 3 times faster than moving backward. * * Note that this function doesn't abort when reaching the end of @str. * Therefore you should be sure that @offset is within string boundaries * before calling that function. Call g_utf8_strlen() when unsure. * This limitation exists as this function is called frequently during * text rendering and therefore has to be as fast as possible. * * Params: * str = a UTF-8 encoded string * offset = a character offset within @str * * Returns: the resulting pointer */ public static string utf8OffsetToPointer(string str, glong offset) { auto retStr = g_utf8_offset_to_pointer(Str.toStringz(str), offset); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts from a pointer to position within a string to a integer * character offset. * * Since 2.10, this function allows @pos to be before @str, and returns * a negative offset in this case. * * Params: * str = a UTF-8 encoded string * pos = a pointer to a position within @str * * Returns: the resulting character offset */ public static glong utf8PointerToOffset(string str, string pos) { return g_utf8_pointer_to_offset(Str.toStringz(str), Str.toStringz(pos)); } /** * Finds the previous UTF-8 character in the string before @p. * * @p does not have to be at the beginning of a UTF-8 character. No check * is made to see if the character found is actually valid other than * it starts with an appropriate byte. If @p might be the first * character of the string, you must use g_utf8_find_prev_char() instead. * * Params: * p = a pointer to a position within a UTF-8 encoded string * * Returns: a pointer to the found character */ public static string utf8PrevChar(string p) { auto retStr = g_utf8_prev_char(Str.toStringz(p)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Finds the leftmost occurrence of the given Unicode character * in a UTF-8 encoded string, while limiting the search to @len bytes. * If @len is -1, allow unbounded search. * * Params: * p = a nul-terminated UTF-8 encoded string * len = the maximum length of @p * c = a Unicode character * * Returns: %NULL if the string does not contain the character, * otherwise, a pointer to the start of the leftmost occurrence * of the character in the string. */ public static string utf8Strchr(string p, ptrdiff_t len, dchar c) { auto retStr = g_utf8_strchr(Str.toStringz(p), len, c); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts all Unicode characters in the string that have a case * to lowercase. The exact manner that this is done depends * on the current locale, and may result in the number of * characters in the string changing. * * Params: * str = a UTF-8 encoded string * len = length of @str, in bytes, or -1 if @str is nul-terminated. * * Returns: a newly allocated string, with all characters * converted to lowercase. */ public static string utf8Strdown(string str, ptrdiff_t len) { auto retStr = g_utf8_strdown(Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Computes the length of the string in characters, not including * the terminating nul character. If the @max'th byte falls in the * middle of a character, the last (partial) character is not counted. * * Params: * p = pointer to the start of a UTF-8 encoded string * max = the maximum number of bytes to examine. If @max * is less than 0, then the string is assumed to be * nul-terminated. If @max is 0, @p will not be examined and * may be %NULL. If @max is greater than 0, up to @max * bytes are examined * * Returns: the length of the string in characters */ public static glong utf8Strlen(string p, ptrdiff_t max) { return g_utf8_strlen(Str.toStringz(p), max); } /** * Like the standard C strncpy() function, but copies a given number * of characters instead of a given number of bytes. The @src string * must be valid UTF-8 encoded text. (Use g_utf8_validate() on all * text before trying to use UTF-8 utility functions with it.) * * Params: * dest = buffer to fill with characters from @src * src = UTF-8 encoded string * n = character count * * Returns: @dest */ public static string utf8Strncpy(string dest, string src, size_t n) { auto retStr = g_utf8_strncpy(Str.toStringz(dest), Str.toStringz(src), n); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Find the rightmost occurrence of the given Unicode character * in a UTF-8 encoded string, while limiting the search to @len bytes. * If @len is -1, allow unbounded search. * * Params: * p = a nul-terminated UTF-8 encoded string * len = the maximum length of @p * c = a Unicode character * * Returns: %NULL if the string does not contain the character, * otherwise, a pointer to the start of the rightmost occurrence * of the character in the string. */ public static string utf8Strrchr(string p, ptrdiff_t len, dchar c) { auto retStr = g_utf8_strrchr(Str.toStringz(p), len, c); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Reverses a UTF-8 string. @str must be valid UTF-8 encoded text. * (Use g_utf8_validate() on all text before trying to use UTF-8 * utility functions with it.) * * This function is intended for programmatic uses of reversed strings. * It pays no attention to decomposed characters, combining marks, byte * order marks, directional indicators (LRM, LRO, etc) and similar * characters which might need special handling when reversing a string * for display purposes. * * Note that unlike g_strreverse(), this function returns * newly-allocated memory, which should be freed with g_free() when * no longer needed. * * Params: * str = a UTF-8 encoded string * len = the maximum length of @str to use, in bytes. If @len < 0, * then the string is nul-terminated. * * Returns: a newly-allocated string which is the reverse of @str * * Since: 2.2 */ public static string utf8Strreverse(string str, ptrdiff_t len) { auto retStr = g_utf8_strreverse(Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts all Unicode characters in the string that have a case * to uppercase. The exact manner that this is done depends * on the current locale, and may result in the number of * characters in the string increasing. (For instance, the * German ess-zet will be changed to SS.) * * Params: * str = a UTF-8 encoded string * len = length of @str, in bytes, or -1 if @str is nul-terminated. * * Returns: a newly allocated string, with all characters * converted to uppercase. */ public static string utf8Strup(string str, ptrdiff_t len) { auto retStr = g_utf8_strup(Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Copies a substring out of a UTF-8 encoded string. * The substring will contain @end_pos - @start_pos characters. * * Params: * str = a UTF-8 encoded string * startPos = a character offset within @str * endPos = another character offset within @str * * Returns: a newly allocated copy of the requested * substring. Free with g_free() when no longer needed. * * Since: 2.30 */ public static string utf8Substring(string str, glong startPos, glong endPos) { auto retStr = g_utf8_substring(Str.toStringz(str), startPos, endPos); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Convert a string from UTF-8 to a 32-bit fixed width * representation as UCS-4. A trailing 0 character will be added to the * string after the converted text. * * Params: * str = a UTF-8 encoded string * len = the maximum length of @str to use, in bytes. If @len < 0, * then the string is nul-terminated. * itemsRead = location to store number of * bytes read, or %NULL. * If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be * returned in case @str contains a trailing partial * character. If an error occurs then the index of the * invalid input is stored here. * itemsWritten = location to store number * of characters written or %NULL. The value here stored does not include * the trailing 0 character. * * Returns: a pointer to a newly allocated UCS-4 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. * * Throws: GException on failure. */ public static dchar* utf8ToUcs4(string str, glong len, out glong itemsRead, out glong itemsWritten) { GError* err = null; auto p = g_utf8_to_ucs4(Str.toStringz(str), len, &itemsRead, &itemsWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Convert a string from UTF-8 to a 32-bit fixed width * representation as UCS-4, assuming valid UTF-8 input. * This function is roughly twice as fast as g_utf8_to_ucs4() * but does no error checking on the input. A trailing 0 character * will be added to the string after the converted text. * * Params: * str = a UTF-8 encoded string * len = the maximum length of @str to use, in bytes. If @len < 0, * then the string is nul-terminated. * itemsWritten = location to store the * number of characters in the result, or %NULL. * * Returns: a pointer to a newly allocated UCS-4 string. * This value must be freed with g_free(). */ public static dchar* utf8ToUcs4Fast(string str, glong len, out glong itemsWritten) { return g_utf8_to_ucs4_fast(Str.toStringz(str), len, &itemsWritten); } /** * Convert a string from UTF-8 to UTF-16. A 0 character will be * added to the result after the converted text. * * Params: * str = a UTF-8 encoded string * len = the maximum length (number of bytes) of @str to use. * If @len < 0, then the string is nul-terminated. * itemsRead = location to store number of * bytes read, or %NULL. If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will * be returned in case @str contains a trailing partial character. If * an error occurs then the index of the invalid input is stored here. * itemsWritten = location to store number * of #gunichar2 written, or %NULL. The value stored here does not include * the trailing 0. * * Returns: a pointer to a newly allocated UTF-16 string. * This value must be freed with g_free(). If an error occurs, * %NULL will be returned and @error set. * * Throws: GException on failure. */ public static wchar* utf8ToUtf16(string str, glong len, out glong itemsRead, out glong itemsWritten) { GError* err = null; auto p = g_utf8_to_utf16(Str.toStringz(str), len, &itemsRead, &itemsWritten, &err); if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Validates UTF-8 encoded text. @str is the text to validate; * if @str is nul-terminated, then @max_len can be -1, otherwise * @max_len should be the number of bytes to validate. * If @end is non-%NULL, then the end of the valid range * will be stored there (i.e. the start of the first invalid * character if some bytes were invalid, or the end of the text * being validated otherwise). * * Note that g_utf8_validate() returns %FALSE if @max_len is * positive and any of the @max_len bytes are nul. * * Returns %TRUE if all of @str was valid. Many GLib and GTK+ * routines require valid UTF-8 as input; so data read from a file * or the network should be checked with g_utf8_validate() before * doing anything else with it. * * Params: * str = a pointer to character data * end = return location for end of valid data * * Returns: %TRUE if the text was valid UTF-8 */ public static bool utf8Validate(string str, out string end) { char* outend = null; auto p = g_utf8_validate(Str.toStringz(str), cast(ptrdiff_t)str.length, &outend) != 0; end = Str.toString(outend); return p; } /** * If the provided string is valid UTF-8, return a copy of it. If not, * return a copy in which bytes that could not be interpreted as valid Unicode * are replaced with the Unicode replacement character (U+FFFD). * * For example, this is an appropriate function to use if you have received * a string that was incorrectly declared to be UTF-8, and you need a valid * UTF-8 version of it that can be logged or displayed to the user, with the * assumption that it is close enough to ASCII or UTF-8 to be mostly * readable as-is. * * Params: * str = string to coerce into UTF-8 * len = the maximum length of @str to use, in bytes. If @len < 0, * then the string is nul-terminated. * * Returns: a valid UTF-8 string whose content resembles @str * * Since: 2.52 */ public static string utf8MakeValid(string str, ptrdiff_t len) { auto retStr = g_utf8_make_valid(Str.toStringz(str), len); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/glib/UnixUtils.d000066400000000000000000000176561324604450400203150ustar00rootroot00000000000000/* * 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 glib.UnixUtils; private import glib.ErrorG; private import glib.GException; private import glib.Source; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct UnixUtils { /** */ public static GQuark errorQuark() { return g_unix_error_quark(); } /** * Sets a function to be called when the IO condition, as specified by * @condition becomes true for @fd. * * @function will be called when the specified IO condition becomes * %TRUE. The function is expected to clear whatever event caused the * IO condition to become true and return %TRUE in order to be notified * when it happens again. If @function returns %FALSE then the watch * will be cancelled. * * The return value of this function can be passed to g_source_remove() * to cancel the watch at any time that it exists. * * The source will never close the fd -- you must do it yourself. * * Params: * fd = a file descriptor * condition = IO conditions to watch for on @fd * funct = a #GPollFDFunc * userData = data to pass to @function * * Returns: the ID (greater than 0) of the event source * * Since: 2.36 */ public static uint fdAdd(int fd, GIOCondition condition, GUnixFDSourceFunc funct, void* userData) { return g_unix_fd_add(fd, condition, funct, userData); } /** * Sets a function to be called when the IO condition, as specified by * @condition becomes true for @fd. * * This is the same as g_unix_fd_add(), except that it allows you to * specify a non-default priority and a provide a #GDestroyNotify for * @user_data. * * Params: * priority = the priority of the source * fd = a file descriptor * condition = IO conditions to watch for on @fd * funct = a #GUnixFDSourceFunc * userData = data to pass to @function * notify = function to call when the idle is removed, or %NULL * * Returns: the ID (greater than 0) of the event source * * Since: 2.36 */ public static uint fdAddFull(int priority, int fd, GIOCondition condition, GUnixFDSourceFunc funct, void* userData, GDestroyNotify notify) { return g_unix_fd_add_full(priority, fd, condition, funct, userData, notify); } /** * Creates a #GSource to watch for a particular IO condition on a file * descriptor. * * The source will never close the fd -- you must do it yourself. * * Params: * fd = a file descriptor * condition = IO conditions to watch for on @fd * * Returns: the newly created #GSource * * Since: 2.36 */ public static Source fdSourceNew(int fd, GIOCondition condition) { auto p = g_unix_fd_source_new(fd, condition); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } /** * Similar to the UNIX pipe() call, but on modern systems like Linux * uses the pipe2() system call, which atomically creates a pipe with * the configured flags. The only supported flag currently is * %FD_CLOEXEC. If for example you want to configure %O_NONBLOCK, that * must still be done separately with fcntl(). * * This function does not take %O_CLOEXEC, it takes %FD_CLOEXEC as if * for fcntl(); these are different on Linux/glibc. * * Params: * fds = Array of two integers * flags = Bitfield of file descriptor flags, as for fcntl() * * Returns: %TRUE on success, %FALSE if not (and errno will be set). * * Since: 2.30 * * Throws: GException on failure. */ public static bool openPipe(int* fds, int flags) { GError* err = null; auto p = g_unix_open_pipe(fds, flags, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * Control the non-blocking state of the given file descriptor, * according to @nonblock. On most systems this uses %O_NONBLOCK, but * on some older ones may use %O_NDELAY. * * Params: * fd = A file descriptor * nonblock = If %TRUE, set the descriptor to be non-blocking * * Returns: %TRUE if successful * * Since: 2.30 * * Throws: GException on failure. */ public static bool setFdNonblocking(int fd, bool nonblock) { GError* err = null; auto p = g_unix_set_fd_nonblocking(fd, nonblock, &err) != 0; if (err !is null) { throw new GException( new ErrorG(err) ); } return p; } /** * A convenience function for g_unix_signal_source_new(), which * attaches to the default #GMainContext. You can remove the watch * using g_source_remove(). * * Params: * signum = Signal number * handler = Callback * userData = Data for @handler * * Returns: An ID (greater than 0) for the event source * * Since: 2.30 */ public static uint signalAdd(int signum, GSourceFunc handler, void* userData) { return g_unix_signal_add(signum, handler, userData); } /** * A convenience function for g_unix_signal_source_new(), which * attaches to the default #GMainContext. You can remove the watch * using g_source_remove(). * * Params: * priority = the priority of the signal source. Typically this will be in * the range between #G_PRIORITY_DEFAULT and #G_PRIORITY_HIGH. * signum = Signal number * handler = Callback * userData = Data for @handler * notify = #GDestroyNotify for @handler * * Returns: An ID (greater than 0) for the event source * * Since: 2.30 */ public static uint signalAddFull(int priority, int signum, GSourceFunc handler, void* userData, GDestroyNotify notify) { return g_unix_signal_add_full(priority, signum, handler, userData, notify); } /** * Create a #GSource that will be dispatched upon delivery of the UNIX * signal @signum. In GLib versions before 2.36, only `SIGHUP`, `SIGINT`, * `SIGTERM` can be monitored. In GLib 2.36, `SIGUSR1` and `SIGUSR2` * were added. In GLib 2.54, `SIGWINCH` was added. * * Note that unlike the UNIX default, all sources which have created a * watch will be dispatched, regardless of which underlying thread * invoked g_unix_signal_source_new(). * * For example, an effective use of this function is to handle `SIGTERM` * cleanly; flushing any outstanding files, and then calling * g_main_loop_quit (). It is not safe to do any of this a regular * UNIX signal handler; your handler may be invoked while malloc() or * another library function is running, causing reentrancy if you * attempt to use it from the handler. None of the GLib/GObject API * is safe against this kind of reentrancy. * * The interaction of this source when combined with native UNIX * functions like sigprocmask() is not defined. * * The source will not initially be associated with any #GMainContext * and must be added to one with g_source_attach() before it will be * executed. * * Params: * signum = A signal number * * Returns: A newly created #GSource * * Since: 2.30 */ public static Source signalSourceNew(int signum) { auto p = g_unix_signal_source_new(signum); if(p is null) { return null; } return new Source(cast(GSource*) p, true); } } GtkD-3.7.5/generated/gtkd/glib/Util.d000066400000000000000000001120141324604450400172460ustar00rootroot00000000000000/* * 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 glib.Util; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Util { /** * Behaves exactly like g_build_filename(), but takes the path elements * as a string array, instead of varargs. This function is mainly * meant for language bindings. * * Params: * args = strings containing the path elements. * * Return: a newly-allocated string that must be freed with g_free(). * * Since: 2.8 */ public static string buildFilename(string[] firstElement ... ) { return Str.toString(g_build_filenamev(Str.toStringzArray(firstElement))); } /** * Behaves exactly like g_build_path(), but takes the path elements * as a string array, instead of varargs. This function is mainly * meant for language bindings. * * Params: * separator = a string used to separator the elements of the path. * args = strings containing the path elements. * * Return: a newly-allocated string that must be freed with g_free(). * * Since: 2.8 */ public static string buildPath(string separator, string[] firstElement ... ) { return Str.toString(g_build_pathv(Str.toStringz(separator), Str.toStringzArray(firstElement))); } /** */ /** * Specifies a function to be called at normal program termination. * * Since GLib 2.8.2, on Windows g_atexit() actually is a preprocessor * macro that maps to a call to the atexit() function in the C * library. This means that in case the code that calls g_atexit(), * i.e. atexit(), is in a DLL, the function will be called when the * DLL is detached from the program. This typically makes more sense * than that the function is called when the GLib DLL is detached, * which happened earlier when g_atexit() was a function in the GLib * DLL. * * The behaviour of atexit() in the context of dynamically loaded * modules is not formally specified and varies wildly. * * On POSIX systems, calling g_atexit() (or atexit()) in a dynamically * loaded module which is unloaded before the program terminates might * well cause a crash at program exit. * * Some POSIX systems implement atexit() like Windows, and have each * dynamically loaded module maintain an own atexit chain that is * called when the module is unloaded. * * On other POSIX systems, before a dynamically loaded module is * unloaded, the registered atexit functions (if any) residing in that * module are called, regardless where the code that registered them * resided. This is presumably the most robust approach. * * As can be seen from the above, for portability it's best to avoid * calling g_atexit() (or atexit()) except in the main executable of a * program. * * Deprecated: It is best to avoid g_atexit(). * * Params: * func = the function to call on normal program termination. */ public static void atexit(GVoidFunc func) { g_atexit(func); } /** * Gets the name of the file without any leading directory * components. It returns a pointer into the given file name * string. * * Deprecated: Use g_path_get_basename() instead, but notice * that g_path_get_basename() allocates new memory for the * returned string, unlike this function which returns a pointer * into the argument. * * Params: * fileName = the name of the file * * Returns: the name of the file without any leading * directory components */ public static string basename(string fileName) { return Str.toString(g_basename(Str.toStringz(fileName))); } /** * Find the position of the first bit set in @mask, searching * from (but not including) @nth_bit upwards. Bits are numbered * from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63, * usually). To start searching from the 0th bit, set @nth_bit to -1. * * Params: * mask = a #gulong containing flags * nthBit = the index of the bit to start the search from * * Returns: the index of the first bit set which is higher than @nth_bit, or -1 * if no higher bits are set */ public static int bitNthLsf(gulong mask, int nthBit) { return g_bit_nth_lsf(mask, nthBit); } /** * Find the position of the first bit set in @mask, searching * from (but not including) @nth_bit downwards. Bits are numbered * from 0 (least significant) to sizeof(#gulong) * 8 - 1 (31 or 63, * usually). To start searching from the last bit, set @nth_bit to * -1 or GLIB_SIZEOF_LONG * 8. * * Params: * mask = a #gulong containing flags * nthBit = the index of the bit to start the search from * * Returns: the index of the first bit set which is lower than @nth_bit, or -1 * if no lower bits are set */ public static int bitNthMsf(gulong mask, int nthBit) { return g_bit_nth_msf(mask, nthBit); } /** * Gets the number of bits used to hold @number, * e.g. if @number is 4, 3 bits are needed. * * Params: * number = a #guint * * Returns: the number of bits used to hold @number */ public static uint bitStorage(gulong number) { return g_bit_storage(number); } /** * Returns the value of the environment variable @variable in the * provided list @envp. * * Params: * envp = an environment * list (eg, as returned from g_get_environ()), or %NULL * for an empty environment list * variable = the environment variable to get * * Returns: the value of the environment variable, or %NULL if * the environment variable is not set in @envp. The returned * string is owned by @envp, and will be freed if @variable is * set or unset again. * * Since: 2.32 */ public static string environGetenv(string[] envp, string variable) { return Str.toString(g_environ_getenv(Str.toStringzArray(envp), Str.toStringz(variable))); } /** * Sets the environment variable @variable in the provided list * @envp to @value. * * Params: * envp = an * environment list that can be freed using g_strfreev() (e.g., as * returned from g_get_environ()), or %NULL for an empty * environment list * variable = the environment variable to set, must not contain '=' * value = the value for to set the variable to * overwrite = whether to change the variable if it already exists * * Returns: the * updated environment list. Free it using g_strfreev(). * * Since: 2.32 */ public static string[] environSetenv(string[] envp, string variable, string value, bool overwrite) { auto retStr = g_environ_setenv(Str.toStringzArray(envp), Str.toStringz(variable), Str.toStringz(value), overwrite); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Removes the environment variable @variable from the provided * environment @envp. * * Params: * envp = an environment * list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()), * or %NULL for an empty environment list * variable = the environment variable to remove, must not contain '=' * * Returns: the * updated environment list. Free it using g_strfreev(). * * Since: 2.32 */ public static string[] environUnsetenv(string[] envp, string variable) { auto retStr = g_environ_unsetenv(Str.toStringzArray(envp), Str.toStringz(variable)); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Locates the first executable named @program in the user's path, in the * same way that execvp() would locate it. Returns an allocated string * with the absolute path name, or %NULL if the program is not found in * the path. If @program is already an absolute path, returns a copy of * @program if @program exists and is executable, and %NULL otherwise. * * On Windows, if @program does not have a file type suffix, tries * with the suffixes .exe, .cmd, .bat and .com, and the suffixes in * the `PATHEXT` environment variable. * * On Windows, it looks for the file in the same way as CreateProcess() * would. This means first in the directory where the executing * program was loaded from, then in the current directory, then in the * Windows 32-bit system directory, then in the Windows directory, and * finally in the directories in the `PATH` environment variable. If * the program is found, the return value contains the full name * including the type suffix. * * Params: * program = a program name in the GLib file name encoding * * Returns: a newly-allocated string with the absolute path, * or %NULL */ public static string findProgramInPath(string program) { auto retStr = g_find_program_in_path(Str.toStringz(program)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Formats a size (for example the size of a file) into a human readable * string. Sizes are rounded to the nearest size prefix (kB, MB, GB) * and are displayed rounded to the nearest tenth. E.g. the file size * 3292528 bytes will be converted into the string "3.2 MB". * * The prefix units base is 1000 (i.e. 1 kB is 1000 bytes). * * This string should be freed with g_free() when not needed any longer. * * See g_format_size_full() for more options about how the size might be * formatted. * * Params: * size = a size in bytes * * Returns: a newly-allocated formatted string containing a human readable * file size * * Since: 2.30 */ public static string formatSize(ulong size) { auto retStr = g_format_size(size); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Formats a size (for example the size of a file) into a human * readable string. Sizes are rounded to the nearest size prefix * (KB, MB, GB) and are displayed rounded to the nearest tenth. * E.g. the file size 3292528 bytes will be converted into the * string "3.1 MB". * * The prefix units base is 1024 (i.e. 1 KB is 1024 bytes). * * This string should be freed with g_free() when not needed any longer. * * Deprecated: This function is broken due to its use of SI * suffixes to denote IEC units. Use g_format_size() instead. * * Params: * size = a size in bytes * * Returns: a newly-allocated formatted string containing a human * readable file size * * Since: 2.16 */ public static string formatSizeForDisplay(long size) { auto retStr = g_format_size_for_display(size); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Formats a size. * * This function is similar to g_format_size() but allows for flags * that modify the output. See #GFormatSizeFlags. * * Params: * size = a size in bytes * flags = #GFormatSizeFlags to modify the output * * Returns: a newly-allocated formatted string containing a human * readable file size * * Since: 2.30 */ public static string formatSizeFull(ulong size, GFormatSizeFlags flags) { auto retStr = g_format_size_full(size, flags); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets a human-readable name for the application, as set by * g_set_application_name(). This name should be localized if * possible, and is intended for display to the user. Contrast with * g_get_prgname(), which gets a non-localized name. If * g_set_application_name() has not been called, returns the result of * g_get_prgname() (which may be %NULL if g_set_prgname() has also not * been called). * * Returns: human-readable application name. may return %NULL * * Since: 2.2 */ public static string getApplicationName() { return Str.toString(g_get_application_name()); } /** * Gets the list of environment variables for the current process. * * The list is %NULL terminated and each item in the list is of the * form 'NAME=VALUE'. * * This is equivalent to direct access to the 'environ' global variable, * except portable. * * The return value is freshly allocated and it should be freed with * g_strfreev() when it is no longer needed. * * Returns: the list of * environment variables * * Since: 2.28 */ public static string[] getEnviron() { auto retStr = g_get_environ(); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Gets the current directory. * * The returned string should be freed when no longer needed. * The encoding of the returned string is system defined. * On Windows, it is always UTF-8. * * Since GLib 2.40, this function will return the value of the "PWD" * environment variable if it is set and it happens to be the same as * the current directory. This can make a difference in the case that * the current directory is the target of a symbolic link. * * Returns: the current directory */ public static string getCurrentDir() { auto retStr = g_get_current_dir(); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the current user's home directory. * * As with most UNIX tools, this function will return the value of the * `HOME` environment variable if it is set to an existing absolute path * name, falling back to the `passwd` file in the case that it is unset. * * If the path given in `HOME` is non-absolute, does not exist, or is * not a directory, the result is undefined. * * Before version 2.36 this function would ignore the `HOME` environment * variable, taking the value from the `passwd` database instead. This was * changed to increase the compatibility of GLib with other programs (and * the XDG basedir specification) and to increase testability of programs * based on GLib (by making it easier to run them from test frameworks). * * If your program has a strong requirement for either the new or the * old behaviour (and if you don't wish to increase your GLib * dependency to ensure that the new behaviour is in effect) then you * should either directly check the `HOME` environment variable yourself * or unset it before calling any functions in GLib. * * Returns: the current user's home directory */ public static string getHomeDir() { return Str.toString(g_get_home_dir()); } /** * Return a name for the machine. * * The returned name is not necessarily a fully-qualified domain name, * or even present in DNS or some other name service at all. It need * not even be unique on your local network or site, but usually it * is. Callers should not rely on the return value having any specific * properties like uniqueness for security purposes. Even if the name * of the machine is changed while an application is running, the * return value from this function does not change. The returned * string is owned by GLib and should not be modified or freed. If no * name can be determined, a default fixed string "localhost" is * returned. * * Returns: the host name of the machine. * * Since: 2.8 */ public static string getHostName() { return Str.toString(g_get_host_name()); } /** * Gets the name of the program. This name should not be localized, * in contrast to g_get_application_name(). * * If you are using #GApplication the program name is set in * g_application_run(). In case of GDK or GTK+ it is set in * gdk_init(), which is called by gtk_init() and the * #GtkApplication::startup handler. The program name is found by * taking the last component of @argv[0]. * * Returns: the name of the program. The returned string belongs * to GLib and must not be modified or freed. */ public static string getPrgname() { return Str.toString(g_get_prgname()); } /** * Gets the real name of the user. This usually comes from the user's * entry in the `passwd` file. The encoding of the returned string is * system-defined. (On Windows, it is, however, always UTF-8.) If the * real user name cannot be determined, the string "Unknown" is * returned. * * Returns: the user's real name. */ public static string getRealName() { return Str.toString(g_get_real_name()); } /** * Returns an ordered list of base directories in which to access * system-wide configuration information. * * On UNIX platforms this is determined using the mechanisms described * in the * [XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec). * In this case the list of directories retrieved will be `XDG_CONFIG_DIRS`. * * On Windows it follows XDG Base Directory Specification if `XDG_CONFIG_DIRS` is defined. * If `XDG_CONFIG_DIRS` is undefined, the directory that contains application * data for all users is used instead. A typical path is * `C:\Documents and Settings\All Users\Application Data`. * This folder is used for application data * that is not user specific. For example, an application can store * a spell-check dictionary, a database of clip art, or a log file in the * CSIDL_COMMON_APPDATA folder. This information will not roam and is available * to anyone using the computer. * * Returns: a %NULL-terminated array of strings owned by GLib that must not be * modified or freed. * * Since: 2.6 */ public static string[] getSystemConfigDirs() { return Str.toStringArray(g_get_system_config_dirs()); } /** * Returns an ordered list of base directories in which to access * system-wide application data. * * On UNIX platforms this is determined using the mechanisms described * in the * [XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec) * In this case the list of directories retrieved will be `XDG_DATA_DIRS`. * * On Windows it follows XDG Base Directory Specification if `XDG_DATA_DIRS` is defined. * If `XDG_DATA_DIRS` is undefined, * the first elements in the list are the Application Data * and Documents folders for All Users. (These can be determined only * on Windows 2000 or later and are not present in the list on other * Windows versions.) See documentation for CSIDL_COMMON_APPDATA and * CSIDL_COMMON_DOCUMENTS. * * Then follows the "share" subfolder in the installation folder for * the package containing the DLL that calls this function, if it can * be determined. * * Finally the list contains the "share" subfolder in the installation * folder for GLib, and in the installation folder for the package the * application's .exe file belongs to. * * The installation folders above are determined by looking up the * folder where the module (DLL or EXE) in question is located. If the * folder's name is "bin", its parent is used, otherwise the folder * itself. * * Note that on Windows the returned list can vary depending on where * this function is called. * * Returns: a %NULL-terminated array of strings owned by GLib that must not be * modified or freed. * * Since: 2.6 */ public static string[] getSystemDataDirs() { return Str.toStringArray(g_get_system_data_dirs()); } /** * Gets the directory to use for temporary files. * * On UNIX, this is taken from the `TMPDIR` environment variable. * If the variable is not set, `P_tmpdir` is * used, as defined by the system C library. Failing that, a * hard-coded default of "/tmp" is returned. * * On Windows, the `TEMP` environment variable is used, with the * root directory of the Windows installation (eg: "C:\") used * as a default. * * The encoding of the returned string is system-defined. On Windows, * it is always UTF-8. The return value is never %NULL or the empty * string. * * Returns: the directory to use for temporary files. */ public static string getTmpDir() { return Str.toString(g_get_tmp_dir()); } /** * Returns a base directory in which to store non-essential, cached * data specific to particular user. * * On UNIX platforms this is determined using the mechanisms described * in the * [XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec). * In this case the directory retrieved will be `XDG_CACHE_HOME`. * * On Windows it follows XDG Base Directory Specification if `XDG_CACHE_HOME` is defined. * If `XDG_CACHE_HOME` is undefined, the directory that serves as a common * repository for temporary Internet files is used instead. A typical path is * `C:\Documents and Settings\username\Local Settings\Temporary Internet Files`. * See the [documentation for `CSIDL_INTERNET_CACHE`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_internet_cache). * * Returns: a string owned by GLib that must not be modified * or freed. * * Since: 2.6 */ public static string getUserCacheDir() { return Str.toString(g_get_user_cache_dir()); } /** * Returns a base directory in which to store user-specific application * configuration information such as user preferences and settings. * * On UNIX platforms this is determined using the mechanisms described * in the * [XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec). * In this case the directory retrieved will be `XDG_CONFIG_HOME`. * * On Windows it follows XDG Base Directory Specification if `XDG_CONFIG_HOME` is defined. * If `XDG_CONFIG_HOME` is undefined, the folder to use for local (as opposed * to roaming) application data is used instead. See the * [documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata). * Note that in this case on Windows it will be the same * as what g_get_user_data_dir() returns. * * Returns: a string owned by GLib that must not be modified * or freed. * * Since: 2.6 */ public static string getUserConfigDir() { return Str.toString(g_get_user_config_dir()); } /** * Returns a base directory in which to access application data such * as icons that is customized for a particular user. * * On UNIX platforms this is determined using the mechanisms described * in the * [XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec). * In this case the directory retrieved will be `XDG_DATA_HOME`. * * On Windows it follows XDG Base Directory Specification if `XDG_DATA_HOME` * is defined. If `XDG_DATA_HOME` is undefined, the folder to use for local (as * opposed to roaming) application data is used instead. See the * [documentation for `CSIDL_LOCAL_APPDATA`](https://msdn.microsoft.com/en-us/library/windows/desktop/bb762494%28v=vs.85%29.aspx#csidl_local_appdata). * Note that in this case on Windows it will be the same * as what g_get_user_config_dir() returns. * * Returns: a string owned by GLib that must not be modified * or freed. * * Since: 2.6 */ public static string getUserDataDir() { return Str.toString(g_get_user_data_dir()); } /** * Gets the user name of the current user. The encoding of the returned * string is system-defined. On UNIX, it might be the preferred file name * encoding, or something else, and there is no guarantee that it is even * consistent on a machine. On Windows, it is always UTF-8. * * Returns: the user name of the current user. */ public static string getUserName() { return Str.toString(g_get_user_name()); } /** * Returns a directory that is unique to the current user on the local * system. * * This is determined using the mechanisms described * in the * [XDG Base Directory Specification](http://www.freedesktop.org/Standards/basedir-spec). * This is the directory * specified in the `XDG_RUNTIME_DIR` environment variable. * In the case that this variable is not set, we return the value of * g_get_user_cache_dir(), after verifying that it exists. * * Returns: a string owned by GLib that must not be * modified or freed. * * Since: 2.28 */ public static string getUserRuntimeDir() { return Str.toString(g_get_user_runtime_dir()); } /** * Returns the full path of a special directory using its logical id. * * On UNIX this is done using the XDG special user directories. * For compatibility with existing practise, %G_USER_DIRECTORY_DESKTOP * falls back to `$HOME/Desktop` when XDG special user directories have * not been set up. * * Depending on the platform, the user might be able to change the path * of the special directory without requiring the session to restart; GLib * will not reflect any change once the special directories are loaded. * * Params: * directory = the logical id of special directory * * Returns: the path to the specified special directory, or * %NULL if the logical id was not found. The returned string is owned by * GLib and should not be modified or freed. * * Since: 2.14 */ public static string getUserSpecialDir(GUserDirectory directory) { return Str.toString(g_get_user_special_dir(directory)); } /** * Returns the value of an environment variable. * * On UNIX, the name and value are byte strings which might or might not * be in some consistent character set and encoding. On Windows, they are * in UTF-8. * On Windows, in case the environment variable's value contains * references to other environment variables, they are expanded. * * Params: * variable = the environment variable to get * * Returns: the value of the environment variable, or %NULL if * the environment variable is not found. The returned string * may be overwritten by the next call to g_getenv(), g_setenv() * or g_unsetenv(). */ public static string getenv(string variable) { return Str.toString(g_getenv(Str.toStringz(variable))); } /** * Gets the names of all variables set in the environment. * * Programs that want to be portable to Windows should typically use * this function and g_getenv() instead of using the environ array * from the C library directly. On Windows, the strings in the environ * array are in system codepage encoding, while in most of the typical * use cases for environment variables in GLib-using programs you want * the UTF-8 encoding that this function and g_getenv() provide. * * Returns: a %NULL-terminated * list of strings which must be freed with g_strfreev(). * * Since: 2.8 */ public static string[] listenv() { auto retStr = g_listenv(); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Set the pointer at the specified location to %NULL. * * Params: * nullifyLocation = the memory address of the pointer. */ public static void nullifyPointer(void** nullifyLocation) { g_nullify_pointer(nullifyLocation); } /** * Parses a string containing debugging options * into a %guint containing bit flags. This is used * within GDK and GTK+ to parse the debug options passed on the * command line or through environment variables. * * If @string is equal to "all", all flags are set. Any flags * specified along with "all" in @string are inverted; thus, * "all,foo,bar" or "foo,bar,all" sets all flags except those * corresponding to "foo" and "bar". * * If @string is equal to "help", all the available keys in @keys * are printed out to standard error. * * Params: * str = a list of debug options separated by colons, spaces, or * commas, or %NULL. * keys = pointer to an array of #GDebugKey which associate * strings with bit flags. * * Returns: the combined set of bit flags. */ public static uint parseDebugString(string str, GDebugKey[] keys) { return g_parse_debug_string(Str.toStringz(str), keys.ptr, cast(uint)keys.length); } /** * Gets the last component of the filename. * * If @file_name ends with a directory separator it gets the component * before the last slash. If @file_name consists only of directory * separators (and on Windows, possibly a drive letter), a single * separator is returned. If @file_name is empty, it gets ".". * * Params: * fileName = the name of the file * * Returns: a newly allocated string containing the last * component of the filename */ public static string pathGetBasename(string fileName) { auto retStr = g_path_get_basename(Str.toStringz(fileName)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the directory components of a file name. * * If the file name has no directory components "." is returned. * The returned string should be freed when no longer needed. * * Params: * fileName = the name of the file * * Returns: the directory components of the file */ public static string pathGetDirname(string fileName) { auto retStr = g_path_get_dirname(Str.toStringz(fileName)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Returns %TRUE if the given @file_name is an absolute file name. * Note that this is a somewhat vague concept on Windows. * * On POSIX systems, an absolute file name is well-defined. It always * starts from the single root directory. For example "/usr/local". * * On Windows, the concepts of current drive and drive-specific * current directory introduce vagueness. This function interprets as * an absolute file name one that either begins with a directory * separator such as "\Users\tml" or begins with the root on a drive, * for example "C:\Windows". The first case also includes UNC paths * such as "\\myserver\docs\foo". In all cases, either slashes or * backslashes are accepted. * * Note that a file name relative to the current drive root does not * truly specify a file uniquely over time and across processes, as * the current drive is a per-process value and can be changed. * * File names relative the current directory on some specific drive, * such as "D:foo/bar", are not interpreted as absolute by this * function, but they obviously are not relative to the normal current * directory as returned by getcwd() or g_get_current_dir() * either. Such paths should be avoided, or need to be handled using * Windows-specific code. * * Params: * fileName = a file name * * Returns: %TRUE if @file_name is absolute */ public static bool pathIsAbsolute(string fileName) { return g_path_is_absolute(Str.toStringz(fileName)) != 0; } /** * Returns a pointer into @file_name after the root component, * i.e. after the "/" in UNIX or "C:\" under Windows. If @file_name * is not an absolute path it returns %NULL. * * Params: * fileName = a file name * * Returns: a pointer into @file_name after the * root component */ public static string pathSkipRoot(string fileName) { return Str.toString(g_path_skip_root(Str.toStringz(fileName))); } /** * This is just like the standard C qsort() function, but * the comparison routine accepts a user data argument. * * This is guaranteed to be a stable sort since version 2.32. * * Params: * pbase = start of array to sort * totalElems = elements in the array * size = size of each element * compareFunc = function to compare elements * userData = data to pass to @compare_func */ public static void qsortWithData(void* pbase, int totalElems, size_t size, GCompareDataFunc compareFunc, void* userData) { g_qsort_with_data(pbase, totalElems, size, compareFunc, userData); } /** * Resets the cache used for g_get_user_special_dir(), so * that the latest on-disk version is used. Call this only * if you just changed the data on disk yourself. * * Due to threadsafety issues this may cause leaking of strings * that were previously returned from g_get_user_special_dir() * that can't be freed. We ensure to only leak the data for * the directories that actually changed value though. * * Since: 2.22 */ public static void reloadUserSpecialDirsCache() { g_reload_user_special_dirs_cache(); } /** * Sets a human-readable name for the application. This name should be * localized if possible, and is intended for display to the user. * Contrast with g_set_prgname(), which sets a non-localized name. * g_set_prgname() will be called automatically by gtk_init(), * but g_set_application_name() will not. * * Note that for thread safety reasons, this function can only * be called once. * * The application name will be used in contexts such as error messages, * or when displaying an application's name in the task list. * * Params: * applicationName = localized name of the application * * Since: 2.2 */ public static void setApplicationName(string applicationName) { g_set_application_name(Str.toStringz(applicationName)); } /** * Sets the name of the program. This name should not be localized, * in contrast to g_set_application_name(). * * If you are using #GApplication the program name is set in * g_application_run(). In case of GDK or GTK+ it is set in * gdk_init(), which is called by gtk_init() and the * #GtkApplication::startup handler. The program name is found by * taking the last component of @argv[0]. * * Note that for thread-safety reasons this function can only be called once. * * Params: * prgname = the name of the program. */ public static void setPrgname(string prgname) { g_set_prgname(Str.toStringz(prgname)); } /** * Sets an environment variable. On UNIX, both the variable's name and * value can be arbitrary byte strings, except that the variable's name * cannot contain '='. On Windows, they should be in UTF-8. * * Note that on some systems, when variables are overwritten, the memory * used for the previous variables and its value isn't reclaimed. * * You should be mindful of the fact that environment variable handling * in UNIX is not thread-safe, and your program may crash if one thread * calls g_setenv() while another thread is calling getenv(). (And note * that many functions, such as gettext(), call getenv() internally.) * This function is only safe to use at the very start of your program, * before creating any other threads (or creating objects that create * worker threads of their own). * * If you need to set up the environment for a child process, you can * use g_get_environ() to get an environment array, modify that with * g_environ_setenv() and g_environ_unsetenv(), and then pass that * array directly to execvpe(), g_spawn_async(), or the like. * * Params: * variable = the environment variable to set, must not contain '='. * value = the value for to set the variable to. * overwrite = whether to change the variable if it already exists. * * Returns: %FALSE if the environment variable couldn't be set. * * Since: 2.4 */ public static bool setenv(string variable, string value, bool overwrite) { return g_setenv(Str.toStringz(variable), Str.toStringz(value), overwrite) != 0; } /** * Gets the smallest prime number from a built-in array of primes which * is larger than @num. This is used within GLib to calculate the optimum * size of a #GHashTable. * * The built-in array of primes ranges from 11 to 13845163 such that * each prime is approximately 1.5-2 times the previous prime. * * Params: * num = a #guint * * Returns: the smallest prime number from a built-in array of primes * which is larger than @num */ public static uint spacedPrimesClosest(uint num) { return g_spaced_primes_closest(num); } /** * Removes an environment variable from the environment. * * Note that on some systems, when variables are overwritten, the * memory used for the previous variables and its value isn't reclaimed. * * You should be mindful of the fact that environment variable handling * in UNIX is not thread-safe, and your program may crash if one thread * calls g_unsetenv() while another thread is calling getenv(). (And note * that many functions, such as gettext(), call getenv() internally.) This * function is only safe to use at the very start of your program, before * creating any other threads (or creating objects that create worker * threads of their own). * * If you need to set up the environment for a child process, you can * use g_get_environ() to get an environment array, modify that with * g_environ_setenv() and g_environ_unsetenv(), and then pass that * array directly to execvpe(), g_spawn_async(), or the like. * * Params: * variable = the environment variable to remove, must not contain '=' * * Since: 2.4 */ public static void unsetenv(string variable) { g_unsetenv(Str.toStringz(variable)); } } GtkD-3.7.5/generated/gtkd/glib/Uuid.d000066400000000000000000000037011324604450400172410ustar00rootroot00000000000000/* * 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 glib.Uuid; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Uuid { /** * Parses the string @str and verify if it is a UUID. * * The function accepts the following syntax: * * - simple forms (e.g. `f81d4fae-7dec-11d0-a765-00a0c91e6bf6`) * * Note that hyphens are required within the UUID string itself, * as per the aforementioned RFC. * * Params: * str = a string representing a UUID * * Returns: %TRUE if @str is a valid UUID, %FALSE otherwise. * * Since: 2.52 */ public static bool stringIsValid(string str) { return g_uuid_string_is_valid(Str.toStringz(str)) != 0; } /** * Generates a random UUID (RFC 4122 version 4) as a string. * * Returns: A string that should be freed with g_free(). * * Since: 2.52 */ public static string stringRandom() { auto retStr = g_uuid_string_random(); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/glib/Variant.d000066400000000000000000002222431324604450400177430ustar00rootroot00000000000000/* * 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 glib.Variant; private import glib.Bytes; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.Str; private import glib.StringG; private import glib.VariantIter; private import glib.VariantType; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * #GVariant is a variant datatype; it can contain one or more values * along with information about the type of the values. * * A #GVariant may contain simple types, like an integer, or a boolean value; * or complex types, like an array of two strings, or a dictionary of key * value pairs. A #GVariant is also immutable: once it's been created neither * its type nor its content can be modified further. * * GVariant is useful whenever data needs to be serialized, for example when * sending method parameters in DBus, or when saving settings using GSettings. * * When creating a new #GVariant, you pass the data you want to store in it * along with a string representing the type of data you wish to pass to it. * * For instance, if you want to create a #GVariant holding an integer value you * can use: * * |[ * GVariant *v = g_variant_new ("u", 40); * ]| * * The string "u" in the first argument tells #GVariant that the data passed to * the constructor (40) is going to be an unsigned integer. * * More advanced examples of #GVariant in use can be found in documentation for * [GVariant format strings][gvariant-format-strings-pointers]. * * The range of possible values is determined by the type. * * The type system used by #GVariant is #GVariantType. * * #GVariant instances always have a type and a value (which are given * at construction time). The type and value of a #GVariant instance * can never change other than by the #GVariant itself being * destroyed. A #GVariant cannot contain a pointer. * * #GVariant is reference counted using g_variant_ref() and * g_variant_unref(). #GVariant also has floating reference counts -- * see g_variant_ref_sink(). * * #GVariant is completely threadsafe. A #GVariant instance can be * concurrently accessed in any way from any number of threads without * problems. * * #GVariant is heavily optimised for dealing with data in serialised * form. It works particularly well with data located in memory-mapped * files. It can perform nearly all deserialisation operations in a * small constant time, usually touching only a single memory page. * Serialised #GVariant data can also be sent over the network. * * #GVariant is largely compatible with D-Bus. Almost all types of * #GVariant instances can be sent over D-Bus. See #GVariantType for * exceptions. (However, #GVariant's serialisation format is not the same * as the serialisation format of a D-Bus message body: use #GDBusMessage, * in the gio library, for those.) * * For space-efficiency, the #GVariant serialisation format does not * automatically include the variant's length, type or endianness, * which must either be implied from context (such as knowledge that a * particular file format always contains a little-endian * %G_VARIANT_TYPE_VARIANT which occupies the whole length of the file) * or supplied out-of-band (for instance, a length, type and/or endianness * indicator could be placed at the beginning of a file, network message * or network stream). * * A #GVariant's size is limited mainly by any lower level operating * system constraints, such as the number of bits in #gsize. For * example, it is reasonable to have a 2GB file mapped into memory * with #GMappedFile, and call g_variant_new_from_data() on it. * * For convenience to C programmers, #GVariant features powerful * varargs-based value construction and destruction. This feature is * designed to be embedded in other libraries. * * There is a Python-inspired text language for describing #GVariant * values. #GVariant includes a printer for this language and a parser * with type inferencing. * * ## Memory Use * * #GVariant tries to be quite efficient with respect to memory use. * This section gives a rough idea of how much memory is used by the * current implementation. The information here is subject to change * in the future. * * The memory allocated by #GVariant can be grouped into 4 broad * purposes: memory for serialised data, memory for the type * information cache, buffer management memory and memory for the * #GVariant structure itself. * * ## Serialised Data Memory * * This is the memory that is used for storing GVariant data in * serialised form. This is what would be sent over the network or * what would end up on disk, not counting any indicator of the * endianness, or of the length or type of the top-level variant. * * The amount of memory required to store a boolean is 1 byte. 16, * 32 and 64 bit integers and double precision floating point numbers * use their "natural" size. Strings (including object path and * signature strings) are stored with a nul terminator, and as such * use the length of the string plus 1 byte. * * Maybe types use no space at all to represent the null value and * use the same amount of space (sometimes plus one byte) as the * equivalent non-maybe-typed value to represent the non-null case. * * Arrays use the amount of space required to store each of their * members, concatenated. Additionally, if the items stored in an * array are not of a fixed-size (ie: strings, other arrays, etc) * then an additional framing offset is stored for each item. The * size of this offset is either 1, 2 or 4 bytes depending on the * overall size of the container. Additionally, extra padding bytes * are added as required for alignment of child values. * * Tuples (including dictionary entries) use the amount of space * required to store each of their members, concatenated, plus one * framing offset (as per arrays) for each non-fixed-sized item in * the tuple, except for the last one. Additionally, extra padding * bytes are added as required for alignment of child values. * * Variants use the same amount of space as the item inside of the * variant, plus 1 byte, plus the length of the type string for the * item inside the variant. * * As an example, consider a dictionary mapping strings to variants. * In the case that the dictionary is empty, 0 bytes are required for * the serialisation. * * If we add an item "width" that maps to the int32 value of 500 then * we will use 4 byte to store the int32 (so 6 for the variant * containing it) and 6 bytes for the string. The variant must be * aligned to 8 after the 6 bytes of the string, so that's 2 extra * bytes. 6 (string) + 2 (padding) + 6 (variant) is 14 bytes used * for the dictionary entry. An additional 1 byte is added to the * array as a framing offset making a total of 15 bytes. * * If we add another entry, "title" that maps to a nullable string * that happens to have a value of null, then we use 0 bytes for the * null value (and 3 bytes for the variant to contain it along with * its type string) plus 6 bytes for the string. Again, we need 2 * padding bytes. That makes a total of 6 + 2 + 3 = 11 bytes. * * We now require extra padding between the two items in the array. * After the 14 bytes of the first item, that's 2 bytes required. * We now require 2 framing offsets for an extra two * bytes. 14 + 2 + 11 + 2 = 29 bytes to encode the entire two-item * dictionary. * * ## Type Information Cache * * For each GVariant type that currently exists in the program a type * information structure is kept in the type information cache. The * type information structure is required for rapid deserialisation. * * Continuing with the above example, if a #GVariant exists with the * type "a{sv}" then a type information struct will exist for * "a{sv}", "{sv}", "s", and "v". Multiple uses of the same type * will share the same type information. Additionally, all * single-digit types are stored in read-only static memory and do * not contribute to the writable memory footprint of a program using * #GVariant. * * Aside from the type information structures stored in read-only * memory, there are two forms of type information. One is used for * container types where there is a single element type: arrays and * maybe types. The other is used for container types where there * are multiple element types: tuples and dictionary entries. * * Array type info structures are 6 * sizeof (void *), plus the * memory required to store the type string itself. This means that * on 32-bit systems, the cache entry for "a{sv}" would require 30 * bytes of memory (plus malloc overhead). * * Tuple type info structures are 6 * sizeof (void *), plus 4 * * sizeof (void *) for each item in the tuple, plus the memory * required to store the type string itself. A 2-item tuple, for * example, would have a type information structure that consumed * writable memory in the size of 14 * sizeof (void *) (plus type * string) This means that on 32-bit systems, the cache entry for * "{sv}" would require 61 bytes of memory (plus malloc overhead). * * This means that in total, for our "a{sv}" example, 91 bytes of * type information would be allocated. * * The type information cache, additionally, uses a #GHashTable to * store and lookup the cached items and stores a pointer to this * hash table in static storage. The hash table is freed when there * are zero items in the type cache. * * Although these sizes may seem large it is important to remember * that a program will probably only have a very small number of * different types of values in it and that only one type information * structure is required for many different values of the same type. * * ## Buffer Management Memory * * #GVariant uses an internal buffer management structure to deal * with the various different possible sources of serialised data * that it uses. The buffer is responsible for ensuring that the * correct call is made when the data is no longer in use by * #GVariant. This may involve a g_free() or a g_slice_free() or * even g_mapped_file_unref(). * * One buffer management structure is used for each chunk of * serialised data. The size of the buffer management structure * is 4 * (void *). On 32-bit systems, that's 16 bytes. * * ## GVariant structure * * The size of a #GVariant structure is 6 * (void *). On 32-bit * systems, that's 24 bytes. * * #GVariant structures only exist if they are explicitly created * with API calls. For example, if a #GVariant is constructed out of * serialised data for the example given above (with the dictionary) * then although there are 9 individual values that comprise the * entire dictionary (two keys, two values, two variants containing * the values, two dictionary entries, plus the dictionary itself), * only 1 #GVariant instance exists -- the one referring to the * dictionary. * * If calls are made to start accessing the other values then * #GVariant instances will exist for those values only for as long * as they are in use (ie: until you call g_variant_unref()). The * type information is shared. The serialised data and the buffer * management structure for that serialised data is shared by the * child. * * ## Summary * * To put the entire example together, for our dictionary mapping * strings to variants (with two entries, as given above), we are * using 91 bytes of memory for type information, 29 bytes of memory * for the serialised data, 16 bytes for buffer management and 24 * bytes for the #GVariant instance, or a total of 160 bytes, plus * malloc overhead. If we were to use g_variant_get_child_value() to * access the two dictionary entries, we would use an additional 48 * bytes. If we were to have other dictionaries of the same type, we * would use more memory for the serialised data and buffer * management for those dictionaries, but the type information would * be shared. * * Since: 2.24 */ public class Variant { /** the main Gtk struct */ protected GVariant* gVariant; protected bool ownedRef; /** Get the main Gtk struct */ public GVariant* getVariantStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gVariant; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gVariant; } /** * Sets our main struct and passes it to the parent class. */ public this (GVariant* gVariant, bool ownedRef = false) { this.gVariant = gVariant; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_variant_unref(gVariant); } /** * Creates a DBus object path GVariant with the contents of string. * string must be a valid DBus object path. * Use Variant.isObjectPath() if you're not sure. * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public static Variant fromObjectPath(string path) { auto p = g_variant_new_object_path(Str.toStringz(path)); if(p is null) { throw new ConstructionException("null returned by g_variant_new_object_path"); } return new Variant(cast(GVariant*) p); } /** * Creates a DBus type signature GVariant with the contents of string. * string must be a valid DBus type signature. * Use Variant.isSignature() if you're not sure. * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public static Variant fromSignature(string signature) { auto p = g_variant_new_signature(Str.toStringz(signature)); if(p is null) { throw new ConstructionException("null returned by g_variant_new_signature"); } return new Variant(cast(GVariant*) p); } /** * Creates an array-of-bytes GVariant with the contents of string. * This function is just like new Variant(string) except that the string * need not be valid utf8. * * The nul terminator character at the end of the string is stored in * the array. * * Throws: ConstructionException GTK+ fails to create the object. */ public static Variant fromByteString(string byteString) { auto p = g_variant_new_bytestring(Str.toStringz(byteString)); if(p is null) { throw new ConstructionException("null returned by g_variant_new_bytestring"); } return new Variant(cast(GVariant*) p); } /** * Constructs an array of object paths Variant from the given array * of strings. * * Each string must be a valid Variant object path. * * Since: 2.30 * * Params: * strv = an array of strings. * * Throws: ConstructionException GTK+ fails to create the object. */ public static Variant fromObjv(string[] strv) { // GVariant * g_variant_new_objv (const gchar * const *strv, gssize length); auto p = g_variant_new_objv(Str.toStringzArray(strv), strv.length); if(p is null) { throw new ConstructionException("null returned by g_variant_new_objv(strv, length)"); } return new Variant(cast(GVariant*) p); } /** * Constructs an array of bytestring GVariant from the given array of * strings. If length is -1 then strv is null-terminated. * * Since: 2.26 * * Params: * strv = an array of strings. * * Throws: ConstructionException GTK+ fails to create the object. */ public static Variant fromByteStringArray(string[] strv) { auto p = g_variant_new_bytestring_array(Str.toStringzArray(strv), strv.length); if(p is null) { throw new ConstructionException("null returned by g_variant_new_bytestring_array(strv, length)"); } return new Variant(cast(GVariant*) p); } /** */ /** * Creates a new #GVariant array from @children. * * @child_type must be non-%NULL if @n_children is zero. Otherwise, the * child type is determined by inspecting the first element of the * @children array. If @child_type is non-%NULL then it must be a * definite type. * * The items of the array are taken from the @children array. No entry * in the @children array may be %NULL. * * All items in the array must have the same type, which must be the * same as @child_type, if given. * * If the @children are floating references (see g_variant_ref_sink()), the * new instance takes ownership of them as if via g_variant_ref_sink(). * * Params: * childType = the element type of the new array * children = an array of * #GVariant pointers, the children * * Returns: a floating reference to a new #GVariant array * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(VariantType childType, Variant[] children) { GVariant*[] childrenArray = new GVariant*[children.length]; for ( int i = 0; i < children.length; i++ ) { childrenArray[i] = children[i].getVariantStruct(); } auto p = g_variant_new_array((childType is null) ? null : childType.getVariantTypeStruct(), childrenArray.ptr, cast(size_t)children.length); if(p is null) { throw new ConstructionException("null returned by new_array"); } this(cast(GVariant*) p); } /** * Creates a new boolean #GVariant instance -- either %TRUE or %FALSE. * * Params: * value = a #gboolean value * * Returns: a floating reference to a new boolean #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(bool value) { auto p = g_variant_new_boolean(value); if(p is null) { throw new ConstructionException("null returned by new_boolean"); } this(cast(GVariant*) p); } /** * Creates a new byte #GVariant instance. * * Params: * value = a #guint8 value * * Returns: a floating reference to a new byte #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(char value) { auto p = g_variant_new_byte(value); if(p is null) { throw new ConstructionException("null returned by new_byte"); } this(cast(GVariant*) p); } /** * Creates a new dictionary entry #GVariant. @key and @value must be * non-%NULL. @key must be a value of a basic type (ie: not a container). * * If the @key or @value are floating references (see g_variant_ref_sink()), * the new instance takes ownership of them as if via g_variant_ref_sink(). * * Params: * key = a basic #GVariant, the key * value = a #GVariant, the value * * Returns: a floating reference to a new dictionary entry #GVariant * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Variant key, Variant value) { auto p = g_variant_new_dict_entry((key is null) ? null : key.getVariantStruct(), (value is null) ? null : value.getVariantStruct()); if(p is null) { throw new ConstructionException("null returned by new_dict_entry"); } this(cast(GVariant*) p); } /** * Creates a new double #GVariant instance. * * Params: * value = a #gdouble floating point value * * Returns: a floating reference to a new double #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(double value) { auto p = g_variant_new_double(value); if(p is null) { throw new ConstructionException("null returned by new_double"); } this(cast(GVariant*) p); } /** * Constructs a new array #GVariant instance, where the elements are * of @element_type type. * * @elements must be an array with fixed-sized elements. Numeric types are * fixed-size as are tuples containing only other fixed-sized types. * * @element_size must be the size of a single element in the array. * For example, if calling this function for an array of 32-bit integers, * you might say sizeof(gint32). This value isn't used except for the purpose * of a double-check that the form of the serialised data matches the caller's * expectation. * * @n_elements must be the length of the @elements array. * * Params: * elementType = the #GVariantType of each element * elements = a pointer to the fixed array of contiguous elements * nElements = the number of elements * elementSize = the size of each element * * Returns: a floating reference to a new array #GVariant instance * * Since: 2.32 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(VariantType elementType, void* elements, size_t nElements, size_t elementSize) { auto p = g_variant_new_fixed_array((elementType is null) ? null : elementType.getVariantTypeStruct(), elements, nElements, elementSize); if(p is null) { throw new ConstructionException("null returned by new_fixed_array"); } this(cast(GVariant*) p); } /** * Constructs a new serialised-mode #GVariant instance. This is the * inner interface for creation of new serialised values that gets * called from various functions in gvariant.c. * * A reference is taken on @bytes. * * Params: * type = a #GVariantType * bytes = a #GBytes * trusted = if the contents of @bytes are trusted * * Returns: a new #GVariant with a floating reference * * Since: 2.36 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(VariantType type, Bytes bytes, bool trusted) { auto p = g_variant_new_from_bytes((type is null) ? null : type.getVariantTypeStruct(), (bytes is null) ? null : bytes.getBytesStruct(), trusted); if(p is null) { throw new ConstructionException("null returned by new_from_bytes"); } this(cast(GVariant*) p); } /** * Creates a new #GVariant instance from serialised data. * * @type is the type of #GVariant instance that will be constructed. * The interpretation of @data depends on knowing the type. * * @data is not modified by this function and must remain valid with an * unchanging value until such a time as @notify is called with * @user_data. If the contents of @data change before that time then * the result is undefined. * * If @data is trusted to be serialised data in normal form then * @trusted should be %TRUE. This applies to serialised data created * within this process or read from a trusted location on the disk (such * as a file installed in /usr/lib alongside your application). You * should set trusted to %FALSE if @data is read from the network, a * file in the user's home directory, etc. * * If @data was not stored in this machine's native endianness, any multi-byte * numeric values in the returned variant will also be in non-native * endianness. g_variant_byteswap() can be used to recover the original values. * * @notify will be called with @user_data when @data is no longer * needed. The exact time of this call is unspecified and might even be * before this function returns. * * Params: * type = a definite #GVariantType * data = the serialised data * trusted = %TRUE if @data is definitely in normal form * notify = function to call when @data is no longer needed * userData = data for @notify * * Returns: a new floating #GVariant of type @type * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(VariantType type, ubyte[] data, bool trusted, GDestroyNotify notify, void* userData) { auto p = g_variant_new_from_data((type is null) ? null : type.getVariantTypeStruct(), data.ptr, cast(size_t)data.length, trusted, notify, userData); if(p is null) { throw new ConstructionException("null returned by new_from_data"); } this(cast(GVariant*) p); } /** * Creates a new int16 #GVariant instance. * * Params: * value = a #gint16 value * * Returns: a floating reference to a new int16 #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(short value) { auto p = g_variant_new_int16(value); if(p is null) { throw new ConstructionException("null returned by new_int16"); } this(cast(GVariant*) p); } /** * Creates a new int32 #GVariant instance. * * Params: * value = a #gint32 value * * Returns: a floating reference to a new int32 #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(int value) { auto p = g_variant_new_int32(value); if(p is null) { throw new ConstructionException("null returned by new_int32"); } this(cast(GVariant*) p); } /** * Creates a new int64 #GVariant instance. * * Params: * value = a #gint64 value * * Returns: a floating reference to a new int64 #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(long value) { auto p = g_variant_new_int64(value); if(p is null) { throw new ConstructionException("null returned by new_int64"); } this(cast(GVariant*) p); } /** * Depending on if @child is %NULL, either wraps @child inside of a * maybe container or creates a Nothing instance for the given @type. * * At least one of @child_type and @child must be non-%NULL. * If @child_type is non-%NULL then it must be a definite type. * If they are both non-%NULL then @child_type must be the type * of @child. * * If @child is a floating reference (see g_variant_ref_sink()), the new * instance takes ownership of @child. * * Params: * childType = the #GVariantType of the child, or %NULL * child = the child value, or %NULL * * Returns: a floating reference to a new #GVariant maybe instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(VariantType childType, Variant child) { auto p = g_variant_new_maybe((childType is null) ? null : childType.getVariantTypeStruct(), (child is null) ? null : child.getVariantStruct()); if(p is null) { throw new ConstructionException("null returned by new_maybe"); } this(cast(GVariant*) p); } /** * Parses @format and returns the result. * * This is the version of g_variant_new_parsed() intended to be used * from libraries. * * The return value will be floating if it was a newly created GVariant * instance. In the case that @format simply specified the collection * of a #GVariant pointer (eg: @format was "%*") then the collected * #GVariant pointer will be returned unmodified, without adding any * additional references. * * Note that the arguments in @app must be of the correct width for their types * specified in @format when collected into the #va_list. See * the [GVariant varargs documentation][gvariant-varargs]. * * In order to behave correctly in all cases it is necessary for the * calling function to g_variant_ref_sink() the return result before * returning control to the user that originally provided the pointer. * At this point, the caller will have their own full reference to the * result. This can also be done by adding the result to a container, * or by passing it to another g_variant_new() call. * * Params: * format = a text format #GVariant * app = a pointer to a #va_list * * Returns: a new, usually floating, #GVariant * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string format, void** app) { auto p = g_variant_new_parsed_va(Str.toStringz(format), app); if(p is null) { throw new ConstructionException("null returned by new_parsed_va"); } this(cast(GVariant*) p); } /** * Creates a string #GVariant with the contents of @string. * * @string must be valid UTF-8, and must not be %NULL. To encode * potentially-%NULL strings, use g_variant_new() with `ms` as the * [format string][gvariant-format-strings-maybe-types]. * * Params: * str = a normal UTF-8 nul-terminated string * * Returns: a floating reference to a new string #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string str) { auto p = g_variant_new_string(Str.toStringz(str)); if(p is null) { throw new ConstructionException("null returned by new_string"); } this(cast(GVariant*) p); } /** * Constructs an array of strings #GVariant from the given array of * strings. * * If @length is -1 then @strv is %NULL-terminated. * * Params: * strv = an array of strings * * Returns: a new floating #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string[] strv) { auto p = g_variant_new_strv(Str.toStringzArray(strv), cast(ptrdiff_t)strv.length); if(p is null) { throw new ConstructionException("null returned by new_strv"); } this(cast(GVariant*) p); } /** * Creates a new tuple #GVariant out of the items in @children. The * type is determined from the types of @children. No entry in the * @children array may be %NULL. * * If @n_children is 0 then the unit tuple is constructed. * * If the @children are floating references (see g_variant_ref_sink()), the * new instance takes ownership of them as if via g_variant_ref_sink(). * * Params: * children = the items to make the tuple out of * * Returns: a floating reference to a new #GVariant tuple * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Variant[] children) { GVariant*[] childrenArray = new GVariant*[children.length]; for ( int i = 0; i < children.length; i++ ) { childrenArray[i] = children[i].getVariantStruct(); } auto p = g_variant_new_tuple(childrenArray.ptr, cast(size_t)children.length); if(p is null) { throw new ConstructionException("null returned by new_tuple"); } this(cast(GVariant*) p); } /** * Creates a new uint16 #GVariant instance. * * Params: * value = a #guint16 value * * Returns: a floating reference to a new uint16 #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ushort value) { auto p = g_variant_new_uint16(value); if(p is null) { throw new ConstructionException("null returned by new_uint16"); } this(cast(GVariant*) p); } /** * Creates a new uint32 #GVariant instance. * * Params: * value = a #guint32 value * * Returns: a floating reference to a new uint32 #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint value) { auto p = g_variant_new_uint32(value); if(p is null) { throw new ConstructionException("null returned by new_uint32"); } this(cast(GVariant*) p); } /** * Creates a new uint64 #GVariant instance. * * Params: * value = a #guint64 value * * Returns: a floating reference to a new uint64 #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(ulong value) { auto p = g_variant_new_uint64(value); if(p is null) { throw new ConstructionException("null returned by new_uint64"); } this(cast(GVariant*) p); } /** * This function is intended to be used by libraries based on * #GVariant that want to provide g_variant_new()-like functionality * to their users. * * The API is more general than g_variant_new() to allow a wider range * of possible uses. * * @format_string must still point to a valid format string, but it only * needs to be nul-terminated if @endptr is %NULL. If @endptr is * non-%NULL then it is updated to point to the first character past the * end of the format string. * * @app is a pointer to a #va_list. The arguments, according to * @format_string, are collected from this #va_list and the list is left * pointing to the argument following the last. * * Note that the arguments in @app must be of the correct width for their * types specified in @format_string when collected into the #va_list. * See the [GVariant varargs documentation][gvariant-varargs]. * * These two generalisations allow mixing of multiple calls to * g_variant_new_va() and g_variant_get_va() within a single actual * varargs call by the user. * * The return value will be floating if it was a newly created GVariant * instance (for example, if the format string was "(ii)"). In the case * that the format_string was '*', '?', 'r', or a format starting with * '@' then the collected #GVariant pointer will be returned unmodified, * without adding any additional references. * * In order to behave correctly in all cases it is necessary for the * calling function to g_variant_ref_sink() the return result before * returning control to the user that originally provided the pointer. * At this point, the caller will have their own full reference to the * result. This can also be done by adding the result to a container, * or by passing it to another g_variant_new() call. * * Params: * formatString = a string that is prefixed with a format string * endptr = location to store the end pointer, * or %NULL * app = a pointer to a #va_list * * Returns: a new, usually floating, #GVariant * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string formatString, string[] endptr, void** app) { auto p = g_variant_new_va(Str.toStringz(formatString), Str.toStringzArray(endptr), app); if(p is null) { throw new ConstructionException("null returned by new_va"); } this(cast(GVariant*) p); } /** * Boxes @value. The result is a #GVariant instance representing a * variant containing the original value. * * If @child is a floating reference (see g_variant_ref_sink()), the new * instance takes ownership of @child. * * Params: * value = a #GVariant instance * * Returns: a floating reference to a new variant #GVariant instance * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Variant value) { auto p = g_variant_new_variant((value is null) ? null : value.getVariantStruct()); if(p is null) { throw new ConstructionException("null returned by new_variant"); } this(cast(GVariant*) p); } /** * Performs a byteswapping operation on the contents of @value. The * result is that all multi-byte numeric data contained in @value is * byteswapped. That includes 16, 32, and 64bit signed and unsigned * integers as well as file handles and double precision floating point * values. * * This function is an identity mapping on any value that does not * contain multi-byte numeric data. That include strings, booleans, * bytes and containers containing only these things (recursively). * * The returned value is always in normal form and is marked as trusted. * * Returns: the byteswapped form of @value * * Since: 2.24 */ public Variant byteswap() { auto p = g_variant_byteswap(gVariant); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Checks if calling g_variant_get() with @format_string on @value would * be valid from a type-compatibility standpoint. @format_string is * assumed to be a valid format string (from a syntactic standpoint). * * If @copy_only is %TRUE then this function additionally checks that it * would be safe to call g_variant_unref() on @value immediately after * the call to g_variant_get() without invalidating the result. This is * only possible if deep copies are made (ie: there are no pointers to * the data inside of the soon-to-be-freed #GVariant instance). If this * check fails then a g_critical() is printed and %FALSE is returned. * * This function is meant to be used by functions that wish to provide * varargs accessors to #GVariant values of uncertain values (eg: * g_variant_lookup() or g_menu_model_get_item_attribute()). * * Params: * formatString = a valid #GVariant format string * copyOnly = %TRUE to ensure the format string makes deep copies * * Returns: %TRUE if @format_string is safe to use * * Since: 2.34 */ public bool checkFormatString(string formatString, bool copyOnly) { return g_variant_check_format_string(gVariant, Str.toStringz(formatString), copyOnly) != 0; } /** * Classifies @value according to its top-level type. * * Returns: the #GVariantClass of @value * * Since: 2.24 */ public GVariantClass classify() { return g_variant_classify(gVariant); } /** * Compares @one and @two. * * The types of @one and @two are #gconstpointer only to allow use of * this function with #GTree, #GPtrArray, etc. They must each be a * #GVariant. * * Comparison is only defined for basic types (ie: booleans, numbers, * strings). For booleans, %FALSE is less than %TRUE. Numbers are * ordered in the usual way. Strings are in ASCII lexographical order. * * It is a programmer error to attempt to compare container values or * two values that have types that are not exactly equal. For example, * you cannot compare a 32-bit signed integer with a 32-bit unsigned * integer. Also note that this function is not particularly * well-behaved when it comes to comparison of doubles; in particular, * the handling of incomparable values (ie: NaN) is undefined. * * If you only require an equality comparison, g_variant_equal() is more * general. * * Params: * two = a #GVariant instance of the same type * * Returns: negative value if a < b; * zero if a = b; * positive value if a > b. * * Since: 2.26 */ public int compare(Variant two) { return g_variant_compare(gVariant, (two is null) ? null : two.getVariantStruct()); } /** * Similar to g_variant_get_bytestring() except that instead of * returning a constant string, the string is duplicated. * * The return value must be freed using g_free(). * * Returns: a newly allocated string * * Since: 2.26 */ public string dupBytestring() { size_t length; auto retStr = g_variant_dup_bytestring(gVariant, &length); scope(exit) Str.freeString(retStr); return Str.toString(retStr, length); } /** * Gets the contents of an array of array of bytes #GVariant. This call * makes a deep copy; the return result should be released with * g_strfreev(). * * If @length is non-%NULL then the number of elements in the result is * stored there. In any case, the resulting array will be * %NULL-terminated. * * For an empty array, @length will be set to 0 and a pointer to a * %NULL pointer will be returned. * * Returns: an array of strings * * Since: 2.26 */ public string[] dupBytestringArray() { size_t length; auto retStr = g_variant_dup_bytestring_array(gVariant, &length); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr, length); } /** * Gets the contents of an array of object paths #GVariant. This call * makes a deep copy; the return result should be released with * g_strfreev(). * * If @length is non-%NULL then the number of elements in the result * is stored there. In any case, the resulting array will be * %NULL-terminated. * * For an empty array, @length will be set to 0 and a pointer to a * %NULL pointer will be returned. * * Returns: an array of strings * * Since: 2.30 */ public string[] dupObjv() { size_t length; auto retStr = g_variant_dup_objv(gVariant, &length); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr, length); } /** * Similar to g_variant_get_string() except that instead of returning * a constant string, the string is duplicated. * * The string will always be UTF-8 encoded. * * The return value must be freed using g_free(). * * Params: * length = a pointer to a #gsize, to store the length * * Returns: a newly allocated string, UTF-8 encoded * * Since: 2.24 */ public string dupString(out size_t length) { auto retStr = g_variant_dup_string(gVariant, &length); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Gets the contents of an array of strings #GVariant. This call * makes a deep copy; the return result should be released with * g_strfreev(). * * If @length is non-%NULL then the number of elements in the result * is stored there. In any case, the resulting array will be * %NULL-terminated. * * For an empty array, @length will be set to 0 and a pointer to a * %NULL pointer will be returned. * * Returns: an array of strings * * Since: 2.24 */ public string[] dupStrv() { size_t length; auto retStr = g_variant_dup_strv(gVariant, &length); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr, length); } /** * Checks if @one and @two have the same type and value. * * The types of @one and @two are #gconstpointer only to allow use of * this function with #GHashTable. They must each be a #GVariant. * * Params: * two = a #GVariant instance * * Returns: %TRUE if @one and @two are equal * * Since: 2.24 */ public bool equal(Variant two) { return g_variant_equal(gVariant, (two is null) ? null : two.getVariantStruct()) != 0; } /** * Returns the boolean value of @value. * * It is an error to call this function with a @value of any type * other than %G_VARIANT_TYPE_BOOLEAN. * * Returns: %TRUE or %FALSE * * Since: 2.24 */ public bool getBoolean() { return g_variant_get_boolean(gVariant) != 0; } /** * Returns the byte value of @value. * * It is an error to call this function with a @value of any type * other than %G_VARIANT_TYPE_BYTE. * * Returns: a #guchar * * Since: 2.24 */ public char getByte() { return g_variant_get_byte(gVariant); } /** * Returns the string value of a #GVariant instance with an * array-of-bytes type. The string has no particular encoding. * * If the array does not end with a nul terminator character, the empty * string is returned. For this reason, you can always trust that a * non-%NULL nul-terminated string will be returned by this function. * * If the array contains a nul terminator character somewhere other than * the last byte then the returned string is the string, up to the first * such nul character. * * g_variant_get_fixed_array() should be used instead if the array contains * arbitrary data that could not be nul-terminated or could contain nul bytes. * * It is an error to call this function with a @value that is not an * array of bytes. * * The return value remains valid as long as @value exists. * * Returns: the constant string * * Since: 2.26 */ public string getBytestring() { return Str.toString(g_variant_get_bytestring(gVariant)); } /** * Gets the contents of an array of array of bytes #GVariant. This call * makes a shallow copy; the return result should be released with * g_free(), but the individual strings must not be modified. * * If @length is non-%NULL then the number of elements in the result is * stored there. In any case, the resulting array will be * %NULL-terminated. * * For an empty array, @length will be set to 0 and a pointer to a * %NULL pointer will be returned. * * Returns: an array of constant strings * * Since: 2.26 */ public string[] getBytestringArray() { size_t length; return Str.toStringArray(g_variant_get_bytestring_array(gVariant, &length)); } /** * Reads a child item out of a container #GVariant instance. This * includes variants, maybes, arrays, tuples and dictionary * entries. It is an error to call this function on any other type of * #GVariant. * * It is an error if @index_ is greater than the number of child items * in the container. See g_variant_n_children(). * * The returned value is never floating. You should free it with * g_variant_unref() when you're done with it. * * This function is O(1). * * Params: * index = the index of the child to fetch * * Returns: the child at the specified index * * Since: 2.24 */ public Variant getChildValue(size_t index) { auto p = g_variant_get_child_value(gVariant, index); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Returns a pointer to the serialised form of a #GVariant instance. * The returned data may not be in fully-normalised form if read from an * untrusted source. The returned data must not be freed; it remains * valid for as long as @value exists. * * If @value is a fixed-sized value that was deserialised from a * corrupted serialised container then %NULL may be returned. In this * case, the proper thing to do is typically to use the appropriate * number of nul bytes in place of @value. If @value is not fixed-sized * then %NULL is never returned. * * In the case that @value is already in serialised form, this function * is O(1). If the value is not already in serialised form, * serialisation occurs implicitly and is approximately O(n) in the size * of the result. * * To deserialise the data returned by this function, in addition to the * serialised data, you must know the type of the #GVariant, and (if the * machine might be different) the endianness of the machine that stored * it. As a result, file formats or network messages that incorporate * serialised #GVariants must include this information either * implicitly (for instance "the file always contains a * %G_VARIANT_TYPE_VARIANT and it is always in little-endian order") or * explicitly (by storing the type and/or endianness in addition to the * serialised data). * * Returns: the serialised form of @value, or %NULL * * Since: 2.24 */ public void* getData() { return g_variant_get_data(gVariant); } /** * Returns a pointer to the serialised form of a #GVariant instance. * The semantics of this function are exactly the same as * g_variant_get_data(), except that the returned #GBytes holds * a reference to the variant data. * * Returns: A new #GBytes representing the variant data * * Since: 2.36 */ public Bytes getDataAsBytes() { auto p = g_variant_get_data_as_bytes(gVariant); if(p is null) { return null; } return new Bytes(cast(GBytes*) p, true); } /** * Returns the double precision floating point value of @value. * * It is an error to call this function with a @value of any type * other than %G_VARIANT_TYPE_DOUBLE. * * Returns: a #gdouble * * Since: 2.24 */ public double getDouble() { return g_variant_get_double(gVariant); } /** * Provides access to the serialised data for an array of fixed-sized * items. * * @value must be an array with fixed-sized elements. Numeric types are * fixed-size, as are tuples containing only other fixed-sized types. * * @element_size must be the size of a single element in the array, * as given by the section on * [serialized data memory][gvariant-serialised-data-memory]. * * In particular, arrays of these fixed-sized types can be interpreted * as an array of the given C type, with @element_size set to the size * the appropriate type: * - %G_VARIANT_TYPE_INT16 (etc.): #gint16 (etc.) * - %G_VARIANT_TYPE_BOOLEAN: #guchar (not #gboolean!) * - %G_VARIANT_TYPE_BYTE: #guchar * - %G_VARIANT_TYPE_HANDLE: #guint32 * - %G_VARIANT_TYPE_DOUBLE: #gdouble * * For example, if calling this function for an array of 32-bit integers, * you might say `sizeof(gint32)`. This value isn't used except for the purpose * of a double-check that the form of the serialised data matches the caller's * expectation. * * @n_elements, which must be non-%NULL, is set equal to the number of * items in the array. * * Params: * elementSize = the size of each element * * Returns: a pointer to * the fixed array * * Since: 2.24 */ public void[] getFixedArray(size_t elementSize) { size_t nElements; auto p = g_variant_get_fixed_array(gVariant, &nElements, elementSize); return p[0 .. nElements]; } /** * Returns the 32-bit signed integer value of @value. * * It is an error to call this function with a @value of any type other * than %G_VARIANT_TYPE_HANDLE. * * By convention, handles are indexes into an array of file descriptors * that are sent alongside a D-Bus message. If you're not interacting * with D-Bus, you probably don't need them. * * Returns: a #gint32 * * Since: 2.24 */ public int getHandle() { return g_variant_get_handle(gVariant); } /** * Returns the 16-bit signed integer value of @value. * * It is an error to call this function with a @value of any type * other than %G_VARIANT_TYPE_INT16. * * Returns: a #gint16 * * Since: 2.24 */ public short getInt16() { return g_variant_get_int16(gVariant); } /** * Returns the 32-bit signed integer value of @value. * * It is an error to call this function with a @value of any type * other than %G_VARIANT_TYPE_INT32. * * Returns: a #gint32 * * Since: 2.24 */ public int getInt32() { return g_variant_get_int32(gVariant); } /** * Returns the 64-bit signed integer value of @value. * * It is an error to call this function with a @value of any type * other than %G_VARIANT_TYPE_INT64. * * Returns: a #gint64 * * Since: 2.24 */ public long getInt64() { return g_variant_get_int64(gVariant); } /** * Given a maybe-typed #GVariant instance, extract its value. If the * value is Nothing, then this function returns %NULL. * * Returns: the contents of @value, or %NULL * * Since: 2.24 */ public Variant getMaybe() { auto p = g_variant_get_maybe(gVariant); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets a #GVariant instance that has the same value as @value and is * trusted to be in normal form. * * If @value is already trusted to be in normal form then a new * reference to @value is returned. * * If @value is not already trusted, then it is scanned to check if it * is in normal form. If it is found to be in normal form then it is * marked as trusted and a new reference to it is returned. * * If @value is found not to be in normal form then a new trusted * #GVariant is created with the same value as @value. * * It makes sense to call this function if you've received #GVariant * data from untrusted sources and you want to ensure your serialised * output is definitely in normal form. * * Returns: a trusted #GVariant * * Since: 2.24 */ public Variant getNormalForm() { auto p = g_variant_get_normal_form(gVariant); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Gets the contents of an array of object paths #GVariant. This call * makes a shallow copy; the return result should be released with * g_free(), but the individual strings must not be modified. * * If @length is non-%NULL then the number of elements in the result * is stored there. In any case, the resulting array will be * %NULL-terminated. * * For an empty array, @length will be set to 0 and a pointer to a * %NULL pointer will be returned. * * Returns: an array of constant strings * * Since: 2.30 */ public string[] getObjv() { size_t length; return Str.toStringArray(g_variant_get_objv(gVariant, &length)); } /** * Determines the number of bytes that would be required to store @value * with g_variant_store(). * * If @value has a fixed-sized type then this function always returned * that fixed size. * * In the case that @value is already in serialised form or the size has * already been calculated (ie: this function has been called before) * then this function is O(1). Otherwise, the size is calculated, an * operation which is approximately O(n) in the number of values * involved. * * Returns: the serialised size of @value * * Since: 2.24 */ public size_t getSize() { return g_variant_get_size(gVariant); } /** * Returns the string value of a #GVariant instance with a string * type. This includes the types %G_VARIANT_TYPE_STRING, * %G_VARIANT_TYPE_OBJECT_PATH and %G_VARIANT_TYPE_SIGNATURE. * * The string will always be UTF-8 encoded, and will never be %NULL. * * If @length is non-%NULL then the length of the string (in bytes) is * returned there. For trusted values, this information is already * known. For untrusted values, a strlen() will be performed. * * It is an error to call this function with a @value of any type * other than those three. * * The return value remains valid as long as @value exists. * * Params: * length = a pointer to a #gsize, * to store the length * * Returns: the constant string, UTF-8 encoded * * Since: 2.24 */ public string getString(out size_t length) { return Str.toString(g_variant_get_string(gVariant, &length)); } /** * Gets the contents of an array of strings #GVariant. This call * makes a shallow copy; the return result should be released with * g_free(), but the individual strings must not be modified. * * If @length is non-%NULL then the number of elements in the result * is stored there. In any case, the resulting array will be * %NULL-terminated. * * For an empty array, @length will be set to 0 and a pointer to a * %NULL pointer will be returned. * * Returns: an array of constant strings * * Since: 2.24 */ public string[] getStrv() { size_t length; return Str.toStringArray(g_variant_get_strv(gVariant, &length)); } /** * Determines the type of @value. * * The return value is valid for the lifetime of @value and must not * be freed. * * Returns: a #GVariantType * * Since: 2.24 */ public VariantType getType() { auto p = g_variant_get_type(gVariant); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Returns the type string of @value. Unlike the result of calling * g_variant_type_peek_string(), this string is nul-terminated. This * string belongs to #GVariant and must not be freed. * * Returns: the type string for the type of @value * * Since: 2.24 */ public string getTypeString() { return Str.toString(g_variant_get_type_string(gVariant)); } /** * Returns the 16-bit unsigned integer value of @value. * * It is an error to call this function with a @value of any type * other than %G_VARIANT_TYPE_UINT16. * * Returns: a #guint16 * * Since: 2.24 */ public ushort getUint16() { return g_variant_get_uint16(gVariant); } /** * Returns the 32-bit unsigned integer value of @value. * * It is an error to call this function with a @value of any type * other than %G_VARIANT_TYPE_UINT32. * * Returns: a #guint32 * * Since: 2.24 */ public uint getUint32() { return g_variant_get_uint32(gVariant); } /** * Returns the 64-bit unsigned integer value of @value. * * It is an error to call this function with a @value of any type * other than %G_VARIANT_TYPE_UINT64. * * Returns: a #guint64 * * Since: 2.24 */ public ulong getUint64() { return g_variant_get_uint64(gVariant); } /** * This function is intended to be used by libraries based on #GVariant * that want to provide g_variant_get()-like functionality to their * users. * * The API is more general than g_variant_get() to allow a wider range * of possible uses. * * @format_string must still point to a valid format string, but it only * need to be nul-terminated if @endptr is %NULL. If @endptr is * non-%NULL then it is updated to point to the first character past the * end of the format string. * * @app is a pointer to a #va_list. The arguments, according to * @format_string, are collected from this #va_list and the list is left * pointing to the argument following the last. * * These two generalisations allow mixing of multiple calls to * g_variant_new_va() and g_variant_get_va() within a single actual * varargs call by the user. * * @format_string determines the C types that are used for unpacking * the values and also determines if the values are copied or borrowed, * see the section on * [GVariant format strings][gvariant-format-strings-pointers]. * * Params: * formatString = a string that is prefixed with a format string * endptr = location to store the end pointer, * or %NULL * app = a pointer to a #va_list * * Since: 2.24 */ public void getVa(string formatString, string[] endptr, void** app) { g_variant_get_va(gVariant, Str.toStringz(formatString), Str.toStringzArray(endptr), app); } /** * Unboxes @value. The result is the #GVariant instance that was * contained in @value. * * Returns: the item contained in the variant * * Since: 2.24 */ public Variant getVariant() { auto p = g_variant_get_variant(gVariant); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Generates a hash value for a #GVariant instance. * * The output of this function is guaranteed to be the same for a given * value only per-process. It may change between different processor * architectures or even different versions of GLib. Do not use this * function as a basis for building protocols or file formats. * * The type of @value is #gconstpointer only to allow use of this * function with #GHashTable. @value must be a #GVariant. * * Returns: a hash value corresponding to @value * * Since: 2.24 */ public uint hash() { return g_variant_hash(gVariant); } /** * Checks if @value is a container. * * Returns: %TRUE if @value is a container * * Since: 2.24 */ public bool isContainer() { return g_variant_is_container(gVariant) != 0; } /** * Checks whether @value has a floating reference count. * * This function should only ever be used to assert that a given variant * is or is not floating, or for debug purposes. To acquire a reference * to a variant that might be floating, always use g_variant_ref_sink() * or g_variant_take_ref(). * * See g_variant_ref_sink() for more information about floating reference * counts. * * Returns: whether @value is floating * * Since: 2.26 */ public bool isFloating() { return g_variant_is_floating(gVariant) != 0; } /** * Checks if @value is in normal form. * * The main reason to do this is to detect if a given chunk of * serialised data is in normal form: load the data into a #GVariant * using g_variant_new_from_data() and then use this function to * check. * * If @value is found to be in normal form then it will be marked as * being trusted. If the value was already marked as being trusted then * this function will immediately return %TRUE. * * Returns: %TRUE if @value is in normal form * * Since: 2.24 */ public bool isNormalForm() { return g_variant_is_normal_form(gVariant) != 0; } /** * Checks if a value has a type matching the provided type. * * Params: * type = a #GVariantType * * Returns: %TRUE if the type of @value matches @type * * Since: 2.24 */ public bool isOfType(VariantType type) { return g_variant_is_of_type(gVariant, (type is null) ? null : type.getVariantTypeStruct()) != 0; } /** * Creates a heap-allocated #GVariantIter for iterating over the items * in @value. * * Use g_variant_iter_free() to free the return value when you no longer * need it. * * A reference is taken to @value and will be released only when * g_variant_iter_free() is called. * * Returns: a new heap-allocated #GVariantIter * * Since: 2.24 */ public VariantIter iterNew() { auto p = g_variant_iter_new(gVariant); if(p is null) { return null; } return new VariantIter(cast(GVariantIter*) p, true); } /** * Looks up a value in a dictionary #GVariant. * * This function works with dictionaries of the type a{s*} (and equally * well with type a{o*}, but we only further discuss the string case * for sake of clarity). * * In the event that @dictionary has the type a{sv}, the @expected_type * string specifies what type of value is expected to be inside of the * variant. If the value inside the variant has a different type then * %NULL is returned. In the event that @dictionary has a value type other * than v then @expected_type must directly match the key type and it is * used to unpack the value directly or an error occurs. * * In either case, if @key is not found in @dictionary, %NULL is returned. * * If the key is found and the value has the correct type, it is * returned. If @expected_type was specified then any non-%NULL return * value will have this type. * * This function is currently implemented with a linear scan. If you * plan to do many lookups then #GVariantDict may be more efficient. * * Params: * key = the key to lookup in the dictionary * expectedType = a #GVariantType, or %NULL * * Returns: the value of the dictionary key, or %NULL * * Since: 2.28 */ public Variant lookupValue(string key, VariantType expectedType) { auto p = g_variant_lookup_value(gVariant, Str.toStringz(key), (expectedType is null) ? null : expectedType.getVariantTypeStruct()); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Determines the number of children in a container #GVariant instance. * This includes variants, maybes, arrays, tuples and dictionary * entries. It is an error to call this function on any other type of * #GVariant. * * For variants, the return value is always 1. For values with maybe * types, it is always zero or one. For arrays, it is the length of the * array. For tuples it is the number of tuple items (which depends * only on the type). For dictionary entries, it is always 2 * * This function is O(1). * * Returns: the number of children in the container * * Since: 2.24 */ public size_t nChildren() { return g_variant_n_children(gVariant); } /** * Pretty-prints @value in the format understood by g_variant_parse(). * * The format is described [here][gvariant-text]. * * If @type_annotate is %TRUE, then type information is included in * the output. * * Params: * typeAnnotate = %TRUE if type information should be included in * the output * * Returns: a newly-allocated string holding the result. * * Since: 2.24 */ public string print(bool typeAnnotate) { auto retStr = g_variant_print(gVariant, typeAnnotate); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Behaves as g_variant_print(), but operates on a #GString. * * If @string is non-%NULL then it is appended to and returned. Else, * a new empty #GString is allocated and it is returned. * * Params: * str = a #GString, or %NULL * typeAnnotate = %TRUE if type information should be included in * the output * * Returns: a #GString containing the string * * Since: 2.24 */ public StringG printString(StringG str, bool typeAnnotate) { auto p = g_variant_print_string(gVariant, (str is null) ? null : str.getStringGStruct(), typeAnnotate); if(p is null) { return null; } return new StringG(cast(GString*) p, true); } /** * Increases the reference count of @value. * * Returns: the same @value * * Since: 2.24 */ public Variant doref() { auto p = g_variant_ref(gVariant); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * #GVariant uses a floating reference count system. All functions with * names starting with `g_variant_new_` return floating * references. * * Calling g_variant_ref_sink() on a #GVariant with a floating reference * will convert the floating reference into a full reference. Calling * g_variant_ref_sink() on a non-floating #GVariant results in an * additional normal reference being added. * * In other words, if the @value is floating, then this call "assumes * ownership" of the floating reference, converting it to a normal * reference. If the @value is not floating, then this call adds a * new normal reference increasing the reference count by one. * * All calls that result in a #GVariant instance being inserted into a * container will call g_variant_ref_sink() on the instance. This means * that if the value was just created (and has only its floating * reference) then the container will assume sole ownership of the value * at that point and the caller will not need to unreference it. This * makes certain common styles of programming much easier while still * maintaining normal refcounting semantics in situations where values * are not floating. * * Returns: the same @value * * Since: 2.24 */ public Variant refSink() { auto p = g_variant_ref_sink(gVariant); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Stores the serialised form of @value at @data. @data should be * large enough. See g_variant_get_size(). * * The stored data is in machine native byte order but may not be in * fully-normalised form if read from an untrusted source. See * g_variant_get_normal_form() for a solution. * * As with g_variant_get_data(), to be able to deserialise the * serialised variant successfully, its type and (if the destination * machine might be different) its endianness must also be available. * * This function is approximately O(n) in the size of @data. * * Params: * data = the location to store the serialised data at * * Since: 2.24 */ public void store(void* data) { g_variant_store(gVariant, data); } /** * If @value is floating, sink it. Otherwise, do nothing. * * Typically you want to use g_variant_ref_sink() in order to * automatically do the correct thing with respect to floating or * non-floating references, but there is one specific scenario where * this function is helpful. * * The situation where this function is helpful is when creating an API * that allows the user to provide a callback function that returns a * #GVariant. We certainly want to allow the user the flexibility to * return a non-floating reference from this callback (for the case * where the value that is being returned already exists). * * At the same time, the style of the #GVariant API makes it likely that * for newly-created #GVariant instances, the user can be saved some * typing if they are allowed to return a #GVariant with a floating * reference. * * Using this function on the return value of the user's callback allows * the user to do whichever is more convenient for them. The caller * will alway receives exactly one full reference to the value: either * the one that was returned in the first place, or a floating reference * that has been converted to a full reference. * * This function has an odd interaction when combined with * g_variant_ref_sink() running at the same time in another thread on * the same #GVariant instance. If g_variant_ref_sink() runs first then * the result will be that the floating reference is converted to a hard * reference. If g_variant_take_ref() runs first then the result will * be that the floating reference is converted to a hard reference and * an additional reference on top of that one is added. It is best to * avoid this situation. * * Returns: the same @value */ public Variant takeRef() { auto p = g_variant_take_ref(gVariant); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Decreases the reference count of @value. When its reference count * drops to 0, the memory used by the variant is freed. * * Since: 2.24 */ public void unref() { g_variant_unref(gVariant); } /** * Determines if a given string is a valid D-Bus object path. You * should ensure that a string is a valid D-Bus object path before * passing it to g_variant_new_object_path(). * * A valid object path starts with '/' followed by zero or more * sequences of characters separated by '/' characters. Each sequence * must contain only the characters "[A-Z][a-z][0-9]_". No sequence * (including the one following the final '/' character) may be empty. * * Params: * str = a normal C nul-terminated string * * Returns: %TRUE if @string is a D-Bus object path * * Since: 2.24 */ public static bool isObjectPath(string str) { return g_variant_is_object_path(Str.toStringz(str)) != 0; } /** * Determines if a given string is a valid D-Bus type signature. You * should ensure that a string is a valid D-Bus type signature before * passing it to g_variant_new_signature(). * * D-Bus type signatures consist of zero or more definite #GVariantType * strings in sequence. * * Params: * str = a normal C nul-terminated string * * Returns: %TRUE if @string is a D-Bus type signature * * Since: 2.24 */ public static bool isSignature(string str) { return g_variant_is_signature(Str.toStringz(str)) != 0; } /** * Parses a #GVariant from a text representation. * * A single #GVariant is parsed from the content of @text. * * The format is described [here][gvariant-text]. * * The memory at @limit will never be accessed and the parser behaves as * if the character at @limit is the nul terminator. This has the * effect of bounding @text. * * If @endptr is non-%NULL then @text is permitted to contain data * following the value that this function parses and @endptr will be * updated to point to the first character past the end of the text * parsed by this function. If @endptr is %NULL and there is extra data * then an error is returned. * * If @type is non-%NULL then the value will be parsed to have that * type. This may result in additional parse errors (in the case that * the parsed value doesn't fit the type) but may also result in fewer * errors (in the case that the type would have been ambiguous, such as * with empty arrays). * * In the event that the parsing is successful, the resulting #GVariant * is returned. It is never floating, and must be freed with * g_variant_unref(). * * In case of any error, %NULL will be returned. If @error is non-%NULL * then it will be set to reflect the error that occurred. * * Officially, the language understood by the parser is "any string * produced by g_variant_print()". * * Params: * type = a #GVariantType, or %NULL * text = a string containing a GVariant in text form * limit = a pointer to the end of @text, or %NULL * endptr = a location to store the end pointer, or %NULL * * Returns: a non-floating reference to a #GVariant, or %NULL * * Throws: GException on failure. */ public static Variant parse(VariantType type, string text, string limit, string[] endptr) { GError* err = null; auto p = g_variant_parse((type is null) ? null : type.getVariantTypeStruct(), Str.toStringz(text), Str.toStringz(limit), Str.toStringzArray(endptr), &err); if (err !is null) { throw new GException( new ErrorG(err) ); } if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Pretty-prints a message showing the context of a #GVariant parse * error within the string for which parsing was attempted. * * The resulting string is suitable for output to the console or other * monospace media where newlines are treated in the usual way. * * The message will typically look something like one of the following: * * |[ * unterminated string constant: * (1, 2, 3, 'abc * ^^^^ * ]| * * or * * |[ * unable to find a common type: * [1, 2, 3, 'str'] * ^ ^^^^^ * ]| * * The format of the message may change in a future version. * * @error must have come from a failed attempt to g_variant_parse() and * @source_str must be exactly the same string that caused the error. * If @source_str was not nul-terminated when you passed it to * g_variant_parse() then you must add nul termination before using this * function. * * Params: * error = a #GError from the #GVariantParseError domain * sourceStr = the string that was given to the parser * * Returns: the printed message * * Since: 2.40 */ public static string parseErrorPrintContext(ErrorG error, string sourceStr) { auto retStr = g_variant_parse_error_print_context((error is null) ? null : error.getErrorGStruct(), Str.toStringz(sourceStr)); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** */ public static GQuark parseErrorQuark() { return g_variant_parse_error_quark(); } /** * Same as g_variant_error_quark(). * * Deprecated: Use g_variant_parse_error_quark() instead. */ public static GQuark parserGetErrorQuark() { return g_variant_parser_get_error_quark(); } } GtkD-3.7.5/generated/gtkd/glib/VariantBuilder.d000066400000000000000000000240251324604450400212500ustar00rootroot00000000000000/* * 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 glib.VariantBuilder; private import glib.ConstructionException; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * A utility type for constructing container-type #GVariant instances. * * This is an opaque structure and may only be accessed using the * following functions. * * #GVariantBuilder is not threadsafe in any way. Do not attempt to * access it from more than one thread. */ public class VariantBuilder { /** the main Gtk struct */ protected GVariantBuilder* gVariantBuilder; protected bool ownedRef; /** Get the main Gtk struct */ public GVariantBuilder* getVariantBuilderStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gVariantBuilder; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gVariantBuilder; } /** * Sets our main struct and passes it to the parent class. */ public this (GVariantBuilder* gVariantBuilder, bool ownedRef = false) { this.gVariantBuilder = gVariantBuilder; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_variant_builder_unref(gVariantBuilder); } /** * Allocates and initialises a new #GVariantBuilder. * * You should call g_variant_builder_unref() on the return value when it * is no longer needed. The memory will not be automatically freed by * any other call. * * In most cases it is easier to place a #GVariantBuilder directly on * the stack of the calling function and initialise it with * g_variant_builder_init(). * * Params: * type = a container type * * Returns: a #GVariantBuilder * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(VariantType type) { auto p = g_variant_builder_new((type is null) ? null : type.getVariantTypeStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GVariantBuilder*) p); } /** * Adds @value to @builder. * * It is an error to call this function in any way that would create an * inconsistent value to be constructed. Some examples of this are * putting different types of items into an array, putting the wrong * types or number of items in a tuple, putting more than one value into * a variant, etc. * * If @value is a floating reference (see g_variant_ref_sink()), * the @builder instance takes ownership of @value. * * Params: * value = a #GVariant * * Since: 2.24 */ public void addValue(Variant value) { g_variant_builder_add_value(gVariantBuilder, (value is null) ? null : value.getVariantStruct()); } /** * Releases all memory associated with a #GVariantBuilder without * freeing the #GVariantBuilder structure itself. * * It typically only makes sense to do this on a stack-allocated * #GVariantBuilder if you want to abort building the value part-way * through. This function need not be called if you call * g_variant_builder_end() and it also doesn't need to be called on * builders allocated with g_variant_builder_new() (see * g_variant_builder_unref() for that). * * This function leaves the #GVariantBuilder structure set to all-zeros. * It is valid to call this function on either an initialised * #GVariantBuilder or one that is set to all-zeros but it is not valid * to call this function on uninitialised memory. * * Since: 2.24 */ public void clear() { g_variant_builder_clear(gVariantBuilder); } /** * Closes the subcontainer inside the given @builder that was opened by * the most recent call to g_variant_builder_open(). * * It is an error to call this function in any way that would create an * inconsistent value to be constructed (ie: too few values added to the * subcontainer). * * Since: 2.24 */ public void close() { g_variant_builder_close(gVariantBuilder); } /** * Ends the builder process and returns the constructed value. * * It is not permissible to use @builder in any way after this call * except for reference counting operations (in the case of a * heap-allocated #GVariantBuilder) or by reinitialising it with * g_variant_builder_init() (in the case of stack-allocated). This * means that for the stack-allocated builders there is no need to * call g_variant_builder_clear() after the call to * g_variant_builder_end(). * * It is an error to call this function in any way that would create an * inconsistent value to be constructed (ie: insufficient number of * items added to a container with a specific number of children * required). It is also an error to call this function if the builder * was created with an indefinite array or maybe type and no children * have been added; in this case it is impossible to infer the type of * the empty array. * * Returns: a new, floating, #GVariant * * Since: 2.24 */ public Variant end() { auto p = g_variant_builder_end(gVariantBuilder); if(p is null) { return null; } return new Variant(cast(GVariant*) p); } /** * Initialises a #GVariantBuilder structure. * * @type must be non-%NULL. It specifies the type of container to * construct. It can be an indefinite type such as * %G_VARIANT_TYPE_ARRAY or a definite type such as "as" or "(ii)". * Maybe, array, tuple, dictionary entry and variant-typed values may be * constructed. * * After the builder is initialised, values are added using * g_variant_builder_add_value() or g_variant_builder_add(). * * After all the child values are added, g_variant_builder_end() frees * the memory associated with the builder and returns the #GVariant that * was created. * * This function completely ignores the previous contents of @builder. * On one hand this means that it is valid to pass in completely * uninitialised memory. On the other hand, this means that if you are * initialising over top of an existing #GVariantBuilder you need to * first call g_variant_builder_clear() in order to avoid leaking * memory. * * You must not call g_variant_builder_ref() or * g_variant_builder_unref() on a #GVariantBuilder that was initialised * with this function. If you ever pass a reference to a * #GVariantBuilder outside of the control of your own code then you * should assume that the person receiving that reference may try to use * reference counting; you should use g_variant_builder_new() instead of * this function. * * Params: * type = a container type * * Since: 2.24 */ public void init(VariantType type) { g_variant_builder_init(gVariantBuilder, (type is null) ? null : type.getVariantTypeStruct()); } /** * Opens a subcontainer inside the given @builder. When done adding * items to the subcontainer, g_variant_builder_close() must be called. @type * is the type of the container: so to build a tuple of several values, @type * must include the tuple itself. * * It is an error to call this function in any way that would cause an * inconsistent value to be constructed (ie: adding too many values or * a value of an incorrect type). * * Example of building a nested variant: * |[ * GVariantBuilder builder; * guint32 some_number = get_number (); * g_autoptr (GHashTable) some_dict = get_dict (); * GHashTableIter iter; * const gchar *key; * const GVariant *value; * g_autoptr (GVariant) output = NULL; * * g_variant_builder_init (&builder, G_VARIANT_TYPE ("(ua{sv})")); * g_variant_builder_add (&builder, "u", some_number); * g_variant_builder_open (&builder, G_VARIANT_TYPE ("a{sv}")); * * g_hash_table_iter_init (&iter, some_dict); * while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &value)) * { * g_variant_builder_open (&builder, G_VARIANT_TYPE ("{sv}")); * g_variant_builder_add (&builder, "s", key); * g_variant_builder_add (&builder, "v", value); * g_variant_builder_close (&builder); * } * * g_variant_builder_close (&builder); * * output = g_variant_builder_end (&builder); * ]| * * Params: * type = the #GVariantType of the container * * Since: 2.24 */ public void open(VariantType type) { g_variant_builder_open(gVariantBuilder, (type is null) ? null : type.getVariantTypeStruct()); } /** * Increases the reference count on @builder. * * Don't call this on stack-allocated #GVariantBuilder instances or bad * things will happen. * * Returns: a new reference to @builder * * Since: 2.24 */ public VariantBuilder doref() { auto p = g_variant_builder_ref(gVariantBuilder); if(p is null) { return null; } return new VariantBuilder(cast(GVariantBuilder*) p, true); } /** * Decreases the reference count on @builder. * * In the event that there are no more references, releases all memory * associated with the #GVariantBuilder. * * Don't call this on stack-allocated #GVariantBuilder instances or bad * things will happen. * * Since: 2.24 */ public void unref() { g_variant_builder_unref(gVariantBuilder); } } GtkD-3.7.5/generated/gtkd/glib/VariantDict.d000066400000000000000000000251261324604450400205500ustar00rootroot00000000000000/* * 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 glib.VariantDict; private import glib.ConstructionException; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * #GVariantDict is a mutable interface to #GVariant dictionaries. * * It can be used for doing a sequence of dictionary lookups in an * efficient way on an existing #GVariant dictionary or it can be used * to construct new dictionaries with a hashtable-like interface. It * can also be used for taking existing dictionaries and modifying them * in order to create new ones. * * #GVariantDict can only be used with %G_VARIANT_TYPE_VARDICT * dictionaries. * * It is possible to use #GVariantDict allocated on the stack or on the * heap. When using a stack-allocated #GVariantDict, you begin with a * call to g_variant_dict_init() and free the resources with a call to * g_variant_dict_clear(). * * Heap-allocated #GVariantDict follows normal refcounting rules: you * allocate it with g_variant_dict_new() and use g_variant_dict_ref() * and g_variant_dict_unref(). * * g_variant_dict_end() is used to convert the #GVariantDict back into a * dictionary-type #GVariant. When used with stack-allocated instances, * this also implicitly frees all associated memory, but for * heap-allocated instances, you must still call g_variant_dict_unref() * afterwards. * * You will typically want to use a heap-allocated #GVariantDict when * you expose it as part of an API. For most other uses, the * stack-allocated form will be more convenient. * * Consider the following two examples that do the same thing in each * style: take an existing dictionary and look up the "count" uint32 * key, adding 1 to it if it is found, or returning an error if the * key is not found. Each returns the new dictionary as a floating * #GVariant. * * ## Using a stack-allocated GVariantDict * * |[ * GVariant * * add_to_count (GVariant *orig, * GError **error) * { * GVariantDict dict; * guint32 count; * * g_variant_dict_init (&dict, orig); * if (!g_variant_dict_lookup (&dict, "count", "u", &count)) * { * g_set_error (...); * g_variant_dict_clear (&dict); * return NULL; * } * * g_variant_dict_insert (&dict, "count", "u", count + 1); * * return g_variant_dict_end (&dict); * } * ]| * * ## Using heap-allocated GVariantDict * * |[ * GVariant * * add_to_count (GVariant *orig, * GError **error) * { * GVariantDict *dict; * GVariant *result; * guint32 count; * * dict = g_variant_dict_new (orig); * * if (g_variant_dict_lookup (dict, "count", "u", &count)) * { * g_variant_dict_insert (dict, "count", "u", count + 1); * result = g_variant_dict_end (dict); * } * else * { * g_set_error (...); * result = NULL; * } * * g_variant_dict_unref (dict); * * return result; * } * ]| * * Since: 2.40 */ public class VariantDict { /** the main Gtk struct */ protected GVariantDict* gVariantDict; protected bool ownedRef; /** Get the main Gtk struct */ public GVariantDict* getVariantDictStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gVariantDict; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gVariantDict; } /** * Sets our main struct and passes it to the parent class. */ public this (GVariantDict* gVariantDict, bool ownedRef = false) { this.gVariantDict = gVariantDict; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_variant_dict_unref(gVariantDict); } /** * Allocates and initialises a new #GVariantDict. * * You should call g_variant_dict_unref() on the return value when it * is no longer needed. The memory will not be automatically freed by * any other call. * * In some cases it may be easier to place a #GVariantDict directly on * the stack of the calling function and initialise it with * g_variant_dict_init(). This is particularly useful when you are * using #GVariantDict to construct a #GVariant. * * Params: * fromAsv = the #GVariant with which to initialise the * dictionary * * Returns: a #GVariantDict * * Since: 2.40 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Variant fromAsv) { auto p = g_variant_dict_new((fromAsv is null) ? null : fromAsv.getVariantStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GVariantDict*) p); } /** * Releases all memory associated with a #GVariantDict without freeing * the #GVariantDict structure itself. * * It typically only makes sense to do this on a stack-allocated * #GVariantDict if you want to abort building the value part-way * through. This function need not be called if you call * g_variant_dict_end() and it also doesn't need to be called on dicts * allocated with g_variant_dict_new (see g_variant_dict_unref() for * that). * * It is valid to call this function on either an initialised * #GVariantDict or one that was previously cleared by an earlier call * to g_variant_dict_clear() but it is not valid to call this function * on uninitialised memory. * * Since: 2.40 */ public void clear() { g_variant_dict_clear(gVariantDict); } /** * Checks if @key exists in @dict. * * Params: * key = the key to lookup in the dictionary * * Returns: %TRUE if @key is in @dict * * Since: 2.40 */ public bool contains(string key) { return g_variant_dict_contains(gVariantDict, Str.toStringz(key)) != 0; } /** * Returns the current value of @dict as a #GVariant of type * %G_VARIANT_TYPE_VARDICT, clearing it in the process. * * It is not permissible to use @dict in any way after this call except * for reference counting operations (in the case of a heap-allocated * #GVariantDict) or by reinitialising it with g_variant_dict_init() (in * the case of stack-allocated). * * Returns: a new, floating, #GVariant * * Since: 2.40 */ public Variant end() { auto p = g_variant_dict_end(gVariantDict); if(p is null) { return null; } return new Variant(cast(GVariant*) p); } /** * Initialises a #GVariantDict structure. * * If @from_asv is given, it is used to initialise the dictionary. * * This function completely ignores the previous contents of @dict. On * one hand this means that it is valid to pass in completely * uninitialised memory. On the other hand, this means that if you are * initialising over top of an existing #GVariantDict you need to first * call g_variant_dict_clear() in order to avoid leaking memory. * * You must not call g_variant_dict_ref() or g_variant_dict_unref() on a * #GVariantDict that was initialised with this function. If you ever * pass a reference to a #GVariantDict outside of the control of your * own code then you should assume that the person receiving that * reference may try to use reference counting; you should use * g_variant_dict_new() instead of this function. * * Params: * fromAsv = the initial value for @dict * * Since: 2.40 */ public void init(Variant fromAsv) { g_variant_dict_init(gVariantDict, (fromAsv is null) ? null : fromAsv.getVariantStruct()); } /** * Inserts (or replaces) a key in a #GVariantDict. * * @value is consumed if it is floating. * * Params: * key = the key to insert a value for * value = the value to insert * * Since: 2.40 */ public void insertValue(string key, Variant value) { g_variant_dict_insert_value(gVariantDict, Str.toStringz(key), (value is null) ? null : value.getVariantStruct()); } /** * Looks up a value in a #GVariantDict. * * If @key is not found in @dictionary, %NULL is returned. * * The @expected_type string specifies what type of value is expected. * If the value associated with @key has a different type then %NULL is * returned. * * If the key is found and the value has the correct type, it is * returned. If @expected_type was specified then any non-%NULL return * value will have this type. * * Params: * key = the key to lookup in the dictionary * expectedType = a #GVariantType, or %NULL * * Returns: the value of the dictionary key, or %NULL * * Since: 2.40 */ public Variant lookupValue(string key, VariantType expectedType) { auto p = g_variant_dict_lookup_value(gVariantDict, Str.toStringz(key), (expectedType is null) ? null : expectedType.getVariantTypeStruct()); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Increases the reference count on @dict. * * Don't call this on stack-allocated #GVariantDict instances or bad * things will happen. * * Returns: a new reference to @dict * * Since: 2.40 */ public VariantDict doref() { auto p = g_variant_dict_ref(gVariantDict); if(p is null) { return null; } return new VariantDict(cast(GVariantDict*) p, true); } /** * Removes a key and its associated value from a #GVariantDict. * * Params: * key = the key to remove * * Returns: %TRUE if the key was found and removed * * Since: 2.40 */ public bool remove(string key) { return g_variant_dict_remove(gVariantDict, Str.toStringz(key)) != 0; } /** * Decreases the reference count on @dict. * * In the event that there are no more references, releases all memory * associated with the #GVariantDict. * * Don't call this on stack-allocated #GVariantDict instances or bad * things will happen. * * Since: 2.40 */ public void unref() { g_variant_dict_unref(gVariantDict); } } GtkD-3.7.5/generated/gtkd/glib/VariantIter.d000066400000000000000000000115421324604450400205650ustar00rootroot00000000000000/* * 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 glib.VariantIter; private import glib.Str; private import glib.Variant; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * #GVariantIter is an opaque data structure and can only be accessed * using the following functions. */ public class VariantIter { /** the main Gtk struct */ protected GVariantIter* gVariantIter; protected bool ownedRef; /** Get the main Gtk struct */ public GVariantIter* getVariantIterStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gVariantIter; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gVariantIter; } /** * Sets our main struct and passes it to the parent class. */ public this (GVariantIter* gVariantIter, bool ownedRef = false) { this.gVariantIter = gVariantIter; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_variant_iter_free(gVariantIter); } /** * Creates a new heap-allocated #GVariantIter to iterate over the * container that was being iterated over by @iter. Iteration begins on * the new iterator from the current position of the old iterator but * the two copies are independent past that point. * * Use g_variant_iter_free() to free the return value when you no longer * need it. * * A reference is taken to the container that @iter is iterating over * and will be releated only when g_variant_iter_free() is called. * * Returns: a new heap-allocated #GVariantIter * * Since: 2.24 */ public VariantIter copy() { auto p = g_variant_iter_copy(gVariantIter); if(p is null) { return null; } return new VariantIter(cast(GVariantIter*) p, true); } /** * Frees a heap-allocated #GVariantIter. Only call this function on * iterators that were returned by g_variant_iter_new() or * g_variant_iter_copy(). * * Since: 2.24 */ public void free() { g_variant_iter_free(gVariantIter); ownedRef = false; } /** * Initialises (without allocating) a #GVariantIter. @iter may be * completely uninitialised prior to this call; its old value is * ignored. * * The iterator remains valid for as long as @value exists, and need not * be freed in any way. * * Params: * value = a container #GVariant * * Returns: the number of items in @value * * Since: 2.24 */ public size_t init(Variant value) { return g_variant_iter_init(gVariantIter, (value is null) ? null : value.getVariantStruct()); } /** * Queries the number of child items in the container that we are * iterating over. This is the total number of items -- not the number * of items remaining. * * This function might be useful for preallocation of arrays. * * Returns: the number of children in the container * * Since: 2.24 */ public size_t nChildren() { return g_variant_iter_n_children(gVariantIter); } /** * Gets the next item in the container. If no more items remain then * %NULL is returned. * * Use g_variant_unref() to drop your reference on the return value when * you no longer need it. * * Here is an example for iterating with g_variant_iter_next_value(): * |[ * // recursively iterate a container * void * iterate_container_recursive (GVariant *container) * { * GVariantIter iter; * GVariant *child; * * g_variant_iter_init (&iter, container); * while ((child = g_variant_iter_next_value (&iter))) * { * g_print ("type '%s'\n", g_variant_get_type_string (child)); * * if (g_variant_is_container (child)) * iterate_container_recursive (child); * * g_variant_unref (child); * } * } * ]| * * Returns: a #GVariant, or %NULL * * Since: 2.24 */ public Variant nextValue() { auto p = g_variant_iter_next_value(gVariantIter); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } } GtkD-3.7.5/generated/gtkd/glib/VariantType.d000066400000000000000000000624141324604450400206070ustar00rootroot00000000000000/* * 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 glib.VariantType; private import glib.ConstructionException; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; private import gtkd.Loader; /** * This section introduces the GVariant type system. It is based, in * large part, on the D-Bus type system, with two major changes and * some minor lifting of restrictions. The * [D-Bus specification](http://dbus.freedesktop.org/doc/dbus-specification.html), * therefore, provides a significant amount of * information that is useful when working with GVariant. * * The first major change with respect to the D-Bus type system is the * introduction of maybe (or "nullable") types. Any type in GVariant can be * converted to a maybe type, in which case, "nothing" (or "null") becomes a * valid value. Maybe types have been added by introducing the * character "m" to type strings. * * The second major change is that the GVariant type system supports the * concept of "indefinite types" -- types that are less specific than * the normal types found in D-Bus. For example, it is possible to speak * of "an array of any type" in GVariant, where the D-Bus type system * would require you to speak of "an array of integers" or "an array of * strings". Indefinite types have been added by introducing the * characters "*", "?" and "r" to type strings. * * Finally, all arbitrary restrictions relating to the complexity of * types are lifted along with the restriction that dictionary entries * may only appear nested inside of arrays. * * Just as in D-Bus, GVariant types are described with strings ("type * strings"). Subject to the differences mentioned above, these strings * are of the same form as those found in DBus. Note, however: D-Bus * always works in terms of messages and therefore individual type * strings appear nowhere in its interface. Instead, "signatures" * are a concatenation of the strings of the type of each argument in a * message. GVariant deals with single values directly so GVariant type * strings always describe the type of exactly one value. This means * that a D-Bus signature string is generally not a valid GVariant type * string -- except in the case that it is the signature of a message * containing exactly one argument. * * An indefinite type is similar in spirit to what may be called an * abstract type in other type systems. No value can exist that has an * indefinite type as its type, but values can exist that have types * that are subtypes of indefinite types. That is to say, * g_variant_get_type() will never return an indefinite type, but * calling g_variant_is_of_type() with an indefinite type may return * %TRUE. For example, you cannot have a value that represents "an * array of no particular type", but you can have an "array of integers" * which certainly matches the type of "an array of no particular type", * since "array of integers" is a subtype of "array of no particular * type". * * This is similar to how instances of abstract classes may not * directly exist in other type systems, but instances of their * non-abstract subtypes may. For example, in GTK, no object that has * the type of #GtkBin can exist (since #GtkBin is an abstract class), * but a #GtkWindow can certainly be instantiated, and you would say * that the #GtkWindow is a #GtkBin (since #GtkWindow is a subclass of * #GtkBin). * * ## GVariant Type Strings * * A GVariant type string can be any of the following: * * - any basic type string (listed below) * * - "v", "r" or "*" * * - one of the characters 'a' or 'm', followed by another type string * * - the character '(', followed by a concatenation of zero or more other * type strings, followed by the character ')' * * - the character '{', followed by a basic type string (see below), * followed by another type string, followed by the character '}' * * A basic type string describes a basic type (as per * g_variant_type_is_basic()) and is always a single character in length. * The valid basic type strings are "b", "y", "n", "q", "i", "u", "x", "t", * "h", "d", "s", "o", "g" and "?". * * The above definition is recursive to arbitrary depth. "aaaaai" and * "(ui(nq((y)))s)" are both valid type strings, as is * "a(aa(ui)(qna{ya(yd)}))". * * The meaning of each of the characters is as follows: * - `b`: the type string of %G_VARIANT_TYPE_BOOLEAN; a boolean value. * - `y`: the type string of %G_VARIANT_TYPE_BYTE; a byte. * - `n`: the type string of %G_VARIANT_TYPE_INT16; a signed 16 bit integer. * - `q`: the type string of %G_VARIANT_TYPE_UINT16; an unsigned 16 bit integer. * - `i`: the type string of %G_VARIANT_TYPE_INT32; a signed 32 bit integer. * - `u`: the type string of %G_VARIANT_TYPE_UINT32; an unsigned 32 bit integer. * - `x`: the type string of %G_VARIANT_TYPE_INT64; a signed 64 bit integer. * - `t`: the type string of %G_VARIANT_TYPE_UINT64; an unsigned 64 bit integer. * - `h`: the type string of %G_VARIANT_TYPE_HANDLE; a signed 32 bit value * that, by convention, is used as an index into an array of file * descriptors that are sent alongside a D-Bus message. * - `d`: the type string of %G_VARIANT_TYPE_DOUBLE; a double precision * floating point value. * - `s`: the type string of %G_VARIANT_TYPE_STRING; a string. * - `o`: the type string of %G_VARIANT_TYPE_OBJECT_PATH; a string in the form * of a D-Bus object path. * - `g`: the type string of %G_VARIANT_TYPE_SIGNATURE; a string in the form of * a D-Bus type signature. * - `?`: the type string of %G_VARIANT_TYPE_BASIC; an indefinite type that * is a supertype of any of the basic types. * - `v`: the type string of %G_VARIANT_TYPE_VARIANT; a container type that * contain any other type of value. * - `a`: used as a prefix on another type string to mean an array of that * type; the type string "ai", for example, is the type of an array of * signed 32-bit integers. * - `m`: used as a prefix on another type string to mean a "maybe", or * "nullable", version of that type; the type string "ms", for example, * is the type of a value that maybe contains a string, or maybe contains * nothing. * - `()`: used to enclose zero or more other concatenated type strings to * create a tuple type; the type string "(is)", for example, is the type of * a pair of an integer and a string. * - `r`: the type string of %G_VARIANT_TYPE_TUPLE; an indefinite type that is * a supertype of any tuple type, regardless of the number of items. * - `{}`: used to enclose a basic type string concatenated with another type * string to create a dictionary entry type, which usually appears inside of * an array to form a dictionary; the type string "a{sd}", for example, is * the type of a dictionary that maps strings to double precision floating * point values. * * The first type (the basic type) is the key type and the second type is * the value type. The reason that the first type is restricted to being a * basic type is so that it can easily be hashed. * - `*`: the type string of %G_VARIANT_TYPE_ANY; the indefinite type that is * a supertype of all types. Note that, as with all type strings, this * character represents exactly one type. It cannot be used inside of tuples * to mean "any number of items". * * Any type string of a container that contains an indefinite type is, * itself, an indefinite type. For example, the type string "a*" * (corresponding to %G_VARIANT_TYPE_ARRAY) is an indefinite type * that is a supertype of every array type. "(*s)" is a supertype * of all tuples that contain exactly two items where the second * item is a string. * * "a{?*}" is an indefinite type that is a supertype of all arrays * containing dictionary entries where the key is any basic type and * the value is any type at all. This is, by definition, a dictionary, * so this type string corresponds to %G_VARIANT_TYPE_DICTIONARY. Note * that, due to the restriction that the key of a dictionary entry must * be a basic type, "{**}" is not a valid type string. */ public class VariantType { /** the main Gtk struct */ protected GVariantType* gVariantType; protected bool ownedRef; /** Get the main Gtk struct */ public GVariantType* getVariantTypeStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gVariantType; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gVariantType; } /** * Sets our main struct and passes it to the parent class. */ public this (GVariantType* gVariantType, bool ownedRef = false) { this.gVariantType = gVariantType; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GLIB) && ownedRef ) g_variant_type_free(gVariantType); } /** * Constructs the type corresponding to a maybe instance containing * type type or Nothing. * * It is appropriate to call free() on the return value. * * Params: * element = a VariantType * * Return: a new maybe VariantType * * Since 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public static VariantType newMaybe(VariantType element) { auto p = g_variant_type_new_maybe((element is null) ? null : element.getVariantTypeStruct()); if(p is null) { throw new ConstructionException("null returned by new_maybe"); } return new VariantType(cast(GVariantType*) p); } /** */ /** * Creates a new #GVariantType corresponding to the type string given * by @type_string. It is appropriate to call g_variant_type_free() on * the return value. * * It is a programmer error to call this function with an invalid type * string. Use g_variant_type_string_is_valid() if you are unsure. * * Params: * typeString = a valid GVariant type string * * Returns: a new #GVariantType * * Since: 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string typeString) { auto p = g_variant_type_new(Str.toStringz(typeString)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GVariantType*) p); } /** * Constructs the type corresponding to an array of elements of the * type @type. * * It is appropriate to call g_variant_type_free() on the return value. * * Params: * element = a #GVariantType * * Returns: a new array #GVariantType * * Since 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(VariantType element) { auto p = g_variant_type_new_array((element is null) ? null : element.getVariantTypeStruct()); if(p is null) { throw new ConstructionException("null returned by new_array"); } this(cast(GVariantType*) p); } /** * Constructs the type corresponding to a dictionary entry with a key * of type @key and a value of type @value. * * It is appropriate to call g_variant_type_free() on the return value. * * Params: * key = a basic #GVariantType * value = a #GVariantType * * Returns: a new dictionary entry #GVariantType * * Since 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(VariantType key, VariantType value) { auto p = g_variant_type_new_dict_entry((key is null) ? null : key.getVariantTypeStruct(), (value is null) ? null : value.getVariantTypeStruct()); if(p is null) { throw new ConstructionException("null returned by new_dict_entry"); } this(cast(GVariantType*) p); } /** * Constructs a new tuple type, from @items. * * @length is the number of items in @items, or -1 to indicate that * @items is %NULL-terminated. * * It is appropriate to call g_variant_type_free() on the return value. * * Params: * items = an array of #GVariantTypes, one for each item * * Returns: a new tuple #GVariantType * * Since 2.24 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(VariantType[] items) { GVariantType*[] itemsArray = new GVariantType*[items.length]; for ( int i = 0; i < items.length; i++ ) { itemsArray[i] = items[i].getVariantTypeStruct(); } auto p = g_variant_type_new_tuple(itemsArray.ptr, cast(int)items.length); if(p is null) { throw new ConstructionException("null returned by new_tuple"); } this(cast(GVariantType*) p); } /** * Makes a copy of a #GVariantType. It is appropriate to call * g_variant_type_free() on the return value. @type may not be %NULL. * * Returns: a new #GVariantType * * Since 2.24 */ public VariantType copy() { auto p = g_variant_type_copy(gVariantType); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p, true); } /** * Returns a newly-allocated copy of the type string corresponding to * @type. The returned string is nul-terminated. It is appropriate to * call g_free() on the return value. * * Returns: the corresponding type string * * Since 2.24 */ public string dupString() { auto retStr = g_variant_type_dup_string(gVariantType); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Determines the element type of an array or maybe type. * * This function may only be used with array or maybe types. * * Returns: the element type of @type * * Since 2.24 */ public VariantType element() { auto p = g_variant_type_element(gVariantType); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Compares @type1 and @type2 for equality. * * Only returns %TRUE if the types are exactly equal. Even if one type * is an indefinite type and the other is a subtype of it, %FALSE will * be returned if they are not exactly equal. If you want to check for * subtypes, use g_variant_type_is_subtype_of(). * * The argument types of @type1 and @type2 are only #gconstpointer to * allow use with #GHashTable without function pointer casting. For * both arguments, a valid #GVariantType must be provided. * * Params: * type2 = a #GVariantType * * Returns: %TRUE if @type1 and @type2 are exactly equal * * Since 2.24 */ public bool equal(VariantType type2) { return g_variant_type_equal(gVariantType, (type2 is null) ? null : type2.getVariantTypeStruct()) != 0; } /** * Determines the first item type of a tuple or dictionary entry * type. * * This function may only be used with tuple or dictionary entry types, * but must not be used with the generic tuple type * %G_VARIANT_TYPE_TUPLE. * * In the case of a dictionary entry type, this returns the type of * the key. * * %NULL is returned in case of @type being %G_VARIANT_TYPE_UNIT. * * This call, together with g_variant_type_next() provides an iterator * interface over tuple and dictionary entry types. * * Returns: the first item type of @type, or %NULL * * Since 2.24 */ public VariantType first() { auto p = g_variant_type_first(gVariantType); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Frees a #GVariantType that was allocated with * g_variant_type_copy(), g_variant_type_new() or one of the container * type constructor functions. * * In the case that @type is %NULL, this function does nothing. * * Since 2.24 */ public void free() { g_variant_type_free(gVariantType); ownedRef = false; } /** * Returns the length of the type string corresponding to the given * @type. This function must be used to determine the valid extent of * the memory region returned by g_variant_type_peek_string(). * * Returns: the length of the corresponding type string * * Since 2.24 */ public size_t getStringLength() { return g_variant_type_get_string_length(gVariantType); } /** * Hashes @type. * * The argument type of @type is only #gconstpointer to allow use with * #GHashTable without function pointer casting. A valid * #GVariantType must be provided. * * Returns: the hash value * * Since 2.24 */ public uint hash() { return g_variant_type_hash(gVariantType); } /** * Determines if the given @type is an array type. This is true if the * type string for @type starts with an 'a'. * * This function returns %TRUE for any indefinite type for which every * definite subtype is an array type -- %G_VARIANT_TYPE_ARRAY, for * example. * * Returns: %TRUE if @type is an array type * * Since 2.24 */ public bool isArray() { return g_variant_type_is_array(gVariantType) != 0; } /** * Determines if the given @type is a basic type. * * Basic types are booleans, bytes, integers, doubles, strings, object * paths and signatures. * * Only a basic type may be used as the key of a dictionary entry. * * This function returns %FALSE for all indefinite types except * %G_VARIANT_TYPE_BASIC. * * Returns: %TRUE if @type is a basic type * * Since 2.24 */ public bool isBasic() { return g_variant_type_is_basic(gVariantType) != 0; } /** * Determines if the given @type is a container type. * * Container types are any array, maybe, tuple, or dictionary * entry types plus the variant type. * * This function returns %TRUE for any indefinite type for which every * definite subtype is a container -- %G_VARIANT_TYPE_ARRAY, for * example. * * Returns: %TRUE if @type is a container type * * Since 2.24 */ public bool isContainer() { return g_variant_type_is_container(gVariantType) != 0; } /** * Determines if the given @type is definite (ie: not indefinite). * * A type is definite if its type string does not contain any indefinite * type characters ('*', '?', or 'r'). * * A #GVariant instance may not have an indefinite type, so calling * this function on the result of g_variant_get_type() will always * result in %TRUE being returned. Calling this function on an * indefinite type like %G_VARIANT_TYPE_ARRAY, however, will result in * %FALSE being returned. * * Returns: %TRUE if @type is definite * * Since 2.24 */ public bool isDefinite() { return g_variant_type_is_definite(gVariantType) != 0; } /** * Determines if the given @type is a dictionary entry type. This is * true if the type string for @type starts with a '{'. * * This function returns %TRUE for any indefinite type for which every * definite subtype is a dictionary entry type -- * %G_VARIANT_TYPE_DICT_ENTRY, for example. * * Returns: %TRUE if @type is a dictionary entry type * * Since 2.24 */ public bool isDictEntry() { return g_variant_type_is_dict_entry(gVariantType) != 0; } /** * Determines if the given @type is a maybe type. This is true if the * type string for @type starts with an 'm'. * * This function returns %TRUE for any indefinite type for which every * definite subtype is a maybe type -- %G_VARIANT_TYPE_MAYBE, for * example. * * Returns: %TRUE if @type is a maybe type * * Since 2.24 */ public bool isMaybe() { return g_variant_type_is_maybe(gVariantType) != 0; } /** * Checks if @type is a subtype of @supertype. * * This function returns %TRUE if @type is a subtype of @supertype. All * types are considered to be subtypes of themselves. Aside from that, * only indefinite types can have subtypes. * * Params: * supertype = a #GVariantType * * Returns: %TRUE if @type is a subtype of @supertype * * Since 2.24 */ public bool isSubtypeOf(VariantType supertype) { return g_variant_type_is_subtype_of(gVariantType, (supertype is null) ? null : supertype.getVariantTypeStruct()) != 0; } /** * Determines if the given @type is a tuple type. This is true if the * type string for @type starts with a '(' or if @type is * %G_VARIANT_TYPE_TUPLE. * * This function returns %TRUE for any indefinite type for which every * definite subtype is a tuple type -- %G_VARIANT_TYPE_TUPLE, for * example. * * Returns: %TRUE if @type is a tuple type * * Since 2.24 */ public bool isTuple() { return g_variant_type_is_tuple(gVariantType) != 0; } /** * Determines if the given @type is the variant type. * * Returns: %TRUE if @type is the variant type * * Since 2.24 */ public bool isVariant() { return g_variant_type_is_variant(gVariantType) != 0; } /** * Determines the key type of a dictionary entry type. * * This function may only be used with a dictionary entry type. Other * than the additional restriction, this call is equivalent to * g_variant_type_first(). * * Returns: the key type of the dictionary entry * * Since 2.24 */ public VariantType key() { auto p = g_variant_type_key(gVariantType); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Determines the number of items contained in a tuple or * dictionary entry type. * * This function may only be used with tuple or dictionary entry types, * but must not be used with the generic tuple type * %G_VARIANT_TYPE_TUPLE. * * In the case of a dictionary entry type, this function will always * return 2. * * Returns: the number of items in @type * * Since 2.24 */ public size_t nItems() { return g_variant_type_n_items(gVariantType); } /** * Determines the next item type of a tuple or dictionary entry * type. * * @type must be the result of a previous call to * g_variant_type_first() or g_variant_type_next(). * * If called on the key type of a dictionary entry then this call * returns the value type. If called on the value type of a dictionary * entry then this call returns %NULL. * * For tuples, %NULL is returned when @type is the last item in a tuple. * * Returns: the next #GVariantType after @type, or %NULL * * Since 2.24 */ public VariantType next() { auto p = g_variant_type_next(gVariantType); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Returns the type string corresponding to the given @type. The * result is not nul-terminated; in order to determine its length you * must call g_variant_type_get_string_length(). * * To get a nul-terminated string, see g_variant_type_dup_string(). * * Returns: the corresponding type string (not nul-terminated) * * Since 2.24 */ public string peekString() { return Str.toString(g_variant_type_peek_string(gVariantType)); } /** * Determines the value type of a dictionary entry type. * * This function may only be used with a dictionary entry type. * * Returns: the value type of the dictionary entry * * Since 2.24 */ public VariantType value() { auto p = g_variant_type_value(gVariantType); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** */ public static VariantType checked(string arg0) { auto p = g_variant_type_checked_(Str.toStringz(arg0)); if(p is null) { return null; } return new VariantType(cast(GVariantType*) p); } /** * Checks if @type_string is a valid GVariant type string. This call is * equivalent to calling g_variant_type_string_scan() and confirming * that the following character is a nul terminator. * * Params: * typeString = a pointer to any string * * Returns: %TRUE if @type_string is exactly one valid type string * * Since 2.24 */ public static bool stringIsValid(string typeString) { return g_variant_type_string_is_valid(Str.toStringz(typeString)) != 0; } /** * Scan for a single complete and valid GVariant type string in @string. * The memory pointed to by @limit (or bytes beyond it) is never * accessed. * * If a valid type string is found, @endptr is updated to point to the * first character past the end of the string that was found and %TRUE * is returned. * * If there is no valid type string starting at @string, or if the type * string does not end before @limit then %FALSE is returned. * * For the simple case of checking if a string is a valid type string, * see g_variant_type_string_is_valid(). * * Params: * str = a pointer to any string * limit = the end of @string, or %NULL * endptr = location to store the end pointer, or %NULL * * Returns: %TRUE if a valid type string was found * * Since: 2.24 */ public static bool stringScan(string str, string limit, out string endptr) { char* outendptr = null; auto p = g_variant_type_string_scan(Str.toStringz(str), Str.toStringz(limit), &outendptr) != 0; endptr = Str.toString(outendptr); return p; } } GtkD-3.7.5/generated/gtkd/glib/Version.d000066400000000000000000000046211324604450400177620ustar00rootroot00000000000000/* * 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 glib.Version; private import glib.Str; private import glib.c.functions; public import glib.c.types; public import gtkc.glibtypes; /** */ public struct Version { /** * Checks that the GLib library in use is compatible with the * given version. Generally you would pass in the constants * #GLIB_MAJOR_VERSION, #GLIB_MINOR_VERSION, #GLIB_MICRO_VERSION * as the three arguments to this function; that produces * a check that the library in use is compatible with * the version of GLib the application or module was compiled * against. * * Compatibility is defined by two things: first the version * of the running library is newer than the version * @required_major.required_minor.@required_micro. Second * the running library must be binary compatible with the * version @required_major.required_minor.@required_micro * (same major version.) * * Params: * requiredMajor = the required major version * requiredMinor = the required minor version * requiredMicro = the required micro version * * Returns: %NULL if the GLib library is compatible with the * given version, or a string describing the version mismatch. * The returned string is owned by GLib and must not be modified * or freed. * * Since: 2.6 */ public static string checkVersion(uint requiredMajor, uint requiredMinor, uint requiredMicro) { return Str.toString(glib_check_version(requiredMajor, requiredMinor, requiredMicro)); } } GtkD-3.7.5/generated/gtkd/glib/c/000077500000000000000000000000001324604450400164075ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/glib/c/functions.d000066400000000000000000011004301324604450400205630ustar00rootroot00000000000000/* * 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 glib.c.functions; import std.stdio; import glib.c.types; import gobject.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GLIB = ["libglib-2.0-0.dll", "libgmodule-2.0-0.dll", "libgobject-2.0-0.dll"]; else version (OSX) static immutable LIBRARY_GLIB = ["libglib-2.0.0.dylib", "libgmodule-2.0.0.dylib", "libgobject-2.0.0.dylib"]; else static immutable LIBRARY_GLIB = ["libglib-2.0.so.0", "libgmodule-2.0.so.0", "libgobject-2.0.so.0"]; shared static this() { // glib.ArrayG Linker.link(g_array_append_vals, "g_array_append_vals", LIBRARY_GLIB); Linker.link(g_array_free, "g_array_free", LIBRARY_GLIB); Linker.link(g_array_get_element_size, "g_array_get_element_size", LIBRARY_GLIB); Linker.link(g_array_insert_vals, "g_array_insert_vals", LIBRARY_GLIB); Linker.link(g_array_new, "g_array_new", LIBRARY_GLIB); Linker.link(g_array_prepend_vals, "g_array_prepend_vals", LIBRARY_GLIB); Linker.link(g_array_ref, "g_array_ref", LIBRARY_GLIB); Linker.link(g_array_remove_index, "g_array_remove_index", LIBRARY_GLIB); Linker.link(g_array_remove_index_fast, "g_array_remove_index_fast", LIBRARY_GLIB); Linker.link(g_array_remove_range, "g_array_remove_range", LIBRARY_GLIB); Linker.link(g_array_set_clear_func, "g_array_set_clear_func", LIBRARY_GLIB); Linker.link(g_array_set_size, "g_array_set_size", LIBRARY_GLIB); Linker.link(g_array_sized_new, "g_array_sized_new", LIBRARY_GLIB); Linker.link(g_array_sort, "g_array_sort", LIBRARY_GLIB); Linker.link(g_array_sort_with_data, "g_array_sort_with_data", LIBRARY_GLIB); Linker.link(g_array_unref, "g_array_unref", LIBRARY_GLIB); // glib.AsyncQueue Linker.link(g_async_queue_length, "g_async_queue_length", LIBRARY_GLIB); Linker.link(g_async_queue_length_unlocked, "g_async_queue_length_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_lock, "g_async_queue_lock", LIBRARY_GLIB); Linker.link(g_async_queue_pop, "g_async_queue_pop", LIBRARY_GLIB); Linker.link(g_async_queue_pop_unlocked, "g_async_queue_pop_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_push, "g_async_queue_push", LIBRARY_GLIB); Linker.link(g_async_queue_push_front, "g_async_queue_push_front", LIBRARY_GLIB); Linker.link(g_async_queue_push_front_unlocked, "g_async_queue_push_front_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_push_sorted, "g_async_queue_push_sorted", LIBRARY_GLIB); Linker.link(g_async_queue_push_sorted_unlocked, "g_async_queue_push_sorted_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_push_unlocked, "g_async_queue_push_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_ref, "g_async_queue_ref", LIBRARY_GLIB); Linker.link(g_async_queue_ref_unlocked, "g_async_queue_ref_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_remove, "g_async_queue_remove", LIBRARY_GLIB); Linker.link(g_async_queue_remove_unlocked, "g_async_queue_remove_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_sort, "g_async_queue_sort", LIBRARY_GLIB); Linker.link(g_async_queue_sort_unlocked, "g_async_queue_sort_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_timed_pop, "g_async_queue_timed_pop", LIBRARY_GLIB); Linker.link(g_async_queue_timed_pop_unlocked, "g_async_queue_timed_pop_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_timeout_pop, "g_async_queue_timeout_pop", LIBRARY_GLIB); Linker.link(g_async_queue_timeout_pop_unlocked, "g_async_queue_timeout_pop_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_try_pop, "g_async_queue_try_pop", LIBRARY_GLIB); Linker.link(g_async_queue_try_pop_unlocked, "g_async_queue_try_pop_unlocked", LIBRARY_GLIB); Linker.link(g_async_queue_unlock, "g_async_queue_unlock", LIBRARY_GLIB); Linker.link(g_async_queue_unref, "g_async_queue_unref", LIBRARY_GLIB); Linker.link(g_async_queue_unref_and_unlock, "g_async_queue_unref_and_unlock", LIBRARY_GLIB); Linker.link(g_async_queue_new, "g_async_queue_new", LIBRARY_GLIB); Linker.link(g_async_queue_new_full, "g_async_queue_new_full", LIBRARY_GLIB); // glib.BookmarkFile Linker.link(g_bookmark_file_add_application, "g_bookmark_file_add_application", LIBRARY_GLIB); Linker.link(g_bookmark_file_add_group, "g_bookmark_file_add_group", LIBRARY_GLIB); Linker.link(g_bookmark_file_free, "g_bookmark_file_free", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_added, "g_bookmark_file_get_added", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_app_info, "g_bookmark_file_get_app_info", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_applications, "g_bookmark_file_get_applications", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_description, "g_bookmark_file_get_description", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_groups, "g_bookmark_file_get_groups", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_icon, "g_bookmark_file_get_icon", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_is_private, "g_bookmark_file_get_is_private", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_mime_type, "g_bookmark_file_get_mime_type", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_modified, "g_bookmark_file_get_modified", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_size, "g_bookmark_file_get_size", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_title, "g_bookmark_file_get_title", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_uris, "g_bookmark_file_get_uris", LIBRARY_GLIB); Linker.link(g_bookmark_file_get_visited, "g_bookmark_file_get_visited", LIBRARY_GLIB); Linker.link(g_bookmark_file_has_application, "g_bookmark_file_has_application", LIBRARY_GLIB); Linker.link(g_bookmark_file_has_group, "g_bookmark_file_has_group", LIBRARY_GLIB); Linker.link(g_bookmark_file_has_item, "g_bookmark_file_has_item", LIBRARY_GLIB); Linker.link(g_bookmark_file_load_from_data, "g_bookmark_file_load_from_data", LIBRARY_GLIB); Linker.link(g_bookmark_file_load_from_data_dirs, "g_bookmark_file_load_from_data_dirs", LIBRARY_GLIB); Linker.link(g_bookmark_file_load_from_file, "g_bookmark_file_load_from_file", LIBRARY_GLIB); Linker.link(g_bookmark_file_move_item, "g_bookmark_file_move_item", LIBRARY_GLIB); Linker.link(g_bookmark_file_remove_application, "g_bookmark_file_remove_application", LIBRARY_GLIB); Linker.link(g_bookmark_file_remove_group, "g_bookmark_file_remove_group", LIBRARY_GLIB); Linker.link(g_bookmark_file_remove_item, "g_bookmark_file_remove_item", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_added, "g_bookmark_file_set_added", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_app_info, "g_bookmark_file_set_app_info", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_description, "g_bookmark_file_set_description", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_groups, "g_bookmark_file_set_groups", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_icon, "g_bookmark_file_set_icon", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_is_private, "g_bookmark_file_set_is_private", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_mime_type, "g_bookmark_file_set_mime_type", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_modified, "g_bookmark_file_set_modified", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_title, "g_bookmark_file_set_title", LIBRARY_GLIB); Linker.link(g_bookmark_file_set_visited, "g_bookmark_file_set_visited", LIBRARY_GLIB); Linker.link(g_bookmark_file_to_data, "g_bookmark_file_to_data", LIBRARY_GLIB); Linker.link(g_bookmark_file_to_file, "g_bookmark_file_to_file", LIBRARY_GLIB); Linker.link(g_bookmark_file_error_quark, "g_bookmark_file_error_quark", LIBRARY_GLIB); Linker.link(g_bookmark_file_new, "g_bookmark_file_new", LIBRARY_GLIB); // glib.ByteArray Linker.link(g_byte_array_append, "g_byte_array_append", LIBRARY_GLIB); Linker.link(g_byte_array_free, "g_byte_array_free", LIBRARY_GLIB); Linker.link(g_byte_array_free_to_bytes, "g_byte_array_free_to_bytes", LIBRARY_GLIB); Linker.link(g_byte_array_new, "g_byte_array_new", LIBRARY_GLIB); Linker.link(g_byte_array_new_take, "g_byte_array_new_take", LIBRARY_GLIB); Linker.link(g_byte_array_prepend, "g_byte_array_prepend", LIBRARY_GLIB); Linker.link(g_byte_array_ref, "g_byte_array_ref", LIBRARY_GLIB); Linker.link(g_byte_array_remove_index, "g_byte_array_remove_index", LIBRARY_GLIB); Linker.link(g_byte_array_remove_index_fast, "g_byte_array_remove_index_fast", LIBRARY_GLIB); Linker.link(g_byte_array_remove_range, "g_byte_array_remove_range", LIBRARY_GLIB); Linker.link(g_byte_array_set_size, "g_byte_array_set_size", LIBRARY_GLIB); Linker.link(g_byte_array_sized_new, "g_byte_array_sized_new", LIBRARY_GLIB); Linker.link(g_byte_array_sort, "g_byte_array_sort", LIBRARY_GLIB); Linker.link(g_byte_array_sort_with_data, "g_byte_array_sort_with_data", LIBRARY_GLIB); Linker.link(g_byte_array_unref, "g_byte_array_unref", LIBRARY_GLIB); // glib.Bytes Linker.link(g_bytes_new, "g_bytes_new", LIBRARY_GLIB); Linker.link(g_bytes_new_static, "g_bytes_new_static", LIBRARY_GLIB); Linker.link(g_bytes_new_take, "g_bytes_new_take", LIBRARY_GLIB); Linker.link(g_bytes_new_with_free_func, "g_bytes_new_with_free_func", LIBRARY_GLIB); Linker.link(g_bytes_compare, "g_bytes_compare", LIBRARY_GLIB); Linker.link(g_bytes_equal, "g_bytes_equal", LIBRARY_GLIB); Linker.link(g_bytes_get_data, "g_bytes_get_data", LIBRARY_GLIB); Linker.link(g_bytes_get_size, "g_bytes_get_size", LIBRARY_GLIB); Linker.link(g_bytes_hash, "g_bytes_hash", LIBRARY_GLIB); Linker.link(g_bytes_new_from_bytes, "g_bytes_new_from_bytes", LIBRARY_GLIB); Linker.link(g_bytes_ref, "g_bytes_ref", LIBRARY_GLIB); Linker.link(g_bytes_unref, "g_bytes_unref", LIBRARY_GLIB); Linker.link(g_bytes_unref_to_array, "g_bytes_unref_to_array", LIBRARY_GLIB); Linker.link(g_bytes_unref_to_data, "g_bytes_unref_to_data", LIBRARY_GLIB); // glib.Checksum Linker.link(g_checksum_new, "g_checksum_new", LIBRARY_GLIB); Linker.link(g_checksum_copy, "g_checksum_copy", LIBRARY_GLIB); Linker.link(g_checksum_free, "g_checksum_free", LIBRARY_GLIB); Linker.link(g_checksum_get_digest, "g_checksum_get_digest", LIBRARY_GLIB); Linker.link(g_checksum_get_string, "g_checksum_get_string", LIBRARY_GLIB); Linker.link(g_checksum_reset, "g_checksum_reset", LIBRARY_GLIB); Linker.link(g_checksum_update, "g_checksum_update", LIBRARY_GLIB); Linker.link(g_checksum_type_get_length, "g_checksum_type_get_length", LIBRARY_GLIB); Linker.link(g_compute_checksum_for_bytes, "g_compute_checksum_for_bytes", LIBRARY_GLIB); Linker.link(g_compute_checksum_for_data, "g_compute_checksum_for_data", LIBRARY_GLIB); Linker.link(g_compute_checksum_for_string, "g_compute_checksum_for_string", LIBRARY_GLIB); // glib.Cond Linker.link(g_cond_broadcast, "g_cond_broadcast", LIBRARY_GLIB); Linker.link(g_cond_clear, "g_cond_clear", LIBRARY_GLIB); Linker.link(g_cond_init, "g_cond_init", LIBRARY_GLIB); Linker.link(g_cond_signal, "g_cond_signal", LIBRARY_GLIB); Linker.link(g_cond_wait, "g_cond_wait", LIBRARY_GLIB); Linker.link(g_cond_wait_until, "g_cond_wait_until", LIBRARY_GLIB); // glib.Date Linker.link(g_date_new, "g_date_new", LIBRARY_GLIB); Linker.link(g_date_new_dmy, "g_date_new_dmy", LIBRARY_GLIB); Linker.link(g_date_new_julian, "g_date_new_julian", LIBRARY_GLIB); Linker.link(g_date_add_days, "g_date_add_days", LIBRARY_GLIB); Linker.link(g_date_add_months, "g_date_add_months", LIBRARY_GLIB); Linker.link(g_date_add_years, "g_date_add_years", LIBRARY_GLIB); Linker.link(g_date_clamp, "g_date_clamp", LIBRARY_GLIB); Linker.link(g_date_clear, "g_date_clear", LIBRARY_GLIB); Linker.link(g_date_compare, "g_date_compare", LIBRARY_GLIB); Linker.link(g_date_days_between, "g_date_days_between", LIBRARY_GLIB); Linker.link(g_date_free, "g_date_free", LIBRARY_GLIB); Linker.link(g_date_get_day, "g_date_get_day", LIBRARY_GLIB); Linker.link(g_date_get_day_of_year, "g_date_get_day_of_year", LIBRARY_GLIB); Linker.link(g_date_get_iso8601_week_of_year, "g_date_get_iso8601_week_of_year", LIBRARY_GLIB); Linker.link(g_date_get_julian, "g_date_get_julian", LIBRARY_GLIB); Linker.link(g_date_get_monday_week_of_year, "g_date_get_monday_week_of_year", LIBRARY_GLIB); Linker.link(g_date_get_month, "g_date_get_month", LIBRARY_GLIB); Linker.link(g_date_get_sunday_week_of_year, "g_date_get_sunday_week_of_year", LIBRARY_GLIB); Linker.link(g_date_get_weekday, "g_date_get_weekday", LIBRARY_GLIB); Linker.link(g_date_get_year, "g_date_get_year", LIBRARY_GLIB); Linker.link(g_date_is_first_of_month, "g_date_is_first_of_month", LIBRARY_GLIB); Linker.link(g_date_is_last_of_month, "g_date_is_last_of_month", LIBRARY_GLIB); Linker.link(g_date_order, "g_date_order", LIBRARY_GLIB); Linker.link(g_date_set_day, "g_date_set_day", LIBRARY_GLIB); Linker.link(g_date_set_dmy, "g_date_set_dmy", LIBRARY_GLIB); Linker.link(g_date_set_julian, "g_date_set_julian", LIBRARY_GLIB); Linker.link(g_date_set_month, "g_date_set_month", LIBRARY_GLIB); Linker.link(g_date_set_parse, "g_date_set_parse", LIBRARY_GLIB); Linker.link(g_date_set_time, "g_date_set_time", LIBRARY_GLIB); Linker.link(g_date_set_time_t, "g_date_set_time_t", LIBRARY_GLIB); Linker.link(g_date_set_time_val, "g_date_set_time_val", LIBRARY_GLIB); Linker.link(g_date_set_year, "g_date_set_year", LIBRARY_GLIB); Linker.link(g_date_subtract_days, "g_date_subtract_days", LIBRARY_GLIB); Linker.link(g_date_subtract_months, "g_date_subtract_months", LIBRARY_GLIB); Linker.link(g_date_subtract_years, "g_date_subtract_years", LIBRARY_GLIB); Linker.link(g_date_to_struct_tm, "g_date_to_struct_tm", LIBRARY_GLIB); Linker.link(g_date_valid, "g_date_valid", LIBRARY_GLIB); Linker.link(g_date_get_days_in_month, "g_date_get_days_in_month", LIBRARY_GLIB); Linker.link(g_date_get_monday_weeks_in_year, "g_date_get_monday_weeks_in_year", LIBRARY_GLIB); Linker.link(g_date_get_sunday_weeks_in_year, "g_date_get_sunday_weeks_in_year", LIBRARY_GLIB); Linker.link(g_date_is_leap_year, "g_date_is_leap_year", LIBRARY_GLIB); Linker.link(g_date_strftime, "g_date_strftime", LIBRARY_GLIB); Linker.link(g_date_valid_day, "g_date_valid_day", LIBRARY_GLIB); Linker.link(g_date_valid_dmy, "g_date_valid_dmy", LIBRARY_GLIB); Linker.link(g_date_valid_julian, "g_date_valid_julian", LIBRARY_GLIB); Linker.link(g_date_valid_month, "g_date_valid_month", LIBRARY_GLIB); Linker.link(g_date_valid_weekday, "g_date_valid_weekday", LIBRARY_GLIB); Linker.link(g_date_valid_year, "g_date_valid_year", LIBRARY_GLIB); // glib.DateTime Linker.link(g_date_time_new, "g_date_time_new", LIBRARY_GLIB); Linker.link(g_date_time_new_from_timeval_local, "g_date_time_new_from_timeval_local", LIBRARY_GLIB); Linker.link(g_date_time_new_from_timeval_utc, "g_date_time_new_from_timeval_utc", LIBRARY_GLIB); Linker.link(g_date_time_new_from_unix_local, "g_date_time_new_from_unix_local", LIBRARY_GLIB); Linker.link(g_date_time_new_from_unix_utc, "g_date_time_new_from_unix_utc", LIBRARY_GLIB); Linker.link(g_date_time_new_local, "g_date_time_new_local", LIBRARY_GLIB); Linker.link(g_date_time_new_now, "g_date_time_new_now", LIBRARY_GLIB); Linker.link(g_date_time_new_now_local, "g_date_time_new_now_local", LIBRARY_GLIB); Linker.link(g_date_time_new_now_utc, "g_date_time_new_now_utc", LIBRARY_GLIB); Linker.link(g_date_time_new_utc, "g_date_time_new_utc", LIBRARY_GLIB); Linker.link(g_date_time_add, "g_date_time_add", LIBRARY_GLIB); Linker.link(g_date_time_add_days, "g_date_time_add_days", LIBRARY_GLIB); Linker.link(g_date_time_add_full, "g_date_time_add_full", LIBRARY_GLIB); Linker.link(g_date_time_add_hours, "g_date_time_add_hours", LIBRARY_GLIB); Linker.link(g_date_time_add_minutes, "g_date_time_add_minutes", LIBRARY_GLIB); Linker.link(g_date_time_add_months, "g_date_time_add_months", LIBRARY_GLIB); Linker.link(g_date_time_add_seconds, "g_date_time_add_seconds", LIBRARY_GLIB); Linker.link(g_date_time_add_weeks, "g_date_time_add_weeks", LIBRARY_GLIB); Linker.link(g_date_time_add_years, "g_date_time_add_years", LIBRARY_GLIB); Linker.link(g_date_time_difference, "g_date_time_difference", LIBRARY_GLIB); Linker.link(g_date_time_format, "g_date_time_format", LIBRARY_GLIB); Linker.link(g_date_time_get_day_of_month, "g_date_time_get_day_of_month", LIBRARY_GLIB); Linker.link(g_date_time_get_day_of_week, "g_date_time_get_day_of_week", LIBRARY_GLIB); Linker.link(g_date_time_get_day_of_year, "g_date_time_get_day_of_year", LIBRARY_GLIB); Linker.link(g_date_time_get_hour, "g_date_time_get_hour", LIBRARY_GLIB); Linker.link(g_date_time_get_microsecond, "g_date_time_get_microsecond", LIBRARY_GLIB); Linker.link(g_date_time_get_minute, "g_date_time_get_minute", LIBRARY_GLIB); Linker.link(g_date_time_get_month, "g_date_time_get_month", LIBRARY_GLIB); Linker.link(g_date_time_get_second, "g_date_time_get_second", LIBRARY_GLIB); Linker.link(g_date_time_get_seconds, "g_date_time_get_seconds", LIBRARY_GLIB); Linker.link(g_date_time_get_timezone_abbreviation, "g_date_time_get_timezone_abbreviation", LIBRARY_GLIB); Linker.link(g_date_time_get_utc_offset, "g_date_time_get_utc_offset", LIBRARY_GLIB); Linker.link(g_date_time_get_week_numbering_year, "g_date_time_get_week_numbering_year", LIBRARY_GLIB); Linker.link(g_date_time_get_week_of_year, "g_date_time_get_week_of_year", LIBRARY_GLIB); Linker.link(g_date_time_get_year, "g_date_time_get_year", LIBRARY_GLIB); Linker.link(g_date_time_get_ymd, "g_date_time_get_ymd", LIBRARY_GLIB); Linker.link(g_date_time_is_daylight_savings, "g_date_time_is_daylight_savings", LIBRARY_GLIB); Linker.link(g_date_time_ref, "g_date_time_ref", LIBRARY_GLIB); Linker.link(g_date_time_to_local, "g_date_time_to_local", LIBRARY_GLIB); Linker.link(g_date_time_to_timeval, "g_date_time_to_timeval", LIBRARY_GLIB); Linker.link(g_date_time_to_timezone, "g_date_time_to_timezone", LIBRARY_GLIB); Linker.link(g_date_time_to_unix, "g_date_time_to_unix", LIBRARY_GLIB); Linker.link(g_date_time_to_utc, "g_date_time_to_utc", LIBRARY_GLIB); Linker.link(g_date_time_unref, "g_date_time_unref", LIBRARY_GLIB); Linker.link(g_date_time_compare, "g_date_time_compare", LIBRARY_GLIB); Linker.link(g_date_time_equal, "g_date_time_equal", LIBRARY_GLIB); Linker.link(g_date_time_hash, "g_date_time_hash", LIBRARY_GLIB); // glib.Directory Linker.link(g_dir_close, "g_dir_close", LIBRARY_GLIB); Linker.link(g_dir_read_name, "g_dir_read_name", LIBRARY_GLIB); Linker.link(g_dir_rewind, "g_dir_rewind", LIBRARY_GLIB); Linker.link(g_dir_make_tmp, "g_dir_make_tmp", LIBRARY_GLIB); Linker.link(g_dir_open, "g_dir_open", LIBRARY_GLIB); // glib.ErrorG Linker.link(g_error_new, "g_error_new", LIBRARY_GLIB); Linker.link(g_error_new_literal, "g_error_new_literal", LIBRARY_GLIB); Linker.link(g_error_new_valist, "g_error_new_valist", LIBRARY_GLIB); Linker.link(g_error_copy, "g_error_copy", LIBRARY_GLIB); Linker.link(g_error_free, "g_error_free", LIBRARY_GLIB); Linker.link(g_error_matches, "g_error_matches", LIBRARY_GLIB); Linker.link(g_propagate_error, "g_propagate_error", LIBRARY_GLIB); Linker.link(g_set_error_literal, "g_set_error_literal", LIBRARY_GLIB); Linker.link(g_prefix_error, "g_prefix_error", LIBRARY_GLIB); Linker.link(g_propagate_prefixed_error, "g_propagate_prefixed_error", LIBRARY_GLIB); Linker.link(g_set_error, "g_set_error", LIBRARY_GLIB); // glib.HashTable Linker.link(g_hash_table_add, "g_hash_table_add", LIBRARY_GLIB); Linker.link(g_hash_table_contains, "g_hash_table_contains", LIBRARY_GLIB); Linker.link(g_hash_table_destroy, "g_hash_table_destroy", LIBRARY_GLIB); Linker.link(g_hash_table_find, "g_hash_table_find", LIBRARY_GLIB); Linker.link(g_hash_table_foreach, "g_hash_table_foreach", LIBRARY_GLIB); Linker.link(g_hash_table_foreach_remove, "g_hash_table_foreach_remove", LIBRARY_GLIB); Linker.link(g_hash_table_foreach_steal, "g_hash_table_foreach_steal", LIBRARY_GLIB); Linker.link(g_hash_table_get_keys, "g_hash_table_get_keys", LIBRARY_GLIB); Linker.link(g_hash_table_get_keys_as_array, "g_hash_table_get_keys_as_array", LIBRARY_GLIB); Linker.link(g_hash_table_get_values, "g_hash_table_get_values", LIBRARY_GLIB); Linker.link(g_hash_table_insert, "g_hash_table_insert", LIBRARY_GLIB); Linker.link(g_hash_table_lookup, "g_hash_table_lookup", LIBRARY_GLIB); Linker.link(g_hash_table_lookup_extended, "g_hash_table_lookup_extended", LIBRARY_GLIB); Linker.link(g_hash_table_new, "g_hash_table_new", LIBRARY_GLIB); Linker.link(g_hash_table_new_full, "g_hash_table_new_full", LIBRARY_GLIB); Linker.link(g_hash_table_ref, "g_hash_table_ref", LIBRARY_GLIB); Linker.link(g_hash_table_remove, "g_hash_table_remove", LIBRARY_GLIB); Linker.link(g_hash_table_remove_all, "g_hash_table_remove_all", LIBRARY_GLIB); Linker.link(g_hash_table_replace, "g_hash_table_replace", LIBRARY_GLIB); Linker.link(g_hash_table_size, "g_hash_table_size", LIBRARY_GLIB); Linker.link(g_hash_table_steal, "g_hash_table_steal", LIBRARY_GLIB); Linker.link(g_hash_table_steal_all, "g_hash_table_steal_all", LIBRARY_GLIB); Linker.link(g_hash_table_unref, "g_hash_table_unref", LIBRARY_GLIB); Linker.link(g_direct_equal, "g_direct_equal", LIBRARY_GLIB); Linker.link(g_direct_hash, "g_direct_hash", LIBRARY_GLIB); Linker.link(g_double_equal, "g_double_equal", LIBRARY_GLIB); Linker.link(g_double_hash, "g_double_hash", LIBRARY_GLIB); Linker.link(g_int64_equal, "g_int64_equal", LIBRARY_GLIB); Linker.link(g_int64_hash, "g_int64_hash", LIBRARY_GLIB); Linker.link(g_int_equal, "g_int_equal", LIBRARY_GLIB); Linker.link(g_int_hash, "g_int_hash", LIBRARY_GLIB); Linker.link(g_str_equal, "g_str_equal", LIBRARY_GLIB); Linker.link(g_str_hash, "g_str_hash", LIBRARY_GLIB); // glib.HashTableIter Linker.link(g_hash_table_iter_get_hash_table, "g_hash_table_iter_get_hash_table", LIBRARY_GLIB); Linker.link(g_hash_table_iter_init, "g_hash_table_iter_init", LIBRARY_GLIB); Linker.link(g_hash_table_iter_next, "g_hash_table_iter_next", LIBRARY_GLIB); Linker.link(g_hash_table_iter_remove, "g_hash_table_iter_remove", LIBRARY_GLIB); Linker.link(g_hash_table_iter_replace, "g_hash_table_iter_replace", LIBRARY_GLIB); Linker.link(g_hash_table_iter_steal, "g_hash_table_iter_steal", LIBRARY_GLIB); // glib.Hmac Linker.link(g_hmac_copy, "g_hmac_copy", LIBRARY_GLIB); Linker.link(g_hmac_get_digest, "g_hmac_get_digest", LIBRARY_GLIB); Linker.link(g_hmac_get_string, "g_hmac_get_string", LIBRARY_GLIB); Linker.link(g_hmac_ref, "g_hmac_ref", LIBRARY_GLIB); Linker.link(g_hmac_unref, "g_hmac_unref", LIBRARY_GLIB); Linker.link(g_hmac_update, "g_hmac_update", LIBRARY_GLIB); Linker.link(g_hmac_new, "g_hmac_new", LIBRARY_GLIB); Linker.link(g_compute_hmac_for_data, "g_compute_hmac_for_data", LIBRARY_GLIB); Linker.link(g_compute_hmac_for_string, "g_compute_hmac_for_string", LIBRARY_GLIB); Linker.link(g_compute_hmac_for_bytes, "g_compute_hmac_for_bytes", LIBRARY_GLIB); // glib.Hook Linker.link(g_hook_compare_ids, "g_hook_compare_ids", LIBRARY_GLIB); Linker.link(g_hook_alloc, "g_hook_alloc", LIBRARY_GLIB); Linker.link(g_hook_destroy, "g_hook_destroy", LIBRARY_GLIB); Linker.link(g_hook_destroy_link, "g_hook_destroy_link", LIBRARY_GLIB); Linker.link(g_hook_find, "g_hook_find", LIBRARY_GLIB); Linker.link(g_hook_find_data, "g_hook_find_data", LIBRARY_GLIB); Linker.link(g_hook_find_func, "g_hook_find_func", LIBRARY_GLIB); Linker.link(g_hook_find_func_data, "g_hook_find_func_data", LIBRARY_GLIB); Linker.link(g_hook_first_valid, "g_hook_first_valid", LIBRARY_GLIB); Linker.link(g_hook_free, "g_hook_free", LIBRARY_GLIB); Linker.link(g_hook_get, "g_hook_get", LIBRARY_GLIB); Linker.link(g_hook_insert_before, "g_hook_insert_before", LIBRARY_GLIB); Linker.link(g_hook_insert_sorted, "g_hook_insert_sorted", LIBRARY_GLIB); Linker.link(g_hook_next_valid, "g_hook_next_valid", LIBRARY_GLIB); Linker.link(g_hook_prepend, "g_hook_prepend", LIBRARY_GLIB); Linker.link(g_hook_ref, "g_hook_ref", LIBRARY_GLIB); Linker.link(g_hook_unref, "g_hook_unref", LIBRARY_GLIB); // glib.HookList Linker.link(g_hook_list_clear, "g_hook_list_clear", LIBRARY_GLIB); Linker.link(g_hook_list_init, "g_hook_list_init", LIBRARY_GLIB); Linker.link(g_hook_list_invoke, "g_hook_list_invoke", LIBRARY_GLIB); Linker.link(g_hook_list_invoke_check, "g_hook_list_invoke_check", LIBRARY_GLIB); Linker.link(g_hook_list_marshal, "g_hook_list_marshal", LIBRARY_GLIB); Linker.link(g_hook_list_marshal_check, "g_hook_list_marshal_check", LIBRARY_GLIB); // glib.IConv Linker.link(g_iconv, "g_iconv", LIBRARY_GLIB); Linker.link(g_iconv_close, "g_iconv_close", LIBRARY_GLIB); Linker.link(g_iconv_open, "g_iconv_open", LIBRARY_GLIB); // glib.IOChannel Linker.link(g_io_channel_new_file, "g_io_channel_new_file", LIBRARY_GLIB); Linker.link(g_io_channel_unix_new, "g_io_channel_unix_new", LIBRARY_GLIB); Linker.link(g_io_channel_close, "g_io_channel_close", LIBRARY_GLIB); Linker.link(g_io_channel_flush, "g_io_channel_flush", LIBRARY_GLIB); Linker.link(g_io_channel_get_buffer_condition, "g_io_channel_get_buffer_condition", LIBRARY_GLIB); Linker.link(g_io_channel_get_buffer_size, "g_io_channel_get_buffer_size", LIBRARY_GLIB); Linker.link(g_io_channel_get_buffered, "g_io_channel_get_buffered", LIBRARY_GLIB); Linker.link(g_io_channel_get_close_on_unref, "g_io_channel_get_close_on_unref", LIBRARY_GLIB); Linker.link(g_io_channel_get_encoding, "g_io_channel_get_encoding", LIBRARY_GLIB); Linker.link(g_io_channel_get_flags, "g_io_channel_get_flags", LIBRARY_GLIB); Linker.link(g_io_channel_get_line_term, "g_io_channel_get_line_term", LIBRARY_GLIB); Linker.link(g_io_channel_init, "g_io_channel_init", LIBRARY_GLIB); Linker.link(g_io_channel_read, "g_io_channel_read", LIBRARY_GLIB); Linker.link(g_io_channel_read_chars, "g_io_channel_read_chars", LIBRARY_GLIB); Linker.link(g_io_channel_read_line, "g_io_channel_read_line", LIBRARY_GLIB); Linker.link(g_io_channel_read_line_string, "g_io_channel_read_line_string", LIBRARY_GLIB); Linker.link(g_io_channel_read_to_end, "g_io_channel_read_to_end", LIBRARY_GLIB); Linker.link(g_io_channel_read_unichar, "g_io_channel_read_unichar", LIBRARY_GLIB); Linker.link(g_io_channel_ref, "g_io_channel_ref", LIBRARY_GLIB); Linker.link(g_io_channel_seek, "g_io_channel_seek", LIBRARY_GLIB); Linker.link(g_io_channel_seek_position, "g_io_channel_seek_position", LIBRARY_GLIB); Linker.link(g_io_channel_set_buffer_size, "g_io_channel_set_buffer_size", LIBRARY_GLIB); Linker.link(g_io_channel_set_buffered, "g_io_channel_set_buffered", LIBRARY_GLIB); Linker.link(g_io_channel_set_close_on_unref, "g_io_channel_set_close_on_unref", LIBRARY_GLIB); Linker.link(g_io_channel_set_encoding, "g_io_channel_set_encoding", LIBRARY_GLIB); Linker.link(g_io_channel_set_flags, "g_io_channel_set_flags", LIBRARY_GLIB); Linker.link(g_io_channel_set_line_term, "g_io_channel_set_line_term", LIBRARY_GLIB); Linker.link(g_io_channel_shutdown, "g_io_channel_shutdown", LIBRARY_GLIB); Linker.link(g_io_channel_unix_get_fd, "g_io_channel_unix_get_fd", LIBRARY_GLIB); Linker.link(g_io_channel_unref, "g_io_channel_unref", LIBRARY_GLIB); Linker.link(g_io_channel_write, "g_io_channel_write", LIBRARY_GLIB); Linker.link(g_io_channel_write_chars, "g_io_channel_write_chars", LIBRARY_GLIB); Linker.link(g_io_channel_write_unichar, "g_io_channel_write_unichar", LIBRARY_GLIB); Linker.link(g_io_channel_error_from_errno, "g_io_channel_error_from_errno", LIBRARY_GLIB); Linker.link(g_io_channel_error_quark, "g_io_channel_error_quark", LIBRARY_GLIB); Linker.link(g_io_add_watch, "g_io_add_watch", LIBRARY_GLIB); Linker.link(g_io_add_watch_full, "g_io_add_watch_full", LIBRARY_GLIB); Linker.link(g_io_create_watch, "g_io_create_watch", LIBRARY_GLIB); // glib.KeyFile Linker.link(g_key_file_new, "g_key_file_new", LIBRARY_GLIB); Linker.link(g_key_file_free, "g_key_file_free", LIBRARY_GLIB); Linker.link(g_key_file_get_boolean, "g_key_file_get_boolean", LIBRARY_GLIB); Linker.link(g_key_file_get_boolean_list, "g_key_file_get_boolean_list", LIBRARY_GLIB); Linker.link(g_key_file_get_comment, "g_key_file_get_comment", LIBRARY_GLIB); Linker.link(g_key_file_get_double, "g_key_file_get_double", LIBRARY_GLIB); Linker.link(g_key_file_get_double_list, "g_key_file_get_double_list", LIBRARY_GLIB); Linker.link(g_key_file_get_groups, "g_key_file_get_groups", LIBRARY_GLIB); Linker.link(g_key_file_get_int64, "g_key_file_get_int64", LIBRARY_GLIB); Linker.link(g_key_file_get_integer, "g_key_file_get_integer", LIBRARY_GLIB); Linker.link(g_key_file_get_integer_list, "g_key_file_get_integer_list", LIBRARY_GLIB); Linker.link(g_key_file_get_keys, "g_key_file_get_keys", LIBRARY_GLIB); Linker.link(g_key_file_get_locale_string, "g_key_file_get_locale_string", LIBRARY_GLIB); Linker.link(g_key_file_get_locale_string_list, "g_key_file_get_locale_string_list", LIBRARY_GLIB); Linker.link(g_key_file_get_start_group, "g_key_file_get_start_group", LIBRARY_GLIB); Linker.link(g_key_file_get_string, "g_key_file_get_string", LIBRARY_GLIB); Linker.link(g_key_file_get_string_list, "g_key_file_get_string_list", LIBRARY_GLIB); Linker.link(g_key_file_get_uint64, "g_key_file_get_uint64", LIBRARY_GLIB); Linker.link(g_key_file_get_value, "g_key_file_get_value", LIBRARY_GLIB); Linker.link(g_key_file_has_group, "g_key_file_has_group", LIBRARY_GLIB); Linker.link(g_key_file_has_key, "g_key_file_has_key", LIBRARY_GLIB); Linker.link(g_key_file_load_from_bytes, "g_key_file_load_from_bytes", LIBRARY_GLIB); Linker.link(g_key_file_load_from_data, "g_key_file_load_from_data", LIBRARY_GLIB); Linker.link(g_key_file_load_from_data_dirs, "g_key_file_load_from_data_dirs", LIBRARY_GLIB); Linker.link(g_key_file_load_from_dirs, "g_key_file_load_from_dirs", LIBRARY_GLIB); Linker.link(g_key_file_load_from_file, "g_key_file_load_from_file", LIBRARY_GLIB); Linker.link(g_key_file_ref, "g_key_file_ref", LIBRARY_GLIB); Linker.link(g_key_file_remove_comment, "g_key_file_remove_comment", LIBRARY_GLIB); Linker.link(g_key_file_remove_group, "g_key_file_remove_group", LIBRARY_GLIB); Linker.link(g_key_file_remove_key, "g_key_file_remove_key", LIBRARY_GLIB); Linker.link(g_key_file_save_to_file, "g_key_file_save_to_file", LIBRARY_GLIB); Linker.link(g_key_file_set_boolean, "g_key_file_set_boolean", LIBRARY_GLIB); Linker.link(g_key_file_set_boolean_list, "g_key_file_set_boolean_list", LIBRARY_GLIB); Linker.link(g_key_file_set_comment, "g_key_file_set_comment", LIBRARY_GLIB); Linker.link(g_key_file_set_double, "g_key_file_set_double", LIBRARY_GLIB); Linker.link(g_key_file_set_double_list, "g_key_file_set_double_list", LIBRARY_GLIB); Linker.link(g_key_file_set_int64, "g_key_file_set_int64", LIBRARY_GLIB); Linker.link(g_key_file_set_integer, "g_key_file_set_integer", LIBRARY_GLIB); Linker.link(g_key_file_set_integer_list, "g_key_file_set_integer_list", LIBRARY_GLIB); Linker.link(g_key_file_set_list_separator, "g_key_file_set_list_separator", LIBRARY_GLIB); Linker.link(g_key_file_set_locale_string, "g_key_file_set_locale_string", LIBRARY_GLIB); Linker.link(g_key_file_set_locale_string_list, "g_key_file_set_locale_string_list", LIBRARY_GLIB); Linker.link(g_key_file_set_string, "g_key_file_set_string", LIBRARY_GLIB); Linker.link(g_key_file_set_string_list, "g_key_file_set_string_list", LIBRARY_GLIB); Linker.link(g_key_file_set_uint64, "g_key_file_set_uint64", LIBRARY_GLIB); Linker.link(g_key_file_set_value, "g_key_file_set_value", LIBRARY_GLIB); Linker.link(g_key_file_to_data, "g_key_file_to_data", LIBRARY_GLIB); Linker.link(g_key_file_unref, "g_key_file_unref", LIBRARY_GLIB); Linker.link(g_key_file_error_quark, "g_key_file_error_quark", LIBRARY_GLIB); // glib.ListG Linker.link(g_list_alloc, "g_list_alloc", LIBRARY_GLIB); Linker.link(g_list_append, "g_list_append", LIBRARY_GLIB); Linker.link(g_list_concat, "g_list_concat", LIBRARY_GLIB); Linker.link(g_list_copy, "g_list_copy", LIBRARY_GLIB); Linker.link(g_list_copy_deep, "g_list_copy_deep", LIBRARY_GLIB); Linker.link(g_list_delete_link, "g_list_delete_link", LIBRARY_GLIB); Linker.link(g_list_find, "g_list_find", LIBRARY_GLIB); Linker.link(g_list_find_custom, "g_list_find_custom", LIBRARY_GLIB); Linker.link(g_list_first, "g_list_first", LIBRARY_GLIB); Linker.link(g_list_foreach, "g_list_foreach", LIBRARY_GLIB); Linker.link(g_list_free, "g_list_free", LIBRARY_GLIB); Linker.link(g_list_free_1, "g_list_free_1", LIBRARY_GLIB); Linker.link(g_list_free_full, "g_list_free_full", LIBRARY_GLIB); Linker.link(g_list_index, "g_list_index", LIBRARY_GLIB); Linker.link(g_list_insert, "g_list_insert", LIBRARY_GLIB); Linker.link(g_list_insert_before, "g_list_insert_before", LIBRARY_GLIB); Linker.link(g_list_insert_sorted, "g_list_insert_sorted", LIBRARY_GLIB); Linker.link(g_list_insert_sorted_with_data, "g_list_insert_sorted_with_data", LIBRARY_GLIB); Linker.link(g_list_last, "g_list_last", LIBRARY_GLIB); Linker.link(g_list_length, "g_list_length", LIBRARY_GLIB); Linker.link(g_list_nth, "g_list_nth", LIBRARY_GLIB); Linker.link(g_list_nth_data, "g_list_nth_data", LIBRARY_GLIB); Linker.link(g_list_nth_prev, "g_list_nth_prev", LIBRARY_GLIB); Linker.link(g_list_position, "g_list_position", LIBRARY_GLIB); Linker.link(g_list_prepend, "g_list_prepend", LIBRARY_GLIB); Linker.link(g_list_remove, "g_list_remove", LIBRARY_GLIB); Linker.link(g_list_remove_all, "g_list_remove_all", LIBRARY_GLIB); Linker.link(g_list_remove_link, "g_list_remove_link", LIBRARY_GLIB); Linker.link(g_list_reverse, "g_list_reverse", LIBRARY_GLIB); Linker.link(g_list_sort, "g_list_sort", LIBRARY_GLIB); Linker.link(g_list_sort_with_data, "g_list_sort_with_data", LIBRARY_GLIB); // glib.MainContext Linker.link(g_main_context_new, "g_main_context_new", LIBRARY_GLIB); Linker.link(g_main_context_acquire, "g_main_context_acquire", LIBRARY_GLIB); Linker.link(g_main_context_add_poll, "g_main_context_add_poll", LIBRARY_GLIB); Linker.link(g_main_context_check, "g_main_context_check", LIBRARY_GLIB); Linker.link(g_main_context_dispatch, "g_main_context_dispatch", LIBRARY_GLIB); Linker.link(g_main_context_find_source_by_funcs_user_data, "g_main_context_find_source_by_funcs_user_data", LIBRARY_GLIB); Linker.link(g_main_context_find_source_by_id, "g_main_context_find_source_by_id", LIBRARY_GLIB); Linker.link(g_main_context_find_source_by_user_data, "g_main_context_find_source_by_user_data", LIBRARY_GLIB); Linker.link(g_main_context_get_poll_func, "g_main_context_get_poll_func", LIBRARY_GLIB); Linker.link(g_main_context_invoke, "g_main_context_invoke", LIBRARY_GLIB); Linker.link(g_main_context_invoke_full, "g_main_context_invoke_full", LIBRARY_GLIB); Linker.link(g_main_context_is_owner, "g_main_context_is_owner", LIBRARY_GLIB); Linker.link(g_main_context_iteration, "g_main_context_iteration", LIBRARY_GLIB); Linker.link(g_main_context_pending, "g_main_context_pending", LIBRARY_GLIB); Linker.link(g_main_context_pop_thread_default, "g_main_context_pop_thread_default", LIBRARY_GLIB); Linker.link(g_main_context_prepare, "g_main_context_prepare", LIBRARY_GLIB); Linker.link(g_main_context_push_thread_default, "g_main_context_push_thread_default", LIBRARY_GLIB); Linker.link(g_main_context_query, "g_main_context_query", LIBRARY_GLIB); Linker.link(g_main_context_ref, "g_main_context_ref", LIBRARY_GLIB); Linker.link(g_main_context_release, "g_main_context_release", LIBRARY_GLIB); Linker.link(g_main_context_remove_poll, "g_main_context_remove_poll", LIBRARY_GLIB); Linker.link(g_main_context_set_poll_func, "g_main_context_set_poll_func", LIBRARY_GLIB); Linker.link(g_main_context_unref, "g_main_context_unref", LIBRARY_GLIB); Linker.link(g_main_context_wait, "g_main_context_wait", LIBRARY_GLIB); Linker.link(g_main_context_wakeup, "g_main_context_wakeup", LIBRARY_GLIB); Linker.link(g_main_context_default, "g_main_context_default", LIBRARY_GLIB); Linker.link(g_main_context_get_thread_default, "g_main_context_get_thread_default", LIBRARY_GLIB); Linker.link(g_main_context_ref_thread_default, "g_main_context_ref_thread_default", LIBRARY_GLIB); // glib.MainLoop Linker.link(g_main_loop_new, "g_main_loop_new", LIBRARY_GLIB); Linker.link(g_main_loop_get_context, "g_main_loop_get_context", LIBRARY_GLIB); Linker.link(g_main_loop_is_running, "g_main_loop_is_running", LIBRARY_GLIB); Linker.link(g_main_loop_quit, "g_main_loop_quit", LIBRARY_GLIB); Linker.link(g_main_loop_ref, "g_main_loop_ref", LIBRARY_GLIB); Linker.link(g_main_loop_run, "g_main_loop_run", LIBRARY_GLIB); Linker.link(g_main_loop_unref, "g_main_loop_unref", LIBRARY_GLIB); Linker.link(g_main_current_source, "g_main_current_source", LIBRARY_GLIB); Linker.link(g_main_depth, "g_main_depth", LIBRARY_GLIB); Linker.link(g_poll, "g_poll", LIBRARY_GLIB); // glib.MappedFile Linker.link(g_mapped_file_new, "g_mapped_file_new", LIBRARY_GLIB); Linker.link(g_mapped_file_new_from_fd, "g_mapped_file_new_from_fd", LIBRARY_GLIB); Linker.link(g_mapped_file_free, "g_mapped_file_free", LIBRARY_GLIB); Linker.link(g_mapped_file_get_bytes, "g_mapped_file_get_bytes", LIBRARY_GLIB); Linker.link(g_mapped_file_get_contents, "g_mapped_file_get_contents", LIBRARY_GLIB); Linker.link(g_mapped_file_get_length, "g_mapped_file_get_length", LIBRARY_GLIB); Linker.link(g_mapped_file_ref, "g_mapped_file_ref", LIBRARY_GLIB); Linker.link(g_mapped_file_unref, "g_mapped_file_unref", LIBRARY_GLIB); // glib.SimpleXML Linker.link(g_markup_parse_context_new, "g_markup_parse_context_new", LIBRARY_GLIB); Linker.link(g_markup_parse_context_end_parse, "g_markup_parse_context_end_parse", LIBRARY_GLIB); Linker.link(g_markup_parse_context_free, "g_markup_parse_context_free", LIBRARY_GLIB); Linker.link(g_markup_parse_context_get_element, "g_markup_parse_context_get_element", LIBRARY_GLIB); Linker.link(g_markup_parse_context_get_element_stack, "g_markup_parse_context_get_element_stack", LIBRARY_GLIB); Linker.link(g_markup_parse_context_get_position, "g_markup_parse_context_get_position", LIBRARY_GLIB); Linker.link(g_markup_parse_context_get_user_data, "g_markup_parse_context_get_user_data", LIBRARY_GLIB); Linker.link(g_markup_parse_context_parse, "g_markup_parse_context_parse", LIBRARY_GLIB); Linker.link(g_markup_parse_context_pop, "g_markup_parse_context_pop", LIBRARY_GLIB); Linker.link(g_markup_parse_context_push, "g_markup_parse_context_push", LIBRARY_GLIB); Linker.link(g_markup_parse_context_ref, "g_markup_parse_context_ref", LIBRARY_GLIB); Linker.link(g_markup_parse_context_unref, "g_markup_parse_context_unref", LIBRARY_GLIB); Linker.link(g_markup_collect_attributes, "g_markup_collect_attributes", LIBRARY_GLIB); Linker.link(g_markup_error_quark, "g_markup_error_quark", LIBRARY_GLIB); Linker.link(g_markup_escape_text, "g_markup_escape_text", LIBRARY_GLIB); Linker.link(g_markup_printf_escaped, "g_markup_printf_escaped", LIBRARY_GLIB); Linker.link(g_markup_vprintf_escaped, "g_markup_vprintf_escaped", LIBRARY_GLIB); // glib.MatchInfo Linker.link(g_match_info_expand_references, "g_match_info_expand_references", LIBRARY_GLIB); Linker.link(g_match_info_fetch, "g_match_info_fetch", LIBRARY_GLIB); Linker.link(g_match_info_fetch_all, "g_match_info_fetch_all", LIBRARY_GLIB); Linker.link(g_match_info_fetch_named, "g_match_info_fetch_named", LIBRARY_GLIB); Linker.link(g_match_info_fetch_named_pos, "g_match_info_fetch_named_pos", LIBRARY_GLIB); Linker.link(g_match_info_fetch_pos, "g_match_info_fetch_pos", LIBRARY_GLIB); Linker.link(g_match_info_free, "g_match_info_free", LIBRARY_GLIB); Linker.link(g_match_info_get_match_count, "g_match_info_get_match_count", LIBRARY_GLIB); Linker.link(g_match_info_get_regex, "g_match_info_get_regex", LIBRARY_GLIB); Linker.link(g_match_info_get_string, "g_match_info_get_string", LIBRARY_GLIB); Linker.link(g_match_info_is_partial_match, "g_match_info_is_partial_match", LIBRARY_GLIB); Linker.link(g_match_info_matches, "g_match_info_matches", LIBRARY_GLIB); Linker.link(g_match_info_next, "g_match_info_next", LIBRARY_GLIB); Linker.link(g_match_info_ref, "g_match_info_ref", LIBRARY_GLIB); Linker.link(g_match_info_unref, "g_match_info_unref", LIBRARY_GLIB); // glib.Mutex Linker.link(g_mutex_clear, "g_mutex_clear", LIBRARY_GLIB); Linker.link(g_mutex_init, "g_mutex_init", LIBRARY_GLIB); Linker.link(g_mutex_lock, "g_mutex_lock", LIBRARY_GLIB); Linker.link(g_mutex_trylock, "g_mutex_trylock", LIBRARY_GLIB); Linker.link(g_mutex_unlock, "g_mutex_unlock", LIBRARY_GLIB); // glib.Node Linker.link(g_node_child_index, "g_node_child_index", LIBRARY_GLIB); Linker.link(g_node_child_position, "g_node_child_position", LIBRARY_GLIB); Linker.link(g_node_children_foreach, "g_node_children_foreach", LIBRARY_GLIB); Linker.link(g_node_copy, "g_node_copy", LIBRARY_GLIB); Linker.link(g_node_copy_deep, "g_node_copy_deep", LIBRARY_GLIB); Linker.link(g_node_depth, "g_node_depth", LIBRARY_GLIB); Linker.link(g_node_destroy, "g_node_destroy", LIBRARY_GLIB); Linker.link(g_node_find, "g_node_find", LIBRARY_GLIB); Linker.link(g_node_find_child, "g_node_find_child", LIBRARY_GLIB); Linker.link(g_node_first_sibling, "g_node_first_sibling", LIBRARY_GLIB); Linker.link(g_node_get_root, "g_node_get_root", LIBRARY_GLIB); Linker.link(g_node_insert, "g_node_insert", LIBRARY_GLIB); Linker.link(g_node_insert_after, "g_node_insert_after", LIBRARY_GLIB); Linker.link(g_node_insert_before, "g_node_insert_before", LIBRARY_GLIB); Linker.link(g_node_is_ancestor, "g_node_is_ancestor", LIBRARY_GLIB); Linker.link(g_node_last_child, "g_node_last_child", LIBRARY_GLIB); Linker.link(g_node_last_sibling, "g_node_last_sibling", LIBRARY_GLIB); Linker.link(g_node_max_height, "g_node_max_height", LIBRARY_GLIB); Linker.link(g_node_n_children, "g_node_n_children", LIBRARY_GLIB); Linker.link(g_node_n_nodes, "g_node_n_nodes", LIBRARY_GLIB); Linker.link(g_node_nth_child, "g_node_nth_child", LIBRARY_GLIB); Linker.link(g_node_prepend, "g_node_prepend", LIBRARY_GLIB); Linker.link(g_node_reverse_children, "g_node_reverse_children", LIBRARY_GLIB); Linker.link(g_node_traverse, "g_node_traverse", LIBRARY_GLIB); Linker.link(g_node_unlink, "g_node_unlink", LIBRARY_GLIB); Linker.link(g_node_new, "g_node_new", LIBRARY_GLIB); // glib.Once Linker.link(g_once_impl, "g_once_impl", LIBRARY_GLIB); Linker.link(g_once_init_enter, "g_once_init_enter", LIBRARY_GLIB); Linker.link(g_once_init_leave, "g_once_init_leave", LIBRARY_GLIB); // glib.OptionContext Linker.link(g_option_context_add_group, "g_option_context_add_group", LIBRARY_GLIB); Linker.link(g_option_context_add_main_entries, "g_option_context_add_main_entries", LIBRARY_GLIB); Linker.link(g_option_context_free, "g_option_context_free", LIBRARY_GLIB); Linker.link(g_option_context_get_description, "g_option_context_get_description", LIBRARY_GLIB); Linker.link(g_option_context_get_help, "g_option_context_get_help", LIBRARY_GLIB); Linker.link(g_option_context_get_help_enabled, "g_option_context_get_help_enabled", LIBRARY_GLIB); Linker.link(g_option_context_get_ignore_unknown_options, "g_option_context_get_ignore_unknown_options", LIBRARY_GLIB); Linker.link(g_option_context_get_main_group, "g_option_context_get_main_group", LIBRARY_GLIB); Linker.link(g_option_context_get_strict_posix, "g_option_context_get_strict_posix", LIBRARY_GLIB); Linker.link(g_option_context_get_summary, "g_option_context_get_summary", LIBRARY_GLIB); Linker.link(g_option_context_parse, "g_option_context_parse", LIBRARY_GLIB); Linker.link(g_option_context_parse_strv, "g_option_context_parse_strv", LIBRARY_GLIB); Linker.link(g_option_context_set_description, "g_option_context_set_description", LIBRARY_GLIB); Linker.link(g_option_context_set_help_enabled, "g_option_context_set_help_enabled", LIBRARY_GLIB); Linker.link(g_option_context_set_ignore_unknown_options, "g_option_context_set_ignore_unknown_options", LIBRARY_GLIB); Linker.link(g_option_context_set_main_group, "g_option_context_set_main_group", LIBRARY_GLIB); Linker.link(g_option_context_set_strict_posix, "g_option_context_set_strict_posix", LIBRARY_GLIB); Linker.link(g_option_context_set_summary, "g_option_context_set_summary", LIBRARY_GLIB); Linker.link(g_option_context_set_translate_func, "g_option_context_set_translate_func", LIBRARY_GLIB); Linker.link(g_option_context_set_translation_domain, "g_option_context_set_translation_domain", LIBRARY_GLIB); Linker.link(g_option_context_new, "g_option_context_new", LIBRARY_GLIB); Linker.link(g_option_error_quark, "g_option_error_quark", LIBRARY_GLIB); // glib.OptionGroup Linker.link(g_option_group_new, "g_option_group_new", LIBRARY_GLIB); Linker.link(g_option_group_add_entries, "g_option_group_add_entries", LIBRARY_GLIB); Linker.link(g_option_group_free, "g_option_group_free", LIBRARY_GLIB); Linker.link(g_option_group_ref, "g_option_group_ref", LIBRARY_GLIB); Linker.link(g_option_group_set_error_hook, "g_option_group_set_error_hook", LIBRARY_GLIB); Linker.link(g_option_group_set_parse_hooks, "g_option_group_set_parse_hooks", LIBRARY_GLIB); Linker.link(g_option_group_set_translate_func, "g_option_group_set_translate_func", LIBRARY_GLIB); Linker.link(g_option_group_set_translation_domain, "g_option_group_set_translation_domain", LIBRARY_GLIB); Linker.link(g_option_group_unref, "g_option_group_unref", LIBRARY_GLIB); // glib.Pattern Linker.link(g_pattern_spec_equal, "g_pattern_spec_equal", LIBRARY_GLIB); Linker.link(g_pattern_spec_free, "g_pattern_spec_free", LIBRARY_GLIB); Linker.link(g_pattern_spec_new, "g_pattern_spec_new", LIBRARY_GLIB); Linker.link(g_pattern_match, "g_pattern_match", LIBRARY_GLIB); Linker.link(g_pattern_match_simple, "g_pattern_match_simple", LIBRARY_GLIB); Linker.link(g_pattern_match_string, "g_pattern_match_string", LIBRARY_GLIB); // glib.Private Linker.link(g_private_get, "g_private_get", LIBRARY_GLIB); Linker.link(g_private_replace, "g_private_replace", LIBRARY_GLIB); Linker.link(g_private_set, "g_private_set", LIBRARY_GLIB); // glib.PtrArray Linker.link(g_ptr_array_add, "g_ptr_array_add", LIBRARY_GLIB); Linker.link(g_ptr_array_find, "g_ptr_array_find", LIBRARY_GLIB); Linker.link(g_ptr_array_find_with_equal_func, "g_ptr_array_find_with_equal_func", LIBRARY_GLIB); Linker.link(g_ptr_array_foreach, "g_ptr_array_foreach", LIBRARY_GLIB); Linker.link(g_ptr_array_free, "g_ptr_array_free", LIBRARY_GLIB); Linker.link(g_ptr_array_insert, "g_ptr_array_insert", LIBRARY_GLIB); Linker.link(g_ptr_array_new, "g_ptr_array_new", LIBRARY_GLIB); Linker.link(g_ptr_array_new_full, "g_ptr_array_new_full", LIBRARY_GLIB); Linker.link(g_ptr_array_new_with_free_func, "g_ptr_array_new_with_free_func", LIBRARY_GLIB); Linker.link(g_ptr_array_ref, "g_ptr_array_ref", LIBRARY_GLIB); Linker.link(g_ptr_array_remove, "g_ptr_array_remove", LIBRARY_GLIB); Linker.link(g_ptr_array_remove_fast, "g_ptr_array_remove_fast", LIBRARY_GLIB); Linker.link(g_ptr_array_remove_index, "g_ptr_array_remove_index", LIBRARY_GLIB); Linker.link(g_ptr_array_remove_index_fast, "g_ptr_array_remove_index_fast", LIBRARY_GLIB); Linker.link(g_ptr_array_remove_range, "g_ptr_array_remove_range", LIBRARY_GLIB); Linker.link(g_ptr_array_set_free_func, "g_ptr_array_set_free_func", LIBRARY_GLIB); Linker.link(g_ptr_array_set_size, "g_ptr_array_set_size", LIBRARY_GLIB); Linker.link(g_ptr_array_sized_new, "g_ptr_array_sized_new", LIBRARY_GLIB); Linker.link(g_ptr_array_sort, "g_ptr_array_sort", LIBRARY_GLIB); Linker.link(g_ptr_array_sort_with_data, "g_ptr_array_sort_with_data", LIBRARY_GLIB); Linker.link(g_ptr_array_unref, "g_ptr_array_unref", LIBRARY_GLIB); // glib.QueueG Linker.link(g_queue_clear, "g_queue_clear", LIBRARY_GLIB); Linker.link(g_queue_copy, "g_queue_copy", LIBRARY_GLIB); Linker.link(g_queue_delete_link, "g_queue_delete_link", LIBRARY_GLIB); Linker.link(g_queue_find, "g_queue_find", LIBRARY_GLIB); Linker.link(g_queue_find_custom, "g_queue_find_custom", LIBRARY_GLIB); Linker.link(g_queue_foreach, "g_queue_foreach", LIBRARY_GLIB); Linker.link(g_queue_free, "g_queue_free", LIBRARY_GLIB); Linker.link(g_queue_free_full, "g_queue_free_full", LIBRARY_GLIB); Linker.link(g_queue_get_length, "g_queue_get_length", LIBRARY_GLIB); Linker.link(g_queue_index, "g_queue_index", LIBRARY_GLIB); Linker.link(g_queue_init, "g_queue_init", LIBRARY_GLIB); Linker.link(g_queue_insert_after, "g_queue_insert_after", LIBRARY_GLIB); Linker.link(g_queue_insert_before, "g_queue_insert_before", LIBRARY_GLIB); Linker.link(g_queue_insert_sorted, "g_queue_insert_sorted", LIBRARY_GLIB); Linker.link(g_queue_is_empty, "g_queue_is_empty", LIBRARY_GLIB); Linker.link(g_queue_link_index, "g_queue_link_index", LIBRARY_GLIB); Linker.link(g_queue_peek_head, "g_queue_peek_head", LIBRARY_GLIB); Linker.link(g_queue_peek_head_link, "g_queue_peek_head_link", LIBRARY_GLIB); Linker.link(g_queue_peek_nth, "g_queue_peek_nth", LIBRARY_GLIB); Linker.link(g_queue_peek_nth_link, "g_queue_peek_nth_link", LIBRARY_GLIB); Linker.link(g_queue_peek_tail, "g_queue_peek_tail", LIBRARY_GLIB); Linker.link(g_queue_peek_tail_link, "g_queue_peek_tail_link", LIBRARY_GLIB); Linker.link(g_queue_pop_head, "g_queue_pop_head", LIBRARY_GLIB); Linker.link(g_queue_pop_head_link, "g_queue_pop_head_link", LIBRARY_GLIB); Linker.link(g_queue_pop_nth, "g_queue_pop_nth", LIBRARY_GLIB); Linker.link(g_queue_pop_nth_link, "g_queue_pop_nth_link", LIBRARY_GLIB); Linker.link(g_queue_pop_tail, "g_queue_pop_tail", LIBRARY_GLIB); Linker.link(g_queue_pop_tail_link, "g_queue_pop_tail_link", LIBRARY_GLIB); Linker.link(g_queue_push_head, "g_queue_push_head", LIBRARY_GLIB); Linker.link(g_queue_push_head_link, "g_queue_push_head_link", LIBRARY_GLIB); Linker.link(g_queue_push_nth, "g_queue_push_nth", LIBRARY_GLIB); Linker.link(g_queue_push_nth_link, "g_queue_push_nth_link", LIBRARY_GLIB); Linker.link(g_queue_push_tail, "g_queue_push_tail", LIBRARY_GLIB); Linker.link(g_queue_push_tail_link, "g_queue_push_tail_link", LIBRARY_GLIB); Linker.link(g_queue_remove, "g_queue_remove", LIBRARY_GLIB); Linker.link(g_queue_remove_all, "g_queue_remove_all", LIBRARY_GLIB); Linker.link(g_queue_reverse, "g_queue_reverse", LIBRARY_GLIB); Linker.link(g_queue_sort, "g_queue_sort", LIBRARY_GLIB); Linker.link(g_queue_unlink, "g_queue_unlink", LIBRARY_GLIB); Linker.link(g_queue_new, "g_queue_new", LIBRARY_GLIB); // glib.RWLock Linker.link(g_rw_lock_clear, "g_rw_lock_clear", LIBRARY_GLIB); Linker.link(g_rw_lock_init, "g_rw_lock_init", LIBRARY_GLIB); Linker.link(g_rw_lock_reader_lock, "g_rw_lock_reader_lock", LIBRARY_GLIB); Linker.link(g_rw_lock_reader_trylock, "g_rw_lock_reader_trylock", LIBRARY_GLIB); Linker.link(g_rw_lock_reader_unlock, "g_rw_lock_reader_unlock", LIBRARY_GLIB); Linker.link(g_rw_lock_writer_lock, "g_rw_lock_writer_lock", LIBRARY_GLIB); Linker.link(g_rw_lock_writer_trylock, "g_rw_lock_writer_trylock", LIBRARY_GLIB); Linker.link(g_rw_lock_writer_unlock, "g_rw_lock_writer_unlock", LIBRARY_GLIB); // glib.RandG Linker.link(g_rand_copy, "g_rand_copy", LIBRARY_GLIB); Linker.link(g_rand_double, "g_rand_double", LIBRARY_GLIB); Linker.link(g_rand_double_range, "g_rand_double_range", LIBRARY_GLIB); Linker.link(g_rand_free, "g_rand_free", LIBRARY_GLIB); Linker.link(g_rand_int, "g_rand_int", LIBRARY_GLIB); Linker.link(g_rand_int_range, "g_rand_int_range", LIBRARY_GLIB); Linker.link(g_rand_set_seed, "g_rand_set_seed", LIBRARY_GLIB); Linker.link(g_rand_set_seed_array, "g_rand_set_seed_array", LIBRARY_GLIB); Linker.link(g_rand_new, "g_rand_new", LIBRARY_GLIB); Linker.link(g_rand_new_with_seed, "g_rand_new_with_seed", LIBRARY_GLIB); Linker.link(g_rand_new_with_seed_array, "g_rand_new_with_seed_array", LIBRARY_GLIB); Linker.link(g_random_double, "g_random_double", LIBRARY_GLIB); Linker.link(g_random_double_range, "g_random_double_range", LIBRARY_GLIB); Linker.link(g_random_int, "g_random_int", LIBRARY_GLIB); Linker.link(g_random_int_range, "g_random_int_range", LIBRARY_GLIB); Linker.link(g_random_set_seed, "g_random_set_seed", LIBRARY_GLIB); // glib.RecMutex Linker.link(g_rec_mutex_clear, "g_rec_mutex_clear", LIBRARY_GLIB); Linker.link(g_rec_mutex_init, "g_rec_mutex_init", LIBRARY_GLIB); Linker.link(g_rec_mutex_lock, "g_rec_mutex_lock", LIBRARY_GLIB); Linker.link(g_rec_mutex_trylock, "g_rec_mutex_trylock", LIBRARY_GLIB); Linker.link(g_rec_mutex_unlock, "g_rec_mutex_unlock", LIBRARY_GLIB); // glib.Regex Linker.link(g_regex_new, "g_regex_new", LIBRARY_GLIB); Linker.link(g_regex_get_capture_count, "g_regex_get_capture_count", LIBRARY_GLIB); Linker.link(g_regex_get_compile_flags, "g_regex_get_compile_flags", LIBRARY_GLIB); Linker.link(g_regex_get_has_cr_or_lf, "g_regex_get_has_cr_or_lf", LIBRARY_GLIB); Linker.link(g_regex_get_match_flags, "g_regex_get_match_flags", LIBRARY_GLIB); Linker.link(g_regex_get_max_backref, "g_regex_get_max_backref", LIBRARY_GLIB); Linker.link(g_regex_get_max_lookbehind, "g_regex_get_max_lookbehind", LIBRARY_GLIB); Linker.link(g_regex_get_pattern, "g_regex_get_pattern", LIBRARY_GLIB); Linker.link(g_regex_get_string_number, "g_regex_get_string_number", LIBRARY_GLIB); Linker.link(g_regex_match, "g_regex_match", LIBRARY_GLIB); Linker.link(g_regex_match_all, "g_regex_match_all", LIBRARY_GLIB); Linker.link(g_regex_match_all_full, "g_regex_match_all_full", LIBRARY_GLIB); Linker.link(g_regex_match_full, "g_regex_match_full", LIBRARY_GLIB); Linker.link(g_regex_ref, "g_regex_ref", LIBRARY_GLIB); Linker.link(g_regex_replace, "g_regex_replace", LIBRARY_GLIB); Linker.link(g_regex_replace_eval, "g_regex_replace_eval", LIBRARY_GLIB); Linker.link(g_regex_replace_literal, "g_regex_replace_literal", LIBRARY_GLIB); Linker.link(g_regex_split, "g_regex_split", LIBRARY_GLIB); Linker.link(g_regex_split_full, "g_regex_split_full", LIBRARY_GLIB); Linker.link(g_regex_unref, "g_regex_unref", LIBRARY_GLIB); Linker.link(g_regex_check_replacement, "g_regex_check_replacement", LIBRARY_GLIB); Linker.link(g_regex_error_quark, "g_regex_error_quark", LIBRARY_GLIB); Linker.link(g_regex_escape_nul, "g_regex_escape_nul", LIBRARY_GLIB); Linker.link(g_regex_escape_string, "g_regex_escape_string", LIBRARY_GLIB); Linker.link(g_regex_match_simple, "g_regex_match_simple", LIBRARY_GLIB); Linker.link(g_regex_split_simple, "g_regex_split_simple", LIBRARY_GLIB); // glib.ListSG Linker.link(g_slist_alloc, "g_slist_alloc", LIBRARY_GLIB); Linker.link(g_slist_append, "g_slist_append", LIBRARY_GLIB); Linker.link(g_slist_concat, "g_slist_concat", LIBRARY_GLIB); Linker.link(g_slist_copy, "g_slist_copy", LIBRARY_GLIB); Linker.link(g_slist_copy_deep, "g_slist_copy_deep", LIBRARY_GLIB); Linker.link(g_slist_delete_link, "g_slist_delete_link", LIBRARY_GLIB); Linker.link(g_slist_find, "g_slist_find", LIBRARY_GLIB); Linker.link(g_slist_find_custom, "g_slist_find_custom", LIBRARY_GLIB); Linker.link(g_slist_foreach, "g_slist_foreach", LIBRARY_GLIB); Linker.link(g_slist_free, "g_slist_free", LIBRARY_GLIB); Linker.link(g_slist_free_1, "g_slist_free_1", LIBRARY_GLIB); Linker.link(g_slist_free_full, "g_slist_free_full", LIBRARY_GLIB); Linker.link(g_slist_index, "g_slist_index", LIBRARY_GLIB); Linker.link(g_slist_insert, "g_slist_insert", LIBRARY_GLIB); Linker.link(g_slist_insert_before, "g_slist_insert_before", LIBRARY_GLIB); Linker.link(g_slist_insert_sorted, "g_slist_insert_sorted", LIBRARY_GLIB); Linker.link(g_slist_insert_sorted_with_data, "g_slist_insert_sorted_with_data", LIBRARY_GLIB); Linker.link(g_slist_last, "g_slist_last", LIBRARY_GLIB); Linker.link(g_slist_length, "g_slist_length", LIBRARY_GLIB); Linker.link(g_slist_nth, "g_slist_nth", LIBRARY_GLIB); Linker.link(g_slist_nth_data, "g_slist_nth_data", LIBRARY_GLIB); Linker.link(g_slist_position, "g_slist_position", LIBRARY_GLIB); Linker.link(g_slist_prepend, "g_slist_prepend", LIBRARY_GLIB); Linker.link(g_slist_remove, "g_slist_remove", LIBRARY_GLIB); Linker.link(g_slist_remove_all, "g_slist_remove_all", LIBRARY_GLIB); Linker.link(g_slist_remove_link, "g_slist_remove_link", LIBRARY_GLIB); Linker.link(g_slist_reverse, "g_slist_reverse", LIBRARY_GLIB); Linker.link(g_slist_sort, "g_slist_sort", LIBRARY_GLIB); Linker.link(g_slist_sort_with_data, "g_slist_sort_with_data", LIBRARY_GLIB); // glib.ScannerG Linker.link(g_scanner_cur_line, "g_scanner_cur_line", LIBRARY_GLIB); Linker.link(g_scanner_cur_position, "g_scanner_cur_position", LIBRARY_GLIB); Linker.link(g_scanner_cur_token, "g_scanner_cur_token", LIBRARY_GLIB); Linker.link(g_scanner_cur_value, "g_scanner_cur_value", LIBRARY_GLIB); Linker.link(g_scanner_destroy, "g_scanner_destroy", LIBRARY_GLIB); Linker.link(g_scanner_eof, "g_scanner_eof", LIBRARY_GLIB); Linker.link(g_scanner_error, "g_scanner_error", LIBRARY_GLIB); Linker.link(g_scanner_get_next_token, "g_scanner_get_next_token", LIBRARY_GLIB); Linker.link(g_scanner_input_file, "g_scanner_input_file", LIBRARY_GLIB); Linker.link(g_scanner_input_text, "g_scanner_input_text", LIBRARY_GLIB); Linker.link(g_scanner_lookup_symbol, "g_scanner_lookup_symbol", LIBRARY_GLIB); Linker.link(g_scanner_peek_next_token, "g_scanner_peek_next_token", LIBRARY_GLIB); Linker.link(g_scanner_scope_add_symbol, "g_scanner_scope_add_symbol", LIBRARY_GLIB); Linker.link(g_scanner_scope_foreach_symbol, "g_scanner_scope_foreach_symbol", LIBRARY_GLIB); Linker.link(g_scanner_scope_lookup_symbol, "g_scanner_scope_lookup_symbol", LIBRARY_GLIB); Linker.link(g_scanner_scope_remove_symbol, "g_scanner_scope_remove_symbol", LIBRARY_GLIB); Linker.link(g_scanner_set_scope, "g_scanner_set_scope", LIBRARY_GLIB); Linker.link(g_scanner_sync_file_offset, "g_scanner_sync_file_offset", LIBRARY_GLIB); Linker.link(g_scanner_unexp_token, "g_scanner_unexp_token", LIBRARY_GLIB); Linker.link(g_scanner_warn, "g_scanner_warn", LIBRARY_GLIB); Linker.link(g_scanner_new, "g_scanner_new", LIBRARY_GLIB); // glib.Sequence Linker.link(g_sequence_append, "g_sequence_append", LIBRARY_GLIB); Linker.link(g_sequence_foreach, "g_sequence_foreach", LIBRARY_GLIB); Linker.link(g_sequence_free, "g_sequence_free", LIBRARY_GLIB); Linker.link(g_sequence_get_begin_iter, "g_sequence_get_begin_iter", LIBRARY_GLIB); Linker.link(g_sequence_get_end_iter, "g_sequence_get_end_iter", LIBRARY_GLIB); Linker.link(g_sequence_get_iter_at_pos, "g_sequence_get_iter_at_pos", LIBRARY_GLIB); Linker.link(g_sequence_get_length, "g_sequence_get_length", LIBRARY_GLIB); Linker.link(g_sequence_insert_sorted, "g_sequence_insert_sorted", LIBRARY_GLIB); Linker.link(g_sequence_insert_sorted_iter, "g_sequence_insert_sorted_iter", LIBRARY_GLIB); Linker.link(g_sequence_is_empty, "g_sequence_is_empty", LIBRARY_GLIB); Linker.link(g_sequence_lookup, "g_sequence_lookup", LIBRARY_GLIB); Linker.link(g_sequence_lookup_iter, "g_sequence_lookup_iter", LIBRARY_GLIB); Linker.link(g_sequence_prepend, "g_sequence_prepend", LIBRARY_GLIB); Linker.link(g_sequence_search, "g_sequence_search", LIBRARY_GLIB); Linker.link(g_sequence_search_iter, "g_sequence_search_iter", LIBRARY_GLIB); Linker.link(g_sequence_sort, "g_sequence_sort", LIBRARY_GLIB); Linker.link(g_sequence_sort_iter, "g_sequence_sort_iter", LIBRARY_GLIB); Linker.link(g_sequence_foreach_range, "g_sequence_foreach_range", LIBRARY_GLIB); Linker.link(g_sequence_get, "g_sequence_get", LIBRARY_GLIB); Linker.link(g_sequence_insert_before, "g_sequence_insert_before", LIBRARY_GLIB); Linker.link(g_sequence_move, "g_sequence_move", LIBRARY_GLIB); Linker.link(g_sequence_move_range, "g_sequence_move_range", LIBRARY_GLIB); Linker.link(g_sequence_new, "g_sequence_new", LIBRARY_GLIB); Linker.link(g_sequence_range_get_midpoint, "g_sequence_range_get_midpoint", LIBRARY_GLIB); Linker.link(g_sequence_remove, "g_sequence_remove", LIBRARY_GLIB); Linker.link(g_sequence_remove_range, "g_sequence_remove_range", LIBRARY_GLIB); Linker.link(g_sequence_set, "g_sequence_set", LIBRARY_GLIB); Linker.link(g_sequence_sort_changed, "g_sequence_sort_changed", LIBRARY_GLIB); Linker.link(g_sequence_sort_changed_iter, "g_sequence_sort_changed_iter", LIBRARY_GLIB); Linker.link(g_sequence_swap, "g_sequence_swap", LIBRARY_GLIB); // glib.SequenceIter Linker.link(g_sequence_iter_compare, "g_sequence_iter_compare", LIBRARY_GLIB); Linker.link(g_sequence_iter_get_position, "g_sequence_iter_get_position", LIBRARY_GLIB); Linker.link(g_sequence_iter_get_sequence, "g_sequence_iter_get_sequence", LIBRARY_GLIB); Linker.link(g_sequence_iter_is_begin, "g_sequence_iter_is_begin", LIBRARY_GLIB); Linker.link(g_sequence_iter_is_end, "g_sequence_iter_is_end", LIBRARY_GLIB); Linker.link(g_sequence_iter_move, "g_sequence_iter_move", LIBRARY_GLIB); Linker.link(g_sequence_iter_next, "g_sequence_iter_next", LIBRARY_GLIB); Linker.link(g_sequence_iter_prev, "g_sequence_iter_prev", LIBRARY_GLIB); // glib.Source Linker.link(g_source_new, "g_source_new", LIBRARY_GLIB); Linker.link(g_source_add_child_source, "g_source_add_child_source", LIBRARY_GLIB); Linker.link(g_source_add_poll, "g_source_add_poll", LIBRARY_GLIB); Linker.link(g_source_add_unix_fd, "g_source_add_unix_fd", LIBRARY_GLIB); Linker.link(g_source_attach, "g_source_attach", LIBRARY_GLIB); Linker.link(g_source_destroy, "g_source_destroy", LIBRARY_GLIB); Linker.link(g_source_get_can_recurse, "g_source_get_can_recurse", LIBRARY_GLIB); Linker.link(g_source_get_context, "g_source_get_context", LIBRARY_GLIB); Linker.link(g_source_get_current_time, "g_source_get_current_time", LIBRARY_GLIB); Linker.link(g_source_get_id, "g_source_get_id", LIBRARY_GLIB); Linker.link(g_source_get_name, "g_source_get_name", LIBRARY_GLIB); Linker.link(g_source_get_priority, "g_source_get_priority", LIBRARY_GLIB); Linker.link(g_source_get_ready_time, "g_source_get_ready_time", LIBRARY_GLIB); Linker.link(g_source_get_time, "g_source_get_time", LIBRARY_GLIB); Linker.link(g_source_is_destroyed, "g_source_is_destroyed", LIBRARY_GLIB); Linker.link(g_source_modify_unix_fd, "g_source_modify_unix_fd", LIBRARY_GLIB); Linker.link(g_source_query_unix_fd, "g_source_query_unix_fd", LIBRARY_GLIB); Linker.link(g_source_ref, "g_source_ref", LIBRARY_GLIB); Linker.link(g_source_remove_child_source, "g_source_remove_child_source", LIBRARY_GLIB); Linker.link(g_source_remove_poll, "g_source_remove_poll", LIBRARY_GLIB); Linker.link(g_source_remove_unix_fd, "g_source_remove_unix_fd", LIBRARY_GLIB); Linker.link(g_source_set_callback, "g_source_set_callback", LIBRARY_GLIB); Linker.link(g_source_set_callback_indirect, "g_source_set_callback_indirect", LIBRARY_GLIB); Linker.link(g_source_set_can_recurse, "g_source_set_can_recurse", LIBRARY_GLIB); Linker.link(g_source_set_funcs, "g_source_set_funcs", LIBRARY_GLIB); Linker.link(g_source_set_name, "g_source_set_name", LIBRARY_GLIB); Linker.link(g_source_set_priority, "g_source_set_priority", LIBRARY_GLIB); Linker.link(g_source_set_ready_time, "g_source_set_ready_time", LIBRARY_GLIB); Linker.link(g_source_unref, "g_source_unref", LIBRARY_GLIB); Linker.link(g_source_remove, "g_source_remove", LIBRARY_GLIB); Linker.link(g_source_remove_by_funcs_user_data, "g_source_remove_by_funcs_user_data", LIBRARY_GLIB); Linker.link(g_source_remove_by_user_data, "g_source_remove_by_user_data", LIBRARY_GLIB); Linker.link(g_source_set_name_by_id, "g_source_set_name_by_id", LIBRARY_GLIB); // glib.StringG Linker.link(g_string_append, "g_string_append", LIBRARY_GLIB); Linker.link(g_string_append_c, "g_string_append_c", LIBRARY_GLIB); Linker.link(g_string_append_len, "g_string_append_len", LIBRARY_GLIB); Linker.link(g_string_append_printf, "g_string_append_printf", LIBRARY_GLIB); Linker.link(g_string_append_unichar, "g_string_append_unichar", LIBRARY_GLIB); Linker.link(g_string_append_uri_escaped, "g_string_append_uri_escaped", LIBRARY_GLIB); Linker.link(g_string_append_vprintf, "g_string_append_vprintf", LIBRARY_GLIB); Linker.link(g_string_ascii_down, "g_string_ascii_down", LIBRARY_GLIB); Linker.link(g_string_ascii_up, "g_string_ascii_up", LIBRARY_GLIB); Linker.link(g_string_assign, "g_string_assign", LIBRARY_GLIB); Linker.link(g_string_down, "g_string_down", LIBRARY_GLIB); Linker.link(g_string_equal, "g_string_equal", LIBRARY_GLIB); Linker.link(g_string_erase, "g_string_erase", LIBRARY_GLIB); Linker.link(g_string_free, "g_string_free", LIBRARY_GLIB); Linker.link(g_string_free_to_bytes, "g_string_free_to_bytes", LIBRARY_GLIB); Linker.link(g_string_hash, "g_string_hash", LIBRARY_GLIB); Linker.link(g_string_insert, "g_string_insert", LIBRARY_GLIB); Linker.link(g_string_insert_c, "g_string_insert_c", LIBRARY_GLIB); Linker.link(g_string_insert_len, "g_string_insert_len", LIBRARY_GLIB); Linker.link(g_string_insert_unichar, "g_string_insert_unichar", LIBRARY_GLIB); Linker.link(g_string_overwrite, "g_string_overwrite", LIBRARY_GLIB); Linker.link(g_string_overwrite_len, "g_string_overwrite_len", LIBRARY_GLIB); Linker.link(g_string_prepend, "g_string_prepend", LIBRARY_GLIB); Linker.link(g_string_prepend_c, "g_string_prepend_c", LIBRARY_GLIB); Linker.link(g_string_prepend_len, "g_string_prepend_len", LIBRARY_GLIB); Linker.link(g_string_prepend_unichar, "g_string_prepend_unichar", LIBRARY_GLIB); Linker.link(g_string_printf, "g_string_printf", LIBRARY_GLIB); Linker.link(g_string_set_size, "g_string_set_size", LIBRARY_GLIB); Linker.link(g_string_truncate, "g_string_truncate", LIBRARY_GLIB); Linker.link(g_string_up, "g_string_up", LIBRARY_GLIB); Linker.link(g_string_vprintf, "g_string_vprintf", LIBRARY_GLIB); Linker.link(g_string_new, "g_string_new", LIBRARY_GLIB); Linker.link(g_string_new_len, "g_string_new_len", LIBRARY_GLIB); Linker.link(g_string_sized_new, "g_string_sized_new", LIBRARY_GLIB); // glib.StringChunk Linker.link(g_string_chunk_clear, "g_string_chunk_clear", LIBRARY_GLIB); Linker.link(g_string_chunk_free, "g_string_chunk_free", LIBRARY_GLIB); Linker.link(g_string_chunk_insert, "g_string_chunk_insert", LIBRARY_GLIB); Linker.link(g_string_chunk_insert_const, "g_string_chunk_insert_const", LIBRARY_GLIB); Linker.link(g_string_chunk_insert_len, "g_string_chunk_insert_len", LIBRARY_GLIB); Linker.link(g_string_chunk_new, "g_string_chunk_new", LIBRARY_GLIB); // glib.TestLogBuffer Linker.link(g_test_log_buffer_free, "g_test_log_buffer_free", LIBRARY_GLIB); Linker.link(g_test_log_buffer_pop, "g_test_log_buffer_pop", LIBRARY_GLIB); Linker.link(g_test_log_buffer_push, "g_test_log_buffer_push", LIBRARY_GLIB); Linker.link(g_test_log_buffer_new, "g_test_log_buffer_new", LIBRARY_GLIB); // glib.TestLogMsg Linker.link(g_test_log_msg_free, "g_test_log_msg_free", LIBRARY_GLIB); // glib.TestSuite Linker.link(g_test_suite_add, "g_test_suite_add", LIBRARY_GLIB); Linker.link(g_test_suite_add_suite, "g_test_suite_add_suite", LIBRARY_GLIB); // glib.Thread Linker.link(g_thread_new, "g_thread_new", LIBRARY_GLIB); Linker.link(g_thread_try_new, "g_thread_try_new", LIBRARY_GLIB); Linker.link(g_thread_join, "g_thread_join", LIBRARY_GLIB); Linker.link(g_thread_ref, "g_thread_ref", LIBRARY_GLIB); Linker.link(g_thread_unref, "g_thread_unref", LIBRARY_GLIB); Linker.link(g_thread_error_quark, "g_thread_error_quark", LIBRARY_GLIB); Linker.link(g_thread_exit, "g_thread_exit", LIBRARY_GLIB); Linker.link(g_thread_self, "g_thread_self", LIBRARY_GLIB); Linker.link(g_thread_yield, "g_thread_yield", LIBRARY_GLIB); Linker.link(g_bit_lock, "g_bit_lock", LIBRARY_GLIB); Linker.link(g_bit_trylock, "g_bit_trylock", LIBRARY_GLIB); Linker.link(g_bit_unlock, "g_bit_unlock", LIBRARY_GLIB); Linker.link(g_get_num_processors, "g_get_num_processors", LIBRARY_GLIB); Linker.link(g_pointer_bit_lock, "g_pointer_bit_lock", LIBRARY_GLIB); Linker.link(g_pointer_bit_trylock, "g_pointer_bit_trylock", LIBRARY_GLIB); Linker.link(g_pointer_bit_unlock, "g_pointer_bit_unlock", LIBRARY_GLIB); // glib.ThreadPool Linker.link(g_thread_pool_free, "g_thread_pool_free", LIBRARY_GLIB); Linker.link(g_thread_pool_get_max_threads, "g_thread_pool_get_max_threads", LIBRARY_GLIB); Linker.link(g_thread_pool_get_num_threads, "g_thread_pool_get_num_threads", LIBRARY_GLIB); Linker.link(g_thread_pool_move_to_front, "g_thread_pool_move_to_front", LIBRARY_GLIB); Linker.link(g_thread_pool_push, "g_thread_pool_push", LIBRARY_GLIB); Linker.link(g_thread_pool_set_max_threads, "g_thread_pool_set_max_threads", LIBRARY_GLIB); Linker.link(g_thread_pool_set_sort_function, "g_thread_pool_set_sort_function", LIBRARY_GLIB); Linker.link(g_thread_pool_unprocessed, "g_thread_pool_unprocessed", LIBRARY_GLIB); Linker.link(g_thread_pool_get_max_idle_time, "g_thread_pool_get_max_idle_time", LIBRARY_GLIB); Linker.link(g_thread_pool_get_max_unused_threads, "g_thread_pool_get_max_unused_threads", LIBRARY_GLIB); Linker.link(g_thread_pool_get_num_unused_threads, "g_thread_pool_get_num_unused_threads", LIBRARY_GLIB); Linker.link(g_thread_pool_new, "g_thread_pool_new", LIBRARY_GLIB); Linker.link(g_thread_pool_set_max_idle_time, "g_thread_pool_set_max_idle_time", LIBRARY_GLIB); Linker.link(g_thread_pool_set_max_unused_threads, "g_thread_pool_set_max_unused_threads", LIBRARY_GLIB); Linker.link(g_thread_pool_stop_unused_threads, "g_thread_pool_stop_unused_threads", LIBRARY_GLIB); // glib.TimeVal Linker.link(g_time_val_add, "g_time_val_add", LIBRARY_GLIB); Linker.link(g_time_val_to_iso8601, "g_time_val_to_iso8601", LIBRARY_GLIB); Linker.link(g_time_val_from_iso8601, "g_time_val_from_iso8601", LIBRARY_GLIB); Linker.link(g_get_current_time, "g_get_current_time", LIBRARY_GLIB); Linker.link(g_get_monotonic_time, "g_get_monotonic_time", LIBRARY_GLIB); Linker.link(g_get_real_time, "g_get_real_time", LIBRARY_GLIB); Linker.link(g_usleep, "g_usleep", LIBRARY_GLIB); // glib.TimeZone Linker.link(g_time_zone_new, "g_time_zone_new", LIBRARY_GLIB); Linker.link(g_time_zone_new_local, "g_time_zone_new_local", LIBRARY_GLIB); Linker.link(g_time_zone_new_utc, "g_time_zone_new_utc", LIBRARY_GLIB); Linker.link(g_time_zone_adjust_time, "g_time_zone_adjust_time", LIBRARY_GLIB); Linker.link(g_time_zone_find_interval, "g_time_zone_find_interval", LIBRARY_GLIB); Linker.link(g_time_zone_get_abbreviation, "g_time_zone_get_abbreviation", LIBRARY_GLIB); Linker.link(g_time_zone_get_offset, "g_time_zone_get_offset", LIBRARY_GLIB); Linker.link(g_time_zone_is_dst, "g_time_zone_is_dst", LIBRARY_GLIB); Linker.link(g_time_zone_ref, "g_time_zone_ref", LIBRARY_GLIB); Linker.link(g_time_zone_unref, "g_time_zone_unref", LIBRARY_GLIB); // glib.Timer Linker.link(g_timer_continue, "g_timer_continue", LIBRARY_GLIB); Linker.link(g_timer_destroy, "g_timer_destroy", LIBRARY_GLIB); Linker.link(g_timer_elapsed, "g_timer_elapsed", LIBRARY_GLIB); Linker.link(g_timer_reset, "g_timer_reset", LIBRARY_GLIB); Linker.link(g_timer_start, "g_timer_start", LIBRARY_GLIB); Linker.link(g_timer_stop, "g_timer_stop", LIBRARY_GLIB); Linker.link(g_timer_new, "g_timer_new", LIBRARY_GLIB); // glib.TrashStack Linker.link(g_trash_stack_height, "g_trash_stack_height", LIBRARY_GLIB); Linker.link(g_trash_stack_peek, "g_trash_stack_peek", LIBRARY_GLIB); Linker.link(g_trash_stack_pop, "g_trash_stack_pop", LIBRARY_GLIB); Linker.link(g_trash_stack_push, "g_trash_stack_push", LIBRARY_GLIB); // glib.BBTree Linker.link(g_tree_destroy, "g_tree_destroy", LIBRARY_GLIB); Linker.link(g_tree_foreach, "g_tree_foreach", LIBRARY_GLIB); Linker.link(g_tree_height, "g_tree_height", LIBRARY_GLIB); Linker.link(g_tree_insert, "g_tree_insert", LIBRARY_GLIB); Linker.link(g_tree_lookup, "g_tree_lookup", LIBRARY_GLIB); Linker.link(g_tree_lookup_extended, "g_tree_lookup_extended", LIBRARY_GLIB); Linker.link(g_tree_nnodes, "g_tree_nnodes", LIBRARY_GLIB); Linker.link(g_tree_ref, "g_tree_ref", LIBRARY_GLIB); Linker.link(g_tree_remove, "g_tree_remove", LIBRARY_GLIB); Linker.link(g_tree_replace, "g_tree_replace", LIBRARY_GLIB); Linker.link(g_tree_search, "g_tree_search", LIBRARY_GLIB); Linker.link(g_tree_steal, "g_tree_steal", LIBRARY_GLIB); Linker.link(g_tree_traverse, "g_tree_traverse", LIBRARY_GLIB); Linker.link(g_tree_unref, "g_tree_unref", LIBRARY_GLIB); Linker.link(g_tree_new, "g_tree_new", LIBRARY_GLIB); Linker.link(g_tree_new_full, "g_tree_new_full", LIBRARY_GLIB); Linker.link(g_tree_new_with_data, "g_tree_new_with_data", LIBRARY_GLIB); // glib.Variant Linker.link(g_variant_new, "g_variant_new", LIBRARY_GLIB); Linker.link(g_variant_new_array, "g_variant_new_array", LIBRARY_GLIB); Linker.link(g_variant_new_boolean, "g_variant_new_boolean", LIBRARY_GLIB); Linker.link(g_variant_new_byte, "g_variant_new_byte", LIBRARY_GLIB); Linker.link(g_variant_new_bytestring, "g_variant_new_bytestring", LIBRARY_GLIB); Linker.link(g_variant_new_bytestring_array, "g_variant_new_bytestring_array", LIBRARY_GLIB); Linker.link(g_variant_new_dict_entry, "g_variant_new_dict_entry", LIBRARY_GLIB); Linker.link(g_variant_new_double, "g_variant_new_double", LIBRARY_GLIB); Linker.link(g_variant_new_fixed_array, "g_variant_new_fixed_array", LIBRARY_GLIB); Linker.link(g_variant_new_from_bytes, "g_variant_new_from_bytes", LIBRARY_GLIB); Linker.link(g_variant_new_from_data, "g_variant_new_from_data", LIBRARY_GLIB); Linker.link(g_variant_new_handle, "g_variant_new_handle", LIBRARY_GLIB); Linker.link(g_variant_new_int16, "g_variant_new_int16", LIBRARY_GLIB); Linker.link(g_variant_new_int32, "g_variant_new_int32", LIBRARY_GLIB); Linker.link(g_variant_new_int64, "g_variant_new_int64", LIBRARY_GLIB); Linker.link(g_variant_new_maybe, "g_variant_new_maybe", LIBRARY_GLIB); Linker.link(g_variant_new_object_path, "g_variant_new_object_path", LIBRARY_GLIB); Linker.link(g_variant_new_objv, "g_variant_new_objv", LIBRARY_GLIB); Linker.link(g_variant_new_parsed, "g_variant_new_parsed", LIBRARY_GLIB); Linker.link(g_variant_new_parsed_va, "g_variant_new_parsed_va", LIBRARY_GLIB); Linker.link(g_variant_new_printf, "g_variant_new_printf", LIBRARY_GLIB); Linker.link(g_variant_new_signature, "g_variant_new_signature", LIBRARY_GLIB); Linker.link(g_variant_new_string, "g_variant_new_string", LIBRARY_GLIB); Linker.link(g_variant_new_strv, "g_variant_new_strv", LIBRARY_GLIB); Linker.link(g_variant_new_take_string, "g_variant_new_take_string", LIBRARY_GLIB); Linker.link(g_variant_new_tuple, "g_variant_new_tuple", LIBRARY_GLIB); Linker.link(g_variant_new_uint16, "g_variant_new_uint16", LIBRARY_GLIB); Linker.link(g_variant_new_uint32, "g_variant_new_uint32", LIBRARY_GLIB); Linker.link(g_variant_new_uint64, "g_variant_new_uint64", LIBRARY_GLIB); Linker.link(g_variant_new_va, "g_variant_new_va", LIBRARY_GLIB); Linker.link(g_variant_new_variant, "g_variant_new_variant", LIBRARY_GLIB); Linker.link(g_variant_byteswap, "g_variant_byteswap", LIBRARY_GLIB); Linker.link(g_variant_check_format_string, "g_variant_check_format_string", LIBRARY_GLIB); Linker.link(g_variant_classify, "g_variant_classify", LIBRARY_GLIB); Linker.link(g_variant_compare, "g_variant_compare", LIBRARY_GLIB); Linker.link(g_variant_dup_bytestring, "g_variant_dup_bytestring", LIBRARY_GLIB); Linker.link(g_variant_dup_bytestring_array, "g_variant_dup_bytestring_array", LIBRARY_GLIB); Linker.link(g_variant_dup_objv, "g_variant_dup_objv", LIBRARY_GLIB); Linker.link(g_variant_dup_string, "g_variant_dup_string", LIBRARY_GLIB); Linker.link(g_variant_dup_strv, "g_variant_dup_strv", LIBRARY_GLIB); Linker.link(g_variant_equal, "g_variant_equal", LIBRARY_GLIB); Linker.link(g_variant_get, "g_variant_get", LIBRARY_GLIB); Linker.link(g_variant_get_boolean, "g_variant_get_boolean", LIBRARY_GLIB); Linker.link(g_variant_get_byte, "g_variant_get_byte", LIBRARY_GLIB); Linker.link(g_variant_get_bytestring, "g_variant_get_bytestring", LIBRARY_GLIB); Linker.link(g_variant_get_bytestring_array, "g_variant_get_bytestring_array", LIBRARY_GLIB); Linker.link(g_variant_get_child, "g_variant_get_child", LIBRARY_GLIB); Linker.link(g_variant_get_child_value, "g_variant_get_child_value", LIBRARY_GLIB); Linker.link(g_variant_get_data, "g_variant_get_data", LIBRARY_GLIB); Linker.link(g_variant_get_data_as_bytes, "g_variant_get_data_as_bytes", LIBRARY_GLIB); Linker.link(g_variant_get_double, "g_variant_get_double", LIBRARY_GLIB); Linker.link(g_variant_get_fixed_array, "g_variant_get_fixed_array", LIBRARY_GLIB); Linker.link(g_variant_get_handle, "g_variant_get_handle", LIBRARY_GLIB); Linker.link(g_variant_get_int16, "g_variant_get_int16", LIBRARY_GLIB); Linker.link(g_variant_get_int32, "g_variant_get_int32", LIBRARY_GLIB); Linker.link(g_variant_get_int64, "g_variant_get_int64", LIBRARY_GLIB); Linker.link(g_variant_get_maybe, "g_variant_get_maybe", LIBRARY_GLIB); Linker.link(g_variant_get_normal_form, "g_variant_get_normal_form", LIBRARY_GLIB); Linker.link(g_variant_get_objv, "g_variant_get_objv", LIBRARY_GLIB); Linker.link(g_variant_get_size, "g_variant_get_size", LIBRARY_GLIB); Linker.link(g_variant_get_string, "g_variant_get_string", LIBRARY_GLIB); Linker.link(g_variant_get_strv, "g_variant_get_strv", LIBRARY_GLIB); Linker.link(g_variant_get_type, "g_variant_get_type", LIBRARY_GLIB); Linker.link(g_variant_get_type_string, "g_variant_get_type_string", LIBRARY_GLIB); Linker.link(g_variant_get_uint16, "g_variant_get_uint16", LIBRARY_GLIB); Linker.link(g_variant_get_uint32, "g_variant_get_uint32", LIBRARY_GLIB); Linker.link(g_variant_get_uint64, "g_variant_get_uint64", LIBRARY_GLIB); Linker.link(g_variant_get_va, "g_variant_get_va", LIBRARY_GLIB); Linker.link(g_variant_get_variant, "g_variant_get_variant", LIBRARY_GLIB); Linker.link(g_variant_hash, "g_variant_hash", LIBRARY_GLIB); Linker.link(g_variant_is_container, "g_variant_is_container", LIBRARY_GLIB); Linker.link(g_variant_is_floating, "g_variant_is_floating", LIBRARY_GLIB); Linker.link(g_variant_is_normal_form, "g_variant_is_normal_form", LIBRARY_GLIB); Linker.link(g_variant_is_of_type, "g_variant_is_of_type", LIBRARY_GLIB); Linker.link(g_variant_iter_new, "g_variant_iter_new", LIBRARY_GLIB); Linker.link(g_variant_lookup, "g_variant_lookup", LIBRARY_GLIB); Linker.link(g_variant_lookup_value, "g_variant_lookup_value", LIBRARY_GLIB); Linker.link(g_variant_n_children, "g_variant_n_children", LIBRARY_GLIB); Linker.link(g_variant_print, "g_variant_print", LIBRARY_GLIB); Linker.link(g_variant_print_string, "g_variant_print_string", LIBRARY_GLIB); Linker.link(g_variant_ref, "g_variant_ref", LIBRARY_GLIB); Linker.link(g_variant_ref_sink, "g_variant_ref_sink", LIBRARY_GLIB); Linker.link(g_variant_store, "g_variant_store", LIBRARY_GLIB); Linker.link(g_variant_take_ref, "g_variant_take_ref", LIBRARY_GLIB); Linker.link(g_variant_unref, "g_variant_unref", LIBRARY_GLIB); Linker.link(g_variant_is_object_path, "g_variant_is_object_path", LIBRARY_GLIB); Linker.link(g_variant_is_signature, "g_variant_is_signature", LIBRARY_GLIB); Linker.link(g_variant_parse, "g_variant_parse", LIBRARY_GLIB); Linker.link(g_variant_parse_error_print_context, "g_variant_parse_error_print_context", LIBRARY_GLIB); Linker.link(g_variant_parse_error_quark, "g_variant_parse_error_quark", LIBRARY_GLIB); Linker.link(g_variant_parser_get_error_quark, "g_variant_parser_get_error_quark", LIBRARY_GLIB); // glib.VariantBuilder Linker.link(g_variant_builder_new, "g_variant_builder_new", LIBRARY_GLIB); Linker.link(g_variant_builder_add, "g_variant_builder_add", LIBRARY_GLIB); Linker.link(g_variant_builder_add_parsed, "g_variant_builder_add_parsed", LIBRARY_GLIB); Linker.link(g_variant_builder_add_value, "g_variant_builder_add_value", LIBRARY_GLIB); Linker.link(g_variant_builder_clear, "g_variant_builder_clear", LIBRARY_GLIB); Linker.link(g_variant_builder_close, "g_variant_builder_close", LIBRARY_GLIB); Linker.link(g_variant_builder_end, "g_variant_builder_end", LIBRARY_GLIB); Linker.link(g_variant_builder_init, "g_variant_builder_init", LIBRARY_GLIB); Linker.link(g_variant_builder_open, "g_variant_builder_open", LIBRARY_GLIB); Linker.link(g_variant_builder_ref, "g_variant_builder_ref", LIBRARY_GLIB); Linker.link(g_variant_builder_unref, "g_variant_builder_unref", LIBRARY_GLIB); // glib.VariantDict Linker.link(g_variant_dict_new, "g_variant_dict_new", LIBRARY_GLIB); Linker.link(g_variant_dict_clear, "g_variant_dict_clear", LIBRARY_GLIB); Linker.link(g_variant_dict_contains, "g_variant_dict_contains", LIBRARY_GLIB); Linker.link(g_variant_dict_end, "g_variant_dict_end", LIBRARY_GLIB); Linker.link(g_variant_dict_init, "g_variant_dict_init", LIBRARY_GLIB); Linker.link(g_variant_dict_insert, "g_variant_dict_insert", LIBRARY_GLIB); Linker.link(g_variant_dict_insert_value, "g_variant_dict_insert_value", LIBRARY_GLIB); Linker.link(g_variant_dict_lookup, "g_variant_dict_lookup", LIBRARY_GLIB); Linker.link(g_variant_dict_lookup_value, "g_variant_dict_lookup_value", LIBRARY_GLIB); Linker.link(g_variant_dict_ref, "g_variant_dict_ref", LIBRARY_GLIB); Linker.link(g_variant_dict_remove, "g_variant_dict_remove", LIBRARY_GLIB); Linker.link(g_variant_dict_unref, "g_variant_dict_unref", LIBRARY_GLIB); // glib.VariantIter Linker.link(g_variant_iter_copy, "g_variant_iter_copy", LIBRARY_GLIB); Linker.link(g_variant_iter_free, "g_variant_iter_free", LIBRARY_GLIB); Linker.link(g_variant_iter_init, "g_variant_iter_init", LIBRARY_GLIB); Linker.link(g_variant_iter_loop, "g_variant_iter_loop", LIBRARY_GLIB); Linker.link(g_variant_iter_n_children, "g_variant_iter_n_children", LIBRARY_GLIB); Linker.link(g_variant_iter_next, "g_variant_iter_next", LIBRARY_GLIB); Linker.link(g_variant_iter_next_value, "g_variant_iter_next_value", LIBRARY_GLIB); // glib.VariantType Linker.link(g_variant_type_new, "g_variant_type_new", LIBRARY_GLIB); Linker.link(g_variant_type_new_array, "g_variant_type_new_array", LIBRARY_GLIB); Linker.link(g_variant_type_new_dict_entry, "g_variant_type_new_dict_entry", LIBRARY_GLIB); Linker.link(g_variant_type_new_maybe, "g_variant_type_new_maybe", LIBRARY_GLIB); Linker.link(g_variant_type_new_tuple, "g_variant_type_new_tuple", LIBRARY_GLIB); Linker.link(g_variant_type_copy, "g_variant_type_copy", LIBRARY_GLIB); Linker.link(g_variant_type_dup_string, "g_variant_type_dup_string", LIBRARY_GLIB); Linker.link(g_variant_type_element, "g_variant_type_element", LIBRARY_GLIB); Linker.link(g_variant_type_equal, "g_variant_type_equal", LIBRARY_GLIB); Linker.link(g_variant_type_first, "g_variant_type_first", LIBRARY_GLIB); Linker.link(g_variant_type_free, "g_variant_type_free", LIBRARY_GLIB); Linker.link(g_variant_type_get_string_length, "g_variant_type_get_string_length", LIBRARY_GLIB); Linker.link(g_variant_type_hash, "g_variant_type_hash", LIBRARY_GLIB); Linker.link(g_variant_type_is_array, "g_variant_type_is_array", LIBRARY_GLIB); Linker.link(g_variant_type_is_basic, "g_variant_type_is_basic", LIBRARY_GLIB); Linker.link(g_variant_type_is_container, "g_variant_type_is_container", LIBRARY_GLIB); Linker.link(g_variant_type_is_definite, "g_variant_type_is_definite", LIBRARY_GLIB); Linker.link(g_variant_type_is_dict_entry, "g_variant_type_is_dict_entry", LIBRARY_GLIB); Linker.link(g_variant_type_is_maybe, "g_variant_type_is_maybe", LIBRARY_GLIB); Linker.link(g_variant_type_is_subtype_of, "g_variant_type_is_subtype_of", LIBRARY_GLIB); Linker.link(g_variant_type_is_tuple, "g_variant_type_is_tuple", LIBRARY_GLIB); Linker.link(g_variant_type_is_variant, "g_variant_type_is_variant", LIBRARY_GLIB); Linker.link(g_variant_type_key, "g_variant_type_key", LIBRARY_GLIB); Linker.link(g_variant_type_n_items, "g_variant_type_n_items", LIBRARY_GLIB); Linker.link(g_variant_type_next, "g_variant_type_next", LIBRARY_GLIB); Linker.link(g_variant_type_peek_string, "g_variant_type_peek_string", LIBRARY_GLIB); Linker.link(g_variant_type_value, "g_variant_type_value", LIBRARY_GLIB); Linker.link(g_variant_type_checked_, "g_variant_type_checked_", LIBRARY_GLIB); Linker.link(g_variant_type_string_is_valid, "g_variant_type_string_is_valid", LIBRARY_GLIB); Linker.link(g_variant_type_string_scan, "g_variant_type_string_scan", LIBRARY_GLIB); // glib.Module Linker.link(g_module_close, "g_module_close", LIBRARY_GLIB); Linker.link(g_module_make_resident, "g_module_make_resident", LIBRARY_GLIB); Linker.link(g_module_name, "g_module_name", LIBRARY_GLIB); Linker.link(g_module_symbol, "g_module_symbol", LIBRARY_GLIB); Linker.link(g_module_build_path, "g_module_build_path", LIBRARY_GLIB); Linker.link(g_module_error, "g_module_error", LIBRARY_GLIB); Linker.link(g_module_open, "g_module_open", LIBRARY_GLIB); Linker.link(g_module_supported, "g_module_supported", LIBRARY_GLIB); // glib.Base64 Linker.link(g_base64_decode_step, "g_base64_decode_step", LIBRARY_GLIB); Linker.link(g_base64_decode_inplace, "g_base64_decode_inplace", LIBRARY_GLIB); Linker.link(g_base64_decode, "g_base64_decode", LIBRARY_GLIB); Linker.link(g_base64_encode, "g_base64_encode", LIBRARY_GLIB); Linker.link(g_base64_encode_close, "g_base64_encode_close", LIBRARY_GLIB); Linker.link(g_base64_encode_step, "g_base64_encode_step", LIBRARY_GLIB); // glib.Idle Linker.link(g_idle_add, "g_idle_add", LIBRARY_GLIB); Linker.link(g_idle_add_full, "g_idle_add_full", LIBRARY_GLIB); Linker.link(g_idle_remove_by_data, "g_idle_remove_by_data", LIBRARY_GLIB); Linker.link(g_idle_source_new, "g_idle_source_new", LIBRARY_GLIB); // glib.MemorySlice Linker.link(g_slice_alloc, "g_slice_alloc", LIBRARY_GLIB); Linker.link(g_slice_alloc0, "g_slice_alloc0", LIBRARY_GLIB); Linker.link(g_slice_copy, "g_slice_copy", LIBRARY_GLIB); Linker.link(g_slice_free1, "g_slice_free1", LIBRARY_GLIB); Linker.link(g_slice_free_chain_with_offset, "g_slice_free_chain_with_offset", LIBRARY_GLIB); Linker.link(g_slice_get_config, "g_slice_get_config", LIBRARY_GLIB); Linker.link(g_slice_get_config_state, "g_slice_get_config_state", LIBRARY_GLIB); Linker.link(g_slice_set_config, "g_slice_set_config", LIBRARY_GLIB); // glib.Spawn Linker.link(g_spawn_async, "g_spawn_async", LIBRARY_GLIB); Linker.link(g_spawn_async_with_pipes, "g_spawn_async_with_pipes", LIBRARY_GLIB); Linker.link(g_spawn_check_exit_status, "g_spawn_check_exit_status", LIBRARY_GLIB); Linker.link(g_spawn_close_pid, "g_spawn_close_pid", LIBRARY_GLIB); Linker.link(g_spawn_command_line_async, "g_spawn_command_line_async", LIBRARY_GLIB); Linker.link(g_spawn_command_line_sync, "g_spawn_command_line_sync", LIBRARY_GLIB); Linker.link(g_spawn_error_quark, "g_spawn_error_quark", LIBRARY_GLIB); Linker.link(g_spawn_exit_error_quark, "g_spawn_exit_error_quark", LIBRARY_GLIB); Linker.link(g_spawn_sync, "g_spawn_sync", LIBRARY_GLIB); // glib.Str Linker.link(g_ascii_digit_value, "g_ascii_digit_value", LIBRARY_GLIB); Linker.link(g_ascii_dtostr, "g_ascii_dtostr", LIBRARY_GLIB); Linker.link(g_ascii_formatd, "g_ascii_formatd", LIBRARY_GLIB); Linker.link(g_ascii_strcasecmp, "g_ascii_strcasecmp", LIBRARY_GLIB); Linker.link(g_ascii_strdown, "g_ascii_strdown", LIBRARY_GLIB); Linker.link(g_ascii_strncasecmp, "g_ascii_strncasecmp", LIBRARY_GLIB); Linker.link(g_ascii_strtod, "g_ascii_strtod", LIBRARY_GLIB); Linker.link(g_ascii_strtoll, "g_ascii_strtoll", LIBRARY_GLIB); Linker.link(g_ascii_strtoull, "g_ascii_strtoull", LIBRARY_GLIB); Linker.link(g_ascii_strup, "g_ascii_strup", LIBRARY_GLIB); Linker.link(g_ascii_tolower, "g_ascii_tolower", LIBRARY_GLIB); Linker.link(g_ascii_toupper, "g_ascii_toupper", LIBRARY_GLIB); Linker.link(g_ascii_xdigit_value, "g_ascii_xdigit_value", LIBRARY_GLIB); Linker.link(g_printf, "g_printf", LIBRARY_GLIB); Linker.link(g_printf_string_upper_bound, "g_printf_string_upper_bound", LIBRARY_GLIB); Linker.link(g_snprintf, "g_snprintf", LIBRARY_GLIB); Linker.link(g_sprintf, "g_sprintf", LIBRARY_GLIB); Linker.link(g_stpcpy, "g_stpcpy", LIBRARY_GLIB); Linker.link(g_str_has_prefix, "g_str_has_prefix", LIBRARY_GLIB); Linker.link(g_str_has_suffix, "g_str_has_suffix", LIBRARY_GLIB); Linker.link(g_str_is_ascii, "g_str_is_ascii", LIBRARY_GLIB); Linker.link(g_str_match_string, "g_str_match_string", LIBRARY_GLIB); Linker.link(g_str_to_ascii, "g_str_to_ascii", LIBRARY_GLIB); Linker.link(g_str_tokenize_and_fold, "g_str_tokenize_and_fold", LIBRARY_GLIB); Linker.link(g_strcanon, "g_strcanon", LIBRARY_GLIB); Linker.link(g_strcasecmp, "g_strcasecmp", LIBRARY_GLIB); Linker.link(g_strchomp, "g_strchomp", LIBRARY_GLIB); Linker.link(g_strchug, "g_strchug", LIBRARY_GLIB); Linker.link(g_strcmp0, "g_strcmp0", LIBRARY_GLIB); Linker.link(g_strcompress, "g_strcompress", LIBRARY_GLIB); Linker.link(g_strconcat, "g_strconcat", LIBRARY_GLIB); Linker.link(g_strdelimit, "g_strdelimit", LIBRARY_GLIB); Linker.link(g_strdown, "g_strdown", LIBRARY_GLIB); Linker.link(g_strdup, "g_strdup", LIBRARY_GLIB); Linker.link(g_strdup_printf, "g_strdup_printf", LIBRARY_GLIB); Linker.link(g_strdup_vprintf, "g_strdup_vprintf", LIBRARY_GLIB); Linker.link(g_strdupv, "g_strdupv", LIBRARY_GLIB); Linker.link(g_strerror, "g_strerror", LIBRARY_GLIB); Linker.link(g_strescape, "g_strescape", LIBRARY_GLIB); Linker.link(g_strfreev, "g_strfreev", LIBRARY_GLIB); Linker.link(g_strjoin, "g_strjoin", LIBRARY_GLIB); Linker.link(g_strjoinv, "g_strjoinv", LIBRARY_GLIB); Linker.link(g_strlcat, "g_strlcat", LIBRARY_GLIB); Linker.link(g_strlcpy, "g_strlcpy", LIBRARY_GLIB); Linker.link(g_strncasecmp, "g_strncasecmp", LIBRARY_GLIB); Linker.link(g_strndup, "g_strndup", LIBRARY_GLIB); Linker.link(g_strnfill, "g_strnfill", LIBRARY_GLIB); Linker.link(g_strreverse, "g_strreverse", LIBRARY_GLIB); Linker.link(g_strrstr, "g_strrstr", LIBRARY_GLIB); Linker.link(g_strrstr_len, "g_strrstr_len", LIBRARY_GLIB); Linker.link(g_strsignal, "g_strsignal", LIBRARY_GLIB); Linker.link(g_strsplit, "g_strsplit", LIBRARY_GLIB); Linker.link(g_strsplit_set, "g_strsplit_set", LIBRARY_GLIB); Linker.link(g_strstr_len, "g_strstr_len", LIBRARY_GLIB); Linker.link(g_strtod, "g_strtod", LIBRARY_GLIB); Linker.link(g_strup, "g_strup", LIBRARY_GLIB); Linker.link(g_strv_get_type, "g_strv_get_type", LIBRARY_GLIB); Linker.link(g_strv_length, "g_strv_length", LIBRARY_GLIB); Linker.link(g_strv_contains, "g_strv_contains", LIBRARY_GLIB); Linker.link(g_vasprintf, "g_vasprintf", LIBRARY_GLIB); Linker.link(g_vprintf, "g_vprintf", LIBRARY_GLIB); Linker.link(g_vsnprintf, "g_vsnprintf", LIBRARY_GLIB); Linker.link(g_vsprintf, "g_vsprintf", LIBRARY_GLIB); Linker.link(g_fprintf, "g_fprintf", LIBRARY_GLIB); Linker.link(g_vfprintf, "g_vfprintf", LIBRARY_GLIB); Linker.link(g_ascii_string_to_signed, "g_ascii_string_to_signed", LIBRARY_GLIB); Linker.link(g_ascii_string_to_unsigned, "g_ascii_string_to_unsigned", LIBRARY_GLIB); // glib.Timeout Linker.link(g_timeout_add, "g_timeout_add", LIBRARY_GLIB); Linker.link(g_timeout_add_full, "g_timeout_add_full", LIBRARY_GLIB); Linker.link(g_timeout_add_seconds, "g_timeout_add_seconds", LIBRARY_GLIB); Linker.link(g_timeout_add_seconds_full, "g_timeout_add_seconds_full", LIBRARY_GLIB); Linker.link(g_timeout_source_new, "g_timeout_source_new", LIBRARY_GLIB); Linker.link(g_timeout_source_new_seconds, "g_timeout_source_new_seconds", LIBRARY_GLIB); // glib.Util Linker.link(g_build_filenamev, "g_build_filenamev", LIBRARY_GLIB); Linker.link(g_build_pathv, "g_build_pathv", LIBRARY_GLIB); Linker.link(g_atexit, "g_atexit", LIBRARY_GLIB); Linker.link(g_basename, "g_basename", LIBRARY_GLIB); Linker.link(g_bit_nth_lsf, "g_bit_nth_lsf", LIBRARY_GLIB); Linker.link(g_bit_nth_msf, "g_bit_nth_msf", LIBRARY_GLIB); Linker.link(g_bit_storage, "g_bit_storage", LIBRARY_GLIB); Linker.link(g_build_path, "g_build_path", LIBRARY_GLIB); Linker.link(g_environ_getenv, "g_environ_getenv", LIBRARY_GLIB); Linker.link(g_environ_setenv, "g_environ_setenv", LIBRARY_GLIB); Linker.link(g_environ_unsetenv, "g_environ_unsetenv", LIBRARY_GLIB); Linker.link(g_find_program_in_path, "g_find_program_in_path", LIBRARY_GLIB); Linker.link(g_format_size, "g_format_size", LIBRARY_GLIB); Linker.link(g_format_size_for_display, "g_format_size_for_display", LIBRARY_GLIB); Linker.link(g_format_size_full, "g_format_size_full", LIBRARY_GLIB); Linker.link(g_get_application_name, "g_get_application_name", LIBRARY_GLIB); Linker.link(g_get_environ, "g_get_environ", LIBRARY_GLIB); Linker.link(g_get_current_dir, "g_get_current_dir", LIBRARY_GLIB); Linker.link(g_get_home_dir, "g_get_home_dir", LIBRARY_GLIB); Linker.link(g_get_host_name, "g_get_host_name", LIBRARY_GLIB); Linker.link(g_get_prgname, "g_get_prgname", LIBRARY_GLIB); Linker.link(g_get_real_name, "g_get_real_name", LIBRARY_GLIB); Linker.link(g_get_system_config_dirs, "g_get_system_config_dirs", LIBRARY_GLIB); Linker.link(g_get_system_data_dirs, "g_get_system_data_dirs", LIBRARY_GLIB); Linker.link(g_get_tmp_dir, "g_get_tmp_dir", LIBRARY_GLIB); Linker.link(g_get_user_cache_dir, "g_get_user_cache_dir", LIBRARY_GLIB); Linker.link(g_get_user_config_dir, "g_get_user_config_dir", LIBRARY_GLIB); Linker.link(g_get_user_data_dir, "g_get_user_data_dir", LIBRARY_GLIB); Linker.link(g_get_user_name, "g_get_user_name", LIBRARY_GLIB); Linker.link(g_get_user_runtime_dir, "g_get_user_runtime_dir", LIBRARY_GLIB); Linker.link(g_get_user_special_dir, "g_get_user_special_dir", LIBRARY_GLIB); Linker.link(g_getenv, "g_getenv", LIBRARY_GLIB); Linker.link(g_listenv, "g_listenv", LIBRARY_GLIB); Linker.link(g_nullify_pointer, "g_nullify_pointer", LIBRARY_GLIB); Linker.link(g_parse_debug_string, "g_parse_debug_string", LIBRARY_GLIB); Linker.link(g_path_get_basename, "g_path_get_basename", LIBRARY_GLIB); Linker.link(g_path_get_dirname, "g_path_get_dirname", LIBRARY_GLIB); Linker.link(g_path_is_absolute, "g_path_is_absolute", LIBRARY_GLIB); Linker.link(g_path_skip_root, "g_path_skip_root", LIBRARY_GLIB); Linker.link(g_qsort_with_data, "g_qsort_with_data", LIBRARY_GLIB); Linker.link(g_reload_user_special_dirs_cache, "g_reload_user_special_dirs_cache", LIBRARY_GLIB); Linker.link(g_set_application_name, "g_set_application_name", LIBRARY_GLIB); Linker.link(g_set_prgname, "g_set_prgname", LIBRARY_GLIB); Linker.link(g_setenv, "g_setenv", LIBRARY_GLIB); Linker.link(g_spaced_primes_closest, "g_spaced_primes_closest", LIBRARY_GLIB); Linker.link(g_unsetenv, "g_unsetenv", LIBRARY_GLIB); // glib.Atomic Linker.link(g_atomic_int_add, "g_atomic_int_add", LIBRARY_GLIB); Linker.link(g_atomic_int_and, "g_atomic_int_and", LIBRARY_GLIB); Linker.link(g_atomic_int_compare_and_exchange, "g_atomic_int_compare_and_exchange", LIBRARY_GLIB); Linker.link(g_atomic_int_dec_and_test, "g_atomic_int_dec_and_test", LIBRARY_GLIB); Linker.link(g_atomic_int_exchange_and_add, "g_atomic_int_exchange_and_add", LIBRARY_GLIB); Linker.link(g_atomic_int_get, "g_atomic_int_get", LIBRARY_GLIB); Linker.link(g_atomic_int_inc, "g_atomic_int_inc", LIBRARY_GLIB); Linker.link(g_atomic_int_or, "g_atomic_int_or", LIBRARY_GLIB); Linker.link(g_atomic_int_set, "g_atomic_int_set", LIBRARY_GLIB); Linker.link(g_atomic_int_xor, "g_atomic_int_xor", LIBRARY_GLIB); Linker.link(g_atomic_pointer_add, "g_atomic_pointer_add", LIBRARY_GLIB); Linker.link(g_atomic_pointer_and, "g_atomic_pointer_and", LIBRARY_GLIB); Linker.link(g_atomic_pointer_compare_and_exchange, "g_atomic_pointer_compare_and_exchange", LIBRARY_GLIB); Linker.link(g_atomic_pointer_get, "g_atomic_pointer_get", LIBRARY_GLIB); Linker.link(g_atomic_pointer_or, "g_atomic_pointer_or", LIBRARY_GLIB); Linker.link(g_atomic_pointer_set, "g_atomic_pointer_set", LIBRARY_GLIB); Linker.link(g_atomic_pointer_xor, "g_atomic_pointer_xor", LIBRARY_GLIB); // glib.CharacterSet Linker.link(g_convert, "g_convert", LIBRARY_GLIB); Linker.link(g_convert_error_quark, "g_convert_error_quark", LIBRARY_GLIB); Linker.link(g_convert_with_fallback, "g_convert_with_fallback", LIBRARY_GLIB); Linker.link(g_convert_with_iconv, "g_convert_with_iconv", LIBRARY_GLIB); Linker.link(g_filename_display_basename, "g_filename_display_basename", LIBRARY_GLIB); Linker.link(g_filename_display_name, "g_filename_display_name", LIBRARY_GLIB); Linker.link(g_filename_from_utf8, "g_filename_from_utf8", LIBRARY_GLIB); Linker.link(g_filename_to_utf8, "g_filename_to_utf8", LIBRARY_GLIB); Linker.link(g_get_charset, "g_get_charset", LIBRARY_GLIB); Linker.link(g_get_codeset, "g_get_codeset", LIBRARY_GLIB); Linker.link(g_get_filename_charsets, "g_get_filename_charsets", LIBRARY_GLIB); Linker.link(g_locale_from_utf8, "g_locale_from_utf8", LIBRARY_GLIB); Linker.link(g_locale_to_utf8, "g_locale_to_utf8", LIBRARY_GLIB); // glib.Child Linker.link(g_child_watch_add, "g_child_watch_add", LIBRARY_GLIB); Linker.link(g_child_watch_add_full, "g_child_watch_add_full", LIBRARY_GLIB); Linker.link(g_child_watch_source_new, "g_child_watch_source_new", LIBRARY_GLIB); // glib.DataList Linker.link(g_datalist_clear, "g_datalist_clear", LIBRARY_GLIB); Linker.link(g_datalist_foreach, "g_datalist_foreach", LIBRARY_GLIB); Linker.link(g_datalist_get_data, "g_datalist_get_data", LIBRARY_GLIB); Linker.link(g_datalist_get_flags, "g_datalist_get_flags", LIBRARY_GLIB); Linker.link(g_datalist_id_dup_data, "g_datalist_id_dup_data", LIBRARY_GLIB); Linker.link(g_datalist_id_get_data, "g_datalist_id_get_data", LIBRARY_GLIB); Linker.link(g_datalist_id_remove_no_notify, "g_datalist_id_remove_no_notify", LIBRARY_GLIB); Linker.link(g_datalist_id_replace_data, "g_datalist_id_replace_data", LIBRARY_GLIB); Linker.link(g_datalist_id_set_data_full, "g_datalist_id_set_data_full", LIBRARY_GLIB); Linker.link(g_datalist_init, "g_datalist_init", LIBRARY_GLIB); Linker.link(g_datalist_set_flags, "g_datalist_set_flags", LIBRARY_GLIB); Linker.link(g_datalist_unset_flags, "g_datalist_unset_flags", LIBRARY_GLIB); // glib.DataSet Linker.link(g_dataset_destroy, "g_dataset_destroy", LIBRARY_GLIB); Linker.link(g_dataset_foreach, "g_dataset_foreach", LIBRARY_GLIB); Linker.link(g_dataset_id_get_data, "g_dataset_id_get_data", LIBRARY_GLIB); Linker.link(g_dataset_id_remove_no_notify, "g_dataset_id_remove_no_notify", LIBRARY_GLIB); Linker.link(g_dataset_id_set_data_full, "g_dataset_id_set_data_full", LIBRARY_GLIB); // glib.FileUtils Linker.link(g_access, "g_access", LIBRARY_GLIB); Linker.link(g_chdir, "g_chdir", LIBRARY_GLIB); Linker.link(g_close, "g_close", LIBRARY_GLIB); Linker.link(g_file_error_from_errno, "g_file_error_from_errno", LIBRARY_GLIB); Linker.link(g_file_error_quark, "g_file_error_quark", LIBRARY_GLIB); Linker.link(g_file_get_contents, "g_file_get_contents", LIBRARY_GLIB); Linker.link(g_file_open_tmp, "g_file_open_tmp", LIBRARY_GLIB); Linker.link(g_file_read_link, "g_file_read_link", LIBRARY_GLIB); Linker.link(g_file_set_contents, "g_file_set_contents", LIBRARY_GLIB); Linker.link(g_file_test, "g_file_test", LIBRARY_GLIB); Linker.link(g_mkdir_with_parents, "g_mkdir_with_parents", LIBRARY_GLIB); Linker.link(g_mkdtemp, "g_mkdtemp", LIBRARY_GLIB); Linker.link(g_mkdtemp_full, "g_mkdtemp_full", LIBRARY_GLIB); Linker.link(g_mkstemp, "g_mkstemp", LIBRARY_GLIB); Linker.link(g_mkstemp_full, "g_mkstemp_full", LIBRARY_GLIB); Linker.link(g_rmdir, "g_rmdir", LIBRARY_GLIB); Linker.link(g_unlink, "g_unlink", LIBRARY_GLIB); // glib.Hostname Linker.link(g_hostname_is_ascii_encoded, "g_hostname_is_ascii_encoded", LIBRARY_GLIB); Linker.link(g_hostname_is_ip_address, "g_hostname_is_ip_address", LIBRARY_GLIB); Linker.link(g_hostname_is_non_ascii, "g_hostname_is_non_ascii", LIBRARY_GLIB); Linker.link(g_hostname_to_ascii, "g_hostname_to_ascii", LIBRARY_GLIB); Linker.link(g_hostname_to_unicode, "g_hostname_to_unicode", LIBRARY_GLIB); // glib.Internationalization Linker.link(g_dcgettext, "g_dcgettext", LIBRARY_GLIB); Linker.link(g_dgettext, "g_dgettext", LIBRARY_GLIB); Linker.link(g_dngettext, "g_dngettext", LIBRARY_GLIB); Linker.link(g_dpgettext, "g_dpgettext", LIBRARY_GLIB); Linker.link(g_dpgettext2, "g_dpgettext2", LIBRARY_GLIB); Linker.link(g_get_language_names, "g_get_language_names", LIBRARY_GLIB); Linker.link(g_get_locale_variants, "g_get_locale_variants", LIBRARY_GLIB); Linker.link(g_strip_context, "g_strip_context", LIBRARY_GLIB); // glib.Memory Linker.link(g_clear_pointer, "g_clear_pointer", LIBRARY_GLIB); Linker.link(g_free, "g_free", LIBRARY_GLIB); Linker.link(g_malloc, "g_malloc", LIBRARY_GLIB); Linker.link(g_malloc0, "g_malloc0", LIBRARY_GLIB); Linker.link(g_malloc0_n, "g_malloc0_n", LIBRARY_GLIB); Linker.link(g_malloc_n, "g_malloc_n", LIBRARY_GLIB); Linker.link(g_mem_is_system_malloc, "g_mem_is_system_malloc", LIBRARY_GLIB); Linker.link(g_mem_profile, "g_mem_profile", LIBRARY_GLIB); Linker.link(g_mem_set_vtable, "g_mem_set_vtable", LIBRARY_GLIB); Linker.link(g_memdup, "g_memdup", LIBRARY_GLIB); Linker.link(g_realloc, "g_realloc", LIBRARY_GLIB); Linker.link(g_realloc_n, "g_realloc_n", LIBRARY_GLIB); Linker.link(g_try_malloc, "g_try_malloc", LIBRARY_GLIB); Linker.link(g_try_malloc0, "g_try_malloc0", LIBRARY_GLIB); Linker.link(g_try_malloc0_n, "g_try_malloc0_n", LIBRARY_GLIB); Linker.link(g_try_malloc_n, "g_try_malloc_n", LIBRARY_GLIB); Linker.link(g_try_realloc, "g_try_realloc", LIBRARY_GLIB); Linker.link(g_try_realloc_n, "g_try_realloc_n", LIBRARY_GLIB); // glib.MessageLog Linker.link(g_log, "g_log", LIBRARY_GLIB); Linker.link(g_log_default_handler, "g_log_default_handler", LIBRARY_GLIB); Linker.link(g_log_remove_handler, "g_log_remove_handler", LIBRARY_GLIB); Linker.link(g_log_set_always_fatal, "g_log_set_always_fatal", LIBRARY_GLIB); Linker.link(g_log_set_default_handler, "g_log_set_default_handler", LIBRARY_GLIB); Linker.link(g_log_set_fatal_mask, "g_log_set_fatal_mask", LIBRARY_GLIB); Linker.link(g_log_set_handler, "g_log_set_handler", LIBRARY_GLIB); Linker.link(g_log_set_handler_full, "g_log_set_handler_full", LIBRARY_GLIB); Linker.link(g_logv, "g_logv", LIBRARY_GLIB); // glib.Messages Linker.link(g_on_error_query, "g_on_error_query", LIBRARY_GLIB); Linker.link(g_on_error_stack_trace, "g_on_error_stack_trace", LIBRARY_GLIB); Linker.link(g_print, "g_print", LIBRARY_GLIB); Linker.link(g_printerr, "g_printerr", LIBRARY_GLIB); Linker.link(g_set_print_handler, "g_set_print_handler", LIBRARY_GLIB); Linker.link(g_set_printerr_handler, "g_set_printerr_handler", LIBRARY_GLIB); // glib.Quark Linker.link(g_intern_static_string, "g_intern_static_string", LIBRARY_GLIB); Linker.link(g_intern_string, "g_intern_string", LIBRARY_GLIB); Linker.link(g_quark_from_static_string, "g_quark_from_static_string", LIBRARY_GLIB); Linker.link(g_quark_from_string, "g_quark_from_string", LIBRARY_GLIB); Linker.link(g_quark_to_string, "g_quark_to_string", LIBRARY_GLIB); Linker.link(g_quark_try_string, "g_quark_try_string", LIBRARY_GLIB); // glib.ShellUtils Linker.link(g_shell_error_quark, "g_shell_error_quark", LIBRARY_GLIB); Linker.link(g_shell_parse_argv, "g_shell_parse_argv", LIBRARY_GLIB); Linker.link(g_shell_quote, "g_shell_quote", LIBRARY_GLIB); Linker.link(g_shell_unquote, "g_shell_unquote", LIBRARY_GLIB); // glib.Unicode Linker.link(g_ucs4_to_utf16, "g_ucs4_to_utf16", LIBRARY_GLIB); Linker.link(g_ucs4_to_utf8, "g_ucs4_to_utf8", LIBRARY_GLIB); Linker.link(g_unichar_break_type, "g_unichar_break_type", LIBRARY_GLIB); Linker.link(g_unichar_combining_class, "g_unichar_combining_class", LIBRARY_GLIB); Linker.link(g_unichar_compose, "g_unichar_compose", LIBRARY_GLIB); Linker.link(g_unichar_decompose, "g_unichar_decompose", LIBRARY_GLIB); Linker.link(g_unichar_digit_value, "g_unichar_digit_value", LIBRARY_GLIB); Linker.link(g_unichar_fully_decompose, "g_unichar_fully_decompose", LIBRARY_GLIB); Linker.link(g_unichar_get_mirror_char, "g_unichar_get_mirror_char", LIBRARY_GLIB); Linker.link(g_unichar_get_script, "g_unichar_get_script", LIBRARY_GLIB); Linker.link(g_unichar_isalnum, "g_unichar_isalnum", LIBRARY_GLIB); Linker.link(g_unichar_isalpha, "g_unichar_isalpha", LIBRARY_GLIB); Linker.link(g_unichar_iscntrl, "g_unichar_iscntrl", LIBRARY_GLIB); Linker.link(g_unichar_isdefined, "g_unichar_isdefined", LIBRARY_GLIB); Linker.link(g_unichar_isdigit, "g_unichar_isdigit", LIBRARY_GLIB); Linker.link(g_unichar_isgraph, "g_unichar_isgraph", LIBRARY_GLIB); Linker.link(g_unichar_islower, "g_unichar_islower", LIBRARY_GLIB); Linker.link(g_unichar_ismark, "g_unichar_ismark", LIBRARY_GLIB); Linker.link(g_unichar_isprint, "g_unichar_isprint", LIBRARY_GLIB); Linker.link(g_unichar_ispunct, "g_unichar_ispunct", LIBRARY_GLIB); Linker.link(g_unichar_isspace, "g_unichar_isspace", LIBRARY_GLIB); Linker.link(g_unichar_istitle, "g_unichar_istitle", LIBRARY_GLIB); Linker.link(g_unichar_isupper, "g_unichar_isupper", LIBRARY_GLIB); Linker.link(g_unichar_iswide, "g_unichar_iswide", LIBRARY_GLIB); Linker.link(g_unichar_iswide_cjk, "g_unichar_iswide_cjk", LIBRARY_GLIB); Linker.link(g_unichar_isxdigit, "g_unichar_isxdigit", LIBRARY_GLIB); Linker.link(g_unichar_iszerowidth, "g_unichar_iszerowidth", LIBRARY_GLIB); Linker.link(g_unichar_to_utf8, "g_unichar_to_utf8", LIBRARY_GLIB); Linker.link(g_unichar_tolower, "g_unichar_tolower", LIBRARY_GLIB); Linker.link(g_unichar_totitle, "g_unichar_totitle", LIBRARY_GLIB); Linker.link(g_unichar_toupper, "g_unichar_toupper", LIBRARY_GLIB); Linker.link(g_unichar_type, "g_unichar_type", LIBRARY_GLIB); Linker.link(g_unichar_validate, "g_unichar_validate", LIBRARY_GLIB); Linker.link(g_unichar_xdigit_value, "g_unichar_xdigit_value", LIBRARY_GLIB); Linker.link(g_unicode_canonical_decomposition, "g_unicode_canonical_decomposition", LIBRARY_GLIB); Linker.link(g_unicode_canonical_ordering, "g_unicode_canonical_ordering", LIBRARY_GLIB); Linker.link(g_unicode_script_from_iso15924, "g_unicode_script_from_iso15924", LIBRARY_GLIB); Linker.link(g_unicode_script_to_iso15924, "g_unicode_script_to_iso15924", LIBRARY_GLIB); Linker.link(g_utf16_to_ucs4, "g_utf16_to_ucs4", LIBRARY_GLIB); Linker.link(g_utf16_to_utf8, "g_utf16_to_utf8", LIBRARY_GLIB); Linker.link(g_utf8_casefold, "g_utf8_casefold", LIBRARY_GLIB); Linker.link(g_utf8_collate, "g_utf8_collate", LIBRARY_GLIB); Linker.link(g_utf8_collate_key, "g_utf8_collate_key", LIBRARY_GLIB); Linker.link(g_utf8_collate_key_for_filename, "g_utf8_collate_key_for_filename", LIBRARY_GLIB); Linker.link(g_utf8_find_next_char, "g_utf8_find_next_char", LIBRARY_GLIB); Linker.link(g_utf8_find_prev_char, "g_utf8_find_prev_char", LIBRARY_GLIB); Linker.link(g_utf8_get_char, "g_utf8_get_char", LIBRARY_GLIB); Linker.link(g_utf8_get_char_validated, "g_utf8_get_char_validated", LIBRARY_GLIB); Linker.link(g_utf8_normalize, "g_utf8_normalize", LIBRARY_GLIB); Linker.link(g_utf8_offset_to_pointer, "g_utf8_offset_to_pointer", LIBRARY_GLIB); Linker.link(g_utf8_pointer_to_offset, "g_utf8_pointer_to_offset", LIBRARY_GLIB); Linker.link(g_utf8_prev_char, "g_utf8_prev_char", LIBRARY_GLIB); Linker.link(g_utf8_strchr, "g_utf8_strchr", LIBRARY_GLIB); Linker.link(g_utf8_strdown, "g_utf8_strdown", LIBRARY_GLIB); Linker.link(g_utf8_strlen, "g_utf8_strlen", LIBRARY_GLIB); Linker.link(g_utf8_strncpy, "g_utf8_strncpy", LIBRARY_GLIB); Linker.link(g_utf8_strrchr, "g_utf8_strrchr", LIBRARY_GLIB); Linker.link(g_utf8_strreverse, "g_utf8_strreverse", LIBRARY_GLIB); Linker.link(g_utf8_strup, "g_utf8_strup", LIBRARY_GLIB); Linker.link(g_utf8_substring, "g_utf8_substring", LIBRARY_GLIB); Linker.link(g_utf8_to_ucs4, "g_utf8_to_ucs4", LIBRARY_GLIB); Linker.link(g_utf8_to_ucs4_fast, "g_utf8_to_ucs4_fast", LIBRARY_GLIB); Linker.link(g_utf8_to_utf16, "g_utf8_to_utf16", LIBRARY_GLIB); Linker.link(g_utf8_validate, "g_utf8_validate", LIBRARY_GLIB); Linker.link(g_utf8_make_valid, "g_utf8_make_valid", LIBRARY_GLIB); // glib.UnixUtils Linker.link(g_unix_error_quark, "g_unix_error_quark", LIBRARY_GLIB); Linker.link(g_unix_fd_add, "g_unix_fd_add", LIBRARY_GLIB); Linker.link(g_unix_fd_add_full, "g_unix_fd_add_full", LIBRARY_GLIB); Linker.link(g_unix_fd_source_new, "g_unix_fd_source_new", LIBRARY_GLIB); Linker.link(g_unix_open_pipe, "g_unix_open_pipe", LIBRARY_GLIB); Linker.link(g_unix_set_fd_nonblocking, "g_unix_set_fd_nonblocking", LIBRARY_GLIB); Linker.link(g_unix_signal_add, "g_unix_signal_add", LIBRARY_GLIB); Linker.link(g_unix_signal_add_full, "g_unix_signal_add_full", LIBRARY_GLIB); Linker.link(g_unix_signal_source_new, "g_unix_signal_source_new", LIBRARY_GLIB); // glib.URI Linker.link(g_filename_from_uri, "g_filename_from_uri", LIBRARY_GLIB); Linker.link(g_filename_to_uri, "g_filename_to_uri", LIBRARY_GLIB); Linker.link(g_uri_escape_string, "g_uri_escape_string", LIBRARY_GLIB); Linker.link(g_uri_list_extract_uris, "g_uri_list_extract_uris", LIBRARY_GLIB); Linker.link(g_uri_parse_scheme, "g_uri_parse_scheme", LIBRARY_GLIB); Linker.link(g_uri_unescape_segment, "g_uri_unescape_segment", LIBRARY_GLIB); Linker.link(g_uri_unescape_string, "g_uri_unescape_string", LIBRARY_GLIB); // glib.Uuid Linker.link(g_uuid_string_is_valid, "g_uuid_string_is_valid", LIBRARY_GLIB); Linker.link(g_uuid_string_random, "g_uuid_string_random", LIBRARY_GLIB); // glib.Version Linker.link(glib_check_version, "glib_check_version", LIBRARY_GLIB); version(Win64) { Linker.link(g_module_name, "g_module_name_uft8", LIBRARY_GLIB); Linker.link(g_module_open, "g_module_open_utf8", LIBRARY_GLIB); } } __gshared extern(C) { // glib.ArrayG GArray* function(GArray* array, void* data, uint len) c_g_array_append_vals; char* function(GArray* array, int freeSegment) c_g_array_free; uint function(GArray* array) c_g_array_get_element_size; GArray* function(GArray* array, uint index, void* data, uint len) c_g_array_insert_vals; GArray* function(int zeroTerminated, int clear, uint elementSize) c_g_array_new; GArray* function(GArray* array, void* data, uint len) c_g_array_prepend_vals; GArray* function(GArray* array) c_g_array_ref; GArray* function(GArray* array, uint index) c_g_array_remove_index; GArray* function(GArray* array, uint index) c_g_array_remove_index_fast; GArray* function(GArray* array, uint index, uint length) c_g_array_remove_range; void function(GArray* array, GDestroyNotify clearFunc) c_g_array_set_clear_func; GArray* function(GArray* array, uint length) c_g_array_set_size; GArray* function(int zeroTerminated, int clear, uint elementSize, uint reservedSize) c_g_array_sized_new; void function(GArray* array, GCompareFunc compareFunc) c_g_array_sort; void function(GArray* array, GCompareDataFunc compareFunc, void* userData) c_g_array_sort_with_data; void function(GArray* array) c_g_array_unref; // glib.AsyncQueue int function(GAsyncQueue* queue) c_g_async_queue_length; int function(GAsyncQueue* queue) c_g_async_queue_length_unlocked; void function(GAsyncQueue* queue) c_g_async_queue_lock; void* function(GAsyncQueue* queue) c_g_async_queue_pop; void* function(GAsyncQueue* queue) c_g_async_queue_pop_unlocked; void function(GAsyncQueue* queue, void* data) c_g_async_queue_push; void function(GAsyncQueue* queue, void* item) c_g_async_queue_push_front; void function(GAsyncQueue* queue, void* item) c_g_async_queue_push_front_unlocked; void function(GAsyncQueue* queue, void* data, GCompareDataFunc func, void* userData) c_g_async_queue_push_sorted; void function(GAsyncQueue* queue, void* data, GCompareDataFunc func, void* userData) c_g_async_queue_push_sorted_unlocked; void function(GAsyncQueue* queue, void* data) c_g_async_queue_push_unlocked; GAsyncQueue* function(GAsyncQueue* queue) c_g_async_queue_ref; void function(GAsyncQueue* queue) c_g_async_queue_ref_unlocked; int function(GAsyncQueue* queue, void* item) c_g_async_queue_remove; int function(GAsyncQueue* queue, void* item) c_g_async_queue_remove_unlocked; void function(GAsyncQueue* queue, GCompareDataFunc func, void* userData) c_g_async_queue_sort; void function(GAsyncQueue* queue, GCompareDataFunc func, void* userData) c_g_async_queue_sort_unlocked; void* function(GAsyncQueue* queue, GTimeVal* endTime) c_g_async_queue_timed_pop; void* function(GAsyncQueue* queue, GTimeVal* endTime) c_g_async_queue_timed_pop_unlocked; void* function(GAsyncQueue* queue, ulong timeout) c_g_async_queue_timeout_pop; void* function(GAsyncQueue* queue, ulong timeout) c_g_async_queue_timeout_pop_unlocked; void* function(GAsyncQueue* queue) c_g_async_queue_try_pop; void* function(GAsyncQueue* queue) c_g_async_queue_try_pop_unlocked; void function(GAsyncQueue* queue) c_g_async_queue_unlock; void function(GAsyncQueue* queue) c_g_async_queue_unref; void function(GAsyncQueue* queue) c_g_async_queue_unref_and_unlock; GAsyncQueue* function() c_g_async_queue_new; GAsyncQueue* function(GDestroyNotify itemFreeFunc) c_g_async_queue_new_full; // glib.BookmarkFile void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, const(char)* exec) c_g_bookmark_file_add_application; void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* group) c_g_bookmark_file_add_group; void function(GBookmarkFile* bookmark) c_g_bookmark_file_free; uint function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_added; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, char** exec, uint* count, uint* stamp, GError** err) c_g_bookmark_file_get_app_info; char** function(GBookmarkFile* bookmark, const(char)* uri, size_t* length, GError** err) c_g_bookmark_file_get_applications; char* function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_description; char** function(GBookmarkFile* bookmark, const(char)* uri, size_t* length, GError** err) c_g_bookmark_file_get_groups; int function(GBookmarkFile* bookmark, const(char)* uri, char** href, char** mimeType, GError** err) c_g_bookmark_file_get_icon; int function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_is_private; char* function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_mime_type; uint function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_modified; int function(GBookmarkFile* bookmark) c_g_bookmark_file_get_size; char* function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_title; char** function(GBookmarkFile* bookmark, size_t* length) c_g_bookmark_file_get_uris; uint function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_get_visited; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, GError** err) c_g_bookmark_file_has_application; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* group, GError** err) c_g_bookmark_file_has_group; int function(GBookmarkFile* bookmark, const(char)* uri) c_g_bookmark_file_has_item; int function(GBookmarkFile* bookmark, const(char)* data, size_t length, GError** err) c_g_bookmark_file_load_from_data; int function(GBookmarkFile* bookmark, char* file, char** fullPath, GError** err) c_g_bookmark_file_load_from_data_dirs; int function(GBookmarkFile* bookmark, char* filename, GError** err) c_g_bookmark_file_load_from_file; int function(GBookmarkFile* bookmark, const(char)* oldUri, const(char)* newUri, GError** err) c_g_bookmark_file_move_item; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, GError** err) c_g_bookmark_file_remove_application; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* group, GError** err) c_g_bookmark_file_remove_group; int function(GBookmarkFile* bookmark, const(char)* uri, GError** err) c_g_bookmark_file_remove_item; void function(GBookmarkFile* bookmark, const(char)* uri, uint added) c_g_bookmark_file_set_added; int function(GBookmarkFile* bookmark, const(char)* uri, const(char)* name, const(char)* exec, int count, uint stamp, GError** err) c_g_bookmark_file_set_app_info; void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* description) c_g_bookmark_file_set_description; void function(GBookmarkFile* bookmark, const(char)* uri, char** groups, size_t length) c_g_bookmark_file_set_groups; void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* href, const(char)* mimeType) c_g_bookmark_file_set_icon; void function(GBookmarkFile* bookmark, const(char)* uri, int isPrivate) c_g_bookmark_file_set_is_private; void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* mimeType) c_g_bookmark_file_set_mime_type; void function(GBookmarkFile* bookmark, const(char)* uri, uint modified) c_g_bookmark_file_set_modified; void function(GBookmarkFile* bookmark, const(char)* uri, const(char)* title) c_g_bookmark_file_set_title; void function(GBookmarkFile* bookmark, const(char)* uri, uint visited) c_g_bookmark_file_set_visited; char* function(GBookmarkFile* bookmark, size_t* length, GError** err) c_g_bookmark_file_to_data; int function(GBookmarkFile* bookmark, char* filename, GError** err) c_g_bookmark_file_to_file; GQuark function() c_g_bookmark_file_error_quark; GBookmarkFile* function() c_g_bookmark_file_new; // glib.ByteArray GByteArray* function(GByteArray* array, ubyte* data, uint len) c_g_byte_array_append; ubyte* function(GByteArray* array, int freeSegment) c_g_byte_array_free; GBytes* function(GByteArray* array) c_g_byte_array_free_to_bytes; GByteArray* function() c_g_byte_array_new; GByteArray* function(ubyte* data, size_t len) c_g_byte_array_new_take; GByteArray* function(GByteArray* array, ubyte* data, uint len) c_g_byte_array_prepend; GByteArray* function(GByteArray* array) c_g_byte_array_ref; GByteArray* function(GByteArray* array, uint index) c_g_byte_array_remove_index; GByteArray* function(GByteArray* array, uint index) c_g_byte_array_remove_index_fast; GByteArray* function(GByteArray* array, uint index, uint length) c_g_byte_array_remove_range; GByteArray* function(GByteArray* array, uint length) c_g_byte_array_set_size; GByteArray* function(uint reservedSize) c_g_byte_array_sized_new; void function(GByteArray* array, GCompareFunc compareFunc) c_g_byte_array_sort; void function(GByteArray* array, GCompareDataFunc compareFunc, void* userData) c_g_byte_array_sort_with_data; void function(GByteArray* array) c_g_byte_array_unref; // glib.Bytes GBytes* function(void* data, size_t size) c_g_bytes_new; GBytes* function(void* data, size_t size) c_g_bytes_new_static; GBytes* function(void* data, size_t size) c_g_bytes_new_take; GBytes* function(void* data, size_t size, GDestroyNotify freeFunc, void* userData) c_g_bytes_new_with_free_func; int function(void* bytes1, void* bytes2) c_g_bytes_compare; int function(void* bytes1, void* bytes2) c_g_bytes_equal; void* function(GBytes* bytes, size_t* size) c_g_bytes_get_data; size_t function(GBytes* bytes) c_g_bytes_get_size; uint function(void* bytes) c_g_bytes_hash; GBytes* function(GBytes* bytes, size_t offset, size_t length) c_g_bytes_new_from_bytes; GBytes* function(GBytes* bytes) c_g_bytes_ref; void function(GBytes* bytes) c_g_bytes_unref; GByteArray* function(GBytes* bytes) c_g_bytes_unref_to_array; void* function(GBytes* bytes, size_t* size) c_g_bytes_unref_to_data; // glib.Checksum GChecksum* function(GChecksumType checksumType) c_g_checksum_new; GChecksum* function(GChecksum* checksum) c_g_checksum_copy; void function(GChecksum* checksum) c_g_checksum_free; void function(GChecksum* checksum, ubyte* buffer, size_t* digestLen) c_g_checksum_get_digest; const(char)* function(GChecksum* checksum) c_g_checksum_get_string; void function(GChecksum* checksum) c_g_checksum_reset; void function(GChecksum* checksum, char* data, ptrdiff_t length) c_g_checksum_update; ptrdiff_t function(GChecksumType checksumType) c_g_checksum_type_get_length; char* function(GChecksumType checksumType, GBytes* data) c_g_compute_checksum_for_bytes; char* function(GChecksumType checksumType, char* data, size_t length) c_g_compute_checksum_for_data; char* function(GChecksumType checksumType, const(char)* str, ptrdiff_t length) c_g_compute_checksum_for_string; // glib.Cond void function(GCond* cond) c_g_cond_broadcast; void function(GCond* cond) c_g_cond_clear; void function(GCond* cond) c_g_cond_init; void function(GCond* cond) c_g_cond_signal; void function(GCond* cond, GMutex* mutex) c_g_cond_wait; int function(GCond* cond, GMutex* mutex, long endTime) c_g_cond_wait_until; // glib.Date GDate* function() c_g_date_new; GDate* function(GDateDay day, GDateMonth month, GDateYear year) c_g_date_new_dmy; GDate* function(uint julianDay) c_g_date_new_julian; void function(GDate* date, uint nDays) c_g_date_add_days; void function(GDate* date, uint nMonths) c_g_date_add_months; void function(GDate* date, uint nYears) c_g_date_add_years; void function(GDate* date, GDate* minDate, GDate* maxDate) c_g_date_clamp; void function(GDate* date, uint nDates) c_g_date_clear; int function(GDate* lhs, GDate* rhs) c_g_date_compare; int function(GDate* date1, GDate* date2) c_g_date_days_between; void function(GDate* date) c_g_date_free; GDateDay function(GDate* date) c_g_date_get_day; uint function(GDate* date) c_g_date_get_day_of_year; uint function(GDate* date) c_g_date_get_iso8601_week_of_year; uint function(GDate* date) c_g_date_get_julian; uint function(GDate* date) c_g_date_get_monday_week_of_year; GDateMonth function(GDate* date) c_g_date_get_month; uint function(GDate* date) c_g_date_get_sunday_week_of_year; GDateWeekday function(GDate* date) c_g_date_get_weekday; GDateYear function(GDate* date) c_g_date_get_year; int function(GDate* date) c_g_date_is_first_of_month; int function(GDate* date) c_g_date_is_last_of_month; void function(GDate* date1, GDate* date2) c_g_date_order; void function(GDate* date, GDateDay day) c_g_date_set_day; void function(GDate* date, GDateDay day, GDateMonth month, GDateYear y) c_g_date_set_dmy; void function(GDate* date, uint julianDate) c_g_date_set_julian; void function(GDate* date, GDateMonth month) c_g_date_set_month; void function(GDate* date, const(char)* str) c_g_date_set_parse; void function(GDate* date, GTime time) c_g_date_set_time; void function(GDate* date, uint timet) c_g_date_set_time_t; void function(GDate* date, GTimeVal* timeval) c_g_date_set_time_val; void function(GDate* date, GDateYear year) c_g_date_set_year; void function(GDate* date, uint nDays) c_g_date_subtract_days; void function(GDate* date, uint nMonths) c_g_date_subtract_months; void function(GDate* date, uint nYears) c_g_date_subtract_years; void function(GDate* date, void* tm) c_g_date_to_struct_tm; int function(GDate* date) c_g_date_valid; ubyte function(GDateMonth month, GDateYear year) c_g_date_get_days_in_month; ubyte function(GDateYear year) c_g_date_get_monday_weeks_in_year; ubyte function(GDateYear year) c_g_date_get_sunday_weeks_in_year; int function(GDateYear year) c_g_date_is_leap_year; size_t function(char* s, size_t slen, const(char)* format, GDate* date) c_g_date_strftime; int function(GDateDay day) c_g_date_valid_day; int function(GDateDay day, GDateMonth month, GDateYear year) c_g_date_valid_dmy; int function(uint julianDate) c_g_date_valid_julian; int function(GDateMonth month) c_g_date_valid_month; int function(GDateWeekday weekday) c_g_date_valid_weekday; int function(GDateYear year) c_g_date_valid_year; // glib.DateTime GDateTime* function(GTimeZone* tz, int year, int month, int day, int hour, int minute, double seconds) c_g_date_time_new; GDateTime* function(GTimeVal* tv) c_g_date_time_new_from_timeval_local; GDateTime* function(GTimeVal* tv) c_g_date_time_new_from_timeval_utc; GDateTime* function(long t) c_g_date_time_new_from_unix_local; GDateTime* function(long t) c_g_date_time_new_from_unix_utc; GDateTime* function(int year, int month, int day, int hour, int minute, double seconds) c_g_date_time_new_local; GDateTime* function(GTimeZone* tz) c_g_date_time_new_now; GDateTime* function() c_g_date_time_new_now_local; GDateTime* function() c_g_date_time_new_now_utc; GDateTime* function(int year, int month, int day, int hour, int minute, double seconds) c_g_date_time_new_utc; GDateTime* function(GDateTime* datetime, GTimeSpan timespan) c_g_date_time_add; GDateTime* function(GDateTime* datetime, int days) c_g_date_time_add_days; GDateTime* function(GDateTime* datetime, int years, int months, int days, int hours, int minutes, double seconds) c_g_date_time_add_full; GDateTime* function(GDateTime* datetime, int hours) c_g_date_time_add_hours; GDateTime* function(GDateTime* datetime, int minutes) c_g_date_time_add_minutes; GDateTime* function(GDateTime* datetime, int months) c_g_date_time_add_months; GDateTime* function(GDateTime* datetime, double seconds) c_g_date_time_add_seconds; GDateTime* function(GDateTime* datetime, int weeks) c_g_date_time_add_weeks; GDateTime* function(GDateTime* datetime, int years) c_g_date_time_add_years; GTimeSpan function(GDateTime* end, GDateTime* begin) c_g_date_time_difference; char* function(GDateTime* datetime, const(char)* format) c_g_date_time_format; int function(GDateTime* datetime) c_g_date_time_get_day_of_month; int function(GDateTime* datetime) c_g_date_time_get_day_of_week; int function(GDateTime* datetime) c_g_date_time_get_day_of_year; int function(GDateTime* datetime) c_g_date_time_get_hour; int function(GDateTime* datetime) c_g_date_time_get_microsecond; int function(GDateTime* datetime) c_g_date_time_get_minute; int function(GDateTime* datetime) c_g_date_time_get_month; int function(GDateTime* datetime) c_g_date_time_get_second; double function(GDateTime* datetime) c_g_date_time_get_seconds; const(char)* function(GDateTime* datetime) c_g_date_time_get_timezone_abbreviation; GTimeSpan function(GDateTime* datetime) c_g_date_time_get_utc_offset; int function(GDateTime* datetime) c_g_date_time_get_week_numbering_year; int function(GDateTime* datetime) c_g_date_time_get_week_of_year; int function(GDateTime* datetime) c_g_date_time_get_year; void function(GDateTime* datetime, int* year, int* month, int* day) c_g_date_time_get_ymd; int function(GDateTime* datetime) c_g_date_time_is_daylight_savings; GDateTime* function(GDateTime* datetime) c_g_date_time_ref; GDateTime* function(GDateTime* datetime) c_g_date_time_to_local; int function(GDateTime* datetime, GTimeVal* tv) c_g_date_time_to_timeval; GDateTime* function(GDateTime* datetime, GTimeZone* tz) c_g_date_time_to_timezone; long function(GDateTime* datetime) c_g_date_time_to_unix; GDateTime* function(GDateTime* datetime) c_g_date_time_to_utc; void function(GDateTime* datetime) c_g_date_time_unref; int function(void* dt1, void* dt2) c_g_date_time_compare; int function(void* dt1, void* dt2) c_g_date_time_equal; uint function(void* datetime) c_g_date_time_hash; // glib.Directory void function(GDir* dir) c_g_dir_close; char* function(GDir* dir) c_g_dir_read_name; void function(GDir* dir) c_g_dir_rewind; char* function(char* tmpl, GError** err) c_g_dir_make_tmp; GDir* function(const(char)* path, uint flags, GError** err) c_g_dir_open; // glib.ErrorG GError* function(GQuark domain, int code, const(char)* format, ... ) c_g_error_new; GError* function(GQuark domain, int code, const(char)* message) c_g_error_new_literal; GError* function(GQuark domain, int code, const(char)* format, void* args) c_g_error_new_valist; GError* function(GError* error) c_g_error_copy; void function(GError* error) c_g_error_free; int function(GError* error, GQuark domain, int code) c_g_error_matches; void function(GError** dest, GError* src) c_g_propagate_error; void function(GError** err, GQuark domain, int code, const(char)* message) c_g_set_error_literal; void function(GError** err, const(char)* format, ... ) c_g_prefix_error; void function(GError** dest, GError* src, const(char)* format, ... ) c_g_propagate_prefixed_error; void function(GError** err, GQuark domain, int code, const(char)* format, ... ) c_g_set_error; // glib.HashTable int function(GHashTable* hashTable, void* key) c_g_hash_table_add; int function(GHashTable* hashTable, void* key) c_g_hash_table_contains; void function(GHashTable* hashTable) c_g_hash_table_destroy; void* function(GHashTable* hashTable, GHRFunc predicate, void* userData) c_g_hash_table_find; void function(GHashTable* hashTable, GHFunc func, void* userData) c_g_hash_table_foreach; uint function(GHashTable* hashTable, GHRFunc func, void* userData) c_g_hash_table_foreach_remove; uint function(GHashTable* hashTable, GHRFunc func, void* userData) c_g_hash_table_foreach_steal; GList* function(GHashTable* hashTable) c_g_hash_table_get_keys; void** function(GHashTable* hashTable, uint* length) c_g_hash_table_get_keys_as_array; GList* function(GHashTable* hashTable) c_g_hash_table_get_values; int function(GHashTable* hashTable, void* key, void* value) c_g_hash_table_insert; void* function(GHashTable* hashTable, void* key) c_g_hash_table_lookup; int function(GHashTable* hashTable, void* lookupKey, void** origKey, void** value) c_g_hash_table_lookup_extended; GHashTable* function(GHashFunc hashFunc, GEqualFunc keyEqualFunc) c_g_hash_table_new; GHashTable* function(GHashFunc hashFunc, GEqualFunc keyEqualFunc, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc) c_g_hash_table_new_full; GHashTable* function(GHashTable* hashTable) c_g_hash_table_ref; int function(GHashTable* hashTable, void* key) c_g_hash_table_remove; void function(GHashTable* hashTable) c_g_hash_table_remove_all; int function(GHashTable* hashTable, void* key, void* value) c_g_hash_table_replace; uint function(GHashTable* hashTable) c_g_hash_table_size; int function(GHashTable* hashTable, void* key) c_g_hash_table_steal; void function(GHashTable* hashTable) c_g_hash_table_steal_all; void function(GHashTable* hashTable) c_g_hash_table_unref; int function(void* v1, void* v2) c_g_direct_equal; uint function(void* v) c_g_direct_hash; int function(void* v1, void* v2) c_g_double_equal; uint function(void* v) c_g_double_hash; int function(void* v1, void* v2) c_g_int64_equal; uint function(void* v) c_g_int64_hash; int function(void* v1, void* v2) c_g_int_equal; uint function(void* v) c_g_int_hash; int function(void* v1, void* v2) c_g_str_equal; uint function(void* v) c_g_str_hash; // glib.HashTableIter GHashTable* function(GHashTableIter* iter) c_g_hash_table_iter_get_hash_table; void function(GHashTableIter* iter, GHashTable* hashTable) c_g_hash_table_iter_init; int function(GHashTableIter* iter, void** key, void** value) c_g_hash_table_iter_next; void function(GHashTableIter* iter) c_g_hash_table_iter_remove; void function(GHashTableIter* iter, void* value) c_g_hash_table_iter_replace; void function(GHashTableIter* iter) c_g_hash_table_iter_steal; // glib.Hmac GHmac* function(GHmac* hmac) c_g_hmac_copy; void function(GHmac* hmac, ubyte* buffer, size_t* digestLen) c_g_hmac_get_digest; const(char)* function(GHmac* hmac) c_g_hmac_get_string; GHmac* function(GHmac* hmac) c_g_hmac_ref; void function(GHmac* hmac) c_g_hmac_unref; void function(GHmac* hmac, char* data, ptrdiff_t length) c_g_hmac_update; GHmac* function(GChecksumType digestType, char* key, size_t keyLen) c_g_hmac_new; char* function(GChecksumType digestType, char* key, size_t keyLen, char* data, size_t length) c_g_compute_hmac_for_data; char* function(GChecksumType digestType, char* key, size_t keyLen, const(char)* str, ptrdiff_t length) c_g_compute_hmac_for_string; char* function(GChecksumType digestType, GBytes* key, GBytes* data) c_g_compute_hmac_for_bytes; // glib.Hook int function(GHook* newHook, GHook* sibling) c_g_hook_compare_ids; GHook* function(GHookList* hookList) c_g_hook_alloc; int function(GHookList* hookList, gulong hookId) c_g_hook_destroy; void function(GHookList* hookList, GHook* hook) c_g_hook_destroy_link; GHook* function(GHookList* hookList, int needValids, GHookFindFunc func, void* data) c_g_hook_find; GHook* function(GHookList* hookList, int needValids, void* data) c_g_hook_find_data; GHook* function(GHookList* hookList, int needValids, void* func) c_g_hook_find_func; GHook* function(GHookList* hookList, int needValids, void* func, void* data) c_g_hook_find_func_data; GHook* function(GHookList* hookList, int mayBeInCall) c_g_hook_first_valid; void function(GHookList* hookList, GHook* hook) c_g_hook_free; GHook* function(GHookList* hookList, gulong hookId) c_g_hook_get; void function(GHookList* hookList, GHook* sibling, GHook* hook) c_g_hook_insert_before; void function(GHookList* hookList, GHook* hook, GHookCompareFunc func) c_g_hook_insert_sorted; GHook* function(GHookList* hookList, GHook* hook, int mayBeInCall) c_g_hook_next_valid; void function(GHookList* hookList, GHook* hook) c_g_hook_prepend; GHook* function(GHookList* hookList, GHook* hook) c_g_hook_ref; void function(GHookList* hookList, GHook* hook) c_g_hook_unref; // glib.HookList void function(GHookList* hookList) c_g_hook_list_clear; void function(GHookList* hookList, uint hookSize) c_g_hook_list_init; void function(GHookList* hookList, int mayRecurse) c_g_hook_list_invoke; void function(GHookList* hookList, int mayRecurse) c_g_hook_list_invoke_check; void function(GHookList* hookList, int mayRecurse, GHookMarshaller marshaller, void* marshalData) c_g_hook_list_marshal; void function(GHookList* hookList, int mayRecurse, GHookCheckMarshaller marshaller, void* marshalData) c_g_hook_list_marshal_check; // glib.IConv size_t function(GIConv converter, char** inbuf, size_t* inbytesLeft, char** outbuf, size_t* outbytesLeft) c_g_iconv; int function(GIConv converter) c_g_iconv_close; GIConv function(const(char)* toCodeset, const(char)* fromCodeset) c_g_iconv_open; // glib.IOChannel GIOChannel* function(char* filename, const(char)* mode, GError** err) c_g_io_channel_new_file; GIOChannel* function(int fd) c_g_io_channel_unix_new; void function(GIOChannel* channel) c_g_io_channel_close; GIOStatus function(GIOChannel* channel, GError** err) c_g_io_channel_flush; GIOCondition function(GIOChannel* channel) c_g_io_channel_get_buffer_condition; size_t function(GIOChannel* channel) c_g_io_channel_get_buffer_size; int function(GIOChannel* channel) c_g_io_channel_get_buffered; int function(GIOChannel* channel) c_g_io_channel_get_close_on_unref; const(char)* function(GIOChannel* channel) c_g_io_channel_get_encoding; GIOFlags function(GIOChannel* channel) c_g_io_channel_get_flags; const(char)* function(GIOChannel* channel, int* length) c_g_io_channel_get_line_term; void function(GIOChannel* channel) c_g_io_channel_init; GIOError function(GIOChannel* channel, char* buf, size_t count, size_t* bytesRead) c_g_io_channel_read; GIOStatus function(GIOChannel* channel, char* buf, size_t count, size_t* bytesRead, GError** err) c_g_io_channel_read_chars; GIOStatus function(GIOChannel* channel, char** strReturn, size_t* length, size_t* terminatorPos, GError** err) c_g_io_channel_read_line; GIOStatus function(GIOChannel* channel, GString* buffer, size_t* terminatorPos, GError** err) c_g_io_channel_read_line_string; GIOStatus function(GIOChannel* channel, char** strReturn, size_t* length, GError** err) c_g_io_channel_read_to_end; GIOStatus function(GIOChannel* channel, dchar* thechar, GError** err) c_g_io_channel_read_unichar; GIOChannel* function(GIOChannel* channel) c_g_io_channel_ref; GIOError function(GIOChannel* channel, long offset, GSeekType type) c_g_io_channel_seek; GIOStatus function(GIOChannel* channel, long offset, GSeekType type, GError** err) c_g_io_channel_seek_position; void function(GIOChannel* channel, size_t size) c_g_io_channel_set_buffer_size; void function(GIOChannel* channel, int buffered) c_g_io_channel_set_buffered; void function(GIOChannel* channel, int doClose) c_g_io_channel_set_close_on_unref; GIOStatus function(GIOChannel* channel, const(char)* encoding, GError** err) c_g_io_channel_set_encoding; GIOStatus function(GIOChannel* channel, GIOFlags flags, GError** err) c_g_io_channel_set_flags; void function(GIOChannel* channel, const(char)* lineTerm, int length) c_g_io_channel_set_line_term; GIOStatus function(GIOChannel* channel, int flush, GError** err) c_g_io_channel_shutdown; int function(GIOChannel* channel) c_g_io_channel_unix_get_fd; void function(GIOChannel* channel) c_g_io_channel_unref; GIOError function(GIOChannel* channel, const(char)* buf, size_t count, size_t* bytesWritten) c_g_io_channel_write; GIOStatus function(GIOChannel* channel, char* buf, ptrdiff_t count, size_t* bytesWritten, GError** err) c_g_io_channel_write_chars; GIOStatus function(GIOChannel* channel, dchar thechar, GError** err) c_g_io_channel_write_unichar; GIOChannelError function(int en) c_g_io_channel_error_from_errno; GQuark function() c_g_io_channel_error_quark; uint function(GIOChannel* channel, GIOCondition condition, GIOFunc func, void* userData) c_g_io_add_watch; uint function(GIOChannel* channel, int priority, GIOCondition condition, GIOFunc func, void* userData, GDestroyNotify notify) c_g_io_add_watch_full; GSource* function(GIOChannel* channel, GIOCondition condition) c_g_io_create_watch; // glib.KeyFile GKeyFile* function() c_g_key_file_new; void function(GKeyFile* keyFile) c_g_key_file_free; int function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_get_boolean; int* function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, size_t* length, GError** err) c_g_key_file_get_boolean_list; char* function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_get_comment; double function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_get_double; double* function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, size_t* length, GError** err) c_g_key_file_get_double_list; char** function(GKeyFile* keyFile, size_t* length) c_g_key_file_get_groups; long function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_get_int64; int function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_get_integer; int* function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, size_t* length, GError** err) c_g_key_file_get_integer_list; char** function(GKeyFile* keyFile, const(char)* groupName, size_t* length, GError** err) c_g_key_file_get_keys; char* function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, const(char)* locale, GError** err) c_g_key_file_get_locale_string; char** function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, const(char)* locale, size_t* length, GError** err) c_g_key_file_get_locale_string_list; char* function(GKeyFile* keyFile) c_g_key_file_get_start_group; char* function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_get_string; char** function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, size_t* length, GError** err) c_g_key_file_get_string_list; ulong function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_get_uint64; char* function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_get_value; int function(GKeyFile* keyFile, const(char)* groupName) c_g_key_file_has_group; int function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_has_key; int function(GKeyFile* keyFile, GBytes* bytes, GKeyFileFlags flags, GError** err) c_g_key_file_load_from_bytes; int function(GKeyFile* keyFile, const(char)* data, size_t length, GKeyFileFlags flags, GError** err) c_g_key_file_load_from_data; int function(GKeyFile* keyFile, char* file, char** fullPath, GKeyFileFlags flags, GError** err) c_g_key_file_load_from_data_dirs; int function(GKeyFile* keyFile, char* file, char** searchDirs, char** fullPath, GKeyFileFlags flags, GError** err) c_g_key_file_load_from_dirs; int function(GKeyFile* keyFile, char* file, GKeyFileFlags flags, GError** err) c_g_key_file_load_from_file; GKeyFile* function(GKeyFile* keyFile) c_g_key_file_ref; int function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_remove_comment; int function(GKeyFile* keyFile, const(char)* groupName, GError** err) c_g_key_file_remove_group; int function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, GError** err) c_g_key_file_remove_key; int function(GKeyFile* keyFile, const(char)* filename, GError** err) c_g_key_file_save_to_file; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, int value) c_g_key_file_set_boolean; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, int* list, size_t length) c_g_key_file_set_boolean_list; int function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, const(char)* comment, GError** err) c_g_key_file_set_comment; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, double value) c_g_key_file_set_double; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, double* list, size_t length) c_g_key_file_set_double_list; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, long value) c_g_key_file_set_int64; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, int value) c_g_key_file_set_integer; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, int* list, size_t length) c_g_key_file_set_integer_list; void function(GKeyFile* keyFile, char separator) c_g_key_file_set_list_separator; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, const(char)* locale, const(char)* str) c_g_key_file_set_locale_string; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, const(char)* locale, char** list, size_t length) c_g_key_file_set_locale_string_list; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, const(char)* str) c_g_key_file_set_string; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, char** list, size_t length) c_g_key_file_set_string_list; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, ulong value) c_g_key_file_set_uint64; void function(GKeyFile* keyFile, const(char)* groupName, const(char)* key, const(char)* value) c_g_key_file_set_value; char* function(GKeyFile* keyFile, size_t* length, GError** err) c_g_key_file_to_data; void function(GKeyFile* keyFile) c_g_key_file_unref; GQuark function() c_g_key_file_error_quark; // glib.ListG GList* function() c_g_list_alloc; GList* function(GList* list, void* data) c_g_list_append; GList* function(GList* list1, GList* list2) c_g_list_concat; GList* function(GList* list) c_g_list_copy; GList* function(GList* list, GCopyFunc func, void* userData) c_g_list_copy_deep; GList* function(GList* list, GList* link) c_g_list_delete_link; GList* function(GList* list, void* data) c_g_list_find; GList* function(GList* list, void* data, GCompareFunc func) c_g_list_find_custom; GList* function(GList* list) c_g_list_first; void function(GList* list, GFunc func, void* userData) c_g_list_foreach; void function(GList* list) c_g_list_free; void function(GList* list) c_g_list_free_1; void function(GList* list, GDestroyNotify freeFunc) c_g_list_free_full; int function(GList* list, void* data) c_g_list_index; GList* function(GList* list, void* data, int position) c_g_list_insert; GList* function(GList* list, GList* sibling, void* data) c_g_list_insert_before; GList* function(GList* list, void* data, GCompareFunc func) c_g_list_insert_sorted; GList* function(GList* list, void* data, GCompareDataFunc func, void* userData) c_g_list_insert_sorted_with_data; GList* function(GList* list) c_g_list_last; uint function(GList* list) c_g_list_length; GList* function(GList* list, uint n) c_g_list_nth; void* function(GList* list, uint n) c_g_list_nth_data; GList* function(GList* list, uint n) c_g_list_nth_prev; int function(GList* list, GList* llink) c_g_list_position; GList* function(GList* list, void* data) c_g_list_prepend; GList* function(GList* list, void* data) c_g_list_remove; GList* function(GList* list, void* data) c_g_list_remove_all; GList* function(GList* list, GList* llink) c_g_list_remove_link; GList* function(GList* list) c_g_list_reverse; GList* function(GList* list, GCompareFunc compareFunc) c_g_list_sort; GList* function(GList* list, GCompareDataFunc compareFunc, void* userData) c_g_list_sort_with_data; // glib.MainContext GMainContext* function() c_g_main_context_new; int function(GMainContext* context) c_g_main_context_acquire; void function(GMainContext* context, GPollFD* fd, int priority) c_g_main_context_add_poll; int function(GMainContext* context, int maxPriority, GPollFD* fds, int nFds) c_g_main_context_check; void function(GMainContext* context) c_g_main_context_dispatch; GSource* function(GMainContext* context, GSourceFuncs* funcs, void* userData) c_g_main_context_find_source_by_funcs_user_data; GSource* function(GMainContext* context, uint sourceId) c_g_main_context_find_source_by_id; GSource* function(GMainContext* context, void* userData) c_g_main_context_find_source_by_user_data; GPollFunc function(GMainContext* context) c_g_main_context_get_poll_func; void function(GMainContext* context, GSourceFunc funct, void* data) c_g_main_context_invoke; void function(GMainContext* context, int priority, GSourceFunc funct, void* data, GDestroyNotify notify) c_g_main_context_invoke_full; int function(GMainContext* context) c_g_main_context_is_owner; int function(GMainContext* context, int mayBlock) c_g_main_context_iteration; int function(GMainContext* context) c_g_main_context_pending; void function(GMainContext* context) c_g_main_context_pop_thread_default; int function(GMainContext* context, int* priority) c_g_main_context_prepare; void function(GMainContext* context) c_g_main_context_push_thread_default; int function(GMainContext* context, int maxPriority, int* timeout, GPollFD* fds, int nFds) c_g_main_context_query; GMainContext* function(GMainContext* context) c_g_main_context_ref; void function(GMainContext* context) c_g_main_context_release; void function(GMainContext* context, GPollFD* fd) c_g_main_context_remove_poll; void function(GMainContext* context, GPollFunc func) c_g_main_context_set_poll_func; void function(GMainContext* context) c_g_main_context_unref; int function(GMainContext* context, GCond* cond, GMutex* mutex) c_g_main_context_wait; void function(GMainContext* context) c_g_main_context_wakeup; GMainContext* function() c_g_main_context_default; GMainContext* function() c_g_main_context_get_thread_default; GMainContext* function() c_g_main_context_ref_thread_default; // glib.MainLoop GMainLoop* function(GMainContext* context, int isRunning) c_g_main_loop_new; GMainContext* function(GMainLoop* loop) c_g_main_loop_get_context; int function(GMainLoop* loop) c_g_main_loop_is_running; void function(GMainLoop* loop) c_g_main_loop_quit; GMainLoop* function(GMainLoop* loop) c_g_main_loop_ref; void function(GMainLoop* loop) c_g_main_loop_run; void function(GMainLoop* loop) c_g_main_loop_unref; GSource* function() c_g_main_current_source; int function() c_g_main_depth; int function(GPollFD* fds, uint nfds, int timeout) c_g_poll; // glib.MappedFile GMappedFile* function(char* filename, int writable, GError** err) c_g_mapped_file_new; GMappedFile* function(int fd, int writable, GError** err) c_g_mapped_file_new_from_fd; void function(GMappedFile* file) c_g_mapped_file_free; GBytes* function(GMappedFile* file) c_g_mapped_file_get_bytes; char* function(GMappedFile* file) c_g_mapped_file_get_contents; size_t function(GMappedFile* file) c_g_mapped_file_get_length; GMappedFile* function(GMappedFile* file) c_g_mapped_file_ref; void function(GMappedFile* file) c_g_mapped_file_unref; // glib.SimpleXML GMarkupParseContext* function(GMarkupParser* parser, GMarkupParseFlags flags, void* userData, GDestroyNotify userDataDnotify) c_g_markup_parse_context_new; int function(GMarkupParseContext* context, GError** err) c_g_markup_parse_context_end_parse; void function(GMarkupParseContext* context) c_g_markup_parse_context_free; const(char)* function(GMarkupParseContext* context) c_g_markup_parse_context_get_element; GSList* function(GMarkupParseContext* context) c_g_markup_parse_context_get_element_stack; void function(GMarkupParseContext* context, int* lineNumber, int* charNumber) c_g_markup_parse_context_get_position; void* function(GMarkupParseContext* context) c_g_markup_parse_context_get_user_data; int function(GMarkupParseContext* context, const(char)* text, ptrdiff_t textLen, GError** err) c_g_markup_parse_context_parse; void* function(GMarkupParseContext* context) c_g_markup_parse_context_pop; void function(GMarkupParseContext* context, GMarkupParser* parser, void* userData) c_g_markup_parse_context_push; GMarkupParseContext* function(GMarkupParseContext* context) c_g_markup_parse_context_ref; void function(GMarkupParseContext* context) c_g_markup_parse_context_unref; int function(const(char)* elementName, char** attributeNames, char** attributeValues, GError** error, GMarkupCollectType firstType, const(char)* firstAttr, ... ) c_g_markup_collect_attributes; GQuark function() c_g_markup_error_quark; char* function(const(char)* text, ptrdiff_t length) c_g_markup_escape_text; char* function(const(char)* format, ... ) c_g_markup_printf_escaped; char* function(const(char)* format, void* args) c_g_markup_vprintf_escaped; // glib.MatchInfo char* function(GMatchInfo* matchInfo, const(char)* stringToExpand, GError** err) c_g_match_info_expand_references; char* function(GMatchInfo* matchInfo, int matchNum) c_g_match_info_fetch; char** function(GMatchInfo* matchInfo) c_g_match_info_fetch_all; char* function(GMatchInfo* matchInfo, const(char)* name) c_g_match_info_fetch_named; int function(GMatchInfo* matchInfo, const(char)* name, int* startPos, int* endPos) c_g_match_info_fetch_named_pos; int function(GMatchInfo* matchInfo, int matchNum, int* startPos, int* endPos) c_g_match_info_fetch_pos; void function(GMatchInfo* matchInfo) c_g_match_info_free; int function(GMatchInfo* matchInfo) c_g_match_info_get_match_count; GRegex* function(GMatchInfo* matchInfo) c_g_match_info_get_regex; const(char)* function(GMatchInfo* matchInfo) c_g_match_info_get_string; int function(GMatchInfo* matchInfo) c_g_match_info_is_partial_match; int function(GMatchInfo* matchInfo) c_g_match_info_matches; int function(GMatchInfo* matchInfo, GError** err) c_g_match_info_next; GMatchInfo* function(GMatchInfo* matchInfo) c_g_match_info_ref; void function(GMatchInfo* matchInfo) c_g_match_info_unref; // glib.Mutex void function(GMutex* mutex) c_g_mutex_clear; void function(GMutex* mutex) c_g_mutex_init; void function(GMutex* mutex) c_g_mutex_lock; int function(GMutex* mutex) c_g_mutex_trylock; void function(GMutex* mutex) c_g_mutex_unlock; // glib.Node int function(GNode* node, void* data) c_g_node_child_index; int function(GNode* node, GNode* child) c_g_node_child_position; void function(GNode* node, GTraverseFlags flags, GNodeForeachFunc func, void* data) c_g_node_children_foreach; GNode* function(GNode* node) c_g_node_copy; GNode* function(GNode* node, GCopyFunc copyFunc, void* data) c_g_node_copy_deep; uint function(GNode* node) c_g_node_depth; void function(GNode* root) c_g_node_destroy; GNode* function(GNode* root, GTraverseType order, GTraverseFlags flags, void* data) c_g_node_find; GNode* function(GNode* node, GTraverseFlags flags, void* data) c_g_node_find_child; GNode* function(GNode* node) c_g_node_first_sibling; GNode* function(GNode* node) c_g_node_get_root; GNode* function(GNode* parent, int position, GNode* node) c_g_node_insert; GNode* function(GNode* parent, GNode* sibling, GNode* node) c_g_node_insert_after; GNode* function(GNode* parent, GNode* sibling, GNode* node) c_g_node_insert_before; int function(GNode* node, GNode* descendant) c_g_node_is_ancestor; GNode* function(GNode* node) c_g_node_last_child; GNode* function(GNode* node) c_g_node_last_sibling; uint function(GNode* root) c_g_node_max_height; uint function(GNode* node) c_g_node_n_children; uint function(GNode* root, GTraverseFlags flags) c_g_node_n_nodes; GNode* function(GNode* node, uint n) c_g_node_nth_child; GNode* function(GNode* parent, GNode* node) c_g_node_prepend; void function(GNode* node) c_g_node_reverse_children; void function(GNode* root, GTraverseType order, GTraverseFlags flags, int maxDepth, GNodeTraverseFunc func, void* data) c_g_node_traverse; void function(GNode* node) c_g_node_unlink; GNode* function(void* data) c_g_node_new; // glib.Once void* function(GOnce* once, GThreadFunc func, void* arg) c_g_once_impl; int function(void* location) c_g_once_init_enter; void function(void* location, size_t result) c_g_once_init_leave; // glib.OptionContext void function(GOptionContext* context, GOptionGroup* group) c_g_option_context_add_group; void function(GOptionContext* context, GOptionEntry* entries, const(char)* translationDomain) c_g_option_context_add_main_entries; void function(GOptionContext* context) c_g_option_context_free; const(char)* function(GOptionContext* context) c_g_option_context_get_description; char* function(GOptionContext* context, int mainHelp, GOptionGroup* group) c_g_option_context_get_help; int function(GOptionContext* context) c_g_option_context_get_help_enabled; int function(GOptionContext* context) c_g_option_context_get_ignore_unknown_options; GOptionGroup* function(GOptionContext* context) c_g_option_context_get_main_group; int function(GOptionContext* context) c_g_option_context_get_strict_posix; const(char)* function(GOptionContext* context) c_g_option_context_get_summary; int function(GOptionContext* context, int* argc, char*** argv, GError** err) c_g_option_context_parse; int function(GOptionContext* context, char*** arguments, GError** err) c_g_option_context_parse_strv; void function(GOptionContext* context, const(char)* description) c_g_option_context_set_description; void function(GOptionContext* context, int helpEnabled) c_g_option_context_set_help_enabled; void function(GOptionContext* context, int ignoreUnknown) c_g_option_context_set_ignore_unknown_options; void function(GOptionContext* context, GOptionGroup* group) c_g_option_context_set_main_group; void function(GOptionContext* context, int strictPosix) c_g_option_context_set_strict_posix; void function(GOptionContext* context, const(char)* summary) c_g_option_context_set_summary; void function(GOptionContext* context, GTranslateFunc func, void* data, GDestroyNotify destroyNotify) c_g_option_context_set_translate_func; void function(GOptionContext* context, const(char)* domain) c_g_option_context_set_translation_domain; GOptionContext* function(const(char)* parameterString) c_g_option_context_new; GQuark function() c_g_option_error_quark; // glib.OptionGroup GOptionGroup* function(const(char)* name, const(char)* description, const(char)* helpDescription, void* userData, GDestroyNotify destroy) c_g_option_group_new; void function(GOptionGroup* group, GOptionEntry* entries) c_g_option_group_add_entries; void function(GOptionGroup* group) c_g_option_group_free; GOptionGroup* function(GOptionGroup* group) c_g_option_group_ref; void function(GOptionGroup* group, GOptionErrorFunc errorFunc) c_g_option_group_set_error_hook; void function(GOptionGroup* group, GOptionParseFunc preParseFunc, GOptionParseFunc postParseFunc) c_g_option_group_set_parse_hooks; void function(GOptionGroup* group, GTranslateFunc func, void* data, GDestroyNotify destroyNotify) c_g_option_group_set_translate_func; void function(GOptionGroup* group, const(char)* domain) c_g_option_group_set_translation_domain; void function(GOptionGroup* group) c_g_option_group_unref; // glib.Pattern int function(GPatternSpec* pspec1, GPatternSpec* pspec2) c_g_pattern_spec_equal; void function(GPatternSpec* pspec) c_g_pattern_spec_free; GPatternSpec* function(const(char)* pattern) c_g_pattern_spec_new; int function(GPatternSpec* pspec, uint stringLength, const(char)* str, const(char)* stringReversed) c_g_pattern_match; int function(const(char)* pattern, const(char)* str) c_g_pattern_match_simple; int function(GPatternSpec* pspec, const(char)* str) c_g_pattern_match_string; // glib.Private void* function(GPrivate* key) c_g_private_get; void function(GPrivate* key, void* value) c_g_private_replace; void function(GPrivate* key, void* value) c_g_private_set; // glib.PtrArray void function(GPtrArray* array, void* data) c_g_ptr_array_add; int function(GPtrArray* haystack, void* needle, uint* index) c_g_ptr_array_find; int function(GPtrArray* haystack, void* needle, GEqualFunc equalFunc, uint* index) c_g_ptr_array_find_with_equal_func; void function(GPtrArray* array, GFunc func, void* userData) c_g_ptr_array_foreach; void** function(GPtrArray* array, int freeSeg) c_g_ptr_array_free; void function(GPtrArray* array, int index, void* data) c_g_ptr_array_insert; GPtrArray* function() c_g_ptr_array_new; GPtrArray* function(uint reservedSize, GDestroyNotify elementFreeFunc) c_g_ptr_array_new_full; GPtrArray* function(GDestroyNotify elementFreeFunc) c_g_ptr_array_new_with_free_func; GPtrArray* function(GPtrArray* array) c_g_ptr_array_ref; int function(GPtrArray* array, void* data) c_g_ptr_array_remove; int function(GPtrArray* array, void* data) c_g_ptr_array_remove_fast; void* function(GPtrArray* array, uint index) c_g_ptr_array_remove_index; void* function(GPtrArray* array, uint index) c_g_ptr_array_remove_index_fast; GPtrArray* function(GPtrArray* array, uint index, uint length) c_g_ptr_array_remove_range; void function(GPtrArray* array, GDestroyNotify elementFreeFunc) c_g_ptr_array_set_free_func; void function(GPtrArray* array, int length) c_g_ptr_array_set_size; GPtrArray* function(uint reservedSize) c_g_ptr_array_sized_new; void function(GPtrArray* array, GCompareFunc compareFunc) c_g_ptr_array_sort; void function(GPtrArray* array, GCompareDataFunc compareFunc, void* userData) c_g_ptr_array_sort_with_data; void function(GPtrArray* array) c_g_ptr_array_unref; // glib.QueueG void function(GQueue* queue) c_g_queue_clear; GQueue* function(GQueue* queue) c_g_queue_copy; void function(GQueue* queue, GList* link) c_g_queue_delete_link; GList* function(GQueue* queue, void* data) c_g_queue_find; GList* function(GQueue* queue, void* data, GCompareFunc func) c_g_queue_find_custom; void function(GQueue* queue, GFunc func, void* userData) c_g_queue_foreach; void function(GQueue* queue) c_g_queue_free; void function(GQueue* queue, GDestroyNotify freeFunc) c_g_queue_free_full; uint function(GQueue* queue) c_g_queue_get_length; int function(GQueue* queue, void* data) c_g_queue_index; void function(GQueue* queue) c_g_queue_init; void function(GQueue* queue, GList* sibling, void* data) c_g_queue_insert_after; void function(GQueue* queue, GList* sibling, void* data) c_g_queue_insert_before; void function(GQueue* queue, void* data, GCompareDataFunc func, void* userData) c_g_queue_insert_sorted; int function(GQueue* queue) c_g_queue_is_empty; int function(GQueue* queue, GList* link) c_g_queue_link_index; void* function(GQueue* queue) c_g_queue_peek_head; GList* function(GQueue* queue) c_g_queue_peek_head_link; void* function(GQueue* queue, uint n) c_g_queue_peek_nth; GList* function(GQueue* queue, uint n) c_g_queue_peek_nth_link; void* function(GQueue* queue) c_g_queue_peek_tail; GList* function(GQueue* queue) c_g_queue_peek_tail_link; void* function(GQueue* queue) c_g_queue_pop_head; GList* function(GQueue* queue) c_g_queue_pop_head_link; void* function(GQueue* queue, uint n) c_g_queue_pop_nth; GList* function(GQueue* queue, uint n) c_g_queue_pop_nth_link; void* function(GQueue* queue) c_g_queue_pop_tail; GList* function(GQueue* queue) c_g_queue_pop_tail_link; void function(GQueue* queue, void* data) c_g_queue_push_head; void function(GQueue* queue, GList* link) c_g_queue_push_head_link; void function(GQueue* queue, void* data, int n) c_g_queue_push_nth; void function(GQueue* queue, int n, GList* link) c_g_queue_push_nth_link; void function(GQueue* queue, void* data) c_g_queue_push_tail; void function(GQueue* queue, GList* link) c_g_queue_push_tail_link; int function(GQueue* queue, void* data) c_g_queue_remove; uint function(GQueue* queue, void* data) c_g_queue_remove_all; void function(GQueue* queue) c_g_queue_reverse; void function(GQueue* queue, GCompareDataFunc compareFunc, void* userData) c_g_queue_sort; void function(GQueue* queue, GList* link) c_g_queue_unlink; GQueue* function() c_g_queue_new; // glib.RWLock void function(GRWLock* rwLock) c_g_rw_lock_clear; void function(GRWLock* rwLock) c_g_rw_lock_init; void function(GRWLock* rwLock) c_g_rw_lock_reader_lock; int function(GRWLock* rwLock) c_g_rw_lock_reader_trylock; void function(GRWLock* rwLock) c_g_rw_lock_reader_unlock; void function(GRWLock* rwLock) c_g_rw_lock_writer_lock; int function(GRWLock* rwLock) c_g_rw_lock_writer_trylock; void function(GRWLock* rwLock) c_g_rw_lock_writer_unlock; // glib.RandG GRand* function(GRand* rand) c_g_rand_copy; double function(GRand* rand) c_g_rand_double; double function(GRand* rand, double begin, double end) c_g_rand_double_range; void function(GRand* rand) c_g_rand_free; uint function(GRand* rand) c_g_rand_int; int function(GRand* rand, int begin, int end) c_g_rand_int_range; void function(GRand* rand, uint seed) c_g_rand_set_seed; void function(GRand* rand, uint* seed, uint seedLength) c_g_rand_set_seed_array; GRand* function() c_g_rand_new; GRand* function(uint seed) c_g_rand_new_with_seed; GRand* function(uint* seed, uint seedLength) c_g_rand_new_with_seed_array; double function() c_g_random_double; double function(double begin, double end) c_g_random_double_range; uint function() c_g_random_int; int function(int begin, int end) c_g_random_int_range; void function(uint seed) c_g_random_set_seed; // glib.RecMutex void function(GRecMutex* recMutex) c_g_rec_mutex_clear; void function(GRecMutex* recMutex) c_g_rec_mutex_init; void function(GRecMutex* recMutex) c_g_rec_mutex_lock; int function(GRecMutex* recMutex) c_g_rec_mutex_trylock; void function(GRecMutex* recMutex) c_g_rec_mutex_unlock; // glib.Regex GRegex* function(const(char)* pattern, GRegexCompileFlags compileOptions, GRegexMatchFlags matchOptions, GError** err) c_g_regex_new; int function(GRegex* regex) c_g_regex_get_capture_count; GRegexCompileFlags function(GRegex* regex) c_g_regex_get_compile_flags; int function(GRegex* regex) c_g_regex_get_has_cr_or_lf; GRegexMatchFlags function(GRegex* regex) c_g_regex_get_match_flags; int function(GRegex* regex) c_g_regex_get_max_backref; int function(GRegex* regex) c_g_regex_get_max_lookbehind; const(char)* function(GRegex* regex) c_g_regex_get_pattern; int function(GRegex* regex, const(char)* name) c_g_regex_get_string_number; int function(GRegex* regex, const(char)* str, GRegexMatchFlags matchOptions, GMatchInfo** matchInfo) c_g_regex_match; int function(GRegex* regex, const(char)* str, GRegexMatchFlags matchOptions, GMatchInfo** matchInfo) c_g_regex_match_all; int function(GRegex* regex, char* str, ptrdiff_t stringLen, int startPosition, GRegexMatchFlags matchOptions, GMatchInfo** matchInfo, GError** err) c_g_regex_match_all_full; int function(GRegex* regex, char* str, ptrdiff_t stringLen, int startPosition, GRegexMatchFlags matchOptions, GMatchInfo** matchInfo, GError** err) c_g_regex_match_full; GRegex* function(GRegex* regex) c_g_regex_ref; char* function(GRegex* regex, char* str, ptrdiff_t stringLen, int startPosition, const(char)* replacement, GRegexMatchFlags matchOptions, GError** err) c_g_regex_replace; char* function(GRegex* regex, char* str, ptrdiff_t stringLen, int startPosition, GRegexMatchFlags matchOptions, GRegexEvalCallback eval, void* userData, GError** err) c_g_regex_replace_eval; char* function(GRegex* regex, char* str, ptrdiff_t stringLen, int startPosition, const(char)* replacement, GRegexMatchFlags matchOptions, GError** err) c_g_regex_replace_literal; char** function(GRegex* regex, const(char)* str, GRegexMatchFlags matchOptions) c_g_regex_split; char** function(GRegex* regex, char* str, ptrdiff_t stringLen, int startPosition, GRegexMatchFlags matchOptions, int maxTokens, GError** err) c_g_regex_split_full; void function(GRegex* regex) c_g_regex_unref; int function(const(char)* replacement, int* hasReferences, GError** err) c_g_regex_check_replacement; GQuark function() c_g_regex_error_quark; char* function(const(char)* str, int length) c_g_regex_escape_nul; char* function(char* str, int length) c_g_regex_escape_string; int function(const(char)* pattern, const(char)* str, GRegexCompileFlags compileOptions, GRegexMatchFlags matchOptions) c_g_regex_match_simple; char** function(const(char)* pattern, const(char)* str, GRegexCompileFlags compileOptions, GRegexMatchFlags matchOptions) c_g_regex_split_simple; // glib.ListSG GSList* function() c_g_slist_alloc; GSList* function(GSList* list, void* data) c_g_slist_append; GSList* function(GSList* list1, GSList* list2) c_g_slist_concat; GSList* function(GSList* list) c_g_slist_copy; GSList* function(GSList* list, GCopyFunc func, void* userData) c_g_slist_copy_deep; GSList* function(GSList* list, GSList* link) c_g_slist_delete_link; GSList* function(GSList* list, void* data) c_g_slist_find; GSList* function(GSList* list, void* data, GCompareFunc func) c_g_slist_find_custom; void function(GSList* list, GFunc func, void* userData) c_g_slist_foreach; void function(GSList* list) c_g_slist_free; void function(GSList* list) c_g_slist_free_1; void function(GSList* list, GDestroyNotify freeFunc) c_g_slist_free_full; int function(GSList* list, void* data) c_g_slist_index; GSList* function(GSList* list, void* data, int position) c_g_slist_insert; GSList* function(GSList* slist, GSList* sibling, void* data) c_g_slist_insert_before; GSList* function(GSList* list, void* data, GCompareFunc func) c_g_slist_insert_sorted; GSList* function(GSList* list, void* data, GCompareDataFunc func, void* userData) c_g_slist_insert_sorted_with_data; GSList* function(GSList* list) c_g_slist_last; uint function(GSList* list) c_g_slist_length; GSList* function(GSList* list, uint n) c_g_slist_nth; void* function(GSList* list, uint n) c_g_slist_nth_data; int function(GSList* list, GSList* llink) c_g_slist_position; GSList* function(GSList* list, void* data) c_g_slist_prepend; GSList* function(GSList* list, void* data) c_g_slist_remove; GSList* function(GSList* list, void* data) c_g_slist_remove_all; GSList* function(GSList* list, GSList* link) c_g_slist_remove_link; GSList* function(GSList* list) c_g_slist_reverse; GSList* function(GSList* list, GCompareFunc compareFunc) c_g_slist_sort; GSList* function(GSList* list, GCompareDataFunc compareFunc, void* userData) c_g_slist_sort_with_data; // glib.ScannerG uint function(GScanner* scanner) c_g_scanner_cur_line; uint function(GScanner* scanner) c_g_scanner_cur_position; GTokenType function(GScanner* scanner) c_g_scanner_cur_token; GTokenValue function(GScanner* scanner) c_g_scanner_cur_value; void function(GScanner* scanner) c_g_scanner_destroy; int function(GScanner* scanner) c_g_scanner_eof; void function(GScanner* scanner, const(char)* format, ... ) c_g_scanner_error; GTokenType function(GScanner* scanner) c_g_scanner_get_next_token; void function(GScanner* scanner, int inputFd) c_g_scanner_input_file; void function(GScanner* scanner, const(char)* text, uint textLen) c_g_scanner_input_text; void* function(GScanner* scanner, const(char)* symbol) c_g_scanner_lookup_symbol; GTokenType function(GScanner* scanner) c_g_scanner_peek_next_token; void function(GScanner* scanner, uint scopeId, const(char)* symbol, void* value) c_g_scanner_scope_add_symbol; void function(GScanner* scanner, uint scopeId, GHFunc func, void* userData) c_g_scanner_scope_foreach_symbol; void* function(GScanner* scanner, uint scopeId, const(char)* symbol) c_g_scanner_scope_lookup_symbol; void function(GScanner* scanner, uint scopeId, const(char)* symbol) c_g_scanner_scope_remove_symbol; uint function(GScanner* scanner, uint scopeId) c_g_scanner_set_scope; void function(GScanner* scanner) c_g_scanner_sync_file_offset; void function(GScanner* scanner, GTokenType expectedToken, const(char)* identifierSpec, const(char)* symbolSpec, const(char)* symbolName, const(char)* message, int isError) c_g_scanner_unexp_token; void function(GScanner* scanner, const(char)* format, ... ) c_g_scanner_warn; GScanner* function(GScannerConfig* configTempl) c_g_scanner_new; // glib.Sequence GSequenceIter* function(GSequence* seq, void* data) c_g_sequence_append; void function(GSequence* seq, GFunc func, void* userData) c_g_sequence_foreach; void function(GSequence* seq) c_g_sequence_free; GSequenceIter* function(GSequence* seq) c_g_sequence_get_begin_iter; GSequenceIter* function(GSequence* seq) c_g_sequence_get_end_iter; GSequenceIter* function(GSequence* seq, int pos) c_g_sequence_get_iter_at_pos; int function(GSequence* seq) c_g_sequence_get_length; GSequenceIter* function(GSequence* seq, void* data, GCompareDataFunc cmpFunc, void* cmpData) c_g_sequence_insert_sorted; GSequenceIter* function(GSequence* seq, void* data, GSequenceIterCompareFunc iterCmp, void* cmpData) c_g_sequence_insert_sorted_iter; int function(GSequence* seq) c_g_sequence_is_empty; GSequenceIter* function(GSequence* seq, void* data, GCompareDataFunc cmpFunc, void* cmpData) c_g_sequence_lookup; GSequenceIter* function(GSequence* seq, void* data, GSequenceIterCompareFunc iterCmp, void* cmpData) c_g_sequence_lookup_iter; GSequenceIter* function(GSequence* seq, void* data) c_g_sequence_prepend; GSequenceIter* function(GSequence* seq, void* data, GCompareDataFunc cmpFunc, void* cmpData) c_g_sequence_search; GSequenceIter* function(GSequence* seq, void* data, GSequenceIterCompareFunc iterCmp, void* cmpData) c_g_sequence_search_iter; void function(GSequence* seq, GCompareDataFunc cmpFunc, void* cmpData) c_g_sequence_sort; void function(GSequence* seq, GSequenceIterCompareFunc cmpFunc, void* cmpData) c_g_sequence_sort_iter; void function(GSequenceIter* begin, GSequenceIter* end, GFunc func, void* userData) c_g_sequence_foreach_range; void* function(GSequenceIter* iter) c_g_sequence_get; GSequenceIter* function(GSequenceIter* iter, void* data) c_g_sequence_insert_before; void function(GSequenceIter* src, GSequenceIter* dest) c_g_sequence_move; void function(GSequenceIter* dest, GSequenceIter* begin, GSequenceIter* end) c_g_sequence_move_range; GSequence* function(GDestroyNotify dataDestroy) c_g_sequence_new; GSequenceIter* function(GSequenceIter* begin, GSequenceIter* end) c_g_sequence_range_get_midpoint; void function(GSequenceIter* iter) c_g_sequence_remove; void function(GSequenceIter* begin, GSequenceIter* end) c_g_sequence_remove_range; void function(GSequenceIter* iter, void* data) c_g_sequence_set; void function(GSequenceIter* iter, GCompareDataFunc cmpFunc, void* cmpData) c_g_sequence_sort_changed; void function(GSequenceIter* iter, GSequenceIterCompareFunc iterCmp, void* cmpData) c_g_sequence_sort_changed_iter; void function(GSequenceIter* a, GSequenceIter* b) c_g_sequence_swap; // glib.SequenceIter int function(GSequenceIter* a, GSequenceIter* b) c_g_sequence_iter_compare; int function(GSequenceIter* iter) c_g_sequence_iter_get_position; GSequence* function(GSequenceIter* iter) c_g_sequence_iter_get_sequence; int function(GSequenceIter* iter) c_g_sequence_iter_is_begin; int function(GSequenceIter* iter) c_g_sequence_iter_is_end; GSequenceIter* function(GSequenceIter* iter, int delta) c_g_sequence_iter_move; GSequenceIter* function(GSequenceIter* iter) c_g_sequence_iter_next; GSequenceIter* function(GSequenceIter* iter) c_g_sequence_iter_prev; // glib.Source GSource* function(GSourceFuncs* sourceFuncs, uint structSize) c_g_source_new; void function(GSource* source, GSource* childSource) c_g_source_add_child_source; void function(GSource* source, GPollFD* fd) c_g_source_add_poll; void* function(GSource* source, int fd, GIOCondition events) c_g_source_add_unix_fd; uint function(GSource* source, GMainContext* context) c_g_source_attach; void function(GSource* source) c_g_source_destroy; int function(GSource* source) c_g_source_get_can_recurse; GMainContext* function(GSource* source) c_g_source_get_context; void function(GSource* source, GTimeVal* timeval) c_g_source_get_current_time; uint function(GSource* source) c_g_source_get_id; const(char)* function(GSource* source) c_g_source_get_name; int function(GSource* source) c_g_source_get_priority; long function(GSource* source) c_g_source_get_ready_time; long function(GSource* source) c_g_source_get_time; int function(GSource* source) c_g_source_is_destroyed; void function(GSource* source, void* tag, GIOCondition newEvents) c_g_source_modify_unix_fd; GIOCondition function(GSource* source, void* tag) c_g_source_query_unix_fd; GSource* function(GSource* source) c_g_source_ref; void function(GSource* source, GSource* childSource) c_g_source_remove_child_source; void function(GSource* source, GPollFD* fd) c_g_source_remove_poll; void function(GSource* source, void* tag) c_g_source_remove_unix_fd; void function(GSource* source, GSourceFunc func, void* data, GDestroyNotify notify) c_g_source_set_callback; void function(GSource* source, void* callbackData, GSourceCallbackFuncs* callbackFuncs) c_g_source_set_callback_indirect; void function(GSource* source, int canRecurse) c_g_source_set_can_recurse; void function(GSource* source, GSourceFuncs* funcs) c_g_source_set_funcs; void function(GSource* source, const(char)* name) c_g_source_set_name; void function(GSource* source, int priority) c_g_source_set_priority; void function(GSource* source, long readyTime) c_g_source_set_ready_time; void function(GSource* source) c_g_source_unref; int function(uint tag) c_g_source_remove; int function(GSourceFuncs* funcs, void* userData) c_g_source_remove_by_funcs_user_data; int function(void* userData) c_g_source_remove_by_user_data; void function(uint tag, const(char)* name) c_g_source_set_name_by_id; // glib.StringG GString* function(GString* str, const(char)* val) c_g_string_append; GString* function(GString* str, char c) c_g_string_append_c; GString* function(GString* str, const(char)* val, ptrdiff_t len) c_g_string_append_len; void function(GString* str, const(char)* format, ... ) c_g_string_append_printf; GString* function(GString* str, dchar wc) c_g_string_append_unichar; GString* function(GString* str, const(char)* unescaped, const(char)* reservedCharsAllowed, int allowUtf8) c_g_string_append_uri_escaped; void function(GString* str, const(char)* format, void* args) c_g_string_append_vprintf; GString* function(GString* str) c_g_string_ascii_down; GString* function(GString* str) c_g_string_ascii_up; GString* function(GString* str, const(char)* rval) c_g_string_assign; GString* function(GString* str) c_g_string_down; int function(GString* v, GString* v2) c_g_string_equal; GString* function(GString* str, ptrdiff_t pos, ptrdiff_t len) c_g_string_erase; char* function(GString* str, int freeSegment) c_g_string_free; GBytes* function(GString* str) c_g_string_free_to_bytes; uint function(GString* str) c_g_string_hash; GString* function(GString* str, ptrdiff_t pos, const(char)* val) c_g_string_insert; GString* function(GString* str, ptrdiff_t pos, char c) c_g_string_insert_c; GString* function(GString* str, ptrdiff_t pos, const(char)* val, ptrdiff_t len) c_g_string_insert_len; GString* function(GString* str, ptrdiff_t pos, dchar wc) c_g_string_insert_unichar; GString* function(GString* str, size_t pos, const(char)* val) c_g_string_overwrite; GString* function(GString* str, size_t pos, const(char)* val, ptrdiff_t len) c_g_string_overwrite_len; GString* function(GString* str, const(char)* val) c_g_string_prepend; GString* function(GString* str, char c) c_g_string_prepend_c; GString* function(GString* str, const(char)* val, ptrdiff_t len) c_g_string_prepend_len; GString* function(GString* str, dchar wc) c_g_string_prepend_unichar; void function(GString* str, const(char)* format, ... ) c_g_string_printf; GString* function(GString* str, size_t len) c_g_string_set_size; GString* function(GString* str, size_t len) c_g_string_truncate; GString* function(GString* str) c_g_string_up; void function(GString* str, const(char)* format, void* args) c_g_string_vprintf; GString* function(const(char)* init) c_g_string_new; GString* function(const(char)* init, ptrdiff_t len) c_g_string_new_len; GString* function(size_t dflSize) c_g_string_sized_new; // glib.StringChunk void function(GStringChunk* chunk) c_g_string_chunk_clear; void function(GStringChunk* chunk) c_g_string_chunk_free; char* function(GStringChunk* chunk, const(char)* str) c_g_string_chunk_insert; char* function(GStringChunk* chunk, const(char)* str) c_g_string_chunk_insert_const; char* function(GStringChunk* chunk, const(char)* str, ptrdiff_t len) c_g_string_chunk_insert_len; GStringChunk* function(size_t size) c_g_string_chunk_new; // glib.TestLogBuffer void function(GTestLogBuffer* tbuffer) c_g_test_log_buffer_free; GTestLogMsg* function(GTestLogBuffer* tbuffer) c_g_test_log_buffer_pop; void function(GTestLogBuffer* tbuffer, uint nBytes, ubyte* bytes) c_g_test_log_buffer_push; GTestLogBuffer* function() c_g_test_log_buffer_new; // glib.TestLogMsg void function(GTestLogMsg* tmsg) c_g_test_log_msg_free; // glib.TestSuite void function(GTestSuite* suite, GTestCase* testCase) c_g_test_suite_add; void function(GTestSuite* suite, GTestSuite* nestedsuite) c_g_test_suite_add_suite; // glib.Thread GThread* function(const(char)* name, GThreadFunc func, void* data) c_g_thread_new; GThread* function(const(char)* name, GThreadFunc func, void* data, GError** err) c_g_thread_try_new; void* function(GThread* thread) c_g_thread_join; GThread* function(GThread* thread) c_g_thread_ref; void function(GThread* thread) c_g_thread_unref; GQuark function() c_g_thread_error_quark; void function(void* retval) c_g_thread_exit; GThread* function() c_g_thread_self; void function() c_g_thread_yield; void function(int* address, int lockBit) c_g_bit_lock; int function(int* address, int lockBit) c_g_bit_trylock; void function(int* address, int lockBit) c_g_bit_unlock; uint function() c_g_get_num_processors; void function(void* address, int lockBit) c_g_pointer_bit_lock; int function(void* address, int lockBit) c_g_pointer_bit_trylock; void function(void* address, int lockBit) c_g_pointer_bit_unlock; // glib.ThreadPool void function(GThreadPool* pool, int immediate, int wait) c_g_thread_pool_free; int function(GThreadPool* pool) c_g_thread_pool_get_max_threads; uint function(GThreadPool* pool) c_g_thread_pool_get_num_threads; int function(GThreadPool* pool, void* data) c_g_thread_pool_move_to_front; int function(GThreadPool* pool, void* data, GError** err) c_g_thread_pool_push; int function(GThreadPool* pool, int maxThreads, GError** err) c_g_thread_pool_set_max_threads; void function(GThreadPool* pool, GCompareDataFunc func, void* userData) c_g_thread_pool_set_sort_function; uint function(GThreadPool* pool) c_g_thread_pool_unprocessed; uint function() c_g_thread_pool_get_max_idle_time; int function() c_g_thread_pool_get_max_unused_threads; uint function() c_g_thread_pool_get_num_unused_threads; GThreadPool* function(GFunc func, void* userData, int maxThreads, int exclusive, GError** err) c_g_thread_pool_new; void function(uint interval) c_g_thread_pool_set_max_idle_time; void function(int maxThreads) c_g_thread_pool_set_max_unused_threads; void function() c_g_thread_pool_stop_unused_threads; // glib.TimeVal void function(GTimeVal* time, glong microseconds) c_g_time_val_add; char* function(GTimeVal* time) c_g_time_val_to_iso8601; int function(const(char)* isoDate, GTimeVal* time) c_g_time_val_from_iso8601; void function(GTimeVal* result) c_g_get_current_time; long function() c_g_get_monotonic_time; long function() c_g_get_real_time; void function(gulong microseconds) c_g_usleep; // glib.TimeZone GTimeZone* function(const(char)* identifier) c_g_time_zone_new; GTimeZone* function() c_g_time_zone_new_local; GTimeZone* function() c_g_time_zone_new_utc; int function(GTimeZone* tz, GTimeType type, long* time) c_g_time_zone_adjust_time; int function(GTimeZone* tz, GTimeType type, long time) c_g_time_zone_find_interval; const(char)* function(GTimeZone* tz, int interval) c_g_time_zone_get_abbreviation; int function(GTimeZone* tz, int interval) c_g_time_zone_get_offset; int function(GTimeZone* tz, int interval) c_g_time_zone_is_dst; GTimeZone* function(GTimeZone* tz) c_g_time_zone_ref; void function(GTimeZone* tz) c_g_time_zone_unref; // glib.Timer void function(GTimer* timer) c_g_timer_continue; void function(GTimer* timer) c_g_timer_destroy; double function(GTimer* timer, gulong* microseconds) c_g_timer_elapsed; void function(GTimer* timer) c_g_timer_reset; void function(GTimer* timer) c_g_timer_start; void function(GTimer* timer) c_g_timer_stop; GTimer* function() c_g_timer_new; // glib.TrashStack uint function(GTrashStack** stackP) c_g_trash_stack_height; void* function(GTrashStack** stackP) c_g_trash_stack_peek; void* function(GTrashStack** stackP) c_g_trash_stack_pop; void function(GTrashStack** stackP, void* dataP) c_g_trash_stack_push; // glib.BBTree void function(GTree* tree) c_g_tree_destroy; void function(GTree* tree, GTraverseFunc func, void* userData) c_g_tree_foreach; int function(GTree* tree) c_g_tree_height; void function(GTree* tree, void* key, void* value) c_g_tree_insert; void* function(GTree* tree, void* key) c_g_tree_lookup; int function(GTree* tree, void* lookupKey, void** origKey, void** value) c_g_tree_lookup_extended; int function(GTree* tree) c_g_tree_nnodes; GTree* function(GTree* tree) c_g_tree_ref; int function(GTree* tree, void* key) c_g_tree_remove; void function(GTree* tree, void* key, void* value) c_g_tree_replace; void* function(GTree* tree, GCompareFunc searchFunc, void* userData) c_g_tree_search; int function(GTree* tree, void* key) c_g_tree_steal; void function(GTree* tree, GTraverseFunc traverseFunc, GTraverseType traverseType, void* userData) c_g_tree_traverse; void function(GTree* tree) c_g_tree_unref; GTree* function(GCompareFunc keyCompareFunc) c_g_tree_new; GTree* function(GCompareDataFunc keyCompareFunc, void* keyCompareData, GDestroyNotify keyDestroyFunc, GDestroyNotify valueDestroyFunc) c_g_tree_new_full; GTree* function(GCompareDataFunc keyCompareFunc, void* keyCompareData) c_g_tree_new_with_data; // glib.Variant GVariant* function(const(char)* formatString, ... ) c_g_variant_new; GVariant* function(GVariantType* childType, GVariant** children, size_t nChildren) c_g_variant_new_array; GVariant* function(int value) c_g_variant_new_boolean; GVariant* function(char value) c_g_variant_new_byte; GVariant* function(char* str) c_g_variant_new_bytestring; GVariant* function(char** strv, ptrdiff_t length) c_g_variant_new_bytestring_array; GVariant* function(GVariant* key, GVariant* value) c_g_variant_new_dict_entry; GVariant* function(double value) c_g_variant_new_double; GVariant* function(GVariantType* elementType, void* elements, size_t nElements, size_t elementSize) c_g_variant_new_fixed_array; GVariant* function(GVariantType* type, GBytes* bytes, int trusted) c_g_variant_new_from_bytes; GVariant* function(GVariantType* type, void* data, size_t size, int trusted, GDestroyNotify notify, void* userData) c_g_variant_new_from_data; GVariant* function(int value) c_g_variant_new_handle; GVariant* function(short value) c_g_variant_new_int16; GVariant* function(int value) c_g_variant_new_int32; GVariant* function(long value) c_g_variant_new_int64; GVariant* function(GVariantType* childType, GVariant* child) c_g_variant_new_maybe; GVariant* function(const(char)* objectPath) c_g_variant_new_object_path; GVariant* function(char** strv, ptrdiff_t length) c_g_variant_new_objv; GVariant* function(const(char)* format, ... ) c_g_variant_new_parsed; GVariant* function(const(char)* format, void** app) c_g_variant_new_parsed_va; GVariant* function(const(char)* formatString, ... ) c_g_variant_new_printf; GVariant* function(const(char)* signature) c_g_variant_new_signature; GVariant* function(const(char)* str) c_g_variant_new_string; GVariant* function(char** strv, ptrdiff_t length) c_g_variant_new_strv; GVariant* function(char* str) c_g_variant_new_take_string; GVariant* function(GVariant** children, size_t nChildren) c_g_variant_new_tuple; GVariant* function(ushort value) c_g_variant_new_uint16; GVariant* function(uint value) c_g_variant_new_uint32; GVariant* function(ulong value) c_g_variant_new_uint64; GVariant* function(const(char)* formatString, char** endptr, void** app) c_g_variant_new_va; GVariant* function(GVariant* value) c_g_variant_new_variant; GVariant* function(GVariant* value) c_g_variant_byteswap; int function(GVariant* value, const(char)* formatString, int copyOnly) c_g_variant_check_format_string; GVariantClass function(GVariant* value) c_g_variant_classify; int function(void* one, void* two) c_g_variant_compare; char* function(GVariant* value, size_t* length) c_g_variant_dup_bytestring; char** function(GVariant* value, size_t* length) c_g_variant_dup_bytestring_array; char** function(GVariant* value, size_t* length) c_g_variant_dup_objv; char* function(GVariant* value, size_t* length) c_g_variant_dup_string; char** function(GVariant* value, size_t* length) c_g_variant_dup_strv; int function(void* one, void* two) c_g_variant_equal; void function(GVariant* value, const(char)* formatString, ... ) c_g_variant_get; int function(GVariant* value) c_g_variant_get_boolean; char function(GVariant* value) c_g_variant_get_byte; char* function(GVariant* value) c_g_variant_get_bytestring; char** function(GVariant* value, size_t* length) c_g_variant_get_bytestring_array; void function(GVariant* value, size_t index, const(char)* formatString, ... ) c_g_variant_get_child; GVariant* function(GVariant* value, size_t index) c_g_variant_get_child_value; void* function(GVariant* value) c_g_variant_get_data; GBytes* function(GVariant* value) c_g_variant_get_data_as_bytes; double function(GVariant* value) c_g_variant_get_double; void* function(GVariant* value, size_t* nElements, size_t elementSize) c_g_variant_get_fixed_array; int function(GVariant* value) c_g_variant_get_handle; short function(GVariant* value) c_g_variant_get_int16; int function(GVariant* value) c_g_variant_get_int32; long function(GVariant* value) c_g_variant_get_int64; GVariant* function(GVariant* value) c_g_variant_get_maybe; GVariant* function(GVariant* value) c_g_variant_get_normal_form; char** function(GVariant* value, size_t* length) c_g_variant_get_objv; size_t function(GVariant* value) c_g_variant_get_size; const(char)* function(GVariant* value, size_t* length) c_g_variant_get_string; char** function(GVariant* value, size_t* length) c_g_variant_get_strv; GVariantType* function(GVariant* value) c_g_variant_get_type; const(char)* function(GVariant* value) c_g_variant_get_type_string; ushort function(GVariant* value) c_g_variant_get_uint16; uint function(GVariant* value) c_g_variant_get_uint32; ulong function(GVariant* value) c_g_variant_get_uint64; void function(GVariant* value, const(char)* formatString, char** endptr, void** app) c_g_variant_get_va; GVariant* function(GVariant* value) c_g_variant_get_variant; uint function(void* value) c_g_variant_hash; int function(GVariant* value) c_g_variant_is_container; int function(GVariant* value) c_g_variant_is_floating; int function(GVariant* value) c_g_variant_is_normal_form; int function(GVariant* value, GVariantType* type) c_g_variant_is_of_type; GVariantIter* function(GVariant* value) c_g_variant_iter_new; int function(GVariant* dictionary, const(char)* key, const(char)* formatString, ... ) c_g_variant_lookup; GVariant* function(GVariant* dictionary, const(char)* key, GVariantType* expectedType) c_g_variant_lookup_value; size_t function(GVariant* value) c_g_variant_n_children; char* function(GVariant* value, int typeAnnotate) c_g_variant_print; GString* function(GVariant* value, GString* str, int typeAnnotate) c_g_variant_print_string; GVariant* function(GVariant* value) c_g_variant_ref; GVariant* function(GVariant* value) c_g_variant_ref_sink; void function(GVariant* value, void* data) c_g_variant_store; GVariant* function(GVariant* value) c_g_variant_take_ref; void function(GVariant* value) c_g_variant_unref; int function(const(char)* str) c_g_variant_is_object_path; int function(const(char)* str) c_g_variant_is_signature; GVariant* function(GVariantType* type, const(char)* text, const(char)* limit, char** endptr, GError** err) c_g_variant_parse; char* function(GError* error, const(char)* sourceStr) c_g_variant_parse_error_print_context; GQuark function() c_g_variant_parse_error_quark; GQuark function() c_g_variant_parser_get_error_quark; // glib.VariantBuilder GVariantBuilder* function(GVariantType* type) c_g_variant_builder_new; void function(GVariantBuilder* builder, const(char)* formatString, ... ) c_g_variant_builder_add; void function(GVariantBuilder* builder, const(char)* format, ... ) c_g_variant_builder_add_parsed; void function(GVariantBuilder* builder, GVariant* value) c_g_variant_builder_add_value; void function(GVariantBuilder* builder) c_g_variant_builder_clear; void function(GVariantBuilder* builder) c_g_variant_builder_close; GVariant* function(GVariantBuilder* builder) c_g_variant_builder_end; void function(GVariantBuilder* builder, GVariantType* type) c_g_variant_builder_init; void function(GVariantBuilder* builder, GVariantType* type) c_g_variant_builder_open; GVariantBuilder* function(GVariantBuilder* builder) c_g_variant_builder_ref; void function(GVariantBuilder* builder) c_g_variant_builder_unref; // glib.VariantDict GVariantDict* function(GVariant* fromAsv) c_g_variant_dict_new; void function(GVariantDict* dict) c_g_variant_dict_clear; int function(GVariantDict* dict, const(char)* key) c_g_variant_dict_contains; GVariant* function(GVariantDict* dict) c_g_variant_dict_end; void function(GVariantDict* dict, GVariant* fromAsv) c_g_variant_dict_init; void function(GVariantDict* dict, const(char)* key, const(char)* formatString, ... ) c_g_variant_dict_insert; void function(GVariantDict* dict, const(char)* key, GVariant* value) c_g_variant_dict_insert_value; int function(GVariantDict* dict, const(char)* key, const(char)* formatString, ... ) c_g_variant_dict_lookup; GVariant* function(GVariantDict* dict, const(char)* key, GVariantType* expectedType) c_g_variant_dict_lookup_value; GVariantDict* function(GVariantDict* dict) c_g_variant_dict_ref; int function(GVariantDict* dict, const(char)* key) c_g_variant_dict_remove; void function(GVariantDict* dict) c_g_variant_dict_unref; // glib.VariantIter GVariantIter* function(GVariantIter* iter) c_g_variant_iter_copy; void function(GVariantIter* iter) c_g_variant_iter_free; size_t function(GVariantIter* iter, GVariant* value) c_g_variant_iter_init; int function(GVariantIter* iter, const(char)* formatString, ... ) c_g_variant_iter_loop; size_t function(GVariantIter* iter) c_g_variant_iter_n_children; int function(GVariantIter* iter, const(char)* formatString, ... ) c_g_variant_iter_next; GVariant* function(GVariantIter* iter) c_g_variant_iter_next_value; // glib.VariantType GVariantType* function(const(char)* typeString) c_g_variant_type_new; GVariantType* function(GVariantType* element) c_g_variant_type_new_array; GVariantType* function(GVariantType* key, GVariantType* value) c_g_variant_type_new_dict_entry; GVariantType* function(GVariantType* element) c_g_variant_type_new_maybe; GVariantType* function(GVariantType** items, int length) c_g_variant_type_new_tuple; GVariantType* function(GVariantType* type) c_g_variant_type_copy; char* function(GVariantType* type) c_g_variant_type_dup_string; GVariantType* function(GVariantType* type) c_g_variant_type_element; int function(void* type1, void* type2) c_g_variant_type_equal; GVariantType* function(GVariantType* type) c_g_variant_type_first; void function(GVariantType* type) c_g_variant_type_free; size_t function(GVariantType* type) c_g_variant_type_get_string_length; uint function(void* type) c_g_variant_type_hash; int function(GVariantType* type) c_g_variant_type_is_array; int function(GVariantType* type) c_g_variant_type_is_basic; int function(GVariantType* type) c_g_variant_type_is_container; int function(GVariantType* type) c_g_variant_type_is_definite; int function(GVariantType* type) c_g_variant_type_is_dict_entry; int function(GVariantType* type) c_g_variant_type_is_maybe; int function(GVariantType* type, GVariantType* supertype) c_g_variant_type_is_subtype_of; int function(GVariantType* type) c_g_variant_type_is_tuple; int function(GVariantType* type) c_g_variant_type_is_variant; GVariantType* function(GVariantType* type) c_g_variant_type_key; size_t function(GVariantType* type) c_g_variant_type_n_items; GVariantType* function(GVariantType* type) c_g_variant_type_next; const(char)* function(GVariantType* type) c_g_variant_type_peek_string; GVariantType* function(GVariantType* type) c_g_variant_type_value; GVariantType* function(const(char)* arg0) c_g_variant_type_checked_; int function(const(char)* typeString) c_g_variant_type_string_is_valid; int function(const(char)* str, const(char)* limit, char** endptr) c_g_variant_type_string_scan; // glib.Module int function(GModule* modul) c_g_module_close; void function(GModule* modul) c_g_module_make_resident; const(char)* function(GModule* modul) c_g_module_name; int function(GModule* modul, const(char)* symbolName, void** symbol) c_g_module_symbol; char* function(const(char)* directory, const(char)* moduleName) c_g_module_build_path; const(char)* function() c_g_module_error; GModule* function(const(char)* fileName, GModuleFlags flags) c_g_module_open; int function() c_g_module_supported; // glib.Base64 size_t function(char* inn, size_t len, char* output, int* state, uint* save) c_g_base64_decode_step; char* function(char* text, size_t* outLen) c_g_base64_decode_inplace; char* function(const(char)* text, size_t* outLen) c_g_base64_decode; char* function(char* data, size_t len) c_g_base64_encode; size_t function(int breakLines, char* output, int* state, int* save) c_g_base64_encode_close; size_t function(char* inn, size_t len, int breakLines, char* output, int* state, int* save) c_g_base64_encode_step; // glib.Idle uint function(GSourceFunc funct, void* data) c_g_idle_add; uint function(int priority, GSourceFunc funct, void* data, GDestroyNotify notify) c_g_idle_add_full; int function(void* data) c_g_idle_remove_by_data; GSource* function() c_g_idle_source_new; // glib.MemorySlice void* function(size_t blockSize) c_g_slice_alloc; void* function(size_t blockSize) c_g_slice_alloc0; void* function(size_t blockSize, void* memBlock) c_g_slice_copy; void function(size_t blockSize, void* memBlock) c_g_slice_free1; void function(size_t blockSize, void* memChain, size_t nextOffset) c_g_slice_free_chain_with_offset; long function(GSliceConfig ckey) c_g_slice_get_config; long* function(GSliceConfig ckey, long address, uint* nValues) c_g_slice_get_config_state; void function(GSliceConfig ckey, long value) c_g_slice_set_config; // glib.Spawn int function(char* workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, GPid* childPid, GError** err) c_g_spawn_async; int function(char* workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, GPid* childPid, int* standardInput, int* standardOutput, int* standardError, GError** err) c_g_spawn_async_with_pipes; int function(int exitStatus, GError** err) c_g_spawn_check_exit_status; void function(GPid pid) c_g_spawn_close_pid; int function(const(char)* commandLine, GError** err) c_g_spawn_command_line_async; int function(const(char)* commandLine, char** standardOutput, char** standardError, int* exitStatus, GError** err) c_g_spawn_command_line_sync; GQuark function() c_g_spawn_error_quark; GQuark function() c_g_spawn_exit_error_quark; int function(char* workingDirectory, char** argv, char** envp, GSpawnFlags flags, GSpawnChildSetupFunc childSetup, void* userData, char** standardOutput, char** standardError, int* exitStatus, GError** err) c_g_spawn_sync; // glib.Str int function(char c) c_g_ascii_digit_value; char* function(char* buffer, int bufLen, double d) c_g_ascii_dtostr; char* function(char* buffer, int bufLen, const(char)* format, double d) c_g_ascii_formatd; int function(const(char)* s1, const(char)* s2) c_g_ascii_strcasecmp; char* function(const(char)* str, ptrdiff_t len) c_g_ascii_strdown; int function(const(char)* s1, const(char)* s2, size_t n) c_g_ascii_strncasecmp; double function(const(char)* nptr, char** endptr) c_g_ascii_strtod; long function(const(char)* nptr, char** endptr, uint base) c_g_ascii_strtoll; ulong function(const(char)* nptr, char** endptr, uint base) c_g_ascii_strtoull; char* function(const(char)* str, ptrdiff_t len) c_g_ascii_strup; char function(char c) c_g_ascii_tolower; char function(char c) c_g_ascii_toupper; int function(char c) c_g_ascii_xdigit_value; int function(char* format, ... ) c_g_printf; size_t function(const(char)* format, void* args) c_g_printf_string_upper_bound; int function(char* str, gulong n, char* format, ... ) c_g_snprintf; int function(char* str, char* format, ... ) c_g_sprintf; char* function(char* dest, const(char)* src) c_g_stpcpy; int function(const(char)* str, const(char)* prefix) c_g_str_has_prefix; int function(const(char)* str, const(char)* suffix) c_g_str_has_suffix; int function(const(char)* str) c_g_str_is_ascii; int function(const(char)* searchTerm, const(char)* potentialHit, int acceptAlternates) c_g_str_match_string; char* function(const(char)* str, const(char)* fromLocale) c_g_str_to_ascii; char** function(const(char)* str, const(char)* translitLocale, char*** asciiAlternates) c_g_str_tokenize_and_fold; char* function(char* str, const(char)* validChars, char substitutor) c_g_strcanon; int function(const(char)* s1, const(char)* s2) c_g_strcasecmp; char* function(char* str) c_g_strchomp; char* function(char* str) c_g_strchug; int function(const(char)* str1, const(char)* str2) c_g_strcmp0; char* function(const(char)* source) c_g_strcompress; char* function(const(char)* string1, ... ) c_g_strconcat; char* function(char* str, const(char)* delimiters, char newDelimiter) c_g_strdelimit; char* function(char* str) c_g_strdown; char* function(const(char)* str) c_g_strdup; char* function(const(char)* format, ... ) c_g_strdup_printf; char* function(const(char)* format, void* args) c_g_strdup_vprintf; char** function(char** strArray) c_g_strdupv; const(char)* function(int errnum) c_g_strerror; char* function(const(char)* source, const(char)* exceptions) c_g_strescape; void function(char** strArray) c_g_strfreev; char* function(const(char)* separator, ... ) c_g_strjoin; char* function(const(char)* separator, char** strArray) c_g_strjoinv; size_t function(char* dest, const(char)* src, size_t destSize) c_g_strlcat; size_t function(char* dest, const(char)* src, size_t destSize) c_g_strlcpy; int function(const(char)* s1, const(char)* s2, uint n) c_g_strncasecmp; char* function(const(char)* str, size_t n) c_g_strndup; char* function(size_t length, char fillChar) c_g_strnfill; char* function(char* str) c_g_strreverse; char* function(const(char)* haystack, const(char)* needle) c_g_strrstr; char* function(const(char)* haystack, ptrdiff_t haystackLen, const(char)* needle) c_g_strrstr_len; const(char)* function(int signum) c_g_strsignal; char** function(const(char)* str, const(char)* delimiter, int maxTokens) c_g_strsplit; char** function(const(char)* str, const(char)* delimiters, int maxTokens) c_g_strsplit_set; char* function(const(char)* haystack, ptrdiff_t haystackLen, const(char)* needle) c_g_strstr_len; double function(const(char)* nptr, char** endptr) c_g_strtod; char* function(char* str) c_g_strup; GType function() c_g_strv_get_type; uint function(char** strArray) c_g_strv_length; int function(const(char)* strv, const(char)* str) c_g_strv_contains; int function(char** str, char* format, void* args) c_g_vasprintf; int function(char* format, void* args) c_g_vprintf; int function(char* str, gulong n, char* format, void* args) c_g_vsnprintf; int function(char* str, char* format, void* args) c_g_vsprintf; int function(FILE* file, char* format, ... ) c_g_fprintf; int function(FILE* file, char* format, void* args) c_g_vfprintf; int function(const(char)* str, uint base, long min, long max, long* outNum, GError** err) c_g_ascii_string_to_signed; int function(const(char)* str, uint base, ulong min, ulong max, ulong* outNum, GError** err) c_g_ascii_string_to_unsigned; // glib.Timeout uint function(uint interval, GSourceFunc funct, void* data) c_g_timeout_add; uint function(int priority, uint interval, GSourceFunc funct, void* data, GDestroyNotify notify) c_g_timeout_add_full; uint function(uint interval, GSourceFunc funct, void* data) c_g_timeout_add_seconds; uint function(int priority, uint interval, GSourceFunc funct, void* data, GDestroyNotify notify) c_g_timeout_add_seconds_full; GSource* function(uint interval) c_g_timeout_source_new; GSource* function(uint interval) c_g_timeout_source_new_seconds; // glib.Util char* function(char** args) c_g_build_filenamev; char* function(const(char)* separator, char** args) c_g_build_pathv; void function(GVoidFunc func) c_g_atexit; char* function(char* fileName) c_g_basename; int function(gulong mask, int nthBit) c_g_bit_nth_lsf; int function(gulong mask, int nthBit) c_g_bit_nth_msf; uint function(gulong number) c_g_bit_storage; char* function(char* separator, char* firstElement, ... ) c_g_build_path; const(char)* function(char** envp, const(char)* variable) c_g_environ_getenv; char** function(char** envp, const(char)* variable, const(char)* value, int overwrite) c_g_environ_setenv; char** function(char** envp, const(char)* variable) c_g_environ_unsetenv; char* function(char* program) c_g_find_program_in_path; char* function(ulong size) c_g_format_size; char* function(long size) c_g_format_size_for_display; char* function(ulong size, GFormatSizeFlags flags) c_g_format_size_full; const(char)* function() c_g_get_application_name; char** function() c_g_get_environ; char* function() c_g_get_current_dir; char* function() c_g_get_home_dir; const(char)* function() c_g_get_host_name; const(char)* function() c_g_get_prgname; char* function() c_g_get_real_name; char** function() c_g_get_system_config_dirs; char** function() c_g_get_system_data_dirs; char* function() c_g_get_tmp_dir; char* function() c_g_get_user_cache_dir; char* function() c_g_get_user_config_dir; char* function() c_g_get_user_data_dir; char* function() c_g_get_user_name; char* function() c_g_get_user_runtime_dir; char* function(GUserDirectory directory) c_g_get_user_special_dir; const(char)* function(const(char)* variable) c_g_getenv; char** function() c_g_listenv; void function(void** nullifyLocation) c_g_nullify_pointer; uint function(const(char)* str, GDebugKey* keys, uint nkeys) c_g_parse_debug_string; char* function(char* fileName) c_g_path_get_basename; char* function(char* fileName) c_g_path_get_dirname; int function(char* fileName) c_g_path_is_absolute; char* function(char* fileName) c_g_path_skip_root; void function(void* pbase, int totalElems, size_t size, GCompareDataFunc compareFunc, void* userData) c_g_qsort_with_data; void function() c_g_reload_user_special_dirs_cache; void function(const(char)* applicationName) c_g_set_application_name; void function(const(char)* prgname) c_g_set_prgname; int function(const(char)* variable, const(char)* value, int overwrite) c_g_setenv; uint function(uint num) c_g_spaced_primes_closest; void function(const(char)* variable) c_g_unsetenv; // glib.Atomic int function(int* atomic, int val) c_g_atomic_int_add; uint function(uint* atomic, uint val) c_g_atomic_int_and; int function(int* atomic, int oldval, int newval) c_g_atomic_int_compare_and_exchange; int function(int* atomic) c_g_atomic_int_dec_and_test; int function(int* atomic, int val) c_g_atomic_int_exchange_and_add; int function(int* atomic) c_g_atomic_int_get; void function(int* atomic) c_g_atomic_int_inc; uint function(uint* atomic, uint val) c_g_atomic_int_or; void function(int* atomic, int newval) c_g_atomic_int_set; uint function(uint* atomic, uint val) c_g_atomic_int_xor; ptrdiff_t function(void* atomic, ptrdiff_t val) c_g_atomic_pointer_add; size_t function(void* atomic, size_t val) c_g_atomic_pointer_and; int function(void* atomic, void* oldval, void* newval) c_g_atomic_pointer_compare_and_exchange; void* function(void* atomic) c_g_atomic_pointer_get; size_t function(void* atomic, size_t val) c_g_atomic_pointer_or; void function(void* atomic, void* newval) c_g_atomic_pointer_set; size_t function(void* atomic, size_t val) c_g_atomic_pointer_xor; // glib.CharacterSet char* function(const(char)* str, ptrdiff_t len, const(char)* toCodeset, const(char)* fromCodeset, size_t* bytesRead, size_t* bytesWritten, GError** err) c_g_convert; GQuark function() c_g_convert_error_quark; char* function(const(char)* str, ptrdiff_t len, const(char)* toCodeset, const(char)* fromCodeset, const(char)* fallback, size_t* bytesRead, size_t* bytesWritten, GError** err) c_g_convert_with_fallback; char* function(const(char)* str, ptrdiff_t len, GIConv converter, size_t* bytesRead, size_t* bytesWritten, GError** err) c_g_convert_with_iconv; char* function(char* filename) c_g_filename_display_basename; char* function(char* filename) c_g_filename_display_name; char* function(const(char)* utf8string, ptrdiff_t len, size_t* bytesRead, size_t* bytesWritten, GError** err) c_g_filename_from_utf8; char* function(char* opsysstring, ptrdiff_t len, size_t* bytesRead, size_t* bytesWritten, GError** err) c_g_filename_to_utf8; int function(char** charset) c_g_get_charset; char* function() c_g_get_codeset; int function(char*** charsets) c_g_get_filename_charsets; char* function(const(char)* utf8string, ptrdiff_t len, size_t* bytesRead, size_t* bytesWritten, GError** err) c_g_locale_from_utf8; char* function(const(char)* opsysstring, ptrdiff_t len, size_t* bytesRead, size_t* bytesWritten, GError** err) c_g_locale_to_utf8; // glib.Child uint function(GPid pid, GChildWatchFunc funct, void* data) c_g_child_watch_add; uint function(int priority, GPid pid, GChildWatchFunc funct, void* data, GDestroyNotify notify) c_g_child_watch_add_full; GSource* function(GPid pid) c_g_child_watch_source_new; // glib.DataList void function(GData** datalist) c_g_datalist_clear; void function(GData** datalist, GDataForeachFunc func, void* userData) c_g_datalist_foreach; void* function(GData** datalist, const(char)* key) c_g_datalist_get_data; uint function(GData** datalist) c_g_datalist_get_flags; void* function(GData** datalist, GQuark keyId, GDuplicateFunc dupFunc, void* userData) c_g_datalist_id_dup_data; void* function(GData** datalist, GQuark keyId) c_g_datalist_id_get_data; void* function(GData** datalist, GQuark keyId) c_g_datalist_id_remove_no_notify; int function(GData** datalist, GQuark keyId, void* oldval, void* newval, GDestroyNotify destroy, GDestroyNotify* oldDestroy) c_g_datalist_id_replace_data; void function(GData** datalist, GQuark keyId, void* data, GDestroyNotify destroyFunc) c_g_datalist_id_set_data_full; void function(GData** datalist) c_g_datalist_init; void function(GData** datalist, uint flags) c_g_datalist_set_flags; void function(GData** datalist, uint flags) c_g_datalist_unset_flags; // glib.DataSet void function(void* datasetLocation) c_g_dataset_destroy; void function(void* datasetLocation, GDataForeachFunc func, void* userData) c_g_dataset_foreach; void* function(void* datasetLocation, GQuark keyId) c_g_dataset_id_get_data; void* function(void* datasetLocation, GQuark keyId) c_g_dataset_id_remove_no_notify; void function(void* datasetLocation, GQuark keyId, void* data, GDestroyNotify destroyFunc) c_g_dataset_id_set_data_full; // glib.FileUtils int function(char* filename, int mode) c_g_access; int function(char* path) c_g_chdir; int function(int fd, GError** err) c_g_close; GFileError function(int errNo) c_g_file_error_from_errno; GQuark function() c_g_file_error_quark; int function(char* filename, char** contents, size_t* length, GError** err) c_g_file_get_contents; int function(char* tmpl, char** nameUsed, GError** err) c_g_file_open_tmp; char* function(char* filename, GError** err) c_g_file_read_link; int function(char* filename, char* contents, ptrdiff_t length, GError** err) c_g_file_set_contents; int function(char* filename, GFileTest test) c_g_file_test; int function(char* pathname, int mode) c_g_mkdir_with_parents; char* function(char* tmpl) c_g_mkdtemp; char* function(char* tmpl, int mode) c_g_mkdtemp_full; int function(char* tmpl) c_g_mkstemp; int function(char* tmpl, int flags, int mode) c_g_mkstemp_full; int function(char* filename) c_g_rmdir; int function(char* filename) c_g_unlink; // glib.Hostname int function(const(char)* hostname) c_g_hostname_is_ascii_encoded; int function(const(char)* hostname) c_g_hostname_is_ip_address; int function(const(char)* hostname) c_g_hostname_is_non_ascii; char* function(const(char)* hostname) c_g_hostname_to_ascii; char* function(const(char)* hostname) c_g_hostname_to_unicode; // glib.Internationalization const(char)* function(const(char)* domain, const(char)* msgid, int category) c_g_dcgettext; const(char)* function(const(char)* domain, const(char)* msgid) c_g_dgettext; const(char)* function(const(char)* domain, const(char)* msgid, const(char)* msgidPlural, gulong n) c_g_dngettext; const(char)* function(const(char)* domain, const(char)* msgctxtid, size_t msgidoffset) c_g_dpgettext; const(char)* function(const(char)* domain, const(char)* context, const(char)* msgid) c_g_dpgettext2; char** function() c_g_get_language_names; char** function(const(char)* locale) c_g_get_locale_variants; const(char)* function(const(char)* msgid, const(char)* msgval) c_g_strip_context; // glib.Memory void function(void** pp, GDestroyNotify destroy) c_g_clear_pointer; void function(void* mem) c_g_free; void* function(size_t nBytes) c_g_malloc; void* function(size_t nBytes) c_g_malloc0; void* function(size_t nBlocks, size_t nBlockBytes) c_g_malloc0_n; void* function(size_t nBlocks, size_t nBlockBytes) c_g_malloc_n; int function() c_g_mem_is_system_malloc; void function() c_g_mem_profile; void function(GMemVTable* vtable) c_g_mem_set_vtable; void* function(void* mem, uint byteSize) c_g_memdup; void* function(void* mem, size_t nBytes) c_g_realloc; void* function(void* mem, size_t nBlocks, size_t nBlockBytes) c_g_realloc_n; void* function(size_t nBytes) c_g_try_malloc; void* function(size_t nBytes) c_g_try_malloc0; void* function(size_t nBlocks, size_t nBlockBytes) c_g_try_malloc0_n; void* function(size_t nBlocks, size_t nBlockBytes) c_g_try_malloc_n; void* function(void* mem, size_t nBytes) c_g_try_realloc; void* function(void* mem, size_t nBlocks, size_t nBlockBytes) c_g_try_realloc_n; // glib.MessageLog void function(const(char)* logDomain, GLogLevelFlags logLevel, const(char)* format, ... ) c_g_log; void function(const(char)* logDomain, GLogLevelFlags logLevel, const(char)* message, void* unusedData) c_g_log_default_handler; void function(const(char)* logDomain, uint handlerId) c_g_log_remove_handler; GLogLevelFlags function(GLogLevelFlags fatalMask) c_g_log_set_always_fatal; GLogFunc function(GLogFunc logFunc, void* userData) c_g_log_set_default_handler; GLogLevelFlags function(const(char)* logDomain, GLogLevelFlags fatalMask) c_g_log_set_fatal_mask; uint function(const(char)* logDomain, GLogLevelFlags logLevels, GLogFunc logFunc, void* userData) c_g_log_set_handler; uint function(const(char)* logDomain, GLogLevelFlags logLevels, GLogFunc logFunc, void* userData, GDestroyNotify destroy) c_g_log_set_handler_full; void function(const(char)* logDomain, GLogLevelFlags logLevel, const(char)* format, void* args) c_g_logv; // glib.Messages void function(const(char)* prgName) c_g_on_error_query; void function(const(char)* prgName) c_g_on_error_stack_trace; void function(const(char)* format, ... ) c_g_print; void function(const(char)* format, ... ) c_g_printerr; GPrintFunc function(GPrintFunc func) c_g_set_print_handler; GPrintFunc function(GPrintFunc func) c_g_set_printerr_handler; // glib.Quark const(char)* function(const(char)* str) c_g_intern_static_string; const(char)* function(const(char)* str) c_g_intern_string; GQuark function(const(char)* str) c_g_quark_from_static_string; GQuark function(const(char)* str) c_g_quark_from_string; const(char)* function(GQuark quark) c_g_quark_to_string; GQuark function(const(char)* str) c_g_quark_try_string; // glib.ShellUtils GQuark function() c_g_shell_error_quark; int function(const(char)* commandLine, int* argcp, char*** argvp, GError** err) c_g_shell_parse_argv; char* function(const(char)* unquotedString) c_g_shell_quote; char* function(const(char)* quotedString, GError** err) c_g_shell_unquote; // glib.Unicode wchar* function(dchar* str, glong len, glong* itemsRead, glong* itemsWritten, GError** err) c_g_ucs4_to_utf16; char* function(dchar* str, glong len, glong* itemsRead, glong* itemsWritten, GError** err) c_g_ucs4_to_utf8; GUnicodeBreakType function(dchar c) c_g_unichar_break_type; int function(dchar uc) c_g_unichar_combining_class; int function(dchar a, dchar b, dchar* ch) c_g_unichar_compose; int function(dchar ch, dchar* a, dchar* b) c_g_unichar_decompose; int function(dchar c) c_g_unichar_digit_value; size_t function(dchar ch, int compat, dchar* result, size_t resultLen) c_g_unichar_fully_decompose; int function(dchar ch, dchar* mirroredCh) c_g_unichar_get_mirror_char; GUnicodeScript function(dchar ch) c_g_unichar_get_script; int function(dchar c) c_g_unichar_isalnum; int function(dchar c) c_g_unichar_isalpha; int function(dchar c) c_g_unichar_iscntrl; int function(dchar c) c_g_unichar_isdefined; int function(dchar c) c_g_unichar_isdigit; int function(dchar c) c_g_unichar_isgraph; int function(dchar c) c_g_unichar_islower; int function(dchar c) c_g_unichar_ismark; int function(dchar c) c_g_unichar_isprint; int function(dchar c) c_g_unichar_ispunct; int function(dchar c) c_g_unichar_isspace; int function(dchar c) c_g_unichar_istitle; int function(dchar c) c_g_unichar_isupper; int function(dchar c) c_g_unichar_iswide; int function(dchar c) c_g_unichar_iswide_cjk; int function(dchar c) c_g_unichar_isxdigit; int function(dchar c) c_g_unichar_iszerowidth; int function(dchar c, char* outbuf) c_g_unichar_to_utf8; dchar function(dchar c) c_g_unichar_tolower; dchar function(dchar c) c_g_unichar_totitle; dchar function(dchar c) c_g_unichar_toupper; GUnicodeType function(dchar c) c_g_unichar_type; int function(dchar ch) c_g_unichar_validate; int function(dchar c) c_g_unichar_xdigit_value; dchar* function(dchar ch, size_t* resultLen) c_g_unicode_canonical_decomposition; void function(dchar* str, size_t len) c_g_unicode_canonical_ordering; GUnicodeScript function(uint iso15924) c_g_unicode_script_from_iso15924; uint function(GUnicodeScript script) c_g_unicode_script_to_iso15924; dchar* function(wchar* str, glong len, glong* itemsRead, glong* itemsWritten, GError** err) c_g_utf16_to_ucs4; char* function(wchar* str, glong len, glong* itemsRead, glong* itemsWritten, GError** err) c_g_utf16_to_utf8; char* function(const(char)* str, ptrdiff_t len) c_g_utf8_casefold; int function(const(char)* str1, const(char)* str2) c_g_utf8_collate; char* function(const(char)* str, ptrdiff_t len) c_g_utf8_collate_key; char* function(const(char)* str, ptrdiff_t len) c_g_utf8_collate_key_for_filename; char* function(const(char)* p, const(char)* end) c_g_utf8_find_next_char; char* function(const(char)* str, const(char)* p) c_g_utf8_find_prev_char; dchar function(const(char)* p) c_g_utf8_get_char; dchar function(const(char)* p, ptrdiff_t maxLen) c_g_utf8_get_char_validated; char* function(const(char)* str, ptrdiff_t len, GNormalizeMode mode) c_g_utf8_normalize; char* function(const(char)* str, glong offset) c_g_utf8_offset_to_pointer; glong function(const(char)* str, const(char)* pos) c_g_utf8_pointer_to_offset; char* function(const(char)* p) c_g_utf8_prev_char; char* function(const(char)* p, ptrdiff_t len, dchar c) c_g_utf8_strchr; char* function(const(char)* str, ptrdiff_t len) c_g_utf8_strdown; glong function(const(char)* p, ptrdiff_t max) c_g_utf8_strlen; char* function(char* dest, const(char)* src, size_t n) c_g_utf8_strncpy; char* function(const(char)* p, ptrdiff_t len, dchar c) c_g_utf8_strrchr; char* function(const(char)* str, ptrdiff_t len) c_g_utf8_strreverse; char* function(const(char)* str, ptrdiff_t len) c_g_utf8_strup; char* function(const(char)* str, glong startPos, glong endPos) c_g_utf8_substring; dchar* function(const(char)* str, glong len, glong* itemsRead, glong* itemsWritten, GError** err) c_g_utf8_to_ucs4; dchar* function(const(char)* str, glong len, glong* itemsWritten) c_g_utf8_to_ucs4_fast; wchar* function(const(char)* str, glong len, glong* itemsRead, glong* itemsWritten, GError** err) c_g_utf8_to_utf16; int function(char* str, ptrdiff_t maxLen, char** end) c_g_utf8_validate; char* function(const(char)* str, ptrdiff_t len) c_g_utf8_make_valid; // glib.UnixUtils GQuark function() c_g_unix_error_quark; uint function(int fd, GIOCondition condition, GUnixFDSourceFunc funct, void* userData) c_g_unix_fd_add; uint function(int priority, int fd, GIOCondition condition, GUnixFDSourceFunc funct, void* userData, GDestroyNotify notify) c_g_unix_fd_add_full; GSource* function(int fd, GIOCondition condition) c_g_unix_fd_source_new; int function(int* fds, int flags, GError** err) c_g_unix_open_pipe; int function(int fd, int nonblock, GError** err) c_g_unix_set_fd_nonblocking; uint function(int signum, GSourceFunc handler, void* userData) c_g_unix_signal_add; uint function(int priority, int signum, GSourceFunc handler, void* userData, GDestroyNotify notify) c_g_unix_signal_add_full; GSource* function(int signum) c_g_unix_signal_source_new; // glib.URI char* function(const(char)* uri, char** hostname, GError** err) c_g_filename_from_uri; char* function(char* filename, const(char)* hostname, GError** err) c_g_filename_to_uri; char* function(const(char)* unescaped, const(char)* reservedCharsAllowed, int allowUtf8) c_g_uri_escape_string; char** function(const(char)* uriList) c_g_uri_list_extract_uris; char* function(const(char)* uri) c_g_uri_parse_scheme; char* function(const(char)* escapedString, const(char)* escapedStringEnd, const(char)* illegalCharacters) c_g_uri_unescape_segment; char* function(const(char)* escapedString, const(char)* illegalCharacters) c_g_uri_unescape_string; // glib.Uuid int function(const(char)* str) c_g_uuid_string_is_valid; char* function() c_g_uuid_string_random; // glib.Version const(char)* function(uint requiredMajor, uint requiredMinor, uint requiredMicro) c_glib_check_version; } // glib.ArrayG alias c_g_array_append_vals g_array_append_vals; alias c_g_array_free g_array_free; alias c_g_array_get_element_size g_array_get_element_size; alias c_g_array_insert_vals g_array_insert_vals; alias c_g_array_new g_array_new; alias c_g_array_prepend_vals g_array_prepend_vals; alias c_g_array_ref g_array_ref; alias c_g_array_remove_index g_array_remove_index; alias c_g_array_remove_index_fast g_array_remove_index_fast; alias c_g_array_remove_range g_array_remove_range; alias c_g_array_set_clear_func g_array_set_clear_func; alias c_g_array_set_size g_array_set_size; alias c_g_array_sized_new g_array_sized_new; alias c_g_array_sort g_array_sort; alias c_g_array_sort_with_data g_array_sort_with_data; alias c_g_array_unref g_array_unref; // glib.AsyncQueue alias c_g_async_queue_length g_async_queue_length; alias c_g_async_queue_length_unlocked g_async_queue_length_unlocked; alias c_g_async_queue_lock g_async_queue_lock; alias c_g_async_queue_pop g_async_queue_pop; alias c_g_async_queue_pop_unlocked g_async_queue_pop_unlocked; alias c_g_async_queue_push g_async_queue_push; alias c_g_async_queue_push_front g_async_queue_push_front; alias c_g_async_queue_push_front_unlocked g_async_queue_push_front_unlocked; alias c_g_async_queue_push_sorted g_async_queue_push_sorted; alias c_g_async_queue_push_sorted_unlocked g_async_queue_push_sorted_unlocked; alias c_g_async_queue_push_unlocked g_async_queue_push_unlocked; alias c_g_async_queue_ref g_async_queue_ref; alias c_g_async_queue_ref_unlocked g_async_queue_ref_unlocked; alias c_g_async_queue_remove g_async_queue_remove; alias c_g_async_queue_remove_unlocked g_async_queue_remove_unlocked; alias c_g_async_queue_sort g_async_queue_sort; alias c_g_async_queue_sort_unlocked g_async_queue_sort_unlocked; alias c_g_async_queue_timed_pop g_async_queue_timed_pop; alias c_g_async_queue_timed_pop_unlocked g_async_queue_timed_pop_unlocked; alias c_g_async_queue_timeout_pop g_async_queue_timeout_pop; alias c_g_async_queue_timeout_pop_unlocked g_async_queue_timeout_pop_unlocked; alias c_g_async_queue_try_pop g_async_queue_try_pop; alias c_g_async_queue_try_pop_unlocked g_async_queue_try_pop_unlocked; alias c_g_async_queue_unlock g_async_queue_unlock; alias c_g_async_queue_unref g_async_queue_unref; alias c_g_async_queue_unref_and_unlock g_async_queue_unref_and_unlock; alias c_g_async_queue_new g_async_queue_new; alias c_g_async_queue_new_full g_async_queue_new_full; // glib.BookmarkFile alias c_g_bookmark_file_add_application g_bookmark_file_add_application; alias c_g_bookmark_file_add_group g_bookmark_file_add_group; alias c_g_bookmark_file_free g_bookmark_file_free; alias c_g_bookmark_file_get_added g_bookmark_file_get_added; alias c_g_bookmark_file_get_app_info g_bookmark_file_get_app_info; alias c_g_bookmark_file_get_applications g_bookmark_file_get_applications; alias c_g_bookmark_file_get_description g_bookmark_file_get_description; alias c_g_bookmark_file_get_groups g_bookmark_file_get_groups; alias c_g_bookmark_file_get_icon g_bookmark_file_get_icon; alias c_g_bookmark_file_get_is_private g_bookmark_file_get_is_private; alias c_g_bookmark_file_get_mime_type g_bookmark_file_get_mime_type; alias c_g_bookmark_file_get_modified g_bookmark_file_get_modified; alias c_g_bookmark_file_get_size g_bookmark_file_get_size; alias c_g_bookmark_file_get_title g_bookmark_file_get_title; alias c_g_bookmark_file_get_uris g_bookmark_file_get_uris; alias c_g_bookmark_file_get_visited g_bookmark_file_get_visited; alias c_g_bookmark_file_has_application g_bookmark_file_has_application; alias c_g_bookmark_file_has_group g_bookmark_file_has_group; alias c_g_bookmark_file_has_item g_bookmark_file_has_item; alias c_g_bookmark_file_load_from_data g_bookmark_file_load_from_data; alias c_g_bookmark_file_load_from_data_dirs g_bookmark_file_load_from_data_dirs; alias c_g_bookmark_file_load_from_file g_bookmark_file_load_from_file; alias c_g_bookmark_file_move_item g_bookmark_file_move_item; alias c_g_bookmark_file_remove_application g_bookmark_file_remove_application; alias c_g_bookmark_file_remove_group g_bookmark_file_remove_group; alias c_g_bookmark_file_remove_item g_bookmark_file_remove_item; alias c_g_bookmark_file_set_added g_bookmark_file_set_added; alias c_g_bookmark_file_set_app_info g_bookmark_file_set_app_info; alias c_g_bookmark_file_set_description g_bookmark_file_set_description; alias c_g_bookmark_file_set_groups g_bookmark_file_set_groups; alias c_g_bookmark_file_set_icon g_bookmark_file_set_icon; alias c_g_bookmark_file_set_is_private g_bookmark_file_set_is_private; alias c_g_bookmark_file_set_mime_type g_bookmark_file_set_mime_type; alias c_g_bookmark_file_set_modified g_bookmark_file_set_modified; alias c_g_bookmark_file_set_title g_bookmark_file_set_title; alias c_g_bookmark_file_set_visited g_bookmark_file_set_visited; alias c_g_bookmark_file_to_data g_bookmark_file_to_data; alias c_g_bookmark_file_to_file g_bookmark_file_to_file; alias c_g_bookmark_file_error_quark g_bookmark_file_error_quark; alias c_g_bookmark_file_new g_bookmark_file_new; // glib.ByteArray alias c_g_byte_array_append g_byte_array_append; alias c_g_byte_array_free g_byte_array_free; alias c_g_byte_array_free_to_bytes g_byte_array_free_to_bytes; alias c_g_byte_array_new g_byte_array_new; alias c_g_byte_array_new_take g_byte_array_new_take; alias c_g_byte_array_prepend g_byte_array_prepend; alias c_g_byte_array_ref g_byte_array_ref; alias c_g_byte_array_remove_index g_byte_array_remove_index; alias c_g_byte_array_remove_index_fast g_byte_array_remove_index_fast; alias c_g_byte_array_remove_range g_byte_array_remove_range; alias c_g_byte_array_set_size g_byte_array_set_size; alias c_g_byte_array_sized_new g_byte_array_sized_new; alias c_g_byte_array_sort g_byte_array_sort; alias c_g_byte_array_sort_with_data g_byte_array_sort_with_data; alias c_g_byte_array_unref g_byte_array_unref; // glib.Bytes alias c_g_bytes_new g_bytes_new; alias c_g_bytes_new_static g_bytes_new_static; alias c_g_bytes_new_take g_bytes_new_take; alias c_g_bytes_new_with_free_func g_bytes_new_with_free_func; alias c_g_bytes_compare g_bytes_compare; alias c_g_bytes_equal g_bytes_equal; alias c_g_bytes_get_data g_bytes_get_data; alias c_g_bytes_get_size g_bytes_get_size; alias c_g_bytes_hash g_bytes_hash; alias c_g_bytes_new_from_bytes g_bytes_new_from_bytes; alias c_g_bytes_ref g_bytes_ref; alias c_g_bytes_unref g_bytes_unref; alias c_g_bytes_unref_to_array g_bytes_unref_to_array; alias c_g_bytes_unref_to_data g_bytes_unref_to_data; // glib.Checksum alias c_g_checksum_new g_checksum_new; alias c_g_checksum_copy g_checksum_copy; alias c_g_checksum_free g_checksum_free; alias c_g_checksum_get_digest g_checksum_get_digest; alias c_g_checksum_get_string g_checksum_get_string; alias c_g_checksum_reset g_checksum_reset; alias c_g_checksum_update g_checksum_update; alias c_g_checksum_type_get_length g_checksum_type_get_length; alias c_g_compute_checksum_for_bytes g_compute_checksum_for_bytes; alias c_g_compute_checksum_for_data g_compute_checksum_for_data; alias c_g_compute_checksum_for_string g_compute_checksum_for_string; // glib.Cond alias c_g_cond_broadcast g_cond_broadcast; alias c_g_cond_clear g_cond_clear; alias c_g_cond_init g_cond_init; alias c_g_cond_signal g_cond_signal; alias c_g_cond_wait g_cond_wait; alias c_g_cond_wait_until g_cond_wait_until; // glib.Date alias c_g_date_new g_date_new; alias c_g_date_new_dmy g_date_new_dmy; alias c_g_date_new_julian g_date_new_julian; alias c_g_date_add_days g_date_add_days; alias c_g_date_add_months g_date_add_months; alias c_g_date_add_years g_date_add_years; alias c_g_date_clamp g_date_clamp; alias c_g_date_clear g_date_clear; alias c_g_date_compare g_date_compare; alias c_g_date_days_between g_date_days_between; alias c_g_date_free g_date_free; alias c_g_date_get_day g_date_get_day; alias c_g_date_get_day_of_year g_date_get_day_of_year; alias c_g_date_get_iso8601_week_of_year g_date_get_iso8601_week_of_year; alias c_g_date_get_julian g_date_get_julian; alias c_g_date_get_monday_week_of_year g_date_get_monday_week_of_year; alias c_g_date_get_month g_date_get_month; alias c_g_date_get_sunday_week_of_year g_date_get_sunday_week_of_year; alias c_g_date_get_weekday g_date_get_weekday; alias c_g_date_get_year g_date_get_year; alias c_g_date_is_first_of_month g_date_is_first_of_month; alias c_g_date_is_last_of_month g_date_is_last_of_month; alias c_g_date_order g_date_order; alias c_g_date_set_day g_date_set_day; alias c_g_date_set_dmy g_date_set_dmy; alias c_g_date_set_julian g_date_set_julian; alias c_g_date_set_month g_date_set_month; alias c_g_date_set_parse g_date_set_parse; alias c_g_date_set_time g_date_set_time; alias c_g_date_set_time_t g_date_set_time_t; alias c_g_date_set_time_val g_date_set_time_val; alias c_g_date_set_year g_date_set_year; alias c_g_date_subtract_days g_date_subtract_days; alias c_g_date_subtract_months g_date_subtract_months; alias c_g_date_subtract_years g_date_subtract_years; alias c_g_date_to_struct_tm g_date_to_struct_tm; alias c_g_date_valid g_date_valid; alias c_g_date_get_days_in_month g_date_get_days_in_month; alias c_g_date_get_monday_weeks_in_year g_date_get_monday_weeks_in_year; alias c_g_date_get_sunday_weeks_in_year g_date_get_sunday_weeks_in_year; alias c_g_date_is_leap_year g_date_is_leap_year; alias c_g_date_strftime g_date_strftime; alias c_g_date_valid_day g_date_valid_day; alias c_g_date_valid_dmy g_date_valid_dmy; alias c_g_date_valid_julian g_date_valid_julian; alias c_g_date_valid_month g_date_valid_month; alias c_g_date_valid_weekday g_date_valid_weekday; alias c_g_date_valid_year g_date_valid_year; // glib.DateTime alias c_g_date_time_new g_date_time_new; alias c_g_date_time_new_from_timeval_local g_date_time_new_from_timeval_local; alias c_g_date_time_new_from_timeval_utc g_date_time_new_from_timeval_utc; alias c_g_date_time_new_from_unix_local g_date_time_new_from_unix_local; alias c_g_date_time_new_from_unix_utc g_date_time_new_from_unix_utc; alias c_g_date_time_new_local g_date_time_new_local; alias c_g_date_time_new_now g_date_time_new_now; alias c_g_date_time_new_now_local g_date_time_new_now_local; alias c_g_date_time_new_now_utc g_date_time_new_now_utc; alias c_g_date_time_new_utc g_date_time_new_utc; alias c_g_date_time_add g_date_time_add; alias c_g_date_time_add_days g_date_time_add_days; alias c_g_date_time_add_full g_date_time_add_full; alias c_g_date_time_add_hours g_date_time_add_hours; alias c_g_date_time_add_minutes g_date_time_add_minutes; alias c_g_date_time_add_months g_date_time_add_months; alias c_g_date_time_add_seconds g_date_time_add_seconds; alias c_g_date_time_add_weeks g_date_time_add_weeks; alias c_g_date_time_add_years g_date_time_add_years; alias c_g_date_time_difference g_date_time_difference; alias c_g_date_time_format g_date_time_format; alias c_g_date_time_get_day_of_month g_date_time_get_day_of_month; alias c_g_date_time_get_day_of_week g_date_time_get_day_of_week; alias c_g_date_time_get_day_of_year g_date_time_get_day_of_year; alias c_g_date_time_get_hour g_date_time_get_hour; alias c_g_date_time_get_microsecond g_date_time_get_microsecond; alias c_g_date_time_get_minute g_date_time_get_minute; alias c_g_date_time_get_month g_date_time_get_month; alias c_g_date_time_get_second g_date_time_get_second; alias c_g_date_time_get_seconds g_date_time_get_seconds; alias c_g_date_time_get_timezone_abbreviation g_date_time_get_timezone_abbreviation; alias c_g_date_time_get_utc_offset g_date_time_get_utc_offset; alias c_g_date_time_get_week_numbering_year g_date_time_get_week_numbering_year; alias c_g_date_time_get_week_of_year g_date_time_get_week_of_year; alias c_g_date_time_get_year g_date_time_get_year; alias c_g_date_time_get_ymd g_date_time_get_ymd; alias c_g_date_time_is_daylight_savings g_date_time_is_daylight_savings; alias c_g_date_time_ref g_date_time_ref; alias c_g_date_time_to_local g_date_time_to_local; alias c_g_date_time_to_timeval g_date_time_to_timeval; alias c_g_date_time_to_timezone g_date_time_to_timezone; alias c_g_date_time_to_unix g_date_time_to_unix; alias c_g_date_time_to_utc g_date_time_to_utc; alias c_g_date_time_unref g_date_time_unref; alias c_g_date_time_compare g_date_time_compare; alias c_g_date_time_equal g_date_time_equal; alias c_g_date_time_hash g_date_time_hash; // glib.Directory alias c_g_dir_close g_dir_close; alias c_g_dir_read_name g_dir_read_name; alias c_g_dir_rewind g_dir_rewind; alias c_g_dir_make_tmp g_dir_make_tmp; alias c_g_dir_open g_dir_open; // glib.ErrorG alias c_g_error_new g_error_new; alias c_g_error_new_literal g_error_new_literal; alias c_g_error_new_valist g_error_new_valist; alias c_g_error_copy g_error_copy; alias c_g_error_free g_error_free; alias c_g_error_matches g_error_matches; alias c_g_propagate_error g_propagate_error; alias c_g_set_error_literal g_set_error_literal; alias c_g_prefix_error g_prefix_error; alias c_g_propagate_prefixed_error g_propagate_prefixed_error; alias c_g_set_error g_set_error; // glib.HashTable alias c_g_hash_table_add g_hash_table_add; alias c_g_hash_table_contains g_hash_table_contains; alias c_g_hash_table_destroy g_hash_table_destroy; alias c_g_hash_table_find g_hash_table_find; alias c_g_hash_table_foreach g_hash_table_foreach; alias c_g_hash_table_foreach_remove g_hash_table_foreach_remove; alias c_g_hash_table_foreach_steal g_hash_table_foreach_steal; alias c_g_hash_table_get_keys g_hash_table_get_keys; alias c_g_hash_table_get_keys_as_array g_hash_table_get_keys_as_array; alias c_g_hash_table_get_values g_hash_table_get_values; alias c_g_hash_table_insert g_hash_table_insert; alias c_g_hash_table_lookup g_hash_table_lookup; alias c_g_hash_table_lookup_extended g_hash_table_lookup_extended; alias c_g_hash_table_new g_hash_table_new; alias c_g_hash_table_new_full g_hash_table_new_full; alias c_g_hash_table_ref g_hash_table_ref; alias c_g_hash_table_remove g_hash_table_remove; alias c_g_hash_table_remove_all g_hash_table_remove_all; alias c_g_hash_table_replace g_hash_table_replace; alias c_g_hash_table_size g_hash_table_size; alias c_g_hash_table_steal g_hash_table_steal; alias c_g_hash_table_steal_all g_hash_table_steal_all; alias c_g_hash_table_unref g_hash_table_unref; alias c_g_direct_equal g_direct_equal; alias c_g_direct_hash g_direct_hash; alias c_g_double_equal g_double_equal; alias c_g_double_hash g_double_hash; alias c_g_int64_equal g_int64_equal; alias c_g_int64_hash g_int64_hash; alias c_g_int_equal g_int_equal; alias c_g_int_hash g_int_hash; alias c_g_str_equal g_str_equal; alias c_g_str_hash g_str_hash; // glib.HashTableIter alias c_g_hash_table_iter_get_hash_table g_hash_table_iter_get_hash_table; alias c_g_hash_table_iter_init g_hash_table_iter_init; alias c_g_hash_table_iter_next g_hash_table_iter_next; alias c_g_hash_table_iter_remove g_hash_table_iter_remove; alias c_g_hash_table_iter_replace g_hash_table_iter_replace; alias c_g_hash_table_iter_steal g_hash_table_iter_steal; // glib.Hmac alias c_g_hmac_copy g_hmac_copy; alias c_g_hmac_get_digest g_hmac_get_digest; alias c_g_hmac_get_string g_hmac_get_string; alias c_g_hmac_ref g_hmac_ref; alias c_g_hmac_unref g_hmac_unref; alias c_g_hmac_update g_hmac_update; alias c_g_hmac_new g_hmac_new; alias c_g_compute_hmac_for_data g_compute_hmac_for_data; alias c_g_compute_hmac_for_string g_compute_hmac_for_string; alias c_g_compute_hmac_for_bytes g_compute_hmac_for_bytes; // glib.Hook alias c_g_hook_compare_ids g_hook_compare_ids; alias c_g_hook_alloc g_hook_alloc; alias c_g_hook_destroy g_hook_destroy; alias c_g_hook_destroy_link g_hook_destroy_link; alias c_g_hook_find g_hook_find; alias c_g_hook_find_data g_hook_find_data; alias c_g_hook_find_func g_hook_find_func; alias c_g_hook_find_func_data g_hook_find_func_data; alias c_g_hook_first_valid g_hook_first_valid; alias c_g_hook_free g_hook_free; alias c_g_hook_get g_hook_get; alias c_g_hook_insert_before g_hook_insert_before; alias c_g_hook_insert_sorted g_hook_insert_sorted; alias c_g_hook_next_valid g_hook_next_valid; alias c_g_hook_prepend g_hook_prepend; alias c_g_hook_ref g_hook_ref; alias c_g_hook_unref g_hook_unref; // glib.HookList alias c_g_hook_list_clear g_hook_list_clear; alias c_g_hook_list_init g_hook_list_init; alias c_g_hook_list_invoke g_hook_list_invoke; alias c_g_hook_list_invoke_check g_hook_list_invoke_check; alias c_g_hook_list_marshal g_hook_list_marshal; alias c_g_hook_list_marshal_check g_hook_list_marshal_check; // glib.IConv alias c_g_iconv g_iconv; alias c_g_iconv_close g_iconv_close; alias c_g_iconv_open g_iconv_open; // glib.IOChannel alias c_g_io_channel_new_file g_io_channel_new_file; alias c_g_io_channel_unix_new g_io_channel_unix_new; alias c_g_io_channel_close g_io_channel_close; alias c_g_io_channel_flush g_io_channel_flush; alias c_g_io_channel_get_buffer_condition g_io_channel_get_buffer_condition; alias c_g_io_channel_get_buffer_size g_io_channel_get_buffer_size; alias c_g_io_channel_get_buffered g_io_channel_get_buffered; alias c_g_io_channel_get_close_on_unref g_io_channel_get_close_on_unref; alias c_g_io_channel_get_encoding g_io_channel_get_encoding; alias c_g_io_channel_get_flags g_io_channel_get_flags; alias c_g_io_channel_get_line_term g_io_channel_get_line_term; alias c_g_io_channel_init g_io_channel_init; alias c_g_io_channel_read g_io_channel_read; alias c_g_io_channel_read_chars g_io_channel_read_chars; alias c_g_io_channel_read_line g_io_channel_read_line; alias c_g_io_channel_read_line_string g_io_channel_read_line_string; alias c_g_io_channel_read_to_end g_io_channel_read_to_end; alias c_g_io_channel_read_unichar g_io_channel_read_unichar; alias c_g_io_channel_ref g_io_channel_ref; alias c_g_io_channel_seek g_io_channel_seek; alias c_g_io_channel_seek_position g_io_channel_seek_position; alias c_g_io_channel_set_buffer_size g_io_channel_set_buffer_size; alias c_g_io_channel_set_buffered g_io_channel_set_buffered; alias c_g_io_channel_set_close_on_unref g_io_channel_set_close_on_unref; alias c_g_io_channel_set_encoding g_io_channel_set_encoding; alias c_g_io_channel_set_flags g_io_channel_set_flags; alias c_g_io_channel_set_line_term g_io_channel_set_line_term; alias c_g_io_channel_shutdown g_io_channel_shutdown; alias c_g_io_channel_unix_get_fd g_io_channel_unix_get_fd; alias c_g_io_channel_unref g_io_channel_unref; alias c_g_io_channel_write g_io_channel_write; alias c_g_io_channel_write_chars g_io_channel_write_chars; alias c_g_io_channel_write_unichar g_io_channel_write_unichar; alias c_g_io_channel_error_from_errno g_io_channel_error_from_errno; alias c_g_io_channel_error_quark g_io_channel_error_quark; alias c_g_io_add_watch g_io_add_watch; alias c_g_io_add_watch_full g_io_add_watch_full; alias c_g_io_create_watch g_io_create_watch; // glib.KeyFile alias c_g_key_file_new g_key_file_new; alias c_g_key_file_free g_key_file_free; alias c_g_key_file_get_boolean g_key_file_get_boolean; alias c_g_key_file_get_boolean_list g_key_file_get_boolean_list; alias c_g_key_file_get_comment g_key_file_get_comment; alias c_g_key_file_get_double g_key_file_get_double; alias c_g_key_file_get_double_list g_key_file_get_double_list; alias c_g_key_file_get_groups g_key_file_get_groups; alias c_g_key_file_get_int64 g_key_file_get_int64; alias c_g_key_file_get_integer g_key_file_get_integer; alias c_g_key_file_get_integer_list g_key_file_get_integer_list; alias c_g_key_file_get_keys g_key_file_get_keys; alias c_g_key_file_get_locale_string g_key_file_get_locale_string; alias c_g_key_file_get_locale_string_list g_key_file_get_locale_string_list; alias c_g_key_file_get_start_group g_key_file_get_start_group; alias c_g_key_file_get_string g_key_file_get_string; alias c_g_key_file_get_string_list g_key_file_get_string_list; alias c_g_key_file_get_uint64 g_key_file_get_uint64; alias c_g_key_file_get_value g_key_file_get_value; alias c_g_key_file_has_group g_key_file_has_group; alias c_g_key_file_has_key g_key_file_has_key; alias c_g_key_file_load_from_bytes g_key_file_load_from_bytes; alias c_g_key_file_load_from_data g_key_file_load_from_data; alias c_g_key_file_load_from_data_dirs g_key_file_load_from_data_dirs; alias c_g_key_file_load_from_dirs g_key_file_load_from_dirs; alias c_g_key_file_load_from_file g_key_file_load_from_file; alias c_g_key_file_ref g_key_file_ref; alias c_g_key_file_remove_comment g_key_file_remove_comment; alias c_g_key_file_remove_group g_key_file_remove_group; alias c_g_key_file_remove_key g_key_file_remove_key; alias c_g_key_file_save_to_file g_key_file_save_to_file; alias c_g_key_file_set_boolean g_key_file_set_boolean; alias c_g_key_file_set_boolean_list g_key_file_set_boolean_list; alias c_g_key_file_set_comment g_key_file_set_comment; alias c_g_key_file_set_double g_key_file_set_double; alias c_g_key_file_set_double_list g_key_file_set_double_list; alias c_g_key_file_set_int64 g_key_file_set_int64; alias c_g_key_file_set_integer g_key_file_set_integer; alias c_g_key_file_set_integer_list g_key_file_set_integer_list; alias c_g_key_file_set_list_separator g_key_file_set_list_separator; alias c_g_key_file_set_locale_string g_key_file_set_locale_string; alias c_g_key_file_set_locale_string_list g_key_file_set_locale_string_list; alias c_g_key_file_set_string g_key_file_set_string; alias c_g_key_file_set_string_list g_key_file_set_string_list; alias c_g_key_file_set_uint64 g_key_file_set_uint64; alias c_g_key_file_set_value g_key_file_set_value; alias c_g_key_file_to_data g_key_file_to_data; alias c_g_key_file_unref g_key_file_unref; alias c_g_key_file_error_quark g_key_file_error_quark; // glib.ListG alias c_g_list_alloc g_list_alloc; alias c_g_list_append g_list_append; alias c_g_list_concat g_list_concat; alias c_g_list_copy g_list_copy; alias c_g_list_copy_deep g_list_copy_deep; alias c_g_list_delete_link g_list_delete_link; alias c_g_list_find g_list_find; alias c_g_list_find_custom g_list_find_custom; alias c_g_list_first g_list_first; alias c_g_list_foreach g_list_foreach; alias c_g_list_free g_list_free; alias c_g_list_free_1 g_list_free_1; alias c_g_list_free_full g_list_free_full; alias c_g_list_index g_list_index; alias c_g_list_insert g_list_insert; alias c_g_list_insert_before g_list_insert_before; alias c_g_list_insert_sorted g_list_insert_sorted; alias c_g_list_insert_sorted_with_data g_list_insert_sorted_with_data; alias c_g_list_last g_list_last; alias c_g_list_length g_list_length; alias c_g_list_nth g_list_nth; alias c_g_list_nth_data g_list_nth_data; alias c_g_list_nth_prev g_list_nth_prev; alias c_g_list_position g_list_position; alias c_g_list_prepend g_list_prepend; alias c_g_list_remove g_list_remove; alias c_g_list_remove_all g_list_remove_all; alias c_g_list_remove_link g_list_remove_link; alias c_g_list_reverse g_list_reverse; alias c_g_list_sort g_list_sort; alias c_g_list_sort_with_data g_list_sort_with_data; // glib.MainContext alias c_g_main_context_new g_main_context_new; alias c_g_main_context_acquire g_main_context_acquire; alias c_g_main_context_add_poll g_main_context_add_poll; alias c_g_main_context_check g_main_context_check; alias c_g_main_context_dispatch g_main_context_dispatch; alias c_g_main_context_find_source_by_funcs_user_data g_main_context_find_source_by_funcs_user_data; alias c_g_main_context_find_source_by_id g_main_context_find_source_by_id; alias c_g_main_context_find_source_by_user_data g_main_context_find_source_by_user_data; alias c_g_main_context_get_poll_func g_main_context_get_poll_func; alias c_g_main_context_invoke g_main_context_invoke; alias c_g_main_context_invoke_full g_main_context_invoke_full; alias c_g_main_context_is_owner g_main_context_is_owner; alias c_g_main_context_iteration g_main_context_iteration; alias c_g_main_context_pending g_main_context_pending; alias c_g_main_context_pop_thread_default g_main_context_pop_thread_default; alias c_g_main_context_prepare g_main_context_prepare; alias c_g_main_context_push_thread_default g_main_context_push_thread_default; alias c_g_main_context_query g_main_context_query; alias c_g_main_context_ref g_main_context_ref; alias c_g_main_context_release g_main_context_release; alias c_g_main_context_remove_poll g_main_context_remove_poll; alias c_g_main_context_set_poll_func g_main_context_set_poll_func; alias c_g_main_context_unref g_main_context_unref; alias c_g_main_context_wait g_main_context_wait; alias c_g_main_context_wakeup g_main_context_wakeup; alias c_g_main_context_default g_main_context_default; alias c_g_main_context_get_thread_default g_main_context_get_thread_default; alias c_g_main_context_ref_thread_default g_main_context_ref_thread_default; // glib.MainLoop alias c_g_main_loop_new g_main_loop_new; alias c_g_main_loop_get_context g_main_loop_get_context; alias c_g_main_loop_is_running g_main_loop_is_running; alias c_g_main_loop_quit g_main_loop_quit; alias c_g_main_loop_ref g_main_loop_ref; alias c_g_main_loop_run g_main_loop_run; alias c_g_main_loop_unref g_main_loop_unref; alias c_g_main_current_source g_main_current_source; alias c_g_main_depth g_main_depth; alias c_g_poll g_poll; // glib.MappedFile alias c_g_mapped_file_new g_mapped_file_new; alias c_g_mapped_file_new_from_fd g_mapped_file_new_from_fd; alias c_g_mapped_file_free g_mapped_file_free; alias c_g_mapped_file_get_bytes g_mapped_file_get_bytes; alias c_g_mapped_file_get_contents g_mapped_file_get_contents; alias c_g_mapped_file_get_length g_mapped_file_get_length; alias c_g_mapped_file_ref g_mapped_file_ref; alias c_g_mapped_file_unref g_mapped_file_unref; // glib.SimpleXML alias c_g_markup_parse_context_new g_markup_parse_context_new; alias c_g_markup_parse_context_end_parse g_markup_parse_context_end_parse; alias c_g_markup_parse_context_free g_markup_parse_context_free; alias c_g_markup_parse_context_get_element g_markup_parse_context_get_element; alias c_g_markup_parse_context_get_element_stack g_markup_parse_context_get_element_stack; alias c_g_markup_parse_context_get_position g_markup_parse_context_get_position; alias c_g_markup_parse_context_get_user_data g_markup_parse_context_get_user_data; alias c_g_markup_parse_context_parse g_markup_parse_context_parse; alias c_g_markup_parse_context_pop g_markup_parse_context_pop; alias c_g_markup_parse_context_push g_markup_parse_context_push; alias c_g_markup_parse_context_ref g_markup_parse_context_ref; alias c_g_markup_parse_context_unref g_markup_parse_context_unref; alias c_g_markup_collect_attributes g_markup_collect_attributes; alias c_g_markup_error_quark g_markup_error_quark; alias c_g_markup_escape_text g_markup_escape_text; alias c_g_markup_printf_escaped g_markup_printf_escaped; alias c_g_markup_vprintf_escaped g_markup_vprintf_escaped; // glib.MatchInfo alias c_g_match_info_expand_references g_match_info_expand_references; alias c_g_match_info_fetch g_match_info_fetch; alias c_g_match_info_fetch_all g_match_info_fetch_all; alias c_g_match_info_fetch_named g_match_info_fetch_named; alias c_g_match_info_fetch_named_pos g_match_info_fetch_named_pos; alias c_g_match_info_fetch_pos g_match_info_fetch_pos; alias c_g_match_info_free g_match_info_free; alias c_g_match_info_get_match_count g_match_info_get_match_count; alias c_g_match_info_get_regex g_match_info_get_regex; alias c_g_match_info_get_string g_match_info_get_string; alias c_g_match_info_is_partial_match g_match_info_is_partial_match; alias c_g_match_info_matches g_match_info_matches; alias c_g_match_info_next g_match_info_next; alias c_g_match_info_ref g_match_info_ref; alias c_g_match_info_unref g_match_info_unref; // glib.Mutex alias c_g_mutex_clear g_mutex_clear; alias c_g_mutex_init g_mutex_init; alias c_g_mutex_lock g_mutex_lock; alias c_g_mutex_trylock g_mutex_trylock; alias c_g_mutex_unlock g_mutex_unlock; // glib.Node alias c_g_node_child_index g_node_child_index; alias c_g_node_child_position g_node_child_position; alias c_g_node_children_foreach g_node_children_foreach; alias c_g_node_copy g_node_copy; alias c_g_node_copy_deep g_node_copy_deep; alias c_g_node_depth g_node_depth; alias c_g_node_destroy g_node_destroy; alias c_g_node_find g_node_find; alias c_g_node_find_child g_node_find_child; alias c_g_node_first_sibling g_node_first_sibling; alias c_g_node_get_root g_node_get_root; alias c_g_node_insert g_node_insert; alias c_g_node_insert_after g_node_insert_after; alias c_g_node_insert_before g_node_insert_before; alias c_g_node_is_ancestor g_node_is_ancestor; alias c_g_node_last_child g_node_last_child; alias c_g_node_last_sibling g_node_last_sibling; alias c_g_node_max_height g_node_max_height; alias c_g_node_n_children g_node_n_children; alias c_g_node_n_nodes g_node_n_nodes; alias c_g_node_nth_child g_node_nth_child; alias c_g_node_prepend g_node_prepend; alias c_g_node_reverse_children g_node_reverse_children; alias c_g_node_traverse g_node_traverse; alias c_g_node_unlink g_node_unlink; alias c_g_node_new g_node_new; // glib.Once alias c_g_once_impl g_once_impl; alias c_g_once_init_enter g_once_init_enter; alias c_g_once_init_leave g_once_init_leave; // glib.OptionContext alias c_g_option_context_add_group g_option_context_add_group; alias c_g_option_context_add_main_entries g_option_context_add_main_entries; alias c_g_option_context_free g_option_context_free; alias c_g_option_context_get_description g_option_context_get_description; alias c_g_option_context_get_help g_option_context_get_help; alias c_g_option_context_get_help_enabled g_option_context_get_help_enabled; alias c_g_option_context_get_ignore_unknown_options g_option_context_get_ignore_unknown_options; alias c_g_option_context_get_main_group g_option_context_get_main_group; alias c_g_option_context_get_strict_posix g_option_context_get_strict_posix; alias c_g_option_context_get_summary g_option_context_get_summary; alias c_g_option_context_parse g_option_context_parse; alias c_g_option_context_parse_strv g_option_context_parse_strv; alias c_g_option_context_set_description g_option_context_set_description; alias c_g_option_context_set_help_enabled g_option_context_set_help_enabled; alias c_g_option_context_set_ignore_unknown_options g_option_context_set_ignore_unknown_options; alias c_g_option_context_set_main_group g_option_context_set_main_group; alias c_g_option_context_set_strict_posix g_option_context_set_strict_posix; alias c_g_option_context_set_summary g_option_context_set_summary; alias c_g_option_context_set_translate_func g_option_context_set_translate_func; alias c_g_option_context_set_translation_domain g_option_context_set_translation_domain; alias c_g_option_context_new g_option_context_new; alias c_g_option_error_quark g_option_error_quark; // glib.OptionGroup alias c_g_option_group_new g_option_group_new; alias c_g_option_group_add_entries g_option_group_add_entries; alias c_g_option_group_free g_option_group_free; alias c_g_option_group_ref g_option_group_ref; alias c_g_option_group_set_error_hook g_option_group_set_error_hook; alias c_g_option_group_set_parse_hooks g_option_group_set_parse_hooks; alias c_g_option_group_set_translate_func g_option_group_set_translate_func; alias c_g_option_group_set_translation_domain g_option_group_set_translation_domain; alias c_g_option_group_unref g_option_group_unref; // glib.Pattern alias c_g_pattern_spec_equal g_pattern_spec_equal; alias c_g_pattern_spec_free g_pattern_spec_free; alias c_g_pattern_spec_new g_pattern_spec_new; alias c_g_pattern_match g_pattern_match; alias c_g_pattern_match_simple g_pattern_match_simple; alias c_g_pattern_match_string g_pattern_match_string; // glib.Private alias c_g_private_get g_private_get; alias c_g_private_replace g_private_replace; alias c_g_private_set g_private_set; // glib.PtrArray alias c_g_ptr_array_add g_ptr_array_add; alias c_g_ptr_array_find g_ptr_array_find; alias c_g_ptr_array_find_with_equal_func g_ptr_array_find_with_equal_func; alias c_g_ptr_array_foreach g_ptr_array_foreach; alias c_g_ptr_array_free g_ptr_array_free; alias c_g_ptr_array_insert g_ptr_array_insert; alias c_g_ptr_array_new g_ptr_array_new; alias c_g_ptr_array_new_full g_ptr_array_new_full; alias c_g_ptr_array_new_with_free_func g_ptr_array_new_with_free_func; alias c_g_ptr_array_ref g_ptr_array_ref; alias c_g_ptr_array_remove g_ptr_array_remove; alias c_g_ptr_array_remove_fast g_ptr_array_remove_fast; alias c_g_ptr_array_remove_index g_ptr_array_remove_index; alias c_g_ptr_array_remove_index_fast g_ptr_array_remove_index_fast; alias c_g_ptr_array_remove_range g_ptr_array_remove_range; alias c_g_ptr_array_set_free_func g_ptr_array_set_free_func; alias c_g_ptr_array_set_size g_ptr_array_set_size; alias c_g_ptr_array_sized_new g_ptr_array_sized_new; alias c_g_ptr_array_sort g_ptr_array_sort; alias c_g_ptr_array_sort_with_data g_ptr_array_sort_with_data; alias c_g_ptr_array_unref g_ptr_array_unref; // glib.QueueG alias c_g_queue_clear g_queue_clear; alias c_g_queue_copy g_queue_copy; alias c_g_queue_delete_link g_queue_delete_link; alias c_g_queue_find g_queue_find; alias c_g_queue_find_custom g_queue_find_custom; alias c_g_queue_foreach g_queue_foreach; alias c_g_queue_free g_queue_free; alias c_g_queue_free_full g_queue_free_full; alias c_g_queue_get_length g_queue_get_length; alias c_g_queue_index g_queue_index; alias c_g_queue_init g_queue_init; alias c_g_queue_insert_after g_queue_insert_after; alias c_g_queue_insert_before g_queue_insert_before; alias c_g_queue_insert_sorted g_queue_insert_sorted; alias c_g_queue_is_empty g_queue_is_empty; alias c_g_queue_link_index g_queue_link_index; alias c_g_queue_peek_head g_queue_peek_head; alias c_g_queue_peek_head_link g_queue_peek_head_link; alias c_g_queue_peek_nth g_queue_peek_nth; alias c_g_queue_peek_nth_link g_queue_peek_nth_link; alias c_g_queue_peek_tail g_queue_peek_tail; alias c_g_queue_peek_tail_link g_queue_peek_tail_link; alias c_g_queue_pop_head g_queue_pop_head; alias c_g_queue_pop_head_link g_queue_pop_head_link; alias c_g_queue_pop_nth g_queue_pop_nth; alias c_g_queue_pop_nth_link g_queue_pop_nth_link; alias c_g_queue_pop_tail g_queue_pop_tail; alias c_g_queue_pop_tail_link g_queue_pop_tail_link; alias c_g_queue_push_head g_queue_push_head; alias c_g_queue_push_head_link g_queue_push_head_link; alias c_g_queue_push_nth g_queue_push_nth; alias c_g_queue_push_nth_link g_queue_push_nth_link; alias c_g_queue_push_tail g_queue_push_tail; alias c_g_queue_push_tail_link g_queue_push_tail_link; alias c_g_queue_remove g_queue_remove; alias c_g_queue_remove_all g_queue_remove_all; alias c_g_queue_reverse g_queue_reverse; alias c_g_queue_sort g_queue_sort; alias c_g_queue_unlink g_queue_unlink; alias c_g_queue_new g_queue_new; // glib.RWLock alias c_g_rw_lock_clear g_rw_lock_clear; alias c_g_rw_lock_init g_rw_lock_init; alias c_g_rw_lock_reader_lock g_rw_lock_reader_lock; alias c_g_rw_lock_reader_trylock g_rw_lock_reader_trylock; alias c_g_rw_lock_reader_unlock g_rw_lock_reader_unlock; alias c_g_rw_lock_writer_lock g_rw_lock_writer_lock; alias c_g_rw_lock_writer_trylock g_rw_lock_writer_trylock; alias c_g_rw_lock_writer_unlock g_rw_lock_writer_unlock; // glib.RandG alias c_g_rand_copy g_rand_copy; alias c_g_rand_double g_rand_double; alias c_g_rand_double_range g_rand_double_range; alias c_g_rand_free g_rand_free; alias c_g_rand_int g_rand_int; alias c_g_rand_int_range g_rand_int_range; alias c_g_rand_set_seed g_rand_set_seed; alias c_g_rand_set_seed_array g_rand_set_seed_array; alias c_g_rand_new g_rand_new; alias c_g_rand_new_with_seed g_rand_new_with_seed; alias c_g_rand_new_with_seed_array g_rand_new_with_seed_array; alias c_g_random_double g_random_double; alias c_g_random_double_range g_random_double_range; alias c_g_random_int g_random_int; alias c_g_random_int_range g_random_int_range; alias c_g_random_set_seed g_random_set_seed; // glib.RecMutex alias c_g_rec_mutex_clear g_rec_mutex_clear; alias c_g_rec_mutex_init g_rec_mutex_init; alias c_g_rec_mutex_lock g_rec_mutex_lock; alias c_g_rec_mutex_trylock g_rec_mutex_trylock; alias c_g_rec_mutex_unlock g_rec_mutex_unlock; // glib.Regex alias c_g_regex_new g_regex_new; alias c_g_regex_get_capture_count g_regex_get_capture_count; alias c_g_regex_get_compile_flags g_regex_get_compile_flags; alias c_g_regex_get_has_cr_or_lf g_regex_get_has_cr_or_lf; alias c_g_regex_get_match_flags g_regex_get_match_flags; alias c_g_regex_get_max_backref g_regex_get_max_backref; alias c_g_regex_get_max_lookbehind g_regex_get_max_lookbehind; alias c_g_regex_get_pattern g_regex_get_pattern; alias c_g_regex_get_string_number g_regex_get_string_number; alias c_g_regex_match g_regex_match; alias c_g_regex_match_all g_regex_match_all; alias c_g_regex_match_all_full g_regex_match_all_full; alias c_g_regex_match_full g_regex_match_full; alias c_g_regex_ref g_regex_ref; alias c_g_regex_replace g_regex_replace; alias c_g_regex_replace_eval g_regex_replace_eval; alias c_g_regex_replace_literal g_regex_replace_literal; alias c_g_regex_split g_regex_split; alias c_g_regex_split_full g_regex_split_full; alias c_g_regex_unref g_regex_unref; alias c_g_regex_check_replacement g_regex_check_replacement; alias c_g_regex_error_quark g_regex_error_quark; alias c_g_regex_escape_nul g_regex_escape_nul; alias c_g_regex_escape_string g_regex_escape_string; alias c_g_regex_match_simple g_regex_match_simple; alias c_g_regex_split_simple g_regex_split_simple; // glib.ListSG alias c_g_slist_alloc g_slist_alloc; alias c_g_slist_append g_slist_append; alias c_g_slist_concat g_slist_concat; alias c_g_slist_copy g_slist_copy; alias c_g_slist_copy_deep g_slist_copy_deep; alias c_g_slist_delete_link g_slist_delete_link; alias c_g_slist_find g_slist_find; alias c_g_slist_find_custom g_slist_find_custom; alias c_g_slist_foreach g_slist_foreach; alias c_g_slist_free g_slist_free; alias c_g_slist_free_1 g_slist_free_1; alias c_g_slist_free_full g_slist_free_full; alias c_g_slist_index g_slist_index; alias c_g_slist_insert g_slist_insert; alias c_g_slist_insert_before g_slist_insert_before; alias c_g_slist_insert_sorted g_slist_insert_sorted; alias c_g_slist_insert_sorted_with_data g_slist_insert_sorted_with_data; alias c_g_slist_last g_slist_last; alias c_g_slist_length g_slist_length; alias c_g_slist_nth g_slist_nth; alias c_g_slist_nth_data g_slist_nth_data; alias c_g_slist_position g_slist_position; alias c_g_slist_prepend g_slist_prepend; alias c_g_slist_remove g_slist_remove; alias c_g_slist_remove_all g_slist_remove_all; alias c_g_slist_remove_link g_slist_remove_link; alias c_g_slist_reverse g_slist_reverse; alias c_g_slist_sort g_slist_sort; alias c_g_slist_sort_with_data g_slist_sort_with_data; // glib.ScannerG alias c_g_scanner_cur_line g_scanner_cur_line; alias c_g_scanner_cur_position g_scanner_cur_position; alias c_g_scanner_cur_token g_scanner_cur_token; alias c_g_scanner_cur_value g_scanner_cur_value; alias c_g_scanner_destroy g_scanner_destroy; alias c_g_scanner_eof g_scanner_eof; alias c_g_scanner_error g_scanner_error; alias c_g_scanner_get_next_token g_scanner_get_next_token; alias c_g_scanner_input_file g_scanner_input_file; alias c_g_scanner_input_text g_scanner_input_text; alias c_g_scanner_lookup_symbol g_scanner_lookup_symbol; alias c_g_scanner_peek_next_token g_scanner_peek_next_token; alias c_g_scanner_scope_add_symbol g_scanner_scope_add_symbol; alias c_g_scanner_scope_foreach_symbol g_scanner_scope_foreach_symbol; alias c_g_scanner_scope_lookup_symbol g_scanner_scope_lookup_symbol; alias c_g_scanner_scope_remove_symbol g_scanner_scope_remove_symbol; alias c_g_scanner_set_scope g_scanner_set_scope; alias c_g_scanner_sync_file_offset g_scanner_sync_file_offset; alias c_g_scanner_unexp_token g_scanner_unexp_token; alias c_g_scanner_warn g_scanner_warn; alias c_g_scanner_new g_scanner_new; // glib.Sequence alias c_g_sequence_append g_sequence_append; alias c_g_sequence_foreach g_sequence_foreach; alias c_g_sequence_free g_sequence_free; alias c_g_sequence_get_begin_iter g_sequence_get_begin_iter; alias c_g_sequence_get_end_iter g_sequence_get_end_iter; alias c_g_sequence_get_iter_at_pos g_sequence_get_iter_at_pos; alias c_g_sequence_get_length g_sequence_get_length; alias c_g_sequence_insert_sorted g_sequence_insert_sorted; alias c_g_sequence_insert_sorted_iter g_sequence_insert_sorted_iter; alias c_g_sequence_is_empty g_sequence_is_empty; alias c_g_sequence_lookup g_sequence_lookup; alias c_g_sequence_lookup_iter g_sequence_lookup_iter; alias c_g_sequence_prepend g_sequence_prepend; alias c_g_sequence_search g_sequence_search; alias c_g_sequence_search_iter g_sequence_search_iter; alias c_g_sequence_sort g_sequence_sort; alias c_g_sequence_sort_iter g_sequence_sort_iter; alias c_g_sequence_foreach_range g_sequence_foreach_range; alias c_g_sequence_get g_sequence_get; alias c_g_sequence_insert_before g_sequence_insert_before; alias c_g_sequence_move g_sequence_move; alias c_g_sequence_move_range g_sequence_move_range; alias c_g_sequence_new g_sequence_new; alias c_g_sequence_range_get_midpoint g_sequence_range_get_midpoint; alias c_g_sequence_remove g_sequence_remove; alias c_g_sequence_remove_range g_sequence_remove_range; alias c_g_sequence_set g_sequence_set; alias c_g_sequence_sort_changed g_sequence_sort_changed; alias c_g_sequence_sort_changed_iter g_sequence_sort_changed_iter; alias c_g_sequence_swap g_sequence_swap; // glib.SequenceIter alias c_g_sequence_iter_compare g_sequence_iter_compare; alias c_g_sequence_iter_get_position g_sequence_iter_get_position; alias c_g_sequence_iter_get_sequence g_sequence_iter_get_sequence; alias c_g_sequence_iter_is_begin g_sequence_iter_is_begin; alias c_g_sequence_iter_is_end g_sequence_iter_is_end; alias c_g_sequence_iter_move g_sequence_iter_move; alias c_g_sequence_iter_next g_sequence_iter_next; alias c_g_sequence_iter_prev g_sequence_iter_prev; // glib.Source alias c_g_source_new g_source_new; alias c_g_source_add_child_source g_source_add_child_source; alias c_g_source_add_poll g_source_add_poll; alias c_g_source_add_unix_fd g_source_add_unix_fd; alias c_g_source_attach g_source_attach; alias c_g_source_destroy g_source_destroy; alias c_g_source_get_can_recurse g_source_get_can_recurse; alias c_g_source_get_context g_source_get_context; alias c_g_source_get_current_time g_source_get_current_time; alias c_g_source_get_id g_source_get_id; alias c_g_source_get_name g_source_get_name; alias c_g_source_get_priority g_source_get_priority; alias c_g_source_get_ready_time g_source_get_ready_time; alias c_g_source_get_time g_source_get_time; alias c_g_source_is_destroyed g_source_is_destroyed; alias c_g_source_modify_unix_fd g_source_modify_unix_fd; alias c_g_source_query_unix_fd g_source_query_unix_fd; alias c_g_source_ref g_source_ref; alias c_g_source_remove_child_source g_source_remove_child_source; alias c_g_source_remove_poll g_source_remove_poll; alias c_g_source_remove_unix_fd g_source_remove_unix_fd; alias c_g_source_set_callback g_source_set_callback; alias c_g_source_set_callback_indirect g_source_set_callback_indirect; alias c_g_source_set_can_recurse g_source_set_can_recurse; alias c_g_source_set_funcs g_source_set_funcs; alias c_g_source_set_name g_source_set_name; alias c_g_source_set_priority g_source_set_priority; alias c_g_source_set_ready_time g_source_set_ready_time; alias c_g_source_unref g_source_unref; alias c_g_source_remove g_source_remove; alias c_g_source_remove_by_funcs_user_data g_source_remove_by_funcs_user_data; alias c_g_source_remove_by_user_data g_source_remove_by_user_data; alias c_g_source_set_name_by_id g_source_set_name_by_id; // glib.StringG alias c_g_string_append g_string_append; alias c_g_string_append_c g_string_append_c; alias c_g_string_append_len g_string_append_len; alias c_g_string_append_printf g_string_append_printf; alias c_g_string_append_unichar g_string_append_unichar; alias c_g_string_append_uri_escaped g_string_append_uri_escaped; alias c_g_string_append_vprintf g_string_append_vprintf; alias c_g_string_ascii_down g_string_ascii_down; alias c_g_string_ascii_up g_string_ascii_up; alias c_g_string_assign g_string_assign; alias c_g_string_down g_string_down; alias c_g_string_equal g_string_equal; alias c_g_string_erase g_string_erase; alias c_g_string_free g_string_free; alias c_g_string_free_to_bytes g_string_free_to_bytes; alias c_g_string_hash g_string_hash; alias c_g_string_insert g_string_insert; alias c_g_string_insert_c g_string_insert_c; alias c_g_string_insert_len g_string_insert_len; alias c_g_string_insert_unichar g_string_insert_unichar; alias c_g_string_overwrite g_string_overwrite; alias c_g_string_overwrite_len g_string_overwrite_len; alias c_g_string_prepend g_string_prepend; alias c_g_string_prepend_c g_string_prepend_c; alias c_g_string_prepend_len g_string_prepend_len; alias c_g_string_prepend_unichar g_string_prepend_unichar; alias c_g_string_printf g_string_printf; alias c_g_string_set_size g_string_set_size; alias c_g_string_truncate g_string_truncate; alias c_g_string_up g_string_up; alias c_g_string_vprintf g_string_vprintf; alias c_g_string_new g_string_new; alias c_g_string_new_len g_string_new_len; alias c_g_string_sized_new g_string_sized_new; // glib.StringChunk alias c_g_string_chunk_clear g_string_chunk_clear; alias c_g_string_chunk_free g_string_chunk_free; alias c_g_string_chunk_insert g_string_chunk_insert; alias c_g_string_chunk_insert_const g_string_chunk_insert_const; alias c_g_string_chunk_insert_len g_string_chunk_insert_len; alias c_g_string_chunk_new g_string_chunk_new; // glib.TestLogBuffer alias c_g_test_log_buffer_free g_test_log_buffer_free; alias c_g_test_log_buffer_pop g_test_log_buffer_pop; alias c_g_test_log_buffer_push g_test_log_buffer_push; alias c_g_test_log_buffer_new g_test_log_buffer_new; // glib.TestLogMsg alias c_g_test_log_msg_free g_test_log_msg_free; // glib.TestSuite alias c_g_test_suite_add g_test_suite_add; alias c_g_test_suite_add_suite g_test_suite_add_suite; // glib.Thread alias c_g_thread_new g_thread_new; alias c_g_thread_try_new g_thread_try_new; alias c_g_thread_join g_thread_join; alias c_g_thread_ref g_thread_ref; alias c_g_thread_unref g_thread_unref; alias c_g_thread_error_quark g_thread_error_quark; alias c_g_thread_exit g_thread_exit; alias c_g_thread_self g_thread_self; alias c_g_thread_yield g_thread_yield; alias c_g_bit_lock g_bit_lock; alias c_g_bit_trylock g_bit_trylock; alias c_g_bit_unlock g_bit_unlock; alias c_g_get_num_processors g_get_num_processors; alias c_g_pointer_bit_lock g_pointer_bit_lock; alias c_g_pointer_bit_trylock g_pointer_bit_trylock; alias c_g_pointer_bit_unlock g_pointer_bit_unlock; // glib.ThreadPool alias c_g_thread_pool_free g_thread_pool_free; alias c_g_thread_pool_get_max_threads g_thread_pool_get_max_threads; alias c_g_thread_pool_get_num_threads g_thread_pool_get_num_threads; alias c_g_thread_pool_move_to_front g_thread_pool_move_to_front; alias c_g_thread_pool_push g_thread_pool_push; alias c_g_thread_pool_set_max_threads g_thread_pool_set_max_threads; alias c_g_thread_pool_set_sort_function g_thread_pool_set_sort_function; alias c_g_thread_pool_unprocessed g_thread_pool_unprocessed; alias c_g_thread_pool_get_max_idle_time g_thread_pool_get_max_idle_time; alias c_g_thread_pool_get_max_unused_threads g_thread_pool_get_max_unused_threads; alias c_g_thread_pool_get_num_unused_threads g_thread_pool_get_num_unused_threads; alias c_g_thread_pool_new g_thread_pool_new; alias c_g_thread_pool_set_max_idle_time g_thread_pool_set_max_idle_time; alias c_g_thread_pool_set_max_unused_threads g_thread_pool_set_max_unused_threads; alias c_g_thread_pool_stop_unused_threads g_thread_pool_stop_unused_threads; // glib.TimeVal alias c_g_time_val_add g_time_val_add; alias c_g_time_val_to_iso8601 g_time_val_to_iso8601; alias c_g_time_val_from_iso8601 g_time_val_from_iso8601; alias c_g_get_current_time g_get_current_time; alias c_g_get_monotonic_time g_get_monotonic_time; alias c_g_get_real_time g_get_real_time; alias c_g_usleep g_usleep; // glib.TimeZone alias c_g_time_zone_new g_time_zone_new; alias c_g_time_zone_new_local g_time_zone_new_local; alias c_g_time_zone_new_utc g_time_zone_new_utc; alias c_g_time_zone_adjust_time g_time_zone_adjust_time; alias c_g_time_zone_find_interval g_time_zone_find_interval; alias c_g_time_zone_get_abbreviation g_time_zone_get_abbreviation; alias c_g_time_zone_get_offset g_time_zone_get_offset; alias c_g_time_zone_is_dst g_time_zone_is_dst; alias c_g_time_zone_ref g_time_zone_ref; alias c_g_time_zone_unref g_time_zone_unref; // glib.Timer alias c_g_timer_continue g_timer_continue; alias c_g_timer_destroy g_timer_destroy; alias c_g_timer_elapsed g_timer_elapsed; alias c_g_timer_reset g_timer_reset; alias c_g_timer_start g_timer_start; alias c_g_timer_stop g_timer_stop; alias c_g_timer_new g_timer_new; // glib.TrashStack alias c_g_trash_stack_height g_trash_stack_height; alias c_g_trash_stack_peek g_trash_stack_peek; alias c_g_trash_stack_pop g_trash_stack_pop; alias c_g_trash_stack_push g_trash_stack_push; // glib.BBTree alias c_g_tree_destroy g_tree_destroy; alias c_g_tree_foreach g_tree_foreach; alias c_g_tree_height g_tree_height; alias c_g_tree_insert g_tree_insert; alias c_g_tree_lookup g_tree_lookup; alias c_g_tree_lookup_extended g_tree_lookup_extended; alias c_g_tree_nnodes g_tree_nnodes; alias c_g_tree_ref g_tree_ref; alias c_g_tree_remove g_tree_remove; alias c_g_tree_replace g_tree_replace; alias c_g_tree_search g_tree_search; alias c_g_tree_steal g_tree_steal; alias c_g_tree_traverse g_tree_traverse; alias c_g_tree_unref g_tree_unref; alias c_g_tree_new g_tree_new; alias c_g_tree_new_full g_tree_new_full; alias c_g_tree_new_with_data g_tree_new_with_data; // glib.Variant alias c_g_variant_new g_variant_new; alias c_g_variant_new_array g_variant_new_array; alias c_g_variant_new_boolean g_variant_new_boolean; alias c_g_variant_new_byte g_variant_new_byte; alias c_g_variant_new_bytestring g_variant_new_bytestring; alias c_g_variant_new_bytestring_array g_variant_new_bytestring_array; alias c_g_variant_new_dict_entry g_variant_new_dict_entry; alias c_g_variant_new_double g_variant_new_double; alias c_g_variant_new_fixed_array g_variant_new_fixed_array; alias c_g_variant_new_from_bytes g_variant_new_from_bytes; alias c_g_variant_new_from_data g_variant_new_from_data; alias c_g_variant_new_handle g_variant_new_handle; alias c_g_variant_new_int16 g_variant_new_int16; alias c_g_variant_new_int32 g_variant_new_int32; alias c_g_variant_new_int64 g_variant_new_int64; alias c_g_variant_new_maybe g_variant_new_maybe; alias c_g_variant_new_object_path g_variant_new_object_path; alias c_g_variant_new_objv g_variant_new_objv; alias c_g_variant_new_parsed g_variant_new_parsed; alias c_g_variant_new_parsed_va g_variant_new_parsed_va; alias c_g_variant_new_printf g_variant_new_printf; alias c_g_variant_new_signature g_variant_new_signature; alias c_g_variant_new_string g_variant_new_string; alias c_g_variant_new_strv g_variant_new_strv; alias c_g_variant_new_take_string g_variant_new_take_string; alias c_g_variant_new_tuple g_variant_new_tuple; alias c_g_variant_new_uint16 g_variant_new_uint16; alias c_g_variant_new_uint32 g_variant_new_uint32; alias c_g_variant_new_uint64 g_variant_new_uint64; alias c_g_variant_new_va g_variant_new_va; alias c_g_variant_new_variant g_variant_new_variant; alias c_g_variant_byteswap g_variant_byteswap; alias c_g_variant_check_format_string g_variant_check_format_string; alias c_g_variant_classify g_variant_classify; alias c_g_variant_compare g_variant_compare; alias c_g_variant_dup_bytestring g_variant_dup_bytestring; alias c_g_variant_dup_bytestring_array g_variant_dup_bytestring_array; alias c_g_variant_dup_objv g_variant_dup_objv; alias c_g_variant_dup_string g_variant_dup_string; alias c_g_variant_dup_strv g_variant_dup_strv; alias c_g_variant_equal g_variant_equal; alias c_g_variant_get g_variant_get; alias c_g_variant_get_boolean g_variant_get_boolean; alias c_g_variant_get_byte g_variant_get_byte; alias c_g_variant_get_bytestring g_variant_get_bytestring; alias c_g_variant_get_bytestring_array g_variant_get_bytestring_array; alias c_g_variant_get_child g_variant_get_child; alias c_g_variant_get_child_value g_variant_get_child_value; alias c_g_variant_get_data g_variant_get_data; alias c_g_variant_get_data_as_bytes g_variant_get_data_as_bytes; alias c_g_variant_get_double g_variant_get_double; alias c_g_variant_get_fixed_array g_variant_get_fixed_array; alias c_g_variant_get_handle g_variant_get_handle; alias c_g_variant_get_int16 g_variant_get_int16; alias c_g_variant_get_int32 g_variant_get_int32; alias c_g_variant_get_int64 g_variant_get_int64; alias c_g_variant_get_maybe g_variant_get_maybe; alias c_g_variant_get_normal_form g_variant_get_normal_form; alias c_g_variant_get_objv g_variant_get_objv; alias c_g_variant_get_size g_variant_get_size; alias c_g_variant_get_string g_variant_get_string; alias c_g_variant_get_strv g_variant_get_strv; alias c_g_variant_get_type g_variant_get_type; alias c_g_variant_get_type_string g_variant_get_type_string; alias c_g_variant_get_uint16 g_variant_get_uint16; alias c_g_variant_get_uint32 g_variant_get_uint32; alias c_g_variant_get_uint64 g_variant_get_uint64; alias c_g_variant_get_va g_variant_get_va; alias c_g_variant_get_variant g_variant_get_variant; alias c_g_variant_hash g_variant_hash; alias c_g_variant_is_container g_variant_is_container; alias c_g_variant_is_floating g_variant_is_floating; alias c_g_variant_is_normal_form g_variant_is_normal_form; alias c_g_variant_is_of_type g_variant_is_of_type; alias c_g_variant_iter_new g_variant_iter_new; alias c_g_variant_lookup g_variant_lookup; alias c_g_variant_lookup_value g_variant_lookup_value; alias c_g_variant_n_children g_variant_n_children; alias c_g_variant_print g_variant_print; alias c_g_variant_print_string g_variant_print_string; alias c_g_variant_ref g_variant_ref; alias c_g_variant_ref_sink g_variant_ref_sink; alias c_g_variant_store g_variant_store; alias c_g_variant_take_ref g_variant_take_ref; alias c_g_variant_unref g_variant_unref; alias c_g_variant_is_object_path g_variant_is_object_path; alias c_g_variant_is_signature g_variant_is_signature; alias c_g_variant_parse g_variant_parse; alias c_g_variant_parse_error_print_context g_variant_parse_error_print_context; alias c_g_variant_parse_error_quark g_variant_parse_error_quark; alias c_g_variant_parser_get_error_quark g_variant_parser_get_error_quark; // glib.VariantBuilder alias c_g_variant_builder_new g_variant_builder_new; alias c_g_variant_builder_add g_variant_builder_add; alias c_g_variant_builder_add_parsed g_variant_builder_add_parsed; alias c_g_variant_builder_add_value g_variant_builder_add_value; alias c_g_variant_builder_clear g_variant_builder_clear; alias c_g_variant_builder_close g_variant_builder_close; alias c_g_variant_builder_end g_variant_builder_end; alias c_g_variant_builder_init g_variant_builder_init; alias c_g_variant_builder_open g_variant_builder_open; alias c_g_variant_builder_ref g_variant_builder_ref; alias c_g_variant_builder_unref g_variant_builder_unref; // glib.VariantDict alias c_g_variant_dict_new g_variant_dict_new; alias c_g_variant_dict_clear g_variant_dict_clear; alias c_g_variant_dict_contains g_variant_dict_contains; alias c_g_variant_dict_end g_variant_dict_end; alias c_g_variant_dict_init g_variant_dict_init; alias c_g_variant_dict_insert g_variant_dict_insert; alias c_g_variant_dict_insert_value g_variant_dict_insert_value; alias c_g_variant_dict_lookup g_variant_dict_lookup; alias c_g_variant_dict_lookup_value g_variant_dict_lookup_value; alias c_g_variant_dict_ref g_variant_dict_ref; alias c_g_variant_dict_remove g_variant_dict_remove; alias c_g_variant_dict_unref g_variant_dict_unref; // glib.VariantIter alias c_g_variant_iter_copy g_variant_iter_copy; alias c_g_variant_iter_free g_variant_iter_free; alias c_g_variant_iter_init g_variant_iter_init; alias c_g_variant_iter_loop g_variant_iter_loop; alias c_g_variant_iter_n_children g_variant_iter_n_children; alias c_g_variant_iter_next g_variant_iter_next; alias c_g_variant_iter_next_value g_variant_iter_next_value; // glib.VariantType alias c_g_variant_type_new g_variant_type_new; alias c_g_variant_type_new_array g_variant_type_new_array; alias c_g_variant_type_new_dict_entry g_variant_type_new_dict_entry; alias c_g_variant_type_new_maybe g_variant_type_new_maybe; alias c_g_variant_type_new_tuple g_variant_type_new_tuple; alias c_g_variant_type_copy g_variant_type_copy; alias c_g_variant_type_dup_string g_variant_type_dup_string; alias c_g_variant_type_element g_variant_type_element; alias c_g_variant_type_equal g_variant_type_equal; alias c_g_variant_type_first g_variant_type_first; alias c_g_variant_type_free g_variant_type_free; alias c_g_variant_type_get_string_length g_variant_type_get_string_length; alias c_g_variant_type_hash g_variant_type_hash; alias c_g_variant_type_is_array g_variant_type_is_array; alias c_g_variant_type_is_basic g_variant_type_is_basic; alias c_g_variant_type_is_container g_variant_type_is_container; alias c_g_variant_type_is_definite g_variant_type_is_definite; alias c_g_variant_type_is_dict_entry g_variant_type_is_dict_entry; alias c_g_variant_type_is_maybe g_variant_type_is_maybe; alias c_g_variant_type_is_subtype_of g_variant_type_is_subtype_of; alias c_g_variant_type_is_tuple g_variant_type_is_tuple; alias c_g_variant_type_is_variant g_variant_type_is_variant; alias c_g_variant_type_key g_variant_type_key; alias c_g_variant_type_n_items g_variant_type_n_items; alias c_g_variant_type_next g_variant_type_next; alias c_g_variant_type_peek_string g_variant_type_peek_string; alias c_g_variant_type_value g_variant_type_value; alias c_g_variant_type_checked_ g_variant_type_checked_; alias c_g_variant_type_string_is_valid g_variant_type_string_is_valid; alias c_g_variant_type_string_scan g_variant_type_string_scan; // glib.Module alias c_g_module_close g_module_close; alias c_g_module_make_resident g_module_make_resident; alias c_g_module_name g_module_name; alias c_g_module_symbol g_module_symbol; alias c_g_module_build_path g_module_build_path; alias c_g_module_error g_module_error; alias c_g_module_open g_module_open; alias c_g_module_supported g_module_supported; // glib.Base64 alias c_g_base64_decode_step g_base64_decode_step; alias c_g_base64_decode_inplace g_base64_decode_inplace; alias c_g_base64_decode g_base64_decode; alias c_g_base64_encode g_base64_encode; alias c_g_base64_encode_close g_base64_encode_close; alias c_g_base64_encode_step g_base64_encode_step; // glib.Idle alias c_g_idle_add g_idle_add; alias c_g_idle_add_full g_idle_add_full; alias c_g_idle_remove_by_data g_idle_remove_by_data; alias c_g_idle_source_new g_idle_source_new; // glib.MemorySlice alias c_g_slice_alloc g_slice_alloc; alias c_g_slice_alloc0 g_slice_alloc0; alias c_g_slice_copy g_slice_copy; alias c_g_slice_free1 g_slice_free1; alias c_g_slice_free_chain_with_offset g_slice_free_chain_with_offset; alias c_g_slice_get_config g_slice_get_config; alias c_g_slice_get_config_state g_slice_get_config_state; alias c_g_slice_set_config g_slice_set_config; // glib.Spawn alias c_g_spawn_async g_spawn_async; alias c_g_spawn_async_with_pipes g_spawn_async_with_pipes; alias c_g_spawn_check_exit_status g_spawn_check_exit_status; alias c_g_spawn_close_pid g_spawn_close_pid; alias c_g_spawn_command_line_async g_spawn_command_line_async; alias c_g_spawn_command_line_sync g_spawn_command_line_sync; alias c_g_spawn_error_quark g_spawn_error_quark; alias c_g_spawn_exit_error_quark g_spawn_exit_error_quark; alias c_g_spawn_sync g_spawn_sync; // glib.Str alias c_g_ascii_digit_value g_ascii_digit_value; alias c_g_ascii_dtostr g_ascii_dtostr; alias c_g_ascii_formatd g_ascii_formatd; alias c_g_ascii_strcasecmp g_ascii_strcasecmp; alias c_g_ascii_strdown g_ascii_strdown; alias c_g_ascii_strncasecmp g_ascii_strncasecmp; alias c_g_ascii_strtod g_ascii_strtod; alias c_g_ascii_strtoll g_ascii_strtoll; alias c_g_ascii_strtoull g_ascii_strtoull; alias c_g_ascii_strup g_ascii_strup; alias c_g_ascii_tolower g_ascii_tolower; alias c_g_ascii_toupper g_ascii_toupper; alias c_g_ascii_xdigit_value g_ascii_xdigit_value; alias c_g_printf g_printf; alias c_g_printf_string_upper_bound g_printf_string_upper_bound; alias c_g_snprintf g_snprintf; alias c_g_sprintf g_sprintf; alias c_g_stpcpy g_stpcpy; alias c_g_str_has_prefix g_str_has_prefix; alias c_g_str_has_suffix g_str_has_suffix; alias c_g_str_is_ascii g_str_is_ascii; alias c_g_str_match_string g_str_match_string; alias c_g_str_to_ascii g_str_to_ascii; alias c_g_str_tokenize_and_fold g_str_tokenize_and_fold; alias c_g_strcanon g_strcanon; alias c_g_strcasecmp g_strcasecmp; alias c_g_strchomp g_strchomp; alias c_g_strchug g_strchug; alias c_g_strcmp0 g_strcmp0; alias c_g_strcompress g_strcompress; alias c_g_strconcat g_strconcat; alias c_g_strdelimit g_strdelimit; alias c_g_strdown g_strdown; alias c_g_strdup g_strdup; alias c_g_strdup_printf g_strdup_printf; alias c_g_strdup_vprintf g_strdup_vprintf; alias c_g_strdupv g_strdupv; alias c_g_strerror g_strerror; alias c_g_strescape g_strescape; alias c_g_strfreev g_strfreev; alias c_g_strjoin g_strjoin; alias c_g_strjoinv g_strjoinv; alias c_g_strlcat g_strlcat; alias c_g_strlcpy g_strlcpy; alias c_g_strncasecmp g_strncasecmp; alias c_g_strndup g_strndup; alias c_g_strnfill g_strnfill; alias c_g_strreverse g_strreverse; alias c_g_strrstr g_strrstr; alias c_g_strrstr_len g_strrstr_len; alias c_g_strsignal g_strsignal; alias c_g_strsplit g_strsplit; alias c_g_strsplit_set g_strsplit_set; alias c_g_strstr_len g_strstr_len; alias c_g_strtod g_strtod; alias c_g_strup g_strup; alias c_g_strv_get_type g_strv_get_type; alias c_g_strv_length g_strv_length; alias c_g_strv_contains g_strv_contains; alias c_g_vasprintf g_vasprintf; alias c_g_vprintf g_vprintf; alias c_g_vsnprintf g_vsnprintf; alias c_g_vsprintf g_vsprintf; alias c_g_fprintf g_fprintf; alias c_g_vfprintf g_vfprintf; alias c_g_ascii_string_to_signed g_ascii_string_to_signed; alias c_g_ascii_string_to_unsigned g_ascii_string_to_unsigned; // glib.Timeout alias c_g_timeout_add g_timeout_add; alias c_g_timeout_add_full g_timeout_add_full; alias c_g_timeout_add_seconds g_timeout_add_seconds; alias c_g_timeout_add_seconds_full g_timeout_add_seconds_full; alias c_g_timeout_source_new g_timeout_source_new; alias c_g_timeout_source_new_seconds g_timeout_source_new_seconds; // glib.Util alias c_g_build_filenamev g_build_filenamev; alias c_g_build_pathv g_build_pathv; alias c_g_atexit g_atexit; alias c_g_basename g_basename; alias c_g_bit_nth_lsf g_bit_nth_lsf; alias c_g_bit_nth_msf g_bit_nth_msf; alias c_g_bit_storage g_bit_storage; alias c_g_build_path g_build_path; alias c_g_environ_getenv g_environ_getenv; alias c_g_environ_setenv g_environ_setenv; alias c_g_environ_unsetenv g_environ_unsetenv; alias c_g_find_program_in_path g_find_program_in_path; alias c_g_format_size g_format_size; alias c_g_format_size_for_display g_format_size_for_display; alias c_g_format_size_full g_format_size_full; alias c_g_get_application_name g_get_application_name; alias c_g_get_environ g_get_environ; alias c_g_get_current_dir g_get_current_dir; alias c_g_get_home_dir g_get_home_dir; alias c_g_get_host_name g_get_host_name; alias c_g_get_prgname g_get_prgname; alias c_g_get_real_name g_get_real_name; alias c_g_get_system_config_dirs g_get_system_config_dirs; alias c_g_get_system_data_dirs g_get_system_data_dirs; alias c_g_get_tmp_dir g_get_tmp_dir; alias c_g_get_user_cache_dir g_get_user_cache_dir; alias c_g_get_user_config_dir g_get_user_config_dir; alias c_g_get_user_data_dir g_get_user_data_dir; alias c_g_get_user_name g_get_user_name; alias c_g_get_user_runtime_dir g_get_user_runtime_dir; alias c_g_get_user_special_dir g_get_user_special_dir; alias c_g_getenv g_getenv; alias c_g_listenv g_listenv; alias c_g_nullify_pointer g_nullify_pointer; alias c_g_parse_debug_string g_parse_debug_string; alias c_g_path_get_basename g_path_get_basename; alias c_g_path_get_dirname g_path_get_dirname; alias c_g_path_is_absolute g_path_is_absolute; alias c_g_path_skip_root g_path_skip_root; alias c_g_qsort_with_data g_qsort_with_data; alias c_g_reload_user_special_dirs_cache g_reload_user_special_dirs_cache; alias c_g_set_application_name g_set_application_name; alias c_g_set_prgname g_set_prgname; alias c_g_setenv g_setenv; alias c_g_spaced_primes_closest g_spaced_primes_closest; alias c_g_unsetenv g_unsetenv; // glib.Atomic alias c_g_atomic_int_add g_atomic_int_add; alias c_g_atomic_int_and g_atomic_int_and; alias c_g_atomic_int_compare_and_exchange g_atomic_int_compare_and_exchange; alias c_g_atomic_int_dec_and_test g_atomic_int_dec_and_test; alias c_g_atomic_int_exchange_and_add g_atomic_int_exchange_and_add; alias c_g_atomic_int_get g_atomic_int_get; alias c_g_atomic_int_inc g_atomic_int_inc; alias c_g_atomic_int_or g_atomic_int_or; alias c_g_atomic_int_set g_atomic_int_set; alias c_g_atomic_int_xor g_atomic_int_xor; alias c_g_atomic_pointer_add g_atomic_pointer_add; alias c_g_atomic_pointer_and g_atomic_pointer_and; alias c_g_atomic_pointer_compare_and_exchange g_atomic_pointer_compare_and_exchange; alias c_g_atomic_pointer_get g_atomic_pointer_get; alias c_g_atomic_pointer_or g_atomic_pointer_or; alias c_g_atomic_pointer_set g_atomic_pointer_set; alias c_g_atomic_pointer_xor g_atomic_pointer_xor; // glib.CharacterSet alias c_g_convert g_convert; alias c_g_convert_error_quark g_convert_error_quark; alias c_g_convert_with_fallback g_convert_with_fallback; alias c_g_convert_with_iconv g_convert_with_iconv; alias c_g_filename_display_basename g_filename_display_basename; alias c_g_filename_display_name g_filename_display_name; alias c_g_filename_from_utf8 g_filename_from_utf8; alias c_g_filename_to_utf8 g_filename_to_utf8; alias c_g_get_charset g_get_charset; alias c_g_get_codeset g_get_codeset; alias c_g_get_filename_charsets g_get_filename_charsets; alias c_g_locale_from_utf8 g_locale_from_utf8; alias c_g_locale_to_utf8 g_locale_to_utf8; // glib.Child alias c_g_child_watch_add g_child_watch_add; alias c_g_child_watch_add_full g_child_watch_add_full; alias c_g_child_watch_source_new g_child_watch_source_new; // glib.DataList alias c_g_datalist_clear g_datalist_clear; alias c_g_datalist_foreach g_datalist_foreach; alias c_g_datalist_get_data g_datalist_get_data; alias c_g_datalist_get_flags g_datalist_get_flags; alias c_g_datalist_id_dup_data g_datalist_id_dup_data; alias c_g_datalist_id_get_data g_datalist_id_get_data; alias c_g_datalist_id_remove_no_notify g_datalist_id_remove_no_notify; alias c_g_datalist_id_replace_data g_datalist_id_replace_data; alias c_g_datalist_id_set_data_full g_datalist_id_set_data_full; alias c_g_datalist_init g_datalist_init; alias c_g_datalist_set_flags g_datalist_set_flags; alias c_g_datalist_unset_flags g_datalist_unset_flags; // glib.DataSet alias c_g_dataset_destroy g_dataset_destroy; alias c_g_dataset_foreach g_dataset_foreach; alias c_g_dataset_id_get_data g_dataset_id_get_data; alias c_g_dataset_id_remove_no_notify g_dataset_id_remove_no_notify; alias c_g_dataset_id_set_data_full g_dataset_id_set_data_full; // glib.FileUtils alias c_g_access g_access; alias c_g_chdir g_chdir; alias c_g_close g_close; alias c_g_file_error_from_errno g_file_error_from_errno; alias c_g_file_error_quark g_file_error_quark; alias c_g_file_get_contents g_file_get_contents; alias c_g_file_open_tmp g_file_open_tmp; alias c_g_file_read_link g_file_read_link; alias c_g_file_set_contents g_file_set_contents; alias c_g_file_test g_file_test; alias c_g_mkdir_with_parents g_mkdir_with_parents; alias c_g_mkdtemp g_mkdtemp; alias c_g_mkdtemp_full g_mkdtemp_full; alias c_g_mkstemp g_mkstemp; alias c_g_mkstemp_full g_mkstemp_full; alias c_g_rmdir g_rmdir; alias c_g_unlink g_unlink; // glib.Hostname alias c_g_hostname_is_ascii_encoded g_hostname_is_ascii_encoded; alias c_g_hostname_is_ip_address g_hostname_is_ip_address; alias c_g_hostname_is_non_ascii g_hostname_is_non_ascii; alias c_g_hostname_to_ascii g_hostname_to_ascii; alias c_g_hostname_to_unicode g_hostname_to_unicode; // glib.Internationalization alias c_g_dcgettext g_dcgettext; alias c_g_dgettext g_dgettext; alias c_g_dngettext g_dngettext; alias c_g_dpgettext g_dpgettext; alias c_g_dpgettext2 g_dpgettext2; alias c_g_get_language_names g_get_language_names; alias c_g_get_locale_variants g_get_locale_variants; alias c_g_strip_context g_strip_context; // glib.Memory alias c_g_clear_pointer g_clear_pointer; alias c_g_free g_free; alias c_g_malloc g_malloc; alias c_g_malloc0 g_malloc0; alias c_g_malloc0_n g_malloc0_n; alias c_g_malloc_n g_malloc_n; alias c_g_mem_is_system_malloc g_mem_is_system_malloc; alias c_g_mem_profile g_mem_profile; alias c_g_mem_set_vtable g_mem_set_vtable; alias c_g_memdup g_memdup; alias c_g_realloc g_realloc; alias c_g_realloc_n g_realloc_n; alias c_g_try_malloc g_try_malloc; alias c_g_try_malloc0 g_try_malloc0; alias c_g_try_malloc0_n g_try_malloc0_n; alias c_g_try_malloc_n g_try_malloc_n; alias c_g_try_realloc g_try_realloc; alias c_g_try_realloc_n g_try_realloc_n; // glib.MessageLog alias c_g_log g_log; alias c_g_log_default_handler g_log_default_handler; alias c_g_log_remove_handler g_log_remove_handler; alias c_g_log_set_always_fatal g_log_set_always_fatal; alias c_g_log_set_default_handler g_log_set_default_handler; alias c_g_log_set_fatal_mask g_log_set_fatal_mask; alias c_g_log_set_handler g_log_set_handler; alias c_g_log_set_handler_full g_log_set_handler_full; alias c_g_logv g_logv; // glib.Messages alias c_g_on_error_query g_on_error_query; alias c_g_on_error_stack_trace g_on_error_stack_trace; alias c_g_print g_print; alias c_g_printerr g_printerr; alias c_g_set_print_handler g_set_print_handler; alias c_g_set_printerr_handler g_set_printerr_handler; // glib.Quark alias c_g_intern_static_string g_intern_static_string; alias c_g_intern_string g_intern_string; alias c_g_quark_from_static_string g_quark_from_static_string; alias c_g_quark_from_string g_quark_from_string; alias c_g_quark_to_string g_quark_to_string; alias c_g_quark_try_string g_quark_try_string; // glib.ShellUtils alias c_g_shell_error_quark g_shell_error_quark; alias c_g_shell_parse_argv g_shell_parse_argv; alias c_g_shell_quote g_shell_quote; alias c_g_shell_unquote g_shell_unquote; // glib.Unicode alias c_g_ucs4_to_utf16 g_ucs4_to_utf16; alias c_g_ucs4_to_utf8 g_ucs4_to_utf8; alias c_g_unichar_break_type g_unichar_break_type; alias c_g_unichar_combining_class g_unichar_combining_class; alias c_g_unichar_compose g_unichar_compose; alias c_g_unichar_decompose g_unichar_decompose; alias c_g_unichar_digit_value g_unichar_digit_value; alias c_g_unichar_fully_decompose g_unichar_fully_decompose; alias c_g_unichar_get_mirror_char g_unichar_get_mirror_char; alias c_g_unichar_get_script g_unichar_get_script; alias c_g_unichar_isalnum g_unichar_isalnum; alias c_g_unichar_isalpha g_unichar_isalpha; alias c_g_unichar_iscntrl g_unichar_iscntrl; alias c_g_unichar_isdefined g_unichar_isdefined; alias c_g_unichar_isdigit g_unichar_isdigit; alias c_g_unichar_isgraph g_unichar_isgraph; alias c_g_unichar_islower g_unichar_islower; alias c_g_unichar_ismark g_unichar_ismark; alias c_g_unichar_isprint g_unichar_isprint; alias c_g_unichar_ispunct g_unichar_ispunct; alias c_g_unichar_isspace g_unichar_isspace; alias c_g_unichar_istitle g_unichar_istitle; alias c_g_unichar_isupper g_unichar_isupper; alias c_g_unichar_iswide g_unichar_iswide; alias c_g_unichar_iswide_cjk g_unichar_iswide_cjk; alias c_g_unichar_isxdigit g_unichar_isxdigit; alias c_g_unichar_iszerowidth g_unichar_iszerowidth; alias c_g_unichar_to_utf8 g_unichar_to_utf8; alias c_g_unichar_tolower g_unichar_tolower; alias c_g_unichar_totitle g_unichar_totitle; alias c_g_unichar_toupper g_unichar_toupper; alias c_g_unichar_type g_unichar_type; alias c_g_unichar_validate g_unichar_validate; alias c_g_unichar_xdigit_value g_unichar_xdigit_value; alias c_g_unicode_canonical_decomposition g_unicode_canonical_decomposition; alias c_g_unicode_canonical_ordering g_unicode_canonical_ordering; alias c_g_unicode_script_from_iso15924 g_unicode_script_from_iso15924; alias c_g_unicode_script_to_iso15924 g_unicode_script_to_iso15924; alias c_g_utf16_to_ucs4 g_utf16_to_ucs4; alias c_g_utf16_to_utf8 g_utf16_to_utf8; alias c_g_utf8_casefold g_utf8_casefold; alias c_g_utf8_collate g_utf8_collate; alias c_g_utf8_collate_key g_utf8_collate_key; alias c_g_utf8_collate_key_for_filename g_utf8_collate_key_for_filename; alias c_g_utf8_find_next_char g_utf8_find_next_char; alias c_g_utf8_find_prev_char g_utf8_find_prev_char; alias c_g_utf8_get_char g_utf8_get_char; alias c_g_utf8_get_char_validated g_utf8_get_char_validated; alias c_g_utf8_normalize g_utf8_normalize; alias c_g_utf8_offset_to_pointer g_utf8_offset_to_pointer; alias c_g_utf8_pointer_to_offset g_utf8_pointer_to_offset; alias c_g_utf8_prev_char g_utf8_prev_char; alias c_g_utf8_strchr g_utf8_strchr; alias c_g_utf8_strdown g_utf8_strdown; alias c_g_utf8_strlen g_utf8_strlen; alias c_g_utf8_strncpy g_utf8_strncpy; alias c_g_utf8_strrchr g_utf8_strrchr; alias c_g_utf8_strreverse g_utf8_strreverse; alias c_g_utf8_strup g_utf8_strup; alias c_g_utf8_substring g_utf8_substring; alias c_g_utf8_to_ucs4 g_utf8_to_ucs4; alias c_g_utf8_to_ucs4_fast g_utf8_to_ucs4_fast; alias c_g_utf8_to_utf16 g_utf8_to_utf16; alias c_g_utf8_validate g_utf8_validate; alias c_g_utf8_make_valid g_utf8_make_valid; // glib.UnixUtils alias c_g_unix_error_quark g_unix_error_quark; alias c_g_unix_fd_add g_unix_fd_add; alias c_g_unix_fd_add_full g_unix_fd_add_full; alias c_g_unix_fd_source_new g_unix_fd_source_new; alias c_g_unix_open_pipe g_unix_open_pipe; alias c_g_unix_set_fd_nonblocking g_unix_set_fd_nonblocking; alias c_g_unix_signal_add g_unix_signal_add; alias c_g_unix_signal_add_full g_unix_signal_add_full; alias c_g_unix_signal_source_new g_unix_signal_source_new; // glib.URI alias c_g_filename_from_uri g_filename_from_uri; alias c_g_filename_to_uri g_filename_to_uri; alias c_g_uri_escape_string g_uri_escape_string; alias c_g_uri_list_extract_uris g_uri_list_extract_uris; alias c_g_uri_parse_scheme g_uri_parse_scheme; alias c_g_uri_unescape_segment g_uri_unescape_segment; alias c_g_uri_unescape_string g_uri_unescape_string; // glib.Uuid alias c_g_uuid_string_is_valid g_uuid_string_is_valid; alias c_g_uuid_string_random g_uuid_string_random; // glib.Version alias c_glib_check_version glib_check_version; GtkD-3.7.5/generated/gtkd/glib/c/types.d000066400000000000000000004276711324604450400177410ustar00rootroot00000000000000/* * 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 glib.c.types; public alias uint uid_t; public alias int pid_t; version( Windows ) { alias int glong; alias uint gulong; } else version( X86_64 ) { alias long glong; alias ulong gulong; } else { alias int glong; alias uint gulong; } version (Windows) { private import core.stdc.stdio; static if( !is(typeof(fdopen(0, null))) ) { extern (C) FILE* fdopen(int, char*); } } struct Scoped(T) { T payload; alias payload this; @disable this(); @disable this(this); ~this() { .destroy(payload); } } auto getScopedGobject(T, Args...)(auto ref Args args) if (is(T == class)) { Scoped!(T) result = void; result.payload = new T(args); return result; } /** * Get the length of a zero terminated array. */ size_t getArrayLength(T)(T* arr) { size_t len; for ( ; arr[len]; len++ ){} return len; } unittest { assert(getArrayLength("aaaaaaaaa\0".ptr) == 9); } Type* gMalloc(Type)() { import glib.c.functions; return cast(Type*)g_malloc0(Type.sizeof); } alias void* GIConv; /** * Integer representing a day of the month; between 1 and 31. * #G_DATE_BAD_DAY represents an invalid day of the month. */ public alias ubyte GDateDay; /** * Integer representing a year; #G_DATE_BAD_YEAR is the invalid * value. The year must be 1 or higher; negative (BC) years are not * allowed. The year is represented with four digits. */ public alias ushort GDateYear; /** * Opaque type. See g_mutex_locker_new() for details. */ public alias void GMutexLocker; /** * A type which is used to hold a process identification. * * On UNIX, processes are identified by a process id (an integer), * while Windows uses process handles (which are pointers). * * GPid is used in GLib only for descendant processes spawned with * the g_spawn functions. */ public alias int GPid; /** * A GQuark is a non-zero integer which uniquely identifies a * particular string. A GQuark value of zero is associated to %NULL. */ public alias uint GQuark; /** * A typedef alias for gchar**. This is mostly useful when used together with * g_auto(). */ public alias char** GStrv; /** * Simply a replacement for time_t. It has been deprecated * since it is not equivalent to time_t on 64-bit platforms * with a 64-bit time_t. Unrelated to #GTimer. * * Note that #GTime is defined to always be a 32-bit integer, * unlike time_t which may be 64-bit on some systems. Therefore, * #GTime will overflow in the year 2038, and you cannot use the * address of a #GTime variable as argument to the UNIX time() * function. * * Instead, do the following: * |[ * time_t ttime; * GTime gtime; * * time (&ttime); * gtime = (GTime)ttime; * ]| */ public alias int GTime; /** * A value representing an interval of time, in microseconds. */ public alias long GTimeSpan; enum GPriority { HIGH = -100, DEFAULT = 0, HIGH_IDLE = 100, DEFAULT_IDLE = 200, LOW = 300 } public enum GAsciiType { ALNUM = 1, ALPHA = 2, CNTRL = 4, DIGIT = 8, GRAPH = 16, LOWER = 32, PRINT = 64, PUNCT = 128, SPACE = 256, UPPER = 512, XDIGIT = 1024, } alias GAsciiType AsciiType; /** * Error codes returned by bookmark file parsing. */ public enum GBookmarkFileError { /** * URI was ill-formed */ INVALID_URI = 0, /** * a requested field was not found */ INVALID_VALUE = 1, /** * a requested application did * not register a bookmark */ APP_NOT_REGISTERED = 2, /** * a requested URI was not found */ URI_NOT_FOUND = 3, /** * document was ill formed */ READ = 4, /** * the text being parsed was * in an unknown encoding */ UNKNOWN_ENCODING = 5, /** * an error occurred while writing */ WRITE = 6, /** * requested file was not found */ FILE_NOT_FOUND = 7, } alias GBookmarkFileError BookmarkFileError; /** * The hashing algorithm to be used by #GChecksum when performing the * digest of some data. * * Note that the #GChecksumType enumeration may be extended at a later * date to include new hashing algorithm types. * * Since: 2.16 */ public enum GChecksumType { /** * Use the MD5 hashing algorithm */ MD5 = 0, /** * Use the SHA-1 hashing algorithm */ SHA1 = 1, /** * Use the SHA-256 hashing algorithm */ SHA256 = 2, /** * Use the SHA-512 hashing algorithm (Since: 2.36) */ SHA512 = 3, /** * Use the SHA-384 hashing algorithm (Since: 2.51) */ SHA384 = 4, } alias GChecksumType ChecksumType; /** * Error codes returned by character set conversion routines. */ public enum GConvertError { /** * Conversion between the requested character * sets is not supported. */ NO_CONVERSION = 0, /** * Invalid byte sequence in conversion input. */ ILLEGAL_SEQUENCE = 1, /** * Conversion failed for some reason. */ FAILED = 2, /** * Partial character sequence at end of input. */ PARTIAL_INPUT = 3, /** * URI is invalid. */ BAD_URI = 4, /** * Pathname is not an absolute path. */ NOT_ABSOLUTE_PATH = 5, /** * No memory available. Since: 2.40 */ NO_MEMORY = 6, } alias GConvertError ConvertError; /** * This enumeration isn't used in the API, but may be useful if you need * to mark a number as a day, month, or year. */ public enum GDateDMY { /** * a day */ DAY = 0, /** * a month */ MONTH = 1, /** * a year */ YEAR = 2, } alias GDateDMY DateDMY; /** * Enumeration representing a month; values are #G_DATE_JANUARY, * #G_DATE_FEBRUARY, etc. #G_DATE_BAD_MONTH is the invalid value. */ public enum GDateMonth { /** * invalid value */ BAD_MONTH = 0, /** * January */ JANUARY = 1, /** * February */ FEBRUARY = 2, /** * March */ MARCH = 3, /** * April */ APRIL = 4, /** * May */ MAY = 5, /** * June */ JUNE = 6, /** * July */ JULY = 7, /** * August */ AUGUST = 8, /** * September */ SEPTEMBER = 9, /** * October */ OCTOBER = 10, /** * November */ NOVEMBER = 11, /** * December */ DECEMBER = 12, } alias GDateMonth DateMonth; /** * Enumeration representing a day of the week; #G_DATE_MONDAY, * #G_DATE_TUESDAY, etc. #G_DATE_BAD_WEEKDAY is an invalid weekday. */ public enum GDateWeekday { /** * invalid value */ BAD_WEEKDAY = 0, /** * Monday */ MONDAY = 1, /** * Tuesday */ TUESDAY = 2, /** * Wednesday */ WEDNESDAY = 3, /** * Thursday */ THURSDAY = 4, /** * Friday */ FRIDAY = 5, /** * Saturday */ SATURDAY = 6, /** * Sunday */ SUNDAY = 7, } alias GDateWeekday DateWeekday; /** * The possible errors, used in the @v_error field * of #GTokenValue, when the token is a %G_TOKEN_ERROR. */ public enum GErrorType { /** * unknown error */ UNKNOWN = 0, /** * unexpected end of file */ UNEXP_EOF = 1, /** * unterminated string constant */ UNEXP_EOF_IN_STRING = 2, /** * unterminated comment */ UNEXP_EOF_IN_COMMENT = 3, /** * non-digit character in a number */ NON_DIGIT_IN_CONST = 4, /** * digit beyond radix in a number */ DIGIT_RADIX = 5, /** * non-decimal floating point number */ FLOAT_RADIX = 6, /** * malformed floating point number */ FLOAT_MALFORMED = 7, } alias GErrorType ErrorType; /** * Values corresponding to @errno codes returned from file operations * on UNIX. Unlike @errno codes, GFileError values are available on * all systems, even Windows. The exact meaning of each code depends * on what sort of file operation you were performing; the UNIX * documentation gives more details. The following error code descriptions * come from the GNU C Library manual, and are under the copyright * of that manual. * * It's not very portable to make detailed assumptions about exactly * which errors will be returned from a given operation. Some errors * don't occur on some systems, etc., sometimes there are subtle * differences in when a system will report a given error, etc. */ public enum GFileError { /** * Operation not permitted; only the owner of * the file (or other resource) or processes with special privileges * can perform the operation. */ EXIST = 0, /** * File is a directory; you cannot open a directory * for writing, or create or remove hard links to it. */ ISDIR = 1, /** * Permission denied; the file permissions do not * allow the attempted operation. */ ACCES = 2, /** * Filename too long. */ NAMETOOLONG = 3, /** * No such file or directory. This is a "file * doesn't exist" error for ordinary files that are referenced in * contexts where they are expected to already exist. */ NOENT = 4, /** * A file that isn't a directory was specified when * a directory is required. */ NOTDIR = 5, /** * No such device or address. The system tried to * use the device represented by a file you specified, and it * couldn't find the device. This can mean that the device file was * installed incorrectly, or that the physical device is missing or * not correctly attached to the computer. */ NXIO = 6, /** * The underlying file system of the specified file * does not support memory mapping. */ NODEV = 7, /** * The directory containing the new link can't be * modified because it's on a read-only file system. */ ROFS = 8, /** * Text file busy. */ TXTBSY = 9, /** * You passed in a pointer to bad memory. * (GLib won't reliably return this, don't pass in pointers to bad * memory.) */ FAULT = 10, /** * Too many levels of symbolic links were encountered * in looking up a file name. This often indicates a cycle of symbolic * links. */ LOOP = 11, /** * No space left on device; write operation on a * file failed because the disk is full. */ NOSPC = 12, /** * No memory available. The system cannot allocate * more virtual memory because its capacity is full. */ NOMEM = 13, /** * The current process has too many files open and * can't open any more. Duplicate descriptors do count toward this * limit. */ MFILE = 14, /** * There are too many distinct file openings in the * entire system. */ NFILE = 15, /** * Bad file descriptor; for example, I/O on a * descriptor that has been closed or reading from a descriptor open * only for writing (or vice versa). */ BADF = 16, /** * Invalid argument. This is used to indicate * various kinds of problems with passing the wrong argument to a * library function. */ INVAL = 17, /** * Broken pipe; there is no process reading from the * other end of a pipe. Every library function that returns this * error code also generates a 'SIGPIPE' signal; this signal * terminates the program if not handled or blocked. Thus, your * program will never actually see this code unless it has handled * or blocked 'SIGPIPE'. */ PIPE = 18, /** * Resource temporarily unavailable; the call might * work if you try again later. */ AGAIN = 19, /** * Interrupted function call; an asynchronous signal * occurred and prevented completion of the call. When this * happens, you should try the call again. */ INTR = 20, /** * Input/output error; usually used for physical read * or write errors. i.e. the disk or other physical device hardware * is returning errors. */ IO = 21, /** * Operation not permitted; only the owner of the * file (or other resource) or processes with special privileges can * perform the operation. */ PERM = 22, /** * Function not implemented; this indicates that * the system is missing some functionality. */ NOSYS = 23, /** * Does not correspond to a UNIX error code; this * is the standard "failed for unspecified reason" error code present * in all #GError error code enumerations. Returned if no specific * code applies. */ FAILED = 24, } alias GFileError FileError; /** * A test to perform on a file using g_file_test(). */ public enum GFileTest { /** * %TRUE if the file is a regular file * (not a directory). Note that this test will also return %TRUE * if the tested file is a symlink to a regular file. */ IS_REGULAR = 1, /** * %TRUE if the file is a symlink. */ IS_SYMLINK = 2, /** * %TRUE if the file is a directory. */ IS_DIR = 4, /** * %TRUE if the file is executable. */ IS_EXECUTABLE = 8, /** * %TRUE if the file exists. It may or may not * be a regular file. */ EXISTS = 16, } alias GFileTest FileTest; /** * Flags to modify the format of the string returned by g_format_size_full(). */ public enum GFormatSizeFlags { /** * behave the same as g_format_size() */ DEFAULT = 0, /** * include the exact number of bytes as part * of the returned string. For example, "45.6 kB (45,612 bytes)". */ LONG_FORMAT = 1, /** * use IEC (base 1024) units with "KiB"-style * suffixes. IEC units should only be used for reporting things with * a strong "power of 2" basis, like RAM sizes or RAID stripe sizes. * Network and storage sizes should be reported in the normal SI units. */ IEC_UNITS = 2, } alias GFormatSizeFlags FormatSizeFlags; /** * Flags used internally in the #GHook implementation. */ public enum GHookFlagMask { /** * set if the hook has not been destroyed */ ACTIVE = 1, /** * set if the hook is currently being run */ IN_CALL = 2, /** * A mask covering all bits reserved for * hook flags; see %G_HOOK_FLAG_USER_SHIFT */ MASK = 15, } alias GHookFlagMask HookFlagMask; /** * Error codes returned by #GIOChannel operations. */ public enum GIOChannelError { /** * File too large. */ FBIG = 0, /** * Invalid argument. */ INVAL = 1, /** * IO error. */ IO = 2, /** * File is a directory. */ ISDIR = 3, /** * No space left on device. */ NOSPC = 4, /** * No such device or address. */ NXIO = 5, /** * Value too large for defined datatype. */ OVERFLOW = 6, /** * Broken pipe. */ PIPE = 7, /** * Some other error. */ FAILED = 8, } alias GIOChannelError IOChannelError; /** * A bitwise combination representing a condition to watch for on an * event source. */ public enum GIOCondition { /** * There is data to read. */ IN = 1, /** * Data can be written (without blocking). */ OUT = 4, /** * There is urgent data to read. */ PRI = 2, /** * Error condition. */ ERR = 8, /** * Hung up (the connection has been broken, usually for * pipes and sockets). */ HUP = 16, /** * Invalid request. The file descriptor is not open. */ NVAL = 32, } alias GIOCondition IOCondition; /** * #GIOError is only used by the deprecated functions * g_io_channel_read(), g_io_channel_write(), and g_io_channel_seek(). */ public enum GIOError { /** * no error */ NONE = 0, /** * an EAGAIN error occurred */ AGAIN = 1, /** * an EINVAL error occurred */ INVAL = 2, /** * another error occurred */ UNKNOWN = 3, } alias GIOError IOError; /** * Specifies properties of a #GIOChannel. Some of the flags can only be * read with g_io_channel_get_flags(), but not changed with * g_io_channel_set_flags(). */ public enum GIOFlags { /** * turns on append mode, corresponds to %O_APPEND * (see the documentation of the UNIX open() syscall) */ APPEND = 1, /** * turns on nonblocking mode, corresponds to * %O_NONBLOCK/%O_NDELAY (see the documentation of the UNIX open() * syscall) */ NONBLOCK = 2, /** * indicates that the io channel is readable. * This flag cannot be changed. */ IS_READABLE = 4, /** * indicates that the io channel is writable. * This flag cannot be changed. */ IS_WRITABLE = 8, /** * a misspelled version of @G_IO_FLAG_IS_WRITABLE * that existed before the spelling was fixed in GLib 2.30. It is kept * here for compatibility reasons. Deprecated since 2.30 */ IS_WRITEABLE = 8, /** * indicates that the io channel is seekable, * i.e. that g_io_channel_seek_position() can be used on it. * This flag cannot be changed. */ IS_SEEKABLE = 16, /** * the mask that specifies all the valid flags. */ MASK = 31, /** * the mask of the flags that are returned from * g_io_channel_get_flags() */ GET_MASK = 31, /** * the mask of the flags that the user can modify * with g_io_channel_set_flags() */ SET_MASK = 3, } alias GIOFlags IOFlags; /** * Stati returned by most of the #GIOFuncs functions. */ public enum GIOStatus { /** * An error occurred. */ ERROR = 0, /** * Success. */ NORMAL = 1, /** * End of file. */ EOF = 2, /** * Resource temporarily unavailable. */ AGAIN = 3, } alias GIOStatus IOStatus; /** * Error codes returned by key file parsing. */ public enum GKeyFileError { /** * the text being parsed was in * an unknown encoding */ UNKNOWN_ENCODING = 0, /** * document was ill-formed */ PARSE = 1, /** * the file was not found */ NOT_FOUND = 2, /** * a requested key was not found */ KEY_NOT_FOUND = 3, /** * a requested group was not found */ GROUP_NOT_FOUND = 4, /** * a value could not be parsed */ INVALID_VALUE = 5, } alias GKeyFileError KeyFileError; /** * Flags which influence the parsing. */ public enum GKeyFileFlags { /** * No flags, default behaviour */ NONE = 0, /** * Use this flag if you plan to write the * (possibly modified) contents of the key file back to a file; * otherwise all comments will be lost when the key file is * written back. */ KEEP_COMMENTS = 1, /** * Use this flag if you plan to write the * (possibly modified) contents of the key file back to a file; * otherwise only the translations for the current language will be * written back. */ KEEP_TRANSLATIONS = 2, } alias GKeyFileFlags KeyFileFlags; /** * Flags specifying the level of log messages. * * It is possible to change how GLib treats messages of the various * levels using g_log_set_handler() and g_log_set_fatal_mask(). */ public enum GLogLevelFlags { /** * internal flag */ FLAG_RECURSION = 1, /** * internal flag */ FLAG_FATAL = 2, /** * log level for errors, see g_error(). * This level is also used for messages produced by g_assert(). */ LEVEL_ERROR = 4, /** * log level for critical warning messages, see * g_critical(). * This level is also used for messages produced by g_return_if_fail() * and g_return_val_if_fail(). */ LEVEL_CRITICAL = 8, /** * log level for warnings, see g_warning() */ LEVEL_WARNING = 16, /** * log level for messages, see g_message() */ LEVEL_MESSAGE = 32, /** * log level for informational messages, see g_info() */ LEVEL_INFO = 64, /** * log level for debug messages, see g_debug() */ LEVEL_DEBUG = 128, /** * a mask including all log levels */ LEVEL_MASK = -4, } alias GLogLevelFlags LogLevelFlags; /** * Return values from #GLogWriterFuncs to indicate whether the given log entry * was successfully handled by the writer, or whether there was an error in * handling it (and hence a fallback writer should be used). * * If a #GLogWriterFunc ignores a log entry, it should return * %G_LOG_WRITER_HANDLED. * * Since: 2.50 */ public enum GLogWriterOutput { /** * Log writer has handled the log entry. */ HANDLED = 1, /** * Log writer could not handle the log entry. */ UNHANDLED = 0, } alias GLogWriterOutput LogWriterOutput; /** * A mixed enumerated type and flags field. You must specify one type * (string, strdup, boolean, tristate). Additionally, you may optionally * bitwise OR the type with the flag %G_MARKUP_COLLECT_OPTIONAL. * * It is likely that this enum will be extended in the future to * support other types. */ public enum GMarkupCollectType { /** * used to terminate the list of attributes * to collect */ INVALID = 0, /** * collect the string pointer directly from * the attribute_values[] array. Expects a parameter of type (const * char **). If %G_MARKUP_COLLECT_OPTIONAL is specified and the * attribute isn't present then the pointer will be set to %NULL */ STRING = 1, /** * as with %G_MARKUP_COLLECT_STRING, but * expects a parameter of type (char **) and g_strdup()s the * returned pointer. The pointer must be freed with g_free() */ STRDUP = 2, /** * expects a parameter of type (gboolean *) * and parses the attribute value as a boolean. Sets %FALSE if the * attribute isn't present. Valid boolean values consist of * (case-insensitive) "false", "f", "no", "n", "0" and "true", "t", * "yes", "y", "1" */ BOOLEAN = 3, /** * as with %G_MARKUP_COLLECT_BOOLEAN, but * in the case of a missing attribute a value is set that compares * equal to neither %FALSE nor %TRUE G_MARKUP_COLLECT_OPTIONAL is * implied */ TRISTATE = 4, /** * can be bitwise ORed with the other fields. * If present, allows the attribute not to appear. A default value * is set depending on what value type is used */ OPTIONAL = 65536, } alias GMarkupCollectType MarkupCollectType; /** * Error codes returned by markup parsing. */ public enum GMarkupError { /** * text being parsed was not valid UTF-8 */ BAD_UTF8 = 0, /** * document contained nothing, or only whitespace */ EMPTY = 1, /** * document was ill-formed */ PARSE = 2, /** * error should be set by #GMarkupParser * functions; element wasn't known */ UNKNOWN_ELEMENT = 3, /** * error should be set by #GMarkupParser * functions; attribute wasn't known */ UNKNOWN_ATTRIBUTE = 4, /** * error should be set by #GMarkupParser * functions; content was invalid */ INVALID_CONTENT = 5, /** * error should be set by #GMarkupParser * functions; a required attribute was missing */ MISSING_ATTRIBUTE = 6, } alias GMarkupError MarkupError; /** * Flags that affect the behaviour of the parser. */ public enum GMarkupParseFlags { /** * flag you should not use */ DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1, /** * When this flag is set, CDATA marked * sections are not passed literally to the @passthrough function of * the parser. Instead, the content of the section (without the * ``) is * passed to the @text function. This flag was added in GLib 2.12 */ TREAT_CDATA_AS_TEXT = 2, /** * Normally errors caught by GMarkup * itself have line/column information prefixed to them to let the * caller know the location of the error. When this flag is set the * location information is also prefixed to errors generated by the * #GMarkupParser implementation functions */ PREFIX_ERROR_POSITION = 4, /** * Ignore (don't report) qualified * attributes and tags, along with their contents. A qualified * attribute or tag is one that contains ':' in its name (ie: is in * another namespace). Since: 2.40. */ IGNORE_QUALIFIED = 8, } alias GMarkupParseFlags MarkupParseFlags; /** * Defines how a Unicode string is transformed in a canonical * form, standardizing such issues as whether a character with * an accent is represented as a base character and combining * accent or as a single precomposed character. Unicode strings * should generally be normalized before comparing them. */ public enum GNormalizeMode { /** * standardize differences that do not affect the * text content, such as the above-mentioned accent representation */ DEFAULT = 0, /** * another name for %G_NORMALIZE_DEFAULT */ NFD = 0, /** * like %G_NORMALIZE_DEFAULT, but with * composed forms rather than a maximally decomposed form */ DEFAULT_COMPOSE = 1, /** * another name for %G_NORMALIZE_DEFAULT_COMPOSE */ NFC = 1, /** * beyond %G_NORMALIZE_DEFAULT also standardize the * "compatibility" characters in Unicode, such as SUPERSCRIPT THREE * to the standard forms (in this case DIGIT THREE). Formatting * information may be lost but for most text operations such * characters should be considered the same */ ALL = 2, /** * another name for %G_NORMALIZE_ALL */ NFKD = 2, /** * like %G_NORMALIZE_ALL, but with composed * forms rather than a maximally decomposed form */ ALL_COMPOSE = 3, /** * another name for %G_NORMALIZE_ALL_COMPOSE */ NFKC = 3, } alias GNormalizeMode NormalizeMode; /** * Error codes returned by functions converting a string to a number. * * Since: 2.54 */ public enum GNumberParserError { /** * String was not a valid number. */ INVALID = 0, /** * String was a number, but out of bounds. */ OUT_OF_BOUNDS = 1, } alias GNumberParserError NumberParserError; /** * The possible statuses of a one-time initialization function * controlled by a #GOnce struct. * * Since: 2.4 */ public enum GOnceStatus { /** * the function has not been called yet. */ NOTCALLED = 0, /** * the function call is currently in progress. */ PROGRESS = 1, /** * the function has been called. */ READY = 2, } alias GOnceStatus OnceStatus; /** * The #GOptionArg enum values determine which type of extra argument the * options expect to find. If an option expects an extra argument, it can * be specified in several ways; with a short option: `-x arg`, with a long * option: `--name arg` or combined in a single argument: `--name=arg`. */ public enum GOptionArg { /** * No extra argument. This is useful for simple flags. */ NONE = 0, /** * The option takes a string argument. */ STRING = 1, /** * The option takes an integer argument. */ INT = 2, /** * The option provides a callback (of type * #GOptionArgFunc) to parse the extra argument. */ CALLBACK = 3, /** * The option takes a filename as argument. */ FILENAME = 4, /** * The option takes a string argument, multiple * uses of the option are collected into an array of strings. */ STRING_ARRAY = 5, /** * The option takes a filename as argument, * multiple uses of the option are collected into an array of strings. */ FILENAME_ARRAY = 6, /** * The option takes a double argument. The argument * can be formatted either for the user's locale or for the "C" locale. * Since 2.12 */ DOUBLE = 7, /** * The option takes a 64-bit integer. Like * %G_OPTION_ARG_INT but for larger numbers. The number can be in * decimal base, or in hexadecimal (when prefixed with `0x`, for * example, `0xffffffff`). Since 2.12 */ INT64 = 8, } alias GOptionArg OptionArg; /** * Error codes returned by option parsing. */ public enum GOptionError { /** * An option was not known to the parser. * This error will only be reported, if the parser hasn't been instructed * to ignore unknown options, see g_option_context_set_ignore_unknown_options(). */ UNKNOWN_OPTION = 0, /** * A value couldn't be parsed. */ BAD_VALUE = 1, /** * A #GOptionArgFunc callback failed. */ FAILED = 2, } alias GOptionError OptionError; /** * Flags which modify individual options. */ public enum GOptionFlags { /** * No flags. Since: 2.42. */ NONE = 0, /** * The option doesn't appear in `--help` output. */ HIDDEN = 1, /** * The option appears in the main section of the * `--help` output, even if it is defined in a group. */ IN_MAIN = 2, /** * For options of the %G_OPTION_ARG_NONE kind, this * flag indicates that the sense of the option is reversed. */ REVERSE = 4, /** * For options of the %G_OPTION_ARG_CALLBACK kind, * this flag indicates that the callback does not take any argument * (like a %G_OPTION_ARG_NONE option). Since 2.8 */ NO_ARG = 8, /** * For options of the %G_OPTION_ARG_CALLBACK * kind, this flag indicates that the argument should be passed to the * callback in the GLib filename encoding rather than UTF-8. Since 2.8 */ FILENAME = 16, /** * For options of the %G_OPTION_ARG_CALLBACK * kind, this flag indicates that the argument supply is optional. * If no argument is given then data of %GOptionParseFunc will be * set to NULL. Since 2.8 */ OPTIONAL_ARG = 32, /** * This flag turns off the automatic conflict * resolution which prefixes long option names with `groupname-` if * there is a conflict. This option should only be used in situations * where aliasing is necessary to model some legacy commandline interface. * It is not safe to use this option, unless all option groups are under * your direct control. Since 2.8. */ NOALIAS = 64, } alias GOptionFlags OptionFlags; /** * Flags specifying compile-time options. * * Since: 2.14 */ public enum GRegexCompileFlags { /** * Letters in the pattern match both upper- and * lowercase letters. This option can be changed within a pattern * by a "(?i)" option setting. */ CASELESS = 1, /** * By default, GRegex treats the strings as consisting * of a single line of characters (even if it actually contains * newlines). The "start of line" metacharacter ("^") matches only * at the start of the string, while the "end of line" metacharacter * ("$") matches only at the end of the string, or before a terminating * newline (unless #G_REGEX_DOLLAR_ENDONLY is set). When * #G_REGEX_MULTILINE is set, the "start of line" and "end of line" * constructs match immediately following or immediately before any * newline in the string, respectively, as well as at the very start * and end. This can be changed within a pattern by a "(?m)" option * setting. */ MULTILINE = 2, /** * A dot metacharater (".") in the pattern matches all * characters, including newlines. Without it, newlines are excluded. * This option can be changed within a pattern by a ("?s") option setting. */ DOTALL = 4, /** * Whitespace data characters in the pattern are * totally ignored except when escaped or inside a character class. * Whitespace does not include the VT character (code 11). In addition, * characters between an unescaped "#" outside a character class and * the next newline character, inclusive, are also ignored. This can * be changed within a pattern by a "(?x)" option setting. */ EXTENDED = 8, /** * The pattern is forced to be "anchored", that is, * it is constrained to match only at the first matching point in the * string that is being searched. This effect can also be achieved by * appropriate constructs in the pattern itself such as the "^" * metacharater. */ ANCHORED = 16, /** * A dollar metacharacter ("$") in the pattern * matches only at the end of the string. Without this option, a * dollar also matches immediately before the final character if * it is a newline (but not before any other newlines). This option * is ignored if #G_REGEX_MULTILINE is set. */ DOLLAR_ENDONLY = 32, /** * Inverts the "greediness" of the quantifiers so that * they are not greedy by default, but become greedy if followed by "?". * It can also be set by a "(?U)" option setting within the pattern. */ UNGREEDY = 512, /** * Usually strings must be valid UTF-8 strings, using this * flag they are considered as a raw sequence of bytes. */ RAW = 2048, /** * Disables the use of numbered capturing * parentheses in the pattern. Any opening parenthesis that is not * followed by "?" behaves as if it were followed by "?:" but named * parentheses can still be used for capturing (and they acquire numbers * in the usual way). */ NO_AUTO_CAPTURE = 4096, /** * Optimize the regular expression. If the pattern will * be used many times, then it may be worth the effort to optimize it * to improve the speed of matches. */ OPTIMIZE = 8192, /** * Limits an unanchored pattern to match before (or at) the * first newline. Since: 2.34 */ FIRSTLINE = 262144, /** * Names used to identify capturing subpatterns need not * be unique. This can be helpful for certain types of pattern when it * is known that only one instance of the named subpattern can ever be * matched. */ DUPNAMES = 524288, /** * Usually any newline character or character sequence is * recognized. If this option is set, the only recognized newline character * is '\r'. */ NEWLINE_CR = 1048576, /** * Usually any newline character or character sequence is * recognized. If this option is set, the only recognized newline character * is '\n'. */ NEWLINE_LF = 2097152, /** * Usually any newline character or character sequence is * recognized. If this option is set, the only recognized newline character * sequence is '\r\n'. */ NEWLINE_CRLF = 3145728, /** * Usually any newline character or character sequence * is recognized. If this option is set, the only recognized newline character * sequences are '\r', '\n', and '\r\n'. Since: 2.34 */ NEWLINE_ANYCRLF = 5242880, /** * Usually any newline character or character sequence * is recognised. If this option is set, then "\R" only recognizes the newline * characters '\r', '\n' and '\r\n'. Since: 2.34 */ BSR_ANYCRLF = 8388608, /** * Changes behaviour so that it is compatible with * JavaScript rather than PCRE. Since: 2.34 */ JAVASCRIPT_COMPAT = 33554432, } alias GRegexCompileFlags RegexCompileFlags; /** * Error codes returned by regular expressions functions. * * Since: 2.14 */ public enum GRegexError { /** * Compilation of the regular expression failed. */ COMPILE = 0, /** * Optimization of the regular expression failed. */ OPTIMIZE = 1, /** * Replacement failed due to an ill-formed replacement * string. */ REPLACE = 2, /** * The match process failed. */ MATCH = 3, /** * Internal error of the regular expression engine. * Since 2.16 */ INTERNAL = 4, /** * "\\" at end of pattern. Since 2.16 */ STRAY_BACKSLASH = 101, /** * "\\c" at end of pattern. Since 2.16 */ MISSING_CONTROL_CHAR = 102, /** * Unrecognized character follows "\\". * Since 2.16 */ UNRECOGNIZED_ESCAPE = 103, /** * Numbers out of order in "{}" * quantifier. Since 2.16 */ QUANTIFIERS_OUT_OF_ORDER = 104, /** * Number too big in "{}" quantifier. * Since 2.16 */ QUANTIFIER_TOO_BIG = 105, /** * Missing terminating "]" for * character class. Since 2.16 */ UNTERMINATED_CHARACTER_CLASS = 106, /** * Invalid escape sequence * in character class. Since 2.16 */ INVALID_ESCAPE_IN_CHARACTER_CLASS = 107, /** * Range out of order in character class. * Since 2.16 */ RANGE_OUT_OF_ORDER = 108, /** * Nothing to repeat. Since 2.16 */ NOTHING_TO_REPEAT = 109, /** * Unrecognized character after "(?", * "(?<" or "(?P". Since 2.16 */ UNRECOGNIZED_CHARACTER = 112, /** * POSIX named classes are * supported only within a class. Since 2.16 */ POSIX_NAMED_CLASS_OUTSIDE_CLASS = 113, /** * Missing terminating ")" or ")" * without opening "(". Since 2.16 */ UNMATCHED_PARENTHESIS = 114, /** * Reference to non-existent * subpattern. Since 2.16 */ INEXISTENT_SUBPATTERN_REFERENCE = 115, /** * Missing terminating ")" after comment. * Since 2.16 */ UNTERMINATED_COMMENT = 118, /** * Regular expression too large. * Since 2.16 */ EXPRESSION_TOO_LARGE = 120, /** * Failed to get memory. Since 2.16 */ MEMORY_ERROR = 121, /** * Lookbehind assertion is not * fixed length. Since 2.16 */ VARIABLE_LENGTH_LOOKBEHIND = 125, /** * Malformed number or name after "(?(". * Since 2.16 */ MALFORMED_CONDITION = 126, /** * Conditional group contains * more than two branches. Since 2.16 */ TOO_MANY_CONDITIONAL_BRANCHES = 127, /** * Assertion expected after "(?(". * Since 2.16 */ ASSERTION_EXPECTED = 128, /** * Unknown POSIX class name. * Since 2.16 */ UNKNOWN_POSIX_CLASS_NAME = 130, /** * POSIX collating * elements are not supported. Since 2.16 */ POSIX_COLLATING_ELEMENTS_NOT_SUPPORTED = 131, /** * Character value in "\\x{...}" sequence * is too large. Since 2.16 */ HEX_CODE_TOO_LARGE = 134, /** * Invalid condition "(?(0)". Since 2.16 */ INVALID_CONDITION = 135, /** * \\C not allowed in * lookbehind assertion. Since 2.16 */ SINGLE_BYTE_MATCH_IN_LOOKBEHIND = 136, /** * Recursive call could loop indefinitely. * Since 2.16 */ INFINITE_LOOP = 140, /** * Missing terminator * in subpattern name. Since 2.16 */ MISSING_SUBPATTERN_NAME_TERMINATOR = 142, /** * Two named subpatterns have * the same name. Since 2.16 */ DUPLICATE_SUBPATTERN_NAME = 143, /** * Malformed "\\P" or "\\p" sequence. * Since 2.16 */ MALFORMED_PROPERTY = 146, /** * Unknown property name after "\\P" or * "\\p". Since 2.16 */ UNKNOWN_PROPERTY = 147, /** * Subpattern name is too long * (maximum 32 characters). Since 2.16 */ SUBPATTERN_NAME_TOO_LONG = 148, /** * Too many named subpatterns (maximum * 10,000). Since 2.16 */ TOO_MANY_SUBPATTERNS = 149, /** * Octal value is greater than "\\377". * Since 2.16 */ INVALID_OCTAL_VALUE = 151, /** * "DEFINE" group contains more * than one branch. Since 2.16 */ TOO_MANY_BRANCHES_IN_DEFINE = 154, /** * Repeating a "DEFINE" group is not allowed. * This error is never raised. Since: 2.16 Deprecated: 2.34 */ DEFINE_REPETION = 155, /** * Inconsistent newline options. * Since 2.16 */ INCONSISTENT_NEWLINE_OPTIONS = 156, /** * "\\g" is not followed by a braced, * angle-bracketed, or quoted name or number, or by a plain number. Since: 2.16 */ MISSING_BACK_REFERENCE = 157, /** * relative reference must not be zero. Since: 2.34 */ INVALID_RELATIVE_REFERENCE = 158, /** * the backtracing * control verb used does not allow an argument. Since: 2.34 */ BACKTRACKING_CONTROL_VERB_ARGUMENT_FORBIDDEN = 159, /** * unknown backtracing * control verb. Since: 2.34 */ UNKNOWN_BACKTRACKING_CONTROL_VERB = 160, /** * number is too big in escape sequence. Since: 2.34 */ NUMBER_TOO_BIG = 161, /** * Missing subpattern name. Since: 2.34 */ MISSING_SUBPATTERN_NAME = 162, /** * Missing digit. Since 2.34 */ MISSING_DIGIT = 163, /** * In JavaScript compatibility mode, * "[" is an invalid data character. Since: 2.34 */ INVALID_DATA_CHARACTER = 164, /** * different names for subpatterns of the * same number are not allowed. Since: 2.34 */ EXTRA_SUBPATTERN_NAME = 165, /** * the backtracing control * verb requires an argument. Since: 2.34 */ BACKTRACKING_CONTROL_VERB_ARGUMENT_REQUIRED = 166, /** * "\\c" must be followed by an ASCII * character. Since: 2.34 */ INVALID_CONTROL_CHAR = 168, /** * "\\k" is not followed by a braced, angle-bracketed, or * quoted name. Since: 2.34 */ MISSING_NAME = 169, /** * "\\N" is not supported in a class. Since: 2.34 */ NOT_SUPPORTED_IN_CLASS = 171, /** * too many forward references. Since: 2.34 */ TOO_MANY_FORWARD_REFERENCES = 172, /** * the name is too long in "(*MARK)", "(*PRUNE)", * "(*SKIP)", or "(*THEN)". Since: 2.34 */ NAME_TOO_LONG = 175, /** * the character value in the \\u sequence is * too large. Since: 2.34 */ CHARACTER_VALUE_TOO_LARGE = 176, } alias GRegexError RegexError; /** * Flags specifying match-time options. * * Since: 2.14 */ public enum GRegexMatchFlags { /** * The pattern is forced to be "anchored", that is, * it is constrained to match only at the first matching point in the * string that is being searched. This effect can also be achieved by * appropriate constructs in the pattern itself such as the "^" * metacharater. */ ANCHORED = 16, /** * Specifies that first character of the string is * not the beginning of a line, so the circumflex metacharacter should * not match before it. Setting this without #G_REGEX_MULTILINE (at * compile time) causes circumflex never to match. This option affects * only the behaviour of the circumflex metacharacter, it does not * affect "\A". */ NOTBOL = 128, /** * Specifies that the end of the subject string is * not the end of a line, so the dollar metacharacter should not match * it nor (except in multiline mode) a newline immediately before it. * Setting this without #G_REGEX_MULTILINE (at compile time) causes * dollar never to match. This option affects only the behaviour of * the dollar metacharacter, it does not affect "\Z" or "\z". */ NOTEOL = 256, /** * An empty string is not considered to be a valid * match if this option is set. If there are alternatives in the pattern, * they are tried. If all the alternatives match the empty string, the * entire match fails. For example, if the pattern "a?b?" is applied to * a string not beginning with "a" or "b", it matches the empty string * at the start of the string. With this flag set, this match is not * valid, so GRegex searches further into the string for occurrences * of "a" or "b". */ NOTEMPTY = 1024, /** * Turns on the partial matching feature, for more * documentation on partial matching see g_match_info_is_partial_match(). */ PARTIAL = 32768, /** * Overrides the newline definition set when * creating a new #GRegex, setting the '\r' character as line terminator. */ NEWLINE_CR = 1048576, /** * Overrides the newline definition set when * creating a new #GRegex, setting the '\n' character as line terminator. */ NEWLINE_LF = 2097152, /** * Overrides the newline definition set when * creating a new #GRegex, setting the '\r\n' characters sequence as line terminator. */ NEWLINE_CRLF = 3145728, /** * Overrides the newline definition set when * creating a new #GRegex, any Unicode newline sequence * is recognised as a newline. These are '\r', '\n' and '\rn', and the * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and * U+2029 PARAGRAPH SEPARATOR. */ NEWLINE_ANY = 4194304, /** * Overrides the newline definition set when * creating a new #GRegex; any '\r', '\n', or '\r\n' character sequence * is recognized as a newline. Since: 2.34 */ NEWLINE_ANYCRLF = 5242880, /** * Overrides the newline definition for "\R" set when * creating a new #GRegex; only '\r', '\n', or '\r\n' character sequences * are recognized as a newline by "\R". Since: 2.34 */ BSR_ANYCRLF = 8388608, /** * Overrides the newline definition for "\R" set when * creating a new #GRegex; any Unicode newline character or character sequence * are recognized as a newline by "\R". These are '\r', '\n' and '\rn', and the * single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), * U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and * U+2029 PARAGRAPH SEPARATOR. Since: 2.34 */ BSR_ANY = 16777216, /** * An alias for #G_REGEX_MATCH_PARTIAL. Since: 2.34 */ PARTIAL_SOFT = 32768, /** * Turns on the partial matching feature. In contrast to * to #G_REGEX_MATCH_PARTIAL_SOFT, this stops matching as soon as a partial match * is found, without continuing to search for a possible complete match. See * g_match_info_is_partial_match() for more information. Since: 2.34 */ PARTIAL_HARD = 134217728, /** * Like #G_REGEX_MATCH_NOTEMPTY, but only applied to * the start of the matched string. For anchored * patterns this can only happen for pattern containing "\K". Since: 2.34 */ NOTEMPTY_ATSTART = 268435456, } alias GRegexMatchFlags RegexMatchFlags; /** * An enumeration specifying the base position for a * g_io_channel_seek_position() operation. */ public enum GSeekType { /** * the current position in the file. */ CUR = 0, /** * the start of the file. */ SET = 1, /** * the end of the file. */ END = 2, } alias GSeekType SeekType; /** * Error codes returned by shell functions. */ public enum GShellError { /** * Mismatched or otherwise mangled quoting. */ BAD_QUOTING = 0, /** * String to be parsed was empty. */ EMPTY_STRING = 1, /** * Some other error. */ FAILED = 2, } alias GShellError ShellError; public enum GSliceConfig { ALWAYS_MALLOC = 1, BYPASS_MAGAZINES = 2, WORKING_SET_MSECS = 3, COLOR_INCREMENT = 4, CHUNK_SIZES = 5, CONTENTION_COUNTER = 6, } alias GSliceConfig SliceConfig; /** * Error codes returned by spawning processes. */ public enum GSpawnError { /** * Fork failed due to lack of memory. */ FORK = 0, /** * Read or select on pipes failed. */ READ = 1, /** * Changing to working directory failed. */ CHDIR = 2, /** * execv() returned `EACCES` */ ACCES = 3, /** * execv() returned `EPERM` */ PERM = 4, /** * execv() returned `E2BIG` */ TOO_BIG = 5, /** * execv() returned `ENOEXEC` */ NOEXEC = 6, /** * execv() returned `ENAMETOOLONG` */ NAMETOOLONG = 7, /** * execv() returned `ENOENT` */ NOENT = 8, /** * execv() returned `ENOMEM` */ NOMEM = 9, /** * execv() returned `ENOTDIR` */ NOTDIR = 10, /** * execv() returned `ELOOP` */ LOOP = 11, /** * execv() returned `ETXTBUSY` */ TXTBUSY = 12, /** * execv() returned `EIO` */ IO = 13, /** * execv() returned `ENFILE` */ NFILE = 14, /** * execv() returned `EMFILE` */ MFILE = 15, /** * execv() returned `EINVAL` */ INVAL = 16, /** * execv() returned `EISDIR` */ ISDIR = 17, /** * execv() returned `ELIBBAD` */ LIBBAD = 18, /** * Some other fatal failure, * `error->message` should explain. */ FAILED = 19, } alias GSpawnError SpawnError; /** * Flags passed to g_spawn_sync(), g_spawn_async() and g_spawn_async_with_pipes(). */ public enum GSpawnFlags { /** * no flags, default behaviour */ DEFAULT = 0, /** * the parent's open file descriptors will * be inherited by the child; otherwise all descriptors except stdin, * stdout and stderr will be closed before calling exec() in the child. */ LEAVE_DESCRIPTORS_OPEN = 1, /** * the child will not be automatically reaped; * you must use g_child_watch_add() yourself (or call waitpid() or handle * `SIGCHLD` yourself), or the child will become a zombie. */ DO_NOT_REAP_CHILD = 2, /** * `argv[0]` need not be an absolute path, it will be * looked for in the user's `PATH`. */ SEARCH_PATH = 4, /** * the child's standard output will be discarded, * instead of going to the same location as the parent's standard output. */ STDOUT_TO_DEV_NULL = 8, /** * the child's standard error will be discarded. */ STDERR_TO_DEV_NULL = 16, /** * the child will inherit the parent's standard * input (by default, the child's standard input is attached to `/dev/null`). */ CHILD_INHERITS_STDIN = 32, /** * the first element of `argv` is the file to * execute, while the remaining elements are the actual argument vector * to pass to the file. Normally g_spawn_async_with_pipes() uses `argv[0]` * as the file to execute, and passes all of `argv` to the child. */ FILE_AND_ARGV_ZERO = 64, /** * if `argv[0]` is not an abolute path, * it will be looked for in the `PATH` from the passed child environment. * Since: 2.34 */ SEARCH_PATH_FROM_ENVP = 128, /** * create all pipes with the `O_CLOEXEC` flag set. * Since: 2.40 */ CLOEXEC_PIPES = 256, } alias GSpawnFlags SpawnFlags; /** * The type of file to return the filename for, when used with * g_test_build_filename(). * * These two options correspond rather directly to the 'dist' and * 'built' terminology that automake uses and are explicitly used to * distinguish between the 'srcdir' and 'builddir' being separate. All * files in your project should either be dist (in the * `EXTRA_DIST` or `dist_schema_DATA` * sense, in which case they will always be in the srcdir) or built (in * the `BUILT_SOURCES` sense, in which case they will * always be in the builddir). * * Note: as a general rule of automake, files that are generated only as * part of the build-from-git process (but then are distributed with the * tarball) always go in srcdir (even if doing a srcdir != builddir * build from git) and are considered as distributed files. * * Since: 2.38 */ public enum GTestFileType { /** * a file that was included in the distribution tarball */ DIST = 0, /** * a file that was built on the compiling machine */ BUILT = 1, } alias GTestFileType TestFileType; public enum GTestLogType { NONE = 0, ERROR = 1, START_BINARY = 2, LIST_CASE = 3, SKIP_CASE = 4, START_CASE = 5, STOP_CASE = 6, MIN_RESULT = 7, MAX_RESULT = 8, MESSAGE = 9, START_SUITE = 10, STOP_SUITE = 11, } alias GTestLogType TestLogType; /** * Flags to pass to g_test_trap_subprocess() to control input and output. * * Note that in contrast with g_test_trap_fork(), the default is to * not show stdout and stderr. */ public enum GTestSubprocessFlags { /** * If this flag is given, the child * process will inherit the parent's stdin. Otherwise, the child's * stdin is redirected to `/dev/null`. */ STDIN = 1, /** * If this flag is given, the child * process will inherit the parent's stdout. Otherwise, the child's * stdout will not be visible, but it will be captured to allow * later tests with g_test_trap_assert_stdout(). */ STDOUT = 2, /** * If this flag is given, the child * process will inherit the parent's stderr. Otherwise, the child's * stderr will not be visible, but it will be captured to allow * later tests with g_test_trap_assert_stderr(). */ STDERR = 4, } alias GTestSubprocessFlags TestSubprocessFlags; /** * Test traps are guards around forked tests. * These flags determine what traps to set. * * Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(), * which is deprecated. g_test_trap_subprocess() uses * #GTestTrapSubprocessFlags. */ public enum GTestTrapFlags { /** * Redirect stdout of the test child to * `/dev/null` so it cannot be observed on the console during test * runs. The actual output is still captured though to allow later * tests with g_test_trap_assert_stdout(). */ SILENCE_STDOUT = 128, /** * Redirect stderr of the test child to * `/dev/null` so it cannot be observed on the console during test * runs. The actual output is still captured though to allow later * tests with g_test_trap_assert_stderr(). */ SILENCE_STDERR = 256, /** * If this flag is given, stdin of the * child process is shared with stdin of its parent process. * It is redirected to `/dev/null` otherwise. */ INHERIT_STDIN = 512, } alias GTestTrapFlags TestTrapFlags; /** * Possible errors of thread related functions. */ public enum GThreadError { /** * a thread couldn't be created due to resource * shortage. Try again later. */ THREAD_ERROR_AGAIN = 0, } alias GThreadError ThreadError; /** * Disambiguates a given time in two ways. * * First, specifies if the given time is in universal or local time. * * Second, if the time is in local time, specifies if it is local * standard time or local daylight time. This is important for the case * where the same local time occurs twice (during daylight savings time * transitions, for example). */ public enum GTimeType { /** * the time is in local standard time */ STANDARD = 0, /** * the time is in local daylight time */ DAYLIGHT = 1, /** * the time is in UTC */ UNIVERSAL = 2, } alias GTimeType TimeType; /** * The possible types of token returned from each * g_scanner_get_next_token() call. */ public enum GTokenType { /** * the end of the file */ EOF = 0, /** * a '(' character */ LEFT_PAREN = 40, /** * a ')' character */ RIGHT_PAREN = 41, /** * a '{' character */ LEFT_CURLY = 123, /** * a '}' character */ RIGHT_CURLY = 125, /** * a '[' character */ LEFT_BRACE = 91, /** * a ']' character */ RIGHT_BRACE = 93, /** * a '=' character */ EQUAL_SIGN = 61, /** * a ',' character */ COMMA = 44, /** * not a token */ NONE = 256, /** * an error occurred */ ERROR = 257, /** * a character */ CHAR = 258, /** * a binary integer */ BINARY = 259, /** * an octal integer */ OCTAL = 260, /** * an integer */ INT = 261, /** * a hex integer */ HEX = 262, /** * a floating point number */ FLOAT = 263, /** * a string */ STRING = 264, /** * a symbol */ SYMBOL = 265, /** * an identifier */ IDENTIFIER = 266, /** * a null identifier */ IDENTIFIER_NULL = 267, /** * one line comment */ COMMENT_SINGLE = 268, /** * multi line comment */ COMMENT_MULTI = 269, } alias GTokenType TokenType; /** * Specifies which nodes are visited during several of the tree * functions, including g_node_traverse() and g_node_find(). */ public enum GTraverseFlags { /** * only leaf nodes should be visited. This name has * been introduced in 2.6, for older version use * %G_TRAVERSE_LEAFS. */ LEAVES = 1, /** * only non-leaf nodes should be visited. This * name has been introduced in 2.6, for older * version use %G_TRAVERSE_NON_LEAFS. */ NON_LEAVES = 2, /** * all nodes should be visited. */ ALL = 3, /** * a mask of all traverse flags. */ MASK = 3, /** * identical to %G_TRAVERSE_LEAVES. */ LEAFS = 1, /** * identical to %G_TRAVERSE_NON_LEAVES. */ NON_LEAFS = 2, } alias GTraverseFlags TraverseFlags; /** * Specifies the type of traveral performed by g_tree_traverse(), * g_node_traverse() and g_node_find(). The different orders are * illustrated here: * - In order: A, B, C, D, E, F, G, H, I * ![](Sorted_binary_tree_inorder.svg) * - Pre order: F, B, A, D, C, E, G, I, H * ![](Sorted_binary_tree_preorder.svg) * - Post order: A, C, E, D, B, H, I, G, F * ![](Sorted_binary_tree_postorder.svg) * - Level order: F, B, G, A, D, I, C, E, H * ![](Sorted_binary_tree_breadth-first_traversal.svg) */ public enum GTraverseType { /** * vists a node's left child first, then the node itself, * then its right child. This is the one to use if you * want the output sorted according to the compare * function. */ IN_ORDER = 0, /** * visits a node, then its children. */ PRE_ORDER = 1, /** * visits the node's children, then the node itself. */ POST_ORDER = 2, /** * is not implemented for * [balanced binary trees][glib-Balanced-Binary-Trees]. * For [n-ary trees][glib-N-ary-Trees], it * vists the root node first, then its children, then * its grandchildren, and so on. Note that this is less * efficient than the other orders. */ LEVEL_ORDER = 3, } alias GTraverseType TraverseType; /** * These are the possible line break classifications. * * Since new unicode versions may add new types here, applications should be ready * to handle unknown values. They may be regarded as %G_UNICODE_BREAK_UNKNOWN. * * See [Unicode Line Breaking Algorithm](http://www.unicode.org/unicode/reports/tr14/). */ public enum GUnicodeBreakType { /** * Mandatory Break (BK) */ MANDATORY = 0, /** * Carriage Return (CR) */ CARRIAGE_RETURN = 1, /** * Line Feed (LF) */ LINE_FEED = 2, /** * Attached Characters and Combining Marks (CM) */ COMBINING_MARK = 3, /** * Surrogates (SG) */ SURROGATE = 4, /** * Zero Width Space (ZW) */ ZERO_WIDTH_SPACE = 5, /** * Inseparable (IN) */ INSEPARABLE = 6, /** * Non-breaking ("Glue") (GL) */ NON_BREAKING_GLUE = 7, /** * Contingent Break Opportunity (CB) */ CONTINGENT = 8, /** * Space (SP) */ SPACE = 9, /** * Break Opportunity After (BA) */ AFTER = 10, /** * Break Opportunity Before (BB) */ BEFORE = 11, /** * Break Opportunity Before and After (B2) */ BEFORE_AND_AFTER = 12, /** * Hyphen (HY) */ HYPHEN = 13, /** * Nonstarter (NS) */ NON_STARTER = 14, /** * Opening Punctuation (OP) */ OPEN_PUNCTUATION = 15, /** * Closing Punctuation (CL) */ CLOSE_PUNCTUATION = 16, /** * Ambiguous Quotation (QU) */ QUOTATION = 17, /** * Exclamation/Interrogation (EX) */ EXCLAMATION = 18, /** * Ideographic (ID) */ IDEOGRAPHIC = 19, /** * Numeric (NU) */ NUMERIC = 20, /** * Infix Separator (Numeric) (IS) */ INFIX_SEPARATOR = 21, /** * Symbols Allowing Break After (SY) */ SYMBOL = 22, /** * Ordinary Alphabetic and Symbol Characters (AL) */ ALPHABETIC = 23, /** * Prefix (Numeric) (PR) */ PREFIX = 24, /** * Postfix (Numeric) (PO) */ POSTFIX = 25, /** * Complex Content Dependent (South East Asian) (SA) */ COMPLEX_CONTEXT = 26, /** * Ambiguous (Alphabetic or Ideographic) (AI) */ AMBIGUOUS = 27, /** * Unknown (XX) */ UNKNOWN = 28, /** * Next Line (NL) */ NEXT_LINE = 29, /** * Word Joiner (WJ) */ WORD_JOINER = 30, /** * Hangul L Jamo (JL) */ HANGUL_L_JAMO = 31, /** * Hangul V Jamo (JV) */ HANGUL_V_JAMO = 32, /** * Hangul T Jamo (JT) */ HANGUL_T_JAMO = 33, /** * Hangul LV Syllable (H2) */ HANGUL_LV_SYLLABLE = 34, /** * Hangul LVT Syllable (H3) */ HANGUL_LVT_SYLLABLE = 35, /** * Closing Parenthesis (CP). Since 2.28 */ CLOSE_PARANTHESIS = 36, /** * Conditional Japanese Starter (CJ). Since: 2.32 */ CONDITIONAL_JAPANESE_STARTER = 37, /** * Hebrew Letter (HL). Since: 2.32 */ HEBREW_LETTER = 38, /** * Regional Indicator (RI). Since: 2.36 */ REGIONAL_INDICATOR = 39, /** * Emoji Base (EB). Since: 2.50 */ EMOJI_BASE = 40, /** * Emoji Modifier (EM). Since: 2.50 */ EMOJI_MODIFIER = 41, /** * Zero Width Joiner (ZWJ). Since: 2.50 */ ZERO_WIDTH_JOINER = 42, } alias GUnicodeBreakType UnicodeBreakType; /** * The #GUnicodeScript enumeration identifies different writing * systems. The values correspond to the names as defined in the * Unicode standard. The enumeration has been added in GLib 2.14, * and is interchangeable with #PangoScript. * * Note that new types may be added in the future. Applications * should be ready to handle unknown values. * See [Unicode Standard Annex #24: Script names](http://www.unicode.org/reports/tr24/). */ public enum GUnicodeScript { /** * a value never returned from g_unichar_get_script() */ INVALID_CODE = -1, /** * a character used by multiple different scripts */ COMMON = 0, /** * a mark glyph that takes its script from the * base glyph to which it is attached */ INHERITED = 1, /** * Arabic */ ARABIC = 2, /** * Armenian */ ARMENIAN = 3, /** * Bengali */ BENGALI = 4, /** * Bopomofo */ BOPOMOFO = 5, /** * Cherokee */ CHEROKEE = 6, /** * Coptic */ COPTIC = 7, /** * Cyrillic */ CYRILLIC = 8, /** * Deseret */ DESERET = 9, /** * Devanagari */ DEVANAGARI = 10, /** * Ethiopic */ ETHIOPIC = 11, /** * Georgian */ GEORGIAN = 12, /** * Gothic */ GOTHIC = 13, /** * Greek */ GREEK = 14, /** * Gujarati */ GUJARATI = 15, /** * Gurmukhi */ GURMUKHI = 16, /** * Han */ HAN = 17, /** * Hangul */ HANGUL = 18, /** * Hebrew */ HEBREW = 19, /** * Hiragana */ HIRAGANA = 20, /** * Kannada */ KANNADA = 21, /** * Katakana */ KATAKANA = 22, /** * Khmer */ KHMER = 23, /** * Lao */ LAO = 24, /** * Latin */ LATIN = 25, /** * Malayalam */ MALAYALAM = 26, /** * Mongolian */ MONGOLIAN = 27, /** * Myanmar */ MYANMAR = 28, /** * Ogham */ OGHAM = 29, /** * Old Italic */ OLD_ITALIC = 30, /** * Oriya */ ORIYA = 31, /** * Runic */ RUNIC = 32, /** * Sinhala */ SINHALA = 33, /** * Syriac */ SYRIAC = 34, /** * Tamil */ TAMIL = 35, /** * Telugu */ TELUGU = 36, /** * Thaana */ THAANA = 37, /** * Thai */ THAI = 38, /** * Tibetan */ TIBETAN = 39, /** * Canadian Aboriginal */ CANADIAN_ABORIGINAL = 40, /** * Yi */ YI = 41, /** * Tagalog */ TAGALOG = 42, /** * Hanunoo */ HANUNOO = 43, /** * Buhid */ BUHID = 44, /** * Tagbanwa */ TAGBANWA = 45, /** * Braille */ BRAILLE = 46, /** * Cypriot */ CYPRIOT = 47, /** * Limbu */ LIMBU = 48, /** * Osmanya */ OSMANYA = 49, /** * Shavian */ SHAVIAN = 50, /** * Linear B */ LINEAR_B = 51, /** * Tai Le */ TAI_LE = 52, /** * Ugaritic */ UGARITIC = 53, /** * New Tai Lue */ NEW_TAI_LUE = 54, /** * Buginese */ BUGINESE = 55, /** * Glagolitic */ GLAGOLITIC = 56, /** * Tifinagh */ TIFINAGH = 57, /** * Syloti Nagri */ SYLOTI_NAGRI = 58, /** * Old Persian */ OLD_PERSIAN = 59, /** * Kharoshthi */ KHAROSHTHI = 60, /** * an unassigned code point */ UNKNOWN = 61, /** * Balinese */ BALINESE = 62, /** * Cuneiform */ CUNEIFORM = 63, /** * Phoenician */ PHOENICIAN = 64, /** * Phags-pa */ PHAGS_PA = 65, /** * N'Ko */ NKO = 66, /** * Kayah Li. Since 2.16.3 */ KAYAH_LI = 67, /** * Lepcha. Since 2.16.3 */ LEPCHA = 68, /** * Rejang. Since 2.16.3 */ REJANG = 69, /** * Sundanese. Since 2.16.3 */ SUNDANESE = 70, /** * Saurashtra. Since 2.16.3 */ SAURASHTRA = 71, /** * Cham. Since 2.16.3 */ CHAM = 72, /** * Ol Chiki. Since 2.16.3 */ OL_CHIKI = 73, /** * Vai. Since 2.16.3 */ VAI = 74, /** * Carian. Since 2.16.3 */ CARIAN = 75, /** * Lycian. Since 2.16.3 */ LYCIAN = 76, /** * Lydian. Since 2.16.3 */ LYDIAN = 77, /** * Avestan. Since 2.26 */ AVESTAN = 78, /** * Bamum. Since 2.26 */ BAMUM = 79, /** * Egyptian Hieroglpyhs. Since 2.26 */ EGYPTIAN_HIEROGLYPHS = 80, /** * Imperial Aramaic. Since 2.26 */ IMPERIAL_ARAMAIC = 81, /** * Inscriptional Pahlavi. Since 2.26 */ INSCRIPTIONAL_PAHLAVI = 82, /** * Inscriptional Parthian. Since 2.26 */ INSCRIPTIONAL_PARTHIAN = 83, /** * Javanese. Since 2.26 */ JAVANESE = 84, /** * Kaithi. Since 2.26 */ KAITHI = 85, /** * Lisu. Since 2.26 */ LISU = 86, /** * Meetei Mayek. Since 2.26 */ MEETEI_MAYEK = 87, /** * Old South Arabian. Since 2.26 */ OLD_SOUTH_ARABIAN = 88, /** * Old Turkic. Since 2.28 */ OLD_TURKIC = 89, /** * Samaritan. Since 2.26 */ SAMARITAN = 90, /** * Tai Tham. Since 2.26 */ TAI_THAM = 91, /** * Tai Viet. Since 2.26 */ TAI_VIET = 92, /** * Batak. Since 2.28 */ BATAK = 93, /** * Brahmi. Since 2.28 */ BRAHMI = 94, /** * Mandaic. Since 2.28 */ MANDAIC = 95, /** * Chakma. Since: 2.32 */ CHAKMA = 96, /** * Meroitic Cursive. Since: 2.32 */ MEROITIC_CURSIVE = 97, /** * Meroitic Hieroglyphs. Since: 2.32 */ MEROITIC_HIEROGLYPHS = 98, /** * Miao. Since: 2.32 */ MIAO = 99, /** * Sharada. Since: 2.32 */ SHARADA = 100, /** * Sora Sompeng. Since: 2.32 */ SORA_SOMPENG = 101, /** * Takri. Since: 2.32 */ TAKRI = 102, /** * Bassa. Since: 2.42 */ BASSA_VAH = 103, /** * Caucasian Albanian. Since: 2.42 */ CAUCASIAN_ALBANIAN = 104, /** * Duployan. Since: 2.42 */ DUPLOYAN = 105, /** * Elbasan. Since: 2.42 */ ELBASAN = 106, /** * Grantha. Since: 2.42 */ GRANTHA = 107, /** * Kjohki. Since: 2.42 */ KHOJKI = 108, /** * Khudawadi, Sindhi. Since: 2.42 */ KHUDAWADI = 109, /** * Linear A. Since: 2.42 */ LINEAR_A = 110, /** * Mahajani. Since: 2.42 */ MAHAJANI = 111, /** * Manichaean. Since: 2.42 */ MANICHAEAN = 112, /** * Mende Kikakui. Since: 2.42 */ MENDE_KIKAKUI = 113, /** * Modi. Since: 2.42 */ MODI = 114, /** * Mro. Since: 2.42 */ MRO = 115, /** * Nabataean. Since: 2.42 */ NABATAEAN = 116, /** * Old North Arabian. Since: 2.42 */ OLD_NORTH_ARABIAN = 117, /** * Old Permic. Since: 2.42 */ OLD_PERMIC = 118, /** * Pahawh Hmong. Since: 2.42 */ PAHAWH_HMONG = 119, /** * Palmyrene. Since: 2.42 */ PALMYRENE = 120, /** * Pau Cin Hau. Since: 2.42 */ PAU_CIN_HAU = 121, /** * Psalter Pahlavi. Since: 2.42 */ PSALTER_PAHLAVI = 122, /** * Siddham. Since: 2.42 */ SIDDHAM = 123, /** * Tirhuta. Since: 2.42 */ TIRHUTA = 124, /** * Warang Citi. Since: 2.42 */ WARANG_CITI = 125, /** * Ahom. Since: 2.48 */ AHOM = 126, /** * Anatolian Hieroglyphs. Since: 2.48 */ ANATOLIAN_HIEROGLYPHS = 127, /** * Hatran. Since: 2.48 */ HATRAN = 128, /** * Multani. Since: 2.48 */ MULTANI = 129, /** * Old Hungarian. Since: 2.48 */ OLD_HUNGARIAN = 130, /** * Signwriting. Since: 2.48 */ SIGNWRITING = 131, /** * Adlam. Since: 2.50 */ ADLAM = 132, /** * Bhaiksuki. Since: 2.50 */ BHAIKSUKI = 133, /** * Marchen. Since: 2.50 */ MARCHEN = 134, /** * Newa. Since: 2.50 */ NEWA = 135, /** * Osage. Since: 2.50 */ OSAGE = 136, /** * Tangut. Since: 2.50 * @G_UNICODE_SCRIPT_MASARAM_GONDI, Masaram Gondi. Since: 2.54 * @G_UNICODE_SCRIPT_NUSHU, Nushu. Since: 2.54 * @G_UNICODE_SCRIPT_SOYOMBO, Soyombo. Since: 2.54 * @G_UNICODE_SCRIPT_ZANABAZAR_SQUARE Zanabazar Square. Since: 2.54 */ TANGUT = 137, MASARAM_GONDI = 138, NUSHU = 139, SOYOMBO = 140, ZANABAZAR_SQUARE = 141, } alias GUnicodeScript UnicodeScript; /** * These are the possible character classifications from the * Unicode specification. * See [Unicode Character Database](http://www.unicode.org/reports/tr44/#General_Category_Values). */ public enum GUnicodeType { /** * General category "Other, Control" (Cc) */ CONTROL = 0, /** * General category "Other, Format" (Cf) */ FORMAT = 1, /** * General category "Other, Not Assigned" (Cn) */ UNASSIGNED = 2, /** * General category "Other, Private Use" (Co) */ PRIVATE_USE = 3, /** * General category "Other, Surrogate" (Cs) */ SURROGATE = 4, /** * General category "Letter, Lowercase" (Ll) */ LOWERCASE_LETTER = 5, /** * General category "Letter, Modifier" (Lm) */ MODIFIER_LETTER = 6, /** * General category "Letter, Other" (Lo) */ OTHER_LETTER = 7, /** * General category "Letter, Titlecase" (Lt) */ TITLECASE_LETTER = 8, /** * General category "Letter, Uppercase" (Lu) */ UPPERCASE_LETTER = 9, /** * General category "Mark, Spacing" (Mc) */ SPACING_MARK = 10, /** * General category "Mark, Enclosing" (Me) */ ENCLOSING_MARK = 11, /** * General category "Mark, Nonspacing" (Mn) */ NON_SPACING_MARK = 12, /** * General category "Number, Decimal Digit" (Nd) */ DECIMAL_NUMBER = 13, /** * General category "Number, Letter" (Nl) */ LETTER_NUMBER = 14, /** * General category "Number, Other" (No) */ OTHER_NUMBER = 15, /** * General category "Punctuation, Connector" (Pc) */ CONNECT_PUNCTUATION = 16, /** * General category "Punctuation, Dash" (Pd) */ DASH_PUNCTUATION = 17, /** * General category "Punctuation, Close" (Pe) */ CLOSE_PUNCTUATION = 18, /** * General category "Punctuation, Final quote" (Pf) */ FINAL_PUNCTUATION = 19, /** * General category "Punctuation, Initial quote" (Pi) */ INITIAL_PUNCTUATION = 20, /** * General category "Punctuation, Other" (Po) */ OTHER_PUNCTUATION = 21, /** * General category "Punctuation, Open" (Ps) */ OPEN_PUNCTUATION = 22, /** * General category "Symbol, Currency" (Sc) */ CURRENCY_SYMBOL = 23, /** * General category "Symbol, Modifier" (Sk) */ MODIFIER_SYMBOL = 24, /** * General category "Symbol, Math" (Sm) */ MATH_SYMBOL = 25, /** * General category "Symbol, Other" (So) */ OTHER_SYMBOL = 26, /** * General category "Separator, Line" (Zl) */ LINE_SEPARATOR = 27, /** * General category "Separator, Paragraph" (Zp) */ PARAGRAPH_SEPARATOR = 28, /** * General category "Separator, Space" (Zs) */ SPACE_SEPARATOR = 29, } alias GUnicodeType UnicodeType; /** * These are logical ids for special directories which are defined * depending on the platform used. You should use g_get_user_special_dir() * to retrieve the full path associated to the logical id. * * The #GUserDirectory enumeration can be extended at later date. Not * every platform has a directory for every logical id in this * enumeration. * * Since: 2.14 */ public enum GUserDirectory { /** * the user's Desktop directory */ DIRECTORY_DESKTOP = 0, /** * the user's Documents directory */ DIRECTORY_DOCUMENTS = 1, /** * the user's Downloads directory */ DIRECTORY_DOWNLOAD = 2, /** * the user's Music directory */ DIRECTORY_MUSIC = 3, /** * the user's Pictures directory */ DIRECTORY_PICTURES = 4, /** * the user's shared directory */ DIRECTORY_PUBLIC_SHARE = 5, /** * the user's Templates directory */ DIRECTORY_TEMPLATES = 6, /** * the user's Movies directory */ DIRECTORY_VIDEOS = 7, /** * the number of enum values */ N_DIRECTORIES = 8, } alias GUserDirectory UserDirectory; /** * The range of possible top-level types of #GVariant instances. * * Since: 2.24 */ public enum GVariantClass { /** * The #GVariant is a boolean. */ BOOLEAN = 98, /** * The #GVariant is a byte. */ BYTE = 121, /** * The #GVariant is a signed 16 bit integer. */ INT16 = 110, /** * The #GVariant is an unsigned 16 bit integer. */ UINT16 = 113, /** * The #GVariant is a signed 32 bit integer. */ INT32 = 105, /** * The #GVariant is an unsigned 32 bit integer. */ UINT32 = 117, /** * The #GVariant is a signed 64 bit integer. */ INT64 = 120, /** * The #GVariant is an unsigned 64 bit integer. */ UINT64 = 116, /** * The #GVariant is a file handle index. */ HANDLE = 104, /** * The #GVariant is a double precision floating * point value. */ DOUBLE = 100, /** * The #GVariant is a normal string. */ STRING = 115, /** * The #GVariant is a D-Bus object path * string. */ OBJECT_PATH = 111, /** * The #GVariant is a D-Bus signature string. */ SIGNATURE = 103, /** * The #GVariant is a variant. */ VARIANT = 118, /** * The #GVariant is a maybe-typed value. */ MAYBE = 109, /** * The #GVariant is an array. */ ARRAY = 97, /** * The #GVariant is a tuple. */ TUPLE = 40, /** * The #GVariant is a dictionary entry. */ DICT_ENTRY = 123, } alias GVariantClass VariantClass; /** * Error codes returned by parsing text-format GVariants. */ public enum GVariantParseError { /** * generic error (unused) */ FAILED = 0, /** * a non-basic #GVariantType was given where a basic type was expected */ BASIC_TYPE_EXPECTED = 1, /** * cannot infer the #GVariantType */ CANNOT_INFER_TYPE = 2, /** * an indefinite #GVariantType was given where a definite type was expected */ DEFINITE_TYPE_EXPECTED = 3, /** * extra data after parsing finished */ INPUT_NOT_AT_END = 4, /** * invalid character in number or unicode escape */ INVALID_CHARACTER = 5, /** * not a valid #GVariant format string */ INVALID_FORMAT_STRING = 6, /** * not a valid object path */ INVALID_OBJECT_PATH = 7, /** * not a valid type signature */ INVALID_SIGNATURE = 8, /** * not a valid #GVariant type string */ INVALID_TYPE_STRING = 9, /** * could not find a common type for array entries */ NO_COMMON_TYPE = 10, /** * the numerical value is out of range of the given type */ NUMBER_OUT_OF_RANGE = 11, /** * the numerical value is out of range for any type */ NUMBER_TOO_BIG = 12, /** * cannot parse as variant of the specified type */ TYPE_ERROR = 13, /** * an unexpected token was encountered */ UNEXPECTED_TOKEN = 14, /** * an unknown keyword was encountered */ UNKNOWN_KEYWORD = 15, /** * unterminated string constant */ UNTERMINATED_STRING_CONSTANT = 16, /** * no value given */ VALUE_EXPECTED = 17, } alias GVariantParseError VariantParseError; /** * Flags passed to g_module_open(). * Note that these flags are not supported on all platforms. */ public enum GModuleFlags { /** * specifies that symbols are only resolved when * needed. The default action is to bind all symbols when the module * is loaded. */ LAZY = 1, /** * specifies that symbols in the module should * not be added to the global name space. The default action on most * platforms is to place symbols in the module in the global name space, * which may cause conflicts with existing symbols. */ LOCAL = 2, /** * mask for all flags. */ MASK = 3, } alias GModuleFlags ModuleFlags; /** * Contains the public fields of a GArray. */ struct GArray { /** * a pointer to the element data. The data may be moved as * elements are added to the #GArray. */ char* data; /** * the number of elements in the #GArray not including the * possible terminating zero element. */ uint len; } struct GAsyncQueue; struct GBookmarkFile; /** * Contains the public fields of a GByteArray. */ struct GByteArray { /** * a pointer to the element data. The data may be moved as * elements are added to the #GByteArray */ ubyte* data; /** * the number of elements in the #GByteArray */ uint len; } struct GBytes; struct GChecksum; struct GCond { void* p; uint[2] i; } /** * The #GData struct is an opaque data structure to represent a * [Keyed Data List][glib-Keyed-Data-Lists]. It should only be * accessed via the following functions. */ struct GData; struct GDate { import std.bitmanip: bitfields; mixin(bitfields!( uint, "julianDays", 32, uint, "julian", 1, uint, "dmy", 1, uint, "day", 6, uint, "month", 4, uint, "year", 16, uint, "", 4 )); } struct GDateTime; /** * Associates a string with a bit flag. * Used in g_parse_debug_string(). */ struct GDebugKey { /** * the string */ const(char)* key; /** * the flag */ uint value; } struct GDir; /** * The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign, * mantissa and exponent of IEEE floats and doubles. These unions are defined * as appropriate for a given platform. IEEE floats and doubles are supported * (used for storage) by at least Intel, PPC and Sparc. */ struct GDoubleIEEE754 { union { /** * the double value */ double vDouble; struct Mpn { import std.bitmanip: bitfields; mixin(bitfields!( uint, "mantissaLow", 32, uint, "mantissaHigh", 20, uint, "biasedExponent", 11, uint, "sign", 1 )); } Mpn mpn; } } struct GError { /** * error domain, e.g. #G_FILE_ERROR */ GQuark domain; /** * error code, e.g. %G_FILE_ERROR_NOENT */ int code; /** * human-readable informative error message */ char* message; } /** * The #GFloatIEEE754 and #GDoubleIEEE754 unions are used to access the sign, * mantissa and exponent of IEEE floats and doubles. These unions are defined * as appropriate for a given platform. IEEE floats and doubles are supported * (used for storage) by at least Intel, PPC and Sparc. */ struct GFloatIEEE754 { union { /** * the double value */ float vFloat; struct Mpn { import std.bitmanip: bitfields; mixin(bitfields!( uint, "mantissa", 23, uint, "biasedExponent", 8, uint, "sign", 1 )); } Mpn mpn; } } /** * The #GHashTable struct is an opaque data structure to represent a * [Hash Table][glib-Hash-Tables]. It should only be accessed via the * following functions. */ struct GHashTable; struct GHashTableIter { void* dummy1; void* dummy2; void* dummy3; int dummy4; bool dummy5; void* dummy6; } struct GHmac; struct GHook { /** * data which is passed to func when this hook is invoked */ void* data; /** * pointer to the next hook in the list */ GHook* next; /** * pointer to the previous hook in the list */ GHook* prev; /** * the reference count of this hook */ uint refCount; /** * the id of this hook, which is unique within its list */ gulong hookId; /** * flags which are set for this hook. See #GHookFlagMask for * predefined flags */ uint flags; /** * the function to call when this hook is invoked. The possible * signatures for this function are #GHookFunc and #GHookCheckFunc */ void* func; /** * the default @finalize_hook function of a #GHookList calls * this member of the hook that is being finalized */ GDestroyNotify destroy; } struct GHookList { /** * the next free #GHook id */ gulong seqId; import std.bitmanip: bitfields; mixin(bitfields!( uint, "hookSize", 16, uint, "isSetup", 1, uint, "", 15 )); /** * the first #GHook element in the list */ GHook* hooks; /** * unused */ void* dummy3; /** * the function to call to finalize a #GHook element. * The default behaviour is to call the hooks @destroy function */ GHookFinalizeFunc finalizeHook; /** * unused */ void*[2] dummy; } struct GIOChannel { int refCount; GIOFuncs* funcs; char* encoding; GIConv readCd; GIConv writeCd; char* lineTerm; uint lineTermLen; size_t bufSize; GString* readBuf; GString* encodedReadBuf; GString* writeBuf; char[6] partialWriteBuf; import std.bitmanip: bitfields; mixin(bitfields!( uint, "useBuffer", 1, uint, "doEncode", 1, uint, "closeOnUnref", 1, uint, "isReadable", 1, uint, "isWriteable", 1, uint, "isSeekable", 1, uint, "", 26 )); void* reserved1; void* reserved2; } /** * A table of functions used to handle different types of #GIOChannel * in a generic way. */ struct GIOFuncs { /** */ extern(C) GIOStatus function(GIOChannel* channel, char* buf, size_t count, size_t* bytesRead, GError** err) ioRead; /** */ extern(C) GIOStatus function(GIOChannel* channel, const(char)* buf, size_t count, size_t* bytesWritten, GError** err) ioWrite; /** */ extern(C) GIOStatus function(GIOChannel* channel, long offset, GSeekType type, GError** err) ioSeek; /** */ extern(C) GIOStatus function(GIOChannel* channel, GError** err) ioClose; /** */ extern(C) GSource* function(GIOChannel* channel, GIOCondition condition) ioCreateWatch; /** */ extern(C) void function(GIOChannel* channel) ioFree; /** */ extern(C) GIOStatus function(GIOChannel* channel, GIOFlags flags, GError** err) ioSetFlags; /** */ extern(C) GIOFlags function(GIOChannel* channel) ioGetFlags; } struct GKeyFile; /** * The #GList struct is used for each element in a doubly-linked list. */ struct GList { /** * holds the element's data, which can be a pointer to any kind * of data, or any integer value using the * [Type Conversion Macros][glib-Type-Conversion-Macros] */ void* data; /** * contains the link to the next element in the list */ GList* next; /** * contains the link to the previous element in the list */ GList* prev; } /** * Structure representing a single field in a structured log entry. See * g_log_structured() for details. * * Log fields may contain arbitrary values, including binary with embedded nul * bytes. If the field contains a string, the string must be UTF-8 encoded and * have a trailing nul byte. Otherwise, @length must be set to a non-negative * value. * * Since: 2.50 */ struct GLogField { /** * field name (UTF-8 string) */ const(char)* key; /** * field value (arbitrary bytes) */ void* value; /** * length of @value, in bytes, or -1 if it is nul-terminated */ ptrdiff_t length; } struct GMainContext; struct GMainLoop; struct GMappedFile; struct GMarkupParseContext; /** * Any of the fields in #GMarkupParser can be %NULL, in which case they * will be ignored. Except for the @error function, any of these callbacks * can set an error; in particular the %G_MARKUP_ERROR_UNKNOWN_ELEMENT, * %G_MARKUP_ERROR_UNKNOWN_ATTRIBUTE, and %G_MARKUP_ERROR_INVALID_CONTENT * errors are intended to be set from these callbacks. If you set an error * from a callback, g_markup_parse_context_parse() will report that error * back to its caller. */ struct GMarkupParser { /** */ extern(C) void function(GMarkupParseContext* context, const(char)* elementName, char** attributeNames, char** attributeValues, void* userData, GError** err) startElement; /** */ extern(C) void function(GMarkupParseContext* context, const(char)* elementName, void* userData, GError** err) endElement; /** */ extern(C) void function(GMarkupParseContext* context, const(char)* text, size_t textLen, void* userData, GError** err) text; /** */ extern(C) void function(GMarkupParseContext* context, const(char)* passthroughText, size_t textLen, void* userData, GError** err) passthrough; /** */ extern(C) void function(GMarkupParseContext* context, GError* error, void* userData) error; } struct GMatchInfo; /** * A set of functions used to perform memory allocation. The same #GMemVTable must * be used for all allocations in the same program; a call to g_mem_set_vtable(), * if it exists, should be prior to any use of GLib. * * This functions related to this has been deprecated in 2.46, and no longer work. */ struct GMemVTable { /** */ extern(C) void* function(size_t nBytes) malloc; /** */ extern(C) void* function(void* mem, size_t nBytes) realloc; /** */ extern(C) void function(void* mem) free; /** */ extern(C) void* function(size_t nBlocks, size_t nBlockBytes) calloc; /** */ extern(C) void* function(size_t nBytes) tryMalloc; /** */ extern(C) void* function(void* mem, size_t nBytes) tryRealloc; } struct GMutex { union { void* p; uint[2] i; } } struct GNode { /** * contains the actual data of the node. */ void* data; /** * points to the node's next sibling (a sibling is another * #GNode with the same parent). */ GNode* next; /** * points to the node's previous sibling. */ GNode* prev; /** * points to the parent of the #GNode, or is %NULL if the * #GNode is the root of the tree. */ GNode* parent; /** * points to the first child of the #GNode. The other * children are accessed by using the @next pointer of each * child. */ GNode* children; } struct GOnce { /** * the status of the #GOnce */ GOnceStatus status; /** * the value returned by the call to the function, if @status * is %G_ONCE_STATUS_READY */ void* retval; } struct GOptionContext; /** * A GOptionEntry struct defines a single option. To have an effect, they * must be added to a #GOptionGroup with g_option_context_add_main_entries() * or g_option_group_add_entries(). */ struct GOptionEntry { /** * The long name of an option can be used to specify it * in a commandline as `--long_name`. Every option must have a * long name. To resolve conflicts if multiple option groups contain * the same long name, it is also possible to specify the option as * `--groupname-long_name`. */ const(char)* longName; /** * If an option has a short name, it can be specified * `-short_name` in a commandline. @short_name must be a printable * ASCII character different from '-', or zero if the option has no * short name. */ char shortName; /** * Flags from #GOptionFlags */ int flags; /** * The type of the option, as a #GOptionArg */ GOptionArg arg; /** * If the @arg type is %G_OPTION_ARG_CALLBACK, then @arg_data * must point to a #GOptionArgFunc callback function, which will be * called to handle the extra argument. Otherwise, @arg_data is a * pointer to a location to store the value, the required type of * the location depends on the @arg type: * - %G_OPTION_ARG_NONE: %gboolean * - %G_OPTION_ARG_STRING: %gchar* * - %G_OPTION_ARG_INT: %gint * - %G_OPTION_ARG_FILENAME: %gchar* * - %G_OPTION_ARG_STRING_ARRAY: %gchar** * - %G_OPTION_ARG_FILENAME_ARRAY: %gchar** * - %G_OPTION_ARG_DOUBLE: %gdouble * If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME, * the location will contain a newly allocated string if the option * was given. That string needs to be freed by the callee using g_free(). * Likewise if @arg type is %G_OPTION_ARG_STRING_ARRAY or * %G_OPTION_ARG_FILENAME_ARRAY, the data should be freed using g_strfreev(). */ void* argData; /** * the description for the option in `--help` * output. The @description is translated using the @translate_func * of the group, see g_option_group_set_translation_domain(). */ const(char)* description; /** * The placeholder to use for the extra argument parsed * by the option in `--help` output. The @arg_description is translated * using the @translate_func of the group, see * g_option_group_set_translation_domain(). */ const(char)* argDescription; } struct GOptionGroup; struct GPatternSpec; /** * Represents a file descriptor, which events to poll for, and which events * occurred. */ struct GPollFD { /** * the file descriptor to poll (or a HANDLE on Win32) */ int fd; /** * a bitwise combination from #GIOCondition, specifying which * events should be polled for. Typically for reading from a file * descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and * for writing you would use %G_IO_OUT | %G_IO_ERR. */ ushort events; /** * a bitwise combination of flags from #GIOCondition, returned * from the poll() function to indicate which events occurred. */ ushort revents; } struct GPrivate { void* p; GDestroyNotify notify; void*[2] future; } /** * Contains the public fields of a pointer array. */ struct GPtrArray { /** * points to the array of pointers, which may be moved when the * array grows */ void** pdata; /** * number of pointers in the array */ uint len; } struct GQueue { /** * a pointer to the first element of the queue */ GList* head; /** * a pointer to the last element of the queue */ GList* tail; /** * the number of elements in the queue */ uint length; } struct GRWLock { void* p; uint[2] i; } struct GRand; struct GRecMutex { void* p; uint[2] i; } struct GRegex; /** * The #GSList struct is used for each element in the singly-linked * list. */ struct GSList { /** * holds the element's data, which can be a pointer to any kind * of data, or any integer value using the * [Type Conversion Macros][glib-Type-Conversion-Macros] */ void* data; /** * contains the link to the next element in the list. */ GSList* next; } struct GScanner { /** * unused */ void* userData; /** * unused */ uint maxParseErrors; /** * g_scanner_error() increments this field */ uint parseErrors; /** * name of input stream, featured by the default message handler */ const(char)* inputName; /** * quarked data */ GData* qdata; /** * link into the scanner configuration */ GScannerConfig* config; /** * token parsed by the last g_scanner_get_next_token() */ GTokenType token; /** * value of the last token from g_scanner_get_next_token() */ GTokenValue value; /** * line number of the last token from g_scanner_get_next_token() */ uint line; /** * char number of the last token from g_scanner_get_next_token() */ uint position; /** * token parsed by the last g_scanner_peek_next_token() */ GTokenType nextToken; /** * value of the last token from g_scanner_peek_next_token() */ GTokenValue nextValue; /** * line number of the last token from g_scanner_peek_next_token() */ uint nextLine; /** * char number of the last token from g_scanner_peek_next_token() */ uint nextPosition; GHashTable* symbolTable; int inputFd; const(char)* text; const(char)* textEnd; char* buffer; uint scopeId; /** * handler function for _warn and _error */ GScannerMsgFunc msgHandler; } /** * Specifies the #GScanner parser configuration. Most settings can * be changed during the parsing phase and will affect the lexical * parsing of the next unpeeked token. */ struct GScannerConfig { /** * specifies which characters should be skipped * by the scanner (the default is the whitespace characters: space, * tab, carriage-return and line-feed). */ char* csetSkipCharacters; /** * specifies the characters which can start * identifiers (the default is #G_CSET_a_2_z, "_", and #G_CSET_A_2_Z). */ char* csetIdentifierFirst; /** * specifies the characters which can be used * in identifiers, after the first character (the default is * #G_CSET_a_2_z, "_0123456789", #G_CSET_A_2_Z, #G_CSET_LATINS, * #G_CSET_LATINC). */ char* csetIdentifierNth; /** * specifies the characters at the start and * end of single-line comments. The default is "#\n" which means * that single-line comments start with a '#' and continue until * a '\n' (end of line). */ char* cpairCommentSingle; import std.bitmanip: bitfields; mixin(bitfields!( uint, "caseSensitive", 1, uint, "skipCommentMulti", 1, uint, "skipCommentSingle", 1, uint, "scanCommentMulti", 1, uint, "scanIdentifier", 1, uint, "scanIdentifier1char", 1, uint, "scanIdentifierNULL", 1, uint, "scanSymbols", 1, uint, "scanBinary", 1, uint, "scanOctal", 1, uint, "scanFloat", 1, uint, "scanHex", 1, uint, "scanHexDollar", 1, uint, "scanStringSq", 1, uint, "scanStringDq", 1, uint, "numbers2Int", 1, uint, "int2Float", 1, uint, "identifier2String", 1, uint, "char2Token", 1, uint, "symbol2Token", 1, uint, "scope0Fallback", 1, uint, "storeInt64", 1, uint, "", 10 )); uint paddingDummy; } struct GSequence; struct GSequenceIter; struct GSource { void* callbackData; GSourceCallbackFuncs* callbackFuncs; GSourceFuncs* sourceFuncs; uint refCount; GMainContext* context; int priority; uint flags; uint sourceId; GSList* pollFds; GSource* prev; GSource* next; char* name; GSourcePrivate* priv; } /** * The `GSourceCallbackFuncs` struct contains * functions for managing callback objects. */ struct GSourceCallbackFuncs { /** */ extern(C) void function(void* cbData) doref; /** */ extern(C) void function(void* cbData) unref; /** */ extern(C) void function(void* cbData, GSource* source, GSourceFunc* func, void** data) get; } /** * The `GSourceFuncs` struct contains a table of * functions used to handle event sources in a generic manner. * * For idle sources, the prepare and check functions always return %TRUE * to indicate that the source is always ready to be processed. The prepare * function also returns a timeout value of 0 to ensure that the poll() call * doesn't block (since that would be time wasted which could have been spent * running the idle function). * * For timeout sources, the prepare and check functions both return %TRUE * if the timeout interval has expired. The prepare function also returns * a timeout value to ensure that the poll() call doesn't block too long * and miss the next timeout. * * For file descriptor sources, the prepare function typically returns %FALSE, * since it must wait until poll() has been called before it knows whether * any events need to be processed. It sets the returned timeout to -1 to * indicate that it doesn't mind how long the poll() call blocks. In the * check function, it tests the results of the poll() call to see if the * required condition has been met, and returns %TRUE if so. */ struct GSourceFuncs { /** */ extern(C) int function(GSource* source, int* timeout) prepare; /** */ extern(C) int function(GSource* source) check; /** */ extern(C) int function(GSource* source, GSourceFunc callback, void* userData) dispatch; /** */ extern(C) void function(GSource* source) finalize; GSourceFunc closureCallback; GSourceDummyMarshal closureMarshal; } struct GSourcePrivate; /** * A type corresponding to the appropriate struct type for the stat() * system call, depending on the platform and/or compiler being used. * * See g_stat() for more information. */ struct GStatBuf; struct GString { /** * points to the character data. It may move as text is added. * The @str field is null-terminated and so * can be used as an ordinary C string. */ char* str; /** * contains the length of the string, not including the * terminating nul byte. */ size_t len; /** * the number of bytes that can be stored in the * string before it needs to be reallocated. May be larger than @len. */ size_t allocatedLen; } struct GStringChunk; /** * An opaque structure representing a test case. */ struct GTestCase; struct GTestConfig { bool testInitialized; bool testQuick; bool testPerf; bool testVerbose; bool testQuiet; bool testUndefined; } struct GTestLogBuffer { GString* data; GSList* msgs; } struct GTestLogMsg { GTestLogType logType; uint nStrings; char** strings; uint nNums; long* nums; } struct GTestSuite; struct GThread; struct GThreadPool { /** * the function to execute in the threads of this pool */ GFunc func; /** * the user data for the threads of this pool */ void* userData; /** * are all threads exclusive to this pool */ bool exclusive; } struct GTimeVal { /** * seconds */ glong tvSec; /** * microseconds */ glong tvUsec; } struct GTimeZone; struct GTimer; /** * A union holding the value of the token. */ struct GTokenValue { union { /** * token symbol value */ void* vSymbol; /** * token identifier value */ char* vIdentifier; /** * token binary integer value */ gulong vBinary; /** * octal integer value */ gulong vOctal; /** * integer value */ gulong vInt; /** * 64-bit integer value */ ulong vInt64; /** * floating point value */ double vFloat; /** * hex integer value */ gulong vHex; /** * string value */ char* vString; /** * comment value */ char* vComment; /** * character value */ char vChar; /** * error value */ uint vError; } } /** * Each piece of memory that is pushed onto the stack * is cast to a GTrashStack*. * * Deprecated: #GTrashStack is deprecated without replacement */ struct GTrashStack { /** * pointer to the previous element of the stack, * gets stored in the first `sizeof (gpointer)` * bytes of the element */ GTrashStack* next; } struct GTree; struct GVariant; struct GVariantBuilder { union U { struct S { size_t partialMagic; GVariantType* type; size_t[14] y; } S s; size_t[16] x; } U u; } struct GVariantDict { union U { struct S { GVariant* asv; size_t partialMagic; size_t[14] y; } S s; size_t[16] x; } U u; } struct GVariantIter { size_t[16] x; } struct GVariantType; struct GModule; /** * Prototype of a #GChildWatchSource callback, called when a child * process has exited. To interpret @status, see the documentation * for g_spawn_check_exit_status(). * * Params: * pid = the process id of the child process * status = Status information about the child process, encoded * in a platform-specific manner * userData = user data passed to g_child_watch_add() */ public alias extern(C) void function(GPid pid, int status, void* userData) GChildWatchFunc; /** * Specifies the type of a comparison function used to compare two * values. The function should return a negative integer if the first * value comes before the second, 0 if they are equal, or a positive * integer if the first value comes after the second. * * Params: * a = a value * b = a value to compare with * userData = user data * * Returns: negative value if @a < @b; zero if @a = @b; positive * value if @a > @b */ public alias extern(C) int function(void* a, void* b, void* userData) GCompareDataFunc; /** * Specifies the type of a comparison function used to compare two * values. The function should return a negative integer if the first * value comes before the second, 0 if they are equal, or a positive * integer if the first value comes after the second. * * Params: * a = a value * b = a value to compare with * * Returns: negative value if @a < @b; zero if @a = @b; positive * value if @a > @b */ public alias extern(C) int function(void* a, void* b) GCompareFunc; /** * A function of this signature is used to copy the node data * when doing a deep-copy of a tree. * * Params: * src = A pointer to the data which should be copied * data = Additional data * * Returns: A pointer to the copy * * Since: 2.4 */ public alias extern(C) void* function(void* src, void* data) GCopyFunc; /** * Specifies the type of function passed to g_dataset_foreach(). It is * called with each #GQuark id and associated data element, together * with the @user_data parameter supplied to g_dataset_foreach(). * * Params: * keyId = the #GQuark id to identifying the data element. * data = the data element. * userData = user data passed to g_dataset_foreach(). */ public alias extern(C) void function(GQuark keyId, void* data, void* userData) GDataForeachFunc; /** * Specifies the type of function which is called when a data element * is destroyed. It is passed the pointer to the data element and * should free any memory and resources allocated for it. * * Params: * data = the data element. */ public alias extern(C) void function(void* data) GDestroyNotify; /** * The type of functions that are used to 'duplicate' an object. * What this means depends on the context, it could just be * incrementing the reference count, if @data is a ref-counted * object. * * Params: * data = the data to duplicate * userData = user data that was specified in g_datalist_id_dup_data() * * Returns: a duplicate of data */ public alias extern(C) void* function(void* data, void* userData) GDuplicateFunc; /** * Specifies the type of a function used to test two values for * equality. The function should return %TRUE if both values are equal * and %FALSE otherwise. * * Params: * a = a value * b = a value to compare with * * Returns: %TRUE if @a = @b; %FALSE otherwise */ public alias extern(C) int function(void* a, void* b) GEqualFunc; /** * Declares a type of function which takes an arbitrary * data pointer argument and has no return value. It is * not currently used in GLib or GTK+. * * Params: * data = a data pointer */ public alias extern(C) void function(void* data) GFreeFunc; /** * Specifies the type of functions passed to g_list_foreach() and * g_slist_foreach(). * * Params: * data = the element's data * userData = user data passed to g_list_foreach() or g_slist_foreach() */ public alias extern(C) void function(void* data, void* userData) GFunc; /** * Specifies the type of the function passed to g_hash_table_foreach(). * It is called with each key/value pair, together with the @user_data * parameter which is passed to g_hash_table_foreach(). * * Params: * key = a key * value = the value corresponding to the key * userData = user data passed to g_hash_table_foreach() */ public alias extern(C) void function(void* key, void* value, void* userData) GHFunc; /** * Specifies the type of the function passed to * g_hash_table_foreach_remove(). It is called with each key/value * pair, together with the @user_data parameter passed to * g_hash_table_foreach_remove(). It should return %TRUE if the * key/value pair should be removed from the #GHashTable. * * Params: * key = a key * value = the value associated with the key * userData = user data passed to g_hash_table_remove() * * Returns: %TRUE if the key/value pair should be removed from the * #GHashTable */ public alias extern(C) int function(void* key, void* value, void* userData) GHRFunc; /** * Specifies the type of the hash function which is passed to * g_hash_table_new() when a #GHashTable is created. * * The function is passed a key and should return a #guint hash value. * The functions g_direct_hash(), g_int_hash() and g_str_hash() provide * hash functions which can be used when the key is a #gpointer, #gint*, * and #gchar* respectively. * * g_direct_hash() is also the appropriate hash function for keys * of the form `GINT_TO_POINTER (n)` (or similar macros). * * A good hash functions should produce * hash values that are evenly distributed over a fairly large range. * The modulus is taken with the hash table size (a prime number) to * find the 'bucket' to place each key into. The function should also * be very fast, since it is called for each key lookup. * * Note that the hash functions provided by GLib have these qualities, * but are not particularly robust against manufactured keys that * cause hash collisions. Therefore, you should consider choosing * a more secure hash function when using a GHashTable with keys * that originate in untrusted data (such as HTTP requests). * Using g_str_hash() in that situation might make your application * vulerable to * [Algorithmic Complexity Attacks](https://lwn.net/Articles/474912/). * * The key to choosing a good hash is unpredictability. Even * cryptographic hashes are very easy to find collisions for when the * remainder is taken modulo a somewhat predictable prime number. There * must be an element of randomness that an attacker is unable to guess. * * Params: * key = a key * * Returns: the hash value corresponding to the key */ public alias extern(C) uint function(void* key) GHashFunc; /** * Defines the type of a hook function that can be invoked * by g_hook_list_invoke_check(). * * Params: * data = the data field of the #GHook is passed to the hook function here * * Returns: %FALSE if the #GHook should be destroyed */ public alias extern(C) int function(void* data) GHookCheckFunc; /** * Defines the type of function used by g_hook_list_marshal_check(). * * Params: * hook = a #GHook * marshalData = user data * * Returns: %FALSE if @hook should be destroyed */ public alias extern(C) int function(GHook* hook, void* marshalData) GHookCheckMarshaller; /** * Defines the type of function used to compare #GHook elements in * g_hook_insert_sorted(). * * Params: * newHook = the #GHook being inserted * sibling = the #GHook to compare with @new_hook * * Returns: a value <= 0 if @new_hook should be before @sibling */ public alias extern(C) int function(GHook* newHook, GHook* sibling) GHookCompareFunc; /** * Defines the type of function to be called when a hook in a * list of hooks gets finalized. * * Params: * hookList = a #GHookList * hook = the hook in @hook_list that gets finalized */ public alias extern(C) void function(GHookList* hookList, GHook* hook) GHookFinalizeFunc; /** * Defines the type of the function passed to g_hook_find(). * * Params: * hook = a #GHook * data = user data passed to g_hook_find_func() * * Returns: %TRUE if the required #GHook has been found */ public alias extern(C) int function(GHook* hook, void* data) GHookFindFunc; /** * Defines the type of a hook function that can be invoked * by g_hook_list_invoke(). * * Params: * data = the data field of the #GHook is passed to the hook function here */ public alias extern(C) void function(void* data) GHookFunc; /** * Defines the type of function used by g_hook_list_marshal(). * * Params: * hook = a #GHook * marshalData = user data */ public alias extern(C) void function(GHook* hook, void* marshalData) GHookMarshaller; /** * Specifies the type of function passed to g_io_add_watch() or * g_io_add_watch_full(), which is called when the requested condition * on a #GIOChannel is satisfied. * * Params: * source = the #GIOChannel event source * condition = the condition which has been satisfied * data = user data set in g_io_add_watch() or g_io_add_watch_full() * * Returns: the function should return %FALSE if the event source * should be removed */ public alias extern(C) int function(GIOChannel* source, GIOCondition condition, void* data) GIOFunc; /** * Specifies the prototype of log handler functions. * * The default log handler, g_log_default_handler(), automatically appends a * new-line character to @message when printing it. It is advised that any * custom log handler functions behave similarly, so that logging calls in user * code do not need modifying to add a new-line character to the message if the * log handler is changed. * * This is not used if structured logging is enabled; see * [Using Structured Logging][using-structured-logging]. * * Params: * logDomain = the log domain of the message * logLevel = the log level of the message (including the * fatal and recursion flags) * message = the message to process * userData = user data, set in g_log_set_handler() */ public alias extern(C) void function(const(char)* logDomain, GLogLevelFlags logLevel, const(char)* message, void* userData) GLogFunc; /** * Writer function for log entries. A log entry is a collection of one or more * #GLogFields, using the standard [field names from journal * specification](https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html). * See g_log_structured() for more information. * * Writer functions must ignore fields which they do not recognise, unless they * can write arbitrary binary output, as field values may be arbitrary binary. * * @log_level is guaranteed to be included in @fields as the `PRIORITY` field, * but is provided separately for convenience of deciding whether or where to * output the log entry. * * Writer functions should return %G_LOG_WRITER_HANDLED if they handled the log * message successfully or if they deliberately ignored it. If there was an * error handling the message (for example, if the writer function is meant to * send messages to a remote logging server and there is a network error), it * should return %G_LOG_WRITER_UNHANDLED. This allows writer functions to be * chained and fall back to simpler handlers in case of failure. * * Params: * logLevel = log level of the message * fields = fields forming the message * nFields = number of @fields * userData = user data passed to g_log_set_writer_func() * * Returns: %G_LOG_WRITER_HANDLED if the log entry was handled successfully; * %G_LOG_WRITER_UNHANDLED otherwise * * Since: 2.50 */ public alias extern(C) GLogWriterOutput function(GLogLevelFlags logLevel, GLogField* fields, size_t nFields, void* userData) GLogWriterFunc; /** * Specifies the type of function passed to g_node_children_foreach(). * The function is called with each child node, together with the user * data passed to g_node_children_foreach(). * * Params: * node = a #GNode. * data = user data passed to g_node_children_foreach(). */ public alias extern(C) void function(GNode* node, void* data) GNodeForeachFunc; /** * Specifies the type of function passed to g_node_traverse(). The * function is called with each of the nodes visited, together with the * user data passed to g_node_traverse(). If the function returns * %TRUE, then the traversal is stopped. * * Params: * node = a #GNode. * data = user data passed to g_node_traverse(). * * Returns: %TRUE to stop the traversal. */ public alias extern(C) int function(GNode* node, void* data) GNodeTraverseFunc; /** * The type of function to be passed as callback for %G_OPTION_ARG_CALLBACK * options. * * Params: * optionName = The name of the option being parsed. This will be either a * single dash followed by a single letter (for a short name) or two dashes * followed by a long option name. * value = The value to be parsed. * data = User data added to the #GOptionGroup containing the option when it * was created with g_option_group_new() * * Returns: %TRUE if the option was successfully parsed, %FALSE if an error * occurred, in which case @error should be set with g_set_error() * * Throws: GException on failure. */ public alias extern(C) int function(const(char)* optionName, const(char)* value, void* data, GError** err) GOptionArgFunc; /** * The type of function to be used as callback when a parse error occurs. * * Params: * context = The active #GOptionContext * group = The group to which the function belongs * data = User data added to the #GOptionGroup containing the option when it * was created with g_option_group_new() * * Throws: GException on failure. */ public alias extern(C) void function(GOptionContext* context, GOptionGroup* group, void* data, GError** err) GOptionErrorFunc; /** * The type of function that can be called before and after parsing. * * Params: * context = The active #GOptionContext * group = The group to which the function belongs * data = User data added to the #GOptionGroup containing the option when it * was created with g_option_group_new() * * Returns: %TRUE if the function completed successfully, %FALSE if an error * occurred, in which case @error should be set with g_set_error() * * Throws: GException on failure. */ public alias extern(C) int function(GOptionContext* context, GOptionGroup* group, void* data, GError** err) GOptionParseFunc; /** * Specifies the type of function passed to g_main_context_set_poll_func(). * The semantics of the function should match those of the poll() system call. * * Params: * ufds = an array of #GPollFD elements * nfsd = the number of elements in @ufds * timeout = the maximum time to wait for an event of the file descriptors. * A negative value indicates an infinite timeout. * * Returns: the number of #GPollFD elements which have events or errors * reported, or -1 if an error occurred. */ public alias extern(C) int function(GPollFD* ufds, uint nfsd, int timeout) GPollFunc; /** * Specifies the type of the print handler functions. * These are called with the complete formatted string to output. * * Params: * str = the message to output */ public alias extern(C) void function(const(char)* str) GPrintFunc; /** * Specifies the type of the function passed to g_regex_replace_eval(). * It is called for each occurrence of the pattern in the string passed * to g_regex_replace_eval(), and it should append the replacement to * @result. * * Params: * matchInfo = the #GMatchInfo generated by the match. * Use g_match_info_get_regex() and g_match_info_get_string() if you * need the #GRegex or the matched string. * result = a #GString containing the new string * userData = user data passed to g_regex_replace_eval() * * Returns: %FALSE to continue the replacement process, %TRUE to stop it * * Since: 2.14 */ public alias extern(C) int function(GMatchInfo* matchInfo, GString* result, void* userData) GRegexEvalCallback; /** * Specifies the type of the message handler function. * * Params: * scanner = a #GScanner * message = the message * error = %TRUE if the message signals an error, * %FALSE if it signals a warning. */ public alias extern(C) void function(GScanner* scanner, char* message, int error) GScannerMsgFunc; /** * A #GSequenceIterCompareFunc is a function used to compare iterators. * It must return zero if the iterators compare equal, a negative value * if @a comes before @b, and a positive value if @b comes before @a. * * Params: * a = a #GSequenceIter * b = a #GSequenceIter * data = user data * * Returns: zero if the iterators are equal, a negative value if @a * comes before @b, and a positive value if @b comes before @a. */ public alias extern(C) int function(GSequenceIter* a, GSequenceIter* b, void* data) GSequenceIterCompareFunc; /** * This is just a placeholder for #GClosureMarshal, * which cannot be used here for dependency reasons. */ public alias extern(C) void function() GSourceDummyMarshal; /** * Specifies the type of function passed to g_timeout_add(), * g_timeout_add_full(), g_idle_add(), and g_idle_add_full(). * * Params: * userData = data passed to the function, set when the source was * created with one of the above functions * * Returns: %FALSE if the source should be removed. #G_SOURCE_CONTINUE and * #G_SOURCE_REMOVE are more memorable names for the return value. */ public alias extern(C) int function(void* userData) GSourceFunc; /** * Specifies the type of the setup function passed to g_spawn_async(), * g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very * limited ways, be used to affect the child's execution. * * On POSIX platforms, the function is called in the child after GLib * has performed all the setup it plans to perform, but before calling * exec(). Actions taken in this function will only affect the child, * not the parent. * * On Windows, the function is called in the parent. Its usefulness on * Windows is thus questionable. In many cases executing the child setup * function in the parent can have ill effects, and you should be very * careful when porting software to Windows that uses child setup * functions. * * However, even on POSIX, you are extremely limited in what you can * safely do from a #GSpawnChildSetupFunc, because any mutexes that were * held by other threads in the parent process at the time of the fork() * will still be locked in the child process, and they will never be * unlocked (since the threads that held them don't exist in the child). * POSIX allows only async-signal-safe functions (see signal(7)) to be * called in the child between fork() and exec(), which drastically limits * the usefulness of child setup functions. * * In particular, it is not safe to call any function which may * call malloc(), which includes POSIX functions such as setenv(). * If you need to set up the child environment differently from * the parent, you should use g_get_environ(), g_environ_setenv(), * and g_environ_unsetenv(), and then pass the complete environment * list to the `g_spawn...` function. * * Params: * userData = user data to pass to the function. */ public alias extern(C) void function(void* userData) GSpawnChildSetupFunc; /** * The type used for test case functions that take an extra pointer * argument. * * Params: * userData = the data provided when registering the test * * Since: 2.28 */ public alias extern(C) void function(void* userData) GTestDataFunc; /** * The type used for functions that operate on test fixtures. This is * used for the fixture setup and teardown functions as well as for the * testcases themselves. * * @user_data is a pointer to the data that was given when registering * the test case. * * @fixture will be a pointer to the area of memory allocated by the * test framework, of the size requested. If the requested size was * zero then @fixture will be equal to @user_data. * * Params: * fixture = the test fixture * userData = the data provided when registering the test * * Since: 2.28 */ public alias extern(C) void function(void* fixture, void* userData) GTestFixtureFunc; /** * The type used for test case functions. * * Since: 2.28 */ public alias extern(C) void function() GTestFunc; /** * Specifies the prototype of fatal log handler functions. * * Params: * logDomain = the log domain of the message * logLevel = the log level of the message (including the fatal and recursion flags) * message = the message to process * userData = user data, set in g_test_log_set_fatal_handler() * * Returns: %TRUE if the program should abort, %FALSE otherwise * * Since: 2.22 */ public alias extern(C) int function(const(char)* logDomain, GLogLevelFlags logLevel, const(char)* message, void* userData) GTestLogFatalFunc; /** * Specifies the type of the @func functions passed to g_thread_new() * or g_thread_try_new(). * * Params: * data = data passed to the thread * * Returns: the return value of the thread */ public alias extern(C) void* function(void* data) GThreadFunc; /** * The type of functions which are used to translate user-visible * strings, for output. * * Params: * str = the untranslated string * data = user data specified when installing the function, e.g. * in g_option_group_set_translate_func() * * Returns: a translation of the string for the current locale. * The returned string is owned by GLib and must not be freed. */ public alias extern(C) const(char)* function(const(char)* str, void* data) GTranslateFunc; /** * Specifies the type of function passed to g_tree_traverse(). It is * passed the key and value of each node, together with the @user_data * parameter passed to g_tree_traverse(). If the function returns * %TRUE, the traversal is stopped. * * Params: * key = a key of a #GTree node * value = the value corresponding to the key * data = user data passed to g_tree_traverse() * * Returns: %TRUE to stop the traversal */ public alias extern(C) int function(void* key, void* value, void* data) GTraverseFunc; /** * The type of functions to be called when a UNIX fd watch source * triggers. * * Params: * fd = the fd that triggered the event * condition = the IO conditions reported on @fd * userData = user data passed to g_unix_fd_add() * * Returns: %FALSE if the source should be removed */ public alias extern(C) int function(int fd, GIOCondition condition, void* userData) GUnixFDSourceFunc; /** * Declares a type of function which takes no arguments * and has no return value. It is used to specify the type * function passed to g_atexit(). */ public alias extern(C) void function() GVoidFunc; /** * Specifies the type of the module initialization function. * If a module contains a function named g_module_check_init() it is called * automatically when the module is loaded. It is passed the #GModule structure * and should return %NULL on success or a string describing the initialization * error. * * Params: * modul = the #GModule corresponding to the module which has just been loaded * * Returns: %NULL on success, or a string describing the initialization error */ public alias extern(C) const(char)* function(GModule* modul) GModuleCheckInit; /** * Specifies the type of the module function called when it is unloaded. * If a module contains a function named g_module_unload() it is called * automatically when the module is unloaded. * It is passed the #GModule structure. * * Params: * modul = the #GModule about to be unloaded */ public alias extern(C) void function(GModule* modul) GModuleUnload; enum ANALYZER_ANALYZING = 1; alias G_ANALYZER_ANALYZING = ANALYZER_ANALYZING; /** * A good size for a buffer to be passed into g_ascii_dtostr(). * It is guaranteed to be enough for all output of that function * on systems with 64bit IEEE-compatible doubles. * * The typical usage would be something like: * |[ * char buf[G_ASCII_DTOSTR_BUF_SIZE]; * * fprintf (out, "value=%s\n", g_ascii_dtostr (buf, sizeof (buf), value)); * ]| */ enum ASCII_DTOSTR_BUF_SIZE = 39; alias G_ASCII_DTOSTR_BUF_SIZE = ASCII_DTOSTR_BUF_SIZE; /** * Specifies one of the possible types of byte order. * See #G_BYTE_ORDER. */ enum BIG_ENDIAN = 4321; alias G_BIG_ENDIAN = BIG_ENDIAN; /** * The set of uppercase ASCII alphabet characters. * Used for specifying valid identifier characters * in #GScannerConfig. */ enum CSET_A_2_Z = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; alias G_CSET_A_2_Z = CSET_A_2_Z; /** * The set of ASCII digits. * Used for specifying valid identifier characters * in #GScannerConfig. */ enum CSET_DIGITS = "0123456789"; alias G_CSET_DIGITS = CSET_DIGITS; /** * The set of lowercase ASCII alphabet characters. * Used for specifying valid identifier characters * in #GScannerConfig. */ enum CSET_a_2_z = "abcdefghijklmnopqrstuvwxyz"; alias G_CSET_a_2_z = CSET_a_2_z; /** * A bitmask that restricts the possible flags passed to * g_datalist_set_flags(). Passing a flags value where * flags & ~G_DATALIST_FLAGS_MASK != 0 is an error. */ enum DATALIST_FLAGS_MASK = 3; alias G_DATALIST_FLAGS_MASK = DATALIST_FLAGS_MASK; /** * Represents an invalid #GDateDay. */ enum DATE_BAD_DAY = 0; alias G_DATE_BAD_DAY = DATE_BAD_DAY; /** * Represents an invalid Julian day number. */ enum DATE_BAD_JULIAN = 0; alias G_DATE_BAD_JULIAN = DATE_BAD_JULIAN; /** * Represents an invalid year. */ enum DATE_BAD_YEAR = 0; alias G_DATE_BAD_YEAR = DATE_BAD_YEAR; /** * This is the platform dependent conversion specifier for scanning and * printing values of type #gint16. It is a string literal, but doesn't * include the percent-sign, such that you can add precision and length * modifiers between percent-sign and conversion specifier. * * |[ * gint16 in; * gint32 out; * sscanf ("42", "%" G_GINT16_FORMAT, &in) * out = in * 1000; * g_print ("%" G_GINT32_FORMAT, out); * ]| */ enum GINT16_FORMAT = "hi"; alias G_GINT16_FORMAT = GINT16_FORMAT; /** * The platform dependent length modifier for conversion specifiers * for scanning and printing values of type #gint16 or #guint16. It * is a string literal, but doesn't include the percent-sign, such * that you can add precision and length modifiers between percent-sign * and conversion specifier and append a conversion specifier. * * The following example prints "0x7b"; * |[ * gint16 value = 123; * g_print ("%#" G_GINT16_MODIFIER "x", value); * ]| */ enum GINT16_MODIFIER = "h"; alias G_GINT16_MODIFIER = GINT16_MODIFIER; /** * This is the platform dependent conversion specifier for scanning * and printing values of type #gint32. See also #G_GINT16_FORMAT. */ enum GINT32_FORMAT = "i"; alias G_GINT32_FORMAT = GINT32_FORMAT; /** * The platform dependent length modifier for conversion specifiers * for scanning and printing values of type #gint32 or #guint32. It * is a string literal. See also #G_GINT16_MODIFIER. */ enum GINT32_MODIFIER = ""; alias G_GINT32_MODIFIER = GINT32_MODIFIER; /** * This is the platform dependent conversion specifier for scanning * and printing values of type #gint64. See also #G_GINT16_FORMAT. * * Some platforms do not support scanning and printing 64-bit integers, * even though the types are supported. On such platforms %G_GINT64_FORMAT * is not defined. Note that scanf() may not support 64-bit integers, even * if %G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() * is not recommended for parsing anyway; consider using g_ascii_strtoull() * instead. */ enum GINT64_FORMAT = "li"; alias G_GINT64_FORMAT = GINT64_FORMAT; /** * The platform dependent length modifier for conversion specifiers * for scanning and printing values of type #gint64 or #guint64. * It is a string literal. * * Some platforms do not support printing 64-bit integers, even * though the types are supported. On such platforms %G_GINT64_MODIFIER * is not defined. */ enum GINT64_MODIFIER = "l"; alias G_GINT64_MODIFIER = GINT64_MODIFIER; /** * This is the platform dependent conversion specifier for scanning * and printing values of type #gintptr. */ enum GINTPTR_FORMAT = "li"; alias G_GINTPTR_FORMAT = GINTPTR_FORMAT; /** * The platform dependent length modifier for conversion specifiers * for scanning and printing values of type #gintptr or #guintptr. * It is a string literal. */ enum GINTPTR_MODIFIER = "l"; alias G_GINTPTR_MODIFIER = GINTPTR_MODIFIER; /** * Expands to "" on all modern compilers, and to __FUNCTION__ on gcc * version 2.x. Don't use it. * * Deprecated: Use G_STRFUNC() instead */ enum GNUC_FUNCTION = ""; alias G_GNUC_FUNCTION = GNUC_FUNCTION; /** * Expands to "" on all modern compilers, and to __PRETTY_FUNCTION__ * on gcc version 2.x. Don't use it. * * Deprecated: Use G_STRFUNC() instead */ enum GNUC_PRETTY_FUNCTION = ""; alias G_GNUC_PRETTY_FUNCTION = GNUC_PRETTY_FUNCTION; /** * This is the platform dependent conversion specifier for scanning * and printing values of type #gsize. See also #G_GINT16_FORMAT. */ enum GSIZE_FORMAT = "lu"; alias G_GSIZE_FORMAT = GSIZE_FORMAT; /** * The platform dependent length modifier for conversion specifiers * for scanning and printing values of type #gsize. It * is a string literal. */ enum GSIZE_MODIFIER = "l"; alias G_GSIZE_MODIFIER = GSIZE_MODIFIER; /** * This is the platform dependent conversion specifier for scanning * and printing values of type #gssize. See also #G_GINT16_FORMAT. */ enum GSSIZE_FORMAT = "li"; alias G_GSSIZE_FORMAT = GSSIZE_FORMAT; /** * The platform dependent length modifier for conversion specifiers * for scanning and printing values of type #gssize. It * is a string literal. */ enum GSSIZE_MODIFIER = "l"; alias G_GSSIZE_MODIFIER = GSSIZE_MODIFIER; /** * This is the platform dependent conversion specifier for scanning * and printing values of type #guint16. See also #G_GINT16_FORMAT */ enum GUINT16_FORMAT = "hu"; alias G_GUINT16_FORMAT = GUINT16_FORMAT; /** * This is the platform dependent conversion specifier for scanning * and printing values of type #guint32. See also #G_GINT16_FORMAT. */ enum GUINT32_FORMAT = "u"; alias G_GUINT32_FORMAT = GUINT32_FORMAT; /** * This is the platform dependent conversion specifier for scanning * and printing values of type #guint64. See also #G_GINT16_FORMAT. * * Some platforms do not support scanning and printing 64-bit integers, * even though the types are supported. On such platforms %G_GUINT64_FORMAT * is not defined. Note that scanf() may not support 64-bit integers, even * if %G_GINT64_FORMAT is defined. Due to its weak error handling, scanf() * is not recommended for parsing anyway; consider using g_ascii_strtoull() * instead. */ enum GUINT64_FORMAT = "lu"; alias G_GUINT64_FORMAT = GUINT64_FORMAT; /** * This is the platform dependent conversion specifier * for scanning and printing values of type #guintptr. */ enum GUINTPTR_FORMAT = "lu"; alias G_GUINTPTR_FORMAT = GUINTPTR_FORMAT; enum HAVE_GINT64 = 1; alias G_HAVE_GINT64 = HAVE_GINT64; enum HAVE_GNUC_VARARGS = 1; alias G_HAVE_GNUC_VARARGS = HAVE_GNUC_VARARGS; /** * Defined to 1 if gcc-style visibility handling is supported. */ enum HAVE_GNUC_VISIBILITY = 1; alias G_HAVE_GNUC_VISIBILITY = HAVE_GNUC_VISIBILITY; enum HAVE_GROWING_STACK = 0; alias G_HAVE_GROWING_STACK = HAVE_GROWING_STACK; enum HAVE_ISO_VARARGS = 1; alias G_HAVE_ISO_VARARGS = HAVE_ISO_VARARGS; /** * The position of the first bit which is not reserved for internal * use be the #GHook implementation, i.e. * `1 << G_HOOK_FLAG_USER_SHIFT` is the first * bit which can be used for application-defined flags. */ enum HOOK_FLAG_USER_SHIFT = 4; alias G_HOOK_FLAG_USER_SHIFT = HOOK_FLAG_USER_SHIFT; /** * The bias by which exponents in double-precision floats are offset. */ enum IEEE754_DOUBLE_BIAS = 1023; alias G_IEEE754_DOUBLE_BIAS = IEEE754_DOUBLE_BIAS; /** * The bias by which exponents in single-precision floats are offset. */ enum IEEE754_FLOAT_BIAS = 127; alias G_IEEE754_FLOAT_BIAS = IEEE754_FLOAT_BIAS; /** * The name of the main group of a desktop entry file, as defined in the * [Desktop Entry Specification](http://freedesktop.org/Standards/desktop-entry-spec). * Consult the specification for more * details about the meanings of the keys below. */ enum KEY_FILE_DESKTOP_GROUP = "Desktop Entry"; alias G_KEY_FILE_DESKTOP_GROUP = KEY_FILE_DESKTOP_GROUP; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string list * giving the available application actions. */ enum KEY_FILE_DESKTOP_KEY_ACTIONS = "Actions"; alias G_KEY_FILE_DESKTOP_KEY_ACTIONS = KEY_FILE_DESKTOP_KEY_ACTIONS; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list * of strings giving the categories in which the desktop entry * should be shown in a menu. */ enum KEY_FILE_DESKTOP_KEY_CATEGORIES = "Categories"; alias G_KEY_FILE_DESKTOP_KEY_CATEGORIES = KEY_FILE_DESKTOP_KEY_CATEGORIES; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized * string giving the tooltip for the desktop entry. */ enum KEY_FILE_DESKTOP_KEY_COMMENT = "Comment"; alias G_KEY_FILE_DESKTOP_KEY_COMMENT = KEY_FILE_DESKTOP_KEY_COMMENT; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean set to true * if the application is D-Bus activatable. */ enum KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE = "DBusActivatable"; alias G_KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE = KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string * giving the command line to execute. It is only valid for desktop * entries with the `Application` type. */ enum KEY_FILE_DESKTOP_KEY_EXEC = "Exec"; alias G_KEY_FILE_DESKTOP_KEY_EXEC = KEY_FILE_DESKTOP_KEY_EXEC; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized * string giving the generic name of the desktop entry. */ enum KEY_FILE_DESKTOP_KEY_GENERIC_NAME = "GenericName"; alias G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME = KEY_FILE_DESKTOP_KEY_GENERIC_NAME; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean * stating whether the desktop entry has been deleted by the user. */ enum KEY_FILE_DESKTOP_KEY_HIDDEN = "Hidden"; alias G_KEY_FILE_DESKTOP_KEY_HIDDEN = KEY_FILE_DESKTOP_KEY_HIDDEN; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized * string giving the name of the icon to be displayed for the desktop * entry. */ enum KEY_FILE_DESKTOP_KEY_ICON = "Icon"; alias G_KEY_FILE_DESKTOP_KEY_ICON = KEY_FILE_DESKTOP_KEY_ICON; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list * of strings giving the MIME types supported by this desktop entry. */ enum KEY_FILE_DESKTOP_KEY_MIME_TYPE = "MimeType"; alias G_KEY_FILE_DESKTOP_KEY_MIME_TYPE = KEY_FILE_DESKTOP_KEY_MIME_TYPE; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a localized * string giving the specific name of the desktop entry. */ enum KEY_FILE_DESKTOP_KEY_NAME = "Name"; alias G_KEY_FILE_DESKTOP_KEY_NAME = KEY_FILE_DESKTOP_KEY_NAME; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of * strings identifying the environments that should not display the * desktop entry. */ enum KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN = "NotShowIn"; alias G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN = KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean * stating whether the desktop entry should be shown in menus. */ enum KEY_FILE_DESKTOP_KEY_NO_DISPLAY = "NoDisplay"; alias G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY = KEY_FILE_DESKTOP_KEY_NO_DISPLAY; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a list of * strings identifying the environments that should display the * desktop entry. */ enum KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN = "OnlyShowIn"; alias G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN = KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string * containing the working directory to run the program in. It is only * valid for desktop entries with the `Application` type. */ enum KEY_FILE_DESKTOP_KEY_PATH = "Path"; alias G_KEY_FILE_DESKTOP_KEY_PATH = KEY_FILE_DESKTOP_KEY_PATH; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean * stating whether the application supports the * [Startup Notification Protocol Specification](http://www.freedesktop.org/Standards/startup-notification-spec). */ enum KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY = "StartupNotify"; alias G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY = KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is string * identifying the WM class or name hint of a window that the application * will create, which can be used to emulate Startup Notification with * older applications. */ enum KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS = "StartupWMClass"; alias G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS = KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a boolean * stating whether the program should be run in a terminal window. * It is only valid for desktop entries with the * `Application` type. */ enum KEY_FILE_DESKTOP_KEY_TERMINAL = "Terminal"; alias G_KEY_FILE_DESKTOP_KEY_TERMINAL = KEY_FILE_DESKTOP_KEY_TERMINAL; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string * giving the file name of a binary on disk used to determine if the * program is actually installed. It is only valid for desktop entries * with the `Application` type. */ enum KEY_FILE_DESKTOP_KEY_TRY_EXEC = "TryExec"; alias G_KEY_FILE_DESKTOP_KEY_TRY_EXEC = KEY_FILE_DESKTOP_KEY_TRY_EXEC; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string * giving the type of the desktop entry. Usually * #G_KEY_FILE_DESKTOP_TYPE_APPLICATION, * #G_KEY_FILE_DESKTOP_TYPE_LINK, or * #G_KEY_FILE_DESKTOP_TYPE_DIRECTORY. */ enum KEY_FILE_DESKTOP_KEY_TYPE = "Type"; alias G_KEY_FILE_DESKTOP_KEY_TYPE = KEY_FILE_DESKTOP_KEY_TYPE; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string * giving the URL to access. It is only valid for desktop entries * with the `Link` type. */ enum KEY_FILE_DESKTOP_KEY_URL = "URL"; alias G_KEY_FILE_DESKTOP_KEY_URL = KEY_FILE_DESKTOP_KEY_URL; /** * A key under #G_KEY_FILE_DESKTOP_GROUP, whose value is a string * giving the version of the Desktop Entry Specification used for * the desktop entry file. */ enum KEY_FILE_DESKTOP_KEY_VERSION = "Version"; alias G_KEY_FILE_DESKTOP_KEY_VERSION = KEY_FILE_DESKTOP_KEY_VERSION; /** * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop * entries representing applications. */ enum KEY_FILE_DESKTOP_TYPE_APPLICATION = "Application"; alias G_KEY_FILE_DESKTOP_TYPE_APPLICATION = KEY_FILE_DESKTOP_TYPE_APPLICATION; /** * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop * entries representing directories. */ enum KEY_FILE_DESKTOP_TYPE_DIRECTORY = "Directory"; alias G_KEY_FILE_DESKTOP_TYPE_DIRECTORY = KEY_FILE_DESKTOP_TYPE_DIRECTORY; /** * The value of the #G_KEY_FILE_DESKTOP_KEY_TYPE, key for desktop * entries representing links to documents. */ enum KEY_FILE_DESKTOP_TYPE_LINK = "Link"; alias G_KEY_FILE_DESKTOP_TYPE_LINK = KEY_FILE_DESKTOP_TYPE_LINK; /** * Specifies one of the possible types of byte order. * See #G_BYTE_ORDER. */ enum LITTLE_ENDIAN = 1234; alias G_LITTLE_ENDIAN = LITTLE_ENDIAN; /** * Defines the log domain. * * Libraries should define this so that any messages * which they log can be differentiated from messages from other * libraries and application code. But be careful not to define * it in any public header files. * * For example, GTK+ uses this in its Makefile.am: * |[ * AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gtk\" * ]| * * Applications can choose to leave it as the default %NULL (or "") * domain. However, defining the domain offers the same advantages as * above. */ enum LOG_DOMAIN = 0; alias G_LOG_DOMAIN = LOG_DOMAIN; /** * GLib log levels that are considered fatal by default. * * This is not used if structured logging is enabled; see * [Using Structured Logging][using-structured-logging]. */ enum LOG_FATAL_MASK = 0; alias G_LOG_FATAL_MASK = LOG_FATAL_MASK; /** * Log levels below 1< * g_object_bind_property (object1, "property-a", * object2, "property-b", * G_BINDING_DEFAULT); * ]| * * will cause the property named "property-b" of @object2 to be updated * every time g_object_set() or the specific accessor changes the value of * the property "property-a" of @object1. * * It is possible to create a bidirectional binding between two properties * of two #GObject instances, so that if either property changes, the * other is updated as well, for instance: * * |[ * g_object_bind_property (object1, "property-a", * object2, "property-b", * G_BINDING_BIDIRECTIONAL); * ]| * * will keep the two properties in sync. * * It is also possible to set a custom transformation function (in both * directions, in case of a bidirectional binding) to apply a custom * transformation from the source value to the target value before * applying it; for instance, the following binding: * * |[ * g_object_bind_property_full (adjustment1, "value", * adjustment2, "value", * G_BINDING_BIDIRECTIONAL, * celsius_to_fahrenheit, * fahrenheit_to_celsius, * NULL, NULL); * ]| * * will keep the "value" property of the two adjustments in sync; the * @celsius_to_fahrenheit function will be called whenever the "value" * property of @adjustment1 changes and will transform the current value * of the property before applying it to the "value" property of @adjustment2. * * Vice versa, the @fahrenheit_to_celsius function will be called whenever * the "value" property of @adjustment2 changes, and will transform the * current value of the property before applying it to the "value" property * of @adjustment1. * * Note that #GBinding does not resolve cycles by itself; a cycle like * * |[ * object1:propertyA -> object2:propertyB * object2:propertyB -> object3:propertyC * object3:propertyC -> object1:propertyA * ]| * * might lead to an infinite loop. The loop, in this particular case, * can be avoided if the objects emit the #GObject::notify signal only * if the value has effectively been changed. A binding is implemented * using the #GObject::notify signal, so it is susceptible to all the * various ways of blocking a signal emission, like g_signal_stop_emission() * or g_signal_handler_block(). * * A binding will be severed, and the resources it allocates freed, whenever * either one of the #GObject instances it refers to are finalized, or when * the #GBinding instance loses its last reference. * * Bindings for languages with garbage collection can use * g_binding_unbind() to explicitly release a binding between the source * and target properties, instead of relying on the last reference on the * binding, source, and target instances to drop. * * #GBinding is available since GObject 2.26 * * Since: 2.26 */ public class Binding : ObjectG { /** the main Gtk struct */ protected GBinding* gBinding; /** Get the main Gtk struct */ public GBinding* getBindingStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gBinding; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gBinding; } protected override void setStruct(GObject* obj) { gBinding = cast(GBinding*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GBinding* gBinding, bool ownedRef = false) { this.gBinding = gBinding; super(cast(GObject*)gBinding, ownedRef); } /** */ public static GType getType() { return g_binding_get_type(); } /** * Retrieves the flags passed when constructing the #GBinding. * * Returns: the #GBindingFlags used by the #GBinding * * Since: 2.26 */ public GBindingFlags getFlags() { return g_binding_get_flags(gBinding); } /** * Retrieves the #GObject instance used as the source of the binding. * * Returns: the source #GObject * * Since: 2.26 */ public ObjectG getSource() { auto p = g_binding_get_source(gBinding); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); } /** * Retrieves the name of the property of #GBinding:source used as the source * of the binding. * * Returns: the name of the source property * * Since: 2.26 */ public string getSourceProperty() { return Str.toString(g_binding_get_source_property(gBinding)); } /** * Retrieves the #GObject instance used as the target of the binding. * * Returns: the target #GObject * * Since: 2.26 */ public ObjectG getTarget() { auto p = g_binding_get_target(gBinding); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); } /** * Retrieves the name of the property of #GBinding:target used as the target * of the binding. * * Returns: the name of the target property * * Since: 2.26 */ public string getTargetProperty() { return Str.toString(g_binding_get_target_property(gBinding)); } /** * Explicitly releases the binding between the source and the target * property expressed by @binding. * * This function will release the reference that is being held on * the @binding instance; if you want to hold on to the #GBinding instance * after calling g_binding_unbind(), you will need to hold a reference * to it. * * Since: 2.38 */ public void unbind() { g_binding_unbind(gBinding); } } GtkD-3.7.5/generated/gtkd/gobject/Boxed.d000066400000000000000000000053741324604450400201040ustar00rootroot00000000000000/* * 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 gobject.Boxed; private import glib.Str; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** */ public struct Boxed { /** * Provide a copy of a boxed structure @src_boxed which is of type @boxed_type. * * Params: * boxedType = The type of @src_boxed. * srcBoxed = The boxed structure to be copied. * * Returns: The newly created copy of the boxed * structure. */ public static void* copy(GType boxedType, void* srcBoxed) { return g_boxed_copy(boxedType, srcBoxed); } /** * Free the boxed structure @boxed which is of type @boxed_type. * * Params: * boxedType = The type of @boxed. * boxed = The boxed structure to be freed. */ public static void free(GType boxedType, void* boxed) { g_boxed_free(boxedType, boxed); } /** * This function creates a new %G_TYPE_BOXED derived type id for a new * boxed type with name @name. Boxed type handling functions have to be * provided to copy and free opaque boxed structures of this type. * * Params: * name = Name of the new boxed type. * boxedCopy = Boxed structure copy function. * boxedFree = Boxed structure free function. * * Returns: New %G_TYPE_BOXED derived type id for @name. */ public static GType typeRegisterStatic(string name, GBoxedCopyFunc boxedCopy, GBoxedFreeFunc boxedFree) { return g_boxed_type_register_static(Str.toStringz(name), boxedCopy, boxedFree); } /** * Creates a new %G_TYPE_POINTER derived type id for a new * pointer type with name @name. * * Params: * name = the name of the new pointer type. * * Returns: a new %G_TYPE_POINTER derived type id for @name. */ public static GType pointerTypeRegisterStatic(string name) { return g_pointer_type_register_static(Str.toStringz(name)); } } GtkD-3.7.5/generated/gtkd/gobject/CClosure.d000066400000000000000000001571241324604450400205630ustar00rootroot00000000000000/* * 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 gobject.CClosure; private import glib.ConstructionException; private import gobject.Closure; private import gobject.ObjectG; private import gobject.TypeInstance; private import gobject.Value; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * A #GCClosure is a specialization of #GClosure for C function callbacks. */ public class CClosure { /** the main Gtk struct */ protected GCClosure* gCClosure; protected bool ownedRef; /** Get the main Gtk struct */ public GCClosure* getCClosureStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gCClosure; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gCClosure; } /** * Sets our main struct and passes it to the parent class. */ public this (GCClosure* gCClosure, bool ownedRef = false) { this.gCClosure = gCClosure; this.ownedRef = ownedRef; } /** * Creates a new closure which invokes callbackFunc with userData as * the last parameter. * * Params: * callbackFunc = the function to invoke * userData = user data to pass to callbackFunc * destroyData = destroy notify to be called when userData is no longer used * swap = if true invoce with usrData as the first parameter * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GCallback callbackFunc, void* userData, GClosureNotify destroyData, bool swap) { GClosure* p; if ( swap ) p = g_cclosure_new_swap(callbackFunc, userData, destroyData); else p = g_cclosure_new(callbackFunc, userData, destroyData); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GCClosure*) p); } /** * A variant of this() which uses object as userData and * calls ObjectG.watchClosure() on object and the created * closure. This function is useful when you have a callback closely * associated with a gobject.ObjectG, and want the callback to no longer run * after the object is is freed. * * Params: * callbackFunc = the function to invoke * object = a gobject.ObjectG.ObjectG to pass to callbackFunc * swap = if true invoce with usrData as the first parameter * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GCallback callbackFunc, ObjectG object, bool swap) { GClosure* p; if ( swap ) p = g_cclosure_new_object_swap(callbackFunc, (object is null) ? null : object.getObjectGStruct()); else p = g_cclosure_new_object(callbackFunc, (object is null) ? null : object.getObjectGStruct()); if(p is null) { throw new ConstructionException("null returned by new_object"); } this(cast(GCClosure*) p); } /** */ /** * A #GClosureMarshal function for use with signals with handlers that * take two boxed pointers as arguments and return a boolean. If you * have such a signal, you will probably also need to use an * accumulator, such as g_signal_accumulator_true_handled(). * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalBOOLEANBOXEDBOXED(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_BOOLEAN__BOXED_BOXED((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__BOXED_BOXED(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalBOOLEANBOXEDBOXEDv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with handlers that * take a flags type as an argument and return a boolean. If you have * such a signal, you will probably also need to use an accumulator, * such as g_signal_accumulator_true_handled(). * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalBOOLEANFLAGS(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_BOOLEAN__FLAGS((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_BOOLEAN__FLAGS(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalBOOLEANFLAGSv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_BOOLEAN__FLAGSv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with handlers that * take a #GObject and a pointer and produce a string. It is highly * unlikely that your signal handler fits this description. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalSTRINGOBJECTPOINTER(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_STRING__OBJECT_POINTER((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_STRING__OBJECT_POINTER(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalSTRINGOBJECTPOINTERv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_STRING__OBJECT_POINTERv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * boolean argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDBOOLEAN(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__BOOLEAN((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOOLEAN(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDBOOLEANv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__BOOLEANv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * argument which is any boxed pointer type. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDBOXED(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__BOXED((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__BOXED(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDBOXEDv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__BOXEDv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * character argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDCHAR(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__CHAR((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__CHAR(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDCHARv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__CHARv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with one * double-precision floating point argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDDOUBLE(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__DOUBLE((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__DOUBLE(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDDOUBLEv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__DOUBLEv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * argument with an enumerated type. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDENUM(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__ENUM((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ENUM(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDENUMv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__ENUMv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * argument with a flags types. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDFLAGS(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__FLAGS((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLAGS(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDFLAGSv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__FLAGSv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with one * single-precision floating point argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDFLOAT(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__FLOAT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__FLOAT(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDFLOATv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__FLOATv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * integer argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDINT(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__INT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__INT(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDINTv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__INTv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with with a single * long integer argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDLONG(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__LONG((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__LONG(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDLONGv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__LONGv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * #GObject argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDOBJECT(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__OBJECT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__OBJECT(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDOBJECTv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__OBJECTv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * argument of type #GParamSpec. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDPARAM(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__PARAM((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__PARAM(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDPARAMv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__PARAMv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single raw * pointer argument type. * * If it is possible, it is better to use one of the more specific * functions such as g_cclosure_marshal_VOID__OBJECT() or * g_cclosure_marshal_VOID__OBJECT(). * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDPOINTER(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__POINTER((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__POINTER(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDPOINTERv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__POINTERv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single string * argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDSTRING(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__STRING((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__STRING(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDSTRINGv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__STRINGv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * unsigned character argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDUCHAR(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__UCHAR((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UCHAR(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDUCHARv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__UCHARv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with with a single * unsigned integer argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDUINT(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__UINT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * A #GClosureMarshal function for use with signals with a unsigned int * and a pointer as arguments. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDUINTPOINTER(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__UINT_POINTER((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT_POINTER(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDUINTPOINTERv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__UINT_POINTERv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__UINT(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDUINTv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__UINTv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * unsigned long integer argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDULONG(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__ULONG((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__ULONG(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDULONGv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__ULONGv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with a single * #GVariant argument. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDVARIANT(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__VARIANT((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VARIANT(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDVARIANTv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__VARIANTv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A #GClosureMarshal function for use with signals with no arguments. * * Params: * closure = A #GClosure. * returnValue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public static void marshalVOIDVOID(Closure closure, Value returnValue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_VOID__VOID((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * The #GVaClosureMarshal equivalent to g_cclosure_marshal_VOID__VOID(). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args. */ public static void marshalVOIDVOIDv(Closure closure, Value returnValue, TypeInstance instanc, void* args, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_VOID__VOIDv((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), args, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } /** * A generic marshaller function implemented via * [libffi](http://sourceware.org/libffi/). * * Normally this function is not passed explicitly to g_signal_new(), * but used automatically by GLib when specifying a %NULL marshaller. * * Params: * closure = A #GClosure. * returnGvalue = A #GValue to store the return value. May be %NULL * if the callback of closure doesn't return a value. * nParamValues = The length of the @param_values array. * paramValues = An array of #GValues holding the arguments * on which to invoke the callback of closure. * invocationHint = The invocation hint given as the last argument to * g_closure_invoke(). * marshalData = Additional data specified when registering the * marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * * Since: 2.30 */ public static void marshalGeneric(Closure closure, Value returnGvalue, uint nParamValues, Value paramValues, void* invocationHint, void* marshalData) { g_cclosure_marshal_generic((closure is null) ? null : closure.getClosureStruct(), (returnGvalue is null) ? null : returnGvalue.getValueStruct(), nParamValues, (paramValues is null) ? null : paramValues.getValueStruct(), invocationHint, marshalData); } /** * A generic #GVaClosureMarshal function implemented via * [libffi](http://sourceware.org/libffi/). * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is * invoked. * argsList = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * paramTypes = the #GType of each argument from * @args_list. * * Since: 2.30 */ public static void marshalGenericVa(Closure closure, Value returnValue, TypeInstance instanc, void* argsList, void* marshalData, GType[] paramTypes) { g_cclosure_marshal_generic_va((closure is null) ? null : closure.getClosureStruct(), (returnValue is null) ? null : returnValue.getValueStruct(), (instanc is null) ? null : instanc.getTypeInstanceStruct(), argsList, marshalData, cast(int)paramTypes.length, paramTypes.ptr); } } GtkD-3.7.5/generated/gtkd/gobject/Closure.d000066400000000000000000000405121324604450400204500ustar00rootroot00000000000000/* * 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 gobject.Closure; private import glib.ConstructionException; private import glib.MemorySlice; private import glib.Source; private import gobject.ObjectG; private import gobject.Value; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; private import gtkd.Loader; /** * A #GClosure represents a callback supplied by the programmer. It * will generally comprise a function of some kind and a marshaller * used to call it. It is the responsibility of the marshaller to * convert the arguments for the invocation from #GValues into * a suitable form, perform the callback on the converted arguments, * and transform the return value back into a #GValue. * * In the case of C programs, a closure usually just holds a pointer * to a function and maybe a data argument, and the marshaller * converts between #GValue and native C types. The GObject * library provides the #GCClosure type for this purpose. Bindings for * other languages need marshallers which convert between #GValues and suitable representations in the runtime of the language in * order to use functions written in that languages as callbacks. * * Within GObject, closures play an important role in the * implementation of signals. When a signal is registered, the * @c_marshaller argument to g_signal_new() specifies the default C * marshaller for any closure which is connected to this * signal. GObject provides a number of C marshallers for this * purpose, see the g_cclosure_marshal_*() functions. Additional C * marshallers can be generated with the [glib-genmarshal][glib-genmarshal] * utility. Closures can be explicitly connected to signals with * g_signal_connect_closure(), but it usually more convenient to let * GObject create a closure automatically by using one of the * g_signal_connect_*() functions which take a callback function/user * data pair. * * Using closures has a number of important advantages over a simple * callback function/data pointer combination: * * - Closures allow the callee to get the types of the callback parameters, * which means that language bindings don't have to write individual glue * for each callback type. * * - The reference counting of #GClosure makes it easy to handle reentrancy * right; if a callback is removed while it is being invoked, the closure * and its parameters won't be freed until the invocation finishes. * * - g_closure_invalidate() and invalidation notifiers allow callbacks to be * automatically removed when the objects they point to go away. */ public class Closure { /** the main Gtk struct */ protected GClosure* gClosure; protected bool ownedRef; /** Get the main Gtk struct */ public GClosure* getClosureStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gClosure; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gClosure; } /** * Sets our main struct and passes it to the parent class. */ public this (GClosure* gClosure, bool ownedRef = false) { this.gClosure = gClosure; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GOBJECT) && ownedRef ) g_closure_unref(gClosure); } /** */ public static GType getType() { return g_closure_get_type(); } /** * A variant of g_closure_new_simple() which stores @object in the * @data field of the closure and calls g_object_watch_closure() on * @object and the created closure. This function is mainly useful * when implementing new types of closures. * * Params: * sizeofClosure = the size of the structure to allocate, must be at least * `sizeof (GClosure)` * object = a #GObject pointer to store in the @data field of the newly * allocated #GClosure * * Returns: a newly allocated #GClosure * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint sizeofClosure, ObjectG object) { auto p = g_closure_new_object(sizeofClosure, (object is null) ? null : object.getObjectGStruct()); if(p is null) { throw new ConstructionException("null returned by new_object"); } this(cast(GClosure*) p); } /** * Allocates a struct of the given size and initializes the initial * part as a #GClosure. This function is mainly useful when * implementing new types of closures. * * |[ * typedef struct _MyClosure MyClosure; * struct _MyClosure * { * GClosure closure; * // extra data goes here * }; * * static void * my_closure_finalize (gpointer notify_data, * GClosure *closure) * { * MyClosure *my_closure = (MyClosure *)closure; * * // free extra data here * } * * MyClosure *my_closure_new (gpointer data) * { * GClosure *closure; * MyClosure *my_closure; * * closure = g_closure_new_simple (sizeof (MyClosure), data); * my_closure = (MyClosure *) closure; * * // initialize extra data here * * g_closure_add_finalize_notifier (closure, notify_data, * my_closure_finalize); * return my_closure; * } * ]| * * Params: * sizeofClosure = the size of the structure to allocate, must be at least * `sizeof (GClosure)` * data = data to store in the @data field of the newly allocated #GClosure * * Returns: a newly allocated #GClosure * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint sizeofClosure, void* data) { auto p = g_closure_new_simple(sizeofClosure, data); if(p is null) { throw new ConstructionException("null returned by new_simple"); } this(cast(GClosure*) p); } /** * Registers a finalization notifier which will be called when the * reference count of @closure goes down to 0. Multiple finalization * notifiers on a single closure are invoked in unspecified order. If * a single call to g_closure_unref() results in the closure being * both invalidated and finalized, then the invalidate notifiers will * be run before the finalize notifiers. * * Params: * notifyData = data to pass to @notify_func * notifyFunc = the callback function to register */ public void addFinalizeNotifier(void* notifyData, GClosureNotify notifyFunc) { g_closure_add_finalize_notifier(gClosure, notifyData, notifyFunc); } /** * Registers an invalidation notifier which will be called when the * @closure is invalidated with g_closure_invalidate(). Invalidation * notifiers are invoked before finalization notifiers, in an * unspecified order. * * Params: * notifyData = data to pass to @notify_func * notifyFunc = the callback function to register */ public void addInvalidateNotifier(void* notifyData, GClosureNotify notifyFunc) { g_closure_add_invalidate_notifier(gClosure, notifyData, notifyFunc); } /** * Adds a pair of notifiers which get invoked before and after the * closure callback, respectively. This is typically used to protect * the extra arguments for the duration of the callback. See * g_object_watch_closure() for an example of marshal guards. * * Params: * preMarshalData = data to pass * to @pre_marshal_notify * preMarshalNotify = a function to call before the closure callback * postMarshalData = data to pass * to @post_marshal_notify * postMarshalNotify = a function to call after the closure callback */ public void addMarshalGuards(void* preMarshalData, GClosureNotify preMarshalNotify, void* postMarshalData, GClosureNotify postMarshalNotify) { g_closure_add_marshal_guards(gClosure, preMarshalData, preMarshalNotify, postMarshalData, postMarshalNotify); } /** * Sets a flag on the closure to indicate that its calling * environment has become invalid, and thus causes any future * invocations of g_closure_invoke() on this @closure to be * ignored. Also, invalidation notifiers installed on the closure will * be called at this point. Note that unless you are holding a * reference to the closure yourself, the invalidation notifiers may * unref the closure and cause it to be destroyed, so if you need to * access the closure after calling g_closure_invalidate(), make sure * that you've previously called g_closure_ref(). * * Note that g_closure_invalidate() will also be called when the * reference count of a closure drops to zero (unless it has already * been invalidated before). */ public void invalidate() { g_closure_invalidate(gClosure); } /** * Invokes the closure, i.e. executes the callback represented by the @closure. * * Params: * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure * doesn't return a value. * paramValues = an array of * #GValues holding the arguments on which to * invoke the callback of @closure * invocationHint = a context-dependent invocation hint */ public void invoke(out Value returnValue, Value[] paramValues, void* invocationHint) { GValue* outreturnValue = sliceNew!GValue(); GValue[] paramValuesArray = new GValue[paramValues.length]; for ( int i = 0; i < paramValues.length; i++ ) { paramValuesArray[i] = *(paramValues[i].getValueStruct()); } g_closure_invoke(gClosure, outreturnValue, cast(uint)paramValues.length, paramValuesArray.ptr, invocationHint); returnValue = ObjectG.getDObject!(Value)(outreturnValue, true); } /** * Increments the reference count on a closure to force it staying * alive while the caller holds a pointer to it. * * Returns: The @closure passed in, for convenience */ public Closure doref() { auto p = g_closure_ref(gClosure); if(p is null) { return null; } return ObjectG.getDObject!(Closure)(cast(GClosure*) p); } /** * Removes a finalization notifier. * * Notice that notifiers are automatically removed after they are run. * * Params: * notifyData = data which was passed to g_closure_add_finalize_notifier() * when registering @notify_func * notifyFunc = the callback function to remove */ public void removeFinalizeNotifier(void* notifyData, GClosureNotify notifyFunc) { g_closure_remove_finalize_notifier(gClosure, notifyData, notifyFunc); } /** * Removes an invalidation notifier. * * Notice that notifiers are automatically removed after they are run. * * Params: * notifyData = data which was passed to g_closure_add_invalidate_notifier() * when registering @notify_func * notifyFunc = the callback function to remove */ public void removeInvalidateNotifier(void* notifyData, GClosureNotify notifyFunc) { g_closure_remove_invalidate_notifier(gClosure, notifyData, notifyFunc); } /** * Sets the marshaller of @closure. The `marshal_data` * of @marshal provides a way for a meta marshaller to provide additional * information to the marshaller. (See g_closure_set_meta_marshal().) For * GObject's C predefined marshallers (the g_cclosure_marshal_*() * functions), what it provides is a callback function to use instead of * @closure->callback. * * Params: * marshal = a #GClosureMarshal function */ public void setMarshal(GClosureMarshal marshal) { g_closure_set_marshal(gClosure, marshal); } /** * Sets the meta marshaller of @closure. A meta marshaller wraps * @closure->marshal and modifies the way it is called in some * fashion. The most common use of this facility is for C callbacks. * The same marshallers (generated by [glib-genmarshal][glib-genmarshal]), * are used everywhere, but the way that we get the callback function * differs. In most cases we want to use @closure->callback, but in * other cases we want to use some different technique to retrieve the * callback function. * * For example, class closures for signals (see * g_signal_type_cclosure_new()) retrieve the callback function from a * fixed offset in the class structure. The meta marshaller retrieves * the right callback and passes it to the marshaller as the * @marshal_data argument. * * Params: * marshalData = context-dependent data to pass * to @meta_marshal * metaMarshal = a #GClosureMarshal function */ public void setMetaMarshal(void* marshalData, GClosureMarshal metaMarshal) { g_closure_set_meta_marshal(gClosure, marshalData, metaMarshal); } /** * Takes over the initial ownership of a closure. Each closure is * initially created in a "floating" state, which means that the initial * reference count is not owned by any caller. g_closure_sink() checks * to see if the object is still floating, and if so, unsets the * floating state and decreases the reference count. If the closure * is not floating, g_closure_sink() does nothing. The reason for the * existence of the floating state is to prevent cumbersome code * sequences like: * |[ * closure = g_cclosure_new (cb_func, cb_data); * g_source_set_closure (source, closure); * g_closure_unref (closure); // GObject doesn't really need this * ]| * Because g_source_set_closure() (and similar functions) take ownership of the * initial reference count, if it is unowned, we instead can write: * |[ * g_source_set_closure (source, g_cclosure_new (cb_func, cb_data)); * ]| * * Generally, this function is used together with g_closure_ref(). Ane example * of storing a closure for later notification looks like: * |[ * static GClosure *notify_closure = NULL; * void * foo_notify_set_closure (GClosure *closure) * { * if (notify_closure) * g_closure_unref (notify_closure); * notify_closure = closure; * if (notify_closure) * { * g_closure_ref (notify_closure); * g_closure_sink (notify_closure); * } * } * ]| * * Because g_closure_sink() may decrement the reference count of a closure * (if it hasn't been called on @closure yet) just like g_closure_unref(), * g_closure_ref() should be called prior to this function. */ public void sink() { g_closure_sink(gClosure); } /** * Decrements the reference count of a closure after it was previously * incremented by the same caller. If no other callers are using the * closure, then the closure will be destroyed and freed. */ public void unref() { g_closure_unref(gClosure); } /** * Set the callback for a source as a #GClosure. * * If the source is not one of the standard GLib types, the @closure_callback * and @closure_marshal fields of the #GSourceFuncs structure must have been * filled in with pointers to appropriate functions. * * Params: * source = the source * closure = a #GClosure */ public static void sourceSetClosure(Source source, Closure closure) { g_source_set_closure((source is null) ? null : source.getSourceStruct(), (closure is null) ? null : closure.getClosureStruct()); } /** * Sets a dummy callback for @source. The callback will do nothing, and * if the source expects a #gboolean return value, it will return %TRUE. * (If the source expects any other type of return value, it will return * a 0/%NULL value; whatever g_value_init() initializes a #GValue to for * that type.) * * If the source is not one of the standard GLib types, the * @closure_callback and @closure_marshal fields of the #GSourceFuncs * structure must have been filled in with pointers to appropriate * functions. * * Params: * source = the source */ public static void sourceSetDummyCallback(Source source) { g_source_set_dummy_callback((source is null) ? null : source.getSourceStruct()); } } GtkD-3.7.5/generated/gtkd/gobject/Enums.d000066400000000000000000000125361324604450400201300ustar00rootroot00000000000000/* * 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 gobject.Enums; private import glib.Str; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** */ public struct Enums { /** * This function is meant to be called from the `complete_type_info` * function of a #GTypePlugin implementation, as in the following * example: * * |[ * static void * my_enum_complete_type_info (GTypePlugin *plugin, * GType g_type, * GTypeInfo *info, * GTypeValueTable *value_table) * { * static const GEnumValue values[] = { * { MY_ENUM_FOO, "MY_ENUM_FOO", "foo" }, * { MY_ENUM_BAR, "MY_ENUM_BAR", "bar" }, * { 0, NULL, NULL } * }; * * g_enum_complete_type_info (type, info, values); * } * ]| * * Params: * gEnumType = the type identifier of the type being completed * info = the #GTypeInfo struct to be filled in * constValues = An array of #GEnumValue structs for the possible * enumeration values. The array is terminated by a struct with all * members being 0. */ public static void completeTypeInfo(GType gEnumType, out GTypeInfo info, GEnumValue* constValues) { g_enum_complete_type_info(gEnumType, &info, constValues); } /** * Returns the #GEnumValue for a value. * * Params: * enumClass = a #GEnumClass * value = the value to look up * * Returns: the #GEnumValue for @value, or %NULL * if @value is not a member of the enumeration */ public static GEnumValue* getValue(GEnumClass* enumClass, int value) { return g_enum_get_value(enumClass, value); } /** * Looks up a #GEnumValue by name. * * Params: * enumClass = a #GEnumClass * name = the name to look up * * Returns: the #GEnumValue with name @name, * or %NULL if the enumeration doesn't have a member * with that name */ public static GEnumValue* getValueByName(GEnumClass* enumClass, string name) { return g_enum_get_value_by_name(enumClass, Str.toStringz(name)); } /** * Looks up a #GEnumValue by nickname. * * Params: * enumClass = a #GEnumClass * nick = the nickname to look up * * Returns: the #GEnumValue with nickname @nick, * or %NULL if the enumeration doesn't have a member * with that nickname */ public static GEnumValue* getValueByNick(GEnumClass* enumClass, string nick) { return g_enum_get_value_by_nick(enumClass, Str.toStringz(nick)); } /** * Registers a new static enumeration type with the name @name. * * It is normally more convenient to let [glib-mkenums][glib-mkenums], * generate a my_enum_get_type() function from a usual C enumeration * definition than to write one yourself using g_enum_register_static(). * * Params: * name = A nul-terminated string used as the name of the new type. * constStaticValues = An array of #GEnumValue structs for the possible * enumeration values. The array is terminated by a struct with all * members being 0. GObject keeps a reference to the data, so it cannot * be stack-allocated. * * Returns: The new type identifier. */ public static GType registerStatic(string name, GEnumValue* constStaticValues) { return g_enum_register_static(Str.toStringz(name), constStaticValues); } /** * Pretty-prints @value in the form of the enum’s name. * * This is intended to be used for debugging purposes. The format of the output * may change in the future. * * Params: * gEnumType = the type identifier of a #GEnumClass type * value = the value * * Returns: a newly-allocated text string * * Since: 2.54 */ public static string enumToString(GType gEnumType, int value) { auto retStr = g_enum_to_string(gEnumType, value); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Pretty-prints @value in the form of the flag names separated by ` | ` and * sorted. Any extra bits will be shown at the end as a hexadecimal number. * * This is intended to be used for debugging purposes. The format of the output * may change in the future. * * Params: * flagsType = the type identifier of a #GFlagsClass type * value = the value * * Returns: a newly-allocated text string * * Since: 2.54 */ public static string flagsToString(GType flagsType, uint value) { auto retStr = g_flags_to_string(flagsType, value); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/gobject/Flags.d000066400000000000000000000073741324604450400201010ustar00rootroot00000000000000/* * 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 gobject.Flags; private import glib.Str; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** */ public struct Flags { /** * This function is meant to be called from the complete_type_info() * function of a #GTypePlugin implementation, see the example for * g_enum_complete_type_info() above. * * Params: * gFlagsType = the type identifier of the type being completed * info = the #GTypeInfo struct to be filled in * constValues = An array of #GFlagsValue structs for the possible * enumeration values. The array is terminated by a struct with all * members being 0. */ public static void completeTypeInfo(GType gFlagsType, out GTypeInfo info, GFlagsValue* constValues) { g_flags_complete_type_info(gFlagsType, &info, constValues); } /** * Returns the first #GFlagsValue which is set in @value. * * Params: * flagsClass = a #GFlagsClass * value = the value * * Returns: the first #GFlagsValue which is set in * @value, or %NULL if none is set */ public static GFlagsValue* getFirstValue(GFlagsClass* flagsClass, uint value) { return g_flags_get_first_value(flagsClass, value); } /** * Looks up a #GFlagsValue by name. * * Params: * flagsClass = a #GFlagsClass * name = the name to look up * * Returns: the #GFlagsValue with name @name, * or %NULL if there is no flag with that name */ public static GFlagsValue* getValueByName(GFlagsClass* flagsClass, string name) { return g_flags_get_value_by_name(flagsClass, Str.toStringz(name)); } /** * Looks up a #GFlagsValue by nickname. * * Params: * flagsClass = a #GFlagsClass * nick = the nickname to look up * * Returns: the #GFlagsValue with nickname @nick, * or %NULL if there is no flag with that nickname */ public static GFlagsValue* getValueByNick(GFlagsClass* flagsClass, string nick) { return g_flags_get_value_by_nick(flagsClass, Str.toStringz(nick)); } /** * Registers a new static flags type with the name @name. * * It is normally more convenient to let [glib-mkenums][glib-mkenums] * generate a my_flags_get_type() function from a usual C enumeration * definition than to write one yourself using g_flags_register_static(). * * Params: * name = A nul-terminated string used as the name of the new type. * constStaticValues = An array of #GFlagsValue structs for the possible * flags values. The array is terminated by a struct with all members being 0. * GObject keeps a reference to the data, so it cannot be stack-allocated. * * Returns: The new type identifier. */ public static GType registerStatic(string name, GFlagsValue* constStaticValues) { return g_flags_register_static(Str.toStringz(name), constStaticValues); } } GtkD-3.7.5/generated/gtkd/gobject/ObjectClass.d000066400000000000000000000173621324604450400212370ustar00rootroot00000000000000/* * 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 gobject.ObjectClass; private import glib.Str; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * The class structure for the GObject type. * * * Implementing singletons using a constructor * * static MySingleton *the_singleton = NULL; * * static GObject* * my_singleton_constructor (GType type, * guint n_construct_params, * GObjectConstructParam *construct_params) * { * GObject *object; * * if (!the_singleton) * { * object = G_OBJECT_CLASS (parent_class)->constructor (type, * n_construct_params, * construct_params); * the_singleton = MY_SINGLETON (object); * } * else * object = g_object_ref (G_OBJECT (the_singleton)); * * return object; * } * */ public class ObjectClass { /** the main Gtk struct */ protected GObjectClass* gObjectClass; protected bool ownedRef; /** Get the main Gtk struct */ public GObjectClass* getObjectClassStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gObjectClass; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gObjectClass; } /** * Sets our main struct and passes it to the parent class. */ public this (GObjectClass* gObjectClass, bool ownedRef = false) { this.gObjectClass = gObjectClass; this.ownedRef = ownedRef; } /** * Looks up the #GParamSpec for a property of a class. * * Params: * propertyName = the name of the property to look up * * Returns: the #GParamSpec for the property, or * %NULL if the class doesn't have a property of that name */ public ParamSpec findProperty(string propertyName) { auto p = g_object_class_find_property(gObjectClass, Str.toStringz(propertyName)); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Installs new properties from an array of #GParamSpecs. * * All properties should be installed during the class initializer. It * is possible to install properties after that, but doing so is not * recommend, and specifically, is not guaranteed to be thread-safe vs. * use of properties on the same type on other threads. * * The property id of each property is the index of each #GParamSpec in * the @pspecs array. * * The property id of 0 is treated specially by #GObject and it should not * be used to store a #GParamSpec. * * This function should be used if you plan to use a static array of * #GParamSpecs and g_object_notify_by_pspec(). For instance, this * class initialization: * * |[ * enum { * PROP_0, PROP_FOO, PROP_BAR, N_PROPERTIES * }; * * static GParamSpec *obj_properties[N_PROPERTIES] = { NULL, }; * * static void * my_object_class_init (MyObjectClass *klass) * { * GObjectClass *gobject_class = G_OBJECT_CLASS (klass); * * obj_properties[PROP_FOO] = * g_param_spec_int ("foo", "Foo", "Foo", * -1, G_MAXINT, * 0, * G_PARAM_READWRITE); * * obj_properties[PROP_BAR] = * g_param_spec_string ("bar", "Bar", "Bar", * NULL, * G_PARAM_READWRITE); * * gobject_class->set_property = my_object_set_property; * gobject_class->get_property = my_object_get_property; * g_object_class_install_properties (gobject_class, * N_PROPERTIES, * obj_properties); * } * ]| * * allows calling g_object_notify_by_pspec() to notify of property changes: * * |[ * void * my_object_set_foo (MyObject *self, gint foo) * { * if (self->foo != foo) * { * self->foo = foo; * g_object_notify_by_pspec (G_OBJECT (self), obj_properties[PROP_FOO]); * } * } * ]| * * Params: * pspecs = the #GParamSpecs array * defining the new properties * * Since: 2.26 */ public void installProperties(ParamSpec[] pspecs) { GParamSpec*[] pspecsArray = new GParamSpec*[pspecs.length]; for ( int i = 0; i < pspecs.length; i++ ) { pspecsArray[i] = pspecs[i].getParamSpecStruct(); } g_object_class_install_properties(gObjectClass, cast(uint)pspecs.length, pspecsArray.ptr); } /** * Installs a new property. * * All properties should be installed during the class initializer. It * is possible to install properties after that, but doing so is not * recommend, and specifically, is not guaranteed to be thread-safe vs. * use of properties on the same type on other threads. * * Note that it is possible to redefine a property in a derived class, * by installing a property with the same name. This can be useful at times, * e.g. to change the range of allowed values or the default value. * * Params: * propertyId = the id for the new property * pspec = the #GParamSpec for the new property */ public void installProperty(uint propertyId, ParamSpec pspec) { g_object_class_install_property(gObjectClass, propertyId, (pspec is null) ? null : pspec.getParamSpecStruct()); } /** * Get an array of #GParamSpec* for all properties of a class. * * Returns: an array of * #GParamSpec* which should be freed after use */ public ParamSpec[] listProperties() { uint nProperties; auto p = g_object_class_list_properties(gObjectClass, &nProperties); if(p is null) { return null; } ParamSpec[] arr = new ParamSpec[nProperties]; for(int i = 0; i < nProperties; i++) { arr[i] = ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p[i]); } return arr; } /** * Registers @property_id as referring to a property with the name * @name in a parent class or in an interface implemented by @oclass. * This allows this class to "override" a property implementation in * a parent class or to provide the implementation of a property from * an interface. * * Internally, overriding is implemented by creating a property of type * #GParamSpecOverride; generally operations that query the properties of * the object class, such as g_object_class_find_property() or * g_object_class_list_properties() will return the overridden * property. However, in one case, the @construct_properties argument of * the @constructor virtual function, the #GParamSpecOverride is passed * instead, so that the @param_id field of the #GParamSpec will be * correct. For virtually all uses, this makes no difference. If you * need to get the overridden property, you can call * g_param_spec_get_redirect_target(). * * Params: * propertyId = the new property ID * name = the name of a property registered in a parent class or * in an interface of this class. * * Since: 2.4 */ public void overrideProperty(uint propertyId, string name) { g_object_class_override_property(gObjectClass, propertyId, Str.toStringz(name)); } } GtkD-3.7.5/generated/gtkd/gobject/ObjectG.d000066400000000000000000001311701324604450400203520ustar00rootroot00000000000000/* * 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 gobject.ObjectG; private import core.memory; private import glib.ConstructionException; private import glib.Str; private import gobject.Binding; private import gobject.Closure; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.Signals; private import gobject.TypeInterface; private import gobject.Value; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; private import gtkd.Loader; private import std.algorithm; private import std.traits; /** * All the fields in the GObject structure are private * to the #GObject implementation and should never be accessed directly. */ public class ObjectG { /** the main Gtk struct */ protected GObject* gObject; protected bool ownedRef; /** Get the main Gtk struct */ public GObject* getObjectGStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gObject; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gObject; } protected bool isGcRoot; /** * Sets our main struct and passes store it on the gobject. * Add a gabage collector root to the gtk+ struct so it doesn't get collect */ public this (GObject* gObject, bool ownedRef = false) { this.gObject = gObject; if ( gObject !is null ) { setDataFull("GObject", cast(void*)this, cast(GDestroyNotify)&destroyNotify); addToggleRef(cast(GToggleNotify)&toggleNotify, cast(void*)this); //If the refCount is larger then 1 toggleNotify isn't called if (gObject.refCount > 1 && !isGcRoot) { GC.addRoot(cast(void*)this); isGcRoot = true; } //Remove the floating reference if there is one. if ( isFloating() ) { refSink(); unref(); } //If we already owned this reference remove the one added by addToggleRef. else if ( ownedRef ) { unref(); } //When constructed via GtkBuilder set the structs. if ( getStruct() is null ) { setStruct(gObject); } } } extern(C) { static void destroyNotify(ObjectG obj) { if ( obj.isGcRoot ) { GC.removeRoot(cast(void*)obj); obj.isGcRoot = false; } if ( obj.gObject.refCount > 0 ) obj.removeToggleRef(cast(GToggleNotify)&toggleNotify, cast(void*)obj); obj.gObject = null; } static void toggleNotify(ObjectG obj, GObject* object, int isLastRef) { if ( isLastRef && obj.isGcRoot ) { GC.removeRoot(cast(void*)obj); obj.isGcRoot = false; } else if ( !obj.isGcRoot ) { GC.addRoot(cast(void*)obj); obj.isGcRoot = true; } } } ~this() { static if ( isPointer!(typeof(g_object_steal_data)) ) bool libLoaded = Linker.isLoaded(LIBRARY_GOBJECT); else enum libLoaded = true; if ( libLoaded && gObject !is null ) { // Remove the GDestroyNotify callback, // for when the D object is destroyed before the C one. g_object_steal_data(gObject, cast(char*)"GObject"); if ( isGcRoot ) { GC.removeRoot(cast(void*)this); isGcRoot = false; } g_object_remove_toggle_ref(gObject, cast(GToggleNotify)&toggleNotify, cast(void*)this); } } /** * Gets a D Object from the objects table of associations. * Params: * obj = GObject containing the associations. * Returns: the D Object if found, or a newly constructed object if no such Object exists. */ public static RT getDObject(T, RT=T, U)(U obj, bool ownedRef = false) { if ( obj is null ) { return null; } static if ( is(T : ObjectG) && !is(RT == interface) ) { auto p = g_object_get_data(cast(GObject*)obj, Str.toStringz("GObject")); if ( p !is null ) return cast(RT)p; else return new T(obj, ownedRef); } else static if ( is(RT == interface) && hasMember!(RT, "getType") && is(ReturnType!(RT.getType) == GType) ) { auto p = g_object_get_data(cast(GObject*)obj, Str.toStringz("GObject")); if ( p !is null ) return cast(RT)cast(ObjectG)p; else return getInterfaceInstance!RT(cast(GObject*)obj); } else { return new T(obj, ownedRef); } } private static I getInterfaceInstance(I)(GObject* instance) { static class Impl: ObjectG, I { public this (GObject* gObject, bool ownedRef = false) { super(gObject, ownedRef); } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gObject; } // add the interface capabilities mixin("import "~ moduleName!I[0..$-2] ~"T;import "~ moduleName!I ~"; mixin "~ __traits(identifier, I)[0..$-2] ~"T!("~__traits(identifier, Impl)~");"); } ClassInfo ci = Impl.classinfo; Impl iface; void* p; //Skip all the setup for the memory management, //and only add an extra reference for the instance returned. p = GC.malloc(ci.initializer.length, GC.BlkAttr.FINALIZE, ci); p[0..ci.initializer.length] = ci.initializer; iface = cast(Impl)p; iface.gObject = instance; iface.doref(); return iface; } protected void setStruct(GObject* obj) { gObject = cast(GObject*)obj; } /** */ public void setProperty(T)(string propertyName, T value) { setProperty(propertyName, new Value(value)); } deprecated("Use the member function") public static void unref(ObjectG obj) { obj.unref(); } deprecated("Use the member function") public static ObjectG doref(ObjectG obj) { return obj.doref(); } protected class OnNotifyDelegateWrapper { void delegate(ParamSpec, ObjectG) dlg; gulong handlerId; this(void delegate(ParamSpec, ObjectG) dlg) { this.dlg = dlg; onNotifyListeners ~= this; } void remove(OnNotifyDelegateWrapper source) { foreach(index, wrapper; onNotifyListeners) { if (wrapper.handlerId == source.handlerId) { onNotifyListeners[index] = null; onNotifyListeners = std.algorithm.remove(onNotifyListeners, index); break; } } } } OnNotifyDelegateWrapper[] onNotifyListeners; /** * The notify signal is emitted on an object when one of its * properties has been changed. Note that getting this signal * doesn't guarantee that the value of the property has actually * changed, it may also be emitted when the setter for the property * is called to reinstate the previous value. * * This signal is typically used to obtain change notification for a * single property. * * It is important to note that you must use * canonical parameter names for the property. * * Params: * dlg = The callback. * property = Set this if you only want to receive the signal for a specific property. * connectFlags = The behavior of the signal's connection. */ gulong addOnNotify(void delegate(ParamSpec, ObjectG) dlg, string property = "", ConnectFlags connectFlags=cast(ConnectFlags)0) { string signalName; if ( property == "" ) signalName = "notify"; else signalName = "notify::"~ property; auto wrapper = new OnNotifyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, signalName, cast(GCallback)&callBackNotify, cast(void*)wrapper, cast(GClosureNotify)&callBackNotifyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackNotify(GObject* objectgStruct, GParamSpec* pspec,OnNotifyDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(ParamSpec)(pspec), wrapper.outer); } extern(C) static void callBackNotifyDestroy(OnNotifyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** */ /** */ public static GType getType() { return g_initially_unowned_get_type(); } /** * Creates a new instance of a #GObject subtype and sets its properties. * * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) * which are not explicitly specified are set to their default values. * * Params: * objectType = the type id of the #GObject subtype to instantiate * firstPropertyName = the name of the first property * varArgs = the value of the first property, followed optionally by more * name/value pairs, followed by %NULL * * Returns: a new instance of @object_type * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GType objectType, string firstPropertyName, void* varArgs) { auto p = g_object_new_valist(objectType, Str.toStringz(firstPropertyName), varArgs); if(p is null) { throw new ConstructionException("null returned by new_valist"); } this(cast(GObject*) p, true); } /** * Creates a new instance of a #GObject subtype and sets its properties using * the provided arrays. Both arrays must have exactly @n_properties elements, * and the names and values correspond by index. * * Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) * which are not explicitly specified are set to their default values. * * Params: * objectType = the object type to instantiate * names = the names of each property to be set * values = the values of each property to be set * * Returns: a new instance of * @object_type * * Since: 2.54 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GType objectType, string[] names, Value[] values) { GValue[] valuesArray = new GValue[values.length]; for ( int i = 0; i < values.length; i++ ) { valuesArray[i] = *(values[i].getValueStruct()); } auto p = g_object_new_with_properties(objectType, cast(uint)values.length, Str.toStringzArray(names), valuesArray.ptr); if(p is null) { throw new ConstructionException("null returned by new_with_properties"); } this(cast(GObject*) p, true); } /** * Creates a new instance of a #GObject subtype and sets its properties. * * Construction parameters (see #G_PARAM_CONSTRUCT, #G_PARAM_CONSTRUCT_ONLY) * which are not explicitly specified are set to their default values. * * Deprecated: Use g_object_new_with_properties() instead. * deprecated. See #GParameter for more information. * * Params: * objectType = the type id of the #GObject subtype to instantiate * parameters = an array of #GParameter * * Returns: a new instance of * @object_type * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GType objectType, GParameter[] parameters) { auto p = g_object_newv(objectType, cast(uint)parameters.length, parameters.ptr); if(p is null) { throw new ConstructionException("null returned by newv"); } this(cast(GObject*) p, true); } /** */ public static size_t compatControl(size_t what, void* data) { return g_object_compat_control(what, data); } /** * Find the #GParamSpec with the given name for an * interface. Generally, the interface vtable passed in as @g_iface * will be the default vtable from g_type_default_interface_ref(), or, * if you know the interface has already been loaded, * g_type_default_interface_peek(). * * Params: * gIface = any interface vtable for the * interface, or the default vtable for the interface * propertyName = name of a property to lookup. * * Returns: the #GParamSpec for the property of the * interface with the name @property_name, or %NULL if no * such property exists. * * Since: 2.4 */ public static ParamSpec interfaceFindProperty(TypeInterface gIface, string propertyName) { auto p = g_object_interface_find_property((gIface is null) ? null : gIface.getTypeInterfaceStruct(), Str.toStringz(propertyName)); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Add a property to an interface; this is only useful for interfaces * that are added to GObject-derived types. Adding a property to an * interface forces all objects classes with that interface to have a * compatible property. The compatible property could be a newly * created #GParamSpec, but normally * g_object_class_override_property() will be used so that the object * class only needs to provide an implementation and inherits the * property description, default value, bounds, and so forth from the * interface property. * * This function is meant to be called from the interface's default * vtable initialization function (the @class_init member of * #GTypeInfo.) It must not be called after after @class_init has * been called for any object types implementing this interface. * * Params: * gIface = any interface vtable for the * interface, or the default * vtable for the interface. * pspec = the #GParamSpec for the new property * * Since: 2.4 */ public static void interfaceInstallProperty(TypeInterface gIface, ParamSpec pspec) { g_object_interface_install_property((gIface is null) ? null : gIface.getTypeInterfaceStruct(), (pspec is null) ? null : pspec.getParamSpecStruct()); } /** * Lists the properties of an interface.Generally, the interface * vtable passed in as @g_iface will be the default vtable from * g_type_default_interface_ref(), or, if you know the interface has * already been loaded, g_type_default_interface_peek(). * * Params: * gIface = any interface vtable for the * interface, or the default vtable for the interface * * Returns: a * pointer to an array of pointers to #GParamSpec * structures. The paramspecs are owned by GLib, but the * array should be freed with g_free() when you are done with * it. * * Since: 2.4 */ public static ParamSpec[] interfaceListProperties(TypeInterface gIface) { uint nPropertiesP; auto p = g_object_interface_list_properties((gIface is null) ? null : gIface.getTypeInterfaceStruct(), &nPropertiesP); if(p is null) { return null; } ParamSpec[] arr = new ParamSpec[nPropertiesP]; for(int i = 0; i < nPropertiesP; i++) { arr[i] = ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p[i]); } return arr; } /** * Increases the reference count of the object by one and sets a * callback to be called when all other references to the object are * dropped, or when this is already the last reference to the object * and another reference is established. * * This functionality is intended for binding @object to a proxy * object managed by another memory manager. This is done with two * paired references: the strong reference added by * g_object_add_toggle_ref() and a reverse reference to the proxy * object which is either a strong reference or weak reference. * * The setup is that when there are no other references to @object, * only a weak reference is held in the reverse direction from @object * to the proxy object, but when there are other references held to * @object, a strong reference is held. The @notify callback is called * when the reference from @object to the proxy object should be * "toggled" from strong to weak (@is_last_ref true) or weak to strong * (@is_last_ref false). * * Since a (normal) reference must be held to the object before * calling g_object_add_toggle_ref(), the initial state of the reverse * link is always strong. * * Multiple toggle references may be added to the same gobject, * however if there are multiple toggle references to an object, none * of them will ever be notified until all but one are removed. For * this reason, you should only ever use a toggle reference if there * is important state in the proxy object. * * Params: * notify = a function to call when this reference is the * last reference to the object, or is no longer * the last reference. * data = data to pass to @notify * * Since: 2.8 */ public void addToggleRef(GToggleNotify notify, void* data) { g_object_add_toggle_ref(gObject, notify, data); } /** * Adds a weak reference from weak_pointer to @object to indicate that * the pointer located at @weak_pointer_location is only valid during * the lifetime of @object. When the @object is finalized, * @weak_pointer will be set to %NULL. * * Note that as with g_object_weak_ref(), the weak references created by * this method are not thread-safe: they cannot safely be used in one * thread if the object's last g_object_unref() might happen in another * thread. Use #GWeakRef if thread-safety is required. * * Params: * weakPointerLocation = The memory address * of a pointer. */ public void addWeakPointer(ref void* weakPointerLocation) { g_object_add_weak_pointer(gObject, &weakPointerLocation); } /** * Creates a binding between @source_property on @source and @target_property * on @target. Whenever the @source_property is changed the @target_property is * updated using the same value. For instance: * * |[ * g_object_bind_property (action, "active", widget, "sensitive", 0); * ]| * * Will result in the "sensitive" property of the widget #GObject instance to be * updated with the same value of the "active" property of the action #GObject * instance. * * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if @target_property on @target changes then the @source_property on @source * will be updated as well. * * The binding will automatically be removed when either the @source or the * @target instances are finalized. To remove the binding without affecting the * @source and the @target you can just call g_object_unref() on the returned * #GBinding instance. * * A #GObject can have multiple bindings. * * Params: * sourceProperty = the property on @source to bind * target = the target #GObject * targetProperty = the property on @target to bind * flags = flags to pass to #GBinding * * Returns: the #GBinding instance representing the * binding between the two #GObject instances. The binding is released * whenever the #GBinding reference count reaches zero. * * Since: 2.26 */ public Binding bindProperty(string sourceProperty, ObjectG target, string targetProperty, GBindingFlags flags) { auto p = g_object_bind_property(gObject, Str.toStringz(sourceProperty), (target is null) ? null : target.getObjectGStruct(), Str.toStringz(targetProperty), flags); if(p is null) { return null; } return ObjectG.getDObject!(Binding)(cast(GBinding*) p); } /** * Complete version of g_object_bind_property(). * * Creates a binding between @source_property on @source and @target_property * on @target, allowing you to set the transformation functions to be used by * the binding. * * If @flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: * if @target_property on @target changes then the @source_property on @source * will be updated as well. The @transform_from function is only used in case * of bidirectional bindings, otherwise it will be ignored * * The binding will automatically be removed when either the @source or the * @target instances are finalized. To remove the binding without affecting the * @source and the @target you can just call g_object_unref() on the returned * #GBinding instance. * * A #GObject can have multiple bindings. * * The same @user_data parameter will be used for both @transform_to * and @transform_from transformation functions; the @notify function will * be called once, when the binding is removed. If you need different data * for each transformation function, please use * g_object_bind_property_with_closures() instead. * * Params: * sourceProperty = the property on @source to bind * target = the target #GObject * targetProperty = the property on @target to bind * flags = flags to pass to #GBinding * transformTo = the transformation function * from the @source to the @target, or %NULL to use the default * transformFrom = the transformation function * from the @target to the @source, or %NULL to use the default * userData = custom data to be passed to the transformation functions, * or %NULL * notify = function to be called when disposing the binding, to free the * resources used by the transformation functions * * Returns: the #GBinding instance representing the * binding between the two #GObject instances. The binding is released * whenever the #GBinding reference count reaches zero. * * Since: 2.26 */ public Binding bindPropertyFull(string sourceProperty, ObjectG target, string targetProperty, GBindingFlags flags, GBindingTransformFunc transformTo, GBindingTransformFunc transformFrom, void* userData, GDestroyNotify notify) { auto p = g_object_bind_property_full(gObject, Str.toStringz(sourceProperty), (target is null) ? null : target.getObjectGStruct(), Str.toStringz(targetProperty), flags, transformTo, transformFrom, userData, notify); if(p is null) { return null; } return ObjectG.getDObject!(Binding)(cast(GBinding*) p); } /** * Creates a binding between @source_property on @source and @target_property * on @target, allowing you to set the transformation functions to be used by * the binding. * * This function is the language bindings friendly version of * g_object_bind_property_full(), using #GClosures instead of * function pointers. * * Params: * sourceProperty = the property on @source to bind * target = the target #GObject * targetProperty = the property on @target to bind * flags = flags to pass to #GBinding * transformTo = a #GClosure wrapping the transformation function * from the @source to the @target, or %NULL to use the default * transformFrom = a #GClosure wrapping the transformation function * from the @target to the @source, or %NULL to use the default * * Returns: the #GBinding instance representing the * binding between the two #GObject instances. The binding is released * whenever the #GBinding reference count reaches zero. * * Since: 2.26 */ public Binding bindPropertyWithClosures(string sourceProperty, ObjectG target, string targetProperty, GBindingFlags flags, Closure transformTo, Closure transformFrom) { auto p = g_object_bind_property_with_closures(gObject, Str.toStringz(sourceProperty), (target is null) ? null : target.getObjectGStruct(), Str.toStringz(targetProperty), flags, (transformTo is null) ? null : transformTo.getClosureStruct(), (transformFrom is null) ? null : transformFrom.getClosureStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Binding)(cast(GBinding*) p); } /** * This is a variant of g_object_get_data() which returns * a 'duplicate' of the value. @dup_func defines the * meaning of 'duplicate' in this context, it could e.g. * take a reference on a ref-counted object. * * If the @key is not set on the object then @dup_func * will be called with a %NULL argument. * * Note that @dup_func is called while user data of @object * is locked. * * This function can be useful to avoid races when multiple * threads are using object data on the same key on the same * object. * * Params: * key = a string, naming the user data pointer * dupFunc = function to dup the value * userData = passed as user_data to @dup_func * * Returns: the result of calling @dup_func on the value * associated with @key on @object, or %NULL if not set. * If @dup_func is %NULL, the value is returned * unmodified. * * Since: 2.34 */ public void* dupData(string key, GDuplicateFunc dupFunc, void* userData) { return g_object_dup_data(gObject, Str.toStringz(key), dupFunc, userData); } /** * This is a variant of g_object_get_qdata() which returns * a 'duplicate' of the value. @dup_func defines the * meaning of 'duplicate' in this context, it could e.g. * take a reference on a ref-counted object. * * If the @quark is not set on the object then @dup_func * will be called with a %NULL argument. * * Note that @dup_func is called while user data of @object * is locked. * * This function can be useful to avoid races when multiple * threads are using object data on the same key on the same * object. * * Params: * quark = a #GQuark, naming the user data pointer * dupFunc = function to dup the value * userData = passed as user_data to @dup_func * * Returns: the result of calling @dup_func on the value * associated with @quark on @object, or %NULL if not set. * If @dup_func is %NULL, the value is returned * unmodified. * * Since: 2.34 */ public void* dupQdata(GQuark quark, GDuplicateFunc dupFunc, void* userData) { return g_object_dup_qdata(gObject, quark, dupFunc, userData); } /** * This function is intended for #GObject implementations to re-enforce * a [floating][floating-ref] object reference. Doing this is seldom * required: all #GInitiallyUnowneds are created with a floating reference * which usually just needs to be sunken by calling g_object_ref_sink(). * * Since: 2.10 */ public void forceFloating() { g_object_force_floating(gObject); } /** * Increases the freeze count on @object. If the freeze count is * non-zero, the emission of "notify" signals on @object is * stopped. The signals are queued until the freeze count is decreased * to zero. Duplicate notifications are squashed so that at most one * #GObject::notify signal is emitted for each property modified while the * object is frozen. * * This is necessary for accessors that modify multiple properties to prevent * premature notification while the object is still being modified. */ public void freezeNotify() { g_object_freeze_notify(gObject); } /** * Gets a named field from the objects table of associations (see g_object_set_data()). * * Params: * key = name of the key for that association * * Returns: the data if found, or %NULL if no such data exists. */ public void* getData(string key) { return g_object_get_data(gObject, Str.toStringz(key)); } /** * Gets a property of an object. @value must have been initialized to the * expected type of the property (or a type to which the expected type can be * transformed) using g_value_init(). * * In general, a copy is made of the property contents and the caller is * responsible for freeing the memory by calling g_value_unset(). * * Note that g_object_get_property() is really intended for language * bindings, g_object_get() is much more convenient for C programming. * * Params: * propertyName = the name of the property to get * value = return location for the property value */ public void getProperty(string propertyName, Value value) { g_object_get_property(gObject, Str.toStringz(propertyName), (value is null) ? null : value.getValueStruct()); } /** * This function gets back user data pointers stored via * g_object_set_qdata(). * * Params: * quark = A #GQuark, naming the user data pointer * * Returns: The user data pointer set, or %NULL */ public void* getQdata(GQuark quark) { return g_object_get_qdata(gObject, quark); } /** * Gets properties of an object. * * In general, a copy is made of the property contents and the caller * is responsible for freeing the memory in the appropriate manner for * the type, for instance by calling g_free() or g_object_unref(). * * See g_object_get(). * * Params: * firstPropertyName = name of the first property to get * varArgs = return location for the first property, followed optionally by more * name/return location pairs, followed by %NULL */ public void getValist(string firstPropertyName, void* varArgs) { g_object_get_valist(gObject, Str.toStringz(firstPropertyName), varArgs); } /** * Gets @n_properties properties for an @object. * Obtained properties will be set to @values. All properties must be valid. * Warnings will be emitted and undefined behaviour may result if invalid * properties are passed in. * * Params: * names = the names of each property to get * values = the values of each property to get * * Since: 2.54 */ public void getv(string[] names, Value[] values) { GValue[] valuesArray = new GValue[values.length]; for ( int i = 0; i < values.length; i++ ) { valuesArray[i] = *(values[i].getValueStruct()); } g_object_getv(gObject, cast(uint)values.length, Str.toStringzArray(names), valuesArray.ptr); } /** * Checks whether @object has a [floating][floating-ref] reference. * * Returns: %TRUE if @object has a floating reference * * Since: 2.10 */ public bool isFloating() { return g_object_is_floating(gObject) != 0; } /** * Emits a "notify" signal for the property @property_name on @object. * * When possible, eg. when signaling a property change from within the class * that registered the property, you should use g_object_notify_by_pspec() * instead. * * Note that emission of the notify signal may be blocked with * g_object_freeze_notify(). In this case, the signal emissions are queued * and will be emitted (in reverse order) when g_object_thaw_notify() is * called. * * Params: * propertyName = the name of a property installed on the class of @object. */ public void notify(string propertyName) { g_object_notify(gObject, Str.toStringz(propertyName)); } /** * Emits a "notify" signal for the property specified by @pspec on @object. * * This function omits the property name lookup, hence it is faster than * g_object_notify(). * * One way to avoid using g_object_notify() from within the * class that registered the properties, and using g_object_notify_by_pspec() * instead, is to store the GParamSpec used with * g_object_class_install_property() inside a static array, e.g.: * * |[ * enum * { * PROP_0, * PROP_FOO, * PROP_LAST * }; * * static GParamSpec *properties[PROP_LAST]; * * static void * my_object_class_init (MyObjectClass *klass) * { * properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo", * 0, 100, * 50, * G_PARAM_READWRITE); * g_object_class_install_property (gobject_class, * PROP_FOO, * properties[PROP_FOO]); * } * ]| * * and then notify a change on the "foo" property with: * * |[ * g_object_notify_by_pspec (self, properties[PROP_FOO]); * ]| * * Params: * pspec = the #GParamSpec of a property installed on the class of @object. * * Since: 2.26 */ public void notifyByPspec(ParamSpec pspec) { g_object_notify_by_pspec(gObject, (pspec is null) ? null : pspec.getParamSpecStruct()); } /** * Increases the reference count of @object. * * Returns: the same @object */ public ObjectG doref() { auto p = g_object_ref(gObject); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); } /** * Increase the reference count of @object, and possibly remove the * [floating][floating-ref] reference, if @object has a floating reference. * * In other words, if the object is floating, then this call "assumes * ownership" of the floating reference, converting it to a normal * reference by clearing the floating flag while leaving the reference * count unchanged. If the object is not floating, then this call * adds a new normal reference increasing the reference count by one. * * Returns: @object * * Since: 2.10 */ public ObjectG refSink() { auto p = g_object_ref_sink(gObject); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); } /** * Removes a reference added with g_object_add_toggle_ref(). The * reference count of the object is decreased by one. * * Params: * notify = a function to call when this reference is the * last reference to the object, or is no longer * the last reference. * data = data to pass to @notify * * Since: 2.8 */ public void removeToggleRef(GToggleNotify notify, void* data) { g_object_remove_toggle_ref(gObject, notify, data); } /** * Removes a weak reference from @object that was previously added * using g_object_add_weak_pointer(). The @weak_pointer_location has * to match the one used with g_object_add_weak_pointer(). * * Params: * weakPointerLocation = The memory address * of a pointer. */ public void removeWeakPointer(ref void* weakPointerLocation) { g_object_remove_weak_pointer(gObject, &weakPointerLocation); } /** * Compares the user data for the key @key on @object with * @oldval, and if they are the same, replaces @oldval with * @newval. * * This is like a typical atomic compare-and-exchange * operation, for user data on an object. * * If the previous value was replaced then ownership of the * old value (@oldval) is passed to the caller, including * the registered destroy notify for it (passed out in @old_destroy). * Its up to the caller to free this as he wishes, which may * or may not include using @old_destroy as sometimes replacement * should not destroy the object in the normal way. * * Params: * key = a string, naming the user data pointer * oldval = the old value to compare against * newval = the new value * destroy = a destroy notify for the new value * oldDestroy = destroy notify for the existing value * * Returns: %TRUE if the existing value for @key was replaced * by @newval, %FALSE otherwise. * * Since: 2.34 */ public bool replaceData(string key, void* oldval, void* newval, GDestroyNotify destroy, GDestroyNotify* oldDestroy) { return g_object_replace_data(gObject, Str.toStringz(key), oldval, newval, destroy, oldDestroy) != 0; } /** * Compares the user data for the key @quark on @object with * @oldval, and if they are the same, replaces @oldval with * @newval. * * This is like a typical atomic compare-and-exchange * operation, for user data on an object. * * If the previous value was replaced then ownership of the * old value (@oldval) is passed to the caller, including * the registered destroy notify for it (passed out in @old_destroy). * Its up to the caller to free this as he wishes, which may * or may not include using @old_destroy as sometimes replacement * should not destroy the object in the normal way. * * Params: * quark = a #GQuark, naming the user data pointer * oldval = the old value to compare against * newval = the new value * destroy = a destroy notify for the new value * oldDestroy = destroy notify for the existing value * * Returns: %TRUE if the existing value for @quark was replaced * by @newval, %FALSE otherwise. * * Since: 2.34 */ public bool replaceQdata(GQuark quark, void* oldval, void* newval, GDestroyNotify destroy, GDestroyNotify* oldDestroy) { return g_object_replace_qdata(gObject, quark, oldval, newval, destroy, oldDestroy) != 0; } /** * Releases all references to other objects. This can be used to break * reference cycles. * * This function should only be called from object system implementations. */ public void runDispose() { g_object_run_dispose(gObject); } /** * Each object carries around a table of associations from * strings to pointers. This function lets you set an association. * * If the object already had an association with that name, * the old association will be destroyed. * * Params: * key = name of the key * data = data to associate with that key */ public void setData(string key, void* data) { g_object_set_data(gObject, Str.toStringz(key), data); } /** * Like g_object_set_data() except it adds notification * for when the association is destroyed, either by setting it * to a different value or when the object is destroyed. * * Note that the @destroy callback is not called if @data is %NULL. * * Params: * key = name of the key * data = data to associate with that key * destroy = function to call when the association is destroyed */ public void setDataFull(string key, void* data, GDestroyNotify destroy) { g_object_set_data_full(gObject, Str.toStringz(key), data, destroy); } /** * Sets a property on an object. * * Params: * propertyName = the name of the property to set * value = the value */ public void setProperty(string propertyName, Value value) { g_object_set_property(gObject, Str.toStringz(propertyName), (value is null) ? null : value.getValueStruct()); } /** * This sets an opaque, named pointer on an object. * The name is specified through a #GQuark (retrived e.g. via * g_quark_from_static_string()), and the pointer * can be gotten back from the @object with g_object_get_qdata() * until the @object is finalized. * Setting a previously set user data pointer, overrides (frees) * the old pointer set, using #NULL as pointer essentially * removes the data stored. * * Params: * quark = A #GQuark, naming the user data pointer * data = An opaque user data pointer */ public void setQdata(GQuark quark, void* data) { g_object_set_qdata(gObject, quark, data); } /** * This function works like g_object_set_qdata(), but in addition, * a void (*destroy) (gpointer) function may be specified which is * called with @data as argument when the @object is finalized, or * the data is being overwritten by a call to g_object_set_qdata() * with the same @quark. * * Params: * quark = A #GQuark, naming the user data pointer * data = An opaque user data pointer * destroy = Function to invoke with @data as argument, when @data * needs to be freed */ public void setQdataFull(GQuark quark, void* data, GDestroyNotify destroy) { g_object_set_qdata_full(gObject, quark, data, destroy); } /** * Sets properties on an object. * * Params: * firstPropertyName = name of the first property to set * varArgs = value for the first property, followed optionally by more * name/value pairs, followed by %NULL */ public void setValist(string firstPropertyName, void* varArgs) { g_object_set_valist(gObject, Str.toStringz(firstPropertyName), varArgs); } /** * Sets @n_properties properties for an @object. * Properties to be set will be taken from @values. All properties must be * valid. Warnings will be emitted and undefined behaviour may result if invalid * properties are passed in. * * Params: * names = the names of each property to be set * values = the values of each property to be set * * Since: 2.54 */ public void setv(string[] names, Value[] values) { GValue[] valuesArray = new GValue[values.length]; for ( int i = 0; i < values.length; i++ ) { valuesArray[i] = *(values[i].getValueStruct()); } g_object_setv(gObject, cast(uint)values.length, Str.toStringzArray(names), valuesArray.ptr); } /** * Remove a specified datum from the object's data associations, * without invoking the association's destroy handler. * * Params: * key = name of the key * * Returns: the data if found, or %NULL if no such data exists. */ public void* stealData(string key) { return g_object_steal_data(gObject, Str.toStringz(key)); } /** * This function gets back user data pointers stored via * g_object_set_qdata() and removes the @data from object * without invoking its destroy() function (if any was * set). * Usually, calling this function is only required to update * user data pointers with a destroy notifier, for example: * |[ * void * object_add_to_user_list (GObject *object, * const gchar *new_string) * { * // the quark, naming the object data * GQuark quark_string_list = g_quark_from_static_string ("my-string-list"); * // retrive the old string list * GList *list = g_object_steal_qdata (object, quark_string_list); * * // prepend new string * list = g_list_prepend (list, g_strdup (new_string)); * // this changed 'list', so we need to set it again * g_object_set_qdata_full (object, quark_string_list, list, free_string_list); * } * static void * free_string_list (gpointer data) * { * GList *node, *list = data; * * for (node = list; node; node = node->next) * g_free (node->data); * g_list_free (list); * } * ]| * Using g_object_get_qdata() in the above example, instead of * g_object_steal_qdata() would have left the destroy function set, * and thus the partial string list would have been freed upon * g_object_set_qdata_full(). * * Params: * quark = A #GQuark, naming the user data pointer * * Returns: The user data pointer set, or %NULL */ public void* stealQdata(GQuark quark) { return g_object_steal_qdata(gObject, quark); } /** * Reverts the effect of a previous call to * g_object_freeze_notify(). The freeze count is decreased on @object * and when it reaches zero, queued "notify" signals are emitted. * * Duplicate notifications for each property are squashed so that at most one * #GObject::notify signal is emitted for each property, in the reverse order * in which they have been queued. * * It is an error to call this function when the freeze count is zero. */ public void thawNotify() { g_object_thaw_notify(gObject); } /** * Decreases the reference count of @object. When its reference count * drops to 0, the object is finalized (i.e. its memory is freed). * * If the pointer to the #GObject may be reused in future (for example, if it is * an instance variable of another object), it is recommended to clear the * pointer to %NULL rather than retain a dangling pointer to a potentially * invalid #GObject instance. Use g_clear_object() for this. */ public void unref() { g_object_unref(gObject); } /** * This function essentially limits the life time of the @closure to * the life time of the object. That is, when the object is finalized, * the @closure is invalidated by calling g_closure_invalidate() on * it, in order to prevent invocations of the closure with a finalized * (nonexisting) object. Also, g_object_ref() and g_object_unref() are * added as marshal guards to the @closure, to ensure that an extra * reference count is held on @object during invocation of the * @closure. Usually, this function will be called on closures that * use this @object as closure data. * * Params: * closure = GClosure to watch */ public void watchClosure(Closure closure) { g_object_watch_closure(gObject, (closure is null) ? null : closure.getClosureStruct()); } /** * Adds a weak reference callback to an object. Weak references are * used for notification when an object is finalized. They are called * "weak references" because they allow you to safely hold a pointer * to an object without calling g_object_ref() (g_object_ref() adds a * strong reference, that is, forces the object to stay alive). * * Note that the weak references created by this method are not * thread-safe: they cannot safely be used in one thread if the * object's last g_object_unref() might happen in another thread. * Use #GWeakRef if thread-safety is required. * * Params: * notify = callback to invoke before the object is freed * data = extra data to pass to notify */ public void weakRef(GWeakNotify notify, void* data) { g_object_weak_ref(gObject, notify, data); } /** * Removes a weak reference callback to an object. * * Params: * notify = callback to search for * data = data to search for */ public void weakUnref(GWeakNotify notify, void* data) { g_object_weak_unref(gObject, notify, data); } /** * Clears a reference to a #GObject. * * @object_ptr must not be %NULL. * * If the reference is %NULL then this function does nothing. * Otherwise, the reference count of the object is decreased and the * pointer is set to %NULL. * * A macro is also included that allows this function to be used without * pointer casts. * * Params: * objectPtr = a pointer to a #GObject reference * * Since: 2.28 */ public static void clearObject(ref ObjectG objectPtr) { GObject* outobjectPtr = objectPtr.getObjectGStruct(); g_clear_object(&outobjectPtr); objectPtr = ObjectG.getDObject!(ObjectG)(outobjectPtr); } } GtkD-3.7.5/generated/gtkd/gobject/ParamSpec.d000066400000000000000000000323471324604450400207160ustar00rootroot00000000000000/* * 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 gobject.ParamSpec; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; private import gtkd.Loader; /** * #GParamSpec is an object structure that encapsulates the metadata * required to specify parameters, such as e.g. #GObject properties. * * ## Parameter names # {#canonical-parameter-names} * * Parameter names need to start with a letter (a-z or A-Z). * Subsequent characters can be letters, numbers or a '-'. * All other characters are replaced by a '-' during construction. * The result of this replacement is called the canonical name of * the parameter. */ public class ParamSpec { /** the main Gtk struct */ protected GParamSpec* gParamSpec; protected bool ownedRef; /** Get the main Gtk struct */ public GParamSpec* getParamSpecStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gParamSpec; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gParamSpec; } /** * Sets our main struct and passes it to the parent class. */ public this (GParamSpec* gParamSpec, bool ownedRef = false) { this.gParamSpec = gParamSpec; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GOBJECT) && ownedRef ) g_param_spec_unref(gParamSpec); } /** * Creates a new #GParamSpec instance. * * A property name consists of segments consisting of ASCII letters and * digits, separated by either the '-' or '_' character. The first * character of a property name must be a letter. Names which violate these * rules lead to undefined behaviour. * * When creating and looking up a #GParamSpec, either separator can be * used, but they cannot be mixed. Using '-' is considerably more * efficient and in fact required when using property names as detail * strings for signals. * * Beyond the name, #GParamSpecs have two more descriptive * strings associated with them, the @nick, which should be suitable * for use as a label for the property in a property editor, and the * @blurb, which should be a somewhat longer description, suitable for * e.g. a tooltip. The @nick and @blurb should ideally be localized. * * Params: * paramType = the #GType for the property; must be derived from #G_TYPE_PARAM * name = the canonical name of the property * nick = the nickname of the property * blurb = a short description of the property * flags = a combination of #GParamFlags * * Returns: a newly allocated #GParamSpec instance */ public static ParamSpec internal(GType paramType, string name, string nick, string blurb, GParamFlags flags) { auto p = g_param_spec_internal(paramType, Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Get the short description of a #GParamSpec. * * Returns: the short description of @pspec. */ public string getBlurb() { return Str.toString(g_param_spec_get_blurb(gParamSpec)); } /** * Gets the default value of @pspec as a pointer to a #GValue. * * The #GValue will remain value for the life of @pspec. * * Returns: a pointer to a #GValue which must not be modified * * Since: 2.38 */ public Value getDefaultValue() { auto p = g_param_spec_get_default_value(gParamSpec); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Get the name of a #GParamSpec. * * The name is always an "interned" string (as per g_intern_string()). * This allows for pointer-value comparisons. * * Returns: the name of @pspec. */ public string getName() { return Str.toString(g_param_spec_get_name(gParamSpec)); } /** * Gets the GQuark for the name. * * Returns: the GQuark for @pspec->name. * * Since: 2.46 */ public GQuark getNameQuark() { return g_param_spec_get_name_quark(gParamSpec); } /** * Get the nickname of a #GParamSpec. * * Returns: the nickname of @pspec. */ public string getNick() { return Str.toString(g_param_spec_get_nick(gParamSpec)); } /** * Gets back user data pointers stored via g_param_spec_set_qdata(). * * Params: * quark = a #GQuark, naming the user data pointer * * Returns: the user data pointer set, or %NULL */ public void* getQdata(GQuark quark) { return g_param_spec_get_qdata(gParamSpec, quark); } /** * If the paramspec redirects operations to another paramspec, * returns that paramspec. Redirect is used typically for * providing a new implementation of a property in a derived * type while preserving all the properties from the parent * type. Redirection is established by creating a property * of type #GParamSpecOverride. See g_object_class_override_property() * for an example of the use of this capability. * * Returns: paramspec to which requests on this * paramspec should be redirected, or %NULL if none. * * Since: 2.4 */ public ParamSpec getRedirectTarget() { auto p = g_param_spec_get_redirect_target(gParamSpec); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Increments the reference count of @pspec. * * Returns: the #GParamSpec that was passed into this function */ public ParamSpec doref() { auto p = g_param_spec_ref(gParamSpec); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Convenience function to ref and sink a #GParamSpec. * * Returns: the #GParamSpec that was passed into this function * * Since: 2.10 */ public ParamSpec refSink() { auto p = g_param_spec_ref_sink(gParamSpec); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Sets an opaque, named pointer on a #GParamSpec. The name is * specified through a #GQuark (retrieved e.g. via * g_quark_from_static_string()), and the pointer can be gotten back * from the @pspec with g_param_spec_get_qdata(). Setting a * previously set user data pointer, overrides (frees) the old pointer * set, using %NULL as pointer essentially removes the data stored. * * Params: * quark = a #GQuark, naming the user data pointer * data = an opaque user data pointer */ public void setQdata(GQuark quark, void* data) { g_param_spec_set_qdata(gParamSpec, quark, data); } /** * This function works like g_param_spec_set_qdata(), but in addition, * a `void (*destroy) (gpointer)` function may be * specified which is called with @data as argument when the @pspec is * finalized, or the data is being overwritten by a call to * g_param_spec_set_qdata() with the same @quark. * * Params: * quark = a #GQuark, naming the user data pointer * data = an opaque user data pointer * destroy = function to invoke with @data as argument, when @data needs to * be freed */ public void setQdataFull(GQuark quark, void* data, GDestroyNotify destroy) { g_param_spec_set_qdata_full(gParamSpec, quark, data, destroy); } /** * The initial reference count of a newly created #GParamSpec is 1, * even though no one has explicitly called g_param_spec_ref() on it * yet. So the initial reference count is flagged as "floating", until * someone calls `g_param_spec_ref (pspec); g_param_spec_sink * (pspec);` in sequence on it, taking over the initial * reference count (thus ending up with a @pspec that has a reference * count of 1 still, but is not flagged "floating" anymore). */ public void sink() { g_param_spec_sink(gParamSpec); } /** * Gets back user data pointers stored via g_param_spec_set_qdata() * and removes the @data from @pspec without invoking its destroy() * function (if any was set). Usually, calling this function is only * required to update user data pointers with a destroy notifier. * * Params: * quark = a #GQuark, naming the user data pointer * * Returns: the user data pointer set, or %NULL */ public void* stealQdata(GQuark quark) { return g_param_spec_steal_qdata(gParamSpec, quark); } /** * Decrements the reference count of a @pspec. */ public void unref() { g_param_spec_unref(gParamSpec); } /** * Registers @name as the name of a new static type derived from * #G_TYPE_PARAM. The type system uses the information contained in * the #GParamSpecTypeInfo structure pointed to by @info to manage the * #GParamSpec type and its instances. * * Params: * name = 0-terminated string used as the name of the new #GParamSpec type. * pspecInfo = The #GParamSpecTypeInfo for this #GParamSpec type. * * Returns: The new type identifier. */ public static GType paramTypeRegisterStatic(string name, GParamSpecTypeInfo* pspecInfo) { return g_param_type_register_static(Str.toStringz(name), pspecInfo); } /** * Transforms @src_value into @dest_value if possible, and then * validates @dest_value, in order for it to conform to @pspec. If * @strict_validation is %TRUE this function will only succeed if the * transformed @dest_value complied to @pspec without modifications. * * See also g_value_type_transformable(), g_value_transform() and * g_param_value_validate(). * * Params: * pspec = a valid #GParamSpec * srcValue = souce #GValue * destValue = destination #GValue of correct type for @pspec * strictValidation = %TRUE requires @dest_value to conform to @pspec * without modifications * * Returns: %TRUE if transformation and validation were successful, * %FALSE otherwise and @dest_value is left untouched. */ public static bool paramValueConvert(ParamSpec pspec, Value srcValue, Value destValue, bool strictValidation) { return g_param_value_convert((pspec is null) ? null : pspec.getParamSpecStruct(), (srcValue is null) ? null : srcValue.getValueStruct(), (destValue is null) ? null : destValue.getValueStruct(), strictValidation) != 0; } /** * Checks whether @value contains the default value as specified in @pspec. * * Params: * pspec = a valid #GParamSpec * value = a #GValue of correct type for @pspec * * Returns: whether @value contains the canonical default for this @pspec */ public static bool paramValueDefaults(ParamSpec pspec, Value value) { return g_param_value_defaults((pspec is null) ? null : pspec.getParamSpecStruct(), (value is null) ? null : value.getValueStruct()) != 0; } /** * Sets @value to its default value as specified in @pspec. * * Params: * pspec = a valid #GParamSpec * value = a #GValue of correct type for @pspec */ public static void paramValueSetDefault(ParamSpec pspec, Value value) { g_param_value_set_default((pspec is null) ? null : pspec.getParamSpecStruct(), (value is null) ? null : value.getValueStruct()); } /** * Ensures that the contents of @value comply with the specifications * set out by @pspec. For example, a #GParamSpecInt might require * that integers stored in @value may not be smaller than -42 and not be * greater than +42. If @value contains an integer outside of this range, * it is modified accordingly, so the resulting value will fit into the * range -42 .. +42. * * Params: * pspec = a valid #GParamSpec * value = a #GValue of correct type for @pspec * * Returns: whether modifying @value was necessary to ensure validity */ public static bool paramValueValidate(ParamSpec pspec, Value value) { return g_param_value_validate((pspec is null) ? null : pspec.getParamSpecStruct(), (value is null) ? null : value.getValueStruct()) != 0; } /** * Compares @value1 with @value2 according to @pspec, and return -1, 0 or +1, * if @value1 is found to be less than, equal to or greater than @value2, * respectively. * * Params: * pspec = a valid #GParamSpec * value1 = a #GValue of correct type for @pspec * value2 = a #GValue of correct type for @pspec * * Returns: -1, 0 or +1, for a less than, equal to or greater than result */ public static int paramValuesCmp(ParamSpec pspec, Value value1, Value value2) { return g_param_values_cmp((pspec is null) ? null : pspec.getParamSpecStruct(), (value1 is null) ? null : value1.getValueStruct(), (value2 is null) ? null : value2.getValueStruct()); } } GtkD-3.7.5/generated/gtkd/gobject/ParamSpecPool.d000066400000000000000000000121751324604450400215450ustar00rootroot00000000000000/* * 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 gobject.ParamSpecPool; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * A #GParamSpecPool maintains a collection of #GParamSpecs which can be * quickly accessed by owner and name. The implementation of the #GObject property * system uses such a pool to store the #GParamSpecs of the properties all object * types. */ public class ParamSpecPool { /** the main Gtk struct */ protected GParamSpecPool* gParamSpecPool; protected bool ownedRef; /** Get the main Gtk struct */ public GParamSpecPool* getParamSpecPoolStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gParamSpecPool; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gParamSpecPool; } /** * Sets our main struct and passes it to the parent class. */ public this (GParamSpecPool* gParamSpecPool, bool ownedRef = false) { this.gParamSpecPool = gParamSpecPool; this.ownedRef = ownedRef; } /** * Inserts a #GParamSpec in the pool. * * Params: * pspec = the #GParamSpec to insert * ownerType = a #GType identifying the owner of @pspec */ public void insert(ParamSpec pspec, GType ownerType) { g_param_spec_pool_insert(gParamSpecPool, (pspec is null) ? null : pspec.getParamSpecStruct(), ownerType); } /** * Gets an array of all #GParamSpecs owned by @owner_type in * the pool. * * Params: * ownerType = the owner to look for * * Returns: a newly * allocated array containing pointers to all #GParamSpecs * owned by @owner_type in the pool */ public ParamSpec[] list(GType ownerType) { uint nPspecsP; auto p = g_param_spec_pool_list(gParamSpecPool, ownerType, &nPspecsP); if(p is null) { return null; } ParamSpec[] arr = new ParamSpec[nPspecsP]; for(int i = 0; i < nPspecsP; i++) { arr[i] = ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p[i]); } return arr; } /** * Gets an #GList of all #GParamSpecs owned by @owner_type in * the pool. * * Params: * ownerType = the owner to look for * * Returns: a * #GList of all #GParamSpecs owned by @owner_type in * the pool#GParamSpecs. */ public ListG listOwned(GType ownerType) { auto p = g_param_spec_pool_list_owned(gParamSpecPool, ownerType); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Looks up a #GParamSpec in the pool. * * Params: * paramName = the name to look for * ownerType = the owner to look for * walkAncestors = If %TRUE, also try to find a #GParamSpec with @param_name * owned by an ancestor of @owner_type. * * Returns: The found #GParamSpec, or %NULL if no * matching #GParamSpec was found. */ public ParamSpec lookup(string paramName, GType ownerType, bool walkAncestors) { auto p = g_param_spec_pool_lookup(gParamSpecPool, Str.toStringz(paramName), ownerType, walkAncestors); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Removes a #GParamSpec from the pool. * * Params: * pspec = the #GParamSpec to remove */ public void remove(ParamSpec pspec) { g_param_spec_pool_remove(gParamSpecPool, (pspec is null) ? null : pspec.getParamSpecStruct()); } /** * Creates a new #GParamSpecPool. * * If @type_prefixing is %TRUE, lookups in the newly created pool will * allow to specify the owner as a colon-separated prefix of the * property name, like "GtkContainer:border-width". This feature is * deprecated, so you should always set @type_prefixing to %FALSE. * * Params: * typePrefixing = Whether the pool will support type-prefixed property names. * * Returns: a newly allocated #GParamSpecPool. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(bool typePrefixing) { auto p = g_param_spec_pool_new(typePrefixing); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GParamSpecPool*) p); } } GtkD-3.7.5/generated/gtkd/gobject/Signals.d000066400000000000000000001023031324604450400204310ustar00rootroot00000000000000/* * 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 gobject.Signals; private import glib.Str; private import gobject.Closure; private import gobject.ObjectG; private import gobject.TypeInstance; private import gobject.Value; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** */ public struct Signals { /** */ public static gulong connectData(void* instanc, string detailedSignal, GCallback cHandler, Object data, GClosureNotify destroyData, GConnectFlags connectFlags) { return g_signal_connect_data(instanc, Str.toStringz(detailedSignal), cHandler, cast(void*)data, destroyData, connectFlags); } /** * Connects a GCallback function to a signal for a particular object. * * The handler will be called before the default handler of the signal. * * See [memory management of signal handlers][signal-memory-management] for * details on how to handle the return value and memory management of @data. * * Params: * instance = the instance to connect to. * detailedSignal = a string of the form "signal-name::detail". * cHandler = the GCallback to connect. * data = data to pass to cHandler calls. * * Returns: the handler ID, of type gulong (always greater than 0 for successful connections) */ public static gulong connect(ObjectG instanc, string detailedSignal, GCallback cHandler, void* data) { return g_signal_connect_data((instanc is null) ? null : instanc.getObjectGStruct(), Str.toStringz(detailedSignal), cHandler, data, null, cast(ConnectFlags)0); } /** */ /** * A predefined #GSignalAccumulator for signals intended to be used as a * hook for application code to provide a particular value. Usually * only one such value is desired and multiple handlers for the same * signal don't make much sense (except for the case of the default * handler defined in the class structure, in which case you will * usually want the signal connection to override the class handler). * * This accumulator will use the return value from the first signal * handler that is run as the return value for the signal and not run * any further handlers (ie: the first handler "wins"). * * Params: * ihint = standard #GSignalAccumulator parameter * returnAccu = standard #GSignalAccumulator parameter * handlerReturn = standard #GSignalAccumulator parameter * dummy = standard #GSignalAccumulator parameter * * Returns: standard #GSignalAccumulator result * * Since: 2.28 */ public static bool accumulatorFirstWins(GSignalInvocationHint* ihint, Value returnAccu, Value handlerReturn, void* dummy) { return g_signal_accumulator_first_wins(ihint, (returnAccu is null) ? null : returnAccu.getValueStruct(), (handlerReturn is null) ? null : handlerReturn.getValueStruct(), dummy) != 0; } /** * A predefined #GSignalAccumulator for signals that return a * boolean values. The behavior that this accumulator gives is * that a return of %TRUE stops the signal emission: no further * callbacks will be invoked, while a return of %FALSE allows * the emission to continue. The idea here is that a %TRUE return * indicates that the callback handled the signal, and no further * handling is needed. * * Params: * ihint = standard #GSignalAccumulator parameter * returnAccu = standard #GSignalAccumulator parameter * handlerReturn = standard #GSignalAccumulator parameter * dummy = standard #GSignalAccumulator parameter * * Returns: standard #GSignalAccumulator result * * Since: 2.4 */ public static bool accumulatorTrueHandled(GSignalInvocationHint* ihint, Value returnAccu, Value handlerReturn, void* dummy) { return g_signal_accumulator_true_handled(ihint, (returnAccu is null) ? null : returnAccu.getValueStruct(), (handlerReturn is null) ? null : handlerReturn.getValueStruct(), dummy) != 0; } /** * Adds an emission hook for a signal, which will get called for any emission * of that signal, independent of the instance. This is possible only * for signals which don't have #G_SIGNAL_NO_HOOKS flag set. * * Params: * signalId = the signal identifier, as returned by g_signal_lookup(). * detail = the detail on which to call the hook. * hookFunc = a #GSignalEmissionHook function. * hookData = user data for @hook_func. * dataDestroy = a #GDestroyNotify for @hook_data. * * Returns: the hook id, for later use with g_signal_remove_emission_hook(). */ public static gulong addEmissionHook(uint signalId, GQuark detail, GSignalEmissionHook hookFunc, void* hookData, GDestroyNotify dataDestroy) { return g_signal_add_emission_hook(signalId, detail, hookFunc, hookData, dataDestroy); } /** * Calls the original class closure of a signal. This function should only * be called from an overridden class closure; see * g_signal_override_class_closure() and * g_signal_override_class_handler(). * * Params: * instanceAndParams = the argument list of the signal emission. * The first element in the array is a #GValue for the instance the signal * is being emitted on. The rest are any arguments to be passed to the signal. * returnValue = Location for the return value. */ public static void chainFromOverridden(Value[] instanceAndParams, Value returnValue) { GValue[] instanceAndParamsArray = new GValue[instanceAndParams.length]; for ( int i = 0; i < instanceAndParams.length; i++ ) { instanceAndParamsArray[i] = *(instanceAndParams[i].getValueStruct()); } g_signal_chain_from_overridden(instanceAndParamsArray.ptr, (returnValue is null) ? null : returnValue.getValueStruct()); } /** * Connects a closure to a signal for a particular object. * * Params: * instanc = the instance to connect to. * detailedSignal = a string of the form "signal-name::detail". * closure = the closure to connect. * after = whether the handler should be called before or after the * default handler of the signal. * * Returns: the handler ID (always greater than 0 for successful connections) */ public static gulong connectClosure(ObjectG instanc, string detailedSignal, Closure closure, bool after) { return g_signal_connect_closure((instanc is null) ? null : instanc.getObjectGStruct(), Str.toStringz(detailedSignal), (closure is null) ? null : closure.getClosureStruct(), after); } /** * Connects a closure to a signal for a particular object. * * Params: * instanc = the instance to connect to. * signalId = the id of the signal. * detail = the detail. * closure = the closure to connect. * after = whether the handler should be called before or after the * default handler of the signal. * * Returns: the handler ID (always greater than 0 for successful connections) */ public static gulong connectClosureById(ObjectG instanc, uint signalId, GQuark detail, Closure closure, bool after) { return g_signal_connect_closure_by_id((instanc is null) ? null : instanc.getObjectGStruct(), signalId, detail, (closure is null) ? null : closure.getClosureStruct(), after); } /** * Connects a #GCallback function to a signal for a particular object. Similar * to g_signal_connect(), but allows to provide a #GClosureNotify for the data * which will be called when the signal handler is disconnected and no longer * used. Specify @connect_flags if you need `..._after()` or * `..._swapped()` variants of this function. * * Params: * instanc = the instance to connect to. * detailedSignal = a string of the form "signal-name::detail". * cHandler = the #GCallback to connect. * data = data to pass to @c_handler calls. * destroyData = a #GClosureNotify for @data. * connectFlags = a combination of #GConnectFlags. * * Returns: the handler ID (always greater than 0 for successful connections) */ public static gulong connectData(ObjectG instanc, string detailedSignal, GCallback cHandler, void* data, GClosureNotify destroyData, GConnectFlags connectFlags) { return g_signal_connect_data((instanc is null) ? null : instanc.getObjectGStruct(), Str.toStringz(detailedSignal), cHandler, data, destroyData, connectFlags); } /** * This is similar to g_signal_connect_data(), but uses a closure which * ensures that the @gobject stays alive during the call to @c_handler * by temporarily adding a reference count to @gobject. * * When the @gobject is destroyed the signal handler will be automatically * disconnected. Note that this is not currently threadsafe (ie: * emitting a signal while @gobject is being destroyed in another thread * is not safe). * * Params: * instanc = the instance to connect to. * detailedSignal = a string of the form "signal-name::detail". * cHandler = the #GCallback to connect. * gobject = the object to pass as data * to @c_handler. * connectFlags = a combination of #GConnectFlags. * * Returns: the handler id. */ public static gulong connectObject(TypeInstance instanc, string detailedSignal, GCallback cHandler, ObjectG gobject, GConnectFlags connectFlags) { return g_signal_connect_object((instanc is null) ? null : instanc.getTypeInstanceStruct(), Str.toStringz(detailedSignal), cHandler, (gobject is null) ? null : gobject.getObjectGStruct(), connectFlags); } /** * Emits a signal. * * Note that g_signal_emit_valist() resets the return value to the default * if no handlers are connected, in contrast to g_signal_emitv(). * * Params: * instanc = the instance the signal is being * emitted on. * signalId = the signal id * detail = the detail * varArgs = a list of parameters to be passed to the signal, followed by a * location for the return value. If the return type of the signal * is #G_TYPE_NONE, the return value location can be omitted. */ public static void emitValist(TypeInstance instanc, uint signalId, GQuark detail, void* varArgs) { g_signal_emit_valist((instanc is null) ? null : instanc.getTypeInstanceStruct(), signalId, detail, varArgs); } /** * Emits a signal. * * Note that g_signal_emitv() doesn't change @return_value if no handlers are * connected, in contrast to g_signal_emit() and g_signal_emit_valist(). * * Params: * instanceAndParams = argument list for the signal emission. * The first element in the array is a #GValue for the instance the signal * is being emitted on. The rest are any arguments to be passed to the signal. * signalId = the signal id * detail = the detail * returnValue = Location to * store the return value of the signal emission. This must be provided if the * specified signal returns a value, but may be ignored otherwise. */ public static void emitv(Value[] instanceAndParams, uint signalId, GQuark detail, ref Value returnValue) { GValue[] instanceAndParamsArray = new GValue[instanceAndParams.length]; for ( int i = 0; i < instanceAndParams.length; i++ ) { instanceAndParamsArray[i] = *(instanceAndParams[i].getValueStruct()); } g_signal_emitv(instanceAndParamsArray.ptr, signalId, detail, (returnValue is null) ? null : returnValue.getValueStruct()); } /** * Returns the invocation hint of the innermost signal emission of instance. * * Params: * instanc = the instance to query * * Returns: the invocation hint of the innermost signal emission. */ public static GSignalInvocationHint* getInvocationHint(ObjectG instanc) { return g_signal_get_invocation_hint((instanc is null) ? null : instanc.getObjectGStruct()); } /** * Blocks a handler of an instance so it will not be called during any * signal emissions unless it is unblocked again. Thus "blocking" a * signal handler means to temporarily deactive it, a signal handler * has to be unblocked exactly the same amount of times it has been * blocked before to become active again. * * The @handler_id has to be a valid signal handler id, connected to a * signal of @instance. * * Params: * instanc = The instance to block the signal handler of. * handlerId = Handler id of the handler to be blocked. */ public static void handlerBlock(ObjectG instanc, gulong handlerId) { g_signal_handler_block((instanc is null) ? null : instanc.getObjectGStruct(), handlerId); } /** * Disconnects a handler from an instance so it will not be called during * any future or currently ongoing emissions of the signal it has been * connected to. The @handler_id becomes invalid and may be reused. * * The @handler_id has to be a valid signal handler id, connected to a * signal of @instance. * * Params: * instanc = The instance to remove the signal handler from. * handlerId = Handler id of the handler to be disconnected. */ public static void handlerDisconnect(ObjectG instanc, gulong handlerId) { g_signal_handler_disconnect((instanc is null) ? null : instanc.getObjectGStruct(), handlerId); } /** * Finds the first signal handler that matches certain selection criteria. * The criteria mask is passed as an OR-ed combination of #GSignalMatchType * flags, and the criteria values are passed as arguments. * The match @mask has to be non-0 for successful matches. * If no handler was found, 0 is returned. * * Params: * instanc = The instance owning the signal handler to be found. * mask = Mask indicating which of @signal_id, @detail, @closure, @func * and/or @data the handler has to match. * signalId = Signal the handler has to be connected to. * detail = Signal detail the handler has to be connected to. * closure = The closure the handler will invoke. * func = The C closure callback of the handler (useless for non-C closures). * data = The closure data of the handler's closure. * * Returns: A valid non-0 signal handler id for a successful match. */ public static gulong handlerFind(ObjectG instanc, GSignalMatchType mask, uint signalId, GQuark detail, Closure closure, void* func, void* data) { return g_signal_handler_find((instanc is null) ? null : instanc.getObjectGStruct(), mask, signalId, detail, (closure is null) ? null : closure.getClosureStruct(), func, data); } /** * Returns whether @handler_id is the ID of a handler connected to @instance. * * Params: * instanc = The instance where a signal handler is sought. * handlerId = the handler ID. * * Returns: whether @handler_id identifies a handler connected to @instance. */ public static bool handlerIsConnected(ObjectG instanc, gulong handlerId) { return g_signal_handler_is_connected((instanc is null) ? null : instanc.getObjectGStruct(), handlerId) != 0; } /** * Undoes the effect of a previous g_signal_handler_block() call. A * blocked handler is skipped during signal emissions and will not be * invoked, unblocking it (for exactly the amount of times it has been * blocked before) reverts its "blocked" state, so the handler will be * recognized by the signal system and is called upon future or * currently ongoing signal emissions (since the order in which * handlers are called during signal emissions is deterministic, * whether the unblocked handler in question is called as part of a * currently ongoing emission depends on how far that emission has * proceeded yet). * * The @handler_id has to be a valid id of a signal handler that is * connected to a signal of @instance and is currently blocked. * * Params: * instanc = The instance to unblock the signal handler of. * handlerId = Handler id of the handler to be unblocked. */ public static void handlerUnblock(ObjectG instanc, gulong handlerId) { g_signal_handler_unblock((instanc is null) ? null : instanc.getObjectGStruct(), handlerId); } /** * Blocks all handlers on an instance that match a certain selection criteria. * The criteria mask is passed as an OR-ed combination of #GSignalMatchType * flags, and the criteria values are passed as arguments. * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches. * If no handlers were found, 0 is returned, the number of blocked handlers * otherwise. * * Params: * instanc = The instance to block handlers from. * mask = Mask indicating which of @signal_id, @detail, @closure, @func * and/or @data the handlers have to match. * signalId = Signal the handlers have to be connected to. * detail = Signal detail the handlers have to be connected to. * closure = The closure the handlers will invoke. * func = The C closure callback of the handlers (useless for non-C closures). * data = The closure data of the handlers' closures. * * Returns: The number of handlers that matched. */ public static uint handlersBlockMatched(ObjectG instanc, GSignalMatchType mask, uint signalId, GQuark detail, Closure closure, void* func, void* data) { return g_signal_handlers_block_matched((instanc is null) ? null : instanc.getObjectGStruct(), mask, signalId, detail, (closure is null) ? null : closure.getClosureStruct(), func, data); } /** * Destroy all signal handlers of a type instance. This function is * an implementation detail of the #GObject dispose implementation, * and should not be used outside of the type system. * * Params: * instanc = The instance whose signal handlers are destroyed */ public static void handlersDestroy(ObjectG instanc) { g_signal_handlers_destroy((instanc is null) ? null : instanc.getObjectGStruct()); } /** * Disconnects all handlers on an instance that match a certain * selection criteria. The criteria mask is passed as an OR-ed * combination of #GSignalMatchType flags, and the criteria values are * passed as arguments. Passing at least one of the * %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC or * %G_SIGNAL_MATCH_DATA match flags is required for successful * matches. If no handlers were found, 0 is returned, the number of * disconnected handlers otherwise. * * Params: * instanc = The instance to remove handlers from. * mask = Mask indicating which of @signal_id, @detail, @closure, @func * and/or @data the handlers have to match. * signalId = Signal the handlers have to be connected to. * detail = Signal detail the handlers have to be connected to. * closure = The closure the handlers will invoke. * func = The C closure callback of the handlers (useless for non-C closures). * data = The closure data of the handlers' closures. * * Returns: The number of handlers that matched. */ public static uint handlersDisconnectMatched(ObjectG instanc, GSignalMatchType mask, uint signalId, GQuark detail, Closure closure, void* func, void* data) { return g_signal_handlers_disconnect_matched((instanc is null) ? null : instanc.getObjectGStruct(), mask, signalId, detail, (closure is null) ? null : closure.getClosureStruct(), func, data); } /** * Unblocks all handlers on an instance that match a certain selection * criteria. The criteria mask is passed as an OR-ed combination of * #GSignalMatchType flags, and the criteria values are passed as arguments. * Passing at least one of the %G_SIGNAL_MATCH_CLOSURE, %G_SIGNAL_MATCH_FUNC * or %G_SIGNAL_MATCH_DATA match flags is required for successful matches. * If no handlers were found, 0 is returned, the number of unblocked handlers * otherwise. The match criteria should not apply to any handlers that are * not currently blocked. * * Params: * instanc = The instance to unblock handlers from. * mask = Mask indicating which of @signal_id, @detail, @closure, @func * and/or @data the handlers have to match. * signalId = Signal the handlers have to be connected to. * detail = Signal detail the handlers have to be connected to. * closure = The closure the handlers will invoke. * func = The C closure callback of the handlers (useless for non-C closures). * data = The closure data of the handlers' closures. * * Returns: The number of handlers that matched. */ public static uint handlersUnblockMatched(ObjectG instanc, GSignalMatchType mask, uint signalId, GQuark detail, Closure closure, void* func, void* data) { return g_signal_handlers_unblock_matched((instanc is null) ? null : instanc.getObjectGStruct(), mask, signalId, detail, (closure is null) ? null : closure.getClosureStruct(), func, data); } /** * Returns whether there are any handlers connected to @instance for the * given signal id and detail. * * If @detail is 0 then it will only match handlers that were connected * without detail. If @detail is non-zero then it will match handlers * connected both without detail and with the given detail. This is * consistent with how a signal emitted with @detail would be delivered * to those handlers. * * Since 2.46 this also checks for a non-default class closure being * installed, as this is basically always what you want. * * One example of when you might use this is when the arguments to the * signal are difficult to compute. A class implementor may opt to not * emit the signal if no one is attached anyway, thus saving the cost * of building the arguments. * * Params: * instanc = the object whose signal handlers are sought. * signalId = the signal id. * detail = the detail. * mayBeBlocked = whether blocked handlers should count as match. * * Returns: %TRUE if a handler is connected to the signal, %FALSE * otherwise. */ public static bool hasHandlerPending(ObjectG instanc, uint signalId, GQuark detail, bool mayBeBlocked) { return g_signal_has_handler_pending((instanc is null) ? null : instanc.getObjectGStruct(), signalId, detail, mayBeBlocked) != 0; } /** * Lists the signals by id that a certain instance or interface type * created. Further information about the signals can be acquired through * g_signal_query(). * * Params: * itype = Instance or interface type. * * Returns: Newly allocated array of signal IDs. */ public static uint[] listIds(GType itype) { uint nIds; auto p = g_signal_list_ids(itype, &nIds); return p[0 .. nIds]; } /** * Given the name of the signal and the type of object it connects to, gets * the signal's identifying integer. Emitting the signal by number is * somewhat faster than using the name each time. * * Also tries the ancestors of the given type. * * See g_signal_new() for details on allowed signal names. * * Params: * name = the signal's name. * itype = the type that the signal operates on. * * Returns: the signal's identifying number, or 0 if no signal was found. */ public static uint lookup(string name, GType itype) { return g_signal_lookup(Str.toStringz(name), itype); } /** * Given the signal's identifier, finds its name. * * Two different signals may have the same name, if they have differing types. * * Params: * signalId = the signal's identifying number. * * Returns: the signal name, or %NULL if the signal number was invalid. */ public static string name(uint signalId) { return Str.toString(g_signal_name(signalId)); } /** * Creates a new signal. (This is usually done in the class initializer.) * * See g_signal_new() for details on allowed signal names. * * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as * the marshaller for this signal. * * Params: * signalName = the name for the signal * itype = the type this signal pertains to. It will also pertain to * types which are derived from this type. * signalFlags = a combination of #GSignalFlags specifying detail of when * the default handler is to be invoked. You should at least specify * %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST. * classClosure = The closure to invoke on signal emission; may be %NULL. * accumulator = the accumulator for this signal; may be %NULL. * accuData = user data for the @accumulator. * cMarshaller = the function to translate arrays of parameter * values to signal emissions into C language callback invocations or %NULL. * returnType = the type of return value, or #G_TYPE_NONE for a signal * without a return value. * nParams = the number of parameter types in @args. * args = va_list of #GType, one for each parameter. * * Returns: the signal id */ public static uint newValist(string signalName, GType itype, GSignalFlags signalFlags, Closure classClosure, GSignalAccumulator accumulator, void* accuData, GSignalCMarshaller cMarshaller, GType returnType, uint nParams, void* args) { return g_signal_new_valist(Str.toStringz(signalName), itype, signalFlags, (classClosure is null) ? null : classClosure.getClosureStruct(), accumulator, accuData, cMarshaller, returnType, nParams, args); } /** * Creates a new signal. (This is usually done in the class initializer.) * * See g_signal_new() for details on allowed signal names. * * If c_marshaller is %NULL, g_cclosure_marshal_generic() will be used as * the marshaller for this signal. * * Params: * signalName = the name for the signal * itype = the type this signal pertains to. It will also pertain to * types which are derived from this type * signalFlags = a combination of #GSignalFlags specifying detail of when * the default handler is to be invoked. You should at least specify * %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST * classClosure = The closure to invoke on signal emission; * may be %NULL * accumulator = the accumulator for this signal; may be %NULL * accuData = user data for the @accumulator * cMarshaller = the function to translate arrays of * parameter values to signal emissions into C language callback * invocations or %NULL * returnType = the type of return value, or #G_TYPE_NONE for a signal * without a return value * paramTypes = an array of types, one for * each parameter * * Returns: the signal id */ public static uint newv(string signalName, GType itype, GSignalFlags signalFlags, Closure classClosure, GSignalAccumulator accumulator, void* accuData, GSignalCMarshaller cMarshaller, GType returnType, GType[] paramTypes) { return g_signal_newv(Str.toStringz(signalName), itype, signalFlags, (classClosure is null) ? null : classClosure.getClosureStruct(), accumulator, accuData, cMarshaller, returnType, cast(uint)paramTypes.length, paramTypes.ptr); } /** * Overrides the class closure (i.e. the default handler) for the given signal * for emissions on instances of @instance_type. @instance_type must be derived * from the type to which the signal belongs. * * See g_signal_chain_from_overridden() and * g_signal_chain_from_overridden_handler() for how to chain up to the * parent class closure from inside the overridden one. * * Params: * signalId = the signal id * instanceType = the instance type on which to override the class closure * for the signal. * classClosure = the closure. */ public static void overrideClassClosure(uint signalId, GType instanceType, Closure classClosure) { g_signal_override_class_closure(signalId, instanceType, (classClosure is null) ? null : classClosure.getClosureStruct()); } /** * Overrides the class closure (i.e. the default handler) for the * given signal for emissions on instances of @instance_type with * callback @class_handler. @instance_type must be derived from the * type to which the signal belongs. * * See g_signal_chain_from_overridden() and * g_signal_chain_from_overridden_handler() for how to chain up to the * parent class closure from inside the overridden one. * * Params: * signalName = the name for the signal * instanceType = the instance type on which to override the class handler * for the signal. * classHandler = the handler. * * Since: 2.18 */ public static void overrideClassHandler(string signalName, GType instanceType, GCallback classHandler) { g_signal_override_class_handler(Str.toStringz(signalName), instanceType, classHandler); } /** * Internal function to parse a signal name into its @signal_id * and @detail quark. * * Params: * detailedSignal = a string of the form "signal-name::detail". * itype = The interface/instance type that introduced "signal-name". * signalIdP = Location to store the signal id. * detailP = Location to store the detail quark. * forceDetailQuark = %TRUE forces creation of a #GQuark for the detail. * * Returns: Whether the signal name could successfully be parsed and @signal_id_p and @detail_p contain valid return values. */ public static bool parseName(string detailedSignal, GType itype, out uint signalIdP, out GQuark detailP, bool forceDetailQuark) { return g_signal_parse_name(Str.toStringz(detailedSignal), itype, &signalIdP, &detailP, forceDetailQuark) != 0; } /** * Queries the signal system for in-depth information about a * specific signal. This function will fill in a user-provided * structure to hold signal-specific information. If an invalid * signal id is passed in, the @signal_id member of the #GSignalQuery * is 0. All members filled into the #GSignalQuery structure should * be considered constant and have to be left untouched. * * Params: * signalId = The signal id of the signal to query information for. * query = A user provided structure that is * filled in with constant values upon success. */ public static void query(uint signalId, out GSignalQuery query) { g_signal_query(signalId, &query); } /** * Deletes an emission hook. * * Params: * signalId = the id of the signal * hookId = the id of the emission hook, as returned by * g_signal_add_emission_hook() */ public static void removeEmission(uint signalId, gulong hookId) { g_signal_remove_emission_hook(signalId, hookId); } /** * Change the #GSignalCVaMarshaller used for a given signal. This is a * specialised form of the marshaller that can often be used for the * common case of a single connected signal handler and avoids the * overhead of #GValue. Its use is optional. * * Params: * signalId = the signal id * instanceType = the instance type on which to set the marshaller. * vaMarshaller = the marshaller to set. * * Since: 2.32 */ public static void setVaMarshaller(uint signalId, GType instanceType, GSignalCVaMarshaller vaMarshaller) { g_signal_set_va_marshaller(signalId, instanceType, vaMarshaller); } /** * Stops a signal's current emission. * * This will prevent the default method from running, if the signal was * %G_SIGNAL_RUN_LAST and you connected normally (i.e. without the "after" * flag). * * Prints a warning if used on a signal which isn't being emitted. * * Params: * instanc = the object whose signal handlers you wish to stop. * signalId = the signal identifier, as returned by g_signal_lookup(). * detail = the detail which the signal was emitted with. */ public static void stopEmission(ObjectG instanc, uint signalId, GQuark detail) { g_signal_stop_emission((instanc is null) ? null : instanc.getObjectGStruct(), signalId, detail); } /** * Stops a signal's current emission. * * This is just like g_signal_stop_emission() except it will look up the * signal id for you. * * Params: * instanc = the object whose signal handlers you wish to stop. * detailedSignal = a string of the form "signal-name::detail". */ public static void stopEmissionByName(ObjectG instanc, string detailedSignal) { g_signal_stop_emission_by_name((instanc is null) ? null : instanc.getObjectGStruct(), Str.toStringz(detailedSignal)); } /** * Creates a new closure which invokes the function found at the offset * @struct_offset in the class structure of the interface or classed type * identified by @itype. * * Params: * itype = the #GType identifier of an interface or classed type * structOffset = the offset of the member function of @itype's class * structure which is to be invoked by the new closure * * Returns: a new #GCClosure */ public static Closure typeCclosureNew(GType itype, uint structOffset) { auto p = g_signal_type_cclosure_new(itype, structOffset); if(p is null) { return null; } return ObjectG.getDObject!(Closure)(cast(GClosure*) p, true); } } GtkD-3.7.5/generated/gtkd/gobject/Type.d000066400000000000000000000633031324604450400177600ustar00rootroot00000000000000/* * 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 gobject.Type; private import glib.Str; private import gobject.ObjectG; private import gobject.TypeClass; private import gobject.TypeInstance; private import gobject.TypeInterface; private import gobject.TypePluginIF; private import gobject.Value; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** */ public struct Type { public static T* getInstanceClass(T)(ObjectG obj) { return cast(T*) (cast(GTypeInstance*)obj.getObjectGStruct()).gClass; } /** * Get the unique name that is assigned to the Objects type. * Returns: Static type name or NULL. */ public static string name(ObjectG obj) { GType type = (cast(GTypeInstance*)obj.getObjectGStruct()).gClass.gType; return name(type); } /** */ /** * Adds a #GTypeClassCacheFunc to be called before the reference count of a * class goes from one to zero. This can be used to prevent premature class * destruction. All installed #GTypeClassCacheFunc functions will be chained * until one of them returns %TRUE. The functions have to check the class id * passed in to figure whether they actually want to cache the class of this * type, since all classes are routed through the same #GTypeClassCacheFunc * chain. * * Params: * cacheData = data to be passed to @cache_func * cacheFunc = a #GTypeClassCacheFunc */ public static void addClassCacheFunc(void* cacheData, GTypeClassCacheFunc cacheFunc) { g_type_add_class_cache_func(cacheData, cacheFunc); } /** * Registers a private class structure for a classed type; * when the class is allocated, the private structures for * the class and all of its parent types are allocated * sequentially in the same memory block as the public * structures, and are zero-filled. * * This function should be called in the * type's get_type() function after the type is registered. * The private structure can be retrieved using the * G_TYPE_CLASS_GET_PRIVATE() macro. * * Params: * classType = GType of an classed type * privateSize = size of private structure * * Since: 2.24 */ public static void addClassPrivate(GType classType, size_t privateSize) { g_type_add_class_private(classType, privateSize); } /** */ public static int addInstancePrivate(GType classType, size_t privateSize) { return g_type_add_instance_private(classType, privateSize); } /** * Adds a function to be called after an interface vtable is * initialized for any class (i.e. after the @interface_init * member of #GInterfaceInfo has been called). * * This function is useful when you want to check an invariant * that depends on the interfaces of a class. For instance, the * implementation of #GObject uses this facility to check that an * object implements all of the properties that are defined on its * interfaces. * * Params: * checkData = data to pass to @check_func * checkFunc = function to be called after each interface * is initialized * * Since: 2.4 */ public static void addInterfaceCheck(void* checkData, GTypeInterfaceCheckFunc checkFunc) { g_type_add_interface_check(checkData, checkFunc); } /** * Adds the dynamic @interface_type to @instantiable_type. The information * contained in the #GTypePlugin structure pointed to by @plugin * is used to manage the relationship. * * Params: * instanceType = #GType value of an instantiable type * interfaceType = #GType value of an interface type * plugin = #GTypePlugin structure to retrieve the #GInterfaceInfo from */ public static void addInterfaceDynamic(GType instanceType, GType interfaceType, TypePluginIF plugin) { g_type_add_interface_dynamic(instanceType, interfaceType, (plugin is null) ? null : plugin.getTypePluginStruct()); } /** * Adds the static @interface_type to @instantiable_type. * The information contained in the #GInterfaceInfo structure * pointed to by @info is used to manage the relationship. * * Params: * instanceType = #GType value of an instantiable type * interfaceType = #GType value of an interface type * info = #GInterfaceInfo structure for this * (@instance_type, @interface_type) combination */ public static void addInterfaceStatic(GType instanceType, GType interfaceType, GInterfaceInfo* info) { g_type_add_interface_static(instanceType, interfaceType, info); } /** */ public static TypeClass checkClassCast(TypeClass gClass, GType isAType) { auto p = g_type_check_class_cast((gClass is null) ? null : gClass.getTypeClassStruct(), isAType); if(p is null) { return null; } return ObjectG.getDObject!(TypeClass)(cast(GTypeClass*) p); } /** */ public static bool checkClassIsA(TypeClass gClass, GType isAType) { return g_type_check_class_is_a((gClass is null) ? null : gClass.getTypeClassStruct(), isAType) != 0; } /** * Private helper function to aid implementation of the * G_TYPE_CHECK_INSTANCE() macro. * * Params: * instanc = a valid #GTypeInstance structure * * Returns: %TRUE if @instance is valid, %FALSE otherwise */ public static bool checkInstance(TypeInstance instanc) { return g_type_check_instance((instanc is null) ? null : instanc.getTypeInstanceStruct()) != 0; } /** */ public static TypeInstance checkInstanceCast(TypeInstance instanc, GType ifaceType) { auto p = g_type_check_instance_cast((instanc is null) ? null : instanc.getTypeInstanceStruct(), ifaceType); if(p is null) { return null; } return ObjectG.getDObject!(TypeInstance)(cast(GTypeInstance*) p); } /** */ public static bool checkInstanceIsA(TypeInstance instanc, GType ifaceType) { return g_type_check_instance_is_a((instanc is null) ? null : instanc.getTypeInstanceStruct(), ifaceType) != 0; } /** */ public static bool checkInstanceIsFundamentallyA(TypeInstance instanc, GType fundamentalType) { return g_type_check_instance_is_fundamentally_a((instanc is null) ? null : instanc.getTypeInstanceStruct(), fundamentalType) != 0; } /** */ public static bool checkIsValueType(GType type) { return g_type_check_is_value_type(type) != 0; } /** */ public static bool checkValue(Value value) { return g_type_check_value((value is null) ? null : value.getValueStruct()) != 0; } /** */ public static bool checkValueHolds(Value value, GType type) { return g_type_check_value_holds((value is null) ? null : value.getValueStruct(), type) != 0; } /** * Return a newly allocated and 0-terminated array of type IDs, listing * the child types of @type. * * Params: * type = the parent type * * Returns: Newly allocated * and 0-terminated array of child types, free with g_free() */ public static GType[] children(GType type) { uint nChildren; auto p = g_type_children(type, &nChildren); return p[0 .. nChildren]; } /** * Creates and initializes an instance of @type if @type is valid and * can be instantiated. The type system only performs basic allocation * and structure setups for instances: actual instance creation should * happen through functions supplied by the type's fundamental type * implementation. So use of g_type_create_instance() is reserved for * implementators of fundamental types only. E.g. instances of the * #GObject hierarchy should be created via g_object_new() and never * directly through g_type_create_instance() which doesn't handle things * like singleton objects or object construction. * * The extended members of the returned instance are guaranteed to be filled * with zeros. * * Note: Do not use this function, unless you're implementing a * fundamental type. Also language bindings should not use this * function, but g_object_new() instead. * * Params: * type = an instantiatable type to create an instance for * * Returns: an allocated and initialized instance, subject to further * treatment by the fundamental type implementation */ public static TypeInstance createInstance(GType type) { auto p = g_type_create_instance(type); if(p is null) { return null; } return ObjectG.getDObject!(TypeInstance)(cast(GTypeInstance*) p); } /** * If the interface type @g_type is currently in use, returns its * default interface vtable. * * Params: * gType = an interface type * * Returns: the default * vtable for the interface, or %NULL if the type is not currently * in use * * Since: 2.4 */ public static TypeInterface defaultInterfacePeek(GType gType) { auto p = g_type_default_interface_peek(gType); if(p is null) { return null; } return ObjectG.getDObject!(TypeInterface)(cast(GTypeInterface*) p); } /** * Increments the reference count for the interface type @g_type, * and returns the default interface vtable for the type. * * If the type is not currently in use, then the default vtable * for the type will be created and initalized by calling * the base interface init and default vtable init functions for * the type (the @base_init and @class_init members of #GTypeInfo). * Calling g_type_default_interface_ref() is useful when you * want to make sure that signals and properties for an interface * have been installed. * * Params: * gType = an interface type * * Returns: the default * vtable for the interface; call g_type_default_interface_unref() * when you are done using the interface. * * Since: 2.4 */ public static TypeInterface defaultInterfaceRef(GType gType) { auto p = g_type_default_interface_ref(gType); if(p is null) { return null; } return ObjectG.getDObject!(TypeInterface)(cast(GTypeInterface*) p); } /** * Decrements the reference count for the type corresponding to the * interface default vtable @g_iface. If the type is dynamic, then * when no one is using the interface and all references have * been released, the finalize function for the interface's default * vtable (the @class_finalize member of #GTypeInfo) will be called. * * Params: * gIface = the default vtable * structure for a interface, as returned by g_type_default_interface_ref() * * Since: 2.4 */ public static void defaultInterfaceUnref(TypeInterface gIface) { g_type_default_interface_unref((gIface is null) ? null : gIface.getTypeInterfaceStruct()); } /** * Returns the length of the ancestry of the passed in type. This * includes the type itself, so that e.g. a fundamental type has depth 1. * * Params: * type = a #GType * * Returns: the depth of @type */ public static uint depth(GType type) { return g_type_depth(type); } /** * Ensures that the indicated @type has been registered with the * type system, and its _class_init() method has been run. * * In theory, simply calling the type's _get_type() method (or using * the corresponding macro) is supposed take care of this. However, * _get_type() methods are often marked %G_GNUC_CONST for performance * reasons, even though this is technically incorrect (since * %G_GNUC_CONST requires that the function not have side effects, * which _get_type() methods do on the first call). As a result, if * you write a bare call to a _get_type() macro, it may get optimized * out by the compiler. Using g_type_ensure() guarantees that the * type's _get_type() method is called. * * Params: * type = a #GType * * Since: 2.34 */ public static void ensure(GType type) { g_type_ensure(type); } /** * Frees an instance of a type, returning it to the instance pool for * the type, if there is one. * * Like g_type_create_instance(), this function is reserved for * implementors of fundamental types. * * Params: * instanc = an instance of a type */ public static void freeInstance(TypeInstance instanc) { g_type_free_instance((instanc is null) ? null : instanc.getTypeInstanceStruct()); } /** * Lookup the type ID from a given type name, returning 0 if no type * has been registered under this name (this is the preferred method * to find out by name whether a specific type has been registered * yet). * * Params: * name = type name to lookup * * Returns: corresponding type ID or 0 */ public static GType fromName(string name) { return g_type_from_name(Str.toStringz(name)); } /** * Internal function, used to extract the fundamental type ID portion. * Use G_TYPE_FUNDAMENTAL() instead. * * Params: * typeId = valid type ID * * Returns: fundamental type ID */ public static GType fundamental(GType typeId) { return g_type_fundamental(typeId); } /** * Returns the next free fundamental type id which can be used to * register a new fundamental type with g_type_register_fundamental(). * The returned type ID represents the highest currently registered * fundamental type identifier. * * Returns: the next available fundamental type ID to be registered, * or 0 if the type system ran out of fundamental type IDs */ public static GType fundamentalNext() { return g_type_fundamental_next(); } /** * Returns the #GTypePlugin structure for @type. * * Params: * type = #GType to retrieve the plugin for * * Returns: the corresponding plugin * if @type is a dynamic type, %NULL otherwise */ public static TypePluginIF getPlugin(GType type) { auto p = g_type_get_plugin(type); if(p is null) { return null; } return ObjectG.getDObject!(TypePluginIF)(cast(GTypePlugin*) p); } /** * Obtains data which has previously been attached to @type * with g_type_set_qdata(). * * Note that this does not take subtyping into account; data * attached to one type with g_type_set_qdata() cannot * be retrieved from a subtype using g_type_get_qdata(). * * Params: * type = a #GType * quark = a #GQuark id to identify the data * * Returns: the data, or %NULL if no data was found */ public static void* getQdata(GType type, GQuark quark) { return g_type_get_qdata(type, quark); } /** * Returns an opaque serial number that represents the state of the set * of registered types. Any time a type is registered this serial changes, * which means you can cache information based on type lookups (such as * g_type_from_name()) and know if the cache is still valid at a later * time by comparing the current serial with the one at the type lookup. * * Returns: An unsigned int, representing the state of type registrations * * Since: 2.36 */ public static uint getTypeRegistrationSerial() { return g_type_get_type_registration_serial(); } /** * This function used to initialise the type system. Since GLib 2.36, * the type system is initialised automatically and this function does * nothing. * * Deprecated: the type system is now initialised automatically */ public static void init() { g_type_init(); } /** * This function used to initialise the type system with debugging * flags. Since GLib 2.36, the type system is initialised automatically * and this function does nothing. * * If you need to enable debugging features, use the GOBJECT_DEBUG * environment variable. * * Deprecated: the type system is now initialised automatically * * Params: * debugFlags = bitwise combination of #GTypeDebugFlags values for * debugging purposes */ public static void initWithDebugFlags(GTypeDebugFlags debugFlags) { g_type_init_with_debug_flags(debugFlags); } /** * Return a newly allocated and 0-terminated array of type IDs, listing * the interface types that @type conforms to. * * Params: * type = the type to list interface types for * * Returns: Newly allocated * and 0-terminated array of interface types, free with g_free() */ public static GType[] interfaces(GType type) { uint nInterfaces; auto p = g_type_interfaces(type, &nInterfaces); return p[0 .. nInterfaces]; } /** * If @is_a_type is a derivable type, check whether @type is a * descendant of @is_a_type. If @is_a_type is an interface, check * whether @type conforms to it. * * Params: * type = type to check anchestry for * isAType = possible anchestor of @type or interface that @type * could conform to * * Returns: %TRUE if @type is a @is_a_type */ public static bool isA(GType type, GType isAType) { return g_type_is_a(type, isAType) != 0; } /** * Get the unique name that is assigned to a type ID. Note that this * function (like all other GType API) cannot cope with invalid type * IDs. %G_TYPE_INVALID may be passed to this function, as may be any * other validly registered type ID, but randomized type IDs should * not be passed in and will most likely lead to a crash. * * Params: * type = type to return name for * * Returns: static type name or %NULL */ public static string name(GType type) { return Str.toString(g_type_name(type)); } /** */ public static string nameFromClass(TypeClass gClass) { return Str.toString(g_type_name_from_class((gClass is null) ? null : gClass.getTypeClassStruct())); } /** */ public static string nameFromInstance(TypeInstance instanc) { return Str.toString(g_type_name_from_instance((instanc is null) ? null : instanc.getTypeInstanceStruct())); } /** * Given a @leaf_type and a @root_type which is contained in its * anchestry, return the type that @root_type is the immediate parent * of. In other words, this function determines the type that is * derived directly from @root_type which is also a base class of * @leaf_type. Given a root type and a leaf type, this function can * be used to determine the types and order in which the leaf type is * descended from the root type. * * Params: * leafType = descendant of @root_type and the type to be returned * rootType = immediate parent of the returned type * * Returns: immediate child of @root_type and anchestor of @leaf_type */ public static GType nextBase(GType leafType, GType rootType) { return g_type_next_base(leafType, rootType); } /** * Return the direct parent type of the passed in type. If the passed * in type has no parent, i.e. is a fundamental type, 0 is returned. * * Params: * type = the derived type * * Returns: the parent type */ public static GType parent(GType type) { return g_type_parent(type); } /** * Get the corresponding quark of the type IDs name. * * Params: * type = type to return quark of type name for * * Returns: the type names quark or 0 */ public static GQuark qname(GType type) { return g_type_qname(type); } /** * Queries the type system for information about a specific type. * This function will fill in a user-provided structure to hold * type-specific information. If an invalid #GType is passed in, the * @type member of the #GTypeQuery is 0. All members filled into the * #GTypeQuery structure should be considered constant and have to be * left untouched. * * Params: * type = #GType of a static, classed type * query = a user provided structure that is * filled in with constant values upon success */ public static void query(GType type, out GTypeQuery query) { g_type_query(type, &query); } /** * Registers @type_name as the name of a new dynamic type derived from * @parent_type. The type system uses the information contained in the * #GTypePlugin structure pointed to by @plugin to manage the type and its * instances (if not abstract). The value of @flags determines the nature * (e.g. abstract or not) of the type. * * Params: * parentType = type from which this type will be derived * typeName = 0-terminated string used as the name of the new type * plugin = #GTypePlugin structure to retrieve the #GTypeInfo from * flags = bitwise combination of #GTypeFlags values * * Returns: the new type identifier or #G_TYPE_INVALID if registration failed */ public static GType registerDynamic(GType parentType, string typeName, TypePluginIF plugin, GTypeFlags flags) { return g_type_register_dynamic(parentType, Str.toStringz(typeName), (plugin is null) ? null : plugin.getTypePluginStruct(), flags); } /** * Registers @type_id as the predefined identifier and @type_name as the * name of a fundamental type. If @type_id is already registered, or a * type named @type_name is already registered, the behaviour is undefined. * The type system uses the information contained in the #GTypeInfo structure * pointed to by @info and the #GTypeFundamentalInfo structure pointed to by * @finfo to manage the type and its instances. The value of @flags determines * additional characteristics of the fundamental type. * * Params: * typeId = a predefined type identifier * typeName = 0-terminated string used as the name of the new type * info = #GTypeInfo structure for this type * finfo = #GTypeFundamentalInfo structure for this type * flags = bitwise combination of #GTypeFlags values * * Returns: the predefined type identifier */ public static GType registerFundamental(GType typeId, string typeName, GTypeInfo* info, GTypeFundamentalInfo* finfo, GTypeFlags flags) { return g_type_register_fundamental(typeId, Str.toStringz(typeName), info, finfo, flags); } /** * Registers @type_name as the name of a new static type derived from * @parent_type. The type system uses the information contained in the * #GTypeInfo structure pointed to by @info to manage the type and its * instances (if not abstract). The value of @flags determines the nature * (e.g. abstract or not) of the type. * * Params: * parentType = type from which this type will be derived * typeName = 0-terminated string used as the name of the new type * info = #GTypeInfo structure for this type * flags = bitwise combination of #GTypeFlags values * * Returns: the new type identifier */ public static GType registerStatic(GType parentType, string typeName, GTypeInfo* info, GTypeFlags flags) { return g_type_register_static(parentType, Str.toStringz(typeName), info, flags); } /** * Registers @type_name as the name of a new static type derived from * @parent_type. The value of @flags determines the nature (e.g. * abstract or not) of the type. It works by filling a #GTypeInfo * struct and calling g_type_register_static(). * * Params: * parentType = type from which this type will be derived * typeName = 0-terminated string used as the name of the new type * classSize = size of the class structure (see #GTypeInfo) * classInit = location of the class initialization function (see #GTypeInfo) * instanceSize = size of the instance structure (see #GTypeInfo) * instanceInit = location of the instance initialization function (see #GTypeInfo) * flags = bitwise combination of #GTypeFlags values * * Returns: the new type identifier * * Since: 2.12 */ public static GType registerStaticSimple(GType parentType, string typeName, uint classSize, GClassInitFunc classInit, uint instanceSize, GInstanceInitFunc instanceInit, GTypeFlags flags) { return g_type_register_static_simple(parentType, Str.toStringz(typeName), classSize, classInit, instanceSize, instanceInit, flags); } /** * Removes a previously installed #GTypeClassCacheFunc. The cache * maintained by @cache_func has to be empty when calling * g_type_remove_class_cache_func() to avoid leaks. * * Params: * cacheData = data that was given when adding @cache_func * cacheFunc = a #GTypeClassCacheFunc */ public static void removeClassCacheFunc(void* cacheData, GTypeClassCacheFunc cacheFunc) { g_type_remove_class_cache_func(cacheData, cacheFunc); } /** * Removes an interface check function added with * g_type_add_interface_check(). * * Params: * checkData = callback data passed to g_type_add_interface_check() * checkFunc = callback function passed to g_type_add_interface_check() * * Since: 2.4 */ public static void removeInterfaceCheck(void* checkData, GTypeInterfaceCheckFunc checkFunc) { g_type_remove_interface_check(checkData, checkFunc); } /** * Attaches arbitrary data to a type. * * Params: * type = a #GType * quark = a #GQuark id to identify the data * data = the data */ public static void setQdata(GType type, GQuark quark, void* data) { g_type_set_qdata(type, quark, data); } /** */ public static bool testFlags(GType type, uint flags) { return g_type_test_flags(type, flags) != 0; } /** * Returns the number of instances allocated of the particular type; * this is only available if GLib is built with debugging support and * the instance_count debug flag is set (by setting the GOBJECT_DEBUG * variable to include instance-count). * * Params: * type = a #GType * * Returns: the number of instances allocated of the given type; * if instance counts are not available, returns 0. * * Since: 2.44 */ public static int getInstanceCount(GType type) { return g_type_get_instance_count(type); } } GtkD-3.7.5/generated/gtkd/gobject/TypeClass.d000066400000000000000000000171401324604450400207440ustar00rootroot00000000000000/* * 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 gobject.TypeClass; private import gobject.ObjectG; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; private import gtkd.Loader; /** * An opaque structure used as the base of all classes. */ public class TypeClass { /** the main Gtk struct */ protected GTypeClass* gTypeClass; protected bool ownedRef; /** Get the main Gtk struct */ public GTypeClass* getTypeClassStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTypeClass; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gTypeClass; } /** * Sets our main struct and passes it to the parent class. */ public this (GTypeClass* gTypeClass, bool ownedRef = false) { this.gTypeClass = gTypeClass; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GOBJECT) && ownedRef ) g_type_class_unref(gTypeClass); } /** * Registers a private structure for an instantiatable type. * * When an object is allocated, the private structures for * the type and all of its parent types are allocated * sequentially in the same memory block as the public * structures, and are zero-filled. * * Note that the accumulated size of the private structures of * a type and all its parent types cannot exceed 64 KiB. * * This function should be called in the type's class_init() function. * The private structure can be retrieved using the * G_TYPE_INSTANCE_GET_PRIVATE() macro. * * The following example shows attaching a private structure * MyObjectPrivate to an object MyObject defined in the standard * GObject fashion in the type's class_init() function. * * Note the use of a structure member "priv" to avoid the overhead * of repeatedly calling MY_OBJECT_GET_PRIVATE(). * * |[ * typedef struct _MyObject MyObject; * typedef struct _MyObjectPrivate MyObjectPrivate; * * struct _MyObject { * GObject parent; * * MyObjectPrivate *priv; * }; * * struct _MyObjectPrivate { * int some_field; * }; * * static void * my_object_class_init (MyObjectClass *klass) * { * g_type_class_add_private (klass, sizeof (MyObjectPrivate)); * } * * static void * my_object_init (MyObject *my_object) * { * my_object->priv = G_TYPE_INSTANCE_GET_PRIVATE (my_object, * MY_TYPE_OBJECT, * MyObjectPrivate); * // my_object->priv->some_field will be automatically initialised to 0 * } * * static int * my_object_get_some_field (MyObject *my_object) * { * MyObjectPrivate *priv; * * g_return_val_if_fail (MY_IS_OBJECT (my_object), 0); * * priv = my_object->priv; * * return priv->some_field; * } * ]| * * Params: * privateSize = size of private structure * * Since: 2.4 */ public void addPrivate(size_t privateSize) { g_type_class_add_private(gTypeClass, privateSize); } /** * Gets the offset of the private data for instances of @g_class. * * This is how many bytes you should add to the instance pointer of a * class in order to get the private data for the type represented by * @g_class. * * You can only call this function after you have registered a private * data area for @g_class using g_type_class_add_private(). * * Returns: the offset, in bytes * * Since: 2.38 */ public int getInstancePrivateOffset() { return g_type_class_get_instance_private_offset(gTypeClass); } /** */ public void* getPrivate(GType privateType) { return g_type_class_get_private(gTypeClass, privateType); } /** * This is a convenience function often needed in class initializers. * It returns the class structure of the immediate parent type of the * class passed in. Since derived classes hold a reference count on * their parent classes as long as they are instantiated, the returned * class will always exist. * * This function is essentially equivalent to: * g_type_class_peek (g_type_parent (G_TYPE_FROM_CLASS (g_class))) * * Returns: the parent class * of @g_class */ public TypeClass peekParent() { auto p = g_type_class_peek_parent(gTypeClass); if(p is null) { return null; } return ObjectG.getDObject!(TypeClass)(cast(GTypeClass*) p); } /** * Decrements the reference count of the class structure being passed in. * Once the last reference count of a class has been released, classes * may be finalized by the type system, so further dereferencing of a * class pointer after g_type_class_unref() are invalid. */ public void unref() { g_type_class_unref(gTypeClass); } /** * A variant of g_type_class_unref() for use in #GTypeClassCacheFunc * implementations. It unreferences a class without consulting the chain * of #GTypeClassCacheFuncs, avoiding the recursion which would occur * otherwise. */ public void unrefUncached() { g_type_class_unref_uncached(gTypeClass); } /** */ public static void adjustPrivateOffset(void* gClass, int* privateSizeOrOffset) { g_type_class_adjust_private_offset(gClass, privateSizeOrOffset); } /** * This function is essentially the same as g_type_class_ref(), * except that the classes reference count isn't incremented. * As a consequence, this function may return %NULL if the class * of the type passed in does not currently exist (hasn't been * referenced before). * * Params: * type = type ID of a classed type * * Returns: the #GTypeClass * structure for the given type ID or %NULL if the class does not * currently exist */ public static TypeClass peek(GType type) { auto p = g_type_class_peek(type); if(p is null) { return null; } return ObjectG.getDObject!(TypeClass)(cast(GTypeClass*) p); } /** * A more efficient version of g_type_class_peek() which works only for * static types. * * Params: * type = type ID of a classed type * * Returns: the #GTypeClass * structure for the given type ID or %NULL if the class does not * currently exist or is dynamically loaded * * Since: 2.4 */ public static TypeClass peekStatic(GType type) { auto p = g_type_class_peek_static(type); if(p is null) { return null; } return ObjectG.getDObject!(TypeClass)(cast(GTypeClass*) p); } /** * Increments the reference count of the class structure belonging to * @type. This function will demand-create the class if it doesn't * exist already. * * Params: * type = type ID of a classed type * * Returns: the #GTypeClass * structure for the given type ID */ public static TypeClass doref(GType type) { auto p = g_type_class_ref(type); if(p is null) { return null; } return ObjectG.getDObject!(TypeClass)(cast(GTypeClass*) p); } } GtkD-3.7.5/generated/gtkd/gobject/TypeInstance.d000066400000000000000000000036041324604450400214430ustar00rootroot00000000000000/* * 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 gobject.TypeInstance; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * An opaque structure used as the base of all type instances. */ public class TypeInstance { /** the main Gtk struct */ protected GTypeInstance* gTypeInstance; protected bool ownedRef; /** Get the main Gtk struct */ public GTypeInstance* getTypeInstanceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTypeInstance; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gTypeInstance; } /** * Sets our main struct and passes it to the parent class. */ public this (GTypeInstance* gTypeInstance, bool ownedRef = false) { this.gTypeInstance = gTypeInstance; this.ownedRef = ownedRef; } /** */ public void* getPrivate(GType privateType) { return g_type_instance_get_private(gTypeInstance, privateType); } } GtkD-3.7.5/generated/gtkd/gobject/TypeInterface.d000066400000000000000000000121401324604450400215720ustar00rootroot00000000000000/* * 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 gobject.TypeInterface; private import gobject.ObjectG; private import gobject.TypeClass; private import gobject.TypePluginIF; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * An opaque structure used as the base of all interface types. */ public class TypeInterface { /** the main Gtk struct */ protected GTypeInterface* gTypeInterface; protected bool ownedRef; /** Get the main Gtk struct */ public GTypeInterface* getTypeInterfaceStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTypeInterface; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gTypeInterface; } /** * Sets our main struct and passes it to the parent class. */ public this (GTypeInterface* gTypeInterface, bool ownedRef = false) { this.gTypeInterface = gTypeInterface; this.ownedRef = ownedRef; } /** * Returns the corresponding #GTypeInterface structure of the parent type * of the instance type to which @g_iface belongs. This is useful when * deriving the implementation of an interface from the parent type and * then possibly overriding some methods. * * Returns: the * corresponding #GTypeInterface structure of the parent type of the * instance type to which @g_iface belongs, or %NULL if the parent * type doesn't conform to the interface */ public TypeInterface peekParent() { auto p = g_type_interface_peek_parent(gTypeInterface); if(p is null) { return null; } return ObjectG.getDObject!(TypeInterface)(cast(GTypeInterface*) p); } /** * Adds @prerequisite_type to the list of prerequisites of @interface_type. * This means that any type implementing @interface_type must also implement * @prerequisite_type. Prerequisites can be thought of as an alternative to * interface derivation (which GType doesn't support). An interface can have * at most one instantiatable prerequisite type. * * Params: * interfaceType = #GType value of an interface type * prerequisiteType = #GType value of an interface or instantiatable type */ public static void addPrerequisite(GType interfaceType, GType prerequisiteType) { g_type_interface_add_prerequisite(interfaceType, prerequisiteType); } /** * Returns the #GTypePlugin structure for the dynamic interface * @interface_type which has been added to @instance_type, or %NULL * if @interface_type has not been added to @instance_type or does * not have a #GTypePlugin structure. See g_type_add_interface_dynamic(). * * Params: * instanceType = #GType of an instantiatable type * interfaceType = #GType of an interface type * * Returns: the #GTypePlugin for the dynamic * interface @interface_type of @instance_type */ public static TypePluginIF getPlugin(GType instanceType, GType interfaceType) { auto p = g_type_interface_get_plugin(instanceType, interfaceType); if(p is null) { return null; } return ObjectG.getDObject!(TypePluginIF)(cast(GTypePlugin*) p); } /** * Returns the #GTypeInterface structure of an interface to which the * passed in class conforms. * * Params: * instanceClass = a #GTypeClass structure * ifaceType = an interface ID which this class conforms to * * Returns: the #GTypeInterface * structure of @iface_type if implemented by @instance_class, %NULL * otherwise */ public static TypeInterface peek(TypeClass instanceClass, GType ifaceType) { auto p = g_type_interface_peek((instanceClass is null) ? null : instanceClass.getTypeClassStruct(), ifaceType); if(p is null) { return null; } return ObjectG.getDObject!(TypeInterface)(cast(GTypeInterface*) p); } /** * Returns the prerequisites of an interfaces type. * * Params: * interfaceType = an interface type * * Returns: a * newly-allocated zero-terminated array of #GType containing * the prerequisites of @interface_type * * Since: 2.2 */ public static GType[] prerequisites(GType interfaceType) { uint nPrerequisites; auto p = g_type_interface_prerequisites(interfaceType, &nPrerequisites); return p[0 .. nPrerequisites]; } } GtkD-3.7.5/generated/gtkd/gobject/TypeModule.d000066400000000000000000000200341324604450400211200ustar00rootroot00000000000000/* * 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 gobject.TypeModule; private import glib.Str; private import gobject.ObjectG; private import gobject.TypePluginIF; private import gobject.TypePluginT; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * #GTypeModule provides a simple implementation of the #GTypePlugin * interface. The model of #GTypeModule is a dynamically loaded module * which implements some number of types and interface implementations. * When the module is loaded, it registers its types and interfaces * using g_type_module_register_type() and g_type_module_add_interface(). * As long as any instances of these types and interface implementations * are in use, the module is kept loaded. When the types and interfaces * are gone, the module may be unloaded. If the types and interfaces * become used again, the module will be reloaded. Note that the last * unref cannot happen in module code, since that would lead to the * caller's code being unloaded before g_object_unref() returns to it. * * Keeping track of whether the module should be loaded or not is done by * using a use count - it starts at zero, and whenever it is greater than * zero, the module is loaded. The use count is maintained internally by * the type system, but also can be explicitly controlled by * g_type_module_use() and g_type_module_unuse(). Typically, when loading * a module for the first type, g_type_module_use() will be used to load * it so that it can initialize its types. At some later point, when the * module no longer needs to be loaded except for the type * implementations it contains, g_type_module_unuse() is called. * * #GTypeModule does not actually provide any implementation of module * loading and unloading. To create a particular module type you must * derive from #GTypeModule and implement the load and unload functions * in #GTypeModuleClass. */ public class TypeModule : ObjectG, TypePluginIF { /** the main Gtk struct */ protected GTypeModule* gTypeModule; /** Get the main Gtk struct */ public GTypeModule* getTypeModuleStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gTypeModule; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gTypeModule; } protected override void setStruct(GObject* obj) { gTypeModule = cast(GTypeModule*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GTypeModule* gTypeModule, bool ownedRef = false) { this.gTypeModule = gTypeModule; super(cast(GObject*)gTypeModule, ownedRef); } // add the TypePlugin capabilities mixin TypePluginT!(GTypeModule); /** */ public static GType getType() { return g_type_module_get_type(); } /** * Registers an additional interface for a type, whose interface lives * in the given type plugin. If the interface was already registered * for the type in this plugin, nothing will be done. * * As long as any instances of the type exist, the type plugin will * not be unloaded. * * Params: * instanceType = type to which to add the interface. * interfaceType = interface type to add * interfaceInfo = type information structure */ public void addInterface(GType instanceType, GType interfaceType, GInterfaceInfo* interfaceInfo) { g_type_module_add_interface(gTypeModule, instanceType, interfaceType, interfaceInfo); } /** * Looks up or registers an enumeration that is implemented with a particular * type plugin. If a type with name @type_name was previously registered, * the #GType identifier for the type is returned, otherwise the type * is newly registered, and the resulting #GType identifier returned. * * As long as any instances of the type exist, the type plugin will * not be unloaded. * * Params: * name = name for the type * constStaticValues = an array of #GEnumValue structs for the * possible enumeration values. The array is * terminated by a struct with all members being * 0. * * Returns: the new or existing type ID * * Since: 2.6 */ public GType registerEnum(string name, GEnumValue* constStaticValues) { return g_type_module_register_enum(gTypeModule, Str.toStringz(name), constStaticValues); } /** * Looks up or registers a flags type that is implemented with a particular * type plugin. If a type with name @type_name was previously registered, * the #GType identifier for the type is returned, otherwise the type * is newly registered, and the resulting #GType identifier returned. * * As long as any instances of the type exist, the type plugin will * not be unloaded. * * Params: * name = name for the type * constStaticValues = an array of #GFlagsValue structs for the * possible flags values. The array is * terminated by a struct with all members being * 0. * * Returns: the new or existing type ID * * Since: 2.6 */ public GType registerFlags(string name, GFlagsValue* constStaticValues) { return g_type_module_register_flags(gTypeModule, Str.toStringz(name), constStaticValues); } /** * Looks up or registers a type that is implemented with a particular * type plugin. If a type with name @type_name was previously registered, * the #GType identifier for the type is returned, otherwise the type * is newly registered, and the resulting #GType identifier returned. * * When reregistering a type (typically because a module is unloaded * then reloaded, and reinitialized), @module and @parent_type must * be the same as they were previously. * * As long as any instances of the type exist, the type plugin will * not be unloaded. * * Params: * parentType = the type for the parent class * typeName = name for the type * typeInfo = type information structure * flags = flags field providing details about the type * * Returns: the new or existing type ID */ public GType registerType(GType parentType, string typeName, GTypeInfo* typeInfo, GTypeFlags flags) { return g_type_module_register_type(gTypeModule, parentType, Str.toStringz(typeName), typeInfo, flags); } /** * Sets the name for a #GTypeModule * * Params: * name = a human-readable name to use in error messages. */ public void setName(string name) { g_type_module_set_name(gTypeModule, Str.toStringz(name)); } /** * Decreases the use count of a #GTypeModule by one. If the * result is zero, the module will be unloaded. (However, the * #GTypeModule will not be freed, and types associated with the * #GTypeModule are not unregistered. Once a #GTypeModule is * initialized, it must exist forever.) */ public void unuse() { g_type_module_unuse(gTypeModule); } /** * Increases the use count of a #GTypeModule by one. If the * use count was zero before, the plugin will be loaded. * If loading the plugin fails, the use count is reset to * its prior value. * * Returns: %FALSE if the plugin needed to be loaded and * loading the plugin failed. */ public bool use() { return g_type_module_use(gTypeModule) != 0; } } GtkD-3.7.5/generated/gtkd/gobject/TypePluginIF.d000066400000000000000000000115001324604450400213460ustar00rootroot00000000000000/* * 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 gobject.TypePluginIF; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * The GObject type system supports dynamic loading of types. * The #GTypePlugin interface is used to handle the lifecycle * of dynamically loaded types. It goes as follows: * * 1. The type is initially introduced (usually upon loading the module * the first time, or by your main application that knows what modules * introduces what types), like this: * |[ * new_type_id = g_type_register_dynamic (parent_type_id, * "TypeName", * new_type_plugin, * type_flags); * ]| * where @new_type_plugin is an implementation of the * #GTypePlugin interface. * * 2. The type's implementation is referenced, e.g. through * g_type_class_ref() or through g_type_create_instance() (this is * being called by g_object_new()) or through one of the above done on * a type derived from @new_type_id. * * 3. This causes the type system to load the type's implementation by * calling g_type_plugin_use() and g_type_plugin_complete_type_info() * on @new_type_plugin. * * 4. At some point the type's implementation isn't required anymore, * e.g. after g_type_class_unref() or g_type_free_instance() (called * when the reference count of an instance drops to zero). * * 5. This causes the type system to throw away the information retrieved * from g_type_plugin_complete_type_info() and then it calls * g_type_plugin_unuse() on @new_type_plugin. * * 6. Things may repeat from the second step. * * So basically, you need to implement a #GTypePlugin type that * carries a use_count, once use_count goes from zero to one, you need * to load the implementation to successfully handle the upcoming * g_type_plugin_complete_type_info() call. Later, maybe after * succeeding use/unuse calls, once use_count drops to zero, you can * unload the implementation again. The type system makes sure to call * g_type_plugin_use() and g_type_plugin_complete_type_info() again * when the type is needed again. * * #GTypeModule is an implementation of #GTypePlugin that already * implements most of this except for the actual module loading and * unloading. It even handles multiple registered types per module. */ public interface TypePluginIF{ /** Get the main Gtk struct */ public GTypePlugin* getTypePluginStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return g_type_plugin_get_type(); } /** * Calls the @complete_interface_info function from the * #GTypePluginClass of @plugin. There should be no need to use this * function outside of the GObject type system itself. * * Params: * instanceType = the #GType of an instantiable type to which the interface * is added * interfaceType = the #GType of the interface whose info is completed * info = the #GInterfaceInfo to fill in */ public void completeInterfaceInfo(GType instanceType, GType interfaceType, GInterfaceInfo* info); /** * Calls the @complete_type_info function from the #GTypePluginClass of @plugin. * There should be no need to use this function outside of the GObject * type system itself. * * Params: * gType = the #GType whose info is completed * info = the #GTypeInfo struct to fill in * valueTable = the #GTypeValueTable to fill in */ public void completeTypeInfo(GType gType, GTypeInfo* info, GTypeValueTable* valueTable); /** * Calls the @unuse_plugin function from the #GTypePluginClass of * @plugin. There should be no need to use this function outside of * the GObject type system itself. */ public void unuse(); /** * Calls the @use_plugin function from the #GTypePluginClass of * @plugin. There should be no need to use this function outside of * the GObject type system itself. */ public void use(); } GtkD-3.7.5/generated/gtkd/gobject/TypePluginT.d000066400000000000000000000120601324604450400212550ustar00rootroot00000000000000/* * 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 gobject.TypePluginT; public import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * The GObject type system supports dynamic loading of types. * The #GTypePlugin interface is used to handle the lifecycle * of dynamically loaded types. It goes as follows: * * 1. The type is initially introduced (usually upon loading the module * the first time, or by your main application that knows what modules * introduces what types), like this: * |[ * new_type_id = g_type_register_dynamic (parent_type_id, * "TypeName", * new_type_plugin, * type_flags); * ]| * where @new_type_plugin is an implementation of the * #GTypePlugin interface. * * 2. The type's implementation is referenced, e.g. through * g_type_class_ref() or through g_type_create_instance() (this is * being called by g_object_new()) or through one of the above done on * a type derived from @new_type_id. * * 3. This causes the type system to load the type's implementation by * calling g_type_plugin_use() and g_type_plugin_complete_type_info() * on @new_type_plugin. * * 4. At some point the type's implementation isn't required anymore, * e.g. after g_type_class_unref() or g_type_free_instance() (called * when the reference count of an instance drops to zero). * * 5. This causes the type system to throw away the information retrieved * from g_type_plugin_complete_type_info() and then it calls * g_type_plugin_unuse() on @new_type_plugin. * * 6. Things may repeat from the second step. * * So basically, you need to implement a #GTypePlugin type that * carries a use_count, once use_count goes from zero to one, you need * to load the implementation to successfully handle the upcoming * g_type_plugin_complete_type_info() call. Later, maybe after * succeeding use/unuse calls, once use_count drops to zero, you can * unload the implementation again. The type system makes sure to call * g_type_plugin_use() and g_type_plugin_complete_type_info() again * when the type is needed again. * * #GTypeModule is an implementation of #GTypePlugin that already * implements most of this except for the actual module loading and * unloading. It even handles multiple registered types per module. */ public template TypePluginT(TStruct) { /** Get the main Gtk struct */ public GTypePlugin* getTypePluginStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GTypePlugin*)getStruct(); } /** * Calls the @complete_interface_info function from the * #GTypePluginClass of @plugin. There should be no need to use this * function outside of the GObject type system itself. * * Params: * instanceType = the #GType of an instantiable type to which the interface * is added * interfaceType = the #GType of the interface whose info is completed * info = the #GInterfaceInfo to fill in */ public void completeInterfaceInfo(GType instanceType, GType interfaceType, GInterfaceInfo* info) { g_type_plugin_complete_interface_info(getTypePluginStruct(), instanceType, interfaceType, info); } /** * Calls the @complete_type_info function from the #GTypePluginClass of @plugin. * There should be no need to use this function outside of the GObject * type system itself. * * Params: * gType = the #GType whose info is completed * info = the #GTypeInfo struct to fill in * valueTable = the #GTypeValueTable to fill in */ public void completeTypeInfo(GType gType, GTypeInfo* info, GTypeValueTable* valueTable) { g_type_plugin_complete_type_info(getTypePluginStruct(), gType, info, valueTable); } /** * Calls the @unuse_plugin function from the #GTypePluginClass of * @plugin. There should be no need to use this function outside of * the GObject type system itself. */ public void unuse() { g_type_plugin_unuse(getTypePluginStruct()); } /** * Calls the @use_plugin function from the #GTypePluginClass of * @plugin. There should be no need to use this function outside of * the GObject type system itself. */ public void use() { g_type_plugin_use(getTypePluginStruct()); } } GtkD-3.7.5/generated/gtkd/gobject/TypeValueTable.d000066400000000000000000000033731324604450400217260ustar00rootroot00000000000000/* * 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 gobject.TypeValueTable; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * The #GTypeValueTable provides the functions required by the #GValue * implementation, to serve as a container for values of a type. */ public struct TypeValueTable { /** * Returns the location of the #GTypeValueTable associated with @type. * * Note that this function should only be used from source code * that implements or has internal knowledge of the implementation of * @type. * * Params: * type = a #GType * * Returns: location of the #GTypeValueTable associated with @type or * %NULL if there is no #GTypeValueTable associated with @type */ public static GTypeValueTable* peek(GType type) { return g_type_value_table_peek(type); } } GtkD-3.7.5/generated/gtkd/gobject/Value.d000066400000000000000000001343701324604450400201160ustar00rootroot00000000000000/* * 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 gobject.Value; private import glib.Str; private import glib.Variant; private import glib.VariantType; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.TypeInstance; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; private import std.traits; /** * An opaque structure used to hold different types of values. * The data within the structure has protected scope: it is accessible only * to functions within a #GTypeValueTable structure, or implementations of * the g_value_*() API. That is, code portions which implement new fundamental * types. * #GValue users cannot make any assumptions about how data is stored * within the 2 element @data union, and the @g_type member should * only be accessed through the G_VALUE_TYPE() macro. */ public class Value { /** the main Gtk struct */ protected GValue* gValue; protected bool ownedRef; /** Get the main Gtk struct */ public GValue* getValueStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gValue; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gValue; } /** * Sets our main struct and passes it to the parent class. */ public this (GValue* gValue, bool ownedRef = false) { this.gValue = gValue; this.ownedRef = ownedRef; } /** */ public this() { this(new GValue); } /** */ this(GOBJECT)(GOBJECT obj) if ( is(GOBJECT : ObjectG) ) { this(); init(GOBJECT.getType()); setObject(obj); } /** */ this(string value) { this(); init(GType.STRING); setString(value); } /** */ this(BOOL)(BOOL value) if( isBoolean!BOOL ) { this(); init(GType.BOOLEAN); setBoolean(value); } /** */ this(INT)(INT value) if ( isIntegral!INT ) { this(); static if ( is(OriginalType!INT == int) ) { init(GType.INT); setInt(value); } else static if ( is(OriginalType!INT == uint) ) { init(GType.UINT); setUint(value); } else static if ( is(OriginalType!INT == long) ) { init(GType.INT64); setInt64(value); } else static if ( is(OriginalType!INT == ulong) ) { init(GType.UINT64); setUint64(value); } else { init(GType.INT); setInt(value); } } /** */ this(FLOAT)(FLOAT value) if ( isFloatingPoint!FLOAT ) { this(); static if ( is( FLOAT == float ) ) { init(GType.FLOAT); setFloat(value); } else { init(GType.DOUBLE); setDouble(value); } } /** */ /** */ public static GType getType() { return g_value_get_type(); } /** * Copies the value of @src_value into @dest_value. * * Params: * destValue = An initialized #GValue structure of the same type as @src_value. */ public void copy(Value destValue) { g_value_copy(gValue, (destValue is null) ? null : destValue.getValueStruct()); } /** * Get the contents of a %G_TYPE_BOXED derived #GValue. Upon getting, * the boxed value is duplicated and needs to be later freed with * g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value), * return_value); * * Returns: boxed contents of @value */ public void* dupBoxed() { return g_value_dup_boxed(gValue); } /** * Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing * its reference count. If the contents of the #GValue are %NULL, then * %NULL will be returned. * * Returns: object content of @value, * should be unreferenced when no longer needed. */ public ObjectG dupObject() { auto p = g_value_dup_object(gValue); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); } /** * Get the contents of a %G_TYPE_PARAM #GValue, increasing its * reference count. * * Returns: #GParamSpec content of @value, should be unreferenced when * no longer needed. */ public ParamSpec dupParam() { auto p = g_value_dup_param(gValue); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Get a copy the contents of a %G_TYPE_STRING #GValue. * * Returns: a newly allocated copy of the string content of @value */ public string dupString() { auto retStr = g_value_dup_string(gValue); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Get the contents of a variant #GValue, increasing its refcount. * * Returns: variant contents of @value, should be unrefed using * g_variant_unref() when no longer needed * * Since: 2.26 */ public Variant dupVariant() { auto p = g_value_dup_variant(gValue); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Determines if @value will fit inside the size of a pointer value. * This is an internal function introduced mainly for C marshallers. * * Returns: %TRUE if @value will fit inside a pointer value. */ public bool fitsPointer() { return g_value_fits_pointer(gValue) != 0; } /** * Get the contents of a %G_TYPE_BOOLEAN #GValue. * * Returns: boolean contents of @value */ public bool getBoolean() { return g_value_get_boolean(gValue) != 0; } /** * Get the contents of a %G_TYPE_BOXED derived #GValue. * * Returns: boxed contents of @value */ public void* getBoxed() { return g_value_get_boxed(gValue); } /** * Do not use this function; it is broken on platforms where the %char * type is unsigned, such as ARM and PowerPC. See g_value_get_schar(). * * Get the contents of a %G_TYPE_CHAR #GValue. * * Deprecated: This function's return type is broken, see g_value_get_schar() * * Returns: character contents of @value */ public char getChar() { return g_value_get_char(gValue); } /** * Get the contents of a %G_TYPE_DOUBLE #GValue. * * Returns: double contents of @value */ public double getDouble() { return g_value_get_double(gValue); } /** * Get the contents of a %G_TYPE_ENUM #GValue. * * Returns: enum contents of @value */ public int getEnum() { return g_value_get_enum(gValue); } /** * Get the contents of a %G_TYPE_FLAGS #GValue. * * Returns: flags contents of @value */ public uint getFlags() { return g_value_get_flags(gValue); } /** * Get the contents of a %G_TYPE_FLOAT #GValue. * * Returns: float contents of @value */ public float getFloat() { return g_value_get_float(gValue); } /** * Get the contents of a %G_TYPE_GTYPE #GValue. * * Returns: the #GType stored in @value * * Since: 2.12 */ public GType getGtype() { return g_value_get_gtype(gValue); } /** * Get the contents of a %G_TYPE_INT #GValue. * * Returns: integer contents of @value */ public int getInt() { return g_value_get_int(gValue); } /** * Get the contents of a %G_TYPE_INT64 #GValue. * * Returns: 64bit integer contents of @value */ public long getInt64() { return g_value_get_int64(gValue); } /** * Get the contents of a %G_TYPE_LONG #GValue. * * Returns: long integer contents of @value */ public glong getLong() { return g_value_get_long(gValue); } /** * Get the contents of a %G_TYPE_OBJECT derived #GValue. * * Returns: object contents of @value */ public ObjectG getObject() { auto p = g_value_get_object(gValue); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); } /** * Get the contents of a %G_TYPE_PARAM #GValue. * * Returns: #GParamSpec content of @value */ public ParamSpec getParam() { auto p = g_value_get_param(gValue); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Get the contents of a pointer #GValue. * * Returns: pointer contents of @value */ public void* getPointer() { return g_value_get_pointer(gValue); } /** * Get the contents of a %G_TYPE_CHAR #GValue. * * Returns: signed 8 bit integer contents of @value * * Since: 2.32 */ public byte getSchar() { return g_value_get_schar(gValue); } /** * Get the contents of a %G_TYPE_STRING #GValue. * * Returns: string content of @value */ public string getString() { return Str.toString(g_value_get_string(gValue)); } /** * Get the contents of a %G_TYPE_UCHAR #GValue. * * Returns: unsigned character contents of @value */ public char getUchar() { return g_value_get_uchar(gValue); } /** * Get the contents of a %G_TYPE_UINT #GValue. * * Returns: unsigned integer contents of @value */ public uint getUint() { return g_value_get_uint(gValue); } /** * Get the contents of a %G_TYPE_UINT64 #GValue. * * Returns: unsigned 64bit integer contents of @value */ public ulong getUint64() { return g_value_get_uint64(gValue); } /** * Get the contents of a %G_TYPE_ULONG #GValue. * * Returns: unsigned long integer contents of @value */ public gulong getUlong() { return g_value_get_ulong(gValue); } /** * Get the contents of a variant #GValue. * * Returns: variant contents of @value * * Since: 2.26 */ public Variant getVariant() { auto p = g_value_get_variant(gValue); if(p is null) { return null; } return new Variant(cast(GVariant*) p, true); } /** * Initializes @value with the default value of @type. * * Params: * gType = Type the #GValue should hold values of. * * Returns: the #GValue structure that has been passed in */ public Value init(GType gType) { auto p = g_value_init(gValue, gType); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Initializes and sets @value from an instantiatable type via the * value_table's collect_value() function. * * Note: The @value will be initialised with the exact type of * @instance. If you wish to set the @value's type to a different GType * (such as a parent class GType), you need to manually call * g_value_init() and g_value_set_instance(). * * Params: * instanc = the instance * * Since: 2.42 */ public void initFromInstance(TypeInstance instanc) { g_value_init_from_instance(gValue, (instanc is null) ? null : instanc.getTypeInstanceStruct()); } /** * Returns the value contents as pointer. This function asserts that * g_value_fits_pointer() returned %TRUE for the passed in value. * This is an internal function introduced mainly for C marshallers. * * Returns: the value contents as pointer */ public void* peekPointer() { return g_value_peek_pointer(gValue); } /** * Clears the current value in @value and resets it to the default value * (as if the value had just been initialized). * * Returns: the #GValue structure that has been passed in */ public Value reset() { auto p = g_value_reset(gValue); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p, true); } /** * Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean. * * Params: * vBoolean = boolean value to be set */ public void setBoolean(bool vBoolean) { g_value_set_boolean(gValue, vBoolean); } /** * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed. * * Params: * vBoxed = boxed value to be set */ public void setBoxed(void* vBoxed) { g_value_set_boxed(gValue, vBoxed); } /** * This is an internal function introduced mainly for C marshallers. * * Deprecated: Use g_value_take_boxed() instead. * * Params: * vBoxed = duplicated unowned boxed value to be set */ public void setBoxedTakeOwnership(void* vBoxed) { g_value_set_boxed_take_ownership(gValue, vBoxed); } /** * Set the contents of a %G_TYPE_CHAR #GValue to @v_char. * * Deprecated: This function's input type is broken, see g_value_set_schar() * * Params: * vChar = character value to be set */ public void setChar(char vChar) { g_value_set_char(gValue, vChar); } /** * Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double. * * Params: * vDouble = double value to be set */ public void setDouble(double vDouble) { g_value_set_double(gValue, vDouble); } /** * Set the contents of a %G_TYPE_ENUM #GValue to @v_enum. * * Params: * vEnum = enum value to be set */ public void setEnum(int vEnum) { g_value_set_enum(gValue, vEnum); } /** * Set the contents of a %G_TYPE_FLAGS #GValue to @v_flags. * * Params: * vFlags = flags value to be set */ public void setFlags(uint vFlags) { g_value_set_flags(gValue, vFlags); } /** * Set the contents of a %G_TYPE_FLOAT #GValue to @v_float. * * Params: * vFloat = float value to be set */ public void setFloat(float vFloat) { g_value_set_float(gValue, vFloat); } /** * Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype. * * Params: * vGtype = #GType to be set * * Since: 2.12 */ public void setGtype(GType vGtype) { g_value_set_gtype(gValue, vGtype); } /** * Sets @value from an instantiatable type via the * value_table's collect_value() function. * * Params: * instanc = the instance */ public void setInstance(void* instanc) { g_value_set_instance(gValue, instanc); } /** * Set the contents of a %G_TYPE_INT #GValue to @v_int. * * Params: * vInt = integer value to be set */ public void setInt(int vInt) { g_value_set_int(gValue, vInt); } /** * Set the contents of a %G_TYPE_INT64 #GValue to @v_int64. * * Params: * vInt64 = 64bit integer value to be set */ public void setInt64(long vInt64) { g_value_set_int64(gValue, vInt64); } /** * Set the contents of a %G_TYPE_LONG #GValue to @v_long. * * Params: * vLong = long integer value to be set */ public void setLong(glong vLong) { g_value_set_long(gValue, vLong); } /** * Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object. * * g_value_set_object() increases the reference count of @v_object * (the #GValue holds a reference to @v_object). If you do not wish * to increase the reference count of the object (i.e. you wish to * pass your current reference to the #GValue because you no longer * need it), use g_value_take_object() instead. * * It is important that your #GValue holds a reference to @v_object (either its * own, or one it has taken) to ensure that the object won't be destroyed while * the #GValue still exists). * * Params: * vObject = object value to be set */ public void setObject(ObjectG vObject) { g_value_set_object(gValue, (vObject is null) ? null : vObject.getObjectGStruct()); } /** * This is an internal function introduced mainly for C marshallers. * * Deprecated: Use g_value_take_object() instead. * * Params: * vObject = object value to be set */ public void setObjectTakeOwnership(void* vObject) { g_value_set_object_take_ownership(gValue, vObject); } /** * Set the contents of a %G_TYPE_PARAM #GValue to @param. * * Params: * param = the #GParamSpec to be set */ public void setParam(ParamSpec param) { g_value_set_param(gValue, (param is null) ? null : param.getParamSpecStruct()); } /** * This is an internal function introduced mainly for C marshallers. * * Deprecated: Use g_value_take_param() instead. * * Params: * param = the #GParamSpec to be set */ public void setParamTakeOwnership(ParamSpec param) { g_value_set_param_take_ownership(gValue, (param is null) ? null : param.getParamSpecStruct()); } /** * Set the contents of a pointer #GValue to @v_pointer. * * Params: * vPointer = pointer value to be set */ public void setPointer(void* vPointer) { g_value_set_pointer(gValue, vPointer); } /** * Set the contents of a %G_TYPE_CHAR #GValue to @v_char. * * Params: * vChar = signed 8 bit integer to be set * * Since: 2.32 */ public void setSchar(byte vChar) { g_value_set_schar(gValue, vChar); } /** * Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed. * The boxed value is assumed to be static, and is thus not duplicated * when setting the #GValue. * * Params: * vBoxed = static boxed value to be set */ public void setStaticBoxed(void* vBoxed) { g_value_set_static_boxed(gValue, vBoxed); } /** * Set the contents of a %G_TYPE_STRING #GValue to @v_string. * The string is assumed to be static, and is thus not duplicated * when setting the #GValue. * * Params: * vString = static string to be set */ public void setStaticString(string vString) { g_value_set_static_string(gValue, Str.toStringz(vString)); } /** * Set the contents of a %G_TYPE_STRING #GValue to @v_string. * * Params: * vString = caller-owned string to be duplicated for the #GValue */ public void setString(string vString) { g_value_set_string(gValue, Str.toStringz(vString)); } /** * This is an internal function introduced mainly for C marshallers. * * Deprecated: Use g_value_take_string() instead. * * Params: * vString = duplicated unowned string to be set */ public void setStringTakeOwnership(string vString) { g_value_set_string_take_ownership(gValue, Str.toStringz(vString)); } /** * Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar. * * Params: * vUchar = unsigned character value to be set */ public void setUchar(char vUchar) { g_value_set_uchar(gValue, vUchar); } /** * Set the contents of a %G_TYPE_UINT #GValue to @v_uint. * * Params: * vUint = unsigned integer value to be set */ public void setUint(uint vUint) { g_value_set_uint(gValue, vUint); } /** * Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64. * * Params: * vUint64 = unsigned 64bit integer value to be set */ public void setUint64(ulong vUint64) { g_value_set_uint64(gValue, vUint64); } /** * Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong. * * Params: * vUlong = unsigned long integer value to be set */ public void setUlong(gulong vUlong) { g_value_set_ulong(gValue, vUlong); } /** * Set the contents of a variant #GValue to @variant. * If the variant is floating, it is consumed. * * Params: * variant = a #GVariant, or %NULL * * Since: 2.26 */ public void setVariant(Variant variant) { g_value_set_variant(gValue, (variant is null) ? null : variant.getVariantStruct()); } /** * Sets the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed * and takes over the ownership of the callers reference to @v_boxed; * the caller doesn't have to unref it any more. * * Params: * vBoxed = duplicated unowned boxed value to be set * * Since: 2.4 */ public void takeBoxed(void* vBoxed) { g_value_take_boxed(gValue, vBoxed); } /** * Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object * and takes over the ownership of the callers reference to @v_object; * the caller doesn't have to unref it any more (i.e. the reference * count of the object is not increased). * * If you want the #GValue to hold its own reference to @v_object, use * g_value_set_object() instead. * * Params: * vObject = object value to be set * * Since: 2.4 */ public void takeObject(void* vObject) { g_value_take_object(gValue, vObject); } /** * Sets the contents of a %G_TYPE_PARAM #GValue to @param and takes * over the ownership of the callers reference to @param; the caller * doesn't have to unref it any more. * * Params: * param = the #GParamSpec to be set * * Since: 2.4 */ public void takeParam(ParamSpec param) { g_value_take_param(gValue, (param is null) ? null : param.getParamSpecStruct()); } /** * Sets the contents of a %G_TYPE_STRING #GValue to @v_string. * * Params: * vString = string to take ownership of * * Since: 2.4 */ public void takeString(string vString) { g_value_take_string(gValue, Str.toStringz(vString)); } /** * Set the contents of a variant #GValue to @variant, and takes over * the ownership of the caller's reference to @variant; * the caller doesn't have to unref it any more (i.e. the reference * count of the variant is not increased). * * If @variant was floating then its floating reference is converted to * a hard reference. * * If you want the #GValue to hold its own reference to @variant, use * g_value_set_variant() instead. * * This is an internal function introduced mainly for C marshallers. * * Params: * variant = a #GVariant, or %NULL * * Since: 2.26 */ public void takeVariant(Variant variant) { g_value_take_variant(gValue, (variant is null) ? null : variant.getVariantStruct(true)); } /** * Tries to cast the contents of @src_value into a type appropriate * to store in @dest_value, e.g. to transform a %G_TYPE_INT value * into a %G_TYPE_FLOAT value. Performing transformations between * value types might incur precision lossage. Especially * transformations into strings might reveal seemingly arbitrary * results and shouldn't be relied upon for production code (such * as rcfile value or object property serialization). * * Params: * destValue = Target value. * * Returns: Whether a transformation rule was found and could be applied. * Upon failing transformations, @dest_value is left untouched. */ public bool transform(Value destValue) { return g_value_transform(gValue, (destValue is null) ? null : destValue.getValueStruct()) != 0; } /** * Clears the current value in @value (if any) and "unsets" the type, * this releases all resources associated with this GValue. An unset * value is the same as an uninitialized (zero-filled) #GValue * structure. */ public void unset() { g_value_unset(gValue); } /** * Registers a value transformation function for use in g_value_transform(). * A previously registered transformation function for @src_type and @dest_type * will be replaced. * * Params: * srcType = Source type. * destType = Target type. * transformFunc = a function which transforms values of type @src_type * into value of type @dest_type */ public static void registerTransformFunc(GType srcType, GType destType, GValueTransform transformFunc) { g_value_register_transform_func(srcType, destType, transformFunc); } /** * Returns whether a #GValue of type @src_type can be copied into * a #GValue of type @dest_type. * * Params: * srcType = source type to be copied. * destType = destination type for copying. * * Returns: %TRUE if g_value_copy() is possible with @src_type and @dest_type. */ public static bool typeCompatible(GType srcType, GType destType) { return g_value_type_compatible(srcType, destType) != 0; } /** * Check whether g_value_transform() is able to transform values * of type @src_type into values of type @dest_type. Note that for * the types to be transformable, they must be compatible or a * transformation function must be registered. * * Params: * srcType = Source type. * destType = Target type. * * Returns: %TRUE if the transformation is possible, %FALSE otherwise. */ public static bool typeTransformable(GType srcType, GType destType) { return g_value_type_transformable(srcType, destType) != 0; } /** * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN * property. In many cases, it may be more appropriate to use an enum with * g_param_spec_enum(), both to improve code clarity by using explicitly named * values, and to allow for more values to be added in future without breaking * API. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecBoolean(string name, string nick, string blurb, bool defaultValue, GParamFlags flags) { auto p = g_param_spec_boolean(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED * derived property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * boxedType = %G_TYPE_BOXED derived type of this property * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecBoxed(string name, string nick, string blurb, GType boxedType, GParamFlags flags) { auto p = g_param_spec_boxed(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), boxedType, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecChar(string name, string nick, string blurb, byte minimum, byte maximum, byte defaultValue, GParamFlags flags) { auto p = g_param_spec_char(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE * property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecDouble(string name, string nick, string blurb, double minimum, double maximum, double defaultValue, GParamFlags flags) { auto p = g_param_spec_double(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecEnum instance specifying a %G_TYPE_ENUM * property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * enumType = a #GType derived from %G_TYPE_ENUM * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecEnum(string name, string nick, string blurb, GType enumType, int defaultValue, GParamFlags flags) { auto p = g_param_spec_enum(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), enumType, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecFlags instance specifying a %G_TYPE_FLAGS * property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * flagsType = a #GType derived from %G_TYPE_FLAGS * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecFlags(string name, string nick, string blurb, GType flagsType, uint defaultValue, GParamFlags flags) { auto p = g_param_spec_flags(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), flagsType, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecFloat(string name, string nick, string blurb, float minimum, float maximum, float defaultValue, GParamFlags flags) { auto p = g_param_spec_float(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecGType instance specifying a * %G_TYPE_GTYPE property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * isAType = a #GType whose subtypes are allowed as values * of the property (use %G_TYPE_NONE for any type) * flags = flags for the property specified * * Returns: a newly created parameter specification * * Since: 2.10 */ public static ParamSpec paramSpecGtype(string name, string nick, string blurb, GType isAType, GParamFlags flags) { auto p = g_param_spec_gtype(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), isAType, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecInt(string name, string nick, string blurb, int minimum, int maximum, int defaultValue, GParamFlags flags) { auto p = g_param_spec_int(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecInt64(string name, string nick, string blurb, long minimum, long maximum, long defaultValue, GParamFlags flags) { auto p = g_param_spec_int64(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecLong(string name, string nick, string blurb, glong minimum, glong maximum, glong defaultValue, GParamFlags flags) { auto p = g_param_spec_long(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT * derived property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * objectType = %G_TYPE_OBJECT derived type of this property * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecObject(string name, string nick, string blurb, GType objectType, GParamFlags flags) { auto p = g_param_spec_object(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), objectType, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new property of type #GParamSpecOverride. This is used * to direct operations to another paramspec, and will not be directly * useful unless you are implementing a new base type similar to GObject. * * Params: * name = the name of the property. * overridden = The property that is being overridden * * Returns: the newly created #GParamSpec * * Since: 2.4 */ public static ParamSpec paramSpecOverride(string name, ParamSpec overridden) { auto p = g_param_spec_override(Str.toStringz(name), (overridden is null) ? null : overridden.getParamSpecStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Creates a new #GParamSpecParam instance specifying a %G_TYPE_PARAM * property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * paramType = a #GType derived from %G_TYPE_PARAM * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecParam(string name, string nick, string blurb, GType paramType, GParamFlags flags) { auto p = g_param_spec_param(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), paramType, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecPointer instance specifying a pointer property. * Where possible, it is better to use g_param_spec_object() or * g_param_spec_boxed() to expose memory management information. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecPointer(string name, string nick, string blurb, GParamFlags flags) { auto p = g_param_spec_pointer(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecString instance. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecString(string name, string nick, string blurb, string defaultValue, GParamFlags flags) { auto p = g_param_spec_string(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), Str.toStringz(defaultValue), flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecUchar(string name, string nick, string blurb, ubyte minimum, ubyte maximum, ubyte defaultValue, GParamFlags flags) { auto p = g_param_spec_uchar(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecUint(string name, string nick, string blurb, uint minimum, uint maximum, uint defaultValue, GParamFlags flags) { auto p = g_param_spec_uint(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64 * property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecUint64(string name, string nick, string blurb, ulong minimum, ulong maximum, ulong defaultValue, GParamFlags flags) { auto p = g_param_spec_uint64(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG * property. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * minimum = minimum value for the property specified * maximum = maximum value for the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecUlong(string name, string nick, string blurb, gulong minimum, gulong maximum, gulong defaultValue, GParamFlags flags) { auto p = g_param_spec_ulong(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), minimum, maximum, defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT * property. #GValue structures for this property can be accessed with * g_value_set_uint() and g_value_get_uint(). * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * defaultValue = default value for the property specified * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecUnichar(string name, string nick, string blurb, dchar defaultValue, GParamFlags flags) { auto p = g_param_spec_unichar(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), defaultValue, flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Creates a new #GParamSpecValueArray instance specifying a * %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a * %G_TYPE_BOXED type, as such, #GValue structures for this property * can be accessed with g_value_set_boxed() and g_value_get_boxed(). * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * elementSpec = a #GParamSpec describing the elements contained in * arrays of this property, may be %NULL * flags = flags for the property specified * * Returns: a newly created parameter specification */ public static ParamSpec paramSpecValueArray(string name, string nick, string blurb, ParamSpec elementSpec, GParamFlags flags) { auto p = g_param_spec_value_array(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), (elementSpec is null) ? null : elementSpec.getParamSpecStruct(), flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p); } /** * Creates a new #GParamSpecVariant instance specifying a #GVariant * property. * * If @default_value is floating, it is consumed. * * See g_param_spec_internal() for details on property names. * * Params: * name = canonical name of the property specified * nick = nick name for the property specified * blurb = description of the property specified * type = a #GVariantType * defaultValue = a #GVariant of type @type to * use as the default value, or %NULL * flags = flags for the property specified * * Returns: the newly created #GParamSpec * * Since: 2.26 */ public static ParamSpec paramSpecVariant(string name, string nick, string blurb, VariantType type, Variant defaultValue, GParamFlags flags) { auto p = g_param_spec_variant(Str.toStringz(name), Str.toStringz(nick), Str.toStringz(blurb), (type is null) ? null : type.getVariantTypeStruct(), (defaultValue is null) ? null : defaultValue.getVariantStruct(true), flags); if(p is null) { return null; } return ObjectG.getDObject!(ParamSpec)(cast(GParamSpec*) p, true); } /** * Return a newly allocated string, which describes the contents of a * #GValue. The main purpose of this function is to describe #GValue * contents for debugging output, the way in which the contents are * described may change between different GLib versions. * * Params: * value = #GValue which contents are to be described. * * Returns: Newly allocated string. */ public static string strdupValueContents(Value value) { auto retStr = g_strdup_value_contents((value is null) ? null : value.getValueStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } } GtkD-3.7.5/generated/gtkd/gobject/ValueArray.d000066400000000000000000000166011324604450400211110ustar00rootroot00000000000000/* * 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 gobject.ValueArray; private import glib.ConstructionException; private import gobject.ObjectG; private import gobject.Value; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; private import gtkd.Loader; /** * A #GValueArray contains an array of #GValue elements. */ public class ValueArray { /** the main Gtk struct */ protected GValueArray* gValueArray; protected bool ownedRef; /** Get the main Gtk struct */ public GValueArray* getValueArrayStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gValueArray; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gValueArray; } /** * Sets our main struct and passes it to the parent class. */ public this (GValueArray* gValueArray, bool ownedRef = false) { this.gValueArray = gValueArray; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GOBJECT) && ownedRef ) g_value_array_free(gValueArray); } /** */ public static GType getType() { return g_value_array_get_type(); } /** * Allocate and initialize a new #GValueArray, optionally preserve space * for @n_prealloced elements. New arrays always contain 0 elements, * regardless of the value of @n_prealloced. * * Deprecated: Use #GArray and g_array_sized_new() instead. * * Params: * nPrealloced = number of values to preallocate space for * * Returns: a newly allocated #GValueArray with 0 values * * Throws: ConstructionException GTK+ fails to create the object. */ public this(uint nPrealloced) { auto p = g_value_array_new(nPrealloced); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GValueArray*) p); } /** * Insert a copy of @value as last element of @value_array. If @value is * %NULL, an uninitialized value is appended. * * Deprecated: Use #GArray and g_array_append_val() instead. * * Params: * value = #GValue to copy into #GValueArray, or %NULL * * Returns: the #GValueArray passed in as @value_array */ public ValueArray append(Value value) { auto p = g_value_array_append(gValueArray, (value is null) ? null : value.getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ValueArray)(cast(GValueArray*) p); } /** * Construct an exact copy of a #GValueArray by duplicating all its * contents. * * Deprecated: Use #GArray and g_array_ref() instead. * * Returns: Newly allocated copy of #GValueArray */ public ValueArray copy() { auto p = g_value_array_copy(gValueArray); if(p is null) { return null; } return ObjectG.getDObject!(ValueArray)(cast(GValueArray*) p, true); } /** * Free a #GValueArray including its contents. * * Deprecated: Use #GArray and g_array_unref() instead. */ public void free() { g_value_array_free(gValueArray); ownedRef = false; } /** * Return a pointer to the value at @index_ containd in @value_array. * * Deprecated: Use g_array_index() instead. * * Params: * index = index of the value of interest * * Returns: pointer to a value at @index_ in @value_array */ public Value getNth(uint index) { auto p = g_value_array_get_nth(gValueArray, index); if(p is null) { return null; } return ObjectG.getDObject!(Value)(cast(GValue*) p); } /** * Insert a copy of @value at specified position into @value_array. If @value * is %NULL, an uninitialized value is inserted. * * Deprecated: Use #GArray and g_array_insert_val() instead. * * Params: * index = insertion position, must be <= value_array->;n_values * value = #GValue to copy into #GValueArray, or %NULL * * Returns: the #GValueArray passed in as @value_array */ public ValueArray insert(uint index, Value value) { auto p = g_value_array_insert(gValueArray, index, (value is null) ? null : value.getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ValueArray)(cast(GValueArray*) p); } /** * Insert a copy of @value as first element of @value_array. If @value is * %NULL, an uninitialized value is prepended. * * Deprecated: Use #GArray and g_array_prepend_val() instead. * * Params: * value = #GValue to copy into #GValueArray, or %NULL * * Returns: the #GValueArray passed in as @value_array */ public ValueArray prepend(Value value) { auto p = g_value_array_prepend(gValueArray, (value is null) ? null : value.getValueStruct()); if(p is null) { return null; } return ObjectG.getDObject!(ValueArray)(cast(GValueArray*) p); } /** * Remove the value at position @index_ from @value_array. * * Deprecated: Use #GArray and g_array_remove_index() instead. * * Params: * index = position of value to remove, which must be less than * @value_array->n_values * * Returns: the #GValueArray passed in as @value_array */ public ValueArray remove(uint index) { auto p = g_value_array_remove(gValueArray, index); if(p is null) { return null; } return ObjectG.getDObject!(ValueArray)(cast(GValueArray*) p); } /** * Sort @value_array using @compare_func to compare the elements according to * the semantics of #GCompareFunc. * * The current implementation uses the same sorting algorithm as standard * C qsort() function. * * Deprecated: Use #GArray and g_array_sort(). * * Params: * compareFunc = function to compare elements * * Returns: the #GValueArray passed in as @value_array */ public ValueArray sort(GCompareFunc compareFunc) { auto p = g_value_array_sort(gValueArray, compareFunc); if(p is null) { return null; } return ObjectG.getDObject!(ValueArray)(cast(GValueArray*) p); } /** * Sort @value_array using @compare_func to compare the elements according * to the semantics of #GCompareDataFunc. * * The current implementation uses the same sorting algorithm as standard * C qsort() function. * * Deprecated: Use #GArray and g_array_sort_with_data(). * * Params: * compareFunc = function to compare elements * userData = extra data argument provided for @compare_func * * Returns: the #GValueArray passed in as @value_array */ public ValueArray sortWithData(GCompareDataFunc compareFunc, void* userData) { auto p = g_value_array_sort_with_data(gValueArray, compareFunc, userData); if(p is null) { return null; } return ObjectG.getDObject!(ValueArray)(cast(GValueArray*) p); } } GtkD-3.7.5/generated/gtkd/gobject/WeakRef.d000066400000000000000000000115021324604450400203550ustar00rootroot00000000000000/* * 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 gobject.WeakRef; private import gobject.ObjectG; private import gobject.c.functions; public import gobject.c.types; public import gtkc.gobjecttypes; /** * A structure containing a weak reference to a #GObject. It can either * be empty (i.e. point to %NULL), or point to an object for as long as * at least one "strong" reference to that object exists. Before the * object's #GObjectClass.dispose method is called, every #GWeakRef * associated with becomes empty (i.e. points to %NULL). * * Like #GValue, #GWeakRef can be statically allocated, stack- or * heap-allocated, or embedded in larger structures. * * Unlike g_object_weak_ref() and g_object_add_weak_pointer(), this weak * reference is thread-safe: converting a weak pointer to a reference is * atomic with respect to invalidation of weak pointers to destroyed * objects. * * If the object's #GObjectClass.dispose method results in additional * references to the object being held, any #GWeakRefs taken * before it was disposed will continue to point to %NULL. If * #GWeakRefs are taken after the object is disposed and * re-referenced, they will continue to point to it until its refcount * goes back to zero, at which point they too will be invalidated. */ public class WeakRef { /** the main Gtk struct */ protected GWeakRef* gWeakRef; protected bool ownedRef; /** Get the main Gtk struct */ public GWeakRef* getWeakRefStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gWeakRef; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gWeakRef; } /** * Sets our main struct and passes it to the parent class. */ public this (GWeakRef* gWeakRef, bool ownedRef = false) { this.gWeakRef = gWeakRef; this.ownedRef = ownedRef; } /** */ this(void* object) { g_weak_ref_init(gWeakRef, object); } /** */ /** * Frees resources associated with a non-statically-allocated #GWeakRef. * After this call, the #GWeakRef is left in an undefined state. * * You should only call this on a #GWeakRef that previously had * g_weak_ref_init() called on it. * * Since: 2.32 */ public void clear() { g_weak_ref_clear(gWeakRef); } /** * If @weak_ref is not empty, atomically acquire a strong * reference to the object it points to, and return that reference. * * This function is needed because of the potential race between taking * the pointer value and g_object_ref() on it, if the object was losing * its last reference at the same time in a different thread. * * The caller should release the resulting reference in the usual way, * by using g_object_unref(). * * Returns: the object pointed to * by @weak_ref, or %NULL if it was empty * * Since: 2.32 */ public ObjectG get() { auto p = g_weak_ref_get(gWeakRef); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); } /** * Initialise a non-statically-allocated #GWeakRef. * * This function also calls g_weak_ref_set() with @object on the * freshly-initialised weak reference. * * This function should always be matched with a call to * g_weak_ref_clear(). It is not necessary to use this function for a * #GWeakRef in static storage because it will already be * properly initialised. Just use g_weak_ref_set() directly. * * Params: * object = a #GObject or %NULL * * Since: 2.32 */ public void init(ObjectG object) { g_weak_ref_init(gWeakRef, (object is null) ? null : object.getObjectGStruct()); } /** * Change the object to which @weak_ref points, or set it to * %NULL. * * You must own a strong reference on @object while calling this * function. * * Params: * object = a #GObject or %NULL * * Since: 2.32 */ public void set(ObjectG object) { g_weak_ref_set(gWeakRef, (object is null) ? null : object.getObjectGStruct()); } } GtkD-3.7.5/generated/gtkd/gobject/c/000077500000000000000000000000001324604450400171075ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gobject/c/functions.d000066400000000000000000002771621324604450400213030ustar00rootroot00000000000000/* * 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 gobject.c.functions; import std.stdio; import gobject.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GOBJECT = ["libgobject-2.0-0.dll"]; else version (OSX) static immutable LIBRARY_GOBJECT = ["libgobject-2.0.0.dylib"]; else static immutable LIBRARY_GOBJECT = ["libgobject-2.0.so.0"]; shared static this() { // gobject.Binding Linker.link(g_binding_get_type, "g_binding_get_type", LIBRARY_GOBJECT); Linker.link(g_binding_get_flags, "g_binding_get_flags", LIBRARY_GOBJECT); Linker.link(g_binding_get_source, "g_binding_get_source", LIBRARY_GOBJECT); Linker.link(g_binding_get_source_property, "g_binding_get_source_property", LIBRARY_GOBJECT); Linker.link(g_binding_get_target, "g_binding_get_target", LIBRARY_GOBJECT); Linker.link(g_binding_get_target_property, "g_binding_get_target_property", LIBRARY_GOBJECT); Linker.link(g_binding_unbind, "g_binding_unbind", LIBRARY_GOBJECT); // gobject.CClosure Linker.link(g_cclosure_marshal_BOOLEAN__BOXED_BOXED, "g_cclosure_marshal_BOOLEAN__BOXED_BOXED", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv, "g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_BOOLEAN__FLAGS, "g_cclosure_marshal_BOOLEAN__FLAGS", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_BOOLEAN__FLAGSv, "g_cclosure_marshal_BOOLEAN__FLAGSv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_STRING__OBJECT_POINTER, "g_cclosure_marshal_STRING__OBJECT_POINTER", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_STRING__OBJECT_POINTERv, "g_cclosure_marshal_STRING__OBJECT_POINTERv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__BOOLEAN, "g_cclosure_marshal_VOID__BOOLEAN", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__BOOLEANv, "g_cclosure_marshal_VOID__BOOLEANv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__BOXED, "g_cclosure_marshal_VOID__BOXED", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__BOXEDv, "g_cclosure_marshal_VOID__BOXEDv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__CHAR, "g_cclosure_marshal_VOID__CHAR", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__CHARv, "g_cclosure_marshal_VOID__CHARv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__DOUBLE, "g_cclosure_marshal_VOID__DOUBLE", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__DOUBLEv, "g_cclosure_marshal_VOID__DOUBLEv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__ENUM, "g_cclosure_marshal_VOID__ENUM", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__ENUMv, "g_cclosure_marshal_VOID__ENUMv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__FLAGS, "g_cclosure_marshal_VOID__FLAGS", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__FLAGSv, "g_cclosure_marshal_VOID__FLAGSv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__FLOAT, "g_cclosure_marshal_VOID__FLOAT", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__FLOATv, "g_cclosure_marshal_VOID__FLOATv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__INT, "g_cclosure_marshal_VOID__INT", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__INTv, "g_cclosure_marshal_VOID__INTv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__LONG, "g_cclosure_marshal_VOID__LONG", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__LONGv, "g_cclosure_marshal_VOID__LONGv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__OBJECT, "g_cclosure_marshal_VOID__OBJECT", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__OBJECTv, "g_cclosure_marshal_VOID__OBJECTv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__PARAM, "g_cclosure_marshal_VOID__PARAM", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__PARAMv, "g_cclosure_marshal_VOID__PARAMv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__POINTER, "g_cclosure_marshal_VOID__POINTER", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__POINTERv, "g_cclosure_marshal_VOID__POINTERv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__STRING, "g_cclosure_marshal_VOID__STRING", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__STRINGv, "g_cclosure_marshal_VOID__STRINGv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__UCHAR, "g_cclosure_marshal_VOID__UCHAR", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__UCHARv, "g_cclosure_marshal_VOID__UCHARv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__UINT, "g_cclosure_marshal_VOID__UINT", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__UINT_POINTER, "g_cclosure_marshal_VOID__UINT_POINTER", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__UINT_POINTERv, "g_cclosure_marshal_VOID__UINT_POINTERv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__UINTv, "g_cclosure_marshal_VOID__UINTv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__ULONG, "g_cclosure_marshal_VOID__ULONG", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__ULONGv, "g_cclosure_marshal_VOID__ULONGv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__VARIANT, "g_cclosure_marshal_VOID__VARIANT", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__VARIANTv, "g_cclosure_marshal_VOID__VARIANTv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__VOID, "g_cclosure_marshal_VOID__VOID", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_VOID__VOIDv, "g_cclosure_marshal_VOID__VOIDv", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_generic, "g_cclosure_marshal_generic", LIBRARY_GOBJECT); Linker.link(g_cclosure_marshal_generic_va, "g_cclosure_marshal_generic_va", LIBRARY_GOBJECT); Linker.link(g_cclosure_new, "g_cclosure_new", LIBRARY_GOBJECT); Linker.link(g_cclosure_new_object, "g_cclosure_new_object", LIBRARY_GOBJECT); Linker.link(g_cclosure_new_object_swap, "g_cclosure_new_object_swap", LIBRARY_GOBJECT); Linker.link(g_cclosure_new_swap, "g_cclosure_new_swap", LIBRARY_GOBJECT); // gobject.Closure Linker.link(g_closure_get_type, "g_closure_get_type", LIBRARY_GOBJECT); Linker.link(g_closure_new_object, "g_closure_new_object", LIBRARY_GOBJECT); Linker.link(g_closure_new_simple, "g_closure_new_simple", LIBRARY_GOBJECT); Linker.link(g_closure_add_finalize_notifier, "g_closure_add_finalize_notifier", LIBRARY_GOBJECT); Linker.link(g_closure_add_invalidate_notifier, "g_closure_add_invalidate_notifier", LIBRARY_GOBJECT); Linker.link(g_closure_add_marshal_guards, "g_closure_add_marshal_guards", LIBRARY_GOBJECT); Linker.link(g_closure_invalidate, "g_closure_invalidate", LIBRARY_GOBJECT); Linker.link(g_closure_invoke, "g_closure_invoke", LIBRARY_GOBJECT); Linker.link(g_closure_ref, "g_closure_ref", LIBRARY_GOBJECT); Linker.link(g_closure_remove_finalize_notifier, "g_closure_remove_finalize_notifier", LIBRARY_GOBJECT); Linker.link(g_closure_remove_invalidate_notifier, "g_closure_remove_invalidate_notifier", LIBRARY_GOBJECT); Linker.link(g_closure_set_marshal, "g_closure_set_marshal", LIBRARY_GOBJECT); Linker.link(g_closure_set_meta_marshal, "g_closure_set_meta_marshal", LIBRARY_GOBJECT); Linker.link(g_closure_sink, "g_closure_sink", LIBRARY_GOBJECT); Linker.link(g_closure_unref, "g_closure_unref", LIBRARY_GOBJECT); Linker.link(g_source_set_closure, "g_source_set_closure", LIBRARY_GOBJECT); Linker.link(g_source_set_dummy_callback, "g_source_set_dummy_callback", LIBRARY_GOBJECT); // gobject.ObjectG Linker.link(g_initially_unowned_get_type, "g_initially_unowned_get_type", LIBRARY_GOBJECT); Linker.link(g_object_new, "g_object_new", LIBRARY_GOBJECT); Linker.link(g_object_new_valist, "g_object_new_valist", LIBRARY_GOBJECT); Linker.link(g_object_new_with_properties, "g_object_new_with_properties", LIBRARY_GOBJECT); Linker.link(g_object_newv, "g_object_newv", LIBRARY_GOBJECT); Linker.link(g_object_compat_control, "g_object_compat_control", LIBRARY_GOBJECT); Linker.link(g_object_interface_find_property, "g_object_interface_find_property", LIBRARY_GOBJECT); Linker.link(g_object_interface_install_property, "g_object_interface_install_property", LIBRARY_GOBJECT); Linker.link(g_object_interface_list_properties, "g_object_interface_list_properties", LIBRARY_GOBJECT); Linker.link(g_object_add_toggle_ref, "g_object_add_toggle_ref", LIBRARY_GOBJECT); Linker.link(g_object_add_weak_pointer, "g_object_add_weak_pointer", LIBRARY_GOBJECT); Linker.link(g_object_bind_property, "g_object_bind_property", LIBRARY_GOBJECT); Linker.link(g_object_bind_property_full, "g_object_bind_property_full", LIBRARY_GOBJECT); Linker.link(g_object_bind_property_with_closures, "g_object_bind_property_with_closures", LIBRARY_GOBJECT); Linker.link(g_object_connect, "g_object_connect", LIBRARY_GOBJECT); Linker.link(g_object_disconnect, "g_object_disconnect", LIBRARY_GOBJECT); Linker.link(g_object_dup_data, "g_object_dup_data", LIBRARY_GOBJECT); Linker.link(g_object_dup_qdata, "g_object_dup_qdata", LIBRARY_GOBJECT); Linker.link(g_object_force_floating, "g_object_force_floating", LIBRARY_GOBJECT); Linker.link(g_object_freeze_notify, "g_object_freeze_notify", LIBRARY_GOBJECT); Linker.link(g_object_get, "g_object_get", LIBRARY_GOBJECT); Linker.link(g_object_get_data, "g_object_get_data", LIBRARY_GOBJECT); Linker.link(g_object_get_property, "g_object_get_property", LIBRARY_GOBJECT); Linker.link(g_object_get_qdata, "g_object_get_qdata", LIBRARY_GOBJECT); Linker.link(g_object_get_valist, "g_object_get_valist", LIBRARY_GOBJECT); Linker.link(g_object_getv, "g_object_getv", LIBRARY_GOBJECT); Linker.link(g_object_is_floating, "g_object_is_floating", LIBRARY_GOBJECT); Linker.link(g_object_notify, "g_object_notify", LIBRARY_GOBJECT); Linker.link(g_object_notify_by_pspec, "g_object_notify_by_pspec", LIBRARY_GOBJECT); Linker.link(g_object_ref, "g_object_ref", LIBRARY_GOBJECT); Linker.link(g_object_ref_sink, "g_object_ref_sink", LIBRARY_GOBJECT); Linker.link(g_object_remove_toggle_ref, "g_object_remove_toggle_ref", LIBRARY_GOBJECT); Linker.link(g_object_remove_weak_pointer, "g_object_remove_weak_pointer", LIBRARY_GOBJECT); Linker.link(g_object_replace_data, "g_object_replace_data", LIBRARY_GOBJECT); Linker.link(g_object_replace_qdata, "g_object_replace_qdata", LIBRARY_GOBJECT); Linker.link(g_object_run_dispose, "g_object_run_dispose", LIBRARY_GOBJECT); Linker.link(g_object_set, "g_object_set", LIBRARY_GOBJECT); Linker.link(g_object_set_data, "g_object_set_data", LIBRARY_GOBJECT); Linker.link(g_object_set_data_full, "g_object_set_data_full", LIBRARY_GOBJECT); Linker.link(g_object_set_property, "g_object_set_property", LIBRARY_GOBJECT); Linker.link(g_object_set_qdata, "g_object_set_qdata", LIBRARY_GOBJECT); Linker.link(g_object_set_qdata_full, "g_object_set_qdata_full", LIBRARY_GOBJECT); Linker.link(g_object_set_valist, "g_object_set_valist", LIBRARY_GOBJECT); Linker.link(g_object_setv, "g_object_setv", LIBRARY_GOBJECT); Linker.link(g_object_steal_data, "g_object_steal_data", LIBRARY_GOBJECT); Linker.link(g_object_steal_qdata, "g_object_steal_qdata", LIBRARY_GOBJECT); Linker.link(g_object_thaw_notify, "g_object_thaw_notify", LIBRARY_GOBJECT); Linker.link(g_object_unref, "g_object_unref", LIBRARY_GOBJECT); Linker.link(g_object_watch_closure, "g_object_watch_closure", LIBRARY_GOBJECT); Linker.link(g_object_weak_ref, "g_object_weak_ref", LIBRARY_GOBJECT); Linker.link(g_object_weak_unref, "g_object_weak_unref", LIBRARY_GOBJECT); Linker.link(g_clear_object, "g_clear_object", LIBRARY_GOBJECT); // gobject.ObjectClass Linker.link(g_object_class_find_property, "g_object_class_find_property", LIBRARY_GOBJECT); Linker.link(g_object_class_install_properties, "g_object_class_install_properties", LIBRARY_GOBJECT); Linker.link(g_object_class_install_property, "g_object_class_install_property", LIBRARY_GOBJECT); Linker.link(g_object_class_list_properties, "g_object_class_list_properties", LIBRARY_GOBJECT); Linker.link(g_object_class_override_property, "g_object_class_override_property", LIBRARY_GOBJECT); // gobject.ParamSpec Linker.link(g_param_spec_internal, "g_param_spec_internal", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_blurb, "g_param_spec_get_blurb", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_default_value, "g_param_spec_get_default_value", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_name, "g_param_spec_get_name", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_name_quark, "g_param_spec_get_name_quark", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_nick, "g_param_spec_get_nick", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_qdata, "g_param_spec_get_qdata", LIBRARY_GOBJECT); Linker.link(g_param_spec_get_redirect_target, "g_param_spec_get_redirect_target", LIBRARY_GOBJECT); Linker.link(g_param_spec_ref, "g_param_spec_ref", LIBRARY_GOBJECT); Linker.link(g_param_spec_ref_sink, "g_param_spec_ref_sink", LIBRARY_GOBJECT); Linker.link(g_param_spec_set_qdata, "g_param_spec_set_qdata", LIBRARY_GOBJECT); Linker.link(g_param_spec_set_qdata_full, "g_param_spec_set_qdata_full", LIBRARY_GOBJECT); Linker.link(g_param_spec_sink, "g_param_spec_sink", LIBRARY_GOBJECT); Linker.link(g_param_spec_steal_qdata, "g_param_spec_steal_qdata", LIBRARY_GOBJECT); Linker.link(g_param_spec_unref, "g_param_spec_unref", LIBRARY_GOBJECT); Linker.link(g_param_type_register_static, "g_param_type_register_static", LIBRARY_GOBJECT); Linker.link(g_param_value_convert, "g_param_value_convert", LIBRARY_GOBJECT); Linker.link(g_param_value_defaults, "g_param_value_defaults", LIBRARY_GOBJECT); Linker.link(g_param_value_set_default, "g_param_value_set_default", LIBRARY_GOBJECT); Linker.link(g_param_value_validate, "g_param_value_validate", LIBRARY_GOBJECT); Linker.link(g_param_values_cmp, "g_param_values_cmp", LIBRARY_GOBJECT); // gobject.ParamSpecPool Linker.link(g_param_spec_pool_insert, "g_param_spec_pool_insert", LIBRARY_GOBJECT); Linker.link(g_param_spec_pool_list, "g_param_spec_pool_list", LIBRARY_GOBJECT); Linker.link(g_param_spec_pool_list_owned, "g_param_spec_pool_list_owned", LIBRARY_GOBJECT); Linker.link(g_param_spec_pool_lookup, "g_param_spec_pool_lookup", LIBRARY_GOBJECT); Linker.link(g_param_spec_pool_remove, "g_param_spec_pool_remove", LIBRARY_GOBJECT); Linker.link(g_param_spec_pool_new, "g_param_spec_pool_new", LIBRARY_GOBJECT); // gobject.TypeClass Linker.link(g_type_class_add_private, "g_type_class_add_private", LIBRARY_GOBJECT); Linker.link(g_type_class_get_instance_private_offset, "g_type_class_get_instance_private_offset", LIBRARY_GOBJECT); Linker.link(g_type_class_get_private, "g_type_class_get_private", LIBRARY_GOBJECT); Linker.link(g_type_class_peek_parent, "g_type_class_peek_parent", LIBRARY_GOBJECT); Linker.link(g_type_class_unref, "g_type_class_unref", LIBRARY_GOBJECT); Linker.link(g_type_class_unref_uncached, "g_type_class_unref_uncached", LIBRARY_GOBJECT); Linker.link(g_type_class_adjust_private_offset, "g_type_class_adjust_private_offset", LIBRARY_GOBJECT); Linker.link(g_type_class_peek, "g_type_class_peek", LIBRARY_GOBJECT); Linker.link(g_type_class_peek_static, "g_type_class_peek_static", LIBRARY_GOBJECT); Linker.link(g_type_class_ref, "g_type_class_ref", LIBRARY_GOBJECT); // gobject.TypeInstance Linker.link(g_type_instance_get_private, "g_type_instance_get_private", LIBRARY_GOBJECT); // gobject.TypeInterface Linker.link(g_type_interface_peek_parent, "g_type_interface_peek_parent", LIBRARY_GOBJECT); Linker.link(g_type_interface_add_prerequisite, "g_type_interface_add_prerequisite", LIBRARY_GOBJECT); Linker.link(g_type_interface_get_plugin, "g_type_interface_get_plugin", LIBRARY_GOBJECT); Linker.link(g_type_interface_peek, "g_type_interface_peek", LIBRARY_GOBJECT); Linker.link(g_type_interface_prerequisites, "g_type_interface_prerequisites", LIBRARY_GOBJECT); // gobject.TypeModule Linker.link(g_type_module_get_type, "g_type_module_get_type", LIBRARY_GOBJECT); Linker.link(g_type_module_add_interface, "g_type_module_add_interface", LIBRARY_GOBJECT); Linker.link(g_type_module_register_enum, "g_type_module_register_enum", LIBRARY_GOBJECT); Linker.link(g_type_module_register_flags, "g_type_module_register_flags", LIBRARY_GOBJECT); Linker.link(g_type_module_register_type, "g_type_module_register_type", LIBRARY_GOBJECT); Linker.link(g_type_module_set_name, "g_type_module_set_name", LIBRARY_GOBJECT); Linker.link(g_type_module_unuse, "g_type_module_unuse", LIBRARY_GOBJECT); Linker.link(g_type_module_use, "g_type_module_use", LIBRARY_GOBJECT); // gobject.TypePlugin Linker.link(g_type_plugin_get_type, "g_type_plugin_get_type", LIBRARY_GOBJECT); Linker.link(g_type_plugin_complete_interface_info, "g_type_plugin_complete_interface_info", LIBRARY_GOBJECT); Linker.link(g_type_plugin_complete_type_info, "g_type_plugin_complete_type_info", LIBRARY_GOBJECT); Linker.link(g_type_plugin_unuse, "g_type_plugin_unuse", LIBRARY_GOBJECT); Linker.link(g_type_plugin_use, "g_type_plugin_use", LIBRARY_GOBJECT); // gobject.TypeValueTable Linker.link(g_type_value_table_peek, "g_type_value_table_peek", LIBRARY_GOBJECT); // gobject.Value Linker.link(g_value_get_type, "g_value_get_type", LIBRARY_GOBJECT); Linker.link(g_value_copy, "g_value_copy", LIBRARY_GOBJECT); Linker.link(g_value_dup_boxed, "g_value_dup_boxed", LIBRARY_GOBJECT); Linker.link(g_value_dup_object, "g_value_dup_object", LIBRARY_GOBJECT); Linker.link(g_value_dup_param, "g_value_dup_param", LIBRARY_GOBJECT); Linker.link(g_value_dup_string, "g_value_dup_string", LIBRARY_GOBJECT); Linker.link(g_value_dup_variant, "g_value_dup_variant", LIBRARY_GOBJECT); Linker.link(g_value_fits_pointer, "g_value_fits_pointer", LIBRARY_GOBJECT); Linker.link(g_value_get_boolean, "g_value_get_boolean", LIBRARY_GOBJECT); Linker.link(g_value_get_boxed, "g_value_get_boxed", LIBRARY_GOBJECT); Linker.link(g_value_get_char, "g_value_get_char", LIBRARY_GOBJECT); Linker.link(g_value_get_double, "g_value_get_double", LIBRARY_GOBJECT); Linker.link(g_value_get_enum, "g_value_get_enum", LIBRARY_GOBJECT); Linker.link(g_value_get_flags, "g_value_get_flags", LIBRARY_GOBJECT); Linker.link(g_value_get_float, "g_value_get_float", LIBRARY_GOBJECT); Linker.link(g_value_get_gtype, "g_value_get_gtype", LIBRARY_GOBJECT); Linker.link(g_value_get_int, "g_value_get_int", LIBRARY_GOBJECT); Linker.link(g_value_get_int64, "g_value_get_int64", LIBRARY_GOBJECT); Linker.link(g_value_get_long, "g_value_get_long", LIBRARY_GOBJECT); Linker.link(g_value_get_object, "g_value_get_object", LIBRARY_GOBJECT); Linker.link(g_value_get_param, "g_value_get_param", LIBRARY_GOBJECT); Linker.link(g_value_get_pointer, "g_value_get_pointer", LIBRARY_GOBJECT); Linker.link(g_value_get_schar, "g_value_get_schar", LIBRARY_GOBJECT); Linker.link(g_value_get_string, "g_value_get_string", LIBRARY_GOBJECT); Linker.link(g_value_get_uchar, "g_value_get_uchar", LIBRARY_GOBJECT); Linker.link(g_value_get_uint, "g_value_get_uint", LIBRARY_GOBJECT); Linker.link(g_value_get_uint64, "g_value_get_uint64", LIBRARY_GOBJECT); Linker.link(g_value_get_ulong, "g_value_get_ulong", LIBRARY_GOBJECT); Linker.link(g_value_get_variant, "g_value_get_variant", LIBRARY_GOBJECT); Linker.link(g_value_init, "g_value_init", LIBRARY_GOBJECT); Linker.link(g_value_init_from_instance, "g_value_init_from_instance", LIBRARY_GOBJECT); Linker.link(g_value_peek_pointer, "g_value_peek_pointer", LIBRARY_GOBJECT); Linker.link(g_value_reset, "g_value_reset", LIBRARY_GOBJECT); Linker.link(g_value_set_boolean, "g_value_set_boolean", LIBRARY_GOBJECT); Linker.link(g_value_set_boxed, "g_value_set_boxed", LIBRARY_GOBJECT); Linker.link(g_value_set_boxed_take_ownership, "g_value_set_boxed_take_ownership", LIBRARY_GOBJECT); Linker.link(g_value_set_char, "g_value_set_char", LIBRARY_GOBJECT); Linker.link(g_value_set_double, "g_value_set_double", LIBRARY_GOBJECT); Linker.link(g_value_set_enum, "g_value_set_enum", LIBRARY_GOBJECT); Linker.link(g_value_set_flags, "g_value_set_flags", LIBRARY_GOBJECT); Linker.link(g_value_set_float, "g_value_set_float", LIBRARY_GOBJECT); Linker.link(g_value_set_gtype, "g_value_set_gtype", LIBRARY_GOBJECT); Linker.link(g_value_set_instance, "g_value_set_instance", LIBRARY_GOBJECT); Linker.link(g_value_set_int, "g_value_set_int", LIBRARY_GOBJECT); Linker.link(g_value_set_int64, "g_value_set_int64", LIBRARY_GOBJECT); Linker.link(g_value_set_long, "g_value_set_long", LIBRARY_GOBJECT); Linker.link(g_value_set_object, "g_value_set_object", LIBRARY_GOBJECT); Linker.link(g_value_set_object_take_ownership, "g_value_set_object_take_ownership", LIBRARY_GOBJECT); Linker.link(g_value_set_param, "g_value_set_param", LIBRARY_GOBJECT); Linker.link(g_value_set_param_take_ownership, "g_value_set_param_take_ownership", LIBRARY_GOBJECT); Linker.link(g_value_set_pointer, "g_value_set_pointer", LIBRARY_GOBJECT); Linker.link(g_value_set_schar, "g_value_set_schar", LIBRARY_GOBJECT); Linker.link(g_value_set_static_boxed, "g_value_set_static_boxed", LIBRARY_GOBJECT); Linker.link(g_value_set_static_string, "g_value_set_static_string", LIBRARY_GOBJECT); Linker.link(g_value_set_string, "g_value_set_string", LIBRARY_GOBJECT); Linker.link(g_value_set_string_take_ownership, "g_value_set_string_take_ownership", LIBRARY_GOBJECT); Linker.link(g_value_set_uchar, "g_value_set_uchar", LIBRARY_GOBJECT); Linker.link(g_value_set_uint, "g_value_set_uint", LIBRARY_GOBJECT); Linker.link(g_value_set_uint64, "g_value_set_uint64", LIBRARY_GOBJECT); Linker.link(g_value_set_ulong, "g_value_set_ulong", LIBRARY_GOBJECT); Linker.link(g_value_set_variant, "g_value_set_variant", LIBRARY_GOBJECT); Linker.link(g_value_take_boxed, "g_value_take_boxed", LIBRARY_GOBJECT); Linker.link(g_value_take_object, "g_value_take_object", LIBRARY_GOBJECT); Linker.link(g_value_take_param, "g_value_take_param", LIBRARY_GOBJECT); Linker.link(g_value_take_string, "g_value_take_string", LIBRARY_GOBJECT); Linker.link(g_value_take_variant, "g_value_take_variant", LIBRARY_GOBJECT); Linker.link(g_value_transform, "g_value_transform", LIBRARY_GOBJECT); Linker.link(g_value_unset, "g_value_unset", LIBRARY_GOBJECT); Linker.link(g_value_register_transform_func, "g_value_register_transform_func", LIBRARY_GOBJECT); Linker.link(g_value_type_compatible, "g_value_type_compatible", LIBRARY_GOBJECT); Linker.link(g_value_type_transformable, "g_value_type_transformable", LIBRARY_GOBJECT); Linker.link(g_param_spec_boolean, "g_param_spec_boolean", LIBRARY_GOBJECT); Linker.link(g_param_spec_boxed, "g_param_spec_boxed", LIBRARY_GOBJECT); Linker.link(g_param_spec_char, "g_param_spec_char", LIBRARY_GOBJECT); Linker.link(g_param_spec_double, "g_param_spec_double", LIBRARY_GOBJECT); Linker.link(g_param_spec_enum, "g_param_spec_enum", LIBRARY_GOBJECT); Linker.link(g_param_spec_flags, "g_param_spec_flags", LIBRARY_GOBJECT); Linker.link(g_param_spec_float, "g_param_spec_float", LIBRARY_GOBJECT); Linker.link(g_param_spec_gtype, "g_param_spec_gtype", LIBRARY_GOBJECT); Linker.link(g_param_spec_int, "g_param_spec_int", LIBRARY_GOBJECT); Linker.link(g_param_spec_int64, "g_param_spec_int64", LIBRARY_GOBJECT); Linker.link(g_param_spec_long, "g_param_spec_long", LIBRARY_GOBJECT); Linker.link(g_param_spec_object, "g_param_spec_object", LIBRARY_GOBJECT); Linker.link(g_param_spec_override, "g_param_spec_override", LIBRARY_GOBJECT); Linker.link(g_param_spec_param, "g_param_spec_param", LIBRARY_GOBJECT); Linker.link(g_param_spec_pointer, "g_param_spec_pointer", LIBRARY_GOBJECT); Linker.link(g_param_spec_string, "g_param_spec_string", LIBRARY_GOBJECT); Linker.link(g_param_spec_uchar, "g_param_spec_uchar", LIBRARY_GOBJECT); Linker.link(g_param_spec_uint, "g_param_spec_uint", LIBRARY_GOBJECT); Linker.link(g_param_spec_uint64, "g_param_spec_uint64", LIBRARY_GOBJECT); Linker.link(g_param_spec_ulong, "g_param_spec_ulong", LIBRARY_GOBJECT); Linker.link(g_param_spec_unichar, "g_param_spec_unichar", LIBRARY_GOBJECT); Linker.link(g_param_spec_value_array, "g_param_spec_value_array", LIBRARY_GOBJECT); Linker.link(g_param_spec_variant, "g_param_spec_variant", LIBRARY_GOBJECT); Linker.link(g_strdup_value_contents, "g_strdup_value_contents", LIBRARY_GOBJECT); // gobject.ValueArray Linker.link(g_value_array_get_type, "g_value_array_get_type", LIBRARY_GOBJECT); Linker.link(g_value_array_new, "g_value_array_new", LIBRARY_GOBJECT); Linker.link(g_value_array_append, "g_value_array_append", LIBRARY_GOBJECT); Linker.link(g_value_array_copy, "g_value_array_copy", LIBRARY_GOBJECT); Linker.link(g_value_array_free, "g_value_array_free", LIBRARY_GOBJECT); Linker.link(g_value_array_get_nth, "g_value_array_get_nth", LIBRARY_GOBJECT); Linker.link(g_value_array_insert, "g_value_array_insert", LIBRARY_GOBJECT); Linker.link(g_value_array_prepend, "g_value_array_prepend", LIBRARY_GOBJECT); Linker.link(g_value_array_remove, "g_value_array_remove", LIBRARY_GOBJECT); Linker.link(g_value_array_sort, "g_value_array_sort", LIBRARY_GOBJECT); Linker.link(g_value_array_sort_with_data, "g_value_array_sort_with_data", LIBRARY_GOBJECT); // gobject.WeakRef Linker.link(g_weak_ref_clear, "g_weak_ref_clear", LIBRARY_GOBJECT); Linker.link(g_weak_ref_get, "g_weak_ref_get", LIBRARY_GOBJECT); Linker.link(g_weak_ref_init, "g_weak_ref_init", LIBRARY_GOBJECT); Linker.link(g_weak_ref_set, "g_weak_ref_set", LIBRARY_GOBJECT); // gobject.Signals Linker.link(g_signal_accumulator_first_wins, "g_signal_accumulator_first_wins", LIBRARY_GOBJECT); Linker.link(g_signal_accumulator_true_handled, "g_signal_accumulator_true_handled", LIBRARY_GOBJECT); Linker.link(g_signal_add_emission_hook, "g_signal_add_emission_hook", LIBRARY_GOBJECT); Linker.link(g_signal_chain_from_overridden, "g_signal_chain_from_overridden", LIBRARY_GOBJECT); Linker.link(g_signal_chain_from_overridden_handler, "g_signal_chain_from_overridden_handler", LIBRARY_GOBJECT); Linker.link(g_signal_connect_closure, "g_signal_connect_closure", LIBRARY_GOBJECT); Linker.link(g_signal_connect_closure_by_id, "g_signal_connect_closure_by_id", LIBRARY_GOBJECT); Linker.link(g_signal_connect_data, "g_signal_connect_data", LIBRARY_GOBJECT); Linker.link(g_signal_connect_object, "g_signal_connect_object", LIBRARY_GOBJECT); Linker.link(g_signal_emit, "g_signal_emit", LIBRARY_GOBJECT); Linker.link(g_signal_emit_by_name, "g_signal_emit_by_name", LIBRARY_GOBJECT); Linker.link(g_signal_emit_valist, "g_signal_emit_valist", LIBRARY_GOBJECT); Linker.link(g_signal_emitv, "g_signal_emitv", LIBRARY_GOBJECT); Linker.link(g_signal_get_invocation_hint, "g_signal_get_invocation_hint", LIBRARY_GOBJECT); Linker.link(g_signal_handler_block, "g_signal_handler_block", LIBRARY_GOBJECT); Linker.link(g_signal_handler_disconnect, "g_signal_handler_disconnect", LIBRARY_GOBJECT); Linker.link(g_signal_handler_find, "g_signal_handler_find", LIBRARY_GOBJECT); Linker.link(g_signal_handler_is_connected, "g_signal_handler_is_connected", LIBRARY_GOBJECT); Linker.link(g_signal_handler_unblock, "g_signal_handler_unblock", LIBRARY_GOBJECT); Linker.link(g_signal_handlers_block_matched, "g_signal_handlers_block_matched", LIBRARY_GOBJECT); Linker.link(g_signal_handlers_destroy, "g_signal_handlers_destroy", LIBRARY_GOBJECT); Linker.link(g_signal_handlers_disconnect_matched, "g_signal_handlers_disconnect_matched", LIBRARY_GOBJECT); Linker.link(g_signal_handlers_unblock_matched, "g_signal_handlers_unblock_matched", LIBRARY_GOBJECT); Linker.link(g_signal_has_handler_pending, "g_signal_has_handler_pending", LIBRARY_GOBJECT); Linker.link(g_signal_list_ids, "g_signal_list_ids", LIBRARY_GOBJECT); Linker.link(g_signal_lookup, "g_signal_lookup", LIBRARY_GOBJECT); Linker.link(g_signal_name, "g_signal_name", LIBRARY_GOBJECT); Linker.link(g_signal_new, "g_signal_new", LIBRARY_GOBJECT); Linker.link(g_signal_new_class_handler, "g_signal_new_class_handler", LIBRARY_GOBJECT); Linker.link(g_signal_new_valist, "g_signal_new_valist", LIBRARY_GOBJECT); Linker.link(g_signal_newv, "g_signal_newv", LIBRARY_GOBJECT); Linker.link(g_signal_override_class_closure, "g_signal_override_class_closure", LIBRARY_GOBJECT); Linker.link(g_signal_override_class_handler, "g_signal_override_class_handler", LIBRARY_GOBJECT); Linker.link(g_signal_parse_name, "g_signal_parse_name", LIBRARY_GOBJECT); Linker.link(g_signal_query, "g_signal_query", LIBRARY_GOBJECT); Linker.link(g_signal_remove_emission_hook, "g_signal_remove_emission_hook", LIBRARY_GOBJECT); Linker.link(g_signal_set_va_marshaller, "g_signal_set_va_marshaller", LIBRARY_GOBJECT); Linker.link(g_signal_stop_emission, "g_signal_stop_emission", LIBRARY_GOBJECT); Linker.link(g_signal_stop_emission_by_name, "g_signal_stop_emission_by_name", LIBRARY_GOBJECT); Linker.link(g_signal_type_cclosure_new, "g_signal_type_cclosure_new", LIBRARY_GOBJECT); // gobject.Type Linker.link(g_type_add_class_cache_func, "g_type_add_class_cache_func", LIBRARY_GOBJECT); Linker.link(g_type_add_class_private, "g_type_add_class_private", LIBRARY_GOBJECT); Linker.link(g_type_add_instance_private, "g_type_add_instance_private", LIBRARY_GOBJECT); Linker.link(g_type_add_interface_check, "g_type_add_interface_check", LIBRARY_GOBJECT); Linker.link(g_type_add_interface_dynamic, "g_type_add_interface_dynamic", LIBRARY_GOBJECT); Linker.link(g_type_add_interface_static, "g_type_add_interface_static", LIBRARY_GOBJECT); Linker.link(g_type_check_class_cast, "g_type_check_class_cast", LIBRARY_GOBJECT); Linker.link(g_type_check_class_is_a, "g_type_check_class_is_a", LIBRARY_GOBJECT); Linker.link(g_type_check_instance, "g_type_check_instance", LIBRARY_GOBJECT); Linker.link(g_type_check_instance_cast, "g_type_check_instance_cast", LIBRARY_GOBJECT); Linker.link(g_type_check_instance_is_a, "g_type_check_instance_is_a", LIBRARY_GOBJECT); Linker.link(g_type_check_instance_is_fundamentally_a, "g_type_check_instance_is_fundamentally_a", LIBRARY_GOBJECT); Linker.link(g_type_check_is_value_type, "g_type_check_is_value_type", LIBRARY_GOBJECT); Linker.link(g_type_check_value, "g_type_check_value", LIBRARY_GOBJECT); Linker.link(g_type_check_value_holds, "g_type_check_value_holds", LIBRARY_GOBJECT); Linker.link(g_type_children, "g_type_children", LIBRARY_GOBJECT); Linker.link(g_type_create_instance, "g_type_create_instance", LIBRARY_GOBJECT); Linker.link(g_type_default_interface_peek, "g_type_default_interface_peek", LIBRARY_GOBJECT); Linker.link(g_type_default_interface_ref, "g_type_default_interface_ref", LIBRARY_GOBJECT); Linker.link(g_type_default_interface_unref, "g_type_default_interface_unref", LIBRARY_GOBJECT); Linker.link(g_type_depth, "g_type_depth", LIBRARY_GOBJECT); Linker.link(g_type_ensure, "g_type_ensure", LIBRARY_GOBJECT); Linker.link(g_type_free_instance, "g_type_free_instance", LIBRARY_GOBJECT); Linker.link(g_type_from_name, "g_type_from_name", LIBRARY_GOBJECT); Linker.link(g_type_fundamental, "g_type_fundamental", LIBRARY_GOBJECT); Linker.link(g_type_fundamental_next, "g_type_fundamental_next", LIBRARY_GOBJECT); Linker.link(g_type_get_plugin, "g_type_get_plugin", LIBRARY_GOBJECT); Linker.link(g_type_get_qdata, "g_type_get_qdata", LIBRARY_GOBJECT); Linker.link(g_type_get_type_registration_serial, "g_type_get_type_registration_serial", LIBRARY_GOBJECT); Linker.link(g_type_init, "g_type_init", LIBRARY_GOBJECT); Linker.link(g_type_init_with_debug_flags, "g_type_init_with_debug_flags", LIBRARY_GOBJECT); Linker.link(g_type_interfaces, "g_type_interfaces", LIBRARY_GOBJECT); Linker.link(g_type_is_a, "g_type_is_a", LIBRARY_GOBJECT); Linker.link(g_type_name, "g_type_name", LIBRARY_GOBJECT); Linker.link(g_type_name_from_class, "g_type_name_from_class", LIBRARY_GOBJECT); Linker.link(g_type_name_from_instance, "g_type_name_from_instance", LIBRARY_GOBJECT); Linker.link(g_type_next_base, "g_type_next_base", LIBRARY_GOBJECT); Linker.link(g_type_parent, "g_type_parent", LIBRARY_GOBJECT); Linker.link(g_type_qname, "g_type_qname", LIBRARY_GOBJECT); Linker.link(g_type_query, "g_type_query", LIBRARY_GOBJECT); Linker.link(g_type_register_dynamic, "g_type_register_dynamic", LIBRARY_GOBJECT); Linker.link(g_type_register_fundamental, "g_type_register_fundamental", LIBRARY_GOBJECT); Linker.link(g_type_register_static, "g_type_register_static", LIBRARY_GOBJECT); Linker.link(g_type_register_static_simple, "g_type_register_static_simple", LIBRARY_GOBJECT); Linker.link(g_type_remove_class_cache_func, "g_type_remove_class_cache_func", LIBRARY_GOBJECT); Linker.link(g_type_remove_interface_check, "g_type_remove_interface_check", LIBRARY_GOBJECT); Linker.link(g_type_set_qdata, "g_type_set_qdata", LIBRARY_GOBJECT); Linker.link(g_type_test_flags, "g_type_test_flags", LIBRARY_GOBJECT); Linker.link(g_type_get_instance_count, "g_type_get_instance_count", LIBRARY_GOBJECT); // gobject.Boxed Linker.link(g_boxed_copy, "g_boxed_copy", LIBRARY_GOBJECT); Linker.link(g_boxed_free, "g_boxed_free", LIBRARY_GOBJECT); Linker.link(g_boxed_type_register_static, "g_boxed_type_register_static", LIBRARY_GOBJECT); Linker.link(g_pointer_type_register_static, "g_pointer_type_register_static", LIBRARY_GOBJECT); // gobject.Enums Linker.link(g_enum_complete_type_info, "g_enum_complete_type_info", LIBRARY_GOBJECT); Linker.link(g_enum_get_value, "g_enum_get_value", LIBRARY_GOBJECT); Linker.link(g_enum_get_value_by_name, "g_enum_get_value_by_name", LIBRARY_GOBJECT); Linker.link(g_enum_get_value_by_nick, "g_enum_get_value_by_nick", LIBRARY_GOBJECT); Linker.link(g_enum_register_static, "g_enum_register_static", LIBRARY_GOBJECT); Linker.link(g_enum_to_string, "g_enum_to_string", LIBRARY_GOBJECT); Linker.link(g_flags_to_string, "g_flags_to_string", LIBRARY_GOBJECT); // gobject.Flags Linker.link(g_flags_complete_type_info, "g_flags_complete_type_info", LIBRARY_GOBJECT); Linker.link(g_flags_get_first_value, "g_flags_get_first_value", LIBRARY_GOBJECT); Linker.link(g_flags_get_value_by_name, "g_flags_get_value_by_name", LIBRARY_GOBJECT); Linker.link(g_flags_get_value_by_nick, "g_flags_get_value_by_nick", LIBRARY_GOBJECT); Linker.link(g_flags_register_static, "g_flags_register_static", LIBRARY_GOBJECT); } __gshared extern(C) { // gobject.Binding GType function() c_g_binding_get_type; GBindingFlags function(GBinding* binding) c_g_binding_get_flags; GObject* function(GBinding* binding) c_g_binding_get_source; const(char)* function(GBinding* binding) c_g_binding_get_source_property; GObject* function(GBinding* binding) c_g_binding_get_target; const(char)* function(GBinding* binding) c_g_binding_get_target_property; void function(GBinding* binding) c_g_binding_unbind; // gobject.CClosure void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_BOOLEAN__BOXED_BOXED; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_BOOLEAN__FLAGS; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_BOOLEAN__FLAGSv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_STRING__OBJECT_POINTER; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_STRING__OBJECT_POINTERv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__BOOLEAN; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__BOOLEANv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__BOXED; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__BOXEDv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__CHAR; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__CHARv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__DOUBLE; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__DOUBLEv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__ENUM; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__ENUMv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__FLAGS; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__FLAGSv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__FLOAT; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__FLOATv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__INT; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__INTv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__LONG; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__LONGv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__OBJECT; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__OBJECTv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__PARAM; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__PARAMv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__POINTER; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__POINTERv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__STRING; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__STRINGv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__UCHAR; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__UCHARv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__UINT; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__UINT_POINTER; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__UINT_POINTERv; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__UINTv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__ULONG; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__ULONGv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__VARIANT; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__VARIANTv; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_VOID__VOID; void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_VOID__VOIDv; void function(GClosure* closure, GValue* returnGvalue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) c_g_cclosure_marshal_generic; void function(GClosure* closure, GValue* returnValue, void* instanc, void* argsList, void* marshalData, int nParams, GType* paramTypes) c_g_cclosure_marshal_generic_va; GClosure* function(GCallback callbackFunc, void* userData, GClosureNotify destroyData) c_g_cclosure_new; GClosure* function(GCallback callbackFunc, GObject* object) c_g_cclosure_new_object; GClosure* function(GCallback callbackFunc, GObject* object) c_g_cclosure_new_object_swap; GClosure* function(GCallback callbackFunc, void* userData, GClosureNotify destroyData) c_g_cclosure_new_swap; // gobject.Closure GType function() c_g_closure_get_type; GClosure* function(uint sizeofClosure, GObject* object) c_g_closure_new_object; GClosure* function(uint sizeofClosure, void* data) c_g_closure_new_simple; void function(GClosure* closure, void* notifyData, GClosureNotify notifyFunc) c_g_closure_add_finalize_notifier; void function(GClosure* closure, void* notifyData, GClosureNotify notifyFunc) c_g_closure_add_invalidate_notifier; void function(GClosure* closure, void* preMarshalData, GClosureNotify preMarshalNotify, void* postMarshalData, GClosureNotify postMarshalNotify) c_g_closure_add_marshal_guards; void function(GClosure* closure) c_g_closure_invalidate; void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint) c_g_closure_invoke; GClosure* function(GClosure* closure) c_g_closure_ref; void function(GClosure* closure, void* notifyData, GClosureNotify notifyFunc) c_g_closure_remove_finalize_notifier; void function(GClosure* closure, void* notifyData, GClosureNotify notifyFunc) c_g_closure_remove_invalidate_notifier; void function(GClosure* closure, GClosureMarshal marshal) c_g_closure_set_marshal; void function(GClosure* closure, void* marshalData, GClosureMarshal metaMarshal) c_g_closure_set_meta_marshal; void function(GClosure* closure) c_g_closure_sink; void function(GClosure* closure) c_g_closure_unref; void function(GSource* source, GClosure* closure) c_g_source_set_closure; void function(GSource* source) c_g_source_set_dummy_callback; // gobject.ObjectG GType function() c_g_initially_unowned_get_type; void* function(GType objectType, const(char)* firstPropertyName, ... ) c_g_object_new; GObject* function(GType objectType, const(char)* firstPropertyName, void* varArgs) c_g_object_new_valist; GObject* function(GType objectType, uint nProperties, char** names, GValue* values) c_g_object_new_with_properties; void* function(GType objectType, uint nParameters, GParameter* parameters) c_g_object_newv; size_t function(size_t what, void* data) c_g_object_compat_control; GParamSpec* function(void* gIface, const(char)* propertyName) c_g_object_interface_find_property; void function(void* gIface, GParamSpec* pspec) c_g_object_interface_install_property; GParamSpec** function(void* gIface, uint* nPropertiesP) c_g_object_interface_list_properties; void function(GObject* object, GToggleNotify notify, void* data) c_g_object_add_toggle_ref; void function(GObject* object, void** weakPointerLocation) c_g_object_add_weak_pointer; GBinding* function(void* source, const(char)* sourceProperty, void* target, const(char)* targetProperty, GBindingFlags flags) c_g_object_bind_property; GBinding* function(void* source, const(char)* sourceProperty, void* target, const(char)* targetProperty, GBindingFlags flags, GBindingTransformFunc transformTo, GBindingTransformFunc transformFrom, void* userData, GDestroyNotify notify) c_g_object_bind_property_full; GBinding* function(void* source, const(char)* sourceProperty, void* target, const(char)* targetProperty, GBindingFlags flags, GClosure* transformTo, GClosure* transformFrom) c_g_object_bind_property_with_closures; void* function(void* object, const(char)* signalSpec, ... ) c_g_object_connect; void function(void* object, const(char)* signalSpec, ... ) c_g_object_disconnect; void* function(GObject* object, const(char)* key, GDuplicateFunc dupFunc, void* userData) c_g_object_dup_data; void* function(GObject* object, GQuark quark, GDuplicateFunc dupFunc, void* userData) c_g_object_dup_qdata; void function(GObject* object) c_g_object_force_floating; void function(GObject* object) c_g_object_freeze_notify; void function(void* object, const(char)* firstPropertyName, ... ) c_g_object_get; void* function(GObject* object, const(char)* key) c_g_object_get_data; void function(GObject* object, const(char)* propertyName, GValue* value) c_g_object_get_property; void* function(GObject* object, GQuark quark) c_g_object_get_qdata; void function(GObject* object, const(char)* firstPropertyName, void* varArgs) c_g_object_get_valist; void function(GObject* object, uint nProperties, char** names, GValue* values) c_g_object_getv; int function(void* object) c_g_object_is_floating; void function(GObject* object, const(char)* propertyName) c_g_object_notify; void function(GObject* object, GParamSpec* pspec) c_g_object_notify_by_pspec; void* function(void* object) c_g_object_ref; void* function(void* object) c_g_object_ref_sink; void function(GObject* object, GToggleNotify notify, void* data) c_g_object_remove_toggle_ref; void function(GObject* object, void** weakPointerLocation) c_g_object_remove_weak_pointer; int function(GObject* object, const(char)* key, void* oldval, void* newval, GDestroyNotify destroy, GDestroyNotify* oldDestroy) c_g_object_replace_data; int function(GObject* object, GQuark quark, void* oldval, void* newval, GDestroyNotify destroy, GDestroyNotify* oldDestroy) c_g_object_replace_qdata; void function(GObject* object) c_g_object_run_dispose; void function(void* object, const(char)* firstPropertyName, ... ) c_g_object_set; void function(GObject* object, const(char)* key, void* data) c_g_object_set_data; void function(GObject* object, const(char)* key, void* data, GDestroyNotify destroy) c_g_object_set_data_full; void function(GObject* object, const(char)* propertyName, GValue* value) c_g_object_set_property; void function(GObject* object, GQuark quark, void* data) c_g_object_set_qdata; void function(GObject* object, GQuark quark, void* data, GDestroyNotify destroy) c_g_object_set_qdata_full; void function(GObject* object, const(char)* firstPropertyName, void* varArgs) c_g_object_set_valist; void function(GObject* object, uint nProperties, char** names, GValue* values) c_g_object_setv; void* function(GObject* object, const(char)* key) c_g_object_steal_data; void* function(GObject* object, GQuark quark) c_g_object_steal_qdata; void function(GObject* object) c_g_object_thaw_notify; void function(void* object) c_g_object_unref; void function(GObject* object, GClosure* closure) c_g_object_watch_closure; void function(GObject* object, GWeakNotify notify, void* data) c_g_object_weak_ref; void function(GObject* object, GWeakNotify notify, void* data) c_g_object_weak_unref; void function(GObject** objectPtr) c_g_clear_object; // gobject.ObjectClass GParamSpec* function(GObjectClass* oclass, const(char)* propertyName) c_g_object_class_find_property; void function(GObjectClass* oclass, uint nPspecs, GParamSpec** pspecs) c_g_object_class_install_properties; void function(GObjectClass* oclass, uint propertyId, GParamSpec* pspec) c_g_object_class_install_property; GParamSpec** function(GObjectClass* oclass, uint* nProperties) c_g_object_class_list_properties; void function(GObjectClass* oclass, uint propertyId, const(char)* name) c_g_object_class_override_property; // gobject.ParamSpec void* function(GType paramType, const(char)* name, const(char)* nick, const(char)* blurb, GParamFlags flags) c_g_param_spec_internal; const(char)* function(GParamSpec* pspec) c_g_param_spec_get_blurb; GValue* function(GParamSpec* pspec) c_g_param_spec_get_default_value; const(char)* function(GParamSpec* pspec) c_g_param_spec_get_name; GQuark function(GParamSpec* pspec) c_g_param_spec_get_name_quark; const(char)* function(GParamSpec* pspec) c_g_param_spec_get_nick; void* function(GParamSpec* pspec, GQuark quark) c_g_param_spec_get_qdata; GParamSpec* function(GParamSpec* pspec) c_g_param_spec_get_redirect_target; GParamSpec* function(GParamSpec* pspec) c_g_param_spec_ref; GParamSpec* function(GParamSpec* pspec) c_g_param_spec_ref_sink; void function(GParamSpec* pspec, GQuark quark, void* data) c_g_param_spec_set_qdata; void function(GParamSpec* pspec, GQuark quark, void* data, GDestroyNotify destroy) c_g_param_spec_set_qdata_full; void function(GParamSpec* pspec) c_g_param_spec_sink; void* function(GParamSpec* pspec, GQuark quark) c_g_param_spec_steal_qdata; void function(GParamSpec* pspec) c_g_param_spec_unref; GType function(const(char)* name, GParamSpecTypeInfo* pspecInfo) c_g_param_type_register_static; int function(GParamSpec* pspec, GValue* srcValue, GValue* destValue, int strictValidation) c_g_param_value_convert; int function(GParamSpec* pspec, GValue* value) c_g_param_value_defaults; void function(GParamSpec* pspec, GValue* value) c_g_param_value_set_default; int function(GParamSpec* pspec, GValue* value) c_g_param_value_validate; int function(GParamSpec* pspec, GValue* value1, GValue* value2) c_g_param_values_cmp; // gobject.ParamSpecPool void function(GParamSpecPool* pool, GParamSpec* pspec, GType ownerType) c_g_param_spec_pool_insert; GParamSpec** function(GParamSpecPool* pool, GType ownerType, uint* nPspecsP) c_g_param_spec_pool_list; GList* function(GParamSpecPool* pool, GType ownerType) c_g_param_spec_pool_list_owned; GParamSpec* function(GParamSpecPool* pool, const(char)* paramName, GType ownerType, int walkAncestors) c_g_param_spec_pool_lookup; void function(GParamSpecPool* pool, GParamSpec* pspec) c_g_param_spec_pool_remove; GParamSpecPool* function(int typePrefixing) c_g_param_spec_pool_new; // gobject.TypeClass void function(void* gClass, size_t privateSize) c_g_type_class_add_private; int function(void* gClass) c_g_type_class_get_instance_private_offset; void* function(GTypeClass* klass, GType privateType) c_g_type_class_get_private; void* function(void* gClass) c_g_type_class_peek_parent; void function(void* gClass) c_g_type_class_unref; void function(void* gClass) c_g_type_class_unref_uncached; void function(void* gClass, int* privateSizeOrOffset) c_g_type_class_adjust_private_offset; void* function(GType type) c_g_type_class_peek; void* function(GType type) c_g_type_class_peek_static; void* function(GType type) c_g_type_class_ref; // gobject.TypeInstance void* function(GTypeInstance* instanc, GType privateType) c_g_type_instance_get_private; // gobject.TypeInterface void* function(void* gIface) c_g_type_interface_peek_parent; void function(GType interfaceType, GType prerequisiteType) c_g_type_interface_add_prerequisite; GTypePlugin* function(GType instanceType, GType interfaceType) c_g_type_interface_get_plugin; void* function(void* instanceClass, GType ifaceType) c_g_type_interface_peek; GType* function(GType interfaceType, uint* nPrerequisites) c_g_type_interface_prerequisites; // gobject.TypeModule GType function() c_g_type_module_get_type; void function(GTypeModule* modul, GType instanceType, GType interfaceType, GInterfaceInfo* interfaceInfo) c_g_type_module_add_interface; GType function(GTypeModule* modul, const(char)* name, GEnumValue* constStaticValues) c_g_type_module_register_enum; GType function(GTypeModule* modul, const(char)* name, GFlagsValue* constStaticValues) c_g_type_module_register_flags; GType function(GTypeModule* modul, GType parentType, const(char)* typeName, GTypeInfo* typeInfo, GTypeFlags flags) c_g_type_module_register_type; void function(GTypeModule* modul, const(char)* name) c_g_type_module_set_name; void function(GTypeModule* modul) c_g_type_module_unuse; int function(GTypeModule* modul) c_g_type_module_use; // gobject.TypePlugin GType function() c_g_type_plugin_get_type; void function(GTypePlugin* plugin, GType instanceType, GType interfaceType, GInterfaceInfo* info) c_g_type_plugin_complete_interface_info; void function(GTypePlugin* plugin, GType gType, GTypeInfo* info, GTypeValueTable* valueTable) c_g_type_plugin_complete_type_info; void function(GTypePlugin* plugin) c_g_type_plugin_unuse; void function(GTypePlugin* plugin) c_g_type_plugin_use; // gobject.TypeValueTable GTypeValueTable* function(GType type) c_g_type_value_table_peek; // gobject.Value GType function() c_g_value_get_type; void function(GValue* srcValue, GValue* destValue) c_g_value_copy; void* function(GValue* value) c_g_value_dup_boxed; void* function(GValue* value) c_g_value_dup_object; GParamSpec* function(GValue* value) c_g_value_dup_param; char* function(GValue* value) c_g_value_dup_string; GVariant* function(GValue* value) c_g_value_dup_variant; int function(GValue* value) c_g_value_fits_pointer; int function(GValue* value) c_g_value_get_boolean; void* function(GValue* value) c_g_value_get_boxed; char function(GValue* value) c_g_value_get_char; double function(GValue* value) c_g_value_get_double; int function(GValue* value) c_g_value_get_enum; uint function(GValue* value) c_g_value_get_flags; float function(GValue* value) c_g_value_get_float; GType function(GValue* value) c_g_value_get_gtype; int function(GValue* value) c_g_value_get_int; long function(GValue* value) c_g_value_get_int64; glong function(GValue* value) c_g_value_get_long; void* function(GValue* value) c_g_value_get_object; GParamSpec* function(GValue* value) c_g_value_get_param; void* function(GValue* value) c_g_value_get_pointer; byte function(GValue* value) c_g_value_get_schar; const(char)* function(GValue* value) c_g_value_get_string; char function(GValue* value) c_g_value_get_uchar; uint function(GValue* value) c_g_value_get_uint; ulong function(GValue* value) c_g_value_get_uint64; gulong function(GValue* value) c_g_value_get_ulong; GVariant* function(GValue* value) c_g_value_get_variant; GValue* function(GValue* value, GType gType) c_g_value_init; void function(GValue* value, void* instanc) c_g_value_init_from_instance; void* function(GValue* value) c_g_value_peek_pointer; GValue* function(GValue* value) c_g_value_reset; void function(GValue* value, int vBoolean) c_g_value_set_boolean; void function(GValue* value, void* vBoxed) c_g_value_set_boxed; void function(GValue* value, void* vBoxed) c_g_value_set_boxed_take_ownership; void function(GValue* value, char vChar) c_g_value_set_char; void function(GValue* value, double vDouble) c_g_value_set_double; void function(GValue* value, int vEnum) c_g_value_set_enum; void function(GValue* value, uint vFlags) c_g_value_set_flags; void function(GValue* value, float vFloat) c_g_value_set_float; void function(GValue* value, GType vGtype) c_g_value_set_gtype; void function(GValue* value, void* instanc) c_g_value_set_instance; void function(GValue* value, int vInt) c_g_value_set_int; void function(GValue* value, long vInt64) c_g_value_set_int64; void function(GValue* value, glong vLong) c_g_value_set_long; void function(GValue* value, void* vObject) c_g_value_set_object; void function(GValue* value, void* vObject) c_g_value_set_object_take_ownership; void function(GValue* value, GParamSpec* param) c_g_value_set_param; void function(GValue* value, GParamSpec* param) c_g_value_set_param_take_ownership; void function(GValue* value, void* vPointer) c_g_value_set_pointer; void function(GValue* value, byte vChar) c_g_value_set_schar; void function(GValue* value, void* vBoxed) c_g_value_set_static_boxed; void function(GValue* value, const(char)* vString) c_g_value_set_static_string; void function(GValue* value, const(char)* vString) c_g_value_set_string; void function(GValue* value, char* vString) c_g_value_set_string_take_ownership; void function(GValue* value, char vUchar) c_g_value_set_uchar; void function(GValue* value, uint vUint) c_g_value_set_uint; void function(GValue* value, ulong vUint64) c_g_value_set_uint64; void function(GValue* value, gulong vUlong) c_g_value_set_ulong; void function(GValue* value, GVariant* variant) c_g_value_set_variant; void function(GValue* value, void* vBoxed) c_g_value_take_boxed; void function(GValue* value, void* vObject) c_g_value_take_object; void function(GValue* value, GParamSpec* param) c_g_value_take_param; void function(GValue* value, char* vString) c_g_value_take_string; void function(GValue* value, GVariant* variant) c_g_value_take_variant; int function(GValue* srcValue, GValue* destValue) c_g_value_transform; void function(GValue* value) c_g_value_unset; void function(GType srcType, GType destType, GValueTransform transformFunc) c_g_value_register_transform_func; int function(GType srcType, GType destType) c_g_value_type_compatible; int function(GType srcType, GType destType) c_g_value_type_transformable; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, int defaultValue, GParamFlags flags) c_g_param_spec_boolean; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, GType boxedType, GParamFlags flags) c_g_param_spec_boxed; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, byte minimum, byte maximum, byte defaultValue, GParamFlags flags) c_g_param_spec_char; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, double minimum, double maximum, double defaultValue, GParamFlags flags) c_g_param_spec_double; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, GType enumType, int defaultValue, GParamFlags flags) c_g_param_spec_enum; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, GType flagsType, uint defaultValue, GParamFlags flags) c_g_param_spec_flags; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, float minimum, float maximum, float defaultValue, GParamFlags flags) c_g_param_spec_float; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, GType isAType, GParamFlags flags) c_g_param_spec_gtype; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, int minimum, int maximum, int defaultValue, GParamFlags flags) c_g_param_spec_int; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, long minimum, long maximum, long defaultValue, GParamFlags flags) c_g_param_spec_int64; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, glong minimum, glong maximum, glong defaultValue, GParamFlags flags) c_g_param_spec_long; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, GType objectType, GParamFlags flags) c_g_param_spec_object; GParamSpec* function(const(char)* name, GParamSpec* overridden) c_g_param_spec_override; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, GType paramType, GParamFlags flags) c_g_param_spec_param; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, GParamFlags flags) c_g_param_spec_pointer; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, const(char)* defaultValue, GParamFlags flags) c_g_param_spec_string; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, ubyte minimum, ubyte maximum, ubyte defaultValue, GParamFlags flags) c_g_param_spec_uchar; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, uint minimum, uint maximum, uint defaultValue, GParamFlags flags) c_g_param_spec_uint; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, ulong minimum, ulong maximum, ulong defaultValue, GParamFlags flags) c_g_param_spec_uint64; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, gulong minimum, gulong maximum, gulong defaultValue, GParamFlags flags) c_g_param_spec_ulong; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, dchar defaultValue, GParamFlags flags) c_g_param_spec_unichar; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, GParamSpec* elementSpec, GParamFlags flags) c_g_param_spec_value_array; GParamSpec* function(const(char)* name, const(char)* nick, const(char)* blurb, GVariantType* type, GVariant* defaultValue, GParamFlags flags) c_g_param_spec_variant; char* function(GValue* value) c_g_strdup_value_contents; // gobject.ValueArray GType function() c_g_value_array_get_type; GValueArray* function(uint nPrealloced) c_g_value_array_new; GValueArray* function(GValueArray* valueArray, GValue* value) c_g_value_array_append; GValueArray* function(GValueArray* valueArray) c_g_value_array_copy; void function(GValueArray* valueArray) c_g_value_array_free; GValue* function(GValueArray* valueArray, uint index) c_g_value_array_get_nth; GValueArray* function(GValueArray* valueArray, uint index, GValue* value) c_g_value_array_insert; GValueArray* function(GValueArray* valueArray, GValue* value) c_g_value_array_prepend; GValueArray* function(GValueArray* valueArray, uint index) c_g_value_array_remove; GValueArray* function(GValueArray* valueArray, GCompareFunc compareFunc) c_g_value_array_sort; GValueArray* function(GValueArray* valueArray, GCompareDataFunc compareFunc, void* userData) c_g_value_array_sort_with_data; // gobject.WeakRef void function(GWeakRef* weakRef) c_g_weak_ref_clear; void* function(GWeakRef* weakRef) c_g_weak_ref_get; void function(GWeakRef* weakRef, void* object) c_g_weak_ref_init; void function(GWeakRef* weakRef, void* object) c_g_weak_ref_set; // gobject.Signals int function(GSignalInvocationHint* ihint, GValue* returnAccu, GValue* handlerReturn, void* dummy) c_g_signal_accumulator_first_wins; int function(GSignalInvocationHint* ihint, GValue* returnAccu, GValue* handlerReturn, void* dummy) c_g_signal_accumulator_true_handled; gulong function(uint signalId, GQuark detail, GSignalEmissionHook hookFunc, void* hookData, GDestroyNotify dataDestroy) c_g_signal_add_emission_hook; void function(GValue* instanceAndParams, GValue* returnValue) c_g_signal_chain_from_overridden; void function(void* instanc, ... ) c_g_signal_chain_from_overridden_handler; gulong function(void* instanc, const(char)* detailedSignal, GClosure* closure, int after) c_g_signal_connect_closure; gulong function(void* instanc, uint signalId, GQuark detail, GClosure* closure, int after) c_g_signal_connect_closure_by_id; gulong function(void* instanc, const(char)* detailedSignal, GCallback cHandler, void* data, GClosureNotify destroyData, GConnectFlags connectFlags) c_g_signal_connect_data; gulong function(void* instanc, const(char)* detailedSignal, GCallback cHandler, void* gobject, GConnectFlags connectFlags) c_g_signal_connect_object; void function(void* instanc, uint signalId, GQuark detail, ... ) c_g_signal_emit; void function(void* instanc, const(char)* detailedSignal, ... ) c_g_signal_emit_by_name; void function(void* instanc, uint signalId, GQuark detail, void* varArgs) c_g_signal_emit_valist; void function(GValue* instanceAndParams, uint signalId, GQuark detail, GValue* returnValue) c_g_signal_emitv; GSignalInvocationHint* function(void* instanc) c_g_signal_get_invocation_hint; void function(void* instanc, gulong handlerId) c_g_signal_handler_block; void function(void* instanc, gulong handlerId) c_g_signal_handler_disconnect; gulong function(void* instanc, GSignalMatchType mask, uint signalId, GQuark detail, GClosure* closure, void* func, void* data) c_g_signal_handler_find; int function(void* instanc, gulong handlerId) c_g_signal_handler_is_connected; void function(void* instanc, gulong handlerId) c_g_signal_handler_unblock; uint function(void* instanc, GSignalMatchType mask, uint signalId, GQuark detail, GClosure* closure, void* func, void* data) c_g_signal_handlers_block_matched; void function(void* instanc) c_g_signal_handlers_destroy; uint function(void* instanc, GSignalMatchType mask, uint signalId, GQuark detail, GClosure* closure, void* func, void* data) c_g_signal_handlers_disconnect_matched; uint function(void* instanc, GSignalMatchType mask, uint signalId, GQuark detail, GClosure* closure, void* func, void* data) c_g_signal_handlers_unblock_matched; int function(void* instanc, uint signalId, GQuark detail, int mayBeBlocked) c_g_signal_has_handler_pending; uint* function(GType itype, uint* nIds) c_g_signal_list_ids; uint function(const(char)* name, GType itype) c_g_signal_lookup; const(char)* function(uint signalId) c_g_signal_name; uint function(const(char)* signalName, GType itype, GSignalFlags signalFlags, uint classOffset, GSignalAccumulator accumulator, void* accuData, GSignalCMarshaller cMarshaller, GType returnType, uint nParams, ... ) c_g_signal_new; uint function(const(char)* signalName, GType itype, GSignalFlags signalFlags, GCallback classHandler, GSignalAccumulator accumulator, void* accuData, GSignalCMarshaller cMarshaller, GType returnType, uint nParams, ... ) c_g_signal_new_class_handler; uint function(const(char)* signalName, GType itype, GSignalFlags signalFlags, GClosure* classClosure, GSignalAccumulator accumulator, void* accuData, GSignalCMarshaller cMarshaller, GType returnType, uint nParams, void* args) c_g_signal_new_valist; uint function(const(char)* signalName, GType itype, GSignalFlags signalFlags, GClosure* classClosure, GSignalAccumulator accumulator, void* accuData, GSignalCMarshaller cMarshaller, GType returnType, uint nParams, GType* paramTypes) c_g_signal_newv; void function(uint signalId, GType instanceType, GClosure* classClosure) c_g_signal_override_class_closure; void function(const(char)* signalName, GType instanceType, GCallback classHandler) c_g_signal_override_class_handler; int function(const(char)* detailedSignal, GType itype, uint* signalIdP, GQuark* detailP, int forceDetailQuark) c_g_signal_parse_name; void function(uint signalId, GSignalQuery* query) c_g_signal_query; void function(uint signalId, gulong hookId) c_g_signal_remove_emission_hook; void function(uint signalId, GType instanceType, GSignalCVaMarshaller vaMarshaller) c_g_signal_set_va_marshaller; void function(void* instanc, uint signalId, GQuark detail) c_g_signal_stop_emission; void function(void* instanc, const(char)* detailedSignal) c_g_signal_stop_emission_by_name; GClosure* function(GType itype, uint structOffset) c_g_signal_type_cclosure_new; // gobject.Type void function(void* cacheData, GTypeClassCacheFunc cacheFunc) c_g_type_add_class_cache_func; void function(GType classType, size_t privateSize) c_g_type_add_class_private; int function(GType classType, size_t privateSize) c_g_type_add_instance_private; void function(void* checkData, GTypeInterfaceCheckFunc checkFunc) c_g_type_add_interface_check; void function(GType instanceType, GType interfaceType, GTypePlugin* plugin) c_g_type_add_interface_dynamic; void function(GType instanceType, GType interfaceType, GInterfaceInfo* info) c_g_type_add_interface_static; GTypeClass* function(GTypeClass* gClass, GType isAType) c_g_type_check_class_cast; int function(GTypeClass* gClass, GType isAType) c_g_type_check_class_is_a; int function(GTypeInstance* instanc) c_g_type_check_instance; GTypeInstance* function(GTypeInstance* instanc, GType ifaceType) c_g_type_check_instance_cast; int function(GTypeInstance* instanc, GType ifaceType) c_g_type_check_instance_is_a; int function(GTypeInstance* instanc, GType fundamentalType) c_g_type_check_instance_is_fundamentally_a; int function(GType type) c_g_type_check_is_value_type; int function(GValue* value) c_g_type_check_value; int function(GValue* value, GType type) c_g_type_check_value_holds; GType* function(GType type, uint* nChildren) c_g_type_children; GTypeInstance* function(GType type) c_g_type_create_instance; void* function(GType gType) c_g_type_default_interface_peek; void* function(GType gType) c_g_type_default_interface_ref; void function(void* gIface) c_g_type_default_interface_unref; uint function(GType type) c_g_type_depth; void function(GType type) c_g_type_ensure; void function(GTypeInstance* instanc) c_g_type_free_instance; GType function(const(char)* name) c_g_type_from_name; GType function(GType typeId) c_g_type_fundamental; GType function() c_g_type_fundamental_next; GTypePlugin* function(GType type) c_g_type_get_plugin; void* function(GType type, GQuark quark) c_g_type_get_qdata; uint function() c_g_type_get_type_registration_serial; void function() c_g_type_init; void function(GTypeDebugFlags debugFlags) c_g_type_init_with_debug_flags; GType* function(GType type, uint* nInterfaces) c_g_type_interfaces; int function(GType type, GType isAType) c_g_type_is_a; const(char)* function(GType type) c_g_type_name; const(char)* function(GTypeClass* gClass) c_g_type_name_from_class; const(char)* function(GTypeInstance* instanc) c_g_type_name_from_instance; GType function(GType leafType, GType rootType) c_g_type_next_base; GType function(GType type) c_g_type_parent; GQuark function(GType type) c_g_type_qname; void function(GType type, GTypeQuery* query) c_g_type_query; GType function(GType parentType, const(char)* typeName, GTypePlugin* plugin, GTypeFlags flags) c_g_type_register_dynamic; GType function(GType typeId, const(char)* typeName, GTypeInfo* info, GTypeFundamentalInfo* finfo, GTypeFlags flags) c_g_type_register_fundamental; GType function(GType parentType, const(char)* typeName, GTypeInfo* info, GTypeFlags flags) c_g_type_register_static; GType function(GType parentType, const(char)* typeName, uint classSize, GClassInitFunc classInit, uint instanceSize, GInstanceInitFunc instanceInit, GTypeFlags flags) c_g_type_register_static_simple; void function(void* cacheData, GTypeClassCacheFunc cacheFunc) c_g_type_remove_class_cache_func; void function(void* checkData, GTypeInterfaceCheckFunc checkFunc) c_g_type_remove_interface_check; void function(GType type, GQuark quark, void* data) c_g_type_set_qdata; int function(GType type, uint flags) c_g_type_test_flags; int function(GType type) c_g_type_get_instance_count; // gobject.Boxed void* function(GType boxedType, void* srcBoxed) c_g_boxed_copy; void function(GType boxedType, void* boxed) c_g_boxed_free; GType function(const(char)* name, GBoxedCopyFunc boxedCopy, GBoxedFreeFunc boxedFree) c_g_boxed_type_register_static; GType function(const(char)* name) c_g_pointer_type_register_static; // gobject.Enums void function(GType gEnumType, GTypeInfo* info, GEnumValue* constValues) c_g_enum_complete_type_info; GEnumValue* function(GEnumClass* enumClass, int value) c_g_enum_get_value; GEnumValue* function(GEnumClass* enumClass, const(char)* name) c_g_enum_get_value_by_name; GEnumValue* function(GEnumClass* enumClass, const(char)* nick) c_g_enum_get_value_by_nick; GType function(const(char)* name, GEnumValue* constStaticValues) c_g_enum_register_static; char* function(GType gEnumType, int value) c_g_enum_to_string; char* function(GType flagsType, uint value) c_g_flags_to_string; // gobject.Flags void function(GType gFlagsType, GTypeInfo* info, GFlagsValue* constValues) c_g_flags_complete_type_info; GFlagsValue* function(GFlagsClass* flagsClass, uint value) c_g_flags_get_first_value; GFlagsValue* function(GFlagsClass* flagsClass, const(char)* name) c_g_flags_get_value_by_name; GFlagsValue* function(GFlagsClass* flagsClass, const(char)* nick) c_g_flags_get_value_by_nick; GType function(const(char)* name, GFlagsValue* constStaticValues) c_g_flags_register_static; } // gobject.Binding alias c_g_binding_get_type g_binding_get_type; alias c_g_binding_get_flags g_binding_get_flags; alias c_g_binding_get_source g_binding_get_source; alias c_g_binding_get_source_property g_binding_get_source_property; alias c_g_binding_get_target g_binding_get_target; alias c_g_binding_get_target_property g_binding_get_target_property; alias c_g_binding_unbind g_binding_unbind; // gobject.CClosure alias c_g_cclosure_marshal_BOOLEAN__BOXED_BOXED g_cclosure_marshal_BOOLEAN__BOXED_BOXED; alias c_g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv g_cclosure_marshal_BOOLEAN__BOXED_BOXEDv; alias c_g_cclosure_marshal_BOOLEAN__FLAGS g_cclosure_marshal_BOOLEAN__FLAGS; alias c_g_cclosure_marshal_BOOLEAN__FLAGSv g_cclosure_marshal_BOOLEAN__FLAGSv; alias c_g_cclosure_marshal_STRING__OBJECT_POINTER g_cclosure_marshal_STRING__OBJECT_POINTER; alias c_g_cclosure_marshal_STRING__OBJECT_POINTERv g_cclosure_marshal_STRING__OBJECT_POINTERv; alias c_g_cclosure_marshal_VOID__BOOLEAN g_cclosure_marshal_VOID__BOOLEAN; alias c_g_cclosure_marshal_VOID__BOOLEANv g_cclosure_marshal_VOID__BOOLEANv; alias c_g_cclosure_marshal_VOID__BOXED g_cclosure_marshal_VOID__BOXED; alias c_g_cclosure_marshal_VOID__BOXEDv g_cclosure_marshal_VOID__BOXEDv; alias c_g_cclosure_marshal_VOID__CHAR g_cclosure_marshal_VOID__CHAR; alias c_g_cclosure_marshal_VOID__CHARv g_cclosure_marshal_VOID__CHARv; alias c_g_cclosure_marshal_VOID__DOUBLE g_cclosure_marshal_VOID__DOUBLE; alias c_g_cclosure_marshal_VOID__DOUBLEv g_cclosure_marshal_VOID__DOUBLEv; alias c_g_cclosure_marshal_VOID__ENUM g_cclosure_marshal_VOID__ENUM; alias c_g_cclosure_marshal_VOID__ENUMv g_cclosure_marshal_VOID__ENUMv; alias c_g_cclosure_marshal_VOID__FLAGS g_cclosure_marshal_VOID__FLAGS; alias c_g_cclosure_marshal_VOID__FLAGSv g_cclosure_marshal_VOID__FLAGSv; alias c_g_cclosure_marshal_VOID__FLOAT g_cclosure_marshal_VOID__FLOAT; alias c_g_cclosure_marshal_VOID__FLOATv g_cclosure_marshal_VOID__FLOATv; alias c_g_cclosure_marshal_VOID__INT g_cclosure_marshal_VOID__INT; alias c_g_cclosure_marshal_VOID__INTv g_cclosure_marshal_VOID__INTv; alias c_g_cclosure_marshal_VOID__LONG g_cclosure_marshal_VOID__LONG; alias c_g_cclosure_marshal_VOID__LONGv g_cclosure_marshal_VOID__LONGv; alias c_g_cclosure_marshal_VOID__OBJECT g_cclosure_marshal_VOID__OBJECT; alias c_g_cclosure_marshal_VOID__OBJECTv g_cclosure_marshal_VOID__OBJECTv; alias c_g_cclosure_marshal_VOID__PARAM g_cclosure_marshal_VOID__PARAM; alias c_g_cclosure_marshal_VOID__PARAMv g_cclosure_marshal_VOID__PARAMv; alias c_g_cclosure_marshal_VOID__POINTER g_cclosure_marshal_VOID__POINTER; alias c_g_cclosure_marshal_VOID__POINTERv g_cclosure_marshal_VOID__POINTERv; alias c_g_cclosure_marshal_VOID__STRING g_cclosure_marshal_VOID__STRING; alias c_g_cclosure_marshal_VOID__STRINGv g_cclosure_marshal_VOID__STRINGv; alias c_g_cclosure_marshal_VOID__UCHAR g_cclosure_marshal_VOID__UCHAR; alias c_g_cclosure_marshal_VOID__UCHARv g_cclosure_marshal_VOID__UCHARv; alias c_g_cclosure_marshal_VOID__UINT g_cclosure_marshal_VOID__UINT; alias c_g_cclosure_marshal_VOID__UINT_POINTER g_cclosure_marshal_VOID__UINT_POINTER; alias c_g_cclosure_marshal_VOID__UINT_POINTERv g_cclosure_marshal_VOID__UINT_POINTERv; alias c_g_cclosure_marshal_VOID__UINTv g_cclosure_marshal_VOID__UINTv; alias c_g_cclosure_marshal_VOID__ULONG g_cclosure_marshal_VOID__ULONG; alias c_g_cclosure_marshal_VOID__ULONGv g_cclosure_marshal_VOID__ULONGv; alias c_g_cclosure_marshal_VOID__VARIANT g_cclosure_marshal_VOID__VARIANT; alias c_g_cclosure_marshal_VOID__VARIANTv g_cclosure_marshal_VOID__VARIANTv; alias c_g_cclosure_marshal_VOID__VOID g_cclosure_marshal_VOID__VOID; alias c_g_cclosure_marshal_VOID__VOIDv g_cclosure_marshal_VOID__VOIDv; alias c_g_cclosure_marshal_generic g_cclosure_marshal_generic; alias c_g_cclosure_marshal_generic_va g_cclosure_marshal_generic_va; alias c_g_cclosure_new g_cclosure_new; alias c_g_cclosure_new_object g_cclosure_new_object; alias c_g_cclosure_new_object_swap g_cclosure_new_object_swap; alias c_g_cclosure_new_swap g_cclosure_new_swap; // gobject.Closure alias c_g_closure_get_type g_closure_get_type; alias c_g_closure_new_object g_closure_new_object; alias c_g_closure_new_simple g_closure_new_simple; alias c_g_closure_add_finalize_notifier g_closure_add_finalize_notifier; alias c_g_closure_add_invalidate_notifier g_closure_add_invalidate_notifier; alias c_g_closure_add_marshal_guards g_closure_add_marshal_guards; alias c_g_closure_invalidate g_closure_invalidate; alias c_g_closure_invoke g_closure_invoke; alias c_g_closure_ref g_closure_ref; alias c_g_closure_remove_finalize_notifier g_closure_remove_finalize_notifier; alias c_g_closure_remove_invalidate_notifier g_closure_remove_invalidate_notifier; alias c_g_closure_set_marshal g_closure_set_marshal; alias c_g_closure_set_meta_marshal g_closure_set_meta_marshal; alias c_g_closure_sink g_closure_sink; alias c_g_closure_unref g_closure_unref; alias c_g_source_set_closure g_source_set_closure; alias c_g_source_set_dummy_callback g_source_set_dummy_callback; // gobject.ObjectG alias c_g_initially_unowned_get_type g_initially_unowned_get_type; alias c_g_object_new g_object_new; alias c_g_object_new_valist g_object_new_valist; alias c_g_object_new_with_properties g_object_new_with_properties; alias c_g_object_newv g_object_newv; alias c_g_object_compat_control g_object_compat_control; alias c_g_object_interface_find_property g_object_interface_find_property; alias c_g_object_interface_install_property g_object_interface_install_property; alias c_g_object_interface_list_properties g_object_interface_list_properties; alias c_g_object_add_toggle_ref g_object_add_toggle_ref; alias c_g_object_add_weak_pointer g_object_add_weak_pointer; alias c_g_object_bind_property g_object_bind_property; alias c_g_object_bind_property_full g_object_bind_property_full; alias c_g_object_bind_property_with_closures g_object_bind_property_with_closures; alias c_g_object_connect g_object_connect; alias c_g_object_disconnect g_object_disconnect; alias c_g_object_dup_data g_object_dup_data; alias c_g_object_dup_qdata g_object_dup_qdata; alias c_g_object_force_floating g_object_force_floating; alias c_g_object_freeze_notify g_object_freeze_notify; alias c_g_object_get g_object_get; alias c_g_object_get_data g_object_get_data; alias c_g_object_get_property g_object_get_property; alias c_g_object_get_qdata g_object_get_qdata; alias c_g_object_get_valist g_object_get_valist; alias c_g_object_getv g_object_getv; alias c_g_object_is_floating g_object_is_floating; alias c_g_object_notify g_object_notify; alias c_g_object_notify_by_pspec g_object_notify_by_pspec; alias c_g_object_ref g_object_ref; alias c_g_object_ref_sink g_object_ref_sink; alias c_g_object_remove_toggle_ref g_object_remove_toggle_ref; alias c_g_object_remove_weak_pointer g_object_remove_weak_pointer; alias c_g_object_replace_data g_object_replace_data; alias c_g_object_replace_qdata g_object_replace_qdata; alias c_g_object_run_dispose g_object_run_dispose; alias c_g_object_set g_object_set; alias c_g_object_set_data g_object_set_data; alias c_g_object_set_data_full g_object_set_data_full; alias c_g_object_set_property g_object_set_property; alias c_g_object_set_qdata g_object_set_qdata; alias c_g_object_set_qdata_full g_object_set_qdata_full; alias c_g_object_set_valist g_object_set_valist; alias c_g_object_setv g_object_setv; alias c_g_object_steal_data g_object_steal_data; alias c_g_object_steal_qdata g_object_steal_qdata; alias c_g_object_thaw_notify g_object_thaw_notify; alias c_g_object_unref g_object_unref; alias c_g_object_watch_closure g_object_watch_closure; alias c_g_object_weak_ref g_object_weak_ref; alias c_g_object_weak_unref g_object_weak_unref; alias c_g_clear_object g_clear_object; // gobject.ObjectClass alias c_g_object_class_find_property g_object_class_find_property; alias c_g_object_class_install_properties g_object_class_install_properties; alias c_g_object_class_install_property g_object_class_install_property; alias c_g_object_class_list_properties g_object_class_list_properties; alias c_g_object_class_override_property g_object_class_override_property; // gobject.ParamSpec alias c_g_param_spec_internal g_param_spec_internal; alias c_g_param_spec_get_blurb g_param_spec_get_blurb; alias c_g_param_spec_get_default_value g_param_spec_get_default_value; alias c_g_param_spec_get_name g_param_spec_get_name; alias c_g_param_spec_get_name_quark g_param_spec_get_name_quark; alias c_g_param_spec_get_nick g_param_spec_get_nick; alias c_g_param_spec_get_qdata g_param_spec_get_qdata; alias c_g_param_spec_get_redirect_target g_param_spec_get_redirect_target; alias c_g_param_spec_ref g_param_spec_ref; alias c_g_param_spec_ref_sink g_param_spec_ref_sink; alias c_g_param_spec_set_qdata g_param_spec_set_qdata; alias c_g_param_spec_set_qdata_full g_param_spec_set_qdata_full; alias c_g_param_spec_sink g_param_spec_sink; alias c_g_param_spec_steal_qdata g_param_spec_steal_qdata; alias c_g_param_spec_unref g_param_spec_unref; alias c_g_param_type_register_static g_param_type_register_static; alias c_g_param_value_convert g_param_value_convert; alias c_g_param_value_defaults g_param_value_defaults; alias c_g_param_value_set_default g_param_value_set_default; alias c_g_param_value_validate g_param_value_validate; alias c_g_param_values_cmp g_param_values_cmp; // gobject.ParamSpecPool alias c_g_param_spec_pool_insert g_param_spec_pool_insert; alias c_g_param_spec_pool_list g_param_spec_pool_list; alias c_g_param_spec_pool_list_owned g_param_spec_pool_list_owned; alias c_g_param_spec_pool_lookup g_param_spec_pool_lookup; alias c_g_param_spec_pool_remove g_param_spec_pool_remove; alias c_g_param_spec_pool_new g_param_spec_pool_new; // gobject.TypeClass alias c_g_type_class_add_private g_type_class_add_private; alias c_g_type_class_get_instance_private_offset g_type_class_get_instance_private_offset; alias c_g_type_class_get_private g_type_class_get_private; alias c_g_type_class_peek_parent g_type_class_peek_parent; alias c_g_type_class_unref g_type_class_unref; alias c_g_type_class_unref_uncached g_type_class_unref_uncached; alias c_g_type_class_adjust_private_offset g_type_class_adjust_private_offset; alias c_g_type_class_peek g_type_class_peek; alias c_g_type_class_peek_static g_type_class_peek_static; alias c_g_type_class_ref g_type_class_ref; // gobject.TypeInstance alias c_g_type_instance_get_private g_type_instance_get_private; // gobject.TypeInterface alias c_g_type_interface_peek_parent g_type_interface_peek_parent; alias c_g_type_interface_add_prerequisite g_type_interface_add_prerequisite; alias c_g_type_interface_get_plugin g_type_interface_get_plugin; alias c_g_type_interface_peek g_type_interface_peek; alias c_g_type_interface_prerequisites g_type_interface_prerequisites; // gobject.TypeModule alias c_g_type_module_get_type g_type_module_get_type; alias c_g_type_module_add_interface g_type_module_add_interface; alias c_g_type_module_register_enum g_type_module_register_enum; alias c_g_type_module_register_flags g_type_module_register_flags; alias c_g_type_module_register_type g_type_module_register_type; alias c_g_type_module_set_name g_type_module_set_name; alias c_g_type_module_unuse g_type_module_unuse; alias c_g_type_module_use g_type_module_use; // gobject.TypePlugin alias c_g_type_plugin_get_type g_type_plugin_get_type; alias c_g_type_plugin_complete_interface_info g_type_plugin_complete_interface_info; alias c_g_type_plugin_complete_type_info g_type_plugin_complete_type_info; alias c_g_type_plugin_unuse g_type_plugin_unuse; alias c_g_type_plugin_use g_type_plugin_use; // gobject.TypeValueTable alias c_g_type_value_table_peek g_type_value_table_peek; // gobject.Value alias c_g_value_get_type g_value_get_type; alias c_g_value_copy g_value_copy; alias c_g_value_dup_boxed g_value_dup_boxed; alias c_g_value_dup_object g_value_dup_object; alias c_g_value_dup_param g_value_dup_param; alias c_g_value_dup_string g_value_dup_string; alias c_g_value_dup_variant g_value_dup_variant; alias c_g_value_fits_pointer g_value_fits_pointer; alias c_g_value_get_boolean g_value_get_boolean; alias c_g_value_get_boxed g_value_get_boxed; alias c_g_value_get_char g_value_get_char; alias c_g_value_get_double g_value_get_double; alias c_g_value_get_enum g_value_get_enum; alias c_g_value_get_flags g_value_get_flags; alias c_g_value_get_float g_value_get_float; alias c_g_value_get_gtype g_value_get_gtype; alias c_g_value_get_int g_value_get_int; alias c_g_value_get_int64 g_value_get_int64; alias c_g_value_get_long g_value_get_long; alias c_g_value_get_object g_value_get_object; alias c_g_value_get_param g_value_get_param; alias c_g_value_get_pointer g_value_get_pointer; alias c_g_value_get_schar g_value_get_schar; alias c_g_value_get_string g_value_get_string; alias c_g_value_get_uchar g_value_get_uchar; alias c_g_value_get_uint g_value_get_uint; alias c_g_value_get_uint64 g_value_get_uint64; alias c_g_value_get_ulong g_value_get_ulong; alias c_g_value_get_variant g_value_get_variant; alias c_g_value_init g_value_init; alias c_g_value_init_from_instance g_value_init_from_instance; alias c_g_value_peek_pointer g_value_peek_pointer; alias c_g_value_reset g_value_reset; alias c_g_value_set_boolean g_value_set_boolean; alias c_g_value_set_boxed g_value_set_boxed; alias c_g_value_set_boxed_take_ownership g_value_set_boxed_take_ownership; alias c_g_value_set_char g_value_set_char; alias c_g_value_set_double g_value_set_double; alias c_g_value_set_enum g_value_set_enum; alias c_g_value_set_flags g_value_set_flags; alias c_g_value_set_float g_value_set_float; alias c_g_value_set_gtype g_value_set_gtype; alias c_g_value_set_instance g_value_set_instance; alias c_g_value_set_int g_value_set_int; alias c_g_value_set_int64 g_value_set_int64; alias c_g_value_set_long g_value_set_long; alias c_g_value_set_object g_value_set_object; alias c_g_value_set_object_take_ownership g_value_set_object_take_ownership; alias c_g_value_set_param g_value_set_param; alias c_g_value_set_param_take_ownership g_value_set_param_take_ownership; alias c_g_value_set_pointer g_value_set_pointer; alias c_g_value_set_schar g_value_set_schar; alias c_g_value_set_static_boxed g_value_set_static_boxed; alias c_g_value_set_static_string g_value_set_static_string; alias c_g_value_set_string g_value_set_string; alias c_g_value_set_string_take_ownership g_value_set_string_take_ownership; alias c_g_value_set_uchar g_value_set_uchar; alias c_g_value_set_uint g_value_set_uint; alias c_g_value_set_uint64 g_value_set_uint64; alias c_g_value_set_ulong g_value_set_ulong; alias c_g_value_set_variant g_value_set_variant; alias c_g_value_take_boxed g_value_take_boxed; alias c_g_value_take_object g_value_take_object; alias c_g_value_take_param g_value_take_param; alias c_g_value_take_string g_value_take_string; alias c_g_value_take_variant g_value_take_variant; alias c_g_value_transform g_value_transform; alias c_g_value_unset g_value_unset; alias c_g_value_register_transform_func g_value_register_transform_func; alias c_g_value_type_compatible g_value_type_compatible; alias c_g_value_type_transformable g_value_type_transformable; alias c_g_param_spec_boolean g_param_spec_boolean; alias c_g_param_spec_boxed g_param_spec_boxed; alias c_g_param_spec_char g_param_spec_char; alias c_g_param_spec_double g_param_spec_double; alias c_g_param_spec_enum g_param_spec_enum; alias c_g_param_spec_flags g_param_spec_flags; alias c_g_param_spec_float g_param_spec_float; alias c_g_param_spec_gtype g_param_spec_gtype; alias c_g_param_spec_int g_param_spec_int; alias c_g_param_spec_int64 g_param_spec_int64; alias c_g_param_spec_long g_param_spec_long; alias c_g_param_spec_object g_param_spec_object; alias c_g_param_spec_override g_param_spec_override; alias c_g_param_spec_param g_param_spec_param; alias c_g_param_spec_pointer g_param_spec_pointer; alias c_g_param_spec_string g_param_spec_string; alias c_g_param_spec_uchar g_param_spec_uchar; alias c_g_param_spec_uint g_param_spec_uint; alias c_g_param_spec_uint64 g_param_spec_uint64; alias c_g_param_spec_ulong g_param_spec_ulong; alias c_g_param_spec_unichar g_param_spec_unichar; alias c_g_param_spec_value_array g_param_spec_value_array; alias c_g_param_spec_variant g_param_spec_variant; alias c_g_strdup_value_contents g_strdup_value_contents; // gobject.ValueArray alias c_g_value_array_get_type g_value_array_get_type; alias c_g_value_array_new g_value_array_new; alias c_g_value_array_append g_value_array_append; alias c_g_value_array_copy g_value_array_copy; alias c_g_value_array_free g_value_array_free; alias c_g_value_array_get_nth g_value_array_get_nth; alias c_g_value_array_insert g_value_array_insert; alias c_g_value_array_prepend g_value_array_prepend; alias c_g_value_array_remove g_value_array_remove; alias c_g_value_array_sort g_value_array_sort; alias c_g_value_array_sort_with_data g_value_array_sort_with_data; // gobject.WeakRef alias c_g_weak_ref_clear g_weak_ref_clear; alias c_g_weak_ref_get g_weak_ref_get; alias c_g_weak_ref_init g_weak_ref_init; alias c_g_weak_ref_set g_weak_ref_set; // gobject.Signals alias c_g_signal_accumulator_first_wins g_signal_accumulator_first_wins; alias c_g_signal_accumulator_true_handled g_signal_accumulator_true_handled; alias c_g_signal_add_emission_hook g_signal_add_emission_hook; alias c_g_signal_chain_from_overridden g_signal_chain_from_overridden; alias c_g_signal_chain_from_overridden_handler g_signal_chain_from_overridden_handler; alias c_g_signal_connect_closure g_signal_connect_closure; alias c_g_signal_connect_closure_by_id g_signal_connect_closure_by_id; alias c_g_signal_connect_data g_signal_connect_data; alias c_g_signal_connect_object g_signal_connect_object; alias c_g_signal_emit g_signal_emit; alias c_g_signal_emit_by_name g_signal_emit_by_name; alias c_g_signal_emit_valist g_signal_emit_valist; alias c_g_signal_emitv g_signal_emitv; alias c_g_signal_get_invocation_hint g_signal_get_invocation_hint; alias c_g_signal_handler_block g_signal_handler_block; alias c_g_signal_handler_disconnect g_signal_handler_disconnect; alias c_g_signal_handler_find g_signal_handler_find; alias c_g_signal_handler_is_connected g_signal_handler_is_connected; alias c_g_signal_handler_unblock g_signal_handler_unblock; alias c_g_signal_handlers_block_matched g_signal_handlers_block_matched; alias c_g_signal_handlers_destroy g_signal_handlers_destroy; alias c_g_signal_handlers_disconnect_matched g_signal_handlers_disconnect_matched; alias c_g_signal_handlers_unblock_matched g_signal_handlers_unblock_matched; alias c_g_signal_has_handler_pending g_signal_has_handler_pending; alias c_g_signal_list_ids g_signal_list_ids; alias c_g_signal_lookup g_signal_lookup; alias c_g_signal_name g_signal_name; alias c_g_signal_new g_signal_new; alias c_g_signal_new_class_handler g_signal_new_class_handler; alias c_g_signal_new_valist g_signal_new_valist; alias c_g_signal_newv g_signal_newv; alias c_g_signal_override_class_closure g_signal_override_class_closure; alias c_g_signal_override_class_handler g_signal_override_class_handler; alias c_g_signal_parse_name g_signal_parse_name; alias c_g_signal_query g_signal_query; alias c_g_signal_remove_emission_hook g_signal_remove_emission_hook; alias c_g_signal_set_va_marshaller g_signal_set_va_marshaller; alias c_g_signal_stop_emission g_signal_stop_emission; alias c_g_signal_stop_emission_by_name g_signal_stop_emission_by_name; alias c_g_signal_type_cclosure_new g_signal_type_cclosure_new; // gobject.Type alias c_g_type_add_class_cache_func g_type_add_class_cache_func; alias c_g_type_add_class_private g_type_add_class_private; alias c_g_type_add_instance_private g_type_add_instance_private; alias c_g_type_add_interface_check g_type_add_interface_check; alias c_g_type_add_interface_dynamic g_type_add_interface_dynamic; alias c_g_type_add_interface_static g_type_add_interface_static; alias c_g_type_check_class_cast g_type_check_class_cast; alias c_g_type_check_class_is_a g_type_check_class_is_a; alias c_g_type_check_instance g_type_check_instance; alias c_g_type_check_instance_cast g_type_check_instance_cast; alias c_g_type_check_instance_is_a g_type_check_instance_is_a; alias c_g_type_check_instance_is_fundamentally_a g_type_check_instance_is_fundamentally_a; alias c_g_type_check_is_value_type g_type_check_is_value_type; alias c_g_type_check_value g_type_check_value; alias c_g_type_check_value_holds g_type_check_value_holds; alias c_g_type_children g_type_children; alias c_g_type_create_instance g_type_create_instance; alias c_g_type_default_interface_peek g_type_default_interface_peek; alias c_g_type_default_interface_ref g_type_default_interface_ref; alias c_g_type_default_interface_unref g_type_default_interface_unref; alias c_g_type_depth g_type_depth; alias c_g_type_ensure g_type_ensure; alias c_g_type_free_instance g_type_free_instance; alias c_g_type_from_name g_type_from_name; alias c_g_type_fundamental g_type_fundamental; alias c_g_type_fundamental_next g_type_fundamental_next; alias c_g_type_get_plugin g_type_get_plugin; alias c_g_type_get_qdata g_type_get_qdata; alias c_g_type_get_type_registration_serial g_type_get_type_registration_serial; alias c_g_type_init g_type_init; alias c_g_type_init_with_debug_flags g_type_init_with_debug_flags; alias c_g_type_interfaces g_type_interfaces; alias c_g_type_is_a g_type_is_a; alias c_g_type_name g_type_name; alias c_g_type_name_from_class g_type_name_from_class; alias c_g_type_name_from_instance g_type_name_from_instance; alias c_g_type_next_base g_type_next_base; alias c_g_type_parent g_type_parent; alias c_g_type_qname g_type_qname; alias c_g_type_query g_type_query; alias c_g_type_register_dynamic g_type_register_dynamic; alias c_g_type_register_fundamental g_type_register_fundamental; alias c_g_type_register_static g_type_register_static; alias c_g_type_register_static_simple g_type_register_static_simple; alias c_g_type_remove_class_cache_func g_type_remove_class_cache_func; alias c_g_type_remove_interface_check g_type_remove_interface_check; alias c_g_type_set_qdata g_type_set_qdata; alias c_g_type_test_flags g_type_test_flags; alias c_g_type_get_instance_count g_type_get_instance_count; // gobject.Boxed alias c_g_boxed_copy g_boxed_copy; alias c_g_boxed_free g_boxed_free; alias c_g_boxed_type_register_static g_boxed_type_register_static; alias c_g_pointer_type_register_static g_pointer_type_register_static; // gobject.Enums alias c_g_enum_complete_type_info g_enum_complete_type_info; alias c_g_enum_get_value g_enum_get_value; alias c_g_enum_get_value_by_name g_enum_get_value_by_name; alias c_g_enum_get_value_by_nick g_enum_get_value_by_nick; alias c_g_enum_register_static g_enum_register_static; alias c_g_enum_to_string g_enum_to_string; alias c_g_flags_to_string g_flags_to_string; // gobject.Flags alias c_g_flags_complete_type_info g_flags_complete_type_info; alias c_g_flags_get_first_value g_flags_get_first_value; alias c_g_flags_get_value_by_name g_flags_get_value_by_name; alias c_g_flags_get_value_by_nick g_flags_get_value_by_nick; alias c_g_flags_register_static g_flags_register_static; GtkD-3.7.5/generated/gtkd/gobject/c/types.d000066400000000000000000001466311324604450400204330ustar00rootroot00000000000000/* * 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 gobject.c.types; public import glib.c.types; /** * This is the signature of marshaller functions, required to marshall * arrays of parameter values to signal emissions into C language callback * invocations. It is merely an alias to #GClosureMarshal since the #GClosure * mechanism takes over responsibility of actual function invocation for the * signal system. */ public alias GClosureMarshal GSignalCMarshaller; /** * This is the signature of va_list marshaller functions, an optional * marshaller that can be used in some situations to avoid * marshalling the signal argument into GValues. */ public alias GVaClosureMarshal GSignalCVaMarshaller; /** * A value which represents the unique identifier of a registered type. */ enum GType : size_t { INVALID = 0<<2, NONE = 1<<2, INTERFACE = 2<<2, CHAR = 3<<2, UCHAR = 4<<2, BOOLEAN = 5<<2, INT = 6<<2, UINT = 7<<2, LONG = 8<<2, ULONG = 9<<2, INT64 = 10<<2, UINT64 = 11<<2, ENUM = 12<<2, FLAGS = 13<<2, FLOAT = 14<<2, DOUBLE = 15<<2, STRING = 16<<2, POINTER = 17<<2, BOXED = 18<<2, PARAM = 19<<2, OBJECT = 20<<2, VARIANT = 21<<2, } /** * Flags to be passed to g_object_bind_property() or * g_object_bind_property_full(). * * This enumeration can be extended at later date. * * Since: 2.26 */ public enum GBindingFlags { /** * The default binding; if the source property * changes, the target property is updated with its value. */ DEFAULT = 0, /** * Bidirectional binding; if either the * property of the source or the property of the target changes, * the other is updated. */ BIDIRECTIONAL = 1, /** * Synchronize the values of the source and * target properties when creating the binding; the direction of * the synchronization is always from the source to the target. */ SYNC_CREATE = 2, /** * If the two properties being bound are * booleans, setting one to %TRUE will result in the other being * set to %FALSE and vice versa. This flag will only work for * boolean properties, and cannot be used when passing custom * transformation functions to g_object_bind_property_full(). */ INVERT_BOOLEAN = 4, } alias GBindingFlags BindingFlags; /** * The connection flags are used to specify the behaviour of a signal's * connection. */ public enum GConnectFlags { /** * whether the handler should be called before or after the * default handler of the signal. */ AFTER = 1, /** * whether the instance and data should be swapped when * calling the handler; see g_signal_connect_swapped() for an example. */ SWAPPED = 2, } alias GConnectFlags ConnectFlags; /** * Through the #GParamFlags flag values, certain aspects of parameters * can be configured. See also #G_PARAM_STATIC_STRINGS. */ public enum GParamFlags : uint { /** * the parameter is readable */ READABLE = 1, /** * the parameter is writable */ WRITABLE = 2, /** * alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE */ READWRITE = 3, /** * the parameter will be set upon object construction */ CONSTRUCT = 4, /** * the parameter can only be set upon object construction */ CONSTRUCT_ONLY = 8, /** * upon parameter conversion (see g_param_value_convert()) * strict validation is not required */ LAX_VALIDATION = 16, /** * the string used as name when constructing the * parameter is guaranteed to remain valid and * unmodified for the lifetime of the parameter. * Since 2.8 */ STATIC_NAME = 32, /** * internal */ PRIVATE = 32, /** * the string used as nick when constructing the * parameter is guaranteed to remain valid and * unmmodified for the lifetime of the parameter. * Since 2.8 */ STATIC_NICK = 64, /** * the string used as blurb when constructing the * parameter is guaranteed to remain valid and * unmodified for the lifetime of the parameter. * Since 2.8 */ STATIC_BLURB = 128, /** * calls to g_object_set_property() for this * property will not automatically result in a "notify" signal being * emitted: the implementation must call g_object_notify() themselves * in case the property actually changes. Since: 2.42. */ EXPLICIT_NOTIFY = 1073741824, /** * the parameter is deprecated and will be removed * in a future version. A warning will be generated if it is used * while running with G_ENABLE_DIAGNOSTIC=1. * Since 2.26 */ DEPRECATED = 2147483648, } alias GParamFlags ParamFlags; /** * The signal flags are used to specify a signal's behaviour, the overall * signal description outlines how especially the RUN flags control the * stages of a signal emission. */ public enum GSignalFlags { /** * Invoke the object method handler in the first emission stage. */ RUN_FIRST = 1, /** * Invoke the object method handler in the third emission stage. */ RUN_LAST = 2, /** * Invoke the object method handler in the last emission stage. */ RUN_CLEANUP = 4, /** * Signals being emitted for an object while currently being in * emission for this very object will not be emitted recursively, * but instead cause the first emission to be restarted. */ NO_RECURSE = 8, /** * This signal supports "::detail" appendices to the signal name * upon handler connections and emissions. */ DETAILED = 16, /** * Action signals are signals that may freely be emitted on alive * objects from user code via g_signal_emit() and friends, without * the need of being embedded into extra code that performs pre or * post emission adjustments on the object. They can also be thought * of as object methods which can be called generically by * third-party code. */ ACTION = 32, /** * No emissions hooks are supported for this signal. */ NO_HOOKS = 64, /** * Varargs signal emission will always collect the * arguments, even if there are no signal handlers connected. Since 2.30. */ MUST_COLLECT = 128, /** * The signal is deprecated and will be removed * in a future version. A warning will be generated if it is connected while * running with G_ENABLE_DIAGNOSTIC=1. Since 2.32. */ DEPRECATED = 256, } alias GSignalFlags SignalFlags; /** * The match types specify what g_signal_handlers_block_matched(), * g_signal_handlers_unblock_matched() and g_signal_handlers_disconnect_matched() * match signals by. */ public enum GSignalMatchType { /** * The signal id must be equal. */ ID = 1, /** * The signal detail be equal. */ DETAIL = 2, /** * The closure must be the same. */ CLOSURE = 4, /** * The C closure callback must be the same. */ FUNC = 8, /** * The closure data must be the same. */ DATA = 16, /** * Only unblocked signals may matched. */ UNBLOCKED = 32, } alias GSignalMatchType SignalMatchType; /** * These flags used to be passed to g_type_init_with_debug_flags() which * is now deprecated. * * If you need to enable debugging features, use the GOBJECT_DEBUG * environment variable. * * Deprecated: g_type_init() is now done automatically */ public enum GTypeDebugFlags { /** * Print no messages */ NONE = 0, /** * Print messages about object bookkeeping */ OBJECTS = 1, /** * Print messages about signal emissions */ SIGNALS = 2, /** * Keep a count of instances of each type */ INSTANCE_COUNT = 4, /** * Mask covering all debug flags */ MASK = 7, } alias GTypeDebugFlags TypeDebugFlags; /** * Bit masks used to check or determine characteristics of a type. */ public enum GTypeFlags { /** * Indicates an abstract type. No instances can be * created for an abstract type */ ABSTRACT = 16, /** * Indicates an abstract value type, i.e. a type * that introduces a value table, but can't be used for * g_value_init() */ VALUE_ABSTRACT = 32, } alias GTypeFlags TypeFlags; /** * Bit masks used to check or determine specific characteristics of a * fundamental type. */ public enum GTypeFundamentalFlags { /** * Indicates a classed type */ CLASSED = 1, /** * Indicates an instantiable type (implies classed) */ INSTANTIATABLE = 2, /** * Indicates a flat derivable type */ DERIVABLE = 4, /** * Indicates a deep derivable type (implies derivable) */ DEEP_DERIVABLE = 8, } alias GTypeFundamentalFlags TypeFundamentalFlags; struct GBinding; /** * A #GCClosure is a specialization of #GClosure for C function callbacks. */ struct GCClosure { /** * the #GClosure */ GClosure closure; /** * the callback function */ void* callback; } struct GClosure { import std.bitmanip: bitfields; mixin(bitfields!( uint, "refCount", 15, uint, "metaMarshalNouse", 1, uint, "nGuards", 1, uint, "nFnotifiers", 2, uint, "nInotifiers", 8, uint, "inInotify", 1, uint, "floating", 1, uint, "derivativeFlag", 1, uint, "inMarshal", 1, uint, "isInvalid", 1 )); /** */ extern(C) void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) marshal; void* data; GClosureNotifyData* notifiers; } struct GClosureNotifyData { void* data; GClosureNotify notify; } /** * The class of an enumeration type holds information about its * possible values. */ struct GEnumClass { /** * the parent class */ GTypeClass gTypeClass; /** * the smallest possible value. */ int minimum; /** * the largest possible value. */ int maximum; /** * the number of possible values. */ uint nValues; /** * an array of #GEnumValue structs describing the * individual values. */ GEnumValue* values; } /** * A structure which contains a single enum value, its name, and its * nickname. */ struct GEnumValue { /** * the enum value */ int value; /** * the name of the value */ const(char)* valueName; /** * the nickname of the value */ const(char)* valueNick; } /** * The class of a flags type holds information about its * possible values. */ struct GFlagsClass { /** * the parent class */ GTypeClass gTypeClass; /** * a mask covering all possible values. */ uint mask; /** * the number of possible values. */ uint nValues; /** * an array of #GFlagsValue structs describing the * individual values. */ GFlagsValue* values; } /** * A structure which contains a single flags value, its name, and its * nickname. */ struct GFlagsValue { /** * the flags value */ uint value; /** * the name of the value */ const(char)* valueName; /** * the nickname of the value */ const(char)* valueNick; } /** * A structure that provides information to the type system which is * used specifically for managing interface types. */ struct GInterfaceInfo { /** * location of the interface initialization function */ GInterfaceInitFunc interfaceInit; /** * location of the interface finalization function */ GInterfaceFinalizeFunc interfaceFinalize; /** * user-supplied data passed to the interface init/finalize functions */ void* interfaceData; } struct GObject { GTypeInstance gTypeInstance; uint refCount; GData* qdata; } struct GObjectClass { /** * the parent class */ GTypeClass gTypeClass; GSList* constructProperties; /** */ extern(C) GObject* function(GType type, uint nConstructProperties, GObjectConstructParam* constructProperties) constructor; /** */ extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) setProperty; /** */ extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) getProperty; /** */ extern(C) void function(GObject* object) dispose; /** */ extern(C) void function(GObject* object) finalize; /** */ extern(C) void function(GObject* object, uint nPspecs, GParamSpec** pspecs) dispatchPropertiesChanged; /** */ extern(C) void function(GObject* object, GParamSpec* pspec) notify; /** */ extern(C) void function(GObject* object) constructed; size_t flags; void*[6] pdummy; } /** * The GObjectConstructParam struct is an auxiliary * structure used to hand #GParamSpec/#GValue pairs to the @constructor of * a #GObjectClass. */ struct GObjectConstructParam { /** * the #GParamSpec of the construct parameter */ GParamSpec* pspec; /** * the value to set the parameter to */ GValue* value; } struct GParamSpec { /** * private #GTypeInstance portion */ GTypeInstance gTypeInstance; /** * name of this parameter: always an interned string */ const(char)* name; /** * #GParamFlags flags for this parameter */ GParamFlags flags; /** * the #GValue type for this parameter */ GType valueType; /** * #GType type that uses (introduces) this parameter */ GType ownerType; char* Nick; char* Blurb; GData* qdata; uint refCount; uint paramId; } struct GParamSpecBoolean { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * default value for the property specified */ bool defaultValue; } struct GParamSpecBoxed { /** * private #GParamSpec portion */ GParamSpec parentInstance; } struct GParamSpecChar { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ byte minimum; /** * maximum value for the property specified */ byte maximum; /** * default value for the property specified */ byte defaultValue; } /** * The class structure for the GParamSpec type. * Normally, GParamSpec classes are filled by * g_param_type_register_static(). */ struct GParamSpecClass { /** * the parent class */ GTypeClass gTypeClass; /** * the #GValue type for this parameter */ GType valueType; /** */ extern(C) void function(GParamSpec* pspec) finalize; /** */ extern(C) void function(GParamSpec* pspec, GValue* value) valueSetDefault; /** */ extern(C) int function(GParamSpec* pspec, GValue* value) valueValidate; /** */ extern(C) int function(GParamSpec* pspec, GValue* value1, GValue* value2) valuesCmp; void*[4] dummy; } struct GParamSpecDouble { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ double minimum; /** * maximum value for the property specified */ double maximum; /** * default value for the property specified */ double defaultValue; /** * values closer than @epsilon will be considered identical * by g_param_values_cmp(); the default value is 1e-90. */ double epsilon; } struct GParamSpecEnum { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * the #GEnumClass for the enum */ GEnumClass* enumClass; /** * default value for the property specified */ int defaultValue; } struct GParamSpecFlags { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * the #GFlagsClass for the flags */ GFlagsClass* flagsClass; /** * default value for the property specified */ uint defaultValue; } struct GParamSpecFloat { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ float minimum; /** * maximum value for the property specified */ float maximum; /** * default value for the property specified */ float defaultValue; /** * values closer than @epsilon will be considered identical * by g_param_values_cmp(); the default value is 1e-30. */ float epsilon; } struct GParamSpecGType { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * a #GType whose subtypes can occur as values */ GType isAType; } struct GParamSpecInt { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ int minimum; /** * maximum value for the property specified */ int maximum; /** * default value for the property specified */ int defaultValue; } struct GParamSpecInt64 { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ long minimum; /** * maximum value for the property specified */ long maximum; /** * default value for the property specified */ long defaultValue; } struct GParamSpecLong { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ glong minimum; /** * maximum value for the property specified */ glong maximum; /** * default value for the property specified */ glong defaultValue; } struct GParamSpecObject { /** * private #GParamSpec portion */ GParamSpec parentInstance; } struct GParamSpecOverride { GParamSpec parentInstance; GParamSpec* overridden; } struct GParamSpecParam { /** * private #GParamSpec portion */ GParamSpec parentInstance; } struct GParamSpecPointer { /** * private #GParamSpec portion */ GParamSpec parentInstance; } struct GParamSpecPool; struct GParamSpecString { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * default value for the property specified */ char* defaultValue; /** * a string containing the allowed values for the first byte */ char* csetFirst; /** * a string containing the allowed values for the subsequent bytes */ char* csetNth; /** * the replacement byte for bytes which don't match @cset_first or @cset_nth. */ char substitutor; import std.bitmanip: bitfields; mixin(bitfields!( uint, "nullFoldIfEmpty", 1, uint, "ensureNonNull", 1, uint, "", 30 )); } /** * This structure is used to provide the type system with the information * required to initialize and destruct (finalize) a parameter's class and * instances thereof. * The initialized structure is passed to the g_param_type_register_static() * The type system will perform a deep copy of this structure, so its memory * does not need to be persistent across invocation of * g_param_type_register_static(). */ struct GParamSpecTypeInfo { /** * Size of the instance (object) structure. */ ushort instanceSize; /** * Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the [slice allocator][glib-Memory-Slices] now. */ ushort nPreallocs; /** */ extern(C) void function(GParamSpec* pspec) instanceInit; /** * The #GType of values conforming to this #GParamSpec */ GType valueType; /** */ extern(C) void function(GParamSpec* pspec) finalize; /** */ extern(C) void function(GParamSpec* pspec, GValue* value) valueSetDefault; /** */ extern(C) int function(GParamSpec* pspec, GValue* value) valueValidate; /** */ extern(C) int function(GParamSpec* pspec, GValue* value1, GValue* value2) valuesCmp; } struct GParamSpecUChar { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ ubyte minimum; /** * maximum value for the property specified */ ubyte maximum; /** * default value for the property specified */ ubyte defaultValue; } struct GParamSpecUInt { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ uint minimum; /** * maximum value for the property specified */ uint maximum; /** * default value for the property specified */ uint defaultValue; } struct GParamSpecUInt64 { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ ulong minimum; /** * maximum value for the property specified */ ulong maximum; /** * default value for the property specified */ ulong defaultValue; } struct GParamSpecULong { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * minimum value for the property specified */ gulong minimum; /** * maximum value for the property specified */ gulong maximum; /** * default value for the property specified */ gulong defaultValue; } struct GParamSpecUnichar { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * default value for the property specified */ dchar defaultValue; } struct GParamSpecValueArray { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * a #GParamSpec describing the elements contained in arrays of this property, may be %NULL */ GParamSpec* elementSpec; /** * if greater than 0, arrays of this property will always have this many elements */ uint fixedNElements; } struct GParamSpecVariant { /** * private #GParamSpec portion */ GParamSpec parentInstance; /** * a #GVariantType, or %NULL */ GVariantType* type; /** * a #GVariant, or %NULL */ GVariant* defaultValue; void*[4] padding; } /** * The GParameter struct is an auxiliary structure used * to hand parameter name/value pairs to g_object_newv(). * * Deprecated: This type is not introspectable. */ struct GParameter { /** * the parameter name */ const(char)* name; /** * the parameter value */ GValue value; } /** * The #GSignalInvocationHint structure is used to pass on additional information * to callbacks during a signal emission. */ struct GSignalInvocationHint { /** * The signal id of the signal invoking the callback */ uint signalId; /** * The detail passed on for this emission */ GQuark detail; /** * The stage the signal emission is currently in, this * field will contain one of %G_SIGNAL_RUN_FIRST, * %G_SIGNAL_RUN_LAST or %G_SIGNAL_RUN_CLEANUP. */ GSignalFlags runType; } /** * A structure holding in-depth information for a specific signal. It is * filled in by the g_signal_query() function. */ struct GSignalQuery { /** * The signal id of the signal being queried, or 0 if the * signal to be queried was unknown. */ uint signalId; /** * The signal name. */ const(char)* signalName; /** * The interface/instance type that this signal can be emitted for. */ GType itype; /** * The signal flags as passed in to g_signal_new(). */ GSignalFlags signalFlags; /** * The return type for user callbacks. */ GType returnType; /** * The number of parameters that user callbacks take. */ uint nParams; /** * The individual parameter types for * user callbacks, note that the effective callback signature is: * |[ * @return_type callback (#gpointer data1, * [param_types param_names,] * gpointer data2); * ]| */ GType* paramTypes; } /** * A union holding one collected value. */ struct GTypeCValue { union { /** * the field for holding integer values */ int vInt; /** * the field for holding long integer values */ glong vLong; /** * the field for holding 64 bit integer values */ long vInt64; /** * the field for holding floating point values */ double vDouble; /** * the field for holding pointers */ void* vPointer; } } struct GTypeClass { GType gType; } /** * A structure that provides information to the type system which is * used specifically for managing fundamental types. */ struct GTypeFundamentalInfo { /** * #GTypeFundamentalFlags describing the characteristics of the fundamental type */ GTypeFundamentalFlags typeFlags; } /** * This structure is used to provide the type system with the information * required to initialize and destruct (finalize) a type's class and * its instances. * * The initialized structure is passed to the g_type_register_static() function * (or is copied into the provided #GTypeInfo structure in the * g_type_plugin_complete_type_info()). The type system will perform a deep * copy of this structure, so its memory does not need to be persistent * across invocation of g_type_register_static(). */ struct GTypeInfo { /** * Size of the class structure (required for interface, classed and instantiatable types) */ ushort classSize; /** * Location of the base initialization function (optional) */ GBaseInitFunc baseInit; /** * Location of the base finalization function (optional) */ GBaseFinalizeFunc baseFinalize; /** * Location of the class initialization function for * classed and instantiatable types. Location of the default vtable * inititalization function for interface types. (optional) This function * is used both to fill in virtual functions in the class or default vtable, * and to do type-specific setup such as registering signals and object * properties. */ GClassInitFunc classInit; /** * Location of the class finalization function for * classed and instantiatable types. Location of the default vtable * finalization function for interface types. (optional) */ GClassFinalizeFunc classFinalize; /** * User-supplied data passed to the class init/finalize functions */ void* classData; /** * Size of the instance (object) structure (required for instantiatable types only) */ ushort instanceSize; /** * Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the [slice allocator][glib-Memory-Slices] now. */ ushort nPreallocs; /** * Location of the instance initialization function (optional, for instantiatable types only) */ GInstanceInitFunc instanceInit; /** * A #GTypeValueTable function table for generic handling of GValues * of this type (usually only useful for fundamental types) */ GTypeValueTable* valueTable; } struct GTypeInstance { GTypeClass* gClass; } struct GTypeInterface { GType gType; GType gInstanceType; } struct GTypeModule { GObject parentInstance; uint useCount; GSList* typeInfos; GSList* interfaceInfos; /** * the name of the module */ char* name; } /** * In order to implement dynamic loading of types based on #GTypeModule, * the @load and @unload functions in #GTypeModuleClass must be implemented. */ struct GTypeModuleClass { /** * the parent class */ GObjectClass parentClass; /** */ extern(C) int function(GTypeModule* modul) load; /** */ extern(C) void function(GTypeModule* modul) unload; /** */ extern(C) void function() reserved1; /** */ extern(C) void function() reserved2; /** */ extern(C) void function() reserved3; /** */ extern(C) void function() reserved4; } struct GTypePlugin; /** * The #GTypePlugin interface is used by the type system in order to handle * the lifecycle of dynamically loaded types. */ struct GTypePluginClass { GTypeInterface baseIface; /** * Increases the use count of the plugin. */ GTypePluginUse usePlugin; /** * Decreases the use count of the plugin. */ GTypePluginUnuse unusePlugin; /** * Fills in the #GTypeInfo and * #GTypeValueTable structs for the type. The structs are initialized * with `memset(s, 0, sizeof (s))` before calling this function. */ GTypePluginCompleteTypeInfo completeTypeInfo; /** * Fills in missing parts of the #GInterfaceInfo * for the interface. The structs is initialized with * `memset(s, 0, sizeof (s))` before calling this function. */ GTypePluginCompleteInterfaceInfo completeInterfaceInfo; } /** * A structure holding information for a specific type. * It is filled in by the g_type_query() function. */ struct GTypeQuery { /** * the #GType value of the type */ GType type; /** * the name of the type */ const(char)* typeName; /** * the size of the class structure */ uint classSize; /** * the size of the instance structure */ uint instanceSize; } /** * The #GTypeValueTable provides the functions required by the #GValue * implementation, to serve as a container for values of a type. */ struct GTypeValueTable { /** */ extern(C) void function(GValue* value) valueInit; /** */ extern(C) void function(GValue* value) valueFree; /** */ extern(C) void function(GValue* srcValue, GValue* destValue) valueCopy; /** */ extern(C) void* function(GValue* value) valuePeekPointer; /** * A string format describing how to collect the contents of * this value bit-by-bit. Each character in the format represents * an argument to be collected, and the characters themselves indicate * the type of the argument. Currently supported arguments are: * - 'i' - Integers. passed as collect_values[].v_int. * - 'l' - Longs. passed as collect_values[].v_long. * - 'd' - Doubles. passed as collect_values[].v_double. * - 'p' - Pointers. passed as collect_values[].v_pointer. * It should be noted that for variable argument list construction, * ANSI C promotes every type smaller than an integer to an int, and * floats to doubles. So for collection of short int or char, 'i' * needs to be used, and for collection of floats 'd'. */ const(char)* collectFormat; /** */ extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) collectValue; /** * Format description of the arguments to collect for @lcopy_value, * analogous to @collect_format. Usually, @lcopy_format string consists * only of 'p's to provide lcopy_value() with pointers to storage locations. */ const(char)* lcopyFormat; /** */ extern(C) char* function(GValue* value, uint nCollectValues, GTypeCValue* collectValues, uint collectFlags) lcopyValue; } struct GValue { GType gType; ValueDataUnion[2] data; } struct GValueArray { /** * number of values contained in the array */ uint nValues; /** * array of values */ GValue* values; uint nPrealloced; } struct GWeakRef { union Priv { void* p; } Priv priv; } struct ValueDataUnion { union { int vInt; uint vUint; glong vLong; gulong vUlong; long vInt64; ulong vUint64; float vFloat; double vDouble; void* vPointer; } } /** * A callback function used by the type system to finalize those portions * of a derived types class structure that were setup from the corresponding * GBaseInitFunc() function. Class finalization basically works the inverse * way in which class initialization is performed. * See GClassInitFunc() for a discussion of the class initialization process. * * Params: * gClass = The #GTypeClass structure to finalize */ public alias extern(C) void function(void* gClass) GBaseFinalizeFunc; /** * A callback function used by the type system to do base initialization * of the class structures of derived types. It is called as part of the * initialization process of all derived classes and should reallocate * or reset all dynamic class members copied over from the parent class. * For example, class members (such as strings) that are not sufficiently * handled by a plain memory copy of the parent class into the derived class * have to be altered. See GClassInitFunc() for a discussion of the class * initialization process. * * Params: * gClass = The #GTypeClass structure to initialize */ public alias extern(C) void function(void* gClass) GBaseInitFunc; /** * A function to be called to transform @from_value to @to_value. If * this is the @transform_to function of a binding, then @from_value * is the @source_property on the @source object, and @to_value is the * @target_property on the @target object. If this is the * @transform_from function of a %G_BINDING_BIDIRECTIONAL binding, * then those roles are reversed. * * Params: * binding = a #GBinding * fromValue = the #GValue containing the value to transform * toValue = the #GValue in which to store the transformed value * userData = data passed to the transform function * * Returns: %TRUE if the transformation was successful, and %FALSE * otherwise * * Since: 2.26 */ public alias extern(C) int function(GBinding* binding, GValue* fromValue, GValue* toValue, void* userData) GBindingTransformFunc; /** * This function is provided by the user and should produce a copy * of the passed in boxed structure. * * Params: * boxed = The boxed structure to be copied. * * Returns: The newly created copy of the boxed structure. */ public alias extern(C) void* function(void* boxed) GBoxedCopyFunc; /** * This function is provided by the user and should free the boxed * structure passed. * * Params: * boxed = The boxed structure to be freed. */ public alias extern(C) void function(void* boxed) GBoxedFreeFunc; /** * The type used for callback functions in structure definitions and function * signatures. This doesn't mean that all callback functions must take no * parameters and return void. The required signature of a callback function * is determined by the context in which is used (e.g. the signal to which it * is connected). Use G_CALLBACK() to cast the callback function to a #GCallback. */ public alias extern(C) void function() GCallback; /** * A callback function used by the type system to finalize a class. * This function is rarely needed, as dynamically allocated class resources * should be handled by GBaseInitFunc() and GBaseFinalizeFunc(). * Also, specification of a GClassFinalizeFunc() in the #GTypeInfo * structure of a static type is invalid, because classes of static types * will never be finalized (they are artificially kept alive when their * reference count drops to zero). * * Params: * gClass = The #GTypeClass structure to finalize * classData = The @class_data member supplied via the #GTypeInfo structure */ public alias extern(C) void function(void* gClass, void* classData) GClassFinalizeFunc; /** * A callback function used by the type system to initialize the class * of a specific type. This function should initialize all static class * members. * * The initialization process of a class involves: * * - Copying common members from the parent class over to the * derived class structure. * - Zero initialization of the remaining members not copied * over from the parent class. * - Invocation of the GBaseInitFunc() initializers of all parent * types and the class' type. * - Invocation of the class' GClassInitFunc() initializer. * * Since derived classes are partially initialized through a memory copy * of the parent class, the general rule is that GBaseInitFunc() and * GBaseFinalizeFunc() should take care of necessary reinitialization * and release of those class members that were introduced by the type * that specified these GBaseInitFunc()/GBaseFinalizeFunc(). * GClassInitFunc() should only care about initializing static * class members, while dynamic class members (such as allocated strings * or reference counted resources) are better handled by a GBaseInitFunc() * for this type, so proper initialization of the dynamic class members * is performed for class initialization of derived types as well. * * An example may help to correspond the intend of the different class * initializers: * * |[ * typedef struct { * GObjectClass parent_class; * gint static_integer; * gchar *dynamic_string; * } TypeAClass; * static void * type_a_base_class_init (TypeAClass *class) * { * class->dynamic_string = g_strdup ("some string"); * } * static void * type_a_base_class_finalize (TypeAClass *class) * { * g_free (class->dynamic_string); * } * static void * type_a_class_init (TypeAClass *class) * { * class->static_integer = 42; * } * * typedef struct { * TypeAClass parent_class; * gfloat static_float; * GString *dynamic_gstring; * } TypeBClass; * static void * type_b_base_class_init (TypeBClass *class) * { * class->dynamic_gstring = g_string_new ("some other string"); * } * static void * type_b_base_class_finalize (TypeBClass *class) * { * g_string_free (class->dynamic_gstring); * } * static void * type_b_class_init (TypeBClass *class) * { * class->static_float = 3.14159265358979323846; * } * ]| * Initialization of TypeBClass will first cause initialization of * TypeAClass (derived classes reference their parent classes, see * g_type_class_ref() on this). * * Initialization of TypeAClass roughly involves zero-initializing its fields, * then calling its GBaseInitFunc() type_a_base_class_init() to allocate * its dynamic members (dynamic_string), and finally calling its GClassInitFunc() * type_a_class_init() to initialize its static members (static_integer). * The first step in the initialization process of TypeBClass is then * a plain memory copy of the contents of TypeAClass into TypeBClass and * zero-initialization of the remaining fields in TypeBClass. * The dynamic members of TypeAClass within TypeBClass now need * reinitialization which is performed by calling type_a_base_class_init() * with an argument of TypeBClass. * * After that, the GBaseInitFunc() of TypeBClass, type_b_base_class_init() * is called to allocate the dynamic members of TypeBClass (dynamic_gstring), * and finally the GClassInitFunc() of TypeBClass, type_b_class_init(), * is called to complete the initialization process with the static members * (static_float). * * Corresponding finalization counter parts to the GBaseInitFunc() functions * have to be provided to release allocated resources at class finalization * time. * * Params: * gClass = The #GTypeClass structure to initialize. * classData = The @class_data member supplied via the #GTypeInfo structure. */ public alias extern(C) void function(void* gClass, void* classData) GClassInitFunc; /** * The type used for marshaller functions. * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * nParamValues = the length of the @param_values array * paramValues = an array of * #GValues holding the arguments on which to invoke the * callback of @closure * invocationHint = the invocation hint given as the * last argument to g_closure_invoke() * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() */ public alias extern(C) void function(GClosure* closure, GValue* returnValue, uint nParamValues, GValue* paramValues, void* invocationHint, void* marshalData) GClosureMarshal; /** * The type used for the various notification callbacks which can be registered * on closures. * * Params: * data = data specified when registering the notification callback * closure = the #GClosure on which the notification is emitted */ public alias extern(C) void function(void* data, GClosure* closure) GClosureNotify; /** * A callback function used by the type system to initialize a new * instance of a type. This function initializes all instance members and * allocates any resources required by it. * * Initialization of a derived instance involves calling all its parent * types instance initializers, so the class member of the instance * is altered during its initialization to always point to the class that * belongs to the type the current initializer was introduced for. * * The extended members of @instance are guaranteed to have been filled with * zeros before this function is called. * * Params: * instanc = The instance to initialize * gClass = The class of the type the instance is * created for */ public alias extern(C) void function(GTypeInstance* instanc, void* gClass) GInstanceInitFunc; /** * A callback function used by the type system to finalize an interface. * This function should destroy any internal data and release any resources * allocated by the corresponding GInterfaceInitFunc() function. * * Params: * gIface = The interface structure to finalize * ifaceData = The @interface_data supplied via the #GInterfaceInfo structure */ public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceFinalizeFunc; /** * A callback function used by the type system to initialize a new * interface. This function should initialize all internal data and * allocate any resources required by the interface. * * The members of @iface_data are guaranteed to have been filled with * zeros before this function is called. * * Params: * gIface = The interface structure to initialize * ifaceData = The @interface_data supplied via the #GInterfaceInfo structure */ public alias extern(C) void function(void* gIface, void* ifaceData) GInterfaceInitFunc; /** * The type of the @finalize function of #GObjectClass. * * Params: * object = the #GObject being finalized */ public alias extern(C) void function(GObject* object) GObjectFinalizeFunc; /** * The type of the @get_property function of #GObjectClass. * * Params: * object = a #GObject * propertyId = the numeric id under which the property was registered with * g_object_class_install_property(). * value = a #GValue to return the property value in * pspec = the #GParamSpec describing the property */ public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectGetPropertyFunc; /** * The type of the @set_property function of #GObjectClass. * * Params: * object = a #GObject * propertyId = the numeric id under which the property was registered with * g_object_class_install_property(). * value = the new value for the property * pspec = the #GParamSpec describing the property */ public alias extern(C) void function(GObject* object, uint propertyId, GValue* value, GParamSpec* pspec) GObjectSetPropertyFunc; /** * The signal accumulator is a special callback function that can be used * to collect return values of the various callbacks that are called * during a signal emission. The signal accumulator is specified at signal * creation time, if it is left %NULL, no accumulation of callback return * values is performed. The return value of signal emissions is then the * value returned by the last callback. * * Params: * ihint = Signal invocation hint, see #GSignalInvocationHint. * returnAccu = Accumulator to collect callback return values in, this * is the return value of the current signal emission. * handlerReturn = A #GValue holding the return value of the signal handler. * data = Callback data that was specified when creating the signal. * * Returns: The accumulator function returns whether the signal emission * should be aborted. Returning %FALSE means to abort the * current emission and %TRUE is returned for continuation. */ public alias extern(C) int function(GSignalInvocationHint* ihint, GValue* returnAccu, GValue* handlerReturn, void* data) GSignalAccumulator; /** * A simple function pointer to get invoked when the signal is emitted. This * allows you to tie a hook to the signal type, so that it will trap all * emissions of that signal, from any object. * * You may not attach these to signals created with the #G_SIGNAL_NO_HOOKS flag. * * Params: * ihint = Signal invocation hint, see #GSignalInvocationHint. * nParamValues = the number of parameters to the function, including * the instance on which the signal was emitted. * paramValues = the instance on which * the signal was emitted, followed by the parameters of the emission. * data = user data associated with the hook. * * Returns: whether it wants to stay connected. If it returns %FALSE, the signal * hook is disconnected (and destroyed). */ public alias extern(C) int function(GSignalInvocationHint* ihint, uint nParamValues, GValue* paramValues, void* data) GSignalEmissionHook; /** * A callback function used for notification when the state * of a toggle reference changes. See g_object_add_toggle_ref(). * * Params: * data = Callback data passed to g_object_add_toggle_ref() * object = The object on which g_object_add_toggle_ref() was called. * isLastRef = %TRUE if the toggle reference is now the * last reference to the object. %FALSE if the toggle * reference was the last reference and there are now other * references. */ public alias extern(C) void function(void* data, GObject* object, int isLastRef) GToggleNotify; /** * A callback function which is called when the reference count of a class * drops to zero. It may use g_type_class_ref() to prevent the class from * being freed. You should not call g_type_class_unref() from a * #GTypeClassCacheFunc function to prevent infinite recursion, use * g_type_class_unref_uncached() instead. * * The functions have to check the class id passed in to figure * whether they actually want to cache the class of this type, since all * classes are routed through the same #GTypeClassCacheFunc chain. * * Params: * cacheData = data that was given to the g_type_add_class_cache_func() call * gClass = The #GTypeClass structure which is * unreferenced * * Returns: %TRUE to stop further #GTypeClassCacheFuncs from being * called, %FALSE to continue */ public alias extern(C) int function(void* cacheData, GTypeClass* gClass) GTypeClassCacheFunc; /** * A callback called after an interface vtable is initialized. * See g_type_add_interface_check(). * * Params: * checkData = data passed to g_type_add_interface_check() * gIface = the interface that has been * initialized * * Since: 2.4 */ public alias extern(C) void function(void* checkData, void* gIface) GTypeInterfaceCheckFunc; /** * The type of the @complete_interface_info function of #GTypePluginClass. * * Params: * plugin = the #GTypePlugin * instanceType = the #GType of an instantiable type to which the interface * is added * interfaceType = the #GType of the interface whose info is completed * info = the #GInterfaceInfo to fill in */ public alias extern(C) void function(GTypePlugin* plugin, GType instanceType, GType interfaceType, GInterfaceInfo* info) GTypePluginCompleteInterfaceInfo; /** * The type of the @complete_type_info function of #GTypePluginClass. * * Params: * plugin = the #GTypePlugin * gType = the #GType whose info is completed * info = the #GTypeInfo struct to fill in * valueTable = the #GTypeValueTable to fill in */ public alias extern(C) void function(GTypePlugin* plugin, GType gType, GTypeInfo* info, GTypeValueTable* valueTable) GTypePluginCompleteTypeInfo; /** * The type of the @unuse_plugin function of #GTypePluginClass. * * Params: * plugin = the #GTypePlugin whose use count should be decreased */ public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUnuse; /** * The type of the @use_plugin function of #GTypePluginClass, which gets called * to increase the use count of @plugin. * * Params: * plugin = the #GTypePlugin whose use count should be increased */ public alias extern(C) void function(GTypePlugin* plugin) GTypePluginUse; /** * This is the signature of va_list marshaller functions, an optional * marshaller that can be used in some situations to avoid * marshalling the signal argument into GValues. * * Params: * closure = the #GClosure to which the marshaller belongs * returnValue = a #GValue to store the return * value. May be %NULL if the callback of @closure doesn't return a * value. * instanc = the instance on which the closure is * invoked. * args = va_list of arguments to be passed to the closure. * marshalData = additional data specified when * registering the marshaller, see g_closure_set_marshal() and * g_closure_set_meta_marshal() * nParams = the length of the @param_types array * paramTypes = the #GType of each argument from * @args. */ public alias extern(C) void function(GClosure* closure, GValue* returnValue, void* instanc, void* args, void* marshalData, int nParams, GType* paramTypes) GVaClosureMarshal; /** * The type of value transformation functions which can be registered with * g_value_register_transform_func(). * * Params: * srcValue = Source value. * destValue = Target value. */ public alias extern(C) void function(GValue* srcValue, GValue* destValue) GValueTransform; /** * A #GWeakNotify function can be added to an object as a callback that gets * triggered when the object is finalized. Since the object is already being * finalized when the #GWeakNotify is called, there's not much you could do * with the object, apart from e.g. using its address as hash-index or the like. * * Params: * data = data that was provided when the weak reference was established * whereTheObjectWas = the object being finalized */ public alias extern(C) void function(void* data, GObject* whereTheObjectWas) GWeakNotify; /** * Mask containing the bits of #GParamSpec.flags which are reserved for GLib. */ enum PARAM_MASK = 255; alias G_PARAM_MASK = PARAM_MASK; /** * #GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB. * * Since 2.13.0 */ enum PARAM_STATIC_STRINGS = 0; alias G_PARAM_STATIC_STRINGS = PARAM_STATIC_STRINGS; /** * Minimum shift count to be used for user defined flags, to be stored in * #GParamSpec.flags. The maximum allowed is 10. */ enum PARAM_USER_SHIFT = 8; alias G_PARAM_USER_SHIFT = PARAM_USER_SHIFT; /** * A mask for all #GSignalFlags bits. */ enum SIGNAL_FLAGS_MASK = 511; alias G_SIGNAL_FLAGS_MASK = SIGNAL_FLAGS_MASK; /** * A mask for all #GSignalMatchType bits. */ enum SIGNAL_MATCH_MASK = 63; alias G_SIGNAL_MATCH_MASK = SIGNAL_MATCH_MASK; /** * A bit in the type number that's supposed to be left untouched. */ enum TYPE_FLAG_RESERVED_ID_BIT = 1; alias G_TYPE_FLAG_RESERVED_ID_BIT = TYPE_FLAG_RESERVED_ID_BIT; /** * An integer constant that represents the number of identifiers reserved * for types that are assigned at compile-time. */ enum TYPE_FUNDAMENTAL_MAX = 255; alias G_TYPE_FUNDAMENTAL_MAX = TYPE_FUNDAMENTAL_MAX; /** * Shift value used in converting numbers to type IDs. */ enum TYPE_FUNDAMENTAL_SHIFT = 2; alias G_TYPE_FUNDAMENTAL_SHIFT = TYPE_FUNDAMENTAL_SHIFT; /** * First fundamental type number to create a new fundamental type id with * G_TYPE_MAKE_FUNDAMENTAL() reserved for BSE. */ enum TYPE_RESERVED_BSE_FIRST = 32; alias G_TYPE_RESERVED_BSE_FIRST = TYPE_RESERVED_BSE_FIRST; /** * Last fundamental type number reserved for BSE. */ enum TYPE_RESERVED_BSE_LAST = 48; alias G_TYPE_RESERVED_BSE_LAST = TYPE_RESERVED_BSE_LAST; /** * First fundamental type number to create a new fundamental type id with * G_TYPE_MAKE_FUNDAMENTAL() reserved for GLib. */ enum TYPE_RESERVED_GLIB_FIRST = 22; alias G_TYPE_RESERVED_GLIB_FIRST = TYPE_RESERVED_GLIB_FIRST; /** * Last fundamental type number reserved for GLib. */ enum TYPE_RESERVED_GLIB_LAST = 31; alias G_TYPE_RESERVED_GLIB_LAST = TYPE_RESERVED_GLIB_LAST; /** * First available fundamental type number to create new fundamental * type id with G_TYPE_MAKE_FUNDAMENTAL(). */ enum TYPE_RESERVED_USER_FIRST = 49; alias G_TYPE_RESERVED_USER_FIRST = TYPE_RESERVED_USER_FIRST; /** * The maximal number of #GTypeCValues which can be collected for a * single #GValue. */ enum VALUE_COLLECT_FORMAT_MAX_LENGTH = 8; alias G_VALUE_COLLECT_FORMAT_MAX_LENGTH = VALUE_COLLECT_FORMAT_MAX_LENGTH; /** * If passed to G_VALUE_COLLECT(), allocated data won't be copied * but used verbatim. This does not affect ref-counted types like * objects. */ enum VALUE_NOCOPY_CONTENTS = 134217728; alias G_VALUE_NOCOPY_CONTENTS = VALUE_NOCOPY_CONTENTS; GtkD-3.7.5/generated/gtkd/gthread/000077500000000000000000000000001324604450400166665ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gthread/Cond.d000066400000000000000000000021101324604450400177100ustar00rootroot00000000000000/* * 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 gthread.Cond; private import gthread.c.functions; public import gthread.c.types; /** */ public import glib.Cond; /** */ GtkD-3.7.5/generated/gtkd/gthread/Mutex.d000066400000000000000000000021121324604450400201310ustar00rootroot00000000000000/* * 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 gthread.Mutex; private import gthread.c.functions; public import gthread.c.types; /** */ public import glib.Mutex; /** */ GtkD-3.7.5/generated/gtkd/gthread/Once.d000066400000000000000000000021101324604450400177110ustar00rootroot00000000000000/* * 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 gthread.Once; private import gthread.c.functions; public import gthread.c.types; /** */ public import glib.Once; /** */ GtkD-3.7.5/generated/gtkd/gthread/Private.d000066400000000000000000000021161324604450400204450ustar00rootroot00000000000000/* * 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 gthread.Private; private import gthread.c.functions; public import gthread.c.types; /** */ public import glib.Private; /** */ GtkD-3.7.5/generated/gtkd/gthread/RWLock.d000066400000000000000000000021141324604450400201720ustar00rootroot00000000000000/* * 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 gthread.RWLock; private import gthread.c.functions; public import gthread.c.types; /** */ public import glib.RWLock; /** */ GtkD-3.7.5/generated/gtkd/gthread/RecMutex.d000066400000000000000000000021201324604450400205620ustar00rootroot00000000000000/* * 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 gthread.RecMutex; private import gthread.c.functions; public import gthread.c.types; /** */ public import glib.RecMutex; /** */ GtkD-3.7.5/generated/gtkd/gthread/Thread.d000066400000000000000000000021141324604450400202400ustar00rootroot00000000000000/* * 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 gthread.Thread; private import gthread.c.functions; public import gthread.c.types; /** */ public import glib.Thread; /** */ GtkD-3.7.5/generated/gtkd/gthread/c/000077500000000000000000000000001324604450400171105ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gthread/c/functions.d000066400000000000000000000023651324604450400212730ustar00rootroot00000000000000/* * 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 gthread.c.functions; import std.stdio; import gthread.c.types; import gtkd.Loader; version (Windows) static immutable LIBRARY_GTHREAD = []; else version (OSX) static immutable LIBRARY_GTHREAD = []; else static immutable LIBRARY_GTHREAD = [""]; shared static this() {} __gshared extern(C) { } GtkD-3.7.5/generated/gtkd/gthread/c/types.d000066400000000000000000000017331324604450400204250ustar00rootroot00000000000000/* * 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 gthread.c.types; GtkD-3.7.5/generated/gtkd/gtk/000077500000000000000000000000001324604450400160355ustar00rootroot00000000000000GtkD-3.7.5/generated/gtkd/gtk/AboutDialog.d000066400000000000000000000413461324604450400204040ustar00rootroot00000000000000/* * 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 gtk.AboutDialog; private import gdkpixbuf.Pixbuf; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gtk.Dialog; private import gtk.Widget; private import gtk.Window; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * The GtkAboutDialog offers a simple way to display information about * a program like its logo, name, copyright, website and license. It is * also possible to give credits to the authors, documenters, translators * and artists who have worked on the program. An about dialog is typically * opened when the user selects the `About` option from the `Help` menu. * All parts of the dialog are optional. * * About dialogs often contain links and email addresses. GtkAboutDialog * displays these as clickable links. By default, it calls gtk_show_uri_on_window() * when a user clicks one. The behaviour can be overridden with the * #GtkAboutDialog::activate-link signal. * * To specify a person with an email address, use a string like * "Edgar Allan Poe ". To specify a website with a title, * use a string like "GTK+ team http://www.gtk.org". * * To make constructing a GtkAboutDialog as convenient as possible, you can * use the function gtk_show_about_dialog() which constructs and shows a dialog * and keeps it around so that it can be shown again. * * Note that GTK+ sets a default title of `_("About %s")` on the dialog * window (where \%s is replaced by the name of the application, but in * order to ensure proper translation of the title, applications should * set the title property explicitly when constructing a GtkAboutDialog, * as shown in the following example: * |[ * GdkPixbuf *example_logo = gdk_pixbuf_new_from_file ("./logo.png", NULL); * gtk_show_about_dialog (NULL, * "program-name", "ExampleCode", * "logo", example_logo, * "title", _("About ExampleCode"), * NULL); * ]| * * It is also possible to show a #GtkAboutDialog like any other #GtkDialog, * e.g. using gtk_dialog_run(). In this case, you might need to know that * the “Close” button returns the #GTK_RESPONSE_CANCEL response id. */ public class AboutDialog : Dialog { /** the main Gtk struct */ protected GtkAboutDialog* gtkAboutDialog; /** Get the main Gtk struct */ public GtkAboutDialog* getAboutDialogStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAboutDialog; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAboutDialog; } protected override void setStruct(GObject* obj) { gtkAboutDialog = cast(GtkAboutDialog*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAboutDialog* gtkAboutDialog, bool ownedRef = false) { this.gtkAboutDialog = gtkAboutDialog; super(cast(GtkDialog*)gtkAboutDialog, ownedRef); } /** */ public static GType getType() { return gtk_about_dialog_get_type(); } /** * Creates a new #GtkAboutDialog. * * Returns: a newly created #GtkAboutDialog * * Since: 2.6 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gtk_about_dialog_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAboutDialog*) p); } /** * Creates a new section in the Credits page. * * Params: * sectionName = The name of the section * people = The people who belong to that section * * Since: 3.4 */ public void addCreditSection(string sectionName, string[] people) { gtk_about_dialog_add_credit_section(gtkAboutDialog, Str.toStringz(sectionName), Str.toStringzArray(people)); } /** * Returns the string which are displayed in the artists tab * of the secondary credits dialog. * * Returns: A * %NULL-terminated string array containing the artists. The array is * owned by the about dialog and must not be modified. * * Since: 2.6 */ public string[] getArtists() { return Str.toStringArray(gtk_about_dialog_get_artists(gtkAboutDialog)); } /** * Returns the string which are displayed in the authors tab * of the secondary credits dialog. * * Returns: A * %NULL-terminated string array containing the authors. The array is * owned by the about dialog and must not be modified. * * Since: 2.6 */ public string[] getAuthors() { return Str.toStringArray(gtk_about_dialog_get_authors(gtkAboutDialog)); } /** * Returns the comments string. * * Returns: The comments. The string is owned by the about * dialog and must not be modified. * * Since: 2.6 */ public string getComments() { return Str.toString(gtk_about_dialog_get_comments(gtkAboutDialog)); } /** * Returns the copyright string. * * Returns: The copyright string. The string is owned by the about * dialog and must not be modified. * * Since: 2.6 */ public string getCopyright() { return Str.toString(gtk_about_dialog_get_copyright(gtkAboutDialog)); } /** * Returns the string which are displayed in the documenters * tab of the secondary credits dialog. * * Returns: A * %NULL-terminated string array containing the documenters. The * array is owned by the about dialog and must not be modified. * * Since: 2.6 */ public string[] getDocumenters() { return Str.toStringArray(gtk_about_dialog_get_documenters(gtkAboutDialog)); } /** * Returns the license information. * * Returns: The license information. The string is owned by the about * dialog and must not be modified. * * Since: 2.6 */ public string getLicense() { return Str.toString(gtk_about_dialog_get_license(gtkAboutDialog)); } /** * Retrieves the license set using gtk_about_dialog_set_license_type() * * Returns: a #GtkLicense value * * Since: 3.0 */ public GtkLicense getLicenseType() { return gtk_about_dialog_get_license_type(gtkAboutDialog); } /** * Returns the pixbuf displayed as logo in the about dialog. * * Returns: the pixbuf displayed as logo. The * pixbuf is owned by the about dialog. If you want to keep a * reference to it, you have to call g_object_ref() on it. * * Since: 2.6 */ public Pixbuf getLogo() { auto p = gtk_about_dialog_get_logo(gtkAboutDialog); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); } /** * Returns the icon name displayed as logo in the about dialog. * * Returns: the icon name displayed as logo. The string is * owned by the dialog. If you want to keep a reference * to it, you have to call g_strdup() on it. * * Since: 2.6 */ public string getLogoIconName() { return Str.toString(gtk_about_dialog_get_logo_icon_name(gtkAboutDialog)); } /** * Returns the program name displayed in the about dialog. * * Returns: The program name. The string is owned by the about * dialog and must not be modified. * * Since: 2.12 */ public string getProgramName() { return Str.toString(gtk_about_dialog_get_program_name(gtkAboutDialog)); } /** * Returns the translator credits string which is displayed * in the translators tab of the secondary credits dialog. * * Returns: The translator credits string. The string is * owned by the about dialog and must not be modified. * * Since: 2.6 */ public string getTranslatorCredits() { return Str.toString(gtk_about_dialog_get_translator_credits(gtkAboutDialog)); } /** * Returns the version string. * * Returns: The version string. The string is owned by the about * dialog and must not be modified. * * Since: 2.6 */ public string getVersion() { return Str.toString(gtk_about_dialog_get_version(gtkAboutDialog)); } /** * Returns the website URL. * * Returns: The website URL. The string is owned by the about * dialog and must not be modified. * * Since: 2.6 */ public string getWebsite() { return Str.toString(gtk_about_dialog_get_website(gtkAboutDialog)); } /** * Returns the label used for the website link. * * Returns: The label used for the website link. The string is * owned by the about dialog and must not be modified. * * Since: 2.6 */ public string getWebsiteLabel() { return Str.toString(gtk_about_dialog_get_website_label(gtkAboutDialog)); } /** * Returns whether the license text in @about is * automatically wrapped. * * Returns: %TRUE if the license text is wrapped * * Since: 2.8 */ public bool getWrapLicense() { return gtk_about_dialog_get_wrap_license(gtkAboutDialog) != 0; } /** * Sets the strings which are displayed in the artists tab * of the secondary credits dialog. * * Params: * artists = a %NULL-terminated array of strings * * Since: 2.6 */ public void setArtists(string[] artists) { gtk_about_dialog_set_artists(gtkAboutDialog, Str.toStringzArray(artists)); } /** * Sets the strings which are displayed in the authors tab * of the secondary credits dialog. * * Params: * authors = a %NULL-terminated array of strings * * Since: 2.6 */ public void setAuthors(string[] authors) { gtk_about_dialog_set_authors(gtkAboutDialog, Str.toStringzArray(authors)); } /** * Sets the comments string to display in the about dialog. * This should be a short string of one or two lines. * * Params: * comments = a comments string * * Since: 2.6 */ public void setComments(string comments) { gtk_about_dialog_set_comments(gtkAboutDialog, Str.toStringz(comments)); } /** * Sets the copyright string to display in the about dialog. * This should be a short string of one or two lines. * * Params: * copyright = the copyright string * * Since: 2.6 */ public void setCopyright(string copyright) { gtk_about_dialog_set_copyright(gtkAboutDialog, Str.toStringz(copyright)); } /** * Sets the strings which are displayed in the documenters tab * of the secondary credits dialog. * * Params: * documenters = a %NULL-terminated array of strings * * Since: 2.6 */ public void setDocumenters(string[] documenters) { gtk_about_dialog_set_documenters(gtkAboutDialog, Str.toStringzArray(documenters)); } /** * Sets the license information to be displayed in the secondary * license dialog. If @license is %NULL, the license button is * hidden. * * Params: * license = the license information or %NULL * * Since: 2.6 */ public void setLicense(string license) { gtk_about_dialog_set_license(gtkAboutDialog, Str.toStringz(license)); } /** * Sets the license of the application showing the @about dialog from a * list of known licenses. * * This function overrides the license set using * gtk_about_dialog_set_license(). * * Params: * licenseType = the type of license * * Since: 3.0 */ public void setLicenseType(GtkLicense licenseType) { gtk_about_dialog_set_license_type(gtkAboutDialog, licenseType); } /** * Sets the pixbuf to be displayed as logo in the about dialog. * If it is %NULL, the default window icon set with * gtk_window_set_default_icon() will be used. * * Params: * logo = a #GdkPixbuf, or %NULL * * Since: 2.6 */ public void setLogo(Pixbuf logo) { gtk_about_dialog_set_logo(gtkAboutDialog, (logo is null) ? null : logo.getPixbufStruct()); } /** * Sets the pixbuf to be displayed as logo in the about dialog. * If it is %NULL, the default window icon set with * gtk_window_set_default_icon() will be used. * * Params: * iconName = an icon name, or %NULL * * Since: 2.6 */ public void setLogoIconName(string iconName) { gtk_about_dialog_set_logo_icon_name(gtkAboutDialog, Str.toStringz(iconName)); } /** * Sets the name to display in the about dialog. * If this is not set, it defaults to g_get_application_name(). * * Params: * name = the program name * * Since: 2.12 */ public void setProgramName(string name) { gtk_about_dialog_set_program_name(gtkAboutDialog, Str.toStringz(name)); } /** * Sets the translator credits string which is displayed in * the translators tab of the secondary credits dialog. * * The intended use for this string is to display the translator * of the language which is currently used in the user interface. * Using gettext(), a simple way to achieve that is to mark the * string for translation: * |[ * GtkWidget *about = gtk_about_dialog_new (); * gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about), * _("translator-credits")); * ]| * It is a good idea to use the customary msgid “translator-credits” for this * purpose, since translators will already know the purpose of that msgid, and * since #GtkAboutDialog will detect if “translator-credits” is untranslated * and hide the tab. * * Params: * translatorCredits = the translator credits * * Since: 2.6 */ public void setTranslatorCredits(string translatorCredits) { gtk_about_dialog_set_translator_credits(gtkAboutDialog, Str.toStringz(translatorCredits)); } /** * Sets the version string to display in the about dialog. * * Params: * versio = the version string * * Since: 2.6 */ public void setVersion(string versio) { gtk_about_dialog_set_version(gtkAboutDialog, Str.toStringz(versio)); } /** * Sets the URL to use for the website link. * * Params: * website = a URL string starting with "http://" * * Since: 2.6 */ public void setWebsite(string website) { gtk_about_dialog_set_website(gtkAboutDialog, Str.toStringz(website)); } /** * Sets the label to be used for the website link. * * Params: * websiteLabel = the label used for the website link * * Since: 2.6 */ public void setWebsiteLabel(string websiteLabel) { gtk_about_dialog_set_website_label(gtkAboutDialog, Str.toStringz(websiteLabel)); } /** * Sets whether the license text in @about is * automatically wrapped. * * Params: * wrapLicense = whether to wrap the license * * Since: 2.8 */ public void setWrapLicense(bool wrapLicense) { gtk_about_dialog_set_wrap_license(gtkAboutDialog, wrapLicense); } protected class OnActivateLinkDelegateWrapper { bool delegate(string, AboutDialog) dlg; gulong handlerId; this(bool delegate(string, AboutDialog) dlg) { this.dlg = dlg; onActivateLinkListeners ~= this; } void remove(OnActivateLinkDelegateWrapper source) { foreach(index, wrapper; onActivateLinkListeners) { if (wrapper.handlerId == source.handlerId) { onActivateLinkListeners[index] = null; onActivateLinkListeners = std.algorithm.remove(onActivateLinkListeners, index); break; } } } } OnActivateLinkDelegateWrapper[] onActivateLinkListeners; /** * The signal which gets emitted to activate a URI. * Applications may connect to it to override the default behaviour, * which is to call gtk_show_uri_on_window(). * * Params: * uri = the URI that is activated * * Returns: %TRUE if the link has been activated * * Since: 2.24 */ gulong addOnActivateLink(bool delegate(string, AboutDialog) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActivateLinkDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "activate-link", cast(GCallback)&callBackActivateLink, cast(void*)wrapper, cast(GClosureNotify)&callBackActivateLinkDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackActivateLink(GtkAboutDialog* aboutdialogStruct, char* uri, OnActivateLinkDelegateWrapper wrapper) { return wrapper.dlg(Str.toString(uri), wrapper.outer); } extern(C) static void callBackActivateLinkDestroy(OnActivateLinkDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gtk/AccelGroup.d000066400000000000000000000541211324604450400202310ustar00rootroot00000000000000/* * 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 gtk.AccelGroup; private import gdk.Display; private import glib.ConstructionException; private import glib.ListSG; private import glib.Str; private import gobject.Closure; private import gobject.ObjectG; private import gobject.Signals; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * A #GtkAccelGroup represents a group of keyboard accelerators, * typically attached to a toplevel #GtkWindow (with * gtk_window_add_accel_group()). Usually you won’t need to create a * #GtkAccelGroup directly; instead, when using #GtkUIManager, GTK+ * automatically sets up the accelerators for your menus in the ui * manager’s #GtkAccelGroup. * * Note that “accelerators” are different from * “mnemonics”. Accelerators are shortcuts for * activating a menu item; they appear alongside the menu item they’re a * shortcut for. For example “Ctrl+Q” might appear alongside the “Quit” * menu item. Mnemonics are shortcuts for GUI elements such as text * entries or buttons; they appear as underlined characters. See * gtk_label_new_with_mnemonic(). Menu items can have both accelerators * and mnemonics, of course. */ public class AccelGroup : ObjectG { /** the main Gtk struct */ protected GtkAccelGroup* gtkAccelGroup; /** Get the main Gtk struct */ public GtkAccelGroup* getAccelGroupStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAccelGroup; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAccelGroup; } protected override void setStruct(GObject* obj) { gtkAccelGroup = cast(GtkAccelGroup*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAccelGroup* gtkAccelGroup, bool ownedRef = false) { this.gtkAccelGroup = gtkAccelGroup; super(cast(GObject*)gtkAccelGroup, ownedRef); } /** */ public static GType getType() { return gtk_accel_group_get_type(); } /** * Creates a new #GtkAccelGroup. * * Returns: a new #GtkAccelGroup object * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gtk_accel_group_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAccelGroup*) p, true); } /** * Finds the #GtkAccelGroup to which @closure is connected; * see gtk_accel_group_connect(). * * Params: * closure = a #GClosure * * Returns: the #GtkAccelGroup to which @closure * is connected, or %NULL */ public static AccelGroup fromAccelClosure(Closure closure) { auto p = gtk_accel_group_from_accel_closure((closure is null) ? null : closure.getClosureStruct()); if(p is null) { return null; } return ObjectG.getDObject!(AccelGroup)(cast(GtkAccelGroup*) p); } /** * Finds the first accelerator in @accel_group that matches * @accel_key and @accel_mods, and activates it. * * Params: * accelQuark = the quark for the accelerator name * acceleratable = the #GObject, usually a #GtkWindow, on which * to activate the accelerator * accelKey = accelerator keyval from a key event * accelMods = keyboard state mask from a key event * * Returns: %TRUE if an accelerator was activated and handled * this keypress */ public bool activate(GQuark accelQuark, ObjectG acceleratable, uint accelKey, GdkModifierType accelMods) { return gtk_accel_group_activate(gtkAccelGroup, accelQuark, (acceleratable is null) ? null : acceleratable.getObjectGStruct(), accelKey, accelMods) != 0; } /** * Installs an accelerator in this group. When @accel_group is being * activated in response to a call to gtk_accel_groups_activate(), * @closure will be invoked if the @accel_key and @accel_mods from * gtk_accel_groups_activate() match those of this connection. * * The signature used for the @closure is that of #GtkAccelGroupActivate. * * Note that, due to implementation details, a single closure can * only be connected to one accelerator group. * * Params: * accelKey = key value of the accelerator * accelMods = modifier combination of the accelerator * accelFlags = a flag mask to configure this accelerator * closure = closure to be executed upon accelerator activation */ public void connect(uint accelKey, GdkModifierType accelMods, GtkAccelFlags accelFlags, Closure closure) { gtk_accel_group_connect(gtkAccelGroup, accelKey, accelMods, accelFlags, (closure is null) ? null : closure.getClosureStruct()); } /** * Installs an accelerator in this group, using an accelerator path * to look up the appropriate key and modifiers (see * gtk_accel_map_add_entry()). When @accel_group is being activated * in response to a call to gtk_accel_groups_activate(), @closure will * be invoked if the @accel_key and @accel_mods from * gtk_accel_groups_activate() match the key and modifiers for the path. * * The signature used for the @closure is that of #GtkAccelGroupActivate. * * Note that @accel_path string will be stored in a #GQuark. Therefore, * if you pass a static string, you can save some memory by interning it * first with g_intern_static_string(). * * Params: * accelPath = path used for determining key and modifiers * closure = closure to be executed upon accelerator activation */ public void connectByPath(string accelPath, Closure closure) { gtk_accel_group_connect_by_path(gtkAccelGroup, Str.toStringz(accelPath), (closure is null) ? null : closure.getClosureStruct()); } /** * Removes an accelerator previously installed through * gtk_accel_group_connect(). * * Since 2.20 @closure can be %NULL. * * Params: * closure = the closure to remove from this accelerator * group, or %NULL to remove all closures * * Returns: %TRUE if the closure was found and got disconnected */ public bool disconnect(Closure closure) { return gtk_accel_group_disconnect(gtkAccelGroup, (closure is null) ? null : closure.getClosureStruct()) != 0; } /** * Removes an accelerator previously installed through * gtk_accel_group_connect(). * * Params: * accelKey = key value of the accelerator * accelMods = modifier combination of the accelerator * * Returns: %TRUE if there was an accelerator which could be * removed, %FALSE otherwise */ public bool disconnectKey(uint accelKey, GdkModifierType accelMods) { return gtk_accel_group_disconnect_key(gtkAccelGroup, accelKey, accelMods) != 0; } /** * Finds the first entry in an accelerator group for which * @find_func returns %TRUE and returns its #GtkAccelKey. * * Params: * findFunc = a function to filter the entries * of @accel_group with * data = data to pass to @find_func * * Returns: the key of the first entry passing * @find_func. The key is owned by GTK+ and must not be freed. */ public GtkAccelKey* find(GtkAccelGroupFindFunc findFunc, void* data) { return gtk_accel_group_find(gtkAccelGroup, findFunc, data); } /** * Locks are added and removed using gtk_accel_group_lock() and * gtk_accel_group_unlock(). * * Returns: %TRUE if there are 1 or more locks on the @accel_group, * %FALSE otherwise. * * Since: 2.14 */ public bool getIsLocked() { return gtk_accel_group_get_is_locked(gtkAccelGroup) != 0; } /** * Gets a #GdkModifierType representing the mask for this * @accel_group. For example, #GDK_CONTROL_MASK, #GDK_SHIFT_MASK, etc. * * Returns: the modifier mask for this accel group. * * Since: 2.14 */ public GdkModifierType getModifierMask() { return gtk_accel_group_get_modifier_mask(gtkAccelGroup); } /** * Locks the given accelerator group. * * Locking an acelerator group prevents the accelerators contained * within it to be changed during runtime. Refer to * gtk_accel_map_change_entry() about runtime accelerator changes. * * If called more than once, @accel_group remains locked until * gtk_accel_group_unlock() has been called an equivalent number * of times. */ public void lock() { gtk_accel_group_lock(gtkAccelGroup); } /** * Queries an accelerator group for all entries matching @accel_key * and @accel_mods. * * Params: * accelKey = key value of the accelerator * accelMods = modifier combination of the accelerator * * Returns: an array of * @n_entries #GtkAccelGroupEntry elements, or %NULL. The array * is owned by GTK+ and must not be freed. */ public GtkAccelGroupEntry[] query(uint accelKey, GdkModifierType accelMods) { uint nEntries; auto p = gtk_accel_group_query(gtkAccelGroup, accelKey, accelMods, &nEntries); return p[0 .. nEntries]; } /** * Undoes the last call to gtk_accel_group_lock() on this @accel_group. */ public void unlock() { gtk_accel_group_unlock(gtkAccelGroup); } protected class OnAccelActivateDelegateWrapper { bool delegate(ObjectG, uint, GdkModifierType, AccelGroup) dlg; gulong handlerId; this(bool delegate(ObjectG, uint, GdkModifierType, AccelGroup) dlg) { this.dlg = dlg; onAccelActivateListeners ~= this; } void remove(OnAccelActivateDelegateWrapper source) { foreach(index, wrapper; onAccelActivateListeners) { if (wrapper.handlerId == source.handlerId) { onAccelActivateListeners[index] = null; onAccelActivateListeners = std.algorithm.remove(onAccelActivateListeners, index); break; } } } } OnAccelActivateDelegateWrapper[] onAccelActivateListeners; /** * The accel-activate signal is an implementation detail of * #GtkAccelGroup and not meant to be used by applications. * * Params: * acceleratable = the object on which the accelerator was activated * keyval = the accelerator keyval * modifier = the modifier combination of the accelerator * * Returns: %TRUE if the accelerator was activated */ gulong addOnAccelActivate(bool delegate(ObjectG, uint, GdkModifierType, AccelGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAccelActivateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "accel-activate", cast(GCallback)&callBackAccelActivate, cast(void*)wrapper, cast(GClosureNotify)&callBackAccelActivateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static int callBackAccelActivate(GtkAccelGroup* accelgroupStruct, GObject* acceleratable, uint keyval, GdkModifierType modifier, OnAccelActivateDelegateWrapper wrapper) { return wrapper.dlg(ObjectG.getDObject!(ObjectG)(acceleratable), keyval, modifier, wrapper.outer); } extern(C) static void callBackAccelActivateDestroy(OnAccelActivateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnAccelChangedDelegateWrapper { void delegate(uint, GdkModifierType, Closure, AccelGroup) dlg; gulong handlerId; this(void delegate(uint, GdkModifierType, Closure, AccelGroup) dlg) { this.dlg = dlg; onAccelChangedListeners ~= this; } void remove(OnAccelChangedDelegateWrapper source) { foreach(index, wrapper; onAccelChangedListeners) { if (wrapper.handlerId == source.handlerId) { onAccelChangedListeners[index] = null; onAccelChangedListeners = std.algorithm.remove(onAccelChangedListeners, index); break; } } } } OnAccelChangedDelegateWrapper[] onAccelChangedListeners; /** * The accel-changed signal is emitted when an entry * is added to or removed from the accel group. * * Widgets like #GtkAccelLabel which display an associated * accelerator should connect to this signal, and rebuild * their visual representation if the @accel_closure is theirs. * * Params: * keyval = the accelerator keyval * modifier = the modifier combination of the accelerator * accelClosure = the #GClosure of the accelerator */ gulong addOnAccelChanged(void delegate(uint, GdkModifierType, Closure, AccelGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnAccelChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "accel-changed", cast(GCallback)&callBackAccelChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackAccelChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackAccelChanged(GtkAccelGroup* accelgroupStruct, uint keyval, GdkModifierType modifier, GClosure* accelClosure, OnAccelChangedDelegateWrapper wrapper) { wrapper.dlg(keyval, modifier, ObjectG.getDObject!(Closure)(accelClosure), wrapper.outer); } extern(C) static void callBackAccelChangedDestroy(OnAccelChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } /** * Finds the first accelerator in any #GtkAccelGroup attached * to @object that matches @accel_key and @accel_mods, and * activates that accelerator. * * Params: * object = the #GObject, usually a #GtkWindow, on which * to activate the accelerator * accelKey = accelerator keyval from a key event * accelMods = keyboard state mask from a key event * * Returns: %TRUE if an accelerator was activated and handled * this keypress */ public static bool accelGroupsActivate(ObjectG object, uint accelKey, GdkModifierType accelMods) { return gtk_accel_groups_activate((object is null) ? null : object.getObjectGStruct(), accelKey, accelMods) != 0; } /** * Gets a list of all accel groups which are attached to @object. * * Params: * object = a #GObject, usually a #GtkWindow * * Returns: a list of * all accel groups which are attached to @object */ public static ListSG accelGroupsFromObject(ObjectG object) { auto p = gtk_accel_groups_from_object((object is null) ? null : object.getObjectGStruct()); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Gets the modifier mask. * * The modifier mask determines which modifiers are considered significant * for keyboard accelerators. See gtk_accelerator_set_default_mod_mask(). * * Returns: the default accelerator modifier mask */ public static GdkModifierType acceleratorGetDefaultModMask() { return gtk_accelerator_get_default_mod_mask(); } /** * Converts an accelerator keyval and modifier mask into a string * which can be used to represent the accelerator to the user. * * Params: * acceleratorKey = accelerator keyval * acceleratorMods = accelerator modifier mask * * Returns: a newly-allocated string representing the accelerator. * * Since: 2.6 */ public static string acceleratorGetLabel(uint acceleratorKey, GdkModifierType acceleratorMods) { auto retStr = gtk_accelerator_get_label(acceleratorKey, acceleratorMods); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts an accelerator keyval and modifier mask * into a (possibly translated) string that can be displayed to * a user, similarly to gtk_accelerator_get_label(), but handling * keycodes. * * This is only useful for system-level components, applications * should use gtk_accelerator_parse() instead. * * Params: * display = a #GdkDisplay or %NULL to use the default display * acceleratorKey = accelerator keyval * keycode = accelerator keycode * acceleratorMods = accelerator modifier mask * * Returns: a newly-allocated string representing the accelerator. * * Since: 3.4 */ public static string acceleratorGetLabelWithKeycode(Display display, uint acceleratorKey, uint keycode, GdkModifierType acceleratorMods) { auto retStr = gtk_accelerator_get_label_with_keycode((display is null) ? null : display.getDisplayStruct(), acceleratorKey, keycode, acceleratorMods); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts an accelerator keyval and modifier mask into a string * parseable by gtk_accelerator_parse(). For example, if you pass in * #GDK_KEY_q and #GDK_CONTROL_MASK, this function returns “q”. * * If you need to display accelerators in the user interface, * see gtk_accelerator_get_label(). * * Params: * acceleratorKey = accelerator keyval * acceleratorMods = accelerator modifier mask * * Returns: a newly-allocated accelerator name */ public static string acceleratorName(uint acceleratorKey, GdkModifierType acceleratorMods) { auto retStr = gtk_accelerator_name(acceleratorKey, acceleratorMods); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Converts an accelerator keyval and modifier mask * into a string parseable by gtk_accelerator_parse_with_keycode(), * similarly to gtk_accelerator_name() but handling keycodes. * This is only useful for system-level components, applications * should use gtk_accelerator_parse() instead. * * Params: * display = a #GdkDisplay or %NULL to use the default display * acceleratorKey = accelerator keyval * keycode = accelerator keycode * acceleratorMods = accelerator modifier mask * * Returns: a newly allocated accelerator name. * * Since: 3.4 */ public static string acceleratorNameWithKeycode(Display display, uint acceleratorKey, uint keycode, GdkModifierType acceleratorMods) { auto retStr = gtk_accelerator_name_with_keycode((display is null) ? null : display.getDisplayStruct(), acceleratorKey, keycode, acceleratorMods); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Parses a string representing an accelerator. The format looks like * “a” or “F1” or “z” (the last one is * for key release). * * The parser is fairly liberal and allows lower or upper case, and also * abbreviations such as “” and “”. Key names are parsed using * gdk_keyval_from_name(). For character keys the name is not the symbol, * but the lowercase name, e.g. one would use “minus” instead of * “-”. * * If the parse fails, @accelerator_key and @accelerator_mods will * be set to 0 (zero). * * Params: * accelerator = string representing an accelerator * acceleratorKey = return location for accelerator * keyval, or %NULL * acceleratorMods = return location for accelerator * modifier mask, %NULL */ public static void acceleratorParse(string accelerator, out uint acceleratorKey, out GdkModifierType acceleratorMods) { gtk_accelerator_parse(Str.toStringz(accelerator), &acceleratorKey, &acceleratorMods); } /** * Parses a string representing an accelerator, similarly to * gtk_accelerator_parse() but handles keycodes as well. This is only * useful for system-level components, applications should use * gtk_accelerator_parse() instead. * * If @accelerator_codes is given and the result stored in it is non-%NULL, * the result must be freed with g_free(). * * If a keycode is present in the accelerator and no @accelerator_codes * is given, the parse will fail. * * If the parse fails, @accelerator_key, @accelerator_mods and * @accelerator_codes will be set to 0 (zero). * * Params: * accelerator = string representing an accelerator * acceleratorKey = return location for accelerator * keyval, or %NULL * acceleratorCodes = return location for accelerator keycodes, or %NULL * acceleratorMods = return location for accelerator * modifier mask, %NULL * * Since: 3.4 */ public static void acceleratorParseWithKeycode(string accelerator, out uint acceleratorKey, out uint[] acceleratorCodes, out GdkModifierType acceleratorMods) { uint* outacceleratorCodes = null; gtk_accelerator_parse_with_keycode(Str.toStringz(accelerator), &acceleratorKey, &outacceleratorCodes, &acceleratorMods); acceleratorCodes = outacceleratorCodes[0 .. getArrayLength(outacceleratorCodes)]; } /** * Sets the modifiers that will be considered significant for keyboard * accelerators. The default mod mask depends on the GDK backend in use, * but will typically include #GDK_CONTROL_MASK | #GDK_SHIFT_MASK | * #GDK_MOD1_MASK | #GDK_SUPER_MASK | #GDK_HYPER_MASK | #GDK_META_MASK. * In other words, Control, Shift, Alt, Super, Hyper and Meta. Other * modifiers will by default be ignored by #GtkAccelGroup. * * You must include at least the three modifiers Control, Shift * and Alt in any value you pass to this function. * * The default mod mask should be changed on application startup, * before using any accelerator groups. * * Params: * defaultModMask = accelerator modifier mask */ public static void acceleratorSetDefaultModMask(GdkModifierType defaultModMask) { gtk_accelerator_set_default_mod_mask(defaultModMask); } /** * Determines whether a given keyval and modifier mask constitute * a valid keyboard accelerator. For example, the #GDK_KEY_a keyval * plus #GDK_CONTROL_MASK is valid - this is a “Ctrl+a” accelerator. * But, you can't, for instance, use the #GDK_KEY_Control_L keyval * as an accelerator. * * Params: * keyval = a GDK keyval * modifiers = modifier mask * * Returns: %TRUE if the accelerator is valid */ public static bool acceleratorValid(uint keyval, GdkModifierType modifiers) { return gtk_accelerator_valid(keyval, modifiers) != 0; } } GtkD-3.7.5/generated/gtkd/gtk/AccelLabel.d000066400000000000000000000202121324604450400201460ustar00rootroot00000000000000/* * 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 gtk.AccelLabel; private import glib.ConstructionException; private import glib.Str; private import gobject.Closure; private import gobject.ObjectG; private import gtk.Label; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * The #GtkAccelLabel widget is a subclass of #GtkLabel that also displays an * accelerator key on the right of the label text, e.g. “Ctrl+S”. * It is commonly used in menus to show the keyboard short-cuts for commands. * * The accelerator key to display is typically not set explicitly (although it * can be, with gtk_accel_label_set_accel()). Instead, the #GtkAccelLabel displays * the accelerators which have been added to a particular widget. This widget is * set by calling gtk_accel_label_set_accel_widget(). * * For example, a #GtkMenuItem widget may have an accelerator added to emit * the “activate” signal when the “Ctrl+S” key combination is pressed. * A #GtkAccelLabel is created and added to the #GtkMenuItem, and * gtk_accel_label_set_accel_widget() is called with the #GtkMenuItem as the * second argument. The #GtkAccelLabel will now display “Ctrl+S” after its label. * * Note that creating a #GtkMenuItem with gtk_menu_item_new_with_label() (or * one of the similar functions for #GtkCheckMenuItem and #GtkRadioMenuItem) * automatically adds a #GtkAccelLabel to the #GtkMenuItem and calls * gtk_accel_label_set_accel_widget() to set it up for you. * * A #GtkAccelLabel will only display accelerators which have %GTK_ACCEL_VISIBLE * set (see #GtkAccelFlags). * A #GtkAccelLabel can display multiple accelerators and even signal names, * though it is almost always used to display just one accelerator key. * * ## Creating a simple menu item with an accelerator key. * * |[ * GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL); * GtkWidget *menu = gtk_menu_new (); * GtkWidget *save_item; * GtkAccelGroup *accel_group; * * // Create a GtkAccelGroup and add it to the window. * accel_group = gtk_accel_group_new (); * gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); * * // Create the menu item using the convenience function. * save_item = gtk_menu_item_new_with_label ("Save"); * gtk_widget_show (save_item); * gtk_container_add (GTK_CONTAINER (menu), save_item); * * // Now add the accelerator to the GtkMenuItem. Note that since we * // called gtk_menu_item_new_with_label() to create the GtkMenuItem * // the GtkAccelLabel is automatically set up to display the * // GtkMenuItem accelerators. We just need to make sure we use * // GTK_ACCEL_VISIBLE here. * gtk_widget_add_accelerator (save_item, "activate", accel_group, * GDK_KEY_s, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); * ]| * * # CSS nodes * * |[ * label * ╰── accelerator * ]| * * Like #GtkLabel, GtkAccelLabel has a main CSS node with the name label. * It adds a subnode with name accelerator. */ public class AccelLabel : Label { /** the main Gtk struct */ protected GtkAccelLabel* gtkAccelLabel; /** Get the main Gtk struct */ public GtkAccelLabel* getAccelLabelStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAccelLabel; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAccelLabel; } protected override void setStruct(GObject* obj) { gtkAccelLabel = cast(GtkAccelLabel*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAccelLabel* gtkAccelLabel, bool ownedRef = false) { this.gtkAccelLabel = gtkAccelLabel; super(cast(GtkLabel*)gtkAccelLabel, ownedRef); } /** */ public static GType getType() { return gtk_accel_label_get_type(); } /** * Creates a new #GtkAccelLabel. * * Params: * str = the label string. Must be non-%NULL. * * Returns: a new #GtkAccelLabel. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string str) { auto p = gtk_accel_label_new(Str.toStringz(str)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAccelLabel*) p); } /** * Gets the keyval and modifier mask set with * gtk_accel_label_set_accel(). * * Params: * acceleratorKey = return location for the keyval * acceleratorMods = return location for the modifier mask * * Since: 3.12 */ public void getAccel(out uint acceleratorKey, out GdkModifierType acceleratorMods) { gtk_accel_label_get_accel(gtkAccelLabel, &acceleratorKey, &acceleratorMods); } /** * Fetches the widget monitored by this accelerator label. See * gtk_accel_label_set_accel_widget(). * * Returns: the object monitored by the accelerator label, or %NULL. */ public Widget getAccelWidget() { auto p = gtk_accel_label_get_accel_widget(gtkAccelLabel); if(p is null) { return null; } return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); } /** * Returns the width needed to display the accelerator key(s). * This is used by menus to align all of the #GtkMenuItem widgets, and shouldn't * be needed by applications. * * Returns: the width needed to display the accelerator key(s). */ public uint getAccelWidth() { return gtk_accel_label_get_accel_width(gtkAccelLabel); } /** * Recreates the string representing the accelerator keys. * This should not be needed since the string is automatically updated whenever * accelerators are added or removed from the associated widget. * * Returns: always returns %FALSE. */ public bool refetch() { return gtk_accel_label_refetch(gtkAccelLabel) != 0; } /** * Manually sets a keyval and modifier mask as the accelerator rendered * by @accel_label. * * If a keyval and modifier are explicitly set then these values are * used regardless of any associated accel closure or widget. * * Providing an @accelerator_key of 0 removes the manual setting. * * Params: * acceleratorKey = a keyval, or 0 * acceleratorMods = the modifier mask for the accel * * Since: 3.6 */ public void setAccel(uint acceleratorKey, GdkModifierType acceleratorMods) { gtk_accel_label_set_accel(gtkAccelLabel, acceleratorKey, acceleratorMods); } /** * Sets the closure to be monitored by this accelerator label. The closure * must be connected to an accelerator group; see gtk_accel_group_connect(). * Passing %NULL for @accel_closure will dissociate @accel_label from its * current closure, if any. * * Params: * accelClosure = the closure to monitor for accelerator changes, * or %NULL */ public void setAccelClosure(Closure accelClosure) { gtk_accel_label_set_accel_closure(gtkAccelLabel, (accelClosure is null) ? null : accelClosure.getClosureStruct()); } /** * Sets the widget to be monitored by this accelerator label. Passing %NULL for * @accel_widget will dissociate @accel_label from its current widget, if any. * * Params: * accelWidget = the widget to be monitored, or %NULL */ public void setAccelWidget(Widget accelWidget) { gtk_accel_label_set_accel_widget(gtkAccelLabel, (accelWidget is null) ? null : accelWidget.getWidgetStruct()); } } GtkD-3.7.5/generated/gtkd/gtk/AccelMap.d000066400000000000000000000335111324604450400176520ustar00rootroot00000000000000/* * 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 gtk.AccelMap; private import glib.ScannerG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * Accelerator maps are used to define runtime configurable accelerators. * Functions for manipulating them are are usually used by higher level * convenience mechanisms like #GtkUIManager and are thus considered * “low-level”. You’ll want to use them if you’re manually creating menus that * should have user-configurable accelerators. * * An accelerator is uniquely defined by: * - accelerator path * - accelerator key * - accelerator modifiers * * The accelerator path must consist of * “/Category1/Category2/.../Action”, where WINDOWTYPE * should be a unique application-specific identifier that corresponds * to the kind of window the accelerator is being used in, e.g. * “Gimp-Image”, “Abiword-Document” or “Gnumeric-Settings”. * The “Category1/.../Action” portion is most appropriately chosen by * the action the accelerator triggers, i.e. for accelerators on menu * items, choose the item’s menu path, e.g. “File/Save As”, * “Image/View/Zoom” or “Edit/Select All”. So a full valid accelerator * path may look like: “/File/Dialogs/Tool Options...”. * * All accelerators are stored inside one global #GtkAccelMap that can * be obtained using gtk_accel_map_get(). See * [Monitoring changes][monitoring-changes] for additional * details. * * # Manipulating accelerators * * New accelerators can be added using gtk_accel_map_add_entry(). * To search for specific accelerator, use gtk_accel_map_lookup_entry(). * Modifications of existing accelerators should be done using * gtk_accel_map_change_entry(). * * In order to avoid having some accelerators changed, they can be * locked using gtk_accel_map_lock_path(). Unlocking is done using * gtk_accel_map_unlock_path(). * * # Saving and loading accelerator maps * * Accelerator maps can be saved to and loaded from some external * resource. For simple saving and loading from file, * gtk_accel_map_save() and gtk_accel_map_load() are provided. * Saving and loading can also be done by providing file descriptor * to gtk_accel_map_save_fd() and gtk_accel_map_load_fd(). * * # Monitoring changes * * #GtkAccelMap object is only useful for monitoring changes of * accelerators. By connecting to #GtkAccelMap::changed signal, one * can monitor changes of all accelerators. It is also possible to * monitor only single accelerator path by using it as a detail of * the #GtkAccelMap::changed signal. */ public class AccelMap : ObjectG { /** the main Gtk struct */ protected GtkAccelMap* gtkAccelMap; /** Get the main Gtk struct */ public GtkAccelMap* getAccelMapStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAccelMap; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAccelMap; } protected override void setStruct(GObject* obj) { gtkAccelMap = cast(GtkAccelMap*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAccelMap* gtkAccelMap, bool ownedRef = false) { this.gtkAccelMap = gtkAccelMap; super(cast(GObject*)gtkAccelMap, ownedRef); } /** */ public static GType getType() { return gtk_accel_map_get_type(); } /** * Registers a new accelerator with the global accelerator map. * This function should only be called once per @accel_path * with the canonical @accel_key and @accel_mods for this path. * To change the accelerator during runtime programatically, use * gtk_accel_map_change_entry(). * * Set @accel_key and @accel_mods to 0 to request a removal of * the accelerator. * * Note that @accel_path string will be stored in a #GQuark. Therefore, if you * pass a static string, you can save some memory by interning it first with * g_intern_static_string(). * * Params: * accelPath = valid accelerator path * accelKey = the accelerator key * accelMods = the accelerator modifiers */ public static void addEntry(string accelPath, uint accelKey, GdkModifierType accelMods) { gtk_accel_map_add_entry(Str.toStringz(accelPath), accelKey, accelMods); } /** * Adds a filter to the global list of accel path filters. * * Accel map entries whose accel path matches one of the filters * are skipped by gtk_accel_map_foreach(). * * This function is intended for GTK+ modules that create their own * menus, but don’t want them to be saved into the applications accelerator * map dump. * * Params: * filterPattern = a pattern (see #GPatternSpec) */ public static void addFilter(string filterPattern) { gtk_accel_map_add_filter(Str.toStringz(filterPattern)); } /** * Changes the @accel_key and @accel_mods currently associated with @accel_path. * Due to conflicts with other accelerators, a change may not always be possible, * @replace indicates whether other accelerators may be deleted to resolve such * conflicts. A change will only occur if all conflicts could be resolved (which * might not be the case if conflicting accelerators are locked). Successful * changes are indicated by a %TRUE return value. * * Note that @accel_path string will be stored in a #GQuark. Therefore, if you * pass a static string, you can save some memory by interning it first with * g_intern_static_string(). * * Params: * accelPath = a valid accelerator path * accelKey = the new accelerator key * accelMods = the new accelerator modifiers * replace = %TRUE if other accelerators may be deleted upon conflicts * * Returns: %TRUE if the accelerator could be changed, %FALSE otherwise */ public static bool changeEntry(string accelPath, uint accelKey, GdkModifierType accelMods, bool replace) { return gtk_accel_map_change_entry(Str.toStringz(accelPath), accelKey, accelMods, replace) != 0; } /** * Loops over the entries in the accelerator map whose accel path * doesn’t match any of the filters added with gtk_accel_map_add_filter(), * and execute @foreach_func on each. The signature of @foreach_func is * that of #GtkAccelMapForeach, the @changed parameter indicates whether * this accelerator was changed during runtime (thus, would need * saving during an accelerator map dump). * * Params: * data = data to be passed into @foreach_func * foreachFunc = function to be executed for each accel * map entry which is not filtered out */ public static void foreac(void* data, GtkAccelMapForeach foreachFunc) { gtk_accel_map_foreach(data, foreachFunc); } /** * Loops over all entries in the accelerator map, and execute * @foreach_func on each. The signature of @foreach_func is that of * #GtkAccelMapForeach, the @changed parameter indicates whether * this accelerator was changed during runtime (thus, would need * saving during an accelerator map dump). * * Params: * data = data to be passed into @foreach_func * foreachFunc = function to be executed for each accel * map entry */ public static void foreachUnfiltered(void* data, GtkAccelMapForeach foreachFunc) { gtk_accel_map_foreach_unfiltered(data, foreachFunc); } /** * Gets the singleton global #GtkAccelMap object. This object * is useful only for notification of changes to the accelerator * map via the ::changed signal; it isn’t a parameter to the * other accelerator map functions. * * Returns: the global #GtkAccelMap object * * Since: 2.4 */ public static AccelMap get() { auto p = gtk_accel_map_get(); if(p is null) { return null; } return ObjectG.getDObject!(AccelMap)(cast(GtkAccelMap*) p); } /** * Parses a file previously saved with gtk_accel_map_save() for * accelerator specifications, and propagates them accordingly. * * Params: * fileName = a file containing accelerator specifications, * in the GLib file name encoding */ public static void load(string fileName) { gtk_accel_map_load(Str.toStringz(fileName)); } /** * Filedescriptor variant of gtk_accel_map_load(). * * Note that the file descriptor will not be closed by this function. * * Params: * fd = a valid readable file descriptor */ public static void loadFd(int fd) { gtk_accel_map_load_fd(fd); } /** * #GScanner variant of gtk_accel_map_load(). * * Params: * scanner = a #GScanner which has already been provided with an input file */ public static void loadScanner(ScannerG scanner) { gtk_accel_map_load_scanner((scanner is null) ? null : scanner.getScannerGStruct()); } /** * Locks the given accelerator path. If the accelerator map doesn’t yet contain * an entry for @accel_path, a new one is created. * * Locking an accelerator path prevents its accelerator from being changed * during runtime. A locked accelerator path can be unlocked by * gtk_accel_map_unlock_path(). Refer to gtk_accel_map_change_entry() * for information about runtime accelerator changes. * * If called more than once, @accel_path remains locked until * gtk_accel_map_unlock_path() has been called an equivalent number * of times. * * Note that locking of individual accelerator paths is independent from * locking the #GtkAccelGroup containing them. For runtime accelerator * changes to be possible, both the accelerator path and its #GtkAccelGroup * have to be unlocked. * * Params: * accelPath = a valid accelerator path * * Since: 2.4 */ public static void lockPath(string accelPath) { gtk_accel_map_lock_path(Str.toStringz(accelPath)); } /** * Looks up the accelerator entry for @accel_path and fills in @key. * * Params: * accelPath = a valid accelerator path * key = the accelerator key to be filled in (optional) * * Returns: %TRUE if @accel_path is known, %FALSE otherwise */ public static bool lookupEntry(string accelPath, out GtkAccelKey key) { return gtk_accel_map_lookup_entry(Str.toStringz(accelPath), &key) != 0; } /** * Saves current accelerator specifications (accelerator path, key * and modifiers) to @file_name. * The file is written in a format suitable to be read back in by * gtk_accel_map_load(). * * Params: * fileName = the name of the file to contain * accelerator specifications, in the GLib file name encoding */ public static void save(string fileName) { gtk_accel_map_save(Str.toStringz(fileName)); } /** * Filedescriptor variant of gtk_accel_map_save(). * * Note that the file descriptor will not be closed by this function. * * Params: * fd = a valid writable file descriptor */ public static void saveFd(int fd) { gtk_accel_map_save_fd(fd); } /** * Undoes the last call to gtk_accel_map_lock_path() on this @accel_path. * Refer to gtk_accel_map_lock_path() for information about accelerator path locking. * * Params: * accelPath = a valid accelerator path * * Since: 2.4 */ public static void unlockPath(string accelPath) { gtk_accel_map_unlock_path(Str.toStringz(accelPath)); } protected class OnChangedDelegateWrapper { void delegate(string, uint, GdkModifierType, AccelMap) dlg; gulong handlerId; this(void delegate(string, uint, GdkModifierType, AccelMap) dlg) { this.dlg = dlg; onChangedListeners ~= this; } void remove(OnChangedDelegateWrapper source) { foreach(index, wrapper; onChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChangedListeners[index] = null; onChangedListeners = std.algorithm.remove(onChangedListeners, index); break; } } } } OnChangedDelegateWrapper[] onChangedListeners; /** * Notifies of a change in the global accelerator map. * The path is also used as the detail for the signal, * so it is possible to connect to * changed::`accel_path`. * * Params: * accelPath = the path of the accelerator that changed * accelKey = the key value for the new accelerator * accelMods = the modifier mask for the new accelerator * * Since: 2.4 */ gulong addOnChanged(void delegate(string, uint, GdkModifierType, AccelMap) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "changed", cast(GCallback)&callBackChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChanged(GtkAccelMap* accelmapStruct, char* accelPath, uint accelKey, GdkModifierType accelMods, OnChangedDelegateWrapper wrapper) { wrapper.dlg(Str.toString(accelPath), accelKey, accelMods, wrapper.outer); } extern(C) static void callBackChangedDestroy(OnChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gtk/Accessible.d000066400000000000000000000075011324604450400202420ustar00rootroot00000000000000/* * 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 gtk.Accessible; private import atk.ObjectAtk; private import gobject.ObjectG; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * The #GtkAccessible class is the base class for accessible * implementations for #GtkWidget subclasses. It is a thin * wrapper around #AtkObject, which adds facilities for associating * a widget with its accessible object. * * An accessible implementation for a third-party widget should * derive from #GtkAccessible and implement the suitable interfaces * from ATK, such as #AtkText or #AtkSelection. To establish * the connection between the widget class and its corresponding * acccessible implementation, override the get_accessible vfunc * in #GtkWidgetClass. */ public class Accessible : ObjectAtk { /** the main Gtk struct */ protected GtkAccessible* gtkAccessible; /** Get the main Gtk struct */ public GtkAccessible* getAccessibleStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAccessible; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAccessible; } protected override void setStruct(GObject* obj) { gtkAccessible = cast(GtkAccessible*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAccessible* gtkAccessible, bool ownedRef = false) { this.gtkAccessible = gtkAccessible; super(cast(AtkObject*)gtkAccessible, ownedRef); } /** */ public static GType getType() { return gtk_accessible_get_type(); } /** * This function specifies the callback function to be called * when the widget corresponding to a GtkAccessible is destroyed. * * Deprecated: Use gtk_accessible_set_widget() and its vfuncs. */ public void connectWidgetDestroyed() { gtk_accessible_connect_widget_destroyed(gtkAccessible); } /** * Gets the #GtkWidget corresponding to the #GtkAccessible. * The returned widget does not have a reference added, so * you do not need to unref it. * * Returns: pointer to the #GtkWidget * corresponding to the #GtkAccessible, or %NULL. * * Since: 2.22 */ public Widget getWidget() { auto p = gtk_accessible_get_widget(gtkAccessible); if(p is null) { return null; } return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); } /** * Sets the #GtkWidget corresponding to the #GtkAccessible. * * @accessible will not hold a reference to @widget. * It is the caller’s responsibility to ensure that when @widget * is destroyed, the widget is unset by calling this function * again with @widget set to %NULL. * * Params: * widget = a #GtkWidget or %NULL to unset * * Since: 2.22 */ public void setWidget(Widget widget) { gtk_accessible_set_widget(gtkAccessible, (widget is null) ? null : widget.getWidgetStruct()); } } GtkD-3.7.5/generated/gtkd/gtk/Action.d000066400000000000000000000575531324604450400174360ustar00rootroot00000000000000/* * 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 gtk.Action; private import gio.IconIF; private import glib.ConstructionException; private import glib.ListSG; private import glib.Str; private import gobject.Closure; private import gobject.ObjectG; private import gobject.Signals; private import gtk.AccelGroup; private import gtk.BuildableIF; private import gtk.BuildableT; private import gtk.Image; private import gtk.Menu; private import gtk.MenuItem; private import gtk.ToolItem; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * > In GTK+ 3.10, GtkAction has been deprecated. Use #GAction * > instead, and associate actions with #GtkActionable widgets. Use * > #GMenuModel for creating menus with gtk_menu_new_from_model(). * * Actions represent operations that the user can be perform, along with * some information how it should be presented in the interface. Each action * provides methods to create icons, menu items and toolbar items * representing itself. * * As well as the callback that is called when the action gets activated, * the following also gets associated with the action: * * - a name (not translated, for path lookup) * * - a label (translated, for display) * * - an accelerator * * - whether label indicates a stock id * * - a tooltip (optional, translated) * * - a toolbar label (optional, shorter than label) * * * The action will also have some state information: * * - visible (shown/hidden) * * - sensitive (enabled/disabled) * * Apart from regular actions, there are [toggle actions][GtkToggleAction], * which can be toggled between two states and * [radio actions][GtkRadioAction], of which only one in a group * can be in the “active” state. Other actions can be implemented as #GtkAction * subclasses. * * Each action can have one or more proxy widgets. To act as an action proxy, * widget needs to implement #GtkActivatable interface. Proxies mirror the state * of the action and should change when the action’s state changes. Properties * that are always mirrored by proxies are #GtkAction:sensitive and * #GtkAction:visible. #GtkAction:gicon, #GtkAction:icon-name, #GtkAction:label, * #GtkAction:short-label and #GtkAction:stock-id properties are only mirorred * if proxy widget has #GtkActivatable:use-action-appearance property set to * %TRUE. * * When the proxy is activated, it should activate its action. */ public class Action : ObjectG, BuildableIF { /** the main Gtk struct */ protected GtkAction* gtkAction; /** Get the main Gtk struct */ public GtkAction* getActionStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAction; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAction; } protected override void setStruct(GObject* obj) { gtkAction = cast(GtkAction*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAction* gtkAction, bool ownedRef = false) { this.gtkAction = gtkAction; super(cast(GObject*)gtkAction, ownedRef); } // add the Buildable capabilities mixin BuildableT!(GtkAction); /** * Creates a new GtkAction object. To add the action to a * GtkActionGroup and set the accelerator for the action, * call gtk_action_group_add_action_with_accel(). * See the section called UI Definitions for information on allowed action * names. * Since 2.4 * Params: * name = A unique name for the action * label = the label displayed in menu items and on buttons, or NULL * tooltip = a tooltip for the action, or NULL * stockId = the stock icon to display in widgets representing the * action. * Throws: ConstructionException GTK+ fails to create the object. */ public this (string name, string label, string tooltip, StockID stockId) { this(name, label, tooltip, cast(string)stockId); } /** * Gets the stock id of action. * Since 2.16 * Returns: the stock id */ public StockID getStockId() { return cast(StockID)Str.toString(gtk_action_get_stock_id(gtkAction)); } /** * Sets the stock id on action * Since 2.16 * Params: * stockId = the stock id */ public void setStockId(StockID stockId) { setStockId(stockId); } /** * This function is intended for use by action implementations to * create icons displayed in the proxy widgets. * Since 2.4 * Params: * iconSize = the size of the icon that should be created. [type int] * Returns: a widget that displays the icon for this action. */ public Image createIcon(GtkIconSize iconSize) { // GtkWidget * gtk_action_create_icon (GtkAction *action, GtkIconSize icon_size); auto p = gtk_action_create_icon(gtkAction, iconSize); if(p is null) { return null; } return new Image(cast(GtkImage*) p); } /** * Creates a menu item widget that proxies for the given action. * Since 2.4 * Returns: a menu item connected to the action. */ public MenuItem createMenuItem() { // GtkWidget * gtk_action_create_menu_item (GtkAction *action); auto p = gtk_action_create_menu_item(gtkAction); if(p is null) { return null; } return new MenuItem(cast(GtkMenuItem*) p); } /** * Creates a toolbar item widget that proxies for the given action. * Since 2.4 * Returns: a toolbar item connected to the action. */ public ToolItem createToolItem() { // GtkWidget * gtk_action_create_tool_item (GtkAction *action); auto p = gtk_action_create_tool_item(gtkAction); if(p is null) { return null; } return new ToolItem(cast(GtkToolItem*) p); } /** * If action provides a GtkMenu widget as a submenu for the menu * item or the toolbar item it creates, this function returns an * instance of that menu. * Since 2.12 * Returns: the menu item provided by the action, or NULL. */ public Menu createMenu() { // GtkWidget * gtk_action_create_menu (GtkAction *action); auto p = gtk_action_create_menu(gtkAction); if(p is null) { return null; } return new Menu(cast(GtkMenu*) p); } /** */ /** */ public static GType getType() { return gtk_action_get_type(); } /** * Creates a new #GtkAction object. To add the action to a * #GtkActionGroup and set the accelerator for the action, * call gtk_action_group_add_action_with_accel(). * See the [UI Definition section][XML-UI] for information on allowed action * names. * * Deprecated: Use #GAction instead, associating it to a widget with * #GtkActionable or creating a #GtkMenu with gtk_menu_new_from_model() * * Params: * name = A unique name for the action * label = the label displayed in menu items and on buttons, * or %NULL * tooltip = a tooltip for the action, or %NULL * stockId = the stock icon to display in widgets representing * the action, or %NULL * * Returns: a new #GtkAction * * Since: 2.4 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name, string label, string tooltip, string stockId) { auto p = gtk_action_new(Str.toStringz(name), Str.toStringz(label), Str.toStringz(tooltip), Str.toStringz(stockId)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAction*) p, true); } /** * Emits the “activate” signal on the specified action, if it isn't * insensitive. This gets called by the proxy widgets when they get * activated. * * It can also be used to manually activate an action. * * Deprecated: Use g_action_group_activate_action() on a #GAction instead * * Since: 2.4 */ public void activate() { gtk_action_activate(gtkAction); } /** * Disable activation signals from the action * * This is needed when updating the state of your proxy * #GtkActivatable widget could result in calling gtk_action_activate(), * this is a convenience function to avoid recursing in those * cases (updating toggle state for instance). * * Deprecated: Use g_simple_action_set_enabled() to disable the * #GSimpleAction instead * * Since: 2.16 */ public void blockActivate() { gtk_action_block_activate(gtkAction); } /** * Installs the accelerator for @action if @action has an * accel path and group. See gtk_action_set_accel_path() and * gtk_action_set_accel_group() * * Since multiple proxies may independently trigger the installation * of the accelerator, the @action counts the number of times this * function has been called and doesn’t remove the accelerator until * gtk_action_disconnect_accelerator() has been called as many times. * * Deprecated: Use #GAction and the accelerator group on an associated * #GtkMenu instead * * Since: 2.4 */ public void connectAccelerator() { gtk_action_connect_accelerator(gtkAction); } /** * Undoes the effect of one call to gtk_action_connect_accelerator(). * * Deprecated: Use #GAction and the accelerator group on an associated * #GtkMenu instead * * Since: 2.4 */ public void disconnectAccelerator() { gtk_action_disconnect_accelerator(gtkAction); } /** * Returns the accel closure for this action. * * Deprecated: Use #GAction and #GtkMenu instead, which have no * equivalent for getting the accel closure * * Returns: the accel closure for this action. The * returned closure is owned by GTK+ and must not be unreffed * or modified. * * Since: 2.8 */ public Closure getAccelClosure() { auto p = gtk_action_get_accel_closure(gtkAction); if(p is null) { return null; } return ObjectG.getDObject!(Closure)(cast(GClosure*) p); } /** * Returns the accel path for this action. * * Deprecated: Use #GAction and the accelerator path on an associated * #GtkMenu instead * * Returns: the accel path for this action, or %NULL * if none is set. The returned string is owned by GTK+ * and must not be freed or modified. * * Since: 2.6 */ public string getAccelPath() { return Str.toString(gtk_action_get_accel_path(gtkAction)); } /** * Returns whether @action's menu item proxies will always * show their image, if available. * * Deprecated: Use g_menu_item_get_attribute_value() on a #GMenuItem * instead * * Returns: %TRUE if the menu item proxies will always show their image * * Since: 2.20 */ public bool getAlwaysShowImage() { return gtk_action_get_always_show_image(gtkAction) != 0; } /** * Gets the gicon of @action. * * Deprecated: Use #GAction instead, and * g_menu_item_get_attribute_value() to get an icon from a #GMenuItem * associated with a #GAction * * Returns: The action’s #GIcon if one is set. * * Since: 2.16 */ public IconIF getGicon() { auto p = gtk_action_get_gicon(gtkAction); if(p is null) { return null; } return ObjectG.getDObject!(IconIF)(cast(GIcon*) p); } /** * Gets the icon name of @action. * * Deprecated: Use #GAction instead, and * g_menu_item_get_attribute_value() to get an icon from a #GMenuItem * associated with a #GAction * * Returns: the icon name * * Since: 2.16 */ public string getIconName() { return Str.toString(gtk_action_get_icon_name(gtkAction)); } /** * Checks whether @action is important or not * * Deprecated: Use #GAction instead, and control and monitor whether * labels are shown directly * * Returns: whether @action is important * * Since: 2.16 */ public bool getIsImportant() { return gtk_action_get_is_important(gtkAction) != 0; } /** * Gets the label text of @action. * * Deprecated: Use #GAction instead, and get a label from a menu item * with g_menu_item_get_attribute_value(). For #GtkActionable widgets, use the * widget-specific API to get a label * * Returns: the label text * * Since: 2.16 */ public string getLabel() { return Str.toString(gtk_action_get_label(gtkAction)); } /** * Returns the name of the action. * * Deprecated: Use g_action_get_name() on a #GAction instead * * Returns: the name of the action. The string belongs to GTK+ and should not * be freed. * * Since: 2.4 */ public string getName() { return Str.toString(gtk_action_get_name(gtkAction)); } /** * Returns the proxy widgets for an action. * See also gtk_activatable_get_related_action(). * * Returns: a #GSList of proxy widgets. The list is owned by GTK+ * and must not be modified. * * Since: 2.4 */ public ListSG getProxies() { auto p = gtk_action_get_proxies(gtkAction); if(p is null) { return null; } return new ListSG(cast(GSList*) p); } /** * Returns whether the action itself is sensitive. Note that this doesn’t * necessarily mean effective sensitivity. See gtk_action_is_sensitive() * for that. * * Deprecated: Use g_action_get_enabled() on a #GAction * instead * * Returns: %TRUE if the action itself is sensitive. * * Since: 2.4 */ public bool getSensitive() { return gtk_action_get_sensitive(gtkAction) != 0; } /** * Gets the short label text of @action. * * Deprecated: Use #GAction instead, which has no equivalent of short * labels * * Returns: the short label text. * * Since: 2.16 */ public string getShortLabel() { return Str.toString(gtk_action_get_short_label(gtkAction)); } /** * Gets the tooltip text of @action. * * Deprecated: Use #GAction instead, and get tooltips from associated * #GtkActionable widgets with gtk_widget_get_tooltip_text() * * Returns: the tooltip text * * Since: 2.16 */ public string getTooltip() { return Str.toString(gtk_action_get_tooltip(gtkAction)); } /** * Returns whether the action itself is visible. Note that this doesn’t * necessarily mean effective visibility. See gtk_action_is_sensitive() * for that. * * Deprecated: Use #GAction instead, and control and monitor the state of * #GtkActionable widgets directly * * Returns: %TRUE if the action itself is visible. * * Since: 2.4 */ public bool getVisible() { return gtk_action_get_visible(gtkAction) != 0; } /** * Checks whether @action is visible when horizontal * * Deprecated: Use #GAction instead, and control and monitor the * visibility of associated widgets and menu items directly * * Returns: whether @action is visible when horizontal * * Since: 2.16 */ public bool getVisibleHorizontal() { return gtk_action_get_visible_horizontal(gtkAction) != 0; } /** * Checks whether @action is visible when horizontal * * Deprecated: Use #GAction instead, and control and monitor the * visibility of associated widgets and menu items directly * * Returns: whether @action is visible when horizontal * * Since: 2.16 */ public bool getVisibleVertical() { return gtk_action_get_visible_vertical(gtkAction) != 0; } /** * Returns whether the action is effectively sensitive. * * Deprecated: Use g_action_get_enabled() on a #GAction * instead * * Returns: %TRUE if the action and its associated action group * are both sensitive. * * Since: 2.4 */ public bool isSensitive() { return gtk_action_is_sensitive(gtkAction) != 0; } /** * Returns whether the action is effectively visible. * * Deprecated: Use #GAction instead, and control and monitor the state of * #GtkActionable widgets directly * * Returns: %TRUE if the action and its associated action group * are both visible. * * Since: 2.4 */ public bool isVisible() { return gtk_action_is_visible(gtkAction) != 0; } /** * Sets the #GtkAccelGroup in which the accelerator for this action * will be installed. * * Deprecated: Use #GAction and the accelerator group on an associated * #GtkMenu instead * * Params: * accelGroup = a #GtkAccelGroup or %NULL * * Since: 2.4 */ public void setAccelGroup(AccelGroup accelGroup) { gtk_action_set_accel_group(gtkAction, (accelGroup is null) ? null : accelGroup.getAccelGroupStruct()); } /** * Sets the accel path for this action. All proxy widgets associated * with the action will have this accel path, so that their * accelerators are consistent. * * Note that @accel_path string will be stored in a #GQuark. Therefore, if you * pass a static string, you can save some memory by interning it first with * g_intern_static_string(). * * Deprecated: Use #GAction and the accelerator path on an associated * #GtkMenu instead * * Params: * accelPath = the accelerator path * * Since: 2.4 */ public void setAccelPath(string accelPath) { gtk_action_set_accel_path(gtkAction, Str.toStringz(accelPath)); } /** * Sets whether @action's menu item proxies will ignore the * #GtkSettings:gtk-menu-images setting and always show their image, if available. * * Use this if the menu item would be useless or hard to use * without their image. * * Deprecated: Use g_menu_item_set_icon() on a #GMenuItem instead, if the * item should have an image * * Params: * alwaysShow = %TRUE if menuitem proxies should always show their image * * Since: 2.20 */ public void setAlwaysShowImage(bool alwaysShow) { gtk_action_set_always_show_image(gtkAction, alwaysShow); } /** * Sets the icon of @action. * * Deprecated: Use #GAction instead, and g_menu_item_set_icon() to set an * icon on a #GMenuItem associated with a #GAction, or gtk_container_add() to * add a #GtkImage to a #GtkButton * * Params: * icon = the #GIcon to set * * Since: 2.16 */ public void setGicon(IconIF icon) { gtk_action_set_gicon(gtkAction, (icon is null) ? null : icon.getIconStruct()); } /** * Sets the icon name on @action * * Deprecated: Use #GAction instead, and g_menu_item_set_icon() to set an * icon on a #GMenuItem associated with a #GAction, or gtk_container_add() to * add a #GtkImage to a #GtkButton * * Params: * iconName = the icon name to set * * Since: 2.16 */ public void setIconName(string iconName) { gtk_action_set_icon_name(gtkAction, Str.toStringz(iconName)); } /** * Sets whether the action is important, this attribute is used * primarily by toolbar items to decide whether to show a label * or not. * * Deprecated: Use #GAction instead, and control and monitor whether * labels are shown directly * * Params: * isImportant = %TRUE to make the action important * * Since: 2.16 */ public void setIsImportant(bool isImportant) { gtk_action_set_is_important(gtkAction, isImportant); } /** * Sets the label of @action. * * Deprecated: Use #GAction instead, and set a label on a menu item with * g_menu_item_set_label(). For #GtkActionable widgets, use the widget-specific * API to set a label * * Params: * label = the label text to set * * Since: 2.16 */ public void setLabel(string label) { gtk_action_set_label(gtkAction, Str.toStringz(label)); } /** * Sets the :sensitive property of the action to @sensitive. Note that * this doesn’t necessarily mean effective sensitivity. See * gtk_action_is_sensitive() * for that. * * Deprecated: Use g_simple_action_set_enabled() on a #GSimpleAction * instead * * Params: * sensitive = %TRUE to make the action sensitive * * Since: 2.6 */ public void setSensitive(bool sensitive) { gtk_action_set_sensitive(gtkAction, sensitive); } /** * Sets a shorter label text on @action. * * Deprecated: Use #GAction instead, which has no equivalent of short * labels * * Params: * shortLabel = the label text to set * * Since: 2.16 */ public void setShortLabel(string shortLabel) { gtk_action_set_short_label(gtkAction, Str.toStringz(shortLabel)); } /** * Sets the stock id on @action * * Deprecated: Use #GAction instead, which has no equivalent of stock * items * * Params: * stockId = the stock id * * Since: 2.16 */ public void setStockId(string stockId) { gtk_action_set_stock_id(gtkAction, Str.toStringz(stockId)); } /** * Sets the tooltip text on @action * * Deprecated: Use #GAction instead, and set tooltips on associated * #GtkActionable widgets with gtk_widget_set_tooltip_text() * * Params: * tooltip = the tooltip text * * Since: 2.16 */ public void setTooltip(string tooltip) { gtk_action_set_tooltip(gtkAction, Str.toStringz(tooltip)); } /** * Sets the :visible property of the action to @visible. Note that * this doesn’t necessarily mean effective visibility. See * gtk_action_is_visible() * for that. * * Deprecated: Use #GAction instead, and control and monitor the state of * #GtkActionable widgets directly * * Params: * visible = %TRUE to make the action visible * * Since: 2.6 */ public void setVisible(bool visible) { gtk_action_set_visible(gtkAction, visible); } /** * Sets whether @action is visible when horizontal * * Deprecated: Use #GAction instead, and control and monitor the * visibility of associated widgets and menu items directly * * Params: * visibleHorizontal = whether the action is visible horizontally * * Since: 2.16 */ public void setVisibleHorizontal(bool visibleHorizontal) { gtk_action_set_visible_horizontal(gtkAction, visibleHorizontal); } /** * Sets whether @action is visible when vertical * * Deprecated: Use #GAction instead, and control and monitor the * visibility of associated widgets and menu items directly * * Params: * visibleVertical = whether the action is visible vertically * * Since: 2.16 */ public void setVisibleVertical(bool visibleVertical) { gtk_action_set_visible_vertical(gtkAction, visibleVertical); } /** * Reenable activation signals from the action * * Deprecated: Use g_simple_action_set_enabled() to enable the * #GSimpleAction instead * * Since: 2.16 */ public void unblockActivate() { gtk_action_unblock_activate(gtkAction); } protected class OnActivateDelegateWrapper { void delegate(Action) dlg; gulong handlerId; this(void delegate(Action) dlg) { this.dlg = dlg; onActivateListeners ~= this; } void remove(OnActivateDelegateWrapper source) { foreach(index, wrapper; onActivateListeners) { if (wrapper.handlerId == source.handlerId) { onActivateListeners[index] = null; onActivateListeners = std.algorithm.remove(onActivateListeners, index); break; } } } } OnActivateDelegateWrapper[] onActivateListeners; /** * The "activate" signal is emitted when the action is activated. * * Deprecated: Use #GSimpleAction::activate instead * * Since: 2.4 */ gulong addOnActivate(void delegate(Action) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnActivateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "activate", cast(GCallback)&callBackActivate, cast(void*)wrapper, cast(GClosureNotify)&callBackActivateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackActivate(GtkAction* actionStruct, OnActivateDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackActivateDestroy(OnActivateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gtk/ActionBar.d000066400000000000000000000101261324604450400200440ustar00rootroot00000000000000/* * 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 gtk.ActionBar; private import glib.ConstructionException; private import gobject.ObjectG; private import gtk.Bin; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * GtkActionBar is designed to present contextual actions. It is * expected to be displayed below the content and expand horizontally * to fill the area. * * It allows placing children at the start or the end. In addition, it * contains an internal centered box which is centered with respect to * the full width of the box, even if the children at either side take * up different amounts of space. * * # CSS nodes * * GtkActionBar has a single CSS node with name actionbar. */ public class ActionBar : Bin { /** the main Gtk struct */ protected GtkActionBar* gtkActionBar; /** Get the main Gtk struct */ public GtkActionBar* getActionBarStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkActionBar; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkActionBar; } protected override void setStruct(GObject* obj) { gtkActionBar = cast(GtkActionBar*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkActionBar* gtkActionBar, bool ownedRef = false) { this.gtkActionBar = gtkActionBar; super(cast(GtkBin*)gtkActionBar, ownedRef); } /** */ public static GType getType() { return gtk_action_bar_get_type(); } /** * Creates a new #GtkActionBar widget. * * Returns: a new #GtkActionBar * * Since: 3.12 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gtk_action_bar_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkActionBar*) p); } /** * Retrieves the center bar widget of the bar. * * Returns: the center #GtkWidget or %NULL. * * Since: 3.12 */ public Widget getCenterWidget() { auto p = gtk_action_bar_get_center_widget(gtkActionBar); if(p is null) { return null; } return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); } /** * Adds @child to @action_bar, packed with reference to the * end of the @action_bar. * * Params: * child = the #GtkWidget to be added to @action_bar * * Since: 3.12 */ public void packEnd(Widget child) { gtk_action_bar_pack_end(gtkActionBar, (child is null) ? null : child.getWidgetStruct()); } /** * Adds @child to @action_bar, packed with reference to the * start of the @action_bar. * * Params: * child = the #GtkWidget to be added to @action_bar * * Since: 3.12 */ public void packStart(Widget child) { gtk_action_bar_pack_start(gtkActionBar, (child is null) ? null : child.getWidgetStruct()); } /** * Sets the center widget for the #GtkActionBar. * * Params: * centerWidget = a widget to use for the center * * Since: 3.12 */ public void setCenterWidget(Widget centerWidget) { gtk_action_bar_set_center_widget(gtkActionBar, (centerWidget is null) ? null : centerWidget.getWidgetStruct()); } } GtkD-3.7.5/generated/gtkd/gtk/ActionGroup.d000066400000000000000000000543411324604450400204430ustar00rootroot00000000000000/* * 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 gtk.ActionGroup; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gtk.AccelGroup; private import gtk.Action; private import gtk.BuildableIF; private import gtk.BuildableT; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * Actions are organised into groups. An action group is essentially a * map from names to #GtkAction objects. * * All actions that would make sense to use in a particular context * should be in a single group. Multiple action groups may be used for a * particular user interface. In fact, it is expected that most nontrivial * applications will make use of multiple groups. For example, in an * application that can edit multiple documents, one group holding global * actions (e.g. quit, about, new), and one group per document holding * actions that act on that document (eg. save, cut/copy/paste, etc). Each * window’s menus would be constructed from a combination of two action * groups. * * ## Accelerators ## {#Action-Accel} * * Accelerators are handled by the GTK+ accelerator map. All actions are * assigned an accelerator path (which normally has the form * `/group-name/action-name`) and a shortcut is associated with * this accelerator path. All menuitems and toolitems take on this accelerator * path. The GTK+ accelerator map code makes sure that the correct shortcut * is displayed next to the menu item. * * # GtkActionGroup as GtkBuildable # {#GtkActionGroup-BUILDER-UI} * * The #GtkActionGroup implementation of the #GtkBuildable interface accepts * #GtkAction objects as elements in UI definitions. * * Note that it is probably more common to define actions and action groups * in the code, since they are directly related to what the code can do. * * The GtkActionGroup implementation of the GtkBuildable interface supports * a custom element, which has attributes named “key“ and * “modifiers“ and allows to specify accelerators. This is similar to the * element of #GtkWidget, the main difference is that * it doesn’t allow you to specify a signal. * * ## A #GtkDialog UI definition fragment. ## * |[ * * * * About * gtk-about * * * * * * ]| */ public class ActionGroup : ObjectG, BuildableIF { /** the main Gtk struct */ protected GtkActionGroup* gtkActionGroup; /** Get the main Gtk struct */ public GtkActionGroup* getActionGroupStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkActionGroup; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkActionGroup; } protected override void setStruct(GObject* obj) { gtkActionGroup = cast(GtkActionGroup*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkActionGroup* gtkActionGroup, bool ownedRef = false) { this.gtkActionGroup = gtkActionGroup; super(cast(GObject*)gtkActionGroup, ownedRef); } // add the Buildable capabilities mixin BuildableT!(GtkActionGroup); /** */ public static GType getType() { return gtk_action_group_get_type(); } /** * Creates a new #GtkActionGroup object. The name of the action group * is used when associating [keybindings][Action-Accel] * with the actions. * * Params: * name = the name of the action group. * * Returns: the new #GtkActionGroup * * Since: 2.4 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string name) { auto p = gtk_action_group_new(Str.toStringz(name)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkActionGroup*) p, true); } /** * Adds an action object to the action group. Note that this function * does not set up the accel path of the action, which can lead to problems * if a user tries to modify the accelerator of a menuitem associated with * the action. Therefore you must either set the accel path yourself with * gtk_action_set_accel_path(), or use * `gtk_action_group_add_action_with_accel (..., NULL)`. * * Params: * action = an action * * Since: 2.4 */ public void addAction(Action action) { gtk_action_group_add_action(gtkActionGroup, (action is null) ? null : action.getActionStruct()); } /** * Adds an action object to the action group and sets up the accelerator. * * If @accelerator is %NULL, attempts to use the accelerator associated * with the stock_id of the action. * * Accel paths are set to `/group-name/action-name`. * * Params: * action = the action to add * accelerator = the accelerator for the action, in * the format understood by gtk_accelerator_parse(), or "" for no accelerator, or * %NULL to use the stock accelerator * * Since: 2.4 */ public void addActionWithAccel(Action action, string accelerator) { gtk_action_group_add_action_with_accel(gtkActionGroup, (action is null) ? null : action.getActionStruct(), Str.toStringz(accelerator)); } /** * This is a convenience function to create a number of actions and add them * to the action group. * * The “activate” signals of the actions are connected to the callbacks * and their accel paths are set to `/group-name/action-name`. * * Params: * entries = an array of action descriptions * userData = data to pass to the action callbacks * * Since: 2.4 */ public void addActions(GtkActionEntry[] entries, void* userData) { gtk_action_group_add_actions(gtkActionGroup, entries.ptr, cast(uint)entries.length, userData); } /** * This variant of gtk_action_group_add_actions() adds a #GDestroyNotify * callback for @user_data. * * Params: * entries = an array of action descriptions * userData = data to pass to the action callbacks * destroy = destroy notification callback for @user_data * * Since: 2.4 */ public void addActionsFull(GtkActionEntry[] entries, void* userData, GDestroyNotify destroy) { gtk_action_group_add_actions_full(gtkActionGroup, entries.ptr, cast(uint)entries.length, userData, destroy); } /** * This is a convenience routine to create a group of radio actions and * add them to the action group. * * The “changed” signal of the first radio action is connected to the * @on_change callback and the accel paths of the actions are set to * `/group-name/action-name`. * * Params: * entries = an array of radio action descriptions * value = the value of the action to activate initially, or -1 if * no action should be activated * onChange = the callback to connect to the changed signal * userData = data to pass to the action callbacks * * Since: 2.4 */ public void addRadioActions(GtkRadioActionEntry[] entries, int value, GCallback onChange, void* userData) { gtk_action_group_add_radio_actions(gtkActionGroup, entries.ptr, cast(uint)entries.length, value, onChange, userData); } /** * This variant of gtk_action_group_add_radio_actions() adds a * #GDestroyNotify callback for @user_data. * * Params: * entries = an array of radio action descriptions * value = the value of the action to activate initially, or -1 if * no action should be activated * onChange = the callback to connect to the changed signal * userData = data to pass to the action callbacks * destroy = destroy notification callback for @user_data * * Since: 2.4 */ public void addRadioActionsFull(GtkRadioActionEntry[] entries, int value, GCallback onChange, void* userData, GDestroyNotify destroy) { gtk_action_group_add_radio_actions_full(gtkActionGroup, entries.ptr, cast(uint)entries.length, value, onChange, userData, destroy); } /** * This is a convenience function to create a number of toggle actions and add them * to the action group. * * The “activate” signals of the actions are connected to the callbacks * and their accel paths are set to `/group-name/action-name`. * * Params: * entries = an array of toggle action descriptions * userData = data to pass to the action callbacks * * Since: 2.4 */ public void addToggleActions(GtkToggleActionEntry[] entries, void* userData) { gtk_action_group_add_toggle_actions(gtkActionGroup, entries.ptr, cast(uint)entries.length, userData); } /** * This variant of gtk_action_group_add_toggle_actions() adds a * #GDestroyNotify callback for @user_data. * * Params: * entries = an array of toggle action descriptions * userData = data to pass to the action callbacks * destroy = destroy notification callback for @user_data * * Since: 2.4 */ public void addToggleActionsFull(GtkToggleActionEntry[] entries, void* userData, GDestroyNotify destroy) { gtk_action_group_add_toggle_actions_full(gtkActionGroup, entries.ptr, cast(uint)entries.length, userData, destroy); } /** * Gets the accelerator group. * * Returns: the accelerator group associated with this action * group or %NULL if there is none. * * Since: 3.6 */ public AccelGroup getAccelGroup() { auto p = gtk_action_group_get_accel_group(gtkActionGroup); if(p is null) { return null; } return ObjectG.getDObject!(AccelGroup)(cast(GtkAccelGroup*) p); } /** * Looks up an action in the action group by name. * * Params: * actionName = the name of the action * * Returns: the action, or %NULL if no action by that name exists * * Since: 2.4 */ public Action getAction(string actionName) { auto p = gtk_action_group_get_action(gtkActionGroup, Str.toStringz(actionName)); if(p is null) { return null; } return ObjectG.getDObject!(Action)(cast(GtkAction*) p); } /** * Gets the name of the action group. * * Returns: the name of the action group. * * Since: 2.4 */ public string getName() { return Str.toString(gtk_action_group_get_name(gtkActionGroup)); } /** * Returns %TRUE if the group is sensitive. The constituent actions * can only be logically sensitive (see gtk_action_is_sensitive()) if * they are sensitive (see gtk_action_get_sensitive()) and their group * is sensitive. * * Returns: %TRUE if the group is sensitive. * * Since: 2.4 */ public bool getSensitive() { return gtk_action_group_get_sensitive(gtkActionGroup) != 0; } /** * Returns %TRUE if the group is visible. The constituent actions * can only be logically visible (see gtk_action_is_visible()) if * they are visible (see gtk_action_get_visible()) and their group * is visible. * * Returns: %TRUE if the group is visible. * * Since: 2.4 */ public bool getVisible() { return gtk_action_group_get_visible(gtkActionGroup) != 0; } /** * Lists the actions in the action group. * * Returns: an allocated list of the action objects in the action group * * Since: 2.4 */ public ListG listActions() { auto p = gtk_action_group_list_actions(gtkActionGroup); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Removes an action object from the action group. * * Params: * action = an action * * Since: 2.4 */ public void removeAction(Action action) { gtk_action_group_remove_action(gtkActionGroup, (action is null) ? null : action.getActionStruct()); } /** * Sets the accelerator group to be used by every action in this group. * * Params: * accelGroup = a #GtkAccelGroup to set or %NULL * * Since: 3.6 */ public void setAccelGroup(AccelGroup accelGroup) { gtk_action_group_set_accel_group(gtkActionGroup, (accelGroup is null) ? null : accelGroup.getAccelGroupStruct()); } /** * Changes the sensitivity of @action_group * * Params: * sensitive = new sensitivity * * Since: 2.4 */ public void setSensitive(bool sensitive) { gtk_action_group_set_sensitive(gtkActionGroup, sensitive); } /** * Sets a function to be used for translating the @label and @tooltip of * #GtkActionEntrys added by gtk_action_group_add_actions(). * * If you’re using gettext(), it is enough to set the translation domain * with gtk_action_group_set_translation_domain(). * * Params: * func = a #GtkTranslateFunc * data = data to be passed to @func and @notify * notify = a #GDestroyNotify function to be called when @action_group is * destroyed and when the translation function is changed again * * Since: 2.4 */ public void setTranslateFunc(GtkTranslateFunc func, void* data, GDestroyNotify notify) { gtk_action_group_set_translate_func(gtkActionGroup, func, data, notify); } /** * Sets the translation domain and uses g_dgettext() for translating the * @label and @tooltip of #GtkActionEntrys added by * gtk_action_group_add_actions(). * * If you’re not using gettext() for localization, see * gtk_action_group_set_translate_func(). * * Params: * domain = the translation domain to use for g_dgettext() * calls, or %NULL to use the domain set with textdomain() * * Since: 2.4 */ public void setTranslationDomain(string domain) { gtk_action_group_set_translation_domain(gtkActionGroup, Str.toStringz(domain)); } /** * Changes the visible of @action_group. * * Params: * visible = new visiblity * * Since: 2.4 */ public void setVisible(bool visible) { gtk_action_group_set_visible(gtkActionGroup, visible); } /** * Translates a string using the function set with * gtk_action_group_set_translate_func(). This * is mainly intended for language bindings. * * Params: * str = a string * * Returns: the translation of @string * * Since: 2.6 */ public string translateString(string str) { return Str.toString(gtk_action_group_translate_string(gtkActionGroup, Str.toStringz(str))); } protected class OnConnectProxyDelegateWrapper { void delegate(Action, Widget, ActionGroup) dlg; gulong handlerId; this(void delegate(Action, Widget, ActionGroup) dlg) { this.dlg = dlg; onConnectProxyListeners ~= this; } void remove(OnConnectProxyDelegateWrapper source) { foreach(index, wrapper; onConnectProxyListeners) { if (wrapper.handlerId == source.handlerId) { onConnectProxyListeners[index] = null; onConnectProxyListeners = std.algorithm.remove(onConnectProxyListeners, index); break; } } } } OnConnectProxyDelegateWrapper[] onConnectProxyListeners; /** * The ::connect-proxy signal is emitted after connecting a proxy to * an action in the group. Note that the proxy may have been connected * to a different action before. * * This is intended for simple customizations for which a custom action * class would be too clumsy, e.g. showing tooltips for menuitems in the * statusbar. * * #GtkUIManager proxies the signal and provides global notification * just before any action is connected to a proxy, which is probably more * convenient to use. * * Params: * action = the action * proxy = the proxy * * Since: 2.4 */ gulong addOnConnectProxy(void delegate(Action, Widget, ActionGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnConnectProxyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "connect-proxy", cast(GCallback)&callBackConnectProxy, cast(void*)wrapper, cast(GClosureNotify)&callBackConnectProxyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackConnectProxy(GtkActionGroup* actiongroupStruct, GtkAction* action, GtkWidget* proxy, OnConnectProxyDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Action)(action), ObjectG.getDObject!(Widget)(proxy), wrapper.outer); } extern(C) static void callBackConnectProxyDestroy(OnConnectProxyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnDisconnectProxyDelegateWrapper { void delegate(Action, Widget, ActionGroup) dlg; gulong handlerId; this(void delegate(Action, Widget, ActionGroup) dlg) { this.dlg = dlg; onDisconnectProxyListeners ~= this; } void remove(OnDisconnectProxyDelegateWrapper source) { foreach(index, wrapper; onDisconnectProxyListeners) { if (wrapper.handlerId == source.handlerId) { onDisconnectProxyListeners[index] = null; onDisconnectProxyListeners = std.algorithm.remove(onDisconnectProxyListeners, index); break; } } } } OnDisconnectProxyDelegateWrapper[] onDisconnectProxyListeners; /** * The ::disconnect-proxy signal is emitted after disconnecting a proxy * from an action in the group. * * #GtkUIManager proxies the signal and provides global notification * just before any action is connected to a proxy, which is probably more * convenient to use. * * Params: * action = the action * proxy = the proxy * * Since: 2.4 */ gulong addOnDisconnectProxy(void delegate(Action, Widget, ActionGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnDisconnectProxyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "disconnect-proxy", cast(GCallback)&callBackDisconnectProxy, cast(void*)wrapper, cast(GClosureNotify)&callBackDisconnectProxyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackDisconnectProxy(GtkActionGroup* actiongroupStruct, GtkAction* action, GtkWidget* proxy, OnDisconnectProxyDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Action)(action), ObjectG.getDObject!(Widget)(proxy), wrapper.outer); } extern(C) static void callBackDisconnectProxyDestroy(OnDisconnectProxyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPostActivateDelegateWrapper { void delegate(Action, ActionGroup) dlg; gulong handlerId; this(void delegate(Action, ActionGroup) dlg) { this.dlg = dlg; onPostActivateListeners ~= this; } void remove(OnPostActivateDelegateWrapper source) { foreach(index, wrapper; onPostActivateListeners) { if (wrapper.handlerId == source.handlerId) { onPostActivateListeners[index] = null; onPostActivateListeners = std.algorithm.remove(onPostActivateListeners, index); break; } } } } OnPostActivateDelegateWrapper[] onPostActivateListeners; /** * The ::post-activate signal is emitted just after the @action in the * @action_group is activated * * This is intended for #GtkUIManager to proxy the signal and provide global * notification just after any action is activated. * * Params: * action = the action * * Since: 2.4 */ gulong addOnPostActivate(void delegate(Action, ActionGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPostActivateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "post-activate", cast(GCallback)&callBackPostActivate, cast(void*)wrapper, cast(GClosureNotify)&callBackPostActivateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPostActivate(GtkActionGroup* actiongroupStruct, GtkAction* action, OnPostActivateDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Action)(action), wrapper.outer); } extern(C) static void callBackPostActivateDestroy(OnPostActivateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPreActivateDelegateWrapper { void delegate(Action, ActionGroup) dlg; gulong handlerId; this(void delegate(Action, ActionGroup) dlg) { this.dlg = dlg; onPreActivateListeners ~= this; } void remove(OnPreActivateDelegateWrapper source) { foreach(index, wrapper; onPreActivateListeners) { if (wrapper.handlerId == source.handlerId) { onPreActivateListeners[index] = null; onPreActivateListeners = std.algorithm.remove(onPreActivateListeners, index); break; } } } } OnPreActivateDelegateWrapper[] onPreActivateListeners; /** * The ::pre-activate signal is emitted just before the @action in the * @action_group is activated * * This is intended for #GtkUIManager to proxy the signal and provide global * notification just before any action is activated. * * Params: * action = the action * * Since: 2.4 */ gulong addOnPreActivate(void delegate(Action, ActionGroup) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPreActivateDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "pre-activate", cast(GCallback)&callBackPreActivate, cast(void*)wrapper, cast(GClosureNotify)&callBackPreActivateDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPreActivate(GtkActionGroup* actiongroupStruct, GtkAction* action, OnPreActivateDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Action)(action), wrapper.outer); } extern(C) static void callBackPreActivateDestroy(OnPreActivateDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gtk/ActionableIF.d000066400000000000000000000120451324604450400204640ustar00rootroot00000000000000/* * 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 gtk.ActionableIF; private import glib.Str; private import glib.Variant; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * This interface provides a convenient way of associating widgets with * actions on a #GtkApplicationWindow or #GtkApplication. * * It primarily consists of two properties: #GtkActionable:action-name * and #GtkActionable:action-target. There are also some convenience APIs * for setting these properties. * * The action will be looked up in action groups that are found among * the widgets ancestors. Most commonly, these will be the actions with * the “win.” or “app.” prefix that are associated with the #GtkApplicationWindow * or #GtkApplication, but other action groups that are added with * gtk_widget_insert_action_group() will be consulted as well. */ public interface ActionableIF{ /** Get the main Gtk struct */ public GtkActionable* getActionableStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gtk_actionable_get_type(); } /** * Gets the action name for @actionable. * * See gtk_actionable_set_action_name() for more information. * * Returns: the action name, or %NULL if none is set * * Since: 3.4 */ public string getActionName(); /** * Gets the current target value of @actionable. * * See gtk_actionable_set_action_target_value() for more information. * * Returns: the current target value * * Since: 3.4 */ public Variant getActionTargetValue(); /** * Specifies the name of the action with which this widget should be * associated. If @action_name is %NULL then the widget will be * unassociated from any previous action. * * Usually this function is used when the widget is located (or will be * located) within the hierarchy of a #GtkApplicationWindow. * * Names are of the form “win.save” or “app.quit” for actions on the * containing #GtkApplicationWindow or its associated #GtkApplication, * respectively. This is the same form used for actions in the #GMenu * associated with the window. * * Params: * actionName = an action name, or %NULL * * Since: 3.4 */ public void setActionName(string actionName); /** * Sets the target value of an actionable widget. * * If @target_value is %NULL then the target value is unset. * * The target value has two purposes. First, it is used as the * parameter to activation of the action associated with the * #GtkActionable widget. Second, it is used to determine if the widget * should be rendered as “active” — the widget is active if the state * is equal to the given target. * * Consider the example of associating a set of buttons with a #GAction * with string state in a typical “radio button” situation. Each button * will be associated with the same action, but with a different target * value for that action. Clicking on a particular button will activate * the action with the target of that button, which will typically cause * the action’s state to change to that value. Since the action’s state * is now equal to the target value of the button, the button will now * be rendered as active (and the other buttons, with different targets, * rendered inactive). * * Params: * targetValue = a #GVariant to set as the target value, or %NULL * * Since: 3.4 */ public void setActionTargetValue(Variant targetValue); /** * Sets the action-name and associated string target value of an * actionable widget. * * @detailed_action_name is a string in the format accepted by * g_action_parse_detailed_name(). * * (Note that prior to version 3.22.25, * this function is only usable for actions with a simple "s" target, and * @detailed_action_name must be of the form `"action::target"` where * `action` is the action name and `target` is the string to use * as the target.) * * Params: * detailedActionName = the detailed action name * * Since: 3.4 */ public void setDetailedActionName(string detailedActionName); } GtkD-3.7.5/generated/gtkd/gtk/ActionableT.d000066400000000000000000000130561324604450400203740ustar00rootroot00000000000000/* * 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 gtk.ActionableT; public import glib.Str; public import glib.Variant; public import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * This interface provides a convenient way of associating widgets with * actions on a #GtkApplicationWindow or #GtkApplication. * * It primarily consists of two properties: #GtkActionable:action-name * and #GtkActionable:action-target. There are also some convenience APIs * for setting these properties. * * The action will be looked up in action groups that are found among * the widgets ancestors. Most commonly, these will be the actions with * the “win.” or “app.” prefix that are associated with the #GtkApplicationWindow * or #GtkApplication, but other action groups that are added with * gtk_widget_insert_action_group() will be consulted as well. */ public template ActionableT(TStruct) { /** Get the main Gtk struct */ public GtkActionable* getActionableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GtkActionable*)getStruct(); } /** * Gets the action name for @actionable. * * See gtk_actionable_set_action_name() for more information. * * Returns: the action name, or %NULL if none is set * * Since: 3.4 */ public string getActionName() { return Str.toString(gtk_actionable_get_action_name(getActionableStruct())); } /** * Gets the current target value of @actionable. * * See gtk_actionable_set_action_target_value() for more information. * * Returns: the current target value * * Since: 3.4 */ public Variant getActionTargetValue() { auto p = gtk_actionable_get_action_target_value(getActionableStruct()); if(p is null) { return null; } return new Variant(cast(GVariant*) p); } /** * Specifies the name of the action with which this widget should be * associated. If @action_name is %NULL then the widget will be * unassociated from any previous action. * * Usually this function is used when the widget is located (or will be * located) within the hierarchy of a #GtkApplicationWindow. * * Names are of the form “win.save” or “app.quit” for actions on the * containing #GtkApplicationWindow or its associated #GtkApplication, * respectively. This is the same form used for actions in the #GMenu * associated with the window. * * Params: * actionName = an action name, or %NULL * * Since: 3.4 */ public void setActionName(string actionName) { gtk_actionable_set_action_name(getActionableStruct(), Str.toStringz(actionName)); } /** * Sets the target value of an actionable widget. * * If @target_value is %NULL then the target value is unset. * * The target value has two purposes. First, it is used as the * parameter to activation of the action associated with the * #GtkActionable widget. Second, it is used to determine if the widget * should be rendered as “active” — the widget is active if the state * is equal to the given target. * * Consider the example of associating a set of buttons with a #GAction * with string state in a typical “radio button” situation. Each button * will be associated with the same action, but with a different target * value for that action. Clicking on a particular button will activate * the action with the target of that button, which will typically cause * the action’s state to change to that value. Since the action’s state * is now equal to the target value of the button, the button will now * be rendered as active (and the other buttons, with different targets, * rendered inactive). * * Params: * targetValue = a #GVariant to set as the target value, or %NULL * * Since: 3.4 */ public void setActionTargetValue(Variant targetValue) { gtk_actionable_set_action_target_value(getActionableStruct(), (targetValue is null) ? null : targetValue.getVariantStruct()); } /** * Sets the action-name and associated string target value of an * actionable widget. * * @detailed_action_name is a string in the format accepted by * g_action_parse_detailed_name(). * * (Note that prior to version 3.22.25, * this function is only usable for actions with a simple "s" target, and * @detailed_action_name must be of the form `"action::target"` where * `action` is the action name and `target` is the string to use * as the target.) * * Params: * detailedActionName = the detailed action name * * Since: 3.4 */ public void setDetailedActionName(string detailedActionName) { gtk_actionable_set_detailed_action_name(getActionableStruct(), Str.toStringz(detailedActionName)); } } GtkD-3.7.5/generated/gtkd/gtk/ActivatableIF.d000066400000000000000000000246161324604450400206510ustar00rootroot00000000000000/* * 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 gtk.ActivatableIF; private import gobject.ObjectG; private import gtk.Action; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * Activatable widgets can be connected to a #GtkAction and reflects * the state of its action. A #GtkActivatable can also provide feedback * through its action, as they are responsible for activating their * related actions. * * # Implementing GtkActivatable * * When extending a class that is already #GtkActivatable; it is only * necessary to implement the #GtkActivatable->sync_action_properties() * and #GtkActivatable->update() methods and chain up to the parent * implementation, however when introducing * a new #GtkActivatable class; the #GtkActivatable:related-action and * #GtkActivatable:use-action-appearance properties need to be handled by * the implementor. Handling these properties is mostly a matter of installing * the action pointer and boolean flag on your instance, and calling * gtk_activatable_do_set_related_action() and * gtk_activatable_sync_action_properties() at the appropriate times. * * ## A class fragment implementing #GtkActivatable * * |[ * * enum { * ... * * PROP_ACTIVATABLE_RELATED_ACTION, * PROP_ACTIVATABLE_USE_ACTION_APPEARANCE * } * * struct _FooBarPrivate * { * * ... * * GtkAction *action; * gboolean use_action_appearance; * }; * * ... * * static void foo_bar_activatable_interface_init (GtkActivatableIface *iface); * static void foo_bar_activatable_update (GtkActivatable *activatable, * GtkAction *action, * const gchar *property_name); * static void foo_bar_activatable_sync_action_properties (GtkActivatable *activatable, * GtkAction *action); * ... * * * static void * foo_bar_class_init (FooBarClass *klass) * { * * ... * * g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_RELATED_ACTION, "related-action"); * g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_USE_ACTION_APPEARANCE, "use-action-appearance"); * * ... * } * * * static void * foo_bar_activatable_interface_init (GtkActivatableIface *iface) * { * iface->update = foo_bar_activatable_update; * iface->sync_action_properties = foo_bar_activatable_sync_action_properties; * } * * ... Break the reference using gtk_activatable_do_set_related_action()... * * static void * foo_bar_dispose (GObject *object) * { * FooBar *bar = FOO_BAR (object); * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * ... * * if (priv->action) * { * gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), NULL); * priv->action = NULL; * } * G_OBJECT_CLASS (foo_bar_parent_class)->dispose (object); * } * * ... Handle the “related-action” and “use-action-appearance” properties ... * * static void * foo_bar_set_property (GObject *object, * guint prop_id, * const GValue *value, * GParamSpec *pspec) * { * FooBar *bar = FOO_BAR (object); * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * switch (prop_id) * { * * ... * * case PROP_ACTIVATABLE_RELATED_ACTION: * foo_bar_set_related_action (bar, g_value_get_object (value)); * break; * case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE: * foo_bar_set_use_action_appearance (bar, g_value_get_boolean (value)); * break; * default: * G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); * break; * } * } * * static void * foo_bar_get_property (GObject *object, * guint prop_id, * GValue *value, * GParamSpec *pspec) * { * FooBar *bar = FOO_BAR (object); * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * switch (prop_id) * { * * ... * * case PROP_ACTIVATABLE_RELATED_ACTION: * g_value_set_object (value, priv->action); * break; * case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE: * g_value_set_boolean (value, priv->use_action_appearance); * break; * default: * G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); * break; * } * } * * * static void * foo_bar_set_use_action_appearance (FooBar *bar, * gboolean use_appearance) * { * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * if (priv->use_action_appearance != use_appearance) * { * priv->use_action_appearance = use_appearance; * * gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (bar), priv->action); * } * } * * ... call gtk_activatable_do_set_related_action() and then assign the action pointer, * no need to reference the action here since gtk_activatable_do_set_related_action() already * holds a reference here for you... * static void * foo_bar_set_related_action (FooBar *bar, * GtkAction *action) * { * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * if (priv->action == action) * return; * * gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), action); * * priv->action = action; * } * * ... Selectively reset and update activatable depending on the use-action-appearance property ... * static void * gtk_button_activatable_sync_action_properties (GtkActivatable *activatable, * GtkAction *action) * { * GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable); * * if (!action) * return; * * if (gtk_action_is_visible (action)) * gtk_widget_show (GTK_WIDGET (activatable)); * else * gtk_widget_hide (GTK_WIDGET (activatable)); * * gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action)); * * ... * * if (priv->use_action_appearance) * { * if (gtk_action_get_stock_id (action)) * foo_bar_set_stock (button, gtk_action_get_stock_id (action)); * else if (gtk_action_get_label (action)) * foo_bar_set_label (button, gtk_action_get_label (action)); * * ... * * } * } * * static void * foo_bar_activatable_update (GtkActivatable *activatable, * GtkAction *action, * const gchar *property_name) * { * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (activatable); * * if (strcmp (property_name, "visible") == 0) * { * if (gtk_action_is_visible (action)) * gtk_widget_show (GTK_WIDGET (activatable)); * else * gtk_widget_hide (GTK_WIDGET (activatable)); * } * else if (strcmp (property_name, "sensitive") == 0) * gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action)); * * ... * * if (!priv->use_action_appearance) * return; * * if (strcmp (property_name, "stock-id") == 0) * foo_bar_set_stock (button, gtk_action_get_stock_id (action)); * else if (strcmp (property_name, "label") == 0) * foo_bar_set_label (button, gtk_action_get_label (action)); * * ... * } * ]| */ public interface ActivatableIF{ /** Get the main Gtk struct */ public GtkActivatable* getActivatableStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gtk_activatable_get_type(); } /** * This is a utility function for #GtkActivatable implementors. * * When implementing #GtkActivatable you must call this when * handling changes of the #GtkActivatable:related-action, and * you must also use this to break references in #GObject->dispose(). * * This function adds a reference to the currently set related * action for you, it also makes sure the #GtkActivatable->update() * method is called when the related #GtkAction properties change * and registers to the action’s proxy list. * * > Be careful to call this before setting the local * > copy of the #GtkAction property, since this function uses * > gtk_activatable_get_related_action() to retrieve the * > previous action. * * Params: * action = the #GtkAction to set * * Since: 2.16 */ public void doSetRelatedAction(Action action); /** * Gets the related #GtkAction for @activatable. * * Returns: the related #GtkAction if one is set. * * Since: 2.16 */ public Action getRelatedAction(); /** * Gets whether this activatable should reset its layout * and appearance when setting the related action or when * the action changes appearance. * * Returns: whether @activatable uses its actions appearance. * * Since: 2.16 */ public bool getUseActionAppearance(); /** * Sets the related action on the @activatable object. * * > #GtkActivatable implementors need to handle the #GtkActivatable:related-action * > property and call gtk_activatable_do_set_related_action() when it changes. * * Params: * action = the #GtkAction to set * * Since: 2.16 */ public void setRelatedAction(Action action); /** * Sets whether this activatable should reset its layout and appearance * when setting the related action or when the action changes appearance * * > #GtkActivatable implementors need to handle the * > #GtkActivatable:use-action-appearance property and call * > gtk_activatable_sync_action_properties() to update @activatable * > if needed. * * Params: * useAppearance = whether to use the actions appearance * * Since: 2.16 */ public void setUseActionAppearance(bool useAppearance); /** * This is called to update the activatable completely, this is called * internally when the #GtkActivatable:related-action property is set * or unset and by the implementing class when * #GtkActivatable:use-action-appearance changes. * * Params: * action = the related #GtkAction or %NULL * * Since: 2.16 */ public void syncActionProperties(Action action); } GtkD-3.7.5/generated/gtkd/gtk/ActivatableT.d000066400000000000000000000260451324604450400205540ustar00rootroot00000000000000/* * 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 gtk.ActivatableT; public import gobject.ObjectG; public import gtk.Action; public import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * Activatable widgets can be connected to a #GtkAction and reflects * the state of its action. A #GtkActivatable can also provide feedback * through its action, as they are responsible for activating their * related actions. * * # Implementing GtkActivatable * * When extending a class that is already #GtkActivatable; it is only * necessary to implement the #GtkActivatable->sync_action_properties() * and #GtkActivatable->update() methods and chain up to the parent * implementation, however when introducing * a new #GtkActivatable class; the #GtkActivatable:related-action and * #GtkActivatable:use-action-appearance properties need to be handled by * the implementor. Handling these properties is mostly a matter of installing * the action pointer and boolean flag on your instance, and calling * gtk_activatable_do_set_related_action() and * gtk_activatable_sync_action_properties() at the appropriate times. * * ## A class fragment implementing #GtkActivatable * * |[ * * enum { * ... * * PROP_ACTIVATABLE_RELATED_ACTION, * PROP_ACTIVATABLE_USE_ACTION_APPEARANCE * } * * struct _FooBarPrivate * { * * ... * * GtkAction *action; * gboolean use_action_appearance; * }; * * ... * * static void foo_bar_activatable_interface_init (GtkActivatableIface *iface); * static void foo_bar_activatable_update (GtkActivatable *activatable, * GtkAction *action, * const gchar *property_name); * static void foo_bar_activatable_sync_action_properties (GtkActivatable *activatable, * GtkAction *action); * ... * * * static void * foo_bar_class_init (FooBarClass *klass) * { * * ... * * g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_RELATED_ACTION, "related-action"); * g_object_class_override_property (gobject_class, PROP_ACTIVATABLE_USE_ACTION_APPEARANCE, "use-action-appearance"); * * ... * } * * * static void * foo_bar_activatable_interface_init (GtkActivatableIface *iface) * { * iface->update = foo_bar_activatable_update; * iface->sync_action_properties = foo_bar_activatable_sync_action_properties; * } * * ... Break the reference using gtk_activatable_do_set_related_action()... * * static void * foo_bar_dispose (GObject *object) * { * FooBar *bar = FOO_BAR (object); * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * ... * * if (priv->action) * { * gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), NULL); * priv->action = NULL; * } * G_OBJECT_CLASS (foo_bar_parent_class)->dispose (object); * } * * ... Handle the “related-action” and “use-action-appearance” properties ... * * static void * foo_bar_set_property (GObject *object, * guint prop_id, * const GValue *value, * GParamSpec *pspec) * { * FooBar *bar = FOO_BAR (object); * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * switch (prop_id) * { * * ... * * case PROP_ACTIVATABLE_RELATED_ACTION: * foo_bar_set_related_action (bar, g_value_get_object (value)); * break; * case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE: * foo_bar_set_use_action_appearance (bar, g_value_get_boolean (value)); * break; * default: * G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); * break; * } * } * * static void * foo_bar_get_property (GObject *object, * guint prop_id, * GValue *value, * GParamSpec *pspec) * { * FooBar *bar = FOO_BAR (object); * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * switch (prop_id) * { * * ... * * case PROP_ACTIVATABLE_RELATED_ACTION: * g_value_set_object (value, priv->action); * break; * case PROP_ACTIVATABLE_USE_ACTION_APPEARANCE: * g_value_set_boolean (value, priv->use_action_appearance); * break; * default: * G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); * break; * } * } * * * static void * foo_bar_set_use_action_appearance (FooBar *bar, * gboolean use_appearance) * { * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * if (priv->use_action_appearance != use_appearance) * { * priv->use_action_appearance = use_appearance; * * gtk_activatable_sync_action_properties (GTK_ACTIVATABLE (bar), priv->action); * } * } * * ... call gtk_activatable_do_set_related_action() and then assign the action pointer, * no need to reference the action here since gtk_activatable_do_set_related_action() already * holds a reference here for you... * static void * foo_bar_set_related_action (FooBar *bar, * GtkAction *action) * { * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (bar); * * if (priv->action == action) * return; * * gtk_activatable_do_set_related_action (GTK_ACTIVATABLE (bar), action); * * priv->action = action; * } * * ... Selectively reset and update activatable depending on the use-action-appearance property ... * static void * gtk_button_activatable_sync_action_properties (GtkActivatable *activatable, * GtkAction *action) * { * GtkButtonPrivate *priv = GTK_BUTTON_GET_PRIVATE (activatable); * * if (!action) * return; * * if (gtk_action_is_visible (action)) * gtk_widget_show (GTK_WIDGET (activatable)); * else * gtk_widget_hide (GTK_WIDGET (activatable)); * * gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action)); * * ... * * if (priv->use_action_appearance) * { * if (gtk_action_get_stock_id (action)) * foo_bar_set_stock (button, gtk_action_get_stock_id (action)); * else if (gtk_action_get_label (action)) * foo_bar_set_label (button, gtk_action_get_label (action)); * * ... * * } * } * * static void * foo_bar_activatable_update (GtkActivatable *activatable, * GtkAction *action, * const gchar *property_name) * { * FooBarPrivate *priv = FOO_BAR_GET_PRIVATE (activatable); * * if (strcmp (property_name, "visible") == 0) * { * if (gtk_action_is_visible (action)) * gtk_widget_show (GTK_WIDGET (activatable)); * else * gtk_widget_hide (GTK_WIDGET (activatable)); * } * else if (strcmp (property_name, "sensitive") == 0) * gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action)); * * ... * * if (!priv->use_action_appearance) * return; * * if (strcmp (property_name, "stock-id") == 0) * foo_bar_set_stock (button, gtk_action_get_stock_id (action)); * else if (strcmp (property_name, "label") == 0) * foo_bar_set_label (button, gtk_action_get_label (action)); * * ... * } * ]| */ public template ActivatableT(TStruct) { /** Get the main Gtk struct */ public GtkActivatable* getActivatableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GtkActivatable*)getStruct(); } /** * This is a utility function for #GtkActivatable implementors. * * When implementing #GtkActivatable you must call this when * handling changes of the #GtkActivatable:related-action, and * you must also use this to break references in #GObject->dispose(). * * This function adds a reference to the currently set related * action for you, it also makes sure the #GtkActivatable->update() * method is called when the related #GtkAction properties change * and registers to the action’s proxy list. * * > Be careful to call this before setting the local * > copy of the #GtkAction property, since this function uses * > gtk_activatable_get_related_action() to retrieve the * > previous action. * * Params: * action = the #GtkAction to set * * Since: 2.16 */ public void doSetRelatedAction(Action action) { gtk_activatable_do_set_related_action(getActivatableStruct(), (action is null) ? null : action.getActionStruct()); } /** * Gets the related #GtkAction for @activatable. * * Returns: the related #GtkAction if one is set. * * Since: 2.16 */ public Action getRelatedAction() { auto p = gtk_activatable_get_related_action(getActivatableStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Action)(cast(GtkAction*) p); } /** * Gets whether this activatable should reset its layout * and appearance when setting the related action or when * the action changes appearance. * * Returns: whether @activatable uses its actions appearance. * * Since: 2.16 */ public bool getUseActionAppearance() { return gtk_activatable_get_use_action_appearance(getActivatableStruct()) != 0; } /** * Sets the related action on the @activatable object. * * > #GtkActivatable implementors need to handle the #GtkActivatable:related-action * > property and call gtk_activatable_do_set_related_action() when it changes. * * Params: * action = the #GtkAction to set * * Since: 2.16 */ public void setRelatedAction(Action action) { gtk_activatable_set_related_action(getActivatableStruct(), (action is null) ? null : action.getActionStruct()); } /** * Sets whether this activatable should reset its layout and appearance * when setting the related action or when the action changes appearance * * > #GtkActivatable implementors need to handle the * > #GtkActivatable:use-action-appearance property and call * > gtk_activatable_sync_action_properties() to update @activatable * > if needed. * * Params: * useAppearance = whether to use the actions appearance * * Since: 2.16 */ public void setUseActionAppearance(bool useAppearance) { gtk_activatable_set_use_action_appearance(getActivatableStruct(), useAppearance); } /** * This is called to update the activatable completely, this is called * internally when the #GtkActivatable:related-action property is set * or unset and by the implementing class when * #GtkActivatable:use-action-appearance changes. * * Params: * action = the related #GtkAction or %NULL * * Since: 2.16 */ public void syncActionProperties(Action action) { gtk_activatable_sync_action_properties(getActivatableStruct(), (action is null) ? null : action.getActionStruct()); } } GtkD-3.7.5/generated/gtkd/gtk/Adjustment.d000066400000000000000000000312761324604450400203310ustar00rootroot00000000000000/* * 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 gtk.Adjustment; private import glib.ConstructionException; private import gobject.ObjectG; private import gobject.Signals; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * The #GtkAdjustment object represents a value which has an associated lower * and upper bound, together with step and page increments, and a page size. * It is used within several GTK+ widgets, including #GtkSpinButton, #GtkViewport, * and #GtkRange (which is a base class for #GtkScrollbar and #GtkScale). * * The #GtkAdjustment object does not update the value itself. Instead * it is left up to the owner of the #GtkAdjustment to control the value. */ public class Adjustment : ObjectG { /** the main Gtk struct */ protected GtkAdjustment* gtkAdjustment; /** Get the main Gtk struct */ public GtkAdjustment* getAdjustmentStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAdjustment; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAdjustment; } protected override void setStruct(GObject* obj) { gtkAdjustment = cast(GtkAdjustment*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAdjustment* gtkAdjustment, bool ownedRef = false) { this.gtkAdjustment = gtkAdjustment; super(cast(GObject*)gtkAdjustment, ownedRef); } /** */ public static GType getType() { return gtk_adjustment_get_type(); } /** * Creates a new #GtkAdjustment. * * Params: * value = the initial value * lower = the minimum value * upper = the maximum value * stepIncrement = the step increment * pageIncrement = the page increment * pageSize = the page size * * Returns: a new #GtkAdjustment * * Throws: ConstructionException GTK+ fails to create the object. */ public this(double value, double lower, double upper, double stepIncrement, double pageIncrement, double pageSize) { auto p = gtk_adjustment_new(value, lower, upper, stepIncrement, pageIncrement, pageSize); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAdjustment*) p); } /** * Emits a #GtkAdjustment::changed signal from the #GtkAdjustment. * This is typically called by the owner of the #GtkAdjustment after it has * changed any of the #GtkAdjustment properties other than the value. * * Deprecated: GTK+ emits #GtkAdjustment::changed itself whenever any * of the properties (other than value) change */ public void changed() { gtk_adjustment_changed(gtkAdjustment); } /** * Updates the #GtkAdjustment:value property to ensure that the range * between @lower and @upper is in the current page (i.e. between * #GtkAdjustment:value and #GtkAdjustment:value + #GtkAdjustment:page-size). * If the range is larger than the page size, then only the start of it will * be in the current page. * * A #GtkAdjustment::value-changed signal will be emitted if the value is changed. * * Params: * lower = the lower value * upper = the upper value */ public void clampPage(double lower, double upper) { gtk_adjustment_clamp_page(gtkAdjustment, lower, upper); } /** * Sets all properties of the adjustment at once. * * Use this function to avoid multiple emissions of the * #GtkAdjustment::changed signal. See gtk_adjustment_set_lower() * for an alternative way of compressing multiple emissions of * #GtkAdjustment::changed into one. * * Params: * value = the new value * lower = the new minimum value * upper = the new maximum value * stepIncrement = the new step increment * pageIncrement = the new page increment * pageSize = the new page size * * Since: 2.14 */ public void configure(double value, double lower, double upper, double stepIncrement, double pageIncrement, double pageSize) { gtk_adjustment_configure(gtkAdjustment, value, lower, upper, stepIncrement, pageIncrement, pageSize); } /** * Retrieves the minimum value of the adjustment. * * Returns: The current minimum value of the adjustment * * Since: 2.14 */ public double getLower() { return gtk_adjustment_get_lower(gtkAdjustment); } /** * Gets the smaller of step increment and page increment. * * Returns: the minimum increment of @adjustment * * Since: 3.2 */ public double getMinimumIncrement() { return gtk_adjustment_get_minimum_increment(gtkAdjustment); } /** * Retrieves the page increment of the adjustment. * * Returns: The current page increment of the adjustment * * Since: 2.14 */ public double getPageIncrement() { return gtk_adjustment_get_page_increment(gtkAdjustment); } /** * Retrieves the page size of the adjustment. * * Returns: The current page size of the adjustment * * Since: 2.14 */ public double getPageSize() { return gtk_adjustment_get_page_size(gtkAdjustment); } /** * Retrieves the step increment of the adjustment. * * Returns: The current step increment of the adjustment. * * Since: 2.14 */ public double getStepIncrement() { return gtk_adjustment_get_step_increment(gtkAdjustment); } /** * Retrieves the maximum value of the adjustment. * * Returns: The current maximum value of the adjustment * * Since: 2.14 */ public double getUpper() { return gtk_adjustment_get_upper(gtkAdjustment); } /** * Gets the current value of the adjustment. * See gtk_adjustment_set_value(). * * Returns: The current value of the adjustment */ public double getValue() { return gtk_adjustment_get_value(gtkAdjustment); } /** * Sets the minimum value of the adjustment. * * When setting multiple adjustment properties via their individual * setters, multiple #GtkAdjustment::changed signals will be emitted. * However, since the emission of the #GtkAdjustment::changed signal * is tied to the emission of the #GObject::notify signals of the changed * properties, it’s possible to compress the #GtkAdjustment::changed * signals into one by calling g_object_freeze_notify() and * g_object_thaw_notify() around the calls to the individual setters. * * Alternatively, using a single g_object_set() for all the properties * to change, or using gtk_adjustment_configure() has the same effect * of compressing #GtkAdjustment::changed emissions. * * Params: * lower = the new minimum value * * Since: 2.14 */ public void setLower(double lower) { gtk_adjustment_set_lower(gtkAdjustment, lower); } /** * Sets the page increment of the adjustment. * * See gtk_adjustment_set_lower() about how to compress multiple * emissions of the #GtkAdjustment::changed signal when setting * multiple adjustment properties. * * Params: * pageIncrement = the new page increment * * Since: 2.14 */ public void setPageIncrement(double pageIncrement) { gtk_adjustment_set_page_increment(gtkAdjustment, pageIncrement); } /** * Sets the page size of the adjustment. * * See gtk_adjustment_set_lower() about how to compress multiple * emissions of the GtkAdjustment::changed signal when setting * multiple adjustment properties. * * Params: * pageSize = the new page size * * Since: 2.14 */ public void setPageSize(double pageSize) { gtk_adjustment_set_page_size(gtkAdjustment, pageSize); } /** * Sets the step increment of the adjustment. * * See gtk_adjustment_set_lower() about how to compress multiple * emissions of the #GtkAdjustment::changed signal when setting * multiple adjustment properties. * * Params: * stepIncrement = the new step increment * * Since: 2.14 */ public void setStepIncrement(double stepIncrement) { gtk_adjustment_set_step_increment(gtkAdjustment, stepIncrement); } /** * Sets the maximum value of the adjustment. * * Note that values will be restricted by `upper - page-size` * if the page-size property is nonzero. * * See gtk_adjustment_set_lower() about how to compress multiple * emissions of the #GtkAdjustment::changed signal when setting * multiple adjustment properties. * * Params: * upper = the new maximum value * * Since: 2.14 */ public void setUpper(double upper) { gtk_adjustment_set_upper(gtkAdjustment, upper); } /** * Sets the #GtkAdjustment value. The value is clamped to lie between * #GtkAdjustment:lower and #GtkAdjustment:upper. * * Note that for adjustments which are used in a #GtkScrollbar, the * effective range of allowed values goes from #GtkAdjustment:lower to * #GtkAdjustment:upper - #GtkAdjustment:page-size. * * Params: * value = the new value */ public void setValue(double value) { gtk_adjustment_set_value(gtkAdjustment, value); } /** * Emits a #GtkAdjustment::value-changed signal from the #GtkAdjustment. * This is typically called by the owner of the #GtkAdjustment after it has * changed the #GtkAdjustment:value property. * * Deprecated: GTK+ emits #GtkAdjustment::value-changed itself whenever * the value changes */ public void valueChanged() { gtk_adjustment_value_changed(gtkAdjustment); } protected class OnChangedDelegateWrapper { void delegate(Adjustment) dlg; gulong handlerId; this(void delegate(Adjustment) dlg) { this.dlg = dlg; onChangedListeners ~= this; } void remove(OnChangedDelegateWrapper source) { foreach(index, wrapper; onChangedListeners) { if (wrapper.handlerId == source.handlerId) { onChangedListeners[index] = null; onChangedListeners = std.algorithm.remove(onChangedListeners, index); break; } } } } OnChangedDelegateWrapper[] onChangedListeners; /** * Emitted when one or more of the #GtkAdjustment properties have been * changed, other than the #GtkAdjustment:value property. */ gulong addOnChanged(void delegate(Adjustment) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "changed", cast(GCallback)&callBackChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackChanged(GtkAdjustment* adjustmentStruct, OnChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackChangedDestroy(OnChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnValueChangedDelegateWrapper { void delegate(Adjustment) dlg; gulong handlerId; this(void delegate(Adjustment) dlg) { this.dlg = dlg; onValueChangedListeners ~= this; } void remove(OnValueChangedDelegateWrapper source) { foreach(index, wrapper; onValueChangedListeners) { if (wrapper.handlerId == source.handlerId) { onValueChangedListeners[index] = null; onValueChangedListeners = std.algorithm.remove(onValueChangedListeners, index); break; } } } } OnValueChangedDelegateWrapper[] onValueChangedListeners; /** * Emitted when the #GtkAdjustment:value property has been changed. */ gulong addOnValueChanged(void delegate(Adjustment) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnValueChangedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "value-changed", cast(GCallback)&callBackValueChanged, cast(void*)wrapper, cast(GClosureNotify)&callBackValueChangedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackValueChanged(GtkAdjustment* adjustmentStruct, OnValueChangedDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackValueChangedDestroy(OnValueChangedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gtk/Alignment.d000066400000000000000000000175061324604450400201310ustar00rootroot00000000000000/* * 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 gtk.Alignment; private import glib.ConstructionException; private import gobject.ObjectG; private import gtk.Bin; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * The #GtkAlignment widget controls the alignment and size of its child widget. * It has four settings: xscale, yscale, xalign, and yalign. * * The scale settings are used to specify how much the child widget should * expand to fill the space allocated to the #GtkAlignment. * The values can range from 0 (meaning the child doesn’t expand at all) to * 1 (meaning the child expands to fill all of the available space). * * The align settings are used to place the child widget within the available * area. The values range from 0 (top or left) to 1 (bottom or right). * Of course, if the scale settings are both set to 1, the alignment settings * have no effect. * * GtkAlignment has been deprecated in 3.14 and should not be used in * newly-written code. The desired effect can be achieved by using the * #GtkWidget:halign, #GtkWidget:valign and #GtkWidget:margin properties on the * child widget. */ public class Alignment : Bin { /** the main Gtk struct */ protected GtkAlignment* gtkAlignment; /** Get the main Gtk struct */ public GtkAlignment* getAlignmentStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAlignment; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAlignment; } protected override void setStruct(GObject* obj) { gtkAlignment = cast(GtkAlignment*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAlignment* gtkAlignment, bool ownedRef = false) { this.gtkAlignment = gtkAlignment; super(cast(GtkBin*)gtkAlignment, ownedRef); } /** */ public static Alignment center(Widget widget) { Alignment a = new Alignment(0.5, 0.5, 0, 0); a.add(widget); return a; } /** */ public static Alignment north(Widget widget) { Alignment a = new Alignment(0.5, 0.0, 0, 0); a.add(widget); return a; } /** */ public static Alignment south(Widget widget) { Alignment a = new Alignment(0.5, 1.0, 0, 0); a.add(widget); return a; } /** */ public static Alignment east(Widget widget) { Alignment a = new Alignment(1.0, 0.5, 0, 0); a.add(widget); return a; } /** */ public static Alignment west(Widget widget) { Alignment a = new Alignment(0.0, 0.5, 0, 0); a.add(widget); return a; } /** */ public static Alignment northWest(Widget widget) { Alignment a = new Alignment(0.0, 0.0, 0, 0); a.add(widget); return a; } /** */ public static Alignment southWest(Widget widget) { Alignment a = new Alignment(0.0, 0.5, 0, 0); a.add(widget); return a; } /** */ public static Alignment northEast(Widget widget) { Alignment a = new Alignment(1.0, 0.0, 0, 0); a.add(widget); return a; } /** */ public static Alignment southEast(Widget widget) { Alignment a = new Alignment(1.0, 1.0, 0, 0); a.add(widget); return a; } /** */ /** */ public static GType getType() { return gtk_alignment_get_type(); } /** * Creates a new #GtkAlignment. * * Deprecated: Use #GtkWidget alignment and margin properties * * Params: * xalign = the horizontal alignment of the child widget, from 0 (left) to 1 * (right). * yalign = the vertical alignment of the child widget, from 0 (top) to 1 * (bottom). * xscale = the amount that the child widget expands horizontally to fill up * unused space, from 0 to 1. * A value of 0 indicates that the child widget should never expand. * A value of 1 indicates that the child widget will expand to fill all of the * space allocated for the #GtkAlignment. * yscale = the amount that the child widget expands vertically to fill up * unused space, from 0 to 1. The values are similar to @xscale. * * Returns: the new #GtkAlignment * * Throws: ConstructionException GTK+ fails to create the object. */ public this(float xalign, float yalign, float xscale, float yscale) { auto p = gtk_alignment_new(xalign, yalign, xscale, yscale); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAlignment*) p); } /** * Gets the padding on the different sides of the widget. * See gtk_alignment_set_padding (). * * Deprecated: Use #GtkWidget alignment and margin properties * * Params: * paddingTop = location to store the padding for * the top of the widget, or %NULL * paddingBottom = location to store the padding * for the bottom of the widget, or %NULL * paddingLeft = location to store the padding * for the left of the widget, or %NULL * paddingRight = location to store the padding * for the right of the widget, or %NULL * * Since: 2.4 */ public void getPadding(out uint paddingTop, out uint paddingBottom, out uint paddingLeft, out uint paddingRight) { gtk_alignment_get_padding(gtkAlignment, &paddingTop, &paddingBottom, &paddingLeft, &paddingRight); } /** * Sets the #GtkAlignment values. * * Deprecated: Use #GtkWidget alignment and margin properties * * Params: * xalign = the horizontal alignment of the child widget, from 0 (left) to 1 * (right). * yalign = the vertical alignment of the child widget, from 0 (top) to 1 * (bottom). * xscale = the amount that the child widget expands horizontally to fill up * unused space, from 0 to 1. * A value of 0 indicates that the child widget should never expand. * A value of 1 indicates that the child widget will expand to fill all of the * space allocated for the #GtkAlignment. * yscale = the amount that the child widget expands vertically to fill up * unused space, from 0 to 1. The values are similar to @xscale. */ public void set(float xalign, float yalign, float xscale, float yscale) { gtk_alignment_set(gtkAlignment, xalign, yalign, xscale, yscale); } /** * Sets the padding on the different sides of the widget. * The padding adds blank space to the sides of the widget. For instance, * this can be used to indent the child widget towards the right by adding * padding on the left. * * Deprecated: Use #GtkWidget alignment and margin properties * * Params: * paddingTop = the padding at the top of the widget * paddingBottom = the padding at the bottom of the widget * paddingLeft = the padding at the left of the widget * paddingRight = the padding at the right of the widget. * * Since: 2.4 */ public void setPadding(uint paddingTop, uint paddingBottom, uint paddingLeft, uint paddingRight) { gtk_alignment_set_padding(gtkAlignment, paddingTop, paddingBottom, paddingLeft, paddingRight); } } GtkD-3.7.5/generated/gtkd/gtk/AppChooserButton.d000066400000000000000000000220011324604450400214340ustar00rootroot00000000000000/* * 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 gtk.AppChooserButton; private import gio.IconIF; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gtk.AppChooserIF; private import gtk.AppChooserT; private import gtk.ComboBox; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * The #GtkAppChooserButton is a widget that lets the user select * an application. It implements the #GtkAppChooser interface. * * Initially, a #GtkAppChooserButton selects the first application * in its list, which will either be the most-recently used application * or, if #GtkAppChooserButton:show-default-item is %TRUE, the * default application. * * The list of applications shown in a #GtkAppChooserButton includes * the recommended applications for the given content type. When * #GtkAppChooserButton:show-default-item is set, the default application * is also included. To let the user chooser other applications, * you can set the #GtkAppChooserButton:show-dialog-item property, * which allows to open a full #GtkAppChooserDialog. * * It is possible to add custom items to the list, using * gtk_app_chooser_button_append_custom_item(). These items cause * the #GtkAppChooserButton::custom-item-activated signal to be * emitted when they are selected. * * To track changes in the selected application, use the * #GtkComboBox::changed signal. */ public class AppChooserButton : ComboBox, AppChooserIF { /** the main Gtk struct */ protected GtkAppChooserButton* gtkAppChooserButton; /** Get the main Gtk struct */ public GtkAppChooserButton* getAppChooserButtonStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAppChooserButton; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAppChooserButton; } protected override void setStruct(GObject* obj) { gtkAppChooserButton = cast(GtkAppChooserButton*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAppChooserButton* gtkAppChooserButton, bool ownedRef = false) { this.gtkAppChooserButton = gtkAppChooserButton; super(cast(GtkComboBox*)gtkAppChooserButton, ownedRef); } // add the AppChooser capabilities mixin AppChooserT!(GtkAppChooserButton); /** */ public static GType getType() { return gtk_app_chooser_button_get_type(); } /** * Creates a new #GtkAppChooserButton for applications * that can handle content of the given type. * * Params: * contentType = the content type to show applications for * * Returns: a newly created #GtkAppChooserButton * * Since: 3.0 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string contentType) { auto p = gtk_app_chooser_button_new(Str.toStringz(contentType)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAppChooserButton*) p); } /** * Appends a custom item to the list of applications that is shown * in the popup; the item name must be unique per-widget. * Clients can use the provided name as a detail for the * #GtkAppChooserButton::custom-item-activated signal, to add a * callback for the activation of a particular custom item in the list. * See also gtk_app_chooser_button_append_separator(). * * Params: * name = the name of the custom item * label = the label for the custom item * icon = the icon for the custom item * * Since: 3.0 */ public void appendCustomItem(string name, string label, IconIF icon) { gtk_app_chooser_button_append_custom_item(gtkAppChooserButton, Str.toStringz(name), Str.toStringz(label), (icon is null) ? null : icon.getIconStruct()); } /** * Appends a separator to the list of applications that is shown * in the popup. * * Since: 3.0 */ public void appendSeparator() { gtk_app_chooser_button_append_separator(gtkAppChooserButton); } /** * Returns the text to display at the top of the dialog. * * Returns: the text to display at the top of the dialog, * or %NULL, in which case a default text is displayed */ public string getHeading() { return Str.toString(gtk_app_chooser_button_get_heading(gtkAppChooserButton)); } /** * Returns the current value of the #GtkAppChooserButton:show-default-item * property. * * Returns: the value of #GtkAppChooserButton:show-default-item * * Since: 3.2 */ public bool getShowDefaultItem() { return gtk_app_chooser_button_get_show_default_item(gtkAppChooserButton) != 0; } /** * Returns the current value of the #GtkAppChooserButton:show-dialog-item * property. * * Returns: the value of #GtkAppChooserButton:show-dialog-item * * Since: 3.0 */ public bool getShowDialogItem() { return gtk_app_chooser_button_get_show_dialog_item(gtkAppChooserButton) != 0; } /** * Selects a custom item previously added with * gtk_app_chooser_button_append_custom_item(). * * Use gtk_app_chooser_refresh() to bring the selection * to its initial state. * * Params: * name = the name of the custom item * * Since: 3.0 */ public void setActiveCustomItem(string name) { gtk_app_chooser_button_set_active_custom_item(gtkAppChooserButton, Str.toStringz(name)); } /** * Sets the text to display at the top of the dialog. * If the heading is not set, the dialog displays a default text. * * Params: * heading = a string containing Pango markup */ public void setHeading(string heading) { gtk_app_chooser_button_set_heading(gtkAppChooserButton, Str.toStringz(heading)); } /** * Sets whether the dropdown menu of this button should show the * default application for the given content type at top. * * Params: * setting = the new value for #GtkAppChooserButton:show-default-item * * Since: 3.2 */ public void setShowDefaultItem(bool setting) { gtk_app_chooser_button_set_show_default_item(gtkAppChooserButton, setting); } /** * Sets whether the dropdown menu of this button should show an * entry to trigger a #GtkAppChooserDialog. * * Params: * setting = the new value for #GtkAppChooserButton:show-dialog-item * * Since: 3.0 */ public void setShowDialogItem(bool setting) { gtk_app_chooser_button_set_show_dialog_item(gtkAppChooserButton, setting); } protected class OnCustomItemActivatedDelegateWrapper { void delegate(string, AppChooserButton) dlg; gulong handlerId; this(void delegate(string, AppChooserButton) dlg) { this.dlg = dlg; onCustomItemActivatedListeners ~= this; } void remove(OnCustomItemActivatedDelegateWrapper source) { foreach(index, wrapper; onCustomItemActivatedListeners) { if (wrapper.handlerId == source.handlerId) { onCustomItemActivatedListeners[index] = null; onCustomItemActivatedListeners = std.algorithm.remove(onCustomItemActivatedListeners, index); break; } } } } OnCustomItemActivatedDelegateWrapper[] onCustomItemActivatedListeners; /** * Emitted when a custom item, previously added with * gtk_app_chooser_button_append_custom_item(), is activated from the * dropdown menu. * * Params: * itemName = the name of the activated item */ gulong addOnCustomItemActivated(void delegate(string, AppChooserButton) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnCustomItemActivatedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "custom-item-activated", cast(GCallback)&callBackCustomItemActivated, cast(void*)wrapper, cast(GClosureNotify)&callBackCustomItemActivatedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackCustomItemActivated(GtkAppChooserButton* appchooserbuttonStruct, char* itemName, OnCustomItemActivatedDelegateWrapper wrapper) { wrapper.dlg(Str.toString(itemName), wrapper.outer); } extern(C) static void callBackCustomItemActivatedDestroy(OnCustomItemActivatedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gtk/AppChooserDialog.d000066400000000000000000000123541324604450400213720ustar00rootroot00000000000000/* * 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 gtk.AppChooserDialog; private import gio.FileIF; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gtk.AppChooserIF; private import gtk.AppChooserT; private import gtk.Dialog; private import gtk.Widget; private import gtk.Window; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * #GtkAppChooserDialog shows a #GtkAppChooserWidget inside a #GtkDialog. * * Note that #GtkAppChooserDialog does not have any interesting methods * of its own. Instead, you should get the embedded #GtkAppChooserWidget * using gtk_app_chooser_dialog_get_widget() and call its methods if * the generic #GtkAppChooser interface is not sufficient for your needs. * * To set the heading that is shown above the #GtkAppChooserWidget, * use gtk_app_chooser_dialog_set_heading(). */ public class AppChooserDialog : Dialog, AppChooserIF { /** the main Gtk struct */ protected GtkAppChooserDialog* gtkAppChooserDialog; /** Get the main Gtk struct */ public GtkAppChooserDialog* getAppChooserDialogStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAppChooserDialog; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAppChooserDialog; } protected override void setStruct(GObject* obj) { gtkAppChooserDialog = cast(GtkAppChooserDialog*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAppChooserDialog* gtkAppChooserDialog, bool ownedRef = false) { this.gtkAppChooserDialog = gtkAppChooserDialog; super(cast(GtkDialog*)gtkAppChooserDialog, ownedRef); } // add the AppChooser capabilities mixin AppChooserT!(GtkAppChooserDialog); /** */ public static GType getType() { return gtk_app_chooser_dialog_get_type(); } /** * Creates a new #GtkAppChooserDialog for the provided #GFile, * to allow the user to select an application for it. * * Params: * parent = a #GtkWindow, or %NULL * flags = flags for this dialog * file = a #GFile * * Returns: a newly created #GtkAppChooserDialog * * Since: 3.0 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Window parent, GtkDialogFlags flags, FileIF file) { auto p = gtk_app_chooser_dialog_new((parent is null) ? null : parent.getWindowStruct(), flags, (file is null) ? null : file.getFileStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAppChooserDialog*) p); } /** * Creates a new #GtkAppChooserDialog for the provided content type, * to allow the user to select an application for it. * * Params: * parent = a #GtkWindow, or %NULL * flags = flags for this dialog * contentType = a content type string * * Returns: a newly created #GtkAppChooserDialog * * Since: 3.0 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Window parent, GtkDialogFlags flags, string contentType) { auto p = gtk_app_chooser_dialog_new_for_content_type((parent is null) ? null : parent.getWindowStruct(), flags, Str.toStringz(contentType)); if(p is null) { throw new ConstructionException("null returned by new_for_content_type"); } this(cast(GtkAppChooserDialog*) p); } /** * Returns the text to display at the top of the dialog. * * Returns: the text to display at the top of the dialog, or %NULL, in which * case a default text is displayed */ public string getHeading() { return Str.toString(gtk_app_chooser_dialog_get_heading(gtkAppChooserDialog)); } /** * Returns the #GtkAppChooserWidget of this dialog. * * Returns: the #GtkAppChooserWidget of @self * * Since: 3.0 */ public Widget getWidget() { auto p = gtk_app_chooser_dialog_get_widget(gtkAppChooserDialog); if(p is null) { return null; } return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); } /** * Sets the text to display at the top of the dialog. * If the heading is not set, the dialog displays a default text. * * Params: * heading = a string containing Pango markup */ public void setHeading(string heading) { gtk_app_chooser_dialog_set_heading(gtkAppChooserDialog, Str.toStringz(heading)); } } GtkD-3.7.5/generated/gtkd/gtk/AppChooserIF.d000066400000000000000000000056561324604450400205000ustar00rootroot00000000000000/* * 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 gtk.AppChooserIF; private import gio.AppInfoIF; private import glib.Str; private import gobject.ObjectG; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * #GtkAppChooser is an interface that can be implemented by widgets which * allow the user to choose an application (typically for the purpose of * opening a file). The main objects that implement this interface are * #GtkAppChooserWidget, #GtkAppChooserDialog and #GtkAppChooserButton. * * Applications are represented by GIO #GAppInfo objects here. * GIO has a concept of recommended and fallback applications for a * given content type. Recommended applications are those that claim * to handle the content type itself, while fallback also includes * applications that handle a more generic content type. GIO also * knows the default and last-used application for a given content * type. The #GtkAppChooserWidget provides detailed control over * whether the shown list of applications should include default, * recommended or fallback applications. * * To obtain the application that has been selected in a #GtkAppChooser, * use gtk_app_chooser_get_app_info(). */ public interface AppChooserIF{ /** Get the main Gtk struct */ public GtkAppChooser* getAppChooserStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gtk_app_chooser_get_type(); } /** * Returns the currently selected application. * * Returns: a #GAppInfo for the currently selected * application, or %NULL if none is selected. Free with g_object_unref() * * Since: 3.0 */ public AppInfoIF getAppInfo(); /** * Returns the current value of the #GtkAppChooser:content-type property. * * Returns: the content type of @self. Free with g_free() * * Since: 3.0 */ public string getContentType(); /** * Reloads the list of applications. * * Since: 3.0 */ public void refresh(); } GtkD-3.7.5/generated/gtkd/gtk/AppChooserT.d000066400000000000000000000063651324604450400204030ustar00rootroot00000000000000/* * 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 gtk.AppChooserT; public import gio.AppInfoIF; public import glib.Str; public import gobject.ObjectG; public import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * #GtkAppChooser is an interface that can be implemented by widgets which * allow the user to choose an application (typically for the purpose of * opening a file). The main objects that implement this interface are * #GtkAppChooserWidget, #GtkAppChooserDialog and #GtkAppChooserButton. * * Applications are represented by GIO #GAppInfo objects here. * GIO has a concept of recommended and fallback applications for a * given content type. Recommended applications are those that claim * to handle the content type itself, while fallback also includes * applications that handle a more generic content type. GIO also * knows the default and last-used application for a given content * type. The #GtkAppChooserWidget provides detailed control over * whether the shown list of applications should include default, * recommended or fallback applications. * * To obtain the application that has been selected in a #GtkAppChooser, * use gtk_app_chooser_get_app_info(). */ public template AppChooserT(TStruct) { /** Get the main Gtk struct */ public GtkAppChooser* getAppChooserStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GtkAppChooser*)getStruct(); } /** * Returns the currently selected application. * * Returns: a #GAppInfo for the currently selected * application, or %NULL if none is selected. Free with g_object_unref() * * Since: 3.0 */ public AppInfoIF getAppInfo() { auto p = gtk_app_chooser_get_app_info(getAppChooserStruct()); if(p is null) { return null; } return ObjectG.getDObject!(AppInfoIF)(cast(GAppInfo*) p, true); } /** * Returns the current value of the #GtkAppChooser:content-type property. * * Returns: the content type of @self. Free with g_free() * * Since: 3.0 */ public string getContentType() { auto retStr = gtk_app_chooser_get_content_type(getAppChooserStruct()); scope(exit) Str.freeString(retStr); return Str.toString(retStr); } /** * Reloads the list of applications. * * Since: 3.0 */ public void refresh() { gtk_app_chooser_refresh(getAppChooserStruct()); } } GtkD-3.7.5/generated/gtkd/gtk/AppChooserWidget.d000066400000000000000000000316221324604450400214150ustar00rootroot00000000000000/* * 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 gtk.AppChooserWidget; private import gio.AppInfoIF; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gtk.AppChooserIF; private import gtk.AppChooserT; private import gtk.Box; private import gtk.Menu; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * #GtkAppChooserWidget is a widget for selecting applications. * It is the main building block for #GtkAppChooserDialog. Most * applications only need to use the latter; but you can use * this widget as part of a larger widget if you have special needs. * * #GtkAppChooserWidget offers detailed control over what applications * are shown, using the * #GtkAppChooserWidget:show-default, * #GtkAppChooserWidget:show-recommended, * #GtkAppChooserWidget:show-fallback, * #GtkAppChooserWidget:show-other and * #GtkAppChooserWidget:show-all * properties. See the #GtkAppChooser documentation for more information * about these groups of applications. * * To keep track of the selected application, use the * #GtkAppChooserWidget::application-selected and #GtkAppChooserWidget::application-activated signals. * * # CSS nodes * * GtkAppChooserWidget has a single CSS node with name appchooser. */ public class AppChooserWidget : Box, AppChooserIF { /** the main Gtk struct */ protected GtkAppChooserWidget* gtkAppChooserWidget; /** Get the main Gtk struct */ public GtkAppChooserWidget* getAppChooserWidgetStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAppChooserWidget; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAppChooserWidget; } protected override void setStruct(GObject* obj) { gtkAppChooserWidget = cast(GtkAppChooserWidget*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAppChooserWidget* gtkAppChooserWidget, bool ownedRef = false) { this.gtkAppChooserWidget = gtkAppChooserWidget; super(cast(GtkBox*)gtkAppChooserWidget, ownedRef); } // add the AppChooser capabilities mixin AppChooserT!(GtkAppChooserWidget); /** */ public static GType getType() { return gtk_app_chooser_widget_get_type(); } /** * Creates a new #GtkAppChooserWidget for applications * that can handle content of the given type. * * Params: * contentType = the content type to show applications for * * Returns: a newly created #GtkAppChooserWidget * * Since: 3.0 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string contentType) { auto p = gtk_app_chooser_widget_new(Str.toStringz(contentType)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAppChooserWidget*) p); } /** * Returns the text that is shown if there are not applications * that can handle the content type. * * Returns: the value of #GtkAppChooserWidget:default-text * * Since: 3.0 */ public string getDefaultText() { return Str.toString(gtk_app_chooser_widget_get_default_text(gtkAppChooserWidget)); } /** * Returns the current value of the #GtkAppChooserWidget:show-all * property. * * Returns: the value of #GtkAppChooserWidget:show-all * * Since: 3.0 */ public bool getShowAll() { return gtk_app_chooser_widget_get_show_all(gtkAppChooserWidget) != 0; } /** * Returns the current value of the #GtkAppChooserWidget:show-default * property. * * Returns: the value of #GtkAppChooserWidget:show-default * * Since: 3.0 */ public bool getShowDefault() { return gtk_app_chooser_widget_get_show_default(gtkAppChooserWidget) != 0; } /** * Returns the current value of the #GtkAppChooserWidget:show-fallback * property. * * Returns: the value of #GtkAppChooserWidget:show-fallback * * Since: 3.0 */ public bool getShowFallback() { return gtk_app_chooser_widget_get_show_fallback(gtkAppChooserWidget) != 0; } /** * Returns the current value of the #GtkAppChooserWidget:show-other * property. * * Returns: the value of #GtkAppChooserWidget:show-other * * Since: 3.0 */ public bool getShowOther() { return gtk_app_chooser_widget_get_show_other(gtkAppChooserWidget) != 0; } /** * Returns the current value of the #GtkAppChooserWidget:show-recommended * property. * * Returns: the value of #GtkAppChooserWidget:show-recommended * * Since: 3.0 */ public bool getShowRecommended() { return gtk_app_chooser_widget_get_show_recommended(gtkAppChooserWidget) != 0; } /** * Sets the text that is shown if there are not applications * that can handle the content type. * * Params: * text = the new value for #GtkAppChooserWidget:default-text */ public void setDefaultText(string text) { gtk_app_chooser_widget_set_default_text(gtkAppChooserWidget, Str.toStringz(text)); } /** * Sets whether the app chooser should show all applications * in a flat list. * * Params: * setting = the new value for #GtkAppChooserWidget:show-all * * Since: 3.0 */ public void setShowAll(bool setting) { gtk_app_chooser_widget_set_show_all(gtkAppChooserWidget, setting); } /** * Sets whether the app chooser should show the default handler * for the content type in a separate section. * * Params: * setting = the new value for #GtkAppChooserWidget:show-default * * Since: 3.0 */ public void setShowDefault(bool setting) { gtk_app_chooser_widget_set_show_default(gtkAppChooserWidget, setting); } /** * Sets whether the app chooser should show related applications * for the content type in a separate section. * * Params: * setting = the new value for #GtkAppChooserWidget:show-fallback * * Since: 3.0 */ public void setShowFallback(bool setting) { gtk_app_chooser_widget_set_show_fallback(gtkAppChooserWidget, setting); } /** * Sets whether the app chooser should show applications * which are unrelated to the content type. * * Params: * setting = the new value for #GtkAppChooserWidget:show-other * * Since: 3.0 */ public void setShowOther(bool setting) { gtk_app_chooser_widget_set_show_other(gtkAppChooserWidget, setting); } /** * Sets whether the app chooser should show recommended applications * for the content type in a separate section. * * Params: * setting = the new value for #GtkAppChooserWidget:show-recommended * * Since: 3.0 */ public void setShowRecommended(bool setting) { gtk_app_chooser_widget_set_show_recommended(gtkAppChooserWidget, setting); } protected class OnApplicationActivatedDelegateWrapper { void delegate(AppInfoIF, AppChooserWidget) dlg; gulong handlerId; this(void delegate(AppInfoIF, AppChooserWidget) dlg) { this.dlg = dlg; onApplicationActivatedListeners ~= this; } void remove(OnApplicationActivatedDelegateWrapper source) { foreach(index, wrapper; onApplicationActivatedListeners) { if (wrapper.handlerId == source.handlerId) { onApplicationActivatedListeners[index] = null; onApplicationActivatedListeners = std.algorithm.remove(onApplicationActivatedListeners, index); break; } } } } OnApplicationActivatedDelegateWrapper[] onApplicationActivatedListeners; /** * Emitted when an application item is activated from the widget's list. * * This usually happens when the user double clicks an item, or an item * is selected and the user presses one of the keys Space, Shift+Space, * Return or Enter. * * Params: * application = the activated #GAppInfo */ gulong addOnApplicationActivated(void delegate(AppInfoIF, AppChooserWidget) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnApplicationActivatedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "application-activated", cast(GCallback)&callBackApplicationActivated, cast(void*)wrapper, cast(GClosureNotify)&callBackApplicationActivatedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackApplicationActivated(GtkAppChooserWidget* appchooserwidgetStruct, GAppInfo* application, OnApplicationActivatedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(AppInfoIF)(application), wrapper.outer); } extern(C) static void callBackApplicationActivatedDestroy(OnApplicationActivatedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnApplicationSelectedDelegateWrapper { void delegate(AppInfoIF, AppChooserWidget) dlg; gulong handlerId; this(void delegate(AppInfoIF, AppChooserWidget) dlg) { this.dlg = dlg; onApplicationSelectedListeners ~= this; } void remove(OnApplicationSelectedDelegateWrapper source) { foreach(index, wrapper; onApplicationSelectedListeners) { if (wrapper.handlerId == source.handlerId) { onApplicationSelectedListeners[index] = null; onApplicationSelectedListeners = std.algorithm.remove(onApplicationSelectedListeners, index); break; } } } } OnApplicationSelectedDelegateWrapper[] onApplicationSelectedListeners; /** * Emitted when an application item is selected from the widget's list. * * Params: * application = the selected #GAppInfo */ gulong addOnApplicationSelected(void delegate(AppInfoIF, AppChooserWidget) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnApplicationSelectedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "application-selected", cast(GCallback)&callBackApplicationSelected, cast(void*)wrapper, cast(GClosureNotify)&callBackApplicationSelectedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackApplicationSelected(GtkAppChooserWidget* appchooserwidgetStruct, GAppInfo* application, OnApplicationSelectedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(AppInfoIF)(application), wrapper.outer); } extern(C) static void callBackApplicationSelectedDestroy(OnApplicationSelectedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPopulatePopupDelegateWrapper { void delegate(Menu, AppInfoIF, AppChooserWidget) dlg; gulong handlerId; this(void delegate(Menu, AppInfoIF, AppChooserWidget) dlg) { this.dlg = dlg; onPopulatePopupListeners ~= this; } void remove(OnPopulatePopupDelegateWrapper source) { foreach(index, wrapper; onPopulatePopupListeners) { if (wrapper.handlerId == source.handlerId) { onPopulatePopupListeners[index] = null; onPopulatePopupListeners = std.algorithm.remove(onPopulatePopupListeners, index); break; } } } } OnPopulatePopupDelegateWrapper[] onPopulatePopupListeners; /** * Emitted when a context menu is about to popup over an application item. * Clients can insert menu items into the provided #GtkMenu object in the * callback of this signal; the context menu will be shown over the item * if at least one item has been added to the menu. * * Params: * menu = the #GtkMenu to populate * application = the current #GAppInfo */ gulong addOnPopulatePopup(void delegate(Menu, AppInfoIF, AppChooserWidget) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPopulatePopupDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "populate-popup", cast(GCallback)&callBackPopulatePopup, cast(void*)wrapper, cast(GClosureNotify)&callBackPopulatePopupDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPopulatePopup(GtkAppChooserWidget* appchooserwidgetStruct, GtkMenu* menu, GAppInfo* application, OnPopulatePopupDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Menu)(menu), ObjectG.getDObject!(AppInfoIF)(application), wrapper.outer); } extern(C) static void callBackPopulatePopupDestroy(OnPopulatePopupDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gtk/Application.d000066400000000000000000000660751324604450400204630ustar00rootroot00000000000000/* * 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 gtk.Application; private import gio.ActionGroupIF; private import gio.ActionGroupT; private import gio.ActionMapIF; private import gio.ActionMapT; private import gio.Application : GioApplication = Application; private import gio.Menu; private import gio.MenuModel; private import glib.ConstructionException; private import glib.ListG; private import glib.Str; private import glib.Variant; private import gobject.ObjectG; private import gobject.Signals; private import gtk.Window; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * #GtkApplication is a class that handles many important aspects * of a GTK+ application in a convenient fashion, without enforcing * a one-size-fits-all application model. * * Currently, GtkApplication handles GTK+ initialization, application * uniqueness, session management, provides some basic scriptability and * desktop shell integration by exporting actions and menus and manages a * list of toplevel windows whose life-cycle is automatically tied to the * life-cycle of your application. * * While GtkApplication works fine with plain #GtkWindows, it is recommended * to use it together with #GtkApplicationWindow. * * When GDK threads are enabled, GtkApplication will acquire the GDK * lock when invoking actions that arrive from other processes. The GDK * lock is not touched for local action invocations. In order to have * actions invoked in a predictable context it is therefore recommended * that the GDK lock be held while invoking actions locally with * g_action_group_activate_action(). The same applies to actions * associated with #GtkApplicationWindow and to the “activate” and * “open” #GApplication methods. * * ## Automatic resources ## {#automatic-resources} * * #GtkApplication will automatically load menus from the #GtkBuilder * resource located at "gtk/menus.ui", relative to the application's * resource base path (see g_application_set_resource_base_path()). The * menu with the ID "app-menu" is taken as the application's app menu * and the menu with the ID "menubar" is taken as the application's * menubar. Additional menus (most interesting submenus) can be named * and accessed via gtk_application_get_menu_by_id() which allows for * dynamic population of a part of the menu structure. * * If the resources "gtk/menus-appmenu.ui" or "gtk/menus-traditional.ui" are * present then these files will be used in preference, depending on the value * of gtk_application_prefers_app_menu(). If the resource "gtk/menus-common.ui" * is present it will be loaded as well. This is useful for storing items that * are referenced from both "gtk/menus-appmenu.ui" and * "gtk/menus-traditional.ui". * * It is also possible to provide the menus manually using * gtk_application_set_app_menu() and gtk_application_set_menubar(). * * #GtkApplication will also automatically setup an icon search path for * the default icon theme by appending "icons" to the resource base * path. This allows your application to easily store its icons as * resources. See gtk_icon_theme_add_resource_path() for more * information. * * If there is a resource located at "gtk/help-overlay.ui" which * defines a #GtkShortcutsWindow with ID "help_overlay" then GtkApplication * associates an instance of this shortcuts window with each * #GtkApplicationWindow and sets up keyboard accelerators (Control-F1 * and Control-?) to open it. To create a menu item that displays the * shortcuts window, associate the item with the action win.show-help-overlay. * * ## A simple application ## {#gtkapplication} * * [A simple example](https://git.gnome.org/browse/gtk+/tree/examples/bp/bloatpad.c) * * GtkApplication optionally registers with a session manager * of the users session (if you set the #GtkApplication:register-session * property) and offers various functionality related to the session * life-cycle. * * An application can block various ways to end the session with * the gtk_application_inhibit() function. Typical use cases for * this kind of inhibiting are long-running, uninterruptible operations, * such as burning a CD or performing a disk backup. The session * manager may not honor the inhibitor, but it can be expected to * inform the user about the negative consequences of ending the * session while inhibitors are present. * * ## See Also ## {#seealso} * [HowDoI: Using GtkApplication](https://wiki.gnome.org/HowDoI/GtkApplication), * [Getting Started with GTK+: Basics](https://developer.gnome.org/gtk3/stable/gtk-getting-started.html#id-1.2.3.3) */ public class Application : GioApplication { /** the main Gtk struct */ protected GtkApplication* gtkApplication; /** Get the main Gtk struct */ public GtkApplication* getGtkApplicationStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkApplication; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkApplication; } protected override void setStruct(GObject* obj) { gtkApplication = cast(GtkApplication*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkApplication* gtkApplication, bool ownedRef = false) { this.gtkApplication = gtkApplication; super(cast(GApplication*)gtkApplication, ownedRef); } /** * Sets zero or more keyboard accelerators that will trigger the * given action. The first item in accels will be the primary * accelerator, which may be displayed in the UI. * * To remove all accelerators for an action, use an empty * array for accels. * * Params: * detailedActionName = a detailed action name, specifying an action * and target to associate accelerators with * accels = a list of accelerators in the format * understood by gtk_accelerator_parse() * * Since: 3.12 */ public void setAccelsForAction(string detailedActionName, string[] accels) { char** accel; if (accels) accel = Str.toStringzArray(accels); else accel = [cast(char*)null].ptr; gtk_application_set_accels_for_action(gtkApplication, Str.toStringz(detailedActionName), accel); } /** */ /** */ public static GType getType() { return gtk_application_get_type(); } /** * Creates a new #GtkApplication instance. * * When using #GtkApplication, it is not necessary to call gtk_init() * manually. It is called as soon as the application gets registered as * the primary instance. * * Concretely, gtk_init() is called in the default handler for the * #GApplication::startup signal. Therefore, #GtkApplication subclasses should * chain up in their #GApplication::startup handler before using any GTK+ API. * * Note that commandline arguments are not passed to gtk_init(). * All GTK+ functionality that is available via commandline arguments * can also be achieved by setting suitable environment variables * such as `G_DEBUG`, so this should not be a big * problem. If you absolutely must support GTK+ commandline arguments, * you can explicitly call gtk_init() before creating the application * instance. * * If non-%NULL, the application ID must be valid. See * g_application_id_is_valid(). * * If no application ID is given then some features (most notably application * uniqueness) will be disabled. A null application ID is only allowed with * GTK+ 3.6 or later. * * Params: * applicationId = The application ID. * flags = the application flags * * Returns: a new #GtkApplication instance * * Since: 3.0 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string applicationId, GApplicationFlags flags) { auto p = gtk_application_new(Str.toStringz(applicationId), flags); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkApplication*) p, true); } /** * Installs an accelerator that will cause the named action * to be activated when the key combination specificed by @accelerator * is pressed. * * @accelerator must be a string that can be parsed by gtk_accelerator_parse(), * e.g. "q" or “p”. * * @action_name must be the name of an action as it would be used * in the app menu, i.e. actions that have been added to the application * are referred to with an “app.” prefix, and window-specific actions * with a “win.” prefix. * * GtkApplication also extracts accelerators out of “accel” attributes * in the #GMenuModels passed to gtk_application_set_app_menu() and * gtk_application_set_menubar(), which is usually more convenient * than calling this function for each accelerator. * * Deprecated: Use gtk_application_set_accels_for_action() instead * * Params: * accelerator = accelerator string * actionName = the name of the action to activate * parameter = parameter to pass when activating the action, * or %NULL if the action does not accept an activation parameter * * Since: 3.4 */ public void addAccelerator(string accelerator, string actionName, Variant parameter) { gtk_application_add_accelerator(gtkApplication, Str.toStringz(accelerator), Str.toStringz(actionName), (parameter is null) ? null : parameter.getVariantStruct()); } /** * Adds a window to @application. * * This call can only happen after the @application has started; * typically, you should add new application windows in response * to the emission of the #GApplication::activate signal. * * This call is equivalent to setting the #GtkWindow:application * property of @window to @application. * * Normally, the connection between the application and the window * will remain until the window is destroyed, but you can explicitly * remove it with gtk_application_remove_window(). * * GTK+ will keep the @application running as long as it has * any windows. * * Params: * window = a #GtkWindow * * Since: 3.0 */ public void addWindow(Window window) { gtk_application_add_window(gtkApplication, (window is null) ? null : window.getWindowStruct()); } /** * Gets the accelerators that are currently associated with * the given action. * * Params: * detailedActionName = a detailed action name, specifying an action * and target to obtain accelerators for * * Returns: accelerators for @detailed_action_name, as * a %NULL-terminated array. Free with g_strfreev() when no longer needed * * Since: 3.12 */ public string[] getAccelsForAction(string detailedActionName) { auto retStr = gtk_application_get_accels_for_action(gtkApplication, Str.toStringz(detailedActionName)); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Returns the list of actions (possibly empty) that @accel maps to. * Each item in the list is a detailed action name in the usual form. * * This might be useful to discover if an accel already exists in * order to prevent installation of a conflicting accelerator (from * an accelerator editor or a plugin system, for example). Note that * having more than one action per accelerator may not be a bad thing * and might make sense in cases where the actions never appear in the * same context. * * In case there are no actions for a given accelerator, an empty array * is returned. %NULL is never returned. * * It is a programmer error to pass an invalid accelerator string. * If you are unsure, check it with gtk_accelerator_parse() first. * * Params: * accel = an accelerator that can be parsed by gtk_accelerator_parse() * * Returns: a %NULL-terminated array of actions for @accel * * Since: 3.14 */ public string[] getActionsForAccel(string accel) { auto retStr = gtk_application_get_actions_for_accel(gtkApplication, Str.toStringz(accel)); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Gets the “active” window for the application. * * The active window is the one that was most recently focused (within * the application). This window may not have the focus at the moment * if another application has it — this is just the most * recently-focused window within this application. * * Returns: the active window, or %NULL if * there isn't one. * * Since: 3.6 */ public Window getActiveWindow() { auto p = gtk_application_get_active_window(gtkApplication); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GtkWindow*) p); } /** * Returns the menu model that has been set with * gtk_application_set_app_menu(). * * Returns: the application menu of @application * or %NULL if no application menu has been set. * * Since: 3.4 */ public MenuModel getAppMenu() { auto p = gtk_application_get_app_menu(gtkApplication); if(p is null) { return null; } return ObjectG.getDObject!(MenuModel)(cast(GMenuModel*) p); } /** * Gets a menu from automatically loaded resources. * See [Automatic resources][automatic-resources] * for more information. * * Params: * id = the id of the menu to look up * * Returns: Gets the menu with the * given id from the automatically loaded resources * * Since: 3.14 */ public Menu getMenuById(string id) { auto p = gtk_application_get_menu_by_id(gtkApplication, Str.toStringz(id)); if(p is null) { return null; } return ObjectG.getDObject!(Menu)(cast(GMenu*) p); } /** * Returns the menu model that has been set with * gtk_application_set_menubar(). * * Returns: the menubar for windows of @application * * Since: 3.4 */ public MenuModel getMenubar() { auto p = gtk_application_get_menubar(gtkApplication); if(p is null) { return null; } return ObjectG.getDObject!(MenuModel)(cast(GMenuModel*) p); } /** * Returns the #GtkApplicationWindow with the given ID. * * The ID of a #GtkApplicationWindow can be retrieved with * gtk_application_window_get_id(). * * Params: * id = an identifier number * * Returns: the window with ID @id, or * %NULL if there is no window with this ID * * Since: 3.6 */ public Window getWindowById(uint id) { auto p = gtk_application_get_window_by_id(gtkApplication, id); if(p is null) { return null; } return ObjectG.getDObject!(Window)(cast(GtkWindow*) p); } /** * Gets a list of the #GtkWindows associated with @application. * * The list is sorted by most recently focused window, such that the first * element is the currently focused window. (Useful for choosing a parent * for a transient window.) * * The list that is returned should not be modified in any way. It will * only remain valid until the next focus change or window creation or * deletion. * * Returns: a #GList of #GtkWindow * * Since: 3.0 */ public ListG getWindows() { auto p = gtk_application_get_windows(gtkApplication); if(p is null) { return null; } return new ListG(cast(GList*) p); } /** * Inform the session manager that certain types of actions should be * inhibited. This is not guaranteed to work on all platforms and for * all types of actions. * * Applications should invoke this method when they begin an operation * that should not be interrupted, such as creating a CD or DVD. The * types of actions that may be blocked are specified by the @flags * parameter. When the application completes the operation it should * call gtk_application_uninhibit() to remove the inhibitor. Note that * an application can have multiple inhibitors, and all of them must * be individually removed. Inhibitors are also cleared when the * application exits. * * Applications should not expect that they will always be able to block * the action. In most cases, users will be given the option to force * the action to take place. * * Reasons should be short and to the point. * * If @window is given, the session manager may point the user to * this window to find out more about why the action is inhibited. * * Params: * window = a #GtkWindow, or %NULL * flags = what types of actions should be inhibited * reason = a short, human-readable string that explains * why these operations are inhibited * * Returns: A non-zero cookie that is used to uniquely identify this * request. It should be used as an argument to gtk_application_uninhibit() * in order to remove the request. If the platform does not support * inhibiting or the request failed for some reason, 0 is returned. * * Since: 3.4 */ public uint inhibit(Window window, GtkApplicationInhibitFlags flags, string reason) { return gtk_application_inhibit(gtkApplication, (window is null) ? null : window.getWindowStruct(), flags, Str.toStringz(reason)); } /** * Determines if any of the actions specified in @flags are * currently inhibited (possibly by another application). * * Params: * flags = what types of actions should be queried * * Returns: %TRUE if any of the actions specified in @flags are inhibited * * Since: 3.4 */ public bool isInhibited(GtkApplicationInhibitFlags flags) { return gtk_application_is_inhibited(gtkApplication, flags) != 0; } /** * Lists the detailed action names which have associated accelerators. * See gtk_application_set_accels_for_action(). * * Returns: a %NULL-terminated array of strings, * free with g_strfreev() when done * * Since: 3.12 */ public string[] listActionDescriptions() { auto retStr = gtk_application_list_action_descriptions(gtkApplication); scope(exit) Str.freeStringArray(retStr); return Str.toStringArray(retStr); } /** * Determines if the desktop environment in which the application is * running would prefer an application menu be shown. * * If this function returns %TRUE then the application should call * gtk_application_set_app_menu() with the contents of an application * menu, which will be shown by the desktop environment. If it returns * %FALSE then you should consider using an alternate approach, such as * a menubar. * * The value returned by this function is purely advisory and you are * free to ignore it. If you call gtk_application_set_app_menu() even * if the desktop environment doesn't support app menus, then a fallback * will be provided. * * Applications are similarly free not to set an app menu even if the * desktop environment wants to show one. In that case, a fallback will * also be created by the desktop environment (GNOME, for example, uses * a menu with only a "Quit" item in it). * * The value returned by this function never changes. Once it returns a * particular value, it is guaranteed to always return the same value. * * You may only call this function after the application has been * registered and after the base startup handler has run. You're most * likely to want to use this from your own startup handler. It may * also make sense to consult this function while constructing UI (in * activate, open or an action activation handler) in order to determine * if you should show a gear menu or not. * * This function will return %FALSE on Mac OS and a default app menu * will be created automatically with the "usual" contents of that menu * typical to most Mac OS applications. If you call * gtk_application_set_app_menu() anyway, then this menu will be * replaced with your own. * * Returns: %TRUE if you should set an app menu * * Since: 3.14 */ public bool prefersAppMenu() { return gtk_application_prefers_app_menu(gtkApplication) != 0; } /** * Removes an accelerator that has been previously added * with gtk_application_add_accelerator(). * * Deprecated: Use gtk_application_set_accels_for_action() instead * * Params: * actionName = the name of the action to activate * parameter = parameter to pass when activating the action, * or %NULL if the action does not accept an activation parameter * * Since: 3.4 */ public void removeAccelerator(string actionName, Variant parameter) { gtk_application_remove_accelerator(gtkApplication, Str.toStringz(actionName), (parameter is null) ? null : parameter.getVariantStruct()); } /** * Remove a window from @application. * * If @window belongs to @application then this call is equivalent to * setting the #GtkWindow:application property of @window to * %NULL. * * The application may stop running as a result of a call to this * function. * * Params: * window = a #GtkWindow * * Since: 3.0 */ public void removeWindow(Window window) { gtk_application_remove_window(gtkApplication, (window is null) ? null : window.getWindowStruct()); } /** * Sets or unsets the application menu for @application. * * This can only be done in the primary instance of the application, * after it has been registered. #GApplication::startup is a good place * to call this. * * The application menu is a single menu containing items that typically * impact the application as a whole, rather than acting on a specific * window or document. For example, you would expect to see * “Preferences” or “Quit” in an application menu, but not “Save” or * “Print”. * * If supported, the application menu will be rendered by the desktop * environment. * * Use the base #GActionMap interface to add actions, to respond to the user * selecting these menu items. * * Params: * appMenu = a #GMenuModel, or %NULL * * Since: 3.4 */ public void setAppMenu(MenuModel appMenu) { gtk_application_set_app_menu(gtkApplication, (appMenu is null) ? null : appMenu.getMenuModelStruct()); } /** * Sets or unsets the menubar for windows of @application. * * This is a menubar in the traditional sense. * * This can only be done in the primary instance of the application, * after it has been registered. #GApplication::startup is a good place * to call this. * * Depending on the desktop environment, this may appear at the top of * each window, or at the top of the screen. In some environments, if * both the application menu and the menubar are set, the application * menu will be presented as if it were the first item of the menubar. * Other environments treat the two as completely separate — for example, * the application menu may be rendered by the desktop shell while the * menubar (if set) remains in each individual window. * * Use the base #GActionMap interface to add actions, to respond to the * user selecting these menu items. * * Params: * menubar = a #GMenuModel, or %NULL * * Since: 3.4 */ public void setMenubar(MenuModel menubar) { gtk_application_set_menubar(gtkApplication, (menubar is null) ? null : menubar.getMenuModelStruct()); } /** * Removes an inhibitor that has been established with gtk_application_inhibit(). * Inhibitors are also cleared when the application exits. * * Params: * cookie = a cookie that was returned by gtk_application_inhibit() * * Since: 3.4 */ public void uninhibit(uint cookie) { gtk_application_uninhibit(gtkApplication, cookie); } protected class OnWindowAddedDelegateWrapper { void delegate(Window, Application) dlg; gulong handlerId; this(void delegate(Window, Application) dlg) { this.dlg = dlg; onWindowAddedListeners ~= this; } void remove(OnWindowAddedDelegateWrapper source) { foreach(index, wrapper; onWindowAddedListeners) { if (wrapper.handlerId == source.handlerId) { onWindowAddedListeners[index] = null; onWindowAddedListeners = std.algorithm.remove(onWindowAddedListeners, index); break; } } } } OnWindowAddedDelegateWrapper[] onWindowAddedListeners; /** * Emitted when a #GtkWindow is added to @application through * gtk_application_add_window(). * * Params: * window = the newly-added #GtkWindow * * Since: 3.2 */ gulong addOnWindowAdded(void delegate(Window, Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnWindowAddedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "window-added", cast(GCallback)&callBackWindowAdded, cast(void*)wrapper, cast(GClosureNotify)&callBackWindowAddedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackWindowAdded(GtkApplication* applicationStruct, GtkWindow* window, OnWindowAddedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Window)(window), wrapper.outer); } extern(C) static void callBackWindowAddedDestroy(OnWindowAddedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnWindowRemovedDelegateWrapper { void delegate(Window, Application) dlg; gulong handlerId; this(void delegate(Window, Application) dlg) { this.dlg = dlg; onWindowRemovedListeners ~= this; } void remove(OnWindowRemovedDelegateWrapper source) { foreach(index, wrapper; onWindowRemovedListeners) { if (wrapper.handlerId == source.handlerId) { onWindowRemovedListeners[index] = null; onWindowRemovedListeners = std.algorithm.remove(onWindowRemovedListeners, index); break; } } } } OnWindowRemovedDelegateWrapper[] onWindowRemovedListeners; /** * Emitted when a #GtkWindow is removed from @application, * either as a side-effect of being destroyed or explicitly * through gtk_application_remove_window(). * * Params: * window = the #GtkWindow that is being removed * * Since: 3.2 */ gulong addOnWindowRemoved(void delegate(Window, Application) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnWindowRemovedDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "window-removed", cast(GCallback)&callBackWindowRemoved, cast(void*)wrapper, cast(GClosureNotify)&callBackWindowRemovedDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackWindowRemoved(GtkApplication* applicationStruct, GtkWindow* window, OnWindowRemovedDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Window)(window), wrapper.outer); } extern(C) static void callBackWindowRemovedDestroy(OnWindowRemovedDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gtk/ApplicationWindow.d000066400000000000000000000232061324604450400216400ustar00rootroot00000000000000/* * 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 gtk.ApplicationWindow; private import gio.ActionGroupIF; private import gio.ActionGroupT; private import gio.ActionMapIF; private import gio.ActionMapT; private import glib.ConstructionException; private import gobject.ObjectG; private import gtk.Application; private import gtk.ShortcutsWindow; private import gtk.Widget; private import gtk.Window; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * #GtkApplicationWindow is a #GtkWindow subclass that offers some * extra functionality for better integration with #GtkApplication * features. Notably, it can handle both the application menu as well * as the menubar. See gtk_application_set_app_menu() and * gtk_application_set_menubar(). * * This class implements the #GActionGroup and #GActionMap interfaces, * to let you add window-specific actions that will be exported by the * associated #GtkApplication, together with its application-wide * actions. Window-specific actions are prefixed with the “win.” * prefix and application-wide actions are prefixed with the “app.” * prefix. Actions must be addressed with the prefixed name when * referring to them from a #GMenuModel. * * Note that widgets that are placed inside a #GtkApplicationWindow * can also activate these actions, if they implement the * #GtkActionable interface. * * As with #GtkApplication, the GDK lock will be acquired when * processing actions arriving from other processes and should therefore * be held when activating actions locally (if GDK threads are enabled). * * The settings #GtkSettings:gtk-shell-shows-app-menu and * #GtkSettings:gtk-shell-shows-menubar tell GTK+ whether the * desktop environment is showing the application menu and menubar * models outside the application as part of the desktop shell. * For instance, on OS X, both menus will be displayed remotely; * on Windows neither will be. gnome-shell (starting with version 3.4) * will display the application menu, but not the menubar. * * If the desktop environment does not display the menubar, then * #GtkApplicationWindow will automatically show a #GtkMenuBar for it. * This behaviour can be overridden with the #GtkApplicationWindow:show-menubar * property. If the desktop environment does not display the application * menu, then it will automatically be included in the menubar or in the * windows client-side decorations. * * ## A GtkApplicationWindow with a menubar * * |[ * GtkApplication *app = gtk_application_new ("org.gtk.test", 0); * * GtkBuilder *builder = gtk_builder_new_from_string ( * "" * " " * " " * " " * " " * " " * " " * "", * -1); * * GMenuModel *menubar = G_MENU_MODEL (gtk_builder_get_object (builder, * "menubar")); * gtk_application_set_menubar (GTK_APPLICATION (app), menubar); * g_object_unref (builder); * * // ... * * GtkWidget *window = gtk_application_window_new (app); * ]| * * ## Handling fallback yourself * * [A simple example](https://git.gnome.org/browse/gtk+/tree/examples/sunny.c) * * The XML format understood by #GtkBuilder for #GMenuModel consists * of a toplevel `` element, which contains one or more `` * elements. Each `` element contains `` and `` * elements with a mandatory name attribute. `` elements have the * same content model as ``. Instead of ``, you can use `` or `
    ` * elements. * * Attribute values can be translated using gettext, like other #GtkBuilder * content. `` elements can be marked for translation with a * `translatable="yes"` attribute. It is also possible to specify message * context and translator comments, using the context and comments attributes. * To make use of this, the #GtkBuilder must have been given the gettext * domain to use. * * The following attributes are used when constructing menu items: * - "label": a user-visible string to display * - "action": the prefixed name of the action to trigger * - "target": the parameter to use when activating the action * - "icon" and "verb-icon": names of icons that may be displayed * - "submenu-action": name of an action that may be used to determine * if a submenu can be opened * - "hidden-when": a string used to determine when the item will be hidden. * Possible values include "action-disabled", "action-missing", "macos-menubar". * * The following attributes are used when constructing sections: * - "label": a user-visible string to use as section heading * - "display-hint": a string used to determine special formatting for the section. * Possible values include "horizontal-buttons". * - "text-direction": a string used to determine the #GtkTextDirection to use * when "display-hint" is set to "horizontal-buttons". Possible values * include "rtl", "ltr", and "none". * * The following attributes are used when constructing submenus: * - "label": a user-visible string to display * - "icon": icon name to display */ public class ApplicationWindow : Window, ActionGroupIF, ActionMapIF { /** the main Gtk struct */ protected GtkApplicationWindow* gtkApplicationWindow; /** Get the main Gtk struct */ public GtkApplicationWindow* getApplicationWindowStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkApplicationWindow; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkApplicationWindow; } protected override void setStruct(GObject* obj) { gtkApplicationWindow = cast(GtkApplicationWindow*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkApplicationWindow* gtkApplicationWindow, bool ownedRef = false) { this.gtkApplicationWindow = gtkApplicationWindow; super(cast(GtkWindow*)gtkApplicationWindow, ownedRef); } // add the ActionGroup capabilities mixin ActionGroupT!(GtkApplicationWindow); // add the ActionMap capabilities mixin ActionMapT!(GtkApplicationWindow); /** */ public static GType getType() { return gtk_application_window_get_type(); } /** * Creates a new #GtkApplicationWindow. * * Params: * application = a #GtkApplication * * Returns: a newly created #GtkApplicationWindow * * Since: 3.4 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(Application application) { auto p = gtk_application_window_new((application is null) ? null : application.getGtkApplicationStruct()); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkApplicationWindow*) p); } /** * Gets the #GtkShortcutsWindow that has been set up with * a prior call to gtk_application_window_set_help_overlay(). * * Returns: the help overlay associated with @window, or %NULL * * Since: 3.20 */ public ShortcutsWindow getHelpOverlay() { auto p = gtk_application_window_get_help_overlay(gtkApplicationWindow); if(p is null) { return null; } return ObjectG.getDObject!(ShortcutsWindow)(cast(GtkShortcutsWindow*) p); } /** * Returns the unique ID of the window. If the window has not yet been added to * a #GtkApplication, returns `0`. * * Returns: the unique ID for @window, or `0` if the window * has not yet been added to a #GtkApplication * * Since: 3.6 */ public uint getId() { return gtk_application_window_get_id(gtkApplicationWindow); } /** * Returns whether the window will display a menubar for the app menu * and menubar as needed. * * Returns: %TRUE if @window will display a menubar when needed * * Since: 3.4 */ public bool getShowMenubar() { return gtk_application_window_get_show_menubar(gtkApplicationWindow) != 0; } /** * Associates a shortcuts window with the application window, and * sets up an action with the name win.show-help-overlay to present * it. * * @window takes resposibility for destroying @help_overlay. * * Params: * helpOverlay = a #GtkShortcutsWindow * * Since: 3.20 */ public void setHelpOverlay(ShortcutsWindow helpOverlay) { gtk_application_window_set_help_overlay(gtkApplicationWindow, (helpOverlay is null) ? null : helpOverlay.getShortcutsWindowStruct()); } /** * Sets whether the window will display a menubar for the app menu * and menubar as needed. * * Params: * showMenubar = whether to show a menubar when needed * * Since: 3.4 */ public void setShowMenubar(bool showMenubar) { gtk_application_window_set_show_menubar(gtkApplicationWindow, showMenubar); } } GtkD-3.7.5/generated/gtkd/gtk/Arrow.d000066400000000000000000000076601324604450400173050ustar00rootroot00000000000000/* * 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 gtk.Arrow; private import glib.ConstructionException; private import gobject.ObjectG; private import gtk.Misc; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * GtkArrow should be used to draw simple arrows that need to point in * one of the four cardinal directions (up, down, left, or right). The * style of the arrow can be one of shadow in, shadow out, etched in, or * etched out. Note that these directions and style types may be * amended in versions of GTK+ to come. * * GtkArrow will fill any space alloted to it, but since it is inherited * from #GtkMisc, it can be padded and/or aligned, to fill exactly the * space the programmer desires. * * Arrows are created with a call to gtk_arrow_new(). The direction or * style of an arrow can be changed after creation by using gtk_arrow_set(). * * GtkArrow has been deprecated; you can simply use a #GtkImage with a * suitable icon name, such as “pan-down-symbolic“. When replacing * GtkArrow by an image, pay attention to the fact that GtkArrow is * doing automatic flipping between #GTK_ARROW_LEFT and #GTK_ARROW_RIGHT, * depending on the text direction. To get the same effect with an image, * use the icon names “pan-start-symbolic“ and “pan-end-symbolic“, which * react to the text direction. */ public class Arrow : Misc { /** the main Gtk struct */ protected GtkArrow* gtkArrow; /** Get the main Gtk struct */ public GtkArrow* getArrowStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkArrow; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkArrow; } protected override void setStruct(GObject* obj) { gtkArrow = cast(GtkArrow*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkArrow* gtkArrow, bool ownedRef = false) { this.gtkArrow = gtkArrow; super(cast(GtkMisc*)gtkArrow, ownedRef); } /** */ public static GType getType() { return gtk_arrow_get_type(); } /** * Creates a new #GtkArrow widget. * * Deprecated: Use a #GtkImage with a suitable icon. * * Params: * arrowType = a valid #GtkArrowType. * shadowType = a valid #GtkShadowType. * * Returns: the new #GtkArrow widget. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GtkArrowType arrowType, GtkShadowType shadowType) { auto p = gtk_arrow_new(arrowType, shadowType); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkArrow*) p); } /** * Sets the direction and style of the #GtkArrow, @arrow. * * Deprecated: Use a #GtkImage with a suitable icon. * * Params: * arrowType = a valid #GtkArrowType. * shadowType = a valid #GtkShadowType. */ public void set(GtkArrowType arrowType, GtkShadowType shadowType) { gtk_arrow_set(gtkArrow, arrowType, shadowType); } } GtkD-3.7.5/generated/gtkd/gtk/ArrowAccessible.d000066400000000000000000000042321324604450400212530ustar00rootroot00000000000000/* * 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 gtk.ArrowAccessible; private import atk.ImageIF; private import atk.ImageT; private import gtk.WidgetAccessible; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** */ public class ArrowAccessible : WidgetAccessible, ImageIF { /** the main Gtk struct */ protected GtkArrowAccessible* gtkArrowAccessible; /** Get the main Gtk struct */ public GtkArrowAccessible* getArrowAccessibleStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkArrowAccessible; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkArrowAccessible; } protected override void setStruct(GObject* obj) { gtkArrowAccessible = cast(GtkArrowAccessible*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkArrowAccessible* gtkArrowAccessible, bool ownedRef = false) { this.gtkArrowAccessible = gtkArrowAccessible; super(cast(GtkWidgetAccessible*)gtkArrowAccessible, ownedRef); } // add the Image capabilities mixin ImageT!(GtkArrowAccessible); /** */ public static GType getType() { return gtk_arrow_accessible_get_type(); } } GtkD-3.7.5/generated/gtkd/gtk/AspectFrame.d000066400000000000000000000103511324604450400203740ustar00rootroot00000000000000/* * 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 gtk.AspectFrame; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gtk.Frame; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * The #GtkAspectFrame is useful when you want * pack a widget so that it can resize but always retains * the same aspect ratio. For instance, one might be * drawing a small preview of a larger image. #GtkAspectFrame * derives from #GtkFrame, so it can draw a label and * a frame around the child. The frame will be * “shrink-wrapped” to the size of the child. * * # CSS nodes * * GtkAspectFrame uses a CSS node with name frame. */ public class AspectFrame : Frame { /** the main Gtk struct */ protected GtkAspectFrame* gtkAspectFrame; /** Get the main Gtk struct */ public GtkAspectFrame* getAspectFrameStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAspectFrame; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAspectFrame; } protected override void setStruct(GObject* obj) { gtkAspectFrame = cast(GtkAspectFrame*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAspectFrame* gtkAspectFrame, bool ownedRef = false) { this.gtkAspectFrame = gtkAspectFrame; super(cast(GtkFrame*)gtkAspectFrame, ownedRef); } /** */ public static GType getType() { return gtk_aspect_frame_get_type(); } /** * Create a new #GtkAspectFrame. * * Params: * label = Label text. * xalign = Horizontal alignment of the child within the allocation of * the #GtkAspectFrame. This ranges from 0.0 (left aligned) * to 1.0 (right aligned) * yalign = Vertical alignment of the child within the allocation of * the #GtkAspectFrame. This ranges from 0.0 (top aligned) * to 1.0 (bottom aligned) * ratio = The desired aspect ratio. * obeyChild = If %TRUE, @ratio is ignored, and the aspect * ratio is taken from the requistion of the child. * * Returns: the new #GtkAspectFrame. * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string label, float xalign, float yalign, float ratio, bool obeyChild) { auto p = gtk_aspect_frame_new(Str.toStringz(label), xalign, yalign, ratio, obeyChild); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAspectFrame*) p); } /** * Set parameters for an existing #GtkAspectFrame. * * Params: * xalign = Horizontal alignment of the child within the allocation of * the #GtkAspectFrame. This ranges from 0.0 (left aligned) * to 1.0 (right aligned) * yalign = Vertical alignment of the child within the allocation of * the #GtkAspectFrame. This ranges from 0.0 (top aligned) * to 1.0 (bottom aligned) * ratio = The desired aspect ratio. * obeyChild = If %TRUE, @ratio is ignored, and the aspect * ratio is taken from the requistion of the child. */ public void set(float xalign, float yalign, float ratio, bool obeyChild) { gtk_aspect_frame_set(gtkAspectFrame, xalign, yalign, ratio, obeyChild); } } GtkD-3.7.5/generated/gtkd/gtk/Assistant.d000066400000000000000000000531241324604450400201600ustar00rootroot00000000000000/* * 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 gtk.Assistant; private import gdkpixbuf.Pixbuf; private import glib.ConstructionException; private import glib.Str; private import gobject.ObjectG; private import gobject.Signals; private import gtk.Widget; private import gtk.Window; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import std.algorithm; /** * A #GtkAssistant is a widget used to represent a generally complex * operation splitted in several steps, guiding the user through its * pages and controlling the page flow to collect the necessary data. * * The design of GtkAssistant is that it controls what buttons to show * and to make sensitive, based on what it knows about the page sequence * and the [type][GtkAssistantPageType] of each page, * in addition to state information like the page * [completion][gtk-assistant-set-page-complete] * and [committed][gtk-assistant-commit] status. * * If you have a case that doesn’t quite fit in #GtkAssistants way of * handling buttons, you can use the #GTK_ASSISTANT_PAGE_CUSTOM page * type and handle buttons yourself. * * # GtkAssistant as GtkBuildable * * The GtkAssistant implementation of the #GtkBuildable interface * exposes the @action_area as internal children with the name * “action_area”. * * To add pages to an assistant in #GtkBuilder, simply add it as a * child to the GtkAssistant object, and set its child properties * as necessary. * * # CSS nodes * * GtkAssistant has a single CSS node with the name assistant. */ public class Assistant : Window { /** the main Gtk struct */ protected GtkAssistant* gtkAssistant; /** Get the main Gtk struct */ public GtkAssistant* getAssistantStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkAssistant; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkAssistant; } protected override void setStruct(GObject* obj) { gtkAssistant = cast(GtkAssistant*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkAssistant* gtkAssistant, bool ownedRef = false) { this.gtkAssistant = gtkAssistant; super(cast(GtkWindow*)gtkAssistant, ownedRef); } /** */ public static GType getType() { return gtk_assistant_get_type(); } /** * Creates a new #GtkAssistant. * * Returns: a newly created #GtkAssistant * * Since: 2.10 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gtk_assistant_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkAssistant*) p); } /** * Adds a widget to the action area of a #GtkAssistant. * * Params: * child = a #GtkWidget * * Since: 2.10 */ public void addActionWidget(Widget child) { gtk_assistant_add_action_widget(gtkAssistant, (child is null) ? null : child.getWidgetStruct()); } /** * Appends a page to the @assistant. * * Params: * page = a #GtkWidget * * Returns: the index (starting at 0) of the inserted page * * Since: 2.10 */ public int appendPage(Widget page) { return gtk_assistant_append_page(gtkAssistant, (page is null) ? null : page.getWidgetStruct()); } /** * Erases the visited page history so the back button is not * shown on the current page, and removes the cancel button * from subsequent pages. * * Use this when the information provided up to the current * page is hereafter deemed permanent and cannot be modified * or undone. For example, showing a progress page to track * a long-running, unreversible operation after the user has * clicked apply on a confirmation page. * * Since: 2.22 */ public void commit() { gtk_assistant_commit(gtkAssistant); } /** * Returns the page number of the current page. * * Returns: The index (starting from 0) of the current * page in the @assistant, or -1 if the @assistant has no pages, * or no current page. * * Since: 2.10 */ public int getCurrentPage() { return gtk_assistant_get_current_page(gtkAssistant); } /** * Returns the number of pages in the @assistant * * Returns: the number of pages in the @assistant * * Since: 2.10 */ public int getNPages() { return gtk_assistant_get_n_pages(gtkAssistant); } /** * Returns the child widget contained in page number @page_num. * * Params: * pageNum = the index of a page in the @assistant, * or -1 to get the last page * * Returns: the child widget, or %NULL * if @page_num is out of bounds * * Since: 2.10 */ public Widget getNthPage(int pageNum) { auto p = gtk_assistant_get_nth_page(gtkAssistant, pageNum); if(p is null) { return null; } return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); } /** * Gets whether @page is complete. * * Params: * page = a page of @assistant * * Returns: %TRUE if @page is complete. * * Since: 2.10 */ public bool getPageComplete(Widget page) { return gtk_assistant_get_page_complete(gtkAssistant, (page is null) ? null : page.getWidgetStruct()) != 0; } /** * Gets whether page has padding. * * Params: * page = a page of @assistant * * Returns: %TRUE if @page has padding * * Since: 3.18 */ public bool getPageHasPadding(Widget page) { return gtk_assistant_get_page_has_padding(gtkAssistant, (page is null) ? null : page.getWidgetStruct()) != 0; } /** * Gets the header image for @page. * * Deprecated: Since GTK+ 3.2, a header is no longer shown; * add your header decoration to the page content instead. * * Params: * page = a page of @assistant * * Returns: the header image for @page, * or %NULL if there’s no header image for the page * * Since: 2.10 */ public Pixbuf getPageHeaderImage(Widget page) { auto p = gtk_assistant_get_page_header_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); } /** * Gets the side image for @page. * * Deprecated: Since GTK+ 3.2, sidebar images are not * shown anymore. * * Params: * page = a page of @assistant * * Returns: the side image for @page, * or %NULL if there’s no side image for the page * * Since: 2.10 */ public Pixbuf getPageSideImage(Widget page) { auto p = gtk_assistant_get_page_side_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct()); if(p is null) { return null; } return ObjectG.getDObject!(Pixbuf)(cast(GdkPixbuf*) p); } /** * Gets the title for @page. * * Params: * page = a page of @assistant * * Returns: the title for @page * * Since: 2.10 */ public string getPageTitle(Widget page) { return Str.toString(gtk_assistant_get_page_title(gtkAssistant, (page is null) ? null : page.getWidgetStruct())); } /** * Gets the page type of @page. * * Params: * page = a page of @assistant * * Returns: the page type of @page * * Since: 2.10 */ public GtkAssistantPageType getPageType(Widget page) { return gtk_assistant_get_page_type(gtkAssistant, (page is null) ? null : page.getWidgetStruct()); } /** * Inserts a page in the @assistant at a given position. * * Params: * page = a #GtkWidget * position = the index (starting at 0) at which to insert the page, * or -1 to append the page to the @assistant * * Returns: the index (starting from 0) of the inserted page * * Since: 2.10 */ public int insertPage(Widget page, int position) { return gtk_assistant_insert_page(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), position); } /** * Navigate to the next page. * * It is a programming error to call this function when * there is no next page. * * This function is for use when creating pages of the * #GTK_ASSISTANT_PAGE_CUSTOM type. * * Since: 3.0 */ public void nextPage() { gtk_assistant_next_page(gtkAssistant); } /** * Prepends a page to the @assistant. * * Params: * page = a #GtkWidget * * Returns: the index (starting at 0) of the inserted page * * Since: 2.10 */ public int prependPage(Widget page) { return gtk_assistant_prepend_page(gtkAssistant, (page is null) ? null : page.getWidgetStruct()); } /** * Navigate to the previous visited page. * * It is a programming error to call this function when * no previous page is available. * * This function is for use when creating pages of the * #GTK_ASSISTANT_PAGE_CUSTOM type. * * Since: 3.0 */ public void previousPage() { gtk_assistant_previous_page(gtkAssistant); } /** * Removes a widget from the action area of a #GtkAssistant. * * Params: * child = a #GtkWidget * * Since: 2.10 */ public void removeActionWidget(Widget child) { gtk_assistant_remove_action_widget(gtkAssistant, (child is null) ? null : child.getWidgetStruct()); } /** * Removes the @page_num’s page from @assistant. * * Params: * pageNum = the index of a page in the @assistant, * or -1 to remove the last page * * Since: 3.2 */ public void removePage(int pageNum) { gtk_assistant_remove_page(gtkAssistant, pageNum); } /** * Switches the page to @page_num. * * Note that this will only be necessary in custom buttons, * as the @assistant flow can be set with * gtk_assistant_set_forward_page_func(). * * Params: * pageNum = index of the page to switch to, starting from 0. * If negative, the last page will be used. If greater * than the number of pages in the @assistant, nothing * will be done. * * Since: 2.10 */ public void setCurrentPage(int pageNum) { gtk_assistant_set_current_page(gtkAssistant, pageNum); } /** * Sets the page forwarding function to be @page_func. * * This function will be used to determine what will be * the next page when the user presses the forward button. * Setting @page_func to %NULL will make the assistant to * use the default forward function, which just goes to the * next visible page. * * Params: * pageFunc = the #GtkAssistantPageFunc, or %NULL * to use the default one * data = user data for @page_func * destroy = destroy notifier for @data * * Since: 2.10 */ public void setForwardPageFunc(GtkAssistantPageFunc pageFunc, void* data, GDestroyNotify destroy) { gtk_assistant_set_forward_page_func(gtkAssistant, pageFunc, data, destroy); } /** * Sets whether @page contents are complete. * * This will make @assistant update the buttons state * to be able to continue the task. * * Params: * page = a page of @assistant * complete = the completeness status of the page * * Since: 2.10 */ public void setPageComplete(Widget page, bool complete) { gtk_assistant_set_page_complete(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), complete); } /** * Sets whether the assistant is adding padding around * the page. * * Params: * page = a page of @assistant * hasPadding = whether this page has padding * * Since: 3.18 */ public void setPageHasPadding(Widget page, bool hasPadding) { gtk_assistant_set_page_has_padding(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), hasPadding); } /** * Sets a header image for @page. * * Deprecated: Since GTK+ 3.2, a header is no longer shown; * add your header decoration to the page content instead. * * Params: * page = a page of @assistant * pixbuf = the new header image @page * * Since: 2.10 */ public void setPageHeaderImage(Widget page, Pixbuf pixbuf) { gtk_assistant_set_page_header_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), (pixbuf is null) ? null : pixbuf.getPixbufStruct()); } /** * Sets a side image for @page. * * This image used to be displayed in the side area of the assistant * when @page is the current page. * * Deprecated: Since GTK+ 3.2, sidebar images are not * shown anymore. * * Params: * page = a page of @assistant * pixbuf = the new side image @page * * Since: 2.10 */ public void setPageSideImage(Widget page, Pixbuf pixbuf) { gtk_assistant_set_page_side_image(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), (pixbuf is null) ? null : pixbuf.getPixbufStruct()); } /** * Sets a title for @page. * * The title is displayed in the header area of the assistant * when @page is the current page. * * Params: * page = a page of @assistant * title = the new title for @page * * Since: 2.10 */ public void setPageTitle(Widget page, string title) { gtk_assistant_set_page_title(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), Str.toStringz(title)); } /** * Sets the page type for @page. * * The page type determines the page behavior in the @assistant. * * Params: * page = a page of @assistant * type = the new type for @page * * Since: 2.10 */ public void setPageType(Widget page, GtkAssistantPageType type) { gtk_assistant_set_page_type(gtkAssistant, (page is null) ? null : page.getWidgetStruct(), type); } /** * Forces @assistant to recompute the buttons state. * * GTK+ automatically takes care of this in most situations, * e.g. when the user goes to a different page, or when the * visibility or completeness of a page changes. * * One situation where it can be necessary to call this * function is when changing a value on the current page * affects the future page flow of the assistant. * * Since: 2.10 */ public void updateButtonsState() { gtk_assistant_update_buttons_state(gtkAssistant); } protected class OnApplyDelegateWrapper { void delegate(Assistant) dlg; gulong handlerId; this(void delegate(Assistant) dlg) { this.dlg = dlg; onApplyListeners ~= this; } void remove(OnApplyDelegateWrapper source) { foreach(index, wrapper; onApplyListeners) { if (wrapper.handlerId == source.handlerId) { onApplyListeners[index] = null; onApplyListeners = std.algorithm.remove(onApplyListeners, index); break; } } } } OnApplyDelegateWrapper[] onApplyListeners; /** * The ::apply signal is emitted when the apply button is clicked. * * The default behavior of the #GtkAssistant is to switch to the page * after the current page, unless the current page is the last one. * * A handler for the ::apply signal should carry out the actions for * which the wizard has collected data. If the action takes a long time * to complete, you might consider putting a page of type * %GTK_ASSISTANT_PAGE_PROGRESS after the confirmation page and handle * this operation within the #GtkAssistant::prepare signal of the progress * page. * * Since: 2.10 */ gulong addOnApply(void delegate(Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnApplyDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "apply", cast(GCallback)&callBackApply, cast(void*)wrapper, cast(GClosureNotify)&callBackApplyDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackApply(GtkAssistant* assistantStruct, OnApplyDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackApplyDestroy(OnApplyDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnCancelDelegateWrapper { void delegate(Assistant) dlg; gulong handlerId; this(void delegate(Assistant) dlg) { this.dlg = dlg; onCancelListeners ~= this; } void remove(OnCancelDelegateWrapper source) { foreach(index, wrapper; onCancelListeners) { if (wrapper.handlerId == source.handlerId) { onCancelListeners[index] = null; onCancelListeners = std.algorithm.remove(onCancelListeners, index); break; } } } } OnCancelDelegateWrapper[] onCancelListeners; /** * The ::cancel signal is emitted when then the cancel button is clicked. * * Since: 2.10 */ gulong addOnCancel(void delegate(Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnCancelDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "cancel", cast(GCallback)&callBackCancel, cast(void*)wrapper, cast(GClosureNotify)&callBackCancelDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackCancel(GtkAssistant* assistantStruct, OnCancelDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackCancelDestroy(OnCancelDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnCloseDelegateWrapper { void delegate(Assistant) dlg; gulong handlerId; this(void delegate(Assistant) dlg) { this.dlg = dlg; onCloseListeners ~= this; } void remove(OnCloseDelegateWrapper source) { foreach(index, wrapper; onCloseListeners) { if (wrapper.handlerId == source.handlerId) { onCloseListeners[index] = null; onCloseListeners = std.algorithm.remove(onCloseListeners, index); break; } } } } OnCloseDelegateWrapper[] onCloseListeners; /** * The ::close signal is emitted either when the close button of * a summary page is clicked, or when the apply button in the last * page in the flow (of type %GTK_ASSISTANT_PAGE_CONFIRM) is clicked. * * Since: 2.10 */ gulong addOnClose(void delegate(Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnCloseDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "close", cast(GCallback)&callBackClose, cast(void*)wrapper, cast(GClosureNotify)&callBackCloseDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackClose(GtkAssistant* assistantStruct, OnCloseDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackCloseDestroy(OnCloseDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnEscapeDelegateWrapper { void delegate(Assistant) dlg; gulong handlerId; this(void delegate(Assistant) dlg) { this.dlg = dlg; onEscapeListeners ~= this; } void remove(OnEscapeDelegateWrapper source) { foreach(index, wrapper; onEscapeListeners) { if (wrapper.handlerId == source.handlerId) { onEscapeListeners[index] = null; onEscapeListeners = std.algorithm.remove(onEscapeListeners, index); break; } } } } OnEscapeDelegateWrapper[] onEscapeListeners; /** */ gulong addOnEscape(void delegate(Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnEscapeDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "escape", cast(GCallback)&callBackEscape, cast(void*)wrapper, cast(GClosureNotify)&callBackEscapeDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackEscape(GtkAssistant* assistantStruct, OnEscapeDelegateWrapper wrapper) { wrapper.dlg(wrapper.outer); } extern(C) static void callBackEscapeDestroy(OnEscapeDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } protected class OnPrepareDelegateWrapper { void delegate(Widget, Assistant) dlg; gulong handlerId; this(void delegate(Widget, Assistant) dlg) { this.dlg = dlg; onPrepareListeners ~= this; } void remove(OnPrepareDelegateWrapper source) { foreach(index, wrapper; onPrepareListeners) { if (wrapper.handlerId == source.handlerId) { onPrepareListeners[index] = null; onPrepareListeners = std.algorithm.remove(onPrepareListeners, index); break; } } } } OnPrepareDelegateWrapper[] onPrepareListeners; /** * The ::prepare signal is emitted when a new page is set as the * assistant's current page, before making the new page visible. * * A handler for this signal can do any preparations which are * necessary before showing @page. * * Params: * page = the current page * * Since: 2.10 */ gulong addOnPrepare(void delegate(Widget, Assistant) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) { auto wrapper = new OnPrepareDelegateWrapper(dlg); wrapper.handlerId = Signals.connectData( this, "prepare", cast(GCallback)&callBackPrepare, cast(void*)wrapper, cast(GClosureNotify)&callBackPrepareDestroy, connectFlags); return wrapper.handlerId; } extern(C) static void callBackPrepare(GtkAssistant* assistantStruct, GtkWidget* page, OnPrepareDelegateWrapper wrapper) { wrapper.dlg(ObjectG.getDObject!(Widget)(page), wrapper.outer); } extern(C) static void callBackPrepareDestroy(OnPrepareDelegateWrapper wrapper, GClosure* closure) { wrapper.remove(wrapper); } } GtkD-3.7.5/generated/gtkd/gtk/Bin.d000066400000000000000000000052131324604450400167130ustar00rootroot00000000000000/* * 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 gtk.Bin; private import gobject.ObjectG; private import gtk.Container; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * The #GtkBin widget is a container with just one child. * It is not very useful itself, but it is useful for deriving subclasses, * since it provides common code needed for handling a single child widget. * * Many GTK+ widgets are subclasses of #GtkBin, including #GtkWindow, * #GtkButton, #GtkFrame, #GtkHandleBox or #GtkScrolledWindow. */ public class Bin : Container { /** the main Gtk struct */ protected GtkBin* gtkBin; /** Get the main Gtk struct */ public GtkBin* getBinStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkBin; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkBin; } protected override void setStruct(GObject* obj) { gtkBin = cast(GtkBin*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkBin* gtkBin, bool ownedRef = false) { this.gtkBin = gtkBin; super(cast(GtkContainer*)gtkBin, ownedRef); } /** */ public static GType getType() { return gtk_bin_get_type(); } /** * Gets the child of the #GtkBin, or %NULL if the bin contains * no child widget. The returned widget does not have a reference * added, so you do not need to unref it. * * Returns: the child of @bin, or %NULL if it does * not have a child. */ public Widget getChild() { auto p = gtk_bin_get_child(gtkBin); if(p is null) { return null; } return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); } } GtkD-3.7.5/generated/gtkd/gtk/BindingEntry.d000066400000000000000000000077141324604450400206070ustar00rootroot00000000000000/* * 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 gtk.BindingEntry; private import glib.ListSG; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; private import gtk.BindingSet; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import gtkd.Loader; /** * Each key binding element of a binding sets binding list is * represented by a GtkBindingEntry. */ public struct BindingEntry { /** * Parses a signal description from @signal_desc and incorporates * it into @binding_set. * * Signal descriptions may either bind a key combination to * one or more signals: * |[ * bind "key" { * "signalname" (param, ...) * ... * } * ]| * * Or they may also unbind a key combination: * |[ * unbind "key" * ]| * * Key combinations must be in a format that can be parsed by * gtk_accelerator_parse(). * * Params: * bindingSet = a #GtkBindingSet * signalDesc = a signal description * * Returns: %G_TOKEN_NONE if the signal was successfully parsed and added, * the expected token otherwise * * Since: 3.0 */ public static GTokenType addSignalFromString(BindingSet bindingSet, string signalDesc) { return gtk_binding_entry_add_signal_from_string((bindingSet is null) ? null : bindingSet.getBindingSetStruct(), Str.toStringz(signalDesc)); } /** * Override or install a new key binding for @keyval with @modifiers on * @binding_set. * * Params: * bindingSet = a #GtkBindingSet to add a signal to * keyval = key value * modifiers = key modifier * signalName = signal name to be bound * bindingArgs = list of #GtkBindingArg signal arguments */ public static void addSignall(BindingSet bindingSet, uint keyval, GdkModifierType modifiers, string signalName, ListSG bindingArgs) { gtk_binding_entry_add_signall((bindingSet is null) ? null : bindingSet.getBindingSetStruct(), keyval, modifiers, Str.toStringz(signalName), (bindingArgs is null) ? null : bindingArgs.getListSGStruct()); } /** * Remove a binding previously installed via * gtk_binding_entry_add_signal() on @binding_set. * * Params: * bindingSet = a #GtkBindingSet to remove an entry of * keyval = key value of binding to remove * modifiers = key modifier of binding to remove */ public static void remove(BindingSet bindingSet, uint keyval, GdkModifierType modifiers) { gtk_binding_entry_remove((bindingSet is null) ? null : bindingSet.getBindingSetStruct(), keyval, modifiers); } /** * Install a binding on @binding_set which causes key lookups * to be aborted, to prevent bindings from lower priority sets * to be activated. * * Params: * bindingSet = a #GtkBindingSet to skip an entry of * keyval = key value of binding to skip * modifiers = key modifier of binding to skip * * Since: 2.12 */ public static void skip(BindingSet bindingSet, uint keyval, GdkModifierType modifiers) { gtk_binding_entry_skip((bindingSet is null) ? null : bindingSet.getBindingSetStruct(), keyval, modifiers); } } GtkD-3.7.5/generated/gtkd/gtk/BindingSet.d000066400000000000000000000175761324604450400202500ustar00rootroot00000000000000/* * 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 gtk.BindingSet; private import glib.ConstructionException; private import glib.ListSG; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import gtkd.Loader; /** * A binding set maintains a list of activatable key bindings. * A single binding set can match multiple types of widgets. * Similar to style contexts, can be matched by any information contained * in a widgets #GtkWidgetPath. When a binding within a set is matched upon * activation, an action signal is emitted on the target widget to carry out * the actual activation. */ public final class BindingSet { /** the main Gtk struct */ protected GtkBindingSet* gtkBindingSet; protected bool ownedRef; /** Get the main Gtk struct */ public GtkBindingSet* getBindingSetStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkBindingSet; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gtkBindingSet; } /** * Sets our main struct and passes it to the parent class. */ public this (GtkBindingSet* gtkBindingSet, bool ownedRef = false) { this.gtkBindingSet = gtkBindingSet; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GTK) && ownedRef ) g_free(gtkBindingSet); } /** * unique name of this binding set */ public @property string setName() { return Str.toString(gtkBindingSet.setName); } /** Ditto */ public @property void setName(string value) { gtkBindingSet.setName = Str.toStringz(value); } /** * unused */ public @property int priority() { return gtkBindingSet.priority; } /** Ditto */ public @property void priority(int value) { gtkBindingSet.priority = value; } /** * unused */ public @property ListSG widgetPathPspecs() { return new ListSG(gtkBindingSet.widgetPathPspecs, false); } /** Ditto */ public @property void widgetPathPspecs(ListSG value) { gtkBindingSet.widgetPathPspecs = value.getListSGStruct(); } /** * unused */ public @property ListSG widgetClassPspecs() { return new ListSG(gtkBindingSet.widgetClassPspecs, false); } /** Ditto */ public @property void widgetClassPspecs(ListSG value) { gtkBindingSet.widgetClassPspecs = value.getListSGStruct(); } /** * unused */ public @property ListSG classBranchPspecs() { return new ListSG(gtkBindingSet.classBranchPspecs, false); } /** Ditto */ public @property void classBranchPspecs(ListSG value) { gtkBindingSet.classBranchPspecs = value.getListSGStruct(); } /** * the key binding entries in this binding set */ public @property GtkBindingEntry* entries() { return gtkBindingSet.entries; } /** Ditto */ public @property void entries(GtkBindingEntry* value) { gtkBindingSet.entries = value; } /** * implementation detail */ public @property GtkBindingEntry* current() { return gtkBindingSet.current; } /** Ditto */ public @property void current(GtkBindingEntry* value) { gtkBindingSet.current = value; } /** * whether this binding set stems from a CSS file and is reset upon theme changes */ public @property uint parsed() { return gtkBindingSet.parsed; } /** Ditto */ public @property void parsed(uint value) { gtkBindingSet.parsed = value; } /** * Find a key binding matching @keyval and @modifiers within * @binding_set and activate the binding on @object. * * Params: * keyval = key value of the binding * modifiers = key modifier of the binding * object = object to activate when binding found * * Returns: %TRUE if a binding was found and activated */ public bool activate(uint keyval, GdkModifierType modifiers, ObjectG object) { return gtk_binding_set_activate(gtkBindingSet, keyval, modifiers, (object is null) ? null : object.getObjectGStruct()) != 0; } /** * This function was used internally by the GtkRC parsing mechanism * to assign match patterns to #GtkBindingSet structures. * * In GTK+ 3, these match patterns are unused. * * Params: * pathType = path type the pattern applies to * pathPattern = the actual match pattern * priority = binding priority */ public void addPath(GtkPathType pathType, string pathPattern, GtkPathPriorityType priority) { gtk_binding_set_add_path(gtkBindingSet, pathType, Str.toStringz(pathPattern), priority); } /** * This function returns the binding set named after the type name of * the passed in class structure. New binding sets are created on * demand by this function. * * Params: * objectClass = a valid #GObject class * * Returns: the binding set corresponding to * @object_class */ public static BindingSet byClass(void* objectClass) { auto p = gtk_binding_set_by_class(objectClass); if(p is null) { return null; } return ObjectG.getDObject!(BindingSet)(cast(GtkBindingSet*) p); } /** * Find a binding set by its globally unique name. * * The @set_name can either be a name used for gtk_binding_set_new() * or the type name of a class used in gtk_binding_set_by_class(). * * Params: * setName = unique binding set name * * Returns: %NULL or the specified binding set */ public static BindingSet find(string setName) { auto p = gtk_binding_set_find(Str.toStringz(setName)); if(p is null) { return null; } return ObjectG.getDObject!(BindingSet)(cast(GtkBindingSet*) p); } /** * GTK+ maintains a global list of binding sets. Each binding set has * a unique name which needs to be specified upon creation. * * Params: * setName = unique name of this binding set * * Returns: new binding set * * Throws: ConstructionException GTK+ fails to create the object. */ public this(string setName) { auto p = gtk_binding_set_new(Str.toStringz(setName)); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkBindingSet*) p); } /** * Find a key binding matching @keyval and @modifiers and activate the * binding on @object. * * Params: * object = object to activate when binding found * keyval = key value of the binding * modifiers = key modifier of the binding * * Returns: %TRUE if a binding was found and activated */ public static bool bindingsActivate(ObjectG object, uint keyval, GdkModifierType modifiers) { return gtk_bindings_activate((object is null) ? null : object.getObjectGStruct(), keyval, modifiers) != 0; } /** * Looks up key bindings for @object to find one matching * @event, and if one was found, activate it. * * Params: * object = a #GObject (generally must be a widget) * event = a #GdkEventKey * * Returns: %TRUE if a matching key binding was found * * Since: 2.4 */ public static bool bindingsActivateEvent(ObjectG object, GdkEventKey* event) { return gtk_bindings_activate_event((object is null) ? null : object.getObjectGStruct(), event) != 0; } } GtkD-3.7.5/generated/gtkd/gtk/BooleanCellAccessible.d000066400000000000000000000042111324604450400223350ustar00rootroot00000000000000/* * 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 gtk.BooleanCellAccessible; private import gtk.RendererCellAccessible; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** */ public class BooleanCellAccessible : RendererCellAccessible { /** the main Gtk struct */ protected GtkBooleanCellAccessible* gtkBooleanCellAccessible; /** Get the main Gtk struct */ public GtkBooleanCellAccessible* getBooleanCellAccessibleStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkBooleanCellAccessible; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkBooleanCellAccessible; } protected override void setStruct(GObject* obj) { gtkBooleanCellAccessible = cast(GtkBooleanCellAccessible*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkBooleanCellAccessible* gtkBooleanCellAccessible, bool ownedRef = false) { this.gtkBooleanCellAccessible = gtkBooleanCellAccessible; super(cast(GtkRendererCellAccessible*)gtkBooleanCellAccessible, ownedRef); } /** */ public static GType getType() { return gtk_boolean_cell_accessible_get_type(); } } GtkD-3.7.5/generated/gtkd/gtk/Border.d000066400000000000000000000071431324604450400174240ustar00rootroot00000000000000/* * 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 gtk.Border; private import glib.ConstructionException; private import glib.c.functions; private import gobject.ObjectG; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import gtkd.Loader; /** * A struct that specifies a border around a rectangular area * that can be of different width on each side. */ public final class Border { /** the main Gtk struct */ protected GtkBorder* gtkBorder; protected bool ownedRef; /** Get the main Gtk struct */ public GtkBorder* getBorderStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkBorder; } /** the main Gtk struct as a void* */ protected void* getStruct() { return cast(void*)gtkBorder; } /** * Sets our main struct and passes it to the parent class. */ public this (GtkBorder* gtkBorder, bool ownedRef = false) { this.gtkBorder = gtkBorder; this.ownedRef = ownedRef; } ~this () { if ( Linker.isLoaded(LIBRARY_GTK) && ownedRef ) gtk_border_free(gtkBorder); } /** * The width of the left border */ public @property short left() { return gtkBorder.left; } /** Ditto */ public @property void left(short value) { gtkBorder.left = value; } /** * The width of the right border */ public @property short right() { return gtkBorder.right; } /** Ditto */ public @property void right(short value) { gtkBorder.right = value; } /** * The width of the top border */ public @property short top() { return gtkBorder.top; } /** Ditto */ public @property void top(short value) { gtkBorder.top = value; } /** * The width of the bottom border */ public @property short bottom() { return gtkBorder.bottom; } /** Ditto */ public @property void bottom(short value) { gtkBorder.bottom = value; } /** */ public static GType getType() { return gtk_border_get_type(); } /** * Allocates a new #GtkBorder-struct and initializes its elements to zero. * * Returns: a newly allocated #GtkBorder-struct. * Free with gtk_border_free() * * Since: 2.14 * * Throws: ConstructionException GTK+ fails to create the object. */ public this() { auto p = gtk_border_new(); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkBorder*) p); } /** * Copies a #GtkBorder-struct. * * Returns: a copy of @border_. */ public Border copy() { auto p = gtk_border_copy(gtkBorder); if(p is null) { return null; } return ObjectG.getDObject!(Border)(cast(GtkBorder*) p, true); } /** * Frees a #GtkBorder-struct. */ public void free() { gtk_border_free(gtkBorder); ownedRef = false; } } GtkD-3.7.5/generated/gtkd/gtk/Box.d000066400000000000000000000305301324604450400167330ustar00rootroot00000000000000/* * 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 gtk.Box; private import glib.ConstructionException; private import gobject.ObjectG; private import gtk.Container; private import gtk.OrientableIF; private import gtk.OrientableT; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * The GtkBox widget organizes child widgets into a rectangular area. * * The rectangular area of a GtkBox is organized into either a single row * or a single column of child widgets depending upon the orientation. * Thus, all children of a GtkBox are allocated one dimension in common, * which is the height of a row, or the width of a column. * * GtkBox uses a notion of packing. Packing refers * to adding widgets with reference to a particular position in a * #GtkContainer. For a GtkBox, there are two reference positions: the * start and the end of the box. * For a vertical #GtkBox, the start is defined as the top of the box and * the end is defined as the bottom. For a horizontal #GtkBox the start * is defined as the left side and the end is defined as the right side. * * Use repeated calls to gtk_box_pack_start() to pack widgets into a * GtkBox from start to end. Use gtk_box_pack_end() to add widgets from * end to start. You may intersperse these calls and add widgets from * both ends of the same GtkBox. * * Because GtkBox is a #GtkContainer, you may also use gtk_container_add() * to insert widgets into the box, and they will be packed with the default * values for expand and fill child properties. Use gtk_container_remove() * to remove widgets from the GtkBox. * * Use gtk_box_set_homogeneous() to specify whether or not all children * of the GtkBox are forced to get the same amount of space. * * Use gtk_box_set_spacing() to determine how much space will be * minimally placed between all children in the GtkBox. Note that * spacing is added between the children, while * padding added by gtk_box_pack_start() or gtk_box_pack_end() is added * on either side of the widget it belongs to. * * Use gtk_box_reorder_child() to move a GtkBox child to a different * place in the box. * * Use gtk_box_set_child_packing() to reset the expand, * fill and padding child properties. * Use gtk_box_query_child_packing() to query these fields. * * Note that a single-row or single-column #GtkGrid provides exactly * the same functionality as #GtkBox. * * # CSS nodes * * GtkBox uses a single CSS node with name box. * * In horizontal orientation, the nodes of the children are always arranged * from left to right. So :first-child will always select the leftmost child, * regardless of text direction. */ public class Box : Container, OrientableIF { /** the main Gtk struct */ protected GtkBox* gtkBox; /** Get the main Gtk struct */ public GtkBox* getBoxStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return gtkBox; } /** the main Gtk struct as a void* */ protected override void* getStruct() { return cast(void*)gtkBox; } protected override void setStruct(GObject* obj) { gtkBox = cast(GtkBox*)obj; super.setStruct(obj); } /** * Sets our main struct and passes it to the parent class. */ public this (GtkBox* gtkBox, bool ownedRef = false) { this.gtkBox = gtkBox; super(cast(GtkContainer*)gtkBox, ownedRef); } // add the Orientable capabilities mixin OrientableT!(GtkBox); /** */ public static GType getType() { return gtk_box_get_type(); } /** * Creates a new #GtkBox. * * Params: * orientation = the box’s orientation. * spacing = the number of pixels to place by default between children. * * Returns: a new #GtkBox. * * Since: 3.0 * * Throws: ConstructionException GTK+ fails to create the object. */ public this(GtkOrientation orientation, int spacing) { auto p = gtk_box_new(orientation, spacing); if(p is null) { throw new ConstructionException("null returned by new"); } this(cast(GtkBox*) p); } /** * Gets the value set by gtk_box_set_baseline_position(). * * Returns: the baseline position * * Since: 3.10 */ public GtkBaselinePosition getBaselinePosition() { return gtk_box_get_baseline_position(gtkBox); } /** * Retrieves the center widget of the box. * * Returns: the center widget * or %NULL in case no center widget is set. * * Since: 3.12 */ public Widget getCenterWidget() { auto p = gtk_box_get_center_widget(gtkBox); if(p is null) { return null; } return ObjectG.getDObject!(Widget)(cast(GtkWidget*) p); } /** * Returns whether the box is homogeneous (all children are the * same size). See gtk_box_set_homogeneous(). * * Returns: %TRUE if the box is homogeneous. */ public bool getHomogeneous() { return gtk_box_get_homogeneous(gtkBox) != 0; } /** * Gets the value set by gtk_box_set_spacing(). * * Returns: spacing between children */ public int getSpacing() { return gtk_box_get_spacing(gtkBox); } /** * Adds @child to @box, packed with reference to the end of @box. * The @child is packed after (away from end of) any other child * packed with reference to the end of @box. * * Params: * child = the #GtkWidget to be added to @box * expand = %TRUE if the new child is to be given extra space allocated * to @box. The extra space will be divided evenly between all children * of @box that use this option * fill = %TRUE if space given to @child by the @expand option is * actually allocated to @child, rather than just padding it. This * parameter has no effect if @expand is set to %FALSE. A child is * always allocated the full height of a horizontal #GtkBox and the full width * of a vertical #GtkBox. This option affects the other dimension * padding = extra space in pixels to put between this child and its * neighbors, over and above the global amount specified by * #GtkBox:spacing property. If @child is a widget at one of the * reference ends of @box, then @padding pixels are also put between * @child and the reference edge of @box */ public void packEnd(Widget child, bool expand, bool fill, uint padding) { gtk_box_pack_end(gtkBox, (child is null) ? null : child.getWidgetStruct(), expand, fill, padding); } /** * Adds @child to @box, packed with reference to the start of @box. * The @child is packed after any other child packed with reference * to the start of @box. * * Params: * child = the #GtkWidget to be added to @box * expand = %TRUE if the new child is to be given extra space allocated * to @box. The extra space will be divided evenly between all children * that use this option * fill = %TRUE if space given to @child by the @expand option is * actually allocated to @child, rather than just padding it. This * parameter has no effect if @expand is set to %FALSE. A child is * always allocated the full height of a horizontal #GtkBox and the full width * of a vertical #GtkBox. This option affects the other dimension * padding = extra space in pixels to put between this child and its * neighbors, over and above the global amount specified by * #GtkBox:spacing property. If @child is a widget at one of the * reference ends of @box, then @padding pixels are also put between * @child and the reference edge of @box */ public void packStart(Widget child, bool expand, bool fill, uint padding) { gtk_box_pack_start(gtkBox, (child is null) ? null : child.getWidgetStruct(), expand, fill, padding); } /** * Obtains information about how @child is packed into @box. * * Params: * child = the #GtkWidget of the child to query * expand = pointer to return location for expand child * property * fill = pointer to return location for fill child * property * padding = pointer to return location for padding * child property * packType = pointer to return location for pack-type * child property */ public void queryChildPacking(Widget child, out bool expand, out bool fill, out uint padding, out GtkPackType packType) { int outexpand; int outfill; gtk_box_query_child_packing(gtkBox, (child is null) ? null : child.getWidgetStruct(), &outexpand, &outfill, &padding, &packType); expand = (outexpand == 1); fill = (outfill == 1); } /** * Moves @child to a new @position in the list of @box children. * The list contains widgets packed #GTK_PACK_START * as well as widgets packed #GTK_PACK_END, in the order that these * widgets were added to @box. * * A widget’s position in the @box children list determines where * the widget is packed into @box. A child widget at some position * in the list will be packed just after all other widgets of the * same packing type that appear earlier in the list. * * Params: * child = the #GtkWidget to move * position = the new position for @child in the list of children * of @box, starting from 0. If negative, indicates the end of * the list */ public void reorderChild(Widget child, int position) { gtk_box_reorder_child(gtkBox, (child is null) ? null : child.getWidgetStruct(), position); } /** * Sets the baseline position of a box. This affects * only horizontal boxes with at least one baseline aligned * child. If there is more vertical space available than requested, * and the baseline is not allocated by the parent then * @position is used to allocate the baseline wrt the * extra space available. * * Params: * position = a #GtkBaselinePosition * * Since: 3.10 */ public void setBaselinePosition(GtkBaselinePosition position) { gtk_box_set_baseline_position(gtkBox, position); } /** * Sets a center widget; that is a child widget that will be * centered with respect to the full width of the box, even * if the children at either side take up different amounts * of space. * * Params: * widget = the widget to center * * Since: 3.12 */ public void setCenterWidget(Widget widget) { gtk_box_set_center_widget(gtkBox, (widget is null) ? null : widget.getWidgetStruct()); } /** * Sets the way @child is packed into @box. * * Params: * child = the #GtkWidget of the child to set * expand = the new value of the expand child property * fill = the new value of the fill child property * padding = the new value of the padding child property * packType = the new value of the pack-type child property */ public void setChildPacking(Widget child, bool expand, bool fill, uint padding, GtkPackType packType) { gtk_box_set_child_packing(gtkBox, (child is null) ? null : child.getWidgetStruct(), expand, fill, padding, packType); } /** * Sets the #GtkBox:homogeneous property of @box, controlling * whether or not all children of @box are given equal space * in the box. * * Params: * homogeneous = a boolean value, %TRUE to create equal allotments, * %FALSE for variable allotments */ public void setHomogeneous(bool homogeneous) { gtk_box_set_homogeneous(gtkBox, homogeneous); } /** * Sets the #GtkBox:spacing property of @box, which is the * number of pixels to place between children of @box. * * Params: * spacing = the number of pixels to put between children */ public void setSpacing(int spacing) { gtk_box_set_spacing(gtkBox, spacing); } } GtkD-3.7.5/generated/gtkd/gtk/BuildableIF.d000066400000000000000000000133171324604450400203110ustar00rootroot00000000000000/* * 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 gtk.BuildableIF; private import glib.Str; private import gobject.ObjectG; private import gobject.Value; private import gtk.Builder; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * GtkBuildable allows objects to extend and customize their deserialization * from [GtkBuilder UI descriptions][BUILDER-UI]. * The interface includes methods for setting names and properties of objects, * parsing custom tags and constructing child objects. * * The GtkBuildable interface is implemented by all widgets and * many of the non-widget objects that are provided by GTK+. The * main user of this interface is #GtkBuilder. There should be * very little need for applications to call any of these functions directly. * * An object only needs to implement this interface if it needs to extend the * #GtkBuilder format or run any extra routines at deserialization time. */ public interface BuildableIF{ /** Get the main Gtk struct */ public GtkBuildable* getBuildableStruct(bool transferOwnership = false); /** the main Gtk struct as a void* */ protected void* getStruct(); /** */ public static GType getType() { return gtk_buildable_get_type(); } /** * Adds a child to @buildable. @type is an optional string * describing how the child should be added. * * Params: * builder = a #GtkBuilder * child = child to add * type = kind of child or %NULL * * Since: 2.12 */ public void addChild(Builder builder, ObjectG child, string type); /** * Constructs a child of @buildable with the name @name. * * #GtkBuilder calls this function if a “constructor” has been * specified in the UI definition. * * Params: * builder = #GtkBuilder used to construct this object * name = name of child to construct * * Returns: the constructed child * * Since: 2.12 */ public ObjectG constructChild(Builder builder, string name); /** * This is similar to gtk_buildable_parser_finished() but is * called once for each custom tag handled by the @buildable. * * Params: * builder = a #GtkBuilder * child = child object or %NULL for non-child tags * tagname = the name of the tag * data = user data created in custom_tag_start * * Since: 2.12 */ public void customFinished(Builder builder, ObjectG child, string tagname, void* data); /** * This is called at the end of each custom element handled by * the buildable. * * Params: * builder = #GtkBuilder used to construct this object * child = child object or %NULL for non-child tags * tagname = name of tag * data = user data that will be passed in to parser functions * * Since: 2.12 */ public void customTagEnd(Builder builder, ObjectG child, string tagname, void** data); /** * This is called for each unknown element under . * * Params: * builder = a #GtkBuilder used to construct this object * child = child object or %NULL for non-child tags * tagname = name of tag * parser = a #GMarkupParser to fill in * data = return location for user data that will be passed in * to parser functions * * Returns: %TRUE if a object has a custom implementation, %FALSE * if it doesn't. * * Since: 2.12 */ public bool customTagStart(Builder builder, ObjectG child, string tagname, out GMarkupParser parser, out void* data); /** * Get the internal child called @childname of the @buildable object. * * Params: * builder = a #GtkBuilder * childname = name of child * * Returns: the internal child of the buildable object * * Since: 2.12 */ public ObjectG getInternalChild(Builder builder, string childname); /** * Gets the name of the @buildable object. * * #GtkBuilder sets the name based on the * [GtkBuilder UI definition][BUILDER-UI] * used to construct the @buildable. * * Returns: the name set with gtk_buildable_set_name() * * Since: 2.12 */ public string buildableGetName(); /** * Called when the builder finishes the parsing of a * [GtkBuilder UI definition][BUILDER-UI]. * Note that this will be called once for each time * gtk_builder_add_from_file() or gtk_builder_add_from_string() * is called on a builder. * * Params: * builder = a #GtkBuilder * * Since: 2.12 */ public void parserFinished(Builder builder); /** * Sets the property name @name to @value on the @buildable object. * * Params: * builder = a #GtkBuilder * name = name of property * value = value of property * * Since: 2.12 */ public void setBuildableProperty(Builder builder, string name, Value value); /** * Sets the name of the @buildable object. * * Params: * name = name to set * * Since: 2.12 */ public void buildableSetName(string name); } GtkD-3.7.5/generated/gtkd/gtk/BuildableT.d000066400000000000000000000165571324604450400202270ustar00rootroot00000000000000/* * 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 gtk.BuildableT; public import glib.Str; public import gobject.ObjectG; public import gobject.Value; public import gtk.Builder; public import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; /** * GtkBuildable allows objects to extend and customize their deserialization * from [GtkBuilder UI descriptions][BUILDER-UI]. * The interface includes methods for setting names and properties of objects, * parsing custom tags and constructing child objects. * * The GtkBuildable interface is implemented by all widgets and * many of the non-widget objects that are provided by GTK+. The * main user of this interface is #GtkBuilder. There should be * very little need for applications to call any of these functions directly. * * An object only needs to implement this interface if it needs to extend the * #GtkBuilder format or run any extra routines at deserialization time. */ public template BuildableT(TStruct) { /** Get the main Gtk struct */ public GtkBuildable* getBuildableStruct(bool transferOwnership = false) { if (transferOwnership) ownedRef = false; return cast(GtkBuildable*)getStruct(); } /** * Adds a child to @buildable. @type is an optional string * describing how the child should be added. * * Params: * builder = a #GtkBuilder * child = child to add * type = kind of child or %NULL * * Since: 2.12 */ public void addChild(Builder builder, ObjectG child, string type) { gtk_buildable_add_child(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), (child is null) ? null : child.getObjectGStruct(), Str.toStringz(type)); } /** * Constructs a child of @buildable with the name @name. * * #GtkBuilder calls this function if a “constructor” has been * specified in the UI definition. * * Params: * builder = #GtkBuilder used to construct this object * name = name of child to construct * * Returns: the constructed child * * Since: 2.12 */ public ObjectG constructChild(Builder builder, string name) { auto p = gtk_buildable_construct_child(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), Str.toStringz(name)); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p, true); } /** * This is similar to gtk_buildable_parser_finished() but is * called once for each custom tag handled by the @buildable. * * Params: * builder = a #GtkBuilder * child = child object or %NULL for non-child tags * tagname = the name of the tag * data = user data created in custom_tag_start * * Since: 2.12 */ public void customFinished(Builder builder, ObjectG child, string tagname, void* data) { gtk_buildable_custom_finished(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), (child is null) ? null : child.getObjectGStruct(), Str.toStringz(tagname), data); } /** * This is called at the end of each custom element handled by * the buildable. * * Params: * builder = #GtkBuilder used to construct this object * child = child object or %NULL for non-child tags * tagname = name of tag * data = user data that will be passed in to parser functions * * Since: 2.12 */ public void customTagEnd(Builder builder, ObjectG child, string tagname, void** data) { gtk_buildable_custom_tag_end(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), (child is null) ? null : child.getObjectGStruct(), Str.toStringz(tagname), data); } /** * This is called for each unknown element under . * * Params: * builder = a #GtkBuilder used to construct this object * child = child object or %NULL for non-child tags * tagname = name of tag * parser = a #GMarkupParser to fill in * data = return location for user data that will be passed in * to parser functions * * Returns: %TRUE if a object has a custom implementation, %FALSE * if it doesn't. * * Since: 2.12 */ public bool customTagStart(Builder builder, ObjectG child, string tagname, out GMarkupParser parser, out void* data) { return gtk_buildable_custom_tag_start(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), (child is null) ? null : child.getObjectGStruct(), Str.toStringz(tagname), &parser, &data) != 0; } /** * Get the internal child called @childname of the @buildable object. * * Params: * builder = a #GtkBuilder * childname = name of child * * Returns: the internal child of the buildable object * * Since: 2.12 */ public ObjectG getInternalChild(Builder builder, string childname) { auto p = gtk_buildable_get_internal_child(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), Str.toStringz(childname)); if(p is null) { return null; } return ObjectG.getDObject!(ObjectG)(cast(GObject*) p); } /** * Gets the name of the @buildable object. * * #GtkBuilder sets the name based on the * [GtkBuilder UI definition][BUILDER-UI] * used to construct the @buildable. * * Returns: the name set with gtk_buildable_set_name() * * Since: 2.12 */ public string buildableGetName() { return Str.toString(gtk_buildable_get_name(getBuildableStruct())); } /** * Called when the builder finishes the parsing of a * [GtkBuilder UI definition][BUILDER-UI]. * Note that this will be called once for each time * gtk_builder_add_from_file() or gtk_builder_add_from_string() * is called on a builder. * * Params: * builder = a #GtkBuilder * * Since: 2.12 */ public void parserFinished(Builder builder) { gtk_buildable_parser_finished(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct()); } /** * Sets the property name @name to @value on the @buildable object. * * Params: * builder = a #GtkBuilder * name = name of property * value = value of property * * Since: 2.12 */ public void setBuildableProperty(Builder builder, string name, Value value) { gtk_buildable_set_buildable_property(getBuildableStruct(), (builder is null) ? null : builder.getBuilderStruct(), Str.toStringz(name), (value is null) ? null : value.getValueStruct()); } /** * Sets the name of the @buildable object. * * Params: * name = name to set * * Since: 2.12 */ public void buildableSetName(string name) { gtk_buildable_set_name(getBuildableStruct(), Str.toStringz(name)); } } GtkD-3.7.5/generated/gtkd/gtk/Builder.d000066400000000000000000001015251324604450400175740ustar00rootroot00000000000000/* * 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 gtk.Builder; private import glib.ConstructionException; private import glib.ErrorG; private import glib.GException; private import glib.MemorySlice; private import glib.Module; private import glib.Str; private import glib.c.functions; private import gobject.ObjectG; private import gobject.ParamSpec; private import gobject.Type; private import gobject.Value; private import gobject.c.functions; private import gtk.Application; private import gtk.Widget; private import gtk.c.functions; public import gtk.c.types; public import gtkc.gtktypes; private import gtkd.paths; private import std.string; /** * A GtkBuilder is an auxiliary object that reads textual descriptions * of a user interface and instantiates the described objects. To create * a GtkBuilder from a user interface description, call * gtk_builder_new_from_file(), gtk_builder_new_from_resource() or * gtk_builder_new_from_string(). * * In the (unusual) case that you want to add user interface * descriptions from multiple sources to the same GtkBuilder you can * call gtk_builder_new() to get an empty builder and populate it by * (multiple) calls to gtk_builder_add_from_file(), * gtk_builder_add_from_resource() or gtk_builder_add_from_string(). * * A GtkBuilder holds a reference to all objects that it has constructed * and drops these references when it is finalized. This finalization can * cause the destruction of non-widget objects or widgets which are not * contained in a toplevel window. For toplevel windows constructed by a * builder, it is the responsibility of the user to call gtk_widget_destroy() * to get rid of them and all the widgets they contain. * * The functions gtk_builder_get_object() and gtk_builder_get_objects() * can be used to access the widgets in the interface by the names assigned * to them inside the UI description. Toplevel windows returned by these * functions will stay around until the user explicitly destroys them * with gtk_widget_destroy(). Other widgets will either be part of a * larger hierarchy constructed by the builder (in which case you should * not have to worry about their lifecycle), or without a parent, in which * case they have to be added to some container to make use of them. * Non-widget objects need to be reffed with g_object_ref() to keep them * beyond the lifespan of the builder. * * The function gtk_builder_connect_signals() and variants thereof can be * used to connect handlers to the named signals in the description. * * # GtkBuilder UI Definitions # {#BUILDER-UI} * * GtkBuilder parses textual descriptions of user interfaces which are * specified in an XML format which can be roughly described by the * RELAX NG schema below. We refer to these descriptions as “GtkBuilder * UI definitions” or just “UI definitions” if the context is clear. * Do not confuse GtkBuilder UI Definitions with * [GtkUIManager UI Definitions][XML-UI], which are more limited in scope. * It is common to use `.ui` as the filename extension for files containing * GtkBuilder UI definitions. * * [RELAX NG Compact Syntax](https://git.gnome.org/browse/gtk+/tree/gtk/gtkbuilder.rnc) * * The toplevel element is . It optionally takes a “domain” * attribute, which will make the builder look for translated strings * using dgettext() in the domain specified. This can also be done by * calling gtk_builder_set_translation_domain() on the builder. * Objects are described by elements, which can contain * elements to set properties, elements which * connect signals to handlers, and elements, which describe * child objects (most often widgets inside a container, but also e.g. * actions in an action group, or columns in a tree model). A * element contains an element which describes the child object. * The target toolkit version(s) are described by elements, * the “lib” attribute specifies the widget library in question (currently * the only supported value is “gtk+”) and the “version” attribute specifies * the target version in the form “.”. The builder will error * out if the version requirements are not met. * * Typically, the specific kind of object represented by an * element is specified by the “class” attribute. If the type has not * been loaded yet, GTK+ tries to find the get_type() function from the * class name by applying heuristics. This works in most cases, but if * necessary, it is possible to specify the name of the get_type() function * explictly with the "type-func" attribute. As a special case, GtkBuilder * allows to use an object that has been constructed by a #GtkUIManager in * another part of the UI definition by specifying the id of the #GtkUIManager * in the “constructor” attribute and the name of the object in the “id” * attribute. * * Objects may be given a name with the “id” attribute, which allows the * application to retrieve them from the builder with gtk_builder_get_object(). * An id is also necessary to use the object as property value in other * parts of the UI definition. GTK+ reserves ids starting and ending * with ___ (3 underscores) for its own purposes. * * Setting properties of objects is pretty straightforward with the * element: the “name” attribute specifies the name of the * property, and the content of the element specifies the value. * If the “translatable” attribute is set to a true value, GTK+ uses * gettext() (or dgettext() if the builder has a translation domain set) * to find a translation for the value. This happens before the value * is parsed, so it can be used for properties of any type, but it is * probably most useful for string properties. It is also possible to * specify a context to disambiguate short strings, and comments which * may help the translators. * * GtkBuilder can parse textual representations for the most common * property types: characters, strings, integers, floating-point numbers, * booleans (strings like “TRUE”, “t”, “yes”, “y”, “1” are interpreted * as %TRUE, strings like “FALSE”, “f”, “no”, “n”, “0” are interpreted * as %FALSE), enumerations (can be specified by their name, nick or * integer value), flags (can be specified by their name, nick, integer * value, optionally combined with “|”, e.g. “GTK_VISIBLE|GTK_REALIZED”) * and colors (in a format understood by gdk_rgba_parse()). * * GVariants can be specified in the format understood by g_variant_parse(), * and pixbufs can be specified as a filename of an image file to load. * * Objects can be referred to by their name and by default refer to * objects declared in the local xml fragment and objects exposed via * gtk_builder_expose_object(). In general, GtkBuilder allows forward * references to objects — declared in the local xml; an object doesn’t * have to be constructed before it can be referred to. The exception * to this rule is that an object has to be constructed before it can * be used as the value of a construct-only property. * * It is also possible to bind a property value to another object's * property value using the attributes * "bind-source" to specify the source object of the binding, * "bind-property" to specify the source property and optionally * "bind-flags" to specify the binding flags * Internally builder implement this using GBinding objects. * For more information see g_object_bind_property() * * Signal handlers are set up with the element. The “name” * attribute specifies the name of the signal, and the “handler” attribute * specifies the function to connect to the signal. By default, GTK+ tries * to find the handler using g_module_symbol(), but this can be changed by * passing a custom #GtkBuilderConnectFunc to * gtk_builder_connect_signals_full(). The remaining attributes, “after”, * “swapped” and “object”, have the same meaning as the corresponding * parameters of the g_signal_connect_object() or * g_signal_connect_data() functions. A “last_modification_time” * attribute is also allowed, but it does not have a meaning to the * builder. * * Sometimes it is necessary to refer to widgets which have implicitly * been constructed by GTK+ as part of a composite widget, to set * properties on them or to add further children (e.g. the @vbox of * a #GtkDialog). This can be achieved by setting the “internal-child” * propery of the element to a true value. Note that GtkBuilder * still requires an element for the internal child, even if it * has already been constructed. * * A number of widgets have different places where a child can be added * (e.g. tabs vs. page content in notebooks). This can be reflected in * a UI definition by specifying the “type” attribute on a * The possible values for the “type” attribute are described in the * sections describing the widget-specific portions of UI definitions. * * # A GtkBuilder UI Definition * * |[ * * * * * 10 * * * 20 * * * gtk-ok * TRUE * * * * * * * * * * ]| * * Beyond this general structure, several object classes define their * own XML DTD fragments for filling in the ANY placeholders in the DTD * above. Note that a custom element in a element gets parsed by * the custom tag handler of the parent object, while a custom element in * an element gets parsed by the custom tag handler of the object. * * These XML fragments are explained in the documentation of the * respective objects. * * Additionally, since 3.10 a special